@builder.io/sdk-vue 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/_vue2/dist/{block-styles.982735c2.js → block-styles.59ab7031.js} +5 -5
- package/packages/_vue2/dist/{block-styles.6a14fec4.cjs → block-styles.e65d44f5.cjs} +1 -1
- package/packages/_vue2/dist/{block-wrapper.701626ff.cjs → block-wrapper.9745ba6c.cjs} +1 -1
- package/packages/_vue2/dist/{block-wrapper.fbaeab1b.js → block-wrapper.cce236ce.js} +5 -5
- package/packages/_vue2/dist/{block.a18a495f.cjs → block.01a27eab.cjs} +2 -2
- package/packages/_vue2/dist/{block.e9484073.js → block.63da4044.js} +7 -7
- package/packages/_vue2/dist/{blocks-wrapper.4afaccc5.js → blocks-wrapper.2b797dc9.js} +1 -1
- package/packages/_vue2/dist/{blocks-wrapper.e0086c60.cjs → blocks-wrapper.ba2cd603.cjs} +1 -1
- package/packages/_vue2/dist/{component-ref.8772e5f7.cjs → component-ref.2f39178c.cjs} +1 -1
- package/packages/_vue2/dist/{component-ref.ad8ecffe.js → component-ref.4f7cf332.js} +6 -6
- package/packages/_vue2/dist/{content.697b2fbd.js → content.6382aeb4.js} +66 -58
- package/packages/_vue2/dist/{content.fb93079e.cjs → content.7c8b076b.cjs} +1 -1
- package/packages/_vue2/dist/{css.daac46ac.cjs → css.2e7fbfd1.cjs} +1 -1
- package/packages/_vue2/dist/{css.1aff1efe.js → css.8dff19fe.js} +1 -1
- package/packages/_vue2/dist/enable-editor.23d6d28b.cjs +1 -0
- package/packages/_vue2/dist/{enable-editor.8d1c24b0.js → enable-editor.e9efcd2b.js} +9 -10
- package/packages/_vue2/dist/{evaluate.b0496c3f.js → evaluate.df5fb75e.js} +1 -1
- package/packages/_vue2/dist/{evaluate.d1bef2c5.cjs → evaluate.f450642c.cjs} +1 -1
- package/packages/_vue2/dist/{get-block-actions.a39f0f6b.js → get-block-actions.19a0ecef.js} +2 -2
- package/packages/_vue2/dist/get-block-actions.6ca6c225.cjs +1 -0
- package/packages/_vue2/dist/{get-block-properties.3ab4b67f.cjs → get-block-properties.88fdcf9e.cjs} +1 -1
- package/packages/_vue2/dist/{get-block-properties.316bbdf9.js → get-block-properties.d589f252.js} +2 -2
- package/packages/_vue2/dist/{get-processed-block.2c6787e1.js → get-processed-block.23166082.js} +2 -2
- package/packages/_vue2/dist/get-processed-block.5831b148.cjs +1 -0
- package/packages/_vue2/dist/index.d33db46c.cjs +32 -0
- package/packages/_vue2/dist/{index.8352d880.js → index.e6fc80c7.js} +234 -211
- package/packages/_vue2/dist/{inlined-script.874c7b5a.cjs → inlined-script.b449adc4.cjs} +1 -1
- package/packages/_vue2/dist/{inlined-script.b4595308.js → inlined-script.ed4af994.js} +1 -1
- package/packages/_vue2/dist/{inlined-styles.d8b2af39.cjs → inlined-styles.73a58431.cjs} +1 -1
- package/packages/_vue2/dist/{inlined-styles.dd4a079a.js → inlined-styles.e3020f6b.js} +1 -1
- package/packages/_vue2/dist/interactive-element.165bdd65.cjs +1 -0
- package/packages/_vue2/dist/{interactive-element.e2f7ca88.js → interactive-element.6bd49ec9.js} +5 -5
- package/packages/_vue2/dist/{repeated-block.c74334c2.js → repeated-block.0f2faa8d.js} +4 -5
- package/packages/_vue2/dist/repeated-block.1c865156.cjs +1 -0
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +6 -6
- package/packages/_vue2/dist/src/components/blocks/blocks.vue.d.ts +2 -2
- package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue2/dist/src/context/components.context.d.ts +7 -0
- package/packages/_vue2/dist/{styles.367c17da.js → styles.06e1be5f.js} +2 -2
- package/packages/_vue2/dist/{styles.716893e3.cjs → styles.ab30731d.cjs} +3 -3
- package/packages/_vue3/dist/{block-wrapper.caa27b4d.cjs → block-wrapper.8543e3fe.cjs} +1 -1
- package/packages/_vue3/dist/{block-wrapper.0590efed.js → block-wrapper.fa25d8d3.js} +2 -2
- package/packages/_vue3/dist/{component-ref.7c88b254.cjs → component-ref.448dc8fb.cjs} +1 -1
- package/packages/_vue3/dist/{component-ref.9039745a.js → component-ref.72eb813f.js} +2 -2
- package/packages/_vue3/dist/{get-block-actions.cc5999ea.js → get-block-actions.27d7ef56.js} +1 -1
- package/packages/_vue3/dist/{get-block-actions.a8cbb712.cjs → get-block-actions.f8f272df.cjs} +1 -1
- package/packages/_vue3/dist/{index.52e5e57e.js → index.4a0c8828.js} +584 -569
- package/packages/_vue3/dist/{index.a789f147.cjs → index.95dacfa2.cjs} +26 -26
- package/packages/_vue3/dist/{repeated-block.1eba0fc4.js → repeated-block.11b2de7c.js} +2 -2
- package/packages/_vue3/dist/{repeated-block.e0f9db51.cjs → repeated-block.f55959d7.cjs} +1 -1
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +1 -1
- package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +3 -3
- package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +3 -3
- package/packages/_vue3/dist/src/components/blocks/blocks.vue.d.ts +2 -2
- package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue3/dist/src/context/components.context.d.ts +7 -0
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/builder.context.29ec27bd.js +0 -18
- package/packages/_vue2/dist/builder.context.e22f06a0.cjs +0 -1
- package/packages/_vue2/dist/enable-editor.12c3716b.cjs +0 -1
- package/packages/_vue2/dist/get-block-actions.88b6dbbf.cjs +0 -1
- package/packages/_vue2/dist/get-processed-block.deb6b33a.cjs +0 -1
- package/packages/_vue2/dist/index.051a3d7b.cjs +0 -32
- package/packages/_vue2/dist/interactive-element.12db10c4.cjs +0 -1
- package/packages/_vue2/dist/repeated-block.0343c63e.cjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as g } from "vue";
|
|
2
|
-
function
|
|
2
|
+
function V(e = {}, t, n) {
|
|
3
3
|
const o = {};
|
|
4
4
|
for (const r in e) {
|
|
5
5
|
if (!e[r] || n && !r.startsWith(t))
|
|
@@ -13,7 +13,7 @@ const tt = g({
|
|
|
13
13
|
name: "builder-button",
|
|
14
14
|
props: ["attributes", "text", "link", "openLinkInNewTab"],
|
|
15
15
|
data() {
|
|
16
|
-
return { filterAttrs:
|
|
16
|
+
return { filterAttrs: V };
|
|
17
17
|
},
|
|
18
18
|
methods: {
|
|
19
19
|
_classStringToObject(e) {
|
|
@@ -41,9 +41,9 @@ function b(e, t, n, o, r, s, i, u) {
|
|
|
41
41
|
} : r), d)
|
|
42
42
|
if (a.functional) {
|
|
43
43
|
a._injectStyles = d;
|
|
44
|
-
var
|
|
45
|
-
a.render = function(
|
|
46
|
-
return d.call(l), m
|
|
44
|
+
var f = a.render;
|
|
45
|
+
a.render = function(m, l) {
|
|
46
|
+
return d.call(l), f(m, l);
|
|
47
47
|
};
|
|
48
48
|
} else {
|
|
49
49
|
var p = a.beforeCreate;
|
|
@@ -67,7 +67,7 @@ var et = function() {
|
|
|
67
67
|
null,
|
|
68
68
|
null
|
|
69
69
|
);
|
|
70
|
-
const
|
|
70
|
+
const nn = ot.exports, A = (e) => JSON.parse(JSON.stringify(e)), F = {
|
|
71
71
|
small: {
|
|
72
72
|
min: 320,
|
|
73
73
|
default: 321,
|
|
@@ -83,11 +83,11 @@ const Ye = ot.exports, V = (e) => JSON.parse(JSON.stringify(e)), F = {
|
|
|
83
83
|
default: 991,
|
|
84
84
|
max: 1200
|
|
85
85
|
}
|
|
86
|
-
},
|
|
86
|
+
}, on = (e, t = F) => `@media (max-width: ${t[e].max}px)`, rt = ({
|
|
87
87
|
small: e,
|
|
88
88
|
medium: t
|
|
89
89
|
}) => {
|
|
90
|
-
const n =
|
|
90
|
+
const n = A(F);
|
|
91
91
|
if (!e || !t)
|
|
92
92
|
return n;
|
|
93
93
|
const o = Math.floor(e / 2);
|
|
@@ -108,12 +108,12 @@ const Ye = ot.exports, V = (e) => JSON.parse(JSON.stringify(e)), F = {
|
|
|
108
108
|
min: s,
|
|
109
109
|
default: s + 1
|
|
110
110
|
}, n;
|
|
111
|
-
}, w = "vue2", st = () => Promise.resolve().then(() =>
|
|
111
|
+
}, w = "vue2", st = () => Promise.resolve().then(() => Et).then((e) => e.default).catch((e) => {
|
|
112
112
|
throw console.error(
|
|
113
113
|
"Error while attempting to dynamically import component Blocks at ../../components/blocks/blocks.vue",
|
|
114
114
|
e
|
|
115
115
|
), e;
|
|
116
|
-
}), it = () => import("./inlined-styles.
|
|
116
|
+
}), it = () => import("./inlined-styles.e3020f6b.js").then((e) => e.default).catch((e) => {
|
|
117
117
|
throw console.error(
|
|
118
118
|
"Error while attempting to dynamically import component InlinedStyles at ../../components/inlined-styles.vue",
|
|
119
119
|
e
|
|
@@ -258,24 +258,24 @@ var ct = function() {
|
|
|
258
258
|
null,
|
|
259
259
|
null
|
|
260
260
|
);
|
|
261
|
-
const
|
|
261
|
+
const rn = ut.exports, dt = g({
|
|
262
262
|
name: "builder-fragment-component",
|
|
263
263
|
props: []
|
|
264
264
|
});
|
|
265
|
-
var
|
|
265
|
+
var mt = function() {
|
|
266
266
|
var t = this, n = t._self._c;
|
|
267
267
|
return t._self._setupProxy, n("span", [t._t("default")], 2);
|
|
268
|
-
},
|
|
268
|
+
}, ft = [], pt = /* @__PURE__ */ b(
|
|
269
269
|
dt,
|
|
270
|
-
ft,
|
|
271
270
|
mt,
|
|
271
|
+
ft,
|
|
272
272
|
!1,
|
|
273
273
|
null,
|
|
274
274
|
null,
|
|
275
275
|
null,
|
|
276
276
|
null
|
|
277
277
|
);
|
|
278
|
-
const
|
|
278
|
+
const sn = pt.exports;
|
|
279
279
|
function P(e) {
|
|
280
280
|
return e.replace(/http(s)?:/, "");
|
|
281
281
|
}
|
|
@@ -384,27 +384,44 @@ var bt = function() {
|
|
|
384
384
|
null,
|
|
385
385
|
null
|
|
386
386
|
);
|
|
387
|
-
const
|
|
387
|
+
const an = vt.exports, St = Symbol(), kt = {
|
|
388
|
+
Builder: {
|
|
389
|
+
content: null,
|
|
390
|
+
context: {},
|
|
391
|
+
localState: void 0,
|
|
392
|
+
rootSetState() {
|
|
393
|
+
},
|
|
394
|
+
rootState: {},
|
|
395
|
+
apiKey: null,
|
|
396
|
+
apiVersion: void 0,
|
|
397
|
+
componentInfos: {},
|
|
398
|
+
inheritedStyles: {}
|
|
399
|
+
},
|
|
400
|
+
key: St
|
|
401
|
+
}, xt = Symbol(), wt = {
|
|
402
|
+
Components: { registeredComponents: {} },
|
|
403
|
+
key: xt
|
|
404
|
+
}, Ct = () => import("./block-styles.59ab7031.js").then((e) => e.default).catch((e) => {
|
|
388
405
|
throw console.error(
|
|
389
406
|
"Error while attempting to dynamically import component BlockStyles at ../block/components/block-styles.vue",
|
|
390
407
|
e
|
|
391
408
|
), e;
|
|
392
|
-
}),
|
|
409
|
+
}), $t = () => import("./block.63da4044.js").then((e) => e.default).catch((e) => {
|
|
393
410
|
throw console.error(
|
|
394
411
|
"Error while attempting to dynamically import component Block at ../block/block.vue",
|
|
395
412
|
e
|
|
396
413
|
), e;
|
|
397
|
-
}),
|
|
414
|
+
}), Tt = () => import("./blocks-wrapper.2b797dc9.js").then((e) => e.default).catch((e) => {
|
|
398
415
|
throw console.error(
|
|
399
416
|
"Error while attempting to dynamically import component BlocksWrapper at ./blocks-wrapper.vue",
|
|
400
417
|
e
|
|
401
418
|
), e;
|
|
402
|
-
}),
|
|
419
|
+
}), It = g({
|
|
403
420
|
name: "builder-blocks",
|
|
404
421
|
components: {
|
|
405
|
-
"blocks-wrapper":
|
|
406
|
-
block:
|
|
407
|
-
"block-styles":
|
|
422
|
+
"blocks-wrapper": Tt,
|
|
423
|
+
block: $t,
|
|
424
|
+
"block-styles": Ct
|
|
408
425
|
},
|
|
409
426
|
props: [
|
|
410
427
|
"blocks",
|
|
@@ -413,36 +430,40 @@ const nn = vt.exports, St = () => import("./block-styles.982735c2.js").then((e)
|
|
|
413
430
|
"styleProp",
|
|
414
431
|
"context",
|
|
415
432
|
"registeredComponents"
|
|
416
|
-
]
|
|
433
|
+
],
|
|
434
|
+
inject: {
|
|
435
|
+
builderContext: kt.key,
|
|
436
|
+
componentsContext: wt.key
|
|
437
|
+
}
|
|
417
438
|
});
|
|
418
|
-
var
|
|
439
|
+
var Rt = function() {
|
|
419
440
|
var t = this, n = t._self._c;
|
|
420
441
|
return t._self._setupProxy, n("blocks-wrapper", { attrs: { blocks: t.blocks, parent: t.parent, path: t.path, styleProp: t.styleProp } }, [t.blocks ? t._l(t.blocks, function(o, r) {
|
|
421
|
-
return n("block", { key: "render-block-" + o.id, attrs: { block: o, context: t.context, registeredComponents: t.registeredComponents } });
|
|
442
|
+
return n("block", { key: "render-block-" + o.id, attrs: { block: o, context: t.context || t.builderContext, registeredComponents: t.registeredComponents || t.componentsContext.registeredComponents } });
|
|
422
443
|
}) : t._e(), t.blocks ? t._l(t.blocks, function(o, r) {
|
|
423
|
-
return n("block-styles", { key: "block-style-" + o.id, attrs: { block: o, context: t.context } });
|
|
444
|
+
return n("block-styles", { key: "block-style-" + o.id, attrs: { block: o, context: t.context || t.builderContext } });
|
|
424
445
|
}) : t._e()], 2);
|
|
425
|
-
},
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
446
|
+
}, Vt = [], At = /* @__PURE__ */ b(
|
|
447
|
+
It,
|
|
448
|
+
Rt,
|
|
449
|
+
Vt,
|
|
429
450
|
!1,
|
|
430
451
|
null,
|
|
431
452
|
null,
|
|
432
453
|
null,
|
|
433
454
|
null
|
|
434
455
|
);
|
|
435
|
-
const
|
|
456
|
+
const Ot = At.exports, Et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
436
457
|
__proto__: null,
|
|
437
|
-
default:
|
|
438
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
458
|
+
default: Ot
|
|
459
|
+
}, Symbol.toStringTag, { value: "Module" })), Pt = g({
|
|
439
460
|
name: "builder-section-component",
|
|
440
461
|
props: ["attributes", "maxWidth"],
|
|
441
462
|
data() {
|
|
442
|
-
return { filterAttrs:
|
|
463
|
+
return { filterAttrs: V };
|
|
443
464
|
}
|
|
444
465
|
});
|
|
445
|
-
var
|
|
466
|
+
var jt = function() {
|
|
446
467
|
var t = this, n = t._self._c;
|
|
447
468
|
return t._self._setupProxy, n("section", t._g(t._b({ style: {
|
|
448
469
|
width: "100%",
|
|
@@ -456,17 +477,17 @@ var Vt = function() {
|
|
|
456
477
|
marginLeft: "auto",
|
|
457
478
|
marginRight: "auto"
|
|
458
479
|
} }, "section", t.filterAttrs(t.attributes, "v-on:", !1), !1), t.filterAttrs(t.attributes, "v-on:", !0)), [t._t("default")], 2);
|
|
459
|
-
},
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
480
|
+
}, Bt = [], Nt = /* @__PURE__ */ b(
|
|
481
|
+
Pt,
|
|
482
|
+
jt,
|
|
483
|
+
Bt,
|
|
463
484
|
!1,
|
|
464
485
|
null,
|
|
465
486
|
null,
|
|
466
487
|
null,
|
|
467
488
|
null
|
|
468
489
|
);
|
|
469
|
-
const
|
|
490
|
+
const cn = Nt.exports;
|
|
470
491
|
function y() {
|
|
471
492
|
return typeof window < "u" && typeof document < "u";
|
|
472
493
|
}
|
|
@@ -475,7 +496,7 @@ const C = "[Builder.io]: ", v = {
|
|
|
475
496
|
error: (...e) => console.error(C, ...e),
|
|
476
497
|
warn: (...e) => console.warn(C, ...e),
|
|
477
498
|
debug: (...e) => console.debug(C, ...e)
|
|
478
|
-
}, x = (e) => e != null,
|
|
499
|
+
}, x = (e) => e != null, Ft = (e) => {
|
|
479
500
|
if (e === "localhost" || e === "127.0.0.1")
|
|
480
501
|
return e;
|
|
481
502
|
const t = e.split(".");
|
|
@@ -491,13 +512,13 @@ const C = "[Builder.io]: ", v = {
|
|
|
491
512
|
v.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
492
513
|
return;
|
|
493
514
|
}
|
|
494
|
-
}, M = async (e) => U(e),
|
|
515
|
+
}, M = async (e) => U(e), Ut = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(x).join("; "), Mt = [["secure", ""], ["SameSite", "None"]], Wt = ({
|
|
495
516
|
name: e,
|
|
496
517
|
value: t,
|
|
497
518
|
expires: n
|
|
498
519
|
}) => {
|
|
499
|
-
const r = (y() ? location.protocol === "https:" : !0) ?
|
|
500
|
-
return
|
|
520
|
+
const r = (y() ? location.protocol === "https:" : !0) ? Mt : [[]], s = n ? [["expires", n.toUTCString()]] : [[]], i = [[e, t], ...s, ["path", "/"], ["domain", Ft(window.location.hostname)], ...r];
|
|
521
|
+
return Ut(i);
|
|
501
522
|
}, W = async ({
|
|
502
523
|
name: e,
|
|
503
524
|
value: t,
|
|
@@ -507,7 +528,7 @@ const C = "[Builder.io]: ", v = {
|
|
|
507
528
|
try {
|
|
508
529
|
if (!o)
|
|
509
530
|
return;
|
|
510
|
-
const r =
|
|
531
|
+
const r = Wt({
|
|
511
532
|
name: e,
|
|
512
533
|
value: t,
|
|
513
534
|
expires: n
|
|
@@ -516,24 +537,24 @@ const C = "[Builder.io]: ", v = {
|
|
|
516
537
|
} catch (r) {
|
|
517
538
|
v.warn("[COOKIE] SET error: ", (r == null ? void 0 : r.message) || r);
|
|
518
539
|
}
|
|
519
|
-
},
|
|
540
|
+
}, Lt = "builder.tests", O = (e) => `${Lt}.${e}`, Kt = ({
|
|
520
541
|
contentId: e
|
|
521
542
|
}) => M({
|
|
522
543
|
name: O(e),
|
|
523
544
|
canTrack: !0
|
|
524
|
-
}),
|
|
545
|
+
}), zt = ({
|
|
525
546
|
contentId: e
|
|
526
547
|
}) => U({
|
|
527
548
|
name: O(e),
|
|
528
549
|
canTrack: !0
|
|
529
|
-
}),
|
|
550
|
+
}), Dt = ({
|
|
530
551
|
contentId: e,
|
|
531
552
|
value: t
|
|
532
553
|
}) => W({
|
|
533
554
|
name: O(e),
|
|
534
555
|
value: t,
|
|
535
556
|
canTrack: !0
|
|
536
|
-
}), L = (e) => x(e.id) && x(e.variations) && Object.keys(e.variations).length > 0,
|
|
557
|
+
}), L = (e) => x(e.id) && x(e.variations) && Object.keys(e.variations).length > 0, Gt = ({
|
|
537
558
|
id: e,
|
|
538
559
|
variations: t
|
|
539
560
|
}) => {
|
|
@@ -547,8 +568,8 @@ const C = "[Builder.io]: ", v = {
|
|
|
547
568
|
}
|
|
548
569
|
return e;
|
|
549
570
|
}, K = (e) => {
|
|
550
|
-
const t =
|
|
551
|
-
return
|
|
571
|
+
const t = Gt(e);
|
|
572
|
+
return Dt({
|
|
552
573
|
contentId: e.id,
|
|
553
574
|
value: t
|
|
554
575
|
}).catch((n) => {
|
|
@@ -567,7 +588,7 @@ const C = "[Builder.io]: ", v = {
|
|
|
567
588
|
testVariationId: n.id,
|
|
568
589
|
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
569
590
|
};
|
|
570
|
-
},
|
|
591
|
+
}, Ht = ({
|
|
571
592
|
item: e,
|
|
572
593
|
canTrack: t
|
|
573
594
|
}) => {
|
|
@@ -577,7 +598,7 @@ const C = "[Builder.io]: ", v = {
|
|
|
577
598
|
return;
|
|
578
599
|
if (!L(e))
|
|
579
600
|
return e;
|
|
580
|
-
const n =
|
|
601
|
+
const n = zt({
|
|
581
602
|
contentId: e.id
|
|
582
603
|
}) || K({
|
|
583
604
|
variations: e.variations,
|
|
@@ -590,13 +611,13 @@ const C = "[Builder.io]: ", v = {
|
|
|
590
611
|
...e,
|
|
591
612
|
...o
|
|
592
613
|
};
|
|
593
|
-
},
|
|
614
|
+
}, Jt = async ({
|
|
594
615
|
item: e,
|
|
595
616
|
canTrack: t
|
|
596
617
|
}) => {
|
|
597
618
|
if (!t || !L(e))
|
|
598
619
|
return e;
|
|
599
|
-
const o = await
|
|
620
|
+
const o = await Kt({
|
|
600
621
|
contentId: e.id
|
|
601
622
|
}) || K({
|
|
602
623
|
variations: e.variations,
|
|
@@ -610,17 +631,17 @@ const C = "[Builder.io]: ", v = {
|
|
|
610
631
|
...r
|
|
611
632
|
};
|
|
612
633
|
}, I = (e) => x(e) ? e : !0;
|
|
613
|
-
function
|
|
634
|
+
function Xt() {
|
|
614
635
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
615
636
|
}
|
|
616
|
-
function
|
|
617
|
-
const e =
|
|
637
|
+
function qt() {
|
|
638
|
+
const e = Xt().fetch;
|
|
618
639
|
if (typeof e > "u")
|
|
619
640
|
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
620
641
|
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
621
642
|
return e;
|
|
622
643
|
}
|
|
623
|
-
const
|
|
644
|
+
const Qt = qt();
|
|
624
645
|
function R(e, t = null, n = ".") {
|
|
625
646
|
return Object.keys(e).reduce((o, r) => {
|
|
626
647
|
const s = e[r], i = [t, r].filter(Boolean).join(n);
|
|
@@ -633,27 +654,27 @@ function R(e, t = null, n = ".") {
|
|
|
633
654
|
};
|
|
634
655
|
}, {});
|
|
635
656
|
}
|
|
636
|
-
const j = "builder.",
|
|
657
|
+
const j = "builder.", Yt = "options.", Zt = (e) => {
|
|
637
658
|
const t = {};
|
|
638
659
|
return e.forEach((n, o) => {
|
|
639
660
|
t[o] = n;
|
|
640
661
|
}), t;
|
|
641
|
-
},
|
|
662
|
+
}, te = (e) => {
|
|
642
663
|
if (!e)
|
|
643
664
|
return {};
|
|
644
|
-
const t =
|
|
665
|
+
const t = D(e), n = {};
|
|
645
666
|
return Object.keys(t).forEach((o) => {
|
|
646
667
|
if (o.startsWith(j)) {
|
|
647
|
-
const r = o.replace(j, "").replace(
|
|
668
|
+
const r = o.replace(j, "").replace(Yt, "");
|
|
648
669
|
n[r] = t[o];
|
|
649
670
|
}
|
|
650
671
|
}), n;
|
|
651
|
-
},
|
|
672
|
+
}, ee = () => {
|
|
652
673
|
if (!y())
|
|
653
674
|
return {};
|
|
654
675
|
const e = new URLSearchParams(window.location.search);
|
|
655
|
-
return
|
|
656
|
-
},
|
|
676
|
+
return te(e);
|
|
677
|
+
}, D = (e) => e instanceof URLSearchParams ? Zt(e) : e, ne = "v3", E = (e) => {
|
|
657
678
|
const {
|
|
658
679
|
limit: t = 30,
|
|
659
680
|
userAttributes: n,
|
|
@@ -664,18 +685,18 @@ const j = "builder.", Jt = "options.", Xt = (e) => {
|
|
|
664
685
|
includeRefs: u = !0,
|
|
665
686
|
enrich: a,
|
|
666
687
|
locale: d,
|
|
667
|
-
apiVersion:
|
|
688
|
+
apiVersion: f = ne
|
|
668
689
|
} = e;
|
|
669
690
|
if (!i)
|
|
670
691
|
throw new Error("Missing API key");
|
|
671
|
-
if (!["v2", "v3"].includes(
|
|
672
|
-
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${
|
|
673
|
-
const p = new URL(`https://cdn.builder.io/api/${
|
|
674
|
-
...
|
|
675
|
-
...
|
|
676
|
-
},
|
|
677
|
-
for (const l in
|
|
678
|
-
p.searchParams.set(l, String(
|
|
692
|
+
if (!["v2", "v3"].includes(f))
|
|
693
|
+
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${f}'`);
|
|
694
|
+
const p = new URL(`https://cdn.builder.io/api/${f}/content/${s}?apiKey=${i}&limit=${t}&noTraverse=${r}&includeRefs=${u}${d ? `&locale=${d}` : ""}${a ? `&enrich=${a}` : ""}`), c = {
|
|
695
|
+
...ee(),
|
|
696
|
+
...D(e.options || {})
|
|
697
|
+
}, m = R(c);
|
|
698
|
+
for (const l in m)
|
|
699
|
+
p.searchParams.set(l, String(m[l]));
|
|
679
700
|
if (n && p.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
680
701
|
const l = R({
|
|
681
702
|
query: o
|
|
@@ -684,25 +705,25 @@ const j = "builder.", Jt = "options.", Xt = (e) => {
|
|
|
684
705
|
p.searchParams.set(h, JSON.stringify(l[h]));
|
|
685
706
|
}
|
|
686
707
|
return p;
|
|
687
|
-
},
|
|
688
|
-
async function
|
|
689
|
-
const t = await
|
|
708
|
+
}, oe = (e) => "results" in e;
|
|
709
|
+
async function re(e) {
|
|
710
|
+
const t = await ae({
|
|
690
711
|
...e,
|
|
691
712
|
limit: 1
|
|
692
713
|
});
|
|
693
714
|
return t && t.results[0] || null;
|
|
694
715
|
}
|
|
695
|
-
const
|
|
716
|
+
const se = async (e) => {
|
|
696
717
|
const t = E(e);
|
|
697
|
-
return await (await
|
|
698
|
-
},
|
|
718
|
+
return await (await Qt(t.href)).json();
|
|
719
|
+
}, ie = async (e, t, n = E(e)) => {
|
|
699
720
|
const o = I(e.canTrack);
|
|
700
721
|
if (n.search.includes("preview="), !o || !(y() || w === "reactNative"))
|
|
701
722
|
return t;
|
|
702
723
|
try {
|
|
703
724
|
const r = [];
|
|
704
725
|
for (const s of t.results)
|
|
705
|
-
r.push(await
|
|
726
|
+
r.push(await Jt({
|
|
706
727
|
item: s,
|
|
707
728
|
canTrack: o
|
|
708
729
|
}));
|
|
@@ -712,10 +733,10 @@ const ee = async (e) => {
|
|
|
712
733
|
}
|
|
713
734
|
return t;
|
|
714
735
|
};
|
|
715
|
-
async function
|
|
736
|
+
async function ae(e) {
|
|
716
737
|
try {
|
|
717
|
-
const t = E(e), n = await
|
|
718
|
-
return
|
|
738
|
+
const t = E(e), n = await se(e);
|
|
739
|
+
return oe(n) ? ie(e, n) : (v.error("Error fetching data. ", {
|
|
719
740
|
url: t,
|
|
720
741
|
content: n,
|
|
721
742
|
options: e
|
|
@@ -724,12 +745,12 @@ async function oe(e) {
|
|
|
724
745
|
return v.error("Error fetching data. ", t), null;
|
|
725
746
|
}
|
|
726
747
|
}
|
|
727
|
-
const
|
|
748
|
+
const ce = async ({
|
|
728
749
|
builderContextValue: e,
|
|
729
750
|
symbol: t
|
|
730
751
|
}) => {
|
|
731
752
|
if ((t == null ? void 0 : t.model) && (e == null ? void 0 : e.apiKey))
|
|
732
|
-
return
|
|
753
|
+
return re({
|
|
733
754
|
model: t.model,
|
|
734
755
|
apiKey: e.apiKey,
|
|
735
756
|
apiVersion: e.apiVersion,
|
|
@@ -741,14 +762,14 @@ const re = async ({
|
|
|
741
762
|
}).catch((n) => {
|
|
742
763
|
v.error("Could not fetch symbol content: ", n);
|
|
743
764
|
});
|
|
744
|
-
},
|
|
765
|
+
}, le = () => Promise.resolve().then(() => Be).then((e) => e.default).catch((e) => {
|
|
745
766
|
throw console.error(
|
|
746
767
|
"Error while attempting to dynamically import component ContentVariants at ../../components/content-variants/content-variants.vue",
|
|
747
768
|
e
|
|
748
769
|
), e;
|
|
749
|
-
}),
|
|
770
|
+
}), ue = g({
|
|
750
771
|
name: "builder-symbol",
|
|
751
|
-
components: { "content-variants":
|
|
772
|
+
components: { "content-variants": le },
|
|
752
773
|
props: [
|
|
753
774
|
"js",
|
|
754
775
|
"attributes",
|
|
@@ -759,7 +780,7 @@ const re = async ({
|
|
|
759
780
|
],
|
|
760
781
|
data() {
|
|
761
782
|
var e;
|
|
762
|
-
return { contentToUse: (e = this.symbol) == null ? void 0 : e.content, filterAttrs:
|
|
783
|
+
return { contentToUse: (e = this.symbol) == null ? void 0 : e.content, filterAttrs: V };
|
|
763
784
|
},
|
|
764
785
|
mounted() {
|
|
765
786
|
this.setContent();
|
|
@@ -790,7 +811,7 @@ const re = async ({
|
|
|
790
811
|
},
|
|
791
812
|
methods: {
|
|
792
813
|
setContent() {
|
|
793
|
-
this.contentToUse ||
|
|
814
|
+
this.contentToUse || ce({
|
|
794
815
|
symbol: this.symbol,
|
|
795
816
|
builderContextValue: this.builderContext
|
|
796
817
|
}).then((e) => {
|
|
@@ -808,7 +829,7 @@ const re = async ({
|
|
|
808
829
|
}
|
|
809
830
|
}
|
|
810
831
|
});
|
|
811
|
-
var
|
|
832
|
+
var de = function() {
|
|
812
833
|
var o, r, s, i;
|
|
813
834
|
var t = this, n = t._self._c;
|
|
814
835
|
return t._self._setupProxy, n("div", t._g(t._b({ class: t._classStringToObject(t.className) }, "div", { ...t.filterAttrs(t.attributes, "v-on:", !1) }, !1), t.filterAttrs(t.attributes, "v-on:", !0)), [n("content-variants", { attrs: { __isNestedRender: !0, apiVersion: t.builderContext.apiVersion, apiKey: t.builderContext.apiKey, context: t.builderContext.context, customComponents: Object.values(t.builderComponents), data: {
|
|
@@ -816,37 +837,37 @@ var ae = function() {
|
|
|
816
837
|
...t.builderContext.localState,
|
|
817
838
|
...(s = (r = t.contentToUse) == null ? void 0 : r.data) == null ? void 0 : s.state
|
|
818
839
|
}, model: (i = t.symbol) == null ? void 0 : i.model, content: t.contentToUse } })], 1);
|
|
819
|
-
},
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
840
|
+
}, me = [], fe = /* @__PURE__ */ b(
|
|
841
|
+
ue,
|
|
842
|
+
de,
|
|
843
|
+
me,
|
|
823
844
|
!1,
|
|
824
845
|
null,
|
|
825
846
|
null,
|
|
826
847
|
null,
|
|
827
848
|
null
|
|
828
849
|
);
|
|
829
|
-
const
|
|
850
|
+
const ln = fe.exports, pe = g({
|
|
830
851
|
name: "builder-text",
|
|
831
852
|
props: ["text"]
|
|
832
853
|
});
|
|
833
|
-
var
|
|
854
|
+
var he = function() {
|
|
834
855
|
var o;
|
|
835
856
|
var t = this, n = t._self._c;
|
|
836
857
|
return t._self._setupProxy, n("span", { staticClass: "builder-text", style: {
|
|
837
858
|
outline: "none"
|
|
838
859
|
}, domProps: { innerHTML: t._s(((o = t.text) == null ? void 0 : o.toString()) || "") } });
|
|
839
|
-
},
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
860
|
+
}, _e = [], ge = /* @__PURE__ */ b(
|
|
861
|
+
pe,
|
|
862
|
+
he,
|
|
863
|
+
_e,
|
|
843
864
|
!1,
|
|
844
865
|
null,
|
|
845
866
|
null,
|
|
846
867
|
null,
|
|
847
868
|
null
|
|
848
869
|
);
|
|
849
|
-
const
|
|
870
|
+
const un = ge.exports, be = g({
|
|
850
871
|
name: "builder-video",
|
|
851
872
|
props: [
|
|
852
873
|
"autoPlay",
|
|
@@ -889,7 +910,7 @@ const sn = me.exports, pe = g({
|
|
|
889
910
|
}
|
|
890
911
|
}
|
|
891
912
|
});
|
|
892
|
-
var
|
|
913
|
+
var ye = function() {
|
|
893
914
|
var o;
|
|
894
915
|
var t = this, n = t._self._c;
|
|
895
916
|
return t._self._setupProxy, n("video", t._b({ style: {
|
|
@@ -900,25 +921,25 @@ var he = function() {
|
|
|
900
921
|
objectPosition: t.position,
|
|
901
922
|
borderRadius: 1
|
|
902
923
|
}, attrs: { preload: t.preload || "metadata", src: t.video || "no-src", poster: t.posterImage } }, "video", t.spreadProps, !1));
|
|
903
|
-
},
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
924
|
+
}, ve = [], Se = /* @__PURE__ */ b(
|
|
925
|
+
be,
|
|
926
|
+
ye,
|
|
927
|
+
ve,
|
|
907
928
|
!1,
|
|
908
929
|
null,
|
|
909
930
|
null,
|
|
910
931
|
null,
|
|
911
932
|
null
|
|
912
933
|
);
|
|
913
|
-
const
|
|
934
|
+
const dn = Se.exports, $ = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
914
935
|
...t,
|
|
915
936
|
testVariationId: t.id,
|
|
916
937
|
id: e == null ? void 0 : e.id
|
|
917
|
-
})),
|
|
938
|
+
})), ke = ({
|
|
918
939
|
canTrack: e,
|
|
919
940
|
content: t
|
|
920
941
|
}) => !(!($(t).length > 0) || !e);
|
|
921
|
-
function
|
|
942
|
+
function xe(e, t, n) {
|
|
922
943
|
var i;
|
|
923
944
|
function o() {
|
|
924
945
|
function u(l, h, S) {
|
|
@@ -940,14 +961,14 @@ function ye(e, t, n) {
|
|
|
940
961
|
}
|
|
941
962
|
return null;
|
|
942
963
|
}
|
|
943
|
-
const d = `builder.tests.${e}`,
|
|
944
|
-
if (
|
|
945
|
-
return
|
|
964
|
+
const d = `builder.tests.${e}`, f = a(d), p = t.map((l) => l.id).concat(e);
|
|
965
|
+
if (f && p.includes(f))
|
|
966
|
+
return f;
|
|
946
967
|
let c = 0;
|
|
947
|
-
const
|
|
968
|
+
const m = Math.random();
|
|
948
969
|
for (let l = 0; l < t.length; l++) {
|
|
949
970
|
const h = t[l], S = h.testRatio;
|
|
950
|
-
if (c += S,
|
|
971
|
+
if (c += S, m < c)
|
|
951
972
|
return u(d, h.id), h.id;
|
|
952
973
|
}
|
|
953
974
|
return u(d, e), e;
|
|
@@ -965,18 +986,18 @@ function ye(e, t, n) {
|
|
|
965
986
|
s.innerHTML = u;
|
|
966
987
|
}
|
|
967
988
|
}
|
|
968
|
-
function
|
|
989
|
+
function we(e, t, n) {
|
|
969
990
|
var a;
|
|
970
991
|
if (!navigator.cookieEnabled)
|
|
971
992
|
return;
|
|
972
993
|
function o(d) {
|
|
973
|
-
const
|
|
994
|
+
const f = d + "=", p = document.cookie.split(";");
|
|
974
995
|
for (let c = 0; c < p.length; c++) {
|
|
975
|
-
let
|
|
976
|
-
for (;
|
|
977
|
-
|
|
978
|
-
if (
|
|
979
|
-
return
|
|
996
|
+
let m = p[c];
|
|
997
|
+
for (; m.charAt(0) === " "; )
|
|
998
|
+
m = m.substring(1, m.length);
|
|
999
|
+
if (m.indexOf(f) === 0)
|
|
1000
|
+
return m.substring(f.length, m.length);
|
|
980
1001
|
}
|
|
981
1002
|
return null;
|
|
982
1003
|
}
|
|
@@ -990,38 +1011,38 @@ function ve(e, t, n) {
|
|
|
990
1011
|
return;
|
|
991
1012
|
}
|
|
992
1013
|
}
|
|
993
|
-
const
|
|
994
|
-
const e =
|
|
1014
|
+
const Ce = (e) => e === "react" || e === "reactNative", G = Ce(w), H = "builderIoAbTest", J = "builderIoRenderContent", $e = () => {
|
|
1015
|
+
const e = xe.toString().replace(/\s+/g, " "), t = we.toString().replace(/\s+/g, " ");
|
|
995
1016
|
return `
|
|
996
1017
|
window.${H} = ${e}
|
|
997
1018
|
window.${J} = ${t}
|
|
998
1019
|
`;
|
|
999
|
-
},
|
|
1000
|
-
window.${H}("${t}",${JSON.stringify(e)}, ${
|
|
1020
|
+
}, Te = (e, t) => `
|
|
1021
|
+
window.${H}("${t}",${JSON.stringify(e)}, ${G})`, mn = ({
|
|
1001
1022
|
contentId: e,
|
|
1002
1023
|
variationId: t
|
|
1003
1024
|
}) => `
|
|
1004
|
-
window.${J}("${t}", "${e}", ${
|
|
1025
|
+
window.${J}("${t}", "${e}", ${G})`, Ie = () => import("./content.6382aeb4.js").then((e) => e.default).catch((e) => {
|
|
1005
1026
|
throw console.error(
|
|
1006
1027
|
"Error while attempting to dynamically import component ContentComponent at ../content/content.vue",
|
|
1007
1028
|
e
|
|
1008
1029
|
), e;
|
|
1009
|
-
}),
|
|
1030
|
+
}), Re = () => import("./inlined-styles.e3020f6b.js").then((e) => e.default).catch((e) => {
|
|
1010
1031
|
throw console.error(
|
|
1011
1032
|
"Error while attempting to dynamically import component InlinedStyles at ../inlined-styles.vue",
|
|
1012
1033
|
e
|
|
1013
1034
|
), e;
|
|
1014
|
-
}),
|
|
1035
|
+
}), Ve = () => import("./inlined-script.ed4af994.js").then((e) => e.default).catch((e) => {
|
|
1015
1036
|
throw console.error(
|
|
1016
1037
|
"Error while attempting to dynamically import component InlinedScript at ../inlined-script.vue",
|
|
1017
1038
|
e
|
|
1018
1039
|
), e;
|
|
1019
|
-
}),
|
|
1040
|
+
}), Ae = g({
|
|
1020
1041
|
name: "content-variants",
|
|
1021
1042
|
components: {
|
|
1022
|
-
"inlined-script":
|
|
1023
|
-
"inlined-styles":
|
|
1024
|
-
"content-component":
|
|
1043
|
+
"inlined-script": Ve,
|
|
1044
|
+
"inlined-styles": Re,
|
|
1045
|
+
"content-component": Ie
|
|
1025
1046
|
},
|
|
1026
1047
|
props: [
|
|
1027
1048
|
"canTrack",
|
|
@@ -1039,14 +1060,14 @@ const Se = (e) => e === "react" || e === "reactNative", D = Se(w), H = "builderI
|
|
|
1039
1060
|
],
|
|
1040
1061
|
data() {
|
|
1041
1062
|
return {
|
|
1042
|
-
shouldRenderVariants:
|
|
1063
|
+
shouldRenderVariants: ke({
|
|
1043
1064
|
canTrack: I(this.canTrack),
|
|
1044
1065
|
content: this.content
|
|
1045
1066
|
}),
|
|
1046
|
-
getScriptString:
|
|
1067
|
+
getScriptString: $e,
|
|
1047
1068
|
getVariants: $,
|
|
1048
1069
|
getDefaultCanTrack: I,
|
|
1049
|
-
handleABTestingSync:
|
|
1070
|
+
handleABTestingSync: Ht,
|
|
1050
1071
|
TARGET: w
|
|
1051
1072
|
};
|
|
1052
1073
|
},
|
|
@@ -1056,7 +1077,7 @@ const Se = (e) => e === "react" || e === "reactNative", D = Se(w), H = "builderI
|
|
|
1056
1077
|
computed: {
|
|
1057
1078
|
variantScriptStr() {
|
|
1058
1079
|
var e;
|
|
1059
|
-
return
|
|
1080
|
+
return Te(
|
|
1060
1081
|
$(this.content).map((t) => ({
|
|
1061
1082
|
id: t.testVariationId,
|
|
1062
1083
|
testRatio: t.testRatio
|
|
@@ -1069,7 +1090,7 @@ const Se = (e) => e === "react" || e === "reactNative", D = Se(w), H = "builderI
|
|
|
1069
1090
|
}
|
|
1070
1091
|
}
|
|
1071
1092
|
});
|
|
1072
|
-
var
|
|
1093
|
+
var Oe = function() {
|
|
1073
1094
|
var o, r;
|
|
1074
1095
|
var t = this, n = t._self._c;
|
|
1075
1096
|
return t._self._setupProxy, n("div", [!t.__isNestedRender && t.TARGET !== "reactNative" ? [n("inlined-script", { attrs: { scriptStr: t.getScriptString() } })] : t._e(), t.shouldRenderVariants ? [n("inlined-styles", { attrs: { id: `variants-styles-${(o = t.content) == null ? void 0 : o.id}`, styles: t.hideVariantsStyleString } }), n("inlined-script", { attrs: { scriptStr: t.variantScriptStr } }), t._l(t.getVariants(t.content), function(s, i) {
|
|
@@ -1080,46 +1101,46 @@ var Ie = function() {
|
|
|
1080
1101
|
}), classNameProp: `variant-${(r = t.content) == null ? void 0 : r.id}`, showContent: !0, model: t.model, data: t.data, context: t.context, apiKey: t.apiKey, apiVersion: t.apiVersion, customComponents: t.customComponents, canTrack: t.canTrack, locale: t.locale, includeRefs: t.includeRefs, enrich: t.enrich, isSsrAbTest: t.shouldRenderVariants } }, "content-component", {
|
|
1081
1102
|
key: t.shouldRenderVariants.toString()
|
|
1082
1103
|
}, !1))], 2);
|
|
1083
|
-
},
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1104
|
+
}, Ee = [], Pe = /* @__PURE__ */ b(
|
|
1105
|
+
Ae,
|
|
1106
|
+
Oe,
|
|
1107
|
+
Ee,
|
|
1087
1108
|
!1,
|
|
1088
1109
|
null,
|
|
1089
1110
|
null,
|
|
1090
1111
|
null,
|
|
1091
1112
|
null
|
|
1092
1113
|
);
|
|
1093
|
-
const
|
|
1114
|
+
const je = Pe.exports, Be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1094
1115
|
__proto__: null,
|
|
1095
|
-
default:
|
|
1116
|
+
default: je
|
|
1096
1117
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1097
|
-
function
|
|
1118
|
+
function Ne() {
|
|
1098
1119
|
return y() && window.self !== window.top;
|
|
1099
1120
|
}
|
|
1100
1121
|
function X() {
|
|
1101
|
-
return
|
|
1122
|
+
return Ne() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
1102
1123
|
}
|
|
1103
|
-
function
|
|
1124
|
+
function fn() {
|
|
1104
1125
|
return !y() || X() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
|
|
1105
1126
|
}
|
|
1106
|
-
const
|
|
1127
|
+
const pn = [], hn = (e) => ({
|
|
1107
1128
|
type: "builder.registerComponent",
|
|
1108
1129
|
data: e
|
|
1109
|
-
}),
|
|
1130
|
+
}), Fe = (e) => {
|
|
1110
1131
|
const t = e.toString().trim();
|
|
1111
1132
|
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
1112
|
-
},
|
|
1133
|
+
}, Ue = (e) => typeof e == "function" ? Fe(e) : A(e), _n = ({
|
|
1113
1134
|
inputs: e,
|
|
1114
1135
|
...t
|
|
1115
1136
|
}) => ({
|
|
1116
|
-
...
|
|
1137
|
+
...A(t),
|
|
1117
1138
|
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [r, s]) => ({
|
|
1118
1139
|
...o,
|
|
1119
|
-
[r]:
|
|
1140
|
+
[r]: Ue(s)
|
|
1120
1141
|
}), {}))
|
|
1121
1142
|
}), B = {};
|
|
1122
|
-
function
|
|
1143
|
+
function gn(e, t) {
|
|
1123
1144
|
let n = B[e];
|
|
1124
1145
|
if (n || (n = B[e] = []), n.push(t), y()) {
|
|
1125
1146
|
const o = {
|
|
@@ -1137,7 +1158,7 @@ function mn(e, t) {
|
|
|
1137
1158
|
}
|
|
1138
1159
|
}
|
|
1139
1160
|
const N = {};
|
|
1140
|
-
function
|
|
1161
|
+
function bn(e) {
|
|
1141
1162
|
if (y()) {
|
|
1142
1163
|
Object.assign(N, e);
|
|
1143
1164
|
const t = {
|
|
@@ -1147,16 +1168,16 @@ function pn(e) {
|
|
|
1147
1168
|
parent.postMessage(t, "*");
|
|
1148
1169
|
}
|
|
1149
1170
|
}
|
|
1150
|
-
function
|
|
1171
|
+
function Me() {
|
|
1151
1172
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
1152
1173
|
const t = Math.random() * 16 | 0;
|
|
1153
1174
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
1154
1175
|
});
|
|
1155
1176
|
}
|
|
1156
1177
|
function q() {
|
|
1157
|
-
return
|
|
1178
|
+
return Me().replace(/-/g, "");
|
|
1158
1179
|
}
|
|
1159
|
-
const Q = "builderSessionId",
|
|
1180
|
+
const Q = "builderSessionId", We = async ({
|
|
1160
1181
|
canTrack: e
|
|
1161
1182
|
}) => {
|
|
1162
1183
|
if (!e)
|
|
@@ -1168,20 +1189,20 @@ const Q = "builderSessionId", Ne = async ({
|
|
|
1168
1189
|
if (x(t))
|
|
1169
1190
|
return t;
|
|
1170
1191
|
{
|
|
1171
|
-
const n =
|
|
1172
|
-
return
|
|
1192
|
+
const n = Le();
|
|
1193
|
+
return Ke({
|
|
1173
1194
|
id: n,
|
|
1174
1195
|
canTrack: e
|
|
1175
1196
|
}), n;
|
|
1176
1197
|
}
|
|
1177
|
-
},
|
|
1198
|
+
}, Le = () => q(), Ke = ({
|
|
1178
1199
|
id: e,
|
|
1179
1200
|
canTrack: t
|
|
1180
1201
|
}) => W({
|
|
1181
1202
|
name: Q,
|
|
1182
1203
|
value: e,
|
|
1183
1204
|
canTrack: t
|
|
1184
|
-
}), Y = () => y() && typeof localStorage < "u" ? localStorage : void 0,
|
|
1205
|
+
}), Y = () => y() && typeof localStorage < "u" ? localStorage : void 0, ze = ({
|
|
1185
1206
|
key: e,
|
|
1186
1207
|
canTrack: t
|
|
1187
1208
|
}) => {
|
|
@@ -1192,7 +1213,7 @@ const Q = "builderSessionId", Ne = async ({
|
|
|
1192
1213
|
console.debug("[LocalStorage] GET error: ", o);
|
|
1193
1214
|
return;
|
|
1194
1215
|
}
|
|
1195
|
-
},
|
|
1216
|
+
}, De = ({
|
|
1196
1217
|
key: e,
|
|
1197
1218
|
canTrack: t,
|
|
1198
1219
|
value: n
|
|
@@ -1203,39 +1224,39 @@ const Q = "builderSessionId", Ne = async ({
|
|
|
1203
1224
|
} catch (r) {
|
|
1204
1225
|
console.debug("[LocalStorage] SET error: ", r);
|
|
1205
1226
|
}
|
|
1206
|
-
}, Z = "builderVisitorId",
|
|
1227
|
+
}, Z = "builderVisitorId", Ge = ({
|
|
1207
1228
|
canTrack: e
|
|
1208
1229
|
}) => {
|
|
1209
1230
|
if (!e)
|
|
1210
1231
|
return;
|
|
1211
|
-
const t =
|
|
1232
|
+
const t = ze({
|
|
1212
1233
|
key: Z,
|
|
1213
1234
|
canTrack: e
|
|
1214
1235
|
});
|
|
1215
1236
|
if (x(t))
|
|
1216
1237
|
return t;
|
|
1217
1238
|
{
|
|
1218
|
-
const n =
|
|
1219
|
-
return
|
|
1239
|
+
const n = He();
|
|
1240
|
+
return Je({
|
|
1220
1241
|
id: n,
|
|
1221
1242
|
canTrack: e
|
|
1222
1243
|
}), n;
|
|
1223
1244
|
}
|
|
1224
|
-
},
|
|
1245
|
+
}, He = () => q(), Je = ({
|
|
1225
1246
|
id: e,
|
|
1226
1247
|
canTrack: t
|
|
1227
|
-
}) =>
|
|
1248
|
+
}) => De({
|
|
1228
1249
|
key: Z,
|
|
1229
1250
|
value: e,
|
|
1230
1251
|
canTrack: t
|
|
1231
|
-
}),
|
|
1252
|
+
}), Xe = () => {
|
|
1232
1253
|
if (y()) {
|
|
1233
1254
|
const e = new URL(location.href);
|
|
1234
1255
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
1235
1256
|
} else
|
|
1236
1257
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
1237
|
-
},
|
|
1238
|
-
const e =
|
|
1258
|
+
}, qe = () => typeof navigator == "object" && navigator.userAgent || "", Qe = () => {
|
|
1259
|
+
const e = qe(), t = {
|
|
1239
1260
|
Android() {
|
|
1240
1261
|
return e.match(/Android/i);
|
|
1241
1262
|
},
|
|
@@ -1254,13 +1275,13 @@ const Q = "builderSessionId", Ne = async ({
|
|
|
1254
1275
|
any() {
|
|
1255
1276
|
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || w === "reactNative";
|
|
1256
1277
|
}
|
|
1257
|
-
}, n = e.match(/Tablet|iPad/i), o =
|
|
1278
|
+
}, n = e.match(/Tablet|iPad/i), o = Xe();
|
|
1258
1279
|
return {
|
|
1259
1280
|
urlPath: o == null ? void 0 : o.pathname,
|
|
1260
1281
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
1261
1282
|
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
1262
1283
|
};
|
|
1263
|
-
},
|
|
1284
|
+
}, Ye = async ({
|
|
1264
1285
|
canTrack: e
|
|
1265
1286
|
}) => {
|
|
1266
1287
|
if (!e)
|
|
@@ -1268,16 +1289,16 @@ const Q = "builderSessionId", Ne = async ({
|
|
|
1268
1289
|
visitorId: void 0,
|
|
1269
1290
|
sessionId: void 0
|
|
1270
1291
|
};
|
|
1271
|
-
const t = await
|
|
1292
|
+
const t = await We({
|
|
1272
1293
|
canTrack: e
|
|
1273
|
-
}), n =
|
|
1294
|
+
}), n = Ge({
|
|
1274
1295
|
canTrack: e
|
|
1275
1296
|
});
|
|
1276
1297
|
return {
|
|
1277
1298
|
sessionId: t,
|
|
1278
1299
|
visitorId: n
|
|
1279
1300
|
};
|
|
1280
|
-
},
|
|
1301
|
+
}, Ze = async ({
|
|
1281
1302
|
type: e,
|
|
1282
1303
|
canTrack: t,
|
|
1283
1304
|
apiKey: n,
|
|
@@ -1291,14 +1312,14 @@ const Q = "builderSessionId", Ne = async ({
|
|
|
1291
1312
|
url: location.href,
|
|
1292
1313
|
...o
|
|
1293
1314
|
},
|
|
1294
|
-
...await
|
|
1315
|
+
...await Ye({
|
|
1295
1316
|
canTrack: t
|
|
1296
1317
|
}),
|
|
1297
|
-
userAttributes:
|
|
1318
|
+
userAttributes: Qe(),
|
|
1298
1319
|
ownerId: n
|
|
1299
1320
|
}
|
|
1300
1321
|
});
|
|
1301
|
-
async function
|
|
1322
|
+
async function tn(e) {
|
|
1302
1323
|
if (!e.apiKey) {
|
|
1303
1324
|
v.error("Missing API key for track call. Please provide your API key.");
|
|
1304
1325
|
return;
|
|
@@ -1307,7 +1328,7 @@ async function qe(e) {
|
|
|
1307
1328
|
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
1308
1329
|
method: "POST",
|
|
1309
1330
|
body: JSON.stringify({
|
|
1310
|
-
events: [await
|
|
1331
|
+
events: [await Ze(e)]
|
|
1311
1332
|
}),
|
|
1312
1333
|
headers: {
|
|
1313
1334
|
"content-type": "application/json"
|
|
@@ -1317,44 +1338,46 @@ async function qe(e) {
|
|
|
1317
1338
|
console.error("Failed to track: ", t);
|
|
1318
1339
|
});
|
|
1319
1340
|
}
|
|
1320
|
-
const
|
|
1341
|
+
const yn = (e) => tn({
|
|
1321
1342
|
...e,
|
|
1322
1343
|
canTrack: !0
|
|
1323
1344
|
});
|
|
1324
1345
|
export {
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1346
|
+
Ot as A,
|
|
1347
|
+
nn as B,
|
|
1348
|
+
rn as C,
|
|
1349
|
+
je as D,
|
|
1350
|
+
Et as E,
|
|
1351
|
+
sn as F,
|
|
1352
|
+
an as I,
|
|
1353
|
+
cn as S,
|
|
1331
1354
|
w as T,
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1355
|
+
dn as V,
|
|
1356
|
+
tn as _,
|
|
1357
|
+
on as a,
|
|
1335
1358
|
X as b,
|
|
1336
1359
|
x as c,
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1360
|
+
V as d,
|
|
1361
|
+
ln as e,
|
|
1362
|
+
A as f,
|
|
1340
1363
|
rt as g,
|
|
1341
|
-
|
|
1364
|
+
un as h,
|
|
1342
1365
|
y as i,
|
|
1343
|
-
|
|
1344
|
-
|
|
1366
|
+
mn as j,
|
|
1367
|
+
pn as k,
|
|
1345
1368
|
v as l,
|
|
1346
|
-
|
|
1369
|
+
wt as m,
|
|
1347
1370
|
b as n,
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1371
|
+
kt as o,
|
|
1372
|
+
fn as p,
|
|
1373
|
+
re as q,
|
|
1374
|
+
gn as r,
|
|
1375
|
+
_n as s,
|
|
1376
|
+
Qt as t,
|
|
1377
|
+
hn as u,
|
|
1378
|
+
bn as v,
|
|
1379
|
+
ae as w,
|
|
1380
|
+
ie as x,
|
|
1381
|
+
te as y,
|
|
1382
|
+
yn as z
|
|
1360
1383
|
};
|