@builder.io/sdk-vue 2.0.14-6 → 2.0.15

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.
Files changed (76) hide show
  1. package/lib/{edge/block-styles-zRPUnWLf.js → browser/block-styles-3kNIHbfo.js} +6 -6
  2. package/lib/browser/block-styles-mYBwPtv0.cjs +1 -0
  3. package/lib/browser/{block-wrapper-hPYvxseU.js → block-wrapper-N1PMQPGA.js} +3 -3
  4. package/lib/browser/{block-wrapper-l_mdj42t.cjs → block-wrapper-mGepkLsD.cjs} +1 -1
  5. package/lib/browser/{component-ref-dPnPtrON.cjs → component-ref-D4a8WUvU.cjs} +1 -1
  6. package/lib/browser/{component-ref-JlpkOrad.js → component-ref-eSpEv_vu.js} +2 -2
  7. package/lib/browser/constants/sdk-version.d.ts +1 -1
  8. package/lib/{edge/get-block-properties-PLBPSz3W.js → browser/get-block-properties--gxTb6u9.js} +13 -13
  9. package/lib/browser/get-block-properties-1Vr9AX-f.cjs +1 -0
  10. package/lib/browser/{index-ZL8QUFiN.js → index-dh7iM10N.js} +552 -546
  11. package/lib/browser/index-vQfvmzgX.cjs +166 -0
  12. package/lib/browser/index.cjs +1 -1
  13. package/lib/browser/index.mjs +1 -1
  14. package/lib/browser/{repeated-block-8EN4xN25.js → repeated-block-CnX7KaV3.js} +2 -2
  15. package/lib/browser/{repeated-block-uV-zuqkw.cjs → repeated-block-zZGzC5Ez.cjs} +1 -1
  16. package/lib/browser/server-index.d.ts +1 -0
  17. package/lib/{node/block-styles-gLB-jSXN.js → edge/block-styles-IJpbU1il.js} +12 -13
  18. package/lib/edge/block-styles-c-t5DB1d.cjs +1 -0
  19. package/lib/{node/block-wrapper-frfIIST_.js → edge/block-wrapper-UEsTg8bU.js} +3 -3
  20. package/lib/edge/{block-wrapper-9IWz2vxg.cjs → block-wrapper-cbxxzz21.cjs} +1 -1
  21. package/lib/{node/component-ref-IbarjSnq.js → edge/component-ref-2h-cUV3Z.js} +2 -2
  22. package/lib/{node/component-ref-ZlBAzimq.cjs → edge/component-ref-pqmk5wUc.cjs} +1 -1
  23. package/lib/edge/constants/sdk-version.d.ts +1 -1
  24. package/lib/{node/get-block-properties-QIsIgfnu.js → edge/get-block-properties-S3qjKi7G.js} +16 -17
  25. package/lib/edge/get-block-properties-egDFLKDW.cjs +1 -0
  26. package/lib/edge/{index-TGe9_80q.js → index-BN18YEfB.js} +843 -837
  27. package/lib/edge/{index-5-C3UhJz.cjs → index-NQs12e6I.cjs} +31 -31
  28. package/lib/edge/index.cjs +1 -1
  29. package/lib/edge/index.mjs +1 -1
  30. package/lib/edge/{repeated-block-_9Gs2AOY.js → repeated-block-3py1q2sc.js} +2 -2
  31. package/lib/{node/repeated-block-ZpVu-xdw.cjs → edge/repeated-block-IMmb2AE9.cjs} +1 -1
  32. package/lib/edge/server-index.d.ts +1 -0
  33. package/lib/{browser/block-styles-nWGppwAf.js → node/block-styles-E0MOJgK4.js} +12 -14
  34. package/lib/node/block-styles-VaKrzGA5.cjs +1 -0
  35. package/lib/node/{block-wrapper-cCYzfiv5.cjs → block-wrapper-TvqPY7Mt.cjs} +1 -1
  36. package/lib/{edge/block-wrapper-x7ERONr-.js → node/block-wrapper-cHgl5RuV.js} +5 -5
  37. package/lib/{edge/component-ref-eV0RBAzs.cjs → node/component-ref-fYSFTWDE.cjs} +1 -1
  38. package/lib/{edge/component-ref-JRfa9Vwo.js → node/component-ref-gqNpKniv.js} +2 -2
  39. package/lib/node/constants/sdk-version.d.ts +1 -1
  40. package/lib/{browser/get-block-properties-HzVZCpxa.js → node/get-block-properties-AZMTucap.js} +18 -20
  41. package/lib/node/get-block-properties-IntKgx2x.cjs +1 -0
  42. package/lib/node/index-ozkdxROi.cjs +213 -0
  43. package/lib/node/{index-BugETl2c.js → index-xSGjb-sL.js} +1123 -907
  44. package/lib/node/index.cjs +1 -1
  45. package/lib/node/index.mjs +16 -17
  46. package/lib/node/{repeated-block-Z-_chLeZ.js → repeated-block-WqJu5DET.js} +2 -2
  47. package/lib/{edge/repeated-block-FB2jF4o_.cjs → node/repeated-block-wW6CINnA.cjs} +1 -1
  48. package/lib/node/server-index.d.ts +1 -0
  49. package/nuxt.js +0 -13
  50. package/package.json +2 -8
  51. package/lib/browser/block-styles-rt4v7rBl.cjs +0 -1
  52. package/lib/browser/get-block-properties-sInACBRh.cjs +0 -1
  53. package/lib/browser/index-MDNnQzZB.cjs +0 -166
  54. package/lib/browser/init.cjs +0 -8
  55. package/lib/browser/init.d.cts +0 -14
  56. package/lib/browser/init.d.mts +0 -14
  57. package/lib/browser/init.mjs +0 -65
  58. package/lib/browser/logger-0-1mARBa.cjs +0 -1
  59. package/lib/browser/logger-Hm2e1Xk_.js +0 -12
  60. package/lib/edge/block-styles-Ta3OQAmE.cjs +0 -1
  61. package/lib/edge/get-block-properties-Dy3XF05J.cjs +0 -1
  62. package/lib/edge/init.cjs +0 -8
  63. package/lib/edge/init.d.cts +0 -14
  64. package/lib/edge/init.d.mts +0 -14
  65. package/lib/edge/init.mjs +0 -64
  66. package/lib/edge/logger-I8FmJD_1.js +0 -11
  67. package/lib/edge/logger-U9-0vDJK.cjs +0 -1
  68. package/lib/node/block-styles-u7KGnyuc.cjs +0 -1
  69. package/lib/node/get-block-properties-2Q2lr9bu.cjs +0 -1
  70. package/lib/node/index-s5vEnK-M.cjs +0 -166
  71. package/lib/node/init.cjs +0 -1
  72. package/lib/node/init.d.cts +0 -14
  73. package/lib/node/init.d.mts +0 -14
  74. package/lib/node/init.mjs +0 -11
  75. package/lib/node/node-runtime-0rF8vJwU.js +0 -233
  76. package/lib/node/node-runtime-Bqb5TnyM.cjs +0 -48
