@builder.io/sdk-react 4.0.7 → 4.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/blocks-exports.cjs +93 -65
- package/lib/browser/blocks-exports.mjs +1721 -1613
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-e70c12ff.js → server-entry-231f8ecd.js} +1 -1
- package/lib/browser/{server-entry-4c650ff5.cjs → server-entry-bdbd3c0d.cjs} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-742ca147.js → accordion-b551e135.js} +1 -1
- package/lib/edge/{accordion-c97e6506.cjs → accordion-e3f81e74.cjs} +1 -1
- package/lib/edge/{blocks-2a015bd6.js → blocks-cd1feef2.js} +1014 -1008
- package/lib/edge/{blocks-70894a53.cjs → blocks-eb6fa21f.cjs} +15 -15
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-6a072716.cjs → button-5c6a9392.cjs} +1 -1
- package/lib/edge/{button-deecd9b5.js → button-f390f723.js} +2 -2
- package/lib/edge/{columns-0e9b2bf4.js → columns-7018a027.js} +9 -9
- package/lib/edge/{columns-02352a9f.cjs → columns-ad17139e.cjs} +3 -3
- package/lib/edge/content-variants-c72ca81f.cjs +302 -0
- package/lib/edge/{content-variants-6948115a.js → content-variants-dc54ce4f.js} +650 -367
- package/lib/edge/{custom-code-73f76f76.js → custom-code-0daf1c91.js} +1 -1
- package/lib/edge/{custom-code-77f98605.cjs → custom-code-e87af7b1.cjs} +1 -1
- package/lib/edge/{embed-26470ea1.js → embed-1dfcba43.js} +1 -1
- package/lib/edge/{embed-9aaf87f9.cjs → embed-c695c98e.cjs} +1 -1
- package/lib/edge/{form-652ef8a9.js → form-5a0c89d9.js} +5 -5
- package/lib/edge/{form-0213200e.cjs → form-ba54942c.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-1a003fac.js → get-class-prop-name-5edacc3b.js} +1 -1
- package/lib/edge/{get-class-prop-name-8647a440.cjs → get-class-prop-name-c479656a.cjs} +1 -1
- package/lib/edge/{image-e38bd9e0.cjs → image-cce92f6c.cjs} +2 -2
- package/lib/edge/{image-acc1c00c.js → image-d87761af.js} +18 -18
- package/lib/edge/{img-f0b9e982.cjs → img-6982d6eb.cjs} +1 -1
- package/lib/edge/{img-2d35513d.js → img-882c7222.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-cdd96bc7.js → input-3d4f956b.js} +1 -1
- package/lib/edge/{input-e61cf32f.cjs → input-8c7008b5.cjs} +1 -1
- package/lib/edge/personalization-container-3a8dc18a.js +205 -0
- package/lib/edge/personalization-container-4557a50b.cjs +1 -0
- package/lib/edge/{select-de96bdc0.js → select-153586f8.js} +1 -1
- package/lib/edge/{select-f1165866.cjs → select-2efc7503.cjs} +1 -1
- package/lib/edge/{server-entry-637ed5ff.js → server-entry-8dc3478a.js} +1 -1
- package/lib/edge/{server-entry-10ca8502.cjs → server-entry-9d269960.cjs} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-72846242.js → slot-d268693c.js} +3 -3
- package/lib/edge/{slot-3ecf31d9.cjs → slot-f1f7513c.cjs} +1 -1
- package/lib/edge/symbol-0344516c.cjs +1 -0
- package/lib/edge/symbol-378e19ee.js +90 -0
- package/lib/edge/{tabs-ea0258b8.js → tabs-29ff78a0.js} +3 -3
- package/lib/edge/{tabs-788974d9.cjs → tabs-4e931765.cjs} +1 -1
- package/lib/node/blocks-exports.cjs +92 -64
- package/lib/node/blocks-exports.mjs +1608 -1500
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +3 -3
- package/lib/node/{server-entry-e76904a8.cjs → server-entry-916c726c.cjs} +1 -1
- package/lib/node/{server-entry-7167da7c.js → server-entry-f03c1146.js} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-72c91afa.js → setIvm-044ce9e7.js} +1 -1
- package/lib/node/{setIvm-e89d1a08.cjs → setIvm-3761bb10.cjs} +1 -1
- package/lib/node/setIvm.cjs +1 -1
- package/lib/node/setIvm.mjs +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-b3e23348.cjs → should-force-browser-runtime-in-node-e760d4f2.cjs} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-09a401d5.js → should-force-browser-runtime-in-node-f620dcdc.js} +1 -1
- package/package.json +2 -2
- package/types/blocks/personalization-container/helpers/inlined-fns.d.ts +4 -1
- package/types/blocks/personalization-container/helpers.d.ts +24 -4
- package/types/blocks/personalization-container/personalization-container.types.d.ts +2 -2
- package/types/components/blocks/blocks-wrapper.d.ts +13 -1
- package/types/components/blocks/blocks.types.d.ts +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/lib/edge/content-variants-41781d1f.cjs +0 -137
- package/lib/edge/personalization-container-4f73fbdf.cjs +0 -138
- package/lib/edge/personalization-container-e1f03976.js +0 -384
- package/lib/edge/symbol-49ed2192.cjs +0 -1
- package/lib/edge/symbol-61a3651b.js +0 -85
|
@@ -1,9 +1,274 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { lazy as
|
|
3
|
-
import {
|
|
4
|
-
import { Video as
|
|
5
|
-
import { triggerAnimation as
|
|
6
|
-
|
|
1
|
+
import { jsx as v, jsxs as U, Fragment as j } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as I, useRef as Q, useState as V, useEffect as W } from "react";
|
|
3
|
+
import { TARGET as F, isBrowser as _, isEditing as N, isPreviewing as oe, registerInsertMenu as ge, setupBrowserForEditing as he, createRegisterComponentMessage as be, getDefaultCanTrack as q, getCookieSync as ye, _track as X, fetchOneEntry as ve, createEditorListener as xe, logFetch as Se, serializeIncludingFunctions as Z, logger as Te, handleABTestingSync as Ie } from "./server-entry-8dc3478a.js";
|
|
4
|
+
import { Video as ke, Button as Ce, Columns as we, Fragment as Ve, Image as Ee, Section as Re, Symbol as Ae, Text as De, BuilderContext as Fe } from "./blocks-exports.mjs";
|
|
5
|
+
import { triggerAnimation as Pe, evaluate as re, fastClone as We, InlinedStyles as se, ComponentsContext as Ne, Blocks as $e } from "./blocks-cd1feef2.js";
|
|
6
|
+
function Xt(e, t, n, o) {
|
|
7
|
+
function r(f) {
|
|
8
|
+
return typeof f == "string";
|
|
9
|
+
}
|
|
10
|
+
function s(f) {
|
|
11
|
+
return typeof f == "number";
|
|
12
|
+
}
|
|
13
|
+
function i(f, m) {
|
|
14
|
+
return (() => {
|
|
15
|
+
const x = m.property, C = m.operator;
|
|
16
|
+
let d = m.value;
|
|
17
|
+
if (m && m.property === "urlPath" && m.value && typeof m.value == "string" && m.value !== "/" && m.value.endsWith("/") && (d = m.value.slice(0, -1)), !(x && C))
|
|
18
|
+
return !0;
|
|
19
|
+
if (Array.isArray(d))
|
|
20
|
+
return C === "isNot" ? d.every((k) => i(f, {
|
|
21
|
+
property: x,
|
|
22
|
+
operator: C,
|
|
23
|
+
value: k
|
|
24
|
+
})) : !!d.find((k) => i(f, {
|
|
25
|
+
property: x,
|
|
26
|
+
operator: C,
|
|
27
|
+
value: k
|
|
28
|
+
}));
|
|
29
|
+
const u = f[x];
|
|
30
|
+
if (Array.isArray(u))
|
|
31
|
+
return u.includes(d);
|
|
32
|
+
switch (C) {
|
|
33
|
+
case "is":
|
|
34
|
+
return u === d;
|
|
35
|
+
case "isNot":
|
|
36
|
+
return u !== d;
|
|
37
|
+
case "contains":
|
|
38
|
+
return (r(u) || Array.isArray(u)) && u.includes(String(d));
|
|
39
|
+
case "startsWith":
|
|
40
|
+
return r(u) && u.startsWith(String(d));
|
|
41
|
+
case "endsWith":
|
|
42
|
+
return r(u) && u.endsWith(String(d));
|
|
43
|
+
case "greaterThan":
|
|
44
|
+
return s(u) && s(d) && u > d;
|
|
45
|
+
case "lessThan":
|
|
46
|
+
return s(u) && s(d) && u < d;
|
|
47
|
+
case "greaterThanOrEqualTo":
|
|
48
|
+
return s(u) && s(d) && u >= d;
|
|
49
|
+
case "lessThanOrEqualTo":
|
|
50
|
+
return s(u) && s(d) && u <= d;
|
|
51
|
+
default:
|
|
52
|
+
return !1;
|
|
53
|
+
}
|
|
54
|
+
})();
|
|
55
|
+
}
|
|
56
|
+
const a = {
|
|
57
|
+
query: t,
|
|
58
|
+
startDate: n,
|
|
59
|
+
endDate: o
|
|
60
|
+
}, l = e.date && new Date(e.date) || /* @__PURE__ */ new Date();
|
|
61
|
+
return a.startDate && new Date(a.startDate) > l || a.endDate && new Date(a.endDate) < l ? !1 : !a.query || !a.query.length ? !0 : a.query.every((f) => i(e, f));
|
|
62
|
+
}
|
|
63
|
+
const _e = `function getPersonalizedVariant(variants, blockId, isHydrationTarget, locale) {
|
|
64
|
+
if (!navigator.cookieEnabled) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
function getCookie(name) {
|
|
68
|
+
const nameEQ = name + '=';
|
|
69
|
+
const ca = document.cookie.split(';');
|
|
70
|
+
for (let i = 0; i < ca.length; i++) {
|
|
71
|
+
let c = ca[i];
|
|
72
|
+
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
|
73
|
+
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
|
|
74
|
+
}
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
const attributes = JSON.parse(getCookie('builder.userAttributes') || '{}');
|
|
78
|
+
if (locale) {
|
|
79
|
+
attributes.locale = locale;
|
|
80
|
+
}
|
|
81
|
+
const winningVariantIndex = variants?.findIndex(function (variant) {
|
|
82
|
+
return window.filterWithCustomTargeting(attributes, variant.query, variant.startDate, variant.endDate);
|
|
83
|
+
});
|
|
84
|
+
const parentDiv = document.currentScript?.parentElement;
|
|
85
|
+
const variantId = parentDiv?.getAttribute('data-variant-id');
|
|
86
|
+
const isDefaultVariant = variantId === \`\${blockId}-default\`;
|
|
87
|
+
const isWinningVariant = winningVariantIndex !== -1 && variantId === \`\${blockId}-\${winningVariantIndex}\` || winningVariantIndex === -1 && isDefaultVariant;
|
|
88
|
+
if (isWinningVariant && !isDefaultVariant) {
|
|
89
|
+
parentDiv?.removeAttribute('hidden');
|
|
90
|
+
parentDiv?.removeAttribute('aria-hidden');
|
|
91
|
+
} else if (!isWinningVariant && isDefaultVariant) {
|
|
92
|
+
parentDiv?.setAttribute('hidden', 'true');
|
|
93
|
+
parentDiv?.setAttribute('aria-hidden', 'true');
|
|
94
|
+
}
|
|
95
|
+
if (isHydrationTarget) {
|
|
96
|
+
if (!isWinningVariant) {
|
|
97
|
+
const itsStyleEl = parentDiv?.previousElementSibling;
|
|
98
|
+
if (itsStyleEl) {
|
|
99
|
+
itsStyleEl.remove();
|
|
100
|
+
}
|
|
101
|
+
parentDiv?.remove();
|
|
102
|
+
}
|
|
103
|
+
const thisScript = document.currentScript;
|
|
104
|
+
if (thisScript) {
|
|
105
|
+
thisScript.remove();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}`, Le = `function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
|
|
109
|
+
function isString(val) {
|
|
110
|
+
return typeof val === 'string';
|
|
111
|
+
}
|
|
112
|
+
function isNumber(val) {
|
|
113
|
+
return typeof val === 'number';
|
|
114
|
+
}
|
|
115
|
+
function objectMatchesQuery(userattr, query) {
|
|
116
|
+
const result = (() => {
|
|
117
|
+
const property = query.property;
|
|
118
|
+
const operator = query.operator;
|
|
119
|
+
let testValue = query.value;
|
|
120
|
+
if (query && query.property === 'urlPath' && query.value && typeof query.value === 'string' && query.value !== '/' && query.value.endsWith('/')) {
|
|
121
|
+
testValue = query.value.slice(0, -1);
|
|
122
|
+
}
|
|
123
|
+
if (!(property && operator)) {
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
if (Array.isArray(testValue)) {
|
|
127
|
+
if (operator === 'isNot') {
|
|
128
|
+
return testValue.every(val => objectMatchesQuery(userattr, {
|
|
129
|
+
property,
|
|
130
|
+
operator,
|
|
131
|
+
value: val
|
|
132
|
+
}));
|
|
133
|
+
}
|
|
134
|
+
return !!testValue.find(val => objectMatchesQuery(userattr, {
|
|
135
|
+
property,
|
|
136
|
+
operator,
|
|
137
|
+
value: val
|
|
138
|
+
}));
|
|
139
|
+
}
|
|
140
|
+
const value = userattr[property];
|
|
141
|
+
if (Array.isArray(value)) {
|
|
142
|
+
return value.includes(testValue);
|
|
143
|
+
}
|
|
144
|
+
switch (operator) {
|
|
145
|
+
case 'is':
|
|
146
|
+
return value === testValue;
|
|
147
|
+
case 'isNot':
|
|
148
|
+
return value !== testValue;
|
|
149
|
+
case 'contains':
|
|
150
|
+
return (isString(value) || Array.isArray(value)) && value.includes(String(testValue));
|
|
151
|
+
case 'startsWith':
|
|
152
|
+
return isString(value) && value.startsWith(String(testValue));
|
|
153
|
+
case 'endsWith':
|
|
154
|
+
return isString(value) && value.endsWith(String(testValue));
|
|
155
|
+
case 'greaterThan':
|
|
156
|
+
return isNumber(value) && isNumber(testValue) && value > testValue;
|
|
157
|
+
case 'lessThan':
|
|
158
|
+
return isNumber(value) && isNumber(testValue) && value < testValue;
|
|
159
|
+
case 'greaterThanOrEqualTo':
|
|
160
|
+
return isNumber(value) && isNumber(testValue) && value >= testValue;
|
|
161
|
+
case 'lessThanOrEqualTo':
|
|
162
|
+
return isNumber(value) && isNumber(testValue) && value <= testValue;
|
|
163
|
+
default:
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
})();
|
|
167
|
+
return result;
|
|
168
|
+
}
|
|
169
|
+
const item = {
|
|
170
|
+
query,
|
|
171
|
+
startDate,
|
|
172
|
+
endDate
|
|
173
|
+
};
|
|
174
|
+
const now = userAttributes.date && new Date(userAttributes.date) || new Date();
|
|
175
|
+
if (item.startDate && new Date(item.startDate) > now) {
|
|
176
|
+
return false;
|
|
177
|
+
} else if (item.endDate && new Date(item.endDate) < now) {
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
if (!item.query || !item.query.length) {
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
return item.query.every(filter => {
|
|
184
|
+
return objectMatchesQuery(userAttributes, filter);
|
|
185
|
+
});
|
|
186
|
+
}`, Ue = `function updateVisibilityStylesScript(variants, blockId, isHydrationTarget, locale) {
|
|
187
|
+
function getCookie(name) {
|
|
188
|
+
const nameEQ = name + '=';
|
|
189
|
+
const ca = document.cookie.split(';');
|
|
190
|
+
for (let i = 0; i < ca.length; i++) {
|
|
191
|
+
let c = ca[i];
|
|
192
|
+
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
|
193
|
+
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
|
|
194
|
+
}
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
const visibilityStylesEl = document.currentScript?.previousElementSibling;
|
|
198
|
+
if (!visibilityStylesEl) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
if (isHydrationTarget) {
|
|
202
|
+
visibilityStylesEl.remove();
|
|
203
|
+
const currentScript = document.currentScript;
|
|
204
|
+
if (currentScript) {
|
|
205
|
+
currentScript.remove();
|
|
206
|
+
}
|
|
207
|
+
} else {
|
|
208
|
+
const attributes = JSON.parse(getCookie('builder.userAttributes') || '{}');
|
|
209
|
+
if (locale) {
|
|
210
|
+
attributes.locale = locale;
|
|
211
|
+
}
|
|
212
|
+
const winningVariantIndex = variants?.findIndex(function (variant) {
|
|
213
|
+
return window.filterWithCustomTargeting(attributes, variant.query, variant.startDate, variant.endDate);
|
|
214
|
+
});
|
|
215
|
+
if (winningVariantIndex !== -1) {
|
|
216
|
+
let newStyleStr = variants?.map((_, index) => {
|
|
217
|
+
if (index === winningVariantIndex) return '';
|
|
218
|
+
return \`div[data-variant-id="\${blockId}-\${index}"] { display: none !important; } \`;
|
|
219
|
+
}).join('') || '';
|
|
220
|
+
newStyleStr += \`div[data-variant-id="\${blockId}-default"] { display: none !important; } \`;
|
|
221
|
+
visibilityStylesEl.innerHTML = newStyleStr;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}`, Be = "default", He = "filterWithCustomTargeting", le = "builderIoPersonalization", ue = "updateVisibilityStylesScript", de = ["react", "vue", "svelte"], qe = ["vue", "svelte"];
|
|
225
|
+
function Zt(e, t) {
|
|
226
|
+
return !(e && e.length > 0) || !t ? !1 : qe.includes(F) ? !0 : !_();
|
|
227
|
+
}
|
|
228
|
+
function en({
|
|
229
|
+
variants: e,
|
|
230
|
+
previewingIndex: t,
|
|
231
|
+
isHydrated: n,
|
|
232
|
+
filteredVariants: o,
|
|
233
|
+
fallbackBlocks: r
|
|
234
|
+
}) {
|
|
235
|
+
var i;
|
|
236
|
+
const s = {
|
|
237
|
+
blocks: r != null ? r : [],
|
|
238
|
+
path: "this.children",
|
|
239
|
+
index: Be
|
|
240
|
+
};
|
|
241
|
+
if (n && N()) {
|
|
242
|
+
if (typeof t == "number" && t < ((i = e == null ? void 0 : e.length) != null ? i : 0)) {
|
|
243
|
+
const a = e == null ? void 0 : e[t];
|
|
244
|
+
if (a)
|
|
245
|
+
return {
|
|
246
|
+
blocks: a.blocks,
|
|
247
|
+
path: `variants.${t}.blocks`,
|
|
248
|
+
index: t
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
return s;
|
|
252
|
+
}
|
|
253
|
+
if (_()) {
|
|
254
|
+
const a = o == null ? void 0 : o[0];
|
|
255
|
+
if (a && e) {
|
|
256
|
+
const l = e.indexOf(a);
|
|
257
|
+
if (l !== -1)
|
|
258
|
+
return {
|
|
259
|
+
blocks: a.blocks,
|
|
260
|
+
path: `variants.${l}.blocks`,
|
|
261
|
+
index: l
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return s;
|
|
266
|
+
}
|
|
267
|
+
const Oe = () => `
|
|
268
|
+
window.${He} = ${Le}
|
|
269
|
+
window.${le} = ${_e}
|
|
270
|
+
window.${ue} = ${Ue}
|
|
271
|
+
`, ce = F === "react", tn = (e, t, n) => `window.${le}(${JSON.stringify(e)}, "${t}", ${ce}${n ? `, "${n}"` : ""})`, nn = (e, t, n) => `window.${ue}(${JSON.stringify(e)}, "${t}", ${ce}${n ? `, "${n}"` : ""})`, M = {
|
|
7
272
|
"@type": "@builder.io/sdk:Element",
|
|
8
273
|
layerName: "Accordion item title",
|
|
9
274
|
responsiveStyles: {
|
|
@@ -32,7 +297,7 @@ const $ = {
|
|
|
32
297
|
}
|
|
33
298
|
}
|
|
34
299
|
}]
|
|
35
|
-
},
|
|
300
|
+
}, K = {
|
|
36
301
|
"@type": "@builder.io/sdk:Element",
|
|
37
302
|
layerName: "Accordion item detail",
|
|
38
303
|
responsiveStyles: {
|
|
@@ -63,7 +328,7 @@ const $ = {
|
|
|
63
328
|
}
|
|
64
329
|
}
|
|
65
330
|
}]
|
|
66
|
-
},
|
|
331
|
+
}, je = {
|
|
67
332
|
name: "Builder:Accordion",
|
|
68
333
|
canHaveChildren: !0,
|
|
69
334
|
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
@@ -80,19 +345,19 @@ const $ = {
|
|
|
80
345
|
name: "title",
|
|
81
346
|
type: "uiBlocks",
|
|
82
347
|
hideFromUI: !0,
|
|
83
|
-
defaultValue: [
|
|
348
|
+
defaultValue: [M]
|
|
84
349
|
}, {
|
|
85
350
|
name: "detail",
|
|
86
351
|
type: "uiBlocks",
|
|
87
352
|
hideFromUI: !0,
|
|
88
|
-
defaultValue: [
|
|
353
|
+
defaultValue: [K]
|
|
89
354
|
}],
|
|
90
355
|
defaultValue: [{
|
|
91
|
-
title: [
|
|
92
|
-
detail: [
|
|
356
|
+
title: [M],
|
|
357
|
+
detail: [K]
|
|
93
358
|
}, {
|
|
94
|
-
title: [
|
|
95
|
-
detail: [
|
|
359
|
+
title: [M],
|
|
360
|
+
detail: [K]
|
|
96
361
|
}],
|
|
97
362
|
showIf: (e) => !e.get("useChildrenForItems")
|
|
98
363
|
}, {
|
|
@@ -127,7 +392,7 @@ const $ = {
|
|
|
127
392
|
builderComponents: !0,
|
|
128
393
|
builderLinkComponent: !0
|
|
129
394
|
}
|
|
130
|
-
},
|
|
395
|
+
}, Me = I(() => import("./accordion-b551e135.js")), Ke = {
|
|
131
396
|
name: "Core:Button",
|
|
132
397
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
133
398
|
defaultStyles: {
|
|
@@ -163,7 +428,7 @@ const $ = {
|
|
|
163
428
|
shouldReceiveBuilderProps: {
|
|
164
429
|
builderLinkComponent: !0
|
|
165
430
|
}
|
|
166
|
-
},
|
|
431
|
+
}, ze = {
|
|
167
432
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
168
433
|
name: "Columns",
|
|
169
434
|
isRSC: !0,
|
|
@@ -337,12 +602,12 @@ const $ = {
|
|
|
337
602
|
}],
|
|
338
603
|
onChange: (e) => {
|
|
339
604
|
function t() {
|
|
340
|
-
n.forEach((
|
|
341
|
-
|
|
605
|
+
n.forEach((o) => {
|
|
606
|
+
o.delete("width");
|
|
342
607
|
});
|
|
343
608
|
}
|
|
344
609
|
const n = e.get("columns");
|
|
345
|
-
Array.isArray(n) && n.find((r) => r.get("width")) && (n.find((
|
|
610
|
+
Array.isArray(n) && n.find((r) => r.get("width")) && (n.find((s) => !s.get("width")) || n.reduce((a, l) => a + l.get("width"), 0) !== 100) && t();
|
|
346
611
|
}
|
|
347
612
|
}, {
|
|
348
613
|
name: "space",
|
|
@@ -370,13 +635,13 @@ const $ = {
|
|
|
370
635
|
builderComponents: !0,
|
|
371
636
|
builderLinkComponent: !0
|
|
372
637
|
}
|
|
373
|
-
},
|
|
638
|
+
}, Je = {
|
|
374
639
|
name: "Fragment",
|
|
375
640
|
static: !0,
|
|
376
641
|
hidden: !0,
|
|
377
642
|
canHaveChildren: !0,
|
|
378
643
|
noWrap: !0
|
|
379
|
-
}, Y = ["jpeg", "jpg", "png", "svg", "webp", "gif", "jfif", "pjpeg", "pjp", "apng", "avif", "tif", "tiff", "heif", "bmp", "eps", "raw", "cr2", "nef", "orf", "sr2", "psd", "heic", "dib", "ai"],
|
|
644
|
+
}, Y = ["jpeg", "jpg", "png", "svg", "webp", "gif", "jfif", "pjpeg", "pjp", "apng", "avif", "tif", "tiff", "heif", "bmp", "eps", "raw", "cr2", "nef", "orf", "sr2", "psd", "heic", "dib", "ai"], Qe = ["mp4", "webm", "mkv", "flv", "vob", "ogv", "ogg", "drc", "gif", "gifv", "mng", "avi", "mov", "qt", "mts", "m2ts", "ts", "wmv", "yuv", "rm", "rmvb", "viv", "asf", "amv", "m4p", "mpeg", "mpe", "m2v", "m4v", "svi", "3gp", "3g2", "mxf", "roq", "nsv", "f4v", "f4p", "f4a", "f4b"], Ye = {
|
|
380
645
|
name: "Image",
|
|
381
646
|
static: !0,
|
|
382
647
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
@@ -396,29 +661,29 @@ const $ = {
|
|
|
396
661
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
397
662
|
onChange: (e) => {
|
|
398
663
|
e.delete("srcset"), e.delete("noWebp");
|
|
399
|
-
function n(
|
|
400
|
-
return new Promise((
|
|
401
|
-
const
|
|
402
|
-
let
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
},
|
|
406
|
-
console.warn("Image load failed",
|
|
407
|
-
}),
|
|
408
|
-
|
|
409
|
-
},
|
|
664
|
+
function n(i, a = 6e4) {
|
|
665
|
+
return new Promise((l, f) => {
|
|
666
|
+
const m = document.createElement("img");
|
|
667
|
+
let P = !1;
|
|
668
|
+
m.onload = () => {
|
|
669
|
+
P = !0, l(m);
|
|
670
|
+
}, m.addEventListener("error", (x) => {
|
|
671
|
+
console.warn("Image load failed", x.error), f(x.error);
|
|
672
|
+
}), m.src = i, setTimeout(() => {
|
|
673
|
+
P || f(new Error("Image load timed out"));
|
|
674
|
+
}, a);
|
|
410
675
|
});
|
|
411
676
|
}
|
|
412
|
-
function i
|
|
413
|
-
return Math.round(
|
|
677
|
+
function o(i) {
|
|
678
|
+
return Math.round(i * 1e3) / 1e3;
|
|
414
679
|
}
|
|
415
|
-
const r = e.get("image"),
|
|
416
|
-
if (fetch(r).then((
|
|
417
|
-
|
|
418
|
-
}), r && (!
|
|
419
|
-
return n(r).then((
|
|
420
|
-
const
|
|
421
|
-
e.get("image") === r && (!
|
|
680
|
+
const r = e.get("image"), s = e.get("aspectRatio");
|
|
681
|
+
if (fetch(r).then((i) => i.blob()).then((i) => {
|
|
682
|
+
i.type.includes("svg") && e.set("noWebp", !0);
|
|
683
|
+
}), r && (!s || s === 0.7041))
|
|
684
|
+
return n(r).then((i) => {
|
|
685
|
+
const a = e.get("aspectRatio");
|
|
686
|
+
e.get("image") === r && (!a || a === 0.7041) && i.width && i.height && (e.set("aspectRatio", o(i.height / i.width)), e.set("height", i.height), e.set("width", i.width));
|
|
422
687
|
});
|
|
423
688
|
}
|
|
424
689
|
}, {
|
|
@@ -488,11 +753,12 @@ const $ = {
|
|
|
488
753
|
shouldReceiveBuilderProps: {
|
|
489
754
|
builderBlock: !0
|
|
490
755
|
}
|
|
491
|
-
},
|
|
756
|
+
}, Ge = {
|
|
492
757
|
name: "PersonalizationContainer",
|
|
493
758
|
shouldReceiveBuilderProps: {
|
|
494
759
|
builderBlock: !0,
|
|
495
|
-
builderContext: !0
|
|
760
|
+
builderContext: !0,
|
|
761
|
+
builderComponents: !0
|
|
496
762
|
},
|
|
497
763
|
noWrap: !0,
|
|
498
764
|
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",
|
|
@@ -523,7 +789,7 @@ const $ = {
|
|
|
523
789
|
defaultValue: []
|
|
524
790
|
}]
|
|
525
791
|
}]
|
|
526
|
-
},
|
|
792
|
+
}, Xe = I(() => import("./personalization-container-3a8dc18a.js")), Ze = {
|
|
527
793
|
name: "Core:Section",
|
|
528
794
|
static: !0,
|
|
529
795
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -562,7 +828,7 @@ const $ = {
|
|
|
562
828
|
}
|
|
563
829
|
}
|
|
564
830
|
}]
|
|
565
|
-
},
|
|
831
|
+
}, et = {
|
|
566
832
|
name: "Slot",
|
|
567
833
|
isRSC: !0,
|
|
568
834
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -579,7 +845,7 @@ const $ = {
|
|
|
579
845
|
builderContext: !0,
|
|
580
846
|
builderComponents: !0
|
|
581
847
|
}
|
|
582
|
-
},
|
|
848
|
+
}, tt = I(() => import("./slot-d268693c.js")), nt = {
|
|
583
849
|
name: "Symbol",
|
|
584
850
|
noWrap: !0,
|
|
585
851
|
static: !0,
|
|
@@ -618,7 +884,7 @@ const $ = {
|
|
|
618
884
|
builderComponents: !0,
|
|
619
885
|
builderLinkComponent: !0
|
|
620
886
|
}
|
|
621
|
-
},
|
|
887
|
+
}, z = {
|
|
622
888
|
"@type": "@builder.io/sdk:Element",
|
|
623
889
|
responsiveStyles: {
|
|
624
890
|
large: {
|
|
@@ -640,7 +906,7 @@ const $ = {
|
|
|
640
906
|
text: "New tab"
|
|
641
907
|
}
|
|
642
908
|
}
|
|
643
|
-
},
|
|
909
|
+
}, J = {
|
|
644
910
|
"@type": "@builder.io/sdk:Element",
|
|
645
911
|
responsiveStyles: {
|
|
646
912
|
large: {
|
|
@@ -656,7 +922,7 @@ const $ = {
|
|
|
656
922
|
text: "New tab content "
|
|
657
923
|
}
|
|
658
924
|
}
|
|
659
|
-
},
|
|
925
|
+
}, at = {
|
|
660
926
|
name: "Builder: Tabs",
|
|
661
927
|
inputs: [{
|
|
662
928
|
name: "tabs",
|
|
@@ -666,16 +932,16 @@ const $ = {
|
|
|
666
932
|
name: "label",
|
|
667
933
|
type: "uiBlocks",
|
|
668
934
|
hideFromUI: !0,
|
|
669
|
-
defaultValue: [
|
|
935
|
+
defaultValue: [z]
|
|
670
936
|
}, {
|
|
671
937
|
name: "content",
|
|
672
938
|
type: "uiBlocks",
|
|
673
939
|
hideFromUI: !0,
|
|
674
|
-
defaultValue: [
|
|
940
|
+
defaultValue: [J]
|
|
675
941
|
}],
|
|
676
942
|
defaultValue: [{
|
|
677
943
|
label: [{
|
|
678
|
-
...
|
|
944
|
+
...z,
|
|
679
945
|
component: {
|
|
680
946
|
name: "Text",
|
|
681
947
|
options: {
|
|
@@ -684,7 +950,7 @@ const $ = {
|
|
|
684
950
|
}
|
|
685
951
|
}],
|
|
686
952
|
content: [{
|
|
687
|
-
...
|
|
953
|
+
...J,
|
|
688
954
|
component: {
|
|
689
955
|
name: "Text",
|
|
690
956
|
options: {
|
|
@@ -694,7 +960,7 @@ const $ = {
|
|
|
694
960
|
}]
|
|
695
961
|
}, {
|
|
696
962
|
label: [{
|
|
697
|
-
...
|
|
963
|
+
...z,
|
|
698
964
|
component: {
|
|
699
965
|
name: "Text",
|
|
700
966
|
options: {
|
|
@@ -703,7 +969,7 @@ const $ = {
|
|
|
703
969
|
}
|
|
704
970
|
}],
|
|
705
971
|
content: [{
|
|
706
|
-
...
|
|
972
|
+
...J,
|
|
707
973
|
component: {
|
|
708
974
|
name: "Text",
|
|
709
975
|
options: {
|
|
@@ -759,7 +1025,7 @@ const $ = {
|
|
|
759
1025
|
builderComponents: !0,
|
|
760
1026
|
builderLinkComponent: !0
|
|
761
1027
|
}
|
|
762
|
-
},
|
|
1028
|
+
}, it = I(() => import("./tabs-29ff78a0.js")), ot = {
|
|
763
1029
|
shouldReceiveBuilderProps: {},
|
|
764
1030
|
name: "Text",
|
|
765
1031
|
static: !0,
|
|
@@ -778,7 +1044,7 @@ const $ = {
|
|
|
778
1044
|
height: "auto",
|
|
779
1045
|
textAlign: "center"
|
|
780
1046
|
}
|
|
781
|
-
},
|
|
1047
|
+
}, rt = {
|
|
782
1048
|
name: "Custom Code",
|
|
783
1049
|
static: !0,
|
|
784
1050
|
requiredPermissions: ["editCode"],
|
|
@@ -800,7 +1066,7 @@ const $ = {
|
|
|
800
1066
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
801
1067
|
advanced: !0
|
|
802
1068
|
}]
|
|
803
|
-
},
|
|
1069
|
+
}, st = I(() => import("./custom-code-0daf1c91.js")), lt = {
|
|
804
1070
|
name: "Embed",
|
|
805
1071
|
static: !0,
|
|
806
1072
|
inputs: [{
|
|
@@ -815,7 +1081,7 @@ const $ = {
|
|
|
815
1081
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
816
1082
|
hideFromUI: !0
|
|
817
1083
|
}]
|
|
818
|
-
},
|
|
1084
|
+
}, ut = I(() => import("./embed-1dfcba43.js")), dt = {
|
|
819
1085
|
name: "Form:Form",
|
|
820
1086
|
// editableTags: ['builder-form-error']
|
|
821
1087
|
defaults: {
|
|
@@ -1052,7 +1318,7 @@ const $ = {
|
|
|
1052
1318
|
builderComponents: !0,
|
|
1053
1319
|
builderLinkComponent: !0
|
|
1054
1320
|
}
|
|
1055
|
-
},
|
|
1321
|
+
}, ct = I(() => import("./form-5a0c89d9.js")), mt = {
|
|
1056
1322
|
name: "Form:Input",
|
|
1057
1323
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
1058
1324
|
inputs: [
|
|
@@ -1103,7 +1369,7 @@ const $ = {
|
|
|
1103
1369
|
borderStyle: "solid",
|
|
1104
1370
|
borderColor: "#ccc"
|
|
1105
1371
|
}
|
|
1106
|
-
},
|
|
1372
|
+
}, pt = I(() => import("./input-3d4f956b.js")), ft = {
|
|
1107
1373
|
name: "Form:Select",
|
|
1108
1374
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
1109
1375
|
defaultStyles: {
|
|
@@ -1145,7 +1411,7 @@ const $ = {
|
|
|
1145
1411
|
}],
|
|
1146
1412
|
static: !0,
|
|
1147
1413
|
noWrap: !0
|
|
1148
|
-
},
|
|
1414
|
+
}, gt = I(() => import("./select-153586f8.js")), ht = {
|
|
1149
1415
|
name: "Form:SubmitButton",
|
|
1150
1416
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
1151
1417
|
defaultStyles: {
|
|
@@ -1170,7 +1436,7 @@ const $ = {
|
|
|
1170
1436
|
// that only shows if advanced setting is flipped
|
|
1171
1437
|
// TODO: defaultChildren
|
|
1172
1438
|
// canHaveChildren: true,
|
|
1173
|
-
},
|
|
1439
|
+
}, bt = I(() => import("./submit-button-b48361a7.js")), yt = {
|
|
1174
1440
|
name: "Form:TextArea",
|
|
1175
1441
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
1176
1442
|
inputs: [{
|
|
@@ -1206,7 +1472,7 @@ const $ = {
|
|
|
1206
1472
|
},
|
|
1207
1473
|
static: !0,
|
|
1208
1474
|
noWrap: !0
|
|
1209
|
-
},
|
|
1475
|
+
}, vt = I(() => import("./textarea-d29025e9.js")), xt = {
|
|
1210
1476
|
// friendlyName?
|
|
1211
1477
|
name: "Raw:Img",
|
|
1212
1478
|
hideFromInsertMenu: !0,
|
|
@@ -1220,7 +1486,7 @@ const $ = {
|
|
|
1220
1486
|
}],
|
|
1221
1487
|
noWrap: !0,
|
|
1222
1488
|
static: !0
|
|
1223
|
-
},
|
|
1489
|
+
}, St = I(() => import("./img-882c7222.js")), Tt = {
|
|
1224
1490
|
name: "Video",
|
|
1225
1491
|
canHaveChildren: !0,
|
|
1226
1492
|
defaultStyles: {
|
|
@@ -1231,7 +1497,7 @@ const $ = {
|
|
|
1231
1497
|
inputs: [{
|
|
1232
1498
|
name: "video",
|
|
1233
1499
|
type: "file",
|
|
1234
|
-
allowedFileTypes:
|
|
1500
|
+
allowedFileTypes: Qe,
|
|
1235
1501
|
bubble: !0,
|
|
1236
1502
|
defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
|
|
1237
1503
|
required: !0
|
|
@@ -1304,67 +1570,67 @@ const $ = {
|
|
|
1304
1570
|
shouldReceiveBuilderProps: {
|
|
1305
1571
|
builderBlock: !0
|
|
1306
1572
|
}
|
|
1307
|
-
},
|
|
1308
|
-
component: Ge,
|
|
1309
|
-
...Ye
|
|
1310
|
-
}, {
|
|
1311
|
-
component: Xe,
|
|
1312
|
-
...Qe
|
|
1313
|
-
}, {
|
|
1314
|
-
component: et,
|
|
1315
|
-
...Ze
|
|
1316
|
-
}, {
|
|
1317
|
-
component: nt,
|
|
1318
|
-
...tt
|
|
1319
|
-
}, {
|
|
1320
|
-
component: rt,
|
|
1321
|
-
...ot
|
|
1322
|
-
}, {
|
|
1323
|
-
component: it,
|
|
1324
|
-
...at
|
|
1325
|
-
}, {
|
|
1573
|
+
}, It = () => [{
|
|
1326
1574
|
component: st,
|
|
1327
|
-
...
|
|
1575
|
+
...rt
|
|
1328
1576
|
}, {
|
|
1329
1577
|
component: ut,
|
|
1578
|
+
...lt
|
|
1579
|
+
}, {
|
|
1580
|
+
component: ct,
|
|
1330
1581
|
...dt
|
|
1331
1582
|
}, {
|
|
1332
|
-
component:
|
|
1333
|
-
...
|
|
1334
|
-
}], ee = () => [{
|
|
1335
|
-
component: Se,
|
|
1336
|
-
...De
|
|
1583
|
+
component: pt,
|
|
1584
|
+
...mt
|
|
1337
1585
|
}, {
|
|
1338
|
-
component:
|
|
1339
|
-
...
|
|
1586
|
+
component: bt,
|
|
1587
|
+
...ht
|
|
1340
1588
|
}, {
|
|
1341
|
-
component:
|
|
1342
|
-
...
|
|
1589
|
+
component: gt,
|
|
1590
|
+
...ft
|
|
1343
1591
|
}, {
|
|
1344
|
-
component:
|
|
1345
|
-
...
|
|
1592
|
+
component: vt,
|
|
1593
|
+
...yt
|
|
1346
1594
|
}, {
|
|
1347
|
-
component:
|
|
1348
|
-
...
|
|
1595
|
+
component: St,
|
|
1596
|
+
...xt
|
|
1349
1597
|
}, {
|
|
1350
|
-
component:
|
|
1598
|
+
component: ke,
|
|
1599
|
+
...Tt
|
|
1600
|
+
}], ee = () => [{
|
|
1601
|
+
component: Ce,
|
|
1351
1602
|
...Ke
|
|
1352
1603
|
}, {
|
|
1353
1604
|
component: we,
|
|
1354
|
-
...
|
|
1605
|
+
...ze
|
|
1355
1606
|
}, {
|
|
1356
1607
|
component: Ve,
|
|
1357
1608
|
...Je
|
|
1358
1609
|
}, {
|
|
1359
|
-
component:
|
|
1360
|
-
...
|
|
1610
|
+
component: Ee,
|
|
1611
|
+
...Ye
|
|
1612
|
+
}, {
|
|
1613
|
+
component: Re,
|
|
1614
|
+
...Ze
|
|
1361
1615
|
}, {
|
|
1362
|
-
component:
|
|
1363
|
-
...
|
|
1616
|
+
component: tt,
|
|
1617
|
+
...et
|
|
1618
|
+
}, {
|
|
1619
|
+
component: Ae,
|
|
1620
|
+
...nt
|
|
1621
|
+
}, {
|
|
1622
|
+
component: De,
|
|
1623
|
+
...ot
|
|
1624
|
+
}, ...de.includes(F) ? [{
|
|
1625
|
+
component: Xe,
|
|
1626
|
+
...Ge
|
|
1627
|
+
}] : [], {
|
|
1628
|
+
component: it,
|
|
1629
|
+
...at
|
|
1364
1630
|
}, {
|
|
1365
|
-
component:
|
|
1366
|
-
...
|
|
1367
|
-
}, ...
|
|
1631
|
+
component: Me,
|
|
1632
|
+
...je
|
|
1633
|
+
}, ...It()], kt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {
|
|
1368
1634
|
function getAndSetVariantId() {
|
|
1369
1635
|
function setCookie(name, value, days) {
|
|
1370
1636
|
let expires = '';
|
|
@@ -1423,7 +1689,7 @@ const $ = {
|
|
|
1423
1689
|
}).join('');
|
|
1424
1690
|
styleEl.innerHTML = newStyleStr;
|
|
1425
1691
|
}
|
|
1426
|
-
}`,
|
|
1692
|
+
}`, Ct = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1427
1693
|
if (!navigator.cookieEnabled) {
|
|
1428
1694
|
return;
|
|
1429
1695
|
}
|
|
@@ -1457,27 +1723,27 @@ const $ = {
|
|
|
1457
1723
|
thisScriptEl?.remove();
|
|
1458
1724
|
}
|
|
1459
1725
|
return;
|
|
1460
|
-
}`,
|
|
1726
|
+
}`, me = "builderIoAbTest", pe = "builderIoRenderContent", B = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1461
1727
|
...t,
|
|
1462
1728
|
testVariationId: t.id,
|
|
1463
1729
|
id: e == null ? void 0 : e.id
|
|
1464
|
-
})),
|
|
1730
|
+
})), wt = ({
|
|
1465
1731
|
canTrack: e,
|
|
1466
1732
|
content: t
|
|
1467
|
-
}) => !(!(
|
|
1468
|
-
window.${
|
|
1469
|
-
window.${
|
|
1470
|
-
`,
|
|
1471
|
-
window.${
|
|
1472
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
1473
|
-
)`,
|
|
1733
|
+
}) => !(!(B(t).length > 0) || !e || _()), Vt = (e) => e === "react" || e === "reactNative", Et = F === "angular", fe = Vt(F), Rt = () => `
|
|
1734
|
+
window.${me} = ${kt}
|
|
1735
|
+
window.${pe} = ${Ct}
|
|
1736
|
+
`, At = (e, t) => `
|
|
1737
|
+
window.${me}(
|
|
1738
|
+
"${t}",${JSON.stringify(e)}, ${fe}, ${Et}
|
|
1739
|
+
)`, Dt = ({
|
|
1474
1740
|
contentId: e,
|
|
1475
1741
|
variationId: t
|
|
1476
|
-
}) => `window.${
|
|
1477
|
-
"${t}", "${e}", ${
|
|
1742
|
+
}) => `window.${pe}(
|
|
1743
|
+
"${t}", "${e}", ${fe}
|
|
1478
1744
|
)`;
|
|
1479
|
-
function
|
|
1480
|
-
return /* @__PURE__ */
|
|
1745
|
+
function H(e) {
|
|
1746
|
+
return /* @__PURE__ */ v(
|
|
1481
1747
|
"script",
|
|
1482
1748
|
{
|
|
1483
1749
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
@@ -1489,33 +1755,33 @@ function J(e) {
|
|
|
1489
1755
|
function te(e) {
|
|
1490
1756
|
return Math.round(e * 1e3) / 1e3;
|
|
1491
1757
|
}
|
|
1492
|
-
const
|
|
1758
|
+
const Ft = (e, t, n = !0) => {
|
|
1493
1759
|
if (!(e instanceof HTMLElement))
|
|
1494
1760
|
return null;
|
|
1495
|
-
let
|
|
1761
|
+
let o = n ? e : e.parentElement;
|
|
1496
1762
|
do {
|
|
1497
|
-
if (!
|
|
1763
|
+
if (!o)
|
|
1498
1764
|
return null;
|
|
1499
|
-
if (t(
|
|
1500
|
-
return
|
|
1501
|
-
} while (
|
|
1765
|
+
if (t(o))
|
|
1766
|
+
return o;
|
|
1767
|
+
} while (o = o.parentElement);
|
|
1502
1768
|
return null;
|
|
1503
|
-
},
|
|
1769
|
+
}, Pt = (e) => Ft(e, (t) => {
|
|
1504
1770
|
const n = t.getAttribute("builder-id") || t.id;
|
|
1505
1771
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
1506
1772
|
}), ne = ({
|
|
1507
1773
|
event: e,
|
|
1508
1774
|
target: t
|
|
1509
1775
|
}) => {
|
|
1510
|
-
const n = t.getBoundingClientRect(),
|
|
1776
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, s = te(o / n.width), i = te(r / n.height);
|
|
1511
1777
|
return {
|
|
1512
|
-
x:
|
|
1513
|
-
y:
|
|
1778
|
+
x: s,
|
|
1779
|
+
y: i
|
|
1514
1780
|
};
|
|
1515
|
-
},
|
|
1516
|
-
const t = e.target, n = t &&
|
|
1781
|
+
}, Wt = (e) => {
|
|
1782
|
+
const t = e.target, n = t && Pt(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
1517
1783
|
return {
|
|
1518
|
-
targetBuilderElement:
|
|
1784
|
+
targetBuilderElement: o || void 0,
|
|
1519
1785
|
metadata: {
|
|
1520
1786
|
targetOffset: t ? ne({
|
|
1521
1787
|
event: e,
|
|
@@ -1525,44 +1791,44 @@ const St = (e, t, n = !0) => {
|
|
|
1525
1791
|
event: e,
|
|
1526
1792
|
target: n
|
|
1527
1793
|
}) : void 0,
|
|
1528
|
-
builderElementIndex: n &&
|
|
1794
|
+
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
1529
1795
|
}
|
|
1530
1796
|
};
|
|
1531
|
-
},
|
|
1532
|
-
var
|
|
1533
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0],
|
|
1797
|
+
}, Nt = ["svelte", "qwik", "vue"], ae = () => Nt.includes(F) && (N() || oe()), $t = (e) => {
|
|
1798
|
+
var s, i;
|
|
1799
|
+
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = (i = e.fileUrl) != null ? i : (s = e == null ? void 0 : e.files) == null ? void 0 : s.regular;
|
|
1534
1800
|
let r = "";
|
|
1535
|
-
if (
|
|
1801
|
+
if (o && t && n && (r += `
|
|
1536
1802
|
@font-face {
|
|
1537
1803
|
font-family: "${t}";
|
|
1538
|
-
src: local("${n}"), url('${
|
|
1804
|
+
src: local("${n}"), url('${o}') format('woff2');
|
|
1539
1805
|
font-display: fallback;
|
|
1540
1806
|
font-weight: 400;
|
|
1541
1807
|
}
|
|
1542
1808
|
`.trim()), e.files)
|
|
1543
|
-
for (const
|
|
1544
|
-
if (!(String(Number(
|
|
1809
|
+
for (const a in e.files) {
|
|
1810
|
+
if (!(String(Number(a)) === a))
|
|
1545
1811
|
continue;
|
|
1546
|
-
const
|
|
1547
|
-
|
|
1812
|
+
const f = e.files[a];
|
|
1813
|
+
f && f !== o && (r += `
|
|
1548
1814
|
@font-face {
|
|
1549
1815
|
font-family: "${t}";
|
|
1550
|
-
src: url('${
|
|
1816
|
+
src: url('${f}') format('woff2');
|
|
1551
1817
|
font-display: fallback;
|
|
1552
|
-
font-weight: ${
|
|
1818
|
+
font-weight: ${a};
|
|
1553
1819
|
}
|
|
1554
1820
|
`.trim());
|
|
1555
1821
|
}
|
|
1556
1822
|
return r;
|
|
1557
|
-
},
|
|
1823
|
+
}, _t = ({
|
|
1558
1824
|
customFonts: e
|
|
1559
1825
|
}) => {
|
|
1560
1826
|
var t;
|
|
1561
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
1562
|
-
},
|
|
1827
|
+
return ((t = e == null ? void 0 : e.map((n) => $t(n))) == null ? void 0 : t.join(" ")) || "";
|
|
1828
|
+
}, Lt = ({
|
|
1563
1829
|
cssCode: e,
|
|
1564
1830
|
contentId: t
|
|
1565
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
1831
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", Ut = `
|
|
1566
1832
|
.builder-button {
|
|
1567
1833
|
all: unset;
|
|
1568
1834
|
}
|
|
@@ -1579,40 +1845,40 @@ font-weight: ${o};
|
|
|
1579
1845
|
text-align: inherit;
|
|
1580
1846
|
font-family: inherit;
|
|
1581
1847
|
}
|
|
1582
|
-
`,
|
|
1583
|
-
function
|
|
1584
|
-
var
|
|
1585
|
-
const t =
|
|
1586
|
-
|
|
1587
|
-
function n(
|
|
1588
|
-
var
|
|
1589
|
-
const
|
|
1848
|
+
`, Bt = (e) => e ? "" : Ut, Ht = (e) => `variant-${e}`;
|
|
1849
|
+
function qt(e) {
|
|
1850
|
+
var y, T, A;
|
|
1851
|
+
const t = Q(null);
|
|
1852
|
+
V(() => !1);
|
|
1853
|
+
function n(c) {
|
|
1854
|
+
var h, b;
|
|
1855
|
+
const p = {
|
|
1590
1856
|
...e.builderContextSignal.rootState,
|
|
1591
|
-
...
|
|
1857
|
+
...c
|
|
1592
1858
|
};
|
|
1593
|
-
e.builderContextSignal.rootSetState ? (
|
|
1594
|
-
...
|
|
1595
|
-
rootState:
|
|
1859
|
+
e.builderContextSignal.rootSetState ? (b = (h = e.builderContextSignal).rootSetState) == null || b.call(h, p) : e.setBuilderContextSignal((g) => ({
|
|
1860
|
+
...g,
|
|
1861
|
+
rootState: p
|
|
1596
1862
|
}));
|
|
1597
1863
|
}
|
|
1598
|
-
function
|
|
1599
|
-
var
|
|
1600
|
-
const
|
|
1864
|
+
function o(c) {
|
|
1865
|
+
var h, b, g, D, E;
|
|
1866
|
+
const p = {
|
|
1601
1867
|
...e.builderContextSignal.content,
|
|
1602
|
-
...
|
|
1868
|
+
...c,
|
|
1603
1869
|
data: {
|
|
1604
|
-
...(
|
|
1605
|
-
...
|
|
1870
|
+
...(h = e.builderContextSignal.content) == null ? void 0 : h.data,
|
|
1871
|
+
...c == null ? void 0 : c.data
|
|
1606
1872
|
},
|
|
1607
1873
|
meta: {
|
|
1608
|
-
...(
|
|
1609
|
-
...
|
|
1610
|
-
breakpoints: ((
|
|
1874
|
+
...(b = e.builderContextSignal.content) == null ? void 0 : b.meta,
|
|
1875
|
+
...c == null ? void 0 : c.meta,
|
|
1876
|
+
breakpoints: ((g = c == null ? void 0 : c.meta) == null ? void 0 : g.breakpoints) || ((E = (D = e.builderContextSignal.content) == null ? void 0 : D.meta) == null ? void 0 : E.breakpoints)
|
|
1611
1877
|
}
|
|
1612
1878
|
};
|
|
1613
|
-
e.setBuilderContextSignal((
|
|
1614
|
-
...
|
|
1615
|
-
content:
|
|
1879
|
+
e.setBuilderContextSignal((w) => ({
|
|
1880
|
+
...w,
|
|
1881
|
+
content: p
|
|
1616
1882
|
}));
|
|
1617
1883
|
}
|
|
1618
1884
|
function r() {
|
|
@@ -1621,65 +1887,65 @@ function Pt(e) {
|
|
|
1621
1887
|
"aria-hidden": !0
|
|
1622
1888
|
};
|
|
1623
1889
|
}
|
|
1624
|
-
const [
|
|
1890
|
+
const [s, i] = V(
|
|
1625
1891
|
() => e.contentWrapper || "div"
|
|
1626
1892
|
);
|
|
1627
|
-
function
|
|
1628
|
-
return
|
|
1893
|
+
function a(c) {
|
|
1894
|
+
return xe({
|
|
1629
1895
|
model: e.model,
|
|
1630
1896
|
trustedHosts: e.trustedHosts,
|
|
1631
1897
|
callbacks: {
|
|
1632
|
-
configureSdk: (
|
|
1633
|
-
var
|
|
1634
|
-
const { breakpoints:
|
|
1635
|
-
!
|
|
1898
|
+
configureSdk: (p) => {
|
|
1899
|
+
var g;
|
|
1900
|
+
const { breakpoints: h, contentId: b } = p;
|
|
1901
|
+
!b || b !== ((g = e.builderContextSignal.content) == null ? void 0 : g.id) || h && o({
|
|
1636
1902
|
meta: {
|
|
1637
|
-
breakpoints:
|
|
1903
|
+
breakpoints: h
|
|
1638
1904
|
}
|
|
1639
1905
|
});
|
|
1640
1906
|
},
|
|
1641
|
-
animation: (
|
|
1642
|
-
|
|
1907
|
+
animation: (p) => {
|
|
1908
|
+
Pe(p);
|
|
1643
1909
|
},
|
|
1644
|
-
contentUpdate: (
|
|
1645
|
-
|
|
1910
|
+
contentUpdate: (p) => {
|
|
1911
|
+
o(p);
|
|
1646
1912
|
},
|
|
1647
|
-
stateUpdate: (
|
|
1648
|
-
n(
|
|
1913
|
+
stateUpdate: (p) => {
|
|
1914
|
+
n(p);
|
|
1649
1915
|
}
|
|
1650
1916
|
}
|
|
1651
|
-
})(
|
|
1917
|
+
})(c);
|
|
1652
1918
|
}
|
|
1653
|
-
const [
|
|
1654
|
-
function
|
|
1655
|
-
var
|
|
1919
|
+
const [l, f] = V(() => ({})), [m, P] = V(() => ({})), [x, C] = V(() => !1);
|
|
1920
|
+
function d(c) {
|
|
1921
|
+
var p, h;
|
|
1656
1922
|
if (e.builderContextSignal.content) {
|
|
1657
|
-
const
|
|
1923
|
+
const b = (p = e.builderContextSignal.content) == null ? void 0 : p.testVariationId, g = (h = e.builderContextSignal.content) == null ? void 0 : h.id;
|
|
1658
1924
|
X({
|
|
1659
1925
|
apiHost: e.apiHost,
|
|
1660
1926
|
type: "click",
|
|
1661
|
-
canTrack:
|
|
1662
|
-
contentId:
|
|
1927
|
+
canTrack: q(e.canTrack),
|
|
1928
|
+
contentId: g,
|
|
1663
1929
|
apiKey: e.apiKey,
|
|
1664
|
-
variationId:
|
|
1665
|
-
...
|
|
1666
|
-
unique: !
|
|
1930
|
+
variationId: b !== g ? b : void 0,
|
|
1931
|
+
...Wt(c),
|
|
1932
|
+
unique: !x
|
|
1667
1933
|
});
|
|
1668
1934
|
}
|
|
1669
|
-
|
|
1935
|
+
x || C(!0);
|
|
1670
1936
|
}
|
|
1671
|
-
function
|
|
1672
|
-
var
|
|
1673
|
-
const
|
|
1674
|
-
Object.entries(
|
|
1675
|
-
if (!
|
|
1937
|
+
function u() {
|
|
1938
|
+
var p, h, b;
|
|
1939
|
+
const c = (b = (h = (p = e.builderContextSignal.content) == null ? void 0 : p.data) == null ? void 0 : h.httpRequests) != null ? b : {};
|
|
1940
|
+
Object.entries(c).forEach(([g, D]) => {
|
|
1941
|
+
if (!D || m[g] || l[g] && !N())
|
|
1676
1942
|
return;
|
|
1677
|
-
|
|
1678
|
-
const
|
|
1943
|
+
m[g] = !0;
|
|
1944
|
+
const E = D.replace(
|
|
1679
1945
|
/{{([^}]+)}}/g,
|
|
1680
|
-
(
|
|
1946
|
+
(w, S) => String(
|
|
1681
1947
|
re({
|
|
1682
|
-
code:
|
|
1948
|
+
code: S,
|
|
1683
1949
|
context: e.context || {},
|
|
1684
1950
|
localState: void 0,
|
|
1685
1951
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -1687,24 +1953,24 @@ function Pt(e) {
|
|
|
1687
1953
|
})
|
|
1688
1954
|
)
|
|
1689
1955
|
);
|
|
1690
|
-
|
|
1956
|
+
Se(E), fetch(E).then((w) => w.json()).then((w) => {
|
|
1691
1957
|
n({
|
|
1692
|
-
[
|
|
1693
|
-
}),
|
|
1694
|
-
}).catch((
|
|
1695
|
-
console.error("error fetching dynamic data",
|
|
1958
|
+
[g]: w
|
|
1959
|
+
}), l[g] = !0;
|
|
1960
|
+
}).catch((w) => {
|
|
1961
|
+
console.error("error fetching dynamic data", D, w);
|
|
1696
1962
|
}).finally(() => {
|
|
1697
|
-
|
|
1963
|
+
m[g] = !1;
|
|
1698
1964
|
});
|
|
1699
1965
|
});
|
|
1700
1966
|
}
|
|
1701
|
-
function
|
|
1702
|
-
|
|
1967
|
+
function k() {
|
|
1968
|
+
N() && window.dispatchEvent(
|
|
1703
1969
|
new CustomEvent(
|
|
1704
1970
|
"builder:component:stateChange",
|
|
1705
1971
|
{
|
|
1706
1972
|
detail: {
|
|
1707
|
-
state:
|
|
1973
|
+
state: We(e.builderContextSignal.rootState),
|
|
1708
1974
|
ref: {
|
|
1709
1975
|
name: e.model
|
|
1710
1976
|
}
|
|
@@ -1713,11 +1979,11 @@ function Pt(e) {
|
|
|
1713
1979
|
)
|
|
1714
1980
|
);
|
|
1715
1981
|
}
|
|
1716
|
-
const
|
|
1717
|
-
return
|
|
1718
|
-
var
|
|
1719
|
-
if (
|
|
1720
|
-
|
|
1982
|
+
const $ = Q(!1);
|
|
1983
|
+
return $.current || (u(), k(), $.current = !0), W(() => {
|
|
1984
|
+
var c, p, h, b, g;
|
|
1985
|
+
if (_()) {
|
|
1986
|
+
N() && !e.isNestedRender && (window.addEventListener("message", a), ge(), he({
|
|
1721
1987
|
...e.locale ? {
|
|
1722
1988
|
locale: e.locale
|
|
1723
1989
|
} : {},
|
|
@@ -1727,77 +1993,77 @@ function Pt(e) {
|
|
|
1727
1993
|
...e.trustedHosts ? {
|
|
1728
1994
|
trustedHosts: e.trustedHosts
|
|
1729
1995
|
} : {},
|
|
1730
|
-
modelName: (
|
|
1996
|
+
modelName: (c = e.model) != null ? c : "",
|
|
1731
1997
|
apiKey: e.apiKey
|
|
1732
1998
|
}), Object.values(
|
|
1733
1999
|
e.builderContextSignal.componentInfos
|
|
1734
|
-
).forEach((
|
|
1735
|
-
var
|
|
1736
|
-
if (!((
|
|
1737
|
-
const
|
|
1738
|
-
(
|
|
2000
|
+
).forEach((S) => {
|
|
2001
|
+
var R, L;
|
|
2002
|
+
if (!((R = S.models) != null && R.length) || S.models.includes(e.model)) {
|
|
2003
|
+
const O = be(S);
|
|
2004
|
+
(L = window.parent) == null || L.postMessage(O, "*");
|
|
1739
2005
|
}
|
|
1740
2006
|
}), window.addEventListener(
|
|
1741
2007
|
"builder:component:stateChangeListenerActivated",
|
|
1742
|
-
|
|
2008
|
+
k
|
|
1743
2009
|
));
|
|
1744
|
-
const
|
|
1745
|
-
name: `builder.tests.${(
|
|
2010
|
+
const D = e.builderContextSignal.content && q(e.canTrack), E = ye({
|
|
2011
|
+
name: `builder.tests.${(p = e.builderContextSignal.content) == null ? void 0 : p.id}`,
|
|
1746
2012
|
canTrack: !0
|
|
1747
|
-
}),
|
|
1748
|
-
if (
|
|
1749
|
-
const
|
|
2013
|
+
}), w = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId;
|
|
2014
|
+
if (D && w === E) {
|
|
2015
|
+
const S = (b = e.builderContextSignal.content) == null ? void 0 : b.id, R = e.apiKey;
|
|
1750
2016
|
X({
|
|
1751
2017
|
apiHost: e.apiHost,
|
|
1752
2018
|
type: "impression",
|
|
1753
2019
|
canTrack: !0,
|
|
1754
|
-
contentId:
|
|
1755
|
-
apiKey:
|
|
1756
|
-
variationId:
|
|
2020
|
+
contentId: S,
|
|
2021
|
+
apiKey: R,
|
|
2022
|
+
variationId: E !== S ? E : void 0
|
|
1757
2023
|
});
|
|
1758
2024
|
}
|
|
1759
|
-
if (oe() && !
|
|
1760
|
-
const
|
|
1761
|
-
`builder.overrides.${
|
|
1762
|
-
),
|
|
1763
|
-
(
|
|
2025
|
+
if (oe() && !N()) {
|
|
2026
|
+
const S = new URL(location.href).searchParams, R = S.get("builder.preview"), L = S.get(
|
|
2027
|
+
`builder.overrides.${R}`
|
|
2028
|
+
), O = S.get("apiKey") || S.get("builder.space");
|
|
2029
|
+
(R === "BUILDER_STUDIO" || R === e.model && O === e.apiKey && (!e.content || L === e.content.id)) && ve({
|
|
1764
2030
|
model: e.model,
|
|
1765
2031
|
apiKey: e.apiKey,
|
|
1766
2032
|
apiVersion: e.builderContextSignal.apiVersion,
|
|
1767
|
-
...
|
|
2033
|
+
...R === "BUILDER_STUDIO" && ((g = e.context) != null && g.symbolId) ? {
|
|
1768
2034
|
query: {
|
|
1769
2035
|
id: e.context.symbolId
|
|
1770
2036
|
}
|
|
1771
2037
|
} : {}
|
|
1772
2038
|
}).then((G) => {
|
|
1773
|
-
G &&
|
|
2039
|
+
G && o(G);
|
|
1774
2040
|
});
|
|
1775
2041
|
}
|
|
1776
2042
|
}
|
|
1777
|
-
}, []),
|
|
1778
|
-
e.content &&
|
|
1779
|
-
}, [e.content]),
|
|
1780
|
-
|
|
1781
|
-
}, [e.builderContextSignal.rootState]),
|
|
2043
|
+
}, []), W(() => {
|
|
2044
|
+
e.content && o(e.content);
|
|
2045
|
+
}, [e.content]), W(() => {
|
|
2046
|
+
k();
|
|
2047
|
+
}, [e.builderContextSignal.rootState]), W(() => {
|
|
1782
2048
|
e.data && n(e.data);
|
|
1783
|
-
}, [e.data]),
|
|
2049
|
+
}, [e.data]), W(() => {
|
|
1784
2050
|
e.locale && n({
|
|
1785
2051
|
locale: e.locale
|
|
1786
2052
|
});
|
|
1787
|
-
}, [e.locale]),
|
|
1788
|
-
|
|
2053
|
+
}, [e.locale]), W(() => () => {
|
|
2054
|
+
_() && (window.removeEventListener("message", a), window.removeEventListener(
|
|
1789
2055
|
"builder:component:stateChangeListenerActivated",
|
|
1790
|
-
|
|
2056
|
+
k
|
|
1791
2057
|
));
|
|
1792
|
-
}, []), /* @__PURE__ */
|
|
1793
|
-
|
|
2058
|
+
}, []), /* @__PURE__ */ v(Fe.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content || ae() ? /* @__PURE__ */ v(
|
|
2059
|
+
s,
|
|
1794
2060
|
{
|
|
1795
2061
|
ref: t,
|
|
1796
|
-
onClick: (
|
|
1797
|
-
"builder-content-id": (
|
|
2062
|
+
onClick: (c) => d(c),
|
|
2063
|
+
"builder-content-id": (y = e.builderContextSignal.content) == null ? void 0 : y.id,
|
|
1798
2064
|
"builder-model": e.model,
|
|
1799
|
-
className:
|
|
1800
|
-
((
|
|
2065
|
+
className: Ht(
|
|
2066
|
+
((T = e.content) == null ? void 0 : T.testVariationId) || ((A = e.content) == null ? void 0 : A.id)
|
|
1801
2067
|
),
|
|
1802
2068
|
style: {
|
|
1803
2069
|
display: !e.builderContextSignal.content && ae() ? "none" : void 0
|
|
@@ -1808,21 +2074,21 @@ function Pt(e) {
|
|
|
1808
2074
|
}
|
|
1809
2075
|
) : null });
|
|
1810
2076
|
}
|
|
1811
|
-
function
|
|
1812
|
-
const [t, n] =
|
|
2077
|
+
function Ot(e) {
|
|
2078
|
+
const [t, n] = V(
|
|
1813
2079
|
() => `
|
|
1814
|
-
${
|
|
2080
|
+
${Lt({
|
|
1815
2081
|
cssCode: e.cssCode,
|
|
1816
2082
|
contentId: e.contentId
|
|
1817
2083
|
})}
|
|
1818
|
-
${
|
|
2084
|
+
${_t({
|
|
1819
2085
|
customFonts: e.customFonts
|
|
1820
2086
|
})}
|
|
1821
|
-
${
|
|
2087
|
+
${Bt(e.isNestedRender)}
|
|
1822
2088
|
`.trim()
|
|
1823
2089
|
);
|
|
1824
|
-
return /* @__PURE__ */
|
|
1825
|
-
|
|
2090
|
+
return /* @__PURE__ */ v(
|
|
2091
|
+
se,
|
|
1826
2092
|
{
|
|
1827
2093
|
id: "builderio-content",
|
|
1828
2094
|
styles: t,
|
|
@@ -1830,24 +2096,24 @@ ${Et(e.isNestedRender)}
|
|
|
1830
2096
|
}
|
|
1831
2097
|
);
|
|
1832
2098
|
}
|
|
1833
|
-
const
|
|
2099
|
+
const jt = ({
|
|
1834
2100
|
content: e,
|
|
1835
2101
|
data: t,
|
|
1836
2102
|
locale: n
|
|
1837
2103
|
}) => {
|
|
1838
|
-
var
|
|
1839
|
-
const
|
|
1840
|
-
return (
|
|
1841
|
-
|
|
2104
|
+
var s, i, a;
|
|
2105
|
+
const o = {}, r = ((s = e == null ? void 0 : e.data) == null ? void 0 : s.state) || {};
|
|
2106
|
+
return (a = (i = e == null ? void 0 : e.data) == null ? void 0 : i.inputs) == null || a.forEach((l) => {
|
|
2107
|
+
l.name && l.defaultValue !== void 0 && (o[l.name] = l.defaultValue);
|
|
1842
2108
|
}), {
|
|
1843
|
-
...
|
|
2109
|
+
...o,
|
|
1844
2110
|
...r,
|
|
1845
2111
|
...t,
|
|
1846
2112
|
...n ? {
|
|
1847
2113
|
locale: n
|
|
1848
2114
|
} : {}
|
|
1849
2115
|
};
|
|
1850
|
-
},
|
|
2116
|
+
}, Mt = ({
|
|
1851
2117
|
content: e,
|
|
1852
2118
|
data: t
|
|
1853
2119
|
}) => e ? {
|
|
@@ -1859,50 +2125,50 @@ const Wt = ({
|
|
|
1859
2125
|
meta: e == null ? void 0 : e.meta
|
|
1860
2126
|
} : void 0;
|
|
1861
2127
|
function ie(e) {
|
|
1862
|
-
var
|
|
1863
|
-
const [t, n] =
|
|
2128
|
+
var f, m, P, x, C, d, u, k, $;
|
|
2129
|
+
const [t, n] = V(
|
|
1864
2130
|
() => {
|
|
1865
|
-
var
|
|
1866
|
-
return
|
|
2131
|
+
var y, T;
|
|
2132
|
+
return Dt({
|
|
1867
2133
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1868
|
-
variationId: (
|
|
2134
|
+
variationId: (y = e.content) == null ? void 0 : y.testVariationId,
|
|
1869
2135
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1870
|
-
contentId: (
|
|
2136
|
+
contentId: (T = e.content) == null ? void 0 : T.id
|
|
1871
2137
|
});
|
|
1872
2138
|
}
|
|
1873
2139
|
);
|
|
1874
|
-
function
|
|
1875
|
-
|
|
1876
|
-
...
|
|
1877
|
-
rootState:
|
|
2140
|
+
function o(y) {
|
|
2141
|
+
a((T) => ({
|
|
2142
|
+
...T,
|
|
2143
|
+
rootState: y
|
|
1878
2144
|
}));
|
|
1879
2145
|
}
|
|
1880
|
-
const [r,
|
|
2146
|
+
const [r, s] = V(
|
|
1881
2147
|
() => [
|
|
1882
2148
|
...ee(),
|
|
1883
2149
|
...e.customComponents || []
|
|
1884
2150
|
].reduce(
|
|
1885
|
-
(
|
|
1886
|
-
...
|
|
1887
|
-
[
|
|
1888
|
-
component:
|
|
1889
|
-
...Z(
|
|
2151
|
+
(y, { component: T, ...A }) => ({
|
|
2152
|
+
...y,
|
|
2153
|
+
[A.name]: {
|
|
2154
|
+
component: T,
|
|
2155
|
+
...Z(A)
|
|
1890
2156
|
}
|
|
1891
2157
|
}),
|
|
1892
2158
|
{}
|
|
1893
2159
|
)
|
|
1894
|
-
), [
|
|
1895
|
-
content:
|
|
2160
|
+
), [i, a] = V(() => ({
|
|
2161
|
+
content: Mt({
|
|
1896
2162
|
content: e.content,
|
|
1897
2163
|
data: e.data
|
|
1898
2164
|
}),
|
|
1899
2165
|
localState: void 0,
|
|
1900
|
-
rootState:
|
|
2166
|
+
rootState: jt({
|
|
1901
2167
|
content: e.content,
|
|
1902
2168
|
data: e.data,
|
|
1903
2169
|
locale: e.locale
|
|
1904
2170
|
}),
|
|
1905
|
-
rootSetState:
|
|
2171
|
+
rootSetState: o,
|
|
1906
2172
|
context: e.context || {},
|
|
1907
2173
|
canTrack: e.canTrack,
|
|
1908
2174
|
apiKey: e.apiKey,
|
|
@@ -1911,9 +2177,9 @@ function ie(e) {
|
|
|
1911
2177
|
...ee(),
|
|
1912
2178
|
...e.customComponents || []
|
|
1913
2179
|
].reduce(
|
|
1914
|
-
(
|
|
1915
|
-
...
|
|
1916
|
-
[
|
|
2180
|
+
(y, { component: T, ...A }) => ({
|
|
2181
|
+
...y,
|
|
2182
|
+
[A.name]: Z(A)
|
|
1917
2183
|
}),
|
|
1918
2184
|
{}
|
|
1919
2185
|
),
|
|
@@ -1922,31 +2188,31 @@ function ie(e) {
|
|
|
1922
2188
|
BlocksWrapperProps: e.blocksWrapperProps || {},
|
|
1923
2189
|
nonce: e.nonce || "",
|
|
1924
2190
|
model: e.model
|
|
1925
|
-
})),
|
|
1926
|
-
if (!
|
|
1927
|
-
e.apiKey ||
|
|
2191
|
+
})), l = Q(!1);
|
|
2192
|
+
if (!l.current) {
|
|
2193
|
+
e.apiKey || Te.error(
|
|
1928
2194
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
1929
2195
|
);
|
|
1930
|
-
const
|
|
1931
|
-
|
|
1932
|
-
code:
|
|
2196
|
+
const y = (m = (f = i.content) == null ? void 0 : f.data) == null ? void 0 : m.jsCode;
|
|
2197
|
+
y && re({
|
|
2198
|
+
code: y,
|
|
1933
2199
|
context: e.context || {},
|
|
1934
2200
|
localState: void 0,
|
|
1935
|
-
rootState:
|
|
1936
|
-
rootSetState: (
|
|
1937
|
-
Object.assign(
|
|
2201
|
+
rootState: i.rootState,
|
|
2202
|
+
rootSetState: (T) => {
|
|
2203
|
+
Object.assign(i.rootState, T);
|
|
1938
2204
|
},
|
|
1939
2205
|
isExpression: !1
|
|
1940
|
-
}),
|
|
2206
|
+
}), l.current = !0;
|
|
1941
2207
|
}
|
|
1942
|
-
return /* @__PURE__ */
|
|
1943
|
-
|
|
2208
|
+
return /* @__PURE__ */ v(
|
|
2209
|
+
Ne.Provider,
|
|
1944
2210
|
{
|
|
1945
2211
|
value: {
|
|
1946
2212
|
registeredComponents: r
|
|
1947
2213
|
},
|
|
1948
|
-
children: /* @__PURE__ */
|
|
1949
|
-
|
|
2214
|
+
children: /* @__PURE__ */ U(
|
|
2215
|
+
qt,
|
|
1950
2216
|
{
|
|
1951
2217
|
apiHost: e.apiHost,
|
|
1952
2218
|
nonce: e.nonce,
|
|
@@ -1959,36 +2225,36 @@ function ie(e) {
|
|
|
1959
2225
|
locale: e.locale,
|
|
1960
2226
|
enrich: e.enrich,
|
|
1961
2227
|
showContent: e.showContent,
|
|
1962
|
-
builderContextSignal:
|
|
2228
|
+
builderContextSignal: i,
|
|
1963
2229
|
contentWrapper: e.contentWrapper,
|
|
1964
2230
|
contentWrapperProps: e.contentWrapperProps,
|
|
1965
2231
|
trustedHosts: e.trustedHosts,
|
|
1966
2232
|
isNestedRender: e.isNestedRender,
|
|
1967
|
-
setBuilderContextSignal:
|
|
2233
|
+
setBuilderContextSignal: a,
|
|
1968
2234
|
children: [
|
|
1969
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
1970
|
-
|
|
2235
|
+
e.isSsrAbTest ? /* @__PURE__ */ v(
|
|
2236
|
+
H,
|
|
1971
2237
|
{
|
|
1972
2238
|
id: "builderio-variant-visibility",
|
|
1973
2239
|
scriptStr: t,
|
|
1974
2240
|
nonce: e.nonce || ""
|
|
1975
2241
|
}
|
|
1976
2242
|
) : null,
|
|
1977
|
-
/* @__PURE__ */
|
|
1978
|
-
|
|
2243
|
+
/* @__PURE__ */ v(
|
|
2244
|
+
Ot,
|
|
1979
2245
|
{
|
|
1980
2246
|
nonce: e.nonce || "",
|
|
1981
2247
|
isNestedRender: e.isNestedRender,
|
|
1982
|
-
contentId: (
|
|
1983
|
-
cssCode: (
|
|
1984
|
-
customFonts: (
|
|
2248
|
+
contentId: (P = i.content) == null ? void 0 : P.id,
|
|
2249
|
+
cssCode: (C = (x = i.content) == null ? void 0 : x.data) == null ? void 0 : C.cssCode,
|
|
2250
|
+
customFonts: (u = (d = i.content) == null ? void 0 : d.data) == null ? void 0 : u.customFonts
|
|
1985
2251
|
}
|
|
1986
2252
|
),
|
|
1987
|
-
/* @__PURE__ */
|
|
1988
|
-
|
|
2253
|
+
/* @__PURE__ */ v(
|
|
2254
|
+
$e,
|
|
1989
2255
|
{
|
|
1990
|
-
blocks: (
|
|
1991
|
-
context:
|
|
2256
|
+
blocks: ($ = (k = i.content) == null ? void 0 : k.data) == null ? void 0 : $.blocks,
|
|
2257
|
+
context: i,
|
|
1992
2258
|
registeredComponents: r,
|
|
1993
2259
|
linkComponent: e.linkComponent
|
|
1994
2260
|
}
|
|
@@ -1999,71 +2265,81 @@ function ie(e) {
|
|
|
1999
2265
|
}
|
|
2000
2266
|
);
|
|
2001
2267
|
}
|
|
2002
|
-
function
|
|
2003
|
-
var
|
|
2004
|
-
const [t, n] =
|
|
2005
|
-
() =>
|
|
2006
|
-
canTrack:
|
|
2268
|
+
function Kt(e) {
|
|
2269
|
+
var i;
|
|
2270
|
+
const [t, n] = V(
|
|
2271
|
+
() => wt({
|
|
2272
|
+
canTrack: q(e.canTrack),
|
|
2007
2273
|
content: e.content
|
|
2008
2274
|
})
|
|
2009
2275
|
);
|
|
2010
|
-
function
|
|
2011
|
-
var
|
|
2012
|
-
return
|
|
2013
|
-
|
|
2014
|
-
id:
|
|
2015
|
-
testRatio:
|
|
2276
|
+
function o() {
|
|
2277
|
+
var a;
|
|
2278
|
+
return At(
|
|
2279
|
+
B(e.content).map((l) => ({
|
|
2280
|
+
id: l.testVariationId,
|
|
2281
|
+
testRatio: l.testRatio
|
|
2016
2282
|
})),
|
|
2017
|
-
((
|
|
2283
|
+
((a = e.content) == null ? void 0 : a.id) || ""
|
|
2018
2284
|
);
|
|
2019
2285
|
}
|
|
2020
2286
|
function r() {
|
|
2021
|
-
return
|
|
2287
|
+
return B(e.content).map((a) => `.variant-${a.testVariationId} { display: none; } `).join("");
|
|
2022
2288
|
}
|
|
2023
|
-
function
|
|
2024
|
-
var
|
|
2289
|
+
function s() {
|
|
2290
|
+
var a;
|
|
2025
2291
|
return t ? {
|
|
2026
2292
|
...e.content,
|
|
2027
|
-
testVariationId: (
|
|
2028
|
-
} :
|
|
2293
|
+
testVariationId: (a = e.content) == null ? void 0 : a.id
|
|
2294
|
+
} : Ie({
|
|
2029
2295
|
item: e.content,
|
|
2030
|
-
canTrack:
|
|
2296
|
+
canTrack: q(e.canTrack)
|
|
2031
2297
|
});
|
|
2032
2298
|
}
|
|
2033
|
-
return
|
|
2034
|
-
}, []), /* @__PURE__ */
|
|
2035
|
-
!e.isNestedRender &&
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
/* @__PURE__ */
|
|
2045
|
-
|
|
2299
|
+
return W(() => {
|
|
2300
|
+
}, []), /* @__PURE__ */ U(j, { children: [
|
|
2301
|
+
!e.isNestedRender && F !== "reactNative" ? /* @__PURE__ */ U(j, { children: [
|
|
2302
|
+
/* @__PURE__ */ v(
|
|
2303
|
+
H,
|
|
2304
|
+
{
|
|
2305
|
+
id: "builderio-init-variants-fns",
|
|
2306
|
+
scriptStr: Rt(),
|
|
2307
|
+
nonce: e.nonce || ""
|
|
2308
|
+
}
|
|
2309
|
+
),
|
|
2310
|
+
de.includes(F) ? /* @__PURE__ */ v(
|
|
2311
|
+
H,
|
|
2312
|
+
{
|
|
2313
|
+
id: "builderio-init-personalization-variants-fns",
|
|
2314
|
+
nonce: e.nonce || "",
|
|
2315
|
+
scriptStr: Oe()
|
|
2316
|
+
}
|
|
2317
|
+
) : null
|
|
2318
|
+
] }) : null,
|
|
2319
|
+
t ? /* @__PURE__ */ U(j, { children: [
|
|
2320
|
+
/* @__PURE__ */ v(
|
|
2321
|
+
se,
|
|
2046
2322
|
{
|
|
2047
2323
|
id: "builderio-variants",
|
|
2048
2324
|
styles: r(),
|
|
2049
2325
|
nonce: e.nonce || ""
|
|
2050
2326
|
}
|
|
2051
2327
|
),
|
|
2052
|
-
/* @__PURE__ */
|
|
2053
|
-
|
|
2328
|
+
/* @__PURE__ */ v(
|
|
2329
|
+
H,
|
|
2054
2330
|
{
|
|
2055
2331
|
id: "builderio-variants-visibility",
|
|
2056
|
-
scriptStr:
|
|
2332
|
+
scriptStr: o(),
|
|
2057
2333
|
nonce: e.nonce || ""
|
|
2058
2334
|
}
|
|
2059
2335
|
),
|
|
2060
|
-
(
|
|
2336
|
+
(i = B(e.content)) == null ? void 0 : i.map((a) => /* @__PURE__ */ v(
|
|
2061
2337
|
ie,
|
|
2062
2338
|
{
|
|
2063
2339
|
apiHost: e.apiHost,
|
|
2064
2340
|
isNestedRender: e.isNestedRender,
|
|
2065
2341
|
nonce: e.nonce,
|
|
2066
|
-
content:
|
|
2342
|
+
content: a,
|
|
2067
2343
|
showContent: !1,
|
|
2068
2344
|
model: e.model,
|
|
2069
2345
|
data: e.data,
|
|
@@ -2082,16 +2358,16 @@ function Dt(e) {
|
|
|
2082
2358
|
contentWrapperProps: e.contentWrapperProps,
|
|
2083
2359
|
trustedHosts: e.trustedHosts
|
|
2084
2360
|
},
|
|
2085
|
-
|
|
2361
|
+
a.testVariationId
|
|
2086
2362
|
))
|
|
2087
2363
|
] }) : null,
|
|
2088
|
-
/* @__PURE__ */
|
|
2364
|
+
/* @__PURE__ */ v(
|
|
2089
2365
|
ie,
|
|
2090
2366
|
{
|
|
2091
2367
|
apiHost: e.apiHost,
|
|
2092
2368
|
nonce: e.nonce,
|
|
2093
2369
|
isNestedRender: e.isNestedRender,
|
|
2094
|
-
content:
|
|
2370
|
+
content: s(),
|
|
2095
2371
|
showContent: !0,
|
|
2096
2372
|
model: e.model,
|
|
2097
2373
|
data: e.data,
|
|
@@ -2113,11 +2389,18 @@ function Dt(e) {
|
|
|
2113
2389
|
)
|
|
2114
2390
|
] });
|
|
2115
2391
|
}
|
|
2116
|
-
const
|
|
2392
|
+
const an = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2117
2393
|
__proto__: null,
|
|
2118
|
-
default:
|
|
2394
|
+
default: Kt
|
|
2119
2395
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2120
2396
|
export {
|
|
2121
|
-
|
|
2122
|
-
|
|
2397
|
+
Be as DEFAULT_INDEX,
|
|
2398
|
+
H as InlinedScript,
|
|
2399
|
+
qe as SDKS_REQUIRING_RESET_APPROACH,
|
|
2400
|
+
Zt as checkShouldRenderVariants,
|
|
2401
|
+
an as contentVariants,
|
|
2402
|
+
Xt as filterWithCustomTargeting,
|
|
2403
|
+
en as getBlocksToRender,
|
|
2404
|
+
tn as getPersonalizationScript,
|
|
2405
|
+
nn as getUpdateVisibilityStylesScript
|
|
2123
2406
|
};
|