@builder.io/sdk-vue 0.2.2 → 0.3.1
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 +2 -5
- package/packages/_vue2/dist/block-styles.ae2c8895.cjs +1 -0
- package/packages/_vue2/dist/block-styles.b09f50da.js +75 -0
- package/packages/_vue2/dist/css.e6670a83.cjs +6 -0
- package/packages/_vue2/dist/css.fb10bcf8.js +74 -0
- package/packages/_vue2/dist/{index.eb91dc82.js → index.36f3710d.js} +432 -402
- package/packages/_vue2/dist/index.ae3f58f8.cjs +29 -0
- package/packages/_vue2/dist/render-block.74bc834e.cjs +3 -0
- package/packages/_vue2/dist/{render-block.6f9a607a.js → render-block.c14ab4be.js} +96 -90
- package/packages/_vue2/dist/render-component.2b74ef23.cjs +1 -0
- package/packages/_vue2/dist/render-component.d7f78e3d.js +38 -0
- package/packages/_vue2/dist/render-inlined-styles.04d09a3c.js +34 -0
- package/packages/_vue2/dist/render-inlined-styles.c8d80bc4.cjs +1 -0
- package/packages/_vue2/dist/render-repeated-block.58333f68.cjs +1 -0
- package/packages/_vue2/dist/render-repeated-block.a8717618.js +45 -0
- package/packages/_vue2/dist/render-styles.4a1edc25.cjs +31 -0
- package/packages/_vue2/dist/{render-styles.0d1f8872.js → render-styles.a49c2339.js} +26 -25
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +23 -22
- package/packages/_vue2/dist/src/blocks/button/button.vue.d.ts +19 -8
- package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +29 -174
- package/packages/_vue2/dist/src/blocks/custom-code/custom-code.vue.d.ts +9 -13
- package/packages/_vue2/dist/src/blocks/embed/embed.vue.d.ts +13 -20
- package/packages/_vue2/dist/src/blocks/fragment/fragment.vue.d.ts +1 -4
- package/packages/_vue2/dist/src/blocks/image/image.vue.d.ts +72 -0
- package/packages/_vue2/dist/src/blocks/img/img.vue.d.ts +8 -11
- package/packages/_vue2/dist/src/blocks/section/section.vue.d.ts +12 -7
- package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +15 -245
- package/packages/_vue2/dist/src/blocks/text/text.vue.d.ts +7 -4
- package/packages/_vue2/dist/src/blocks/video/video.vue.d.ts +42 -7
- package/packages/_vue2/dist/src/components/render-block/block-styles.vue.d.ts +18 -27
- package/packages/_vue2/dist/src/components/render-block/render-block.helpers.d.ts +0 -1
- package/packages/_vue2/dist/src/components/render-block/render-block.vue.d.ts +3 -86
- package/packages/_vue2/dist/src/components/render-block/render-component.vue.d.ts +3 -86
- package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +19 -84
- package/packages/_vue2/dist/src/components/render-blocks.vue.d.ts +23 -127
- package/packages/_vue2/dist/src/components/render-content/components/render-styles.vue.d.ts +15 -18
- package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +46 -212
- package/packages/_vue2/dist/src/components/render-inlined-styles.vue.d.ts +12 -11
- package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -0
- package/packages/_vue2/dist/src/context/builder.context.d.ts +3 -2
- package/packages/_vue2/dist/src/context/types.d.ts +17 -2
- package/packages/_vue2/dist/src/functions/evaluate.d.ts +4 -3
- package/packages/_vue2/dist/src/functions/get-block-actions-handler.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/get-block-actions.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/get-processed-block.d.ts +2 -2
- package/packages/_vue2/dist/src/index.d.ts +1 -0
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue3/dist/block-styles.a1577ff9.cjs +1 -0
- package/packages/_vue3/dist/block-styles.ae0db517.js +71 -0
- package/packages/_vue3/dist/css.c52c28f5.js +74 -0
- package/packages/_vue3/dist/css.eaf664fa.cjs +6 -0
- package/packages/_vue3/dist/index.8ed3c046.cjs +29 -0
- package/packages/_vue3/dist/{index.45ab85e5.js → index.d8d44f06.js} +835 -806
- package/packages/_vue3/dist/render-block.8f200c30.cjs +3 -0
- package/packages/_vue3/dist/render-block.c70eab34.js +285 -0
- package/packages/_vue3/dist/render-component.023d5d67.cjs +1 -0
- package/packages/_vue3/dist/render-component.9b027ad2.js +42 -0
- package/packages/_vue3/dist/render-inlined-styles.0b6cafc4.js +32 -0
- package/packages/_vue3/dist/render-inlined-styles.e3ea32fb.cjs +1 -0
- package/packages/_vue3/dist/render-repeated-block.1743f160.cjs +1 -0
- package/packages/_vue3/dist/render-repeated-block.1b229997.js +39 -0
- package/packages/_vue3/dist/render-styles.70e1b259.cjs +31 -0
- package/packages/_vue3/dist/{render-styles.cf6faa29.js → render-styles.f8cb298d.js} +33 -33
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +1 -1
- package/packages/_vue3/dist/src/blocks/button/button.vue.d.ts +19 -8
- package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +45 -91
- package/packages/_vue3/dist/src/blocks/custom-code/custom-code.vue.d.ts +16 -13
- package/packages/_vue3/dist/src/blocks/embed/embed.vue.d.ts +17 -20
- package/packages/_vue3/dist/src/blocks/fragment/fragment.vue.d.ts +1 -4
- package/packages/_vue3/dist/src/blocks/image/image.vue.d.ts +54 -14
- package/packages/_vue3/dist/src/blocks/img/img.vue.d.ts +27 -11
- package/packages/_vue3/dist/src/blocks/section/section.vue.d.ts +12 -7
- package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +25 -162
- package/packages/_vue3/dist/src/blocks/text/text.vue.d.ts +7 -4
- package/packages/_vue3/dist/src/blocks/video/video.vue.d.ts +42 -7
- package/packages/_vue3/dist/src/components/render-block/block-styles.vue.d.ts +18 -27
- package/packages/_vue3/dist/src/components/render-block/render-block.helpers.d.ts +0 -1
- package/packages/_vue3/dist/src/components/render-block/render-block.vue.d.ts +2 -2
- package/packages/_vue3/dist/src/components/render-block/render-component.vue.d.ts +2 -2
- package/packages/_vue3/dist/src/components/render-block/render-repeated-block.vue.d.ts +19 -8
- package/packages/_vue3/dist/src/components/render-blocks.vue.d.ts +23 -44
- package/packages/_vue3/dist/src/components/render-content/components/render-styles.vue.d.ts +15 -18
- package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +77 -129
- package/packages/_vue3/dist/src/components/render-inlined-styles.vue.d.ts +12 -11
- package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -0
- package/packages/_vue3/dist/src/context/builder.context.d.ts +3 -2
- package/packages/_vue3/dist/src/context/types.d.ts +17 -2
- package/packages/_vue3/dist/src/functions/evaluate.d.ts +4 -3
- package/packages/_vue3/dist/src/functions/get-block-actions-handler.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/get-block-actions.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/get-processed-block.d.ts +2 -2
- package/packages/_vue3/dist/src/index.d.ts +1 -0
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/block-styles.4667431d.js +0 -72
- package/packages/_vue2/dist/block-styles.7c2a87df.cjs +0 -1
- package/packages/_vue2/dist/css.468435de.js +0 -58
- package/packages/_vue2/dist/css.dce6e4eb.cjs +0 -6
- package/packages/_vue2/dist/index.78ba6586.cjs +0 -29
- package/packages/_vue2/dist/render-block.67e4dd65.cjs +0 -3
- package/packages/_vue2/dist/render-component.10d6c8d2.js +0 -37
- package/packages/_vue2/dist/render-component.3578089b.cjs +0 -1
- package/packages/_vue2/dist/render-inlined-styles.56373d13.cjs +0 -1
- package/packages/_vue2/dist/render-inlined-styles.942eb38d.js +0 -33
- package/packages/_vue2/dist/render-repeated-block.18d7fc6e.cjs +0 -1
- package/packages/_vue2/dist/render-repeated-block.1bb5c2fb.js +0 -42
- package/packages/_vue2/dist/render-styles.de7287b6.cjs +0 -31
- package/packages/_vue3/dist/block-styles.09955b0c.cjs +0 -1
- package/packages/_vue3/dist/block-styles.6bd36a5a.js +0 -69
- package/packages/_vue3/dist/css.3241302b.cjs +0 -6
- package/packages/_vue3/dist/css.81a21c5a.js +0 -58
- package/packages/_vue3/dist/index.cca81180.cjs +0 -29
- package/packages/_vue3/dist/render-block.33cc5768.cjs +0 -3
- package/packages/_vue3/dist/render-block.ec4c1913.js +0 -301
- package/packages/_vue3/dist/render-component.3bd8dc76.js +0 -26
- package/packages/_vue3/dist/render-component.c0d5e797.cjs +0 -1
- package/packages/_vue3/dist/render-inlined-styles.952d2fff.js +0 -32
- package/packages/_vue3/dist/render-inlined-styles.b55b6667.cjs +0 -1
- package/packages/_vue3/dist/render-repeated-block.263f0cec.js +0 -37
- package/packages/_vue3/dist/render-repeated-block.c3c9e926.cjs +0 -1
- package/packages/_vue3/dist/render-styles.d1ac3a18.cjs +0 -31
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { openBlock as d, createElementBlock as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as h, openBlock as d, createElementBlock as p, mergeProps as I, toHandlers as T, toDisplayString as H, defineAsyncComponent as S, resolveComponent as w, normalizeClass as V, normalizeStyle as R, createBlock as E, createCommentVNode as v, Fragment as A, renderList as U, createVNode as ee, renderSlot as j, createElementVNode as K } from "vue";
|
|
2
|
+
const fe = h({
|
|
3
3
|
name: "builder-button",
|
|
4
4
|
props: ["attributes", "text", "link", "openLinkInNewTab"],
|
|
5
5
|
methods: {
|
|
6
|
-
filterAttrs: function(
|
|
6
|
+
filterAttrs: function(t = {}, n) {
|
|
7
7
|
const o = "v-on:";
|
|
8
|
-
return Object.keys(
|
|
9
|
-
if (!
|
|
8
|
+
return Object.keys(t).filter((s) => {
|
|
9
|
+
if (!t[s])
|
|
10
10
|
return !1;
|
|
11
|
-
const r =
|
|
12
|
-
return
|
|
11
|
+
const r = s.startsWith(o);
|
|
12
|
+
return n ? r : !r;
|
|
13
13
|
}).reduce(
|
|
14
|
-
(
|
|
15
|
-
...
|
|
16
|
-
[r.replace(o, "")]:
|
|
14
|
+
(s, r) => ({
|
|
15
|
+
...s,
|
|
16
|
+
[r.replace(o, "")]: t[r]
|
|
17
17
|
}),
|
|
18
18
|
{}
|
|
19
19
|
);
|
|
20
20
|
},
|
|
21
21
|
_classStringToObject(e) {
|
|
22
|
-
const
|
|
22
|
+
const t = {};
|
|
23
23
|
if (typeof e != "string")
|
|
24
|
-
return
|
|
25
|
-
const
|
|
26
|
-
for (const o of
|
|
27
|
-
|
|
28
|
-
return
|
|
24
|
+
return t;
|
|
25
|
+
const n = e.trim().split(/\s+/);
|
|
26
|
+
for (const o of n)
|
|
27
|
+
t[o] = !0;
|
|
28
|
+
return t;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
};
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
for (const [o,
|
|
35
|
-
|
|
36
|
-
return
|
|
37
|
-
},
|
|
38
|
-
function
|
|
39
|
-
return
|
|
31
|
+
});
|
|
32
|
+
const f = (e, t) => {
|
|
33
|
+
const n = e.__vccOpts || e;
|
|
34
|
+
for (const [o, s] of t)
|
|
35
|
+
n[o] = s;
|
|
36
|
+
return n;
|
|
37
|
+
}, ge = ["href", "target"];
|
|
38
|
+
function be(e, t, n, o, s, r) {
|
|
39
|
+
return e.link ? (d(), p("a", I({
|
|
40
40
|
key: 0,
|
|
41
41
|
role: "button",
|
|
42
|
-
href:
|
|
43
|
-
target:
|
|
44
|
-
},
|
|
42
|
+
href: e.link,
|
|
43
|
+
target: e.openLinkInNewTab ? "_blank" : void 0
|
|
44
|
+
}, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), H(e.text), 17, ge)) : (d(), p("button", I({
|
|
45
45
|
key: 1,
|
|
46
|
-
class:
|
|
47
|
-
|
|
46
|
+
class: e._classStringToObject(
|
|
47
|
+
e.attributes.class + " button-1yj9n7yt24z"
|
|
48
48
|
)
|
|
49
|
-
},
|
|
49
|
+
}, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), H(e.text), 17));
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const ye = /* @__PURE__ */ f(fe, [["render", be], ["__scopeId", "data-v-3b72112d"]]), L = (e) => JSON.parse(JSON.stringify(e)), te = {
|
|
52
52
|
small: {
|
|
53
53
|
min: 320,
|
|
54
54
|
default: 321,
|
|
@@ -64,56 +64,57 @@ const be = /* @__PURE__ */ h(he, [["render", ge], ["__scopeId", "data-v-fa5dea7e
|
|
|
64
64
|
default: 991,
|
|
65
65
|
max: 1200
|
|
66
66
|
}
|
|
67
|
-
},
|
|
68
|
-
const
|
|
69
|
-
if (!e || !
|
|
70
|
-
return
|
|
67
|
+
}, On = (e, t = te) => `@media (max-width: ${t[e].max}px)`, ve = ({ small: e, medium: t }) => {
|
|
68
|
+
const n = L(te);
|
|
69
|
+
if (!e || !t)
|
|
70
|
+
return n;
|
|
71
71
|
const o = Math.floor(e / 2);
|
|
72
|
-
|
|
72
|
+
n.small = {
|
|
73
73
|
max: e,
|
|
74
74
|
min: o,
|
|
75
75
|
default: o + 1
|
|
76
76
|
};
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
max:
|
|
80
|
-
min:
|
|
81
|
-
default:
|
|
77
|
+
const s = n.small.max + 1;
|
|
78
|
+
n.medium = {
|
|
79
|
+
max: t,
|
|
80
|
+
min: s,
|
|
81
|
+
default: s + 1
|
|
82
82
|
};
|
|
83
|
-
const r =
|
|
84
|
-
return
|
|
83
|
+
const r = n.medium.max + 1;
|
|
84
|
+
return n.large = {
|
|
85
85
|
max: 2e3,
|
|
86
86
|
min: r,
|
|
87
87
|
default: r + 1
|
|
88
|
-
},
|
|
89
|
-
},
|
|
88
|
+
}, n;
|
|
89
|
+
}, _ = "vue3", ke = Symbol(), P = {
|
|
90
90
|
Builder: {
|
|
91
91
|
content: null,
|
|
92
92
|
context: {},
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
localState: void 0,
|
|
94
|
+
rootSetState() {
|
|
95
95
|
},
|
|
96
|
+
rootState: {},
|
|
96
97
|
apiKey: null,
|
|
97
98
|
apiVersion: void 0,
|
|
98
99
|
registeredComponents: {},
|
|
99
100
|
inheritedStyles: {}
|
|
100
101
|
},
|
|
101
|
-
key:
|
|
102
|
-
},
|
|
102
|
+
key: ke
|
|
103
|
+
}, Se = () => Promise.resolve().then(() => ne).then((e) => e.default).catch((e) => {
|
|
103
104
|
throw console.error(
|
|
104
105
|
"Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",
|
|
105
106
|
e
|
|
106
107
|
), e;
|
|
107
|
-
}),
|
|
108
|
+
}), we = () => import("./render-inlined-styles.0b6cafc4.js").then((e) => e.default).catch((e) => {
|
|
108
109
|
throw console.error(
|
|
109
110
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",
|
|
110
111
|
e
|
|
111
112
|
), e;
|
|
112
|
-
}),
|
|
113
|
+
}), Ce = h({
|
|
113
114
|
name: "builder-columns",
|
|
114
115
|
components: {
|
|
115
|
-
RenderInlinedStyles:
|
|
116
|
-
RenderBlocks:
|
|
116
|
+
RenderInlinedStyles: S(we),
|
|
117
|
+
RenderBlocks: S(Se)
|
|
117
118
|
},
|
|
118
119
|
props: [
|
|
119
120
|
"space",
|
|
@@ -128,7 +129,7 @@ const be = /* @__PURE__ */ h(he, [["render", ge], ["__scopeId", "data-v-fa5dea7e
|
|
|
128
129
|
cols: this.columns || [],
|
|
129
130
|
stackAt: this.stackColumnsAt || "tablet",
|
|
130
131
|
flexDir: this.stackColumnsAt === "never" ? "row" : this.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
131
|
-
TARGET:
|
|
132
|
+
TARGET: _
|
|
132
133
|
};
|
|
133
134
|
},
|
|
134
135
|
inject: {
|
|
@@ -146,123 +147,122 @@ const be = /* @__PURE__ */ h(he, [["render", ge], ["__scopeId", "data-v-fa5dea7e
|
|
|
146
147
|
},
|
|
147
148
|
columnsStyles() {
|
|
148
149
|
return `
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
@media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
|
|
151
|
+
.${this.builderBlock.id}-breakpoints {
|
|
152
|
+
flex-direction: var(--flex-dir-tablet);
|
|
153
|
+
align-items: stretch;
|
|
154
|
+
}
|
|
154
155
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
157
|
+
width: var(--column-width-tablet) !important;
|
|
158
|
+
margin-left: var(--column-margin-left-tablet) !important;
|
|
159
|
+
}
|
|
158
160
|
}
|
|
159
|
-
}
|
|
160
161
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
@media (max-width: ${this.getWidthForBreakpointSize("small")}px) {
|
|
163
|
+
.${this.builderBlock.id}-breakpoints {
|
|
164
|
+
flex-direction: var(--flex-dir);
|
|
165
|
+
align-items: stretch;
|
|
166
|
+
}
|
|
166
167
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
168
|
+
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
169
|
+
width: var(--column-width-mobile) !important;
|
|
170
|
+
margin-left: var(--column-margin-left-mobile) !important;
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
`;
|
|
173
174
|
}
|
|
174
175
|
},
|
|
175
176
|
methods: {
|
|
176
177
|
getWidth(e) {
|
|
177
|
-
var
|
|
178
|
-
return ((
|
|
178
|
+
var t;
|
|
179
|
+
return ((t = this.cols[e]) == null ? void 0 : t.width) || 100 / this.cols.length;
|
|
179
180
|
},
|
|
180
181
|
getColumnCssWidth(e) {
|
|
181
|
-
const
|
|
182
|
-
return `calc(${this.getWidth(e)}% - ${
|
|
182
|
+
const t = this.gutterSize * (this.cols.length - 1) / this.cols.length;
|
|
183
|
+
return `calc(${this.getWidth(e)}% - ${t}px)`;
|
|
183
184
|
},
|
|
184
185
|
getTabletStyle({
|
|
185
186
|
stackedStyle: e,
|
|
186
|
-
desktopStyle:
|
|
187
|
+
desktopStyle: t
|
|
187
188
|
}) {
|
|
188
|
-
return this.stackAt === "tablet" ? e :
|
|
189
|
+
return this.stackAt === "tablet" ? e : t;
|
|
189
190
|
},
|
|
190
191
|
getMobileStyle({
|
|
191
192
|
stackedStyle: e,
|
|
192
|
-
desktopStyle:
|
|
193
|
+
desktopStyle: t
|
|
193
194
|
}) {
|
|
194
|
-
return this.stackAt === "never" ?
|
|
195
|
+
return this.stackAt === "never" ? t : e;
|
|
195
196
|
},
|
|
196
197
|
columnCssVars(e) {
|
|
197
|
-
e === 0
|
|
198
|
-
const n = this.getColumnCssWidth(e), t = `${this.gutterSize}px`, o = "100%", i = 0;
|
|
198
|
+
const t = e === 0 ? 0 : this.gutterSize, n = this.getColumnCssWidth(e), o = `${t}px`, s = "100%", r = 0;
|
|
199
199
|
return {
|
|
200
200
|
width: n,
|
|
201
|
-
"margin-left":
|
|
201
|
+
"margin-left": o,
|
|
202
202
|
"--column-width-mobile": this.getMobileStyle({
|
|
203
|
-
stackedStyle:
|
|
203
|
+
stackedStyle: s,
|
|
204
204
|
desktopStyle: n
|
|
205
205
|
}),
|
|
206
206
|
"--column-margin-left-mobile": this.getMobileStyle({
|
|
207
|
-
stackedStyle:
|
|
208
|
-
desktopStyle:
|
|
207
|
+
stackedStyle: r,
|
|
208
|
+
desktopStyle: o
|
|
209
209
|
}),
|
|
210
210
|
"--column-width-tablet": this.getTabletStyle({
|
|
211
|
-
stackedStyle:
|
|
211
|
+
stackedStyle: s,
|
|
212
212
|
desktopStyle: n
|
|
213
213
|
}),
|
|
214
214
|
"--column-margin-left-tablet": this.getTabletStyle({
|
|
215
|
-
stackedStyle:
|
|
216
|
-
desktopStyle:
|
|
215
|
+
stackedStyle: r,
|
|
216
|
+
desktopStyle: o
|
|
217
217
|
})
|
|
218
218
|
};
|
|
219
219
|
},
|
|
220
220
|
getWidthForBreakpointSize(e) {
|
|
221
|
-
var
|
|
222
|
-
return
|
|
223
|
-
((o = (
|
|
221
|
+
var n, o;
|
|
222
|
+
return ve(
|
|
223
|
+
((o = (n = this.builderContext.content) == null ? void 0 : n.meta) == null ? void 0 : o.breakpoints) || {}
|
|
224
224
|
)[e].max;
|
|
225
225
|
},
|
|
226
226
|
_classStringToObject(e) {
|
|
227
|
-
const
|
|
227
|
+
const t = {};
|
|
228
228
|
if (typeof e != "string")
|
|
229
|
-
return
|
|
230
|
-
const
|
|
231
|
-
for (const o of
|
|
232
|
-
|
|
233
|
-
return
|
|
229
|
+
return t;
|
|
230
|
+
const n = e.trim().split(/\s+/);
|
|
231
|
+
for (const o of n)
|
|
232
|
+
t[o] = !0;
|
|
233
|
+
return t;
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
};
|
|
237
|
-
function
|
|
238
|
-
const
|
|
239
|
-
return d(),
|
|
240
|
-
class:
|
|
241
|
-
|
|
242
|
-
`builder-columns ${
|
|
236
|
+
});
|
|
237
|
+
function Ie(e, t, n, o, s, r) {
|
|
238
|
+
const i = w("render-inlined-styles"), l = w("render-blocks");
|
|
239
|
+
return d(), p("div", {
|
|
240
|
+
class: V(
|
|
241
|
+
e._classStringToObject(
|
|
242
|
+
`builder-columns ${e.builderBlock.id}-breakpoints div-361b1o6wv2k`
|
|
243
243
|
)
|
|
244
244
|
),
|
|
245
|
-
style:
|
|
245
|
+
style: R(e.columnsCssVars),
|
|
246
246
|
dataSet: {
|
|
247
247
|
"builder-block-name": "builder-columns"
|
|
248
248
|
}
|
|
249
249
|
}, [
|
|
250
|
-
|
|
250
|
+
e.TARGET !== "reactNative" ? (d(), E(i, {
|
|
251
251
|
key: 0,
|
|
252
|
-
styles:
|
|
253
|
-
}, null, 8, ["styles"])) :
|
|
254
|
-
(d(!0),
|
|
255
|
-
key:
|
|
256
|
-
class: "builder-column div-
|
|
257
|
-
style:
|
|
252
|
+
styles: e.columnsStyles
|
|
253
|
+
}, null, 8, ["styles"])) : v("", !0),
|
|
254
|
+
(d(!0), p(A, null, U(e.columns, (a, c) => (d(), p("div", {
|
|
255
|
+
key: c,
|
|
256
|
+
class: "builder-column div-361b1o6wv2k-2",
|
|
257
|
+
style: R(e.columnCssVars(c)),
|
|
258
258
|
dataSet: {
|
|
259
259
|
"builder-block-name": "builder-column"
|
|
260
260
|
}
|
|
261
261
|
}, [
|
|
262
|
-
|
|
262
|
+
ee(l, {
|
|
263
263
|
blocks: a.blocks,
|
|
264
|
-
path: `component.options.columns.${
|
|
265
|
-
parent:
|
|
264
|
+
path: `component.options.columns.${c}.blocks`,
|
|
265
|
+
parent: e.builderBlock.id,
|
|
266
266
|
styleProp: {
|
|
267
267
|
flexGrow: "1"
|
|
268
268
|
}
|
|
@@ -270,49 +270,49 @@ function _e(e, n, t, o, i, r) {
|
|
|
270
270
|
], 4))), 128))
|
|
271
271
|
], 6);
|
|
272
272
|
}
|
|
273
|
-
const
|
|
273
|
+
const xe = /* @__PURE__ */ f(Ce, [["render", Ie], ["__scopeId", "data-v-fae985f2"]]), $e = h({
|
|
274
274
|
name: "builder-fragment-component",
|
|
275
275
|
props: []
|
|
276
|
-
};
|
|
277
|
-
function
|
|
278
|
-
return d(),
|
|
279
|
-
|
|
276
|
+
});
|
|
277
|
+
function Te(e, t, n, o, s, r) {
|
|
278
|
+
return d(), p("span", null, [
|
|
279
|
+
j(e.$slots, "default")
|
|
280
280
|
]);
|
|
281
281
|
}
|
|
282
|
-
const
|
|
282
|
+
const Re = /* @__PURE__ */ f($e, [["render", Te]]);
|
|
283
283
|
function z(e) {
|
|
284
284
|
return e.replace(/http(s)?:/, "");
|
|
285
285
|
}
|
|
286
|
-
function
|
|
287
|
-
const o = new RegExp("([?&])" +
|
|
288
|
-
return e.match(o) ? e.replace(o, "$1" +
|
|
286
|
+
function Ee(e = "", t, n) {
|
|
287
|
+
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), s = e.indexOf("?") !== -1 ? "&" : "?";
|
|
288
|
+
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + s + t + "=" + encodeURIComponent(n);
|
|
289
289
|
}
|
|
290
|
-
function
|
|
291
|
-
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !
|
|
290
|
+
function _e(e, t) {
|
|
291
|
+
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
292
292
|
return e;
|
|
293
|
-
if (
|
|
293
|
+
if (t === "master")
|
|
294
294
|
return z(e);
|
|
295
|
-
const
|
|
295
|
+
const n = e.match(
|
|
296
296
|
/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i
|
|
297
297
|
);
|
|
298
|
-
if (
|
|
299
|
-
const o = e.split(
|
|
300
|
-
return z(`${o[0]}_${r}${
|
|
298
|
+
if (n) {
|
|
299
|
+
const o = e.split(n[0]), s = n[3], r = t.match("x") ? t : `${t}x`;
|
|
300
|
+
return z(`${o[0]}_${r}${s}`);
|
|
301
301
|
}
|
|
302
302
|
return null;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function B(e) {
|
|
305
305
|
if (!e)
|
|
306
306
|
return e;
|
|
307
|
-
const
|
|
307
|
+
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
308
308
|
if (e.match(/builder\.io/)) {
|
|
309
|
-
let
|
|
309
|
+
let n = e;
|
|
310
310
|
const o = Number(e.split("?width=")[1]);
|
|
311
|
-
return isNaN(o) || (
|
|
311
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((s) => s !== o).map((s) => `${Ee(e, "width", s)} ${s}w`).concat([n]).join(", ");
|
|
312
312
|
}
|
|
313
|
-
return e.match(/cdn\.shopify\.com/) ?
|
|
313
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [_e(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
314
314
|
}
|
|
315
|
-
const Ae = {
|
|
315
|
+
const Ae = h({
|
|
316
316
|
name: "builder-image",
|
|
317
317
|
props: [
|
|
318
318
|
"image",
|
|
@@ -330,16 +330,16 @@ const Ae = {
|
|
|
330
330
|
],
|
|
331
331
|
computed: {
|
|
332
332
|
srcSetToUse() {
|
|
333
|
-
var
|
|
334
|
-
const
|
|
335
|
-
if (!
|
|
333
|
+
var n;
|
|
334
|
+
const t = this.image || this.src;
|
|
335
|
+
if (!t || !(t.match(/builder\.io/) || t.match(/cdn\.shopify\.com/)))
|
|
336
336
|
return this.srcset;
|
|
337
|
-
if (this.srcset && ((
|
|
337
|
+
if (this.srcset && ((n = this.image) == null ? void 0 : n.includes("builder.io/api/v1/image"))) {
|
|
338
338
|
if (!this.srcset.includes(this.image.split("?")[0]))
|
|
339
|
-
return console.debug("Removed given srcset"),
|
|
339
|
+
return console.debug("Removed given srcset"), B(t);
|
|
340
340
|
} else if (this.image && !this.srcset)
|
|
341
|
-
return
|
|
342
|
-
return
|
|
341
|
+
return B(t);
|
|
342
|
+
return B(t);
|
|
343
343
|
},
|
|
344
344
|
webpSrcSet() {
|
|
345
345
|
var e;
|
|
@@ -358,86 +358,86 @@ const Ae = {
|
|
|
358
358
|
},
|
|
359
359
|
methods: {
|
|
360
360
|
_classStringToObject(e) {
|
|
361
|
-
const
|
|
361
|
+
const t = {};
|
|
362
362
|
if (typeof e != "string")
|
|
363
|
-
return
|
|
364
|
-
const
|
|
365
|
-
for (const o of
|
|
366
|
-
|
|
367
|
-
return
|
|
363
|
+
return t;
|
|
364
|
+
const n = e.trim().split(/\s+/);
|
|
365
|
+
for (const o of n)
|
|
366
|
+
t[o] = !0;
|
|
367
|
+
return t;
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
-
};
|
|
371
|
-
const
|
|
370
|
+
});
|
|
371
|
+
const je = ["srcset"], Ve = ["alt", "role", "src", "srcset", "sizes"], Pe = {
|
|
372
372
|
key: 2,
|
|
373
|
-
class: "div-
|
|
373
|
+
class: "div-7jvpanrlkn-2"
|
|
374
374
|
};
|
|
375
|
-
function
|
|
376
|
-
var
|
|
377
|
-
return d(),
|
|
378
|
-
|
|
379
|
-
|
|
375
|
+
function Oe(e, t, n, o, s, r) {
|
|
376
|
+
var i, l, a, c;
|
|
377
|
+
return d(), p(A, null, [
|
|
378
|
+
K("picture", null, [
|
|
379
|
+
e.webpSrcSet ? (d(), p("source", {
|
|
380
380
|
key: 0,
|
|
381
381
|
type: "image/webp",
|
|
382
|
-
srcset:
|
|
383
|
-
}, null, 8,
|
|
384
|
-
|
|
382
|
+
srcset: e.webpSrcSet
|
|
383
|
+
}, null, 8, je)) : v("", !0),
|
|
384
|
+
K("img", {
|
|
385
385
|
loading: "lazy",
|
|
386
|
-
alt:
|
|
387
|
-
role:
|
|
388
|
-
style:
|
|
389
|
-
objectPosition:
|
|
390
|
-
objectFit:
|
|
391
|
-
...
|
|
386
|
+
alt: e.altText,
|
|
387
|
+
role: e.altText ? "presentation" : void 0,
|
|
388
|
+
style: R({
|
|
389
|
+
objectPosition: e.backgroundPosition || "center",
|
|
390
|
+
objectFit: e.backgroundSize || "cover",
|
|
391
|
+
...e.aspectRatioCss
|
|
392
392
|
}),
|
|
393
|
-
class:
|
|
394
|
-
|
|
395
|
-
"builder-image" + (
|
|
393
|
+
class: V(
|
|
394
|
+
e._classStringToObject(
|
|
395
|
+
"builder-image" + (e.className ? " " + e.className : "") + " img-7jvpanrlkn"
|
|
396
396
|
)
|
|
397
397
|
),
|
|
398
|
-
src:
|
|
399
|
-
srcset:
|
|
400
|
-
sizes:
|
|
401
|
-
}, null, 14,
|
|
398
|
+
src: e.image,
|
|
399
|
+
srcset: e.srcSetToUse,
|
|
400
|
+
sizes: e.sizes
|
|
401
|
+
}, null, 14, Ve)
|
|
402
402
|
]),
|
|
403
|
-
|
|
403
|
+
e.aspectRatio && !(((l = (i = e.builderBlock) == null ? void 0 : i.children) == null ? void 0 : l.length) && e.fitContent) ? (d(), p("div", {
|
|
404
404
|
key: 0,
|
|
405
|
-
class: "builder-image-sizer div-
|
|
406
|
-
style:
|
|
407
|
-
paddingTop:
|
|
405
|
+
class: "builder-image-sizer div-7jvpanrlkn",
|
|
406
|
+
style: R({
|
|
407
|
+
paddingTop: e.aspectRatio * 100 + "%"
|
|
408
408
|
})
|
|
409
|
-
}, null, 4)) :
|
|
410
|
-
((
|
|
411
|
-
!
|
|
412
|
-
|
|
413
|
-
])) :
|
|
409
|
+
}, null, 4)) : v("", !0),
|
|
410
|
+
((c = (a = e.builderBlock) == null ? void 0 : a.children) == null ? void 0 : c.length) && e.fitContent ? j(e.$slots, "default", { key: 1 }, void 0, !0) : v("", !0),
|
|
411
|
+
!e.fitContent && e.children ? (d(), p("div", Pe, [
|
|
412
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
413
|
+
])) : v("", !0)
|
|
414
414
|
], 64);
|
|
415
415
|
}
|
|
416
|
-
const
|
|
417
|
-
function
|
|
416
|
+
const Be = /* @__PURE__ */ f(Ae, [["render", Oe], ["__scopeId", "data-v-034e3c7d"]]);
|
|
417
|
+
function m() {
|
|
418
418
|
return typeof window < "u" && typeof document < "u";
|
|
419
419
|
}
|
|
420
|
-
function
|
|
421
|
-
return
|
|
420
|
+
function Fe() {
|
|
421
|
+
return m() && window.self !== window.top;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
return
|
|
423
|
+
function k() {
|
|
424
|
+
return Fe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
425
425
|
}
|
|
426
|
-
const Ue = () => import("./block-styles.
|
|
426
|
+
const Ue = () => import("./block-styles.ae0db517.js").then((e) => e.default).catch((e) => {
|
|
427
427
|
throw console.error(
|
|
428
428
|
"Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",
|
|
429
429
|
e
|
|
430
430
|
), e;
|
|
431
|
-
}), We = () => import("./render-block.
|
|
431
|
+
}), We = () => import("./render-block.c70eab34.js").then((e) => e.default).catch((e) => {
|
|
432
432
|
throw console.error(
|
|
433
433
|
"Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",
|
|
434
434
|
e
|
|
435
435
|
), e;
|
|
436
|
-
}), Me = {
|
|
436
|
+
}), Me = h({
|
|
437
437
|
name: "render-blocks",
|
|
438
438
|
components: {
|
|
439
|
-
RenderBlock:
|
|
440
|
-
BlockStyles:
|
|
439
|
+
RenderBlock: S(We),
|
|
440
|
+
BlockStyles: S(Ue)
|
|
441
441
|
},
|
|
442
442
|
props: ["blocks", "parent", "path", "styleProp"],
|
|
443
443
|
inject: {
|
|
@@ -451,8 +451,8 @@ const Ue = () => import("./block-styles.6bd36a5a.js").then((e) => e.default).cat
|
|
|
451
451
|
},
|
|
452
452
|
methods: {
|
|
453
453
|
onClick() {
|
|
454
|
-
var e,
|
|
455
|
-
|
|
454
|
+
var e, t;
|
|
455
|
+
k() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
456
456
|
{
|
|
457
457
|
type: "builder.clickEmptyBlocks",
|
|
458
458
|
data: {
|
|
@@ -464,8 +464,8 @@ const Ue = () => import("./block-styles.6bd36a5a.js").then((e) => e.default).cat
|
|
|
464
464
|
));
|
|
465
465
|
},
|
|
466
466
|
onMouseEnter() {
|
|
467
|
-
var e,
|
|
468
|
-
|
|
467
|
+
var e, t;
|
|
468
|
+
k() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
469
469
|
{
|
|
470
470
|
type: "builder.hoverEmptyBlocks",
|
|
471
471
|
data: {
|
|
@@ -477,46 +477,46 @@ const Ue = () => import("./block-styles.6bd36a5a.js").then((e) => e.default).cat
|
|
|
477
477
|
));
|
|
478
478
|
},
|
|
479
479
|
_classStringToObject(e) {
|
|
480
|
-
const
|
|
480
|
+
const t = {};
|
|
481
481
|
if (typeof e != "string")
|
|
482
|
-
return
|
|
483
|
-
const
|
|
484
|
-
for (const o of
|
|
485
|
-
|
|
486
|
-
return
|
|
482
|
+
return t;
|
|
483
|
+
const n = e.trim().split(/\s+/);
|
|
484
|
+
for (const o of n)
|
|
485
|
+
t[o] = !0;
|
|
486
|
+
return t;
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
-
};
|
|
489
|
+
});
|
|
490
490
|
const Le = ["builder-path", "builder-parent-id", "dataSet"];
|
|
491
|
-
function Ne(e,
|
|
492
|
-
const
|
|
493
|
-
return d(),
|
|
494
|
-
class:
|
|
495
|
-
"builder-path":
|
|
496
|
-
"builder-parent-id":
|
|
491
|
+
function Ne(e, t, n, o, s, r) {
|
|
492
|
+
const i = w("render-block"), l = w("block-styles");
|
|
493
|
+
return d(), p("div", {
|
|
494
|
+
class: V(e._classStringToObject(e.className + " div-7fq9d0i380")),
|
|
495
|
+
"builder-path": e.path,
|
|
496
|
+
"builder-parent-id": e.parent,
|
|
497
497
|
dataSet: {
|
|
498
|
-
class:
|
|
498
|
+
class: e.className
|
|
499
499
|
},
|
|
500
|
-
style:
|
|
501
|
-
onClick:
|
|
502
|
-
onMouseenter:
|
|
500
|
+
style: R(e.styleProp),
|
|
501
|
+
onClick: t[0] || (t[0] = (a) => e.onClick()),
|
|
502
|
+
onMouseenter: t[1] || (t[1] = (a) => e.onMouseEnter())
|
|
503
503
|
}, [
|
|
504
|
-
|
|
504
|
+
e.blocks ? (d(!0), p(A, { key: 0 }, U(e.blocks, (a, c) => (d(), E(i, {
|
|
505
505
|
key: "render-block-" + a.id,
|
|
506
506
|
block: a,
|
|
507
|
-
context:
|
|
508
|
-
}, null, 8, ["block", "context"]))), 128)) :
|
|
509
|
-
|
|
507
|
+
context: e.builderContext
|
|
508
|
+
}, null, 8, ["block", "context"]))), 128)) : v("", !0),
|
|
509
|
+
e.blocks ? (d(!0), p(A, { key: 1 }, U(e.blocks, (a, c) => (d(), E(l, {
|
|
510
510
|
key: "block-style-" + a.id,
|
|
511
511
|
block: a,
|
|
512
|
-
context:
|
|
513
|
-
}, null, 8, ["block", "context"]))), 128)) :
|
|
512
|
+
context: e.builderContext
|
|
513
|
+
}, null, 8, ["block", "context"]))), 128)) : v("", !0)
|
|
514
514
|
], 46, Le);
|
|
515
515
|
}
|
|
516
|
-
const
|
|
516
|
+
const He = /* @__PURE__ */ f(Me, [["render", Ne], ["__scopeId", "data-v-ff3cb99b"]]), ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
517
517
|
__proto__: null,
|
|
518
|
-
default:
|
|
519
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
518
|
+
default: He
|
|
519
|
+
}, Symbol.toStringTag, { value: "Module" })), Ke = {
|
|
520
520
|
name: "Core:Button",
|
|
521
521
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
522
522
|
defaultStyles: {
|
|
@@ -552,9 +552,9 @@ const $e = /* @__PURE__ */ h(Me, [["render", Ne], ["__scopeId", "data-v-81bad369
|
|
|
552
552
|
],
|
|
553
553
|
static: !0,
|
|
554
554
|
noWrap: !0
|
|
555
|
-
},
|
|
556
|
-
const
|
|
557
|
-
return `return (${!
|
|
555
|
+
}, O = (e) => {
|
|
556
|
+
const t = e.toString().trim();
|
|
557
|
+
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
558
558
|
}, ze = {
|
|
559
559
|
name: "Columns",
|
|
560
560
|
inputs: [
|
|
@@ -742,18 +742,18 @@ const $e = /* @__PURE__ */ h(Me, [["render", Ne], ["__scopeId", "data-v-81bad369
|
|
|
742
742
|
]
|
|
743
743
|
}
|
|
744
744
|
],
|
|
745
|
-
onChange:
|
|
746
|
-
function
|
|
747
|
-
|
|
745
|
+
onChange: O((e) => {
|
|
746
|
+
function t() {
|
|
747
|
+
n.forEach((o) => {
|
|
748
748
|
o.delete("width");
|
|
749
749
|
});
|
|
750
750
|
}
|
|
751
|
-
const
|
|
752
|
-
Array.isArray(
|
|
753
|
-
(
|
|
754
|
-
) && (!!
|
|
751
|
+
const n = e.get("columns");
|
|
752
|
+
Array.isArray(n) && !!n.find(
|
|
753
|
+
(s) => s.get("width")
|
|
754
|
+
) && (!!n.find(
|
|
755
755
|
(r) => !r.get("width")
|
|
756
|
-
) ||
|
|
756
|
+
) || n.reduce((l, a) => l + a.get("width"), 0) !== 100) && t();
|
|
757
757
|
})
|
|
758
758
|
},
|
|
759
759
|
{
|
|
@@ -779,13 +779,13 @@ const $e = /* @__PURE__ */ h(Me, [["render", Ne], ["__scopeId", "data-v-81bad369
|
|
|
779
779
|
advanced: !0
|
|
780
780
|
}
|
|
781
781
|
]
|
|
782
|
-
},
|
|
782
|
+
}, De = {
|
|
783
783
|
name: "Fragment",
|
|
784
784
|
static: !0,
|
|
785
785
|
hidden: !0,
|
|
786
786
|
canHaveChildren: !0,
|
|
787
787
|
noWrap: !0
|
|
788
|
-
},
|
|
788
|
+
}, qe = {
|
|
789
789
|
name: "Image",
|
|
790
790
|
static: !0,
|
|
791
791
|
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",
|
|
@@ -804,32 +804,32 @@ const $e = /* @__PURE__ */ h(Me, [["render", Ne], ["__scopeId", "data-v-81bad369
|
|
|
804
804
|
allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
|
|
805
805
|
required: !0,
|
|
806
806
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
807
|
-
onChange:
|
|
807
|
+
onChange: O(
|
|
808
808
|
(e) => {
|
|
809
809
|
e.delete("srcset"), e.delete("noWebp");
|
|
810
|
-
function
|
|
811
|
-
return new Promise((a,
|
|
810
|
+
function n(i, l = 6e4) {
|
|
811
|
+
return new Promise((a, c) => {
|
|
812
812
|
const u = document.createElement("img");
|
|
813
|
-
let
|
|
813
|
+
let b = !1;
|
|
814
814
|
u.onload = () => {
|
|
815
|
-
|
|
816
|
-
}, u.addEventListener("error", (
|
|
817
|
-
console.warn("Image load failed",
|
|
818
|
-
}), u.src =
|
|
819
|
-
|
|
820
|
-
},
|
|
815
|
+
b = !0, a(u);
|
|
816
|
+
}, u.addEventListener("error", (g) => {
|
|
817
|
+
console.warn("Image load failed", g.error), c(g.error);
|
|
818
|
+
}), u.src = i, setTimeout(() => {
|
|
819
|
+
b || c(new Error("Image load timed out"));
|
|
820
|
+
}, l);
|
|
821
821
|
});
|
|
822
822
|
}
|
|
823
|
-
function o(
|
|
824
|
-
return Math.round(
|
|
823
|
+
function o(i) {
|
|
824
|
+
return Math.round(i * 1e3) / 1e3;
|
|
825
825
|
}
|
|
826
|
-
const
|
|
827
|
-
if (fetch(
|
|
828
|
-
|
|
829
|
-
}),
|
|
830
|
-
return
|
|
831
|
-
const
|
|
832
|
-
e.get("image") ===
|
|
826
|
+
const s = e.get("image"), r = e.get("aspectRatio");
|
|
827
|
+
if (fetch(s).then((i) => i.blob()).then((i) => {
|
|
828
|
+
i.type.includes("svg") && e.set("noWebp", !0);
|
|
829
|
+
}), s && (!r || r === 0.7041))
|
|
830
|
+
return n(s).then((i) => {
|
|
831
|
+
const l = e.get("aspectRatio");
|
|
832
|
+
e.get("image") === s && (!l || l === 0.7041) && i.width && i.height && (e.set("aspectRatio", o(i.height / i.width)), e.set("height", i.height), e.set("width", i.width));
|
|
833
833
|
});
|
|
834
834
|
}
|
|
835
835
|
)
|
|
@@ -912,7 +912,7 @@ const $e = /* @__PURE__ */ h(Me, [["render", Ne], ["__scopeId", "data-v-81bad369
|
|
|
912
912
|
defaultValue: 0.7041
|
|
913
913
|
}
|
|
914
914
|
]
|
|
915
|
-
},
|
|
915
|
+
}, Ge = {
|
|
916
916
|
name: "Core:Section",
|
|
917
917
|
static: !0,
|
|
918
918
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -956,46 +956,46 @@ const $e = /* @__PURE__ */ h(Me, [["render", Ne], ["__scopeId", "data-v-81bad369
|
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
958
|
]
|
|
959
|
-
},
|
|
959
|
+
}, Je = h({
|
|
960
960
|
name: "builder-section-component",
|
|
961
961
|
props: ["maxWidth", "attributes"],
|
|
962
962
|
methods: {
|
|
963
|
-
filterAttrs: function(
|
|
963
|
+
filterAttrs: function(t = {}, n) {
|
|
964
964
|
const o = "v-on:";
|
|
965
|
-
return Object.keys(
|
|
966
|
-
if (!
|
|
965
|
+
return Object.keys(t).filter((s) => {
|
|
966
|
+
if (!t[s])
|
|
967
967
|
return !1;
|
|
968
|
-
const r =
|
|
969
|
-
return
|
|
968
|
+
const r = s.startsWith(o);
|
|
969
|
+
return n ? r : !r;
|
|
970
970
|
}).reduce(
|
|
971
|
-
(
|
|
972
|
-
...
|
|
973
|
-
[r.replace(o, "")]:
|
|
971
|
+
(s, r) => ({
|
|
972
|
+
...s,
|
|
973
|
+
[r.replace(o, "")]: t[r]
|
|
974
974
|
}),
|
|
975
975
|
{}
|
|
976
976
|
);
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
|
-
};
|
|
980
|
-
function
|
|
981
|
-
return d(),
|
|
979
|
+
});
|
|
980
|
+
function Xe(e, t, n, o, s, r) {
|
|
981
|
+
return d(), p("section", I({
|
|
982
982
|
style: {
|
|
983
983
|
width: "100%",
|
|
984
984
|
alignSelf: "stretch",
|
|
985
985
|
flexGrow: 1,
|
|
986
986
|
boxSizing: "border-box",
|
|
987
|
-
maxWidth:
|
|
987
|
+
maxWidth: e.maxWidth || 1200,
|
|
988
988
|
display: "flex",
|
|
989
989
|
flexDirection: "column",
|
|
990
990
|
alignItems: "stretch",
|
|
991
991
|
marginLeft: "auto",
|
|
992
992
|
marginRight: "auto"
|
|
993
993
|
}
|
|
994
|
-
},
|
|
995
|
-
|
|
994
|
+
}, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), [
|
|
995
|
+
j(e.$slots, "default")
|
|
996
996
|
], 16);
|
|
997
997
|
}
|
|
998
|
-
const
|
|
998
|
+
const Ye = /* @__PURE__ */ f(Je, [["render", Xe]]), Qe = {
|
|
999
999
|
name: "Symbol",
|
|
1000
1000
|
noWrap: !0,
|
|
1001
1001
|
static: !0,
|
|
@@ -1033,16 +1033,16 @@ const Xe = /* @__PURE__ */ h(Ge, [["render", Je]]), Ye = {
|
|
|
1033
1033
|
type: "boolean"
|
|
1034
1034
|
}
|
|
1035
1035
|
]
|
|
1036
|
-
},
|
|
1037
|
-
log: (...e) => console.log(
|
|
1038
|
-
error: (...e) => console.error(
|
|
1039
|
-
warn: (...e) => console.warn(
|
|
1036
|
+
}, F = "[Builder.io]: ", C = {
|
|
1037
|
+
log: (...e) => console.log(F, ...e),
|
|
1038
|
+
error: (...e) => console.error(F, ...e),
|
|
1039
|
+
warn: (...e) => console.warn(F, ...e)
|
|
1040
1040
|
};
|
|
1041
|
-
function
|
|
1041
|
+
function Ze() {
|
|
1042
1042
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1045
|
-
const e =
|
|
1044
|
+
function et() {
|
|
1045
|
+
const e = Ze().fetch;
|
|
1046
1046
|
if (typeof e > "u")
|
|
1047
1047
|
throw console.warn(
|
|
1048
1048
|
`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
@@ -1050,221 +1050,221 @@ function Ze() {
|
|
|
1050
1050
|
), new Error("Builder SDK could not find a global `fetch` function");
|
|
1051
1051
|
return e;
|
|
1052
1052
|
}
|
|
1053
|
-
const
|
|
1053
|
+
const oe = et(), x = (e) => e != null, tt = (e) => {
|
|
1054
1054
|
if (e === "localhost" || e === "127.0.0.1")
|
|
1055
1055
|
return e;
|
|
1056
|
-
const
|
|
1057
|
-
return
|
|
1058
|
-
},
|
|
1056
|
+
const t = e.split(".");
|
|
1057
|
+
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
1058
|
+
}, se = async ({
|
|
1059
1059
|
name: e,
|
|
1060
|
-
canTrack:
|
|
1060
|
+
canTrack: t
|
|
1061
1061
|
}) => {
|
|
1062
|
-
var
|
|
1062
|
+
var n;
|
|
1063
1063
|
try {
|
|
1064
|
-
return
|
|
1064
|
+
return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
|
|
1065
1065
|
} catch (o) {
|
|
1066
1066
|
console.debug("[COOKIE] GET error: ", o);
|
|
1067
1067
|
return;
|
|
1068
1068
|
}
|
|
1069
|
-
},
|
|
1069
|
+
}, nt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(x).join("; "), ot = [
|
|
1070
1070
|
["secure", ""],
|
|
1071
1071
|
["SameSite", "None"]
|
|
1072
|
-
],
|
|
1072
|
+
], st = ({
|
|
1073
1073
|
name: e,
|
|
1074
|
-
value:
|
|
1075
|
-
expires:
|
|
1074
|
+
value: t,
|
|
1075
|
+
expires: n
|
|
1076
1076
|
}) => {
|
|
1077
|
-
const
|
|
1078
|
-
[e,
|
|
1077
|
+
const s = (m() ? location.protocol === "https:" : !0) ? ot : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], i = [
|
|
1078
|
+
[e, t],
|
|
1079
1079
|
...r,
|
|
1080
1080
|
["path", "/"],
|
|
1081
|
-
["domain",
|
|
1082
|
-
...
|
|
1081
|
+
["domain", tt(window.location.hostname)],
|
|
1082
|
+
...s
|
|
1083
1083
|
];
|
|
1084
|
-
return
|
|
1085
|
-
},
|
|
1084
|
+
return nt(i);
|
|
1085
|
+
}, re = async ({
|
|
1086
1086
|
name: e,
|
|
1087
|
-
value:
|
|
1088
|
-
expires:
|
|
1087
|
+
value: t,
|
|
1088
|
+
expires: n,
|
|
1089
1089
|
canTrack: o
|
|
1090
1090
|
}) => {
|
|
1091
1091
|
try {
|
|
1092
1092
|
if (!o)
|
|
1093
1093
|
return;
|
|
1094
|
-
const
|
|
1095
|
-
document.cookie =
|
|
1096
|
-
} catch (
|
|
1097
|
-
console.warn("[COOKIE] SET error: ",
|
|
1094
|
+
const s = st({ name: e, value: t, expires: n });
|
|
1095
|
+
document.cookie = s;
|
|
1096
|
+
} catch (s) {
|
|
1097
|
+
console.warn("[COOKIE] SET error: ", s);
|
|
1098
1098
|
}
|
|
1099
|
-
},
|
|
1099
|
+
}, rt = "builderio.variations", ie = (e) => `${rt}.${e}`, it = ({
|
|
1100
1100
|
contentId: e,
|
|
1101
|
-
canTrack:
|
|
1102
|
-
}) =>
|
|
1101
|
+
canTrack: t
|
|
1102
|
+
}) => se({ name: ie(e), canTrack: t }), at = ({
|
|
1103
1103
|
contentId: e,
|
|
1104
|
-
canTrack:
|
|
1105
|
-
value:
|
|
1106
|
-
}) =>
|
|
1104
|
+
canTrack: t,
|
|
1105
|
+
value: n
|
|
1106
|
+
}) => re({ name: ie(e), value: n, canTrack: t }), lt = (e) => x(e.id) && x(e.variations) && Object.keys(e.variations).length > 0, ct = ({
|
|
1107
1107
|
id: e,
|
|
1108
|
-
variations:
|
|
1108
|
+
variations: t
|
|
1109
1109
|
}) => {
|
|
1110
|
-
var
|
|
1111
|
-
let
|
|
1110
|
+
var s;
|
|
1111
|
+
let n = 0;
|
|
1112
1112
|
const o = Math.random();
|
|
1113
|
-
for (const r in
|
|
1114
|
-
const
|
|
1115
|
-
if (
|
|
1113
|
+
for (const r in t) {
|
|
1114
|
+
const i = (s = t[r]) == null ? void 0 : s.testRatio;
|
|
1115
|
+
if (n += i, o < n)
|
|
1116
1116
|
return r;
|
|
1117
1117
|
}
|
|
1118
1118
|
return e;
|
|
1119
|
-
},
|
|
1119
|
+
}, D = ({
|
|
1120
1120
|
item: e,
|
|
1121
|
-
testGroupId:
|
|
1121
|
+
testGroupId: t
|
|
1122
1122
|
}) => {
|
|
1123
|
-
const
|
|
1124
|
-
return
|
|
1123
|
+
const n = e.variations[t];
|
|
1124
|
+
return t === e.id || !n ? {
|
|
1125
1125
|
testVariationId: e.id,
|
|
1126
1126
|
testVariationName: "Default"
|
|
1127
1127
|
} : {
|
|
1128
|
-
data:
|
|
1129
|
-
testVariationId:
|
|
1130
|
-
testVariationName:
|
|
1128
|
+
data: n.data,
|
|
1129
|
+
testVariationId: n.id,
|
|
1130
|
+
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
1131
1131
|
};
|
|
1132
|
-
},
|
|
1132
|
+
}, dt = async ({
|
|
1133
1133
|
item: e,
|
|
1134
|
-
canTrack:
|
|
1134
|
+
canTrack: t
|
|
1135
1135
|
}) => {
|
|
1136
|
-
const
|
|
1137
|
-
canTrack:
|
|
1136
|
+
const n = await it({
|
|
1137
|
+
canTrack: t,
|
|
1138
1138
|
contentId: e.id
|
|
1139
|
-
}), o =
|
|
1139
|
+
}), o = n ? D({ item: e, testGroupId: n }) : void 0;
|
|
1140
1140
|
if (o)
|
|
1141
1141
|
return o;
|
|
1142
1142
|
{
|
|
1143
|
-
const
|
|
1143
|
+
const s = ct({
|
|
1144
1144
|
variations: e.variations,
|
|
1145
1145
|
id: e.id
|
|
1146
1146
|
});
|
|
1147
|
-
return
|
|
1147
|
+
return at({
|
|
1148
1148
|
contentId: e.id,
|
|
1149
|
-
value:
|
|
1150
|
-
canTrack:
|
|
1149
|
+
value: s,
|
|
1150
|
+
canTrack: t
|
|
1151
1151
|
}).catch((r) => {
|
|
1152
1152
|
console.error("could not store A/B test variation: ", r);
|
|
1153
|
-
}),
|
|
1153
|
+
}), D({ item: e, testGroupId: s });
|
|
1154
1154
|
}
|
|
1155
|
-
},
|
|
1155
|
+
}, ut = async ({
|
|
1156
1156
|
item: e,
|
|
1157
|
-
canTrack:
|
|
1157
|
+
canTrack: t
|
|
1158
1158
|
}) => {
|
|
1159
|
-
if (!
|
|
1159
|
+
if (!lt(e))
|
|
1160
1160
|
return;
|
|
1161
|
-
const
|
|
1162
|
-
Object.assign(e,
|
|
1161
|
+
const n = await dt({ item: e, canTrack: t });
|
|
1162
|
+
Object.assign(e, n);
|
|
1163
1163
|
};
|
|
1164
|
-
function W(e,
|
|
1165
|
-
return Object.keys(e).reduce((o,
|
|
1166
|
-
const r = e[
|
|
1164
|
+
function W(e, t = null, n = ".") {
|
|
1165
|
+
return Object.keys(e).reduce((o, s) => {
|
|
1166
|
+
const r = e[s], i = [t, s].filter(Boolean).join(n);
|
|
1167
1167
|
return [
|
|
1168
1168
|
typeof r == "object",
|
|
1169
1169
|
r !== null,
|
|
1170
1170
|
!(Array.isArray(r) && r.length === 0)
|
|
1171
|
-
].every(Boolean) ? { ...o, ...W(r,
|
|
1171
|
+
].every(Boolean) ? { ...o, ...W(r, i, n) } : { ...o, [i]: r };
|
|
1172
1172
|
}, {});
|
|
1173
1173
|
}
|
|
1174
|
-
const
|
|
1175
|
-
const
|
|
1176
|
-
return e.forEach((
|
|
1177
|
-
|
|
1178
|
-
}),
|
|
1179
|
-
},
|
|
1174
|
+
const q = "builder.", pt = "options.", mt = (e) => {
|
|
1175
|
+
const t = {};
|
|
1176
|
+
return e.forEach((n, o) => {
|
|
1177
|
+
t[o] = n;
|
|
1178
|
+
}), t;
|
|
1179
|
+
}, ht = (e) => {
|
|
1180
1180
|
if (!e)
|
|
1181
1181
|
return {};
|
|
1182
|
-
const
|
|
1183
|
-
return Object.keys(
|
|
1184
|
-
if (o.startsWith(
|
|
1185
|
-
const
|
|
1186
|
-
|
|
1182
|
+
const t = ae(e), n = {};
|
|
1183
|
+
return Object.keys(t).forEach((o) => {
|
|
1184
|
+
if (o.startsWith(q)) {
|
|
1185
|
+
const s = o.replace(q, "").replace(pt, "");
|
|
1186
|
+
n[s] = t[o];
|
|
1187
1187
|
}
|
|
1188
|
-
}),
|
|
1189
|
-
},
|
|
1190
|
-
if (!
|
|
1188
|
+
}), n;
|
|
1189
|
+
}, ft = () => {
|
|
1190
|
+
if (!m())
|
|
1191
1191
|
return {};
|
|
1192
1192
|
const e = new URLSearchParams(window.location.search);
|
|
1193
|
-
return
|
|
1194
|
-
},
|
|
1193
|
+
return ht(e);
|
|
1194
|
+
}, ae = (e) => e instanceof URLSearchParams ? mt(e) : e, gt = "v3", bt = (e) => {
|
|
1195
1195
|
const {
|
|
1196
|
-
limit:
|
|
1197
|
-
userAttributes:
|
|
1196
|
+
limit: t = 30,
|
|
1197
|
+
userAttributes: n,
|
|
1198
1198
|
query: o,
|
|
1199
|
-
noTraverse:
|
|
1199
|
+
noTraverse: s = !1,
|
|
1200
1200
|
model: r,
|
|
1201
|
-
apiKey:
|
|
1202
|
-
includeRefs:
|
|
1201
|
+
apiKey: i,
|
|
1202
|
+
includeRefs: l = !0,
|
|
1203
1203
|
locale: a,
|
|
1204
|
-
apiVersion:
|
|
1204
|
+
apiVersion: c = gt
|
|
1205
1205
|
} = e;
|
|
1206
|
-
if (!
|
|
1206
|
+
if (!i)
|
|
1207
1207
|
throw new Error("Missing API key");
|
|
1208
|
-
if (!["v2", "v3"].includes(
|
|
1208
|
+
if (!["v2", "v3"].includes(c))
|
|
1209
1209
|
throw new Error(
|
|
1210
|
-
`Invalid apiVersion: expected 'v2' or 'v3', received '${
|
|
1210
|
+
`Invalid apiVersion: expected 'v2' or 'v3', received '${c}'`
|
|
1211
1211
|
);
|
|
1212
1212
|
const u = new URL(
|
|
1213
|
-
`https://cdn.builder.io/api/${
|
|
1214
|
-
),
|
|
1215
|
-
...
|
|
1216
|
-
...
|
|
1217
|
-
},
|
|
1218
|
-
for (const
|
|
1219
|
-
u.searchParams.set(
|
|
1220
|
-
if (
|
|
1221
|
-
const
|
|
1222
|
-
for (const
|
|
1223
|
-
u.searchParams.set(
|
|
1213
|
+
`https://cdn.builder.io/api/${c}/content/${r}?apiKey=${i}&limit=${t}&noTraverse=${s}&includeRefs=${l}${a ? `&locale=${a}` : ""}`
|
|
1214
|
+
), b = {
|
|
1215
|
+
...ft(),
|
|
1216
|
+
...ae(e.options || {})
|
|
1217
|
+
}, g = W(b);
|
|
1218
|
+
for (const y in g)
|
|
1219
|
+
u.searchParams.set(y, String(g[y]));
|
|
1220
|
+
if (n && u.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
1221
|
+
const y = W({ query: o });
|
|
1222
|
+
for (const $ in y)
|
|
1223
|
+
u.searchParams.set($, JSON.stringify(y[$]));
|
|
1224
1224
|
}
|
|
1225
1225
|
return u;
|
|
1226
1226
|
};
|
|
1227
|
-
async function
|
|
1228
|
-
const
|
|
1229
|
-
return
|
|
1227
|
+
async function le(e) {
|
|
1228
|
+
const t = await yt({ ...e, limit: 1 });
|
|
1229
|
+
return t && "results" in t && (t == null ? void 0 : t.results[0]) || null;
|
|
1230
1230
|
}
|
|
1231
|
-
async function
|
|
1231
|
+
async function yt(e) {
|
|
1232
1232
|
try {
|
|
1233
|
-
const
|
|
1233
|
+
const t = bt(e), o = await (await oe(t.href)).json();
|
|
1234
1234
|
if ("status" in o && !("results" in o))
|
|
1235
|
-
return
|
|
1236
|
-
const
|
|
1235
|
+
return C.error("Error fetching data. ", { url: t, content: o, options: e }), o;
|
|
1236
|
+
const s = e.canTrack !== !1;
|
|
1237
1237
|
try {
|
|
1238
|
-
if (
|
|
1238
|
+
if (s && Array.isArray(o.results))
|
|
1239
1239
|
for (const r of o.results)
|
|
1240
|
-
await
|
|
1240
|
+
await ut({ item: r, canTrack: s });
|
|
1241
1241
|
} catch (r) {
|
|
1242
|
-
|
|
1242
|
+
C.error("Could not setup A/B testing. ", r);
|
|
1243
1243
|
}
|
|
1244
1244
|
return o;
|
|
1245
|
-
} catch (
|
|
1246
|
-
return
|
|
1245
|
+
} catch (t) {
|
|
1246
|
+
return C.error("Error fetching data. ", t), null;
|
|
1247
1247
|
}
|
|
1248
1248
|
}
|
|
1249
|
-
const
|
|
1249
|
+
const vt = () => Promise.resolve().then(() => Vn).then((e) => e.default).catch((e) => {
|
|
1250
1250
|
throw console.error(
|
|
1251
1251
|
"Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",
|
|
1252
1252
|
e
|
|
1253
1253
|
), e;
|
|
1254
|
-
}),
|
|
1254
|
+
}), kt = h({
|
|
1255
1255
|
name: "builder-symbol",
|
|
1256
|
-
components: { RenderContent:
|
|
1256
|
+
components: { RenderContent: S(vt) },
|
|
1257
1257
|
props: ["attributes", "symbol", "dynamic"],
|
|
1258
1258
|
data() {
|
|
1259
|
-
var e,
|
|
1259
|
+
var e, t, n;
|
|
1260
1260
|
return {
|
|
1261
1261
|
className: [
|
|
1262
1262
|
...Object.keys(this.attributes.class),
|
|
1263
1263
|
"builder-symbol",
|
|
1264
1264
|
(e = this.symbol) != null && e.inline ? "builder-inline-symbol" : void 0,
|
|
1265
|
-
((
|
|
1265
|
+
((t = this.symbol) == null ? void 0 : t.dynamic) || this.dynamic ? "builder-dynamic-symbol" : void 0
|
|
1266
1266
|
].filter(Boolean).join(" "),
|
|
1267
|
-
contentToUse: (
|
|
1267
|
+
contentToUse: (n = this.symbol) == null ? void 0 : n.content
|
|
1268
1268
|
};
|
|
1269
1269
|
},
|
|
1270
1270
|
inject: {
|
|
@@ -1290,71 +1290,71 @@ const yt = () => Promise.resolve().then(() => An).then((e) => e.default).catch((
|
|
|
1290
1290
|
},
|
|
1291
1291
|
methods: {
|
|
1292
1292
|
fetchContent() {
|
|
1293
|
-
var e,
|
|
1294
|
-
!this.contentToUse && ((e = this.symbol) == null ? void 0 : e.model) && ((
|
|
1293
|
+
var e, t;
|
|
1294
|
+
!this.contentToUse && ((e = this.symbol) == null ? void 0 : e.model) && ((t = this.builderContext) == null ? void 0 : t.apiKey) && le({
|
|
1295
1295
|
model: this.symbol.model,
|
|
1296
1296
|
apiKey: this.builderContext.apiKey,
|
|
1297
1297
|
apiVersion: this.builderContext.apiVersion,
|
|
1298
1298
|
query: {
|
|
1299
1299
|
id: this.symbol.entry
|
|
1300
1300
|
}
|
|
1301
|
-
}).then((
|
|
1302
|
-
|
|
1303
|
-
}).catch((
|
|
1304
|
-
|
|
1301
|
+
}).then((n) => {
|
|
1302
|
+
n && (this.contentToUse = n);
|
|
1303
|
+
}).catch((n) => {
|
|
1304
|
+
C.error("Could not fetch symbol content: ", n);
|
|
1305
1305
|
});
|
|
1306
1306
|
},
|
|
1307
|
-
filterAttrs: function(
|
|
1307
|
+
filterAttrs: function(t = {}, n) {
|
|
1308
1308
|
const o = "v-on:";
|
|
1309
|
-
return Object.keys(
|
|
1310
|
-
if (!
|
|
1309
|
+
return Object.keys(t).filter((s) => {
|
|
1310
|
+
if (!t[s])
|
|
1311
1311
|
return !1;
|
|
1312
|
-
const r =
|
|
1313
|
-
return
|
|
1312
|
+
const r = s.startsWith(o);
|
|
1313
|
+
return n ? r : !r;
|
|
1314
1314
|
}).reduce(
|
|
1315
|
-
(
|
|
1316
|
-
...
|
|
1317
|
-
[r.replace(o, "")]:
|
|
1315
|
+
(s, r) => ({
|
|
1316
|
+
...s,
|
|
1317
|
+
[r.replace(o, "")]: t[r]
|
|
1318
1318
|
}),
|
|
1319
1319
|
{}
|
|
1320
1320
|
);
|
|
1321
1321
|
},
|
|
1322
1322
|
_classStringToObject(e) {
|
|
1323
|
-
const
|
|
1323
|
+
const t = {};
|
|
1324
1324
|
if (typeof e != "string")
|
|
1325
|
-
return
|
|
1326
|
-
const
|
|
1327
|
-
for (const o of
|
|
1328
|
-
|
|
1329
|
-
return
|
|
1325
|
+
return t;
|
|
1326
|
+
const n = e.trim().split(/\s+/);
|
|
1327
|
+
for (const o of n)
|
|
1328
|
+
t[o] = !0;
|
|
1329
|
+
return t;
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
1332
|
-
},
|
|
1333
|
-
function
|
|
1334
|
-
var
|
|
1335
|
-
const
|
|
1336
|
-
return d(),
|
|
1332
|
+
}), St = ["dataSet"];
|
|
1333
|
+
function wt(e, t, n, o, s, r) {
|
|
1334
|
+
var l, a, c, u;
|
|
1335
|
+
const i = w("render-content");
|
|
1336
|
+
return d(), p("div", I({
|
|
1337
1337
|
dataSet: {
|
|
1338
|
-
class:
|
|
1339
|
-
},
|
|
1340
|
-
class:
|
|
1341
|
-
},
|
|
1342
|
-
|
|
1343
|
-
apiVersion:
|
|
1344
|
-
apiKey:
|
|
1345
|
-
context:
|
|
1346
|
-
customComponents: Object.values(
|
|
1338
|
+
class: e.className
|
|
1339
|
+
},
|
|
1340
|
+
class: e._classStringToObject(e.className)
|
|
1341
|
+
}, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), [
|
|
1342
|
+
ee(i, {
|
|
1343
|
+
apiVersion: e.builderContext.apiVersion,
|
|
1344
|
+
apiKey: e.builderContext.apiKey,
|
|
1345
|
+
context: e.builderContext.context,
|
|
1346
|
+
customComponents: Object.values(e.builderContext.registeredComponents),
|
|
1347
1347
|
data: {
|
|
1348
|
-
...(
|
|
1349
|
-
...
|
|
1350
|
-
...(
|
|
1348
|
+
...(l = e.symbol) == null ? void 0 : l.data,
|
|
1349
|
+
...e.builderContext.localState,
|
|
1350
|
+
...(c = (a = e.contentToUse) == null ? void 0 : a.data) == null ? void 0 : c.state
|
|
1351
1351
|
},
|
|
1352
|
-
model: (u =
|
|
1353
|
-
content:
|
|
1352
|
+
model: (u = e.symbol) == null ? void 0 : u.model,
|
|
1353
|
+
content: e.contentToUse
|
|
1354
1354
|
}, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content"])
|
|
1355
|
-
], 16,
|
|
1355
|
+
], 16, St);
|
|
1356
1356
|
}
|
|
1357
|
-
const
|
|
1357
|
+
const Ct = /* @__PURE__ */ f(kt, [["render", wt]]), It = {
|
|
1358
1358
|
name: "Text",
|
|
1359
1359
|
static: !0,
|
|
1360
1360
|
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",
|
|
@@ -1373,20 +1373,20 @@ const St = /* @__PURE__ */ h(vt, [["render", kt]]), _t = {
|
|
|
1373
1373
|
height: "auto",
|
|
1374
1374
|
textAlign: "center"
|
|
1375
1375
|
}
|
|
1376
|
-
},
|
|
1376
|
+
}, xt = h({
|
|
1377
1377
|
name: "builder-text",
|
|
1378
1378
|
props: ["text"]
|
|
1379
|
-
},
|
|
1380
|
-
function
|
|
1381
|
-
return d(),
|
|
1379
|
+
}), $t = ["innerHTML"];
|
|
1380
|
+
function Tt(e, t, n, o, s, r) {
|
|
1381
|
+
return d(), p("span", {
|
|
1382
1382
|
class: "builder-text",
|
|
1383
|
-
innerHTML:
|
|
1383
|
+
innerHTML: e.text,
|
|
1384
1384
|
style: {
|
|
1385
1385
|
outline: "none"
|
|
1386
1386
|
}
|
|
1387
|
-
}, null, 8,
|
|
1387
|
+
}, null, 8, $t);
|
|
1388
1388
|
}
|
|
1389
|
-
const
|
|
1389
|
+
const Rt = /* @__PURE__ */ f(xt, [["render", Tt]]), Et = {
|
|
1390
1390
|
name: "Video",
|
|
1391
1391
|
canHaveChildren: !0,
|
|
1392
1392
|
defaultStyles: {
|
|
@@ -1487,7 +1487,7 @@ const Tt = /* @__PURE__ */ h(wt, [["render", It]]), Rt = {
|
|
|
1487
1487
|
advanced: !0
|
|
1488
1488
|
}
|
|
1489
1489
|
]
|
|
1490
|
-
},
|
|
1490
|
+
}, _t = h({
|
|
1491
1491
|
name: "builder-video",
|
|
1492
1492
|
props: [
|
|
1493
1493
|
"autoPlay",
|
|
@@ -1528,23 +1528,23 @@ const Tt = /* @__PURE__ */ h(wt, [["render", It]]), Rt = {
|
|
|
1528
1528
|
};
|
|
1529
1529
|
}
|
|
1530
1530
|
}
|
|
1531
|
-
}, At = ["src", "poster"];
|
|
1532
|
-
function
|
|
1533
|
-
var
|
|
1534
|
-
return d(),
|
|
1531
|
+
}), At = ["src", "poster"];
|
|
1532
|
+
function jt(e, t, n, o, s, r) {
|
|
1533
|
+
var i;
|
|
1534
|
+
return d(), p("video", I({
|
|
1535
1535
|
style: {
|
|
1536
1536
|
width: "100%",
|
|
1537
1537
|
height: "100%",
|
|
1538
|
-
...(
|
|
1539
|
-
objectFit:
|
|
1540
|
-
objectPosition:
|
|
1538
|
+
...(i = e.attributes) == null ? void 0 : i.style,
|
|
1539
|
+
objectFit: e.fit,
|
|
1540
|
+
objectPosition: e.position,
|
|
1541
1541
|
borderRadius: 1
|
|
1542
1542
|
},
|
|
1543
|
-
src:
|
|
1544
|
-
poster:
|
|
1545
|
-
},
|
|
1543
|
+
src: e.video || "no-src",
|
|
1544
|
+
poster: e.posterImage
|
|
1545
|
+
}, e.spreadProps), null, 16, At);
|
|
1546
1546
|
}
|
|
1547
|
-
const
|
|
1547
|
+
const Vt = /* @__PURE__ */ f(_t, [["render", jt]]), Pt = {
|
|
1548
1548
|
name: "Embed",
|
|
1549
1549
|
static: !0,
|
|
1550
1550
|
inputs: [
|
|
@@ -1554,14 +1554,14 @@ const jt = /* @__PURE__ */ h(Et, [["render", Vt]]), Pt = {
|
|
|
1554
1554
|
required: !0,
|
|
1555
1555
|
defaultValue: "",
|
|
1556
1556
|
helperText: "e.g. enter a youtube url, google map, etc",
|
|
1557
|
-
onChange:
|
|
1557
|
+
onChange: O(
|
|
1558
1558
|
(e) => {
|
|
1559
|
-
const
|
|
1560
|
-
if (
|
|
1559
|
+
const t = e.get("url");
|
|
1560
|
+
if (t)
|
|
1561
1561
|
return e.set("content", "Loading..."), fetch(
|
|
1562
|
-
`https://iframe.ly/api/iframely?url=${
|
|
1562
|
+
`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`
|
|
1563
1563
|
).then((o) => o.json()).then((o) => {
|
|
1564
|
-
e.get("url") ===
|
|
1564
|
+
e.get("url") === t && (o.html ? e.set("content", o.html) : e.set("content", "Invalid url, please try another"));
|
|
1565
1565
|
}).catch((o) => {
|
|
1566
1566
|
e.set(
|
|
1567
1567
|
"content",
|
|
@@ -1579,11 +1579,11 @@ const jt = /* @__PURE__ */ h(Et, [["render", Vt]]), Pt = {
|
|
|
1579
1579
|
hideFromUI: !0
|
|
1580
1580
|
}
|
|
1581
1581
|
]
|
|
1582
|
-
},
|
|
1582
|
+
}, Ot = [
|
|
1583
1583
|
"text/javascript",
|
|
1584
1584
|
"application/javascript",
|
|
1585
1585
|
"application/ecmascript"
|
|
1586
|
-
],
|
|
1586
|
+
], Bt = (e) => Ot.includes(e.type), Ft = h({
|
|
1587
1587
|
name: "builder-embed",
|
|
1588
1588
|
props: ["content"],
|
|
1589
1589
|
data() {
|
|
@@ -1610,30 +1610,30 @@ const jt = /* @__PURE__ */ h(Et, [["render", Vt]]), Pt = {
|
|
|
1610
1610
|
if (!this.$refs.elem || !this.$refs.elem.getElementsByTagName)
|
|
1611
1611
|
return;
|
|
1612
1612
|
const e = this.$refs.elem.getElementsByTagName("script");
|
|
1613
|
-
for (let
|
|
1614
|
-
const
|
|
1615
|
-
if (
|
|
1616
|
-
this.scriptsInserted.push(
|
|
1613
|
+
for (let t = 0; t < e.length; t++) {
|
|
1614
|
+
const n = e[t];
|
|
1615
|
+
if (n.src && !this.scriptsInserted.includes(n.src)) {
|
|
1616
|
+
this.scriptsInserted.push(n.src);
|
|
1617
1617
|
const o = document.createElement("script");
|
|
1618
|
-
o.async = !0, o.src =
|
|
1619
|
-
} else if (
|
|
1618
|
+
o.async = !0, o.src = n.src, document.head.appendChild(o);
|
|
1619
|
+
} else if (Bt(n) && !this.scriptsRun.includes(n.innerText))
|
|
1620
1620
|
try {
|
|
1621
|
-
this.scriptsRun.push(
|
|
1621
|
+
this.scriptsRun.push(n.innerText), new Function(n.innerText)();
|
|
1622
1622
|
} catch (o) {
|
|
1623
1623
|
console.warn("`Embed`: Error running script:", o);
|
|
1624
1624
|
}
|
|
1625
1625
|
}
|
|
1626
1626
|
}
|
|
1627
1627
|
}
|
|
1628
|
-
}, Ut = ["innerHTML"];
|
|
1629
|
-
function Wt(e,
|
|
1630
|
-
return d(),
|
|
1628
|
+
}), Ut = ["innerHTML"];
|
|
1629
|
+
function Wt(e, t, n, o, s, r) {
|
|
1630
|
+
return d(), p("div", {
|
|
1631
1631
|
class: "builder-embed",
|
|
1632
1632
|
ref: "elem",
|
|
1633
|
-
innerHTML:
|
|
1633
|
+
innerHTML: e.content
|
|
1634
1634
|
}, null, 8, Ut);
|
|
1635
1635
|
}
|
|
1636
|
-
const Mt = /* @__PURE__ */
|
|
1636
|
+
const Mt = /* @__PURE__ */ f(Ft, [["render", Wt]]), Lt = h({
|
|
1637
1637
|
name: "builder-img-component",
|
|
1638
1638
|
props: [
|
|
1639
1639
|
"backgroundSize",
|
|
@@ -1644,38 +1644,38 @@ const Mt = /* @__PURE__ */ h(Ot, [["render", Wt]]), Lt = {
|
|
|
1644
1644
|
"attributes"
|
|
1645
1645
|
],
|
|
1646
1646
|
data() {
|
|
1647
|
-
return { isEditing:
|
|
1647
|
+
return { isEditing: k };
|
|
1648
1648
|
},
|
|
1649
1649
|
methods: {
|
|
1650
|
-
filterAttrs: function(
|
|
1650
|
+
filterAttrs: function(t = {}, n) {
|
|
1651
1651
|
const o = "v-on:";
|
|
1652
|
-
return Object.keys(
|
|
1653
|
-
if (!
|
|
1652
|
+
return Object.keys(t).filter((s) => {
|
|
1653
|
+
if (!t[s])
|
|
1654
1654
|
return !1;
|
|
1655
|
-
const r =
|
|
1656
|
-
return
|
|
1655
|
+
const r = s.startsWith(o);
|
|
1656
|
+
return n ? r : !r;
|
|
1657
1657
|
}).reduce(
|
|
1658
|
-
(
|
|
1659
|
-
...
|
|
1660
|
-
[r.replace(o, "")]:
|
|
1658
|
+
(s, r) => ({
|
|
1659
|
+
...s,
|
|
1660
|
+
[r.replace(o, "")]: t[r]
|
|
1661
1661
|
}),
|
|
1662
1662
|
{}
|
|
1663
1663
|
);
|
|
1664
1664
|
}
|
|
1665
1665
|
}
|
|
1666
|
-
}, Nt = ["alt", "src"];
|
|
1667
|
-
function
|
|
1668
|
-
return d(),
|
|
1666
|
+
}), Nt = ["alt", "src"];
|
|
1667
|
+
function Ht(e, t, n, o, s, r) {
|
|
1668
|
+
return d(), p("img", I({
|
|
1669
1669
|
style: {
|
|
1670
|
-
objectFit:
|
|
1671
|
-
objectPosition:
|
|
1670
|
+
objectFit: e.backgroundSize || "cover",
|
|
1671
|
+
objectPosition: e.backgroundPosition || "center"
|
|
1672
1672
|
},
|
|
1673
|
-
key:
|
|
1674
|
-
alt:
|
|
1675
|
-
src:
|
|
1676
|
-
},
|
|
1673
|
+
key: e.isEditing() && e.imgSrc || "default-key",
|
|
1674
|
+
alt: e.altText,
|
|
1675
|
+
src: e.imgSrc || e.image
|
|
1676
|
+
}, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), null, 16, Nt);
|
|
1677
1677
|
}
|
|
1678
|
-
const
|
|
1678
|
+
const Kt = /* @__PURE__ */ f(Lt, [["render", Ht]]), zt = {
|
|
1679
1679
|
name: "Raw:Img",
|
|
1680
1680
|
hideFromInsertMenu: !0,
|
|
1681
1681
|
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",
|
|
@@ -1690,7 +1690,7 @@ const Ht = /* @__PURE__ */ h(Lt, [["render", $t]]), zt = {
|
|
|
1690
1690
|
],
|
|
1691
1691
|
noWrap: !0,
|
|
1692
1692
|
static: !0
|
|
1693
|
-
},
|
|
1693
|
+
}, Dt = h({
|
|
1694
1694
|
name: "builder-custom-code",
|
|
1695
1695
|
props: ["replaceNodes", "code"],
|
|
1696
1696
|
data() {
|
|
@@ -1703,23 +1703,23 @@ const Ht = /* @__PURE__ */ h(Lt, [["render", $t]]), zt = {
|
|
|
1703
1703
|
findAndRunScripts() {
|
|
1704
1704
|
if (this.$refs.elem && this.$refs.elem.getElementsByTagName && typeof window < "u") {
|
|
1705
1705
|
const e = this.$refs.elem.getElementsByTagName("script");
|
|
1706
|
-
for (let
|
|
1707
|
-
const
|
|
1708
|
-
if (
|
|
1709
|
-
if (this.scriptsInserted.includes(
|
|
1706
|
+
for (let t = 0; t < e.length; t++) {
|
|
1707
|
+
const n = e[t];
|
|
1708
|
+
if (n.src) {
|
|
1709
|
+
if (this.scriptsInserted.includes(n.src))
|
|
1710
1710
|
continue;
|
|
1711
|
-
this.scriptsInserted.push(
|
|
1711
|
+
this.scriptsInserted.push(n.src);
|
|
1712
1712
|
const o = document.createElement("script");
|
|
1713
|
-
o.async = !0, o.src =
|
|
1714
|
-
} else if (!
|
|
1713
|
+
o.async = !0, o.src = n.src, document.head.appendChild(o);
|
|
1714
|
+
} else if (!n.type || [
|
|
1715
1715
|
"text/javascript",
|
|
1716
1716
|
"application/javascript",
|
|
1717
1717
|
"application/ecmascript"
|
|
1718
|
-
].includes(
|
|
1719
|
-
if (this.scriptsRun.includes(
|
|
1718
|
+
].includes(n.type)) {
|
|
1719
|
+
if (this.scriptsRun.includes(n.innerText))
|
|
1720
1720
|
continue;
|
|
1721
1721
|
try {
|
|
1722
|
-
this.scriptsRun.push(
|
|
1722
|
+
this.scriptsRun.push(n.innerText), new Function(n.innerText)();
|
|
1723
1723
|
} catch (o) {
|
|
1724
1724
|
console.warn("`CustomCode`: Error running script:", o);
|
|
1725
1725
|
}
|
|
@@ -1728,28 +1728,28 @@ const Ht = /* @__PURE__ */ h(Lt, [["render", $t]]), zt = {
|
|
|
1728
1728
|
}
|
|
1729
1729
|
},
|
|
1730
1730
|
_classStringToObject(e) {
|
|
1731
|
-
const
|
|
1731
|
+
const t = {};
|
|
1732
1732
|
if (typeof e != "string")
|
|
1733
|
-
return
|
|
1734
|
-
const
|
|
1735
|
-
for (const o of
|
|
1736
|
-
|
|
1737
|
-
return
|
|
1733
|
+
return t;
|
|
1734
|
+
const n = e.trim().split(/\s+/);
|
|
1735
|
+
for (const o of n)
|
|
1736
|
+
t[o] = !0;
|
|
1737
|
+
return t;
|
|
1738
1738
|
}
|
|
1739
1739
|
}
|
|
1740
|
-
},
|
|
1741
|
-
function
|
|
1742
|
-
return d(),
|
|
1740
|
+
}), qt = ["innerHTML"];
|
|
1741
|
+
function Gt(e, t, n, o, s, r) {
|
|
1742
|
+
return d(), p("div", {
|
|
1743
1743
|
ref: "elem",
|
|
1744
|
-
class:
|
|
1745
|
-
|
|
1746
|
-
"builder-custom-code" + (
|
|
1744
|
+
class: V(
|
|
1745
|
+
e._classStringToObject(
|
|
1746
|
+
"builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")
|
|
1747
1747
|
)
|
|
1748
1748
|
),
|
|
1749
|
-
innerHTML:
|
|
1750
|
-
}, null, 10,
|
|
1749
|
+
innerHTML: e.code
|
|
1750
|
+
}, null, 10, qt);
|
|
1751
1751
|
}
|
|
1752
|
-
const
|
|
1752
|
+
const Jt = /* @__PURE__ */ f(Dt, [["render", Gt]]), Xt = {
|
|
1753
1753
|
name: "Custom Code",
|
|
1754
1754
|
static: !0,
|
|
1755
1755
|
requiredPermissions: ["editCode"],
|
|
@@ -1775,34 +1775,36 @@ const Gt = /* @__PURE__ */ h(Kt, [["render", qt]]), Jt = {
|
|
|
1775
1775
|
advanced: !0
|
|
1776
1776
|
}
|
|
1777
1777
|
]
|
|
1778
|
-
},
|
|
1779
|
-
{ component:
|
|
1780
|
-
{ component:
|
|
1781
|
-
{ component:
|
|
1778
|
+
}, Yt = () => [
|
|
1779
|
+
{ component: ye, ...Ke },
|
|
1780
|
+
{ component: xe, ...ze },
|
|
1781
|
+
{ component: Jt, ...Xt },
|
|
1782
1782
|
{ component: Mt, ...Pt },
|
|
1783
|
-
{ component:
|
|
1784
|
-
{ component:
|
|
1785
|
-
{ component:
|
|
1786
|
-
{ component:
|
|
1787
|
-
{ component:
|
|
1788
|
-
{ component:
|
|
1789
|
-
{ component:
|
|
1783
|
+
{ component: Re, ...De },
|
|
1784
|
+
{ component: Be, ...qe },
|
|
1785
|
+
{ component: Kt, ...zt },
|
|
1786
|
+
{ component: Ye, ...Ge },
|
|
1787
|
+
{ component: Ct, ...Qe },
|
|
1788
|
+
{ component: Rt, ...It },
|
|
1789
|
+
{ component: Vt, ...Et }
|
|
1790
1790
|
];
|
|
1791
|
-
function
|
|
1791
|
+
function G({
|
|
1792
1792
|
code: e,
|
|
1793
|
-
context:
|
|
1794
|
-
|
|
1795
|
-
|
|
1793
|
+
context: t,
|
|
1794
|
+
localState: n,
|
|
1795
|
+
rootState: o,
|
|
1796
|
+
rootSetState: s,
|
|
1797
|
+
event: r,
|
|
1796
1798
|
isExpression: i = !0
|
|
1797
1799
|
}) {
|
|
1798
1800
|
if (e === "") {
|
|
1799
1801
|
console.warn("Skipping evaluation of empty code block.");
|
|
1800
1802
|
return;
|
|
1801
1803
|
}
|
|
1802
|
-
const
|
|
1803
|
-
isEditing:
|
|
1804
|
-
isBrowser:
|
|
1805
|
-
isServer: !
|
|
1804
|
+
const l = {
|
|
1805
|
+
isEditing: k(),
|
|
1806
|
+
isBrowser: m(),
|
|
1807
|
+
isServer: !m()
|
|
1806
1808
|
}, c = i && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e;
|
|
1807
1809
|
try {
|
|
1808
1810
|
return new Function(
|
|
@@ -1812,8 +1814,14 @@ function q({
|
|
|
1812
1814
|
"context",
|
|
1813
1815
|
"event",
|
|
1814
1816
|
c
|
|
1815
|
-
)(
|
|
1816
|
-
|
|
1817
|
+
)(
|
|
1818
|
+
l,
|
|
1819
|
+
l,
|
|
1820
|
+
Qt(o, n, s),
|
|
1821
|
+
t,
|
|
1822
|
+
r
|
|
1823
|
+
);
|
|
1824
|
+
} catch (u) {
|
|
1817
1825
|
console.warn(
|
|
1818
1826
|
`Builder custom code error:
|
|
1819
1827
|
While Evaluating:
|
|
@@ -1821,117 +1829,131 @@ function q({
|
|
|
1821
1829
|
c,
|
|
1822
1830
|
`
|
|
1823
1831
|
`,
|
|
1824
|
-
|
|
1832
|
+
u
|
|
1825
1833
|
);
|
|
1826
1834
|
}
|
|
1827
1835
|
}
|
|
1828
|
-
function
|
|
1829
|
-
|
|
1836
|
+
function Qt(e, t, n) {
|
|
1837
|
+
if (e === t)
|
|
1838
|
+
throw new Error("rootState === localState");
|
|
1839
|
+
return new Proxy(e, {
|
|
1840
|
+
get: (o, s) => t && s in t ? t[s] : e[s],
|
|
1841
|
+
set: (o, s, r) => {
|
|
1842
|
+
if (t && s in t)
|
|
1843
|
+
throw new Error(
|
|
1844
|
+
"Writing to local state is not allowed as it is read-only."
|
|
1845
|
+
);
|
|
1846
|
+
return e[s] = r, n == null || n(e), !0;
|
|
1847
|
+
}
|
|
1848
|
+
});
|
|
1849
|
+
}
|
|
1850
|
+
function Zt() {
|
|
1851
|
+
return !m() || k() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
|
|
1830
1852
|
}
|
|
1831
1853
|
const ce = [];
|
|
1832
|
-
function
|
|
1833
|
-
return ce.push({ component: e, ...
|
|
1854
|
+
function Bn(e, t) {
|
|
1855
|
+
return ce.push({ component: e, ...t }), console.warn(
|
|
1834
1856
|
"registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."
|
|
1835
1857
|
), e;
|
|
1836
1858
|
}
|
|
1837
|
-
const
|
|
1859
|
+
const en = ({
|
|
1838
1860
|
component: e,
|
|
1839
|
-
...
|
|
1861
|
+
...t
|
|
1840
1862
|
}) => ({
|
|
1841
1863
|
type: "builder.registerComponent",
|
|
1842
|
-
data:
|
|
1843
|
-
}),
|
|
1864
|
+
data: nn(t)
|
|
1865
|
+
}), tn = (e) => typeof e == "function" ? O(e) : L(e), nn = ({
|
|
1844
1866
|
inputs: e,
|
|
1845
|
-
...
|
|
1867
|
+
...t
|
|
1846
1868
|
}) => ({
|
|
1847
|
-
...L(
|
|
1869
|
+
...L(t),
|
|
1848
1870
|
inputs: e == null ? void 0 : e.map(
|
|
1849
|
-
(
|
|
1850
|
-
(o, [
|
|
1871
|
+
(n) => Object.entries(n).reduce(
|
|
1872
|
+
(o, [s, r]) => ({
|
|
1851
1873
|
...o,
|
|
1852
|
-
[
|
|
1874
|
+
[s]: tn(r)
|
|
1853
1875
|
}),
|
|
1854
1876
|
{}
|
|
1855
1877
|
)
|
|
1856
1878
|
)
|
|
1857
1879
|
});
|
|
1858
|
-
function
|
|
1880
|
+
function on() {
|
|
1859
1881
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
1860
|
-
const
|
|
1861
|
-
return (e == "x" ?
|
|
1882
|
+
const t = Math.random() * 16 | 0;
|
|
1883
|
+
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
1862
1884
|
});
|
|
1863
1885
|
}
|
|
1864
|
-
function
|
|
1865
|
-
return
|
|
1886
|
+
function de() {
|
|
1887
|
+
return on().replace(/-/g, "");
|
|
1866
1888
|
}
|
|
1867
|
-
const
|
|
1889
|
+
const ue = "builderSessionId", sn = async ({
|
|
1868
1890
|
canTrack: e
|
|
1869
1891
|
}) => {
|
|
1870
1892
|
if (!e)
|
|
1871
1893
|
return;
|
|
1872
|
-
const
|
|
1873
|
-
name:
|
|
1894
|
+
const t = await se({
|
|
1895
|
+
name: ue,
|
|
1874
1896
|
canTrack: e
|
|
1875
1897
|
});
|
|
1876
|
-
if (
|
|
1877
|
-
return
|
|
1898
|
+
if (x(t))
|
|
1899
|
+
return t;
|
|
1878
1900
|
{
|
|
1879
|
-
const
|
|
1880
|
-
return
|
|
1901
|
+
const n = rn();
|
|
1902
|
+
return an({ id: n, canTrack: e }), n;
|
|
1881
1903
|
}
|
|
1882
|
-
},
|
|
1904
|
+
}, rn = () => de(), an = ({
|
|
1883
1905
|
id: e,
|
|
1884
|
-
canTrack:
|
|
1885
|
-
}) =>
|
|
1906
|
+
canTrack: t
|
|
1907
|
+
}) => re({ name: ue, value: e, canTrack: t }), pe = () => m() && typeof localStorage < "u" ? localStorage : void 0, ln = ({
|
|
1886
1908
|
key: e,
|
|
1887
|
-
canTrack:
|
|
1909
|
+
canTrack: t
|
|
1888
1910
|
}) => {
|
|
1889
|
-
var
|
|
1911
|
+
var n;
|
|
1890
1912
|
try {
|
|
1891
|
-
return
|
|
1913
|
+
return t ? (n = pe()) == null ? void 0 : n.getItem(e) : void 0;
|
|
1892
1914
|
} catch (o) {
|
|
1893
1915
|
console.debug("[LocalStorage] GET error: ", o);
|
|
1894
1916
|
return;
|
|
1895
1917
|
}
|
|
1896
|
-
},
|
|
1918
|
+
}, cn = ({
|
|
1897
1919
|
key: e,
|
|
1898
|
-
canTrack:
|
|
1899
|
-
value:
|
|
1920
|
+
canTrack: t,
|
|
1921
|
+
value: n
|
|
1900
1922
|
}) => {
|
|
1901
1923
|
var o;
|
|
1902
1924
|
try {
|
|
1903
|
-
|
|
1904
|
-
} catch (
|
|
1905
|
-
console.debug("[LocalStorage] SET error: ",
|
|
1925
|
+
t && ((o = pe()) == null || o.setItem(e, n));
|
|
1926
|
+
} catch (s) {
|
|
1927
|
+
console.debug("[LocalStorage] SET error: ", s);
|
|
1906
1928
|
}
|
|
1907
|
-
}, me = "builderVisitorId",
|
|
1929
|
+
}, me = "builderVisitorId", dn = ({ canTrack: e }) => {
|
|
1908
1930
|
if (!e)
|
|
1909
1931
|
return;
|
|
1910
|
-
const
|
|
1932
|
+
const t = ln({
|
|
1911
1933
|
key: me,
|
|
1912
1934
|
canTrack: e
|
|
1913
1935
|
});
|
|
1914
|
-
if (
|
|
1915
|
-
return
|
|
1936
|
+
if (x(t))
|
|
1937
|
+
return t;
|
|
1916
1938
|
{
|
|
1917
|
-
const
|
|
1918
|
-
return
|
|
1939
|
+
const n = un();
|
|
1940
|
+
return pn({ id: n, canTrack: e }), n;
|
|
1919
1941
|
}
|
|
1920
|
-
},
|
|
1942
|
+
}, un = () => de(), pn = ({
|
|
1921
1943
|
id: e,
|
|
1922
|
-
canTrack:
|
|
1923
|
-
}) =>
|
|
1944
|
+
canTrack: t
|
|
1945
|
+
}) => cn({
|
|
1924
1946
|
key: me,
|
|
1925
1947
|
value: e,
|
|
1926
|
-
canTrack:
|
|
1927
|
-
}),
|
|
1928
|
-
if (
|
|
1948
|
+
canTrack: t
|
|
1949
|
+
}), mn = () => {
|
|
1950
|
+
if (m()) {
|
|
1929
1951
|
const e = new URL(location.href);
|
|
1930
1952
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
1931
1953
|
} else
|
|
1932
1954
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
1933
|
-
},
|
|
1934
|
-
const e =
|
|
1955
|
+
}, hn = () => typeof navigator == "object" && navigator.userAgent || "", fn = () => {
|
|
1956
|
+
const e = hn(), t = {
|
|
1935
1957
|
Android() {
|
|
1936
1958
|
return e.match(/Android/i);
|
|
1937
1959
|
},
|
|
@@ -1948,84 +1970,84 @@ const de = "builderSessionId", nn = async ({
|
|
|
1948
1970
|
return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
|
|
1949
1971
|
},
|
|
1950
1972
|
any() {
|
|
1951
|
-
return
|
|
1973
|
+
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || _ === "reactNative";
|
|
1952
1974
|
}
|
|
1953
|
-
},
|
|
1975
|
+
}, n = e.match(/Tablet|iPad/i), o = mn();
|
|
1954
1976
|
return {
|
|
1955
1977
|
urlPath: o == null ? void 0 : o.pathname,
|
|
1956
1978
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
1957
|
-
device:
|
|
1979
|
+
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
1958
1980
|
};
|
|
1959
|
-
},
|
|
1981
|
+
}, gn = async ({
|
|
1960
1982
|
canTrack: e
|
|
1961
1983
|
}) => {
|
|
1962
1984
|
if (!e)
|
|
1963
1985
|
return { visitorId: void 0, sessionId: void 0 };
|
|
1964
|
-
const
|
|
1986
|
+
const t = await sn({ canTrack: e }), n = dn({ canTrack: e });
|
|
1965
1987
|
return {
|
|
1966
|
-
sessionId:
|
|
1967
|
-
visitorId:
|
|
1988
|
+
sessionId: t,
|
|
1989
|
+
visitorId: n
|
|
1968
1990
|
};
|
|
1969
|
-
},
|
|
1991
|
+
}, bn = async ({
|
|
1970
1992
|
type: e,
|
|
1971
|
-
canTrack:
|
|
1972
|
-
apiKey:
|
|
1993
|
+
canTrack: t,
|
|
1994
|
+
apiKey: n,
|
|
1973
1995
|
metadata: o,
|
|
1974
|
-
...
|
|
1996
|
+
...s
|
|
1975
1997
|
}) => ({
|
|
1976
1998
|
type: e,
|
|
1977
1999
|
data: {
|
|
1978
|
-
...
|
|
2000
|
+
...s,
|
|
1979
2001
|
metadata: {
|
|
1980
2002
|
url: location.href,
|
|
1981
2003
|
...o
|
|
1982
2004
|
},
|
|
1983
|
-
...await
|
|
1984
|
-
userAttributes:
|
|
1985
|
-
ownerId:
|
|
2005
|
+
...await gn({ canTrack: t }),
|
|
2006
|
+
userAttributes: fn(),
|
|
2007
|
+
ownerId: n
|
|
1986
2008
|
}
|
|
1987
2009
|
});
|
|
1988
2010
|
async function M(e) {
|
|
1989
2011
|
if (!e.apiKey) {
|
|
1990
|
-
|
|
2012
|
+
C.error(
|
|
1991
2013
|
"Missing API key for track call. Please provide your API key."
|
|
1992
2014
|
);
|
|
1993
2015
|
return;
|
|
1994
2016
|
}
|
|
1995
|
-
if (!!e.canTrack && !
|
|
2017
|
+
if (!!e.canTrack && !k() && !!(m() || _ === "reactNative"))
|
|
1996
2018
|
return fetch("https://builder.io/api/v1/track", {
|
|
1997
2019
|
method: "POST",
|
|
1998
2020
|
body: JSON.stringify({
|
|
1999
|
-
events: [await
|
|
2021
|
+
events: [await bn(e)]
|
|
2000
2022
|
}),
|
|
2001
2023
|
headers: {
|
|
2002
2024
|
"content-type": "application/json"
|
|
2003
2025
|
},
|
|
2004
2026
|
mode: "cors"
|
|
2005
|
-
}).catch((
|
|
2006
|
-
console.error("Failed to track: ",
|
|
2027
|
+
}).catch((t) => {
|
|
2028
|
+
console.error("Failed to track: ", t);
|
|
2007
2029
|
});
|
|
2008
2030
|
}
|
|
2009
|
-
const
|
|
2010
|
-
function
|
|
2011
|
-
let
|
|
2012
|
-
if (
|
|
2031
|
+
const Fn = (e) => M({ ...e, canTrack: !0 }), yn = "0.3.1", J = {};
|
|
2032
|
+
function vn(e, t) {
|
|
2033
|
+
let n = J[e];
|
|
2034
|
+
if (n || (n = J[e] = []), n.push(t), m()) {
|
|
2013
2035
|
const o = {
|
|
2014
2036
|
type: "builder.register",
|
|
2015
2037
|
data: {
|
|
2016
2038
|
type: e,
|
|
2017
|
-
info:
|
|
2039
|
+
info: t
|
|
2018
2040
|
}
|
|
2019
2041
|
};
|
|
2020
2042
|
try {
|
|
2021
2043
|
parent.postMessage(o, "*"), parent !== window && window.postMessage(o, "*");
|
|
2022
|
-
} catch (
|
|
2023
|
-
console.debug("Could not postmessage",
|
|
2044
|
+
} catch (s) {
|
|
2045
|
+
console.debug("Could not postmessage", s);
|
|
2024
2046
|
}
|
|
2025
2047
|
}
|
|
2026
2048
|
}
|
|
2027
|
-
const
|
|
2028
|
-
|
|
2049
|
+
const kn = () => {
|
|
2050
|
+
vn("insertMenu", {
|
|
2029
2051
|
name: "_default",
|
|
2030
2052
|
default: !0,
|
|
2031
2053
|
items: [
|
|
@@ -2040,21 +2062,22 @@ const bn = () => {
|
|
|
2040
2062
|
]
|
|
2041
2063
|
});
|
|
2042
2064
|
};
|
|
2043
|
-
let
|
|
2044
|
-
const
|
|
2045
|
-
var
|
|
2046
|
-
|
|
2065
|
+
let X = !1;
|
|
2066
|
+
const Sn = (e = {}) => {
|
|
2067
|
+
var t, n;
|
|
2068
|
+
X || (X = !0, m() && ((t = window.parent) == null || t.postMessage(
|
|
2047
2069
|
{
|
|
2048
2070
|
type: "builder.sdkInfo",
|
|
2049
2071
|
data: {
|
|
2050
|
-
target:
|
|
2072
|
+
target: _,
|
|
2073
|
+
version: yn,
|
|
2051
2074
|
supportsPatchUpdates: !1,
|
|
2052
2075
|
supportsAddBlockScoping: !0,
|
|
2053
2076
|
supportsCustomBreakpoints: !0
|
|
2054
2077
|
}
|
|
2055
2078
|
},
|
|
2056
2079
|
"*"
|
|
2057
|
-
), (
|
|
2080
|
+
), (n = window.parent) == null || n.postMessage(
|
|
2058
2081
|
{
|
|
2059
2082
|
type: "builder.updateContent",
|
|
2060
2083
|
data: {
|
|
@@ -2063,29 +2086,29 @@ const yn = (e = {}) => {
|
|
|
2063
2086
|
},
|
|
2064
2087
|
"*"
|
|
2065
2088
|
), window.addEventListener("message", ({ data: o }) => {
|
|
2066
|
-
var
|
|
2089
|
+
var s, r;
|
|
2067
2090
|
if (!!(o != null && o.type))
|
|
2068
2091
|
switch (o.type) {
|
|
2069
2092
|
case "builder.evaluate": {
|
|
2070
|
-
const
|
|
2071
|
-
let u,
|
|
2093
|
+
const i = o.data.text, l = o.data.arguments || [], a = o.data.id, c = new Function(i);
|
|
2094
|
+
let u, b = null;
|
|
2072
2095
|
try {
|
|
2073
|
-
u =
|
|
2074
|
-
} catch (
|
|
2075
|
-
|
|
2096
|
+
u = c.apply(null, l);
|
|
2097
|
+
} catch (g) {
|
|
2098
|
+
b = g;
|
|
2076
2099
|
}
|
|
2077
|
-
|
|
2100
|
+
b ? (s = window.parent) == null || s.postMessage(
|
|
2078
2101
|
{
|
|
2079
2102
|
type: "builder.evaluateError",
|
|
2080
|
-
data: { id: a, error:
|
|
2103
|
+
data: { id: a, error: b.message }
|
|
2081
2104
|
},
|
|
2082
2105
|
"*"
|
|
2083
|
-
) : u && typeof u.then == "function" ? u.then((
|
|
2084
|
-
var
|
|
2085
|
-
(
|
|
2106
|
+
) : u && typeof u.then == "function" ? u.then((g) => {
|
|
2107
|
+
var y;
|
|
2108
|
+
(y = window.parent) == null || y.postMessage(
|
|
2086
2109
|
{
|
|
2087
2110
|
type: "builder.evaluateResult",
|
|
2088
|
-
data: { id: a, result:
|
|
2111
|
+
data: { id: a, result: g }
|
|
2089
2112
|
},
|
|
2090
2113
|
"*"
|
|
2091
2114
|
);
|
|
@@ -2101,84 +2124,84 @@ const yn = (e = {}) => {
|
|
|
2101
2124
|
}
|
|
2102
2125
|
})));
|
|
2103
2126
|
};
|
|
2104
|
-
function
|
|
2127
|
+
function Y(e) {
|
|
2105
2128
|
return Math.round(e * 1e3) / 1e3;
|
|
2106
2129
|
}
|
|
2107
|
-
const
|
|
2130
|
+
const wn = (e, t, n = !0) => {
|
|
2108
2131
|
if (!(e instanceof HTMLElement))
|
|
2109
2132
|
return null;
|
|
2110
|
-
let o =
|
|
2133
|
+
let o = n ? e : e.parentElement;
|
|
2111
2134
|
do {
|
|
2112
2135
|
if (!o)
|
|
2113
2136
|
return null;
|
|
2114
|
-
if (
|
|
2137
|
+
if (t(o))
|
|
2115
2138
|
return o;
|
|
2116
2139
|
} while (o = o.parentElement);
|
|
2117
2140
|
return null;
|
|
2118
|
-
},
|
|
2119
|
-
const
|
|
2120
|
-
return Boolean((
|
|
2121
|
-
}),
|
|
2141
|
+
}, Cn = (e) => wn(e, (t) => {
|
|
2142
|
+
const n = t.getAttribute("builder-id") || t.id;
|
|
2143
|
+
return Boolean((n == null ? void 0 : n.indexOf("builder-")) === 0);
|
|
2144
|
+
}), Q = ({
|
|
2122
2145
|
event: e,
|
|
2123
|
-
target:
|
|
2146
|
+
target: t
|
|
2124
2147
|
}) => {
|
|
2125
|
-
const
|
|
2148
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, s = e.clientY - n.top, r = Y(o / n.width), i = Y(s / n.height);
|
|
2126
2149
|
return {
|
|
2127
2150
|
x: r,
|
|
2128
|
-
y:
|
|
2151
|
+
y: i
|
|
2129
2152
|
};
|
|
2130
|
-
},
|
|
2131
|
-
const
|
|
2153
|
+
}, In = (e) => {
|
|
2154
|
+
const t = e.target, n = t && Cn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2132
2155
|
return {
|
|
2133
2156
|
targetBuilderElement: o || void 0,
|
|
2134
2157
|
metadata: {
|
|
2135
|
-
targetOffset:
|
|
2136
|
-
builderTargetOffset:
|
|
2137
|
-
builderElementIndex:
|
|
2158
|
+
targetOffset: t ? Q({ event: e, target: t }) : void 0,
|
|
2159
|
+
builderTargetOffset: n ? Q({ event: e, target: n }) : void 0,
|
|
2160
|
+
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2138
2161
|
}
|
|
2139
2162
|
};
|
|
2140
|
-
},
|
|
2163
|
+
}, xn = ({
|
|
2141
2164
|
content: e,
|
|
2142
|
-
data:
|
|
2143
|
-
locale:
|
|
2165
|
+
data: t,
|
|
2166
|
+
locale: n
|
|
2144
2167
|
}) => {
|
|
2145
|
-
var r,
|
|
2168
|
+
var r, i, l;
|
|
2146
2169
|
const o = {};
|
|
2147
|
-
(
|
|
2148
|
-
var
|
|
2149
|
-
a.name && a.defaultValue !== void 0 && ((
|
|
2170
|
+
(i = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || i.forEach((a) => {
|
|
2171
|
+
var c;
|
|
2172
|
+
a.name && a.defaultValue !== void 0 && ((c = e == null ? void 0 : e.data) == null ? void 0 : c.state) && e.data.state[a.name] === void 0 && (o[a.name] = a.defaultValue);
|
|
2150
2173
|
});
|
|
2151
|
-
const
|
|
2152
|
-
...(
|
|
2153
|
-
...
|
|
2154
|
-
...
|
|
2174
|
+
const s = {
|
|
2175
|
+
...(l = e == null ? void 0 : e.data) == null ? void 0 : l.state,
|
|
2176
|
+
...t,
|
|
2177
|
+
...n ? { locale: n } : {}
|
|
2155
2178
|
};
|
|
2156
|
-
return { ...o, ...
|
|
2157
|
-
},
|
|
2179
|
+
return { ...o, ...s };
|
|
2180
|
+
}, $n = ({
|
|
2158
2181
|
content: e,
|
|
2159
|
-
data:
|
|
2182
|
+
data: t
|
|
2160
2183
|
}) => e ? {
|
|
2161
2184
|
...e,
|
|
2162
2185
|
data: {
|
|
2163
2186
|
...e == null ? void 0 : e.data,
|
|
2164
|
-
...
|
|
2187
|
+
...t
|
|
2165
2188
|
},
|
|
2166
2189
|
meta: e == null ? void 0 : e.meta
|
|
2167
|
-
} : void 0,
|
|
2190
|
+
} : void 0, Tn = () => Promise.resolve().then(() => ne).then((e) => e.default).catch((e) => {
|
|
2168
2191
|
throw console.error(
|
|
2169
2192
|
"Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",
|
|
2170
2193
|
e
|
|
2171
2194
|
), e;
|
|
2172
|
-
}),
|
|
2195
|
+
}), Rn = () => import("./render-styles.f8cb298d.js").then((e) => e.default).catch((e) => {
|
|
2173
2196
|
throw console.error(
|
|
2174
2197
|
"Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",
|
|
2175
2198
|
e
|
|
2176
2199
|
), e;
|
|
2177
|
-
}),
|
|
2200
|
+
}), En = h({
|
|
2178
2201
|
name: "render-content",
|
|
2179
2202
|
components: {
|
|
2180
|
-
RenderContentStyles:
|
|
2181
|
-
RenderBlocks:
|
|
2203
|
+
RenderContentStyles: S(Rn),
|
|
2204
|
+
RenderBlocks: S(Tn)
|
|
2182
2205
|
},
|
|
2183
2206
|
props: [
|
|
2184
2207
|
"content",
|
|
@@ -2196,31 +2219,31 @@ const vn = (e, n, t = !0) => {
|
|
|
2196
2219
|
return {
|
|
2197
2220
|
forceReRenderCount: 0,
|
|
2198
2221
|
overrideContent: null,
|
|
2199
|
-
useContent:
|
|
2222
|
+
useContent: $n({
|
|
2200
2223
|
content: this.content,
|
|
2201
2224
|
data: this.data
|
|
2202
2225
|
}),
|
|
2203
2226
|
update: 0,
|
|
2204
|
-
canTrackToUse:
|
|
2205
|
-
contentState:
|
|
2227
|
+
canTrackToUse: x(this.canTrack) ? this.canTrack : !0,
|
|
2228
|
+
contentState: xn({
|
|
2206
2229
|
content: this.content,
|
|
2207
2230
|
data: this.data,
|
|
2208
2231
|
locale: this.locale
|
|
2209
2232
|
}),
|
|
2210
2233
|
allRegisteredComponents: [
|
|
2211
|
-
...
|
|
2234
|
+
...Yt(),
|
|
2212
2235
|
...ce,
|
|
2213
2236
|
...this.customComponents || []
|
|
2214
2237
|
].reduce(
|
|
2215
|
-
(e,
|
|
2238
|
+
(e, t) => ({
|
|
2216
2239
|
...e,
|
|
2217
|
-
[
|
|
2240
|
+
[t.name]: t
|
|
2218
2241
|
}),
|
|
2219
2242
|
{}
|
|
2220
2243
|
),
|
|
2221
2244
|
httpReqsData: {},
|
|
2222
2245
|
clicked: !1,
|
|
2223
|
-
TARGET:
|
|
2246
|
+
TARGET: _
|
|
2224
2247
|
};
|
|
2225
2248
|
},
|
|
2226
2249
|
provide() {
|
|
@@ -2228,21 +2251,23 @@ const vn = (e, n, t = !0) => {
|
|
|
2228
2251
|
return {
|
|
2229
2252
|
[P.key]: {
|
|
2230
2253
|
content: e.useContent,
|
|
2231
|
-
|
|
2232
|
-
|
|
2254
|
+
localState: void 0,
|
|
2255
|
+
rootState: e.contentState,
|
|
2256
|
+
rootSetState: e.contentSetState,
|
|
2233
2257
|
context: e.context || {},
|
|
2234
2258
|
apiKey: e.apiKey,
|
|
2235
2259
|
apiVersion: e.apiVersion,
|
|
2236
|
-
registeredComponents: e.allRegisteredComponents
|
|
2260
|
+
registeredComponents: e.allRegisteredComponents,
|
|
2261
|
+
inheritedStyles: {}
|
|
2237
2262
|
}
|
|
2238
2263
|
};
|
|
2239
2264
|
},
|
|
2240
2265
|
mounted() {
|
|
2241
|
-
var e,
|
|
2242
|
-
if (this.apiKey ||
|
|
2266
|
+
var e, t;
|
|
2267
|
+
if (this.apiKey || C.error(
|
|
2243
2268
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2244
|
-
),
|
|
2245
|
-
if (
|
|
2269
|
+
), m()) {
|
|
2270
|
+
if (k() && (this.forceReRenderCount = this.forceReRenderCount + 1, kn(), Sn({
|
|
2246
2271
|
...this.locale ? {
|
|
2247
2272
|
locale: this.locale
|
|
2248
2273
|
} : {},
|
|
@@ -2251,33 +2276,33 @@ const vn = (e, n, t = !0) => {
|
|
|
2251
2276
|
} : {}
|
|
2252
2277
|
}), Object.values(
|
|
2253
2278
|
this.allRegisteredComponents
|
|
2254
|
-
).forEach((
|
|
2255
|
-
var
|
|
2256
|
-
const o =
|
|
2257
|
-
(
|
|
2279
|
+
).forEach((n) => {
|
|
2280
|
+
var s;
|
|
2281
|
+
const o = en(n);
|
|
2282
|
+
(s = window.parent) == null || s.postMessage(o, "*");
|
|
2258
2283
|
}), window.addEventListener("message", this.processMessage), window.addEventListener(
|
|
2259
2284
|
"builder:component:stateChangeListenerActivated",
|
|
2260
2285
|
this.emitStateUpdate
|
|
2261
2286
|
)), this.useContent) {
|
|
2262
|
-
const
|
|
2287
|
+
const n = (e = this.useContent) == null ? void 0 : e.testVariationId, o = (t = this.useContent) == null ? void 0 : t.id;
|
|
2263
2288
|
M({
|
|
2264
2289
|
type: "impression",
|
|
2265
2290
|
canTrack: this.canTrackToUse,
|
|
2266
2291
|
contentId: o,
|
|
2267
2292
|
apiKey: this.apiKey,
|
|
2268
|
-
variationId:
|
|
2293
|
+
variationId: n !== o ? n : void 0
|
|
2269
2294
|
});
|
|
2270
2295
|
}
|
|
2271
|
-
if (
|
|
2272
|
-
const
|
|
2296
|
+
if (Zt()) {
|
|
2297
|
+
const n = new URL(location.href).searchParams, o = n.get("builder.preview"), s = n.get(
|
|
2273
2298
|
`builder.preview.${o}`
|
|
2274
|
-
), r =
|
|
2275
|
-
o === this.model && r === this.apiKey && (!this.content ||
|
|
2299
|
+
), r = n.get("apiKey") || n.get("builder.space");
|
|
2300
|
+
o === this.model && r === this.apiKey && (!this.content || s === this.content.id) && le({
|
|
2276
2301
|
model: this.model,
|
|
2277
2302
|
apiKey: this.apiKey,
|
|
2278
2303
|
apiVersion: this.apiVersion
|
|
2279
|
-
}).then((
|
|
2280
|
-
|
|
2304
|
+
}).then((i) => {
|
|
2305
|
+
i && this.mergeNewContent(i);
|
|
2281
2306
|
});
|
|
2282
2307
|
}
|
|
2283
2308
|
this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
|
|
@@ -2310,7 +2335,7 @@ const vn = (e, n, t = !0) => {
|
|
|
2310
2335
|
}
|
|
2311
2336
|
},
|
|
2312
2337
|
unmounted() {
|
|
2313
|
-
|
|
2338
|
+
m() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
|
|
2314
2339
|
"builder:component:stateChangeListenerActivated",
|
|
2315
2340
|
this.emitStateUpdate
|
|
2316
2341
|
));
|
|
@@ -2322,16 +2347,16 @@ const vn = (e, n, t = !0) => {
|
|
|
2322
2347
|
};
|
|
2323
2348
|
},
|
|
2324
2349
|
onUpdateHook1() {
|
|
2325
|
-
var e,
|
|
2350
|
+
var e, t;
|
|
2326
2351
|
return {
|
|
2327
|
-
0: (
|
|
2352
|
+
0: (t = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : t.jsCode,
|
|
2328
2353
|
1: this.contentState
|
|
2329
2354
|
};
|
|
2330
2355
|
},
|
|
2331
2356
|
onUpdateHook2() {
|
|
2332
|
-
var e,
|
|
2357
|
+
var e, t;
|
|
2333
2358
|
return {
|
|
2334
|
-
0: (
|
|
2359
|
+
0: (t = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : t.httpRequests
|
|
2335
2360
|
};
|
|
2336
2361
|
},
|
|
2337
2362
|
onUpdateHook3() {
|
|
@@ -2342,73 +2367,75 @@ const vn = (e, n, t = !0) => {
|
|
|
2342
2367
|
},
|
|
2343
2368
|
methods: {
|
|
2344
2369
|
mergeNewContent(e) {
|
|
2345
|
-
var
|
|
2370
|
+
var t, n, o, s, r;
|
|
2346
2371
|
this.useContent = {
|
|
2347
2372
|
...this.useContent,
|
|
2348
2373
|
...e,
|
|
2349
2374
|
data: {
|
|
2350
|
-
...(
|
|
2375
|
+
...(t = this.useContent) == null ? void 0 : t.data,
|
|
2351
2376
|
...e == null ? void 0 : e.data
|
|
2352
2377
|
},
|
|
2353
2378
|
meta: {
|
|
2354
|
-
...(
|
|
2379
|
+
...(n = this.useContent) == null ? void 0 : n.meta,
|
|
2355
2380
|
...e == null ? void 0 : e.meta,
|
|
2356
|
-
breakpoints: ((o = e == null ? void 0 : e.meta) == null ? void 0 : o.breakpoints) || ((r = (
|
|
2381
|
+
breakpoints: ((o = e == null ? void 0 : e.meta) == null ? void 0 : o.breakpoints) || ((r = (s = this.useContent) == null ? void 0 : s.meta) == null ? void 0 : r.breakpoints)
|
|
2357
2382
|
}
|
|
2358
2383
|
};
|
|
2359
2384
|
},
|
|
2360
2385
|
setBreakpoints(e) {
|
|
2361
|
-
var
|
|
2386
|
+
var t;
|
|
2362
2387
|
this.useContent = {
|
|
2363
2388
|
...this.useContent,
|
|
2364
2389
|
meta: {
|
|
2365
|
-
...(
|
|
2390
|
+
...(t = this.useContent) == null ? void 0 : t.meta,
|
|
2366
2391
|
breakpoints: e
|
|
2367
2392
|
}
|
|
2368
2393
|
};
|
|
2369
2394
|
},
|
|
2370
|
-
|
|
2395
|
+
contentSetState(e) {
|
|
2371
2396
|
this.contentState = e;
|
|
2372
2397
|
},
|
|
2373
2398
|
processMessage(e) {
|
|
2374
|
-
var
|
|
2375
|
-
const { data:
|
|
2376
|
-
if (
|
|
2377
|
-
switch (
|
|
2399
|
+
var n;
|
|
2400
|
+
const { data: t } = e;
|
|
2401
|
+
if (t)
|
|
2402
|
+
switch (t.type) {
|
|
2378
2403
|
case "builder.configureSdk": {
|
|
2379
|
-
const o =
|
|
2380
|
-
if (!r || r !== ((
|
|
2404
|
+
const o = t.data, { breakpoints: s, contentId: r } = o;
|
|
2405
|
+
if (!r || r !== ((n = this.useContent) == null ? void 0 : n.id))
|
|
2381
2406
|
return;
|
|
2382
|
-
|
|
2407
|
+
s && this.setBreakpoints(s), this.forceReRenderCount = this.forceReRenderCount + 1;
|
|
2383
2408
|
break;
|
|
2384
2409
|
}
|
|
2385
2410
|
case "builder.contentUpdate": {
|
|
2386
|
-
const o =
|
|
2387
|
-
|
|
2411
|
+
const o = t.data, s = o.key || o.alias || o.entry || o.modelName, r = o.data;
|
|
2412
|
+
s === this.model && (this.mergeNewContent(r), this.forceReRenderCount = this.forceReRenderCount + 1);
|
|
2388
2413
|
break;
|
|
2389
2414
|
}
|
|
2390
2415
|
}
|
|
2391
2416
|
},
|
|
2392
2417
|
evaluateJsCode() {
|
|
2393
|
-
var
|
|
2394
|
-
const e = (
|
|
2395
|
-
e &&
|
|
2418
|
+
var t, n;
|
|
2419
|
+
const e = (n = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : n.jsCode;
|
|
2420
|
+
e && G({
|
|
2396
2421
|
code: e,
|
|
2397
2422
|
context: this.context || {},
|
|
2398
|
-
|
|
2423
|
+
localState: void 0,
|
|
2424
|
+
rootState: this.contentState,
|
|
2425
|
+
rootSetState: this.contentSetState
|
|
2399
2426
|
});
|
|
2400
2427
|
},
|
|
2401
2428
|
onClick(e) {
|
|
2402
|
-
var
|
|
2429
|
+
var t, n;
|
|
2403
2430
|
if (this.useContent) {
|
|
2404
|
-
const o = (
|
|
2431
|
+
const o = (t = this.useContent) == null ? void 0 : t.testVariationId, s = (n = this.useContent) == null ? void 0 : n.id;
|
|
2405
2432
|
M({
|
|
2406
2433
|
type: "click",
|
|
2407
2434
|
canTrack: this.canTrackToUse,
|
|
2408
|
-
contentId:
|
|
2435
|
+
contentId: s,
|
|
2409
2436
|
apiKey: this.apiKey,
|
|
2410
|
-
variationId: o !==
|
|
2411
|
-
...
|
|
2437
|
+
variationId: o !== s ? o : void 0,
|
|
2438
|
+
...In(e),
|
|
2412
2439
|
unique: !this.clicked
|
|
2413
2440
|
});
|
|
2414
2441
|
}
|
|
@@ -2417,39 +2444,41 @@ const vn = (e, n, t = !0) => {
|
|
|
2417
2444
|
evalExpression(e) {
|
|
2418
2445
|
return e.replace(
|
|
2419
2446
|
/{{([^}]+)}}/g,
|
|
2420
|
-
(
|
|
2421
|
-
code:
|
|
2447
|
+
(t, n) => G({
|
|
2448
|
+
code: n,
|
|
2422
2449
|
context: this.context || {},
|
|
2423
|
-
|
|
2450
|
+
localState: void 0,
|
|
2451
|
+
rootState: this.contentState,
|
|
2452
|
+
rootSetState: this.contentSetState
|
|
2424
2453
|
})
|
|
2425
2454
|
);
|
|
2426
2455
|
},
|
|
2427
|
-
handleRequest({ url: e, key:
|
|
2428
|
-
|
|
2456
|
+
handleRequest({ url: e, key: t }) {
|
|
2457
|
+
oe(e).then((n) => n.json()).then((n) => {
|
|
2429
2458
|
const o = {
|
|
2430
2459
|
...this.contentState,
|
|
2431
|
-
[
|
|
2460
|
+
[t]: n
|
|
2432
2461
|
};
|
|
2433
|
-
this.
|
|
2434
|
-
}).catch((
|
|
2435
|
-
console.error("error fetching dynamic data", e,
|
|
2462
|
+
this.contentSetState(o);
|
|
2463
|
+
}).catch((n) => {
|
|
2464
|
+
console.error("error fetching dynamic data", e, n);
|
|
2436
2465
|
});
|
|
2437
2466
|
},
|
|
2438
2467
|
runHttpRequests() {
|
|
2439
|
-
var
|
|
2440
|
-
const e = (o = (
|
|
2441
|
-
Object.entries(e).forEach(([
|
|
2442
|
-
if (r && (!this.httpReqsData[
|
|
2443
|
-
const
|
|
2468
|
+
var t, n, o;
|
|
2469
|
+
const e = (o = (n = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : n.httpRequests) != null ? o : {};
|
|
2470
|
+
Object.entries(e).forEach(([s, r]) => {
|
|
2471
|
+
if (r && (!this.httpReqsData[s] || k())) {
|
|
2472
|
+
const i = this.evalExpression(r);
|
|
2444
2473
|
this.handleRequest({
|
|
2445
|
-
url:
|
|
2446
|
-
key:
|
|
2474
|
+
url: i,
|
|
2475
|
+
key: s
|
|
2447
2476
|
});
|
|
2448
2477
|
}
|
|
2449
2478
|
});
|
|
2450
2479
|
},
|
|
2451
2480
|
emitStateUpdate() {
|
|
2452
|
-
|
|
2481
|
+
k() && window.dispatchEvent(
|
|
2453
2482
|
new CustomEvent(
|
|
2454
2483
|
"builder:component:stateChange",
|
|
2455
2484
|
{
|
|
@@ -2464,74 +2493,74 @@ const vn = (e, n, t = !0) => {
|
|
|
2464
2493
|
);
|
|
2465
2494
|
}
|
|
2466
2495
|
}
|
|
2467
|
-
},
|
|
2468
|
-
function
|
|
2469
|
-
var a,
|
|
2470
|
-
const
|
|
2471
|
-
return
|
|
2496
|
+
}), _n = ["builder-content-id", "builder-model"];
|
|
2497
|
+
function An(e, t, n, o, s, r) {
|
|
2498
|
+
var a, c, u, b, g, y, $, N;
|
|
2499
|
+
const i = w("render-content-styles"), l = w("render-blocks");
|
|
2500
|
+
return e.useContent ? (d(), p("div", {
|
|
2472
2501
|
key: 0,
|
|
2473
2502
|
ref: "elementRef",
|
|
2474
|
-
onClick:
|
|
2475
|
-
"builder-content-id": (a =
|
|
2476
|
-
"builder-model":
|
|
2503
|
+
onClick: t[0] || (t[0] = (he) => e.onClick(he)),
|
|
2504
|
+
"builder-content-id": (a = e.useContent) == null ? void 0 : a.id,
|
|
2505
|
+
"builder-model": e.model
|
|
2477
2506
|
}, [
|
|
2478
|
-
|
|
2507
|
+
e.TARGET !== "reactNative" ? (d(), E(i, {
|
|
2479
2508
|
key: 0,
|
|
2480
|
-
contentId: (
|
|
2481
|
-
cssCode: (
|
|
2482
|
-
customFonts: (
|
|
2483
|
-
}, null, 8, ["contentId", "cssCode", "customFonts"])) :
|
|
2484
|
-
(d(),
|
|
2485
|
-
blocks: (N = (
|
|
2486
|
-
key:
|
|
2509
|
+
contentId: (c = e.useContent) == null ? void 0 : c.id,
|
|
2510
|
+
cssCode: (b = (u = e.useContent) == null ? void 0 : u.data) == null ? void 0 : b.cssCode,
|
|
2511
|
+
customFonts: (y = (g = e.useContent) == null ? void 0 : g.data) == null ? void 0 : y.customFonts
|
|
2512
|
+
}, null, 8, ["contentId", "cssCode", "customFonts"])) : v("", !0),
|
|
2513
|
+
(d(), E(l, {
|
|
2514
|
+
blocks: (N = ($ = e.useContent) == null ? void 0 : $.data) == null ? void 0 : N.blocks,
|
|
2515
|
+
key: e.forceReRenderCount
|
|
2487
2516
|
}, null, 8, ["blocks"]))
|
|
2488
|
-
], 8,
|
|
2517
|
+
], 8, _n)) : v("", !0);
|
|
2489
2518
|
}
|
|
2490
|
-
const
|
|
2519
|
+
const jn = /* @__PURE__ */ f(En, [["render", An]]), Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2491
2520
|
__proto__: null,
|
|
2492
|
-
default:
|
|
2493
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2494
|
-
function
|
|
2495
|
-
if (
|
|
2496
|
-
Object.assign(
|
|
2497
|
-
const
|
|
2521
|
+
default: jn
|
|
2522
|
+
}, Symbol.toStringTag, { value: "Module" })), Z = {};
|
|
2523
|
+
function Un(e) {
|
|
2524
|
+
if (m()) {
|
|
2525
|
+
Object.assign(Z, e);
|
|
2526
|
+
const t = {
|
|
2498
2527
|
type: "builder.settingsChange",
|
|
2499
|
-
data:
|
|
2528
|
+
data: Z
|
|
2500
2529
|
};
|
|
2501
|
-
parent.postMessage(
|
|
2530
|
+
parent.postMessage(t, "*");
|
|
2502
2531
|
}
|
|
2503
2532
|
}
|
|
2504
2533
|
export {
|
|
2505
2534
|
P as B,
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2535
|
+
xe as C,
|
|
2536
|
+
Re as F,
|
|
2537
|
+
Be as I,
|
|
2538
|
+
Ye as S,
|
|
2539
|
+
_ as T,
|
|
2540
|
+
Vt as V,
|
|
2541
|
+
f as _,
|
|
2542
|
+
On as a,
|
|
2543
|
+
ye as b,
|
|
2544
|
+
x as c,
|
|
2545
|
+
jn as d,
|
|
2546
|
+
G as e,
|
|
2518
2547
|
L as f,
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2548
|
+
ve as g,
|
|
2549
|
+
Ct as h,
|
|
2550
|
+
Rt as i,
|
|
2551
|
+
k as j,
|
|
2552
|
+
Zt as k,
|
|
2524
2553
|
ce as l,
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2554
|
+
Bn as m,
|
|
2555
|
+
en as n,
|
|
2556
|
+
vn as o,
|
|
2557
|
+
le as p,
|
|
2558
|
+
yt as q,
|
|
2559
|
+
He as r,
|
|
2560
|
+
Un as s,
|
|
2561
|
+
Fn as t,
|
|
2533
2562
|
mt as u,
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2563
|
+
ht as v,
|
|
2564
|
+
ft as w,
|
|
2565
|
+
ae as x
|
|
2537
2566
|
};
|