@builder.io/sdk-vue 2.0.0 → 2.0.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/lib/browser/block-styles-Mn6wJduZ.cjs +1 -0
- package/lib/browser/{block-styles-cVSrkWog.js → block-styles-sZJR1URf.js} +14 -13
- package/lib/browser/{block-wrapper-maIbj8Gi.js → block-wrapper-ody6Sxkr.js} +3 -3
- package/lib/browser/{block-wrapper-WsC3tXV8.cjs → block-wrapper-qFFX6RFF.cjs} +1 -1
- package/lib/browser/{component-ref-da6lIO9c.cjs → component-ref-DSNF4azA.cjs} +1 -1
- package/lib/browser/{component-ref-1N_Kijok.js → component-ref-rf4-wS3o.js} +2 -2
- package/lib/browser/components/content/components/enable-editor.vue.d.ts +1 -0
- package/lib/browser/components/content/components/styles.vue.d.ts +3 -0
- package/lib/browser/components/content/content.vue.d.ts +4 -0
- package/lib/browser/components/content-variants/content-variants.types.d.ts +4 -0
- package/lib/browser/components/content-variants/content-variants.vue.d.ts +3 -0
- package/lib/browser/components/inlined-script.vue.d.ts +3 -0
- package/lib/browser/components/inlined-styles.vue.d.ts +3 -0
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/context/builder.context.d.ts +1 -0
- package/lib/browser/context/types.d.ts +1 -0
- package/lib/browser/{get-block-properties-AuDiFohY.js → get-block-properties-O0W_2V2s.js} +1 -1
- package/lib/browser/{get-block-properties-0QNsXkZI.cjs → get-block-properties-trq7EGpq.cjs} +1 -1
- package/lib/browser/{index-pDvo-fub.js → index---sv1Dmc.js} +67 -50
- package/lib/browser/index-5K25vfnv.cjs +166 -0
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{repeated-block-nP-Etgd7.js → repeated-block-4hDqPbdf.js} +2 -2
- package/lib/browser/{repeated-block-Z2UnXIU-.cjs → repeated-block-LqvC87RV.cjs} +1 -1
- package/lib/browser/style.css +1 -1
- package/lib/browser/types/builder-props.d.ts +3 -0
- package/lib/edge/{block-styles--vY4nPqp.js → block-styles-QLPVQ54j.js} +14 -13
- package/lib/edge/block-styles-VkVzS7vd.cjs +1 -0
- package/lib/{node/block-wrapper-TveOxTSb.cjs → edge/block-wrapper-C3QWzorc.cjs} +1 -1
- package/lib/edge/{block-wrapper-JdVK1HVZ.js → block-wrapper-Lrmvcvj2.js} +3 -3
- package/lib/{node/component-ref-KnwCIp0k.js → edge/component-ref-BzjW_J7Z.js} +2 -2
- package/lib/{node/component-ref-N8Z1onkW.cjs → edge/component-ref-_MrpnWQq.cjs} +1 -1
- package/lib/edge/components/content/components/enable-editor.vue.d.ts +1 -0
- package/lib/edge/components/content/components/styles.vue.d.ts +3 -0
- package/lib/edge/components/content/content.vue.d.ts +4 -0
- package/lib/edge/components/content-variants/content-variants.types.d.ts +4 -0
- package/lib/edge/components/content-variants/content-variants.vue.d.ts +3 -0
- package/lib/edge/components/inlined-script.vue.d.ts +3 -0
- package/lib/edge/components/inlined-styles.vue.d.ts +3 -0
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/context/builder.context.d.ts +1 -0
- package/lib/edge/context/types.d.ts +1 -0
- package/lib/edge/{get-block-properties-hYo7UjjZ.js → get-block-properties-YDq-FuAs.js} +1 -1
- package/lib/edge/{get-block-properties-dww-G4lx.cjs → get-block-properties-ZdU2gihP.cjs} +1 -1
- package/lib/edge/{index-OtE_7PIE.js → index-8mGnZrt9.js} +185 -168
- package/lib/edge/{index-lFidbDeW.cjs → index-tYqLns-6.cjs} +18 -18
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{repeated-block-IMXruThl.cjs → repeated-block-IOMTx4Ek.cjs} +1 -1
- package/lib/edge/{repeated-block-vPgWRa-A.js → repeated-block-c9Qq8PaK.js} +2 -2
- package/lib/edge/style.css +1 -1
- package/lib/edge/types/builder-props.d.ts +3 -0
- package/lib/node/block-styles-GqJTbD8X.cjs +1 -0
- package/lib/node/{block-styles-JjLwXWt4.js → block-styles-Tyg1fV88.js} +14 -13
- package/lib/{edge/block-wrapper-szOQNDWW.cjs → node/block-wrapper-0rr8eTCE.cjs} +1 -1
- package/lib/node/{block-wrapper--XSKGCL-.js → block-wrapper-iBhEa5rI.js} +3 -3
- package/lib/{edge/component-ref-Ffo8HUWI.js → node/component-ref-FN9Rzqu_.js} +2 -2
- package/lib/{edge/component-ref-7HkRGS_l.cjs → node/component-ref-j2PWej8h.cjs} +1 -1
- package/lib/node/components/content/components/enable-editor.vue.d.ts +1 -0
- package/lib/node/components/content/components/styles.vue.d.ts +3 -0
- package/lib/node/components/content/content.vue.d.ts +4 -0
- package/lib/node/components/content-variants/content-variants.types.d.ts +4 -0
- package/lib/node/components/content-variants/content-variants.vue.d.ts +3 -0
- package/lib/node/components/inlined-script.vue.d.ts +3 -0
- package/lib/node/components/inlined-styles.vue.d.ts +3 -0
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/context/builder.context.d.ts +1 -0
- package/lib/node/context/types.d.ts +1 -0
- package/lib/node/{get-block-properties-Xr5L4Okr.js → get-block-properties-HOAtHaKD.js} +1 -1
- package/lib/node/{get-block-properties-inIHDjNu.cjs → get-block-properties-NZJwLalB.cjs} +1 -1
- package/lib/node/{index-EVLuO1iu.js → index-AtsvJZco.js} +273 -256
- package/lib/node/index-_k1NN43c.cjs +213 -0
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +1 -1
- package/lib/node/{repeated-block-Co8byFSc.cjs → repeated-block-Smn39W6t.cjs} +1 -1
- package/lib/node/{repeated-block-gAw64HdW.js → repeated-block-ztDvgKZz.js} +2 -2
- package/lib/node/style.css +1 -1
- package/lib/node/types/builder-props.d.ts +3 -0
- package/package.json +1 -1
- package/lib/browser/block-styles-fmMk_gc8.cjs +0 -1
- package/lib/browser/index-7PcQ3One.cjs +0 -166
- package/lib/edge/block-styles-UnZvcuhz.cjs +0 -1
- package/lib/node/block-styles-houtGRpT.cjs +0 -1
- package/lib/node/index-QFbjU7Zd.cjs +0 -213
|
@@ -9,8 +9,8 @@ function filterAttrs(e = {}, t, n) {
|
|
|
9
9
|
for (const r in e) {
|
|
10
10
|
if (!e[r] || n && !r.startsWith(t))
|
|
11
11
|
continue;
|
|
12
|
-
const
|
|
13
|
-
o[
|
|
12
|
+
const i = n ? r.replace(t, "") : r;
|
|
13
|
+
o[i] = e[r];
|
|
14
14
|
}
|
|
15
15
|
return o;
|
|
16
16
|
}
|
|
@@ -26,7 +26,7 @@ const _sfc_main$t = defineComponent({
|
|
|
26
26
|
n[o] = r;
|
|
27
27
|
return n;
|
|
28
28
|
};
|
|
29
|
-
function _sfc_render$r(e, t, n, o, r,
|
|
29
|
+
function _sfc_render$r(e, t, n, o, r, i) {
|
|
30
30
|
return e.isEmptyElement(e.TagName) ? (openBlock(), createBlock(resolveDynamicComponent(e.TagName), mergeProps({ key: 1 }, e.attributes, toHandlers(e.actionAttributes)), null, 16)) : (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
31
31
|
typeof e.TagName == "string" ? (openBlock(), createBlock(resolveDynamicComponent(e.TagName), mergeProps({ key: 0 }, e.attributes, toHandlers(e.actionAttributes)), {
|
|
32
32
|
default: withCtx(() => [
|
|
@@ -86,9 +86,9 @@ const DynamicRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sf
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
|
-
function _sfc_render$q(e, t, n, o, r,
|
|
90
|
-
const
|
|
91
|
-
return openBlock(), createBlock(
|
|
89
|
+
function _sfc_render$q(e, t, n, o, r, i) {
|
|
90
|
+
const s = resolveComponent("DynamicRenderer");
|
|
91
|
+
return openBlock(), createBlock(s, {
|
|
92
92
|
attributes: e.attrs(),
|
|
93
93
|
TagName: e.link ? e.builderLinkComponent || "a" : "button",
|
|
94
94
|
actionAttributes: e.filterAttrs(e.attributes, "v-on:", !0)
|
|
@@ -112,7 +112,8 @@ const Button = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$
|
|
|
112
112
|
componentInfos: {},
|
|
113
113
|
inheritedStyles: {},
|
|
114
114
|
BlocksWrapper: "div",
|
|
115
|
-
BlocksWrapperProps: {}
|
|
115
|
+
BlocksWrapperProps: {},
|
|
116
|
+
nonce: ""
|
|
116
117
|
},
|
|
117
118
|
key: key$1
|
|
118
119
|
}, key = Symbol(), ComponentsContext = {
|
|
@@ -205,17 +206,17 @@ const getLocation = () => {
|
|
|
205
206
|
context: n,
|
|
206
207
|
event: o,
|
|
207
208
|
localState: r,
|
|
208
|
-
rootSetState:
|
|
209
|
-
rootState:
|
|
209
|
+
rootSetState: i,
|
|
210
|
+
rootState: s
|
|
210
211
|
}) => {
|
|
211
212
|
const l = getFunctionArguments({
|
|
212
213
|
builder: t,
|
|
213
214
|
context: n,
|
|
214
215
|
event: o,
|
|
215
216
|
state: flattenState({
|
|
216
|
-
rootState:
|
|
217
|
+
rootState: s,
|
|
217
218
|
localState: r,
|
|
218
|
-
rootSetState:
|
|
219
|
+
rootSetState: i
|
|
219
220
|
})
|
|
220
221
|
});
|
|
221
222
|
return new Function(...l.map(([a]) => a), e)(...l.map(([, a]) => a));
|
|
@@ -229,19 +230,19 @@ function flattenState({
|
|
|
229
230
|
get: (o, r) => {
|
|
230
231
|
if (t && r in t)
|
|
231
232
|
return t[r];
|
|
232
|
-
const
|
|
233
|
-
return typeof
|
|
234
|
-
rootState:
|
|
233
|
+
const i = o[r];
|
|
234
|
+
return typeof i == "object" && i !== null ? flattenState({
|
|
235
|
+
rootState: i,
|
|
235
236
|
localState: void 0,
|
|
236
|
-
rootSetState: n ? (
|
|
237
|
-
o[r] =
|
|
237
|
+
rootSetState: n ? (s) => {
|
|
238
|
+
o[r] = s, n(o);
|
|
238
239
|
} : void 0
|
|
239
|
-
}) :
|
|
240
|
+
}) : i;
|
|
240
241
|
},
|
|
241
|
-
set: (o, r,
|
|
242
|
+
set: (o, r, i) => {
|
|
242
243
|
if (t && r in t)
|
|
243
244
|
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
244
|
-
return o[r] =
|
|
245
|
+
return o[r] = i, n == null || n(o), !0;
|
|
245
246
|
}
|
|
246
247
|
});
|
|
247
248
|
}
|
|
@@ -258,7 +259,7 @@ const SDK_NAME_FOR_TARGET = (() => {
|
|
|
258
259
|
if (Object(e) !== e)
|
|
259
260
|
return e;
|
|
260
261
|
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
261
|
-
return o.slice(0, -1).reduce((r,
|
|
262
|
+
return o.slice(0, -1).reduce((r, i, s) => Object(r[i]) === r[i] ? r[i] : r[i] = Math.abs(Number(o[s + 1])) >> 0 === +o[s + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
|
|
262
263
|
}, noop = () => {
|
|
263
264
|
};
|
|
264
265
|
let safeDynamicRequire = noop;
|
|
@@ -340,8 +341,8 @@ function setIsolateContext(e = {
|
|
|
340
341
|
memoryLimit: 128
|
|
341
342
|
}) {
|
|
342
343
|
const t = getIvm(), o = new t.Isolate(e).createContextSync(), r = o.global;
|
|
343
|
-
return r.setSync("global", r.derefInto()), r.setSync("log", function(...
|
|
344
|
-
console.log(...
|
|
344
|
+
return r.setSync("global", r.derefInto()), r.setSync("log", function(...i) {
|
|
345
|
+
console.log(...i);
|
|
345
346
|
}), r.setSync(INJECTED_IVM_GLOBAL, t), IVM_CONTEXT = o, o;
|
|
346
347
|
}
|
|
347
348
|
const getIsolateContext = () => IVM_CONTEXT || setIsolateContext(), runInNode = ({
|
|
@@ -350,11 +351,11 @@ const getIsolateContext = () => IVM_CONTEXT || setIsolateContext(), runInNode =
|
|
|
350
351
|
context: n,
|
|
351
352
|
event: o,
|
|
352
353
|
localState: r,
|
|
353
|
-
rootSetState:
|
|
354
|
-
rootState:
|
|
354
|
+
rootSetState: i,
|
|
355
|
+
rootState: s
|
|
355
356
|
}) => {
|
|
356
357
|
const l = getIvm(), a = fastClone({
|
|
357
|
-
...
|
|
358
|
+
...s,
|
|
358
359
|
...r
|
|
359
360
|
}), d = getFunctionArguments({
|
|
360
361
|
builder: t,
|
|
@@ -363,7 +364,7 @@ const getIsolateContext = () => IVM_CONTEXT || setIsolateContext(), runInNode =
|
|
|
363
364
|
state: a
|
|
364
365
|
}), u = getIsolateContext(), c = u.global;
|
|
365
366
|
c.setSync(BUILDER_SET_STATE_NAME, function(m, b) {
|
|
366
|
-
set(
|
|
367
|
+
set(s, m, b), i == null || i(s);
|
|
367
368
|
}), d.forEach(([m, b]) => {
|
|
368
369
|
const C = typeof b == "object" ? new l.Reference(
|
|
369
370
|
// workaround: methods with default values for arguments is not being cloned over
|
|
@@ -420,19 +421,19 @@ function evaluate({
|
|
|
420
421
|
localState: n,
|
|
421
422
|
rootState: o,
|
|
422
423
|
rootSetState: r,
|
|
423
|
-
event:
|
|
424
|
-
isExpression:
|
|
424
|
+
event: i,
|
|
425
|
+
isExpression: s = !0,
|
|
425
426
|
enableCache: l
|
|
426
427
|
}) {
|
|
427
428
|
if (e === "")
|
|
428
429
|
return;
|
|
429
430
|
const a = {
|
|
430
431
|
code: parseCode(e, {
|
|
431
|
-
isExpression:
|
|
432
|
+
isExpression: s
|
|
432
433
|
}),
|
|
433
434
|
builder: getBuilderGlobals(),
|
|
434
435
|
context: t,
|
|
435
|
-
event:
|
|
436
|
+
event: i,
|
|
436
437
|
rootSetState: r,
|
|
437
438
|
rootState: o,
|
|
438
439
|
localState: n
|
|
@@ -468,13 +469,13 @@ const evaluateBindings = ({
|
|
|
468
469
|
}) => {
|
|
469
470
|
if (!e.bindings)
|
|
470
471
|
return e;
|
|
471
|
-
const
|
|
472
|
-
...
|
|
472
|
+
const i = fastClone(e), s = {
|
|
473
|
+
...i,
|
|
473
474
|
properties: {
|
|
474
|
-
...
|
|
475
|
+
...i.properties
|
|
475
476
|
},
|
|
476
477
|
actions: {
|
|
477
|
-
...
|
|
478
|
+
...i.actions
|
|
478
479
|
}
|
|
479
480
|
};
|
|
480
481
|
for (const l in e.bindings) {
|
|
@@ -486,9 +487,9 @@ const evaluateBindings = ({
|
|
|
486
487
|
context: t,
|
|
487
488
|
enableCache: !0
|
|
488
489
|
});
|
|
489
|
-
set(
|
|
490
|
+
set(s, l, d);
|
|
490
491
|
}
|
|
491
|
-
return
|
|
492
|
+
return s;
|
|
492
493
|
};
|
|
493
494
|
function getProcessedBlock({
|
|
494
495
|
block: e,
|
|
@@ -496,28 +497,28 @@ function getProcessedBlock({
|
|
|
496
497
|
shouldEvaluateBindings: n,
|
|
497
498
|
localState: o,
|
|
498
499
|
rootState: r,
|
|
499
|
-
rootSetState:
|
|
500
|
+
rootSetState: i
|
|
500
501
|
}) {
|
|
501
|
-
const
|
|
502
|
+
const s = e;
|
|
502
503
|
return n ? evaluateBindings({
|
|
503
|
-
block:
|
|
504
|
+
block: s,
|
|
504
505
|
localState: o,
|
|
505
506
|
rootState: r,
|
|
506
|
-
rootSetState:
|
|
507
|
+
rootSetState: i,
|
|
507
508
|
context: t
|
|
508
|
-
}) :
|
|
509
|
+
}) : s;
|
|
509
510
|
}
|
|
510
511
|
const camelToKebabCase = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
511
512
|
function throttle(e, t, n = {}) {
|
|
512
|
-
let o, r,
|
|
513
|
+
let o, r, i, s = null, l = 0;
|
|
513
514
|
const a = function() {
|
|
514
|
-
l = n.leading === !1 ? 0 : Date.now(),
|
|
515
|
+
l = n.leading === !1 ? 0 : Date.now(), s = null, i = e.apply(o, r), s || (o = r = null);
|
|
515
516
|
};
|
|
516
517
|
return function() {
|
|
517
518
|
const d = Date.now();
|
|
518
519
|
!l && n.leading === !1 && (l = d);
|
|
519
520
|
const u = t - (d - l);
|
|
520
|
-
return o = this, r = arguments, u <= 0 || u > t ? (
|
|
521
|
+
return o = this, r = arguments, u <= 0 || u > t ? (s && (clearTimeout(s), s = null), l = d, i = e.apply(o, r), s || (o = r = null)) : !s && n.trailing !== !1 && (s = setTimeout(a, u)), i;
|
|
521
522
|
};
|
|
522
523
|
}
|
|
523
524
|
function assign(e, ...t) {
|
|
@@ -525,8 +526,8 @@ function assign(e, ...t) {
|
|
|
525
526
|
for (let o = 1; o < arguments.length; o++) {
|
|
526
527
|
const r = arguments[o];
|
|
527
528
|
if (r != null)
|
|
528
|
-
for (const
|
|
529
|
-
Object.prototype.hasOwnProperty.call(r,
|
|
529
|
+
for (const i in r)
|
|
530
|
+
Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
|
|
530
531
|
}
|
|
531
532
|
return n;
|
|
532
533
|
}
|
|
@@ -545,8 +546,8 @@ function warnElementNotPresent(e) {
|
|
|
545
546
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
546
547
|
}
|
|
547
548
|
function augmentAnimation(e, t) {
|
|
548
|
-
const n = getAllStylesUsed(e), o = getComputedStyle(t), r = e.steps[0].styles,
|
|
549
|
-
for (const l of
|
|
549
|
+
const n = getAllStylesUsed(e), o = getComputedStyle(t), r = e.steps[0].styles, i = e.steps[e.steps.length - 1].styles, s = [r, i];
|
|
550
|
+
for (const l of s)
|
|
550
551
|
for (const a of n)
|
|
551
552
|
a in l || (l[a] = o[a]);
|
|
552
553
|
}
|
|
@@ -580,14 +581,14 @@ function bindScrollInViewAnimation(e) {
|
|
|
580
581
|
Array.from(t).forEach((n) => {
|
|
581
582
|
augmentAnimation(e, n);
|
|
582
583
|
let o = !1, r = !1;
|
|
583
|
-
function
|
|
584
|
+
function i() {
|
|
584
585
|
!o && l(n) ? (o = !0, r = !0, setTimeout(() => {
|
|
585
|
-
assign(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll",
|
|
586
|
+
assign(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", s), setTimeout(() => {
|
|
586
587
|
r = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
|
|
587
588
|
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
588
589
|
})) : e.repeat && o && !r && !l(n) && (o = !1, assign(n.style, e.steps[0].styles));
|
|
589
590
|
}
|
|
590
|
-
const
|
|
591
|
+
const s = throttle(i, 200, {
|
|
591
592
|
leading: !1
|
|
592
593
|
});
|
|
593
594
|
function l(u) {
|
|
@@ -600,10 +601,10 @@ function bindScrollInViewAnimation(e) {
|
|
|
600
601
|
}
|
|
601
602
|
d(), setTimeout(() => {
|
|
602
603
|
n.style.transition = `all ${e.duration}s ${camelToKebabCase(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
603
|
-
}), document.addEventListener("scroll",
|
|
604
|
+
}), document.addEventListener("scroll", s, {
|
|
604
605
|
capture: !0,
|
|
605
606
|
passive: !0
|
|
606
|
-
}),
|
|
607
|
+
}), i();
|
|
607
608
|
});
|
|
608
609
|
}
|
|
609
610
|
const convertStyleMapToCSSArray = (e) => Object.entries(e).map(([n, o]) => {
|
|
@@ -654,15 +655,15 @@ const getComponent = ({
|
|
|
654
655
|
context: t,
|
|
655
656
|
registeredComponents: n
|
|
656
657
|
}) => {
|
|
657
|
-
var
|
|
658
|
-
const o = (
|
|
658
|
+
var i;
|
|
659
|
+
const o = (i = getProcessedBlock({
|
|
659
660
|
block: e,
|
|
660
661
|
localState: t.localState,
|
|
661
662
|
rootState: t.rootState,
|
|
662
663
|
rootSetState: t.rootSetState,
|
|
663
664
|
context: t.context,
|
|
664
665
|
shouldEvaluateBindings: !1
|
|
665
|
-
}).component) == null ? void 0 :
|
|
666
|
+
}).component) == null ? void 0 : i.name;
|
|
666
667
|
if (!o)
|
|
667
668
|
return null;
|
|
668
669
|
const r = n[o];
|
|
@@ -691,7 +692,7 @@ const getComponent = ({
|
|
|
691
692
|
});
|
|
692
693
|
if (!Array.isArray(r))
|
|
693
694
|
return;
|
|
694
|
-
const
|
|
695
|
+
const i = n.collection.split(".").pop(), s = n.itemName || (i ? i + "Item" : "item");
|
|
695
696
|
return r.map((a, d) => ({
|
|
696
697
|
context: {
|
|
697
698
|
...t,
|
|
@@ -699,8 +700,8 @@ const getComponent = ({
|
|
|
699
700
|
...t.localState,
|
|
700
701
|
$index: d,
|
|
701
702
|
$item: a,
|
|
702
|
-
[
|
|
703
|
-
[`$${
|
|
703
|
+
[s]: a,
|
|
704
|
+
[`$${s}Index`]: d
|
|
704
705
|
}
|
|
705
706
|
},
|
|
706
707
|
block: o
|
|
@@ -730,22 +731,22 @@ const getComponent = ({
|
|
|
730
731
|
"Error while attempting to dynamically import component DynamicDiv at ../dynamic-div.vue",
|
|
731
732
|
e
|
|
732
733
|
), e;
|
|
733
|
-
}), BlockStyles = () => import("./block-styles-
|
|
734
|
+
}), BlockStyles = () => import("./block-styles-Tyg1fV88.js").then((e) => e.default).catch((e) => {
|
|
734
735
|
throw console.error(
|
|
735
736
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
736
737
|
e
|
|
737
738
|
), e;
|
|
738
|
-
}), BlockWrapper = () => import("./block-wrapper
|
|
739
|
+
}), BlockWrapper = () => import("./block-wrapper-iBhEa5rI.js").then((e) => e.default).catch((e) => {
|
|
739
740
|
throw console.error(
|
|
740
741
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
741
742
|
e
|
|
742
743
|
), e;
|
|
743
|
-
}), ComponentRef = () => import("./component-ref-
|
|
744
|
+
}), ComponentRef = () => import("./component-ref-FN9Rzqu_.js").then((e) => e.default).catch((e) => {
|
|
744
745
|
throw console.error(
|
|
745
746
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
746
747
|
e
|
|
747
748
|
), e;
|
|
748
|
-
}), RepeatedBlock = () => import("./repeated-block-
|
|
749
|
+
}), RepeatedBlock = () => import("./repeated-block-ztDvgKZz.js").then((e) => e.default).catch((e) => {
|
|
749
750
|
throw console.error(
|
|
750
751
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
751
752
|
e
|
|
@@ -834,11 +835,11 @@ const getComponent = ({
|
|
|
834
835
|
}
|
|
835
836
|
}
|
|
836
837
|
});
|
|
837
|
-
function _sfc_render$p(e, t, n, o, r,
|
|
838
|
+
function _sfc_render$p(e, t, n, o, r, i) {
|
|
838
839
|
var c;
|
|
839
|
-
const
|
|
840
|
+
const s = resolveComponent("BlockStyles"), l = resolveComponent("ComponentRef"), a = resolveComponent("Block", !0), d = resolveComponent("BlockWrapper"), u = resolveComponent("RepeatedBlock");
|
|
840
841
|
return e.canShowBlock ? (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
841
|
-
createVNode(
|
|
842
|
+
createVNode(s, {
|
|
842
843
|
block: e.block,
|
|
843
844
|
context: e.context
|
|
844
845
|
}, null, 8, ["block", "context"]),
|
|
@@ -939,15 +940,15 @@ const Block = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$p
|
|
|
939
940
|
}
|
|
940
941
|
}
|
|
941
942
|
});
|
|
942
|
-
function _sfc_render$o(e, t, n, o, r,
|
|
943
|
+
function _sfc_render$o(e, t, n, o, r, i) {
|
|
943
944
|
return openBlock(), createBlock(resolveDynamicComponent(e.BlocksWrapper), mergeProps({
|
|
944
945
|
class: e.className + " component-178o76acnws",
|
|
945
946
|
"builder-path": e.path,
|
|
946
947
|
"builder-parent-id": e.parent,
|
|
947
948
|
style: e.styleProp,
|
|
948
|
-
onClick: (
|
|
949
|
-
onMouseEnter: (
|
|
950
|
-
onKeyPress: (
|
|
949
|
+
onClick: (s) => e.onClick(),
|
|
950
|
+
onMouseEnter: (s) => e.onMouseEnter(),
|
|
951
|
+
onKeyPress: (s) => e.onClick()
|
|
951
952
|
}, { ...e.BlocksWrapperProps }), {
|
|
952
953
|
default: withCtx(() => [
|
|
953
954
|
renderSlot(e.$slots, "default", {}, void 0, !0)
|
|
@@ -972,9 +973,9 @@ const BlocksWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_
|
|
|
972
973
|
componentsContext: ComponentsContext.key
|
|
973
974
|
}
|
|
974
975
|
});
|
|
975
|
-
function _sfc_render$n(e, t, n, o, r,
|
|
976
|
+
function _sfc_render$n(e, t, n, o, r, i) {
|
|
976
977
|
var a, d;
|
|
977
|
-
const
|
|
978
|
+
const s = resolveComponent("Block"), l = resolveComponent("BlocksWrapper");
|
|
978
979
|
return openBlock(), createBlock(l, {
|
|
979
980
|
blocks: e.blocks,
|
|
980
981
|
parent: e.parent,
|
|
@@ -984,7 +985,7 @@ function _sfc_render$n(e, t, n, o, r, s) {
|
|
|
984
985
|
BlocksWrapperProps: ((d = e.context) == null ? void 0 : d.BlocksWrapperProps) || e.builderContext.BlocksWrapperProps
|
|
985
986
|
}, {
|
|
986
987
|
default: withCtx(() => [
|
|
987
|
-
e.blocks ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList(e.blocks, (u, c) => (openBlock(), createBlock(
|
|
988
|
+
e.blocks ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList(e.blocks, (u, c) => (openBlock(), createBlock(s, {
|
|
988
989
|
key: u.id,
|
|
989
990
|
block: u,
|
|
990
991
|
linkComponent: e.linkComponent,
|
|
@@ -999,7 +1000,7 @@ const Blocks = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$
|
|
|
999
1000
|
name: "dynamic-div",
|
|
1000
1001
|
props: []
|
|
1001
1002
|
});
|
|
1002
|
-
function _sfc_render$m(e, t, n, o, r,
|
|
1003
|
+
function _sfc_render$m(e, t, n, o, r, i) {
|
|
1003
1004
|
return openBlock(), createElementBlock("div", null, [
|
|
1004
1005
|
renderSlot(e.$slots, "default")
|
|
1005
1006
|
]);
|
|
@@ -1011,11 +1012,12 @@ const DynamicDiv = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_ren
|
|
|
1011
1012
|
render() {
|
|
1012
1013
|
return h("style", {
|
|
1013
1014
|
innerHTML: this.styles,
|
|
1014
|
-
"data-id": this.id
|
|
1015
|
+
"data-id": this.id,
|
|
1016
|
+
nonce: this.nonce
|
|
1015
1017
|
});
|
|
1016
1018
|
},
|
|
1017
1019
|
name: "inlined-styles",
|
|
1018
|
-
props: ["styles", "id"]
|
|
1020
|
+
props: ["styles", "id", "nonce"]
|
|
1019
1021
|
}), SIZES = {
|
|
1020
1022
|
small: {
|
|
1021
1023
|
min: 320,
|
|
@@ -1051,12 +1053,12 @@ const DynamicDiv = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_ren
|
|
|
1051
1053
|
min: r,
|
|
1052
1054
|
default: r + 1
|
|
1053
1055
|
};
|
|
1054
|
-
const
|
|
1056
|
+
const i = n.medium.max + 1;
|
|
1055
1057
|
return n.large = {
|
|
1056
1058
|
max: 2e3,
|
|
1057
1059
|
// TODO: decide upper limit
|
|
1058
|
-
min:
|
|
1059
|
-
default:
|
|
1060
|
+
min: i,
|
|
1061
|
+
default: i + 1
|
|
1060
1062
|
}, n;
|
|
1061
1063
|
}, getColumnsClass = (e) => `builder-columns ${e}-breakpoints`, _sfc_main$m = defineComponent({
|
|
1062
1064
|
name: "builder-columns",
|
|
@@ -1120,7 +1122,7 @@ const DynamicDiv = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_ren
|
|
|
1120
1122
|
};
|
|
1121
1123
|
},
|
|
1122
1124
|
columnCssVars(e) {
|
|
1123
|
-
const t = e === 0 ? 0 : this.gutterSize, n = this.getColumnCssWidth(e), o = `${t}px`, r = "100%",
|
|
1125
|
+
const t = e === 0 ? 0 : this.gutterSize, n = this.getColumnCssWidth(e), o = `${t}px`, r = "100%", i = 0;
|
|
1124
1126
|
return {
|
|
1125
1127
|
...{
|
|
1126
1128
|
display: "flex",
|
|
@@ -1134,7 +1136,7 @@ const DynamicDiv = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_ren
|
|
|
1134
1136
|
desktopStyle: n
|
|
1135
1137
|
}),
|
|
1136
1138
|
"--column-margin-left-mobile": this.getMobileStyle({
|
|
1137
|
-
stackedStyle:
|
|
1139
|
+
stackedStyle: i,
|
|
1138
1140
|
desktopStyle: o
|
|
1139
1141
|
}),
|
|
1140
1142
|
"--column-width-tablet": this.getTabletStyle({
|
|
@@ -1142,7 +1144,7 @@ const DynamicDiv = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_ren
|
|
|
1142
1144
|
desktopStyle: n
|
|
1143
1145
|
}),
|
|
1144
1146
|
"--column-margin-left-tablet": this.getTabletStyle({
|
|
1145
|
-
stackedStyle:
|
|
1147
|
+
stackedStyle: i,
|
|
1146
1148
|
desktopStyle: o
|
|
1147
1149
|
})
|
|
1148
1150
|
};
|
|
@@ -1191,18 +1193,19 @@ const DynamicDiv = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_ren
|
|
|
1191
1193
|
}
|
|
1192
1194
|
}
|
|
1193
1195
|
});
|
|
1194
|
-
function _sfc_render$l(e, t, n, o, r,
|
|
1196
|
+
function _sfc_render$l(e, t, n, o, r, i) {
|
|
1195
1197
|
var d;
|
|
1196
|
-
const
|
|
1198
|
+
const s = resolveComponent("InlinedStyles"), l = resolveComponent("Blocks"), a = resolveComponent("DynamicRenderer");
|
|
1197
1199
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
1198
1200
|
class: e.getColumnsClass((d = e.builderBlock) == null ? void 0 : d.id) + " div-2brhoa1k8gd",
|
|
1199
1201
|
style: e.columnsCssVars()
|
|
1200
1202
|
}, {}), [
|
|
1201
|
-
e.TARGET !== "reactNative" ? (openBlock(), createBlock(
|
|
1203
|
+
e.TARGET !== "reactNative" ? (openBlock(), createBlock(s, {
|
|
1202
1204
|
key: 0,
|
|
1203
1205
|
id: "builderio-columns",
|
|
1204
|
-
styles: e.columnsStyles()
|
|
1205
|
-
|
|
1206
|
+
styles: e.columnsStyles(),
|
|
1207
|
+
nonce: e.builderContext.nonce
|
|
1208
|
+
}, null, 8, ["styles", "nonce"])) : createCommentVNode("", !0),
|
|
1206
1209
|
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.columns, (u, c) => (openBlock(), createBlock(a, {
|
|
1207
1210
|
key: c,
|
|
1208
1211
|
TagName: e.getTagName(u),
|
|
@@ -1226,11 +1229,11 @@ function _sfc_render$l(e, t, n, o, r, s) {
|
|
|
1226
1229
|
}, 1032, ["TagName", "attributes"]))), 128))
|
|
1227
1230
|
], 16);
|
|
1228
1231
|
}
|
|
1229
|
-
const Columns = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-
|
|
1232
|
+
const Columns = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-975347d5"]]), _sfc_main$l = defineComponent({
|
|
1230
1233
|
name: "builder-fragment-component",
|
|
1231
1234
|
props: []
|
|
1232
1235
|
});
|
|
1233
|
-
function _sfc_render$k(e, t, n, o, r,
|
|
1236
|
+
function _sfc_render$k(e, t, n, o, r, i) {
|
|
1234
1237
|
return openBlock(), createElementBlock("span", null, [
|
|
1235
1238
|
renderSlot(e.$slots, "default")
|
|
1236
1239
|
]);
|
|
@@ -1250,8 +1253,8 @@ function getShopifyImageUrl(e, t) {
|
|
|
1250
1253
|
return removeProtocol(e);
|
|
1251
1254
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
1252
1255
|
if (n) {
|
|
1253
|
-
const o = e.split(n[0]), r = n[3],
|
|
1254
|
-
return removeProtocol(`${o[0]}_${
|
|
1256
|
+
const o = e.split(n[0]), r = n[3], i = t.match("x") ? t : `${t}x`;
|
|
1257
|
+
return removeProtocol(`${o[0]}_${i}${r}`);
|
|
1255
1258
|
}
|
|
1256
1259
|
return null;
|
|
1257
1260
|
}
|
|
@@ -1291,12 +1294,14 @@ const _sfc_main$k = defineComponent({
|
|
|
1291
1294
|
// images, otherwise you can supply this prop manually
|
|
1292
1295
|
!(t.match(/builder\.io/) || t.match(/cdn\.shopify\.com/)))
|
|
1293
1296
|
return this.srcset;
|
|
1294
|
-
if (this.
|
|
1295
|
-
if (
|
|
1296
|
-
|
|
1297
|
-
|
|
1297
|
+
if (!this.noWebp) {
|
|
1298
|
+
if (this.srcset && ((n = this.image) != null && n.includes("builder.io/api/v1/image"))) {
|
|
1299
|
+
if (!this.srcset.includes(this.image.split("?")[0]))
|
|
1300
|
+
return console.debug("Removed given srcset"), getSrcSet(t);
|
|
1301
|
+
} else if (this.image && !this.srcset)
|
|
1302
|
+
return getSrcSet(t);
|
|
1298
1303
|
return getSrcSet(t);
|
|
1299
|
-
|
|
1304
|
+
}
|
|
1300
1305
|
},
|
|
1301
1306
|
webpSrcSet() {
|
|
1302
1307
|
var e;
|
|
@@ -1317,8 +1322,8 @@ const _sfc_main$k = defineComponent({
|
|
|
1317
1322
|
key: 2,
|
|
1318
1323
|
class: "div-1pl23ac79ld-2"
|
|
1319
1324
|
};
|
|
1320
|
-
function _sfc_render$j(e, t, n, o, r,
|
|
1321
|
-
var
|
|
1325
|
+
function _sfc_render$j(e, t, n, o, r, i) {
|
|
1326
|
+
var s, l, a, d, u, c;
|
|
1322
1327
|
return openBlock(), createElementBlock(Fragment$1, null, [
|
|
1323
1328
|
createElementVNode("picture", null, [
|
|
1324
1329
|
e.webpSrcSet ? (openBlock(), createElementBlock("source", {
|
|
@@ -1344,7 +1349,7 @@ function _sfc_render$j(e, t, n, o, r, s) {
|
|
|
1344
1349
|
sizes: e.sizes
|
|
1345
1350
|
}, null, 14, _hoisted_2$4)
|
|
1346
1351
|
]),
|
|
1347
|
-
e.aspectRatio && !((l = (
|
|
1352
|
+
e.aspectRatio && !((l = (s = e.builderBlock) == null ? void 0 : s.children) != null && l.length && e.fitContent) ? (openBlock(), createElementBlock("div", {
|
|
1348
1353
|
key: 0,
|
|
1349
1354
|
class: "builder-image-sizer div-1pl23ac79ld",
|
|
1350
1355
|
style: normalizeStyle({
|
|
@@ -1357,14 +1362,14 @@ function _sfc_render$j(e, t, n, o, r, s) {
|
|
|
1357
1362
|
])) : createCommentVNode("", !0)
|
|
1358
1363
|
], 64);
|
|
1359
1364
|
}
|
|
1360
|
-
const Image = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-
|
|
1365
|
+
const Image = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-ce62b8d6"]]), _sfc_main$j = defineComponent({
|
|
1361
1366
|
name: "builder-section-component",
|
|
1362
1367
|
props: ["attributes", "maxWidth"],
|
|
1363
1368
|
data() {
|
|
1364
1369
|
return { filterAttrs };
|
|
1365
1370
|
}
|
|
1366
1371
|
});
|
|
1367
|
-
function _sfc_render$i(e, t, n, o, r,
|
|
1372
|
+
function _sfc_render$i(e, t, n, o, r, i) {
|
|
1368
1373
|
return openBlock(), createElementBlock("section", mergeProps({
|
|
1369
1374
|
style: {
|
|
1370
1375
|
width: "100%",
|
|
@@ -1403,8 +1408,8 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render
|
|
|
1403
1408
|
value: t,
|
|
1404
1409
|
expires: n
|
|
1405
1410
|
}) => {
|
|
1406
|
-
const r = (isBrowser() ? location.protocol === "https:" : !0) ? SECURE_CONFIG : [[]],
|
|
1407
|
-
return stringifyCookie(
|
|
1411
|
+
const r = (isBrowser() ? location.protocol === "https:" : !0) ? SECURE_CONFIG : [[]], i = n ? [["expires", n.toUTCString()]] : [[]], s = [[e, t], ...i, ["path", "/"], ["domain", getTopLevelDomain(window.location.hostname)], ...r];
|
|
1412
|
+
return stringifyCookie(s);
|
|
1408
1413
|
}, setCookie = async ({
|
|
1409
1414
|
name: e,
|
|
1410
1415
|
value: t,
|
|
@@ -1447,10 +1452,10 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render
|
|
|
1447
1452
|
var r;
|
|
1448
1453
|
let n = 0;
|
|
1449
1454
|
const o = Math.random();
|
|
1450
|
-
for (const
|
|
1451
|
-
const
|
|
1452
|
-
if (n +=
|
|
1453
|
-
return
|
|
1455
|
+
for (const i in t) {
|
|
1456
|
+
const s = (r = t[i]) == null ? void 0 : r.testRatio;
|
|
1457
|
+
if (n += s, o < n)
|
|
1458
|
+
return i;
|
|
1454
1459
|
}
|
|
1455
1460
|
return e;
|
|
1456
1461
|
}, getAndSetVariantId = (e) => {
|
|
@@ -1694,18 +1699,18 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render
|
|
|
1694
1699
|
`.builder-accordion-title[data-index="${n}"]`
|
|
1695
1700
|
);
|
|
1696
1701
|
if (e = n, r) {
|
|
1697
|
-
let
|
|
1702
|
+
let i = r.getBoundingClientRect();
|
|
1698
1703
|
for (; r = r && r.nextElementSibling; )
|
|
1699
1704
|
if (r) {
|
|
1700
1705
|
if (r.classList.contains("builder-accordion-detail"))
|
|
1701
1706
|
continue;
|
|
1702
|
-
const
|
|
1703
|
-
if (
|
|
1707
|
+
const s = r.getBoundingClientRect();
|
|
1708
|
+
if (s.left > i.left) {
|
|
1704
1709
|
const l = parseInt(
|
|
1705
1710
|
r.getAttribute("data-index") || "",
|
|
1706
1711
|
10
|
|
1707
1712
|
);
|
|
1708
|
-
isNaN(l) || (
|
|
1713
|
+
isNaN(l) || (i = s, e = l);
|
|
1709
1714
|
} else
|
|
1710
1715
|
break;
|
|
1711
1716
|
}
|
|
@@ -1737,8 +1742,8 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render
|
|
|
1737
1742
|
}
|
|
1738
1743
|
}
|
|
1739
1744
|
}), _hoisted_1$a = ["data-index", "onClick"];
|
|
1740
|
-
function _sfc_render$h(e, t, n, o, r,
|
|
1741
|
-
const
|
|
1745
|
+
function _sfc_render$h(e, t, n, o, r, i) {
|
|
1746
|
+
const s = resolveComponent("Blocks");
|
|
1742
1747
|
return openBlock(), createElementBlock("div", {
|
|
1743
1748
|
class: "builder-accordion",
|
|
1744
1749
|
style: normalizeStyle(e.accordionStyles)
|
|
@@ -1754,7 +1759,7 @@ function _sfc_render$h(e, t, n, o, r, s) {
|
|
|
1754
1759
|
"data-index": a,
|
|
1755
1760
|
onClick: (d) => e.onClick(a)
|
|
1756
1761
|
}, [
|
|
1757
|
-
createVNode(
|
|
1762
|
+
createVNode(s, {
|
|
1758
1763
|
blocks: l.title,
|
|
1759
1764
|
path: `items.${a}.title`,
|
|
1760
1765
|
parent: e.builderBlock.id,
|
|
@@ -1768,7 +1773,7 @@ function _sfc_render$h(e, t, n, o, r, s) {
|
|
|
1768
1773
|
class: normalizeClass(e.getAccordionDetailClassName(a)),
|
|
1769
1774
|
style: normalizeStyle(e.accordionDetailStyles)
|
|
1770
1775
|
}, [
|
|
1771
|
-
createVNode(
|
|
1776
|
+
createVNode(s, {
|
|
1772
1777
|
blocks: l.detail,
|
|
1773
1778
|
path: `items.${a}.detail`,
|
|
1774
1779
|
parent: e.builderBlock.id,
|
|
@@ -1995,7 +2000,7 @@ const Accordion = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_rend
|
|
|
1995
2000
|
});
|
|
1996
2001
|
}
|
|
1997
2002
|
const n = e.get("columns");
|
|
1998
|
-
Array.isArray(n) && n.find((r) => r.get("width")) && (n.find((
|
|
2003
|
+
Array.isArray(n) && n.find((r) => r.get("width")) && (n.find((i) => !i.get("width")) || n.reduce((l, a) => l + a.get("width"), 0) !== 100) && t();
|
|
1999
2004
|
}
|
|
2000
2005
|
}, {
|
|
2001
2006
|
name: "space",
|
|
@@ -2049,7 +2054,7 @@ const Accordion = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_rend
|
|
|
2049
2054
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
2050
2055
|
onChange: (e) => {
|
|
2051
2056
|
e.delete("srcset"), e.delete("noWebp");
|
|
2052
|
-
function n(
|
|
2057
|
+
function n(s, l = 6e4) {
|
|
2053
2058
|
return new Promise((a, d) => {
|
|
2054
2059
|
const u = document.createElement("img");
|
|
2055
2060
|
let c = !1;
|
|
@@ -2057,21 +2062,21 @@ const Accordion = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_rend
|
|
|
2057
2062
|
c = !0, a(u);
|
|
2058
2063
|
}, u.addEventListener("error", (p) => {
|
|
2059
2064
|
console.warn("Image load failed", p.error), d(p.error);
|
|
2060
|
-
}), u.src =
|
|
2065
|
+
}), u.src = s, setTimeout(() => {
|
|
2061
2066
|
c || d(new Error("Image load timed out"));
|
|
2062
2067
|
}, l);
|
|
2063
2068
|
});
|
|
2064
2069
|
}
|
|
2065
|
-
function o(
|
|
2066
|
-
return Math.round(
|
|
2070
|
+
function o(s) {
|
|
2071
|
+
return Math.round(s * 1e3) / 1e3;
|
|
2067
2072
|
}
|
|
2068
|
-
const r = e.get("image"),
|
|
2069
|
-
if (fetch(r).then((
|
|
2070
|
-
|
|
2071
|
-
}), r && (!
|
|
2072
|
-
return n(r).then((
|
|
2073
|
+
const r = e.get("image"), i = e.get("aspectRatio");
|
|
2074
|
+
if (fetch(r).then((s) => s.blob()).then((s) => {
|
|
2075
|
+
s.type.includes("svg") && e.set("noWebp", !0);
|
|
2076
|
+
}), r && (!i || i === 0.7041))
|
|
2077
|
+
return n(r).then((s) => {
|
|
2073
2078
|
const l = e.get("aspectRatio");
|
|
2074
|
-
e.get("image") === r && (!l || l === 0.7041) &&
|
|
2079
|
+
e.get("image") === r && (!l || l === 0.7041) && s.width && s.height && (e.set("aspectRatio", o(s.height / s.width)), e.set("height", s.height), e.set("width", s.width));
|
|
2075
2080
|
});
|
|
2076
2081
|
}
|
|
2077
2082
|
}, {
|
|
@@ -2197,9 +2202,9 @@ const Accordion = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_rend
|
|
|
2197
2202
|
components: { Blocks },
|
|
2198
2203
|
props: ["builderContext", "name"]
|
|
2199
2204
|
});
|
|
2200
|
-
function _sfc_render$g(e, t, n, o, r,
|
|
2205
|
+
function _sfc_render$g(e, t, n, o, r, i) {
|
|
2201
2206
|
var l, a, d;
|
|
2202
|
-
const
|
|
2207
|
+
const s = resolveComponent("Blocks");
|
|
2203
2208
|
return openBlock(), createElementBlock("div", mergeProps(
|
|
2204
2209
|
{ style: {
|
|
2205
2210
|
pointerEvents: "auto"
|
|
@@ -2208,7 +2213,7 @@ function _sfc_render$g(e, t, n, o, r, s) {
|
|
|
2208
2213
|
"builder-slot": e.name
|
|
2209
2214
|
}
|
|
2210
2215
|
), [
|
|
2211
|
-
createVNode(
|
|
2216
|
+
createVNode(s, {
|
|
2212
2217
|
parent: (a = e.builderContext.context) == null ? void 0 : a.symbolId,
|
|
2213
2218
|
path: `symbol.data.${e.name}`,
|
|
2214
2219
|
context: e.builderContext,
|
|
@@ -2422,8 +2427,8 @@ const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g]
|
|
|
2422
2427
|
}
|
|
2423
2428
|
}
|
|
2424
2429
|
}), _hoisted_1$9 = ["onClick"], _hoisted_2$3 = { key: 0 };
|
|
2425
|
-
function _sfc_render$f(e, t, n, o, r,
|
|
2426
|
-
const
|
|
2430
|
+
function _sfc_render$f(e, t, n, o, r, i) {
|
|
2431
|
+
const s = resolveComponent("Blocks");
|
|
2427
2432
|
return openBlock(), createElementBlock("div", null, [
|
|
2428
2433
|
createElementVNode("div", {
|
|
2429
2434
|
class: "builder-tabs-wrap",
|
|
@@ -2442,7 +2447,7 @@ function _sfc_render$f(e, t, n, o, r, s) {
|
|
|
2442
2447
|
}),
|
|
2443
2448
|
onClick: (d) => e.onClick(a)
|
|
2444
2449
|
}, [
|
|
2445
|
-
createVNode(
|
|
2450
|
+
createVNode(s, {
|
|
2446
2451
|
parent: e.builderBlock.id,
|
|
2447
2452
|
path: `component.options.tabs.${a}.label`,
|
|
2448
2453
|
blocks: l.label,
|
|
@@ -2453,7 +2458,7 @@ function _sfc_render$f(e, t, n, o, r, s) {
|
|
|
2453
2458
|
], 14, _hoisted_1$9))), 128))
|
|
2454
2459
|
], 4),
|
|
2455
2460
|
e.activeTabContent(e.activeTab) ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
|
|
2456
|
-
createVNode(
|
|
2461
|
+
createVNode(s, {
|
|
2457
2462
|
parent: e.builderBlock.id,
|
|
2458
2463
|
path: `component.options.tabs.${e.activeTab}.content`,
|
|
2459
2464
|
blocks: e.activeTabContent(e.activeTab),
|
|
@@ -2489,11 +2494,11 @@ const Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f]
|
|
|
2489
2494
|
name: "builder-text",
|
|
2490
2495
|
props: ["text"]
|
|
2491
2496
|
}), _hoisted_1$8 = ["innerHTML"];
|
|
2492
|
-
function _sfc_render$e(e, t, n, o, r,
|
|
2493
|
-
var
|
|
2497
|
+
function _sfc_render$e(e, t, n, o, r, i) {
|
|
2498
|
+
var s;
|
|
2494
2499
|
return openBlock(), createElementBlock("div", {
|
|
2495
2500
|
class: "builder-text",
|
|
2496
|
-
innerHTML: ((
|
|
2501
|
+
innerHTML: ((s = e.text) == null ? void 0 : s.toString()) || "",
|
|
2497
2502
|
style: {
|
|
2498
2503
|
outline: "none"
|
|
2499
2504
|
}
|
|
@@ -2556,7 +2561,7 @@ const Text = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e]
|
|
|
2556
2561
|
}
|
|
2557
2562
|
}
|
|
2558
2563
|
}), _hoisted_1$7 = ["innerHTML"];
|
|
2559
|
-
function _sfc_render$d(e, t, n, o, r,
|
|
2564
|
+
function _sfc_render$d(e, t, n, o, r, i) {
|
|
2560
2565
|
return openBlock(), createElementBlock("div", {
|
|
2561
2566
|
ref: "elementRef",
|
|
2562
2567
|
class: normalizeClass("builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")),
|
|
@@ -2621,7 +2626,7 @@ const customCode = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_ren
|
|
|
2621
2626
|
}
|
|
2622
2627
|
}
|
|
2623
2628
|
}), _hoisted_1$6 = ["innerHTML"];
|
|
2624
|
-
function _sfc_render$c(e, t, n, o, r,
|
|
2629
|
+
function _sfc_render$c(e, t, n, o, r, i) {
|
|
2625
2630
|
return openBlock(), createElementBlock("div", {
|
|
2626
2631
|
class: "builder-embed",
|
|
2627
2632
|
ref: "elem",
|
|
@@ -2869,7 +2874,7 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c
|
|
|
2869
2874
|
const e = process.env.NODE_ENV || "production";
|
|
2870
2875
|
return validEnvList.includes(e) ? e : "production";
|
|
2871
2876
|
}, get = (e, t, n) => {
|
|
2872
|
-
const o = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((r,
|
|
2877
|
+
const o = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((r, i) => r != null ? r[i] : r, e);
|
|
2873
2878
|
return o === void 0 || o === e ? n : o;
|
|
2874
2879
|
}, _sfc_main$c = defineComponent({
|
|
2875
2880
|
name: "builder-form-component",
|
|
@@ -2929,8 +2934,8 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c
|
|
|
2929
2934
|
}
|
|
2930
2935
|
e.preventDefault();
|
|
2931
2936
|
const o = e.currentTarget || e.target, r = this.customHeaders || {};
|
|
2932
|
-
let
|
|
2933
|
-
const
|
|
2937
|
+
let i;
|
|
2938
|
+
const s = new FormData(o), l = Array.from(o.querySelectorAll("input,select,textarea")).filter((c) => !!c.name).map((c) => {
|
|
2934
2939
|
let p;
|
|
2935
2940
|
const f = c.name;
|
|
2936
2941
|
if (c instanceof HTMLInputElement)
|
|
@@ -2958,17 +2963,17 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c
|
|
|
2958
2963
|
if (this.sendSubmissionsTo === "email" && (a = "multipart/form-data"), Array.from(l).forEach(({ value: c }) => {
|
|
2959
2964
|
(c instanceof File || Array.isArray(c) && c[0] instanceof File || c instanceof FileList) && (a = "multipart/form-data");
|
|
2960
2965
|
}), a !== "application/json")
|
|
2961
|
-
|
|
2966
|
+
i = s;
|
|
2962
2967
|
else {
|
|
2963
2968
|
const c = {};
|
|
2964
2969
|
Array.from(l).forEach(({ value: p, key: f }) => {
|
|
2965
2970
|
set(c, f, p);
|
|
2966
|
-
}),
|
|
2971
|
+
}), i = JSON.stringify(c);
|
|
2967
2972
|
}
|
|
2968
2973
|
a && a !== "multipart/form-data" && (t && ((n = this.action) != null && n.includes("zapier.com")) || (r["content-type"] = a));
|
|
2969
2974
|
const d = new CustomEvent("presubmit", {
|
|
2970
2975
|
detail: {
|
|
2971
|
-
body:
|
|
2976
|
+
body: i
|
|
2972
2977
|
}
|
|
2973
2978
|
});
|
|
2974
2979
|
if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(d), d.defaultPrevented))
|
|
@@ -2980,7 +2985,7 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c
|
|
|
2980
2985
|
fetch(
|
|
2981
2986
|
this.sendSubmissionsTo === "email" ? u : this.action,
|
|
2982
2987
|
{
|
|
2983
|
-
body:
|
|
2988
|
+
body: i,
|
|
2984
2989
|
headers: r,
|
|
2985
2990
|
method: this.method || "post"
|
|
2986
2991
|
}
|
|
@@ -3034,9 +3039,9 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c
|
|
|
3034
3039
|
key: 3,
|
|
3035
3040
|
class: "builder-form-error-text pre-3i4ezorcfhi"
|
|
3036
3041
|
};
|
|
3037
|
-
function _sfc_render$b(e, t, n, o, r,
|
|
3042
|
+
function _sfc_render$b(e, t, n, o, r, i) {
|
|
3038
3043
|
var a;
|
|
3039
|
-
const
|
|
3044
|
+
const s = resolveComponent("Block"), l = resolveComponent("Blocks");
|
|
3040
3045
|
return openBlock(), createElementBlock("form", mergeProps({
|
|
3041
3046
|
validate: e.validate,
|
|
3042
3047
|
ref: "formRef",
|
|
@@ -3045,7 +3050,7 @@ function _sfc_render$b(e, t, n, o, r, s) {
|
|
|
3045
3050
|
name: e.name,
|
|
3046
3051
|
onSubmit: t[0] || (t[0] = (d) => e.onSubmit(d))
|
|
3047
3052
|
}, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
3048
|
-
e.builderBlock && e.builderBlock.children ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList((a = e.builderBlock) == null ? void 0 : a.children, (d, u) => (openBlock(), createBlock(
|
|
3053
|
+
e.builderBlock && e.builderBlock.children ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList((a = e.builderBlock) == null ? void 0 : a.children, (d, u) => (openBlock(), createBlock(s, {
|
|
3049
3054
|
key: `form-block-${e.idx}`,
|
|
3050
3055
|
block: d,
|
|
3051
3056
|
context: e.builderContext,
|
|
@@ -3139,7 +3144,7 @@ const Form = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b]
|
|
|
3139
3144
|
return { isEditing, filterAttrs };
|
|
3140
3145
|
}
|
|
3141
3146
|
}), _hoisted_1$4 = ["placeholder", "type", "name", "value", "defaultValue", "required"];
|
|
3142
|
-
function _sfc_render$a(e, t, n, o, r,
|
|
3147
|
+
function _sfc_render$a(e, t, n, o, r, i) {
|
|
3143
3148
|
return openBlock(), createElementBlock("input", mergeProps({
|
|
3144
3149
|
key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
|
|
3145
3150
|
placeholder: e.placeholder,
|
|
@@ -3199,7 +3204,7 @@ const FormInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_rend
|
|
|
3199
3204
|
return { isEditing, filterAttrs };
|
|
3200
3205
|
}
|
|
3201
3206
|
}), _hoisted_1$3 = ["value", "defaultValue", "name", "required"], _hoisted_2$1 = ["value"];
|
|
3202
|
-
function _sfc_render$9(e, t, n, o, r,
|
|
3207
|
+
function _sfc_render$9(e, t, n, o, r, i) {
|
|
3203
3208
|
return openBlock(), createElementBlock("select", mergeProps({
|
|
3204
3209
|
value: e.value,
|
|
3205
3210
|
key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
|
|
@@ -3207,10 +3212,10 @@ function _sfc_render$9(e, t, n, o, r, s) {
|
|
|
3207
3212
|
name: e.name,
|
|
3208
3213
|
required: e.required
|
|
3209
3214
|
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
3210
|
-
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.options, (
|
|
3211
|
-
key: `${
|
|
3212
|
-
value:
|
|
3213
|
-
}, toDisplayString(
|
|
3215
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.options, (s, l) => (openBlock(), createElementBlock("option", {
|
|
3216
|
+
key: `${s.name}-${l}`,
|
|
3217
|
+
value: s.value
|
|
3218
|
+
}, toDisplayString(s.name || s.value), 9, _hoisted_2$1))), 128))
|
|
3214
3219
|
], 16, _hoisted_1$3);
|
|
3215
3220
|
}
|
|
3216
3221
|
const FormSelect = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9]]), componentInfo$3 = {
|
|
@@ -3245,7 +3250,7 @@ const FormSelect = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_ren
|
|
|
3245
3250
|
return { filterAttrs };
|
|
3246
3251
|
}
|
|
3247
3252
|
});
|
|
3248
|
-
function _sfc_render$8(e, t, n, o, r,
|
|
3253
|
+
function _sfc_render$8(e, t, n, o, r, i) {
|
|
3249
3254
|
return openBlock(), createElementBlock("button", mergeProps({ type: "submit" }, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), toDisplayString(e.text), 17);
|
|
3250
3255
|
}
|
|
3251
3256
|
const FormSubmitButton = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8]]), componentInfo$2 = {
|
|
@@ -3298,7 +3303,7 @@ const FormSubmitButton = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _s
|
|
|
3298
3303
|
return { filterAttrs };
|
|
3299
3304
|
}
|
|
3300
3305
|
}), _hoisted_1$2 = ["placeholder", "name", "value", "defaultValue", "required"];
|
|
3301
|
-
function _sfc_render$7(e, t, n, o, r,
|
|
3306
|
+
function _sfc_render$7(e, t, n, o, r, i) {
|
|
3302
3307
|
return openBlock(), createElementBlock("textarea", mergeProps({
|
|
3303
3308
|
placeholder: e.placeholder,
|
|
3304
3309
|
name: e.name,
|
|
@@ -3335,7 +3340,7 @@ const Textarea = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_rende
|
|
|
3335
3340
|
return { isEditing, filterAttrs };
|
|
3336
3341
|
}
|
|
3337
3342
|
}), _hoisted_1$1 = ["alt", "src"];
|
|
3338
|
-
function _sfc_render$6(e, t, n, o, r,
|
|
3343
|
+
function _sfc_render$6(e, t, n, o, r, i) {
|
|
3339
3344
|
return openBlock(), createElementBlock("img", mergeProps({
|
|
3340
3345
|
style: {
|
|
3341
3346
|
objectFit: e.backgroundSize || "cover",
|
|
@@ -3498,8 +3503,8 @@ const Img = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]]
|
|
|
3498
3503
|
height: "100%"
|
|
3499
3504
|
}
|
|
3500
3505
|
};
|
|
3501
|
-
function _sfc_render$5(e, t, n, o, r,
|
|
3502
|
-
var
|
|
3506
|
+
function _sfc_render$5(e, t, n, o, r, i) {
|
|
3507
|
+
var s, l, a, d, u, c, p;
|
|
3503
3508
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
3504
3509
|
createElementVNode("video", mergeProps({
|
|
3505
3510
|
class: "builder-video",
|
|
@@ -3507,7 +3512,7 @@ function _sfc_render$5(e, t, n, o, r, s) {
|
|
|
3507
3512
|
style: {
|
|
3508
3513
|
width: "100%",
|
|
3509
3514
|
height: "100%",
|
|
3510
|
-
...(
|
|
3515
|
+
...(s = e.attributes) == null ? void 0 : s.style,
|
|
3511
3516
|
objectFit: e.fit,
|
|
3512
3517
|
objectPosition: e.position,
|
|
3513
3518
|
// Hack to get object fit to work as expected and
|
|
@@ -3612,9 +3617,9 @@ const Video = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5
|
|
|
3612
3617
|
...t
|
|
3613
3618
|
}) => ({
|
|
3614
3619
|
...fastClone(t),
|
|
3615
|
-
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [r,
|
|
3620
|
+
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [r, i]) => ({
|
|
3616
3621
|
...o,
|
|
3617
|
-
[r]: serializeValue(
|
|
3622
|
+
[r]: serializeValue(i)
|
|
3618
3623
|
}), {}))
|
|
3619
3624
|
}), UPDATE_COOKIES_AND_STYLES_SCRIPT = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
3620
3625
|
function getAndSetVariantId() {
|
|
@@ -3728,11 +3733,12 @@ const Video = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5
|
|
|
3728
3733
|
render() {
|
|
3729
3734
|
return h("script", {
|
|
3730
3735
|
innerHTML: this.scriptStr,
|
|
3731
|
-
"data-id": this.id
|
|
3736
|
+
"data-id": this.id,
|
|
3737
|
+
nonce: this.nonce
|
|
3732
3738
|
});
|
|
3733
3739
|
},
|
|
3734
3740
|
name: "inlined-script",
|
|
3735
|
-
props: ["scriptStr", "id"]
|
|
3741
|
+
props: ["scriptStr", "id", "nonce"]
|
|
3736
3742
|
});
|
|
3737
3743
|
function getGlobalThis() {
|
|
3738
3744
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
@@ -3747,20 +3753,20 @@ function getFetch() {
|
|
|
3747
3753
|
const fetch$1 = getFetch();
|
|
3748
3754
|
function flatten(e, t = null, n = ".") {
|
|
3749
3755
|
return Object.keys(e).reduce((o, r) => {
|
|
3750
|
-
const
|
|
3751
|
-
return [typeof
|
|
3756
|
+
const i = e[r], s = [t, r].filter(Boolean).join(n);
|
|
3757
|
+
return [typeof i == "object", i !== null, !(Array.isArray(i) && i.length === 0)].every(Boolean) ? {
|
|
3752
3758
|
...o,
|
|
3753
|
-
...flatten(
|
|
3759
|
+
...flatten(i, s, n)
|
|
3754
3760
|
} : {
|
|
3755
3761
|
...o,
|
|
3756
|
-
[
|
|
3762
|
+
[s]: i
|
|
3757
3763
|
};
|
|
3758
3764
|
}, {});
|
|
3759
3765
|
}
|
|
3760
3766
|
function flattenMongoQuery(e, t, n = {}) {
|
|
3761
3767
|
for (const o in e) {
|
|
3762
|
-
const r = e[o],
|
|
3763
|
-
r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((
|
|
3768
|
+
const r = e[o], i = t ? t + "." + o : o;
|
|
3769
|
+
r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((s) => s.startsWith("$")) ? flattenMongoQuery(r, i, n) : n[i] = r;
|
|
3764
3770
|
}
|
|
3765
3771
|
return n;
|
|
3766
3772
|
}
|
|
@@ -3785,8 +3791,8 @@ const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUIL
|
|
|
3785
3791
|
userAttributes: n,
|
|
3786
3792
|
query: o,
|
|
3787
3793
|
model: r,
|
|
3788
|
-
apiKey:
|
|
3789
|
-
enrich:
|
|
3794
|
+
apiKey: i,
|
|
3795
|
+
enrich: s,
|
|
3790
3796
|
locale: l,
|
|
3791
3797
|
apiVersion: a = DEFAULT_API_VERSION,
|
|
3792
3798
|
fields: d,
|
|
@@ -3797,12 +3803,12 @@ const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUIL
|
|
|
3797
3803
|
sort: m,
|
|
3798
3804
|
includeUnpublished: b
|
|
3799
3805
|
} = e;
|
|
3800
|
-
if (!
|
|
3806
|
+
if (!i)
|
|
3801
3807
|
throw new Error("Missing API key");
|
|
3802
3808
|
if (!["v3"].includes(a))
|
|
3803
3809
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${a}'`);
|
|
3804
3810
|
const C = t !== 1, g = new URL(`https://cdn.builder.io/api/${a}/content/${r}`);
|
|
3805
|
-
if (g.searchParams.set("apiKey",
|
|
3811
|
+
if (g.searchParams.set("apiKey", i), g.searchParams.set("limit", String(t)), g.searchParams.set("noTraverse", String(C)), g.searchParams.set("includeRefs", String(!0)), l && g.searchParams.set("locale", l), s && g.searchParams.set("enrich", String(s)), g.searchParams.set("omit", u || "meta.componentsUsed"), d && g.searchParams.set("fields", d), Number.isFinite(c) && c > -1 && g.searchParams.set("offset", String(Math.floor(c))), typeof b == "boolean" && g.searchParams.set("includeUnpublished", String(b)), p && isPositiveNumber(p) && g.searchParams.set("cacheSeconds", String(p)), f && isPositiveNumber(f) && g.searchParams.set("staleCacheSeconds", String(f)), m) {
|
|
3806
3812
|
const k = flatten({
|
|
3807
3813
|
sort: m
|
|
3808
3814
|
});
|
|
@@ -3840,9 +3846,9 @@ const _fetchContent = async (e) => {
|
|
|
3840
3846
|
return t.results;
|
|
3841
3847
|
try {
|
|
3842
3848
|
const r = [];
|
|
3843
|
-
for (const
|
|
3849
|
+
for (const i of t.results)
|
|
3844
3850
|
r.push(await handleABTesting({
|
|
3845
|
-
item:
|
|
3851
|
+
item: i,
|
|
3846
3852
|
canTrack: o
|
|
3847
3853
|
}));
|
|
3848
3854
|
t.results = r;
|
|
@@ -4030,10 +4036,10 @@ const findParentElement = (e, t, n = !0) => {
|
|
|
4030
4036
|
event: e,
|
|
4031
4037
|
target: t
|
|
4032
4038
|
}) => {
|
|
4033
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top,
|
|
4039
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, i = round(o / n.width), s = round(r / n.height);
|
|
4034
4040
|
return {
|
|
4035
|
-
x:
|
|
4036
|
-
y:
|
|
4041
|
+
x: i,
|
|
4042
|
+
y: s
|
|
4037
4043
|
};
|
|
4038
4044
|
}, getInteractionPropertiesForEvent = (e) => {
|
|
4039
4045
|
const t = e.target, n = t && findBuilderParent(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
@@ -4058,7 +4064,7 @@ function isFromTrustedHost(e, t) {
|
|
|
4058
4064
|
const n = new URL(t.origin), o = n.hostname;
|
|
4059
4065
|
return (e || DEFAULT_TRUSTED_HOSTS).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
|
|
4060
4066
|
}
|
|
4061
|
-
const SDK_VERSION = "2.0.
|
|
4067
|
+
const SDK_VERSION = "2.0.2", registry = {};
|
|
4062
4068
|
function register(e, t) {
|
|
4063
4069
|
let n = registry[e];
|
|
4064
4070
|
if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
|
|
@@ -4119,7 +4125,7 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
4119
4125
|
options: e
|
|
4120
4126
|
}
|
|
4121
4127
|
}, "*"), window.addEventListener("message", (o) => {
|
|
4122
|
-
var
|
|
4128
|
+
var i, s;
|
|
4123
4129
|
if (!isFromTrustedHost(e.trustedHosts, o))
|
|
4124
4130
|
return;
|
|
4125
4131
|
const {
|
|
@@ -4135,7 +4141,7 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
4135
4141
|
} catch (f) {
|
|
4136
4142
|
p = f;
|
|
4137
4143
|
}
|
|
4138
|
-
p ? (
|
|
4144
|
+
p ? (i = window.parent) == null || i.postMessage({
|
|
4139
4145
|
type: "builder.evaluateError",
|
|
4140
4146
|
data: {
|
|
4141
4147
|
id: d,
|
|
@@ -4150,7 +4156,7 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
4150
4156
|
result: f
|
|
4151
4157
|
}
|
|
4152
4158
|
}, "*");
|
|
4153
|
-
}).catch(console.error) : (
|
|
4159
|
+
}).catch(console.error) : (s = window.parent) == null || s.postMessage({
|
|
4154
4160
|
type: "builder.evaluateResult",
|
|
4155
4161
|
data: {
|
|
4156
4162
|
result: c,
|
|
@@ -4182,8 +4188,8 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
4182
4188
|
break;
|
|
4183
4189
|
}
|
|
4184
4190
|
case "builder.contentUpdate": {
|
|
4185
|
-
const
|
|
4186
|
-
|
|
4191
|
+
const i = r.data, s = i.key || i.alias || i.entry || i.modelName, l = i.data;
|
|
4192
|
+
s === e && n.contentUpdate(l);
|
|
4187
4193
|
break;
|
|
4188
4194
|
}
|
|
4189
4195
|
}
|
|
@@ -4207,8 +4213,8 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
4207
4213
|
window.removeEventListener("message", o);
|
|
4208
4214
|
};
|
|
4209
4215
|
}, getCssFromFont = (e) => {
|
|
4210
|
-
var
|
|
4211
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((
|
|
4216
|
+
var i;
|
|
4217
|
+
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((i = e == null ? void 0 : e.files) == null ? void 0 : i.regular);
|
|
4212
4218
|
let r = "";
|
|
4213
4219
|
if (o && t && n && (r += `
|
|
4214
4220
|
@font-face {
|
|
@@ -4218,16 +4224,16 @@ font-display: fallback;
|
|
|
4218
4224
|
font-weight: 400;
|
|
4219
4225
|
}
|
|
4220
4226
|
`.trim()), e.files)
|
|
4221
|
-
for (const
|
|
4222
|
-
if (!(String(Number(
|
|
4227
|
+
for (const s in e.files) {
|
|
4228
|
+
if (!(String(Number(s)) === s))
|
|
4223
4229
|
continue;
|
|
4224
|
-
const a = e.files[
|
|
4230
|
+
const a = e.files[s];
|
|
4225
4231
|
a && a !== o && (r += `
|
|
4226
4232
|
@font-face {
|
|
4227
4233
|
font-family: "${t}";
|
|
4228
4234
|
src: url('${a}') format('woff2');
|
|
4229
4235
|
font-display: fallback;
|
|
4230
|
-
font-weight: ${
|
|
4236
|
+
font-weight: ${s};
|
|
4231
4237
|
}
|
|
4232
4238
|
`.trim());
|
|
4233
4239
|
}
|
|
@@ -4298,13 +4304,13 @@ font-weight: ${i};
|
|
|
4298
4304
|
if (isEditing() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
4299
4305
|
new CustomEvent("initeditingbldr")
|
|
4300
4306
|
), this.builderContextSignal.content && getDefaultCanTrack(this.canTrack)) {
|
|
4301
|
-
const
|
|
4307
|
+
const i = (n = this.builderContextSignal.content) == null ? void 0 : n.testVariationId, s = (o = this.builderContextSignal.content) == null ? void 0 : o.id, l = this.apiKey;
|
|
4302
4308
|
_track({
|
|
4303
4309
|
type: "impression",
|
|
4304
4310
|
canTrack: !0,
|
|
4305
|
-
contentId:
|
|
4311
|
+
contentId: s,
|
|
4306
4312
|
apiKey: l,
|
|
4307
|
-
variationId:
|
|
4313
|
+
variationId: i !== s ? i : void 0
|
|
4308
4314
|
});
|
|
4309
4315
|
}
|
|
4310
4316
|
isPreviewing() && !isEditing() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
@@ -4413,7 +4419,7 @@ font-weight: ${i};
|
|
|
4413
4419
|
this.builderContextSignal.rootSetState ? (o = (n = this.builderContextSignal).rootSetState) == null || o.call(n, t) : this.builderContextSignal.rootState = t;
|
|
4414
4420
|
},
|
|
4415
4421
|
mergeNewContent(e) {
|
|
4416
|
-
var n, o, r,
|
|
4422
|
+
var n, o, r, i, s;
|
|
4417
4423
|
const t = {
|
|
4418
4424
|
...this.builderContextSignal.content,
|
|
4419
4425
|
...e,
|
|
@@ -4424,7 +4430,7 @@ font-weight: ${i};
|
|
|
4424
4430
|
meta: {
|
|
4425
4431
|
...(o = this.builderContextSignal.content) == null ? void 0 : o.meta,
|
|
4426
4432
|
...e == null ? void 0 : e.meta,
|
|
4427
|
-
breakpoints: ((r = e == null ? void 0 : e.meta) == null ? void 0 : r.breakpoints) || ((
|
|
4433
|
+
breakpoints: ((r = e == null ? void 0 : e.meta) == null ? void 0 : r.breakpoints) || ((s = (i = this.builderContextSignal.content) == null ? void 0 : i.meta) == null ? void 0 : s.breakpoints)
|
|
4428
4434
|
}
|
|
4429
4435
|
};
|
|
4430
4436
|
this.builderContextSignal.content = t;
|
|
@@ -4490,9 +4496,9 @@ font-weight: ${i};
|
|
|
4490
4496
|
if (!r || this.httpReqsPending[o] || this.httpReqsData[o] && !isEditing())
|
|
4491
4497
|
return;
|
|
4492
4498
|
this.httpReqsPending[o] = !0;
|
|
4493
|
-
const
|
|
4499
|
+
const i = r.replace(
|
|
4494
4500
|
/{{([^}]+)}}/g,
|
|
4495
|
-
(
|
|
4501
|
+
(s, l) => String(
|
|
4496
4502
|
evaluate({
|
|
4497
4503
|
code: l,
|
|
4498
4504
|
context: this.context || {},
|
|
@@ -4503,12 +4509,12 @@ font-weight: ${i};
|
|
|
4503
4509
|
})
|
|
4504
4510
|
)
|
|
4505
4511
|
);
|
|
4506
|
-
fetch$1(
|
|
4512
|
+
fetch$1(i).then((s) => s.json()).then((s) => {
|
|
4507
4513
|
this.mergeNewRootState({
|
|
4508
|
-
[o]:
|
|
4514
|
+
[o]: s
|
|
4509
4515
|
}), this.httpReqsData[o] = !0;
|
|
4510
|
-
}).catch((
|
|
4511
|
-
console.error("error fetching dynamic data", r,
|
|
4516
|
+
}).catch((s) => {
|
|
4517
|
+
console.error("error fetching dynamic data", r, s);
|
|
4512
4518
|
}).finally(() => {
|
|
4513
4519
|
this.httpReqsPending[o] = !1;
|
|
4514
4520
|
});
|
|
@@ -4559,19 +4565,19 @@ font-weight: ${i};
|
|
|
4559
4565
|
model: this.model,
|
|
4560
4566
|
apiKey: this.apiKey,
|
|
4561
4567
|
apiVersion: this.builderContextSignal.apiVersion
|
|
4562
|
-
}).then((
|
|
4563
|
-
|
|
4568
|
+
}).then((i) => {
|
|
4569
|
+
i && this.mergeNewContent(i);
|
|
4564
4570
|
});
|
|
4565
4571
|
}
|
|
4566
4572
|
}
|
|
4567
4573
|
});
|
|
4568
|
-
function _sfc_render$4(e, t, n, o, r,
|
|
4569
|
-
var
|
|
4574
|
+
function _sfc_render$4(e, t, n, o, r, i) {
|
|
4575
|
+
var s, l, a;
|
|
4570
4576
|
return e.builderContextSignal.content ? (openBlock(), createBlock(resolveDynamicComponent(e.ContentWrapper), mergeProps({
|
|
4571
4577
|
key: 0,
|
|
4572
4578
|
ref: "elementRef",
|
|
4573
4579
|
onClick: (d) => e.onClick(d),
|
|
4574
|
-
"builder-content-id": (
|
|
4580
|
+
"builder-content-id": (s = e.builderContextSignal.content) == null ? void 0 : s.id,
|
|
4575
4581
|
"builder-model": e.model,
|
|
4576
4582
|
class: e.getWrapperClassName(((l = e.content) == null ? void 0 : l.testVariationId) || ((a = e.content) == null ? void 0 : a.id)),
|
|
4577
4583
|
onIniteditingbldr: (d) => e.elementRef_onIniteditingbldr(d),
|
|
@@ -4586,7 +4592,7 @@ function _sfc_render$4(e, t, n, o, r, s) {
|
|
|
4586
4592
|
const EnableEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]), _sfc_main$3 = defineComponent({
|
|
4587
4593
|
name: "content-styles",
|
|
4588
4594
|
components: { InlinedStyles: _sfc_main$n },
|
|
4589
|
-
props: ["cssCode", "contentId", "customFonts", "isNestedRender"],
|
|
4595
|
+
props: ["cssCode", "contentId", "customFonts", "isNestedRender", "nonce"],
|
|
4590
4596
|
data() {
|
|
4591
4597
|
return {
|
|
4592
4598
|
injectedStyles: `
|
|
@@ -4602,21 +4608,22 @@ ${getDefaultStyles(this.isNestedRender)}
|
|
|
4602
4608
|
};
|
|
4603
4609
|
}
|
|
4604
4610
|
});
|
|
4605
|
-
function _sfc_render$3(e, t, n, o, r,
|
|
4606
|
-
const
|
|
4607
|
-
return openBlock(), createBlock(
|
|
4611
|
+
function _sfc_render$3(e, t, n, o, r, i) {
|
|
4612
|
+
const s = resolveComponent("InlinedStyles");
|
|
4613
|
+
return openBlock(), createBlock(s, {
|
|
4608
4614
|
id: "builderio-content",
|
|
4609
|
-
styles: e.injectedStyles
|
|
4610
|
-
|
|
4615
|
+
styles: e.injectedStyles,
|
|
4616
|
+
nonce: e.nonce
|
|
4617
|
+
}, null, 8, ["styles", "nonce"]);
|
|
4611
4618
|
}
|
|
4612
4619
|
const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]), getRootStateInitialValue = ({
|
|
4613
4620
|
content: e,
|
|
4614
4621
|
data: t,
|
|
4615
4622
|
locale: n
|
|
4616
4623
|
}) => {
|
|
4617
|
-
var
|
|
4618
|
-
const o = {}, r = ((
|
|
4619
|
-
return (l = (
|
|
4624
|
+
var i, s, l;
|
|
4625
|
+
const o = {}, r = ((i = e == null ? void 0 : e.data) == null ? void 0 : i.state) || {};
|
|
4626
|
+
return (l = (s = e == null ? void 0 : e.data) == null ? void 0 : s.inputs) == null || l.forEach((a) => {
|
|
4620
4627
|
a.name && a.defaultValue !== void 0 && (o[a.name] = a.defaultValue);
|
|
4621
4628
|
}), {
|
|
4622
4629
|
...o,
|
|
@@ -4648,6 +4655,7 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
4648
4655
|
props: [
|
|
4649
4656
|
"content",
|
|
4650
4657
|
"customComponents",
|
|
4658
|
+
"model",
|
|
4651
4659
|
"data",
|
|
4652
4660
|
"locale",
|
|
4653
4661
|
"context",
|
|
@@ -4656,7 +4664,7 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
4656
4664
|
"apiVersion",
|
|
4657
4665
|
"blocksWrapper",
|
|
4658
4666
|
"blocksWrapperProps",
|
|
4659
|
-
"
|
|
4667
|
+
"nonce",
|
|
4660
4668
|
"enrich",
|
|
4661
4669
|
"showContent",
|
|
4662
4670
|
"contentWrapper",
|
|
@@ -4667,7 +4675,7 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
4667
4675
|
"linkComponent"
|
|
4668
4676
|
],
|
|
4669
4677
|
data() {
|
|
4670
|
-
var e, t;
|
|
4678
|
+
var e, t, n, o;
|
|
4671
4679
|
return {
|
|
4672
4680
|
scriptStr: getUpdateVariantVisibilityScript({
|
|
4673
4681
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
@@ -4677,13 +4685,13 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
4677
4685
|
}),
|
|
4678
4686
|
registeredComponents: [
|
|
4679
4687
|
...getDefaultRegisteredComponents(),
|
|
4680
|
-
...this.customComponents || []
|
|
4688
|
+
...((n = this.customComponents) == null ? void 0 : n.filter(({ models: r }) => !(r != null && r.length) || !this.model ? !0 : r.includes(this.model))) || []
|
|
4681
4689
|
].reduce(
|
|
4682
|
-
(
|
|
4683
|
-
...
|
|
4684
|
-
[
|
|
4685
|
-
component: wrapComponentRef(
|
|
4686
|
-
...serializeComponentInfo(
|
|
4690
|
+
(r, { component: i, ...s }) => ({
|
|
4691
|
+
...r,
|
|
4692
|
+
[s.name]: {
|
|
4693
|
+
component: wrapComponentRef(i),
|
|
4694
|
+
...serializeComponentInfo(s)
|
|
4687
4695
|
}
|
|
4688
4696
|
}),
|
|
4689
4697
|
{}
|
|
@@ -4706,17 +4714,18 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
4706
4714
|
apiVersion: this.apiVersion,
|
|
4707
4715
|
componentInfos: [
|
|
4708
4716
|
...getDefaultRegisteredComponents(),
|
|
4709
|
-
...this.customComponents || []
|
|
4717
|
+
...((o = this.customComponents) == null ? void 0 : o.filter(({ models: r }) => !(r != null && r.length) || !this.model ? !0 : r.includes(this.model))) || []
|
|
4710
4718
|
].reduce(
|
|
4711
|
-
(
|
|
4712
|
-
...
|
|
4713
|
-
[
|
|
4719
|
+
(r, { component: i, ...s }) => ({
|
|
4720
|
+
...r,
|
|
4721
|
+
[s.name]: serializeComponentInfo(s)
|
|
4714
4722
|
}),
|
|
4715
4723
|
{}
|
|
4716
4724
|
),
|
|
4717
4725
|
inheritedStyles: {},
|
|
4718
4726
|
BlocksWrapper: this.blocksWrapper || "div",
|
|
4719
|
-
BlocksWrapperProps: this.blocksWrapperProps || {}
|
|
4727
|
+
BlocksWrapperProps: this.blocksWrapperProps || {},
|
|
4728
|
+
nonce: this.nonce || ""
|
|
4720
4729
|
},
|
|
4721
4730
|
TARGET
|
|
4722
4731
|
};
|
|
@@ -4735,9 +4744,10 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
4735
4744
|
}
|
|
4736
4745
|
}
|
|
4737
4746
|
});
|
|
4738
|
-
function _sfc_render$2(e, t, n, o, r,
|
|
4739
|
-
const
|
|
4747
|
+
function _sfc_render$2(e, t, n, o, r, i) {
|
|
4748
|
+
const s = resolveComponent("InlinedScript"), l = resolveComponent("ContentStyles"), a = resolveComponent("Blocks"), d = resolveComponent("EnableEditor");
|
|
4740
4749
|
return openBlock(), createBlock(d, mergeProps({
|
|
4750
|
+
nonce: e.nonce,
|
|
4741
4751
|
content: e.content,
|
|
4742
4752
|
data: e.data,
|
|
4743
4753
|
model: e.model,
|
|
@@ -4755,18 +4765,20 @@ function _sfc_render$2(e, t, n, o, r, s) {
|
|
|
4755
4765
|
default: withCtx(() => {
|
|
4756
4766
|
var u, c, p, f, m, b, C;
|
|
4757
4767
|
return [
|
|
4758
|
-
e.isSsrAbTest ? (openBlock(), createBlock(
|
|
4768
|
+
e.isSsrAbTest ? (openBlock(), createBlock(s, {
|
|
4759
4769
|
key: 0,
|
|
4760
4770
|
id: "builderio-variant-visibility",
|
|
4761
|
-
scriptStr: e.scriptStr
|
|
4762
|
-
|
|
4771
|
+
scriptStr: e.scriptStr,
|
|
4772
|
+
nonce: e.nonce || ""
|
|
4773
|
+
}, null, 8, ["scriptStr", "nonce"])) : createCommentVNode("", !0),
|
|
4763
4774
|
e.TARGET !== "reactNative" ? (openBlock(), createBlock(l, {
|
|
4764
4775
|
key: 1,
|
|
4776
|
+
nonce: e.nonce || "",
|
|
4765
4777
|
isNestedRender: e.isNestedRender,
|
|
4766
4778
|
contentId: (u = e.builderContextSignal.content) == null ? void 0 : u.id,
|
|
4767
4779
|
cssCode: (p = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : p.cssCode,
|
|
4768
4780
|
customFonts: (m = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : m.customFonts
|
|
4769
|
-
}, null, 8, ["isNestedRender", "contentId", "cssCode", "customFonts"])) : createCommentVNode("", !0),
|
|
4781
|
+
}, null, 8, ["nonce", "isNestedRender", "contentId", "cssCode", "customFonts"])) : createCommentVNode("", !0),
|
|
4770
4782
|
createVNode(a, {
|
|
4771
4783
|
blocks: (C = (b = e.builderContextSignal.content) == null ? void 0 : b.data) == null ? void 0 : C.blocks,
|
|
4772
4784
|
context: e.builderContextSignal,
|
|
@@ -4776,7 +4788,7 @@ function _sfc_render$2(e, t, n, o, r, s) {
|
|
|
4776
4788
|
];
|
|
4777
4789
|
}),
|
|
4778
4790
|
_: 1
|
|
4779
|
-
}, 16, ["content", "data", "model", "context", "apiKey", "canTrack", "locale", "enrich", "showContent", "builderContextSignal", "contentWrapper", "contentWrapperProps", "trustedHosts"]);
|
|
4791
|
+
}, 16, ["nonce", "content", "data", "model", "context", "apiKey", "canTrack", "locale", "enrich", "showContent", "builderContextSignal", "contentWrapper", "contentWrapperProps", "trustedHosts"]);
|
|
4780
4792
|
}
|
|
4781
4793
|
const ContentComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]), _sfc_main$1 = defineComponent({
|
|
4782
4794
|
name: "content-variants",
|
|
@@ -4789,6 +4801,7 @@ const ContentComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _s
|
|
|
4789
4801
|
"canTrack",
|
|
4790
4802
|
"content",
|
|
4791
4803
|
"isNestedRender",
|
|
4804
|
+
"nonce",
|
|
4792
4805
|
"model",
|
|
4793
4806
|
"data",
|
|
4794
4807
|
"context",
|
|
@@ -4817,8 +4830,6 @@ const ContentComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _s
|
|
|
4817
4830
|
},
|
|
4818
4831
|
mounted() {
|
|
4819
4832
|
},
|
|
4820
|
-
updated() {
|
|
4821
|
-
},
|
|
4822
4833
|
computed: {
|
|
4823
4834
|
updateCookieAndStylesScriptStr() {
|
|
4824
4835
|
var e;
|
|
@@ -4845,26 +4856,30 @@ const ContentComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _s
|
|
|
4845
4856
|
}
|
|
4846
4857
|
}
|
|
4847
4858
|
});
|
|
4848
|
-
function _sfc_render$1(e, t, n, o, r,
|
|
4849
|
-
const
|
|
4859
|
+
function _sfc_render$1(e, t, n, o, r, i) {
|
|
4860
|
+
const s = resolveComponent("InlinedScript"), l = resolveComponent("InlinedStyles"), a = resolveComponent("ContentComponent");
|
|
4850
4861
|
return openBlock(), createElementBlock(Fragment$1, null, [
|
|
4851
|
-
!e.isNestedRender && e.TARGET !== "reactNative" ? (openBlock(), createBlock(
|
|
4862
|
+
!e.isNestedRender && e.TARGET !== "reactNative" ? (openBlock(), createBlock(s, {
|
|
4852
4863
|
key: 0,
|
|
4853
4864
|
id: "builderio-init-variants-fns",
|
|
4854
|
-
scriptStr: e.getInitVariantsFnsScriptString()
|
|
4855
|
-
|
|
4865
|
+
scriptStr: e.getInitVariantsFnsScriptString(),
|
|
4866
|
+
nonce: e.nonce || ""
|
|
4867
|
+
}, null, 8, ["scriptStr", "nonce"])) : createCommentVNode("", !0),
|
|
4856
4868
|
e.shouldRenderVariants ? (openBlock(), createElementBlock(Fragment$1, { key: 1 }, [
|
|
4857
4869
|
createVNode(l, {
|
|
4858
4870
|
id: "builderio-variants",
|
|
4859
|
-
styles: e.hideVariantsStyleString
|
|
4860
|
-
|
|
4861
|
-
|
|
4871
|
+
styles: e.hideVariantsStyleString,
|
|
4872
|
+
nonce: e.nonce || ""
|
|
4873
|
+
}, null, 8, ["styles", "nonce"]),
|
|
4874
|
+
createVNode(s, {
|
|
4862
4875
|
id: "builderio-variants-visibility",
|
|
4863
|
-
scriptStr: e.updateCookieAndStylesScriptStr
|
|
4864
|
-
|
|
4876
|
+
scriptStr: e.updateCookieAndStylesScriptStr,
|
|
4877
|
+
nonce: e.nonce || ""
|
|
4878
|
+
}, null, 8, ["scriptStr", "nonce"]),
|
|
4865
4879
|
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.getVariants(e.content), (d, u) => (openBlock(), createBlock(a, {
|
|
4866
4880
|
key: d.testVariationId,
|
|
4867
4881
|
isNestedRender: e.isNestedRender,
|
|
4882
|
+
nonce: e.nonce,
|
|
4868
4883
|
content: d,
|
|
4869
4884
|
showContent: !1,
|
|
4870
4885
|
model: e.model,
|
|
@@ -4883,9 +4898,10 @@ function _sfc_render$1(e, t, n, o, r, s) {
|
|
|
4883
4898
|
contentWrapper: e.contentWrapper,
|
|
4884
4899
|
contentWrapperProps: e.contentWrapperProps,
|
|
4885
4900
|
trustedHosts: e.trustedHosts
|
|
4886
|
-
}, null, 8, ["isNestedRender", "content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"]))), 128))
|
|
4901
|
+
}, null, 8, ["isNestedRender", "nonce", "content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"]))), 128))
|
|
4887
4902
|
], 64)) : createCommentVNode("", !0),
|
|
4888
4903
|
createVNode(a, mergeProps({
|
|
4904
|
+
nonce: e.nonce,
|
|
4889
4905
|
isNestedRender: e.isNestedRender,
|
|
4890
4906
|
content: e.defaultContent,
|
|
4891
4907
|
showContent: !0,
|
|
@@ -4907,7 +4923,7 @@ function _sfc_render$1(e, t, n, o, r, s) {
|
|
|
4907
4923
|
trustedHosts: e.trustedHosts
|
|
4908
4924
|
}, {
|
|
4909
4925
|
key: e.shouldRenderVariants.toString()
|
|
4910
|
-
}), null, 16, ["isNestedRender", "content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"])
|
|
4926
|
+
}), null, 16, ["nonce", "isNestedRender", "content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"])
|
|
4911
4927
|
], 64);
|
|
4912
4928
|
}
|
|
4913
4929
|
const ContentVariants = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]), fetchSymbolContent = async ({
|
|
@@ -4988,11 +5004,12 @@ const ContentVariants = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sf
|
|
|
4988
5004
|
}
|
|
4989
5005
|
}
|
|
4990
5006
|
});
|
|
4991
|
-
function _sfc_render(e, t, n, o, r,
|
|
5007
|
+
function _sfc_render(e, t, n, o, r, i) {
|
|
4992
5008
|
var l, a, d, u, c;
|
|
4993
|
-
const
|
|
5009
|
+
const s = resolveComponent("ContentVariants");
|
|
4994
5010
|
return openBlock(), createElementBlock("div", mergeProps({ class: e.className }, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
4995
|
-
createVNode(
|
|
5011
|
+
createVNode(s, {
|
|
5012
|
+
nonce: e.builderContext.nonce,
|
|
4996
5013
|
isNestedRender: !0,
|
|
4997
5014
|
apiVersion: e.builderContext.apiVersion,
|
|
4998
5015
|
apiKey: e.builderContext.apiKey,
|
|
@@ -5012,7 +5029,7 @@ function _sfc_render(e, t, n, o, r, s) {
|
|
|
5012
5029
|
linkComponent: e.builderLinkComponent,
|
|
5013
5030
|
blocksWrapper: e.blocksWrapper,
|
|
5014
5031
|
contentWrapper: e.contentWrapper
|
|
5015
|
-
}, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "canTrack", "model", "content", "linkComponent", "blocksWrapper", "contentWrapper"])
|
|
5032
|
+
}, null, 8, ["nonce", "apiVersion", "apiKey", "context", "customComponents", "data", "canTrack", "model", "content", "linkComponent", "blocksWrapper", "contentWrapper"])
|
|
5016
5033
|
], 16);
|
|
5017
5034
|
}
|
|
5018
5035
|
const Symbol$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]), settings = {};
|
|
@@ -5027,7 +5044,7 @@ function setEditorSettings(e) {
|
|
|
5027
5044
|
}
|
|
5028
5045
|
}
|
|
5029
5046
|
const fetchBuilderProps = async (e) => {
|
|
5030
|
-
var o, r,
|
|
5047
|
+
var o, r, i;
|
|
5031
5048
|
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((r = e.userAttributes) == null ? void 0 : r.urlPath), n = {
|
|
5032
5049
|
...e,
|
|
5033
5050
|
apiKey: e.apiKey,
|
|
@@ -5038,7 +5055,7 @@ const fetchBuilderProps = async (e) => {
|
|
|
5038
5055
|
urlPath: t
|
|
5039
5056
|
} : {}
|
|
5040
5057
|
},
|
|
5041
|
-
options: getBuilderSearchParams(e.searchParams || ((
|
|
5058
|
+
options: getBuilderSearchParams(e.searchParams || ((i = e.url) == null ? void 0 : i.searchParams) || e.options)
|
|
5042
5059
|
};
|
|
5043
5060
|
return {
|
|
5044
5061
|
apiKey: n.apiKey,
|