@builder.io/sdk-vue 0.0.1-9 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +44 -0
  3. package/dist/vue-2/block-styles.3f130795.js +67 -0
  4. package/dist/vue-2/block-styles.da610cf5.cjs +10 -0
  5. package/dist/vue-2/get-processed-block.2bcd0d2b.cjs +1 -0
  6. package/dist/vue-2/get-processed-block.c01e4ddc.js +44 -0
  7. package/dist/vue-2/index.0622ae10.js +1996 -0
  8. package/dist/vue-2/index.dcdf302c.cjs +4 -0
  9. package/dist/vue-2/render-block.bdaa8069.js +243 -0
  10. package/dist/vue-2/render-block.f41ce0b2.cjs +3 -0
  11. package/dist/vue-2/render-inlined-styles.7974da9f.js +31 -0
  12. package/dist/vue-2/render-inlined-styles.b3a06398.cjs +1 -0
  13. package/dist/vue-2/render-repeated-block.c2b982e3.js +45 -0
  14. package/dist/vue-2/render-repeated-block.f36a831f.cjs +1 -0
  15. package/dist/vue-2/render-styles.354823a4.js +65 -0
  16. package/dist/vue-2/render-styles.4b5b2368.cjs +17 -0
  17. package/dist/vue-2/sdk.cjs +1 -0
  18. package/dist/vue-2/sdk.js +27 -0
  19. package/dist/vue-2/style.css +1 -0
  20. package/dist/vue-3/block-styles.76754b24.js +64 -0
  21. package/dist/vue-3/block-styles.e17850cc.cjs +10 -0
  22. package/dist/vue-3/get-processed-block.2dd25223.cjs +1 -0
  23. package/dist/vue-3/get-processed-block.6eaca128.js +44 -0
  24. package/dist/vue-3/index.3e132178.js +78896 -0
  25. package/dist/vue-3/index.475f52c7.cjs +1 -0
  26. package/dist/vue-3/index.52915610.js +1969 -0
  27. package/dist/vue-3/index.91387fc2.cjs +4 -0
  28. package/dist/vue-3/render-block.369b7818.js +255 -0
  29. package/dist/vue-3/render-block.c9718d52.cjs +3 -0
  30. package/dist/vue-3/render-inlined-styles.2a3eeef4.cjs +1 -0
  31. package/dist/vue-3/render-inlined-styles.af201a11.js +30 -0
  32. package/dist/vue-3/render-repeated-block.4266e559.js +40 -0
  33. package/dist/vue-3/render-repeated-block.b4a6d591.cjs +1 -0
  34. package/dist/vue-3/render-styles.1744d2eb.js +59 -0
  35. package/dist/vue-3/render-styles.7d5898dd.cjs +17 -0
  36. package/dist/vue-3/sdk.cjs +1 -0
  37. package/dist/vue-3/sdk.js +28 -0
  38. package/dist/vue-3/style.css +1 -0
  39. package/nuxt.js +25 -0
  40. package/package.json +38 -5
  41. package/src/blocks/button.js +0 -31
  42. package/src/blocks/button.original.vue +0 -48
  43. package/src/blocks/button_script.js +0 -21
  44. package/src/blocks/button_styles.js +0 -0
  45. package/src/blocks/columns.js +0 -31
  46. package/src/blocks/columns.original.vue +0 -59
  47. package/src/blocks/columns_script.js +0 -58
  48. package/src/blocks/columns_styles.js +0 -14
  49. package/src/blocks/custom-code.js +0 -31
  50. package/src/blocks/custom-code.original.vue +0 -72
  51. package/src/blocks/custom-code_script.js +0 -63
  52. package/src/blocks/custom-code_styles.js +0 -0
  53. package/src/blocks/embed.js +0 -31
  54. package/src/blocks/embed.original.vue +0 -64
  55. package/src/blocks/embed_script.js +0 -53
  56. package/src/blocks/embed_styles.js +0 -0
  57. package/src/blocks/form.js +0 -31
  58. package/src/blocks/form.original.vue +0 -289
  59. package/src/blocks/form_script.js +0 -231
  60. package/src/blocks/form_styles.js +0 -12
  61. package/src/blocks/fragment.js +0 -31
  62. package/src/blocks/fragment.original.vue +0 -28
  63. package/src/blocks/fragment_script.js +0 -40
  64. package/src/blocks/fragment_styles.js +0 -0
  65. package/src/blocks/image.js +0 -31
  66. package/src/blocks/image.original.vue +0 -52
  67. package/src/blocks/image_script.js +0 -32
  68. package/src/blocks/image_styles.js +0 -13
  69. package/src/blocks/img.js +0 -31
  70. package/src/blocks/img.original.vue +0 -31
  71. package/src/blocks/img_script.js +0 -42
  72. package/src/blocks/img_styles.js +0 -0
  73. package/src/blocks/input.js +0 -31
  74. package/src/blocks/input.original.vue +0 -28
  75. package/src/blocks/input_script.js +0 -39
  76. package/src/blocks/input_styles.js +0 -0
  77. package/src/blocks/raw-text.js +0 -31
  78. package/src/blocks/raw-text.original.vue +0 -35
  79. package/src/blocks/raw-text_script.js +0 -32
  80. package/src/blocks/raw-text_styles.js +0 -0
  81. package/src/blocks/section.js +0 -31
  82. package/src/blocks/section.original.vue +0 -29
  83. package/src/blocks/section_script.js +0 -23
  84. package/src/blocks/section_styles.js +0 -0
  85. package/src/blocks/select.js +0 -31
  86. package/src/blocks/select.original.vue +0 -32
  87. package/src/blocks/select_script.js +0 -41
  88. package/src/blocks/select_styles.js +0 -0
  89. package/src/blocks/submit-button.js +0 -31
  90. package/src/blocks/submit-button.original.vue +0 -27
  91. package/src/blocks/submit-button_script.js +0 -21
  92. package/src/blocks/submit-button_styles.js +0 -0
  93. package/src/blocks/symbol.js +0 -29
  94. package/src/blocks/symbol.original.vue +0 -33
  95. package/src/blocks/symbol_script.js +0 -44
  96. package/src/blocks/symbol_styles.js +0 -0
  97. package/src/blocks/text.js +0 -31
  98. package/src/blocks/text.original.vue +0 -25
  99. package/src/blocks/text_script.js +0 -21
  100. package/src/blocks/text_styles.js +0 -0
  101. package/src/blocks/textarea.js +0 -31
  102. package/src/blocks/textarea.original.vue +0 -25
  103. package/src/blocks/textarea_script.js +0 -21
  104. package/src/blocks/textarea_styles.js +0 -0
  105. package/src/blocks/video.js +0 -31
  106. package/src/blocks/video.original.vue +0 -34
  107. package/src/blocks/video_script.js +0 -28
  108. package/src/blocks/video_styles.js +0 -0
  109. package/src/components/block-styles.js +0 -29
  110. package/src/components/block-styles.original.vue +0 -25
  111. package/src/components/block-styles.vue +0 -34
  112. package/src/components/block-styles_script.js +0 -20
  113. package/src/components/block-styles_styles.js +0 -0
  114. package/src/components/error-boundary.js +0 -29
  115. package/src/components/error-boundary.original.vue +0 -25
  116. package/src/components/error-boundary.vue +0 -15
  117. package/src/components/error-boundary_script.js +0 -20
  118. package/src/components/error-boundary_styles.js +0 -0
  119. package/src/components/render-block.js +0 -29
  120. package/src/components/render-block.original.vue +0 -119
  121. package/src/components/render-block_script.js +0 -91
  122. package/src/components/render-block_styles.js +0 -0
  123. package/src/components/render-blocks.js +0 -29
  124. package/src/components/render-blocks.original.vue +0 -75
  125. package/src/components/render-blocks_script.js +0 -76
  126. package/src/components/render-blocks_styles.js +0 -12
  127. package/src/components/render-content.js +0 -29
  128. package/src/components/render-content.original.vue +0 -95
  129. package/src/components/render-content_script.js +0 -92
  130. package/src/components/render-content_styles.js +0 -0
  131. package/src/constants/device-sizes.js +0 -46
  132. package/src/context/builder.context.js +0 -11
  133. package/src/functions/evaluate.js +0 -42
  134. package/src/functions/get-block-actions.js +0 -45
  135. package/src/functions/get-block-component-options.js +0 -14
  136. package/src/functions/get-block-properties.js +0 -46
  137. package/src/functions/get-block-styles.js +0 -13
  138. package/src/functions/get-block-tag.js +0 -13
  139. package/src/functions/get-content.js +0 -123
  140. package/src/functions/get-processed-block.js +0 -65
  141. package/src/functions/get-processed-block.test.js +0 -44
  142. package/src/functions/get-target.js +0 -13
  143. package/src/functions/if-target.js +0 -13
  144. package/src/functions/is-browser.js +0 -30
  145. package/src/functions/is-editing.js +0 -30
  146. package/src/functions/is-iframe.js +0 -30
  147. package/src/functions/is-react-native.js +0 -13
  148. package/src/functions/macro-eval.js +0 -12
  149. package/src/functions/on-change.js +0 -34
  150. package/src/functions/on-change.test.js +0 -38
  151. package/src/functions/register-component.js +0 -73
  152. package/src/functions/register.js +0 -52
  153. package/src/functions/set-editor-settings.js +0 -38
  154. package/src/functions/set.js +0 -18
  155. package/src/functions/set.test.js +0 -35
  156. package/src/functions/track.js +0 -41
  157. package/src/index.js +0 -51
  158. package/src/scripts/init-editing.js +0 -78
  159. package/src/types/builder-block.js +0 -3
  160. package/src/types/builder-content.js +0 -3
  161. package/src/types/deep-partial.js +0 -3