@@ -1,10 +1,10 @@
1
- var lt = Object.defineProperty;
2
- var ct = (e, t, n) => t in e ? lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var ne = (e, t, n) => (ct(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { defineComponent as f, openBlock as c, createElementBlock as m, Fragment as T, createBlock as g, resolveDynamicComponent as K, mergeProps as S, toHandlers as B, withCtx as N, renderSlot as P, resolveComponent as y, createTextVNode as dt, toDisplayString as te, defineAsyncComponent as j, createVNode as I, renderList as A, createCommentVNode as C, h as Pe, createElementVNode as z, normalizeStyle as D, normalizeClass as J, markRaw as ut } from "vue";
5
- import { T as x, g as pt, l as R, i as $, r as mt, p as ht, a as ft, s as xe, f as pe, b as bt, n as Ae, c as E, d as gt } from "./node-runtime-0rF8vJwU.js";
6
- const yt = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), kt = (e) => typeof e == "string" && yt.has(e.toLowerCase());
7
- function V(e = {}, t, n) {
1
+ var $ = Object.defineProperty;
2
+ var E = (e, t, n) => t in e ? $(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var v = (e, t, n) => (E(e, typeof t != "symbol" ? t + "" : t, n), n);
4
+ import { defineComponent, openBlock, createElementBlock, Fragment as Fragment$1, createBlock, resolveDynamicComponent, mergeProps, toHandlers, withCtx, renderSlot, resolveComponent, createTextVNode, toDisplayString, defineAsyncComponent, createVNode, renderList, createCommentVNode, h, createElementVNode, normalizeStyle, normalizeClass, markRaw } from "vue";
5
+ import { createRequire } from "node:module";
6
+ const EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), isEmptyElement = (e) => typeof e == "string" && EMPTY_HTML_ELEMENTS.has(e.toLowerCase());
7
+ function filterAttrs(e = {}, t, n) {
8
8
  const o = {};
9
9
  for (const r in e) {
10
10
  if (!e[r] || n && !r.startsWith(t))
@@ -14,38 +14,38 @@ function V(e = {}, t, n) {
14
14
  }
15
15
  return o;
16
16
  }
17
- const vt = f({
17
+ const _sfc_main$t = defineComponent({
18
18
  name: "dynamic-renderer",
19
19
  props: ["TagName", "attributes", "actionAttributes"],
20
20
  data() {
21
- return { isEmptyElement: kt };
21
+ return { isEmptyElement };
22
22
  }
23
- }), b = (e, t) => {
23
+ }), _export_sfc = (e, t) => {
24
24
  const n = e.__vccOpts || e;
25
25
  for (const [o, r] of t)
26
26
  n[o] = r;
27
27
  return n;
28
28
  };
29
- function Ct(e, t, n, o, r, i) {
30
- return e.isEmptyElement(e.TagName) ? (c(), g(K(e.TagName), S({ key: 1 }, e.attributes, B(e.actionAttributes)), null, 16)) : (c(), m(T, { key: 0 }, [
31
- typeof e.TagName == "string" ? (c(), g(K(e.TagName), S({ key: 0 }, e.attributes, B(e.actionAttributes)), {
32
- default: N(() => [
33
- P(e.$slots, "default")
29
+ function _sfc_render$r(e, t, n, o, r, i) {
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
+ typeof e.TagName == "string" ? (openBlock(), createBlock(resolveDynamicComponent(e.TagName), mergeProps({ key: 0 }, e.attributes, toHandlers(e.actionAttributes)), {
32
+ default: withCtx(() => [
33
+ renderSlot(e.$slots, "default")
34
34
  ]),
35
35
  _: 3
36
- }, 16)) : (c(), g(K(e.TagName), S({ key: 1 }, e.attributes, B(e.actionAttributes)), {
37
- default: N(() => [
38
- P(e.$slots, "default")
36
+ }, 16)) : (openBlock(), createBlock(resolveDynamicComponent(e.TagName), mergeProps({ key: 1 }, e.attributes, toHandlers(e.actionAttributes)), {
37
+ default: withCtx(() => [
38
+ renderSlot(e.$slots, "default")
39
39
  ]),
40
40
  _: 3
41
41
  }, 16))
42
42
  ], 64));
43
43
  }
44
- const me = /* @__PURE__ */ b(vt, [["render", Ct]]), Bi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
44
+ const DynamicRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$r]]), dynamicRenderer = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
45
45
  __proto__: null,
46
- default: me
47
- }, Symbol.toStringTag, { value: "Module" })), _ = () => {
48
- switch (x) {
46
+ default: DynamicRenderer
47
+ }, Symbol.toStringTag, { value: "Module" })), TARGET = "vue", getClassPropName = () => {
48
+ switch (TARGET) {
49
49
  case "react":
50
50
  case "reactNative":
51
51
  case "rsc":
@@ -57,9 +57,9 @@ const me = /* @__PURE__ */ b(vt, [["render", Ct]]), Bi = /* @__PURE__ */ Object.
57
57
  case "angular":
58
58
  return "class";
59
59
  }
60
- }, St = f({
60
+ }, _sfc_main$s = defineComponent({
61
61
  name: "builder-button",
62
- components: { DynamicRenderer: me },
62
+ components: { DynamicRenderer },
63
63
  props: [
64
64
  "attributes",
65
65
  "link",
@@ -68,13 +68,13 @@ const me = /* @__PURE__ */ b(vt, [["render", Ct]]), Bi = /* @__PURE__ */ Object.
68
68
  "text"
69
69
  ],
70
70
  data() {
71
- return { filterAttrs: V };
71
+ return { filterAttrs };
72
72
  },
73
73
  methods: {
74
74
  attrs() {
75
75
  return {
76
- ...V(this.attributes, "v-on:", !1),
77
- [_()]: `${this.link ? "" : "builder-button"} ${this.attributes[_()] || ""}`,
76
+ ...filterAttrs(this.attributes, "v-on:", !1),
77
+ [getClassPropName()]: `${this.link ? "" : "builder-button"} ${this.attributes[getClassPropName()] || ""}`,
78
78
  ...this.link ? {
79
79
  href: this.link,
80
80
  target: this.openLinkInNewTab ? "_blank" : void 0,
@@ -86,20 +86,20 @@ const me = /* @__PURE__ */ b(vt, [["render", Ct]]), Bi = /* @__PURE__ */ Object.
86
86
  }
87
87
  }
88
88
  });
89
- function Tt(e, t, n, o, r, i) {
90
- const s = y("DynamicRenderer");
91
- return c(), g(s, {
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)
95
95
  }, {
96
- default: N(() => [
97
- dt(te(e.text), 1)
96
+ default: withCtx(() => [
97
+ createTextVNode(toDisplayString(e.text), 1)
98
98
  ]),
99
99
  _: 1
100
100
  }, 8, ["attributes", "TagName", "actionAttributes"]);
101
101
  }
102
- const wt = /* @__PURE__ */ b(St, [["render", Tt]]), It = Symbol(), le = {
102
+ const Button = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$q]]), key$1 = Symbol(), BuilderContext = {
103
103
  Builder: {
104
104
  content: null,
105
105
  context: {},
@@ -115,25 +115,98 @@ const wt = /* @__PURE__ */ b(St, [["render", Tt]]), It = Symbol(), le = {
115
115
  BlocksWrapperProps: {},
116
116
  nonce: ""
117
117
  },
118
- key: It
119
- }, $t = Symbol(), Ve = {
118
+ key: key$1
119
+ }, key = Symbol(), ComponentsContext = {
120
120
  Components: { registeredComponents: {} },
121
- key: $t
121
+ key
122
122
  };
123
- function Rt(e) {
123
+ function getBlockComponentOptions(e) {
124
124
  var t;
125
125
  return {
126
126
  ...(t = e.component) == null ? void 0 : t.options,
127
127
  ...e.options
128
128
  };
129
129
  }
130
- function Et(e, ...t) {
130
+ function omit(e, ...t) {
131
131
  const n = Object.assign({}, e);
132
132
  for (const o of t)
133
133
  delete n[o];
134
134
  return n;
135
135
  }
136
- const Bt = ({
136
+ const MSG_PREFIX = "[Builder.io]: ", logger = {
137
+ log: (...e) => console.log(MSG_PREFIX, ...e),
138
+ error: (...e) => console.error(MSG_PREFIX, ...e),
139
+ warn: (...e) => console.warn(MSG_PREFIX, ...e),
140
+ debug: (...e) => console.debug(MSG_PREFIX, ...e)
141
+ };
142
+ function isBrowser() {
143
+ return typeof window < "u" && typeof document < "u";
144
+ }
145
+ const convertSearchParamsToQueryObject = (e) => {
146
+ const t = {};
147
+ return e.forEach((n, o) => {
148
+ t[o] = n;
149
+ }), t;
150
+ }, normalizeSearchParams = (e) => e instanceof URLSearchParams ? convertSearchParamsToQueryObject(e) : e, getSearchString = (e) => typeof e == "string" ? e : e instanceof URLSearchParams ? e.toString() : new URLSearchParams(e).toString();
151
+ function isIframe() {
152
+ return isBrowser() && window.self !== window.top;
153
+ }
154
+ function isEditing(e) {
155
+ return isIframe() && // accessing window.location.search is safe here because `isIframe()` is only `true` if we're in a browser.
156
+ getSearchString(e || window.location.search).indexOf("builder.frameEditing=") !== -1;
157
+ }
158
+ const getLocation = () => {
159
+ if (isBrowser()) {
160
+ const e = new URL(location.href);
161
+ return e.pathname === "" && (e.pathname = "/"), e;
162
+ } else
163
+ return console.warn("Cannot get location for tracking in non-browser environment"), null;
164
+ }, getUserAgent = () => typeof navigator == "object" && navigator.userAgent || "", getUserAttributes = () => {
165
+ const e = getUserAgent(), t = {
166
+ Android() {
167
+ return e.match(/Android/i);
168
+ },
169
+ BlackBerry() {
170
+ return e.match(/BlackBerry/i);
171
+ },
172
+ iOS() {
173
+ return e.match(/iPhone|iPod/i);
174
+ },
175
+ Opera() {
176
+ return e.match(/Opera Mini/i);
177
+ },
178
+ Windows() {
179
+ return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
180
+ },
181
+ any() {
182
+ return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || TARGET === "reactNative";
183
+ }
184
+ }, n = e.match(/Tablet|iPad/i), o = getLocation();
185
+ return {
186
+ urlPath: o == null ? void 0 : o.pathname,
187
+ host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
188
+ device: n ? "tablet" : t.any() ? "mobile" : "desktop"
189
+ };
190
+ }, getFunctionArguments = ({
191
+ builder: e,
192
+ context: t,
193
+ event: n,
194
+ state: o
195
+ }) => Object.entries({
196
+ state: o,
197
+ Builder: e,
198
+ // legacy
199
+ builder: e,
200
+ context: t,
201
+ event: n
202
+ }), getBuilderGlobals = () => ({
203
+ isEditing: isEditing(),
204
+ isBrowser: isBrowser(),
205
+ isServer: !isBrowser(),
206
+ getUserAttributes: () => getUserAttributes()
207
+ }), parseCode = (e, {
208
+ isExpression: t = !0
209
+ }) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, runInBrowser = ({
137
210
  code: e,
138
211
  builder: t,
139
212
  context: n,
@@ -142,11 +215,11 @@ const Bt = ({
142
215
  rootSetState: i,
143
216
  rootState: s
144
217
  }) => {
145
- const l = pt({
218
+ const l = getFunctionArguments({
146
219
  builder: t,
147
220
  context: n,
148
221
  event: o,
149
- state: We({
222
+ state: flattenState({
150
223
  rootState: s,
151
224
  localState: r,
152
225
  rootSetState: i
@@ -154,7 +227,7 @@ const Bt = ({
154
227
  });
155
228
  return new Function(...l.map(([a]) => a), e)(...l.map(([, a]) => a));
156
229
  };
157
- function We({
230
+ function flattenState({
158
231
  rootState: e,
159
232
  localState: t,
160
233
  rootSetState: n
@@ -164,7 +237,7 @@ function We({
164
237
  if (t && r in t)
165
238
  return t[r];
166
239
  const i = o[r];
167
- return typeof i == "object" && i !== null ? We({
240
+ return typeof i == "object" && i !== null ? flattenState({
168
241
  rootState: i,
169
242
  localState: void 0,
170
243
  rootSetState: n ? (s) => {
@@ -179,18 +252,156 @@ function We({
179
252
  }
180
253
  });
181
254
  }
182
- const L = (e) => e != null;
183
- function Pt() {
255
+ const SDK_NAME_FOR_TARGET = (() => {
256
+ switch (TARGET) {
257
+ case "rsc":
258
+ return "react-nextjs";
259
+ case "reactNative":
260
+ return "react-native";
261
+ default:
262
+ return TARGET;
263
+ }
264
+ })(), SDK_NAME = `@builder.io/sdk-${SDK_NAME_FOR_TARGET}`, fastClone = (e) => JSON.parse(JSON.stringify(e)), set = (e, t, n) => {
265
+ if (Object(e) !== e)
266
+ return e;
267
+ const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
268
+ 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;
269
+ }, noop = () => {
270
+ };
271
+ let safeDynamicRequire = noop;
272
+ try {
273
+ safeDynamicRequire = createRequire(import.meta.url);
274
+ } catch (error) {
275
+ try {
276
+ safeDynamicRequire = eval("require");
277
+ } catch (e) {
278
+ }
279
+ }
280
+ const getSyncValName = (e) => `bldr_${e}_sync`, BUILDER_SET_STATE_NAME = "BUILDER_SET_STATE", INJECTED_IVM_GLOBAL = "BUILDER_IVM", REF_TO_PROXY_FN = `
281
+ var refToProxy = (obj) => {
282
+ if (typeof obj !== 'object' || obj === null) {
283
+ return obj;
284
+ }
285
+ return new Proxy({}, {
286
+ get(target, key) {
287
+ if (key === 'copySync') {
288
+ return () => obj.copySync();
289
+ }
290
+ const val = obj.getSync(key);
291
+ if (typeof val?.getSync === 'function') {
292
+ return refToProxy(val);
293
+ }
294
+ return val;
295
+ },
296
+ set(target, key, value) {
297
+ const v = typeof value === 'object' ? new ${INJECTED_IVM_GLOBAL}.Reference(value) : value;
298
+ obj.setSync(key, v);
299
+ ${BUILDER_SET_STATE_NAME}(key, value)
300
+ },
301
+ deleteProperty(target, key) {
302
+ obj.deleteSync(key);
303
+ }
304
+ })
305
+ }
306
+ `, processCode = ({
307
+ code: e,
308
+ args: t
309
+ }) => {
310
+ const n = t.map(([o]) => `var ${o} = refToProxy(${getSyncValName(o)}); `).join("");
311
+ return `
312
+ ${REF_TO_PROXY_FN}
313
+ ${n}
314
+ function theFunction() {
315
+ ${e}
316
+ }
317
+
318
+ const output = theFunction()
319
+
320
+ if (typeof output === 'object' && output !== null) {
321
+ return JSON.stringify(output.copySync ? output.copySync() : output);
322
+ } else {
323
+ return output;
324
+ }
325
+ `;
326
+ };
327
+ let IVM_INSTANCE = null, IVM_CONTEXT = null;
328
+ const SHOULD_MENTION_INITIALIZE_SCRIPT = SDK_NAME === "@builder.io/sdk-react-nextjs" || SDK_NAME === "@builder.io/sdk-react" || SDK_NAME === "@builder.io/sdk-qwik", getIvm = () => {
329
+ try {
330
+ const t = safeDynamicRequire("isolated-vm");
331
+ if (t)
332
+ return t;
333
+ } catch (t) {
334
+ logger.error("isolated-vm import error.", t);
335
+ }
336
+ const e = `${MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
337
+
338
+ SOLUTION: In a server-only execution path within your application, do one of the following:
339
+
340
+ ${SHOULD_MENTION_INITIALIZE_SCRIPT ? `- import and call \`initializeNodeRuntime()\` from "${SDK_NAME}/node/init".` : ""}
341
+ - add the following import: \`await import('isolated-vm')\`.
342
+
343
+ For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;
344
+ throw new Error(e);
345
+ };
346
+ function setIsolateContext(e = {
347
+ memoryLimit: 128
348
+ }) {
349
+ const t = getIvm(), o = new t.Isolate(e).createContextSync(), r = o.global;
350
+ return r.setSync("global", r.derefInto()), r.setSync("log", function(...i) {
351
+ console.log(...i);
352
+ }), r.setSync(INJECTED_IVM_GLOBAL, t), IVM_CONTEXT = o, o;
353
+ }
354
+ const getIsolateContext = () => IVM_CONTEXT || setIsolateContext(), runInNode = ({
355
+ code: e,
356
+ builder: t,
357
+ context: n,
358
+ event: o,
359
+ localState: r,
360
+ rootSetState: i,
361
+ rootState: s
362
+ }) => {
363
+ const l = getIvm(), a = fastClone({
364
+ ...s,
365
+ ...r
366
+ }), d = getFunctionArguments({
367
+ builder: t,
368
+ context: n,
369
+ event: o,
370
+ state: a
371
+ }), p = getIsolateContext(), c = p.global;
372
+ c.setSync(BUILDER_SET_STATE_NAME, function(m, b) {
373
+ set(s, m, b), i == null || i(s);
374
+ }), d.forEach(([m, b]) => {
375
+ const C = typeof b == "object" ? new l.Reference(
376
+ // workaround: methods with default values for arguments is not being cloned over
377
+ m === "builder" ? {
378
+ ...b,
379
+ getUserAttributes: () => b.getUserAttributes()
380
+ } : b
381
+ ) : null;
382
+ c.setSync(getSyncValName(m), C);
383
+ });
384
+ const u = processCode({
385
+ code: e,
386
+ args: d
387
+ }), f = p.evalClosureSync(u);
388
+ try {
389
+ return JSON.parse(f);
390
+ } catch {
391
+ return f;
392
+ }
393
+ }, checkIsDefined = (e) => e != null;
394
+ function isNodeRuntime() {
184
395
  var e;
185
- return typeof process < "u" && L((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
396
+ return typeof process < "u" && checkIsDefined((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
186
397
  }
187
- const xt = () => {
398
+ const shouldForceBrowserRuntimeInNode = () => {
188
399
  var o;
189
- if (!Pt())
400
+ if (!isNodeRuntime())
190
401
  return !1;
191
402
  const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
192
- return e && t && !n ? (R.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
193
- }, At = (e) => $() || xt() ? Bt(e) : mt(e), Vt = !0, W = class W {
403
+ return e && t && !n ? (logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
404
+ }, chooseBrowserOrServerEval = (e) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(e) : runInNode(e), DISABLE_CACHE = !0, y = class y {
194
405
  static getCacheKey(t) {
195
406
  return JSON.stringify({
196
407
  ...t,
@@ -200,17 +411,17 @@ const xt = () => {
200
411
  });
201
412
  }
202
413
  static getCachedValue(t) {
203
- return W.cache.get(t);
414
+ return y.cache.get(t);
204
415
  }
205
416
  static setCachedValue(t, n) {
206
- W.cache.size > 20 && W.cache.delete(W.cache.keys().next().value), W.cache.set(t, {
417
+ y.cache.size > 20 && y.cache.delete(y.cache.keys().next().value), y.cache.set(t, {
207
418
  value: n
208
419
  });
209
420
  }
210
421
  };
211
- ne(W, "cacheLimit", 20), ne(W, "cache", /* @__PURE__ */ new Map());
212
- let U = W;
213
- function G({
422
+ v(y, "cacheLimit", 20), v(y, "cache", /* @__PURE__ */ new Map());
423
+ let EvalCache = y;
424
+ function evaluate({
214
425
  code: e,
215
426
  context: t,
216
427
  localState: n,
@@ -223,50 +434,53 @@ function G({
223
434
  if (e === "")
224
435
  return;
225
436
  const a = {
226
- code: ht(e, {
437
+ code: parseCode(e, {
227
438
  isExpression: s
228
439
  }),
229
- builder: ft(),
440
+ builder: getBuilderGlobals(),
230
441
  context: t,
231
442
  event: i,
232
443
  rootSetState: r,
233
444
  rootState: o,
234
445
  localState: n
235
446
  };
236
- if (l && !Vt) {
237
- const u = U.getCacheKey(a), h = U.getCachedValue(u);
238
- if (h)
239
- return h.value;
447
+ if (l && !DISABLE_CACHE) {
448
+ const d = EvalCache.getCacheKey(a), p = EvalCache.getCachedValue(d);
449
+ if (p)
450
+ return p.value;
240
451
  }
241
452
  try {
242
- const u = At(a);
453
+ const d = chooseBrowserOrServerEval(a);
243
454
  if (l) {
244
- const h = U.getCacheKey(a);
245
- U.setCachedValue(h, u);
455
+ const p = EvalCache.getCacheKey(a);
456
+ EvalCache.setCachedValue(p, d);
246
457
  }
247
- return u;
248
- } catch (u) {
249
- R.error("Failed code evaluation: " + u.message, {
458
+ return d;
459
+ } catch (d) {
460
+ logger.error("Failed code evaluation: " + d.message, {
250
461
  code: e
251
462
  });
252
463
  return;
253
464
  }
254
465
  }
255
- function ce(e) {
466
+ function transformBlock(e) {
467
+ return e;
468
+ }
469
+ function deepCloneWithConditions(e) {
256
470
  if (e === null || typeof e != "object")
257
471
  return e;
258
472
  if (Array.isArray(e))
259
- return e.map((n) => ce(n));
473
+ return e.map((n) => deepCloneWithConditions(n));
260
474
  if (e["@type"] === "@builder.io/sdk:Element")
261
475
  return e;
262
476
  const t = {};
263
477
  for (const n in e)
264
- n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] = ce(e[n]));
478
+ n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] = deepCloneWithConditions(e[n]));
265
479
  return t;
266
480
  }
267
- const Wt = ["svelte", "vue", "angular", "qwik", "solid"].includes(x), Nt = (e) => {
268
- if (Wt) {
269
- const t = pe(e);
481
+ const IS_SDK_WITHOUT_CACHED_PROCESSED_BLOCK = ["svelte", "vue", "angular", "qwik", "solid"].includes(TARGET), getCopy = (e) => {
482
+ if (IS_SDK_WITHOUT_CACHED_PROCESSED_BLOCK) {
483
+ const t = fastClone(e);
270
484
  return {
271
485
  ...t,
272
486
  properties: {
@@ -277,7 +491,7 @@ const Wt = ["svelte", "vue", "angular", "qwik", "solid"].includes(x), Nt = (e) =
277
491
  }
278
492
  };
279
493
  } else {
280
- const t = ce(Et(e, "children", "meta"));
494
+ const t = deepCloneWithConditions(omit(e, "children", "meta"));
281
495
  return {
282
496
  ...t,
283
497
  properties: {
@@ -290,7 +504,7 @@ const Wt = ["svelte", "vue", "angular", "qwik", "solid"].includes(x), Nt = (e) =
290
504
  meta: e.meta
291
505
  };
292
506
  }
293
- }, Ft = ({
507
+ }, evaluateBindings = ({
294
508
  block: e,
295
509
  context: t,
296
510
  localState: n,
@@ -299,9 +513,9 @@ const Wt = ["svelte", "vue", "angular", "qwik", "solid"].includes(x), Nt = (e) =
299
513
  }) => {
300
514
  if (!e.bindings)
301
515
  return e;
302
- const i = Nt(e);
516
+ const i = getCopy(e);
303
517
  for (const s in e.bindings) {
304
- const l = e.bindings[s], a = G({
518
+ const l = e.bindings[s], a = evaluate({
305
519
  code: l,
306
520
  localState: n,
307
521
  rootState: o,
@@ -309,11 +523,11 @@ const Wt = ["svelte", "vue", "angular", "qwik", "solid"].includes(x), Nt = (e) =
309
523
  context: t,
310
524
  enableCache: !0
311
525
  });
312
- xe(i, s, a);
526
+ set(i, s, a);
313
527
  }
314
528
  return i;
315
529
  };
316
- function Ot({
530
+ function getProcessedBlock({
317
531
  block: e,
318
532
  context: t,
319
533
  shouldEvaluateBindings: n,
@@ -322,7 +536,7 @@ function Ot({
322
536
  rootSetState: i
323
537
  }) {
324
538
  const s = e;
325
- return n ? Ft({
539
+ return n ? evaluateBindings({
326
540
  block: s,
327
541
  localState: o,
328
542
  rootState: r,
@@ -330,25 +544,25 @@ function Ot({
330
544
  context: t
331
545
  }) : s;
332
546
  }
333
- function Dt(e) {
334
- const t = e || ($() ? window.location.search : void 0);
335
- return t ? bt(t).indexOf("builder.preview=") !== -1 : !1;
547
+ function isPreviewing(e) {
548
+ const t = e || (isBrowser() ? window.location.search : void 0);
549
+ return t ? getSearchString(t).indexOf("builder.preview=") !== -1 : !1;
336
550
  }
337
- const Lt = (e) => ({
551
+ const createRegisterComponentMessage = (e) => ({
338
552
  type: "builder.registerComponent",
339
- data: ee(e)
340
- }), Ut = (e) => {
553
+ data: serializeIncludingFunctions(e)
554
+ }), serializeFn = (e) => {
341
555
  const t = e.toString().trim();
342
556
  return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
343
557
  };
344
- function ee(e) {
345
- return JSON.parse(JSON.stringify(e, (t, n) => typeof n == "function" ? Ut(n) : n));
558
+ function serializeIncludingFunctions(e) {
559
+ return JSON.parse(JSON.stringify(e, (t, n) => typeof n == "function" ? serializeFn(n) : n));
346
560
  }
347
- const Ce = {};
348
- function Mt(e, t) {
349
- e === "plugin" && (t = ee(t));
350
- let n = Ce[e];
351
- if (n || (n = Ce[e] = []), n.push(t), $()) {
561
+ const registry = {};
562
+ function register(e, t) {
563
+ e === "plugin" && (t = serializeIncludingFunctions(t));
564
+ let n = registry[e];
565
+ if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
352
566
  const o = {
353
567
  type: "builder.register",
354
568
  data: {
@@ -363,38 +577,38 @@ function Mt(e, t) {
363
577
  }
364
578
  }
365
579
  }
366
- const Se = {};
367
- function Pi(e) {
368
- if ($()) {
369
- Object.assign(Se, e);
580
+ const settings = {};
581
+ function setEditorSettings(e) {
582
+ if (isBrowser()) {
583
+ Object.assign(settings, e);
370
584
  const t = {
371
585
  type: "builder.settingsChange",
372
- data: Se
586
+ data: settings
373
587
  };
374
588
  parent.postMessage(t, "*");
375
589
  }
376
590
  }
377
- const Te = "builder.", Ht = "options.", Ne = (e) => {
591
+ const BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUILDER_OPTIONS_PREFIX = "options.", getBuilderSearchParams = (e) => {
378
592
  if (!e)
379
593
  return {};
380
- const t = Ae(e), n = {};
594
+ const t = normalizeSearchParams(e), n = {};
381
595
  return Object.keys(t).forEach((o) => {
382
- if (o.startsWith(Te)) {
383
- const r = o.replace(Te, "").replace(Ht, "");
596
+ if (o.startsWith(BUILDER_SEARCHPARAMS_PREFIX)) {
597
+ const r = o.replace(BUILDER_SEARCHPARAMS_PREFIX, "").replace(BUILDER_OPTIONS_PREFIX, "");
384
598
  n[r] = t[o];
385
599
  }
386
600
  }), n;
387
- }, jt = () => {
388
- if (!$())
601
+ }, getBuilderSearchParamsFromWindow = () => {
602
+ if (!isBrowser())
389
603
  return {};
390
604
  const e = new URLSearchParams(window.location.search);
391
- return Ne(e);
392
- }, Kt = (e) => {
605
+ return getBuilderSearchParams(e);
606
+ }, getTopLevelDomain = (e) => {
393
607
  if (e === "localhost" || e === "127.0.0.1")
394
608
  return e;
395
609
  const t = e.split(".");
396
610
  return t.length > 2 ? t.slice(1).join(".") : e;
397
- }, Fe = ({
611
+ }, getCookieSync = ({
398
612
  name: e,
399
613
  canTrack: t
400
614
  }) => {
@@ -402,17 +616,17 @@ const Te = "builder.", Ht = "options.", Ne = (e) => {
402
616
  try {
403
617
  return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
404
618
  } catch (o) {
405
- R.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
619
+ logger.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
406
620
  return;
407
621
  }
408
- }, Oe = async (e) => Fe(e), qt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(L).join("; "), zt = [["secure", ""], ["SameSite", "None"]], Jt = ({
622
+ }, getCookie = async (e) => getCookieSync(e), stringifyCookie = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(checkIsDefined).join("; "), SECURE_CONFIG = [["secure", ""], ["SameSite", "None"]], createCookieString = ({
409
623
  name: e,
410
624
  value: t,
411
625
  expires: n
412
626
  }) => {
413
- const r = ($() ? location.protocol === "https:" : !0) ? zt : [[]], i = n ? [["expires", n.toUTCString()]] : [[]], s = [[e, t], ...i, ["path", "/"], ["domain", Kt(window.location.hostname)], ...r];
414
- return qt(s);
415
- }, De = async ({
627
+ 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];
628
+ return stringifyCookie(s);
629
+ }, setCookie = async ({
416
630
  name: e,
417
631
  value: t,
418
632
  expires: n,
@@ -421,98 +635,98 @@ const Te = "builder.", Ht = "options.", Ne = (e) => {
421
635
  try {
422
636
  if (!o)
423
637
  return;
424
- const r = Jt({
638
+ const r = createCookieString({
425
639
  name: e,
426
640
  value: t,
427
641
  expires: n
428
642
  });
429
643
  document.cookie = r;
430
644
  } catch (r) {
431
- R.warn("[COOKIE] SET error: ", (r == null ? void 0 : r.message) || r);
645
+ logger.warn("[COOKIE] SET error: ", (r == null ? void 0 : r.message) || r);
432
646
  }
433
647
  };
434
- function Gt() {
648
+ function uuidv4() {
435
649
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
436
650
  const t = Math.random() * 16 | 0;
437
651
  return (e == "x" ? t : t & 3 | 8).toString(16);
438
652
  });
439
653
  }
440
- function Le() {
441
- return Gt().replace(/-/g, "");
654
+ function uuid() {
655
+ return uuidv4().replace(/-/g, "");
442
656
  }
443
- const Ue = "builderSessionId", Yt = async ({
657
+ const SESSION_LOCAL_STORAGE_KEY = "builderSessionId", getSessionId = async ({
444
658
  canTrack: e
445
659
  }) => {
446
660
  if (!e)
447
661
  return;
448
- const t = await Oe({
449
- name: Ue,
662
+ const t = await getCookie({
663
+ name: SESSION_LOCAL_STORAGE_KEY,
450
664
  canTrack: e
451
665
  });
452
- if (L(t))
666
+ if (checkIsDefined(t))
453
667
  return t;
454
668
  {
455
- const n = Qt();
456
- return Xt({
669
+ const n = createSessionId();
670
+ return setSessionId({
457
671
  id: n,
458
672
  canTrack: e
459
673
  }), n;
460
674
  }
461
- }, Qt = () => Le(), Xt = ({
675
+ }, createSessionId = () => uuid(), setSessionId = ({
462
676
  id: e,
463
677
  canTrack: t
464
- }) => De({
465
- name: Ue,
678
+ }) => setCookie({
679
+ name: SESSION_LOCAL_STORAGE_KEY,
466
680
  value: e,
467
681
  canTrack: t
468
- }), Me = () => $() && typeof localStorage < "u" ? localStorage : void 0, Zt = ({
682
+ }), getLocalStorage = () => isBrowser() && typeof localStorage < "u" ? localStorage : void 0, getLocalStorageItem = ({
469
683
  key: e,
470
684
  canTrack: t
471
685
  }) => {
472
686
  var n;
473
687
  try {
474
- return t ? (n = Me()) == null ? void 0 : n.getItem(e) : void 0;
688
+ return t ? (n = getLocalStorage()) == null ? void 0 : n.getItem(e) : void 0;
475
689
  } catch (o) {
476
690
  console.debug("[LocalStorage] GET error: ", o);
477
691
  return;
478
692
  }
479
- }, _t = ({
693
+ }, setLocalStorageItem = ({
480
694
  key: e,
481
695
  canTrack: t,
482
696
  value: n
483
697
  }) => {
484
698
  var o;
485
699
  try {
486
- t && ((o = Me()) == null || o.setItem(e, n));
700
+ t && ((o = getLocalStorage()) == null || o.setItem(e, n));
487
701
  } catch (r) {
488
702
  console.debug("[LocalStorage] SET error: ", r);
489
703
  }
490
- }, He = "builderVisitorId", en = ({
704
+ }, VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId", getVisitorId = ({
491
705
  canTrack: e
492
706
  }) => {
493
707
  if (!e)
494
708
  return;
495
- const t = Zt({
496
- key: He,
709
+ const t = getLocalStorageItem({
710
+ key: VISITOR_LOCAL_STORAGE_KEY,
497
711
  canTrack: e
498
712
  });
499
- if (L(t))
713
+ if (checkIsDefined(t))
500
714
  return t;
501
715
  {
502
- const n = tn();
503
- return nn({
716
+ const n = createVisitorId();
717
+ return setVisitorId({
504
718
  id: n,
505
719
  canTrack: e
506
720
  }), n;
507
721
  }
508
- }, tn = () => Le(), nn = ({
722
+ }, createVisitorId = () => uuid(), setVisitorId = ({
509
723
  id: e,
510
724
  canTrack: t
511
- }) => _t({
512
- key: He,
725
+ }) => setLocalStorageItem({
726
+ key: VISITOR_LOCAL_STORAGE_KEY,
513
727
  value: e,
514
728
  canTrack: t
515
- }), on = async ({
729
+ }), getTrackingEventData = async ({
516
730
  canTrack: e
517
731
  }) => {
518
732
  if (!e)
@@ -520,16 +734,16 @@ const Ue = "builderSessionId", Yt = async ({
520
734
  visitorId: void 0,
521
735
  sessionId: void 0
522
736
  };
523
- const t = await Yt({
737
+ const t = await getSessionId({
524
738
  canTrack: e
525
- }), n = en({
739
+ }), n = getVisitorId({
526
740
  canTrack: e
527
741
  });
528
742
  return {
529
743
  sessionId: t,
530
744
  visitorId: n
531
745
  };
532
- }, rn = async ({
746
+ }, createEvent = async ({
533
747
  type: e,
534
748
  canTrack: t,
535
749
  apiKey: n,
@@ -543,23 +757,23 @@ const Ue = "builderSessionId", Yt = async ({
543
757
  url: location.href,
544
758
  ...o
545
759
  },
546
- ...await on({
760
+ ...await getTrackingEventData({
547
761
  canTrack: t
548
762
  }),
549
- userAttributes: gt(),
763
+ userAttributes: getUserAttributes(),
550
764
  ownerId: n
551
765
  }
552
766
  });
553
- async function de(e) {
767
+ async function _track(e) {
554
768
  if (!e.apiKey) {
555
- R.error("Missing API key for track call. Please provide your API key.");
769
+ logger.error("Missing API key for track call. Please provide your API key.");
556
770
  return;
557
771
  }
558
- if (e.canTrack && !E() && ($() || x === "reactNative"))
772
+ if (e.canTrack && !isEditing() && (isBrowser() || TARGET === "reactNative"))
559
773
  return fetch("https://cdn.builder.io/api/v1/track", {
560
774
  method: "POST",
561
775
  body: JSON.stringify({
562
- events: [await rn(e)]
776
+ events: [await createEvent(e)]
563
777
  }),
564
778
  headers: {
565
779
  "content-type": "application/json"
@@ -569,18 +783,18 @@ async function de(e) {
569
783
  console.error("Failed to track: ", t);
570
784
  });
571
785
  }
572
- const xi = (e) => de({
786
+ const track = (e) => _track({
573
787
  ...e,
574
788
  canTrack: !0
575
- }), sn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
576
- function je(e, t) {
789
+ }), DEFAULT_TRUSTED_HOSTS = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
790
+ function isFromTrustedHost(e, t) {
577
791
  if (!t.origin.startsWith("http") && !t.origin.startsWith("https"))
578
792
  return !1;
579
793
  const n = new URL(t.origin), o = n.hostname;
580
- return (e || sn).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
794
+ return (e || DEFAULT_TRUSTED_HOSTS).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
581
795
  }
582
- const an = "2.0.13", ln = () => {
583
- Mt("insertMenu", {
796
+ const SDK_VERSION = "2.0.15", registerInsertMenu = () => {
797
+ register("insertMenu", {
584
798
  name: "_default",
585
799
  default: !0,
586
800
  items: [{
@@ -602,14 +816,14 @@ const an = "2.0.13", ln = () => {
602
816
  }]
603
817
  });
604
818
  };
605
- let we = !1;
606
- const Ke = (e = {}) => {
819
+ let isSetupForEditing = !1;
820
+ const setupBrowserForEditing = (e = {}) => {
607
821
  var t, n;
608
- we || (we = !0, $() && ((t = window.parent) == null || t.postMessage({
822
+ isSetupForEditing || (isSetupForEditing = !0, isBrowser() && ((t = window.parent) == null || t.postMessage({
609
823
  type: "builder.sdkInfo",
610
824
  data: {
611
- target: x,
612
- version: an,
825
+ target: TARGET,
826
+ version: SDK_VERSION,
613
827
  supportsPatchUpdates: !1,
614
828
  // Supports builder-model="..." attribute which is needed to
615
829
  // scope our '+ add block' button styling
@@ -623,7 +837,7 @@ const Ke = (e = {}) => {
623
837
  }
624
838
  }, "*"), window.addEventListener("message", (o) => {
625
839
  var i, s;
626
- if (!je(e.trustedHosts, o))
840
+ if (!isFromTrustedHost(e.trustedHosts, o))
627
841
  return;
628
842
  const {
629
843
  data: r
@@ -631,45 +845,45 @@ const Ke = (e = {}) => {
631
845
  if (r != null && r.type)
632
846
  switch (r.type) {
633
847
  case "builder.evaluate": {
634
- const l = r.data.text, a = r.data.arguments || [], u = r.data.id, h = new Function(l);
635
- let d, p = null;
848
+ const l = r.data.text, a = r.data.arguments || [], d = r.data.id, p = new Function(l);
849
+ let c, u = null;
636
850
  try {
637
- d = h.apply(null, a);
638
- } catch (k) {
639
- p = k;
851
+ c = p.apply(null, a);
852
+ } catch (f) {
853
+ u = f;
640
854
  }
641
- p ? (i = window.parent) == null || i.postMessage({
855
+ u ? (i = window.parent) == null || i.postMessage({
642
856
  type: "builder.evaluateError",
643
857
  data: {
644
- id: u,
645
- error: p.message
858
+ id: d,
859
+ error: u.message
646
860
  }
647
- }, "*") : d && typeof d.then == "function" ? d.then((k) => {
648
- var v;
649
- (v = window.parent) == null || v.postMessage({
861
+ }, "*") : c && typeof c.then == "function" ? c.then((f) => {
862
+ var m;
863
+ (m = window.parent) == null || m.postMessage({
650
864
  type: "builder.evaluateResult",
651
865
  data: {
652
- id: u,
653
- result: k
866
+ id: d,
867
+ result: f
654
868
  }
655
869
  }, "*");
656
870
  }).catch(console.error) : (s = window.parent) == null || s.postMessage({
657
871
  type: "builder.evaluateResult",
658
872
  data: {
659
- result: d,
660
- id: u
873
+ result: c,
874
+ id: d
661
875
  }
662
876
  }, "*");
663
877
  break;
664
878
  }
665
879
  }
666
880
  })));
667
- }, qe = ({
881
+ }, createEditorListener = ({
668
882
  model: e,
669
883
  trustedHosts: t,
670
884
  callbacks: n
671
885
  }) => (o) => {
672
- if (!je(t, o))
886
+ if (!isFromTrustedHost(t, o))
673
887
  return;
674
888
  const {
675
889
  data: r
@@ -690,12 +904,12 @@ const Ke = (e = {}) => {
690
904
  break;
691
905
  }
692
906
  }
693
- }, Ai = (e, t, n) => {
694
- if (!$)
695
- return R.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
907
+ }, subscribeToEditor = (e, t, n) => {
908
+ if (!isBrowser)
909
+ return logger.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
696
910
  };
697
- Ke();
698
- const o = qe({
911
+ setupBrowserForEditing();
912
+ const o = createEditorListener({
699
913
  callbacks: {
700
914
  contentUpdate: t,
701
915
  animation: () => {
@@ -709,24 +923,24 @@ const Ke = (e = {}) => {
709
923
  return window.addEventListener("message", o), () => {
710
924
  window.removeEventListener("message", o);
711
925
  };
712
- }, cn = "builder.tests", he = (e) => `${cn}.${e}`, dn = ({
926
+ }, BUILDER_STORE_PREFIX = "builder.tests", getContentTestKey = (e) => `${BUILDER_STORE_PREFIX}.${e}`, getContentVariationCookie = ({
713
927
  contentId: e
714
- }) => Oe({
715
- name: he(e),
928
+ }) => getCookie({
929
+ name: getContentTestKey(e),
716
930
  canTrack: !0
717
- }), un = ({
931
+ }), getContentVariationCookieSync = ({
718
932
  contentId: e
719
- }) => Fe({
720
- name: he(e),
933
+ }) => getCookieSync({
934
+ name: getContentTestKey(e),
721
935
  canTrack: !0
722
- }), pn = ({
936
+ }), setContentVariationCookie = ({
723
937
  contentId: e,
724
938
  value: t
725
- }) => De({
726
- name: he(e),
939
+ }) => setCookie({
940
+ name: getContentTestKey(e),
727
941
  value: t,
728
942
  canTrack: !0
729
- }), ze = (e) => L(e.id) && L(e.variations) && Object.keys(e.variations).length > 0, mn = ({
943
+ }), checkIsBuilderContentWithVariations = (e) => checkIsDefined(e.id) && checkIsDefined(e.variations) && Object.keys(e.variations).length > 0, getRandomVariationId = ({
730
944
  id: e,
731
945
  variations: t
732
946
  }) => {
@@ -739,15 +953,15 @@ const Ke = (e = {}) => {
739
953
  return i;
740
954
  }
741
955
  return e;
742
- }, Je = (e) => {
743
- const t = mn(e);
744
- return pn({
956
+ }, getAndSetVariantId = (e) => {
957
+ const t = getRandomVariationId(e);
958
+ return setContentVariationCookie({
745
959
  contentId: e.id,
746
960
  value: t
747
961
  }).catch((n) => {
748
- R.error("could not store A/B test variation: ", n);
962
+ logger.error("could not store A/B test variation: ", n);
749
963
  }), t;
750
- }, Ge = ({
964
+ }, getTestFields = ({
751
965
  item: e,
752
966
  testGroupId: t
753
967
  }) => {
@@ -761,7 +975,7 @@ const Ke = (e = {}) => {
761
975
  testVariationId: n.id,
762
976
  testVariationName: n.name || (n.id === e.id ? "Default" : "")
763
977
  };
764
- }, hn = ({
978
+ }, handleABTestingSync = ({
765
979
  item: e,
766
980
  canTrack: t
767
981
  }) => {
@@ -769,14 +983,14 @@ const Ke = (e = {}) => {
769
983
  return e;
770
984
  if (!e)
771
985
  return;
772
- if (!ze(e))
986
+ if (!checkIsBuilderContentWithVariations(e))
773
987
  return e;
774
- const n = un({
988
+ const n = getContentVariationCookieSync({
775
989
  contentId: e.id
776
- }) || Je({
990
+ }) || getAndSetVariantId({
777
991
  variations: e.variations,
778
992
  id: e.id
779
- }), o = Ge({
993
+ }), o = getTestFields({
780
994
  item: e,
781
995
  testGroupId: n
782
996
  });
@@ -784,18 +998,18 @@ const Ke = (e = {}) => {
784
998
  ...e,
785
999
  ...o
786
1000
  };
787
- }, fn = async ({
1001
+ }, handleABTesting = async ({
788
1002
  item: e,
789
1003
  canTrack: t
790
1004
  }) => {
791
- if (!t || !ze(e))
1005
+ if (!t || !checkIsBuilderContentWithVariations(e))
792
1006
  return e;
793
- const o = await dn({
1007
+ const o = await getContentVariationCookie({
794
1008
  contentId: e.id
795
- }) || Je({
1009
+ }) || getAndSetVariantId({
796
1010
  variations: e.variations,
797
1011
  id: e.id
798
- }), r = Ge({
1012
+ }), r = getTestFields({
799
1013
  item: e,
800
1014
  testGroupId: o
801
1015
  });
@@ -803,38 +1017,38 @@ const Ke = (e = {}) => {
803
1017
  ...e,
804
1018
  ...r
805
1019
  };
806
- }, Y = (e) => L(e) ? e : !0;
807
- function bn() {
1020
+ }, getDefaultCanTrack = (e) => checkIsDefined(e) ? e : !0;
1021
+ function getGlobalThis() {
808
1022
  return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
809
1023
  }
810
- function gn() {
811
- const e = bn().fetch;
1024
+ function getFetch() {
1025
+ const e = getGlobalThis().fetch;
812
1026
  if (typeof e > "u")
813
1027
  throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
814
1028
  For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
815
1029
  return e;
816
1030
  }
817
- const Ye = gn();
818
- function ue(e, t = null, n = ".") {
1031
+ const fetch$1 = getFetch();
1032
+ function flatten(e, t = null, n = ".") {
819
1033
  return Object.keys(e).reduce((o, r) => {
820
1034
  const i = e[r], s = [t, r].filter(Boolean).join(n);
821
1035
  return [typeof i == "object", i !== null, !(Array.isArray(i) && i.length === 0)].every(Boolean) ? {
822
1036
  ...o,
823
- ...ue(i, s, n)
1037
+ ...flatten(i, s, n)
824
1038
  } : {
825
1039
  ...o,
826
1040
  [s]: i
827
1041
  };
828
1042
  }, {});
829
1043
  }
830
- function Qe(e, t, n = {}) {
1044
+ function flattenMongoQuery(e, t, n = {}) {
831
1045
  for (const o in e) {
832
1046
  const r = e[o], i = t ? t + "." + o : o;
833
- r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((s) => s.startsWith("$")) ? Qe(r, i, n) : n[i] = r;
1047
+ r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((s) => s.startsWith("$")) ? flattenMongoQuery(r, i, n) : n[i] = r;
834
1048
  }
835
1049
  return n;
836
1050
  }
837
- const yn = "v3", Ie = (e) => typeof e == "number" && !isNaN(e) && e >= 0, fe = (e) => {
1051
+ const DEFAULT_API_VERSION = "v3", isPositiveNumber = (e) => typeof e == "number" && !isNaN(e) && e >= 0, generateContentUrl = (e) => {
838
1052
  const {
839
1053
  limit: t = 30,
840
1054
  userAttributes: n,
@@ -843,82 +1057,82 @@ const yn = "v3", Ie = (e) => typeof e == "number" && !isNaN(e) && e >= 0, fe = (
843
1057
  apiKey: i,
844
1058
  enrich: s,
845
1059
  locale: l,
846
- apiVersion: a = yn,
847
- fields: u,
848
- omit: h,
849
- offset: d,
850
- cacheSeconds: p,
851
- staleCacheSeconds: k,
852
- sort: v,
853
- includeUnpublished: F
1060
+ apiVersion: a = DEFAULT_API_VERSION,
1061
+ fields: d,
1062
+ omit: p,
1063
+ offset: c,
1064
+ cacheSeconds: u,
1065
+ staleCacheSeconds: f,
1066
+ sort: m,
1067
+ includeUnpublished: b
854
1068
  } = e;
855
1069
  if (!i)
856
1070
  throw new Error("Missing API key");
857
1071
  if (!["v3"].includes(a))
858
1072
  throw new Error(`Invalid apiVersion: expected 'v3', received '${a}'`);
859
- const X = t !== 1, w = new URL(`https://cdn.builder.io/api/${a}/content/${r}`);
860
- if (w.searchParams.set("apiKey", i), w.searchParams.set("limit", String(t)), w.searchParams.set("noTraverse", String(X)), w.searchParams.set("includeRefs", String(!0)), l && w.searchParams.set("locale", l), s && w.searchParams.set("enrich", String(s)), w.searchParams.set("omit", h || "meta.componentsUsed"), u && w.searchParams.set("fields", u), Number.isFinite(d) && d > -1 && w.searchParams.set("offset", String(Math.floor(d))), typeof F == "boolean" && w.searchParams.set("includeUnpublished", String(F)), p && Ie(p) && w.searchParams.set("cacheSeconds", String(p)), k && Ie(k) && w.searchParams.set("staleCacheSeconds", String(k)), v) {
861
- const O = ue({
862
- sort: v
1073
+ const C = t !== 1, g = new URL(`https://cdn.builder.io/api/${a}/content/${r}`);
1074
+ 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", p || "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)), u && isPositiveNumber(u) && g.searchParams.set("cacheSeconds", String(u)), f && isPositiveNumber(f) && g.searchParams.set("staleCacheSeconds", String(f)), m) {
1075
+ const k = flatten({
1076
+ sort: m
863
1077
  });
864
- for (const H in O)
865
- w.searchParams.set(H, JSON.stringify(O[H]));
1078
+ for (const S in k)
1079
+ g.searchParams.set(S, JSON.stringify(k[S]));
866
1080
  }
867
- const at = {
868
- ...jt(),
869
- ...Ae(e.options || {})
870
- }, ve = ue(at);
871
- for (const O in ve)
872
- w.searchParams.set(O, String(ve[O]));
873
- if (n && w.searchParams.set("userAttributes", JSON.stringify(n)), o) {
874
- const O = Qe({
1081
+ const I = {
1082
+ ...getBuilderSearchParamsFromWindow(),
1083
+ ...normalizeSearchParams(e.options || {})
1084
+ }, T = flatten(I);
1085
+ for (const k in T)
1086
+ g.searchParams.set(k, String(T[k]));
1087
+ if (n && g.searchParams.set("userAttributes", JSON.stringify(n)), o) {
1088
+ const k = flattenMongoQuery({
875
1089
  query: o
876
1090
  });
877
- for (const H in O)
878
- w.searchParams.set(H, JSON.stringify(O[H]));
1091
+ for (const S in k)
1092
+ g.searchParams.set(S, JSON.stringify(k[S]));
879
1093
  }
880
- return w;
881
- }, kn = (e) => "results" in e;
882
- async function be(e) {
883
- const t = await Sn({
1094
+ return g;
1095
+ }, checkContentHasResults = (e) => "results" in e;
1096
+ async function fetchOneEntry(e) {
1097
+ const t = await fetchEntries({
884
1098
  ...e,
885
1099
  limit: 1
886
1100
  });
887
1101
  return t && t[0] || null;
888
1102
  }
889
- const vn = async (e) => {
890
- const t = fe(e);
891
- return await (await (e.fetch ?? Ye)(t.href, e.fetchOptions)).json();
892
- }, Cn = async (e, t, n = fe(e)) => {
893
- const o = Y(e.canTrack);
894
- if (n.search.includes("preview="), !o || !($() || x === "reactNative"))
1103
+ const _fetchContent = async (e) => {
1104
+ const t = generateContentUrl(e);
1105
+ return await (await (e.fetch ?? fetch$1)(t.href, e.fetchOptions)).json();
1106
+ }, _processContentResult = async (e, t, n = generateContentUrl(e)) => {
1107
+ const o = getDefaultCanTrack(e.canTrack);
1108
+ if (n.search.includes("preview="), !o || !(isBrowser() || TARGET === "reactNative"))
895
1109
  return t.results;
896
1110
  try {
897
1111
  const r = [];
898
1112
  for (const i of t.results)
899
- r.push(await fn({
1113
+ r.push(await handleABTesting({
900
1114
  item: i,
901
1115
  canTrack: o
902
1116
  }));
903
1117
  t.results = r;
904
1118
  } catch (r) {
905
- R.error("Could not process A/B tests. ", r);
1119
+ logger.error("Could not process A/B tests. ", r);
906
1120
  }
907
1121
  return t.results;
908
1122
  };
909
- async function Sn(e) {
1123
+ async function fetchEntries(e) {
910
1124
  try {
911
- const t = fe(e), n = await vn(e);
912
- return kn(n) ? Cn(e, n) : (R.error("Error fetching data. ", {
1125
+ const t = generateContentUrl(e), n = await _fetchContent(e);
1126
+ return checkContentHasResults(n) ? _processContentResult(e, n) : (logger.error("Error fetching data. ", {
913
1127
  url: t,
914
1128
  content: n,
915
1129
  options: e
916
1130
  }), null);
917
1131
  } catch (t) {
918
- return R.error("Error fetching data. ", t), null;
1132
+ return logger.error("Error fetching data. ", t), null;
919
1133
  }
920
1134
  }
921
- const Vi = async (e) => {
1135
+ const fetchBuilderProps = async (e) => {
922
1136
  var o, r, i;
923
1137
  const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((r = e.userAttributes) == null ? void 0 : r.urlPath), n = {
924
1138
  ...e,
@@ -930,27 +1144,27 @@ const Vi = async (e) => {
930
1144
  urlPath: t
931
1145
  } : {}
932
1146
  },
933
- options: Ne(e.searchParams || ((i = e.url) == null ? void 0 : i.searchParams) || e.options)
1147
+ options: getBuilderSearchParams(e.searchParams || ((i = e.url) == null ? void 0 : i.searchParams) || e.options)
934
1148
  };
935
1149
  return {
936
1150
  apiKey: n.apiKey,
937
1151
  model: n.model,
938
- content: await be(n)
1152
+ content: await fetchOneEntry(n)
939
1153
  };
940
- }, ge = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
941
- function Tn(e, t, n = {}) {
1154
+ }, camelToKebabCase = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
1155
+ function throttle(e, t, n = {}) {
942
1156
  let o, r, i, s = null, l = 0;
943
1157
  const a = function() {
944
1158
  l = n.leading === !1 ? 0 : Date.now(), s = null, i = e.apply(o, r), s || (o = r = null);
945
1159
  };
946
1160
  return function() {
947
- const u = Date.now();
948
- !l && n.leading === !1 && (l = u);
949
- const h = t - (u - l);
950
- return o = this, r = arguments, h <= 0 || h > t ? (s && (clearTimeout(s), s = null), l = u, i = e.apply(o, r), s || (o = r = null)) : !s && n.trailing !== !1 && (s = setTimeout(a, h)), i;
1161
+ const d = Date.now();
1162
+ !l && n.leading === !1 && (l = d);
1163
+ const p = t - (d - l);
1164
+ return o = this, r = arguments, p <= 0 || p > t ? (s && (clearTimeout(s), s = null), l = d, i = e.apply(o, r), s || (o = r = null)) : !s && n.trailing !== !1 && (s = setTimeout(a, p)), i;
951
1165
  };
952
1166
  }
953
- function q(e, ...t) {
1167
+ function assign(e, ...t) {
954
1168
  const n = Object(e);
955
1169
  for (let o = 1; o < arguments.length; o++) {
956
1170
  const r = arguments[o];
@@ -960,118 +1174,118 @@ function q(e, ...t) {
960
1174
  }
961
1175
  return n;
962
1176
  }
963
- function wn(e) {
1177
+ function bindAnimations(e) {
964
1178
  for (const t of e)
965
1179
  switch (t.trigger) {
966
1180
  case "pageLoad":
967
- _e(t);
1181
+ triggerAnimation(t);
968
1182
  break;
969
1183
  case "scrollInView":
970
- $n(t);
1184
+ bindScrollInViewAnimation(t);
971
1185
  break;
972
1186
  }
973
1187
  }
974
- function Xe(e) {
1188
+ function warnElementNotPresent(e) {
975
1189
  console.warn(`Cannot animate element: element with ID ${e} not found!`);
976
1190
  }
977
- function Ze(e, t) {
978
- const n = In(e), o = getComputedStyle(t), r = e.steps[0].styles, i = e.steps[e.steps.length - 1].styles, s = [r, i];
1191
+ function augmentAnimation(e, t) {
1192
+ const n = getAllStylesUsed(e), o = getComputedStyle(t), r = e.steps[0].styles, i = e.steps[e.steps.length - 1].styles, s = [r, i];
979
1193
  for (const l of s)
980
1194
  for (const a of n)
981
1195
  a in l || (l[a] = o[a]);
982
1196
  }
983
- function In(e) {
1197
+ function getAllStylesUsed(e) {
984
1198
  const t = [];
985
1199
  for (const n of e.steps)
986
1200
  for (const o in n.styles)
987
1201
  t.indexOf(o) === -1 && t.push(o);
988
1202
  return t;
989
1203
  }
990
- function _e(e) {
1204
+ function triggerAnimation(e) {
991
1205
  const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
992
1206
  if (!t.length) {
993
- Xe(e.elementId || e.id || "");
1207
+ warnElementNotPresent(e.elementId || e.id || "");
994
1208
  return;
995
1209
  }
996
1210
  Array.from(t).forEach((n) => {
997
- Ze(e, n), n.style.transition = "none", n.style.transitionDelay = "0", q(n.style, e.steps[0].styles), setTimeout(() => {
998
- n.style.transition = `all ${e.duration}s ${ge(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), q(n.style, e.steps[1].styles), setTimeout(() => {
1211
+ augmentAnimation(e, n), n.style.transition = "none", n.style.transitionDelay = "0", assign(n.style, e.steps[0].styles), setTimeout(() => {
1212
+ n.style.transition = `all ${e.duration}s ${camelToKebabCase(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), assign(n.style, e.steps[1].styles), setTimeout(() => {
999
1213
  n.style.transition = "", n.style.transitionDelay = "";
1000
1214
  }, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
1001
1215
  });
1002
1216
  });
1003
1217
  }
1004
- function $n(e) {
1218
+ function bindScrollInViewAnimation(e) {
1005
1219
  const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
1006
1220
  if (!t.length) {
1007
- Xe(e.elementId || e.id || "");
1221
+ warnElementNotPresent(e.elementId || e.id || "");
1008
1222
  return;
1009
1223
  }
1010
1224
  Array.from(t).forEach((n) => {
1011
- Ze(e, n);
1225
+ augmentAnimation(e, n);
1012
1226
  let o = !1, r = !1;
1013
1227
  function i() {
1014
1228
  !o && l(n) ? (o = !0, r = !0, setTimeout(() => {
1015
- q(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", s), setTimeout(() => {
1229
+ assign(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", s), setTimeout(() => {
1016
1230
  r = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
1017
1231
  }, (e.duration + (e.delay || 0)) * 1e3 + 100);
1018
- })) : e.repeat && o && !r && !l(n) && (o = !1, q(n.style, e.steps[0].styles));
1232
+ })) : e.repeat && o && !r && !l(n) && (o = !1, assign(n.style, e.steps[0].styles));
1019
1233
  }
1020
- const s = Tn(i, 200, {
1234
+ const s = throttle(i, 200, {
1021
1235
  leading: !1
1022
1236
  });
1023
- function l(h) {
1024
- const d = h.getBoundingClientRect(), p = window.innerHeight, v = (e.thresholdPercent || 0) / 100 * p;
1025
- return d.bottom > v && d.top < p - v;
1237
+ function l(p) {
1238
+ const c = p.getBoundingClientRect(), u = window.innerHeight, m = (e.thresholdPercent || 0) / 100 * u;
1239
+ return c.bottom > m && c.top < u - m;
1026
1240
  }
1027
1241
  const a = e.steps[0].styles;
1028
- function u() {
1029
- q(n.style, a);
1242
+ function d() {
1243
+ assign(n.style, a);
1030
1244
  }
1031
- u(), setTimeout(() => {
1032
- n.style.transition = `all ${e.duration}s ${ge(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
1245
+ d(), setTimeout(() => {
1246
+ n.style.transition = `all ${e.duration}s ${camelToKebabCase(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
1033
1247
  }), document.addEventListener("scroll", s, {
1034
1248
  capture: !0,
1035
1249
  passive: !0
1036
1250
  }), i();
1037
1251
  });
1038
1252
  }
1039
- const et = (e) => Object.entries(e).map(([n, o]) => {
1253
+ const convertStyleMapToCSSArray = (e) => Object.entries(e).map(([n, o]) => {
1040
1254
  if (typeof o == "string")
1041
- return `${ge(n)}: ${o};`;
1042
- }).filter(L), Rn = (e) => et(e).join(`
1043
- `), Wi = ({
1255
+ return `${camelToKebabCase(n)}: ${o};`;
1256
+ }).filter(checkIsDefined), convertStyleMapToCSS = (e) => convertStyleMapToCSSArray(e).join(`
1257
+ `), createCssClass = ({
1044
1258
  mediaQuery: e,
1045
1259
  className: t,
1046
1260
  styles: n
1047
1261
  }) => {
1048
1262
  const o = `.${t} {
1049
- ${Rn(n)}
1263
+ ${convertStyleMapToCSS(n)}
1050
1264
  }`;
1051
1265
  return e ? `${e} {
1052
1266
  ${o}
1053
1267
  }` : o;
1054
1268
  };
1055
- function En({
1269
+ function transformStyleProperty({
1056
1270
  style: e
1057
1271
  }) {
1058
1272
  return e;
1059
1273
  }
1060
- const Ni = ({
1274
+ const getStyle = ({
1061
1275
  block: e,
1062
1276
  context: t
1063
- }) => tt(En({
1277
+ }) => mapStyleObjToStrIfNeeded(transformStyleProperty({
1064
1278
  style: e.style || {},
1065
1279
  context: t,
1066
1280
  block: e
1067
1281
  }));
1068
- function tt(e) {
1069
- switch (x) {
1282
+ function mapStyleObjToStrIfNeeded(e) {
1283
+ switch (TARGET) {
1070
1284
  case "svelte":
1071
1285
  case "vue":
1072
1286
  case "solid":
1073
1287
  case "angular":
1074
- return et(e).join(" ");
1288
+ return convertStyleMapToCSSArray(e).join(" ");
1075
1289
  case "qwik":
1076
1290
  case "reactNative":
1077
1291
  case "react":
@@ -1079,7 +1293,7 @@ function tt(e) {
1079
1293
  return e;
1080
1294
  }
1081
1295
  }
1082
- const Bn = ({
1296
+ const getComponent = ({
1083
1297
  block: e,
1084
1298
  registeredComponents: t
1085
1299
  }) => {
@@ -1093,7 +1307,7 @@ const Bn = ({
1093
1307
  console.warn(`
1094
1308
  Could not find a registered component named "${n}".
1095
1309
  If you registered it, is the file that registered it imported by the file that needs to render it?`);
1096
- }, Pn = ({
1310
+ }, getRepeatItemData = ({
1097
1311
  block: e,
1098
1312
  context: t
1099
1313
  }) => {
@@ -1103,7 +1317,7 @@ const Bn = ({
1103
1317
  } = e;
1104
1318
  if (!(n != null && n.collection))
1105
1319
  return;
1106
- const r = G({
1320
+ const r = evaluate({
1107
1321
  code: n.collection,
1108
1322
  localState: t.localState,
1109
1323
  rootState: t.rootState,
@@ -1114,72 +1328,72 @@ const Bn = ({
1114
1328
  if (!Array.isArray(r))
1115
1329
  return;
1116
1330
  const i = n.collection.split(".").pop(), s = n.itemName || (i ? i + "Item" : "item");
1117
- return r.map((a, u) => ({
1331
+ return r.map((a, d) => ({
1118
1332
  context: {
1119
1333
  ...t,
1120
1334
  localState: {
1121
1335
  ...t.localState,
1122
- $index: u,
1336
+ $index: d,
1123
1337
  $item: a,
1124
1338
  [s]: a,
1125
- [`$${s}Index`]: u
1339
+ [`$${s}Index`]: d
1126
1340
  }
1127
1341
  },
1128
1342
  block: o
1129
1343
  }));
1130
- }, xn = (e, t) => {
1344
+ }, provideLinkComponent = (e, t) => {
1131
1345
  var n;
1132
1346
  return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderLinkComponent ? {
1133
1347
  builderLinkComponent: t
1134
1348
  } : {};
1135
- }, An = (e, t) => {
1349
+ }, provideRegisteredComponents = (e, t) => {
1136
1350
  var n;
1137
1351
  return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderComponents ? {
1138
1352
  builderComponents: t
1139
1353
  } : {};
1140
- }, Vn = (e, t) => {
1354
+ }, provideBuilderBlock = (e, t) => {
1141
1355
  var n;
1142
1356
  return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderBlock ? {
1143
1357
  builderBlock: t
1144
1358
  } : {};
1145
- }, Wn = (e, t) => {
1359
+ }, provideBuilderContext = (e, t) => {
1146
1360
  var n;
1147
1361
  return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderContext ? {
1148
1362
  builderContext: t
1149
1363
  } : {};
1150
- }, Nn = () => Promise.resolve().then(() => Yn).then((e) => e.default).catch((e) => {
1364
+ }, DynamicDiv$1 = () => Promise.resolve().then(() => dynamicDiv).then((e) => e.default).catch((e) => {
1151
1365
  throw console.error(
1152
1366
  "Error while attempting to dynamically import component DynamicDiv at ../dynamic-div.vue",
1153
1367
  e
1154
1368
  ), e;
1155
- }), Fn = () => import("./block-styles-gLB-jSXN.js").then((e) => e.default).catch((e) => {
1369
+ }), BlockStyles = () => import("./block-styles-E0MOJgK4.js").then((e) => e.default).catch((e) => {
1156
1370
  throw console.error(
1157
1371
  "Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
1158
1372
  e
1159
1373
  ), e;
1160
- }), On = () => import("./block-wrapper-frfIIST_.js").then((e) => e.default).catch((e) => {
1374
+ }), BlockWrapper = () => import("./block-wrapper-cHgl5RuV.js").then((e) => e.default).catch((e) => {
1161
1375
  throw console.error(
1162
1376
  "Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
1163
1377
  e
1164
1378
  ), e;
1165
- }), Dn = () => import("./component-ref-IbarjSnq.js").then((e) => e.default).catch((e) => {
1379
+ }), ComponentRef = () => import("./component-ref-gqNpKniv.js").then((e) => e.default).catch((e) => {
1166
1380
  throw console.error(
1167
1381
  "Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
1168
1382
  e
1169
1383
  ), e;
1170
- }), Ln = () => import("./repeated-block-Z-_chLeZ.js").then((e) => e.default).catch((e) => {
1384
+ }), RepeatedBlock = () => import("./repeated-block-WqJu5DET.js").then((e) => e.default).catch((e) => {
1171
1385
  throw console.error(
1172
1386
  "Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
1173
1387
  e
1174
1388
  ), e;
1175
- }), Un = f({
1389
+ }), _sfc_main$r = defineComponent({
1176
1390
  name: "block",
1177
1391
  components: {
1178
- BlockStyles: j(Fn),
1179
- RepeatedBlock: j(Ln),
1180
- ComponentRef: j(Dn),
1181
- BlockWrapper: j(On),
1182
- DynamicDiv: j(Nn)
1392
+ BlockStyles: defineAsyncComponent(BlockStyles),
1393
+ RepeatedBlock: defineAsyncComponent(RepeatedBlock),
1394
+ ComponentRef: defineAsyncComponent(ComponentRef),
1395
+ BlockWrapper: defineAsyncComponent(BlockWrapper),
1396
+ DynamicDiv: defineAsyncComponent(DynamicDiv$1)
1183
1397
  },
1184
1398
  props: ["block", "context", "registeredComponents", "linkComponent"],
1185
1399
  data() {
@@ -1192,7 +1406,7 @@ const Bn = ({
1192
1406
  },
1193
1407
  mounted() {
1194
1408
  const e = this.processedBlock.id, t = this.processedBlock.animations;
1195
- t && e && wn(
1409
+ t && e && bindAnimations(
1196
1410
  t.map((n) => ({
1197
1411
  ...n,
1198
1412
  elementId: e
@@ -1203,14 +1417,14 @@ const Bn = ({
1203
1417
  },
1204
1418
  computed: {
1205
1419
  repeatItem() {
1206
- return Pn({
1420
+ return getRepeatItemData({
1207
1421
  block: this.block,
1208
1422
  context: this.context
1209
1423
  });
1210
1424
  },
1211
1425
  processedBlock() {
1212
1426
  var t;
1213
- return (t = this.block.repeat) != null && t.collection ? this.block : Ot({
1427
+ return (t = this.block.repeat) != null && t.collection ? this.block : getProcessedBlock({
1214
1428
  block: this.block,
1215
1429
  localState: this.context.localState,
1216
1430
  rootState: this.context.rootState,
@@ -1220,7 +1434,7 @@ const Bn = ({
1220
1434
  });
1221
1435
  },
1222
1436
  blockComponent() {
1223
- return Bn({
1437
+ return getComponent({
1224
1438
  block: this.processedBlock,
1225
1439
  registeredComponents: this.registeredComponents
1226
1440
  });
@@ -1246,11 +1460,11 @@ const Bn = ({
1246
1460
  blockChildren: this.processedBlock.children ?? [],
1247
1461
  componentRef: (e = this.blockComponent) == null ? void 0 : e.component,
1248
1462
  componentOptions: {
1249
- ...Rt(this.processedBlock),
1250
- ...Vn(this.blockComponent, this.processedBlock),
1251
- ...Wn(this.blockComponent, this.context),
1252
- ...xn(this.blockComponent, this.linkComponent),
1253
- ...An(
1463
+ ...getBlockComponentOptions(this.processedBlock),
1464
+ ...provideBuilderBlock(this.blockComponent, this.processedBlock),
1465
+ ...provideBuilderContext(this.blockComponent, this.context),
1466
+ ...provideLinkComponent(this.blockComponent, this.linkComponent),
1467
+ ...provideRegisteredComponents(
1254
1468
  this.blockComponent,
1255
1469
  this.registeredComponents
1256
1470
  )
@@ -1260,27 +1474,27 @@ const Bn = ({
1260
1474
  registeredComponents: this.registeredComponents,
1261
1475
  builderBlock: this.processedBlock,
1262
1476
  includeBlockProps: ((t = this.blockComponent) == null ? void 0 : t.noWrap) === !0,
1263
- isInteractive: !((n = this.blockComponent) != null && n.isRSC && x === "rsc")
1477
+ isInteractive: !((n = this.blockComponent) != null && n.isRSC && TARGET === "rsc")
1264
1478
  };
1265
1479
  }
1266
1480
  }
1267
1481
  });
1268
- function Mn(e, t, n, o, r, i) {
1269
- var d;
1270
- const s = y("BlockStyles"), l = y("ComponentRef"), a = y("Block", !0), u = y("BlockWrapper"), h = y("RepeatedBlock");
1271
- return e.canShowBlock ? (c(), m(T, { key: 0 }, [
1272
- I(s, {
1482
+ function _sfc_render$p(e, t, n, o, r, i) {
1483
+ var c;
1484
+ const s = resolveComponent("BlockStyles"), l = resolveComponent("ComponentRef"), a = resolveComponent("Block", !0), d = resolveComponent("BlockWrapper"), p = resolveComponent("RepeatedBlock");
1485
+ return e.canShowBlock ? (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
1486
+ createVNode(s, {
1273
1487
  block: e.processedBlock,
1274
1488
  context: e.context
1275
1489
  }, null, 8, ["block", "context"]),
1276
- (d = e.blockComponent) != null && d.noWrap ? (c(), m(T, { key: 1 }, [
1277
- e.repeatItem ? (c(!0), m(T, { key: 1 }, A(e.repeatItem, (p, k) => (c(), g(h, {
1278
- key: k,
1279
- repeatContext: p.context,
1280
- block: p.block,
1490
+ (c = e.blockComponent) != null && c.noWrap ? (openBlock(), createElementBlock(Fragment$1, { key: 1 }, [
1491
+ e.repeatItem ? (openBlock(!0), createElementBlock(Fragment$1, { key: 1 }, renderList(e.repeatItem, (u, f) => (openBlock(), createBlock(p, {
1492
+ key: f,
1493
+ repeatContext: u.context,
1494
+ block: u.block,
1281
1495
  registeredComponents: e.registeredComponents,
1282
1496
  linkComponent: e.linkComponent
1283
- }, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (c(), g(l, {
1497
+ }, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (openBlock(), createBlock(l, {
1284
1498
  key: 0,
1285
1499
  componentRef: e.componentRefProps.componentRef,
1286
1500
  componentOptions: e.componentRefProps.componentOptions,
@@ -1292,21 +1506,21 @@ function Mn(e, t, n, o, r, i) {
1292
1506
  includeBlockProps: e.componentRefProps.includeBlockProps,
1293
1507
  isInteractive: e.componentRefProps.isInteractive
1294
1508
  }, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "linkComponent", "builderBlock", "includeBlockProps", "isInteractive"]))
1295
- ], 64)) : (c(), m(T, { key: 0 }, [
1296
- e.repeatItem ? (c(!0), m(T, { key: 1 }, A(e.repeatItem, (p, k) => (c(), g(h, {
1297
- key: k,
1298
- repeatContext: p.context,
1299
- block: p.block,
1509
+ ], 64)) : (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
1510
+ e.repeatItem ? (openBlock(!0), createElementBlock(Fragment$1, { key: 1 }, renderList(e.repeatItem, (u, f) => (openBlock(), createBlock(p, {
1511
+ key: f,
1512
+ repeatContext: u.context,
1513
+ block: u.block,
1300
1514
  registeredComponents: e.registeredComponents,
1301
1515
  linkComponent: e.linkComponent
1302
- }, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (c(), g(u, {
1516
+ }, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (openBlock(), createBlock(d, {
1303
1517
  key: 0,
1304
1518
  Wrapper: e.Tag,
1305
1519
  block: e.processedBlock,
1306
1520
  context: e.context
1307
1521
  }, {
1308
- default: N(() => [
1309
- I(l, {
1522
+ default: withCtx(() => [
1523
+ createVNode(l, {
1310
1524
  componentRef: e.componentRefProps.componentRef,
1311
1525
  componentOptions: e.componentRefProps.componentOptions,
1312
1526
  blockChildren: e.componentRefProps.blockChildren,
@@ -1317,9 +1531,9 @@ function Mn(e, t, n, o, r, i) {
1317
1531
  includeBlockProps: e.componentRefProps.includeBlockProps,
1318
1532
  isInteractive: e.componentRefProps.isInteractive
1319
1533
  }, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "linkComponent", "builderBlock", "includeBlockProps", "isInteractive"]),
1320
- (c(!0), m(T, null, A(e.childrenWithoutParentComponent, (p, k) => (c(), g(a, {
1321
- key: p.id,
1322
- block: p,
1534
+ (openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.childrenWithoutParentComponent, (u, f) => (openBlock(), createBlock(a, {
1535
+ key: u.id,
1536
+ block: u,
1323
1537
  registeredComponents: e.registeredComponents,
1324
1538
  linkComponent: e.linkComponent,
1325
1539
  context: e.context
@@ -1328,12 +1542,12 @@ function Mn(e, t, n, o, r, i) {
1328
1542
  _: 1
1329
1543
  }, 8, ["Wrapper", "block", "context"]))
1330
1544
  ], 64))
1331
- ], 64)) : C("", !0);
1545
+ ], 64)) : createCommentVNode("", !0);
1332
1546
  }
1333
- const ye = /* @__PURE__ */ b(Un, [["render", Mn]]), Fi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1547
+ const Block = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$p]]), block = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1334
1548
  __proto__: null,
1335
- default: ye
1336
- }, Symbol.toStringTag, { value: "Module" })), Hn = f({
1549
+ default: Block
1550
+ }, Symbol.toStringTag, { value: "Module" })), _sfc_main$q = defineComponent({
1337
1551
  name: "builder-blocks-wrapper",
1338
1552
  props: [
1339
1553
  "blocks",
@@ -1354,7 +1568,7 @@ const ye = /* @__PURE__ */ b(Un, [["render", Mn]]), Fi = /* @__PURE__ */ Object.
1354
1568
  methods: {
1355
1569
  onClick() {
1356
1570
  var e, t;
1357
- E() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
1571
+ isEditing() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
1358
1572
  {
1359
1573
  type: "builder.clickEmptyBlocks",
1360
1574
  data: {
@@ -1367,7 +1581,7 @@ const ye = /* @__PURE__ */ b(Un, [["render", Mn]]), Fi = /* @__PURE__ */ Object.
1367
1581
  },
1368
1582
  onMouseEnter() {
1369
1583
  var e, t;
1370
- E() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
1584
+ isEditing() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
1371
1585
  {
1372
1586
  type: "builder.hoverEmptyBlocks",
1373
1587
  data: {
@@ -1380,8 +1594,8 @@ const ye = /* @__PURE__ */ b(Un, [["render", Mn]]), Fi = /* @__PURE__ */ Object.
1380
1594
  }
1381
1595
  }
1382
1596
  });
1383
- function jn(e, t, n, o, r, i) {
1384
- return c(), g(K(e.BlocksWrapper), S({
1597
+ function _sfc_render$o(e, t, n, o, r, i) {
1598
+ return openBlock(), createBlock(resolveDynamicComponent(e.BlocksWrapper), mergeProps({
1385
1599
  ref: "blocksWrapperRef",
1386
1600
  class: e.className + " component-178o76acnws",
1387
1601
  "builder-path": e.path,
@@ -1391,15 +1605,15 @@ function jn(e, t, n, o, r, i) {
1391
1605
  onMouseEnter: (s) => e.onMouseEnter(),
1392
1606
  onKeyPress: (s) => e.onClick()
1393
1607
  }, { ...e.BlocksWrapperProps }), {
1394
- default: N(() => [
1395
- P(e.$slots, "default", {}, void 0, !0)
1608
+ default: withCtx(() => [
1609
+ renderSlot(e.$slots, "default", {}, void 0, !0)
1396
1610
  ]),
1397
1611
  _: 3
1398
1612
  }, 16, ["class", "builder-path", "builder-parent-id", "style", "onClick", "onMouseEnter", "onKeyPress"]);
1399
1613
  }
1400
- const Kn = /* @__PURE__ */ b(Hn, [["render", jn], ["__scopeId", "data-v-824f09a8"]]), qn = f({
1614
+ const BlocksWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$o], ["__scopeId", "data-v-824f09a8"]]), _sfc_main$p = defineComponent({
1401
1615
  name: "builder-blocks",
1402
- components: { BlocksWrapper: Kn, Block: ye },
1616
+ components: { BlocksWrapper, Block },
1403
1617
  props: [
1404
1618
  "blocks",
1405
1619
  "parent",
@@ -1410,48 +1624,48 @@ const Kn = /* @__PURE__ */ b(Hn, [["render", jn], ["__scopeId", "data-v-824f09a8
1410
1624
  "registeredComponents"
1411
1625
  ],
1412
1626
  inject: {
1413
- builderContext: le.key,
1414
- componentsContext: Ve.key
1627
+ builderContext: BuilderContext.key,
1628
+ componentsContext: ComponentsContext.key
1415
1629
  }
1416
1630
  });
1417
- function zn(e, t, n, o, r, i) {
1418
- var a, u;
1419
- const s = y("Block"), l = y("BlocksWrapper");
1420
- return c(), g(l, {
1631
+ function _sfc_render$n(e, t, n, o, r, i) {
1632
+ var a, d;
1633
+ const s = resolveComponent("Block"), l = resolveComponent("BlocksWrapper");
1634
+ return openBlock(), createBlock(l, {
1421
1635
  blocks: e.blocks,
1422
1636
  parent: e.parent,
1423
1637
  path: e.path,
1424
1638
  styleProp: e.styleProp,
1425
1639
  BlocksWrapper: ((a = e.context) == null ? void 0 : a.BlocksWrapper) || e.builderContext.BlocksWrapper,
1426
- BlocksWrapperProps: ((u = e.context) == null ? void 0 : u.BlocksWrapperProps) || e.builderContext.BlocksWrapperProps
1640
+ BlocksWrapperProps: ((d = e.context) == null ? void 0 : d.BlocksWrapperProps) || e.builderContext.BlocksWrapperProps
1427
1641
  }, {
1428
- default: N(() => [
1429
- e.blocks ? (c(!0), m(T, { key: 0 }, A(e.blocks, (h, d) => (c(), g(s, {
1430
- key: h.id,
1431
- block: h,
1642
+ default: withCtx(() => [
1643
+ e.blocks ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList(e.blocks, (p, c) => (openBlock(), createBlock(s, {
1644
+ key: p.id,
1645
+ block: p,
1432
1646
  linkComponent: e.linkComponent,
1433
1647
  context: e.context || e.builderContext,
1434
1648
  registeredComponents: e.registeredComponents || e.componentsContext.registeredComponents
1435
- }, null, 8, ["block", "linkComponent", "context", "registeredComponents"]))), 128)) : C("", !0)
1649
+ }, null, 8, ["block", "linkComponent", "context", "registeredComponents"]))), 128)) : createCommentVNode("", !0)
1436
1650
  ]),
1437
1651
  _: 1
1438
1652
  }, 8, ["blocks", "parent", "path", "styleProp", "BlocksWrapper", "BlocksWrapperProps"]);
1439
1653
  }
1440
- const M = /* @__PURE__ */ b(qn, [["render", zn]]), Jn = f({
1654
+ const Blocks = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$n]]), _sfc_main$o = defineComponent({
1441
1655
  name: "dynamic-div",
1442
1656
  props: []
1443
1657
  });
1444
- function Gn(e, t, n, o, r, i) {
1445
- return c(), m("div", null, [
1446
- P(e.$slots, "default")
1658
+ function _sfc_render$m(e, t, n, o, r, i) {
1659
+ return openBlock(), createElementBlock("div", null, [
1660
+ renderSlot(e.$slots, "default")
1447
1661
  ]);
1448
1662
  }
1449
- const Q = /* @__PURE__ */ b(Jn, [["render", Gn]]), Yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1663
+ const DynamicDiv = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$m]]), dynamicDiv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1450
1664
  __proto__: null,
1451
- default: Q
1452
- }, Symbol.toStringTag, { value: "Module" })), ke = f({
1665
+ default: DynamicDiv
1666
+ }, Symbol.toStringTag, { value: "Module" })), _sfc_main$n = defineComponent({
1453
1667
  render() {
1454
- return Pe("style", {
1668
+ return h("style", {
1455
1669
  innerHTML: this.styles,
1456
1670
  "data-id": this.id,
1457
1671
  nonce: this.nonce
@@ -1459,7 +1673,7 @@ const Q = /* @__PURE__ */ b(Jn, [["render", Gn]]), Yn = /* @__PURE__ */ Object.f
1459
1673
  },
1460
1674
  name: "inlined-styles",
1461
1675
  props: ["styles", "id", "nonce"]
1462
- }), nt = {
1676
+ }), SIZES = {
1463
1677
  small: {
1464
1678
  min: 320,
1465
1679
  default: 321,
@@ -1475,11 +1689,11 @@ const Q = /* @__PURE__ */ b(Jn, [["render", Gn]]), Yn = /* @__PURE__ */ Object.f
1475
1689
  default: 991,
1476
1690
  max: 1200
1477
1691
  }
1478
- }, Oi = (e, t = nt) => `@media (max-width: ${t[e].max}px)`, Qn = ({
1692
+ }, getMaxWidthQueryForSize = (e, t = SIZES) => `@media (max-width: ${t[e].max}px)`, getSizesForBreakpoints = ({
1479
1693
  small: e,
1480
1694
  medium: t
1481
1695
  }) => {
1482
- const n = pe(nt);
1696
+ const n = fastClone(SIZES);
1483
1697
  if (!e || !t)
1484
1698
  return n;
1485
1699
  const o = Math.floor(e / 2);
@@ -1501,13 +1715,13 @@ const Q = /* @__PURE__ */ b(Jn, [["render", Gn]]), Yn = /* @__PURE__ */ Object.f
1501
1715
  min: i,
1502
1716
  default: i + 1
1503
1717
  }, n;
1504
- }, Xn = (e) => `builder-columns ${e}-breakpoints`, Zn = f({
1718
+ }, getColumnsClass = (e) => `builder-columns ${e}-breakpoints`, _sfc_main$m = defineComponent({
1505
1719
  name: "builder-columns",
1506
1720
  components: {
1507
- InlinedStyles: ke,
1508
- DynamicRenderer: me,
1509
- Blocks: M,
1510
- DynamicDiv: Q
1721
+ InlinedStyles: _sfc_main$n,
1722
+ DynamicRenderer,
1723
+ Blocks,
1724
+ DynamicDiv
1511
1725
  },
1512
1726
  props: [
1513
1727
  "space",
@@ -1525,8 +1739,8 @@ const Q = /* @__PURE__ */ b(Jn, [["render", Gn]]), Yn = /* @__PURE__ */ Object.f
1525
1739
  cols: this.columns || [],
1526
1740
  stackAt: this.stackColumnsAt || "tablet",
1527
1741
  flexDir: this.stackColumnsAt === "never" ? "row" : this.reverseColumnsWhenStacked ? "column-reverse" : "column",
1528
- TARGET: x,
1529
- getColumnsClass: Xn
1742
+ TARGET,
1743
+ getColumnsClass
1530
1744
  };
1531
1745
  },
1532
1746
  methods: {
@@ -1592,7 +1806,7 @@ const Q = /* @__PURE__ */ b(Jn, [["render", Gn]]), Yn = /* @__PURE__ */ Object.f
1592
1806
  },
1593
1807
  getWidthForBreakpointSize(e) {
1594
1808
  var n, o;
1595
- return Qn(
1809
+ return getSizesForBreakpoints(
1596
1810
  ((o = (n = this.builderContext.content) == null ? void 0 : n.meta) == null ? void 0 : o.breakpoints) || {}
1597
1811
  )[e].max;
1598
1812
  },
@@ -1629,34 +1843,34 @@ const Q = /* @__PURE__ */ b(Jn, [["render", Gn]]), Yn = /* @__PURE__ */ Object.f
1629
1843
  ...e.link ? {
1630
1844
  href: e.link
1631
1845
  } : {},
1632
- [_()]: "builder-column",
1633
- style: tt(this.columnCssVars(t))
1846
+ [getClassPropName()]: "builder-column",
1847
+ style: mapStyleObjToStrIfNeeded(this.columnCssVars(t))
1634
1848
  };
1635
1849
  }
1636
1850
  }
1637
1851
  });
1638
- function _n(e, t, n, o, r, i) {
1639
- var u;
1640
- const s = y("InlinedStyles"), l = y("Blocks"), a = y("DynamicRenderer");
1641
- return c(), m("div", S({
1642
- class: e.getColumnsClass((u = e.builderBlock) == null ? void 0 : u.id) + " div-2brhoa1k8gd",
1852
+ function _sfc_render$l(e, t, n, o, r, i) {
1853
+ var d;
1854
+ const s = resolveComponent("InlinedStyles"), l = resolveComponent("Blocks"), a = resolveComponent("DynamicRenderer");
1855
+ return openBlock(), createElementBlock("div", mergeProps({
1856
+ class: e.getColumnsClass((d = e.builderBlock) == null ? void 0 : d.id) + " div-2brhoa1k8gd",
1643
1857
  style: e.columnsCssVars()
1644
1858
  }, {}), [
1645
- e.TARGET !== "reactNative" ? (c(), g(s, {
1859
+ e.TARGET !== "reactNative" ? (openBlock(), createBlock(s, {
1646
1860
  key: 0,
1647
1861
  id: "builderio-columns",
1648
1862
  styles: e.columnsStyles(),
1649
1863
  nonce: e.builderContext.nonce
1650
- }, null, 8, ["styles", "nonce"])) : C("", !0),
1651
- (c(!0), m(T, null, A(e.columns, (h, d) => (c(), g(a, {
1652
- key: d,
1653
- TagName: e.getTagName(h),
1864
+ }, null, 8, ["styles", "nonce"])) : createCommentVNode("", !0),
1865
+ (openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.columns, (p, c) => (openBlock(), createBlock(a, {
1866
+ key: c,
1867
+ TagName: e.getTagName(p),
1654
1868
  actionAttributes: {},
1655
- attributes: e.getAttributes(h, d)
1869
+ attributes: e.getAttributes(p, c)
1656
1870
  }, {
1657
- default: N(() => [
1658
- I(l, {
1659
- path: `component.options.columns.${d}.blocks`,
1871
+ default: withCtx(() => [
1872
+ createVNode(l, {
1873
+ path: `component.options.columns.${c}.blocks`,
1660
1874
  parent: e.builderBlock.id,
1661
1875
  styleProp: {
1662
1876
  flexGrow: "1"
@@ -1664,54 +1878,54 @@ function _n(e, t, n, o, r, i) {
1664
1878
  context: e.builderContext,
1665
1879
  registeredComponents: e.builderComponents,
1666
1880
  linkComponent: e.builderLinkComponent,
1667
- blocks: h.blocks
1881
+ blocks: p.blocks
1668
1882
  }, null, 8, ["path", "parent", "context", "registeredComponents", "linkComponent", "blocks"])
1669
1883
  ]),
1670
1884
  _: 2
1671
1885
  }, 1032, ["TagName", "attributes"]))), 128))
1672
1886
  ], 16);
1673
1887
  }
1674
- const eo = /* @__PURE__ */ b(Zn, [["render", _n], ["__scopeId", "data-v-52366f16"]]), to = f({
1888
+ const Columns = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-52366f16"]]), _sfc_main$l = defineComponent({
1675
1889
  name: "builder-fragment-component",
1676
1890
  props: []
1677
1891
  });
1678
- function no(e, t, n, o, r, i) {
1679
- return c(), m("span", null, [
1680
- P(e.$slots, "default")
1892
+ function _sfc_render$k(e, t, n, o, r, i) {
1893
+ return openBlock(), createElementBlock("span", null, [
1894
+ renderSlot(e.$slots, "default")
1681
1895
  ]);
1682
1896
  }
1683
- const oo = /* @__PURE__ */ b(to, [["render", no]]);
1684
- function $e(e) {
1897
+ const Fragment = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k]]);
1898
+ function removeProtocol(e) {
1685
1899
  return e.replace(/http(s)?:/, "");
1686
1900
  }
1687
- function ro(e = "", t, n) {
1901
+ function updateQueryParam(e = "", t, n) {
1688
1902
  const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), r = e.indexOf("?") !== -1 ? "&" : "?";
1689
1903
  return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + r + t + "=" + encodeURIComponent(n);
1690
1904
  }
1691
- function io(e, t) {
1905
+ function getShopifyImageUrl(e, t) {
1692
1906
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
1693
1907
  return e;
1694
1908
  if (t === "master")
1695
- return $e(e);
1909
+ return removeProtocol(e);
1696
1910
  const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
1697
1911
  if (n) {
1698
1912
  const o = e.split(n[0]), r = n[3], i = t.match("x") ? t : `${t}x`;
1699
- return $e(`${o[0]}_${i}${r}`);
1913
+ return removeProtocol(`${o[0]}_${i}${r}`);
1700
1914
  }
1701
1915
  return null;
1702
1916
  }
1703
- function oe(e) {
1917
+ function getSrcSet(e) {
1704
1918
  if (!e)
1705
1919
  return e;
1706
1920
  const t = [100, 200, 400, 800, 1200, 1600, 2e3];
1707
1921
  if (e.match(/builder\.io/)) {
1708
1922
  let n = e;
1709
1923
  const o = Number(e.split("?width=")[1]);
1710
- return isNaN(o) || (n = `${n} ${o}w`), t.filter((r) => r !== o).map((r) => `${ro(e, "width", r)} ${r}w`).concat([n]).join(", ");
1924
+ return isNaN(o) || (n = `${n} ${o}w`), t.filter((r) => r !== o).map((r) => `${updateQueryParam(e, "width", r)} ${r}w`).concat([n]).join(", ");
1711
1925
  }
1712
- return e.match(/cdn\.shopify\.com/) ? t.map((n) => [io(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
1926
+ return e.match(/cdn\.shopify\.com/) ? t.map((n) => [getShopifyImageUrl(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
1713
1927
  }
1714
- const so = f({
1928
+ const _sfc_main$k = defineComponent({
1715
1929
  name: "builder-image",
1716
1930
  props: [
1717
1931
  "image",
@@ -1741,10 +1955,10 @@ const so = f({
1741
1955
  if (!this.noWebp) {
1742
1956
  if (this.srcset && ((n = this.image) != null && n.includes("builder.io/api/v1/image"))) {
1743
1957
  if (!this.srcset.includes(this.image.split("?")[0]))
1744
- return console.debug("Removed given srcset"), oe(t);
1958
+ return console.debug("Removed given srcset"), getSrcSet(t);
1745
1959
  } else if (this.image && !this.srcset)
1746
- return oe(t);
1747
- return oe(t);
1960
+ return getSrcSet(t);
1961
+ return getSrcSet(t);
1748
1962
  }
1749
1963
  },
1750
1964
  webpSrcSet() {
@@ -1762,59 +1976,59 @@ const so = f({
1762
1976
  return this.aspectRatio ? e : void 0;
1763
1977
  }
1764
1978
  }
1765
- }), ao = ["srcset"], lo = ["loading", "fetchpriority", "alt", "role", "src", "srcset", "sizes"], co = {
1979
+ }), _hoisted_1$b = ["srcset"], _hoisted_2$4 = ["loading", "fetchpriority", "alt", "role", "src", "srcset", "sizes"], _hoisted_3$1 = {
1766
1980
  key: 2,
1767
1981
  class: "div-1pl23ac79ld-2"
1768
1982
  };
1769
- function uo(e, t, n, o, r, i) {
1770
- var s, l, a, u, h, d;
1771
- return c(), m(T, null, [
1772
- z("picture", null, [
1773
- e.webpSrcSet ? (c(), m("source", {
1983
+ function _sfc_render$j(e, t, n, o, r, i) {
1984
+ var s, l, a, d, p, c;
1985
+ return openBlock(), createElementBlock(Fragment$1, null, [
1986
+ createElementVNode("picture", null, [
1987
+ e.webpSrcSet ? (openBlock(), createElementBlock("source", {
1774
1988
  key: 0,
1775
1989
  type: "image/webp",
1776
1990
  srcset: e.webpSrcSet
1777
- }, null, 8, ao)) : C("", !0),
1778
- z("img", {
1991
+ }, null, 8, _hoisted_1$b)) : createCommentVNode("", !0),
1992
+ createElementVNode("img", {
1779
1993
  loading: e.highPriority ? "eager" : "lazy",
1780
1994
  fetchpriority: e.highPriority ? "high" : "auto",
1781
1995
  alt: e.altText,
1782
1996
  role: e.altText ? void 0 : "presentation",
1783
- style: D({
1997
+ style: normalizeStyle({
1784
1998
  objectPosition: e.backgroundPosition || "center",
1785
1999
  objectFit: e.backgroundSize || "cover",
1786
2000
  ...e.aspectRatioCss
1787
2001
  }),
1788
- class: J(
2002
+ class: normalizeClass(
1789
2003
  "builder-image" + (e.className ? " " + e.className : "") + " img-1pl23ac79ld"
1790
2004
  ),
1791
2005
  src: e.image,
1792
2006
  srcset: e.srcSetToUse,
1793
2007
  sizes: e.sizes
1794
- }, null, 14, lo)
2008
+ }, null, 14, _hoisted_2$4)
1795
2009
  ]),
1796
- e.aspectRatio && !((l = (s = e.builderBlock) == null ? void 0 : s.children) != null && l.length && e.fitContent) ? (c(), m("div", {
2010
+ e.aspectRatio && !((l = (s = e.builderBlock) == null ? void 0 : s.children) != null && l.length && e.fitContent) ? (openBlock(), createElementBlock("div", {
1797
2011
  key: 0,
1798
2012
  class: "builder-image-sizer div-1pl23ac79ld",
1799
- style: D({
2013
+ style: normalizeStyle({
1800
2014
  paddingTop: e.aspectRatio * 100 + "%"
1801
2015
  })
1802
- }, null, 4)) : C("", !0),
1803
- (u = (a = e.builderBlock) == null ? void 0 : a.children) != null && u.length && e.fitContent ? P(e.$slots, "default", { key: 1 }, void 0, !0) : C("", !0),
1804
- !e.fitContent && ((d = (h = e.builderBlock) == null ? void 0 : h.children) != null && d.length) ? (c(), m("div", co, [
1805
- P(e.$slots, "default", {}, void 0, !0)
1806
- ])) : C("", !0)
2016
+ }, null, 4)) : createCommentVNode("", !0),
2017
+ (d = (a = e.builderBlock) == null ? void 0 : a.children) != null && d.length && e.fitContent ? renderSlot(e.$slots, "default", { key: 1 }, void 0, !0) : createCommentVNode("", !0),
2018
+ !e.fitContent && ((c = (p = e.builderBlock) == null ? void 0 : p.children) != null && c.length) ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
2019
+ renderSlot(e.$slots, "default", {}, void 0, !0)
2020
+ ])) : createCommentVNode("", !0)
1807
2021
  ], 64);
1808
2022
  }
1809
- const po = /* @__PURE__ */ b(so, [["render", uo], ["__scopeId", "data-v-b1147753"]]), mo = f({
2023
+ const Image = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-b1147753"]]), _sfc_main$j = defineComponent({
1810
2024
  name: "builder-section-component",
1811
2025
  props: ["attributes", "maxWidth"],
1812
2026
  data() {
1813
- return { filterAttrs: V };
2027
+ return { filterAttrs };
1814
2028
  }
1815
2029
  });
1816
- function ho(e, t, n, o, r, i) {
1817
- return c(), m("section", S({
2030
+ function _sfc_render$i(e, t, n, o, r, i) {
2031
+ return openBlock(), createElementBlock("section", mergeProps({
1818
2032
  style: {
1819
2033
  width: "100%",
1820
2034
  alignSelf: "stretch",
@@ -1827,11 +2041,11 @@ function ho(e, t, n, o, r, i) {
1827
2041
  marginLeft: "auto",
1828
2042
  marginRight: "auto"
1829
2043
  }
1830
- }, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
1831
- P(e.$slots, "default")
2044
+ }, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
2045
+ renderSlot(e.$slots, "default")
1832
2046
  ], 16);
1833
2047
  }
1834
- const fo = /* @__PURE__ */ b(mo, [["render", ho]]), re = {
2048
+ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i]]), defaultTitle = {
1835
2049
  "@type": "@builder.io/sdk:Element",
1836
2050
  layerName: "Accordion item title",
1837
2051
  responsiveStyles: {
@@ -1860,7 +2074,7 @@ const fo = /* @__PURE__ */ b(mo, [["render", ho]]), re = {
1860
2074
  }
1861
2075
  }
1862
2076
  }]
1863
- }, ie = {
2077
+ }, defaultDetail = {
1864
2078
  "@type": "@builder.io/sdk:Element",
1865
2079
  layerName: "Accordion item detail",
1866
2080
  responsiveStyles: {
@@ -1891,7 +2105,7 @@ const fo = /* @__PURE__ */ b(mo, [["render", ho]]), re = {
1891
2105
  }
1892
2106
  }
1893
2107
  }]
1894
- }, bo = {
2108
+ }, componentInfo$i = {
1895
2109
  name: "Builder:Accordion",
1896
2110
  canHaveChildren: !0,
1897
2111
  image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
@@ -1908,19 +2122,19 @@ const fo = /* @__PURE__ */ b(mo, [["render", ho]]), re = {
1908
2122
  name: "title",
1909
2123
  type: "uiBlocks",
1910
2124
  hideFromUI: !0,
1911
- defaultValue: [re]
2125
+ defaultValue: [defaultTitle]
1912
2126
  }, {
1913
2127
  name: "detail",
1914
2128
  type: "uiBlocks",
1915
2129
  hideFromUI: !0,
1916
- defaultValue: [ie]
2130
+ defaultValue: [defaultDetail]
1917
2131
  }],
1918
2132
  defaultValue: [{
1919
- title: [re],
1920
- detail: [ie]
2133
+ title: [defaultTitle],
2134
+ detail: [defaultDetail]
1921
2135
  }, {
1922
- title: [re],
1923
- detail: [ie]
2136
+ title: [defaultTitle],
2137
+ detail: [defaultDetail]
1924
2138
  }],
1925
2139
  showIf: (e) => !e.get("useChildrenForItems")
1926
2140
  }, {
@@ -1955,9 +2169,9 @@ const fo = /* @__PURE__ */ b(mo, [["render", ho]]), re = {
1955
2169
  builderComponents: !0,
1956
2170
  builderLinkComponent: !0
1957
2171
  }
1958
- }, go = (e) => e.toString(), yo = f({
2172
+ }, convertOrderNumberToString = (e) => e.toString(), _sfc_main$i = defineComponent({
1959
2173
  name: "builder-accordion",
1960
- components: { Blocks: M },
2174
+ components: { Blocks },
1961
2175
  props: [
1962
2176
  "grid",
1963
2177
  "oneAtATime",
@@ -1969,7 +2183,7 @@ const fo = /* @__PURE__ */ b(mo, [["render", ho]]), re = {
1969
2183
  "builderLinkComponent"
1970
2184
  ],
1971
2185
  data() {
1972
- return { open: [], convertOrderNumberToString: go };
2186
+ return { open: [], convertOrderNumberToString };
1973
2187
  },
1974
2188
  computed: {
1975
2189
  onlyOneAtATime() {
@@ -2050,25 +2264,25 @@ const fo = /* @__PURE__ */ b(mo, [["render", ho]]), re = {
2050
2264
  this.open.includes(e) ? this.open = this.onlyOneAtATime ? [] : this.open.filter((t) => t !== e) : this.open = this.onlyOneAtATime ? [e] : this.open.concat(e);
2051
2265
  }
2052
2266
  }
2053
- }), ko = ["data-index", "onClick"];
2054
- function vo(e, t, n, o, r, i) {
2055
- const s = y("Blocks");
2056
- return c(), m("div", {
2267
+ }), _hoisted_1$a = ["data-index", "onClick"];
2268
+ function _sfc_render$h(e, t, n, o, r, i) {
2269
+ const s = resolveComponent("Blocks");
2270
+ return openBlock(), createElementBlock("div", {
2057
2271
  class: "builder-accordion",
2058
- style: D(e.accordionStyles)
2272
+ style: normalizeStyle(e.accordionStyles)
2059
2273
  }, [
2060
- (c(!0), m(T, null, A(e.items, (l, a) => (c(), m(T, { key: a }, [
2061
- z("div", {
2062
- class: J(e.getAccordionTitleClassName(a)),
2063
- style: D({
2274
+ (openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.items, (l, a) => (openBlock(), createElementBlock(Fragment$1, { key: a }, [
2275
+ createElementVNode("div", {
2276
+ class: normalizeClass(e.getAccordionTitleClassName(a)),
2277
+ style: normalizeStyle({
2064
2278
  ...e.accordionTitleStyles,
2065
2279
  width: e.grid ? e.gridRowWidth : void 0,
2066
2280
  order: e.openGridItemOrder !== null ? e.convertOrderNumberToString(a) : e.convertOrderNumberToString(a + 1)
2067
2281
  }),
2068
2282
  "data-index": a,
2069
- onClick: (u) => e.onClick(a)
2283
+ onClick: (d) => e.onClick(a)
2070
2284
  }, [
2071
- I(s, {
2285
+ createVNode(s, {
2072
2286
  blocks: l.title,
2073
2287
  path: `items.${a}.title`,
2074
2288
  parent: e.builderBlock.id,
@@ -2076,13 +2290,13 @@ function vo(e, t, n, o, r, i) {
2076
2290
  registeredComponents: e.builderComponents,
2077
2291
  linkComponent: e.builderLinkComponent
2078
2292
  }, null, 8, ["blocks", "path", "parent", "context", "registeredComponents", "linkComponent"])
2079
- ], 14, ko),
2080
- e.open.includes(a) ? (c(), m("div", {
2293
+ ], 14, _hoisted_1$a),
2294
+ e.open.includes(a) ? (openBlock(), createElementBlock("div", {
2081
2295
  key: 0,
2082
- class: J(e.getAccordionDetailClassName(a)),
2083
- style: D(e.accordionDetailStyles)
2296
+ class: normalizeClass(e.getAccordionDetailClassName(a)),
2297
+ style: normalizeStyle(e.accordionDetailStyles)
2084
2298
  }, [
2085
- I(s, {
2299
+ createVNode(s, {
2086
2300
  blocks: l.detail,
2087
2301
  path: `items.${a}.detail`,
2088
2302
  parent: e.builderBlock.id,
@@ -2090,11 +2304,11 @@ function vo(e, t, n, o, r, i) {
2090
2304
  registeredComponents: e.builderComponents,
2091
2305
  linkComponent: e.builderLinkComponent
2092
2306
  }, null, 8, ["blocks", "path", "parent", "context", "registeredComponents", "linkComponent"])
2093
- ], 6)) : C("", !0)
2307
+ ], 6)) : createCommentVNode("", !0)
2094
2308
  ], 64))), 128))
2095
2309
  ], 4);
2096
2310
  }
2097
- const Co = /* @__PURE__ */ b(yo, [["render", vo]]), So = {
2311
+ const Accordion = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h]]), componentInfo$h = {
2098
2312
  name: "Core:Button",
2099
2313
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
2100
2314
  defaultStyles: {
@@ -2130,7 +2344,7 @@ const Co = /* @__PURE__ */ b(yo, [["render", vo]]), So = {
2130
2344
  shouldReceiveBuilderProps: {
2131
2345
  builderLinkComponent: !0
2132
2346
  }
2133
- }, To = {
2347
+ }, componentInfo$g = {
2134
2348
  // TODO: ways to statically preprocess JSON for references, functions, etc
2135
2349
  name: "Columns",
2136
2350
  isRSC: !0,
@@ -2337,13 +2551,13 @@ const Co = /* @__PURE__ */ b(yo, [["render", vo]]), So = {
2337
2551
  builderComponents: !0,
2338
2552
  builderLinkComponent: !0
2339
2553
  }
2340
- }, wo = {
2554
+ }, componentInfo$f = {
2341
2555
  name: "Fragment",
2342
2556
  static: !0,
2343
2557
  hidden: !0,
2344
2558
  canHaveChildren: !0,
2345
2559
  noWrap: !0
2346
- }, Io = {
2560
+ }, componentInfo$e = {
2347
2561
  name: "Image",
2348
2562
  static: !0,
2349
2563
  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",
@@ -2364,15 +2578,15 @@ const Co = /* @__PURE__ */ b(yo, [["render", vo]]), So = {
2364
2578
  onChange: (e) => {
2365
2579
  e.delete("srcset"), e.delete("noWebp");
2366
2580
  function n(s, l = 6e4) {
2367
- return new Promise((a, u) => {
2368
- const h = document.createElement("img");
2369
- let d = !1;
2370
- h.onload = () => {
2371
- d = !0, a(h);
2372
- }, h.addEventListener("error", (p) => {
2373
- console.warn("Image load failed", p.error), u(p.error);
2374
- }), h.src = s, setTimeout(() => {
2375
- d || u(new Error("Image load timed out"));
2581
+ return new Promise((a, d) => {
2582
+ const p = document.createElement("img");
2583
+ let c = !1;
2584
+ p.onload = () => {
2585
+ c = !0, a(p);
2586
+ }, p.addEventListener("error", (u) => {
2587
+ console.warn("Image load failed", u.error), d(u.error);
2588
+ }), p.src = s, setTimeout(() => {
2589
+ c || d(new Error("Image load timed out"));
2376
2590
  }, l);
2377
2591
  });
2378
2592
  }
@@ -2451,7 +2665,7 @@ const Co = /* @__PURE__ */ b(yo, [["render", vo]]), So = {
2451
2665
  shouldReceiveBuilderProps: {
2452
2666
  builderBlock: !0
2453
2667
  }
2454
- }, $o = {
2668
+ }, componentInfo$d = {
2455
2669
  name: "Core:Section",
2456
2670
  static: !0,
2457
2671
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -2490,7 +2704,7 @@ const Co = /* @__PURE__ */ b(yo, [["render", vo]]), So = {
2490
2704
  }
2491
2705
  }
2492
2706
  }]
2493
- }, Ro = {
2707
+ }, componentInfo$c = {
2494
2708
  name: "Slot",
2495
2709
  isRSC: !0,
2496
2710
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -2507,15 +2721,15 @@ const Co = /* @__PURE__ */ b(yo, [["render", vo]]), So = {
2507
2721
  builderContext: !0,
2508
2722
  builderComponents: !0
2509
2723
  }
2510
- }, Eo = f({
2724
+ }, _sfc_main$h = defineComponent({
2511
2725
  name: "builder-slot",
2512
- components: { Blocks: M },
2726
+ components: { Blocks },
2513
2727
  props: ["builderContext", "name", "builderComponents"]
2514
2728
  });
2515
- function Bo(e, t, n, o, r, i) {
2516
- var l, a, u;
2517
- const s = y("Blocks");
2518
- return c(), m("div", S(
2729
+ function _sfc_render$g(e, t, n, o, r, i) {
2730
+ var l, a, d;
2731
+ const s = resolveComponent("Blocks");
2732
+ return openBlock(), createElementBlock("div", mergeProps(
2519
2733
  { style: {
2520
2734
  pointerEvents: "auto"
2521
2735
  } },
@@ -2523,16 +2737,16 @@ function Bo(e, t, n, o, r, i) {
2523
2737
  "builder-slot": e.name
2524
2738
  }
2525
2739
  ), [
2526
- I(s, {
2740
+ createVNode(s, {
2527
2741
  parent: (a = e.builderContext.context) == null ? void 0 : a.symbolId,
2528
2742
  path: `symbol.data.${e.name}`,
2529
2743
  context: e.builderContext,
2530
2744
  registeredComponents: e.builderComponents,
2531
- blocks: (u = e.builderContext.rootState) == null ? void 0 : u[e.name]
2745
+ blocks: (d = e.builderContext.rootState) == null ? void 0 : d[e.name]
2532
2746
  }, null, 8, ["parent", "path", "context", "registeredComponents", "blocks"])
2533
2747
  ], 16);
2534
2748
  }
2535
- const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
2749
+ const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g]]), componentInfo$b = {
2536
2750
  name: "Symbol",
2537
2751
  noWrap: !0,
2538
2752
  static: !0,
@@ -2571,7 +2785,7 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
2571
2785
  builderComponents: !0,
2572
2786
  builderLinkComponent: !0
2573
2787
  }
2574
- }, se = {
2788
+ }, defaultTab = {
2575
2789
  "@type": "@builder.io/sdk:Element",
2576
2790
  responsiveStyles: {
2577
2791
  large: {
@@ -2593,7 +2807,7 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
2593
2807
  text: "New tab"
2594
2808
  }
2595
2809
  }
2596
- }, ae = {
2810
+ }, defaultElement = {
2597
2811
  "@type": "@builder.io/sdk:Element",
2598
2812
  responsiveStyles: {
2599
2813
  large: {
@@ -2609,7 +2823,7 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
2609
2823
  text: "New tab content "
2610
2824
  }
2611
2825
  }
2612
- }, Ao = {
2826
+ }, componentInfo$a = {
2613
2827
  name: "Builder: Tabs",
2614
2828
  inputs: [{
2615
2829
  name: "tabs",
@@ -2619,16 +2833,16 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
2619
2833
  name: "label",
2620
2834
  type: "uiBlocks",
2621
2835
  hideFromUI: !0,
2622
- defaultValue: [se]
2836
+ defaultValue: [defaultTab]
2623
2837
  }, {
2624
2838
  name: "content",
2625
2839
  type: "uiBlocks",
2626
2840
  hideFromUI: !0,
2627
- defaultValue: [ae]
2841
+ defaultValue: [defaultElement]
2628
2842
  }],
2629
2843
  defaultValue: [{
2630
2844
  label: [{
2631
- ...se,
2845
+ ...defaultTab,
2632
2846
  component: {
2633
2847
  name: "Text",
2634
2848
  options: {
@@ -2637,7 +2851,7 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
2637
2851
  }
2638
2852
  }],
2639
2853
  content: [{
2640
- ...ae,
2854
+ ...defaultElement,
2641
2855
  component: {
2642
2856
  name: "Text",
2643
2857
  options: {
@@ -2647,7 +2861,7 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
2647
2861
  }]
2648
2862
  }, {
2649
2863
  label: [{
2650
- ...se,
2864
+ ...defaultTab,
2651
2865
  component: {
2652
2866
  name: "Text",
2653
2867
  options: {
@@ -2656,7 +2870,7 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
2656
2870
  }
2657
2871
  }],
2658
2872
  content: [{
2659
- ...ae,
2873
+ ...defaultElement,
2660
2874
  component: {
2661
2875
  name: "Text",
2662
2876
  options: {
@@ -2712,9 +2926,9 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
2712
2926
  builderComponents: !0,
2713
2927
  builderLinkComponent: !0
2714
2928
  }
2715
- }, Vo = f({
2929
+ }, _sfc_main$g = defineComponent({
2716
2930
  name: "builder-tabs",
2717
- components: { Blocks: M },
2931
+ components: { Blocks },
2718
2932
  props: [
2719
2933
  "defaultActiveTab",
2720
2934
  "tabs",
@@ -2737,28 +2951,28 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
2737
2951
  e === this.activeTab && this.collapsible ? this.activeTab = -1 : this.activeTab = e;
2738
2952
  }
2739
2953
  }
2740
- }), Wo = ["onClick"], No = { key: 0 };
2741
- function Fo(e, t, n, o, r, i) {
2742
- const s = y("Blocks");
2743
- return c(), m("div", null, [
2744
- z("div", {
2954
+ }), _hoisted_1$9 = ["onClick"], _hoisted_2$3 = { key: 0 };
2955
+ function _sfc_render$f(e, t, n, o, r, i) {
2956
+ const s = resolveComponent("Blocks");
2957
+ return openBlock(), createElementBlock("div", null, [
2958
+ createElementVNode("div", {
2745
2959
  class: "builder-tabs-wrap",
2746
- style: D({
2960
+ style: normalizeStyle({
2747
2961
  display: "flex",
2748
2962
  flexDirection: "row",
2749
2963
  justifyContent: e.tabHeaderLayout || "flex-start",
2750
2964
  overflow: "auto"
2751
2965
  })
2752
2966
  }, [
2753
- (c(!0), m(T, null, A(e.tabs, (l, a) => (c(), m("span", {
2967
+ (openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.tabs, (l, a) => (openBlock(), createElementBlock("span", {
2754
2968
  key: a,
2755
- class: J(`builder-tab-wrap ${e.activeTab === a ? "builder-tab-active" : ""}`),
2756
- style: D({
2969
+ class: normalizeClass(`builder-tab-wrap ${e.activeTab === a ? "builder-tab-active" : ""}`),
2970
+ style: normalizeStyle({
2757
2971
  ...e.activeTab === a ? e.activeTabStyle : {}
2758
2972
  }),
2759
- onClick: (u) => e.onClick(a)
2973
+ onClick: (d) => e.onClick(a)
2760
2974
  }, [
2761
- I(s, {
2975
+ createVNode(s, {
2762
2976
  parent: e.builderBlock.id,
2763
2977
  path: `component.options.tabs.${a}.label`,
2764
2978
  blocks: l.label,
@@ -2766,10 +2980,10 @@ function Fo(e, t, n, o, r, i) {
2766
2980
  registeredComponents: e.builderComponents,
2767
2981
  linkComponent: e.builderLinkComponent
2768
2982
  }, null, 8, ["parent", "path", "blocks", "context", "registeredComponents", "linkComponent"])
2769
- ], 14, Wo))), 128))
2983
+ ], 14, _hoisted_1$9))), 128))
2770
2984
  ], 4),
2771
- e.activeTabContent(e.activeTab) ? (c(), m("div", No, [
2772
- I(s, {
2985
+ e.activeTabContent(e.activeTab) ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
2986
+ createVNode(s, {
2773
2987
  parent: e.builderBlock.id,
2774
2988
  path: `component.options.tabs.${e.activeTab}.content`,
2775
2989
  blocks: e.activeTabContent(e.activeTab),
@@ -2777,10 +2991,10 @@ function Fo(e, t, n, o, r, i) {
2777
2991
  registeredComponents: e.builderComponents,
2778
2992
  linkComponent: e.builderLinkComponent
2779
2993
  }, null, 8, ["parent", "path", "blocks", "context", "registeredComponents", "linkComponent"])
2780
- ])) : C("", !0)
2994
+ ])) : createCommentVNode("", !0)
2781
2995
  ]);
2782
2996
  }
2783
- const Oo = /* @__PURE__ */ b(Vo, [["render", Fo]]), Do = {
2997
+ const Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f]]), componentInfo$9 = {
2784
2998
  shouldReceiveBuilderProps: {
2785
2999
  builderBlock: !1,
2786
3000
  builderContext: !0
@@ -2802,7 +3016,7 @@ const Oo = /* @__PURE__ */ b(Vo, [["render", Fo]]), Do = {
2802
3016
  height: "auto",
2803
3017
  textAlign: "center"
2804
3018
  }
2805
- }, Lo = f({
3019
+ }, _sfc_main$f = defineComponent({
2806
3020
  name: "builder-text",
2807
3021
  props: ["builderContext", "text"],
2808
3022
  computed: {
@@ -2816,7 +3030,7 @@ const Oo = /* @__PURE__ */ b(Vo, [["render", Fo]]), Do = {
2816
3030
  } = e;
2817
3031
  return String(((i = this.text) == null ? void 0 : i.toString()) || "").replace(
2818
3032
  /{{([^}]+)}}/g,
2819
- (s, l) => G({
3033
+ (s, l) => evaluate({
2820
3034
  code: l,
2821
3035
  context: t,
2822
3036
  localState: n,
@@ -2827,17 +3041,17 @@ const Oo = /* @__PURE__ */ b(Vo, [["render", Fo]]), Do = {
2827
3041
  );
2828
3042
  }
2829
3043
  }
2830
- }), Uo = ["innerHTML"];
2831
- function Mo(e, t, n, o, r, i) {
2832
- return c(), m("div", {
3044
+ }), _hoisted_1$8 = ["innerHTML"];
3045
+ function _sfc_render$e(e, t, n, o, r, i) {
3046
+ return openBlock(), createElementBlock("div", {
2833
3047
  class: "builder-text",
2834
3048
  innerHTML: e.processedText,
2835
3049
  style: {
2836
3050
  outline: "none"
2837
3051
  }
2838
- }, null, 8, Uo);
3052
+ }, null, 8, _hoisted_1$8);
2839
3053
  }
2840
- const Ho = /* @__PURE__ */ b(Lo, [["render", Mo]]), jo = {
3054
+ const Text = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e]]), componentInfo$8 = {
2841
3055
  name: "Custom Code",
2842
3056
  static: !0,
2843
3057
  requiredPermissions: ["editCode"],
@@ -2859,7 +3073,7 @@ const Ho = /* @__PURE__ */ b(Lo, [["render", Mo]]), jo = {
2859
3073
  helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
2860
3074
  advanced: !0
2861
3075
  }]
2862
- }, Ko = f({
3076
+ }, _sfc_main$e = defineComponent({
2863
3077
  name: "builder-custom-code",
2864
3078
  props: ["replaceNodes", "code"],
2865
3079
  data() {
@@ -2893,15 +3107,15 @@ const Ho = /* @__PURE__ */ b(Lo, [["render", Mo]]), jo = {
2893
3107
  }
2894
3108
  }
2895
3109
  }
2896
- }), qo = ["innerHTML"];
2897
- function zo(e, t, n, o, r, i) {
2898
- return c(), m("div", {
3110
+ }), _hoisted_1$7 = ["innerHTML"];
3111
+ function _sfc_render$d(e, t, n, o, r, i) {
3112
+ return openBlock(), createElementBlock("div", {
2899
3113
  ref: "elementRef",
2900
- class: J("builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")),
3114
+ class: normalizeClass("builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")),
2901
3115
  innerHTML: e.code
2902
- }, null, 10, qo);
3116
+ }, null, 10, _hoisted_1$7);
2903
3117
  }
2904
- const Jo = /* @__PURE__ */ b(Ko, [["render", zo]]), Go = {
3118
+ const customCode = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d]]), componentInfo$7 = {
2905
3119
  name: "Embed",
2906
3120
  static: !0,
2907
3121
  inputs: [{
@@ -2916,7 +3130,7 @@ const Jo = /* @__PURE__ */ b(Ko, [["render", zo]]), Go = {
2916
3130
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
2917
3131
  hideFromUI: !0
2918
3132
  }]
2919
- }, Yo = ["text/javascript", "application/javascript", "application/ecmascript"], Qo = (e) => Yo.includes(e.type), Xo = f({
3133
+ }, SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"], isJsScript = (e) => SCRIPT_MIME_TYPES.includes(e.type), _sfc_main$d = defineComponent({
2920
3134
  name: "builder-embed",
2921
3135
  props: ["content"],
2922
3136
  data() {
@@ -2949,7 +3163,7 @@ const Jo = /* @__PURE__ */ b(Ko, [["render", zo]]), Go = {
2949
3163
  this.scriptsInserted.push(n.src);
2950
3164
  const o = document.createElement("script");
2951
3165
  o.async = !0, o.src = n.src, document.head.appendChild(o);
2952
- } else if (Qo(n) && !this.scriptsRun.includes(n.innerText))
3166
+ } else if (isJsScript(n) && !this.scriptsRun.includes(n.innerText))
2953
3167
  try {
2954
3168
  this.scriptsRun.push(n.innerText), new Function(n.innerText)();
2955
3169
  } catch (o) {
@@ -2958,15 +3172,15 @@ const Jo = /* @__PURE__ */ b(Ko, [["render", zo]]), Go = {
2958
3172
  }
2959
3173
  }
2960
3174
  }
2961
- }), Zo = ["innerHTML"];
2962
- function _o(e, t, n, o, r, i) {
2963
- return c(), m("div", {
3175
+ }), _hoisted_1$6 = ["innerHTML"];
3176
+ function _sfc_render$c(e, t, n, o, r, i) {
3177
+ return openBlock(), createElementBlock("div", {
2964
3178
  class: "builder-embed",
2965
3179
  ref: "elem",
2966
3180
  innerHTML: e.content
2967
- }, null, 8, Zo);
3181
+ }, null, 8, _hoisted_1$6);
2968
3182
  }
2969
- const er = /* @__PURE__ */ b(Xo, [["render", _o]]), tr = {
3183
+ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c]]), componentInfo$6 = {
2970
3184
  name: "Form:Form",
2971
3185
  // editableTags: ['builder-form-error']
2972
3186
  defaults: {
@@ -3203,15 +3417,15 @@ const er = /* @__PURE__ */ b(Xo, [["render", _o]]), tr = {
3203
3417
  builderComponents: !0,
3204
3418
  builderLinkComponent: !0
3205
3419
  }
3206
- }, nr = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], or = () => {
3420
+ }, validEnvList = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], getEnv = () => {
3207
3421
  const e = process.env.NODE_ENV || "production";
3208
- return nr.includes(e) ? e : "production";
3209
- }, rr = (e, t, n) => {
3422
+ return validEnvList.includes(e) ? e : "production";
3423
+ }, get = (e, t, n) => {
3210
3424
  const o = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((r, i) => r != null ? r[i] : r, e);
3211
3425
  return o === void 0 || o === e ? n : o;
3212
- }, ir = f({
3426
+ }, _sfc_main$c = defineComponent({
3213
3427
  name: "builder-form-component",
3214
- components: { Block: ye, Blocks: M },
3428
+ components: { Block, Blocks },
3215
3429
  props: [
3216
3430
  "builderContext",
3217
3431
  "previewState",
@@ -3240,7 +3454,7 @@ const er = /* @__PURE__ */ b(Xo, [["render", _o]]), tr = {
3240
3454
  formState: "unsubmitted",
3241
3455
  responseData: null,
3242
3456
  formErrorMessage: "",
3243
- filterAttrs: V
3457
+ filterAttrs
3244
3458
  };
3245
3459
  },
3246
3460
  methods: {
@@ -3253,7 +3467,7 @@ const er = /* @__PURE__ */ b(Xo, [["render", _o]]), tr = {
3253
3467
  this.builderContext.rootSetState ? (o = (n = this.builderContext).rootSetState) == null || o.call(n, t) : this.builderContext.rootState = t;
3254
3468
  },
3255
3469
  submissionState() {
3256
- return E() && this.previewState || this.formState;
3470
+ return isEditing() && this.previewState || this.formState;
3257
3471
  },
3258
3472
  onSubmit(e) {
3259
3473
  var n;
@@ -3268,150 +3482,150 @@ const er = /* @__PURE__ */ b(Xo, [["render", _o]]), tr = {
3268
3482
  e.preventDefault();
3269
3483
  const o = e.currentTarget || e.target, r = this.customHeaders || {};
3270
3484
  let i;
3271
- const s = new FormData(o), l = Array.from(o.querySelectorAll("input,select,textarea")).filter((d) => !!d.name).map((d) => {
3272
- let p;
3273
- const k = d.name;
3274
- if (d instanceof HTMLInputElement)
3275
- if (d.type === "radio") {
3276
- if (d.checked)
3277
- return p = d.name, {
3278
- key: k,
3279
- value: p
3485
+ const s = new FormData(o), l = Array.from(o.querySelectorAll("input,select,textarea")).filter((c) => !!c.name).map((c) => {
3486
+ let u;
3487
+ const f = c.name;
3488
+ if (c instanceof HTMLInputElement)
3489
+ if (c.type === "radio") {
3490
+ if (c.checked)
3491
+ return u = c.name, {
3492
+ key: f,
3493
+ value: u
3280
3494
  };
3281
- } else if (d.type === "checkbox")
3282
- p = d.checked;
3283
- else if (d.type === "number" || d.type === "range") {
3284
- const v = d.valueAsNumber;
3285
- isNaN(v) || (p = v);
3495
+ } else if (c.type === "checkbox")
3496
+ u = c.checked;
3497
+ else if (c.type === "number" || c.type === "range") {
3498
+ const m = c.valueAsNumber;
3499
+ isNaN(m) || (u = m);
3286
3500
  } else
3287
- d.type === "file" ? p = d.files : p = d.value;
3501
+ c.type === "file" ? u = c.files : u = c.value;
3288
3502
  else
3289
- p = d.value;
3503
+ u = c.value;
3290
3504
  return {
3291
- key: k,
3292
- value: p
3505
+ key: f,
3506
+ value: u
3293
3507
  };
3294
3508
  });
3295
3509
  let a = this.contentType;
3296
- if (this.sendSubmissionsTo === "email" && (a = "multipart/form-data"), Array.from(l).forEach(({ value: d }) => {
3297
- (d instanceof File || Array.isArray(d) && d[0] instanceof File || d instanceof FileList) && (a = "multipart/form-data");
3510
+ if (this.sendSubmissionsTo === "email" && (a = "multipart/form-data"), Array.from(l).forEach(({ value: c }) => {
3511
+ (c instanceof File || Array.isArray(c) && c[0] instanceof File || c instanceof FileList) && (a = "multipart/form-data");
3298
3512
  }), a !== "application/json")
3299
3513
  i = s;
3300
3514
  else {
3301
- const d = {};
3302
- Array.from(l).forEach(({ value: p, key: k }) => {
3303
- xe(d, k, p);
3304
- }), i = JSON.stringify(d);
3515
+ const c = {};
3516
+ Array.from(l).forEach(({ value: u, key: f }) => {
3517
+ set(c, f, u);
3518
+ }), i = JSON.stringify(c);
3305
3519
  }
3306
3520
  a && a !== "multipart/form-data" && (t && ((n = this.action) != null && n.includes("zapier.com")) || (r["content-type"] = a));
3307
- const u = new CustomEvent("presubmit", {
3521
+ const d = new CustomEvent("presubmit", {
3308
3522
  detail: {
3309
3523
  body: i
3310
3524
  }
3311
3525
  });
3312
- if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(u), u.defaultPrevented))
3526
+ if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(d), d.defaultPrevented))
3313
3527
  return;
3314
3528
  this.formState = "sending";
3315
- const h = `${or() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${this.builderContext.apiKey}&to=${btoa(
3529
+ const p = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${this.builderContext.apiKey}&to=${btoa(
3316
3530
  this.sendSubmissionsToEmail || ""
3317
3531
  )}&name=${encodeURIComponent(this.name || "")}`;
3318
3532
  fetch(
3319
- this.sendSubmissionsTo === "email" ? h : this.action,
3533
+ this.sendSubmissionsTo === "email" ? p : this.action,
3320
3534
  {
3321
3535
  body: i,
3322
3536
  headers: r,
3323
3537
  method: this.method || "post"
3324
3538
  }
3325
3539
  ).then(
3326
- async (d) => {
3327
- let p;
3328
- const k = d.headers.get("content-type");
3329
- if (k && k.indexOf("application/json") !== -1 ? p = await d.json() : p = await d.text(), !d.ok && this.errorMessagePath) {
3330
- let v = rr(p, this.errorMessagePath);
3331
- v && (typeof v != "string" && (v = JSON.stringify(v)), this.formErrorMessage = v, this.mergeNewRootState({
3332
- formErrorMessage: v
3540
+ async (c) => {
3541
+ let u;
3542
+ const f = c.headers.get("content-type");
3543
+ if (f && f.indexOf("application/json") !== -1 ? u = await c.json() : u = await c.text(), !c.ok && this.errorMessagePath) {
3544
+ let m = get(u, this.errorMessagePath);
3545
+ m && (typeof m != "string" && (m = JSON.stringify(m)), this.formErrorMessage = m, this.mergeNewRootState({
3546
+ formErrorMessage: m
3333
3547
  }));
3334
3548
  }
3335
- if (this.responseData = p, this.formState = d.ok ? "success" : "error", d.ok) {
3336
- const v = new CustomEvent("submit:success", {
3549
+ if (this.responseData = u, this.formState = c.ok ? "success" : "error", c.ok) {
3550
+ const m = new CustomEvent("submit:success", {
3337
3551
  detail: {
3338
- res: d,
3339
- body: p
3552
+ res: c,
3553
+ body: u
3340
3554
  }
3341
3555
  });
3342
3556
  if (this.$refs.formRef) {
3343
- if (this.$refs.formRef.dispatchEvent(v), v.defaultPrevented)
3557
+ if (this.$refs.formRef.dispatchEvent(m), m.defaultPrevented)
3344
3558
  return;
3345
3559
  this.resetFormOnSubmit !== !1 && this.$refs.formRef.reset();
3346
3560
  }
3347
3561
  if (this.successUrl)
3348
3562
  if (this.$refs.formRef) {
3349
- const F = new CustomEvent("route", {
3563
+ const b = new CustomEvent("route", {
3350
3564
  detail: {
3351
3565
  url: this.successUrl
3352
3566
  }
3353
3567
  });
3354
- this.$refs.formRef.dispatchEvent(F), F.defaultPrevented || (location.href = this.successUrl);
3568
+ this.$refs.formRef.dispatchEvent(b), b.defaultPrevented || (location.href = this.successUrl);
3355
3569
  } else
3356
3570
  location.href = this.successUrl;
3357
3571
  }
3358
3572
  },
3359
- (d) => {
3360
- const p = new CustomEvent("submit:error", {
3573
+ (c) => {
3574
+ const u = new CustomEvent("submit:error", {
3361
3575
  detail: {
3362
- error: d
3576
+ error: c
3363
3577
  }
3364
3578
  });
3365
- this.$refs.formRef && (this.$refs.formRef.dispatchEvent(p), p.defaultPrevented) || (this.responseData = d, this.formState = "error");
3579
+ this.$refs.formRef && (this.$refs.formRef.dispatchEvent(u), u.defaultPrevented) || (this.responseData = c, this.formState = "error");
3366
3580
  }
3367
3581
  );
3368
3582
  }
3369
3583
  }
3370
3584
  }
3371
- }), sr = ["validate", "action", "method", "name"], ar = {
3585
+ }), _hoisted_1$5 = ["validate", "action", "method", "name"], _hoisted_2$2 = {
3372
3586
  key: 3,
3373
3587
  class: "builder-form-error-text pre-3i4ezorcfhi"
3374
3588
  };
3375
- function lr(e, t, n, o, r, i) {
3589
+ function _sfc_render$b(e, t, n, o, r, i) {
3376
3590
  var a;
3377
- const s = y("Block"), l = y("Blocks");
3378
- return c(), m("form", S({
3591
+ const s = resolveComponent("Block"), l = resolveComponent("Blocks");
3592
+ return openBlock(), createElementBlock("form", mergeProps({
3379
3593
  validate: e.validate,
3380
3594
  ref: "formRef",
3381
3595
  action: !e.sendWithJs && e.action,
3382
3596
  method: e.method,
3383
3597
  name: e.name,
3384
- onSubmit: t[0] || (t[0] = (u) => e.onSubmit(u))
3385
- }, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
3386
- e.builderBlock && e.builderBlock.children ? (c(!0), m(T, { key: 0 }, A((a = e.builderBlock) == null ? void 0 : a.children, (u, h) => (c(), g(s, {
3598
+ onSubmit: t[0] || (t[0] = (d) => e.onSubmit(d))
3599
+ }, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
3600
+ e.builderBlock && e.builderBlock.children ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList((a = e.builderBlock) == null ? void 0 : a.children, (d, p) => (openBlock(), createBlock(s, {
3387
3601
  key: `form-block-${e.idx}`,
3388
- block: u,
3602
+ block: d,
3389
3603
  context: e.builderContext,
3390
3604
  registeredComponents: e.builderComponents,
3391
3605
  linkComponent: e.builderLinkComponent
3392
- }, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128)) : C("", !0),
3393
- e.submissionState() === "error" ? (c(), g(l, {
3606
+ }, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128)) : createCommentVNode("", !0),
3607
+ e.submissionState() === "error" ? (openBlock(), createBlock(l, {
3394
3608
  key: 1,
3395
3609
  path: "errorMessage",
3396
3610
  blocks: e.errorMessage,
3397
3611
  context: e.builderContext
3398
- }, null, 8, ["blocks", "context"])) : C("", !0),
3399
- e.submissionState() === "sending" ? (c(), g(l, {
3612
+ }, null, 8, ["blocks", "context"])) : createCommentVNode("", !0),
3613
+ e.submissionState() === "sending" ? (openBlock(), createBlock(l, {
3400
3614
  key: 2,
3401
3615
  path: "sendingMessage",
3402
3616
  blocks: e.sendingMessage,
3403
3617
  context: e.builderContext
3404
- }, null, 8, ["blocks", "context"])) : C("", !0),
3405
- e.submissionState() === "error" && e.responseData ? (c(), m("pre", ar, te(JSON.stringify(e.responseData, null, 2)), 1)) : C("", !0),
3406
- e.submissionState() === "success" ? (c(), g(l, {
3618
+ }, null, 8, ["blocks", "context"])) : createCommentVNode("", !0),
3619
+ e.submissionState() === "error" && e.responseData ? (openBlock(), createElementBlock("pre", _hoisted_2$2, toDisplayString(JSON.stringify(e.responseData, null, 2)), 1)) : createCommentVNode("", !0),
3620
+ e.submissionState() === "success" ? (openBlock(), createBlock(l, {
3407
3621
  key: 4,
3408
3622
  path: "successMessage",
3409
3623
  blocks: e.successMessage,
3410
3624
  context: e.builderContext
3411
- }, null, 8, ["blocks", "context"])) : C("", !0)
3412
- ], 16, sr);
3625
+ }, null, 8, ["blocks", "context"])) : createCommentVNode("", !0)
3626
+ ], 16, _hoisted_1$5);
3413
3627
  }
3414
- const cr = /* @__PURE__ */ b(ir, [["render", lr], ["__scopeId", "data-v-489330f7"]]), dr = {
3628
+ const Form = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-489330f7"]]), componentInfo$5 = {
3415
3629
  name: "Form:Input",
3416
3630
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
3417
3631
  inputs: [
@@ -3462,7 +3676,7 @@ const cr = /* @__PURE__ */ b(ir, [["render", lr], ["__scopeId", "data-v-489330f7
3462
3676
  borderStyle: "solid",
3463
3677
  borderColor: "#ccc"
3464
3678
  }
3465
- }, ur = f({
3679
+ }, _sfc_main$b = defineComponent({
3466
3680
  name: "builder-form-input-component",
3467
3681
  props: [
3468
3682
  "attributes",
@@ -3474,11 +3688,11 @@ const cr = /* @__PURE__ */ b(ir, [["render", lr], ["__scopeId", "data-v-489330f7
3474
3688
  "required"
3475
3689
  ],
3476
3690
  data() {
3477
- return { isEditing: E, filterAttrs: V };
3691
+ return { isEditing, filterAttrs };
3478
3692
  }
3479
- }), pr = ["placeholder", "type", "name", "value", "defaultValue", "required"];
3480
- function mr(e, t, n, o, r, i) {
3481
- return c(), m("input", S({
3693
+ }), _hoisted_1$4 = ["placeholder", "type", "name", "value", "defaultValue", "required"];
3694
+ function _sfc_render$a(e, t, n, o, r, i) {
3695
+ return openBlock(), createElementBlock("input", mergeProps({
3482
3696
  key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
3483
3697
  placeholder: e.placeholder,
3484
3698
  type: e.type,
@@ -3486,9 +3700,9 @@ function mr(e, t, n, o, r, i) {
3486
3700
  value: e.value,
3487
3701
  defaultValue: e.defaultValue,
3488
3702
  required: e.required
3489
- }, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, pr);
3703
+ }, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, _hoisted_1$4);
3490
3704
  }
3491
- const hr = /* @__PURE__ */ b(ur, [["render", mr]]), fr = {
3705
+ const FormInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a]]), componentInfo$4 = {
3492
3706
  name: "Form:Select",
3493
3707
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
3494
3708
  defaultStyles: {
@@ -3530,28 +3744,28 @@ const hr = /* @__PURE__ */ b(ur, [["render", mr]]), fr = {
3530
3744
  }],
3531
3745
  static: !0,
3532
3746
  noWrap: !0
3533
- }, br = f({
3747
+ }, _sfc_main$a = defineComponent({
3534
3748
  name: "builder-select-component",
3535
3749
  props: ["attributes", "value", "defaultValue", "name", "required", "options"],
3536
3750
  data() {
3537
- return { isEditing: E, filterAttrs: V };
3751
+ return { isEditing, filterAttrs };
3538
3752
  }
3539
- }), gr = ["value", "defaultValue", "name", "required"], yr = ["value"];
3540
- function kr(e, t, n, o, r, i) {
3541
- return c(), m("select", S({
3753
+ }), _hoisted_1$3 = ["value", "defaultValue", "name", "required"], _hoisted_2$1 = ["value"];
3754
+ function _sfc_render$9(e, t, n, o, r, i) {
3755
+ return openBlock(), createElementBlock("select", mergeProps({
3542
3756
  value: e.value,
3543
3757
  key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
3544
3758
  defaultValue: e.defaultValue,
3545
3759
  name: e.name,
3546
3760
  required: e.required
3547
- }, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
3548
- (c(!0), m(T, null, A(e.options, (s, l) => (c(), m("option", {
3761
+ }, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
3762
+ (openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.options, (s, l) => (openBlock(), createElementBlock("option", {
3549
3763
  key: `${s.name}-${l}`,
3550
3764
  value: s.value
3551
- }, te(s.name || s.value), 9, yr))), 128))
3552
- ], 16, gr);
3765
+ }, toDisplayString(s.name || s.value), 9, _hoisted_2$1))), 128))
3766
+ ], 16, _hoisted_1$3);
3553
3767
  }
3554
- const vr = /* @__PURE__ */ b(br, [["render", kr]]), Cr = {
3768
+ const FormSelect = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9]]), componentInfo$3 = {
3555
3769
  name: "Form:SubmitButton",
3556
3770
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
3557
3771
  defaultStyles: {
@@ -3576,17 +3790,17 @@ const vr = /* @__PURE__ */ b(br, [["render", kr]]), Cr = {
3576
3790
  // that only shows if advanced setting is flipped
3577
3791
  // TODO: defaultChildren
3578
3792
  // canHaveChildren: true,
3579
- }, Sr = f({
3793
+ }, _sfc_main$9 = defineComponent({
3580
3794
  name: "builder-submit-button",
3581
3795
  props: ["attributes", "text"],
3582
3796
  data() {
3583
- return { filterAttrs: V };
3797
+ return { filterAttrs };
3584
3798
  }
3585
3799
  });
3586
- function Tr(e, t, n, o, r, i) {
3587
- return c(), m("button", S({ type: "submit" }, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), te(e.text), 17);
3800
+ function _sfc_render$8(e, t, n, o, r, i) {
3801
+ 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);
3588
3802
  }
3589
- const wr = /* @__PURE__ */ b(Sr, [["render", Tr]]), Ir = {
3803
+ const FormSubmitButton = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8]]), componentInfo$2 = {
3590
3804
  name: "Form:TextArea",
3591
3805
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
3592
3806
  inputs: [{
@@ -3622,7 +3836,7 @@ const wr = /* @__PURE__ */ b(Sr, [["render", Tr]]), Ir = {
3622
3836
  },
3623
3837
  static: !0,
3624
3838
  noWrap: !0
3625
- }, $r = f({
3839
+ }, _sfc_main$8 = defineComponent({
3626
3840
  name: "builder-textarea",
3627
3841
  props: [
3628
3842
  "attributes",
@@ -3633,19 +3847,19 @@ const wr = /* @__PURE__ */ b(Sr, [["render", Tr]]), Ir = {
3633
3847
  "required"
3634
3848
  ],
3635
3849
  data() {
3636
- return { filterAttrs: V };
3850
+ return { filterAttrs };
3637
3851
  }
3638
- }), Rr = ["placeholder", "name", "value", "defaultValue", "required"];
3639
- function Er(e, t, n, o, r, i) {
3640
- return c(), m("textarea", S({
3852
+ }), _hoisted_1$2 = ["placeholder", "name", "value", "defaultValue", "required"];
3853
+ function _sfc_render$7(e, t, n, o, r, i) {
3854
+ return openBlock(), createElementBlock("textarea", mergeProps({
3641
3855
  placeholder: e.placeholder,
3642
3856
  name: e.name,
3643
3857
  value: e.value,
3644
3858
  defaultValue: e.defaultValue,
3645
3859
  required: e.required
3646
- }, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, Rr);
3860
+ }, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, _hoisted_1$2);
3647
3861
  }
3648
- const Br = /* @__PURE__ */ b($r, [["render", Er]]), Pr = {
3862
+ const Textarea = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7]]), componentInfo$1 = {
3649
3863
  // friendlyName?
3650
3864
  name: "Raw:Img",
3651
3865
  hideFromInsertMenu: !0,
@@ -3659,7 +3873,7 @@ const Br = /* @__PURE__ */ b($r, [["render", Er]]), Pr = {
3659
3873
  }],
3660
3874
  noWrap: !0,
3661
3875
  static: !0
3662
- }, xr = f({
3876
+ }, _sfc_main$7 = defineComponent({
3663
3877
  name: "builder-img-component",
3664
3878
  props: [
3665
3879
  "backgroundSize",
@@ -3670,11 +3884,11 @@ const Br = /* @__PURE__ */ b($r, [["render", Er]]), Pr = {
3670
3884
  "attributes"
3671
3885
  ],
3672
3886
  data() {
3673
- return { isEditing: E, filterAttrs: V };
3887
+ return { isEditing, filterAttrs };
3674
3888
  }
3675
- }), Ar = ["alt", "src"];
3676
- function Vr(e, t, n, o, r, i) {
3677
- return c(), m("img", S({
3889
+ }), _hoisted_1$1 = ["alt", "src"];
3890
+ function _sfc_render$6(e, t, n, o, r, i) {
3891
+ return openBlock(), createElementBlock("img", mergeProps({
3678
3892
  style: {
3679
3893
  objectFit: e.backgroundSize || "cover",
3680
3894
  objectPosition: e.backgroundPosition || "center"
@@ -3682,9 +3896,9 @@ function Vr(e, t, n, o, r, i) {
3682
3896
  key: e.isEditing() && e.imgSrc || "default-key",
3683
3897
  alt: e.altText,
3684
3898
  src: e.imgSrc || e.image
3685
- }, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, Ar);
3899
+ }, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, _hoisted_1$1);
3686
3900
  }
3687
- const Wr = /* @__PURE__ */ b(xr, [["render", Vr]]), Nr = {
3901
+ const Img = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]]), componentInfo = {
3688
3902
  name: "Video",
3689
3903
  canHaveChildren: !0,
3690
3904
  defaultStyles: {
@@ -3768,7 +3982,7 @@ const Wr = /* @__PURE__ */ b(xr, [["render", Vr]]), Nr = {
3768
3982
  shouldReceiveBuilderProps: {
3769
3983
  builderBlock: !0
3770
3984
  }
3771
- }, Fr = f({
3985
+ }, _sfc_main$6 = defineComponent({
3772
3986
  name: "builder-video",
3773
3987
  props: [
3774
3988
  "autoPlay",
@@ -3813,16 +4027,16 @@ const Wr = /* @__PURE__ */ b(xr, [["render", Vr]]), Nr = {
3813
4027
  };
3814
4028
  }
3815
4029
  }
3816
- }), Or = { style: {
4030
+ }), _hoisted_1 = { style: {
3817
4031
  position: "relative"
3818
- } }, Dr = ["preload", "src", "poster"], Lr = ["src"], Ur = {
4032
+ } }, _hoisted_2 = ["preload", "src", "poster"], _hoisted_3 = ["src"], _hoisted_4 = {
3819
4033
  key: 1,
3820
4034
  style: {
3821
4035
  display: "flex",
3822
4036
  flexDirection: "column",
3823
4037
  alignItems: "stretch"
3824
4038
  }
3825
- }, Mr = {
4039
+ }, _hoisted_5 = {
3826
4040
  key: 2,
3827
4041
  style: {
3828
4042
  pointerEvents: "none",
@@ -3836,10 +4050,10 @@ const Wr = /* @__PURE__ */ b(xr, [["render", Vr]]), Nr = {
3836
4050
  height: "100%"
3837
4051
  }
3838
4052
  };
3839
- function Hr(e, t, n, o, r, i) {
3840
- var s, l, a, u, h, d, p;
3841
- return c(), m("div", Or, [
3842
- z("video", S({
4053
+ function _sfc_render$5(e, t, n, o, r, i) {
4054
+ var s, l, a, d, p, c, u;
4055
+ return openBlock(), createElementBlock("div", _hoisted_1, [
4056
+ createElementVNode("video", mergeProps({
3843
4057
  class: "builder-video",
3844
4058
  preload: e.preload || "metadata",
3845
4059
  style: {
@@ -3859,87 +4073,87 @@ function Hr(e, t, n, o, r, i) {
3859
4073
  src: e.video || "no-src",
3860
4074
  poster: e.posterImage
3861
4075
  }, e.spreadProps), [
3862
- e.lazyLoad ? C("", !0) : (c(), m("source", {
4076
+ e.lazyLoad ? createCommentVNode("", !0) : (openBlock(), createElementBlock("source", {
3863
4077
  key: 0,
3864
4078
  type: "video/mp4",
3865
4079
  src: e.video
3866
- }, null, 8, Lr))
3867
- ], 16, Dr),
3868
- e.aspectRatio && !(e.fitContent && ((a = (l = e.builderBlock) == null ? void 0 : l.children) != null && a.length)) ? (c(), m("div", {
4080
+ }, null, 8, _hoisted_3))
4081
+ ], 16, _hoisted_2),
4082
+ e.aspectRatio && !(e.fitContent && ((a = (l = e.builderBlock) == null ? void 0 : l.children) != null && a.length)) ? (openBlock(), createElementBlock("div", {
3869
4083
  key: 0,
3870
- style: D({
4084
+ style: normalizeStyle({
3871
4085
  width: "100%",
3872
4086
  paddingTop: e.aspectRatio * 100 + "%",
3873
4087
  pointerEvents: "none",
3874
4088
  fontSize: "0px"
3875
4089
  })
3876
- }, null, 4)) : C("", !0),
3877
- (h = (u = e.builderBlock) == null ? void 0 : u.children) != null && h.length && e.fitContent ? (c(), m("div", Ur, [
3878
- P(e.$slots, "default")
3879
- ])) : C("", !0),
3880
- (p = (d = e.builderBlock) == null ? void 0 : d.children) != null && p.length && !e.fitContent ? (c(), m("div", Mr, [
3881
- P(e.$slots, "default")
3882
- ])) : C("", !0)
4090
+ }, null, 4)) : createCommentVNode("", !0),
4091
+ (p = (d = e.builderBlock) == null ? void 0 : d.children) != null && p.length && e.fitContent ? (openBlock(), createElementBlock("div", _hoisted_4, [
4092
+ renderSlot(e.$slots, "default")
4093
+ ])) : createCommentVNode("", !0),
4094
+ (u = (c = e.builderBlock) == null ? void 0 : c.children) != null && u.length && !e.fitContent ? (openBlock(), createElementBlock("div", _hoisted_5, [
4095
+ renderSlot(e.$slots, "default")
4096
+ ])) : createCommentVNode("", !0)
3883
4097
  ]);
3884
4098
  }
3885
- const jr = /* @__PURE__ */ b(Fr, [["render", Hr]]), Kr = () => [{
3886
- component: Jo,
3887
- ...jo
4099
+ const Video = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5]]), getExtraComponents = () => [{
4100
+ component: customCode,
4101
+ ...componentInfo$8
3888
4102
  }, {
3889
- component: er,
3890
- ...Go
4103
+ component: embed,
4104
+ ...componentInfo$7
3891
4105
  }, {
3892
- component: cr,
3893
- ...tr
4106
+ component: Form,
4107
+ ...componentInfo$6
3894
4108
  }, {
3895
- component: hr,
3896
- ...dr
4109
+ component: FormInput,
4110
+ ...componentInfo$5
3897
4111
  }, {
3898
- component: wr,
3899
- ...Cr
4112
+ component: FormSubmitButton,
4113
+ ...componentInfo$3
3900
4114
  }, {
3901
- component: vr,
3902
- ...fr
4115
+ component: FormSelect,
4116
+ ...componentInfo$4
3903
4117
  }, {
3904
- component: Br,
3905
- ...Ir
4118
+ component: Textarea,
4119
+ ...componentInfo$2
3906
4120
  }, {
3907
- component: Wr,
3908
- ...Pr
4121
+ component: Img,
4122
+ ...componentInfo$1
3909
4123
  }, {
3910
- component: jr,
3911
- ...Nr
3912
- }], Re = () => [{
3913
- component: wt,
3914
- ...So
4124
+ component: Video,
4125
+ ...componentInfo
4126
+ }], getDefaultRegisteredComponents = () => [{
4127
+ component: Button,
4128
+ ...componentInfo$h
3915
4129
  }, {
3916
- component: eo,
3917
- ...To
4130
+ component: Columns,
4131
+ ...componentInfo$g
3918
4132
  }, {
3919
- component: oo,
3920
- ...wo
4133
+ component: Fragment,
4134
+ ...componentInfo$f
3921
4135
  }, {
3922
- component: po,
3923
- ...Io
4136
+ component: Image,
4137
+ ...componentInfo$e
3924
4138
  }, {
3925
- component: fo,
3926
- ...$o
4139
+ component: Section,
4140
+ ...componentInfo$d
3927
4141
  }, {
3928
- component: Po,
3929
- ...Ro
4142
+ component: Slot,
4143
+ ...componentInfo$c
3930
4144
  }, {
3931
- component: Ii,
3932
- ...xo
4145
+ component: Symbol$1,
4146
+ ...componentInfo$b
3933
4147
  }, {
3934
- component: Ho,
3935
- ...Do
4148
+ component: Text,
4149
+ ...componentInfo$9
3936
4150
  }, {
3937
- component: Oo,
3938
- ...Ao
4151
+ component: Tabs,
4152
+ ...componentInfo$a
3939
4153
  }, {
3940
- component: Co,
3941
- ...bo
3942
- }, ...Kr()], qr = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
4154
+ component: Accordion,
4155
+ ...componentInfo$i
4156
+ }, ...getExtraComponents()], UPDATE_COOKIES_AND_STYLES_SCRIPT = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
3943
4157
  function getAndSetVariantId() {
3944
4158
  function setCookie(name, value, days) {
3945
4159
  let expires = '';
@@ -3995,7 +4209,7 @@ const jr = /* @__PURE__ */ b(Fr, [["render", Hr]]), Kr = () => [{
3995
4209
  }).join('');
3996
4210
  styleEl.innerHTML = newStyleStr;
3997
4211
  }
3998
- }`, zr = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
4212
+ }`, UPDATE_VARIANT_VISIBILITY_SCRIPT = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
3999
4213
  if (!navigator.cookieEnabled) {
4000
4214
  return;
4001
4215
  }
@@ -4029,27 +4243,27 @@ const jr = /* @__PURE__ */ b(Fr, [["render", Hr]]), Kr = () => [{
4029
4243
  thisScriptEl?.remove();
4030
4244
  }
4031
4245
  return;
4032
- }`, ot = "builderIoAbTest", rt = "builderIoRenderContent", Z = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
4246
+ }`, UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME = "builderIoAbTest", UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME = "builderIoRenderContent", getVariants = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
4033
4247
  ...t,
4034
4248
  testVariationId: t.id,
4035
4249
  id: e == null ? void 0 : e.id
4036
- })), Jr = ({
4250
+ })), checkShouldRenderVariants = ({
4037
4251
  canTrack: e,
4038
4252
  content: t
4039
- }) => !(!(Z(t).length > 0) || !e), Gr = (e) => e === "react" || e === "reactNative", it = Gr(x), Yr = () => `
4040
- window.${ot} = ${qr}
4041
- window.${rt} = ${zr}
4042
- `, Qr = (e, t) => `
4043
- window.${ot}(
4044
- "${t}",${JSON.stringify(e)}, ${it}
4045
- )`, Xr = ({
4253
+ }) => !(!(getVariants(t).length > 0) || !e), getIsHydrationTarget = (e) => e === "react" || e === "reactNative", isHydrationTarget = getIsHydrationTarget(TARGET), getInitVariantsFnsScriptString = () => `
4254
+ window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
4255
+ window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
4256
+ `, getUpdateCookieAndStylesScript = (e, t) => `
4257
+ window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}(
4258
+ "${t}",${JSON.stringify(e)}, ${isHydrationTarget}
4259
+ )`, getUpdateVariantVisibilityScript = ({
4046
4260
  contentId: e,
4047
4261
  variationId: t
4048
- }) => `window.${rt}(
4049
- "${t}", "${e}", ${it}
4050
- )`, st = f({
4262
+ }) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
4263
+ "${t}", "${e}", ${isHydrationTarget}
4264
+ )`, _sfc_main$5 = defineComponent({
4051
4265
  render() {
4052
- return Pe("script", {
4266
+ return h("script", {
4053
4267
  innerHTML: this.scriptStr,
4054
4268
  "data-id": this.id,
4055
4269
  nonce: this.nonce
@@ -4058,10 +4272,10 @@ const jr = /* @__PURE__ */ b(Fr, [["render", Hr]]), Kr = () => [{
4058
4272
  name: "inlined-script",
4059
4273
  props: ["scriptStr", "id", "nonce"]
4060
4274
  });
4061
- function Ee(e) {
4275
+ function round(e) {
4062
4276
  return Math.round(e * 1e3) / 1e3;
4063
4277
  }
4064
- const Zr = (e, t, n = !0) => {
4278
+ const findParentElement = (e, t, n = !0) => {
4065
4279
  if (!(e instanceof HTMLElement))
4066
4280
  return null;
4067
4281
  let o = n ? e : e.parentElement;
@@ -4072,35 +4286,35 @@ const Zr = (e, t, n = !0) => {
4072
4286
  return o;
4073
4287
  } while (o = o.parentElement);
4074
4288
  return null;
4075
- }, _r = (e) => Zr(e, (t) => {
4289
+ }, findBuilderParent = (e) => findParentElement(e, (t) => {
4076
4290
  const n = t.getAttribute("builder-id") || t.id;
4077
4291
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
4078
- }), Be = ({
4292
+ }), computeOffset = ({
4079
4293
  event: e,
4080
4294
  target: t
4081
4295
  }) => {
4082
- const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, i = Ee(o / n.width), s = Ee(r / n.height);
4296
+ const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, i = round(o / n.width), s = round(r / n.height);
4083
4297
  return {
4084
4298
  x: i,
4085
4299
  y: s
4086
4300
  };
4087
- }, ei = (e) => {
4088
- const t = e.target, n = t && _r(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
4301
+ }, getInteractionPropertiesForEvent = (e) => {
4302
+ const t = e.target, n = t && findBuilderParent(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
4089
4303
  return {
4090
4304
  targetBuilderElement: o || void 0,
4091
4305
  metadata: {
4092
- targetOffset: t ? Be({
4306
+ targetOffset: t ? computeOffset({
4093
4307
  event: e,
4094
4308
  target: t
4095
4309
  }) : void 0,
4096
- builderTargetOffset: n ? Be({
4310
+ builderTargetOffset: n ? computeOffset({
4097
4311
  event: e,
4098
4312
  target: n
4099
4313
  }) : void 0,
4100
4314
  builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
4101
4315
  }
4102
4316
  };
4103
- }, ti = (e) => {
4317
+ }, getCssFromFont = (e) => {
4104
4318
  var i;
4105
4319
  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);
4106
4320
  let r = "";
@@ -4126,15 +4340,15 @@ font-weight: ${s};
4126
4340
  `.trim());
4127
4341
  }
4128
4342
  return r;
4129
- }, ni = ({
4343
+ }, getFontCss = ({
4130
4344
  customFonts: e
4131
4345
  }) => {
4132
4346
  var t;
4133
- return ((t = e == null ? void 0 : e.map((n) => ti(n))) == null ? void 0 : t.join(" ")) || "";
4134
- }, oi = ({
4347
+ return ((t = e == null ? void 0 : e.map((n) => getCssFromFont(n))) == null ? void 0 : t.join(" ")) || "";
4348
+ }, getCss = ({
4135
4349
  cssCode: e,
4136
4350
  contentId: t
4137
- }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", ri = `
4351
+ }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", DEFAULT_STYLES = `
4138
4352
  .builder-button {
4139
4353
  all: unset;
4140
4354
  }
@@ -4151,9 +4365,9 @@ font-weight: ${s};
4151
4365
  text-align: inherit;
4152
4366
  font-family: inherit;
4153
4367
  }
4154
- `, ii = (e) => e ? "" : ri, si = (e) => `variant-${e}`, ai = f({
4368
+ `, getDefaultStyles = (e) => e ? "" : DEFAULT_STYLES, getWrapperClassName = (e) => `variant-${e}`, _sfc_main$4 = defineComponent({
4155
4369
  name: "enable-editor",
4156
- components: { DynamicDiv: Q },
4370
+ components: { DynamicDiv },
4157
4371
  props: [
4158
4372
  "builderContextSignal",
4159
4373
  "canTrack",
@@ -4175,25 +4389,25 @@ font-weight: ${s};
4175
4389
  httpReqsData: {},
4176
4390
  httpReqsPending: {},
4177
4391
  clicked: !1,
4178
- builderContext: le,
4179
- getWrapperClassName: si
4392
+ builderContext: BuilderContext,
4393
+ getWrapperClassName
4180
4394
  };
4181
4395
  },
4182
4396
  provide() {
4183
4397
  const e = this;
4184
4398
  return {
4185
- [le.key]: e.builderContextSignal
4399
+ [BuilderContext.key]: e.builderContextSignal
4186
4400
  };
4187
4401
  },
4188
4402
  mounted() {
4189
4403
  (() => {
4190
4404
  var n, o;
4191
- if ($()) {
4192
- if (E() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
4405
+ if (isBrowser()) {
4406
+ if (isEditing() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
4193
4407
  new CustomEvent("initeditingbldr")
4194
- ), this.builderContextSignal.content && Y(this.canTrack)) {
4408
+ ), this.builderContextSignal.content && getDefaultCanTrack(this.canTrack)) {
4195
4409
  const i = (n = this.builderContextSignal.content) == null ? void 0 : n.testVariationId, s = (o = this.builderContextSignal.content) == null ? void 0 : o.id, l = this.apiKey;
4196
- de({
4410
+ _track({
4197
4411
  type: "impression",
4198
4412
  canTrack: !0,
4199
4413
  contentId: s,
@@ -4201,12 +4415,12 @@ font-weight: ${s};
4201
4415
  variationId: i !== s ? i : void 0
4202
4416
  });
4203
4417
  }
4204
- Dt() && !E() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
4418
+ isPreviewing() && !isEditing() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
4205
4419
  new CustomEvent("initpreviewingbldr")
4206
4420
  );
4207
4421
  }
4208
4422
  })(), (() => {
4209
- this.apiKey || R.error(
4423
+ this.apiKey || logger.error(
4210
4424
  "No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
4211
4425
  ), this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
4212
4426
  })();
@@ -4252,7 +4466,7 @@ font-weight: ${s};
4252
4466
  }
4253
4467
  },
4254
4468
  unmounted() {
4255
- $() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
4469
+ isBrowser() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
4256
4470
  "builder:component:stateChangeListenerActivated",
4257
4471
  this.emitStateUpdate
4258
4472
  ));
@@ -4324,7 +4538,7 @@ font-weight: ${s};
4324
4538
  this.builderContextSignal.content = t;
4325
4539
  },
4326
4540
  processMessage(e) {
4327
- return qe({
4541
+ return createEditorListener({
4328
4542
  model: this.model,
4329
4543
  trustedHosts: this.trustedHosts,
4330
4544
  callbacks: {
@@ -4338,7 +4552,7 @@ font-weight: ${s};
4338
4552
  });
4339
4553
  },
4340
4554
  animation: (t) => {
4341
- _e(t);
4555
+ triggerAnimation(t);
4342
4556
  },
4343
4557
  contentUpdate: (t) => {
4344
4558
  this.mergeNewContent(t);
@@ -4349,7 +4563,7 @@ font-weight: ${s};
4349
4563
  evaluateJsCode() {
4350
4564
  var t, n;
4351
4565
  const e = (n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.jsCode;
4352
- e && G({
4566
+ e && evaluate({
4353
4567
  code: e,
4354
4568
  context: this.context || {},
4355
4569
  localState: void 0,
@@ -4365,13 +4579,13 @@ font-weight: ${s};
4365
4579
  var t, n;
4366
4580
  if (this.builderContextSignal.content) {
4367
4581
  const o = (t = this.builderContextSignal.content) == null ? void 0 : t.testVariationId, r = (n = this.builderContextSignal.content) == null ? void 0 : n.id;
4368
- de({
4582
+ _track({
4369
4583
  type: "click",
4370
- canTrack: Y(this.canTrack),
4584
+ canTrack: getDefaultCanTrack(this.canTrack),
4371
4585
  contentId: r,
4372
4586
  apiKey: this.apiKey,
4373
4587
  variationId: o !== r ? o : void 0,
4374
- ...ei(e),
4588
+ ...getInteractionPropertiesForEvent(e),
4375
4589
  unique: !this.clicked
4376
4590
  });
4377
4591
  }
@@ -4381,13 +4595,13 @@ font-weight: ${s};
4381
4595
  var t, n;
4382
4596
  const e = ((n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.httpRequests) ?? {};
4383
4597
  Object.entries(e).forEach(([o, r]) => {
4384
- if (!r || this.httpReqsPending[o] || this.httpReqsData[o] && !E())
4598
+ if (!r || this.httpReqsPending[o] || this.httpReqsData[o] && !isEditing())
4385
4599
  return;
4386
4600
  this.httpReqsPending[o] = !0;
4387
4601
  const i = r.replace(
4388
4602
  /{{([^}]+)}}/g,
4389
4603
  (s, l) => String(
4390
- G({
4604
+ evaluate({
4391
4605
  code: l,
4392
4606
  context: this.context || {},
4393
4607
  localState: void 0,
@@ -4397,7 +4611,7 @@ font-weight: ${s};
4397
4611
  })
4398
4612
  )
4399
4613
  );
4400
- Ye(i).then((s) => s.json()).then((s) => {
4614
+ fetch$1(i).then((s) => s.json()).then((s) => {
4401
4615
  this.mergeNewRootState({
4402
4616
  [o]: s
4403
4617
  }), this.httpReqsData[o] = !0;
@@ -4409,12 +4623,12 @@ font-weight: ${s};
4409
4623
  });
4410
4624
  },
4411
4625
  emitStateUpdate() {
4412
- E() && window.dispatchEvent(
4626
+ isEditing() && window.dispatchEvent(
4413
4627
  new CustomEvent(
4414
4628
  "builder:component:stateChange",
4415
4629
  {
4416
4630
  detail: {
4417
- state: pe(this.builderContextSignal.rootState),
4631
+ state: fastClone(this.builderContextSignal.rootState),
4418
4632
  ref: {
4419
4633
  name: this.model
4420
4634
  }
@@ -4424,7 +4638,7 @@ font-weight: ${s};
4424
4638
  );
4425
4639
  },
4426
4640
  elementRef_onIniteditingbldr(e) {
4427
- window.addEventListener("message", this.processMessage), ln(), Ke({
4641
+ window.addEventListener("message", this.processMessage), registerInsertMenu(), setupBrowserForEditing({
4428
4642
  ...this.locale ? {
4429
4643
  locale: this.locale
4430
4644
  } : {},
@@ -4438,7 +4652,7 @@ font-weight: ${s};
4438
4652
  this.builderContextSignal.componentInfos
4439
4653
  ).forEach((t) => {
4440
4654
  var o;
4441
- const n = Lt(t);
4655
+ const n = createRegisterComponentMessage(t);
4442
4656
  (o = window.parent) == null || o.postMessage(n, "*");
4443
4657
  }), window.addEventListener(
4444
4658
  "builder:component:stateChangeListenerActivated",
@@ -4449,7 +4663,7 @@ font-weight: ${s};
4449
4663
  const t = new URL(location.href).searchParams, n = t.get("builder.preview"), o = t.get(
4450
4664
  `builder.overrides.${n}`
4451
4665
  ), r = t.get("apiKey") || t.get("builder.space");
4452
- n === this.model && r === this.apiKey && (!this.content || o === this.content.id) && be({
4666
+ n === this.model && r === this.apiKey && (!this.content || o === this.content.id) && fetchOneEntry({
4453
4667
  model: this.model,
4454
4668
  apiKey: this.apiKey,
4455
4669
  apiVersion: this.builderContextSignal.apiVersion
@@ -4459,52 +4673,52 @@ font-weight: ${s};
4459
4673
  }
4460
4674
  }
4461
4675
  });
4462
- function li(e, t, n, o, r, i) {
4676
+ function _sfc_render$4(e, t, n, o, r, i) {
4463
4677
  var s, l, a;
4464
- return e.builderContextSignal.content ? (c(), g(K(e.ContentWrapper), S({
4678
+ return e.builderContextSignal.content ? (openBlock(), createBlock(resolveDynamicComponent(e.ContentWrapper), mergeProps({
4465
4679
  key: 0,
4466
4680
  ref: "elementRef",
4467
- onClick: (u) => e.onClick(u),
4681
+ onClick: (d) => e.onClick(d),
4468
4682
  "builder-content-id": (s = e.builderContextSignal.content) == null ? void 0 : s.id,
4469
4683
  "builder-model": e.model,
4470
4684
  class: e.getWrapperClassName(((l = e.content) == null ? void 0 : l.testVariationId) || ((a = e.content) == null ? void 0 : a.id)),
4471
- onIniteditingbldr: (u) => e.elementRef_onIniteditingbldr(u),
4472
- onInitpreviewingbldr: (u) => e.elementRef_onInitpreviewingbldr(u)
4685
+ onIniteditingbldr: (d) => e.elementRef_onIniteditingbldr(d),
4686
+ onInitpreviewingbldr: (d) => e.elementRef_onInitpreviewingbldr(d)
4473
4687
  }, { ...e.showContentProps, ...e.contentWrapperProps }), {
4474
- default: N(() => [
4475
- P(e.$slots, "default")
4688
+ default: withCtx(() => [
4689
+ renderSlot(e.$slots, "default")
4476
4690
  ]),
4477
4691
  _: 3
4478
- }, 16, ["onClick", "builder-content-id", "builder-model", "class", "onIniteditingbldr", "onInitpreviewingbldr"])) : C("", !0);
4692
+ }, 16, ["onClick", "builder-content-id", "builder-model", "class", "onIniteditingbldr", "onInitpreviewingbldr"])) : createCommentVNode("", !0);
4479
4693
  }
4480
- const ci = /* @__PURE__ */ b(ai, [["render", li]]), di = f({
4694
+ const EnableEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]), _sfc_main$3 = defineComponent({
4481
4695
  name: "content-styles",
4482
- components: { InlinedStyles: ke },
4696
+ components: { InlinedStyles: _sfc_main$n },
4483
4697
  props: ["cssCode", "contentId", "customFonts", "isNestedRender", "nonce"],
4484
4698
  data() {
4485
4699
  return {
4486
4700
  injectedStyles: `
4487
- ${oi({
4701
+ ${getCss({
4488
4702
  cssCode: this.cssCode,
4489
4703
  contentId: this.contentId
4490
4704
  })}
4491
- ${ni({
4705
+ ${getFontCss({
4492
4706
  customFonts: this.customFonts
4493
4707
  })}
4494
- ${ii(this.isNestedRender)}
4708
+ ${getDefaultStyles(this.isNestedRender)}
4495
4709
  `.trim()
4496
4710
  };
4497
4711
  }
4498
4712
  });
4499
- function ui(e, t, n, o, r, i) {
4500
- const s = y("InlinedStyles");
4501
- return c(), g(s, {
4713
+ function _sfc_render$3(e, t, n, o, r, i) {
4714
+ const s = resolveComponent("InlinedStyles");
4715
+ return openBlock(), createBlock(s, {
4502
4716
  id: "builderio-content",
4503
4717
  styles: e.injectedStyles,
4504
4718
  nonce: e.nonce
4505
4719
  }, null, 8, ["styles", "nonce"]);
4506
4720
  }
4507
- const pi = /* @__PURE__ */ b(di, [["render", ui]]), mi = ({
4721
+ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]), getRootStateInitialValue = ({
4508
4722
  content: e,
4509
4723
  data: t,
4510
4724
  locale: n
@@ -4521,7 +4735,7 @@ const pi = /* @__PURE__ */ b(di, [["render", ui]]), mi = ({
4521
4735
  locale: n
4522
4736
  } : {}
4523
4737
  };
4524
- }, hi = ({
4738
+ }, getContentInitialValue = ({
4525
4739
  content: e,
4526
4740
  data: t
4527
4741
  }) => e ? {
@@ -4531,14 +4745,14 @@ const pi = /* @__PURE__ */ b(di, [["render", ui]]), mi = ({
4531
4745
  ...t
4532
4746
  },
4533
4747
  meta: e == null ? void 0 : e.meta
4534
- } : void 0, fi = ut, bi = f({
4748
+ } : void 0, wrapComponentRef = markRaw, _sfc_main$2 = defineComponent({
4535
4749
  name: "content-component",
4536
4750
  components: {
4537
- EnableEditor: ci,
4538
- InlinedScript: st,
4539
- ContentStyles: pi,
4540
- Blocks: M,
4541
- DynamicDiv: Q
4751
+ EnableEditor,
4752
+ InlinedScript: _sfc_main$5,
4753
+ ContentStyles,
4754
+ Blocks,
4755
+ DynamicDiv
4542
4756
  },
4543
4757
  props: [
4544
4758
  "content",
@@ -4565,32 +4779,32 @@ const pi = /* @__PURE__ */ b(di, [["render", ui]]), mi = ({
4565
4779
  data() {
4566
4780
  var e, t, n, o;
4567
4781
  return {
4568
- scriptStr: Xr({
4782
+ scriptStr: getUpdateVariantVisibilityScript({
4569
4783
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
4570
4784
  variationId: (e = this.content) == null ? void 0 : e.testVariationId,
4571
4785
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
4572
4786
  contentId: (t = this.content) == null ? void 0 : t.id
4573
4787
  }),
4574
4788
  registeredComponents: [
4575
- ...Re(),
4789
+ ...getDefaultRegisteredComponents(),
4576
4790
  ...((n = this.customComponents) == null ? void 0 : n.filter(({ models: r }) => !(r != null && r.length) || !this.model ? !0 : r.includes(this.model))) || []
4577
4791
  ].reduce(
4578
4792
  (r, { component: i, ...s }) => ({
4579
4793
  ...r,
4580
4794
  [s.name]: {
4581
- component: fi(i),
4582
- ...ee(s)
4795
+ component: wrapComponentRef(i),
4796
+ ...serializeIncludingFunctions(s)
4583
4797
  }
4584
4798
  }),
4585
4799
  {}
4586
4800
  ),
4587
4801
  builderContextSignal: {
4588
- content: hi({
4802
+ content: getContentInitialValue({
4589
4803
  content: this.content,
4590
4804
  data: this.data
4591
4805
  }),
4592
4806
  localState: void 0,
4593
- rootState: mi({
4807
+ rootState: getRootStateInitialValue({
4594
4808
  content: this.content,
4595
4809
  data: this.data,
4596
4810
  locale: this.locale
@@ -4601,12 +4815,12 @@ const pi = /* @__PURE__ */ b(di, [["render", ui]]), mi = ({
4601
4815
  apiKey: this.apiKey,
4602
4816
  apiVersion: this.apiVersion,
4603
4817
  componentInfos: [
4604
- ...Re(),
4818
+ ...getDefaultRegisteredComponents(),
4605
4819
  ...((o = this.customComponents) == null ? void 0 : o.filter(({ models: r }) => !(r != null && r.length) || !this.model ? !0 : r.includes(this.model))) || []
4606
4820
  ].reduce(
4607
4821
  (r, { component: i, ...s }) => ({
4608
4822
  ...r,
4609
- [s.name]: ee(s)
4823
+ [s.name]: serializeIncludingFunctions(s)
4610
4824
  }),
4611
4825
  {}
4612
4826
  ),
@@ -4615,13 +4829,13 @@ const pi = /* @__PURE__ */ b(di, [["render", ui]]), mi = ({
4615
4829
  BlocksWrapperProps: this.blocksWrapperProps || {},
4616
4830
  nonce: this.nonce || ""
4617
4831
  },
4618
- TARGET: x
4832
+ TARGET
4619
4833
  };
4620
4834
  },
4621
4835
  provide() {
4622
4836
  const e = this;
4623
4837
  return {
4624
- [Ve.key]: {
4838
+ [ComponentsContext.key]: {
4625
4839
  registeredComponents: e.registeredComponents
4626
4840
  }
4627
4841
  };
@@ -4632,9 +4846,9 @@ const pi = /* @__PURE__ */ b(di, [["render", ui]]), mi = ({
4632
4846
  }
4633
4847
  }
4634
4848
  });
4635
- function gi(e, t, n, o, r, i) {
4636
- const s = y("InlinedScript"), l = y("ContentStyles"), a = y("Blocks"), u = y("EnableEditor");
4637
- return c(), g(u, S({
4849
+ function _sfc_render$2(e, t, n, o, r, i) {
4850
+ const s = resolveComponent("InlinedScript"), l = resolveComponent("ContentStyles"), a = resolveComponent("Blocks"), d = resolveComponent("EnableEditor");
4851
+ return openBlock(), createBlock(d, mergeProps({
4638
4852
  nonce: e.nonce,
4639
4853
  content: e.content,
4640
4854
  data: e.data,
@@ -4650,25 +4864,25 @@ function gi(e, t, n, o, r, i) {
4650
4864
  contentWrapperProps: e.contentWrapperProps,
4651
4865
  trustedHosts: e.trustedHosts
4652
4866
  }, {}), {
4653
- default: N(() => {
4654
- var h, d, p, k, v, F, X;
4867
+ default: withCtx(() => {
4868
+ var p, c, u, f, m, b, C;
4655
4869
  return [
4656
- e.isSsrAbTest ? (c(), g(s, {
4870
+ e.isSsrAbTest ? (openBlock(), createBlock(s, {
4657
4871
  key: 0,
4658
4872
  id: "builderio-variant-visibility",
4659
4873
  scriptStr: e.scriptStr,
4660
4874
  nonce: e.nonce || ""
4661
- }, null, 8, ["scriptStr", "nonce"])) : C("", !0),
4662
- e.TARGET !== "reactNative" ? (c(), g(l, {
4875
+ }, null, 8, ["scriptStr", "nonce"])) : createCommentVNode("", !0),
4876
+ e.TARGET !== "reactNative" ? (openBlock(), createBlock(l, {
4663
4877
  key: 1,
4664
4878
  nonce: e.nonce || "",
4665
4879
  isNestedRender: e.isNestedRender,
4666
- contentId: (h = e.builderContextSignal.content) == null ? void 0 : h.id,
4667
- cssCode: (p = (d = e.builderContextSignal.content) == null ? void 0 : d.data) == null ? void 0 : p.cssCode,
4668
- customFonts: (v = (k = e.builderContextSignal.content) == null ? void 0 : k.data) == null ? void 0 : v.customFonts
4669
- }, null, 8, ["nonce", "isNestedRender", "contentId", "cssCode", "customFonts"])) : C("", !0),
4670
- I(a, {
4671
- blocks: (X = (F = e.builderContextSignal.content) == null ? void 0 : F.data) == null ? void 0 : X.blocks,
4880
+ contentId: (p = e.builderContextSignal.content) == null ? void 0 : p.id,
4881
+ cssCode: (u = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : u.cssCode,
4882
+ customFonts: (m = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : m.customFonts
4883
+ }, null, 8, ["nonce", "isNestedRender", "contentId", "cssCode", "customFonts"])) : createCommentVNode("", !0),
4884
+ createVNode(a, {
4885
+ blocks: (C = (b = e.builderContextSignal.content) == null ? void 0 : b.data) == null ? void 0 : C.blocks,
4672
4886
  context: e.builderContextSignal,
4673
4887
  registeredComponents: e.registeredComponents,
4674
4888
  linkComponent: e.linkComponent
@@ -4678,12 +4892,12 @@ function gi(e, t, n, o, r, i) {
4678
4892
  _: 1
4679
4893
  }, 16, ["nonce", "content", "data", "model", "context", "apiKey", "canTrack", "locale", "enrich", "showContent", "builderContextSignal", "contentWrapper", "contentWrapperProps", "trustedHosts"]);
4680
4894
  }
4681
- const yi = /* @__PURE__ */ b(bi, [["render", gi]]), ki = f({
4895
+ const ContentComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]), _sfc_main$1 = defineComponent({
4682
4896
  name: "content-variants",
4683
4897
  components: {
4684
- InlinedScript: st,
4685
- InlinedStyles: ke,
4686
- ContentComponent: yi
4898
+ InlinedScript: _sfc_main$5,
4899
+ InlinedStyles: _sfc_main$n,
4900
+ ContentComponent
4687
4901
  },
4688
4902
  props: [
4689
4903
  "canTrack",
@@ -4707,13 +4921,13 @@ const yi = /* @__PURE__ */ b(bi, [["render", gi]]), ki = f({
4707
4921
  ],
4708
4922
  data() {
4709
4923
  return {
4710
- shouldRenderVariants: Jr({
4711
- canTrack: Y(this.canTrack),
4924
+ shouldRenderVariants: checkShouldRenderVariants({
4925
+ canTrack: getDefaultCanTrack(this.canTrack),
4712
4926
  content: this.content
4713
4927
  }),
4714
- TARGET: x,
4715
- getInitVariantsFnsScriptString: Yr,
4716
- getVariants: Z
4928
+ TARGET,
4929
+ getInitVariantsFnsScriptString,
4930
+ getVariants
4717
4931
  };
4718
4932
  },
4719
4933
  mounted() {
@@ -4721,8 +4935,8 @@ const yi = /* @__PURE__ */ b(bi, [["render", gi]]), ki = f({
4721
4935
  computed: {
4722
4936
  updateCookieAndStylesScriptStr() {
4723
4937
  var e;
4724
- return Qr(
4725
- Z(this.content).map((t) => ({
4938
+ return getUpdateCookieAndStylesScript(
4939
+ getVariants(this.content).map((t) => ({
4726
4940
  id: t.testVariationId,
4727
4941
  testRatio: t.testRatio
4728
4942
  })),
@@ -4730,45 +4944,45 @@ const yi = /* @__PURE__ */ b(bi, [["render", gi]]), ki = f({
4730
4944
  );
4731
4945
  },
4732
4946
  hideVariantsStyleString() {
4733
- return Z(this.content).map((e) => `.variant-${e.testVariationId} { display: none; } `).join("");
4947
+ return getVariants(this.content).map((e) => `.variant-${e.testVariationId} { display: none; } `).join("");
4734
4948
  },
4735
4949
  defaultContent() {
4736
4950
  var e;
4737
4951
  return this.shouldRenderVariants ? {
4738
4952
  ...this.content,
4739
4953
  testVariationId: (e = this.content) == null ? void 0 : e.id
4740
- } : hn({
4954
+ } : handleABTestingSync({
4741
4955
  item: this.content,
4742
- canTrack: Y(this.canTrack)
4956
+ canTrack: getDefaultCanTrack(this.canTrack)
4743
4957
  });
4744
4958
  }
4745
4959
  }
4746
4960
  });
4747
- function vi(e, t, n, o, r, i) {
4748
- const s = y("InlinedScript"), l = y("InlinedStyles"), a = y("ContentComponent");
4749
- return c(), m(T, null, [
4750
- !e.isNestedRender && e.TARGET !== "reactNative" ? (c(), g(s, {
4961
+ function _sfc_render$1(e, t, n, o, r, i) {
4962
+ const s = resolveComponent("InlinedScript"), l = resolveComponent("InlinedStyles"), a = resolveComponent("ContentComponent");
4963
+ return openBlock(), createElementBlock(Fragment$1, null, [
4964
+ !e.isNestedRender && e.TARGET !== "reactNative" ? (openBlock(), createBlock(s, {
4751
4965
  key: 0,
4752
4966
  id: "builderio-init-variants-fns",
4753
4967
  scriptStr: e.getInitVariantsFnsScriptString(),
4754
4968
  nonce: e.nonce || ""
4755
- }, null, 8, ["scriptStr", "nonce"])) : C("", !0),
4756
- e.shouldRenderVariants ? (c(), m(T, { key: 1 }, [
4757
- I(l, {
4969
+ }, null, 8, ["scriptStr", "nonce"])) : createCommentVNode("", !0),
4970
+ e.shouldRenderVariants ? (openBlock(), createElementBlock(Fragment$1, { key: 1 }, [
4971
+ createVNode(l, {
4758
4972
  id: "builderio-variants",
4759
4973
  styles: e.hideVariantsStyleString,
4760
4974
  nonce: e.nonce || ""
4761
4975
  }, null, 8, ["styles", "nonce"]),
4762
- I(s, {
4976
+ createVNode(s, {
4763
4977
  id: "builderio-variants-visibility",
4764
4978
  scriptStr: e.updateCookieAndStylesScriptStr,
4765
4979
  nonce: e.nonce || ""
4766
4980
  }, null, 8, ["scriptStr", "nonce"]),
4767
- (c(!0), m(T, null, A(e.getVariants(e.content), (u, h) => (c(), g(a, S({
4768
- key: u.testVariationId,
4981
+ (openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.getVariants(e.content), (d, p) => (openBlock(), createBlock(a, mergeProps({
4982
+ key: d.testVariationId,
4769
4983
  isNestedRender: e.isNestedRender,
4770
4984
  nonce: e.nonce,
4771
- content: u,
4985
+ content: d,
4772
4986
  showContent: !1,
4773
4987
  model: e.model,
4774
4988
  data: e.data,
@@ -4787,8 +5001,8 @@ function vi(e, t, n, o, r, i) {
4787
5001
  contentWrapperProps: e.contentWrapperProps,
4788
5002
  trustedHosts: e.trustedHosts
4789
5003
  }, {}), null, 16, ["isNestedRender", "nonce", "content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"]))), 128))
4790
- ], 64)) : C("", !0),
4791
- I(a, S({
5004
+ ], 64)) : createCommentVNode("", !0),
5005
+ createVNode(a, mergeProps({
4792
5006
  nonce: e.nonce,
4793
5007
  isNestedRender: e.isNestedRender,
4794
5008
  content: e.defaultContent,
@@ -4814,13 +5028,13 @@ function vi(e, t, n, o, r, i) {
4814
5028
  }), null, 16, ["nonce", "isNestedRender", "content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"])
4815
5029
  ], 64);
4816
5030
  }
4817
- const Ci = /* @__PURE__ */ b(ki, [["render", vi]]), Si = async ({
5031
+ const ContentVariants = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]), fetchSymbolContent = async ({
4818
5032
  builderContextValue: e,
4819
5033
  symbol: t
4820
5034
  }) => {
4821
5035
  if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
4822
5036
  (e != null && e.apiKey))
4823
- return be({
5037
+ return fetchOneEntry({
4824
5038
  model: t.model,
4825
5039
  apiKey: e.apiKey,
4826
5040
  apiVersion: e.apiVersion,
@@ -4830,11 +5044,11 @@ const Ci = /* @__PURE__ */ b(ki, [["render", vi]]), Si = async ({
4830
5044
  }
4831
5045
  }
4832
5046
  }).catch((n) => {
4833
- R.error("Could not fetch symbol content: ", n);
5047
+ logger.error("Could not fetch symbol content: ", n);
4834
5048
  });
4835
- }, Ti = f({
5049
+ }, _sfc_main = defineComponent({
4836
5050
  name: "builder-symbol",
4837
- components: { ContentVariants: Ci, DynamicDiv: Q },
5051
+ components: { ContentVariants, DynamicDiv },
4838
5052
  props: [
4839
5053
  "symbol",
4840
5054
  "attributes",
@@ -4846,7 +5060,7 @@ const Ci = /* @__PURE__ */ b(ki, [["render", vi]]), Si = async ({
4846
5060
  ],
4847
5061
  data() {
4848
5062
  var e;
4849
- return { contentToUse: (e = this.symbol) == null ? void 0 : e.content, filterAttrs: V };
5063
+ return { contentToUse: (e = this.symbol) == null ? void 0 : e.content, filterAttrs };
4850
5064
  },
4851
5065
  mounted() {
4852
5066
  this.setContent();
@@ -4869,7 +5083,7 @@ const Ci = /* @__PURE__ */ b(ki, [["render", vi]]), Si = async ({
4869
5083
  className() {
4870
5084
  var e, t;
4871
5085
  return [
4872
- this.attributes[_()],
5086
+ this.attributes[getClassPropName()],
4873
5087
  "builder-symbol",
4874
5088
  (e = this.symbol) != null && e.inline ? "builder-inline-symbol" : void 0,
4875
5089
  (t = this.symbol) != null && t.dynamic || this.dynamic ? "builder-dynamic-symbol" : void 0
@@ -4883,7 +5097,7 @@ const Ci = /* @__PURE__ */ b(ki, [["render", vi]]), Si = async ({
4883
5097
  },
4884
5098
  methods: {
4885
5099
  setContent() {
4886
- this.contentToUse || Si({
5100
+ this.contentToUse || fetchSymbolContent({
4887
5101
  symbol: this.symbol,
4888
5102
  builderContextValue: this.builderContext
4889
5103
  }).then((e) => {
@@ -4892,11 +5106,11 @@ const Ci = /* @__PURE__ */ b(ki, [["render", vi]]), Si = async ({
4892
5106
  }
4893
5107
  }
4894
5108
  });
4895
- function wi(e, t, n, o, r, i) {
4896
- var l, a, u, h, d;
4897
- const s = y("ContentVariants");
4898
- return c(), m("div", S({ class: e.className }, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
4899
- I(s, {
5109
+ function _sfc_render(e, t, n, o, r, i) {
5110
+ var l, a, d, p, c;
5111
+ const s = resolveComponent("ContentVariants");
5112
+ return openBlock(), createElementBlock("div", mergeProps({ class: e.className }, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
5113
+ createVNode(s, {
4900
5114
  nonce: e.builderContext.nonce,
4901
5115
  isNestedRender: !0,
4902
5116
  apiVersion: e.builderContext.apiVersion,
@@ -4909,10 +5123,10 @@ function wi(e, t, n, o, r, i) {
4909
5123
  data: {
4910
5124
  ...(a = e.symbol) == null ? void 0 : a.data,
4911
5125
  ...e.builderContext.localState,
4912
- ...(h = (u = e.contentToUse) == null ? void 0 : u.data) == null ? void 0 : h.state
5126
+ ...(p = (d = e.contentToUse) == null ? void 0 : d.data) == null ? void 0 : p.state
4913
5127
  },
4914
5128
  canTrack: e.builderContext.canTrack,
4915
- model: (d = e.symbol) == null ? void 0 : d.model,
5129
+ model: (c = e.symbol) == null ? void 0 : c.model,
4916
5130
  content: e.contentToUse,
4917
5131
  linkComponent: e.builderLinkComponent,
4918
5132
  blocksWrapper: e.blocksWrapper,
@@ -4920,42 +5134,44 @@ function wi(e, t, n, o, r, i) {
4920
5134
  }, null, 8, ["nonce", "apiVersion", "apiKey", "context", "customComponents", "data", "canTrack", "model", "content", "linkComponent", "blocksWrapper", "contentWrapper"])
4921
5135
  ], 16);
4922
5136
  }
4923
- const Ii = /* @__PURE__ */ b(Ti, [["render", wi]]);
5137
+ const Symbol$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
4924
5138
  export {
4925
- Bi as A,
4926
- ye as B,
4927
- eo as C,
4928
- Fi as D,
4929
- oo as F,
4930
- po as I,
4931
- fo as S,
4932
- Ho as T,
4933
- jr as V,
4934
- ke as _,
4935
- Wi as a,
4936
- Oi as b,
4937
- L as c,
4938
- ge as d,
4939
- b as e,
4940
- G as f,
4941
- Qn as g,
4942
- Ni as h,
4943
- _ as i,
4944
- le as j,
4945
- wt as k,
4946
- Ii as l,
4947
- M as m,
4948
- Ci as n,
4949
- Dt as o,
4950
- Lt as p,
4951
- Ne as q,
4952
- Mt as r,
4953
- Pi as s,
4954
- xi as t,
4955
- Ai as u,
4956
- Vi as v,
4957
- fi as w,
4958
- Cn as x,
4959
- Sn as y,
4960
- be as z
5139
+ fetchEntries as A,
5140
+ Block as B,
5141
+ Columns as C,
5142
+ fetchOneEntry as D,
5143
+ dynamicRenderer as E,
5144
+ Fragment as F,
5145
+ block as G,
5146
+ Image as I,
5147
+ Section as S,
5148
+ TARGET as T,
5149
+ Video as V,
5150
+ _sfc_main$n as _,
5151
+ createCssClass as a,
5152
+ getMaxWidthQueryForSize as b,
5153
+ checkIsDefined as c,
5154
+ camelToKebabCase as d,
5155
+ _export_sfc as e,
5156
+ evaluate as f,
5157
+ getSizesForBreakpoints as g,
5158
+ getStyle as h,
5159
+ getClassPropName as i,
5160
+ BuilderContext as j,
5161
+ Button as k,
5162
+ Symbol$1 as l,
5163
+ Text as m,
5164
+ Blocks as n,
5165
+ ContentVariants as o,
5166
+ isEditing as p,
5167
+ isPreviewing as q,
5168
+ createRegisterComponentMessage as r,
5169
+ register as s,
5170
+ setEditorSettings as t,
5171
+ getBuilderSearchParams as u,
5172
+ track as v,
5173
+ wrapComponentRef as w,
5174
+ subscribeToEditor as x,
5175
+ fetchBuilderProps as y,
5176
+ _processContentResult as z
4961
5177
  };