@builder.io/sdk-vue 0.7.6 → 0.8.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 +8 -7
- package/vue2/lib/{edge/block-1f2d2db7.cjs → browser/block-a0c2b259.cjs} +2 -2
- package/vue2/lib/{node/block-bbaf1d04.js → browser/block-f1233138.js} +10 -9
- package/vue2/lib/browser/block-styles-33d86077.cjs +1 -0
- package/vue2/lib/browser/{block-styles-fd9354cd.js → block-styles-ebf9b1a6.js} +8 -7
- package/vue2/lib/{edge/block-wrapper-e5b88192.js → browser/block-wrapper-57736e55.js} +8 -7
- package/vue2/lib/browser/block-wrapper-899031dc.cjs +1 -0
- package/vue2/lib/browser/blocks-wrapper-542bca6e.cjs +1 -0
- package/vue2/lib/{edge/blocks-wrapper-6746e3cd.js → browser/blocks-wrapper-a93bf471.js} +4 -3
- package/vue2/lib/{edge/component-ref-c33bfd71.js → browser/component-ref-8822545e.js} +9 -8
- package/vue2/lib/browser/component-ref-de2bce5c.cjs +1 -0
- package/vue2/lib/browser/constants/sdk-version.d.ts +1 -1
- package/vue2/lib/browser/content-3cada794.cjs +1 -0
- package/vue2/lib/{edge/content-2ea81381.js → browser/content-bd41cd51.js} +8 -7
- package/vue2/lib/browser/{css-5f8e03e7.js → css-445df887.js} +4 -3
- package/vue2/lib/browser/css-535c5d1c.cjs +6 -0
- package/vue2/lib/browser/enable-editor-4491b5dd.cjs +1 -0
- package/vue2/lib/{node/enable-editor-359d31d1.js → browser/enable-editor-9486d0af.js} +6 -5
- package/vue2/lib/browser/evaluate-a8ca82e7.cjs +1 -0
- package/vue2/lib/browser/{evaluate-04a2bd86.js → evaluate-b3a4e37f.js} +4 -3
- package/vue2/lib/browser/get-block-actions-3bd34049.cjs +1 -0
- package/vue2/lib/{node/get-block-actions-c8c3330b.js → browser/get-block-actions-e5886236.js} +5 -4
- package/vue2/lib/{edge/get-block-properties-721b933d.js → browser/get-block-properties-4030d3b5.js} +11 -10
- package/vue2/lib/browser/get-block-properties-d090641d.cjs +1 -0
- package/vue2/lib/browser/get-processed-block-14ea8201.cjs +1 -0
- package/vue2/lib/browser/{get-processed-block-1ddb5e78.js → get-processed-block-497309fc.js} +17 -16
- package/vue2/lib/{edge/index-1d97f3d7.cjs → browser/index-c5b74b20.cjs} +3 -3
- package/vue2/lib/{node/index-3fcbe332.js → browser/index-f3618847.js} +48 -47
- package/vue2/lib/browser/index.cjs +1 -1
- package/vue2/lib/browser/index.js +24 -23
- package/vue2/lib/browser/inlined-script-3dc8b278.cjs +1 -0
- package/vue2/lib/{edge/inlined-script-88ef6d76.js → browser/inlined-script-84f7b988.js} +7 -6
- package/vue2/lib/{node/inlined-styles-41df1b95.js → browser/inlined-styles-9918b05e.js} +5 -4
- package/vue2/lib/browser/inlined-styles-f1203db0.cjs +1 -0
- package/vue2/lib/{node/interactive-element-bbd449cb.js → browser/interactive-element-3720d577.js} +8 -7
- package/vue2/lib/browser/interactive-element-5656c996.cjs +1 -0
- package/vue2/lib/browser/repeated-block-37646894.cjs +1 -0
- package/vue2/lib/{node/repeated-block-82dffab6.js → browser/repeated-block-711036ce.js} +5 -4
- package/vue2/lib/{node/styles-b9c3f50e.cjs → browser/styles-18e2ee39.cjs} +2 -2
- package/vue2/lib/{edge/styles-fbe2ad34.js → browser/styles-e141b29e.js} +8 -7
- package/vue2/lib/edge/{block-88b23340.js → block-35ad0e3f.js} +10 -9
- package/vue2/lib/{browser/block-3acda1db.cjs → edge/block-65659a3f.cjs} +2 -2
- package/vue2/lib/edge/block-styles-236afaf6.cjs +1 -0
- package/vue2/lib/{node/block-styles-ae29f345.js → edge/block-styles-df04ce35.js} +8 -7
- package/vue2/lib/edge/block-wrapper-92227702.cjs +1 -0
- package/vue2/lib/{browser/block-wrapper-42a21f3a.js → edge/block-wrapper-ed85d5e5.js} +8 -7
- package/vue2/lib/{node/blocks-wrapper-1e6ad915.js → edge/blocks-wrapper-c1bdb5b4.js} +4 -3
- package/vue2/lib/edge/blocks-wrapper-ed1c3990.cjs +1 -0
- package/vue2/lib/{node/component-ref-205a7877.js → edge/component-ref-406288b4.js} +9 -8
- package/vue2/lib/edge/component-ref-6fe256db.cjs +1 -0
- package/vue2/lib/edge/constants/sdk-version.d.ts +1 -1
- package/vue2/lib/edge/content-78b300bf.cjs +1 -0
- package/vue2/lib/{browser/content-fea57461.js → edge/content-fbac6557.js} +8 -7
- package/vue2/lib/edge/{css-fdcffefa.js → css-11eef1df.js} +4 -3
- package/vue2/lib/edge/css-15965af3.cjs +6 -0
- package/vue2/lib/edge/enable-editor-d4895e04.cjs +1 -0
- package/vue2/lib/edge/{enable-editor-f32fd70b.js → enable-editor-f4bb4d8e.js} +6 -5
- package/vue2/lib/edge/{evaluate-907e638c.cjs → evaluate-0145ba88.cjs} +1 -1
- package/vue2/lib/edge/{evaluate-f1aeac53.js → evaluate-063c5f7a.js} +4 -3
- package/vue2/lib/edge/get-block-actions-7f885c3f.cjs +1 -0
- package/vue2/lib/edge/{get-block-actions-f7a64955.js → get-block-actions-89cffb9a.js} +5 -4
- package/vue2/lib/edge/get-block-properties-3f6858d3.cjs +1 -0
- package/vue2/lib/{node/get-block-properties-8711f880.js → edge/get-block-properties-aedb780e.js} +11 -10
- package/vue2/lib/edge/get-processed-block-adb656ef.cjs +1 -0
- package/vue2/lib/{node/get-processed-block-ee45c650.js → edge/get-processed-block-c0f0da5d.js} +16 -15
- package/vue2/lib/{node/index-bf858a42.cjs → edge/index-56af5fb4.cjs} +3 -3
- package/vue2/lib/{browser/index-efdcc0ee.js → edge/index-7870efd8.js} +48 -47
- package/vue2/lib/edge/index.cjs +1 -1
- package/vue2/lib/edge/index.js +24 -23
- package/vue2/lib/{node/inlined-script-24a8df2e.js → edge/inlined-script-a166a386.js} +7 -6
- package/vue2/lib/edge/inlined-script-a5b3779c.cjs +1 -0
- package/vue2/lib/edge/inlined-styles-029c0f2b.cjs +1 -0
- package/vue2/lib/edge/{inlined-styles-960710cc.js → inlined-styles-f7c080fd.js} +5 -4
- package/vue2/lib/edge/interactive-element-960a9e10.cjs +1 -0
- package/vue2/lib/{browser/interactive-element-eb83a760.js → edge/interactive-element-c889d9dc.js} +8 -7
- package/vue2/lib/{browser/repeated-block-b9f308bb.js → edge/repeated-block-07d2d25b.js} +5 -4
- package/vue2/lib/edge/repeated-block-0c2cb139.cjs +1 -0
- package/vue2/lib/{browser/styles-f398dedc.js → edge/styles-5c035753.js} +8 -7
- package/vue2/lib/edge/{styles-fccbcaef.cjs → styles-ed45e5cf.cjs} +2 -2
- package/vue2/lib/{browser/block-a6f87b59.js → node/block-7f67e05d.js} +10 -9
- package/vue2/lib/node/{block-250cdb0f.cjs → block-9f7dfe6d.cjs} +2 -2
- package/vue2/lib/{edge/block-styles-3ecae21c.js → node/block-styles-6d96e69c.js} +8 -7
- package/vue2/lib/node/block-styles-c993aa90.cjs +1 -0
- package/vue2/lib/node/block-wrapper-08f3c04a.cjs +1 -0
- package/vue2/lib/node/{block-wrapper-88b642c5.js → block-wrapper-4772c4ae.js} +8 -7
- package/vue2/lib/{browser/blocks-wrapper-ca4d46fe.js → node/blocks-wrapper-0a06ae61.js} +4 -3
- package/vue2/lib/node/blocks-wrapper-c8ab561d.cjs +1 -0
- package/vue2/lib/node/component-ref-19d8d4a8.cjs +1 -0
- package/vue2/lib/{browser/component-ref-1114d239.js → node/component-ref-6b1013d0.js} +9 -8
- package/vue2/lib/node/constants/sdk-version.d.ts +1 -1
- package/vue2/lib/node/{content-f12d606a.js → content-5de9cb53.js} +8 -7
- package/vue2/lib/node/content-7e6f95d2.cjs +1 -0
- package/vue2/lib/node/css-3747a91a.cjs +6 -0
- package/vue2/lib/node/{css-6048b6bd.js → css-ab629ac6.js} +4 -3
- package/vue2/lib/{browser/enable-editor-9e5fbca5.js → node/enable-editor-58b89268.js} +6 -5
- package/vue2/lib/node/enable-editor-a05ea891.cjs +1 -0
- package/vue2/lib/node/{evaluate-0814c11a.cjs → evaluate-5237e8df.cjs} +1 -1
- package/vue2/lib/node/{evaluate-834a9ea9.js → evaluate-e40501d4.js} +25 -23
- package/vue2/lib/{browser/get-block-actions-6bf6efd8.js → node/get-block-actions-261b93f6.js} +5 -4
- package/vue2/lib/node/get-block-actions-5d60bb63.cjs +1 -0
- package/vue2/lib/{browser/get-block-properties-d1d0bc05.js → node/get-block-properties-49526534.js} +11 -10
- package/vue2/lib/node/get-block-properties-ff0444df.cjs +1 -0
- package/vue2/lib/node/get-processed-block-3b811708.cjs +1 -0
- package/vue2/lib/{edge/get-processed-block-0ed76999.js → node/get-processed-block-7242c9a8.js} +16 -15
- package/vue2/lib/{browser/index-3caa5325.cjs → node/index-00b54a2d.cjs} +3 -3
- package/vue2/lib/{edge/index-5e05bfe5.js → node/index-f335cf42.js} +48 -47
- package/vue2/lib/node/index.cjs +1 -1
- package/vue2/lib/node/index.js +24 -23
- package/vue2/lib/{browser/inlined-script-ec4a5d29.js → node/inlined-script-b0441af1.js} +7 -6
- package/vue2/lib/node/inlined-script-e7e8cc4a.cjs +1 -0
- package/vue2/lib/node/inlined-styles-a8e61790.cjs +1 -0
- package/vue2/lib/{browser/inlined-styles-f423abf7.js → node/inlined-styles-c3091b9e.js} +5 -4
- package/vue2/lib/node/interactive-element-64032c60.cjs +1 -0
- package/vue2/lib/{edge/interactive-element-bb9f8f84.js → node/interactive-element-72f51043.js} +8 -7
- package/vue2/lib/node/repeated-block-c2df83ff.cjs +1 -0
- package/vue2/lib/{edge/repeated-block-06156896.js → node/repeated-block-f033b120.js} +5 -4
- package/vue2/lib/{browser/styles-d078f3c9.cjs → node/styles-7d3b3741.cjs} +2 -2
- package/vue2/lib/node/{styles-dc003dc5.js → styles-a1697843.js} +8 -7
- package/vue2/package.json +5 -0
- package/vue3/lib/{node/block-wrapper.56c45140.cjs → browser/block-wrapper.2dba8fb9.cjs} +1 -1
- package/vue3/lib/{node/block-wrapper.747652cc.js → browser/block-wrapper.93359482.js} +3 -3
- package/vue3/lib/{node/component-ref.4cde5228.js → browser/component-ref.348e3f3c.js} +3 -3
- package/vue3/lib/{node/component-ref.9c294efb.cjs → browser/component-ref.5d332cbe.cjs} +1 -1
- package/vue3/lib/browser/constants/sdk-version.d.ts +1 -1
- package/vue3/lib/browser/get-block-actions.91d70ba2.cjs +1 -0
- package/vue3/lib/{edge/get-block-actions.b12a50e1.js → browser/get-block-actions.ca6fe762.js} +6 -5
- package/vue3/lib/browser/{index.263ef516.cjs → index.796bf63b.cjs} +7 -7
- package/vue3/lib/browser/{index.3ca6cceb.js → index.c5cd33f5.js} +74 -73
- package/vue3/lib/browser/index.cjs +1 -1
- package/vue3/lib/browser/index.js +27 -26
- package/vue3/lib/{node/repeated-block.b45912e0.cjs → browser/repeated-block.293b3b51.cjs} +1 -1
- package/vue3/lib/{node/repeated-block.d9d63701.js → browser/repeated-block.aa5dc36f.js} +3 -3
- package/vue3/lib/edge/{block-wrapper.b96fad63.js → block-wrapper.0d57b295.js} +6 -5
- package/vue3/lib/edge/block-wrapper.57daa012.cjs +1 -0
- package/vue3/lib/edge/{component-ref.fef012d7.js → component-ref.47f4d835.js} +5 -4
- package/vue3/lib/edge/component-ref.5f18534f.cjs +1 -0
- package/vue3/lib/edge/constants/sdk-version.d.ts +1 -1
- package/vue3/lib/edge/get-block-actions.51f2dc73.cjs +1 -0
- package/vue3/lib/{browser/get-block-actions.b5062464.js → edge/get-block-actions.e18a650e.js} +6 -5
- package/vue3/lib/edge/{index.8968e581.js → index.a7c064ed.js} +128 -127
- package/vue3/lib/edge/{index.caa41e14.cjs → index.c0fdb424.cjs} +8 -8
- package/vue3/lib/edge/index.cjs +1 -1
- package/vue3/lib/edge/index.js +27 -26
- package/vue3/lib/edge/repeated-block.0dedccc0.cjs +1 -0
- package/vue3/lib/edge/{repeated-block.827595e1.js → repeated-block.dbf2ac5d.js} +5 -4
- package/vue3/lib/{browser/block-wrapper.1377d486.js → node/block-wrapper.1140bc59.js} +8 -6
- package/vue3/lib/node/block-wrapper.9e3f2443.cjs +1 -0
- package/vue3/lib/node/component-ref.814bc23c.cjs +1 -0
- package/vue3/lib/{browser/component-ref.0df2ace0.js → node/component-ref.cad6e759.js} +12 -10
- package/vue3/lib/node/constants/sdk-version.d.ts +1 -1
- package/vue3/lib/node/{get-block-actions.f57c50da.js → get-block-actions.46d61b25.js} +6 -5
- package/vue3/lib/node/get-block-actions.68f47245.cjs +1 -0
- package/vue3/lib/node/{index.941e6502.js → index.14c688da.js} +799 -793
- package/vue3/lib/node/index.456bef99.cjs +201 -0
- package/vue3/lib/node/index.cjs +1 -1
- package/vue3/lib/node/index.js +24 -23
- package/vue3/lib/node/repeated-block.19d21383.cjs +1 -0
- package/vue3/lib/{browser/repeated-block.055d09e9.js → node/repeated-block.e72a8275.js} +8 -6
- package/vue3/package.json +5 -0
- package/vue2/css/package.json +0 -4
- package/vue2/lib/browser/block-styles-5c462c72.cjs +0 -1
- package/vue2/lib/browser/block-wrapper-6614e2f6.cjs +0 -1
- package/vue2/lib/browser/blocks-wrapper-7761766b.cjs +0 -1
- package/vue2/lib/browser/component-ref-705f4623.cjs +0 -1
- package/vue2/lib/browser/content-4e18170c.cjs +0 -1
- package/vue2/lib/browser/css-bd209fae.cjs +0 -6
- package/vue2/lib/browser/enable-editor-430efbd4.cjs +0 -1
- package/vue2/lib/browser/evaluate-07174f5f.cjs +0 -1
- package/vue2/lib/browser/get-block-actions-84c842f6.cjs +0 -1
- package/vue2/lib/browser/get-block-properties-e2a40df1.cjs +0 -1
- package/vue2/lib/browser/get-processed-block-e0783c0a.cjs +0 -1
- package/vue2/lib/browser/inlined-script-335771a8.cjs +0 -1
- package/vue2/lib/browser/inlined-styles-3913a8d2.cjs +0 -1
- package/vue2/lib/browser/interactive-element-37bc0f5d.cjs +0 -1
- package/vue2/lib/browser/repeated-block-0d2b2875.cjs +0 -1
- package/vue2/lib/edge/block-styles-aceb9af8.cjs +0 -1
- package/vue2/lib/edge/block-wrapper-138380d7.cjs +0 -1
- package/vue2/lib/edge/blocks-wrapper-faea8d38.cjs +0 -1
- package/vue2/lib/edge/component-ref-7b7d8e68.cjs +0 -1
- package/vue2/lib/edge/content-5c39336c.cjs +0 -1
- package/vue2/lib/edge/css-23e659da.cjs +0 -6
- package/vue2/lib/edge/enable-editor-9d1118ea.cjs +0 -1
- package/vue2/lib/edge/get-block-actions-746c9bd2.cjs +0 -1
- package/vue2/lib/edge/get-block-properties-a5109149.cjs +0 -1
- package/vue2/lib/edge/get-processed-block-c0703239.cjs +0 -1
- package/vue2/lib/edge/inlined-script-9a554125.cjs +0 -1
- package/vue2/lib/edge/inlined-styles-908b0f3d.cjs +0 -1
- package/vue2/lib/edge/interactive-element-ad4ab167.cjs +0 -1
- package/vue2/lib/edge/repeated-block-5ba61f53.cjs +0 -1
- package/vue2/lib/node/block-styles-1e2640a2.cjs +0 -1
- package/vue2/lib/node/block-wrapper-ac53a924.cjs +0 -1
- package/vue2/lib/node/blocks-wrapper-a054ebaf.cjs +0 -1
- package/vue2/lib/node/component-ref-06eef9a6.cjs +0 -1
- package/vue2/lib/node/content-a5a1d56c.cjs +0 -1
- package/vue2/lib/node/css-b2c258a5.cjs +0 -6
- package/vue2/lib/node/enable-editor-fdd7a890.cjs +0 -1
- package/vue2/lib/node/get-block-actions-3773e4fd.cjs +0 -1
- package/vue2/lib/node/get-block-properties-3f9bfbe9.cjs +0 -1
- package/vue2/lib/node/get-processed-block-5728fca2.cjs +0 -1
- package/vue2/lib/node/inlined-script-05a289bc.cjs +0 -1
- package/vue2/lib/node/inlined-styles-7ac1dd90.cjs +0 -1
- package/vue2/lib/node/interactive-element-cae91247.cjs +0 -1
- package/vue2/lib/node/repeated-block-65e12830.cjs +0 -1
- package/vue3/css/package.json +0 -4
- package/vue3/lib/browser/block-wrapper.77966882.cjs +0 -1
- package/vue3/lib/browser/component-ref.cfa2879a.cjs +0 -1
- package/vue3/lib/browser/get-block-actions.53c9e174.cjs +0 -1
- package/vue3/lib/browser/repeated-block.10ac7676.cjs +0 -1
- package/vue3/lib/edge/block-wrapper.a5eacdf4.cjs +0 -1
- package/vue3/lib/edge/component-ref.4865219f.cjs +0 -1
- package/vue3/lib/edge/get-block-actions.e8f7801d.cjs +0 -1
- package/vue3/lib/edge/repeated-block.819e62ef.cjs +0 -1
- package/vue3/lib/node/get-block-actions.2b49b259.cjs +0 -1
- package/vue3/lib/node/index.6ab6fc2e.cjs +0 -201
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import "./style.css";
|
|
2
|
+
import { defineComponent, openBlock, createElementBlock, mergeProps, toHandlers, toDisplayString, defineAsyncComponent, resolveComponent, Fragment as Fragment$1, createBlock, createCommentVNode, renderList, withCtx, createVNode, h, renderSlot, createElementVNode, normalizeStyle, normalizeClass, markRaw } from "vue";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
4
|
+
function filterAttrs(e = {}, t, n) {
|
|
4
5
|
const o = {};
|
|
5
6
|
for (const r in e) {
|
|
6
7
|
if (!e[r] || n && !r.startsWith(t))
|
|
7
8
|
continue;
|
|
8
|
-
const
|
|
9
|
-
o[
|
|
9
|
+
const s = n ? r.replace(t, "") : r;
|
|
10
|
+
o[s] = e[r];
|
|
10
11
|
}
|
|
11
12
|
return o;
|
|
12
13
|
}
|
|
13
|
-
const
|
|
14
|
+
const _sfc_main$k = defineComponent({
|
|
14
15
|
name: "builder-button",
|
|
15
16
|
props: ["attributes", "text", "link", "openLinkInNewTab"],
|
|
16
17
|
data() {
|
|
17
|
-
return { filterAttrs
|
|
18
|
+
return { filterAttrs };
|
|
18
19
|
},
|
|
19
20
|
methods: {
|
|
20
21
|
_classStringToObject(e) {
|
|
@@ -27,26 +28,25 @@ const ot = g({
|
|
|
27
28
|
return t;
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
|
-
})
|
|
31
|
-
const y = (e, t) => {
|
|
31
|
+
}), button_vue_vue_type_style_index_0_scoped_becdf225_lang = "", _export_sfc = (e, t) => {
|
|
32
32
|
const n = e.__vccOpts || e;
|
|
33
33
|
for (const [o, r] of t)
|
|
34
34
|
n[o] = r;
|
|
35
35
|
return n;
|
|
36
|
-
},
|
|
37
|
-
function
|
|
38
|
-
return e.link ? (
|
|
36
|
+
}, _hoisted_1$8 = ["href", "target"];
|
|
37
|
+
function _sfc_render$i(e, t, n, o, r, s) {
|
|
38
|
+
return e.link ? (openBlock(), createElementBlock("a", mergeProps({
|
|
39
39
|
key: 0,
|
|
40
40
|
href: e.link,
|
|
41
41
|
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
42
42
|
role: "button"
|
|
43
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
43
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), toDisplayString(e.text), 17, _hoisted_1$8)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
44
44
|
key: 1,
|
|
45
45
|
style: e.attributes.style,
|
|
46
46
|
class: e._classStringToObject(e.attributes.class + " button-21azgz5avex")
|
|
47
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
47
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), toDisplayString(e.text), 17));
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$i], ["__scopeId", "data-v-becdf225"], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/button/button.vue"]]), key$1 = Symbol(), BuilderContext = {
|
|
50
50
|
Builder: {
|
|
51
51
|
content: null,
|
|
52
52
|
context: {},
|
|
@@ -59,12 +59,12 @@ const st = /* @__PURE__ */ y(ot, [["render", it], ["__scopeId", "data-v-becdf225
|
|
|
59
59
|
componentInfos: {},
|
|
60
60
|
inheritedStyles: {}
|
|
61
61
|
},
|
|
62
|
-
key:
|
|
63
|
-
},
|
|
62
|
+
key: key$1
|
|
63
|
+
}, key = Symbol(), ComponentsContext = {
|
|
64
64
|
Components: { registeredComponents: {} },
|
|
65
|
-
key
|
|
65
|
+
key
|
|
66
66
|
};
|
|
67
|
-
function
|
|
67
|
+
function getBlockComponentOptions(e) {
|
|
68
68
|
var t;
|
|
69
69
|
return {
|
|
70
70
|
...(t = e.component) == null ? void 0 : t.options,
|
|
@@ -72,44 +72,44 @@ function ct(e) {
|
|
|
72
72
|
builderBlock: e
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const TARGET = "vue3", camelToKebabCase = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), checkIsDefined = (e) => e != null, convertStyleMapToCSSArray = (e) => Object.entries(e).map(([n, o]) => {
|
|
76
76
|
if (typeof o == "string")
|
|
77
|
-
return `${
|
|
78
|
-
}).filter(
|
|
79
|
-
`),
|
|
77
|
+
return `${camelToKebabCase(n)}: ${o};`;
|
|
78
|
+
}).filter(checkIsDefined), convertStyleMapToCSS = (e) => convertStyleMapToCSSArray(e).join(`
|
|
79
|
+
`), createCssClass = ({
|
|
80
80
|
mediaQuery: e,
|
|
81
81
|
className: t,
|
|
82
82
|
styles: n
|
|
83
83
|
}) => {
|
|
84
84
|
const o = `.${t} {
|
|
85
|
-
${
|
|
85
|
+
${convertStyleMapToCSS(n)}
|
|
86
86
|
}`;
|
|
87
87
|
return e ? `${e} {
|
|
88
88
|
${o}
|
|
89
89
|
}` : o;
|
|
90
|
-
},
|
|
91
|
-
log: (...e) => console.log(
|
|
92
|
-
error: (...e) => console.error(
|
|
93
|
-
warn: (...e) => console.warn(
|
|
94
|
-
debug: (...e) => console.debug(
|
|
90
|
+
}, MSG_PREFIX = "[Builder.io]: ", logger = {
|
|
91
|
+
log: (...e) => console.log(MSG_PREFIX, ...e),
|
|
92
|
+
error: (...e) => console.error(MSG_PREFIX, ...e),
|
|
93
|
+
warn: (...e) => console.warn(MSG_PREFIX, ...e),
|
|
94
|
+
debug: (...e) => console.debug(MSG_PREFIX, ...e)
|
|
95
95
|
};
|
|
96
|
-
function
|
|
96
|
+
function isBrowser() {
|
|
97
97
|
return typeof window < "u" && typeof document < "u";
|
|
98
98
|
}
|
|
99
|
-
function
|
|
100
|
-
return
|
|
99
|
+
function isIframe() {
|
|
100
|
+
return isBrowser() && window.self !== window.top;
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
return
|
|
102
|
+
function isEditing() {
|
|
103
|
+
return isIframe() && (TARGET === "reactNative" || window.location.search.indexOf("builder.frameEditing=") !== -1);
|
|
104
104
|
}
|
|
105
|
-
const
|
|
106
|
-
if (
|
|
105
|
+
const getLocation = () => {
|
|
106
|
+
if (isBrowser()) {
|
|
107
107
|
const e = new URL(location.href);
|
|
108
108
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
109
109
|
} else
|
|
110
110
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
111
|
-
},
|
|
112
|
-
const e =
|
|
111
|
+
}, getUserAgent = () => typeof navigator == "object" && navigator.userAgent || "", getUserAttributes = () => {
|
|
112
|
+
const e = getUserAgent(), t = {
|
|
113
113
|
Android() {
|
|
114
114
|
return e.match(/Android/i);
|
|
115
115
|
},
|
|
@@ -126,15 +126,15 @@ const ht = () => {
|
|
|
126
126
|
return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
|
|
127
127
|
},
|
|
128
128
|
any() {
|
|
129
|
-
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() ||
|
|
129
|
+
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || TARGET === "reactNative";
|
|
130
130
|
}
|
|
131
|
-
}, n = e.match(/Tablet|iPad/i), o =
|
|
131
|
+
}, n = e.match(/Tablet|iPad/i), o = getLocation();
|
|
132
132
|
return {
|
|
133
133
|
urlPath: o == null ? void 0 : o.pathname,
|
|
134
134
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
135
135
|
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
136
136
|
};
|
|
137
|
-
},
|
|
137
|
+
}, getFunctionArguments = ({
|
|
138
138
|
builder: e,
|
|
139
139
|
context: t,
|
|
140
140
|
event: n,
|
|
@@ -145,54 +145,59 @@ const ht = () => {
|
|
|
145
145
|
builder: e,
|
|
146
146
|
context: t,
|
|
147
147
|
event: n
|
|
148
|
-
}),
|
|
149
|
-
isEditing:
|
|
150
|
-
isBrowser:
|
|
151
|
-
isServer: !
|
|
152
|
-
getUserAttributes: () =>
|
|
153
|
-
}),
|
|
148
|
+
}), getBuilderGlobals = () => ({
|
|
149
|
+
isEditing: isEditing(),
|
|
150
|
+
isBrowser: isBrowser(),
|
|
151
|
+
isServer: !isBrowser(),
|
|
152
|
+
getUserAttributes: () => getUserAttributes()
|
|
153
|
+
}), parseCode = (e, {
|
|
154
154
|
isExpression: t = !0
|
|
155
|
-
}) => t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e,
|
|
155
|
+
}) => t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, runInBrowser = ({
|
|
156
156
|
code: e,
|
|
157
157
|
builder: t,
|
|
158
158
|
context: n,
|
|
159
159
|
event: o,
|
|
160
160
|
localState: r,
|
|
161
|
-
rootSetState:
|
|
162
|
-
rootState:
|
|
161
|
+
rootSetState: s,
|
|
162
|
+
rootState: i
|
|
163
163
|
}) => {
|
|
164
|
-
const a =
|
|
164
|
+
const a = getFunctionArguments({
|
|
165
165
|
builder: t,
|
|
166
166
|
context: n,
|
|
167
167
|
event: o,
|
|
168
|
-
state:
|
|
168
|
+
state: flattenState(i, r, s)
|
|
169
169
|
});
|
|
170
|
-
return new Function(...a.map(([
|
|
170
|
+
return new Function(...a.map(([c]) => c), e)(...a.map(([, c]) => c));
|
|
171
171
|
};
|
|
172
|
-
function
|
|
172
|
+
function flattenState(e, t, n) {
|
|
173
173
|
if (e === t)
|
|
174
174
|
throw new Error("rootState === localState");
|
|
175
175
|
return new Proxy(e, {
|
|
176
176
|
get: (o, r) => t && r in t ? t[r] : e[r],
|
|
177
|
-
set: (o, r,
|
|
177
|
+
set: (o, r, s) => {
|
|
178
178
|
if (t && r in t)
|
|
179
179
|
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
180
|
-
return e[r] =
|
|
180
|
+
return e[r] = s, n == null || n(e), !0;
|
|
181
181
|
}
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
|
-
const
|
|
184
|
+
const fastClone = (e) => JSON.parse(JSON.stringify(e)), set = (e, t, n) => {
|
|
185
185
|
if (Object(e) !== e)
|
|
186
186
|
return e;
|
|
187
187
|
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
188
|
-
return o.slice(0, -1).reduce((r,
|
|
189
|
-
},
|
|
190
|
-
|
|
188
|
+
return o.slice(0, -1).reduce((r, s, i) => Object(r[s]) === r[s] ? r[s] : r[s] = Math.abs(Number(o[i + 1])) >> 0 === +o[i + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
|
|
189
|
+
}, noop = () => {
|
|
190
|
+
};
|
|
191
|
+
let safeDynamicRequire = noop;
|
|
191
192
|
try {
|
|
192
|
-
|
|
193
|
-
} catch {
|
|
193
|
+
safeDynamicRequire = createRequire(import.meta.url);
|
|
194
|
+
} catch (error) {
|
|
195
|
+
try {
|
|
196
|
+
safeDynamicRequire = eval("require");
|
|
197
|
+
} catch (e) {
|
|
198
|
+
}
|
|
194
199
|
}
|
|
195
|
-
const
|
|
200
|
+
const ivm = safeDynamicRequire("isolated-vm"), getSyncValName = (e) => `bldr_${e}_sync`, BUILDER_SET_STATE_NAME = "BUILDER_SET_STATE", INJECTED_IVM_GLOBAL = "BUILDER_IVM", REF_TO_PROXY_FN = `
|
|
196
201
|
var refToProxy = (obj) => {
|
|
197
202
|
if (typeof obj !== 'object' || obj === null) {
|
|
198
203
|
return obj;
|
|
@@ -209,22 +214,22 @@ var refToProxy = (obj) => {
|
|
|
209
214
|
return val;
|
|
210
215
|
},
|
|
211
216
|
set(target, key, value) {
|
|
212
|
-
const v = typeof value === 'object' ? new ${
|
|
217
|
+
const v = typeof value === 'object' ? new ${INJECTED_IVM_GLOBAL}.Reference(value) : value;
|
|
213
218
|
obj.setSync(key, v);
|
|
214
|
-
${
|
|
219
|
+
${BUILDER_SET_STATE_NAME}(key, value)
|
|
215
220
|
},
|
|
216
221
|
deleteProperty(target, key) {
|
|
217
222
|
obj.deleteSync(key);
|
|
218
223
|
}
|
|
219
224
|
})
|
|
220
225
|
}
|
|
221
|
-
`,
|
|
226
|
+
`, processCode = ({
|
|
222
227
|
code: e,
|
|
223
228
|
args: t
|
|
224
229
|
}) => {
|
|
225
|
-
const n = t.map(([o]) => `var ${o} = refToProxy(${
|
|
230
|
+
const n = t.map(([o]) => `var ${o} = refToProxy(${getSyncValName(o)}); `).join("");
|
|
226
231
|
return `
|
|
227
|
-
${
|
|
232
|
+
${REF_TO_PROXY_FN}
|
|
228
233
|
${n}
|
|
229
234
|
function theFunction() {
|
|
230
235
|
${e}
|
|
@@ -238,83 +243,86 @@ if (typeof output === 'object' && output !== null) {
|
|
|
238
243
|
|
|
239
244
|
output;
|
|
240
245
|
`;
|
|
241
|
-
},
|
|
246
|
+
}, getIsolateContext = () => new ivm.Isolate({
|
|
242
247
|
memoryLimit: 128
|
|
243
|
-
}).createContextSync(),
|
|
248
|
+
}).createContextSync(), runInNode = ({
|
|
244
249
|
code: e,
|
|
245
250
|
builder: t,
|
|
246
251
|
context: n,
|
|
247
252
|
event: o,
|
|
248
253
|
localState: r,
|
|
249
|
-
rootSetState:
|
|
250
|
-
rootState:
|
|
254
|
+
rootSetState: s,
|
|
255
|
+
rootState: i
|
|
251
256
|
}) => {
|
|
252
|
-
const a =
|
|
253
|
-
...
|
|
257
|
+
const a = fastClone({
|
|
258
|
+
...i,
|
|
254
259
|
...r
|
|
255
|
-
}),
|
|
260
|
+
}), c = getFunctionArguments({
|
|
256
261
|
builder: t,
|
|
257
262
|
context: n,
|
|
258
263
|
event: o,
|
|
259
264
|
state: a
|
|
260
|
-
}),
|
|
261
|
-
|
|
262
|
-
console.log(...
|
|
263
|
-
}),
|
|
264
|
-
|
|
265
|
-
}),
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
...
|
|
269
|
-
getUserAttributes: () =>
|
|
270
|
-
} :
|
|
265
|
+
}), l = getIsolateContext(), d = l.global;
|
|
266
|
+
d.setSync("global", d.derefInto()), d.setSync("log", function(...m) {
|
|
267
|
+
console.log(...m);
|
|
268
|
+
}), d.setSync(BUILDER_SET_STATE_NAME, function(m, f) {
|
|
269
|
+
set(i, m, f), s == null || s(i);
|
|
270
|
+
}), c.forEach(([m, f]) => {
|
|
271
|
+
const b = typeof f == "object" ? new ivm.Reference(
|
|
272
|
+
m === "builder" ? {
|
|
273
|
+
...f,
|
|
274
|
+
getUserAttributes: () => f.getUserAttributes()
|
|
275
|
+
} : f
|
|
271
276
|
) : null;
|
|
272
|
-
|
|
273
|
-
}),
|
|
274
|
-
const
|
|
277
|
+
d.setSync(getSyncValName(m), b);
|
|
278
|
+
}), d.setSync(INJECTED_IVM_GLOBAL, ivm);
|
|
279
|
+
const p = processCode({
|
|
275
280
|
code: e,
|
|
276
|
-
args:
|
|
277
|
-
}),
|
|
281
|
+
args: c
|
|
282
|
+
}), u = l.evalSync(p);
|
|
278
283
|
try {
|
|
279
|
-
return JSON.parse(
|
|
284
|
+
return JSON.parse(u);
|
|
280
285
|
} catch {
|
|
281
|
-
return
|
|
286
|
+
return u;
|
|
282
287
|
}
|
|
283
|
-
},
|
|
284
|
-
function
|
|
288
|
+
}, chooseBrowserOrServerEval = (e) => isBrowser() ? runInBrowser(e) : runInNode(e);
|
|
289
|
+
function evaluate({
|
|
285
290
|
code: e,
|
|
286
291
|
context: t,
|
|
287
292
|
localState: n,
|
|
288
293
|
rootState: o,
|
|
289
294
|
rootSetState: r,
|
|
290
|
-
event:
|
|
291
|
-
isExpression:
|
|
295
|
+
event: s,
|
|
296
|
+
isExpression: i = !0
|
|
292
297
|
}) {
|
|
293
298
|
if (e === "") {
|
|
294
|
-
|
|
299
|
+
logger.warn("Skipping evaluation of empty code block.");
|
|
295
300
|
return;
|
|
296
301
|
}
|
|
297
302
|
const a = {
|
|
298
|
-
code:
|
|
299
|
-
isExpression:
|
|
303
|
+
code: parseCode(e, {
|
|
304
|
+
isExpression: i
|
|
300
305
|
}),
|
|
301
|
-
builder:
|
|
306
|
+
builder: getBuilderGlobals(),
|
|
302
307
|
context: t,
|
|
303
|
-
event:
|
|
308
|
+
event: s,
|
|
304
309
|
rootSetState: r,
|
|
305
310
|
rootState: o,
|
|
306
311
|
localState: n
|
|
307
312
|
};
|
|
308
313
|
try {
|
|
309
|
-
return
|
|
310
|
-
} catch (
|
|
311
|
-
|
|
314
|
+
return chooseBrowserOrServerEval(a);
|
|
315
|
+
} catch (c) {
|
|
316
|
+
logger.error("Failed code evaluation: " + c.message, {
|
|
312
317
|
code: e
|
|
313
318
|
});
|
|
314
319
|
return;
|
|
315
320
|
}
|
|
316
321
|
}
|
|
317
|
-
|
|
322
|
+
function transformBlock(e) {
|
|
323
|
+
return e;
|
|
324
|
+
}
|
|
325
|
+
const evaluateBindings = ({
|
|
318
326
|
block: e,
|
|
319
327
|
context: t,
|
|
320
328
|
localState: n,
|
|
@@ -323,58 +331,58 @@ const Tt = ({
|
|
|
323
331
|
}) => {
|
|
324
332
|
if (!e.bindings)
|
|
325
333
|
return e;
|
|
326
|
-
const
|
|
327
|
-
...
|
|
334
|
+
const s = fastClone(e), i = {
|
|
335
|
+
...s,
|
|
328
336
|
properties: {
|
|
329
|
-
...
|
|
337
|
+
...s.properties
|
|
330
338
|
},
|
|
331
339
|
actions: {
|
|
332
|
-
...
|
|
340
|
+
...s.actions
|
|
333
341
|
}
|
|
334
342
|
};
|
|
335
343
|
for (const a in e.bindings) {
|
|
336
|
-
const
|
|
337
|
-
code:
|
|
344
|
+
const c = e.bindings[a], l = evaluate({
|
|
345
|
+
code: c,
|
|
338
346
|
localState: n,
|
|
339
347
|
rootState: o,
|
|
340
348
|
rootSetState: r,
|
|
341
349
|
context: t
|
|
342
350
|
});
|
|
343
|
-
|
|
351
|
+
set(i, a, l);
|
|
344
352
|
}
|
|
345
|
-
return
|
|
353
|
+
return i;
|
|
346
354
|
};
|
|
347
|
-
function
|
|
355
|
+
function getProcessedBlock({
|
|
348
356
|
block: e,
|
|
349
357
|
context: t,
|
|
350
358
|
shouldEvaluateBindings: n,
|
|
351
359
|
localState: o,
|
|
352
360
|
rootState: r,
|
|
353
|
-
rootSetState:
|
|
361
|
+
rootSetState: s
|
|
354
362
|
}) {
|
|
355
|
-
const
|
|
356
|
-
return n ?
|
|
357
|
-
block:
|
|
363
|
+
const i = e;
|
|
364
|
+
return n ? evaluateBindings({
|
|
365
|
+
block: i,
|
|
358
366
|
localState: o,
|
|
359
367
|
rootState: r,
|
|
360
|
-
rootSetState:
|
|
368
|
+
rootSetState: s,
|
|
361
369
|
context: t
|
|
362
|
-
}) :
|
|
370
|
+
}) : i;
|
|
363
371
|
}
|
|
364
|
-
const
|
|
372
|
+
const EMPTY_HTML_ELEMENTS = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], isEmptyHtmlElement = (e) => typeof e == "string" && EMPTY_HTML_ELEMENTS.includes(e.toLowerCase()), getComponent = ({
|
|
365
373
|
block: e,
|
|
366
374
|
context: t,
|
|
367
375
|
registeredComponents: n
|
|
368
376
|
}) => {
|
|
369
|
-
var
|
|
370
|
-
const o = (
|
|
377
|
+
var s;
|
|
378
|
+
const o = (s = getProcessedBlock({
|
|
371
379
|
block: e,
|
|
372
380
|
localState: t.localState,
|
|
373
381
|
rootState: t.rootState,
|
|
374
382
|
rootSetState: t.rootSetState,
|
|
375
383
|
context: t.context,
|
|
376
384
|
shouldEvaluateBindings: !1
|
|
377
|
-
}).component) == null ? void 0 :
|
|
385
|
+
}).component) == null ? void 0 : s.name;
|
|
378
386
|
if (!o)
|
|
379
387
|
return null;
|
|
380
388
|
const r = n[o];
|
|
@@ -383,7 +391,7 @@ const Rt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
383
391
|
console.warn(`
|
|
384
392
|
Could not find a registered component named "${o}".
|
|
385
393
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
386
|
-
},
|
|
394
|
+
}, getRepeatItemData = ({
|
|
387
395
|
block: e,
|
|
388
396
|
context: t
|
|
389
397
|
}) => {
|
|
@@ -393,7 +401,7 @@ const Rt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
393
401
|
} = e;
|
|
394
402
|
if (!(n != null && n.collection))
|
|
395
403
|
return;
|
|
396
|
-
const r =
|
|
404
|
+
const r = evaluate({
|
|
397
405
|
code: n.collection,
|
|
398
406
|
localState: t.localState,
|
|
399
407
|
rootState: t.rootState,
|
|
@@ -402,69 +410,69 @@ const Rt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
402
410
|
});
|
|
403
411
|
if (!Array.isArray(r))
|
|
404
412
|
return;
|
|
405
|
-
const
|
|
406
|
-
return r.map((
|
|
413
|
+
const s = n.collection.split(".").pop(), i = n.itemName || (s ? s + "Item" : "item");
|
|
414
|
+
return r.map((c, l) => ({
|
|
407
415
|
context: {
|
|
408
416
|
...t,
|
|
409
417
|
localState: {
|
|
410
418
|
...t.localState,
|
|
411
|
-
$index:
|
|
412
|
-
$item:
|
|
413
|
-
[
|
|
414
|
-
[`$${
|
|
419
|
+
$index: l,
|
|
420
|
+
$item: c,
|
|
421
|
+
[i]: c,
|
|
422
|
+
[`$${i}Index`]: l
|
|
415
423
|
}
|
|
416
424
|
},
|
|
417
425
|
block: o
|
|
418
426
|
}));
|
|
419
|
-
},
|
|
427
|
+
}, BlockStyles$1 = () => Promise.resolve().then(() => blockStyles).then((e) => e.default).catch((e) => {
|
|
420
428
|
throw console.error(
|
|
421
429
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
422
430
|
e
|
|
423
431
|
), e;
|
|
424
|
-
}),
|
|
432
|
+
}), BlockWrapper = () => import("./block-wrapper.1140bc59.js").then((e) => e.default).catch((e) => {
|
|
425
433
|
throw console.error(
|
|
426
434
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
427
435
|
e
|
|
428
436
|
), e;
|
|
429
|
-
}),
|
|
437
|
+
}), ComponentRef = () => import("./component-ref.cad6e759.js").then((e) => e.default).catch((e) => {
|
|
430
438
|
throw console.error(
|
|
431
439
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
432
440
|
e
|
|
433
441
|
), e;
|
|
434
|
-
}),
|
|
442
|
+
}), RepeatedBlock = () => import("./repeated-block.e72a8275.js").then((e) => e.default).catch((e) => {
|
|
435
443
|
throw console.error(
|
|
436
444
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
437
445
|
e
|
|
438
446
|
), e;
|
|
439
|
-
}),
|
|
447
|
+
}), _sfc_main$j = defineComponent({
|
|
440
448
|
name: "block",
|
|
441
449
|
components: {
|
|
442
|
-
ComponentRef:
|
|
443
|
-
BlockWrapper:
|
|
444
|
-
RepeatedBlock:
|
|
445
|
-
BlockStyles:
|
|
450
|
+
ComponentRef: defineAsyncComponent(ComponentRef),
|
|
451
|
+
BlockWrapper: defineAsyncComponent(BlockWrapper),
|
|
452
|
+
RepeatedBlock: defineAsyncComponent(RepeatedBlock),
|
|
453
|
+
BlockStyles: defineAsyncComponent(BlockStyles$1)
|
|
446
454
|
},
|
|
447
455
|
props: ["block", "context", "registeredComponents"],
|
|
448
456
|
data() {
|
|
449
|
-
return { childrenContext: this.context, isEmptyHtmlElement
|
|
457
|
+
return { childrenContext: this.context, isEmptyHtmlElement };
|
|
450
458
|
},
|
|
451
459
|
computed: {
|
|
452
460
|
blockComponent() {
|
|
453
|
-
return
|
|
461
|
+
return getComponent({
|
|
454
462
|
block: this.block,
|
|
455
463
|
context: this.context,
|
|
456
464
|
registeredComponents: this.registeredComponents
|
|
457
465
|
});
|
|
458
466
|
},
|
|
459
467
|
repeatItem() {
|
|
460
|
-
return
|
|
468
|
+
return getRepeatItemData({
|
|
461
469
|
block: this.block,
|
|
462
470
|
context: this.context
|
|
463
471
|
});
|
|
464
472
|
},
|
|
465
473
|
processedBlock() {
|
|
466
474
|
var e;
|
|
467
|
-
return (e = this.block.repeat) != null && e.collection ? this.block :
|
|
475
|
+
return (e = this.block.repeat) != null && e.collection ? this.block : getProcessedBlock({
|
|
468
476
|
block: this.block,
|
|
469
477
|
localState: this.context.localState,
|
|
470
478
|
rootState: this.context.rootState,
|
|
@@ -488,12 +496,12 @@ const Rt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
488
496
|
return !((t = this.blockComponent) != null && t.component) && !this.repeatItem ? (n = this.processedBlock.children) != null ? n : [] : [];
|
|
489
497
|
},
|
|
490
498
|
componentRefProps() {
|
|
491
|
-
var e, t, n, o, r,
|
|
499
|
+
var e, t, n, o, r, s;
|
|
492
500
|
return {
|
|
493
501
|
blockChildren: (e = this.processedBlock.children) != null ? e : [],
|
|
494
502
|
componentRef: (t = this.blockComponent) == null ? void 0 : t.component,
|
|
495
503
|
componentOptions: {
|
|
496
|
-
...
|
|
504
|
+
...getBlockComponentOptions(this.processedBlock),
|
|
497
505
|
builderContext: this.context,
|
|
498
506
|
...((n = this.blockComponent) == null ? void 0 : n.name) === "Symbol" || ((o = this.blockComponent) == null ? void 0 : o.name) === "Columns" ? {
|
|
499
507
|
builderComponents: this.registeredComponents
|
|
@@ -503,16 +511,16 @@ const Rt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
503
511
|
registeredComponents: this.registeredComponents,
|
|
504
512
|
builderBlock: this.processedBlock,
|
|
505
513
|
includeBlockProps: ((r = this.blockComponent) == null ? void 0 : r.noWrap) === !0,
|
|
506
|
-
isInteractive: !((
|
|
514
|
+
isInteractive: !((s = this.blockComponent) != null && s.isRSC)
|
|
507
515
|
};
|
|
508
516
|
}
|
|
509
517
|
}
|
|
510
518
|
});
|
|
511
|
-
function
|
|
512
|
-
var
|
|
513
|
-
const
|
|
514
|
-
return e.canShowBlock ? (
|
|
515
|
-
(
|
|
519
|
+
function _sfc_render$h(e, t, n, o, r, s) {
|
|
520
|
+
var p;
|
|
521
|
+
const i = resolveComponent("block-wrapper"), a = resolveComponent("repeated-block"), c = resolveComponent("component-ref"), l = resolveComponent("block", !0), d = resolveComponent("block-styles");
|
|
522
|
+
return e.canShowBlock ? (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
523
|
+
(p = e.blockComponent) != null && p.noWrap ? (openBlock(), createBlock(c, {
|
|
516
524
|
key: 1,
|
|
517
525
|
componentRef: e.componentRefProps.componentRef,
|
|
518
526
|
componentOptions: e.componentRefProps.componentOptions,
|
|
@@ -522,29 +530,29 @@ function jt(e, t, n, o, r, i) {
|
|
|
522
530
|
builderBlock: e.componentRefProps.builderBlock,
|
|
523
531
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
524
532
|
isInteractive: e.componentRefProps.isInteractive
|
|
525
|
-
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "builderBlock", "includeBlockProps", "isInteractive"])) : (
|
|
526
|
-
e.isEmptyHtmlElement(e.Tag) ? (
|
|
533
|
+
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "builderBlock", "includeBlockProps", "isInteractive"])) : (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
534
|
+
e.isEmptyHtmlElement(e.Tag) ? (openBlock(), createBlock(i, {
|
|
527
535
|
key: 0,
|
|
528
536
|
Wrapper: e.Tag,
|
|
529
537
|
block: e.processedBlock,
|
|
530
538
|
context: e.context,
|
|
531
539
|
hasChildren: !1
|
|
532
|
-
}, null, 8, ["Wrapper", "block", "context"])) :
|
|
533
|
-
!e.isEmptyHtmlElement(e.Tag) && e.repeatItem ? (
|
|
534
|
-
key:
|
|
535
|
-
repeatContext:
|
|
536
|
-
block:
|
|
540
|
+
}, null, 8, ["Wrapper", "block", "context"])) : createCommentVNode("v-if", !0),
|
|
541
|
+
!e.isEmptyHtmlElement(e.Tag) && e.repeatItem ? (openBlock(!0), createElementBlock(Fragment$1, { key: 1 }, renderList(e.repeatItem, (u, m) => (openBlock(), createBlock(a, {
|
|
542
|
+
key: m,
|
|
543
|
+
repeatContext: u.context,
|
|
544
|
+
block: u.block,
|
|
537
545
|
registeredComponents: e.registeredComponents
|
|
538
|
-
}, null, 8, ["repeatContext", "block", "registeredComponents"]))), 128)) :
|
|
539
|
-
!e.isEmptyHtmlElement(e.Tag) && !e.repeatItem ? (
|
|
546
|
+
}, null, 8, ["repeatContext", "block", "registeredComponents"]))), 128)) : createCommentVNode("v-if", !0),
|
|
547
|
+
!e.isEmptyHtmlElement(e.Tag) && !e.repeatItem ? (openBlock(), createBlock(i, {
|
|
540
548
|
key: 2,
|
|
541
549
|
Wrapper: e.Tag,
|
|
542
550
|
block: e.processedBlock,
|
|
543
551
|
context: e.context,
|
|
544
552
|
hasChildren: !0
|
|
545
553
|
}, {
|
|
546
|
-
default:
|
|
547
|
-
|
|
554
|
+
default: withCtx(() => [
|
|
555
|
+
createVNode(c, {
|
|
548
556
|
componentRef: e.componentRefProps.componentRef,
|
|
549
557
|
componentOptions: e.componentRefProps.componentOptions,
|
|
550
558
|
blockChildren: e.componentRefProps.blockChildren,
|
|
@@ -554,27 +562,27 @@ function jt(e, t, n, o, r, i) {
|
|
|
554
562
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
555
563
|
isInteractive: e.componentRefProps.isInteractive
|
|
556
564
|
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "builderBlock", "includeBlockProps", "isInteractive"]),
|
|
557
|
-
(
|
|
558
|
-
key: "block-" +
|
|
559
|
-
block:
|
|
565
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.childrenWithoutParentComponent, (u, m) => (openBlock(), createBlock(l, {
|
|
566
|
+
key: "block-" + u.id,
|
|
567
|
+
block: u,
|
|
560
568
|
context: e.childrenContext,
|
|
561
569
|
registeredComponents: e.registeredComponents
|
|
562
570
|
}, null, 8, ["block", "context", "registeredComponents"]))), 128)),
|
|
563
|
-
(
|
|
564
|
-
key: "block-style-" +
|
|
565
|
-
block:
|
|
571
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.childrenWithoutParentComponent, (u, m) => (openBlock(), createBlock(d, {
|
|
572
|
+
key: "block-style-" + u.id,
|
|
573
|
+
block: u,
|
|
566
574
|
context: e.childrenContext
|
|
567
575
|
}, null, 8, ["block", "context"]))), 128))
|
|
568
576
|
]),
|
|
569
577
|
_: 1
|
|
570
|
-
}, 8, ["Wrapper", "block", "context"])) :
|
|
578
|
+
}, 8, ["Wrapper", "block", "context"])) : createCommentVNode("v-if", !0)
|
|
571
579
|
], 64))
|
|
572
|
-
], 64)) :
|
|
580
|
+
], 64)) : createCommentVNode("v-if", !0);
|
|
573
581
|
}
|
|
574
|
-
const
|
|
582
|
+
const Block = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$h], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/block/block.vue"]]), block = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
575
583
|
__proto__: null,
|
|
576
|
-
default:
|
|
577
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
584
|
+
default: Block
|
|
585
|
+
}, Symbol.toStringTag, { value: "Module" })), SIZES = {
|
|
578
586
|
small: {
|
|
579
587
|
min: 320,
|
|
580
588
|
default: 321,
|
|
@@ -590,11 +598,11 @@ const Ae = /* @__PURE__ */ y(Ot, [["render", jt], ["__file", "/home/runner/work/
|
|
|
590
598
|
default: 991,
|
|
591
599
|
max: 1200
|
|
592
600
|
}
|
|
593
|
-
},
|
|
601
|
+
}, getMaxWidthQueryForSize = (e, t = SIZES) => `@media (max-width: ${t[e].max}px)`, getSizesForBreakpoints = ({
|
|
594
602
|
small: e,
|
|
595
603
|
medium: t
|
|
596
604
|
}) => {
|
|
597
|
-
const n =
|
|
605
|
+
const n = fastClone(SIZES);
|
|
598
606
|
if (!e || !t)
|
|
599
607
|
return n;
|
|
600
608
|
const o = Math.floor(e / 2);
|
|
@@ -609,28 +617,28 @@ const Ae = /* @__PURE__ */ y(Ot, [["render", jt], ["__file", "/home/runner/work/
|
|
|
609
617
|
min: r,
|
|
610
618
|
default: r + 1
|
|
611
619
|
};
|
|
612
|
-
const
|
|
620
|
+
const s = n.medium.max + 1;
|
|
613
621
|
return n.large = {
|
|
614
622
|
max: 2e3,
|
|
615
|
-
min:
|
|
616
|
-
default:
|
|
623
|
+
min: s,
|
|
624
|
+
default: s + 1
|
|
617
625
|
}, n;
|
|
618
|
-
},
|
|
626
|
+
}, _sfc_main$i = defineComponent({
|
|
619
627
|
render() {
|
|
620
|
-
return
|
|
628
|
+
return h("style", { id: this.id, innerHTML: this.styles });
|
|
621
629
|
},
|
|
622
630
|
name: "inlined-styles",
|
|
623
631
|
props: ["styles", "id"]
|
|
624
|
-
}),
|
|
632
|
+
}), InlinedStyles = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/inlined-styles.vue"]]), _sfc_main$h = defineComponent({
|
|
625
633
|
name: "block-styles",
|
|
626
|
-
components: { InlinedStyles
|
|
634
|
+
components: { InlinedStyles },
|
|
627
635
|
props: ["block", "context"],
|
|
628
636
|
data() {
|
|
629
|
-
return { TARGET
|
|
637
|
+
return { TARGET };
|
|
630
638
|
},
|
|
631
639
|
computed: {
|
|
632
640
|
canShowBlock() {
|
|
633
|
-
const e =
|
|
641
|
+
const e = getProcessedBlock({
|
|
634
642
|
block: this.block,
|
|
635
643
|
localState: this.context.localState,
|
|
636
644
|
rootState: this.context.rootState,
|
|
@@ -638,55 +646,55 @@ const Ae = /* @__PURE__ */ y(Ot, [["render", jt], ["__file", "/home/runner/work/
|
|
|
638
646
|
context: this.context.context,
|
|
639
647
|
shouldEvaluateBindings: !0
|
|
640
648
|
});
|
|
641
|
-
return
|
|
649
|
+
return checkIsDefined(e.hide) ? !e.hide : checkIsDefined(e.show) ? e.show : !0;
|
|
642
650
|
},
|
|
643
651
|
css() {
|
|
644
|
-
var
|
|
645
|
-
const e =
|
|
652
|
+
var p;
|
|
653
|
+
const e = getProcessedBlock({
|
|
646
654
|
block: this.block,
|
|
647
655
|
localState: this.context.localState,
|
|
648
656
|
rootState: this.context.rootState,
|
|
649
657
|
rootSetState: this.context.rootSetState,
|
|
650
658
|
context: this.context.context,
|
|
651
659
|
shouldEvaluateBindings: !0
|
|
652
|
-
}), t = e.responsiveStyles, n = this.context.content, o =
|
|
653
|
-
((
|
|
654
|
-
), r = t == null ? void 0 : t.large,
|
|
660
|
+
}), t = e.responsiveStyles, n = this.context.content, o = getSizesForBreakpoints(
|
|
661
|
+
((p = n == null ? void 0 : n.meta) == null ? void 0 : p.breakpoints) || {}
|
|
662
|
+
), r = t == null ? void 0 : t.large, s = t == null ? void 0 : t.medium, i = t == null ? void 0 : t.small, a = e.id;
|
|
655
663
|
if (!a)
|
|
656
664
|
return "";
|
|
657
|
-
const
|
|
665
|
+
const c = r ? createCssClass({
|
|
658
666
|
className: a,
|
|
659
667
|
styles: r
|
|
660
|
-
}) : "",
|
|
668
|
+
}) : "", l = s ? createCssClass({
|
|
661
669
|
className: a,
|
|
662
|
-
styles:
|
|
663
|
-
mediaQuery:
|
|
670
|
+
styles: s,
|
|
671
|
+
mediaQuery: getMaxWidthQueryForSize(
|
|
664
672
|
"medium",
|
|
665
673
|
o
|
|
666
674
|
)
|
|
667
|
-
}) : "",
|
|
675
|
+
}) : "", d = i ? createCssClass({
|
|
668
676
|
className: a,
|
|
669
|
-
styles:
|
|
670
|
-
mediaQuery:
|
|
677
|
+
styles: i,
|
|
678
|
+
mediaQuery: getMaxWidthQueryForSize(
|
|
671
679
|
"small",
|
|
672
680
|
o
|
|
673
681
|
)
|
|
674
682
|
}) : "";
|
|
675
|
-
return [
|
|
683
|
+
return [c, l, d].join(" ");
|
|
676
684
|
}
|
|
677
685
|
}
|
|
678
686
|
});
|
|
679
|
-
function
|
|
680
|
-
const
|
|
681
|
-
return e.TARGET !== "reactNative" && e.css && e.canShowBlock ? (
|
|
687
|
+
function _sfc_render$g(e, t, n, o, r, s) {
|
|
688
|
+
const i = resolveComponent("inlined-styles");
|
|
689
|
+
return e.TARGET !== "reactNative" && e.css && e.canShowBlock ? (openBlock(), createBlock(i, {
|
|
682
690
|
key: 0,
|
|
683
691
|
styles: e.css
|
|
684
|
-
}, null, 8, ["styles"])) :
|
|
692
|
+
}, null, 8, ["styles"])) : createCommentVNode("v-if", !0);
|
|
685
693
|
}
|
|
686
|
-
const
|
|
694
|
+
const BlockStyles = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/block/components/block-styles.vue"]]), blockStyles = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
687
695
|
__proto__: null,
|
|
688
|
-
default:
|
|
689
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
696
|
+
default: BlockStyles
|
|
697
|
+
}, Symbol.toStringTag, { value: "Module" })), _sfc_main$g = defineComponent({
|
|
690
698
|
name: "builder-blocks-wrapper",
|
|
691
699
|
props: ["blocks", "parent", "path", "styleProp"],
|
|
692
700
|
computed: {
|
|
@@ -698,7 +706,7 @@ const Ve = /* @__PURE__ */ y(Ut, [["render", Ft], ["__file", "/home/runner/work/
|
|
|
698
706
|
methods: {
|
|
699
707
|
onClick() {
|
|
700
708
|
var e, t;
|
|
701
|
-
|
|
709
|
+
isEditing() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
702
710
|
{
|
|
703
711
|
type: "builder.clickEmptyBlocks",
|
|
704
712
|
data: {
|
|
@@ -711,7 +719,7 @@ const Ve = /* @__PURE__ */ y(Ut, [["render", Ft], ["__file", "/home/runner/work/
|
|
|
711
719
|
},
|
|
712
720
|
onMouseEnter() {
|
|
713
721
|
var e, t;
|
|
714
|
-
|
|
722
|
+
isEditing() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
715
723
|
{
|
|
716
724
|
type: "builder.hoverEmptyBlocks",
|
|
717
725
|
data: {
|
|
@@ -732,27 +740,26 @@ const Ve = /* @__PURE__ */ y(Ut, [["render", Ft], ["__file", "/home/runner/work/
|
|
|
732
740
|
return t;
|
|
733
741
|
}
|
|
734
742
|
}
|
|
735
|
-
});
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
return d(), p("div", I({
|
|
743
|
+
}), blocksWrapper_vue_vue_type_style_index_0_scoped_1f8aab9f_lang = "", _hoisted_1$7 = ["builder-path", "builder-parent-id"];
|
|
744
|
+
function _sfc_render$f(e, t, n, o, r, s) {
|
|
745
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
739
746
|
class: e._classStringToObject(e.className + " div-178o76acnws"),
|
|
740
747
|
"builder-path": e.path,
|
|
741
748
|
"builder-parent-id": e.parent,
|
|
742
749
|
style: e.styleProp,
|
|
743
|
-
onClick: t[0] || (t[0] = (
|
|
744
|
-
onMouseenter: t[1] || (t[1] = (
|
|
745
|
-
onKeypress: t[2] || (t[2] = (
|
|
750
|
+
onClick: t[0] || (t[0] = (i) => e.onClick()),
|
|
751
|
+
onMouseenter: t[1] || (t[1] = (i) => e.onMouseEnter()),
|
|
752
|
+
onKeypress: t[2] || (t[2] = (i) => e.onClick())
|
|
746
753
|
}, {}), [
|
|
747
|
-
|
|
748
|
-
], 16,
|
|
754
|
+
renderSlot(e.$slots, "default", {}, void 0, !0)
|
|
755
|
+
], 16, _hoisted_1$7);
|
|
749
756
|
}
|
|
750
|
-
const
|
|
757
|
+
const BlocksWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__scopeId", "data-v-1f8aab9f"], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/blocks/blocks-wrapper.vue"]]), _sfc_main$f = defineComponent({
|
|
751
758
|
name: "builder-blocks",
|
|
752
759
|
components: {
|
|
753
|
-
BlocksWrapper
|
|
754
|
-
Block
|
|
755
|
-
BlockStyles
|
|
760
|
+
BlocksWrapper,
|
|
761
|
+
Block,
|
|
762
|
+
BlockStyles
|
|
756
763
|
},
|
|
757
764
|
props: [
|
|
758
765
|
"blocks",
|
|
@@ -763,37 +770,37 @@ const Ht = /* @__PURE__ */ y(Lt, [["render", Dt], ["__scopeId", "data-v-1f8aab9f
|
|
|
763
770
|
"registeredComponents"
|
|
764
771
|
],
|
|
765
772
|
inject: {
|
|
766
|
-
builderContext:
|
|
767
|
-
componentsContext:
|
|
773
|
+
builderContext: BuilderContext.key,
|
|
774
|
+
componentsContext: ComponentsContext.key
|
|
768
775
|
}
|
|
769
776
|
});
|
|
770
|
-
function
|
|
771
|
-
const
|
|
772
|
-
return
|
|
777
|
+
function _sfc_render$e(e, t, n, o, r, s) {
|
|
778
|
+
const i = resolveComponent("block"), a = resolveComponent("block-styles"), c = resolveComponent("blocks-wrapper");
|
|
779
|
+
return openBlock(), createBlock(c, {
|
|
773
780
|
blocks: e.blocks,
|
|
774
781
|
parent: e.parent,
|
|
775
782
|
path: e.path,
|
|
776
783
|
styleProp: e.styleProp
|
|
777
784
|
}, {
|
|
778
|
-
default:
|
|
779
|
-
e.blocks ? (
|
|
780
|
-
key: "render-block-" +
|
|
781
|
-
block:
|
|
785
|
+
default: withCtx(() => [
|
|
786
|
+
e.blocks ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList(e.blocks, (l, d) => (openBlock(), createBlock(i, {
|
|
787
|
+
key: "render-block-" + l.id,
|
|
788
|
+
block: l,
|
|
782
789
|
context: e.context || e.builderContext,
|
|
783
790
|
registeredComponents: e.registeredComponents || e.componentsContext.registeredComponents
|
|
784
|
-
}, null, 8, ["block", "context", "registeredComponents"]))), 128)) :
|
|
785
|
-
e.blocks ? (
|
|
786
|
-
key: "block-style-" +
|
|
787
|
-
block:
|
|
791
|
+
}, null, 8, ["block", "context", "registeredComponents"]))), 128)) : createCommentVNode("v-if", !0),
|
|
792
|
+
e.blocks ? (openBlock(!0), createElementBlock(Fragment$1, { key: 1 }, renderList(e.blocks, (l, d) => (openBlock(), createBlock(a, {
|
|
793
|
+
key: "block-style-" + l.id,
|
|
794
|
+
block: l,
|
|
788
795
|
context: e.context || e.builderContext
|
|
789
|
-
}, null, 8, ["block", "context"]))), 128)) :
|
|
796
|
+
}, null, 8, ["block", "context"]))), 128)) : createCommentVNode("v-if", !0)
|
|
790
797
|
]),
|
|
791
798
|
_: 1
|
|
792
799
|
}, 8, ["blocks", "parent", "path", "styleProp"]);
|
|
793
800
|
}
|
|
794
|
-
const
|
|
801
|
+
const Blocks = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/blocks/blocks.vue"]]), _sfc_main$e = defineComponent({
|
|
795
802
|
name: "builder-columns",
|
|
796
|
-
components: { InlinedStyles
|
|
803
|
+
components: { InlinedStyles, Blocks },
|
|
797
804
|
props: [
|
|
798
805
|
"js",
|
|
799
806
|
"space",
|
|
@@ -810,7 +817,7 @@ const re = /* @__PURE__ */ y(Kt, [["render", zt], ["__file", "/home/runner/work/
|
|
|
810
817
|
cols: this.columns || [],
|
|
811
818
|
stackAt: this.stackColumnsAt || "tablet",
|
|
812
819
|
flexDir: this.stackColumnsAt === "never" ? "row" : this.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
813
|
-
TARGET
|
|
820
|
+
TARGET
|
|
814
821
|
};
|
|
815
822
|
},
|
|
816
823
|
computed: {
|
|
@@ -873,7 +880,7 @@ const re = /* @__PURE__ */ y(Kt, [["render", zt], ["__file", "/home/runner/work/
|
|
|
873
880
|
return this.stackAt === "never" ? t : e;
|
|
874
881
|
},
|
|
875
882
|
columnCssVars(e) {
|
|
876
|
-
const t = e === 0 ? 0 : this.gutterSize, n = this.getColumnCssWidth(e), o = `${t}px`, r = "100%",
|
|
883
|
+
const t = e === 0 ? 0 : this.gutterSize, n = this.getColumnCssWidth(e), o = `${t}px`, r = "100%", s = 0;
|
|
877
884
|
return {
|
|
878
885
|
width: n,
|
|
879
886
|
["margin-left"]: o,
|
|
@@ -882,7 +889,7 @@ const re = /* @__PURE__ */ y(Kt, [["render", zt], ["__file", "/home/runner/work/
|
|
|
882
889
|
desktopStyle: n
|
|
883
890
|
}),
|
|
884
891
|
"--column-margin-left-mobile": this.getMobileStyle({
|
|
885
|
-
stackedStyle:
|
|
892
|
+
stackedStyle: s,
|
|
886
893
|
desktopStyle: o
|
|
887
894
|
}),
|
|
888
895
|
"--column-width-tablet": this.getTabletStyle({
|
|
@@ -890,14 +897,14 @@ const re = /* @__PURE__ */ y(Kt, [["render", zt], ["__file", "/home/runner/work/
|
|
|
890
897
|
desktopStyle: n
|
|
891
898
|
}),
|
|
892
899
|
"--column-margin-left-tablet": this.getTabletStyle({
|
|
893
|
-
stackedStyle:
|
|
900
|
+
stackedStyle: s,
|
|
894
901
|
desktopStyle: o
|
|
895
902
|
})
|
|
896
903
|
};
|
|
897
904
|
},
|
|
898
905
|
getWidthForBreakpointSize(e) {
|
|
899
906
|
var n, o;
|
|
900
|
-
return
|
|
907
|
+
return getSizesForBreakpoints(
|
|
901
908
|
((o = (n = this.builderContext.content) == null ? void 0 : n.meta) == null ? void 0 : o.breakpoints) || {}
|
|
902
909
|
)[e].max;
|
|
903
910
|
},
|
|
@@ -911,78 +918,78 @@ const re = /* @__PURE__ */ y(Kt, [["render", zt], ["__file", "/home/runner/work/
|
|
|
911
918
|
return t;
|
|
912
919
|
}
|
|
913
920
|
}
|
|
914
|
-
});
|
|
915
|
-
function
|
|
916
|
-
const
|
|
917
|
-
return
|
|
921
|
+
}), columns_vue_vue_type_style_index_0_scoped_7be099dc_lang = "";
|
|
922
|
+
function _sfc_render$d(e, t, n, o, r, s) {
|
|
923
|
+
const i = resolveComponent("inlined-styles"), a = resolveComponent("blocks");
|
|
924
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
918
925
|
class: e._classStringToObject(
|
|
919
926
|
`builder-columns ${e.builderBlock.id}-breakpoints div-16nol0lwi20`
|
|
920
927
|
),
|
|
921
928
|
style: e.columnsCssVars
|
|
922
929
|
}, {}), [
|
|
923
|
-
e.TARGET !== "reactNative" ? (
|
|
930
|
+
e.TARGET !== "reactNative" ? (openBlock(), createBlock(i, {
|
|
924
931
|
key: 0,
|
|
925
932
|
styles: e.columnsStyles
|
|
926
|
-
}, null, 8, ["styles"])) :
|
|
927
|
-
(
|
|
928
|
-
key:
|
|
933
|
+
}, null, 8, ["styles"])) : createCommentVNode("v-if", !0),
|
|
934
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.columns, (c, l) => (openBlock(), createElementBlock("div", mergeProps({
|
|
935
|
+
key: l,
|
|
929
936
|
class: "builder-column div-16nol0lwi20-2",
|
|
930
|
-
style: e.columnCssVars(
|
|
937
|
+
style: e.columnCssVars(l)
|
|
931
938
|
}, {}), [
|
|
932
|
-
|
|
933
|
-
path: `component.options.columns.${
|
|
939
|
+
createVNode(a, {
|
|
940
|
+
path: `component.options.columns.${l}.blocks`,
|
|
934
941
|
parent: e.builderBlock.id,
|
|
935
942
|
styleProp: {
|
|
936
943
|
flexGrow: "1"
|
|
937
944
|
},
|
|
938
945
|
context: e.builderContext,
|
|
939
946
|
registeredComponents: e.builderComponents,
|
|
940
|
-
blocks:
|
|
947
|
+
blocks: c.blocks
|
|
941
948
|
}, null, 8, ["path", "parent", "context", "registeredComponents", "blocks"])
|
|
942
949
|
], 16))), 128))
|
|
943
950
|
], 16);
|
|
944
951
|
}
|
|
945
|
-
const
|
|
952
|
+
const Columns = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__scopeId", "data-v-7be099dc"], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/columns/columns.vue"]]), _sfc_main$d = defineComponent({
|
|
946
953
|
name: "builder-fragment-component",
|
|
947
954
|
props: []
|
|
948
955
|
});
|
|
949
|
-
function
|
|
950
|
-
return
|
|
951
|
-
|
|
956
|
+
function _sfc_render$c(e, t, n, o, r, s) {
|
|
957
|
+
return openBlock(), createElementBlock("span", null, [
|
|
958
|
+
renderSlot(e.$slots, "default")
|
|
952
959
|
]);
|
|
953
960
|
}
|
|
954
|
-
const
|
|
955
|
-
function
|
|
961
|
+
const Fragment = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/fragment/fragment.vue"]]);
|
|
962
|
+
function removeProtocol(e) {
|
|
956
963
|
return e.replace(/http(s)?:/, "");
|
|
957
964
|
}
|
|
958
|
-
function
|
|
965
|
+
function updateQueryParam(e = "", t, n) {
|
|
959
966
|
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), r = e.indexOf("?") !== -1 ? "&" : "?";
|
|
960
967
|
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + r + t + "=" + encodeURIComponent(n);
|
|
961
968
|
}
|
|
962
|
-
function
|
|
969
|
+
function getShopifyImageUrl(e, t) {
|
|
963
970
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
964
971
|
return e;
|
|
965
972
|
if (t === "master")
|
|
966
|
-
return
|
|
973
|
+
return removeProtocol(e);
|
|
967
974
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
968
975
|
if (n) {
|
|
969
|
-
const o = e.split(n[0]), r = n[3],
|
|
970
|
-
return
|
|
976
|
+
const o = e.split(n[0]), r = n[3], s = t.match("x") ? t : `${t}x`;
|
|
977
|
+
return removeProtocol(`${o[0]}_${s}${r}`);
|
|
971
978
|
}
|
|
972
979
|
return null;
|
|
973
980
|
}
|
|
974
|
-
function
|
|
981
|
+
function getSrcSet(e) {
|
|
975
982
|
if (!e)
|
|
976
983
|
return e;
|
|
977
984
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
978
985
|
if (e.match(/builder\.io/)) {
|
|
979
986
|
let n = e;
|
|
980
987
|
const o = Number(e.split("?width=")[1]);
|
|
981
|
-
return isNaN(o) || (n = `${n} ${o}w`), t.filter((r) => r !== o).map((r) => `${
|
|
988
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((r) => r !== o).map((r) => `${updateQueryParam(e, "width", r)} ${r}w`).concat([n]).join(", ");
|
|
982
989
|
}
|
|
983
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
990
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [getShopifyImageUrl(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
984
991
|
}
|
|
985
|
-
const
|
|
992
|
+
const _sfc_main$c = defineComponent({
|
|
986
993
|
name: "builder-image",
|
|
987
994
|
props: [
|
|
988
995
|
"image",
|
|
@@ -1006,10 +1013,10 @@ const tn = g({
|
|
|
1006
1013
|
return this.srcset;
|
|
1007
1014
|
if (this.srcset && ((n = this.image) == null ? void 0 : n.includes("builder.io/api/v1/image"))) {
|
|
1008
1015
|
if (!this.srcset.includes(this.image.split("?")[0]))
|
|
1009
|
-
return console.debug("Removed given srcset"),
|
|
1016
|
+
return console.debug("Removed given srcset"), getSrcSet(t);
|
|
1010
1017
|
} else if (this.image && !this.srcset)
|
|
1011
|
-
return
|
|
1012
|
-
return
|
|
1018
|
+
return getSrcSet(t);
|
|
1019
|
+
return getSrcSet(t);
|
|
1013
1020
|
},
|
|
1014
1021
|
webpSrcSet() {
|
|
1015
1022
|
var e;
|
|
@@ -1037,30 +1044,29 @@ const tn = g({
|
|
|
1037
1044
|
return t;
|
|
1038
1045
|
}
|
|
1039
1046
|
}
|
|
1040
|
-
})
|
|
1041
|
-
const nn = ["srcset"], on = ["alt", "role", "src", "srcset", "sizes"], rn = {
|
|
1047
|
+
}), image_vue_vue_type_style_index_0_scoped_58ca75d1_lang = "", _hoisted_1$6 = ["srcset"], _hoisted_2$1 = ["alt", "role", "src", "srcset", "sizes"], _hoisted_3$1 = {
|
|
1042
1048
|
key: 2,
|
|
1043
1049
|
class: "div-1be3j8m9ewb-2"
|
|
1044
1050
|
};
|
|
1045
|
-
function
|
|
1046
|
-
var
|
|
1047
|
-
return
|
|
1048
|
-
|
|
1049
|
-
e.webpSrcSet ? (
|
|
1051
|
+
function _sfc_render$b(e, t, n, o, r, s) {
|
|
1052
|
+
var i, a, c, l;
|
|
1053
|
+
return openBlock(), createElementBlock(Fragment$1, null, [
|
|
1054
|
+
createElementVNode("picture", null, [
|
|
1055
|
+
e.webpSrcSet ? (openBlock(), createElementBlock("source", {
|
|
1050
1056
|
key: 0,
|
|
1051
1057
|
type: "image/webp",
|
|
1052
1058
|
srcset: e.webpSrcSet
|
|
1053
|
-
}, null, 8,
|
|
1054
|
-
|
|
1059
|
+
}, null, 8, _hoisted_1$6)) : createCommentVNode("v-if", !0),
|
|
1060
|
+
createElementVNode("img", {
|
|
1055
1061
|
loading: "lazy",
|
|
1056
1062
|
alt: e.altText,
|
|
1057
1063
|
role: e.altText ? "presentation" : void 0,
|
|
1058
|
-
style:
|
|
1064
|
+
style: normalizeStyle({
|
|
1059
1065
|
objectPosition: e.backgroundPosition || "center",
|
|
1060
1066
|
objectFit: e.backgroundSize || "cover",
|
|
1061
1067
|
...e.aspectRatioCss
|
|
1062
1068
|
}),
|
|
1063
|
-
class:
|
|
1069
|
+
class: normalizeClass(
|
|
1064
1070
|
e._classStringToObject(
|
|
1065
1071
|
"builder-image" + (e.className ? " " + e.className : "") + " img-1be3j8m9ewb"
|
|
1066
1072
|
)
|
|
@@ -1068,30 +1074,30 @@ function sn(e, t, n, o, r, i) {
|
|
|
1068
1074
|
src: e.image,
|
|
1069
1075
|
srcset: e.srcSetToUse,
|
|
1070
1076
|
sizes: e.sizes
|
|
1071
|
-
}, null, 14,
|
|
1077
|
+
}, null, 14, _hoisted_2$1)
|
|
1072
1078
|
]),
|
|
1073
|
-
e.aspectRatio && !(((a = (
|
|
1079
|
+
e.aspectRatio && !(((a = (i = e.builderBlock) == null ? void 0 : i.children) == null ? void 0 : a.length) && e.fitContent) ? (openBlock(), createElementBlock("div", {
|
|
1074
1080
|
key: 0,
|
|
1075
1081
|
class: "builder-image-sizer div-1be3j8m9ewb",
|
|
1076
|
-
style:
|
|
1082
|
+
style: normalizeStyle({
|
|
1077
1083
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
1078
1084
|
})
|
|
1079
|
-
}, null, 4)) :
|
|
1080
|
-
((
|
|
1081
|
-
!e.fitContent && e.$slots.default ? (
|
|
1082
|
-
|
|
1083
|
-
])) :
|
|
1085
|
+
}, null, 4)) : createCommentVNode("v-if", !0),
|
|
1086
|
+
((l = (c = e.builderBlock) == null ? void 0 : c.children) == null ? void 0 : l.length) && e.fitContent ? renderSlot(e.$slots, "default", { key: 1 }, void 0, !0) : createCommentVNode("v-if", !0),
|
|
1087
|
+
!e.fitContent && e.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
1088
|
+
renderSlot(e.$slots, "default", {}, void 0, !0)
|
|
1089
|
+
])) : createCommentVNode("v-if", !0)
|
|
1084
1090
|
], 64);
|
|
1085
1091
|
}
|
|
1086
|
-
const
|
|
1092
|
+
const Image = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-58ca75d1"], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/image/image.vue"]]), _sfc_main$b = defineComponent({
|
|
1087
1093
|
name: "builder-section-component",
|
|
1088
1094
|
props: ["attributes", "maxWidth"],
|
|
1089
1095
|
data() {
|
|
1090
|
-
return { filterAttrs
|
|
1096
|
+
return { filterAttrs };
|
|
1091
1097
|
}
|
|
1092
1098
|
});
|
|
1093
|
-
function
|
|
1094
|
-
return
|
|
1099
|
+
function _sfc_render$a(e, t, n, o, r, s) {
|
|
1100
|
+
return openBlock(), createElementBlock("section", mergeProps({
|
|
1095
1101
|
style: {
|
|
1096
1102
|
width: "100%",
|
|
1097
1103
|
alignSelf: "stretch",
|
|
@@ -1104,16 +1110,16 @@ function cn(e, t, n, o, r, i) {
|
|
|
1104
1110
|
marginLeft: "auto",
|
|
1105
1111
|
marginRight: "auto"
|
|
1106
1112
|
}
|
|
1107
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
1108
|
-
|
|
1113
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
1114
|
+
renderSlot(e.$slots, "default")
|
|
1109
1115
|
], 16);
|
|
1110
1116
|
}
|
|
1111
|
-
const
|
|
1117
|
+
const Section = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/section/section.vue"]]), getTopLevelDomain = (e) => {
|
|
1112
1118
|
if (e === "localhost" || e === "127.0.0.1")
|
|
1113
1119
|
return e;
|
|
1114
1120
|
const t = e.split(".");
|
|
1115
1121
|
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
1116
|
-
},
|
|
1122
|
+
}, getCookieSync = ({
|
|
1117
1123
|
name: e,
|
|
1118
1124
|
canTrack: t
|
|
1119
1125
|
}) => {
|
|
@@ -1121,17 +1127,17 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1121
1127
|
try {
|
|
1122
1128
|
return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
|
|
1123
1129
|
} catch (o) {
|
|
1124
|
-
|
|
1130
|
+
logger.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
1125
1131
|
return;
|
|
1126
1132
|
}
|
|
1127
|
-
},
|
|
1133
|
+
}, getCookie = async (e) => getCookieSync(e), stringifyCookie = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(checkIsDefined).join("; "), SECURE_CONFIG = [["secure", ""], ["SameSite", "None"]], createCookieString = ({
|
|
1128
1134
|
name: e,
|
|
1129
1135
|
value: t,
|
|
1130
1136
|
expires: n
|
|
1131
1137
|
}) => {
|
|
1132
|
-
const r = (
|
|
1133
|
-
return
|
|
1134
|
-
},
|
|
1138
|
+
const r = (isBrowser() ? location.protocol === "https:" : !0) ? SECURE_CONFIG : [[]], s = n ? [["expires", n.toUTCString()]] : [[]], i = [[e, t], ...s, ["path", "/"], ["domain", getTopLevelDomain(window.location.hostname)], ...r];
|
|
1139
|
+
return stringifyCookie(i);
|
|
1140
|
+
}, setCookie = async ({
|
|
1135
1141
|
name: e,
|
|
1136
1142
|
value: t,
|
|
1137
1143
|
expires: n,
|
|
@@ -1140,54 +1146,54 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1140
1146
|
try {
|
|
1141
1147
|
if (!o)
|
|
1142
1148
|
return;
|
|
1143
|
-
const r =
|
|
1149
|
+
const r = createCookieString({
|
|
1144
1150
|
name: e,
|
|
1145
1151
|
value: t,
|
|
1146
1152
|
expires: n
|
|
1147
1153
|
});
|
|
1148
1154
|
document.cookie = r;
|
|
1149
1155
|
} catch (r) {
|
|
1150
|
-
|
|
1156
|
+
logger.warn("[COOKIE] SET error: ", (r == null ? void 0 : r.message) || r);
|
|
1151
1157
|
}
|
|
1152
|
-
},
|
|
1158
|
+
}, BUILDER_STORE_PREFIX = "builder.tests", getContentTestKey = (e) => `${BUILDER_STORE_PREFIX}.${e}`, getContentVariationCookie = ({
|
|
1153
1159
|
contentId: e
|
|
1154
|
-
}) =>
|
|
1155
|
-
name:
|
|
1160
|
+
}) => getCookie({
|
|
1161
|
+
name: getContentTestKey(e),
|
|
1156
1162
|
canTrack: !0
|
|
1157
|
-
}),
|
|
1163
|
+
}), getContentVariationCookieSync = ({
|
|
1158
1164
|
contentId: e
|
|
1159
|
-
}) =>
|
|
1160
|
-
name:
|
|
1165
|
+
}) => getCookieSync({
|
|
1166
|
+
name: getContentTestKey(e),
|
|
1161
1167
|
canTrack: !0
|
|
1162
|
-
}),
|
|
1168
|
+
}), setContentVariationCookie = ({
|
|
1163
1169
|
contentId: e,
|
|
1164
1170
|
value: t
|
|
1165
|
-
}) =>
|
|
1166
|
-
name:
|
|
1171
|
+
}) => setCookie({
|
|
1172
|
+
name: getContentTestKey(e),
|
|
1167
1173
|
value: t,
|
|
1168
1174
|
canTrack: !0
|
|
1169
|
-
}),
|
|
1175
|
+
}), checkIsBuilderContentWithVariations = (e) => checkIsDefined(e.id) && checkIsDefined(e.variations) && Object.keys(e.variations).length > 0, getRandomVariationId = ({
|
|
1170
1176
|
id: e,
|
|
1171
1177
|
variations: t
|
|
1172
1178
|
}) => {
|
|
1173
1179
|
var r;
|
|
1174
1180
|
let n = 0;
|
|
1175
1181
|
const o = Math.random();
|
|
1176
|
-
for (const
|
|
1177
|
-
const
|
|
1178
|
-
if (n +=
|
|
1179
|
-
return
|
|
1182
|
+
for (const s in t) {
|
|
1183
|
+
const i = (r = t[s]) == null ? void 0 : r.testRatio;
|
|
1184
|
+
if (n += i, o < n)
|
|
1185
|
+
return s;
|
|
1180
1186
|
}
|
|
1181
1187
|
return e;
|
|
1182
|
-
},
|
|
1183
|
-
const t =
|
|
1184
|
-
return
|
|
1188
|
+
}, getAndSetVariantId = (e) => {
|
|
1189
|
+
const t = getRandomVariationId(e);
|
|
1190
|
+
return setContentVariationCookie({
|
|
1185
1191
|
contentId: e.id,
|
|
1186
1192
|
value: t
|
|
1187
1193
|
}).catch((n) => {
|
|
1188
|
-
|
|
1194
|
+
logger.error("could not store A/B test variation: ", n);
|
|
1189
1195
|
}), t;
|
|
1190
|
-
},
|
|
1196
|
+
}, getTestFields = ({
|
|
1191
1197
|
item: e,
|
|
1192
1198
|
testGroupId: t
|
|
1193
1199
|
}) => {
|
|
@@ -1200,7 +1206,7 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1200
1206
|
testVariationId: n.id,
|
|
1201
1207
|
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
1202
1208
|
};
|
|
1203
|
-
},
|
|
1209
|
+
}, handleABTestingSync = ({
|
|
1204
1210
|
item: e,
|
|
1205
1211
|
canTrack: t
|
|
1206
1212
|
}) => {
|
|
@@ -1208,14 +1214,14 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1208
1214
|
return e;
|
|
1209
1215
|
if (!e)
|
|
1210
1216
|
return;
|
|
1211
|
-
if (!
|
|
1217
|
+
if (!checkIsBuilderContentWithVariations(e))
|
|
1212
1218
|
return e;
|
|
1213
|
-
const n =
|
|
1219
|
+
const n = getContentVariationCookieSync({
|
|
1214
1220
|
contentId: e.id
|
|
1215
|
-
}) ||
|
|
1221
|
+
}) || getAndSetVariantId({
|
|
1216
1222
|
variations: e.variations,
|
|
1217
1223
|
id: e.id
|
|
1218
|
-
}), o =
|
|
1224
|
+
}), o = getTestFields({
|
|
1219
1225
|
item: e,
|
|
1220
1226
|
testGroupId: n
|
|
1221
1227
|
});
|
|
@@ -1223,18 +1229,18 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1223
1229
|
...e,
|
|
1224
1230
|
...o
|
|
1225
1231
|
};
|
|
1226
|
-
},
|
|
1232
|
+
}, handleABTesting = async ({
|
|
1227
1233
|
item: e,
|
|
1228
1234
|
canTrack: t
|
|
1229
1235
|
}) => {
|
|
1230
|
-
if (!t || !
|
|
1236
|
+
if (!t || !checkIsBuilderContentWithVariations(e))
|
|
1231
1237
|
return e;
|
|
1232
|
-
const o = await
|
|
1238
|
+
const o = await getContentVariationCookie({
|
|
1233
1239
|
contentId: e.id
|
|
1234
|
-
}) ||
|
|
1240
|
+
}) || getAndSetVariantId({
|
|
1235
1241
|
variations: e.variations,
|
|
1236
1242
|
id: e.id
|
|
1237
|
-
}), r =
|
|
1243
|
+
}), r = getTestFields({
|
|
1238
1244
|
item: e,
|
|
1239
1245
|
testGroupId: o
|
|
1240
1246
|
});
|
|
@@ -1242,7 +1248,7 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1242
1248
|
...e,
|
|
1243
1249
|
...r
|
|
1244
1250
|
};
|
|
1245
|
-
},
|
|
1251
|
+
}, getDefaultCanTrack = (e) => checkIsDefined(e) ? e : !0, componentInfo$a = {
|
|
1246
1252
|
name: "Core:Button",
|
|
1247
1253
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1248
1254
|
defaultStyles: {
|
|
@@ -1274,7 +1280,7 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1274
1280
|
}],
|
|
1275
1281
|
static: !0,
|
|
1276
1282
|
noWrap: !0
|
|
1277
|
-
},
|
|
1283
|
+
}, componentInfo$9 = {
|
|
1278
1284
|
name: "Columns",
|
|
1279
1285
|
isRSC: !0,
|
|
1280
1286
|
inputs: [{
|
|
@@ -1452,7 +1458,7 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1452
1458
|
});
|
|
1453
1459
|
}
|
|
1454
1460
|
const n = e.get("columns");
|
|
1455
|
-
Array.isArray(n) && !!n.find((r) => r.get("width")) && (!!n.find((
|
|
1461
|
+
Array.isArray(n) && !!n.find((r) => r.get("width")) && (!!n.find((s) => !s.get("width")) || n.reduce((a, c) => a + c.get("width"), 0) !== 100) && t();
|
|
1456
1462
|
}
|
|
1457
1463
|
}, {
|
|
1458
1464
|
name: "space",
|
|
@@ -1474,7 +1480,7 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1474
1480
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1475
1481
|
advanced: !0
|
|
1476
1482
|
}]
|
|
1477
|
-
},
|
|
1483
|
+
}, componentInfo$8 = {
|
|
1478
1484
|
name: "Custom Code",
|
|
1479
1485
|
static: !0,
|
|
1480
1486
|
requiredPermissions: ["editCode"],
|
|
@@ -1496,7 +1502,7 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1496
1502
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1497
1503
|
advanced: !0
|
|
1498
1504
|
}]
|
|
1499
|
-
}, $
|
|
1505
|
+
}, _sfc_main$a = defineComponent({
|
|
1500
1506
|
name: "builder-custom-code",
|
|
1501
1507
|
props: ["replaceNodes", "code"],
|
|
1502
1508
|
data() {
|
|
@@ -1541,19 +1547,19 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1541
1547
|
return t;
|
|
1542
1548
|
}
|
|
1543
1549
|
}
|
|
1544
|
-
}),
|
|
1545
|
-
function
|
|
1546
|
-
return
|
|
1550
|
+
}), _hoisted_1$5 = ["innerHTML"];
|
|
1551
|
+
function _sfc_render$9(e, t, n, o, r, s) {
|
|
1552
|
+
return openBlock(), createElementBlock("div", {
|
|
1547
1553
|
ref: "elementRef",
|
|
1548
|
-
class:
|
|
1554
|
+
class: normalizeClass(
|
|
1549
1555
|
e._classStringToObject(
|
|
1550
1556
|
"builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")
|
|
1551
1557
|
)
|
|
1552
1558
|
),
|
|
1553
1559
|
innerHTML: e.code
|
|
1554
|
-
}, null, 10,
|
|
1560
|
+
}, null, 10, _hoisted_1$5);
|
|
1555
1561
|
}
|
|
1556
|
-
const
|
|
1562
|
+
const customCode = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/custom-code/custom-code.vue"]]), componentInfo$7 = {
|
|
1557
1563
|
name: "Embed",
|
|
1558
1564
|
static: !0,
|
|
1559
1565
|
inputs: [{
|
|
@@ -1578,7 +1584,7 @@ const xn = /* @__PURE__ */ y($n, [["render", Rn], ["__file", "/home/runner/work/
|
|
|
1578
1584
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1579
1585
|
hideFromUI: !0
|
|
1580
1586
|
}]
|
|
1581
|
-
},
|
|
1587
|
+
}, SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"], isJsScript = (e) => SCRIPT_MIME_TYPES.includes(e.type), _sfc_main$9 = defineComponent({
|
|
1582
1588
|
name: "builder-embed",
|
|
1583
1589
|
props: ["content"],
|
|
1584
1590
|
data() {
|
|
@@ -1611,7 +1617,7 @@ const xn = /* @__PURE__ */ y($n, [["render", Rn], ["__file", "/home/runner/work/
|
|
|
1611
1617
|
this.scriptsInserted.push(n.src);
|
|
1612
1618
|
const o = document.createElement("script");
|
|
1613
1619
|
o.async = !0, o.src = n.src, document.head.appendChild(o);
|
|
1614
|
-
} else if (
|
|
1620
|
+
} else if (isJsScript(n) && !this.scriptsRun.includes(n.innerText))
|
|
1615
1621
|
try {
|
|
1616
1622
|
this.scriptsRun.push(n.innerText), new Function(n.innerText)();
|
|
1617
1623
|
} catch (o) {
|
|
@@ -1620,21 +1626,21 @@ const xn = /* @__PURE__ */ y($n, [["render", Rn], ["__file", "/home/runner/work/
|
|
|
1620
1626
|
}
|
|
1621
1627
|
}
|
|
1622
1628
|
}
|
|
1623
|
-
}),
|
|
1624
|
-
function
|
|
1625
|
-
return
|
|
1629
|
+
}), _hoisted_1$4 = ["innerHTML"];
|
|
1630
|
+
function _sfc_render$8(e, t, n, o, r, s) {
|
|
1631
|
+
return openBlock(), createElementBlock("div", {
|
|
1626
1632
|
class: "builder-embed",
|
|
1627
1633
|
ref: "elem",
|
|
1628
1634
|
innerHTML: e.content
|
|
1629
|
-
}, null, 8,
|
|
1635
|
+
}, null, 8, _hoisted_1$4);
|
|
1630
1636
|
}
|
|
1631
|
-
const
|
|
1637
|
+
const embed = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/embed/embed.vue"]]), componentInfo$6 = {
|
|
1632
1638
|
name: "Fragment",
|
|
1633
1639
|
static: !0,
|
|
1634
1640
|
hidden: !0,
|
|
1635
1641
|
canHaveChildren: !0,
|
|
1636
1642
|
noWrap: !0
|
|
1637
|
-
},
|
|
1643
|
+
}, componentInfo$5 = {
|
|
1638
1644
|
name: "Image",
|
|
1639
1645
|
static: !0,
|
|
1640
1646
|
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",
|
|
@@ -1654,29 +1660,29 @@ const On = /* @__PURE__ */ y(Pn, [["render", Vn], ["__file", "/home/runner/work/
|
|
|
1654
1660
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1655
1661
|
onChange: (e) => {
|
|
1656
1662
|
e.delete("srcset"), e.delete("noWebp");
|
|
1657
|
-
function n(
|
|
1658
|
-
return new Promise((
|
|
1659
|
-
const
|
|
1660
|
-
let
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
},
|
|
1664
|
-
console.warn("Image load failed",
|
|
1665
|
-
}),
|
|
1666
|
-
|
|
1663
|
+
function n(i, a = 6e4) {
|
|
1664
|
+
return new Promise((c, l) => {
|
|
1665
|
+
const d = document.createElement("img");
|
|
1666
|
+
let p = !1;
|
|
1667
|
+
d.onload = () => {
|
|
1668
|
+
p = !0, c(d);
|
|
1669
|
+
}, d.addEventListener("error", (u) => {
|
|
1670
|
+
console.warn("Image load failed", u.error), l(u.error);
|
|
1671
|
+
}), d.src = i, setTimeout(() => {
|
|
1672
|
+
p || l(new Error("Image load timed out"));
|
|
1667
1673
|
}, a);
|
|
1668
1674
|
});
|
|
1669
1675
|
}
|
|
1670
|
-
function o(
|
|
1671
|
-
return Math.round(
|
|
1676
|
+
function o(i) {
|
|
1677
|
+
return Math.round(i * 1e3) / 1e3;
|
|
1672
1678
|
}
|
|
1673
|
-
const r = e.get("image"),
|
|
1674
|
-
if (fetch(r).then((
|
|
1675
|
-
|
|
1676
|
-
}), r && (!
|
|
1677
|
-
return n(r).then((
|
|
1679
|
+
const r = e.get("image"), s = e.get("aspectRatio");
|
|
1680
|
+
if (fetch(r).then((i) => i.blob()).then((i) => {
|
|
1681
|
+
i.type.includes("svg") && e.set("noWebp", !0);
|
|
1682
|
+
}), r && (!s || s === 0.7041))
|
|
1683
|
+
return n(r).then((i) => {
|
|
1678
1684
|
const a = e.get("aspectRatio");
|
|
1679
|
-
e.get("image") === r && (!a || a === 0.7041) &&
|
|
1685
|
+
e.get("image") === r && (!a || a === 0.7041) && i.width && i.height && (e.set("aspectRatio", o(i.height / i.width)), e.set("height", i.height), e.set("width", i.width));
|
|
1680
1686
|
});
|
|
1681
1687
|
}
|
|
1682
1688
|
}, {
|
|
@@ -1734,7 +1740,7 @@ const On = /* @__PURE__ */ y(Pn, [["render", Vn], ["__file", "/home/runner/work/
|
|
|
1734
1740
|
advanced: !0,
|
|
1735
1741
|
defaultValue: 0.7041
|
|
1736
1742
|
}]
|
|
1737
|
-
},
|
|
1743
|
+
}, componentInfo$4 = {
|
|
1738
1744
|
name: "Raw:Img",
|
|
1739
1745
|
hideFromInsertMenu: !0,
|
|
1740
1746
|
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",
|
|
@@ -1747,7 +1753,7 @@ const On = /* @__PURE__ */ y(Pn, [["render", Vn], ["__file", "/home/runner/work/
|
|
|
1747
1753
|
}],
|
|
1748
1754
|
noWrap: !0,
|
|
1749
1755
|
static: !0
|
|
1750
|
-
},
|
|
1756
|
+
}, _sfc_main$8 = defineComponent({
|
|
1751
1757
|
name: "builder-img-component",
|
|
1752
1758
|
props: [
|
|
1753
1759
|
"backgroundSize",
|
|
@@ -1758,11 +1764,11 @@ const On = /* @__PURE__ */ y(Pn, [["render", Vn], ["__file", "/home/runner/work/
|
|
|
1758
1764
|
"attributes"
|
|
1759
1765
|
],
|
|
1760
1766
|
data() {
|
|
1761
|
-
return { isEditing
|
|
1767
|
+
return { isEditing, filterAttrs };
|
|
1762
1768
|
}
|
|
1763
|
-
}),
|
|
1764
|
-
function
|
|
1765
|
-
return
|
|
1769
|
+
}), _hoisted_1$3 = ["alt", "src"];
|
|
1770
|
+
function _sfc_render$7(e, t, n, o, r, s) {
|
|
1771
|
+
return openBlock(), createElementBlock("img", mergeProps({
|
|
1766
1772
|
style: {
|
|
1767
1773
|
objectFit: e.backgroundSize || "cover",
|
|
1768
1774
|
objectPosition: e.backgroundPosition || "center"
|
|
@@ -1770,9 +1776,9 @@ function Ln(e, t, n, o, r, i) {
|
|
|
1770
1776
|
key: e.isEditing() && e.imgSrc || "default-key",
|
|
1771
1777
|
alt: e.altText,
|
|
1772
1778
|
src: e.imgSrc || e.image
|
|
1773
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
1779
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, _hoisted_1$3);
|
|
1774
1780
|
}
|
|
1775
|
-
const
|
|
1781
|
+
const Img = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/img/img.vue"]]), componentInfo$3 = {
|
|
1776
1782
|
name: "Core:Section",
|
|
1777
1783
|
static: !0,
|
|
1778
1784
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1811,7 +1817,7 @@ const Wn = /* @__PURE__ */ y(Fn, [["render", Ln], ["__file", "/home/runner/work/
|
|
|
1811
1817
|
}
|
|
1812
1818
|
}
|
|
1813
1819
|
}]
|
|
1814
|
-
},
|
|
1820
|
+
}, componentInfo$2 = {
|
|
1815
1821
|
name: "Symbol",
|
|
1816
1822
|
noWrap: !0,
|
|
1817
1823
|
static: !0,
|
|
@@ -1844,7 +1850,7 @@ const Wn = /* @__PURE__ */ y(Fn, [["render", Ln], ["__file", "/home/runner/work/
|
|
|
1844
1850
|
hideFromUI: !0,
|
|
1845
1851
|
type: "boolean"
|
|
1846
1852
|
}]
|
|
1847
|
-
},
|
|
1853
|
+
}, componentInfo$1 = {
|
|
1848
1854
|
name: "Text",
|
|
1849
1855
|
static: !0,
|
|
1850
1856
|
isRSC: !0,
|
|
@@ -1862,21 +1868,21 @@ const Wn = /* @__PURE__ */ y(Fn, [["render", Ln], ["__file", "/home/runner/work/
|
|
|
1862
1868
|
height: "auto",
|
|
1863
1869
|
textAlign: "center"
|
|
1864
1870
|
}
|
|
1865
|
-
},
|
|
1871
|
+
}, _sfc_main$7 = defineComponent({
|
|
1866
1872
|
name: "builder-text",
|
|
1867
1873
|
props: ["text"]
|
|
1868
|
-
}),
|
|
1869
|
-
function
|
|
1870
|
-
var
|
|
1871
|
-
return
|
|
1874
|
+
}), _hoisted_1$2 = ["innerHTML"];
|
|
1875
|
+
function _sfc_render$6(e, t, n, o, r, s) {
|
|
1876
|
+
var i;
|
|
1877
|
+
return openBlock(), createElementBlock("div", {
|
|
1872
1878
|
class: "builder-text",
|
|
1873
|
-
innerHTML: ((
|
|
1879
|
+
innerHTML: ((i = e.text) == null ? void 0 : i.toString()) || "",
|
|
1874
1880
|
style: {
|
|
1875
1881
|
outline: "none"
|
|
1876
1882
|
}
|
|
1877
|
-
}, null, 8,
|
|
1883
|
+
}, null, 8, _hoisted_1$2);
|
|
1878
1884
|
}
|
|
1879
|
-
const
|
|
1885
|
+
const Text = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/text/text.vue"]]), componentInfo = {
|
|
1880
1886
|
name: "Video",
|
|
1881
1887
|
canHaveChildren: !0,
|
|
1882
1888
|
defaultStyles: {
|
|
@@ -1957,7 +1963,7 @@ const Jn = /* @__PURE__ */ y(zn, [["render", Gn], ["__file", "/home/runner/work/
|
|
|
1957
1963
|
defaultValue: !0,
|
|
1958
1964
|
advanced: !0
|
|
1959
1965
|
}]
|
|
1960
|
-
},
|
|
1966
|
+
}, _sfc_main$6 = defineComponent({
|
|
1961
1967
|
name: "builder-video",
|
|
1962
1968
|
props: [
|
|
1963
1969
|
"autoPlay",
|
|
@@ -2002,16 +2008,16 @@ const Jn = /* @__PURE__ */ y(zn, [["render", Gn], ["__file", "/home/runner/work/
|
|
|
2002
2008
|
};
|
|
2003
2009
|
}
|
|
2004
2010
|
}
|
|
2005
|
-
}),
|
|
2011
|
+
}), _hoisted_1$1 = { style: {
|
|
2006
2012
|
position: "relative"
|
|
2007
|
-
} },
|
|
2013
|
+
} }, _hoisted_2 = ["preload", "src", "poster"], _hoisted_3 = ["src"], _hoisted_4 = {
|
|
2008
2014
|
key: 1,
|
|
2009
2015
|
style: {
|
|
2010
2016
|
display: "flex",
|
|
2011
2017
|
flexDirection: "column",
|
|
2012
2018
|
alignItems: "stretch"
|
|
2013
2019
|
}
|
|
2014
|
-
},
|
|
2020
|
+
}, _hoisted_5 = {
|
|
2015
2021
|
key: 2,
|
|
2016
2022
|
style: {
|
|
2017
2023
|
pointerEvents: "none",
|
|
@@ -2025,16 +2031,16 @@ const Jn = /* @__PURE__ */ y(zn, [["render", Gn], ["__file", "/home/runner/work/
|
|
|
2025
2031
|
height: "100%"
|
|
2026
2032
|
}
|
|
2027
2033
|
};
|
|
2028
|
-
function
|
|
2029
|
-
var
|
|
2030
|
-
return
|
|
2031
|
-
|
|
2034
|
+
function _sfc_render$5(e, t, n, o, r, s) {
|
|
2035
|
+
var i, a, c, l, d, p, u;
|
|
2036
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
2037
|
+
createElementVNode("video", mergeProps({
|
|
2032
2038
|
class: "builder-video",
|
|
2033
2039
|
preload: e.preload || "metadata",
|
|
2034
2040
|
style: {
|
|
2035
2041
|
width: "100%",
|
|
2036
2042
|
height: "100%",
|
|
2037
|
-
...(
|
|
2043
|
+
...(i = e.attributes) == null ? void 0 : i.style,
|
|
2038
2044
|
objectFit: e.fit,
|
|
2039
2045
|
objectPosition: e.position,
|
|
2040
2046
|
zIndex: 2,
|
|
@@ -2046,78 +2052,78 @@ function oo(e, t, n, o, r, i) {
|
|
|
2046
2052
|
src: e.video || "no-src",
|
|
2047
2053
|
poster: e.posterImage
|
|
2048
2054
|
}, e.spreadProps), [
|
|
2049
|
-
e.lazyLoad ?
|
|
2055
|
+
e.lazyLoad ? createCommentVNode("v-if", !0) : (openBlock(), createElementBlock("source", {
|
|
2050
2056
|
key: 0,
|
|
2051
2057
|
type: "video/mp4",
|
|
2052
2058
|
src: e.video
|
|
2053
|
-
}, null, 8,
|
|
2054
|
-
], 16,
|
|
2055
|
-
e.aspectRatio && !(e.fitContent && ((
|
|
2059
|
+
}, null, 8, _hoisted_3))
|
|
2060
|
+
], 16, _hoisted_2),
|
|
2061
|
+
e.aspectRatio && !(e.fitContent && ((c = (a = e.builderBlock) == null ? void 0 : a.children) == null ? void 0 : c.length)) ? (openBlock(), createElementBlock("div", {
|
|
2056
2062
|
key: 0,
|
|
2057
|
-
style:
|
|
2063
|
+
style: normalizeStyle({
|
|
2058
2064
|
width: "100%",
|
|
2059
2065
|
paddingTop: e.aspectRatio * 100 + "%",
|
|
2060
2066
|
pointerEvents: "none",
|
|
2061
2067
|
fontSize: "0px"
|
|
2062
2068
|
})
|
|
2063
|
-
}, null, 4)) :
|
|
2064
|
-
((
|
|
2065
|
-
|
|
2066
|
-
])) :
|
|
2067
|
-
((
|
|
2068
|
-
|
|
2069
|
-
])) :
|
|
2069
|
+
}, null, 4)) : createCommentVNode("v-if", !0),
|
|
2070
|
+
((d = (l = e.builderBlock) == null ? void 0 : l.children) == null ? void 0 : d.length) && e.fitContent ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
2071
|
+
renderSlot(e.$slots, "default")
|
|
2072
|
+
])) : createCommentVNode("v-if", !0),
|
|
2073
|
+
((u = (p = e.builderBlock) == null ? void 0 : p.children) == null ? void 0 : u.length) && !e.fitContent ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
2074
|
+
renderSlot(e.$slots, "default")
|
|
2075
|
+
])) : createCommentVNode("v-if", !0)
|
|
2070
2076
|
]);
|
|
2071
2077
|
}
|
|
2072
|
-
const
|
|
2073
|
-
component:
|
|
2074
|
-
...
|
|
2078
|
+
const Video = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/video/video.vue"]]), getDefaultRegisteredComponents = () => [{
|
|
2079
|
+
component: Button,
|
|
2080
|
+
...componentInfo$a
|
|
2075
2081
|
}, {
|
|
2076
|
-
component:
|
|
2077
|
-
...
|
|
2082
|
+
component: Columns,
|
|
2083
|
+
...componentInfo$9
|
|
2078
2084
|
}, {
|
|
2079
|
-
component:
|
|
2080
|
-
...
|
|
2085
|
+
component: customCode,
|
|
2086
|
+
...componentInfo$8
|
|
2081
2087
|
}, {
|
|
2082
|
-
component:
|
|
2083
|
-
...
|
|
2088
|
+
component: embed,
|
|
2089
|
+
...componentInfo$7
|
|
2084
2090
|
}, {
|
|
2085
|
-
component:
|
|
2086
|
-
...
|
|
2091
|
+
component: Fragment,
|
|
2092
|
+
...componentInfo$6
|
|
2087
2093
|
}, {
|
|
2088
|
-
component:
|
|
2089
|
-
...
|
|
2094
|
+
component: Image,
|
|
2095
|
+
...componentInfo$5
|
|
2090
2096
|
}, {
|
|
2091
|
-
component:
|
|
2092
|
-
...
|
|
2097
|
+
component: Img,
|
|
2098
|
+
...componentInfo$4
|
|
2093
2099
|
}, {
|
|
2094
|
-
component:
|
|
2095
|
-
...
|
|
2100
|
+
component: Section,
|
|
2101
|
+
...componentInfo$3
|
|
2096
2102
|
}, {
|
|
2097
|
-
component:
|
|
2098
|
-
...
|
|
2103
|
+
component: Symbol$1,
|
|
2104
|
+
...componentInfo$2
|
|
2099
2105
|
}, {
|
|
2100
|
-
component:
|
|
2101
|
-
...
|
|
2106
|
+
component: Text,
|
|
2107
|
+
...componentInfo$1
|
|
2102
2108
|
}, {
|
|
2103
|
-
component:
|
|
2104
|
-
...
|
|
2105
|
-
}],
|
|
2109
|
+
component: Video,
|
|
2110
|
+
...componentInfo
|
|
2111
|
+
}], components = [], createRegisterComponentMessage = (e) => ({
|
|
2106
2112
|
type: "builder.registerComponent",
|
|
2107
|
-
data:
|
|
2108
|
-
}),
|
|
2113
|
+
data: serializeComponentInfo(e)
|
|
2114
|
+
}), serializeFn = (e) => {
|
|
2109
2115
|
const t = e.toString().trim();
|
|
2110
2116
|
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
2111
|
-
},
|
|
2117
|
+
}, serializeValue = (e) => typeof e == "function" ? serializeFn(e) : fastClone(e), serializeComponentInfo = ({
|
|
2112
2118
|
inputs: e,
|
|
2113
2119
|
...t
|
|
2114
2120
|
}) => ({
|
|
2115
|
-
...
|
|
2116
|
-
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [r,
|
|
2121
|
+
...fastClone(t),
|
|
2122
|
+
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [r, s]) => ({
|
|
2117
2123
|
...o,
|
|
2118
|
-
[r]:
|
|
2124
|
+
[r]: serializeValue(s)
|
|
2119
2125
|
}), {}))
|
|
2120
|
-
}),
|
|
2126
|
+
}), UPDATE_COOKIES_AND_STYLES_SCRIPT = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
2121
2127
|
function getAndSetVariantId() {
|
|
2122
2128
|
function setCookie(name, value, days) {
|
|
2123
2129
|
let expires = '';
|
|
@@ -2173,7 +2179,7 @@ const ro = /* @__PURE__ */ y(Qn, [["render", oo], ["__file", "/home/runner/work/
|
|
|
2173
2179
|
}).join('');
|
|
2174
2180
|
styleEl.innerHTML = newStyleStr;
|
|
2175
2181
|
}
|
|
2176
|
-
}`,
|
|
2182
|
+
}`, UPDATE_VARIANT_VISIBILITY_SCRIPT = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
2177
2183
|
if (!navigator.cookieEnabled) {
|
|
2178
2184
|
return;
|
|
2179
2185
|
}
|
|
@@ -2207,75 +2213,75 @@ const ro = /* @__PURE__ */ y(Qn, [["render", oo], ["__file", "/home/runner/work/
|
|
|
2207
2213
|
thisScriptEl?.remove();
|
|
2208
2214
|
}
|
|
2209
2215
|
return;
|
|
2210
|
-
}`,
|
|
2216
|
+
}`, UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME = "builderIoAbTest", UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME = "builderIoRenderContent", getVariants = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
2211
2217
|
...t,
|
|
2212
2218
|
testVariationId: t.id,
|
|
2213
2219
|
id: e == null ? void 0 : e.id
|
|
2214
|
-
})),
|
|
2220
|
+
})), checkShouldRenderVariants = ({
|
|
2215
2221
|
canTrack: e,
|
|
2216
2222
|
content: t
|
|
2217
|
-
}) => !(!(
|
|
2218
|
-
window.${
|
|
2219
|
-
window.${
|
|
2220
|
-
`,
|
|
2221
|
-
window.${
|
|
2222
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
2223
|
-
)`,
|
|
2223
|
+
}) => !(!(getVariants(t).length > 0) || !e), getIsHydrationTarget = (e) => e === "react" || e === "reactNative", isHydrationTarget = getIsHydrationTarget(TARGET), getScriptString = () => `
|
|
2224
|
+
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
|
|
2225
|
+
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
|
|
2226
|
+
`, getUpdateCookieAndStylesScript = (e, t) => `
|
|
2227
|
+
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}(
|
|
2228
|
+
"${t}",${JSON.stringify(e)}, ${isHydrationTarget}
|
|
2229
|
+
)`, getUpdateVariantVisibilityScript = ({
|
|
2224
2230
|
contentId: e,
|
|
2225
2231
|
variationId: t
|
|
2226
|
-
}) => `window.${
|
|
2227
|
-
"${t}", "${e}", ${
|
|
2228
|
-
)`,
|
|
2232
|
+
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
2233
|
+
"${t}", "${e}", ${isHydrationTarget}
|
|
2234
|
+
)`, _sfc_main$5 = defineComponent({
|
|
2229
2235
|
render() {
|
|
2230
|
-
return
|
|
2236
|
+
return h("script", { id: this.id, innerHTML: this.scriptStr });
|
|
2231
2237
|
},
|
|
2232
2238
|
name: "inlined-script",
|
|
2233
2239
|
props: ["scriptStr", "id"]
|
|
2234
|
-
}),
|
|
2235
|
-
function
|
|
2240
|
+
}), InlinedScript = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/inlined-script.vue"]]);
|
|
2241
|
+
function getGlobalThis() {
|
|
2236
2242
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
2237
2243
|
}
|
|
2238
|
-
function
|
|
2239
|
-
const e =
|
|
2244
|
+
function getFetch() {
|
|
2245
|
+
const e = getGlobalThis().fetch;
|
|
2240
2246
|
if (typeof e > "u")
|
|
2241
2247
|
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
2242
2248
|
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
2243
2249
|
return e;
|
|
2244
2250
|
}
|
|
2245
|
-
const
|
|
2246
|
-
function
|
|
2251
|
+
const fetch$1 = getFetch();
|
|
2252
|
+
function flatten(e, t = null, n = ".") {
|
|
2247
2253
|
return Object.keys(e).reduce((o, r) => {
|
|
2248
|
-
const
|
|
2249
|
-
return [typeof
|
|
2254
|
+
const s = e[r], i = [t, r].filter(Boolean).join(n);
|
|
2255
|
+
return [typeof s == "object", s !== null, !(Array.isArray(s) && s.length === 0)].every(Boolean) ? {
|
|
2250
2256
|
...o,
|
|
2251
|
-
...
|
|
2257
|
+
...flatten(s, i, n)
|
|
2252
2258
|
} : {
|
|
2253
2259
|
...o,
|
|
2254
|
-
[
|
|
2260
|
+
[i]: s
|
|
2255
2261
|
};
|
|
2256
2262
|
}, {});
|
|
2257
2263
|
}
|
|
2258
|
-
const
|
|
2264
|
+
const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUILDER_OPTIONS_PREFIX = "options.", convertSearchParamsToQueryObject = (e) => {
|
|
2259
2265
|
const t = {};
|
|
2260
2266
|
return e.forEach((n, o) => {
|
|
2261
2267
|
t[o] = n;
|
|
2262
2268
|
}), t;
|
|
2263
|
-
},
|
|
2269
|
+
}, getBuilderSearchParams = (e) => {
|
|
2264
2270
|
if (!e)
|
|
2265
2271
|
return {};
|
|
2266
|
-
const t =
|
|
2272
|
+
const t = normalizeSearchParams(e), n = {};
|
|
2267
2273
|
return Object.keys(t).forEach((o) => {
|
|
2268
|
-
if (o.startsWith(
|
|
2269
|
-
const r = o.replace(
|
|
2274
|
+
if (o.startsWith(BUILDER_SEARCHPARAMS_PREFIX)) {
|
|
2275
|
+
const r = o.replace(BUILDER_SEARCHPARAMS_PREFIX, "").replace(BUILDER_OPTIONS_PREFIX, "");
|
|
2270
2276
|
n[r] = t[o];
|
|
2271
2277
|
}
|
|
2272
2278
|
}), n;
|
|
2273
|
-
},
|
|
2274
|
-
if (!
|
|
2279
|
+
}, getBuilderSearchParamsFromWindow = () => {
|
|
2280
|
+
if (!isBrowser())
|
|
2275
2281
|
return {};
|
|
2276
2282
|
const e = new URLSearchParams(window.location.search);
|
|
2277
|
-
return
|
|
2278
|
-
},
|
|
2283
|
+
return getBuilderSearchParams(e);
|
|
2284
|
+
}, normalizeSearchParams = (e) => e instanceof URLSearchParams ? convertSearchParamsToQueryObject(e) : e, isPositiveNumber = (e) => typeof e == "number" && !isNaN(e) && e >= 0, generateContentUrl = (e) => {
|
|
2279
2285
|
let {
|
|
2280
2286
|
noTraverse: t = !1
|
|
2281
2287
|
} = e;
|
|
@@ -2283,173 +2289,173 @@ const ko = "v3", he = "builder.", vo = "options.", So = (e) => {
|
|
|
2283
2289
|
limit: n = 30,
|
|
2284
2290
|
userAttributes: o,
|
|
2285
2291
|
query: r,
|
|
2286
|
-
model:
|
|
2287
|
-
apiKey:
|
|
2292
|
+
model: s,
|
|
2293
|
+
apiKey: i,
|
|
2288
2294
|
includeRefs: a = !0,
|
|
2289
|
-
enrich:
|
|
2290
|
-
locale:
|
|
2291
|
-
apiVersion:
|
|
2292
|
-
fields:
|
|
2293
|
-
omit:
|
|
2294
|
-
offset:
|
|
2295
|
-
cacheSeconds:
|
|
2296
|
-
staleCacheSeconds:
|
|
2297
|
-
sort:
|
|
2298
|
-
includeUnpublished:
|
|
2295
|
+
enrich: c,
|
|
2296
|
+
locale: l,
|
|
2297
|
+
apiVersion: d = DEFAULT_API_VERSION,
|
|
2298
|
+
fields: p,
|
|
2299
|
+
omit: u,
|
|
2300
|
+
offset: m,
|
|
2301
|
+
cacheSeconds: f,
|
|
2302
|
+
staleCacheSeconds: b,
|
|
2303
|
+
sort: y,
|
|
2304
|
+
includeUnpublished: v
|
|
2299
2305
|
} = e;
|
|
2300
|
-
if (!
|
|
2306
|
+
if (!i)
|
|
2301
2307
|
throw new Error("Missing API key");
|
|
2302
|
-
if (!["v2", "v3"].includes(
|
|
2303
|
-
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${
|
|
2308
|
+
if (!["v2", "v3"].includes(d))
|
|
2309
|
+
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${d}'`);
|
|
2304
2310
|
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
2305
|
-
const
|
|
2306
|
-
if (
|
|
2307
|
-
const
|
|
2308
|
-
sort:
|
|
2311
|
+
const g = new URL(`https://cdn.builder.io/api/${d}/content/${s}?apiKey=${i}&limit=${n}&noTraverse=${t}&includeRefs=${a}${l ? `&locale=${l}` : ""}${c ? `&enrich=${c}` : ""}`);
|
|
2312
|
+
if (g.searchParams.set("omit", u || "meta.componentsUsed"), p && g.searchParams.set("fields", p), Number.isFinite(m) && m > -1 && g.searchParams.set("offset", String(Math.floor(m))), typeof v == "boolean" && g.searchParams.set("includeUnpublished", String(v)), f && isPositiveNumber(f) && g.searchParams.set("cacheSeconds", String(f)), b && isPositiveNumber(b) && g.searchParams.set("staleCacheSeconds", String(b)), y) {
|
|
2313
|
+
const k = flatten({
|
|
2314
|
+
sort: y
|
|
2309
2315
|
});
|
|
2310
|
-
for (const
|
|
2311
|
-
|
|
2316
|
+
for (const S in k)
|
|
2317
|
+
g.searchParams.set(S, JSON.stringify(k[S]));
|
|
2312
2318
|
}
|
|
2313
|
-
const
|
|
2314
|
-
...
|
|
2315
|
-
...
|
|
2316
|
-
},
|
|
2317
|
-
for (const
|
|
2318
|
-
|
|
2319
|
-
if (o &&
|
|
2320
|
-
const
|
|
2319
|
+
const _ = {
|
|
2320
|
+
...getBuilderSearchParamsFromWindow(),
|
|
2321
|
+
...normalizeSearchParams(e.options || {})
|
|
2322
|
+
}, C = flatten(_);
|
|
2323
|
+
for (const k in C)
|
|
2324
|
+
g.searchParams.set(k, String(C[k]));
|
|
2325
|
+
if (o && g.searchParams.set("userAttributes", JSON.stringify(o)), r) {
|
|
2326
|
+
const k = flatten({
|
|
2321
2327
|
query: r
|
|
2322
2328
|
});
|
|
2323
|
-
for (const
|
|
2324
|
-
|
|
2329
|
+
for (const S in k)
|
|
2330
|
+
g.searchParams.set(S, JSON.stringify(k[S]));
|
|
2325
2331
|
}
|
|
2326
|
-
return
|
|
2327
|
-
},
|
|
2328
|
-
async function
|
|
2329
|
-
const t = await
|
|
2332
|
+
return g;
|
|
2333
|
+
}, checkContentHasResults = (e) => "results" in e;
|
|
2334
|
+
async function fetchOneEntry(e) {
|
|
2335
|
+
const t = await fetchEntries({
|
|
2330
2336
|
...e,
|
|
2331
2337
|
limit: 1
|
|
2332
2338
|
});
|
|
2333
2339
|
return t && t.results[0] || null;
|
|
2334
2340
|
}
|
|
2335
|
-
const
|
|
2336
|
-
const t =
|
|
2337
|
-
return await (await
|
|
2338
|
-
},
|
|
2339
|
-
const o =
|
|
2340
|
-
if (n.search.includes("preview="), !o || !(
|
|
2341
|
+
const getContent = fetchOneEntry, _fetchContent = async (e) => {
|
|
2342
|
+
const t = generateContentUrl(e);
|
|
2343
|
+
return await (await fetch$1(t.href)).json();
|
|
2344
|
+
}, _processContentResult = async (e, t, n = generateContentUrl(e)) => {
|
|
2345
|
+
const o = getDefaultCanTrack(e.canTrack);
|
|
2346
|
+
if (n.search.includes("preview="), !o || !(isBrowser() || TARGET === "reactNative"))
|
|
2341
2347
|
return t;
|
|
2342
2348
|
try {
|
|
2343
2349
|
const r = [];
|
|
2344
|
-
for (const
|
|
2345
|
-
r.push(await
|
|
2346
|
-
item:
|
|
2350
|
+
for (const s of t.results)
|
|
2351
|
+
r.push(await handleABTesting({
|
|
2352
|
+
item: s,
|
|
2347
2353
|
canTrack: o
|
|
2348
2354
|
}));
|
|
2349
2355
|
t.results = r;
|
|
2350
2356
|
} catch (r) {
|
|
2351
|
-
|
|
2357
|
+
logger.error("Could not process A/B tests. ", r);
|
|
2352
2358
|
}
|
|
2353
2359
|
return t;
|
|
2354
2360
|
};
|
|
2355
|
-
async function
|
|
2361
|
+
async function fetchEntries(e) {
|
|
2356
2362
|
try {
|
|
2357
|
-
const t =
|
|
2358
|
-
return
|
|
2363
|
+
const t = generateContentUrl(e), n = await _fetchContent(e);
|
|
2364
|
+
return checkContentHasResults(n) ? _processContentResult(e, n) : (logger.error("Error fetching data. ", {
|
|
2359
2365
|
url: t,
|
|
2360
2366
|
content: n,
|
|
2361
2367
|
options: e
|
|
2362
2368
|
}), null);
|
|
2363
2369
|
} catch (t) {
|
|
2364
|
-
return
|
|
2370
|
+
return logger.error("Error fetching data. ", t), null;
|
|
2365
2371
|
}
|
|
2366
2372
|
}
|
|
2367
|
-
const
|
|
2368
|
-
function
|
|
2369
|
-
return !
|
|
2373
|
+
const getAllContent = fetchEntries;
|
|
2374
|
+
function isPreviewing() {
|
|
2375
|
+
return !isBrowser() || isEditing() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
|
|
2370
2376
|
}
|
|
2371
|
-
function
|
|
2377
|
+
function uuidv4() {
|
|
2372
2378
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
2373
2379
|
const t = Math.random() * 16 | 0;
|
|
2374
2380
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
2375
2381
|
});
|
|
2376
2382
|
}
|
|
2377
|
-
function
|
|
2378
|
-
return
|
|
2383
|
+
function uuid() {
|
|
2384
|
+
return uuidv4().replace(/-/g, "");
|
|
2379
2385
|
}
|
|
2380
|
-
const
|
|
2386
|
+
const SESSION_LOCAL_STORAGE_KEY = "builderSessionId", getSessionId = async ({
|
|
2381
2387
|
canTrack: e
|
|
2382
2388
|
}) => {
|
|
2383
2389
|
if (!e)
|
|
2384
2390
|
return;
|
|
2385
|
-
const t = await
|
|
2386
|
-
name:
|
|
2391
|
+
const t = await getCookie({
|
|
2392
|
+
name: SESSION_LOCAL_STORAGE_KEY,
|
|
2387
2393
|
canTrack: e
|
|
2388
2394
|
});
|
|
2389
|
-
if (
|
|
2395
|
+
if (checkIsDefined(t))
|
|
2390
2396
|
return t;
|
|
2391
2397
|
{
|
|
2392
|
-
const n =
|
|
2393
|
-
return
|
|
2398
|
+
const n = createSessionId();
|
|
2399
|
+
return setSessionId({
|
|
2394
2400
|
id: n,
|
|
2395
2401
|
canTrack: e
|
|
2396
2402
|
}), n;
|
|
2397
2403
|
}
|
|
2398
|
-
},
|
|
2404
|
+
}, createSessionId = () => uuid(), setSessionId = ({
|
|
2399
2405
|
id: e,
|
|
2400
2406
|
canTrack: t
|
|
2401
|
-
}) =>
|
|
2402
|
-
name:
|
|
2407
|
+
}) => setCookie({
|
|
2408
|
+
name: SESSION_LOCAL_STORAGE_KEY,
|
|
2403
2409
|
value: e,
|
|
2404
2410
|
canTrack: t
|
|
2405
|
-
}),
|
|
2411
|
+
}), getLocalStorage = () => isBrowser() && typeof localStorage < "u" ? localStorage : void 0, getLocalStorageItem = ({
|
|
2406
2412
|
key: e,
|
|
2407
2413
|
canTrack: t
|
|
2408
2414
|
}) => {
|
|
2409
2415
|
var n;
|
|
2410
2416
|
try {
|
|
2411
|
-
return t ? (n =
|
|
2417
|
+
return t ? (n = getLocalStorage()) == null ? void 0 : n.getItem(e) : void 0;
|
|
2412
2418
|
} catch (o) {
|
|
2413
2419
|
console.debug("[LocalStorage] GET error: ", o);
|
|
2414
2420
|
return;
|
|
2415
2421
|
}
|
|
2416
|
-
},
|
|
2422
|
+
}, setLocalStorageItem = ({
|
|
2417
2423
|
key: e,
|
|
2418
2424
|
canTrack: t,
|
|
2419
2425
|
value: n
|
|
2420
2426
|
}) => {
|
|
2421
2427
|
var o;
|
|
2422
2428
|
try {
|
|
2423
|
-
t && ((o =
|
|
2429
|
+
t && ((o = getLocalStorage()) == null || o.setItem(e, n));
|
|
2424
2430
|
} catch (r) {
|
|
2425
2431
|
console.debug("[LocalStorage] SET error: ", r);
|
|
2426
2432
|
}
|
|
2427
|
-
},
|
|
2433
|
+
}, VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId", getVisitorId = ({
|
|
2428
2434
|
canTrack: e
|
|
2429
2435
|
}) => {
|
|
2430
2436
|
if (!e)
|
|
2431
2437
|
return;
|
|
2432
|
-
const t =
|
|
2433
|
-
key:
|
|
2438
|
+
const t = getLocalStorageItem({
|
|
2439
|
+
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
2434
2440
|
canTrack: e
|
|
2435
2441
|
});
|
|
2436
|
-
if (
|
|
2442
|
+
if (checkIsDefined(t))
|
|
2437
2443
|
return t;
|
|
2438
2444
|
{
|
|
2439
|
-
const n =
|
|
2440
|
-
return
|
|
2445
|
+
const n = createVisitorId();
|
|
2446
|
+
return setVisitorId({
|
|
2441
2447
|
id: n,
|
|
2442
2448
|
canTrack: e
|
|
2443
2449
|
}), n;
|
|
2444
2450
|
}
|
|
2445
|
-
},
|
|
2451
|
+
}, createVisitorId = () => uuid(), setVisitorId = ({
|
|
2446
2452
|
id: e,
|
|
2447
2453
|
canTrack: t
|
|
2448
|
-
}) =>
|
|
2449
|
-
key:
|
|
2454
|
+
}) => setLocalStorageItem({
|
|
2455
|
+
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
2450
2456
|
value: e,
|
|
2451
2457
|
canTrack: t
|
|
2452
|
-
}),
|
|
2458
|
+
}), getTrackingEventData = async ({
|
|
2453
2459
|
canTrack: e
|
|
2454
2460
|
}) => {
|
|
2455
2461
|
if (!e)
|
|
@@ -2457,16 +2463,16 @@ const Ye = "builderSessionId", xo = async ({
|
|
|
2457
2463
|
visitorId: void 0,
|
|
2458
2464
|
sessionId: void 0
|
|
2459
2465
|
};
|
|
2460
|
-
const t = await
|
|
2466
|
+
const t = await getSessionId({
|
|
2461
2467
|
canTrack: e
|
|
2462
|
-
}), n =
|
|
2468
|
+
}), n = getVisitorId({
|
|
2463
2469
|
canTrack: e
|
|
2464
2470
|
});
|
|
2465
2471
|
return {
|
|
2466
2472
|
sessionId: t,
|
|
2467
2473
|
visitorId: n
|
|
2468
2474
|
};
|
|
2469
|
-
},
|
|
2475
|
+
}, createEvent = async ({
|
|
2470
2476
|
type: e,
|
|
2471
2477
|
canTrack: t,
|
|
2472
2478
|
apiKey: n,
|
|
@@ -2480,23 +2486,23 @@ const Ye = "builderSessionId", xo = async ({
|
|
|
2480
2486
|
url: location.href,
|
|
2481
2487
|
...o
|
|
2482
2488
|
},
|
|
2483
|
-
...await
|
|
2489
|
+
...await getTrackingEventData({
|
|
2484
2490
|
canTrack: t
|
|
2485
2491
|
}),
|
|
2486
|
-
userAttributes:
|
|
2492
|
+
userAttributes: getUserAttributes(),
|
|
2487
2493
|
ownerId: n
|
|
2488
2494
|
}
|
|
2489
2495
|
});
|
|
2490
|
-
async function
|
|
2496
|
+
async function _track(e) {
|
|
2491
2497
|
if (!e.apiKey) {
|
|
2492
|
-
|
|
2498
|
+
logger.error("Missing API key for track call. Please provide your API key.");
|
|
2493
2499
|
return;
|
|
2494
2500
|
}
|
|
2495
|
-
if (!!e.canTrack && !
|
|
2501
|
+
if (!!e.canTrack && !isEditing() && !!(isBrowser() || TARGET === "reactNative"))
|
|
2496
2502
|
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
2497
2503
|
method: "POST",
|
|
2498
2504
|
body: JSON.stringify({
|
|
2499
|
-
events: [await
|
|
2505
|
+
events: [await createEvent(e)]
|
|
2500
2506
|
}),
|
|
2501
2507
|
headers: {
|
|
2502
2508
|
"content-type": "application/json"
|
|
@@ -2506,14 +2512,14 @@ async function ne(e) {
|
|
|
2506
2512
|
console.error("Failed to track: ", t);
|
|
2507
2513
|
});
|
|
2508
2514
|
}
|
|
2509
|
-
const
|
|
2515
|
+
const track = (e) => _track({
|
|
2510
2516
|
...e,
|
|
2511
2517
|
canTrack: !0
|
|
2512
2518
|
});
|
|
2513
|
-
function
|
|
2519
|
+
function round(e) {
|
|
2514
2520
|
return Math.round(e * 1e3) / 1e3;
|
|
2515
2521
|
}
|
|
2516
|
-
const
|
|
2522
|
+
const findParentElement = (e, t, n = !0) => {
|
|
2517
2523
|
if (!(e instanceof HTMLElement))
|
|
2518
2524
|
return null;
|
|
2519
2525
|
let o = n ? e : e.parentElement;
|
|
@@ -2524,38 +2530,38 @@ const Uo = (e, t, n = !0) => {
|
|
|
2524
2530
|
return o;
|
|
2525
2531
|
} while (o = o.parentElement);
|
|
2526
2532
|
return null;
|
|
2527
|
-
},
|
|
2533
|
+
}, findBuilderParent = (e) => findParentElement(e, (t) => {
|
|
2528
2534
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2529
2535
|
return Boolean((n == null ? void 0 : n.indexOf("builder-")) === 0);
|
|
2530
|
-
}),
|
|
2536
|
+
}), computeOffset = ({
|
|
2531
2537
|
event: e,
|
|
2532
2538
|
target: t
|
|
2533
2539
|
}) => {
|
|
2534
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top,
|
|
2540
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, s = round(o / n.width), i = round(r / n.height);
|
|
2535
2541
|
return {
|
|
2536
|
-
x:
|
|
2537
|
-
y:
|
|
2542
|
+
x: s,
|
|
2543
|
+
y: i
|
|
2538
2544
|
};
|
|
2539
|
-
},
|
|
2540
|
-
const t = e.target, n = t &&
|
|
2545
|
+
}, getInteractionPropertiesForEvent = (e) => {
|
|
2546
|
+
const t = e.target, n = t && findBuilderParent(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2541
2547
|
return {
|
|
2542
2548
|
targetBuilderElement: o || void 0,
|
|
2543
2549
|
metadata: {
|
|
2544
|
-
targetOffset: t ?
|
|
2550
|
+
targetOffset: t ? computeOffset({
|
|
2545
2551
|
event: e,
|
|
2546
2552
|
target: t
|
|
2547
2553
|
}) : void 0,
|
|
2548
|
-
builderTargetOffset: n ?
|
|
2554
|
+
builderTargetOffset: n ? computeOffset({
|
|
2549
2555
|
event: e,
|
|
2550
2556
|
target: n
|
|
2551
2557
|
}) : void 0,
|
|
2552
2558
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2553
2559
|
}
|
|
2554
2560
|
};
|
|
2555
|
-
},
|
|
2556
|
-
function
|
|
2557
|
-
let n =
|
|
2558
|
-
if (n || (n =
|
|
2561
|
+
}, SDK_VERSION = "0.8.1", registry = {};
|
|
2562
|
+
function register(e, t) {
|
|
2563
|
+
let n = registry[e];
|
|
2564
|
+
if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
|
|
2559
2565
|
const o = {
|
|
2560
2566
|
type: "builder.register",
|
|
2561
2567
|
data: {
|
|
@@ -2570,8 +2576,8 @@ function Wo(e, t) {
|
|
|
2570
2576
|
}
|
|
2571
2577
|
}
|
|
2572
2578
|
}
|
|
2573
|
-
const
|
|
2574
|
-
|
|
2579
|
+
const registerInsertMenu = () => {
|
|
2580
|
+
register("insertMenu", {
|
|
2575
2581
|
name: "_default",
|
|
2576
2582
|
default: !0,
|
|
2577
2583
|
items: [{
|
|
@@ -2593,14 +2599,14 @@ const Do = () => {
|
|
|
2593
2599
|
}]
|
|
2594
2600
|
});
|
|
2595
2601
|
};
|
|
2596
|
-
let
|
|
2597
|
-
const
|
|
2602
|
+
let isSetupForEditing = !1;
|
|
2603
|
+
const setupBrowserForEditing = (e = {}) => {
|
|
2598
2604
|
var t, n;
|
|
2599
|
-
|
|
2605
|
+
isSetupForEditing || (isSetupForEditing = !0, isBrowser() && ((t = window.parent) == null || t.postMessage({
|
|
2600
2606
|
type: "builder.sdkInfo",
|
|
2601
2607
|
data: {
|
|
2602
|
-
target:
|
|
2603
|
-
version:
|
|
2608
|
+
target: TARGET,
|
|
2609
|
+
version: SDK_VERSION,
|
|
2604
2610
|
supportsPatchUpdates: !1,
|
|
2605
2611
|
supportsAddBlockScoping: !0,
|
|
2606
2612
|
supportsCustomBreakpoints: !0
|
|
@@ -2613,44 +2619,44 @@ const Ho = (e = {}) => {
|
|
|
2613
2619
|
}, "*"), window.addEventListener("message", ({
|
|
2614
2620
|
data: o
|
|
2615
2621
|
}) => {
|
|
2616
|
-
var r,
|
|
2622
|
+
var r, s;
|
|
2617
2623
|
if (!!(o != null && o.type))
|
|
2618
2624
|
switch (o.type) {
|
|
2619
2625
|
case "builder.evaluate": {
|
|
2620
|
-
const
|
|
2621
|
-
let
|
|
2626
|
+
const i = o.data.text, a = o.data.arguments || [], c = o.data.id, l = new Function(i);
|
|
2627
|
+
let d, p = null;
|
|
2622
2628
|
try {
|
|
2623
|
-
|
|
2624
|
-
} catch (
|
|
2625
|
-
|
|
2629
|
+
d = l.apply(null, a);
|
|
2630
|
+
} catch (u) {
|
|
2631
|
+
p = u;
|
|
2626
2632
|
}
|
|
2627
|
-
|
|
2633
|
+
p ? (r = window.parent) == null || r.postMessage({
|
|
2628
2634
|
type: "builder.evaluateError",
|
|
2629
2635
|
data: {
|
|
2630
|
-
id:
|
|
2631
|
-
error:
|
|
2636
|
+
id: c,
|
|
2637
|
+
error: p.message
|
|
2632
2638
|
}
|
|
2633
|
-
}, "*") :
|
|
2634
|
-
var
|
|
2635
|
-
(
|
|
2639
|
+
}, "*") : d && typeof d.then == "function" ? d.then((u) => {
|
|
2640
|
+
var m;
|
|
2641
|
+
(m = window.parent) == null || m.postMessage({
|
|
2636
2642
|
type: "builder.evaluateResult",
|
|
2637
2643
|
data: {
|
|
2638
|
-
id:
|
|
2639
|
-
result:
|
|
2644
|
+
id: c,
|
|
2645
|
+
result: u
|
|
2640
2646
|
}
|
|
2641
2647
|
}, "*");
|
|
2642
|
-
}).catch(console.error) : (
|
|
2648
|
+
}).catch(console.error) : (s = window.parent) == null || s.postMessage({
|
|
2643
2649
|
type: "builder.evaluateResult",
|
|
2644
2650
|
data: {
|
|
2645
|
-
result:
|
|
2646
|
-
id:
|
|
2651
|
+
result: d,
|
|
2652
|
+
id: c
|
|
2647
2653
|
}
|
|
2648
2654
|
}, "*");
|
|
2649
2655
|
break;
|
|
2650
2656
|
}
|
|
2651
2657
|
}
|
|
2652
2658
|
})));
|
|
2653
|
-
},
|
|
2659
|
+
}, _sfc_main$4 = defineComponent({
|
|
2654
2660
|
name: "enable-editor",
|
|
2655
2661
|
props: [
|
|
2656
2662
|
"builderContextSignal",
|
|
@@ -2671,37 +2677,37 @@ const Ho = (e = {}) => {
|
|
|
2671
2677
|
shouldSendResetCookie: !1,
|
|
2672
2678
|
httpReqsData: {},
|
|
2673
2679
|
clicked: !1,
|
|
2674
|
-
builderContext:
|
|
2680
|
+
builderContext: BuilderContext
|
|
2675
2681
|
};
|
|
2676
2682
|
},
|
|
2677
2683
|
provide() {
|
|
2678
2684
|
const e = this;
|
|
2679
2685
|
return {
|
|
2680
|
-
[
|
|
2686
|
+
[BuilderContext.key]: e.builderContextSignal
|
|
2681
2687
|
};
|
|
2682
2688
|
},
|
|
2683
2689
|
mounted() {
|
|
2684
2690
|
(() => {
|
|
2685
2691
|
var n, o;
|
|
2686
|
-
if (
|
|
2687
|
-
if (
|
|
2692
|
+
if (isBrowser()) {
|
|
2693
|
+
if (isEditing() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
2688
2694
|
new CustomEvent("initeditingbldr")
|
|
2689
|
-
), this.builderContextSignal.content &&
|
|
2690
|
-
const
|
|
2691
|
-
|
|
2695
|
+
), this.builderContextSignal.content && getDefaultCanTrack(this.canTrack)) {
|
|
2696
|
+
const s = (n = this.builderContextSignal.content) == null ? void 0 : n.testVariationId, i = (o = this.builderContextSignal.content) == null ? void 0 : o.id, a = this.apiKey;
|
|
2697
|
+
_track({
|
|
2692
2698
|
type: "impression",
|
|
2693
2699
|
canTrack: !0,
|
|
2694
|
-
contentId:
|
|
2700
|
+
contentId: i,
|
|
2695
2701
|
apiKey: a,
|
|
2696
|
-
variationId:
|
|
2702
|
+
variationId: s !== i ? s : void 0
|
|
2697
2703
|
});
|
|
2698
2704
|
}
|
|
2699
|
-
|
|
2705
|
+
isPreviewing() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
2700
2706
|
new CustomEvent("initpreviewingbldr")
|
|
2701
2707
|
);
|
|
2702
2708
|
}
|
|
2703
2709
|
})(), (() => {
|
|
2704
|
-
this.apiKey ||
|
|
2710
|
+
this.apiKey || logger.error(
|
|
2705
2711
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2706
2712
|
), this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
|
|
2707
2713
|
})();
|
|
@@ -2735,7 +2741,7 @@ const Ho = (e = {}) => {
|
|
|
2735
2741
|
}
|
|
2736
2742
|
},
|
|
2737
2743
|
unmounted() {
|
|
2738
|
-
|
|
2744
|
+
isBrowser() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
|
|
2739
2745
|
"builder:component:stateChangeListenerActivated",
|
|
2740
2746
|
this.emitStateUpdate
|
|
2741
2747
|
));
|
|
@@ -2772,7 +2778,7 @@ const Ho = (e = {}) => {
|
|
|
2772
2778
|
},
|
|
2773
2779
|
methods: {
|
|
2774
2780
|
mergeNewContent(e) {
|
|
2775
|
-
var n, o, r,
|
|
2781
|
+
var n, o, r, s, i;
|
|
2776
2782
|
const t = {
|
|
2777
2783
|
...this.builderContextSignal.content,
|
|
2778
2784
|
...e,
|
|
@@ -2783,7 +2789,7 @@ const Ho = (e = {}) => {
|
|
|
2783
2789
|
meta: {
|
|
2784
2790
|
...(o = this.builderContextSignal.content) == null ? void 0 : o.meta,
|
|
2785
2791
|
...e == null ? void 0 : e.meta,
|
|
2786
|
-
breakpoints: ((r = e == null ? void 0 : e.meta) == null ? void 0 : r.breakpoints) || ((
|
|
2792
|
+
breakpoints: ((r = e == null ? void 0 : e.meta) == null ? void 0 : r.breakpoints) || ((i = (s = this.builderContextSignal.content) == null ? void 0 : s.meta) == null ? void 0 : i.breakpoints)
|
|
2787
2793
|
}
|
|
2788
2794
|
};
|
|
2789
2795
|
this.builderContextSignal.content = t;
|
|
@@ -2794,8 +2800,8 @@ const Ho = (e = {}) => {
|
|
|
2794
2800
|
if (t)
|
|
2795
2801
|
switch (t.type) {
|
|
2796
2802
|
case "builder.configureSdk": {
|
|
2797
|
-
const o = t.data, { breakpoints: r, contentId:
|
|
2798
|
-
if (!
|
|
2803
|
+
const o = t.data, { breakpoints: r, contentId: s } = o;
|
|
2804
|
+
if (!s || s !== ((n = this.builderContextSignal.content) == null ? void 0 : n.id))
|
|
2799
2805
|
return;
|
|
2800
2806
|
r && this.mergeNewContent({
|
|
2801
2807
|
meta: {
|
|
@@ -2805,8 +2811,8 @@ const Ho = (e = {}) => {
|
|
|
2805
2811
|
break;
|
|
2806
2812
|
}
|
|
2807
2813
|
case "builder.contentUpdate": {
|
|
2808
|
-
const o = t.data, r = o.key || o.alias || o.entry || o.modelName,
|
|
2809
|
-
r === this.model && (this.mergeNewContent(
|
|
2814
|
+
const o = t.data, r = o.key || o.alias || o.entry || o.modelName, s = o.data;
|
|
2815
|
+
r === this.model && (this.mergeNewContent(s), this.forceReRenderCount = this.forceReRenderCount + 1);
|
|
2810
2816
|
break;
|
|
2811
2817
|
}
|
|
2812
2818
|
}
|
|
@@ -2814,7 +2820,7 @@ const Ho = (e = {}) => {
|
|
|
2814
2820
|
evaluateJsCode() {
|
|
2815
2821
|
var t, n;
|
|
2816
2822
|
const e = (n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.jsCode;
|
|
2817
|
-
e &&
|
|
2823
|
+
e && evaluate({
|
|
2818
2824
|
code: e,
|
|
2819
2825
|
context: this.context || {},
|
|
2820
2826
|
localState: void 0,
|
|
@@ -2826,13 +2832,13 @@ const Ho = (e = {}) => {
|
|
|
2826
2832
|
var t, n;
|
|
2827
2833
|
if (this.builderContextSignal.content) {
|
|
2828
2834
|
const o = (t = this.builderContextSignal.content) == null ? void 0 : t.testVariationId, r = (n = this.builderContextSignal.content) == null ? void 0 : n.id;
|
|
2829
|
-
|
|
2835
|
+
_track({
|
|
2830
2836
|
type: "click",
|
|
2831
|
-
canTrack:
|
|
2837
|
+
canTrack: getDefaultCanTrack(this.canTrack),
|
|
2832
2838
|
contentId: r,
|
|
2833
2839
|
apiKey: this.apiKey,
|
|
2834
2840
|
variationId: o !== r ? o : void 0,
|
|
2835
|
-
...
|
|
2841
|
+
...getInteractionPropertiesForEvent(e),
|
|
2836
2842
|
unique: !this.clicked
|
|
2837
2843
|
});
|
|
2838
2844
|
}
|
|
@@ -2841,7 +2847,7 @@ const Ho = (e = {}) => {
|
|
|
2841
2847
|
evalExpression(e) {
|
|
2842
2848
|
return e.replace(
|
|
2843
2849
|
/{{([^}]+)}}/g,
|
|
2844
|
-
(t, n) =>
|
|
2850
|
+
(t, n) => evaluate({
|
|
2845
2851
|
code: n,
|
|
2846
2852
|
context: this.context || {},
|
|
2847
2853
|
localState: void 0,
|
|
@@ -2851,13 +2857,13 @@ const Ho = (e = {}) => {
|
|
|
2851
2857
|
);
|
|
2852
2858
|
},
|
|
2853
2859
|
handleRequest({ url: e, key: t }) {
|
|
2854
|
-
|
|
2855
|
-
var r,
|
|
2860
|
+
fetch$1(e).then((n) => n.json()).then((n) => {
|
|
2861
|
+
var r, s;
|
|
2856
2862
|
const o = {
|
|
2857
2863
|
...this.builderContextSignal.rootState,
|
|
2858
2864
|
[t]: n
|
|
2859
2865
|
};
|
|
2860
|
-
(
|
|
2866
|
+
(s = (r = this.builderContextSignal).rootSetState) == null || s.call(r, o), this.httpReqsData[t] = !0;
|
|
2861
2867
|
}).catch((n) => {
|
|
2862
2868
|
console.error("error fetching dynamic data", e, n);
|
|
2863
2869
|
});
|
|
@@ -2865,23 +2871,23 @@ const Ho = (e = {}) => {
|
|
|
2865
2871
|
runHttpRequests() {
|
|
2866
2872
|
var t, n, o;
|
|
2867
2873
|
const e = (o = (n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.httpRequests) != null ? o : {};
|
|
2868
|
-
Object.entries(e).forEach(([r,
|
|
2869
|
-
if (
|
|
2870
|
-
const
|
|
2874
|
+
Object.entries(e).forEach(([r, s]) => {
|
|
2875
|
+
if (s && (!this.httpReqsData[r] || isEditing())) {
|
|
2876
|
+
const i = this.evalExpression(s);
|
|
2871
2877
|
this.handleRequest({
|
|
2872
|
-
url:
|
|
2878
|
+
url: i,
|
|
2873
2879
|
key: r
|
|
2874
2880
|
});
|
|
2875
2881
|
}
|
|
2876
2882
|
});
|
|
2877
2883
|
},
|
|
2878
2884
|
emitStateUpdate() {
|
|
2879
|
-
|
|
2885
|
+
isEditing() && window.dispatchEvent(
|
|
2880
2886
|
new CustomEvent(
|
|
2881
2887
|
"builder:component:stateChange",
|
|
2882
2888
|
{
|
|
2883
2889
|
detail: {
|
|
2884
|
-
state:
|
|
2890
|
+
state: fastClone(this.builderContextSignal.rootState),
|
|
2885
2891
|
ref: {
|
|
2886
2892
|
name: this.model
|
|
2887
2893
|
}
|
|
@@ -2891,7 +2897,7 @@ const Ho = (e = {}) => {
|
|
|
2891
2897
|
);
|
|
2892
2898
|
},
|
|
2893
2899
|
elementRef_onIniteditingbldr(e) {
|
|
2894
|
-
this.forceReRenderCount = this.forceReRenderCount + 1, window.addEventListener("message", this.processMessage),
|
|
2900
|
+
this.forceReRenderCount = this.forceReRenderCount + 1, window.addEventListener("message", this.processMessage), registerInsertMenu(), setupBrowserForEditing({
|
|
2895
2901
|
...this.locale ? {
|
|
2896
2902
|
locale: this.locale
|
|
2897
2903
|
} : {},
|
|
@@ -2905,7 +2911,7 @@ const Ho = (e = {}) => {
|
|
|
2905
2911
|
this.builderContextSignal.componentInfos
|
|
2906
2912
|
).forEach((t) => {
|
|
2907
2913
|
var o;
|
|
2908
|
-
const n =
|
|
2914
|
+
const n = createRegisterComponentMessage(t);
|
|
2909
2915
|
(o = window.parent) == null || o.postMessage(n, "*");
|
|
2910
2916
|
}), window.addEventListener(
|
|
2911
2917
|
"builder:component:stateChangeListenerActivated",
|
|
@@ -2916,12 +2922,12 @@ const Ho = (e = {}) => {
|
|
|
2916
2922
|
const t = new URL(location.href).searchParams, n = t.get("builder.preview"), o = t.get(
|
|
2917
2923
|
`builder.preview.${n}`
|
|
2918
2924
|
), r = t.get("apiKey") || t.get("builder.space");
|
|
2919
|
-
n === this.model && r === this.apiKey && (!this.content || o === this.content.id) &&
|
|
2925
|
+
n === this.model && r === this.apiKey && (!this.content || o === this.content.id) && fetchOneEntry({
|
|
2920
2926
|
model: this.model,
|
|
2921
2927
|
apiKey: this.apiKey,
|
|
2922
2928
|
apiVersion: this.builderContextSignal.apiVersion
|
|
2923
|
-
}).then((
|
|
2924
|
-
|
|
2929
|
+
}).then((s) => {
|
|
2930
|
+
s && this.mergeNewContent(s);
|
|
2925
2931
|
});
|
|
2926
2932
|
},
|
|
2927
2933
|
_classStringToObject(e) {
|
|
@@ -2934,32 +2940,32 @@ const Ho = (e = {}) => {
|
|
|
2934
2940
|
return t;
|
|
2935
2941
|
}
|
|
2936
2942
|
}
|
|
2937
|
-
}),
|
|
2938
|
-
function
|
|
2939
|
-
var
|
|
2940
|
-
return e.builderContextSignal.content ? (
|
|
2943
|
+
}), _hoisted_1 = ["builder-content-id", "builder-model"];
|
|
2944
|
+
function _sfc_render$4(e, t, n, o, r, s) {
|
|
2945
|
+
var i, a, c;
|
|
2946
|
+
return e.builderContextSignal.content ? (openBlock(), createElementBlock("div", mergeProps({
|
|
2941
2947
|
key: e.forceReRenderCount,
|
|
2942
2948
|
ref: "elementRef",
|
|
2943
|
-
onClick: t[0] || (t[0] = (
|
|
2944
|
-
"builder-content-id": (
|
|
2949
|
+
onClick: t[0] || (t[0] = (l) => e.onClick(l)),
|
|
2950
|
+
"builder-content-id": (i = e.builderContextSignal.content) == null ? void 0 : i.id,
|
|
2945
2951
|
"builder-model": e.model,
|
|
2946
2952
|
class: e._classStringToObject(
|
|
2947
|
-
`variant-${((a = e.content) == null ? void 0 : a.testVariationId) || ((
|
|
2953
|
+
`variant-${((a = e.content) == null ? void 0 : a.testVariationId) || ((c = e.content) == null ? void 0 : c.id)}`
|
|
2948
2954
|
),
|
|
2949
|
-
onIniteditingbldr: t[1] || (t[1] = (
|
|
2950
|
-
onInitpreviewingbldr: t[2] || (t[2] = (
|
|
2955
|
+
onIniteditingbldr: t[1] || (t[1] = (l) => e.elementRef_onIniteditingbldr(l)),
|
|
2956
|
+
onInitpreviewingbldr: t[2] || (t[2] = (l) => e.elementRef_onInitpreviewingbldr(l))
|
|
2951
2957
|
}, {
|
|
2952
2958
|
...e.showContent ? {} : {
|
|
2953
2959
|
hidden: !0,
|
|
2954
2960
|
"aria-hidden": !0
|
|
2955
2961
|
}
|
|
2956
2962
|
}), [
|
|
2957
|
-
|
|
2958
|
-
], 16,
|
|
2963
|
+
renderSlot(e.$slots, "default")
|
|
2964
|
+
], 16, _hoisted_1)) : createCommentVNode("v-if", !0);
|
|
2959
2965
|
}
|
|
2960
|
-
const
|
|
2961
|
-
var
|
|
2962
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = (
|
|
2966
|
+
const EnableEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/content/components/enable-editor.vue"]]), getCssFromFont = (e) => {
|
|
2967
|
+
var s, i;
|
|
2968
|
+
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = (i = e.fileUrl) != null ? i : (s = e == null ? void 0 : e.files) == null ? void 0 : s.regular;
|
|
2963
2969
|
let r = "";
|
|
2964
2970
|
if (o && t && n && (r += `
|
|
2965
2971
|
@font-face {
|
|
@@ -2972,37 +2978,37 @@ font-weight: 400;
|
|
|
2972
2978
|
for (const a in e.files) {
|
|
2973
2979
|
if (!(String(Number(a)) === a))
|
|
2974
2980
|
continue;
|
|
2975
|
-
const
|
|
2976
|
-
|
|
2981
|
+
const l = e.files[a];
|
|
2982
|
+
l && l !== o && (r += `
|
|
2977
2983
|
@font-face {
|
|
2978
2984
|
font-family: "${t}";
|
|
2979
|
-
src: url('${
|
|
2985
|
+
src: url('${l}') format('woff2');
|
|
2980
2986
|
font-display: fallback;
|
|
2981
2987
|
font-weight: ${a};
|
|
2982
2988
|
}
|
|
2983
2989
|
`.trim());
|
|
2984
2990
|
}
|
|
2985
2991
|
return r;
|
|
2986
|
-
},
|
|
2992
|
+
}, getFontCss = ({
|
|
2987
2993
|
customFonts: e
|
|
2988
2994
|
}) => {
|
|
2989
2995
|
var t;
|
|
2990
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
2991
|
-
},
|
|
2996
|
+
return ((t = e == null ? void 0 : e.map((n) => getCssFromFont(n))) == null ? void 0 : t.join(" ")) || "";
|
|
2997
|
+
}, getCss = ({
|
|
2992
2998
|
cssCode: e,
|
|
2993
2999
|
contentId: t
|
|
2994
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
3000
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", _sfc_main$3 = defineComponent({
|
|
2995
3001
|
name: "content-styles",
|
|
2996
|
-
components: { InlinedStyles
|
|
3002
|
+
components: { InlinedStyles },
|
|
2997
3003
|
props: ["cssCode", "contentId", "customFonts"],
|
|
2998
3004
|
data() {
|
|
2999
3005
|
return {
|
|
3000
3006
|
injectedStyles: `
|
|
3001
|
-
${
|
|
3007
|
+
${getCss({
|
|
3002
3008
|
cssCode: this.cssCode,
|
|
3003
3009
|
contentId: this.contentId
|
|
3004
3010
|
})}
|
|
3005
|
-
${
|
|
3011
|
+
${getFontCss({
|
|
3006
3012
|
customFonts: this.customFonts
|
|
3007
3013
|
})}
|
|
3008
3014
|
|
|
@@ -3022,19 +3028,19 @@ ${Yo({
|
|
|
3022
3028
|
};
|
|
3023
3029
|
}
|
|
3024
3030
|
});
|
|
3025
|
-
function
|
|
3026
|
-
const
|
|
3027
|
-
return
|
|
3031
|
+
function _sfc_render$3(e, t, n, o, r, s) {
|
|
3032
|
+
const i = resolveComponent("inlined-styles");
|
|
3033
|
+
return openBlock(), createBlock(i, { styles: e.injectedStyles }, null, 8, ["styles"]);
|
|
3028
3034
|
}
|
|
3029
|
-
const
|
|
3035
|
+
const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/content/components/styles.vue"]]), getContextStateInitialValue = ({
|
|
3030
3036
|
content: e,
|
|
3031
3037
|
data: t,
|
|
3032
3038
|
locale: n
|
|
3033
3039
|
}) => {
|
|
3034
|
-
var
|
|
3035
|
-
const o = {}, r = ((
|
|
3036
|
-
return (a = (
|
|
3037
|
-
|
|
3040
|
+
var s, i, a;
|
|
3041
|
+
const o = {}, r = ((s = e == null ? void 0 : e.data) == null ? void 0 : s.state) || {};
|
|
3042
|
+
return (a = (i = e == null ? void 0 : e.data) == null ? void 0 : i.inputs) == null || a.forEach((c) => {
|
|
3043
|
+
c.name && c.defaultValue !== void 0 && (o[c.name] = c.defaultValue);
|
|
3038
3044
|
}), {
|
|
3039
3045
|
...o,
|
|
3040
3046
|
...r,
|
|
@@ -3043,7 +3049,7 @@ const er = /* @__PURE__ */ y(Xo, [["render", Zo], ["__file", "/home/runner/work/
|
|
|
3043
3049
|
locale: n
|
|
3044
3050
|
} : {}
|
|
3045
3051
|
};
|
|
3046
|
-
},
|
|
3052
|
+
}, getContentInitialValue = ({
|
|
3047
3053
|
content: e,
|
|
3048
3054
|
data: t
|
|
3049
3055
|
}) => e ? {
|
|
@@ -3053,13 +3059,13 @@ const er = /* @__PURE__ */ y(Xo, [["render", Zo], ["__file", "/home/runner/work/
|
|
|
3053
3059
|
...t
|
|
3054
3060
|
},
|
|
3055
3061
|
meta: e == null ? void 0 : e.meta
|
|
3056
|
-
} : void 0,
|
|
3062
|
+
} : void 0, wrapComponentRef = markRaw, _sfc_main$2 = defineComponent({
|
|
3057
3063
|
name: "content-component",
|
|
3058
3064
|
components: {
|
|
3059
|
-
EnableEditor
|
|
3060
|
-
InlinedScript
|
|
3061
|
-
ContentStyles
|
|
3062
|
-
Blocks
|
|
3065
|
+
EnableEditor,
|
|
3066
|
+
InlinedScript,
|
|
3067
|
+
ContentStyles,
|
|
3068
|
+
Blocks
|
|
3063
3069
|
},
|
|
3064
3070
|
props: [
|
|
3065
3071
|
"content",
|
|
@@ -3079,31 +3085,31 @@ const er = /* @__PURE__ */ y(Xo, [["render", Zo], ["__file", "/home/runner/work/
|
|
|
3079
3085
|
data() {
|
|
3080
3086
|
var e, t;
|
|
3081
3087
|
return {
|
|
3082
|
-
scriptStr:
|
|
3088
|
+
scriptStr: getUpdateVariantVisibilityScript({
|
|
3083
3089
|
variationId: (e = this.content) == null ? void 0 : e.testVariationId,
|
|
3084
3090
|
contentId: (t = this.content) == null ? void 0 : t.id
|
|
3085
3091
|
}),
|
|
3086
3092
|
registeredComponents: [
|
|
3087
|
-
...
|
|
3088
|
-
...
|
|
3093
|
+
...getDefaultRegisteredComponents(),
|
|
3094
|
+
...components,
|
|
3089
3095
|
...this.customComponents || []
|
|
3090
3096
|
].reduce(
|
|
3091
3097
|
(n, { component: o, ...r }) => ({
|
|
3092
3098
|
...n,
|
|
3093
3099
|
[r.name]: {
|
|
3094
|
-
component:
|
|
3095
|
-
...
|
|
3100
|
+
component: wrapComponentRef(o),
|
|
3101
|
+
...serializeComponentInfo(r)
|
|
3096
3102
|
}
|
|
3097
3103
|
}),
|
|
3098
3104
|
{}
|
|
3099
3105
|
),
|
|
3100
3106
|
builderContextSignal: {
|
|
3101
|
-
content:
|
|
3107
|
+
content: getContentInitialValue({
|
|
3102
3108
|
content: this.content,
|
|
3103
3109
|
data: this.data
|
|
3104
3110
|
}),
|
|
3105
3111
|
localState: void 0,
|
|
3106
|
-
rootState:
|
|
3112
|
+
rootState: getContextStateInitialValue({
|
|
3107
3113
|
content: this.content,
|
|
3108
3114
|
data: this.data,
|
|
3109
3115
|
locale: this.locale
|
|
@@ -3113,25 +3119,25 @@ const er = /* @__PURE__ */ y(Xo, [["render", Zo], ["__file", "/home/runner/work/
|
|
|
3113
3119
|
apiKey: this.apiKey,
|
|
3114
3120
|
apiVersion: this.apiVersion,
|
|
3115
3121
|
componentInfos: [
|
|
3116
|
-
...
|
|
3117
|
-
...
|
|
3122
|
+
...getDefaultRegisteredComponents(),
|
|
3123
|
+
...components,
|
|
3118
3124
|
...this.customComponents || []
|
|
3119
3125
|
].reduce(
|
|
3120
3126
|
(n, { component: o, ...r }) => ({
|
|
3121
3127
|
...n,
|
|
3122
|
-
[r.name]:
|
|
3128
|
+
[r.name]: serializeComponentInfo(r)
|
|
3123
3129
|
}),
|
|
3124
3130
|
{}
|
|
3125
3131
|
),
|
|
3126
3132
|
inheritedStyles: {}
|
|
3127
3133
|
},
|
|
3128
|
-
TARGET
|
|
3134
|
+
TARGET
|
|
3129
3135
|
};
|
|
3130
3136
|
},
|
|
3131
3137
|
provide() {
|
|
3132
3138
|
const e = this;
|
|
3133
3139
|
return {
|
|
3134
|
-
[
|
|
3140
|
+
[ComponentsContext.key]: {
|
|
3135
3141
|
registeredComponents: e.registeredComponents
|
|
3136
3142
|
}
|
|
3137
3143
|
};
|
|
@@ -3142,9 +3148,9 @@ const er = /* @__PURE__ */ y(Xo, [["render", Zo], ["__file", "/home/runner/work/
|
|
|
3142
3148
|
}
|
|
3143
3149
|
}
|
|
3144
3150
|
});
|
|
3145
|
-
function
|
|
3146
|
-
const
|
|
3147
|
-
return
|
|
3151
|
+
function _sfc_render$2(e, t, n, o, r, s) {
|
|
3152
|
+
const i = resolveComponent("inlined-script"), a = resolveComponent("content-styles"), c = resolveComponent("blocks"), l = resolveComponent("enable-editor");
|
|
3153
|
+
return openBlock(), createBlock(l, mergeProps({
|
|
3148
3154
|
content: e.content,
|
|
3149
3155
|
model: e.model,
|
|
3150
3156
|
context: e.context,
|
|
@@ -3156,21 +3162,21 @@ function ir(e, t, n, o, r, i) {
|
|
|
3156
3162
|
showContent: e.showContent,
|
|
3157
3163
|
builderContextSignal: e.builderContextSignal
|
|
3158
3164
|
}, {}), {
|
|
3159
|
-
default:
|
|
3160
|
-
var
|
|
3165
|
+
default: withCtx(() => {
|
|
3166
|
+
var d, p, u, m, f, b, y;
|
|
3161
3167
|
return [
|
|
3162
|
-
e.isSsrAbTest ? (
|
|
3168
|
+
e.isSsrAbTest ? (openBlock(), createBlock(i, {
|
|
3163
3169
|
key: 0,
|
|
3164
3170
|
scriptStr: e.scriptStr
|
|
3165
|
-
}, null, 8, ["scriptStr"])) :
|
|
3166
|
-
e.TARGET !== "reactNative" ? (
|
|
3171
|
+
}, null, 8, ["scriptStr"])) : createCommentVNode("v-if", !0),
|
|
3172
|
+
e.TARGET !== "reactNative" ? (openBlock(), createBlock(a, {
|
|
3167
3173
|
key: 1,
|
|
3168
|
-
contentId: (
|
|
3169
|
-
cssCode: (
|
|
3170
|
-
customFonts: (
|
|
3171
|
-
}, null, 8, ["contentId", "cssCode", "customFonts"])) :
|
|
3172
|
-
|
|
3173
|
-
blocks: (
|
|
3174
|
+
contentId: (d = e.builderContextSignal.content) == null ? void 0 : d.id,
|
|
3175
|
+
cssCode: (u = (p = e.builderContextSignal.content) == null ? void 0 : p.data) == null ? void 0 : u.cssCode,
|
|
3176
|
+
customFonts: (f = (m = e.builderContextSignal.content) == null ? void 0 : m.data) == null ? void 0 : f.customFonts
|
|
3177
|
+
}, null, 8, ["contentId", "cssCode", "customFonts"])) : createCommentVNode("v-if", !0),
|
|
3178
|
+
createVNode(c, {
|
|
3179
|
+
blocks: (y = (b = e.builderContextSignal.content) == null ? void 0 : b.data) == null ? void 0 : y.blocks,
|
|
3174
3180
|
context: e.builderContextSignal,
|
|
3175
3181
|
registeredComponents: e.registeredComponents
|
|
3176
3182
|
}, null, 8, ["blocks", "context", "registeredComponents"])
|
|
@@ -3179,12 +3185,12 @@ function ir(e, t, n, o, r, i) {
|
|
|
3179
3185
|
_: 1
|
|
3180
3186
|
}, 16, ["content", "model", "context", "apiKey", "canTrack", "locale", "includeRefs", "enrich", "showContent", "builderContextSignal"]);
|
|
3181
3187
|
}
|
|
3182
|
-
const
|
|
3188
|
+
const ContentComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/content/content.vue"]]), _sfc_main$1 = defineComponent({
|
|
3183
3189
|
name: "content-variants",
|
|
3184
3190
|
components: {
|
|
3185
|
-
InlinedScript
|
|
3186
|
-
InlinedStyles
|
|
3187
|
-
ContentComponent
|
|
3191
|
+
InlinedScript,
|
|
3192
|
+
InlinedStyles,
|
|
3193
|
+
ContentComponent
|
|
3188
3194
|
},
|
|
3189
3195
|
props: [
|
|
3190
3196
|
"canTrack",
|
|
@@ -3202,13 +3208,13 @@ const sr = /* @__PURE__ */ y(rr, [["render", ir], ["__file", "/home/runner/work/
|
|
|
3202
3208
|
],
|
|
3203
3209
|
data() {
|
|
3204
3210
|
return {
|
|
3205
|
-
shouldRenderVariants:
|
|
3206
|
-
canTrack:
|
|
3211
|
+
shouldRenderVariants: checkShouldRenderVariants({
|
|
3212
|
+
canTrack: getDefaultCanTrack(this.canTrack),
|
|
3207
3213
|
content: this.content
|
|
3208
3214
|
}),
|
|
3209
|
-
TARGET
|
|
3210
|
-
getScriptString
|
|
3211
|
-
getVariants
|
|
3215
|
+
TARGET,
|
|
3216
|
+
getScriptString,
|
|
3217
|
+
getVariants
|
|
3212
3218
|
};
|
|
3213
3219
|
},
|
|
3214
3220
|
mounted() {
|
|
@@ -3217,8 +3223,8 @@ const sr = /* @__PURE__ */ y(rr, [["render", ir], ["__file", "/home/runner/work/
|
|
|
3217
3223
|
computed: {
|
|
3218
3224
|
updateCookieAndStylesScriptStr() {
|
|
3219
3225
|
var e;
|
|
3220
|
-
return
|
|
3221
|
-
|
|
3226
|
+
return getUpdateCookieAndStylesScript(
|
|
3227
|
+
getVariants(this.content).map((t) => ({
|
|
3222
3228
|
id: t.testVariationId,
|
|
3223
3229
|
testRatio: t.testRatio
|
|
3224
3230
|
})),
|
|
@@ -3226,37 +3232,37 @@ const sr = /* @__PURE__ */ y(rr, [["render", ir], ["__file", "/home/runner/work/
|
|
|
3226
3232
|
);
|
|
3227
3233
|
},
|
|
3228
3234
|
hideVariantsStyleString() {
|
|
3229
|
-
return
|
|
3235
|
+
return getVariants(this.content).map((e) => `.variant-${e.testVariationId} { display: none; } `).join("");
|
|
3230
3236
|
},
|
|
3231
3237
|
defaultContent() {
|
|
3232
3238
|
var e;
|
|
3233
3239
|
return this.shouldRenderVariants ? {
|
|
3234
3240
|
...this.content,
|
|
3235
3241
|
testVariationId: (e = this.content) == null ? void 0 : e.id
|
|
3236
|
-
} :
|
|
3242
|
+
} : handleABTestingSync({
|
|
3237
3243
|
item: this.content,
|
|
3238
|
-
canTrack:
|
|
3244
|
+
canTrack: getDefaultCanTrack(this.canTrack)
|
|
3239
3245
|
});
|
|
3240
3246
|
}
|
|
3241
3247
|
}
|
|
3242
3248
|
});
|
|
3243
|
-
function
|
|
3244
|
-
var
|
|
3245
|
-
const
|
|
3246
|
-
return
|
|
3247
|
-
!e.__isNestedRender && e.TARGET !== "reactNative" ? (
|
|
3249
|
+
function _sfc_render$1(e, t, n, o, r, s) {
|
|
3250
|
+
var l;
|
|
3251
|
+
const i = resolveComponent("inlined-script"), a = resolveComponent("inlined-styles"), c = resolveComponent("content-component");
|
|
3252
|
+
return openBlock(), createElementBlock(Fragment$1, null, [
|
|
3253
|
+
!e.__isNestedRender && e.TARGET !== "reactNative" ? (openBlock(), createBlock(i, {
|
|
3248
3254
|
key: 0,
|
|
3249
3255
|
scriptStr: e.getScriptString()
|
|
3250
|
-
}, null, 8, ["scriptStr"])) :
|
|
3251
|
-
e.shouldRenderVariants ? (
|
|
3252
|
-
|
|
3253
|
-
id: `variants-styles-${(
|
|
3256
|
+
}, null, 8, ["scriptStr"])) : createCommentVNode("v-if", !0),
|
|
3257
|
+
e.shouldRenderVariants ? (openBlock(), createElementBlock(Fragment$1, { key: 1 }, [
|
|
3258
|
+
createVNode(a, {
|
|
3259
|
+
id: `variants-styles-${(l = e.content) == null ? void 0 : l.id}`,
|
|
3254
3260
|
styles: e.hideVariantsStyleString
|
|
3255
3261
|
}, null, 8, ["id", "styles"]),
|
|
3256
|
-
|
|
3257
|
-
(
|
|
3258
|
-
key:
|
|
3259
|
-
content:
|
|
3262
|
+
createVNode(i, { scriptStr: e.updateCookieAndStylesScriptStr }, null, 8, ["scriptStr"]),
|
|
3263
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.getVariants(e.content), (d, p) => (openBlock(), createBlock(c, {
|
|
3264
|
+
key: d.testVariationId,
|
|
3265
|
+
content: d,
|
|
3260
3266
|
showContent: !1,
|
|
3261
3267
|
model: e.model,
|
|
3262
3268
|
data: e.data,
|
|
@@ -3270,8 +3276,8 @@ function lr(e, t, n, o, r, i) {
|
|
|
3270
3276
|
enrich: e.enrich,
|
|
3271
3277
|
isSsrAbTest: e.shouldRenderVariants
|
|
3272
3278
|
}, null, 8, ["content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "canTrack", "locale", "includeRefs", "enrich", "isSsrAbTest"]))), 128))
|
|
3273
|
-
], 64)) :
|
|
3274
|
-
|
|
3279
|
+
], 64)) : createCommentVNode("v-if", !0),
|
|
3280
|
+
createVNode(c, mergeProps({
|
|
3275
3281
|
content: e.defaultContent,
|
|
3276
3282
|
showContent: !0,
|
|
3277
3283
|
model: e.model,
|
|
@@ -3290,12 +3296,12 @@ function lr(e, t, n, o, r, i) {
|
|
|
3290
3296
|
}), null, 16, ["content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "canTrack", "locale", "includeRefs", "enrich", "isSsrAbTest"])
|
|
3291
3297
|
], 64);
|
|
3292
3298
|
}
|
|
3293
|
-
const
|
|
3299
|
+
const Content = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/content-variants/content-variants.vue"]]), fetchSymbolContent = async ({
|
|
3294
3300
|
builderContextValue: e,
|
|
3295
3301
|
symbol: t
|
|
3296
3302
|
}) => {
|
|
3297
3303
|
if ((t == null ? void 0 : t.model) && (e == null ? void 0 : e.apiKey))
|
|
3298
|
-
return
|
|
3304
|
+
return fetchOneEntry({
|
|
3299
3305
|
model: t.model,
|
|
3300
3306
|
apiKey: e.apiKey,
|
|
3301
3307
|
apiVersion: e.apiVersion,
|
|
@@ -3305,11 +3311,11 @@ const Ze = /* @__PURE__ */ y(ar, [["render", lr], ["__file", "/home/runner/work/
|
|
|
3305
3311
|
}
|
|
3306
3312
|
}
|
|
3307
3313
|
}).catch((n) => {
|
|
3308
|
-
|
|
3314
|
+
logger.error("Could not fetch symbol content: ", n);
|
|
3309
3315
|
});
|
|
3310
|
-
},
|
|
3316
|
+
}, _sfc_main = defineComponent({
|
|
3311
3317
|
name: "builder-symbol",
|
|
3312
|
-
components: { ContentVariants:
|
|
3318
|
+
components: { ContentVariants: Content },
|
|
3313
3319
|
props: [
|
|
3314
3320
|
"js",
|
|
3315
3321
|
"attributes",
|
|
@@ -3320,7 +3326,7 @@ const Ze = /* @__PURE__ */ y(ar, [["render", lr], ["__file", "/home/runner/work/
|
|
|
3320
3326
|
],
|
|
3321
3327
|
data() {
|
|
3322
3328
|
var e;
|
|
3323
|
-
return { contentToUse: (e = this.symbol) == null ? void 0 : e.content, filterAttrs
|
|
3329
|
+
return { contentToUse: (e = this.symbol) == null ? void 0 : e.content, filterAttrs };
|
|
3324
3330
|
},
|
|
3325
3331
|
mounted() {
|
|
3326
3332
|
this.setContent();
|
|
@@ -3351,7 +3357,7 @@ const Ze = /* @__PURE__ */ y(ar, [["render", lr], ["__file", "/home/runner/work/
|
|
|
3351
3357
|
},
|
|
3352
3358
|
methods: {
|
|
3353
3359
|
setContent() {
|
|
3354
|
-
this.contentToUse ||
|
|
3360
|
+
this.contentToUse || fetchSymbolContent({
|
|
3355
3361
|
symbol: this.symbol,
|
|
3356
3362
|
builderContextValue: this.builderContext
|
|
3357
3363
|
}).then((e) => {
|
|
@@ -3369,13 +3375,13 @@ const Ze = /* @__PURE__ */ y(ar, [["render", lr], ["__file", "/home/runner/work/
|
|
|
3369
3375
|
}
|
|
3370
3376
|
}
|
|
3371
3377
|
});
|
|
3372
|
-
function
|
|
3373
|
-
var a,
|
|
3374
|
-
const
|
|
3375
|
-
return
|
|
3378
|
+
function _sfc_render(e, t, n, o, r, s) {
|
|
3379
|
+
var a, c, l, d;
|
|
3380
|
+
const i = resolveComponent("content-variants");
|
|
3381
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
3376
3382
|
class: e._classStringToObject(e.className)
|
|
3377
|
-
}, { ...e.filterAttrs(e.attributes, "v-on:", !1) },
|
|
3378
|
-
|
|
3383
|
+
}, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
3384
|
+
createVNode(i, {
|
|
3379
3385
|
__isNestedRender: !0,
|
|
3380
3386
|
apiVersion: e.builderContext.apiVersion,
|
|
3381
3387
|
apiKey: e.builderContext.apiKey,
|
|
@@ -3384,26 +3390,26 @@ function ur(e, t, n, o, r, i) {
|
|
|
3384
3390
|
data: {
|
|
3385
3391
|
...(a = e.symbol) == null ? void 0 : a.data,
|
|
3386
3392
|
...e.builderContext.localState,
|
|
3387
|
-
...(
|
|
3393
|
+
...(l = (c = e.contentToUse) == null ? void 0 : c.data) == null ? void 0 : l.state
|
|
3388
3394
|
},
|
|
3389
|
-
model: (
|
|
3395
|
+
model: (d = e.symbol) == null ? void 0 : d.model,
|
|
3390
3396
|
content: e.contentToUse
|
|
3391
3397
|
}, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content"])
|
|
3392
3398
|
], 16);
|
|
3393
3399
|
}
|
|
3394
|
-
const
|
|
3395
|
-
function
|
|
3396
|
-
if (
|
|
3397
|
-
Object.assign(
|
|
3400
|
+
const Symbol$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/symbol/symbol.vue"]]), RenderBlocks = Blocks, RenderContent = Content, settings = {};
|
|
3401
|
+
function setEditorSettings(e) {
|
|
3402
|
+
if (isBrowser()) {
|
|
3403
|
+
Object.assign(settings, e);
|
|
3398
3404
|
const t = {
|
|
3399
3405
|
type: "builder.settingsChange",
|
|
3400
|
-
data:
|
|
3406
|
+
data: settings
|
|
3401
3407
|
};
|
|
3402
3408
|
parent.postMessage(t, "*");
|
|
3403
3409
|
}
|
|
3404
3410
|
}
|
|
3405
|
-
const
|
|
3406
|
-
var o, r,
|
|
3411
|
+
const fetchBuilderProps = async (e) => {
|
|
3412
|
+
var o, r, s;
|
|
3407
3413
|
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((r = e.userAttributes) == null ? void 0 : r.urlPath), n = {
|
|
3408
3414
|
...e,
|
|
3409
3415
|
apiKey: e.apiKey,
|
|
@@ -3414,47 +3420,47 @@ const Cr = async (e) => {
|
|
|
3414
3420
|
urlPath: t
|
|
3415
3421
|
} : {}
|
|
3416
3422
|
},
|
|
3417
|
-
options:
|
|
3423
|
+
options: getBuilderSearchParams(e.searchParams || ((s = e.url) == null ? void 0 : s.searchParams) || e.options)
|
|
3418
3424
|
};
|
|
3419
3425
|
return {
|
|
3420
3426
|
apiKey: n.apiKey,
|
|
3421
3427
|
model: n.model,
|
|
3422
|
-
content: await
|
|
3428
|
+
content: await fetchOneEntry(n)
|
|
3423
3429
|
};
|
|
3424
3430
|
};
|
|
3425
3431
|
export {
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3432
|
+
Block as B,
|
|
3433
|
+
Content as C,
|
|
3434
|
+
Fragment as F,
|
|
3435
|
+
Image as I,
|
|
3436
|
+
RenderBlocks as R,
|
|
3437
|
+
Section as S,
|
|
3438
|
+
TARGET as T,
|
|
3439
|
+
Video as V,
|
|
3440
|
+
_export_sfc as _,
|
|
3441
|
+
BlockStyles as a,
|
|
3442
|
+
BuilderContext as b,
|
|
3443
|
+
convertStyleMapToCSSArray as c,
|
|
3444
|
+
Blocks as d,
|
|
3445
|
+
evaluate as e,
|
|
3446
|
+
RenderContent as f,
|
|
3447
|
+
Button as g,
|
|
3448
|
+
Columns as h,
|
|
3449
|
+
Symbol$1 as i,
|
|
3450
|
+
Text as j,
|
|
3451
|
+
isEditing as k,
|
|
3452
|
+
isPreviewing as l,
|
|
3453
|
+
createRegisterComponentMessage as m,
|
|
3454
|
+
_processContentResult as n,
|
|
3455
|
+
fetchEntries as o,
|
|
3456
|
+
fetchOneEntry as p,
|
|
3457
|
+
getAllContent as q,
|
|
3458
|
+
register as r,
|
|
3459
|
+
setEditorSettings as s,
|
|
3460
|
+
getContent as t,
|
|
3461
|
+
getBuilderSearchParams as u,
|
|
3462
|
+
track as v,
|
|
3463
|
+
wrapComponentRef as w,
|
|
3464
|
+
fetchBuilderProps as x,
|
|
3465
|
+
block as y
|
|
3460
3466
|
};
|