@@ -0,0 +1,1996 @@
1
+ const S = "vue2";
2
+ function d() {
3
+ return typeof window < "u" && typeof document < "u";
4
+ }
5
+ const T = {};
6
+ function le(t, e) {
7
+ let n = T[t];
8
+ if (n || (n = T[t] = []), n.push(e), d()) {
9
+ const r = {
10
+ type: "builder.register",
11
+ data: {
12
+ type: t,
13
+ info: e
14
+ }
15
+ };
16
+ try {
17
+ parent.postMessage(r, "*"), parent !== window && window.postMessage(r, "*");
18
+ } catch (o) {
19
+ console.debug("Could not postmessage", o);
20
+ }
21
+ }
22
+ }
23
+ const ce = () => {
24
+ le("insertMenu", {
25
+ name: "_default",
26
+ default: !0,
27
+ items: [
28
+ { name: "Box" },
29
+ { name: "Text" },
30
+ { name: "Image" },
31
+ { name: "Columns" },
32
+ { name: "Core:Section" },
33
+ { name: "Core:Button" },
34
+ { name: "Embed" },
35
+ { name: "Custom Code" }
36
+ ]
37
+ });
38
+ }, ue = () => {
39
+ var t;
40
+ d() && ((t = window.parent) == null || t.postMessage({
41
+ type: "builder.sdkInfo",
42
+ data: {
43
+ target: S,
44
+ supportsPatchUpdates: !1
45
+ }
46
+ }, "*"), window.addEventListener("message", ({ data: e }) => {
47
+ var n, r;
48
+ if (e)
49
+ switch (e.type) {
50
+ case "builder.evaluate": {
51
+ const o = e.data.text, i = e.data.arguments || [], a = e.data.id, l = new Function(o);
52
+ let s, c = null;
53
+ try {
54
+ s = l.apply(null, i);
55
+ } catch (u) {
56
+ c = u;
57
+ }
58
+ c ? (n = window.parent) == null || n.postMessage({
59
+ type: "builder.evaluateError",
60
+ data: { id: a, error: c.message }
61
+ }, "*") : s && typeof s.then == "function" ? s.then((u) => {
62
+ var f;
63
+ (f = window.parent) == null || f.postMessage({
64
+ type: "builder.evaluateResult",
65
+ data: { id: a, result: u }
66
+ }, "*");
67
+ }).catch(console.error) : (r = window.parent) == null || r.postMessage({
68
+ type: "builder.evaluateResult",
69
+ data: { result: s, id: a }
70
+ }, "*");
71
+ break;
72
+ }
73
+ }
74
+ }));
75
+ };
76
+ function k(t) {
77
+ return t;
78
+ }
79
+ function Bn(t) {
80
+ return t;
81
+ }
82
+ function m(t, e, n, r, o, i, a, l) {
83
+ var s = typeof t == "function" ? t.options : t;
84
+ e && (s.render = e, s.staticRenderFns = n, s._compiled = !0), r && (s.functional = !0), i && (s._scopeId = "data-v-" + i);
85
+ var c;
86
+ if (a ? (c = function(p) {
87
+ p = p || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !p && typeof __VUE_SSR_CONTEXT__ < "u" && (p = __VUE_SSR_CONTEXT__), o && o.call(this, p), p && p._registeredComponents && p._registeredComponents.add(a);
88
+ }, s._ssrRegister = c) : o && (c = l ? function() {
89
+ o.call(
90
+ this,
91
+ (s.functional ? this.parent : this).$root.$options.shadowRoot
92
+ );
93
+ } : o), c)
94
+ if (s.functional) {
95
+ s._injectStyles = c;
96
+ var u = s.render;
97
+ s.render = function(ie, $) {
98
+ return c.call($), u(ie, $);
99
+ };
100
+ } else {
101
+ var f = s.beforeCreate;
102
+ s.beforeCreate = f ? [].concat(f, c) : [c];
103
+ }
104
+ return {
105
+ exports: t,
106
+ options: s
107
+ };
108
+ }
109
+ const de = () => Promise.resolve().then(() => ae).then((t) => t.default), pe = {
110
+ name: "builder-columns",
111
+ components: { "render-blocks": de },
112
+ props: [
113
+ "space",
114
+ "columns",
115
+ "stackColumnsAt",
116
+ "reverseColumnsWhenStacked",
117
+ "builderBlock"
118
+ ],
119
+ data: () => ({ markMutable: k }),
120
+ computed: {
121
+ columnsCssVars() {
122
+ const t = this.stackColumnsAt === "never" ? "inherit" : this.reverseColumnsWhenStacked ? "column-reverse" : "column";
123
+ return {
124
+ "--flex-dir": t,
125
+ "--flex-dir-tablet": this.maybeApplyForTablet(t)
126
+ };
127
+ },
128
+ columnCssVars() {
129
+ const t = "100%", e = "0";
130
+ return {
131
+ "--column-width": t,
132
+ "--column-margin-left": e,
133
+ "--column-width-tablet": this.maybeApplyForTablet(t),
134
+ "--column-margin-left-tablet": this.maybeApplyForTablet(e)
135
+ };
136
+ }
137
+ },
138
+ methods: {
139
+ getGutterSize() {
140
+ return typeof this.space == "number" ? this.space || 0 : 20;
141
+ },
142
+ getColumns() {
143
+ return this.columns || [];
144
+ },
145
+ getWidth(t) {
146
+ var n;
147
+ const e = this.getColumns();
148
+ return ((n = e[t]) == null ? void 0 : n.width) || 100 / e.length;
149
+ },
150
+ getColumnCssWidth(t) {
151
+ const e = this.getColumns(), r = this.getGutterSize() * (e.length - 1) / e.length;
152
+ return `calc(${this.getWidth(t)}% - ${r}px)`;
153
+ },
154
+ maybeApplyForTablet(t) {
155
+ return (this.stackColumnsAt || "tablet") === "tablet" ? t : "inherit";
156
+ }
157
+ }
158
+ };
159
+ var me = function() {
160
+ var e = this, n = e._self._c;
161
+ return n("div", { staticClass: "builder-columns div-20351ewpue7", style: e.columnsCssVars }, e._l(e.columns, function(r, o) {
162
+ return n("div", { key: o, staticClass: "builder-column div-20351ewpue7-2", style: {
163
+ width: e.getColumnCssWidth(o),
164
+ marginLeft: `${o === 0 ? 0 : e.getGutterSize()}px`,
165
+ ...e.columnCssVars
166
+ } }, [n("render-blocks", { attrs: { blocks: e.markMutable(r.blocks), path: `component.options.columns.${o}.blocks`, parent: e.builderBlock.id } })], 1);
167
+ }), 0);
168
+ }, fe = [], he = /* @__PURE__ */ m(
169
+ pe,
170
+ me,
171
+ fe,
172
+ !1,
173
+ null,
174
+ "ef5ead4c",
175
+ null,
176
+ null
177
+ );
178
+ const ge = he.exports;
179
+ function R(t) {
180
+ return t.replace(/http(s)?:/, "");
181
+ }
182
+ function be(t = "", e, n) {
183
+ const r = new RegExp("([?&])" + e + "=.*?(&|$)", "i"), o = t.indexOf("?") !== -1 ? "&" : "?";
184
+ return t.match(r) ? t.replace(r, "$1" + e + "=" + encodeURIComponent(n) + "$2") : t + o + e + "=" + encodeURIComponent(n);
185
+ }
186
+ function _e(t, e) {
187
+ if (!t || !(t != null && t.match(/cdn\.shopify\.com/)) || !e)
188
+ return t;
189
+ if (e === "master")
190
+ return R(t);
191
+ const n = t.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
192
+ if (n) {
193
+ const r = t.split(n[0]), o = n[3], i = e.match("x") ? e : `${e}x`;
194
+ return R(`${r[0]}_${i}${o}`);
195
+ }
196
+ return null;
197
+ }
198
+ function v(t) {
199
+ if (!t)
200
+ return t;
201
+ const e = [100, 200, 400, 800, 1200, 1600, 2e3];
202
+ if (t.match(/builder\.io/)) {
203
+ let n = t;
204
+ const r = Number(t.split("?width=")[1]);
205
+ return isNaN(r) || (n = `${n} ${r}w`), e.filter((o) => o !== r).map((o) => `${be(t, "width", o)} ${o}w`).concat([n]).join(", ");
206
+ }
207
+ return t.match(/cdn\.shopify\.com/) ? e.map((n) => [_e(t, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, r]) => `${n} ${r}w`).concat([t]).join(", ") : t;
208
+ }
209
+ const ve = {
210
+ name: "builder-image",
211
+ props: [
212
+ "image",
213
+ "src",
214
+ "srcset",
215
+ "noWebp",
216
+ "altText",
217
+ "backgroundSize",
218
+ "className",
219
+ "sizes",
220
+ "aspectRatio",
221
+ "fitContent",
222
+ "builderBlock"
223
+ ],
224
+ computed: {
225
+ srcSetToUse() {
226
+ var n;
227
+ const e = this.image || this.src;
228
+ if (!e || !(e.match(/builder\.io/) || e.match(/cdn\.shopify\.com/)))
229
+ return this.srcset;
230
+ if (this.srcset && ((n = this.image) == null ? void 0 : n.includes("builder.io/api/v1/image"))) {
231
+ if (!this.srcset.includes(this.image.split("?")[0]))
232
+ return console.debug("Removed given srcset"), v(e);
233
+ } else if (this.image && !this.srcset)
234
+ return v(e);
235
+ return v(e);
236
+ },
237
+ webpSrcSet() {
238
+ var t;
239
+ return ((t = this.srcSetToUse) == null ? void 0 : t.match(/builder\.io/)) && !this.noWebp ? this.srcSetToUse.replace(/\?/g, "?format=webp&") : "";
240
+ }
241
+ },
242
+ methods: {
243
+ _classStringToObject(t) {
244
+ const e = {};
245
+ if (typeof t != "string")
246
+ return e;
247
+ const n = t.trim().split(/\s+/);
248
+ for (const r of n)
249
+ e[r] = !0;
250
+ return e;
251
+ }
252
+ }
253
+ };
254
+ var ye = function() {
255
+ var r, o;
256
+ var e = this, n = e._self._c;
257
+ return n("div", { staticClass: "div-cvp1sc2nsao" }, [n("picture", [e.webpSrcSet ? n("source", { attrs: { type: "image/webp", srcset: e.webpSrcSet } }) : e._e(), n("img", { class: e._classStringToObject(
258
+ "builder-image" + (e.className ? " " + e.className : "") + " img-cvp1sc2nsao"
259
+ ), style: {
260
+ objectPosition: e.backgroundSize || "center",
261
+ objectFit: e.backgroundSize || "cover"
262
+ }, attrs: { loading: "lazy", alt: e.altText, role: e.altText ? "presentation" : void 0, src: e.image, srcset: e.srcSetToUse, sizes: e.sizes } }), n("source", { attrs: { srcset: e.srcSetToUse } })]), e.aspectRatio && !(e.fitContent && ((o = (r = e.builderBlock) == null ? void 0 : r.children) == null ? void 0 : o.length)) ? n("div", { staticClass: "builder-image-sizer div-cvp1sc2nsao-2", style: {
263
+ paddingTop: e.aspectRatio * 100 + "%"
264
+ } }) : e._e(), e._t("default"), e.fitContent ? e._e() : n("div", { staticClass: "div-cvp1sc2nsao-3" }, [e._t("default")], 2)], 2);
265
+ }, xe = [], we = /* @__PURE__ */ m(
266
+ ve,
267
+ ye,
268
+ xe,
269
+ !1,
270
+ null,
271
+ "269f9e87",
272
+ null,
273
+ null
274
+ );
275
+ const Ce = we.exports, Se = {
276
+ name: "builder-text",
277
+ props: ["text"]
278
+ };
279
+ var ke = function() {
280
+ var e = this, n = e._self._c;
281
+ return n("div", { staticClass: "builder-text", domProps: { innerHTML: e._s(e.text) } });
282
+ }, Ie = [], $e = /* @__PURE__ */ m(
283
+ Se,
284
+ ke,
285
+ Ie,
286
+ !1,
287
+ null,
288
+ null,
289
+ null,
290
+ null
291
+ );
292
+ const Te = $e.exports, Re = {
293
+ name: "builder-video",
294
+ props: [
295
+ "autoPlay",
296
+ "muted",
297
+ "controls",
298
+ "loop",
299
+ "playsInline",
300
+ "attributes",
301
+ "fit",
302
+ "position",
303
+ "video",
304
+ "posterImage"
305
+ ],
306
+ computed: {
307
+ videoProps() {
308
+ return {
309
+ ...this.autoPlay === !0 ? {
310
+ autoPlay: !0
311
+ } : {},
312
+ ...this.muted === !0 ? {
313
+ muted: !0
314
+ } : {},
315
+ ...this.controls === !0 ? {
316
+ controls: !0
317
+ } : {},
318
+ ...this.loop === !0 ? {
319
+ loop: !0
320
+ } : {},
321
+ ...this.playsInline === !0 ? {
322
+ playsInline: !0
323
+ } : {}
324
+ };
325
+ }
326
+ }
327
+ };
328
+ var Oe = function() {
329
+ var r;
330
+ var e = this, n = e._self._c;
331
+ return n("video", e._b({ style: {
332
+ width: "100%",
333
+ height: "100%",
334
+ ...(r = e.attributes) == null ? void 0 : r.style,
335
+ objectFit: e.fit,
336
+ objectPosition: e.position,
337
+ borderRadius: 1
338
+ }, attrs: { src: e.video || "no-src", poster: e.posterImage } }, "video", e.videoProps, !1));
339
+ }, Pe = [], je = /* @__PURE__ */ m(
340
+ Re,
341
+ Oe,
342
+ Pe,
343
+ !1,
344
+ null,
345
+ null,
346
+ null,
347
+ null
348
+ );
349
+ const Ee = je.exports;
350
+ var Fe = Object.defineProperty, Ue = Object.defineProperties, Ve = Object.getOwnPropertyDescriptors, O = Object.getOwnPropertySymbols, Ae = Object.prototype.hasOwnProperty, We = Object.prototype.propertyIsEnumerable, P = (t, e, n) => e in t ? Fe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, y = (t, e) => {
351
+ for (var n in e || (e = {}))
352
+ Ae.call(e, n) && P(t, n, e[n]);
353
+ if (O)
354
+ for (var n of O(e))
355
+ We.call(e, n) && P(t, n, e[n]);
356
+ return t;
357
+ }, Le = (t, e) => Ue(t, Ve(e));
358
+ function x(t, e = null, n = ".") {
359
+ return Object.keys(t).reduce((r, o) => {
360
+ const i = t[o], a = [e, o].filter(Boolean).join(n);
361
+ return [
362
+ typeof i == "object",
363
+ i !== null,
364
+ !(Array.isArray(i) && i.length === 0)
365
+ ].every(Boolean) ? y(y({}, r), x(i, a, n)) : Le(y({}, r), { [a]: i });
366
+ }, {});
367
+ }
368
+ const j = "builder.", z = (t) => {
369
+ const e = {};
370
+ return t.forEach((n, r) => {
371
+ e[r] = n;
372
+ }), e;
373
+ }, Ne = (t) => {
374
+ const e = {};
375
+ return Object.keys(t).forEach((n) => {
376
+ if (n.startsWith(j)) {
377
+ const r = n.replace(j, "");
378
+ e[r] = t[n];
379
+ }
380
+ }), e;
381
+ }, Me = () => {
382
+ if (!d())
383
+ return {};
384
+ const t = new URLSearchParams(window.location.search);
385
+ return Ne(z(t));
386
+ }, Be = (t) => t instanceof URLSearchParams ? z(t) : t;
387
+ function De() {
388
+ return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : null;
389
+ }
390
+ var ze = (t, e, n) => new Promise((r, o) => {
391
+ var i = (s) => {
392
+ try {
393
+ l(n.next(s));
394
+ } catch (c) {
395
+ o(c);
396
+ }
397
+ }, a = (s) => {
398
+ try {
399
+ l(n.throw(s));
400
+ } catch (c) {
401
+ o(c);
402
+ }
403
+ }, l = (s) => s.done ? r(s.value) : Promise.resolve(s.value).then(i, a);
404
+ l((n = n.apply(t, e)).next());
405
+ });
406
+ function H() {
407
+ return ze(this, null, function* () {
408
+ const t = De().fetch;
409
+ if (typeof t > "u" && typeof global < "u") {
410
+ const e = import("node-fetch").then((n) => n.default);
411
+ return e.default || e;
412
+ }
413
+ return t.default || t;
414
+ });
415
+ }
416
+ const He = (t, e) => {
417
+ if (t.variations && Object.keys(t.variations).length) {
418
+ const n = t.id ? e[t.id] : void 0, r = n ? t.variations[n] : void 0;
419
+ if (n && r)
420
+ t.data = r.data, t.testVariationId = r.id, t.testVariationName = r.name;
421
+ else {
422
+ let o = 0;
423
+ const i = Math.random();
424
+ let a = !1;
425
+ for (const l in t.variations) {
426
+ const s = t.variations[l];
427
+ if (o += s.testRatio, i < o) {
428
+ const u = s.name || (s.id === t.id ? "Default variation" : "");
429
+ a = !0, Object.assign(t, {
430
+ data: s.data,
431
+ testVariationId: s.id,
432
+ testVariationName: u
433
+ });
434
+ }
435
+ }
436
+ a || Object.assign(t, {
437
+ testVariationId: t.id,
438
+ testVariationName: "Default"
439
+ });
440
+ }
441
+ }
442
+ };
443
+ var qe = Object.defineProperty, Ke = Object.defineProperties, Ge = Object.getOwnPropertyDescriptors, E = Object.getOwnPropertySymbols, Je = Object.prototype.hasOwnProperty, Xe = Object.prototype.propertyIsEnumerable, F = (t, e, n) => e in t ? qe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, w = (t, e) => {
444
+ for (var n in e || (e = {}))
445
+ Je.call(e, n) && F(t, n, e[n]);
446
+ if (E)
447
+ for (var n of E(e))
448
+ Xe.call(e, n) && F(t, n, e[n]);
449
+ return t;
450
+ }, Ye = (t, e) => Ke(t, Ge(e)), q = (t, e, n) => new Promise((r, o) => {
451
+ var i = (s) => {
452
+ try {
453
+ l(n.next(s));
454
+ } catch (c) {
455
+ o(c);
456
+ }
457
+ }, a = (s) => {
458
+ try {
459
+ l(n.throw(s));
460
+ } catch (c) {
461
+ o(c);
462
+ }
463
+ }, l = (s) => s.done ? r(s.value) : Promise.resolve(s.value).then(i, a);
464
+ l((n = n.apply(t, e)).next());
465
+ });
466
+ const Qe = H();
467
+ function K(t) {
468
+ return q(this, null, function* () {
469
+ return (yield et(Ye(w({}, t), { limit: 1 }))).results[0] || null;
470
+ });
471
+ }
472
+ const Ze = (t) => {
473
+ const {
474
+ limit: e = 30,
475
+ userAttributes: n,
476
+ query: r,
477
+ noTraverse: o = !1,
478
+ model: i,
479
+ apiKey: a
480
+ } = t, l = new URL(`https://cdn.builder.io/api/v2/content/${i}?apiKey=${a}&limit=${e}&noTraverse=${o}`), s = w(w({}, Me()), Be(t.options || {})), c = x(s);
481
+ for (const u in c)
482
+ l.searchParams.set(u, String(c[u]));
483
+ if (n && l.searchParams.set("userAttributes", JSON.stringify(n)), r) {
484
+ const u = x({ query: r });
485
+ for (const f in u)
486
+ l.searchParams.set(f, JSON.stringify(u[f]));
487
+ }
488
+ return l;
489
+ };
490
+ function et(t) {
491
+ return q(this, null, function* () {
492
+ const e = Ze(t), r = yield (yield Qe)(e.href).then((o) => o.json());
493
+ if (t.testGroups)
494
+ for (const o of r.results)
495
+ He(o, t.testGroups);
496
+ return r;
497
+ });
498
+ }
499
+ const tt = () => Promise.resolve().then(() => Fn).then(
500
+ (t) => t.default
501
+ ), nt = {
502
+ name: "builder-symbol",
503
+ components: { "render-content": tt },
504
+ props: ["symbol", "attributes"],
505
+ data: () => ({ className: "builder-symbol", content: null, markMutable: k }),
506
+ inject: {
507
+ builderContext: "BuilderContext"
508
+ },
509
+ mounted() {
510
+ var t;
511
+ this.content = (t = this.symbol) == null ? void 0 : t.content;
512
+ },
513
+ watch: {
514
+ onUpdateHook0() {
515
+ const t = this.symbol;
516
+ t && !t.content && !this.content && t.model && K({
517
+ model: t.model,
518
+ apiKey: this.builderContext.apiKey,
519
+ query: {
520
+ id: t.entry
521
+ }
522
+ }).then((e) => {
523
+ this.content = e;
524
+ });
525
+ }
526
+ },
527
+ computed: {
528
+ onUpdateHook0() {
529
+ return {
530
+ 0: this.symbol,
531
+ 1: this.content
532
+ };
533
+ }
534
+ },
535
+ methods: {
536
+ _classStringToObject(t) {
537
+ const e = {};
538
+ if (typeof t != "string")
539
+ return e;
540
+ const n = t.trim().split(/\s+/);
541
+ for (const r of n)
542
+ e[r] = !0;
543
+ return e;
544
+ }
545
+ }
546
+ };
547
+ var rt = function() {
548
+ var r, o, i, a, l;
549
+ var e = this, n = e._self._c;
550
+ return n("div", e._b({ class: e._classStringToObject(e.className), attrs: { dataSet: {
551
+ class: e.className
552
+ } } }, "div", e.attributes, !1), [n("render-content", { attrs: { apiKey: e.builderContext.apiKey, context: e.builderContext.context, customComponents: e.markMutable(Object.values(e.builderContext.registeredComponents)), data: e.markMutable({
553
+ ...(r = e.symbol) == null ? void 0 : r.data,
554
+ ...e.builderContext.state,
555
+ ...(a = (i = (o = e.symbol) == null ? void 0 : o.content) == null ? void 0 : i.data) == null ? void 0 : a.state
556
+ }), model: (l = e.symbol) == null ? void 0 : l.model, content: e.markMutable(e.content) } })], 1);
557
+ }, ot = [], st = /* @__PURE__ */ m(
558
+ nt,
559
+ rt,
560
+ ot,
561
+ !1,
562
+ null,
563
+ null,
564
+ null,
565
+ null
566
+ );
567
+ const at = st.exports;
568
+ const it = {
569
+ name: "builder-button",
570
+ props: ["attributes", "text", "link", "openLinkInNewTab"]
571
+ };
572
+ var lt = function() {
573
+ var e = this, n = e._self._c;
574
+ return e.link ? n("a", e._b({ attrs: { role: "button", href: e.link, target: e.openLinkInNewTab ? "_blank" : void 0 } }, "a", e.attributes, !1), [e._v(" " + e._s(e.text) + " ")]) : n("button", e._b({ staticClass: "button-1be3j8m9ewb" }, "button", e.attributes, !1), [e._v(" " + e._s(e.text) + " ")]);
575
+ }, ct = [], ut = /* @__PURE__ */ m(
576
+ it,
577
+ lt,
578
+ ct,
579
+ !1,
580
+ null,
581
+ "eaf78163",
582
+ null,
583
+ null
584
+ );
585
+ const dt = ut.exports, pt = {
586
+ name: "builder-section-component",
587
+ props: ["attributes", "maxWidth"]
588
+ };
589
+ var mt = function() {
590
+ var e = this, n = e._self._c;
591
+ return n("section", e._b({ style: e.maxWidth && typeof e.maxWidth == "number" ? {
592
+ maxWidth: e.maxWidth
593
+ } : void 0 }, "section", e.attributes, !1), [e._t("default")], 2);
594
+ }, ft = [], ht = /* @__PURE__ */ m(
595
+ pt,
596
+ mt,
597
+ ft,
598
+ !1,
599
+ null,
600
+ null,
601
+ null,
602
+ null
603
+ );
604
+ const gt = ht.exports, bt = {
605
+ name: "builder-fragment-component",
606
+ props: []
607
+ };
608
+ var _t = function() {
609
+ var e = this, n = e._self._c;
610
+ return n("span", [e._t("default")], 2);
611
+ }, vt = [], yt = /* @__PURE__ */ m(
612
+ bt,
613
+ _t,
614
+ vt,
615
+ !1,
616
+ null,
617
+ null,
618
+ null,
619
+ null
620
+ );
621
+ const xt = yt.exports, wt = {
622
+ name: "Core:Button",
623
+ builtIn: !0,
624
+ image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
625
+ defaultStyles: {
626
+ appearance: "none",
627
+ paddingTop: "15px",
628
+ paddingBottom: "15px",
629
+ paddingLeft: "25px",
630
+ paddingRight: "25px",
631
+ backgroundColor: "#000000",
632
+ color: "white",
633
+ borderRadius: "4px",
634
+ textAlign: "center",
635
+ cursor: "pointer"
636
+ },
637
+ inputs: [
638
+ {
639
+ name: "text",
640
+ type: "text",
641
+ defaultValue: "Click me!",
642
+ bubble: !0
643
+ },
644
+ {
645
+ name: "link",
646
+ type: "url",
647
+ bubble: !0
648
+ },
649
+ {
650
+ name: "openLinkInNewTab",
651
+ type: "boolean",
652
+ defaultValue: !1,
653
+ friendlyName: "Open link in new tab"
654
+ }
655
+ ],
656
+ static: !0,
657
+ noWrap: !0
658
+ };
659
+ function I(t) {
660
+ return t.__qwik_serializable__ = !0, t;
661
+ }
662
+ const Ct = {
663
+ name: "Columns",
664
+ builtIn: !0,
665
+ inputs: [
666
+ {
667
+ name: "columns",
668
+ type: "array",
669
+ broadcast: !0,
670
+ subFields: [
671
+ {
672
+ name: "blocks",
673
+ type: "array",
674
+ hideFromUI: !0,
675
+ defaultValue: [
676
+ {
677
+ "@type": "@builder.io/sdk:Element",
678
+ responsiveStyles: {
679
+ large: {
680
+ display: "flex",
681
+ flexDirection: "column",
682
+ alignItems: "stretch",
683
+ flexShrink: "0",
684
+ position: "relative",
685
+ marginTop: "30px",
686
+ textAlign: "center",
687
+ lineHeight: "normal",
688
+ height: "auto",
689
+ minHeight: "20px",
690
+ minWidth: "20px",
691
+ overflow: "hidden"
692
+ }
693
+ },
694
+ component: {
695
+ name: "Image",
696
+ options: {
697
+ image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
698
+ backgroundPosition: "center",
699
+ backgroundSize: "cover",
700
+ aspectRatio: 0.7004048582995948
701
+ }
702
+ }
703
+ },
704
+ {
705
+ "@type": "@builder.io/sdk:Element",
706
+ responsiveStyles: {
707
+ large: {
708
+ display: "flex",
709
+ flexDirection: "column",
710
+ alignItems: "stretch",
711
+ flexShrink: "0",
712
+ position: "relative",
713
+ marginTop: "30px",
714
+ textAlign: "center",
715
+ lineHeight: "normal",
716
+ height: "auto"
717
+ }
718
+ },
719
+ component: {
720
+ name: "Text",
721
+ options: {
722
+ text: "<p>Enter some text...</p>"
723
+ }
724
+ }
725
+ }
726
+ ]
727
+ },
728
+ {
729
+ name: "width",
730
+ type: "number",
731
+ hideFromUI: !0,
732
+ helperText: "Width %, e.g. set to 50 to fill half of the space"
733
+ },
734
+ {
735
+ name: "link",
736
+ type: "url",
737
+ helperText: "Optionally set a url that clicking this column will link to"
738
+ }
739
+ ],
740
+ defaultValue: [
741
+ {
742
+ blocks: [
743
+ {
744
+ "@type": "@builder.io/sdk:Element",
745
+ responsiveStyles: {
746
+ large: {
747
+ display: "flex",
748
+ flexDirection: "column",
749
+ alignItems: "stretch",
750
+ flexShrink: "0",
751
+ position: "relative",
752
+ marginTop: "30px",
753
+ textAlign: "center",
754
+ lineHeight: "normal",
755
+ height: "auto",
756
+ minHeight: "20px",
757
+ minWidth: "20px",
758
+ overflow: "hidden"
759
+ }
760
+ },
761
+ component: {
762
+ name: "Image",
763
+ options: {
764
+ image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
765
+ backgroundPosition: "center",
766
+ backgroundSize: "cover",
767
+ aspectRatio: 0.7004048582995948
768
+ }
769
+ }
770
+ },
771
+ {
772
+ "@type": "@builder.io/sdk:Element",
773
+ responsiveStyles: {
774
+ large: {
775
+ display: "flex",
776
+ flexDirection: "column",
777
+ alignItems: "stretch",
778
+ flexShrink: "0",
779
+ position: "relative",
780
+ marginTop: "30px",
781
+ textAlign: "center",
782
+ lineHeight: "normal",
783
+ height: "auto"
784
+ }
785
+ },
786
+ component: {
787
+ name: "Text",
788
+ options: {
789
+ text: "<p>Enter some text...</p>"
790
+ }
791
+ }
792
+ }
793
+ ]
794
+ },
795
+ {
796
+ blocks: [
797
+ {
798
+ "@type": "@builder.io/sdk:Element",
799
+ responsiveStyles: {
800
+ large: {
801
+ display: "flex",
802
+ flexDirection: "column",
803
+ alignItems: "stretch",
804
+ flexShrink: "0",
805
+ position: "relative",
806
+ marginTop: "30px",
807
+ textAlign: "center",
808
+ lineHeight: "normal",
809
+ height: "auto",
810
+ minHeight: "20px",
811
+ minWidth: "20px",
812
+ overflow: "hidden"
813
+ }
814
+ },
815
+ component: {
816
+ name: "Image",
817
+ options: {
818
+ image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
819
+ backgroundPosition: "center",
820
+ backgroundSize: "cover",
821
+ aspectRatio: 0.7004048582995948
822
+ }
823
+ }
824
+ },
825
+ {
826
+ "@type": "@builder.io/sdk:Element",
827
+ responsiveStyles: {
828
+ large: {
829
+ display: "flex",
830
+ flexDirection: "column",
831
+ alignItems: "stretch",
832
+ flexShrink: "0",
833
+ position: "relative",
834
+ marginTop: "30px",
835
+ textAlign: "center",
836
+ lineHeight: "normal",
837
+ height: "auto"
838
+ }
839
+ },
840
+ component: {
841
+ name: "Text",
842
+ options: {
843
+ text: "<p>Enter some text...</p>"
844
+ }
845
+ }
846
+ }
847
+ ]
848
+ }
849
+ ],
850
+ onChange: I((t) => {
851
+ function e() {
852
+ n.forEach((r) => {
853
+ r.delete("width");
854
+ });
855
+ }
856
+ const n = t.get("columns");
857
+ Array.isArray(n) && !!n.find((o) => o.get("width")) && (!!n.find((i) => !i.get("width")) || n.reduce((l, s) => l + s.get("width"), 0) !== 100) && e();
858
+ })
859
+ },
860
+ {
861
+ name: "space",
862
+ type: "number",
863
+ defaultValue: 20,
864
+ helperText: "Size of gap between columns",
865
+ advanced: !0
866
+ },
867
+ {
868
+ name: "stackColumnsAt",
869
+ type: "string",
870
+ defaultValue: "tablet",
871
+ helperText: "Convert horizontal columns to vertical at what device size",
872
+ enum: ["tablet", "mobile", "never"],
873
+ advanced: !0
874
+ },
875
+ {
876
+ name: "reverseColumnsWhenStacked",
877
+ type: "boolean",
878
+ defaultValue: !1,
879
+ helperText: "When stacking columns for mobile devices, reverse the ordering",
880
+ advanced: !0
881
+ }
882
+ ]
883
+ }, St = {
884
+ name: "Fragment",
885
+ static: !0,
886
+ hidden: !0,
887
+ builtIn: !0,
888
+ canHaveChildren: !0,
889
+ noWrap: !0
890
+ }, kt = {
891
+ name: "Image",
892
+ static: !0,
893
+ builtIn: !0,
894
+ 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",
895
+ defaultStyles: {
896
+ position: "relative",
897
+ minHeight: "20px",
898
+ minWidth: "20px",
899
+ overflow: "hidden"
900
+ },
901
+ canHaveChildren: !0,
902
+ inputs: [
903
+ {
904
+ name: "image",
905
+ type: "file",
906
+ bubble: !0,
907
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
908
+ required: !0,
909
+ defaultValue: "https://cdn.builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
910
+ onChange: I((t) => {
911
+ t.delete("srcset"), t.delete("noWebp");
912
+ function n(a, l = 6e4) {
913
+ return new Promise((s, c) => {
914
+ const u = document.createElement("img");
915
+ let f = !1;
916
+ u.onload = () => {
917
+ f = !0, s(u);
918
+ }, u.addEventListener("error", (p) => {
919
+ console.warn("Image load failed", p.error), c(p.error);
920
+ }), u.src = a, setTimeout(() => {
921
+ f || c(new Error("Image load timed out"));
922
+ }, l);
923
+ });
924
+ }
925
+ function r(a) {
926
+ return Math.round(a * 1e3) / 1e3;
927
+ }
928
+ const o = t.get("image"), i = t.get("aspectRatio");
929
+ if (fetch(o).then((a) => a.blob()).then((a) => {
930
+ a.type.includes("svg") && t.set("noWebp", !0);
931
+ }), o && (!i || i === 0.7041))
932
+ return n(o).then((a) => {
933
+ const l = t.get("aspectRatio");
934
+ t.get("image") === o && (!l || l === 0.7041) && a.width && a.height && (t.set("aspectRatio", r(a.height / a.width)), t.set("height", a.height), t.set("width", a.width));
935
+ });
936
+ })
937
+ },
938
+ {
939
+ name: "backgroundSize",
940
+ type: "text",
941
+ defaultValue: "cover",
942
+ enum: [
943
+ {
944
+ label: "contain",
945
+ value: "contain",
946
+ helperText: "The image should never get cropped"
947
+ },
948
+ {
949
+ label: "cover",
950
+ value: "cover",
951
+ helperText: "The image should fill it's box, cropping when needed"
952
+ }
953
+ ]
954
+ },
955
+ {
956
+ name: "backgroundPosition",
957
+ type: "text",
958
+ defaultValue: "center",
959
+ enum: [
960
+ "center",
961
+ "top",
962
+ "left",
963
+ "right",
964
+ "bottom",
965
+ "top left",
966
+ "top right",
967
+ "bottom left",
968
+ "bottom right"
969
+ ]
970
+ },
971
+ {
972
+ name: "altText",
973
+ type: "string",
974
+ helperText: "Text to display when the user has images off"
975
+ },
976
+ {
977
+ name: "height",
978
+ type: "number",
979
+ hideFromUI: !0
980
+ },
981
+ {
982
+ name: "width",
983
+ type: "number",
984
+ hideFromUI: !0
985
+ },
986
+ {
987
+ name: "sizes",
988
+ type: "string",
989
+ hideFromUI: !0
990
+ },
991
+ {
992
+ name: "srcset",
993
+ type: "string",
994
+ hideFromUI: !0
995
+ },
996
+ {
997
+ name: "lazy",
998
+ type: "boolean",
999
+ defaultValue: !0,
1000
+ hideFromUI: !0
1001
+ },
1002
+ {
1003
+ name: "fitContent",
1004
+ type: "boolean",
1005
+ helperText: "When child blocks are provided, fit to them instead of using the image's aspect ratio",
1006
+ defaultValue: !0
1007
+ },
1008
+ {
1009
+ name: "aspectRatio",
1010
+ type: "number",
1011
+ helperText: "This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",
1012
+ advanced: !0,
1013
+ defaultValue: 0.7041
1014
+ }
1015
+ ]
1016
+ }, It = {
1017
+ name: "Core:Section",
1018
+ static: !0,
1019
+ builtIn: !0,
1020
+ image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
1021
+ inputs: [
1022
+ {
1023
+ name: "maxWidth",
1024
+ type: "number",
1025
+ defaultValue: 1200
1026
+ },
1027
+ {
1028
+ name: "lazyLoad",
1029
+ type: "boolean",
1030
+ defaultValue: !1,
1031
+ advanced: !0,
1032
+ description: "Only render this section when in view"
1033
+ }
1034
+ ],
1035
+ defaultStyles: {
1036
+ paddingLeft: "20px",
1037
+ paddingRight: "20px",
1038
+ paddingTop: "50px",
1039
+ paddingBottom: "50px",
1040
+ marginTop: "0px",
1041
+ width: "100vw",
1042
+ marginLeft: "calc(50% - 50vw)"
1043
+ },
1044
+ canHaveChildren: !0,
1045
+ defaultChildren: [
1046
+ {
1047
+ "@type": "@builder.io/sdk:Element",
1048
+ responsiveStyles: {
1049
+ large: {
1050
+ textAlign: "center"
1051
+ }
1052
+ },
1053
+ component: {
1054
+ name: "Text",
1055
+ options: {
1056
+ text: "<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"
1057
+ }
1058
+ }
1059
+ }
1060
+ ]
1061
+ }, $t = {
1062
+ name: "Symbol",
1063
+ noWrap: !0,
1064
+ static: !0,
1065
+ builtIn: !0,
1066
+ inputs: [
1067
+ {
1068
+ name: "symbol",
1069
+ type: "uiSymbol"
1070
+ },
1071
+ {
1072
+ name: "dataOnly",
1073
+ helperText: "Make this a data symbol that doesn't display any UI",
1074
+ type: "boolean",
1075
+ defaultValue: !1,
1076
+ advanced: !0,
1077
+ hideFromUI: !0
1078
+ },
1079
+ {
1080
+ name: "inheritState",
1081
+ helperText: "Inherit the parent component state and data",
1082
+ type: "boolean",
1083
+ defaultValue: !1,
1084
+ advanced: !0
1085
+ },
1086
+ {
1087
+ name: "renderToLiquid",
1088
+ helperText: "Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",
1089
+ type: "boolean",
1090
+ defaultValue: !1,
1091
+ advanced: !0,
1092
+ hideFromUI: !0
1093
+ },
1094
+ {
1095
+ name: "useChildren",
1096
+ hideFromUI: !0,
1097
+ type: "boolean"
1098
+ }
1099
+ ]
1100
+ }, Tt = {
1101
+ name: "Text",
1102
+ static: !0,
1103
+ builtIn: !0,
1104
+ image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",
1105
+ inputs: [
1106
+ {
1107
+ name: "text",
1108
+ type: "html",
1109
+ required: !0,
1110
+ autoFocus: !0,
1111
+ bubble: !0,
1112
+ defaultValue: "Enter some text..."
1113
+ }
1114
+ ],
1115
+ defaultStyles: {
1116
+ lineHeight: "normal",
1117
+ height: "auto",
1118
+ textAlign: "center"
1119
+ }
1120
+ }, Rt = {
1121
+ name: "Video",
1122
+ canHaveChildren: !0,
1123
+ builtIn: !0,
1124
+ defaultStyles: {
1125
+ minHeight: "20px",
1126
+ minWidth: "20px"
1127
+ },
1128
+ image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",
1129
+ inputs: [
1130
+ {
1131
+ name: "video",
1132
+ type: "file",
1133
+ allowedFileTypes: ["mp4"],
1134
+ bubble: !0,
1135
+ defaultValue: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",
1136
+ required: !0
1137
+ },
1138
+ {
1139
+ name: "posterImage",
1140
+ type: "file",
1141
+ allowedFileTypes: ["jpeg", "png"],
1142
+ helperText: "Image to show before the video plays"
1143
+ },
1144
+ {
1145
+ name: "autoPlay",
1146
+ type: "boolean",
1147
+ defaultValue: !0
1148
+ },
1149
+ {
1150
+ name: "controls",
1151
+ type: "boolean",
1152
+ defaultValue: !1
1153
+ },
1154
+ {
1155
+ name: "muted",
1156
+ type: "boolean",
1157
+ defaultValue: !0
1158
+ },
1159
+ {
1160
+ name: "loop",
1161
+ type: "boolean",
1162
+ defaultValue: !0
1163
+ },
1164
+ {
1165
+ name: "playsInline",
1166
+ type: "boolean",
1167
+ defaultValue: !0
1168
+ },
1169
+ {
1170
+ name: "fit",
1171
+ type: "text",
1172
+ defaultValue: "cover",
1173
+ enum: ["contain", "cover", "fill", "auto"]
1174
+ },
1175
+ {
1176
+ name: "fitContent",
1177
+ type: "boolean",
1178
+ helperText: "When child blocks are provided, fit to them instead of using the aspect ratio",
1179
+ defaultValue: !0,
1180
+ advanced: !0
1181
+ },
1182
+ {
1183
+ name: "position",
1184
+ type: "text",
1185
+ defaultValue: "center",
1186
+ enum: [
1187
+ "center",
1188
+ "top",
1189
+ "left",
1190
+ "right",
1191
+ "bottom",
1192
+ "top left",
1193
+ "top right",
1194
+ "bottom left",
1195
+ "bottom right"
1196
+ ]
1197
+ },
1198
+ {
1199
+ name: "height",
1200
+ type: "number",
1201
+ advanced: !0
1202
+ },
1203
+ {
1204
+ name: "width",
1205
+ type: "number",
1206
+ advanced: !0
1207
+ },
1208
+ {
1209
+ name: "aspectRatio",
1210
+ type: "number",
1211
+ advanced: !0,
1212
+ defaultValue: 0.7004048582995948
1213
+ },
1214
+ {
1215
+ name: "lazyLoad",
1216
+ type: "boolean",
1217
+ helperText: 'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',
1218
+ defaultValue: !0,
1219
+ advanced: !0
1220
+ }
1221
+ ]
1222
+ }, Ot = {
1223
+ name: "Embed",
1224
+ static: !0,
1225
+ builtIn: !0,
1226
+ inputs: [
1227
+ {
1228
+ name: "url",
1229
+ type: "url",
1230
+ required: !0,
1231
+ defaultValue: "",
1232
+ helperText: "e.g. enter a youtube url, google map, etc",
1233
+ onChange: I((t) => {
1234
+ const e = t.get("url");
1235
+ if (e)
1236
+ return t.set("content", "Loading..."), fetch(`https://iframe.ly/api/iframely?url=${e}&api_key=ae0e60e78201a3f2b0de4b`).then((r) => r.json()).then((r) => {
1237
+ t.get("url") === e && (r.html ? t.set("content", r.html) : t.set("content", "Invalid url, please try another"));
1238
+ }).catch((r) => {
1239
+ t.set("content", "There was an error embedding this URL, please try again or another URL");
1240
+ });
1241
+ t.delete("content");
1242
+ })
1243
+ },
1244
+ {
1245
+ name: "content",
1246
+ type: "html",
1247
+ defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1248
+ hideFromUI: !0
1249
+ }
1250
+ ]
1251
+ }, Pt = [
1252
+ "text/javascript",
1253
+ "application/javascript",
1254
+ "application/ecmascript"
1255
+ ], jt = (t) => Pt.includes(t.type), Et = {
1256
+ name: "builder-embed",
1257
+ props: ["content"],
1258
+ data: () => ({ scriptsInserted: [], scriptsRun: [], ranInitFn: !1 }),
1259
+ watch: {
1260
+ onUpdateHook0() {
1261
+ this.$refs.elem && !this.ranInitFn && (this.ranInitFn = !0, this.findAndRunScripts());
1262
+ }
1263
+ },
1264
+ computed: {
1265
+ onUpdateHook0() {
1266
+ return {
1267
+ 0: this.$refs.elem,
1268
+ 1: this.ranInitFn
1269
+ };
1270
+ }
1271
+ },
1272
+ methods: {
1273
+ findAndRunScripts() {
1274
+ const t = this.$refs.elem.getElementsByTagName("script");
1275
+ for (let e = 0; e < t.length; e++) {
1276
+ const n = t[e];
1277
+ if (n.src && !this.scriptsInserted.includes(n.src)) {
1278
+ this.scriptsInserted.push(n.src);
1279
+ const r = document.createElement("script");
1280
+ r.async = !0, r.src = n.src, document.head.appendChild(r);
1281
+ } else if (jt(n) && !this.scriptsRun.includes(n.innerText))
1282
+ try {
1283
+ this.scriptsRun.push(n.innerText), new Function(n.innerText)();
1284
+ } catch (r) {
1285
+ console.warn("`Embed`: Error running script:", r);
1286
+ }
1287
+ }
1288
+ }
1289
+ }
1290
+ };
1291
+ var Ft = function() {
1292
+ var e = this, n = e._self._c;
1293
+ return n("div", { ref: "elem", staticClass: "builder-embed", domProps: { innerHTML: e._s(e.content) } });
1294
+ }, Ut = [], Vt = /* @__PURE__ */ m(
1295
+ Et,
1296
+ Ft,
1297
+ Ut,
1298
+ !1,
1299
+ null,
1300
+ null,
1301
+ null,
1302
+ null
1303
+ );
1304
+ const At = Vt.exports;
1305
+ function Wt() {
1306
+ return d() && window.self !== window.top;
1307
+ }
1308
+ function g() {
1309
+ return Wt() && window.location.search.indexOf("builder.frameEditing=") !== -1;
1310
+ }
1311
+ const Lt = {
1312
+ name: "builder-img-component",
1313
+ props: [
1314
+ "backgroundSize",
1315
+ "backgroundPosition",
1316
+ "imgSrc",
1317
+ "altText",
1318
+ "image",
1319
+ "attributes"
1320
+ ],
1321
+ data: () => ({ isEditing: g })
1322
+ };
1323
+ var Nt = function() {
1324
+ var e = this, n = e._self._c;
1325
+ return n("img", e._b({ key: e.isEditing() && e.imgSrc || "default-key", style: {
1326
+ objectFit: e.backgroundSize || "cover",
1327
+ objectPosition: e.backgroundPosition || "center"
1328
+ }, attrs: { alt: e.altText, src: e.imgSrc || e.image } }, "img", e.attributes, !1));
1329
+ }, Mt = [], Bt = /* @__PURE__ */ m(
1330
+ Lt,
1331
+ Nt,
1332
+ Mt,
1333
+ !1,
1334
+ null,
1335
+ null,
1336
+ null,
1337
+ null
1338
+ );
1339
+ const Dt = Bt.exports, zt = {
1340
+ name: "Raw:Img",
1341
+ hideFromInsertMenu: !0,
1342
+ builtIn: !0,
1343
+ 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",
1344
+ inputs: [
1345
+ {
1346
+ name: "image",
1347
+ bubble: !0,
1348
+ type: "file",
1349
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
1350
+ required: !0
1351
+ }
1352
+ ],
1353
+ noWrap: !0,
1354
+ static: !0
1355
+ };
1356
+ var Ht = Object.defineProperty, U = Object.getOwnPropertySymbols, qt = Object.prototype.hasOwnProperty, Kt = Object.prototype.propertyIsEnumerable, V = (t, e, n) => e in t ? Ht(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, h = (t, e) => {
1357
+ for (var n in e || (e = {}))
1358
+ qt.call(e, n) && V(t, n, e[n]);
1359
+ if (U)
1360
+ for (var n of U(e))
1361
+ Kt.call(e, n) && V(t, n, e[n]);
1362
+ return t;
1363
+ };
1364
+ const Gt = () => [
1365
+ h({ component: ge }, Ct),
1366
+ h({ component: Ce }, kt),
1367
+ h({ component: Dt }, zt),
1368
+ h({ component: Te }, Tt),
1369
+ h({ component: Ee }, Rt),
1370
+ h({ component: at }, $t),
1371
+ h({ component: dt }, wt),
1372
+ h({ component: gt }, It),
1373
+ h({ component: xt }, St),
1374
+ h({ component: At }, Ot)
1375
+ ];
1376
+ function A({
1377
+ code: t,
1378
+ context: e,
1379
+ state: n,
1380
+ event: r
1381
+ }) {
1382
+ if (t === "") {
1383
+ console.warn("Skipping evaluation of empty code block.");
1384
+ return;
1385
+ }
1386
+ const o = {
1387
+ isEditing: g(),
1388
+ isBrowser: d(),
1389
+ isServer: !d()
1390
+ }, a = !(t.includes(";") || t.includes(" return ") || t.trim().startsWith("return ")) ? `return (${t});` : t;
1391
+ try {
1392
+ return new Function("builder", "Builder", "state", "context", "event", a)(o, o, n, e, r);
1393
+ } catch (l) {
1394
+ console.warn(`Builder custom code error:
1395
+ While Evaluating:
1396
+ `, a, `
1397
+ `, l.message || l);
1398
+ }
1399
+ }
1400
+ function Jt() {
1401
+ return !d() || g() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
1402
+ }
1403
+ var Xt = Object.defineProperty, Yt = Object.defineProperties, Qt = Object.getOwnPropertyDescriptors, b = Object.getOwnPropertySymbols, G = Object.prototype.hasOwnProperty, J = Object.prototype.propertyIsEnumerable, W = (t, e, n) => e in t ? Xt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, C = (t, e) => {
1404
+ for (var n in e || (e = {}))
1405
+ G.call(e, n) && W(t, n, e[n]);
1406
+ if (b)
1407
+ for (var n of b(e))
1408
+ J.call(e, n) && W(t, n, e[n]);
1409
+ return t;
1410
+ }, L = (t, e) => Yt(t, Qt(e)), X = (t, e) => {
1411
+ var n = {};
1412
+ for (var r in t)
1413
+ G.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
1414
+ if (t != null && b)
1415
+ for (var r of b(t))
1416
+ e.indexOf(r) < 0 && J.call(t, r) && (n[r] = t[r]);
1417
+ return n;
1418
+ };
1419
+ const Y = [];
1420
+ function Dn(t, e) {
1421
+ return Y.push(C({ component: t }, e)), console.warn("registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."), t;
1422
+ }
1423
+ const Zt = (t) => {
1424
+ var e = t, n = X(e, [
1425
+ "component"
1426
+ ]);
1427
+ return {
1428
+ type: "builder.registerComponent",
1429
+ data: nn(n)
1430
+ };
1431
+ }, Q = (t) => JSON.parse(JSON.stringify(t)), en = (t) => typeof t == "function" ? tn(t) : Q(t), tn = (t) => {
1432
+ const e = t.toString().trim();
1433
+ return `return (${!e.startsWith("function") && !e.startsWith("(") ? "function " : ""}${e}).apply(this, arguments)`;
1434
+ }, nn = (t) => {
1435
+ var e = t, {
1436
+ inputs: n
1437
+ } = e, r = X(e, [
1438
+ "inputs"
1439
+ ]);
1440
+ return L(C({}, Q(r)), {
1441
+ inputs: n == null ? void 0 : n.map((o) => Object.entries(o).reduce((i, [a, l]) => L(C({}, i), {
1442
+ [a]: en(l)
1443
+ }), {}))
1444
+ });
1445
+ }, rn = (t) => {
1446
+ const e = t.split(".");
1447
+ return e.length > 2 ? e.slice(1).join(".") : t;
1448
+ }, on = ({
1449
+ name: t,
1450
+ canTrack: e
1451
+ }) => {
1452
+ var n;
1453
+ try {
1454
+ return e ? (n = document.cookie.split("; ").find((r) => r.startsWith(`${t}=`))) == null ? void 0 : n.split("=")[1] : void 0;
1455
+ } catch (r) {
1456
+ console.debug("[COOKIE] GET error: ", r);
1457
+ }
1458
+ }, sn = (t) => t.map(([e, n]) => n ? `${e}=${n}` : e).join("; "), an = [
1459
+ ["secure", ""],
1460
+ ["SameSite", "None"]
1461
+ ], ln = ({
1462
+ name: t,
1463
+ value: e,
1464
+ expires: n
1465
+ }) => {
1466
+ const o = (d() ? location.protocol === "https:" : !0) ? an : [[]], i = n ? [["expires", n.toUTCString()]] : [[]], a = [
1467
+ [t, e],
1468
+ ...i,
1469
+ ["path", "/"],
1470
+ ["domain", rn(window.location.hostname)],
1471
+ ...o
1472
+ ];
1473
+ return sn(a);
1474
+ }, cn = ({
1475
+ name: t,
1476
+ value: e,
1477
+ expires: n,
1478
+ canTrack: r
1479
+ }) => {
1480
+ try {
1481
+ if (!r)
1482
+ return;
1483
+ const o = ln({ name: t, value: e, expires: n });
1484
+ document.cookie = o;
1485
+ } catch (o) {
1486
+ console.warn("[COOKIE] SET error: ", o);
1487
+ }
1488
+ }, Z = (t) => t != null;
1489
+ function un() {
1490
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
1491
+ const e = Math.random() * 16 | 0;
1492
+ return (t == "x" ? e : e & 3 | 8).toString(16);
1493
+ });
1494
+ }
1495
+ function ee() {
1496
+ return un().replace(/-/g, "");
1497
+ }
1498
+ const te = "builderSessionId", dn = ({ canTrack: t }) => {
1499
+ if (!t)
1500
+ return;
1501
+ const e = on({ name: te, canTrack: t });
1502
+ if (Z(e))
1503
+ return e;
1504
+ {
1505
+ const n = pn();
1506
+ mn({ id: n, canTrack: t });
1507
+ }
1508
+ }, pn = () => ee(), mn = ({
1509
+ id: t,
1510
+ canTrack: e
1511
+ }) => cn({ name: te, value: t, canTrack: e }), ne = () => d() && typeof localStorage < "u" ? localStorage : void 0, fn = ({
1512
+ key: t,
1513
+ canTrack: e
1514
+ }) => {
1515
+ var n;
1516
+ try {
1517
+ return e ? (n = ne()) == null ? void 0 : n.getItem(t) : void 0;
1518
+ } catch (r) {
1519
+ console.debug("[LocalStorage] GET error: ", r);
1520
+ }
1521
+ }, hn = ({
1522
+ key: t,
1523
+ canTrack: e,
1524
+ value: n
1525
+ }) => {
1526
+ var r;
1527
+ try {
1528
+ e && ((r = ne()) == null || r.setItem(t, n));
1529
+ } catch (o) {
1530
+ console.debug("[LocalStorage] SET error: ", o);
1531
+ }
1532
+ }, re = "builderVisitorId", gn = ({ canTrack: t }) => {
1533
+ if (!t)
1534
+ return;
1535
+ const e = fn({
1536
+ key: re,
1537
+ canTrack: t
1538
+ });
1539
+ if (Z(e))
1540
+ return e;
1541
+ {
1542
+ const n = bn();
1543
+ _n({ id: n, canTrack: t });
1544
+ }
1545
+ }, bn = () => ee(), _n = ({
1546
+ id: t,
1547
+ canTrack: e
1548
+ }) => hn({
1549
+ key: re,
1550
+ value: t,
1551
+ canTrack: e
1552
+ });
1553
+ var vn = Object.defineProperty, yn = Object.defineProperties, xn = Object.getOwnPropertyDescriptors, _ = Object.getOwnPropertySymbols, oe = Object.prototype.hasOwnProperty, se = Object.prototype.propertyIsEnumerable, N = (t, e, n) => e in t ? vn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, M = (t, e) => {
1554
+ for (var n in e || (e = {}))
1555
+ oe.call(e, n) && N(t, n, e[n]);
1556
+ if (_)
1557
+ for (var n of _(e))
1558
+ se.call(e, n) && N(t, n, e[n]);
1559
+ return t;
1560
+ }, wn = (t, e) => yn(t, xn(e)), Cn = (t, e) => {
1561
+ var n = {};
1562
+ for (var r in t)
1563
+ oe.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
1564
+ if (t != null && _)
1565
+ for (var r of _(t))
1566
+ e.indexOf(r) < 0 && se.call(t, r) && (n[r] = t[r]);
1567
+ return n;
1568
+ }, Sn = (t, e, n) => new Promise((r, o) => {
1569
+ var i = (s) => {
1570
+ try {
1571
+ l(n.next(s));
1572
+ } catch (c) {
1573
+ o(c);
1574
+ }
1575
+ }, a = (s) => {
1576
+ try {
1577
+ l(n.throw(s));
1578
+ } catch (c) {
1579
+ o(c);
1580
+ }
1581
+ }, l = (s) => s.done ? r(s.value) : Promise.resolve(s.value).then(i, a);
1582
+ l((n = n.apply(t, e)).next());
1583
+ });
1584
+ const kn = ({ canTrack: t }) => {
1585
+ if (!t)
1586
+ return { visitorId: void 0, sessionId: void 0 };
1587
+ const e = dn({ canTrack: t }), n = gn({ canTrack: t });
1588
+ return {
1589
+ sessionId: e,
1590
+ visitorId: n
1591
+ };
1592
+ }, In = (t) => {
1593
+ var e = t, {
1594
+ type: n,
1595
+ canTrack: r,
1596
+ orgId: o,
1597
+ contentId: i
1598
+ } = e, a = Cn(e, [
1599
+ "type",
1600
+ "canTrack",
1601
+ "orgId",
1602
+ "contentId"
1603
+ ]);
1604
+ return {
1605
+ type: n,
1606
+ data: wn(M(M({}, a), kn({ canTrack: r })), {
1607
+ ownerId: o,
1608
+ contentId: i
1609
+ })
1610
+ };
1611
+ };
1612
+ function B(t) {
1613
+ return Sn(this, null, function* () {
1614
+ if (!!t.canTrack && !g() && !!(d() || S === "reactNative"))
1615
+ return fetch("https://builder.io/api/v1/track", {
1616
+ method: "POST",
1617
+ body: JSON.stringify({
1618
+ events: [In(t)]
1619
+ }),
1620
+ headers: {
1621
+ "content-type": "application/json"
1622
+ },
1623
+ mode: "cors"
1624
+ }).catch((e) => {
1625
+ console.error("Failed to track: ", e);
1626
+ });
1627
+ });
1628
+ }
1629
+ const $n = () => Promise.resolve().then(() => ae).then((t) => t.default), Tn = () => import("./render-styles.354823a4.js").then((t) => t.default), Rn = {
1630
+ name: "render-content",
1631
+ components: {
1632
+ "render-content-styles": Tn,
1633
+ "render-blocks": $n
1634
+ },
1635
+ props: [
1636
+ "content",
1637
+ "data",
1638
+ "canTrack",
1639
+ "context",
1640
+ "customComponents",
1641
+ "model",
1642
+ "apiKey"
1643
+ ],
1644
+ data: () => ({
1645
+ forceReRenderCount: 0,
1646
+ overrideContent: null,
1647
+ update: 0,
1648
+ overrideState: {},
1649
+ markMutable: k
1650
+ }),
1651
+ provide() {
1652
+ const t = this;
1653
+ return {
1654
+ BuilderContext: {
1655
+ get content() {
1656
+ return t.useContent;
1657
+ },
1658
+ get state() {
1659
+ return t.contentState;
1660
+ },
1661
+ get context() {
1662
+ return t.contextContext;
1663
+ },
1664
+ get apiKey() {
1665
+ return t.apiKey;
1666
+ },
1667
+ get registeredComponents() {
1668
+ return t.allRegisteredComponents;
1669
+ }
1670
+ }
1671
+ };
1672
+ },
1673
+ mounted() {
1674
+ if (d()) {
1675
+ if (g() && (this.forceReRenderCount = this.forceReRenderCount + 1, ce(), ue(), Object.values(this.allRegisteredComponents).forEach(
1676
+ (t) => {
1677
+ var n;
1678
+ const e = Zt(t);
1679
+ (n = window.parent) == null || n.postMessage(e, "*");
1680
+ }
1681
+ ), window.addEventListener("message", this.processMessage), window.addEventListener(
1682
+ "builder:component:stateChangeListenerActivated",
1683
+ this.emitStateUpdate
1684
+ )), this.useContent && B({
1685
+ type: "impression",
1686
+ canTrack: this.canTrackToUse,
1687
+ contentId: this.useContent.id,
1688
+ orgId: this.apiKey
1689
+ }), Jt()) {
1690
+ const t = new URL(location.href).searchParams;
1691
+ if (this.model && t.get("builder.preview") === this.model) {
1692
+ const e = t.get("apiKey") || t.get("builder.space");
1693
+ e && K({
1694
+ model: this.model,
1695
+ apiKey: e
1696
+ }).then((n) => {
1697
+ n && (this.overrideContent = n);
1698
+ });
1699
+ }
1700
+ }
1701
+ this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
1702
+ }
1703
+ },
1704
+ watch: {
1705
+ onUpdateHook0() {
1706
+ this.evaluateJsCode();
1707
+ },
1708
+ onUpdateHook1() {
1709
+ this.runHttpRequests();
1710
+ },
1711
+ onUpdateHook2() {
1712
+ this.emitStateUpdate();
1713
+ }
1714
+ },
1715
+ unmounted() {
1716
+ d() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
1717
+ "builder:component:stateChangeListenerActivated",
1718
+ this.emitStateUpdate
1719
+ ));
1720
+ },
1721
+ computed: {
1722
+ useContent() {
1723
+ var e, n;
1724
+ return {
1725
+ ...this.content,
1726
+ ...this.overrideContent,
1727
+ data: {
1728
+ ...(e = this.content) == null ? void 0 : e.data,
1729
+ ...this.data,
1730
+ ...(n = this.overrideContent) == null ? void 0 : n.data
1731
+ }
1732
+ };
1733
+ },
1734
+ canTrackToUse() {
1735
+ return this.canTrack || !0;
1736
+ },
1737
+ contentState() {
1738
+ var t, e;
1739
+ return {
1740
+ ...(e = (t = this.content) == null ? void 0 : t.data) == null ? void 0 : e.state,
1741
+ ...this.data,
1742
+ ...this.overrideState
1743
+ };
1744
+ },
1745
+ contextContext() {
1746
+ return this.context || {};
1747
+ },
1748
+ allRegisteredComponents() {
1749
+ return [
1750
+ ...Gt(),
1751
+ ...Y,
1752
+ ...this.customComponents || []
1753
+ ].reduce(
1754
+ (n, r) => ({ ...n, [r.name]: r }),
1755
+ {}
1756
+ );
1757
+ },
1758
+ httpReqsData() {
1759
+ return {};
1760
+ },
1761
+ shouldRenderContentStyles() {
1762
+ var t, e, n, r, o;
1763
+ return Boolean(
1764
+ (((e = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : e.cssCode) || ((o = (r = (n = this.useContent) == null ? void 0 : n.data) == null ? void 0 : r.customFonts) == null ? void 0 : o.length)) && S !== "reactNative"
1765
+ );
1766
+ },
1767
+ onUpdateHook0() {
1768
+ var t, e;
1769
+ return {
1770
+ 0: (e = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : e.jsCode
1771
+ };
1772
+ },
1773
+ onUpdateHook1() {
1774
+ var t, e;
1775
+ return {
1776
+ 0: (e = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : e.httpRequests
1777
+ };
1778
+ },
1779
+ onUpdateHook2() {
1780
+ return {
1781
+ 0: this.contentState
1782
+ };
1783
+ }
1784
+ },
1785
+ methods: {
1786
+ processMessage(t) {
1787
+ const { data: e } = t;
1788
+ if (e)
1789
+ switch (e.type) {
1790
+ case "builder.contentUpdate": {
1791
+ const n = e.data, r = n.key || n.alias || n.entry || n.modelName, o = n.data;
1792
+ r === this.model && (this.overrideContent = o, this.forceReRenderCount = this.forceReRenderCount + 1);
1793
+ break;
1794
+ }
1795
+ }
1796
+ },
1797
+ evaluateJsCode() {
1798
+ var e, n;
1799
+ const t = (n = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : n.jsCode;
1800
+ t && A({
1801
+ code: t,
1802
+ context: this.contextContext,
1803
+ state: this.contentState
1804
+ });
1805
+ },
1806
+ onClick(t) {
1807
+ this.useContent && B({
1808
+ type: "click",
1809
+ canTrack: this.canTrackToUse,
1810
+ contentId: this.useContent.id,
1811
+ orgId: this.apiKey
1812
+ });
1813
+ },
1814
+ evalExpression(t) {
1815
+ return t.replace(
1816
+ /{{([^}]+)}}/g,
1817
+ (e, n) => A({
1818
+ code: n,
1819
+ context: this.contextContext,
1820
+ state: this.contentState
1821
+ })
1822
+ );
1823
+ },
1824
+ handleRequest({ url: t, key: e }) {
1825
+ H().then((n) => n(t)).then((n) => n.json()).then((n) => {
1826
+ const r = { ...this.overrideState, [e]: n };
1827
+ this.overrideState = r;
1828
+ }).catch((n) => {
1829
+ console.log("error fetching dynamic data", t, n);
1830
+ });
1831
+ },
1832
+ runHttpRequests() {
1833
+ var e, n, r;
1834
+ const t = (r = (n = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : n.httpRequests) != null ? r : {};
1835
+ Object.entries(t).forEach(([o, i]) => {
1836
+ if (i && (!this.httpReqsData[o] || g())) {
1837
+ const a = this.evalExpression(i);
1838
+ this.handleRequest({
1839
+ url: a,
1840
+ key: o
1841
+ });
1842
+ }
1843
+ });
1844
+ },
1845
+ emitStateUpdate() {
1846
+ g() && window.dispatchEvent(
1847
+ new CustomEvent("builder:component:stateChange", {
1848
+ detail: {
1849
+ state: this.contentState,
1850
+ ref: {
1851
+ name: this.model
1852
+ }
1853
+ }
1854
+ })
1855
+ );
1856
+ }
1857
+ }
1858
+ };
1859
+ var On = function() {
1860
+ var r, o, i, a, l, s, c;
1861
+ var e = this, n = e._self._c;
1862
+ return e.useContent ? n("div", { ref: "elementRef", attrs: { "builder-content-id": (r = e.useContent) == null ? void 0 : r.id }, on: { click: function(u) {
1863
+ return e.onClick(u);
1864
+ } } }, [e.shouldRenderContentStyles ? n("render-content-styles", { attrs: { cssCode: (i = (o = e.useContent) == null ? void 0 : o.data) == null ? void 0 : i.cssCode, customFonts: (l = (a = e.useContent) == null ? void 0 : a.data) == null ? void 0 : l.customFonts } }) : e._e(), n("render-blocks", { key: e.forceReRenderCount, attrs: { blocks: e.markMutable((c = (s = e.useContent) == null ? void 0 : s.data) == null ? void 0 : c.blocks) } })], 1) : e._e();
1865
+ }, Pn = [], jn = /* @__PURE__ */ m(
1866
+ Rn,
1867
+ On,
1868
+ Pn,
1869
+ !1,
1870
+ null,
1871
+ null,
1872
+ null,
1873
+ null
1874
+ );
1875
+ const En = jn.exports, Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1876
+ __proto__: null,
1877
+ default: En
1878
+ }, Symbol.toStringTag, { value: "Module" }));
1879
+ const Un = () => import("./block-styles.3f130795.js").then((t) => t.default), Vn = () => import("./render-block.bdaa8069.js").then((t) => t.default), An = {
1880
+ name: "render-blocks",
1881
+ components: { "render-block": Vn, "block-styles": Un },
1882
+ props: ["blocks", "parent", "path"],
1883
+ inject: {
1884
+ builderContext: "BuilderContext"
1885
+ },
1886
+ computed: {
1887
+ className() {
1888
+ var t;
1889
+ return "builder-blocks" + ((t = this.blocks) != null && t.length ? "" : " no-blocks");
1890
+ }
1891
+ },
1892
+ methods: {
1893
+ onClick() {
1894
+ var t, e;
1895
+ g() && !((t = this.blocks) != null && t.length) && ((e = window.parent) == null || e.postMessage(
1896
+ {
1897
+ type: "builder.clickEmptyBlocks",
1898
+ data: {
1899
+ parentElementId: this.parent,
1900
+ dataPath: this.path
1901
+ }
1902
+ },
1903
+ "*"
1904
+ ));
1905
+ },
1906
+ onMouseEnter() {
1907
+ var t, e;
1908
+ g() && !((t = this.blocks) != null && t.length) && ((e = window.parent) == null || e.postMessage(
1909
+ {
1910
+ type: "builder.hoverEmptyBlocks",
1911
+ data: {
1912
+ parentElementId: this.parent,
1913
+ dataPath: this.path
1914
+ }
1915
+ },
1916
+ "*"
1917
+ ));
1918
+ },
1919
+ _classStringToObject(t) {
1920
+ const e = {};
1921
+ if (typeof t != "string")
1922
+ return e;
1923
+ const n = t.trim().split(/\s+/);
1924
+ for (const r of n)
1925
+ e[r] = !0;
1926
+ return e;
1927
+ }
1928
+ }
1929
+ };
1930
+ var Wn = function() {
1931
+ var e = this, n = e._self._c;
1932
+ return n("div", { class: e._classStringToObject(e.className + " div-23e8fqt91nf"), attrs: { "builder-path": e.path, "builder-parent-id": e.parent, dataSet: {
1933
+ class: e.className
1934
+ } }, on: { click: function(r) {
1935
+ return e.onClick();
1936
+ }, mouseenter: function(r) {
1937
+ return e.onMouseEnter();
1938
+ } } }, [e._l(e.blocks, function(r, o) {
1939
+ return e.blocks ? n("render-block", { key: "render-block-" + r.id, attrs: { block: r, context: e.builderContext } }) : e._e();
1940
+ }), e._l(e.blocks, function(r, o) {
1941
+ return e.blocks ? n("block-styles", { key: "block-style-" + r.id, attrs: { block: r, context: e.builderContext } }) : e._e();
1942
+ })], 2);
1943
+ }, Ln = [], Nn = /* @__PURE__ */ m(
1944
+ An,
1945
+ Wn,
1946
+ Ln,
1947
+ !1,
1948
+ null,
1949
+ "1e73bac5",
1950
+ null,
1951
+ null
1952
+ );
1953
+ const Mn = Nn.exports, ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1954
+ __proto__: null,
1955
+ default: Mn
1956
+ }, Symbol.toStringTag, { value: "Module" })), D = {};
1957
+ function zn(t) {
1958
+ if (d()) {
1959
+ Object.assign(D, t);
1960
+ const e = {
1961
+ type: "builder.settingsChange",
1962
+ data: D
1963
+ };
1964
+ parent.postMessage(e, "*");
1965
+ }
1966
+ }
1967
+ export {
1968
+ dt as B,
1969
+ ge as C,
1970
+ xt as F,
1971
+ Ce as I,
1972
+ gt as S,
1973
+ S as T,
1974
+ Ee as V,
1975
+ En as a,
1976
+ at as b,
1977
+ Te as c,
1978
+ Jt as d,
1979
+ A as e,
1980
+ Y as f,
1981
+ Zt as g,
1982
+ Dn as h,
1983
+ g as i,
1984
+ le as j,
1985
+ Ze as k,
1986
+ et as l,
1987
+ Bn as m,
1988
+ m as n,
1989
+ K as o,
1990
+ z as p,
1991
+ Ne as q,
1992
+ Mn as r,
1993
+ zn as s,
1994
+ Me as t,
1995
+ Be as u
1996
+ };