@builder.io/sdk-vue 0.5.7 → 0.5.9
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/package.json +1 -1
- package/packages/_vue2/dist/{block-styles.4aca252e.js → block-styles.2f2d681c.js} +5 -5
- package/packages/_vue2/dist/{block-styles.d4e625bc.cjs → block-styles.e0c362f1.cjs} +1 -1
- package/packages/_vue2/dist/{block-wrapper.df62a070.cjs → block-wrapper.60491ece.cjs} +1 -1
- package/packages/_vue2/dist/{block-wrapper.266a0ef3.js → block-wrapper.675417b1.js} +5 -5
- package/packages/_vue2/dist/{block.1c14e1e8.cjs → block.2b1ac86c.cjs} +2 -2
- package/packages/_vue2/dist/{block.33475f0d.js → block.b10ffc8d.js} +7 -7
- package/packages/_vue2/dist/{blocks-wrapper.030b1bc5.js → blocks-wrapper.1f4e53ec.js} +1 -1
- package/packages/_vue2/dist/{blocks-wrapper.42eb4446.cjs → blocks-wrapper.87c356a1.cjs} +1 -1
- package/packages/_vue2/dist/{component-ref.2a5e1ada.js → component-ref.d1a3e1db.js} +16 -16
- package/packages/_vue2/dist/component-ref.e0e18275.cjs +1 -0
- package/packages/_vue2/dist/{content.ea0a72d4.js → content.4dd9bed9.js} +5 -5
- package/packages/_vue2/dist/{content.e5d197c3.cjs → content.e0c272e6.cjs} +1 -1
- package/packages/_vue2/dist/{css.dd09e65b.js → css.3b52add0.js} +1 -1
- package/packages/_vue2/dist/{css.21080882.cjs → css.5b6afc6e.cjs} +1 -1
- package/packages/_vue2/dist/{enable-editor.472fc3ec.cjs → enable-editor.29678a79.cjs} +1 -1
- package/packages/_vue2/dist/{enable-editor.6c4a1aca.js → enable-editor.c8c377d7.js} +22 -22
- package/packages/_vue2/dist/evaluate.585803ce.cjs +1 -0
- package/packages/_vue2/dist/evaluate.b622b309.js +97 -0
- package/packages/_vue2/dist/{get-block-actions.982724b1.js → get-block-actions.17f0418a.js} +2 -2
- package/packages/_vue2/dist/{get-block-actions.2fa72e92.cjs → get-block-actions.cc26a1a3.cjs} +1 -1
- package/packages/_vue2/dist/{get-block-properties.008d318f.js → get-block-properties.3a4c9314.js} +2 -2
- package/packages/_vue2/dist/{get-block-properties.094bfc1a.cjs → get-block-properties.fbe48fae.cjs} +1 -1
- package/packages/_vue2/dist/{get-processed-block.06b725b4.cjs → get-processed-block.5937bfa6.cjs} +1 -1
- package/packages/_vue2/dist/{get-processed-block.cabbf7c1.js → get-processed-block.92e6395c.js} +2 -2
- package/packages/_vue2/dist/{index.d24a9f20.cjs → index.04a22940.cjs} +7 -7
- package/packages/_vue2/dist/{index.da59485b.js → index.835b8ee0.js} +102 -101
- package/packages/_vue2/dist/{inlined-script.7d9f29c5.cjs → inlined-script.0c7f9ce3.cjs} +1 -1
- package/packages/_vue2/dist/{inlined-script.d5b1456d.js → inlined-script.3ec95873.js} +1 -1
- package/packages/_vue2/dist/{inlined-styles.ef691e26.cjs → inlined-styles.89ce41e1.cjs} +1 -1
- package/packages/_vue2/dist/{inlined-styles.4fd4586c.js → inlined-styles.ccff7c47.js} +1 -1
- package/packages/_vue2/dist/{interactive-element.7172524e.js → interactive-element.fa779554.js} +5 -5
- package/packages/_vue2/dist/interactive-element.fdd261bc.cjs +1 -0
- package/packages/_vue2/dist/{non-node-runtime.fac94d56.cjs → non-node-runtime.ddfeed94.cjs} +9 -9
- package/packages/{_vue3/dist/non-node-runtime.cac77d48.js → _vue2/dist/non-node-runtime.eb7f6595.js} +66 -65
- package/packages/_vue2/dist/{repeated-block.2b3065cd.js → repeated-block.3c989659.js} +2 -2
- package/packages/_vue2/dist/{repeated-block.27283bd9.cjs → repeated-block.48fbaaab.cjs} +1 -1
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +6 -6
- package/packages/_vue2/dist/src/components/content/content.types.d.ts +2 -2
- package/packages/_vue2/dist/src/components/content-variants/content-variants.types.d.ts +1 -1
- package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/evaluate/browser-runtime/browser.d.ts +4 -0
- package/packages/_vue2/dist/src/functions/evaluate/evaluate.d.ts +4 -8
- package/packages/_vue2/dist/src/functions/evaluate/helpers.d.ts +18 -0
- package/packages/_vue2/dist/src/functions/evaluate/index.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/evaluate/non-node-runtime/non-node-runtime.d.ts +2 -2
- package/packages/_vue2/dist/src/functions/fetch-builder-props.d.ts +2 -2
- package/packages/_vue2/dist/src/index.d.ts +5 -14
- package/packages/_vue2/dist/src/server-index.d.ts +15 -0
- package/packages/_vue2/dist/{styles.d53197f4.js → styles.22b87564.js} +2 -2
- package/packages/_vue2/dist/{styles.39410f45.cjs → styles.a3209286.cjs} +2 -2
- package/packages/_vue3/dist/{block-wrapper.f6009433.cjs → block-wrapper.4abbfa5d.cjs} +1 -1
- package/packages/_vue3/dist/{block-wrapper.c5fdd37d.js → block-wrapper.e6a959ca.js} +2 -2
- package/packages/_vue3/dist/component-ref.16c18e90.cjs +1 -0
- package/packages/_vue3/dist/{component-ref.513230d1.js → component-ref.b3232d22.js} +19 -19
- package/packages/_vue3/dist/{get-block-actions.98c78ed5.js → get-block-actions.48118020.js} +1 -1
- package/packages/_vue3/dist/{get-block-actions.63f93beb.cjs → get-block-actions.83a66ea4.cjs} +1 -1
- package/packages/_vue3/dist/{index.b87be7b3.js → index.ee80c2d7.js} +430 -411
- package/packages/_vue3/dist/index.f36face2.cjs +69 -0
- package/packages/{_vue2/dist/non-node-runtime.2372bfdf.js → _vue3/dist/non-node-runtime.15581a63.js} +62 -64
- package/packages/_vue3/dist/{non-node-runtime.73787d0f.cjs → non-node-runtime.fb2b33d0.cjs} +8 -8
- package/packages/_vue3/dist/{repeated-block.8758f41a.cjs → repeated-block.33f567b4.cjs} +1 -1
- package/packages/_vue3/dist/{repeated-block.3a92872a.js → repeated-block.53ae8c41.js} +2 -2
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +2 -2
- package/packages/_vue3/dist/src/components/content/content.types.d.ts +2 -2
- package/packages/_vue3/dist/src/components/content-variants/content-variants.types.d.ts +1 -1
- package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/evaluate/browser-runtime/browser.d.ts +4 -0
- package/packages/_vue3/dist/src/functions/evaluate/evaluate.d.ts +4 -8
- package/packages/_vue3/dist/src/functions/evaluate/helpers.d.ts +18 -0
- package/packages/_vue3/dist/src/functions/evaluate/index.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/evaluate/non-node-runtime/non-node-runtime.d.ts +2 -2
- package/packages/_vue3/dist/src/functions/fetch-builder-props.d.ts +2 -2
- package/packages/_vue3/dist/src/index.d.ts +5 -14
- package/packages/_vue3/dist/src/server-index.d.ts +15 -0
- package/packages/_vue2/dist/component-ref.c0ab9fe2.cjs +0 -1
- package/packages/_vue2/dist/evaluate.79598493.cjs +0 -4
- package/packages/_vue2/dist/evaluate.9bc5efc5.js +0 -79
- package/packages/_vue2/dist/interactive-element.0a1def03.cjs +0 -1
- package/packages/_vue2/dist/src/functions/evaluate/types.d.ts +0 -11
- package/packages/_vue3/dist/component-ref.5807e495.cjs +0 -1
- package/packages/_vue3/dist/index.9693ab51.cjs +0 -72
- package/packages/_vue3/dist/src/functions/evaluate/types.d.ts +0 -11
- /package/packages/_vue2/dist/src/functions/evaluate/{acorn-interpreter.d.ts → non-node-runtime/acorn-interpreter.d.ts} +0 -0
- /package/packages/_vue3/dist/src/functions/evaluate/{acorn-interpreter.d.ts → non-node-runtime/acorn-interpreter.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as h } from "vue";
|
|
2
|
-
import { T as S, c as i, g as k, a as m, n as y } from "./index.
|
|
3
|
-
import { g as f } from "./get-processed-block.
|
|
4
|
-
import { c as n } from "./css.
|
|
5
|
-
import "./evaluate.
|
|
2
|
+
import { T as S, c as i, g as k, a as m, n as y } from "./index.835b8ee0.js";
|
|
3
|
+
import { g as f } from "./get-processed-block.92e6395c.js";
|
|
4
|
+
import { c as n } from "./css.3b52add0.js";
|
|
5
|
+
import "./evaluate.b622b309.js";
|
|
6
6
|
import "./set.b219ab0e.js";
|
|
7
|
-
const _ = () => import("./inlined-styles.
|
|
7
|
+
const _ = () => import("./inlined-styles.ccff7c47.js").then((t) => t.default).catch((t) => {
|
|
8
8
|
throw console.error(
|
|
9
9
|
"Error while attempting to dynamically import component InlinedStyles at ../../inlined-styles.vue",
|
|
10
10
|
t
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),t=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),t=require("./index.04a22940.cjs"),p=require("./get-processed-block.5937bfa6.cjs"),n=require("./css.5b6afc6e.cjs");require("./evaluate.585803ce.cjs");require("./set.87eb0329.cjs");const S=()=>Promise.resolve().then(()=>require("./inlined-styles.89ce41e1.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedStyles at ../../inlined-styles.vue",e),e}),y=h.defineComponent({name:"block-styles",components:{"inlined-styles":S},props:["block","context"],data(){return{processedBlock:p.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0}),TARGET:t.TARGET}},computed:{canShowBlock(){return t.checkIsDefined(this.processedBlock.hide)?!this.processedBlock.hide:t.checkIsDefined(this.processedBlock.show)?this.processedBlock.show:!0},css(){var a;const e=this.processedBlock.responsiveStyles,s=this.context.content,o=t.getSizesForBreakpoints(((a=s==null?void 0:s.meta)==null?void 0:a.breakpoints)||{}),r=e==null?void 0:e.large,l=e==null?void 0:e.medium,i=e==null?void 0:e.small,c=this.processedBlock.id;if(!c)return"";const d=r?n.createCssClass({className:c,styles:r}):"",u=l?n.createCssClass({className:c,styles:l,mediaQuery:t.getMaxWidthQueryForSize("medium",o)}):"",m=i?n.createCssClass({className:c,styles:i,mediaQuery:t.getMaxWidthQueryForSize("small",o)}):"";return[d,u,m].join(" ")}}});var k=function(){var s=this,o=s._self._c;return s._self._setupProxy,s.TARGET!=="reactNative"&&s.css&&s.canShowBlock?o("inlined-styles",{attrs:{styles:s.css}}):s._e()},f=[],_=t.normalizeComponent(y,k,f,!1,null,null,null,null);const v=_.exports;exports.default=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),c=require("./get-block-actions.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),c=require("./get-block-actions.cc26a1a3.cjs"),r=require("./get-block-properties.fbe48fae.cjs"),n=require("./index.04a22940.cjs");require("./evaluate.585803ce.cjs");require("./css.5b6afc6e.cjs");const l=o.defineComponent({name:"block-wrapper",props:["Wrapper","block","context","hasChildren"],data(){return{getBlockActions:c.getBlockActions,getBlockProperties:r.getBlockProperties}}});var a=function(){var t=this,e=t._self._c;return t._self._setupProxy,t.hasChildren?e(t.Wrapper,t._g(t._b({tag:"component"},"component",t.getBlockProperties({block:t.block,context:t.context}),!1),t.getBlockActions({block:t.block,rootState:t.context.rootState,rootSetState:t.context.rootSetState,localState:t.context.localState,context:t.context.context,stripPrefix:!0})),[t._t("default")],2):e(t.Wrapper,t._g(t._b({tag:"component"},"component",t.getBlockProperties({block:t.block,context:t.context}),!1),t.getBlockActions({block:t.block,rootState:t.context.rootState,rootSetState:t.context.rootSetState,localState:t.context.localState,context:t.context.context,stripPrefix:!0})))},s=[],i=n.normalizeComponent(l,a,s,!1,null,null,null,null);const p=i.exports;exports.default=p;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as e } from "vue";
|
|
2
|
-
import { g as r } from "./get-block-actions.
|
|
3
|
-
import { g as c } from "./get-block-properties.
|
|
4
|
-
import { n } from "./index.
|
|
5
|
-
import "./evaluate.
|
|
6
|
-
import "./css.
|
|
2
|
+
import { g as r } from "./get-block-actions.17f0418a.js";
|
|
3
|
+
import { g as c } from "./get-block-properties.3a4c9314.js";
|
|
4
|
+
import { n } from "./index.835b8ee0.js";
|
|
5
|
+
import "./evaluate.b622b309.js";
|
|
6
|
+
import "./css.3b52add0.js";
|
|
7
7
|
const a = e({
|
|
8
8
|
name: "block-wrapper",
|
|
9
9
|
props: ["Wrapper", "block", "context", "hasChildren"],
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("vue"),a=require("./get-processed-block.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("vue"),a=require("./get-processed-block.5937bfa6.cjs"),m=require("./evaluate.585803ce.cjs"),d=require("./index.04a22940.cjs");require("./set.87eb0329.cjs");function h(t){var e;return{...(e=t.component)==null?void 0:e.options,...t.options,builderBlock:t}}const u=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],k=t=>typeof t=="string"&&u.includes(t.toLowerCase()),b=({block:t,context:e,registeredComponents:o})=>{var r;const c=(r=a.getProcessedBlock({block:t,localState:e.localState,rootState:e.rootState,rootSetState:e.rootSetState,context:e.context,shouldEvaluateBindings:!1}).component)==null?void 0:r.name;if(!c)return null;const n=o[c];if(n)return n;console.warn(`
|
|
2
2
|
Could not find a registered component named "${c}".
|
|
3
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`)},f=({block:t,context:e})=>{const{repeat:o,...c}=t;if(!(o!=null&&o.collection))return;const n=m.evaluate({code:o.collection,localState:e.localState,rootState:e.rootState,rootSetState:e.rootSetState,context:e.context});if(!Array.isArray(n))return;const r=o.collection.split(".").pop(),s=o.itemName||(r?r+"Item":"item");return n.map((l,i)=>({context:{...e,localState:{...e.localState,$index:i,$item:l,[s]:l,[`$${s}Index`]:i}},block:c}))},C=()=>Promise.resolve().then(()=>require("./block-styles.
|
|
3
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`)},f=({block:t,context:e})=>{const{repeat:o,...c}=t;if(!(o!=null&&o.collection))return;const n=m.evaluate({code:o.collection,localState:e.localState,rootState:e.rootState,rootSetState:e.rootSetState,context:e.context});if(!Array.isArray(n))return;const r=o.collection.split(".").pop(),s=o.itemName||(r?r+"Item":"item");return n.map((l,i)=>({context:{...e,localState:{...e.localState,$index:i,$item:l,[s]:l,[`$${s}Index`]:i}},block:c}))},C=()=>Promise.resolve().then(()=>require("./block-styles.e0c362f1.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",t),t}),S=()=>Promise.resolve().then(()=>require("./repeated-block.48fbaaab.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",t),t}),g=()=>Promise.resolve().then(()=>require("./component-ref.e0e18275.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",t),t}),y=()=>Promise.resolve().then(()=>require("./block-wrapper.60491ece.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",t),t}),B=p.defineComponent({name:"block",components:{"component-ref":g,"block-wrapper":y,"repeated-block":S,"block-styles":C},props:["block","context","registeredComponents"],data(){return{childrenContext:this.context,isEmptyHtmlElement:k}},computed:{blockComponent(){return b({block:this.block,context:this.context,registeredComponents:this.registeredComponents})},repeatItem(){return f({block:this.block,context:this.context})},processedBlock(){return this.repeatItem?this.block:a.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0})},Tag(){return this.block.tagName||"div"},canShowBlock(){return"hide"in this.processedBlock?!this.processedBlock.hide:"show"in this.processedBlock?this.processedBlock.show:!0},childrenWithoutParentComponent(){var e,o;return!((e=this.blockComponent)!=null&&e.component)&&!this.repeatItem?(o=this.processedBlock.children)!=null?o:[]:[]},componentRefProps(){var t,e,o,c,n,r;return{blockChildren:(t=this.processedBlock.children)!=null?t:[],componentRef:(e=this.blockComponent)==null?void 0:e.component,componentOptions:{...h(this.processedBlock),builderContext:this.context,...((o=this.blockComponent)==null?void 0:o.name)==="Symbol"||((c=this.blockComponent)==null?void 0:c.name)==="Columns"?{builderComponents:this.registeredComponents}:{}},context:this.childrenContext,registeredComponents:this.registeredComponents,builderBlock:this.processedBlock,includeBlockProps:((n=this.blockComponent)==null?void 0:n.noWrap)===!0,isInteractive:!((r=this.blockComponent)!=null&&r.isRSC)}}}});var x=function(){var c;var e=this,o=e._self._c;return e._self._setupProxy,!Boolean(!((c=e.blockComponent)!=null&&c.noWrap))&&e.canShowBlock?o("component-ref",e._b({},"component-ref",e.componentRefProps,!1)):e.isEmptyHtmlElement(e.Tag)&&e.canShowBlock?o("block-wrapper",{attrs:{Wrapper:e.Tag,block:e.processedBlock,context:e.context,hasChildren:!1}}):!e.isEmptyHtmlElement(e.Tag)&&e.repeatItem&&e.canShowBlock?o("div",{staticClass:"vue2-root-element-workaround"},e._l(e.repeatItem,function(n,r){return o("repeated-block",{key:r,attrs:{repeatContext:n.context,block:n.block,registeredComponents:e.registeredComponents}})}),1):e.canShowBlock?o("block-wrapper",{attrs:{Wrapper:e.Tag,block:e.processedBlock,context:e.context,hasChildren:!0}},[o("component-ref",e._b({},"component-ref",e.componentRefProps,!1)),e._l(e.childrenWithoutParentComponent,function(n,r){return o("block",{key:"block-"+n.id,attrs:{block:n,context:e.childrenContext,registeredComponents:e.registeredComponents}})}),e._l(e.childrenWithoutParentComponent,function(n,r){return o("block-styles",{key:"block-style-"+n.id,attrs:{block:n,context:e.childrenContext}})})],2):e._e()},v=[],w=d.normalizeComponent(B,x,v,!1,null,null,null,null);const _=w.exports;exports.default=_;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as p } from "vue";
|
|
2
|
-
import { g as a } from "./get-processed-block.
|
|
3
|
-
import { e as m } from "./evaluate.
|
|
4
|
-
import { n as d } from "./index.
|
|
2
|
+
import { g as a } from "./get-processed-block.92e6395c.js";
|
|
3
|
+
import { e as m } from "./evaluate.b622b309.js";
|
|
4
|
+
import { n as d } from "./index.835b8ee0.js";
|
|
5
5
|
import "./set.b219ab0e.js";
|
|
6
6
|
function h(e) {
|
|
7
7
|
var t;
|
|
@@ -66,22 +66,22 @@ const k = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen",
|
|
|
66
66
|
},
|
|
67
67
|
block: c
|
|
68
68
|
}));
|
|
69
|
-
}, C = () => import("./block-styles.
|
|
69
|
+
}, C = () => import("./block-styles.2f2d681c.js").then((e) => e.default).catch((e) => {
|
|
70
70
|
throw console.error(
|
|
71
71
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
72
72
|
e
|
|
73
73
|
), e;
|
|
74
|
-
}), S = () => import("./repeated-block.
|
|
74
|
+
}), S = () => import("./repeated-block.3c989659.js").then((e) => e.default).catch((e) => {
|
|
75
75
|
throw console.error(
|
|
76
76
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
77
77
|
e
|
|
78
78
|
), e;
|
|
79
|
-
}), g = () => import("./component-ref.
|
|
79
|
+
}), g = () => import("./component-ref.d1a3e1db.js").then((e) => e.default).catch((e) => {
|
|
80
80
|
throw console.error(
|
|
81
81
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
82
82
|
e
|
|
83
83
|
), e;
|
|
84
|
-
}), y = () => import("./block-wrapper.
|
|
84
|
+
}), y = () => import("./block-wrapper.675417b1.js").then((e) => e.default).catch((e) => {
|
|
85
85
|
throw console.error(
|
|
86
86
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
87
87
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),r=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),r=require("./index.04a22940.cjs"),a=o.defineComponent({name:"builder-blocks-wrapper",props:["blocks","parent","path","styleProp"],computed:{className(){var t;return"builder-blocks"+((t=this.blocks)!=null&&t.length?"":" no-blocks")}},methods:{onClick(){var t,e;r.isEditing()&&!((t=this.blocks)!=null&&t.length)&&((e=window.parent)==null||e.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},onMouseEnter(){var t,e;r.isEditing()&&!((t=this.blocks)!=null&&t.length)&&((e=window.parent)==null||e.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},_classStringToObject(t){const e={};if(typeof t!="string")return e;const s=t.trim().split(/\s+/);for(const n of s)e[n]=!0;return e}}});var i=function(){var e=this,s=e._self._c;return e._self._setupProxy,s("div",e._b({class:e._classStringToObject(e.className+" div-tqyw9m0iue"),style:e.styleProp,attrs:{"builder-path":e.path,"builder-parent-id":e.parent},on:{click:function(n){return e.onClick()},mouseenter:function(n){return e.onMouseEnter()},keypress:function(n){return e.onClick()}}},"div",{},!1),[e._t("default")],2)},l=[],c=r.normalizeComponent(a,i,l,!1,null,"a3106f07",null,null);const p=c.exports;exports.default=p;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as p } from "vue";
|
|
2
|
-
import { g as s } from "./get-block-properties.
|
|
3
|
-
import { n as a } from "./index.
|
|
4
|
-
import "./css.
|
|
5
|
-
const m = ({
|
|
2
|
+
import { g as s } from "./get-block-properties.3a4c9314.js";
|
|
3
|
+
import { n as a } from "./index.835b8ee0.js";
|
|
4
|
+
import "./css.3b52add0.js";
|
|
5
|
+
const m = (t) => t, k = ({
|
|
6
6
|
componentOptions: t,
|
|
7
7
|
builderBlock: e,
|
|
8
8
|
context: n,
|
|
@@ -23,17 +23,17 @@ const m = ({
|
|
|
23
23
|
context: i
|
|
24
24
|
})
|
|
25
25
|
} : {}
|
|
26
|
-
},
|
|
26
|
+
}, u = () => import("./block-styles.2f2d681c.js").then((t) => t.default).catch((t) => {
|
|
27
27
|
throw console.error(
|
|
28
28
|
"Error while attempting to dynamically import component BlockStyles at ../block-styles.vue",
|
|
29
29
|
t
|
|
30
30
|
), t;
|
|
31
|
-
}),
|
|
31
|
+
}), f = () => import("./block.b10ffc8d.js").then((t) => t.default).catch((t) => {
|
|
32
32
|
throw console.error(
|
|
33
33
|
"Error while attempting to dynamically import component Block at ../../block.vue",
|
|
34
34
|
t
|
|
35
35
|
), t;
|
|
36
|
-
}), c = () => import("./interactive-element.
|
|
36
|
+
}), c = () => import("./interactive-element.fa779554.js").then((t) => t.default).catch((t) => {
|
|
37
37
|
throw console.error(
|
|
38
38
|
"Error while attempting to dynamically import component InteractiveElement at ../interactive-element.vue",
|
|
39
39
|
t
|
|
@@ -41,8 +41,8 @@ const m = ({
|
|
|
41
41
|
}), d = p({
|
|
42
42
|
name: "component-ref",
|
|
43
43
|
components: {
|
|
44
|
-
block:
|
|
45
|
-
"block-styles":
|
|
44
|
+
block: f,
|
|
45
|
+
"block-styles": u,
|
|
46
46
|
"interactive-element": c
|
|
47
47
|
},
|
|
48
48
|
props: [
|
|
@@ -57,12 +57,12 @@ const m = ({
|
|
|
57
57
|
],
|
|
58
58
|
data() {
|
|
59
59
|
return {
|
|
60
|
-
Wrapper: this.isInteractive ? c : this.componentRef,
|
|
61
|
-
getWrapperProps:
|
|
60
|
+
Wrapper: this.isInteractive ? m(c) : this.componentRef,
|
|
61
|
+
getWrapperProps: k
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
-
var
|
|
65
|
+
var _ = function() {
|
|
66
66
|
var e = this, n = e._self._c;
|
|
67
67
|
return e._self._setupProxy, e.componentRef ? n(e.Wrapper, e._b(
|
|
68
68
|
{ tag: "component" },
|
|
@@ -82,17 +82,17 @@ var f = function() {
|
|
|
82
82
|
}), e._l(e.blockChildren, function(o, r) {
|
|
83
83
|
return n("block-styles", { key: "block-style-" + o.id, attrs: { block: o, context: e.context } });
|
|
84
84
|
})], 2) : e._e();
|
|
85
|
-
},
|
|
85
|
+
}, b = [], v = /* @__PURE__ */ a(
|
|
86
86
|
d,
|
|
87
|
-
f,
|
|
88
87
|
_,
|
|
88
|
+
b,
|
|
89
89
|
!1,
|
|
90
90
|
null,
|
|
91
91
|
null,
|
|
92
92
|
null,
|
|
93
93
|
null
|
|
94
94
|
);
|
|
95
|
-
const
|
|
95
|
+
const P = v.exports;
|
|
96
96
|
export {
|
|
97
|
-
|
|
97
|
+
P as default
|
|
98
98
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),a=require("./get-block-properties.fbe48fae.cjs"),p=require("./index.04a22940.cjs");require("./css.5b6afc6e.cjs");const m=t=>t,u=({componentOptions:t,builderBlock:e,context:n,componentRef:o,includeBlockProps:r,isInteractive:l,contextValue:s})=>l?{Wrapper:o,block:e,context:n,wrapperProps:t}:{...t,...r?{attributes:a.getBlockProperties({block:e,context:s})}:{}},d=()=>Promise.resolve().then(()=>require("./block-styles.e0c362f1.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ../block-styles.vue",t),t}),k=()=>Promise.resolve().then(()=>require("./block.2b1ac86c.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component Block at ../../block.vue",t),t}),c=()=>Promise.resolve().then(()=>require("./interactive-element.fdd261bc.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component InteractiveElement at ../interactive-element.vue",t),t}),f=i.defineComponent({name:"component-ref",components:{block:k,"block-styles":d,"interactive-element":c},props:["isInteractive","componentRef","componentOptions","builderBlock","context","includeBlockProps","blockChildren","registeredComponents"],data(){return{Wrapper:this.isInteractive?m(c):this.componentRef,getWrapperProps:u}}});var b=function(){var e=this,n=e._self._c;return e._self._setupProxy,e.componentRef?n(e.Wrapper,e._b({tag:"component"},"component",e.getWrapperProps({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),!1),[e._l(e.blockChildren,function(o,r){return n("block",{key:"block-"+o.id,attrs:{block:o,context:e.context,registeredComponents:e.registeredComponents}})}),e._l(e.blockChildren,function(o,r){return n("block-styles",{key:"block-style-"+o.id,attrs:{block:o,context:e.context}})})],2):e._e()},v=[],_=p.normalizeComponent(f,b,v,!1,null,null,null,null);const h=_.exports;exports.default=h;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p } from "vue";
|
|
2
|
-
import { n as u, b as y,
|
|
2
|
+
import { n as u, b as y, e as x, B as v, C as S, F as _, I as T, S as I, h as C, j as w, V as k, k as F, m as f, s as g, T as R, o as E } from "./index.835b8ee0.js";
|
|
3
3
|
const V = {
|
|
4
4
|
name: "Core:Button",
|
|
5
5
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
@@ -783,22 +783,22 @@ const ae = ne.exports, oe = {
|
|
|
783
783
|
...t
|
|
784
784
|
},
|
|
785
785
|
meta: e == null ? void 0 : e.meta
|
|
786
|
-
} : void 0, se = () => import("./index.
|
|
786
|
+
} : void 0, se = () => import("./index.835b8ee0.js").then((e) => e.L).then((e) => e.default).catch((e) => {
|
|
787
787
|
throw console.error(
|
|
788
788
|
"Error while attempting to dynamically import component Blocks at ../blocks/blocks.vue",
|
|
789
789
|
e
|
|
790
790
|
), e;
|
|
791
|
-
}), le = () => import("./styles.
|
|
791
|
+
}), le = () => import("./styles.22b87564.js").then((e) => e.default).catch((e) => {
|
|
792
792
|
throw console.error(
|
|
793
793
|
"Error while attempting to dynamically import component ContentStyles at ./components/styles.vue",
|
|
794
794
|
e
|
|
795
795
|
), e;
|
|
796
|
-
}), ce = () => import("./enable-editor.
|
|
796
|
+
}), ce = () => import("./enable-editor.c8c377d7.js").then((e) => e.default).catch((e) => {
|
|
797
797
|
throw console.error(
|
|
798
798
|
"Error while attempting to dynamically import component EnableEditor at ./components/enable-editor.vue",
|
|
799
799
|
e
|
|
800
800
|
), e;
|
|
801
|
-
}), de = () => import("./inlined-script.
|
|
801
|
+
}), de = () => import("./inlined-script.3ec95873.js").then((e) => e.default).catch((e) => {
|
|
802
802
|
throw console.error(
|
|
803
803
|
"Error while attempting to dynamically import component InlinedScript at ../inlined-script.vue",
|
|
804
804
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),i=require("./index.d24a9f20.cjs"),g={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},b={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(a=>{a.delete("width")})}const n=e.get("columns");Array.isArray(n)&&!!n.find(r=>r.get("width"))&&(!!n.find(c=>!c.get("width"))||n.reduce((s,l)=>s+l.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}]},y={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},x={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(o,s=6e4){return new Promise((l,d)=>{const p=document.createElement("img");let m=!1;p.onload=()=>{m=!0,l(p)},p.addEventListener("error",h=>{console.warn("Image load failed",h.error),d(h.error)}),p.src=o,setTimeout(()=>{m||d(new Error("Image load timed out"))},s)})}function a(o){return Math.round(o*1e3)/1e3}const r=e.get("image"),c=e.get("aspectRatio");if(fetch(r).then(o=>o.blob()).then(o=>{o.type.includes("svg")&&e.set("noWebp",!0)}),r&&(!c||c===.7041))return n(r).then(o=>{const s=e.get("aspectRatio");e.get("image")===r&&(!s||s===.7041)&&o.width&&o.height&&(e.set("aspectRatio",a(o.height/o.width)),e.set("height",o.height),e.set("width",o.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},v={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>"}}}]},S={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"}]},T={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"}},_={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},C={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(a=>a.json()).then(a=>{e.get("url")===t&&(a.html?e.set("content",a.html):e.set("content","Invalid url, please try another"))}).catch(a=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},I=["text/javascript","application/javascript","application/ecmascript"],w=e=>I.includes(e.type),k=u.defineComponent({name:"builder-embed",props:["content"],data(){return{scriptsInserted:[],scriptsRun:[],ranInitFn:!1}},watch:{onUpdateHook0:{handler(){this.$refs.elem&&!this.ranInitFn&&(this.ranInitFn=!0,this.findAndRunScripts())},immediate:!0}},computed:{onUpdateHook0(){return{0:this.$refs.elem,1:this.ranInitFn}}},methods:{findAndRunScripts(){if(!this.$refs.elem||!this.$refs.elem.getElementsByTagName)return;const e=this.$refs.elem.getElementsByTagName("script");for(let t=0;t<e.length;t++){const n=e[t];if(n.src&&!this.scriptsInserted.includes(n.src)){this.scriptsInserted.push(n.src);const a=document.createElement("script");a.async=!0,a.src=n.src,document.head.appendChild(a)}else if(w(n)&&!this.scriptsRun.includes(n.innerText))try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(a){console.warn("`Embed`: Error running script:",a)}}}}});var R=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{ref:"elem",staticClass:"builder-embed",domProps:{innerHTML:t._s(t.content)}})},F=[],E=i.normalizeComponent(k,R,F,!1,null,null,null,null);const V=E.exports,A=u.defineComponent({name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data(){return{isEditing:i.isEditing,filterAttrs:i.filterAttrs}}});var P=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("img",t._g(t._b({key:t.isEditing()&&t.imgSrc||"default-key",style:{objectFit:t.backgroundSize||"cover",objectPosition:t.backgroundPosition||"center"},attrs:{alt:t.altText,src:t.imgSrc||t.image}},"img",t.filterAttrs(t.attributes,"v-on:",!1),!1),t.filterAttrs(t.attributes,"v-on:",!0)))},W=[],$=i.normalizeComponent(A,P,W,!1,null,null,null,null);const j=$.exports,U={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0},z=u.defineComponent({name:"builder-custom-code",props:["replaceNodes","code"],data(){return{scriptsInserted:[],scriptsRun:[]}},mounted(){this.findAndRunScripts()},methods:{findAndRunScripts(){if(this.$refs.elem&&this.$refs.elem.getElementsByTagName&&typeof window<"u"){const e=this.$refs.elem.getElementsByTagName("script");for(let t=0;t<e.length;t++){const n=e[t];if(n.src){if(this.scriptsInserted.includes(n.src))continue;this.scriptsInserted.push(n.src);const a=document.createElement("script");a.async=!0,a.src=n.src,document.head.appendChild(a)}else if(!n.type||["text/javascript","application/javascript","application/ecmascript"].includes(n.type)){if(this.scriptsRun.includes(n.innerText))continue;try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(a){console.warn("`CustomCode`: Error running script:",a)}}}}},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const a of n)t[a]=!0;return t}}});var H=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{ref:"elem",class:t._classStringToObject("builder-custom-code"+(t.replaceNodes?" replace-nodes":"")),domProps:{innerHTML:t._s(t.code)}})},q=[],L=i.normalizeComponent(z,H,q,!1,null,null,null,null);const D=L.exports,N={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}]},f=()=>[{component:i.Button,...g},{component:i.Columns,...b},{component:D,...N},{component:V,...C},{component:i.Fragment,...y},{component:i.Image,...x},{component:j,...U},{component:i.Section,...v},{component:i.Symbol,...S},{component:i.Text,...T},{component:i.Video,..._}],M=({content:e,data:t,locale:n})=>{var c,o,s;const a={};(o=(c=e==null?void 0:e.data)==null?void 0:c.inputs)==null||o.forEach(l=>{var d;l.name&&l.defaultValue!==void 0&&((d=e==null?void 0:e.data)==null?void 0:d.state)&&e.data.state[l.name]===void 0&&(a[l.name]=l.defaultValue)});const r={...(s=e==null?void 0:e.data)==null?void 0:s.state,...t,...n?{locale:n}:{}};return{...a,...r}},B=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0,K=()=>Promise.resolve().then(()=>require("./index.d24a9f20.cjs")).then(e=>e.blocks).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Blocks at ../blocks/blocks.vue",e),e}),O=()=>Promise.resolve().then(()=>require("./styles.39410f45.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component ContentStyles at ./components/styles.vue",e),e}),G=()=>Promise.resolve().then(()=>require("./enable-editor.472fc3ec.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component EnableEditor at ./components/enable-editor.vue",e),e}),J=()=>Promise.resolve().then(()=>require("./inlined-script.7d9f29c5.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedScript at ../inlined-script.vue",e),e}),Y=u.defineComponent({name:"content-component",components:{"enable-editor":G,"inlined-script":J,"content-styles":O,blocks:K},props:["content","customComponents","data","locale","context","apiKey","apiVersion","model","canTrack","includeRefs","enrich","classNameProp","showContent","isSsrAbTest"],data(){var e,t;return{scriptStr:i.getRenderContentScriptString({variationId:(e=this.content)==null?void 0:e.testVariationId,contentId:(t=this.content)==null?void 0:t.id}),registeredComponents:[...f(),...i.components,...this.customComponents||[]].reduce((n,{component:a,...r})=>({...n,[r.name]:{component:a,...i.serializeComponentInfo(r)}}),{}),builderContextSignal:{content:B({content:this.content,data:this.data}),localState:void 0,rootState:M({content:this.content,data:this.data,locale:this.locale}),rootSetState:this.contentSetState,context:this.context||{},apiKey:this.apiKey,apiVersion:this.apiVersion,componentInfos:[...f(),...i.components,...this.customComponents||[]].reduce((n,{component:a,...r})=>({...n,[r.name]:i.serializeComponentInfo(r)}),{}),inheritedStyles:{}},TARGET:i.TARGET}},provide(){const e=this;return{[i.ComponentsContext.key]:{registeredComponents:e.registeredComponents}}},methods:{contentSetState(e){this.builderContextSignal.rootState=e}}});var X=function(){var a,r,c,o,s,l,d;var t=this,n=t._self._c;return t._self._setupProxy,n("enable-editor",t._b({attrs:{content:t.content,model:t.model,context:t.context,apiKey:t.apiKey,canTrack:t.canTrack,locale:t.locale,includeRefs:t.includeRefs,enrich:t.enrich,classNameProp:t.classNameProp,showContent:t.showContent,builderContextSignal:t.builderContextSignal}},"enable-editor",{},!1),[t.isSsrAbTest?[n("inlined-script",{attrs:{scriptStr:t.scriptStr}})]:t._e(),t.TARGET!=="reactNative"?[n("content-styles",{attrs:{contentId:(a=t.builderContextSignal.content)==null?void 0:a.id,cssCode:(c=(r=t.builderContextSignal.content)==null?void 0:r.data)==null?void 0:c.cssCode,customFonts:(s=(o=t.builderContextSignal.content)==null?void 0:o.data)==null?void 0:s.customFonts}})]:t._e(),n("blocks",{attrs:{blocks:(d=(l=t.builderContextSignal.content)==null?void 0:l.data)==null?void 0:d.blocks,context:t.builderContextSignal,registeredComponents:t.registeredComponents}})],2)},Q=[],Z=i.normalizeComponent(Y,X,Q,!1,null,null,null,null);const ee=Z.exports;exports.default=ee;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),i=require("./index.04a22940.cjs"),g={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},b={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(a=>{a.delete("width")})}const n=e.get("columns");Array.isArray(n)&&!!n.find(r=>r.get("width"))&&(!!n.find(c=>!c.get("width"))||n.reduce((s,l)=>s+l.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}]},y={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},x={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(o,s=6e4){return new Promise((l,d)=>{const p=document.createElement("img");let m=!1;p.onload=()=>{m=!0,l(p)},p.addEventListener("error",h=>{console.warn("Image load failed",h.error),d(h.error)}),p.src=o,setTimeout(()=>{m||d(new Error("Image load timed out"))},s)})}function a(o){return Math.round(o*1e3)/1e3}const r=e.get("image"),c=e.get("aspectRatio");if(fetch(r).then(o=>o.blob()).then(o=>{o.type.includes("svg")&&e.set("noWebp",!0)}),r&&(!c||c===.7041))return n(r).then(o=>{const s=e.get("aspectRatio");e.get("image")===r&&(!s||s===.7041)&&o.width&&o.height&&(e.set("aspectRatio",a(o.height/o.width)),e.set("height",o.height),e.set("width",o.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},v={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>"}}}]},S={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"}]},T={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"}},_={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},C={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(a=>a.json()).then(a=>{e.get("url")===t&&(a.html?e.set("content",a.html):e.set("content","Invalid url, please try another"))}).catch(a=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},I=["text/javascript","application/javascript","application/ecmascript"],w=e=>I.includes(e.type),k=u.defineComponent({name:"builder-embed",props:["content"],data(){return{scriptsInserted:[],scriptsRun:[],ranInitFn:!1}},watch:{onUpdateHook0:{handler(){this.$refs.elem&&!this.ranInitFn&&(this.ranInitFn=!0,this.findAndRunScripts())},immediate:!0}},computed:{onUpdateHook0(){return{0:this.$refs.elem,1:this.ranInitFn}}},methods:{findAndRunScripts(){if(!this.$refs.elem||!this.$refs.elem.getElementsByTagName)return;const e=this.$refs.elem.getElementsByTagName("script");for(let t=0;t<e.length;t++){const n=e[t];if(n.src&&!this.scriptsInserted.includes(n.src)){this.scriptsInserted.push(n.src);const a=document.createElement("script");a.async=!0,a.src=n.src,document.head.appendChild(a)}else if(w(n)&&!this.scriptsRun.includes(n.innerText))try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(a){console.warn("`Embed`: Error running script:",a)}}}}});var R=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{ref:"elem",staticClass:"builder-embed",domProps:{innerHTML:t._s(t.content)}})},F=[],E=i.normalizeComponent(k,R,F,!1,null,null,null,null);const V=E.exports,A=u.defineComponent({name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data(){return{isEditing:i.isEditing,filterAttrs:i.filterAttrs}}});var P=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("img",t._g(t._b({key:t.isEditing()&&t.imgSrc||"default-key",style:{objectFit:t.backgroundSize||"cover",objectPosition:t.backgroundPosition||"center"},attrs:{alt:t.altText,src:t.imgSrc||t.image}},"img",t.filterAttrs(t.attributes,"v-on:",!1),!1),t.filterAttrs(t.attributes,"v-on:",!0)))},W=[],$=i.normalizeComponent(A,P,W,!1,null,null,null,null);const j=$.exports,U={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0},z=u.defineComponent({name:"builder-custom-code",props:["replaceNodes","code"],data(){return{scriptsInserted:[],scriptsRun:[]}},mounted(){this.findAndRunScripts()},methods:{findAndRunScripts(){if(this.$refs.elem&&this.$refs.elem.getElementsByTagName&&typeof window<"u"){const e=this.$refs.elem.getElementsByTagName("script");for(let t=0;t<e.length;t++){const n=e[t];if(n.src){if(this.scriptsInserted.includes(n.src))continue;this.scriptsInserted.push(n.src);const a=document.createElement("script");a.async=!0,a.src=n.src,document.head.appendChild(a)}else if(!n.type||["text/javascript","application/javascript","application/ecmascript"].includes(n.type)){if(this.scriptsRun.includes(n.innerText))continue;try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(a){console.warn("`CustomCode`: Error running script:",a)}}}}},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const a of n)t[a]=!0;return t}}});var H=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{ref:"elem",class:t._classStringToObject("builder-custom-code"+(t.replaceNodes?" replace-nodes":"")),domProps:{innerHTML:t._s(t.code)}})},q=[],L=i.normalizeComponent(z,H,q,!1,null,null,null,null);const D=L.exports,N={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}]},f=()=>[{component:i.Button,...g},{component:i.Columns,...b},{component:D,...N},{component:V,...C},{component:i.Fragment,...y},{component:i.Image,...x},{component:j,...U},{component:i.Section,...v},{component:i.Symbol,...S},{component:i.Text,...T},{component:i.Video,..._}],M=({content:e,data:t,locale:n})=>{var c,o,s;const a={};(o=(c=e==null?void 0:e.data)==null?void 0:c.inputs)==null||o.forEach(l=>{var d;l.name&&l.defaultValue!==void 0&&((d=e==null?void 0:e.data)==null?void 0:d.state)&&e.data.state[l.name]===void 0&&(a[l.name]=l.defaultValue)});const r={...(s=e==null?void 0:e.data)==null?void 0:s.state,...t,...n?{locale:n}:{}};return{...a,...r}},B=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0,K=()=>Promise.resolve().then(()=>require("./index.04a22940.cjs")).then(e=>e.blocks).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Blocks at ../blocks/blocks.vue",e),e}),O=()=>Promise.resolve().then(()=>require("./styles.a3209286.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component ContentStyles at ./components/styles.vue",e),e}),G=()=>Promise.resolve().then(()=>require("./enable-editor.29678a79.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component EnableEditor at ./components/enable-editor.vue",e),e}),J=()=>Promise.resolve().then(()=>require("./inlined-script.0c7f9ce3.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedScript at ../inlined-script.vue",e),e}),Y=u.defineComponent({name:"content-component",components:{"enable-editor":G,"inlined-script":J,"content-styles":O,blocks:K},props:["content","customComponents","data","locale","context","apiKey","apiVersion","model","canTrack","includeRefs","enrich","classNameProp","showContent","isSsrAbTest"],data(){var e,t;return{scriptStr:i.getRenderContentScriptString({variationId:(e=this.content)==null?void 0:e.testVariationId,contentId:(t=this.content)==null?void 0:t.id}),registeredComponents:[...f(),...i.components,...this.customComponents||[]].reduce((n,{component:a,...r})=>({...n,[r.name]:{component:a,...i.serializeComponentInfo(r)}}),{}),builderContextSignal:{content:B({content:this.content,data:this.data}),localState:void 0,rootState:M({content:this.content,data:this.data,locale:this.locale}),rootSetState:this.contentSetState,context:this.context||{},apiKey:this.apiKey,apiVersion:this.apiVersion,componentInfos:[...f(),...i.components,...this.customComponents||[]].reduce((n,{component:a,...r})=>({...n,[r.name]:i.serializeComponentInfo(r)}),{}),inheritedStyles:{}},TARGET:i.TARGET}},provide(){const e=this;return{[i.ComponentsContext.key]:{registeredComponents:e.registeredComponents}}},methods:{contentSetState(e){this.builderContextSignal.rootState=e}}});var X=function(){var a,r,c,o,s,l,d;var t=this,n=t._self._c;return t._self._setupProxy,n("enable-editor",t._b({attrs:{content:t.content,model:t.model,context:t.context,apiKey:t.apiKey,canTrack:t.canTrack,locale:t.locale,includeRefs:t.includeRefs,enrich:t.enrich,classNameProp:t.classNameProp,showContent:t.showContent,builderContextSignal:t.builderContextSignal}},"enable-editor",{},!1),[t.isSsrAbTest?[n("inlined-script",{attrs:{scriptStr:t.scriptStr}})]:t._e(),t.TARGET!=="reactNative"?[n("content-styles",{attrs:{contentId:(a=t.builderContextSignal.content)==null?void 0:a.id,cssCode:(c=(r=t.builderContextSignal.content)==null?void 0:r.data)==null?void 0:c.cssCode,customFonts:(s=(o=t.builderContextSignal.content)==null?void 0:o.data)==null?void 0:s.customFonts}})]:t._e(),n("blocks",{attrs:{blocks:(d=(l=t.builderContextSignal.content)==null?void 0:l.data)==null?void 0:d.blocks,context:t.builderContextSignal,registeredComponents:t.registeredComponents}})],2)},Q=[],Z=i.normalizeComponent(Y,X,Q,!1,null,null,null,null);const ee=Z.exports;exports.default=ee;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as o } from "./index.
|
|
1
|
+
import { c as o } from "./index.835b8ee0.js";
|
|
2
2
|
const c = (s) => s.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), n = (s) => Object.entries(s).map(([r, e]) => {
|
|
3
3
|
if (typeof e == "string")
|
|
4
4
|
return `${c(r)}: ${e};`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const n=require("./index.
|
|
1
|
+
"use strict";const n=require("./index.04a22940.cjs"),o=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),c=e=>Object.entries(e).map(([r,s])=>{if(typeof s=="string")return`${o(r)}: ${s};`}).filter(n.checkIsDefined),a=e=>c(e).join(`
|
|
2
2
|
`),i=({mediaQuery:e,className:t,styles:r})=>{const s=`.${t} {
|
|
3
3
|
${a(r)}
|
|
4
4
|
}`;return e?`${e} {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("vue"),p=require("./evaluate.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("vue"),p=require("./evaluate.585803ce.cjs"),a=require("./index.04a22940.cjs"),v="0.5.9",x=()=>{a.register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let m=!1;const k=(n={})=>{var e,t;m||(m=!0,a.isBrowser()&&((e=window.parent)==null||e.postMessage({type:"builder.sdkInfo",data:{target:a.TARGET,version:v,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(t=window.parent)==null||t.postMessage({type:"builder.updateContent",data:{options:n}},"*"),window.addEventListener("message",({data:i})=>{var o,s;if(!!(i!=null&&i.type))switch(i.type){case"builder.evaluate":{const r=i.data.text,b=i.data.arguments||[],c=i.data.id,S=new Function(r);let d,l=null;try{d=S.apply(null,b)}catch(u){l=u}l?(o=window.parent)==null||o.postMessage({type:"builder.evaluateError",data:{id:c,error:l.message}},"*"):d&&typeof d.then=="function"?d.then(u=>{var h;(h=window.parent)==null||h.postMessage({type:"builder.evaluateResult",data:{id:c,result:u}},"*")}).catch(console.error):(s=window.parent)==null||s.postMessage({type:"builder.evaluateResult",data:{result:d,id:c}},"*");break}}})))};function f(n){return Math.round(n*1e3)/1e3}const R=(n,e,t=!0)=>{if(!(n instanceof HTMLElement))return null;let i=t?n:n.parentElement;do{if(!i)return null;if(e(i))return i}while(i=i.parentElement);return null},y=n=>R(n,e=>{const t=e.getAttribute("builder-id")||e.id;return Boolean((t==null?void 0:t.indexOf("builder-"))===0)}),g=({event:n,target:e})=>{const t=e.getBoundingClientRect(),i=n.clientX-t.left,o=n.clientY-t.top,s=f(i/t.width),r=f(o/t.height);return{x:s,y:r}},w=n=>{const e=n.target,t=e&&y(e),i=(t==null?void 0:t.getAttribute("builder-id"))||(t==null?void 0:t.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:e?g({event:n,target:e}):void 0,builderTargetOffset:t?g({event:n,target:t}):void 0,builderElementIndex:t&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(t):void 0}}},E=C.defineComponent({name:"enable-editor",props:["canTrack","builderContextSignal","model","context","apiKey","showContent","classNameProp","content","locale","includeRefs","enrich"],data(){return{canTrackToUse:a.checkIsDefined(this.canTrack)?this.canTrack:!0,forceReRenderCount:0,lastUpdated:0,shouldSendResetCookie:!1,httpReqsData:{},clicked:!1,builderContext:a.builderContext}},provide(){const n=this;return{[a.builderContext.key]:n.builderContextSignal}},mounted(){var n,e;if(this.apiKey||a.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),a.isBrowser()){if(a.isEditing()&&(this.forceReRenderCount=this.forceReRenderCount+1,window.addEventListener("message",this.processMessage),x(),k({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{},...this.enrich?{enrich:this.enrich}:{}}),Object.values(this.builderContextSignal.componentInfos).forEach(t=>{var o;const i=a.createRegisterComponentMessage(t);(o=window.parent)==null||o.postMessage(i,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)),this.builderContextSignal.content){const t=(n=this.builderContextSignal.content)==null?void 0:n.testVariationId,i=(e=this.builderContextSignal.content)==null?void 0:e.id;a._track({type:"impression",canTrack:this.canTrackToUse,contentId:i,apiKey:this.apiKey,variationId:t!==i?t:void 0})}if(a.isPreviewing()){const t=new URL(location.href).searchParams,i=t.get("builder.preview"),o=t.get(`builder.preview.${i}`),s=t.get("apiKey")||t.get("builder.space");i===this.model&&s===this.apiKey&&(!this.content||o===this.content.id)&&a.fetchOneEntry({model:this.model,apiKey:this.apiKey,apiVersion:this.builderContextSignal.apiVersion}).then(r=>{r&&this.mergeNewContent(r)})}this.evaluateJsCode(),this.runHttpRequests(),this.emitStateUpdate()}},watch:{onUpdateHook0:{handler(){this.content&&this.mergeNewContent(this.content)},immediate:!0},onUpdateHook1:{handler(){},immediate:!0},onUpdateHook2:{handler(){this.evaluateJsCode()},immediate:!0},onUpdateHook3:{handler(){this.runHttpRequests()},immediate:!0},onUpdateHook4:{handler(){this.emitStateUpdate()},immediate:!0}},unmounted(){a.isBrowser()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{onUpdateHook0(){return{0:this.content}},onUpdateHook1(){return{0:this.shouldSendResetCookie}},onUpdateHook2(){var n,e;return{0:(e=(n=this.builderContextSignal.content)==null?void 0:n.data)==null?void 0:e.jsCode,1:this.builderContextSignal.rootState}},onUpdateHook3(){var n,e;return{0:(e=(n=this.builderContextSignal.content)==null?void 0:n.data)==null?void 0:e.httpRequests}},onUpdateHook4(){return{0:this.builderContextSignal.rootState}}},methods:{mergeNewContent(n){var t,i,o,s,r;const e={...this.builderContextSignal.content,...n,data:{...(t=this.builderContextSignal.content)==null?void 0:t.data,...n==null?void 0:n.data},meta:{...(i=this.builderContextSignal.content)==null?void 0:i.meta,...n==null?void 0:n.meta,breakpoints:((o=n==null?void 0:n.meta)==null?void 0:o.breakpoints)||((r=(s=this.builderContextSignal.content)==null?void 0:s.meta)==null?void 0:r.breakpoints)}};this.builderContextSignal.content=e},processMessage(n){var t;const{data:e}=n;if(e)switch(e.type){case"builder.configureSdk":{const i=e.data,{breakpoints:o,contentId:s}=i;if(!s||s!==((t=this.builderContextSignal.content)==null?void 0:t.id))return;o&&this.mergeNewContent({meta:{breakpoints:o}}),this.forceReRenderCount=this.forceReRenderCount+1;break}case"builder.contentUpdate":{const i=e.data,o=i.key||i.alias||i.entry||i.modelName,s=i.data;o===this.model&&(this.mergeNewContent(s),this.forceReRenderCount=this.forceReRenderCount+1);break}}},evaluateJsCode(){var e,t;const n=(t=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:t.jsCode;n&&p.evaluate({code:n,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.builderContextSignal.rootSetState})},onClick(n){var e,t;if(this.builderContextSignal.content){const i=(e=this.builderContextSignal.content)==null?void 0:e.testVariationId,o=(t=this.builderContextSignal.content)==null?void 0:t.id;a._track({type:"click",canTrack:this.canTrackToUse,contentId:o,apiKey:this.apiKey,variationId:i!==o?i:void 0,...w(n),unique:!this.clicked})}this.clicked||(this.clicked=!0)},evalExpression(n){return n.replace(/{{([^}]+)}}/g,(e,t)=>p.evaluate({code:t,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.builderContextSignal.rootSetState}))},handleRequest({url:n,key:e}){a.fetch(n).then(t=>t.json()).then(t=>{var o,s;const i={...this.builderContextSignal.rootState,[e]:t};(s=(o=this.builderContextSignal).rootSetState)==null||s.call(o,i),this.httpReqsData[e]=!0}).catch(t=>{console.error("error fetching dynamic data",n,t)})},runHttpRequests(){var e,t,i;const n=(i=(t=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:t.httpRequests)!=null?i:{};Object.entries(n).forEach(([o,s])=>{if(s&&(!this.httpReqsData[o]||a.isEditing())){const r=this.evalExpression(s);this.handleRequest({url:r,key:o})}})},emitStateUpdate(){a.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:a.fastClone(this.builderContextSignal.rootState),ref:{name:this.model}}}))},_classStringToObject(n){const e={};if(typeof n!="string")return e;const t=n.trim().split(/\s+/);for(const i of t)e[i]=!0;return e}}});var _=function(){var i;var e=this,t=e._self._c;return e._self._setupProxy,e.builderContextSignal.content?t("div",e._b({key:e.forceReRenderCount,ref:"elementRef",class:e._classStringToObject(e.classNameProp),attrs:{"builder-content-id":(i=e.builderContextSignal.content)==null?void 0:i.id,"builder-model":e.model},on:{click:function(o){return e.onClick(o)}}},"div",{...e.showContent?{}:{hidden:!0,"aria-hidden":!0}},!1),[e._t("default")],2):e._e()},U=[],I=a.normalizeComponent(E,_,U,!1,null,null,null,null);const T=I.exports;exports.default=T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as k } from "vue";
|
|
2
|
-
import { e as m } from "./evaluate.
|
|
3
|
-
import { r as R, i as h, T as y, c as w,
|
|
4
|
-
const
|
|
2
|
+
import { e as m } from "./evaluate.b622b309.js";
|
|
3
|
+
import { r as R, i as h, T as y, c as w, p as f, l as _, b as u, q as E, _ as g, t as U, u as I, v as T, f as P, n as M } from "./index.835b8ee0.js";
|
|
4
|
+
const H = "0.5.9", q = () => {
|
|
5
5
|
R("insertMenu", {
|
|
6
6
|
name: "_default",
|
|
7
7
|
default: !0,
|
|
@@ -25,13 +25,13 @@ const M = "0.5.7", H = () => {
|
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
27
|
let b = !1;
|
|
28
|
-
const
|
|
28
|
+
const K = (n = {}) => {
|
|
29
29
|
var e, t;
|
|
30
30
|
b || (b = !0, h() && ((e = window.parent) == null || e.postMessage({
|
|
31
31
|
type: "builder.sdkInfo",
|
|
32
32
|
data: {
|
|
33
33
|
target: y,
|
|
34
|
-
version:
|
|
34
|
+
version: H,
|
|
35
35
|
supportsPatchUpdates: !1,
|
|
36
36
|
supportsAddBlockScoping: !0,
|
|
37
37
|
supportsCustomBreakpoints: !0
|
|
@@ -85,7 +85,7 @@ const q = (n = {}) => {
|
|
|
85
85
|
function S(n) {
|
|
86
86
|
return Math.round(n * 1e3) / 1e3;
|
|
87
87
|
}
|
|
88
|
-
const
|
|
88
|
+
const O = (n, e, t = !0) => {
|
|
89
89
|
if (!(n instanceof HTMLElement))
|
|
90
90
|
return null;
|
|
91
91
|
let i = t ? n : n.parentElement;
|
|
@@ -96,7 +96,7 @@ const K = (n, e, t = !0) => {
|
|
|
96
96
|
return i;
|
|
97
97
|
} while (i = i.parentElement);
|
|
98
98
|
return null;
|
|
99
|
-
},
|
|
99
|
+
}, N = (n) => O(n, (e) => {
|
|
100
100
|
const t = e.getAttribute("builder-id") || e.id;
|
|
101
101
|
return Boolean((t == null ? void 0 : t.indexOf("builder-")) === 0);
|
|
102
102
|
}), C = ({
|
|
@@ -108,8 +108,8 @@ const K = (n, e, t = !0) => {
|
|
|
108
108
|
x: s,
|
|
109
109
|
y: a
|
|
110
110
|
};
|
|
111
|
-
},
|
|
112
|
-
const e = n.target, t = e &&
|
|
111
|
+
}, j = (n) => {
|
|
112
|
+
const e = n.target, t = e && N(e), i = (t == null ? void 0 : t.getAttribute("builder-id")) || (t == null ? void 0 : t.id);
|
|
113
113
|
return {
|
|
114
114
|
targetBuilderElement: i || void 0,
|
|
115
115
|
metadata: {
|
|
@@ -124,7 +124,7 @@ const K = (n, e, t = !0) => {
|
|
|
124
124
|
builderElementIndex: t && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(t) : void 0
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
|
-
},
|
|
127
|
+
}, A = k({
|
|
128
128
|
name: "enable-editor",
|
|
129
129
|
props: [
|
|
130
130
|
"canTrack",
|
|
@@ -161,7 +161,7 @@ const K = (n, e, t = !0) => {
|
|
|
161
161
|
if (this.apiKey || _.error(
|
|
162
162
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
163
163
|
), h()) {
|
|
164
|
-
if (u() && (this.forceReRenderCount = this.forceReRenderCount + 1, window.addEventListener("message", this.processMessage),
|
|
164
|
+
if (u() && (this.forceReRenderCount = this.forceReRenderCount + 1, window.addEventListener("message", this.processMessage), q(), K({
|
|
165
165
|
...this.locale ? {
|
|
166
166
|
locale: this.locale
|
|
167
167
|
} : {},
|
|
@@ -175,7 +175,7 @@ const K = (n, e, t = !0) => {
|
|
|
175
175
|
this.builderContextSignal.componentInfos
|
|
176
176
|
).forEach((t) => {
|
|
177
177
|
var o;
|
|
178
|
-
const i =
|
|
178
|
+
const i = E(t);
|
|
179
179
|
(o = window.parent) == null || o.postMessage(i, "*");
|
|
180
180
|
}), window.addEventListener(
|
|
181
181
|
"builder:component:stateChangeListenerActivated",
|
|
@@ -190,11 +190,11 @@ const K = (n, e, t = !0) => {
|
|
|
190
190
|
variationId: t !== i ? t : void 0
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
|
-
if (
|
|
193
|
+
if (U()) {
|
|
194
194
|
const t = new URL(location.href).searchParams, i = t.get("builder.preview"), o = t.get(
|
|
195
195
|
`builder.preview.${i}`
|
|
196
196
|
), s = t.get("apiKey") || t.get("builder.space");
|
|
197
|
-
i === this.model && s === this.apiKey && (!this.content || o === this.content.id) &&
|
|
197
|
+
i === this.model && s === this.apiKey && (!this.content || o === this.content.id) && I({
|
|
198
198
|
model: this.model,
|
|
199
199
|
apiKey: this.apiKey,
|
|
200
200
|
apiVersion: this.builderContextSignal.apiVersion
|
|
@@ -331,7 +331,7 @@ const K = (n, e, t = !0) => {
|
|
|
331
331
|
contentId: o,
|
|
332
332
|
apiKey: this.apiKey,
|
|
333
333
|
variationId: i !== o ? i : void 0,
|
|
334
|
-
...
|
|
334
|
+
...j(n),
|
|
335
335
|
unique: !this.clicked
|
|
336
336
|
});
|
|
337
337
|
}
|
|
@@ -350,7 +350,7 @@ const K = (n, e, t = !0) => {
|
|
|
350
350
|
);
|
|
351
351
|
},
|
|
352
352
|
handleRequest({ url: n, key: e }) {
|
|
353
|
-
|
|
353
|
+
T(n).then((t) => t.json()).then((t) => {
|
|
354
354
|
var o, s;
|
|
355
355
|
const i = {
|
|
356
356
|
...this.builderContextSignal.rootState,
|
|
@@ -380,7 +380,7 @@ const K = (n, e, t = !0) => {
|
|
|
380
380
|
"builder:component:stateChange",
|
|
381
381
|
{
|
|
382
382
|
detail: {
|
|
383
|
-
state: this.builderContextSignal.rootState,
|
|
383
|
+
state: P(this.builderContextSignal.rootState),
|
|
384
384
|
ref: {
|
|
385
385
|
name: this.model
|
|
386
386
|
}
|
|
@@ -400,7 +400,7 @@ const K = (n, e, t = !0) => {
|
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
});
|
|
403
|
-
var
|
|
403
|
+
var L = function() {
|
|
404
404
|
var i;
|
|
405
405
|
var e = this, t = e._self._c;
|
|
406
406
|
return e._self._setupProxy, e.builderContextSignal.content ? t("div", e._b({ key: e.forceReRenderCount, ref: "elementRef", class: e._classStringToObject(e.classNameProp), attrs: { "builder-content-id": (i = e.builderContextSignal.content) == null ? void 0 : i.id, "builder-model": e.model }, on: { click: function(o) {
|
|
@@ -411,17 +411,17 @@ var A = function() {
|
|
|
411
411
|
"aria-hidden": !0
|
|
412
412
|
}
|
|
413
413
|
}, !1), [e._t("default")], 2) : e._e();
|
|
414
|
-
},
|
|
415
|
-
j,
|
|
414
|
+
}, B = [], D = /* @__PURE__ */ M(
|
|
416
415
|
A,
|
|
417
416
|
L,
|
|
417
|
+
B,
|
|
418
418
|
!1,
|
|
419
419
|
null,
|
|
420
420
|
null,
|
|
421
421
|
null,
|
|
422
422
|
null
|
|
423
423
|
);
|
|
424
|
-
const
|
|
424
|
+
const z = D.exports;
|
|
425
425
|
export {
|
|
426
|
-
|
|
426
|
+
z as default
|
|
427
427
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./index.04a22940.cjs"),f=({builder:e,context:r,event:n,state:t})=>Object.entries({state:t,Builder:e,builder:e,context:r,event:n}),l=({code:e,builder:r,context:n,event:t,localState:s,rootSetState:u,rootState:g})=>{const o=f({builder:r,context:n,event:t,state:h(g,s,u)});return new Function(...o.map(([d])=>d),e)(...o.map(([,d])=>d))};function h(e,r,n){if(e===r)throw new Error("rootState === localState");return new Proxy(e,{get:(t,s)=>r&&s in r?r[s]:e[s],set:(t,s,u)=>{if(r&&s in r)throw new Error("Writing to local state is not allowed as it is read-only.");return e[s]=u,n==null||n(e),!0}})}function m(){const e=()=>{var r;return typeof process<"u"&&((r=process==null?void 0:process.versions)==null?void 0:r.node)};return!i.isBrowser()&&!e()}let a;m()&&Promise.resolve().then(()=>require("./non-node-runtime.ddfeed94.cjs")).then(e=>{a=e.runInNonNode}).catch(e=>{const r="Error importing JS interpreter for non-Node.js runtimes. Make sure `js-interpreter` is installed.\n Read more here: https://github.com/BuilderIO/builder/tree/main/packages/sdks/README.md#non-nodejs-runtimes-edge-serverless\n ";i.logger.error(r,e),a=(...n)=>{i.logger.error(r)}});function v({code:e,context:r,localState:n,rootState:t,rootSetState:s,event:u,isExpression:g=!0}){if(e===""){i.logger.warn("Skipping evaluation of empty code block.");return}const o={isEditing:i.isEditing(),isBrowser:i.isBrowser(),isServer:!i.isBrowser(),getUserAttributes:()=>i.getUserAttributes()},c={code:g&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,builder:o,context:r,event:u,rootSetState:s,rootState:t,localState:n};try{return i.isBrowser()?l(c):m()?a(c):l(c)}catch(w){i.logger.error("Failed code evaluation: "+w.message,{code:e});return}}exports.evaluate=v;exports.getFunctionArguments=f;
|