@builder.io/sdk-solid 0.7.0 → 0.7.1-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { delegateEvents, createComponent, spread, mergeProps, insert, effect, setAttribute, className, style, template, memo, Dynamic, use } from 'solid-js/web';
1
+ import { createComponent, spread, mergeProps, insert, effect, setAttribute, className, style, template, memo, Dynamic, use } from 'solid-js/web';
2
2
  import { createContext, Show, useContext, For, createSignal, onMount, createEffect, on } from 'solid-js';
3
3
  import { css } from 'solid-styled-components';
4
4
 
@@ -183,6 +183,19 @@ var getFunctionArguments = ({
183
183
  event
184
184
  });
185
185
  };
186
+ var getBuilderGlobals = () => ({
187
+ isEditing: isEditing(),
188
+ isBrowser: isBrowser(),
189
+ isServer: !isBrowser(),
190
+ getUserAttributes: () => getUserAttributes()
191
+ });
192
+ var parseCode = (code, {
193
+ isExpression = true
194
+ }) => {
195
+ const useReturn = isExpression && !(code.includes(";") || code.includes(" return ") || code.trim().startsWith("return "));
196
+ const useCode = useReturn ? `return (${code});` : code;
197
+ return useCode;
198
+ };
186
199
 
187
200
  // src/functions/evaluate/browser-runtime/browser.js
188
201
  var runInBrowser = ({
@@ -224,6 +237,155 @@ function flattenState(rootState, localState, rootSetState) {
224
237
  });
225
238
  }
226
239
 
240
+ // src/functions/evaluate/node-runtime/safeDynamicRequire.js
241
+ var noop = () => null;
242
+ var safeDynamicRequire = noop;
243
+ try {
244
+ safeDynamicRequire = eval("require");
245
+ } catch (error) {
246
+ }
247
+
248
+ // src/functions/set.js
249
+ var set = (obj, _path, value) => {
250
+ if (Object(obj) !== obj) {
251
+ return obj;
252
+ }
253
+ const path = Array.isArray(_path) ? _path : _path.toString().match(/[^.[\]]+/g);
254
+ path.slice(0, -1).reduce((a, c, i) => Object(a[c]) === a[c] ? a[c] : a[c] = Math.abs(Number(path[i + 1])) >> 0 === +path[i + 1] ? [] : {}, obj)[path[path.length - 1]] = value;
255
+ return obj;
256
+ };
257
+
258
+ // src/functions/evaluate/node-runtime/node-runtime.js
259
+ var __defProp = Object.defineProperty;
260
+ var __defProps = Object.defineProperties;
261
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
262
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
263
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
264
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
265
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
266
+ enumerable: true,
267
+ configurable: true,
268
+ writable: true,
269
+ value
270
+ }) : obj[key] = value;
271
+ var __spreadValues = (a, b) => {
272
+ for (var prop in b || (b = {}))
273
+ if (__hasOwnProp.call(b, prop))
274
+ __defNormalProp(a, prop, b[prop]);
275
+ if (__getOwnPropSymbols)
276
+ for (var prop of __getOwnPropSymbols(b)) {
277
+ if (__propIsEnum.call(b, prop))
278
+ __defNormalProp(a, prop, b[prop]);
279
+ }
280
+ return a;
281
+ };
282
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
283
+ var ivm = safeDynamicRequire("isolated-vm");
284
+ var getSyncValName = (key) => `bldr_${key}_sync`;
285
+ var BUILDER_SET_STATE_NAME = "BUILDER_SET_STATE";
286
+ var INJECTED_IVM_GLOBAL = "BUILDER_IVM";
287
+ var REF_TO_PROXY_FN = `
288
+ var refToProxy = (obj) => {
289
+ if (typeof obj !== 'object' || obj === null) {
290
+ return obj;
291
+ }
292
+ return new Proxy({}, {
293
+ get(target, key) {
294
+ if (key === 'copySync') {
295
+ return () => obj.copySync();
296
+ }
297
+ const val = obj.getSync(key);
298
+ if (typeof val?.getSync === 'function') {
299
+ return refToProxy(val);
300
+ }
301
+ return val;
302
+ },
303
+ set(target, key, value) {
304
+ const v = typeof value === 'object' ? new ${INJECTED_IVM_GLOBAL}.Reference(value) : value;
305
+ obj.setSync(key, v);
306
+ ${BUILDER_SET_STATE_NAME}(key, value)
307
+ },
308
+ deleteProperty(target, key) {
309
+ obj.deleteSync(key);
310
+ }
311
+ })
312
+ }
313
+ `;
314
+ var processCode = ({
315
+ code,
316
+ args
317
+ }) => {
318
+ const fnArgs = args.map(([name]) => `var ${name} = refToProxy(${getSyncValName(name)}); `).join("");
319
+ return `
320
+ ${REF_TO_PROXY_FN}
321
+ ${fnArgs}
322
+ function theFunction() {
323
+ ${code}
324
+ }
325
+
326
+ let output = theFunction()
327
+
328
+ if (typeof output === 'object' && output !== null) {
329
+ output = JSON.stringify(output.copySync ? output.copySync() : output);
330
+ }
331
+
332
+ output;
333
+ `;
334
+ };
335
+ var getIsolateContext = () => {
336
+ const isolate = new ivm.Isolate({
337
+ memoryLimit: 128
338
+ });
339
+ return isolate.createContextSync();
340
+ };
341
+ var runInNode = ({
342
+ code,
343
+ builder,
344
+ context,
345
+ event,
346
+ localState,
347
+ rootSetState,
348
+ rootState
349
+ }) => {
350
+ const state = fastClone(__spreadValues(__spreadValues({}, rootState), localState));
351
+ const args = getFunctionArguments({
352
+ builder,
353
+ context,
354
+ event,
355
+ state
356
+ });
357
+ const isolateContext = getIsolateContext();
358
+ const jail = isolateContext.global;
359
+ jail.setSync("global", jail.derefInto());
360
+ jail.setSync("log", function(...logArgs) {
361
+ });
362
+ jail.setSync(BUILDER_SET_STATE_NAME, function(key, value) {
363
+ set(rootState, key, value);
364
+ rootSetState == null ? void 0 : rootSetState(rootState);
365
+ });
366
+ args.forEach(([key, arg]) => {
367
+ const val = typeof arg === "object" ? new ivm.Reference(key === "builder" ? __spreadProps(__spreadValues({}, arg), {
368
+ getUserAttributes: () => arg.getUserAttributes()
369
+ }) : arg) : null;
370
+ jail.setSync(getSyncValName(key), val);
371
+ });
372
+ jail.setSync(INJECTED_IVM_GLOBAL, ivm);
373
+ const evalStr = processCode({
374
+ code,
375
+ args
376
+ });
377
+ const resultStr = isolateContext.evalSync(evalStr);
378
+ try {
379
+ const res = JSON.parse(resultStr);
380
+ return res;
381
+ } catch (_error) {
382
+ return resultStr;
383
+ }
384
+ };
385
+
386
+ // src/functions/evaluate/choose-eval.js
387
+ var chooseBrowserOrServerEval = (args) => isBrowser() ? runInBrowser(args) : runInNode(args);
388
+
227
389
  // src/functions/evaluate/evaluate.js
228
390
  function evaluate({
229
391
  code,
@@ -238,17 +400,11 @@ function evaluate({
238
400
  logger.warn("Skipping evaluation of empty code block.");
239
401
  return;
240
402
  }
241
- const builder = {
242
- isEditing: isEditing(),
243
- isBrowser: isBrowser(),
244
- isServer: !isBrowser(),
245
- getUserAttributes: () => getUserAttributes()
246
- };
247
- const useReturn = isExpression && !(code.includes(";") || code.includes(" return ") || code.trim().startsWith("return "));
248
- const useCode = useReturn ? `return (${code});` : code;
249
403
  const args = {
250
- code: useCode,
251
- builder,
404
+ code: parseCode(code, {
405
+ isExpression
406
+ }),
407
+ builder: getBuilderGlobals(),
252
408
  context,
253
409
  event,
254
410
  rootSetState,
@@ -256,7 +412,7 @@ function evaluate({
256
412
  localState
257
413
  };
258
414
  try {
259
- return runInBrowser(args);
415
+ return chooseBrowserOrServerEval(args);
260
416
  } catch (e) {
261
417
  logger.error("Failed code evaluation: " + e.message, {
262
418
  code
@@ -265,46 +421,36 @@ function evaluate({
265
421
  }
266
422
  }
267
423
 
268
- // src/functions/set.js
269
- var set = (obj, _path, value) => {
270
- if (Object(obj) !== obj) {
271
- return obj;
272
- }
273
- const path = Array.isArray(_path) ? _path : _path.toString().match(/[^.[\]]+/g);
274
- path.slice(0, -1).reduce((a, c, i) => Object(a[c]) === a[c] ? a[c] : a[c] = Math.abs(Number(path[i + 1])) >> 0 === +path[i + 1] ? [] : {}, obj)[path[path.length - 1]] = value;
275
- return obj;
276
- };
277
-
278
424
  // src/functions/transform-block.js
279
425
  function transformBlock(block) {
280
426
  return block;
281
427
  }
282
428
 
283
429
  // src/functions/get-processed-block.js
284
- var __defProp = Object.defineProperty;
285
- var __defProps = Object.defineProperties;
286
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
287
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
288
- var __hasOwnProp = Object.prototype.hasOwnProperty;
289
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
290
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
430
+ var __defProp2 = Object.defineProperty;
431
+ var __defProps2 = Object.defineProperties;
432
+ var __getOwnPropDescs2 = Object.getOwnPropertyDescriptors;
433
+ var __getOwnPropSymbols2 = Object.getOwnPropertySymbols;
434
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
435
+ var __propIsEnum2 = Object.prototype.propertyIsEnumerable;
436
+ var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, {
291
437
  enumerable: true,
292
438
  configurable: true,
293
439
  writable: true,
294
440
  value
295
441
  }) : obj[key] = value;
296
- var __spreadValues = (a, b) => {
442
+ var __spreadValues2 = (a, b) => {
297
443
  for (var prop in b || (b = {}))
298
- if (__hasOwnProp.call(b, prop))
299
- __defNormalProp(a, prop, b[prop]);
300
- if (__getOwnPropSymbols)
301
- for (var prop of __getOwnPropSymbols(b)) {
302
- if (__propIsEnum.call(b, prop))
303
- __defNormalProp(a, prop, b[prop]);
444
+ if (__hasOwnProp2.call(b, prop))
445
+ __defNormalProp2(a, prop, b[prop]);
446
+ if (__getOwnPropSymbols2)
447
+ for (var prop of __getOwnPropSymbols2(b)) {
448
+ if (__propIsEnum2.call(b, prop))
449
+ __defNormalProp2(a, prop, b[prop]);
304
450
  }
305
451
  return a;
306
452
  };
307
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
453
+ var __spreadProps2 = (a, b) => __defProps2(a, __getOwnPropDescs2(b));
308
454
  var evaluateBindings = ({
309
455
  block,
310
456
  context,
@@ -316,9 +462,9 @@ var evaluateBindings = ({
316
462
  return block;
317
463
  }
318
464
  const copy = fastClone(block);
319
- const copied = __spreadProps(__spreadValues({}, copy), {
320
- properties: __spreadValues({}, copy.properties),
321
- actions: __spreadValues({}, copy.actions)
465
+ const copied = __spreadProps2(__spreadValues2({}, copy), {
466
+ properties: __spreadValues2({}, copy.properties),
467
+ actions: __spreadValues2({}, copy.actions)
322
468
  });
323
469
  for (const binding in block.bindings) {
324
470
  const expression = block.bindings[binding];
@@ -477,62 +623,62 @@ function BlockStyles(props) {
477
623
  var block_styles_default = BlockStyles;
478
624
 
479
625
  // src/functions/get-block-component-options.js
480
- var __defProp2 = Object.defineProperty;
481
- var __defProps2 = Object.defineProperties;
482
- var __getOwnPropDescs2 = Object.getOwnPropertyDescriptors;
483
- var __getOwnPropSymbols2 = Object.getOwnPropertySymbols;
484
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
485
- var __propIsEnum2 = Object.prototype.propertyIsEnumerable;
486
- var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, {
626
+ var __defProp3 = Object.defineProperty;
627
+ var __defProps3 = Object.defineProperties;
628
+ var __getOwnPropDescs3 = Object.getOwnPropertyDescriptors;
629
+ var __getOwnPropSymbols3 = Object.getOwnPropertySymbols;
630
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
631
+ var __propIsEnum3 = Object.prototype.propertyIsEnumerable;
632
+ var __defNormalProp3 = (obj, key, value) => key in obj ? __defProp3(obj, key, {
487
633
  enumerable: true,
488
634
  configurable: true,
489
635
  writable: true,
490
636
  value
491
637
  }) : obj[key] = value;
492
- var __spreadValues2 = (a, b) => {
638
+ var __spreadValues3 = (a, b) => {
493
639
  for (var prop in b || (b = {}))
494
- if (__hasOwnProp2.call(b, prop))
495
- __defNormalProp2(a, prop, b[prop]);
496
- if (__getOwnPropSymbols2)
497
- for (var prop of __getOwnPropSymbols2(b)) {
498
- if (__propIsEnum2.call(b, prop))
499
- __defNormalProp2(a, prop, b[prop]);
640
+ if (__hasOwnProp3.call(b, prop))
641
+ __defNormalProp3(a, prop, b[prop]);
642
+ if (__getOwnPropSymbols3)
643
+ for (var prop of __getOwnPropSymbols3(b)) {
644
+ if (__propIsEnum3.call(b, prop))
645
+ __defNormalProp3(a, prop, b[prop]);
500
646
  }
501
647
  return a;
502
648
  };
503
- var __spreadProps2 = (a, b) => __defProps2(a, __getOwnPropDescs2(b));
649
+ var __spreadProps3 = (a, b) => __defProps3(a, __getOwnPropDescs3(b));
504
650
  function getBlockComponentOptions(block) {
505
651
  var _a;
506
- return __spreadProps2(__spreadValues2(__spreadValues2({}, (_a = block.component) == null ? void 0 : _a.options), block.options), {
652
+ return __spreadProps3(__spreadValues3(__spreadValues3({}, (_a = block.component) == null ? void 0 : _a.options), block.options), {
507
653
  builderBlock: block
508
654
  });
509
655
  }
510
656
 
511
657
  // src/functions/sanitize-react-native-block-styles.js
512
- var __defProp3 = Object.defineProperty;
513
- var __defProps3 = Object.defineProperties;
514
- var __getOwnPropDescs3 = Object.getOwnPropertyDescriptors;
515
- var __getOwnPropSymbols3 = Object.getOwnPropertySymbols;
516
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
517
- var __propIsEnum3 = Object.prototype.propertyIsEnumerable;
518
- var __defNormalProp3 = (obj, key, value) => key in obj ? __defProp3(obj, key, {
658
+ var __defProp4 = Object.defineProperty;
659
+ var __defProps4 = Object.defineProperties;
660
+ var __getOwnPropDescs4 = Object.getOwnPropertyDescriptors;
661
+ var __getOwnPropSymbols4 = Object.getOwnPropertySymbols;
662
+ var __hasOwnProp4 = Object.prototype.hasOwnProperty;
663
+ var __propIsEnum4 = Object.prototype.propertyIsEnumerable;
664
+ var __defNormalProp4 = (obj, key, value) => key in obj ? __defProp4(obj, key, {
519
665
  enumerable: true,
520
666
  configurable: true,
521
667
  writable: true,
522
668
  value
523
669
  }) : obj[key] = value;
524
- var __spreadValues3 = (a, b) => {
670
+ var __spreadValues4 = (a, b) => {
525
671
  for (var prop in b || (b = {}))
526
- if (__hasOwnProp3.call(b, prop))
527
- __defNormalProp3(a, prop, b[prop]);
528
- if (__getOwnPropSymbols3)
529
- for (var prop of __getOwnPropSymbols3(b)) {
530
- if (__propIsEnum3.call(b, prop))
531
- __defNormalProp3(a, prop, b[prop]);
672
+ if (__hasOwnProp4.call(b, prop))
673
+ __defNormalProp4(a, prop, b[prop]);
674
+ if (__getOwnPropSymbols4)
675
+ for (var prop of __getOwnPropSymbols4(b)) {
676
+ if (__propIsEnum4.call(b, prop))
677
+ __defNormalProp4(a, prop, b[prop]);
532
678
  }
533
679
  return a;
534
680
  };
535
- var __spreadProps3 = (a, b) => __defProps3(a, __getOwnPropDescs3(b));
681
+ var __spreadProps4 = (a, b) => __defProps4(a, __getOwnPropDescs4(b));
536
682
  var propertiesThatMustBeNumber = /* @__PURE__ */ new Set(["lineHeight"]);
537
683
  var displayValues = /* @__PURE__ */ new Set(["flex", "none"]);
538
684
  var normalizeNumber = (value) => {
@@ -559,43 +705,43 @@ var sanitizeReactNativeBlockStyles = (styles) => {
559
705
  const newValue = parseFloat(propertyValue);
560
706
  const normalizedValue = normalizeNumber(newValue);
561
707
  if (normalizedValue) {
562
- return __spreadProps3(__spreadValues3({}, acc), {
708
+ return __spreadProps4(__spreadValues4({}, acc), {
563
709
  [key]: normalizedValue
564
710
  });
565
711
  } else {
566
712
  return acc;
567
713
  }
568
714
  } else if (propertyValue === "0") {
569
- return __spreadProps3(__spreadValues3({}, acc), {
715
+ return __spreadProps4(__spreadValues4({}, acc), {
570
716
  [key]: 0
571
717
  });
572
718
  }
573
719
  }
574
- return __spreadProps3(__spreadValues3({}, acc), {
720
+ return __spreadProps4(__spreadValues4({}, acc), {
575
721
  [key]: propertyValue
576
722
  });
577
723
  }, {});
578
724
  };
579
725
 
580
726
  // src/functions/get-react-native-block-styles.js
581
- var __defProp4 = Object.defineProperty;
582
- var __getOwnPropSymbols4 = Object.getOwnPropertySymbols;
583
- var __hasOwnProp4 = Object.prototype.hasOwnProperty;
584
- var __propIsEnum4 = Object.prototype.propertyIsEnumerable;
585
- var __defNormalProp4 = (obj, key, value) => key in obj ? __defProp4(obj, key, {
727
+ var __defProp5 = Object.defineProperty;
728
+ var __getOwnPropSymbols5 = Object.getOwnPropertySymbols;
729
+ var __hasOwnProp5 = Object.prototype.hasOwnProperty;
730
+ var __propIsEnum5 = Object.prototype.propertyIsEnumerable;
731
+ var __defNormalProp5 = (obj, key, value) => key in obj ? __defProp5(obj, key, {
586
732
  enumerable: true,
587
733
  configurable: true,
588
734
  writable: true,
589
735
  value
590
736
  }) : obj[key] = value;
591
- var __spreadValues4 = (a, b) => {
737
+ var __spreadValues5 = (a, b) => {
592
738
  for (var prop in b || (b = {}))
593
- if (__hasOwnProp4.call(b, prop))
594
- __defNormalProp4(a, prop, b[prop]);
595
- if (__getOwnPropSymbols4)
596
- for (var prop of __getOwnPropSymbols4(b)) {
597
- if (__propIsEnum4.call(b, prop))
598
- __defNormalProp4(a, prop, b[prop]);
739
+ if (__hasOwnProp5.call(b, prop))
740
+ __defNormalProp5(a, prop, b[prop]);
741
+ if (__getOwnPropSymbols5)
742
+ for (var prop of __getOwnPropSymbols5(b)) {
743
+ if (__propIsEnum5.call(b, prop))
744
+ __defNormalProp5(a, prop, b[prop]);
599
745
  }
600
746
  return a;
601
747
  };
@@ -608,7 +754,7 @@ function getReactNativeBlockStyles({
608
754
  if (!responsiveStyles) {
609
755
  return {};
610
756
  }
611
- const styles = __spreadValues4(__spreadValues4(__spreadValues4(__spreadValues4(__spreadValues4({}, context.inheritedStyles), responsiveStyles.large || {}), responsiveStyles.medium || {}), responsiveStyles.small || {}), blockStyles);
757
+ const styles = __spreadValues5(__spreadValues5(__spreadValues5(__spreadValues5(__spreadValues5({}, context.inheritedStyles), responsiveStyles.large || {}), responsiveStyles.medium || {}), responsiveStyles.small || {}), blockStyles);
612
758
  const newStyles = sanitizeReactNativeBlockStyles(styles);
613
759
  return newStyles;
614
760
  }
@@ -619,30 +765,30 @@ function transformBlockProperties(properties) {
619
765
  }
620
766
 
621
767
  // src/functions/get-block-properties.js
622
- var __defProp5 = Object.defineProperty;
623
- var __defProps4 = Object.defineProperties;
624
- var __getOwnPropDescs4 = Object.getOwnPropertyDescriptors;
625
- var __getOwnPropSymbols5 = Object.getOwnPropertySymbols;
626
- var __hasOwnProp5 = Object.prototype.hasOwnProperty;
627
- var __propIsEnum5 = Object.prototype.propertyIsEnumerable;
628
- var __defNormalProp5 = (obj, key, value) => key in obj ? __defProp5(obj, key, {
768
+ var __defProp6 = Object.defineProperty;
769
+ var __defProps5 = Object.defineProperties;
770
+ var __getOwnPropDescs5 = Object.getOwnPropertyDescriptors;
771
+ var __getOwnPropSymbols6 = Object.getOwnPropertySymbols;
772
+ var __hasOwnProp6 = Object.prototype.hasOwnProperty;
773
+ var __propIsEnum6 = Object.prototype.propertyIsEnumerable;
774
+ var __defNormalProp6 = (obj, key, value) => key in obj ? __defProp6(obj, key, {
629
775
  enumerable: true,
630
776
  configurable: true,
631
777
  writable: true,
632
778
  value
633
779
  }) : obj[key] = value;
634
- var __spreadValues5 = (a, b) => {
780
+ var __spreadValues6 = (a, b) => {
635
781
  for (var prop in b || (b = {}))
636
- if (__hasOwnProp5.call(b, prop))
637
- __defNormalProp5(a, prop, b[prop]);
638
- if (__getOwnPropSymbols5)
639
- for (var prop of __getOwnPropSymbols5(b)) {
640
- if (__propIsEnum5.call(b, prop))
641
- __defNormalProp5(a, prop, b[prop]);
782
+ if (__hasOwnProp6.call(b, prop))
783
+ __defNormalProp6(a, prop, b[prop]);
784
+ if (__getOwnPropSymbols6)
785
+ for (var prop of __getOwnPropSymbols6(b)) {
786
+ if (__propIsEnum6.call(b, prop))
787
+ __defNormalProp6(a, prop, b[prop]);
642
788
  }
643
789
  return a;
644
790
  };
645
- var __spreadProps4 = (a, b) => __defProps4(a, __getOwnPropDescs4(b));
791
+ var __spreadProps5 = (a, b) => __defProps5(a, __getOwnPropDescs5(b));
646
792
  var extractRelevantRootBlockProperties = (block) => {
647
793
  return {
648
794
  href: block.href
@@ -653,7 +799,7 @@ function getBlockProperties({
653
799
  context
654
800
  }) {
655
801
  var _a;
656
- const properties = __spreadProps4(__spreadValues5(__spreadValues5({}, extractRelevantRootBlockProperties(block)), block.properties), {
802
+ const properties = __spreadProps5(__spreadValues6(__spreadValues6({}, extractRelevantRootBlockProperties(block)), block.properties), {
657
803
  "builder-id": block.id,
658
804
  style: block.style ? getStyleAttribute(block.style) : void 0,
659
805
  class: [block.id, "builder-block", block.class, (_a = block.properties) == null ? void 0 : _a.class].filter(Boolean).join(" ")
@@ -683,38 +829,38 @@ function getStyleAttribute(style) {
683
829
  }
684
830
 
685
831
  // src/components/block/block.helpers.js
686
- var __defProp6 = Object.defineProperty;
687
- var __defProps5 = Object.defineProperties;
688
- var __getOwnPropDescs5 = Object.getOwnPropertyDescriptors;
689
- var __getOwnPropSymbols6 = Object.getOwnPropertySymbols;
690
- var __hasOwnProp6 = Object.prototype.hasOwnProperty;
691
- var __propIsEnum6 = Object.prototype.propertyIsEnumerable;
692
- var __defNormalProp6 = (obj, key, value) => key in obj ? __defProp6(obj, key, {
832
+ var __defProp7 = Object.defineProperty;
833
+ var __defProps6 = Object.defineProperties;
834
+ var __getOwnPropDescs6 = Object.getOwnPropertyDescriptors;
835
+ var __getOwnPropSymbols7 = Object.getOwnPropertySymbols;
836
+ var __hasOwnProp7 = Object.prototype.hasOwnProperty;
837
+ var __propIsEnum7 = Object.prototype.propertyIsEnumerable;
838
+ var __defNormalProp7 = (obj, key, value) => key in obj ? __defProp7(obj, key, {
693
839
  enumerable: true,
694
840
  configurable: true,
695
841
  writable: true,
696
842
  value
697
843
  }) : obj[key] = value;
698
- var __spreadValues6 = (a, b) => {
844
+ var __spreadValues7 = (a, b) => {
699
845
  for (var prop in b || (b = {}))
700
- if (__hasOwnProp6.call(b, prop))
701
- __defNormalProp6(a, prop, b[prop]);
702
- if (__getOwnPropSymbols6)
703
- for (var prop of __getOwnPropSymbols6(b)) {
704
- if (__propIsEnum6.call(b, prop))
705
- __defNormalProp6(a, prop, b[prop]);
846
+ if (__hasOwnProp7.call(b, prop))
847
+ __defNormalProp7(a, prop, b[prop]);
848
+ if (__getOwnPropSymbols7)
849
+ for (var prop of __getOwnPropSymbols7(b)) {
850
+ if (__propIsEnum7.call(b, prop))
851
+ __defNormalProp7(a, prop, b[prop]);
706
852
  }
707
853
  return a;
708
854
  };
709
- var __spreadProps5 = (a, b) => __defProps5(a, __getOwnPropDescs5(b));
855
+ var __spreadProps6 = (a, b) => __defProps6(a, __getOwnPropDescs6(b));
710
856
  var __objRest = (source, exclude) => {
711
857
  var target = {};
712
858
  for (var prop in source)
713
- if (__hasOwnProp6.call(source, prop) && exclude.indexOf(prop) < 0)
859
+ if (__hasOwnProp7.call(source, prop) && exclude.indexOf(prop) < 0)
714
860
  target[prop] = source[prop];
715
- if (source != null && __getOwnPropSymbols6)
716
- for (var prop of __getOwnPropSymbols6(source)) {
717
- if (exclude.indexOf(prop) < 0 && __propIsEnum6.call(source, prop))
861
+ if (source != null && __getOwnPropSymbols7)
862
+ for (var prop of __getOwnPropSymbols7(source)) {
863
+ if (exclude.indexOf(prop) < 0 && __propIsEnum7.call(source, prop))
718
864
  target[prop] = source[prop];
719
865
  }
720
866
  return target;
@@ -770,8 +916,8 @@ var getRepeatItemData = ({
770
916
  const collectionName = repeat.collection.split(".").pop();
771
917
  const itemNameToUse = repeat.itemName || (collectionName ? collectionName + "Item" : "item");
772
918
  const repeatArray = itemsArray.map((item, index) => ({
773
- context: __spreadProps5(__spreadValues6({}, context), {
774
- localState: __spreadProps5(__spreadValues6({}, context.localState), {
919
+ context: __spreadProps6(__spreadValues7({}, context), {
920
+ localState: __spreadProps6(__spreadValues7({}, context.localState), {
775
921
  $index: index,
776
922
  $item: item,
777
923
  [itemNameToUse]: item,
@@ -892,24 +1038,24 @@ function InteractiveElement(props) {
892
1038
  var interactive_element_default = InteractiveElement;
893
1039
 
894
1040
  // src/components/block/components/component-ref/component-ref.helpers.js
895
- var __defProp7 = Object.defineProperty;
896
- var __getOwnPropSymbols7 = Object.getOwnPropertySymbols;
897
- var __hasOwnProp7 = Object.prototype.hasOwnProperty;
898
- var __propIsEnum7 = Object.prototype.propertyIsEnumerable;
899
- var __defNormalProp7 = (obj, key, value) => key in obj ? __defProp7(obj, key, {
1041
+ var __defProp8 = Object.defineProperty;
1042
+ var __getOwnPropSymbols8 = Object.getOwnPropertySymbols;
1043
+ var __hasOwnProp8 = Object.prototype.hasOwnProperty;
1044
+ var __propIsEnum8 = Object.prototype.propertyIsEnumerable;
1045
+ var __defNormalProp8 = (obj, key, value) => key in obj ? __defProp8(obj, key, {
900
1046
  enumerable: true,
901
1047
  configurable: true,
902
1048
  writable: true,
903
1049
  value
904
1050
  }) : obj[key] = value;
905
- var __spreadValues7 = (a, b) => {
1051
+ var __spreadValues8 = (a, b) => {
906
1052
  for (var prop in b || (b = {}))
907
- if (__hasOwnProp7.call(b, prop))
908
- __defNormalProp7(a, prop, b[prop]);
909
- if (__getOwnPropSymbols7)
910
- for (var prop of __getOwnPropSymbols7(b)) {
911
- if (__propIsEnum7.call(b, prop))
912
- __defNormalProp7(a, prop, b[prop]);
1053
+ if (__hasOwnProp8.call(b, prop))
1054
+ __defNormalProp8(a, prop, b[prop]);
1055
+ if (__getOwnPropSymbols8)
1056
+ for (var prop of __getOwnPropSymbols8(b)) {
1057
+ if (__propIsEnum8.call(b, prop))
1058
+ __defNormalProp8(a, prop, b[prop]);
913
1059
  }
914
1060
  return a;
915
1061
  };
@@ -928,7 +1074,7 @@ var getWrapperProps = ({
928
1074
  context,
929
1075
  wrapperProps: componentOptions
930
1076
  };
931
- return isInteractive ? interactiveElementProps : __spreadValues7(__spreadValues7({}, componentOptions), includeBlockProps ? {
1077
+ return isInteractive ? interactiveElementProps : __spreadValues8(__spreadValues8({}, componentOptions), includeBlockProps ? {
932
1078
  attributes: getBlockProperties({
933
1079
  block: builderBlock,
934
1080
  context: contextValue
@@ -1734,31 +1880,31 @@ function SectionComponent(props) {
1734
1880
  var section_default = SectionComponent;
1735
1881
 
1736
1882
  // src/components/content-variants/helpers.js
1737
- var __defProp8 = Object.defineProperty;
1738
- var __defProps6 = Object.defineProperties;
1739
- var __getOwnPropDescs6 = Object.getOwnPropertyDescriptors;
1740
- var __getOwnPropSymbols8 = Object.getOwnPropertySymbols;
1741
- var __hasOwnProp8 = Object.prototype.hasOwnProperty;
1742
- var __propIsEnum8 = Object.prototype.propertyIsEnumerable;
1743
- var __defNormalProp8 = (obj, key, value) => key in obj ? __defProp8(obj, key, {
1883
+ var __defProp9 = Object.defineProperty;
1884
+ var __defProps7 = Object.defineProperties;
1885
+ var __getOwnPropDescs7 = Object.getOwnPropertyDescriptors;
1886
+ var __getOwnPropSymbols9 = Object.getOwnPropertySymbols;
1887
+ var __hasOwnProp9 = Object.prototype.hasOwnProperty;
1888
+ var __propIsEnum9 = Object.prototype.propertyIsEnumerable;
1889
+ var __defNormalProp9 = (obj, key, value) => key in obj ? __defProp9(obj, key, {
1744
1890
  enumerable: true,
1745
1891
  configurable: true,
1746
1892
  writable: true,
1747
1893
  value
1748
1894
  }) : obj[key] = value;
1749
- var __spreadValues8 = (a, b) => {
1895
+ var __spreadValues9 = (a, b) => {
1750
1896
  for (var prop in b || (b = {}))
1751
- if (__hasOwnProp8.call(b, prop))
1752
- __defNormalProp8(a, prop, b[prop]);
1753
- if (__getOwnPropSymbols8)
1754
- for (var prop of __getOwnPropSymbols8(b)) {
1755
- if (__propIsEnum8.call(b, prop))
1756
- __defNormalProp8(a, prop, b[prop]);
1897
+ if (__hasOwnProp9.call(b, prop))
1898
+ __defNormalProp9(a, prop, b[prop]);
1899
+ if (__getOwnPropSymbols9)
1900
+ for (var prop of __getOwnPropSymbols9(b)) {
1901
+ if (__propIsEnum9.call(b, prop))
1902
+ __defNormalProp9(a, prop, b[prop]);
1757
1903
  }
1758
1904
  return a;
1759
1905
  };
1760
- var __spreadProps6 = (a, b) => __defProps6(a, __getOwnPropDescs6(b));
1761
- var getVariants = (content) => Object.values((content == null ? void 0 : content.variations) || {}).map((variant) => __spreadProps6(__spreadValues8({}, variant), {
1906
+ var __spreadProps7 = (a, b) => __defProps7(a, __getOwnPropDescs7(b));
1907
+ var getVariants = (content) => Object.values((content == null ? void 0 : content.variations) || {}).map((variant) => __spreadProps7(__spreadValues9({}, variant), {
1762
1908
  testVariationId: variant.id,
1763
1909
  id: content == null ? void 0 : content.id
1764
1910
  }));
@@ -2668,41 +2814,39 @@ var _tmpl$13 = /* @__PURE__ */ template(`<div>`);
2668
2814
  function CustomCode(props) {
2669
2815
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
2670
2816
  const [scriptsRun, setScriptsRun] = createSignal([]);
2671
- function findAndRunScripts() {
2672
- if (elem && elem.getElementsByTagName && typeof window !== "undefined") {
2673
- const scripts = elem.getElementsByTagName("script");
2674
- for (let i = 0; i < scripts.length; i++) {
2675
- const script = scripts[i];
2676
- if (script.src) {
2677
- if (scriptsInserted().includes(script.src)) {
2678
- continue;
2679
- }
2680
- scriptsInserted().push(script.src);
2681
- const newScript = document.createElement("script");
2682
- newScript.async = true;
2683
- newScript.src = script.src;
2684
- document.head.appendChild(newScript);
2685
- } else if (!script.type || ["text/javascript", "application/javascript", "application/ecmascript"].includes(script.type)) {
2686
- if (scriptsRun().includes(script.innerText)) {
2687
- continue;
2688
- }
2689
- try {
2690
- scriptsRun().push(script.innerText);
2691
- new Function(script.innerText)();
2692
- } catch (error) {
2693
- }
2817
+ let elementRef;
2818
+ onMount(() => {
2819
+ if (!elementRef?.getElementsByTagName || typeof window === "undefined") {
2820
+ return;
2821
+ }
2822
+ const scripts = elementRef.getElementsByTagName("script");
2823
+ for (let i = 0; i < scripts.length; i++) {
2824
+ const script = scripts[i];
2825
+ if (script.src) {
2826
+ if (scriptsInserted().includes(script.src)) {
2827
+ continue;
2828
+ }
2829
+ scriptsInserted().push(script.src);
2830
+ const newScript = document.createElement("script");
2831
+ newScript.async = true;
2832
+ newScript.src = script.src;
2833
+ document.head.appendChild(newScript);
2834
+ } else if (!script.type || ["text/javascript", "application/javascript", "application/ecmascript"].includes(script.type)) {
2835
+ if (scriptsRun().includes(script.innerText)) {
2836
+ continue;
2837
+ }
2838
+ try {
2839
+ scriptsRun().push(script.innerText);
2840
+ new Function(script.innerText)();
2841
+ } catch (error) {
2694
2842
  }
2695
2843
  }
2696
2844
  }
2697
- }
2698
- let elem;
2699
- onMount(() => {
2700
- findAndRunScripts();
2701
2845
  });
2702
2846
  return (() => {
2703
2847
  const _el$ = _tmpl$13();
2704
- const _ref$ = elem;
2705
- typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
2848
+ const _ref$ = elementRef;
2849
+ typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
2706
2850
  effect((_p$) => {
2707
2851
  const _v$ = "builder-custom-code" + (props.replaceNodes ? " replace-nodes" : ""), _v$2 = props.code;
2708
2852
  _v$ !== _p$._v$ && className(_el$, _p$._v$ = _v$);
@@ -2743,84 +2887,84 @@ var componentInfo11 = {
2743
2887
  };
2744
2888
 
2745
2889
  // src/constants/builder-registered-components.js
2746
- var __defProp9 = Object.defineProperty;
2747
- var __getOwnPropSymbols9 = Object.getOwnPropertySymbols;
2748
- var __hasOwnProp9 = Object.prototype.hasOwnProperty;
2749
- var __propIsEnum9 = Object.prototype.propertyIsEnumerable;
2750
- var __defNormalProp9 = (obj, key, value) => key in obj ? __defProp9(obj, key, {
2890
+ var __defProp10 = Object.defineProperty;
2891
+ var __getOwnPropSymbols10 = Object.getOwnPropertySymbols;
2892
+ var __hasOwnProp10 = Object.prototype.hasOwnProperty;
2893
+ var __propIsEnum10 = Object.prototype.propertyIsEnumerable;
2894
+ var __defNormalProp10 = (obj, key, value) => key in obj ? __defProp10(obj, key, {
2751
2895
  enumerable: true,
2752
2896
  configurable: true,
2753
2897
  writable: true,
2754
2898
  value
2755
2899
  }) : obj[key] = value;
2756
- var __spreadValues9 = (a, b) => {
2900
+ var __spreadValues10 = (a, b) => {
2757
2901
  for (var prop in b || (b = {}))
2758
- if (__hasOwnProp9.call(b, prop))
2759
- __defNormalProp9(a, prop, b[prop]);
2760
- if (__getOwnPropSymbols9)
2761
- for (var prop of __getOwnPropSymbols9(b)) {
2762
- if (__propIsEnum9.call(b, prop))
2763
- __defNormalProp9(a, prop, b[prop]);
2902
+ if (__hasOwnProp10.call(b, prop))
2903
+ __defNormalProp10(a, prop, b[prop]);
2904
+ if (__getOwnPropSymbols10)
2905
+ for (var prop of __getOwnPropSymbols10(b)) {
2906
+ if (__propIsEnum10.call(b, prop))
2907
+ __defNormalProp10(a, prop, b[prop]);
2764
2908
  }
2765
2909
  return a;
2766
2910
  };
2767
- var getDefaultRegisteredComponents = () => [__spreadValues9({
2911
+ var getDefaultRegisteredComponents = () => [__spreadValues10({
2768
2912
  component: button_default
2769
- }, componentInfo), __spreadValues9({
2913
+ }, componentInfo), __spreadValues10({
2770
2914
  component: columns_default
2771
- }, componentInfo2), __spreadValues9({
2915
+ }, componentInfo2), __spreadValues10({
2772
2916
  component: custom_code_default
2773
- }, componentInfo11), __spreadValues9({
2917
+ }, componentInfo11), __spreadValues10({
2774
2918
  component: embed_default
2775
- }, componentInfo9), __spreadValues9({
2919
+ }, componentInfo9), __spreadValues10({
2776
2920
  component: fragment_default
2777
- }, componentInfo3), __spreadValues9({
2921
+ }, componentInfo3), __spreadValues10({
2778
2922
  component: image_default
2779
- }, componentInfo4), __spreadValues9({
2923
+ }, componentInfo4), __spreadValues10({
2780
2924
  component: img_default
2781
- }, componentInfo10), __spreadValues9({
2925
+ }, componentInfo10), __spreadValues10({
2782
2926
  component: section_default
2783
- }, componentInfo5), __spreadValues9({
2927
+ }, componentInfo5), __spreadValues10({
2784
2928
  component: symbol_default
2785
- }, componentInfo6), __spreadValues9({
2929
+ }, componentInfo6), __spreadValues10({
2786
2930
  component: text_default
2787
- }, componentInfo7), __spreadValues9({
2931
+ }, componentInfo7), __spreadValues10({
2788
2932
  component: video_default
2789
2933
  }, componentInfo8)];
2790
2934
 
2791
- // src/functions/register-component.js
2792
- var __defProp10 = Object.defineProperty;
2793
- var __defProps7 = Object.defineProperties;
2794
- var __getOwnPropDescs7 = Object.getOwnPropertyDescriptors;
2795
- var __getOwnPropSymbols10 = Object.getOwnPropertySymbols;
2796
- var __hasOwnProp10 = Object.prototype.hasOwnProperty;
2797
- var __propIsEnum10 = Object.prototype.propertyIsEnumerable;
2798
- var __defNormalProp10 = (obj, key, value) => key in obj ? __defProp10(obj, key, {
2935
+ // src/functions/register-component.js
2936
+ var __defProp11 = Object.defineProperty;
2937
+ var __defProps8 = Object.defineProperties;
2938
+ var __getOwnPropDescs8 = Object.getOwnPropertyDescriptors;
2939
+ var __getOwnPropSymbols11 = Object.getOwnPropertySymbols;
2940
+ var __hasOwnProp11 = Object.prototype.hasOwnProperty;
2941
+ var __propIsEnum11 = Object.prototype.propertyIsEnumerable;
2942
+ var __defNormalProp11 = (obj, key, value) => key in obj ? __defProp11(obj, key, {
2799
2943
  enumerable: true,
2800
2944
  configurable: true,
2801
2945
  writable: true,
2802
2946
  value
2803
2947
  }) : obj[key] = value;
2804
- var __spreadValues10 = (a, b) => {
2948
+ var __spreadValues11 = (a, b) => {
2805
2949
  for (var prop in b || (b = {}))
2806
- if (__hasOwnProp10.call(b, prop))
2807
- __defNormalProp10(a, prop, b[prop]);
2808
- if (__getOwnPropSymbols10)
2809
- for (var prop of __getOwnPropSymbols10(b)) {
2810
- if (__propIsEnum10.call(b, prop))
2811
- __defNormalProp10(a, prop, b[prop]);
2950
+ if (__hasOwnProp11.call(b, prop))
2951
+ __defNormalProp11(a, prop, b[prop]);
2952
+ if (__getOwnPropSymbols11)
2953
+ for (var prop of __getOwnPropSymbols11(b)) {
2954
+ if (__propIsEnum11.call(b, prop))
2955
+ __defNormalProp11(a, prop, b[prop]);
2812
2956
  }
2813
2957
  return a;
2814
2958
  };
2815
- var __spreadProps7 = (a, b) => __defProps7(a, __getOwnPropDescs7(b));
2959
+ var __spreadProps8 = (a, b) => __defProps8(a, __getOwnPropDescs8(b));
2816
2960
  var __objRest2 = (source, exclude) => {
2817
2961
  var target = {};
2818
2962
  for (var prop in source)
2819
- if (__hasOwnProp10.call(source, prop) && exclude.indexOf(prop) < 0)
2963
+ if (__hasOwnProp11.call(source, prop) && exclude.indexOf(prop) < 0)
2820
2964
  target[prop] = source[prop];
2821
- if (source != null && __getOwnPropSymbols10)
2822
- for (var prop of __getOwnPropSymbols10(source)) {
2823
- if (exclude.indexOf(prop) < 0 && __propIsEnum10.call(source, prop))
2965
+ if (source != null && __getOwnPropSymbols11)
2966
+ for (var prop of __getOwnPropSymbols11(source)) {
2967
+ if (exclude.indexOf(prop) < 0 && __propIsEnum11.call(source, prop))
2824
2968
  target[prop] = source[prop];
2825
2969
  }
2826
2970
  return target;
@@ -2840,8 +2984,8 @@ var serializeComponentInfo = (_a) => {
2840
2984
  var _b = _a, {
2841
2985
  inputs
2842
2986
  } = _b, info = __objRest2(_b, ["inputs"]);
2843
- return __spreadProps7(__spreadValues10({}, fastClone(info)), {
2844
- inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => __spreadProps7(__spreadValues10({}, acc), {
2987
+ return __spreadProps8(__spreadValues11({}, fastClone(info)), {
2988
+ inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => __spreadProps8(__spreadValues11({}, acc), {
2845
2989
  [key]: serializeValue(value)
2846
2990
  }), {}))
2847
2991
  });
@@ -2937,30 +3081,30 @@ ${getFontCss({
2937
3081
  var styles_default = ContentStyles;
2938
3082
 
2939
3083
  // src/components/content/content.helpers.js
2940
- var __defProp11 = Object.defineProperty;
2941
- var __defProps8 = Object.defineProperties;
2942
- var __getOwnPropDescs8 = Object.getOwnPropertyDescriptors;
2943
- var __getOwnPropSymbols11 = Object.getOwnPropertySymbols;
2944
- var __hasOwnProp11 = Object.prototype.hasOwnProperty;
2945
- var __propIsEnum11 = Object.prototype.propertyIsEnumerable;
2946
- var __defNormalProp11 = (obj, key, value) => key in obj ? __defProp11(obj, key, {
3084
+ var __defProp12 = Object.defineProperty;
3085
+ var __defProps9 = Object.defineProperties;
3086
+ var __getOwnPropDescs9 = Object.getOwnPropertyDescriptors;
3087
+ var __getOwnPropSymbols12 = Object.getOwnPropertySymbols;
3088
+ var __hasOwnProp12 = Object.prototype.hasOwnProperty;
3089
+ var __propIsEnum12 = Object.prototype.propertyIsEnumerable;
3090
+ var __defNormalProp12 = (obj, key, value) => key in obj ? __defProp12(obj, key, {
2947
3091
  enumerable: true,
2948
3092
  configurable: true,
2949
3093
  writable: true,
2950
3094
  value
2951
3095
  }) : obj[key] = value;
2952
- var __spreadValues11 = (a, b) => {
3096
+ var __spreadValues12 = (a, b) => {
2953
3097
  for (var prop in b || (b = {}))
2954
- if (__hasOwnProp11.call(b, prop))
2955
- __defNormalProp11(a, prop, b[prop]);
2956
- if (__getOwnPropSymbols11)
2957
- for (var prop of __getOwnPropSymbols11(b)) {
2958
- if (__propIsEnum11.call(b, prop))
2959
- __defNormalProp11(a, prop, b[prop]);
3098
+ if (__hasOwnProp12.call(b, prop))
3099
+ __defNormalProp12(a, prop, b[prop]);
3100
+ if (__getOwnPropSymbols12)
3101
+ for (var prop of __getOwnPropSymbols12(b)) {
3102
+ if (__propIsEnum12.call(b, prop))
3103
+ __defNormalProp12(a, prop, b[prop]);
2960
3104
  }
2961
3105
  return a;
2962
3106
  };
2963
- var __spreadProps8 = (a, b) => __defProps8(a, __getOwnPropDescs8(b));
3107
+ var __spreadProps9 = (a, b) => __defProps9(a, __getOwnPropDescs9(b));
2964
3108
  var getContextStateInitialValue = ({
2965
3109
  content,
2966
3110
  data,
@@ -2974,17 +3118,17 @@ var getContextStateInitialValue = ({
2974
3118
  defaultValues[input.name] = input.defaultValue;
2975
3119
  }
2976
3120
  });
2977
- const stateToUse = __spreadValues11(__spreadValues11(__spreadValues11({}, (_c = content == null ? void 0 : content.data) == null ? void 0 : _c.state), data), locale ? {
3121
+ const stateToUse = __spreadValues12(__spreadValues12(__spreadValues12({}, (_c = content == null ? void 0 : content.data) == null ? void 0 : _c.state), data), locale ? {
2978
3122
  locale
2979
3123
  } : {});
2980
- return __spreadValues11(__spreadValues11({}, defaultValues), stateToUse);
3124
+ return __spreadValues12(__spreadValues12({}, defaultValues), stateToUse);
2981
3125
  };
2982
3126
  var getContentInitialValue = ({
2983
3127
  content,
2984
3128
  data
2985
3129
  }) => {
2986
- return !content ? void 0 : __spreadProps8(__spreadValues11({}, content), {
2987
- data: __spreadValues11(__spreadValues11({}, content == null ? void 0 : content.data), data),
3130
+ return !content ? void 0 : __spreadProps9(__spreadValues12({}, content), {
3131
+ data: __spreadValues12(__spreadValues12({}, content == null ? void 0 : content.data), data),
2988
3132
  meta: content == null ? void 0 : content.meta
2989
3133
  });
2990
3134
  };
@@ -3230,38 +3374,38 @@ var setVisitorId = ({
3230
3374
  });
3231
3375
 
3232
3376
  // src/functions/track/index.js
3233
- var __defProp12 = Object.defineProperty;
3234
- var __defProps9 = Object.defineProperties;
3235
- var __getOwnPropDescs9 = Object.getOwnPropertyDescriptors;
3236
- var __getOwnPropSymbols12 = Object.getOwnPropertySymbols;
3237
- var __hasOwnProp12 = Object.prototype.hasOwnProperty;
3238
- var __propIsEnum12 = Object.prototype.propertyIsEnumerable;
3239
- var __defNormalProp12 = (obj, key, value) => key in obj ? __defProp12(obj, key, {
3377
+ var __defProp13 = Object.defineProperty;
3378
+ var __defProps10 = Object.defineProperties;
3379
+ var __getOwnPropDescs10 = Object.getOwnPropertyDescriptors;
3380
+ var __getOwnPropSymbols13 = Object.getOwnPropertySymbols;
3381
+ var __hasOwnProp13 = Object.prototype.hasOwnProperty;
3382
+ var __propIsEnum13 = Object.prototype.propertyIsEnumerable;
3383
+ var __defNormalProp13 = (obj, key, value) => key in obj ? __defProp13(obj, key, {
3240
3384
  enumerable: true,
3241
3385
  configurable: true,
3242
3386
  writable: true,
3243
3387
  value
3244
3388
  }) : obj[key] = value;
3245
- var __spreadValues12 = (a, b) => {
3389
+ var __spreadValues13 = (a, b) => {
3246
3390
  for (var prop in b || (b = {}))
3247
- if (__hasOwnProp12.call(b, prop))
3248
- __defNormalProp12(a, prop, b[prop]);
3249
- if (__getOwnPropSymbols12)
3250
- for (var prop of __getOwnPropSymbols12(b)) {
3251
- if (__propIsEnum12.call(b, prop))
3252
- __defNormalProp12(a, prop, b[prop]);
3391
+ if (__hasOwnProp13.call(b, prop))
3392
+ __defNormalProp13(a, prop, b[prop]);
3393
+ if (__getOwnPropSymbols13)
3394
+ for (var prop of __getOwnPropSymbols13(b)) {
3395
+ if (__propIsEnum13.call(b, prop))
3396
+ __defNormalProp13(a, prop, b[prop]);
3253
3397
  }
3254
3398
  return a;
3255
3399
  };
3256
- var __spreadProps9 = (a, b) => __defProps9(a, __getOwnPropDescs9(b));
3400
+ var __spreadProps10 = (a, b) => __defProps10(a, __getOwnPropDescs10(b));
3257
3401
  var __objRest3 = (source, exclude) => {
3258
3402
  var target = {};
3259
3403
  for (var prop in source)
3260
- if (__hasOwnProp12.call(source, prop) && exclude.indexOf(prop) < 0)
3404
+ if (__hasOwnProp13.call(source, prop) && exclude.indexOf(prop) < 0)
3261
3405
  target[prop] = source[prop];
3262
- if (source != null && __getOwnPropSymbols12)
3263
- for (var prop of __getOwnPropSymbols12(source)) {
3264
- if (exclude.indexOf(prop) < 0 && __propIsEnum12.call(source, prop))
3406
+ if (source != null && __getOwnPropSymbols13)
3407
+ for (var prop of __getOwnPropSymbols13(source)) {
3408
+ if (exclude.indexOf(prop) < 0 && __propIsEnum13.call(source, prop))
3265
3409
  target[prop] = source[prop];
3266
3410
  }
3267
3411
  return target;
@@ -3315,8 +3459,8 @@ var createEvent = (_a) => __async3(void 0, null, function* () {
3315
3459
  } = _b, properties = __objRest3(_b, ["type", "canTrack", "apiKey", "metadata"]);
3316
3460
  return {
3317
3461
  type: eventType,
3318
- data: __spreadProps9(__spreadValues12(__spreadProps9(__spreadValues12({}, properties), {
3319
- metadata: __spreadValues12({
3462
+ data: __spreadProps10(__spreadValues13(__spreadProps10(__spreadValues13({}, properties), {
3463
+ metadata: __spreadValues13({
3320
3464
  url: location.href
3321
3465
  }, metadata)
3322
3466
  }), yield getTrackingEventData({
@@ -3355,12 +3499,12 @@ function _track(eventProps) {
3355
3499
  });
3356
3500
  });
3357
3501
  }
3358
- var track = (args) => _track(__spreadProps9(__spreadValues12({}, args), {
3502
+ var track = (args) => _track(__spreadProps10(__spreadValues13({}, args), {
3359
3503
  canTrack: true
3360
3504
  }));
3361
3505
 
3362
3506
  // src/constants/sdk-version.js
3363
- var SDK_VERSION = "0.7.0";
3507
+ var SDK_VERSION = "0.7.1-0";
3364
3508
 
3365
3509
  // src/functions/register.js
3366
3510
  var registry = {};
@@ -3552,24 +3696,24 @@ var getInteractionPropertiesForEvent = (event) => {
3552
3696
  };
3553
3697
 
3554
3698
  // src/helpers/ab-tests.js
3555
- var __defProp13 = Object.defineProperty;
3556
- var __getOwnPropSymbols13 = Object.getOwnPropertySymbols;
3557
- var __hasOwnProp13 = Object.prototype.hasOwnProperty;
3558
- var __propIsEnum13 = Object.prototype.propertyIsEnumerable;
3559
- var __defNormalProp13 = (obj, key, value) => key in obj ? __defProp13(obj, key, {
3699
+ var __defProp14 = Object.defineProperty;
3700
+ var __getOwnPropSymbols14 = Object.getOwnPropertySymbols;
3701
+ var __hasOwnProp14 = Object.prototype.hasOwnProperty;
3702
+ var __propIsEnum14 = Object.prototype.propertyIsEnumerable;
3703
+ var __defNormalProp14 = (obj, key, value) => key in obj ? __defProp14(obj, key, {
3560
3704
  enumerable: true,
3561
3705
  configurable: true,
3562
3706
  writable: true,
3563
3707
  value
3564
3708
  }) : obj[key] = value;
3565
- var __spreadValues13 = (a, b) => {
3709
+ var __spreadValues14 = (a, b) => {
3566
3710
  for (var prop in b || (b = {}))
3567
- if (__hasOwnProp13.call(b, prop))
3568
- __defNormalProp13(a, prop, b[prop]);
3569
- if (__getOwnPropSymbols13)
3570
- for (var prop of __getOwnPropSymbols13(b)) {
3571
- if (__propIsEnum13.call(b, prop))
3572
- __defNormalProp13(a, prop, b[prop]);
3711
+ if (__hasOwnProp14.call(b, prop))
3712
+ __defNormalProp14(a, prop, b[prop]);
3713
+ if (__getOwnPropSymbols14)
3714
+ for (var prop of __getOwnPropSymbols14(b)) {
3715
+ if (__propIsEnum14.call(b, prop))
3716
+ __defNormalProp14(a, prop, b[prop]);
3573
3717
  }
3574
3718
  return a;
3575
3719
  };
@@ -3685,7 +3829,7 @@ var handleABTestingSync = ({
3685
3829
  item,
3686
3830
  testGroupId
3687
3831
  });
3688
- return __spreadValues13(__spreadValues13({}, item), variationValue);
3832
+ return __spreadValues14(__spreadValues14({}, item), variationValue);
3689
3833
  };
3690
3834
  var handleABTesting = (_0) => __async4(void 0, [_0], function* ({
3691
3835
  item,
@@ -3708,7 +3852,7 @@ var handleABTesting = (_0) => __async4(void 0, [_0], function* ({
3708
3852
  item,
3709
3853
  testGroupId
3710
3854
  });
3711
- return __spreadValues13(__spreadValues13({}, item), variationValue);
3855
+ return __spreadValues14(__spreadValues14({}, item), variationValue);
3712
3856
  });
3713
3857
 
3714
3858
  // src/helpers/canTrack.js
@@ -3720,36 +3864,36 @@ function getPreviewContent(_searchParams) {
3720
3864
  }
3721
3865
 
3722
3866
  // src/helpers/flatten.js
3723
- var __defProp14 = Object.defineProperty;
3724
- var __defProps10 = Object.defineProperties;
3725
- var __getOwnPropDescs10 = Object.getOwnPropertyDescriptors;
3726
- var __getOwnPropSymbols14 = Object.getOwnPropertySymbols;
3727
- var __hasOwnProp14 = Object.prototype.hasOwnProperty;
3728
- var __propIsEnum14 = Object.prototype.propertyIsEnumerable;
3729
- var __defNormalProp14 = (obj, key, value) => key in obj ? __defProp14(obj, key, {
3867
+ var __defProp15 = Object.defineProperty;
3868
+ var __defProps11 = Object.defineProperties;
3869
+ var __getOwnPropDescs11 = Object.getOwnPropertyDescriptors;
3870
+ var __getOwnPropSymbols15 = Object.getOwnPropertySymbols;
3871
+ var __hasOwnProp15 = Object.prototype.hasOwnProperty;
3872
+ var __propIsEnum15 = Object.prototype.propertyIsEnumerable;
3873
+ var __defNormalProp15 = (obj, key, value) => key in obj ? __defProp15(obj, key, {
3730
3874
  enumerable: true,
3731
3875
  configurable: true,
3732
3876
  writable: true,
3733
3877
  value
3734
3878
  }) : obj[key] = value;
3735
- var __spreadValues14 = (a, b) => {
3879
+ var __spreadValues15 = (a, b) => {
3736
3880
  for (var prop in b || (b = {}))
3737
- if (__hasOwnProp14.call(b, prop))
3738
- __defNormalProp14(a, prop, b[prop]);
3739
- if (__getOwnPropSymbols14)
3740
- for (var prop of __getOwnPropSymbols14(b)) {
3741
- if (__propIsEnum14.call(b, prop))
3742
- __defNormalProp14(a, prop, b[prop]);
3881
+ if (__hasOwnProp15.call(b, prop))
3882
+ __defNormalProp15(a, prop, b[prop]);
3883
+ if (__getOwnPropSymbols15)
3884
+ for (var prop of __getOwnPropSymbols15(b)) {
3885
+ if (__propIsEnum15.call(b, prop))
3886
+ __defNormalProp15(a, prop, b[prop]);
3743
3887
  }
3744
3888
  return a;
3745
3889
  };
3746
- var __spreadProps10 = (a, b) => __defProps10(a, __getOwnPropDescs10(b));
3890
+ var __spreadProps11 = (a, b) => __defProps11(a, __getOwnPropDescs11(b));
3747
3891
  function flatten(object, path = null, separator = ".") {
3748
3892
  return Object.keys(object).reduce((acc, key) => {
3749
3893
  const value = object[key];
3750
3894
  const newPath = [path, key].filter(Boolean).join(separator);
3751
3895
  const isObject = [typeof value === "object", value !== null, !(Array.isArray(value) && value.length === 0)].every(Boolean);
3752
- return isObject ? __spreadValues14(__spreadValues14({}, acc), flatten(value, newPath, separator)) : __spreadProps10(__spreadValues14({}, acc), {
3896
+ return isObject ? __spreadValues15(__spreadValues15({}, acc), flatten(value, newPath, separator)) : __spreadProps11(__spreadValues15({}, acc), {
3753
3897
  [newPath]: value
3754
3898
  });
3755
3899
  }, {});
@@ -3792,27 +3936,28 @@ var normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchP
3792
3936
  var DEFAULT_API_VERSION = "v3";
3793
3937
 
3794
3938
  // src/functions/get-content/generate-content-url.js
3795
- var __defProp15 = Object.defineProperty;
3796
- var __getOwnPropSymbols15 = Object.getOwnPropertySymbols;
3797
- var __hasOwnProp15 = Object.prototype.hasOwnProperty;
3798
- var __propIsEnum15 = Object.prototype.propertyIsEnumerable;
3799
- var __defNormalProp15 = (obj, key, value) => key in obj ? __defProp15(obj, key, {
3939
+ var __defProp16 = Object.defineProperty;
3940
+ var __getOwnPropSymbols16 = Object.getOwnPropertySymbols;
3941
+ var __hasOwnProp16 = Object.prototype.hasOwnProperty;
3942
+ var __propIsEnum16 = Object.prototype.propertyIsEnumerable;
3943
+ var __defNormalProp16 = (obj, key, value) => key in obj ? __defProp16(obj, key, {
3800
3944
  enumerable: true,
3801
3945
  configurable: true,
3802
3946
  writable: true,
3803
3947
  value
3804
3948
  }) : obj[key] = value;
3805
- var __spreadValues15 = (a, b) => {
3949
+ var __spreadValues16 = (a, b) => {
3806
3950
  for (var prop in b || (b = {}))
3807
- if (__hasOwnProp15.call(b, prop))
3808
- __defNormalProp15(a, prop, b[prop]);
3809
- if (__getOwnPropSymbols15)
3810
- for (var prop of __getOwnPropSymbols15(b)) {
3811
- if (__propIsEnum15.call(b, prop))
3812
- __defNormalProp15(a, prop, b[prop]);
3951
+ if (__hasOwnProp16.call(b, prop))
3952
+ __defNormalProp16(a, prop, b[prop]);
3953
+ if (__getOwnPropSymbols16)
3954
+ for (var prop of __getOwnPropSymbols16(b)) {
3955
+ if (__propIsEnum16.call(b, prop))
3956
+ __defNormalProp16(a, prop, b[prop]);
3813
3957
  }
3814
3958
  return a;
3815
3959
  };
3960
+ var isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
3816
3961
  var generateContentUrl = (options) => {
3817
3962
  let {
3818
3963
  noTraverse = false
@@ -3826,7 +3971,14 @@ var generateContentUrl = (options) => {
3826
3971
  includeRefs = true,
3827
3972
  enrich,
3828
3973
  locale,
3829
- apiVersion = DEFAULT_API_VERSION
3974
+ apiVersion = DEFAULT_API_VERSION,
3975
+ fields,
3976
+ omit,
3977
+ offset,
3978
+ cacheSeconds,
3979
+ staleCacheSeconds,
3980
+ sort,
3981
+ includeUnpublished
3830
3982
  } = options;
3831
3983
  if (!apiKey) {
3832
3984
  throw new Error("Missing API key");
@@ -3838,7 +3990,31 @@ var generateContentUrl = (options) => {
3838
3990
  noTraverse = true;
3839
3991
  }
3840
3992
  const url = new URL(`https://cdn.builder.io/api/${apiVersion}/content/${model}?apiKey=${apiKey}&limit=${limit}&noTraverse=${noTraverse}&includeRefs=${includeRefs}${locale ? `&locale=${locale}` : ""}${enrich ? `&enrich=${enrich}` : ""}`);
3841
- const queryOptions = __spreadValues15(__spreadValues15({}, getBuilderSearchParamsFromWindow()), normalizeSearchParams(options.options || {}));
3993
+ url.searchParams.set("omit", omit || "meta.componentsUsed");
3994
+ if (fields) {
3995
+ url.searchParams.set("fields", fields);
3996
+ }
3997
+ if (Number.isFinite(offset) && offset > -1) {
3998
+ url.searchParams.set("offset", String(Math.floor(offset)));
3999
+ }
4000
+ if (typeof includeUnpublished === "boolean") {
4001
+ url.searchParams.set("includeUnpublished", String(includeUnpublished));
4002
+ }
4003
+ if (cacheSeconds && isPositiveNumber(cacheSeconds)) {
4004
+ url.searchParams.set("cacheSeconds", String(cacheSeconds));
4005
+ }
4006
+ if (staleCacheSeconds && isPositiveNumber(staleCacheSeconds)) {
4007
+ url.searchParams.set("staleCacheSeconds", String(staleCacheSeconds));
4008
+ }
4009
+ if (sort) {
4010
+ const flattened2 = flatten({
4011
+ sort
4012
+ });
4013
+ for (const key in flattened2) {
4014
+ url.searchParams.set(key, JSON.stringify(flattened2[key]));
4015
+ }
4016
+ }
4017
+ const queryOptions = __spreadValues16(__spreadValues16({}, getBuilderSearchParamsFromWindow()), normalizeSearchParams(options.options || {}));
3842
4018
  const flattened = flatten(queryOptions);
3843
4019
  for (const key in flattened) {
3844
4020
  url.searchParams.set(key, String(flattened[key]));
@@ -3858,30 +4034,30 @@ var generateContentUrl = (options) => {
3858
4034
  };
3859
4035
 
3860
4036
  // src/functions/get-content/index.js
3861
- var __defProp16 = Object.defineProperty;
3862
- var __defProps11 = Object.defineProperties;
3863
- var __getOwnPropDescs11 = Object.getOwnPropertyDescriptors;
3864
- var __getOwnPropSymbols16 = Object.getOwnPropertySymbols;
3865
- var __hasOwnProp16 = Object.prototype.hasOwnProperty;
3866
- var __propIsEnum16 = Object.prototype.propertyIsEnumerable;
3867
- var __defNormalProp16 = (obj, key, value) => key in obj ? __defProp16(obj, key, {
4037
+ var __defProp17 = Object.defineProperty;
4038
+ var __defProps12 = Object.defineProperties;
4039
+ var __getOwnPropDescs12 = Object.getOwnPropertyDescriptors;
4040
+ var __getOwnPropSymbols17 = Object.getOwnPropertySymbols;
4041
+ var __hasOwnProp17 = Object.prototype.hasOwnProperty;
4042
+ var __propIsEnum17 = Object.prototype.propertyIsEnumerable;
4043
+ var __defNormalProp17 = (obj, key, value) => key in obj ? __defProp17(obj, key, {
3868
4044
  enumerable: true,
3869
4045
  configurable: true,
3870
4046
  writable: true,
3871
4047
  value
3872
4048
  }) : obj[key] = value;
3873
- var __spreadValues16 = (a, b) => {
4049
+ var __spreadValues17 = (a, b) => {
3874
4050
  for (var prop in b || (b = {}))
3875
- if (__hasOwnProp16.call(b, prop))
3876
- __defNormalProp16(a, prop, b[prop]);
3877
- if (__getOwnPropSymbols16)
3878
- for (var prop of __getOwnPropSymbols16(b)) {
3879
- if (__propIsEnum16.call(b, prop))
3880
- __defNormalProp16(a, prop, b[prop]);
4051
+ if (__hasOwnProp17.call(b, prop))
4052
+ __defNormalProp17(a, prop, b[prop]);
4053
+ if (__getOwnPropSymbols17)
4054
+ for (var prop of __getOwnPropSymbols17(b)) {
4055
+ if (__propIsEnum17.call(b, prop))
4056
+ __defNormalProp17(a, prop, b[prop]);
3881
4057
  }
3882
4058
  return a;
3883
4059
  };
3884
- var __spreadProps11 = (a, b) => __defProps11(a, __getOwnPropDescs11(b));
4060
+ var __spreadProps12 = (a, b) => __defProps12(a, __getOwnPropDescs12(b));
3885
4061
  var __async5 = (__this, __arguments, generator) => {
3886
4062
  return new Promise((resolve, reject) => {
3887
4063
  var fulfilled = (value) => {
@@ -3905,7 +4081,7 @@ var __async5 = (__this, __arguments, generator) => {
3905
4081
  var checkContentHasResults = (content) => "results" in content;
3906
4082
  function fetchOneEntry(options) {
3907
4083
  return __async5(this, null, function* () {
3908
- const allContent = yield fetchEntries(__spreadProps11(__spreadValues16({}, options), {
4084
+ const allContent = yield fetchEntries(__spreadProps12(__spreadValues17({}, options), {
3909
4085
  limit: 1
3910
4086
  }));
3911
4087
  if (allContent) {
@@ -4127,11 +4303,8 @@ function EnableEditor(props) {
4127
4303
  }
4128
4304
  let elementRef;
4129
4305
  onMount(() => {
4130
- if (!props.apiKey) {
4131
- logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
4132
- }
4133
4306
  if (isBrowser()) {
4134
- if (isEditing()) {
4307
+ if (isEditing() && true) {
4135
4308
  setForceReRenderCount(forceReRenderCount() + 1);
4136
4309
  window.addEventListener("message", processMessage);
4137
4310
  registerInsertMenu();
@@ -4152,18 +4325,20 @@ function EnableEditor(props) {
4152
4325
  });
4153
4326
  window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate);
4154
4327
  }
4155
- if (props.builderContextSignal.content) {
4328
+ const shouldTrackImpression = props.builderContextSignal.content && getDefaultCanTrack(props.canTrack);
4329
+ if (shouldTrackImpression) {
4156
4330
  const variationId = props.builderContextSignal.content?.testVariationId;
4157
4331
  const contentId = props.builderContextSignal.content?.id;
4332
+ const apiKeyProp = props.apiKey;
4158
4333
  _track({
4159
4334
  type: "impression",
4160
- canTrack: getDefaultCanTrack(props.canTrack),
4335
+ canTrack: true,
4161
4336
  contentId,
4162
- apiKey: props.apiKey,
4337
+ apiKey: apiKeyProp,
4163
4338
  variationId: variationId !== contentId ? variationId : void 0
4164
4339
  });
4165
4340
  }
4166
- if (isPreviewing()) {
4341
+ if (isPreviewing() && true) {
4167
4342
  const searchParams = new URL(location.href).searchParams;
4168
4343
  const searchParamPreviewModel = searchParams.get("builder.preview");
4169
4344
  const searchParamPreviewId = searchParams.get(`builder.preview.${searchParamPreviewModel}`);
@@ -4180,11 +4355,16 @@ function EnableEditor(props) {
4180
4355
  });
4181
4356
  }
4182
4357
  }
4183
- evaluateJsCode();
4184
- runHttpRequests();
4185
- emitStateUpdate();
4186
4358
  }
4187
4359
  });
4360
+ onMount(() => {
4361
+ if (!props.apiKey) {
4362
+ logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
4363
+ }
4364
+ evaluateJsCode();
4365
+ runHttpRequests();
4366
+ emitStateUpdate();
4367
+ });
4188
4368
  function onUpdateFn_0() {
4189
4369
  if (props.content) {
4190
4370
  mergeNewContent(props.content);
@@ -4217,16 +4397,17 @@ function EnableEditor(props) {
4217
4397
  },
4218
4398
  get children() {
4219
4399
  const _el$ = _tmpl$14();
4220
- _el$.$$click = (event) => onClick(event);
4221
4400
  const _ref$ = elementRef;
4222
4401
  typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
4223
4402
  spread(_el$, mergeProps({
4224
4403
  get ["class"]() {
4225
4404
  return props.classNameProp;
4226
- },
4405
+ }
4406
+ }, {}, {
4227
4407
  get key() {
4228
4408
  return forceReRenderCount();
4229
4409
  },
4410
+ "onClick": (event) => onClick(event),
4230
4411
  get ["builder-content-id"]() {
4231
4412
  return props.builderContextSignal.content?.id;
4232
4413
  },
@@ -4245,7 +4426,6 @@ function EnableEditor(props) {
4245
4426
  });
4246
4427
  }
4247
4428
  var enable_editor_default = EnableEditor;
4248
- delegateEvents(["click"]);
4249
4429
  var _tmpl$15 = /* @__PURE__ */ template(`<script>`);
4250
4430
  function InlinedScript(props) {
4251
4431
  return (() => {
@@ -4568,24 +4748,24 @@ function ContentVariants(props) {
4568
4748
  var content_variants_default = ContentVariants;
4569
4749
 
4570
4750
  // src/blocks/symbol/symbol.helpers.js
4571
- var __defProp17 = Object.defineProperty;
4572
- var __getOwnPropSymbols17 = Object.getOwnPropertySymbols;
4573
- var __hasOwnProp17 = Object.prototype.hasOwnProperty;
4574
- var __propIsEnum17 = Object.prototype.propertyIsEnumerable;
4575
- var __defNormalProp17 = (obj, key, value) => key in obj ? __defProp17(obj, key, {
4751
+ var __defProp18 = Object.defineProperty;
4752
+ var __getOwnPropSymbols18 = Object.getOwnPropertySymbols;
4753
+ var __hasOwnProp18 = Object.prototype.hasOwnProperty;
4754
+ var __propIsEnum18 = Object.prototype.propertyIsEnumerable;
4755
+ var __defNormalProp18 = (obj, key, value) => key in obj ? __defProp18(obj, key, {
4576
4756
  enumerable: true,
4577
4757
  configurable: true,
4578
4758
  writable: true,
4579
4759
  value
4580
4760
  }) : obj[key] = value;
4581
- var __spreadValues17 = (a, b) => {
4761
+ var __spreadValues18 = (a, b) => {
4582
4762
  for (var prop in b || (b = {}))
4583
- if (__hasOwnProp17.call(b, prop))
4584
- __defNormalProp17(a, prop, b[prop]);
4585
- if (__getOwnPropSymbols17)
4586
- for (var prop of __getOwnPropSymbols17(b)) {
4587
- if (__propIsEnum17.call(b, prop))
4588
- __defNormalProp17(a, prop, b[prop]);
4763
+ if (__hasOwnProp18.call(b, prop))
4764
+ __defNormalProp18(a, prop, b[prop]);
4765
+ if (__getOwnPropSymbols18)
4766
+ for (var prop of __getOwnPropSymbols18(b)) {
4767
+ if (__propIsEnum18.call(b, prop))
4768
+ __defNormalProp18(a, prop, b[prop]);
4589
4769
  }
4590
4770
  return a;
4591
4771
  };
@@ -4614,7 +4794,7 @@ var fetchSymbolContent = (_0) => __async6(void 0, [_0], function* ({
4614
4794
  symbol
4615
4795
  }) {
4616
4796
  if ((symbol == null ? void 0 : symbol.model) && (builderContextValue == null ? void 0 : builderContextValue.apiKey)) {
4617
- return fetchOneEntry(__spreadValues17({
4797
+ return fetchOneEntry(__spreadValues18({
4618
4798
  model: symbol.model,
4619
4799
  apiKey: builderContextValue.apiKey,
4620
4800
  apiVersion: builderContextValue.apiVersion
@@ -4714,30 +4894,30 @@ function setEditorSettings(newSettings) {
4714
4894
  }
4715
4895
 
4716
4896
  // src/functions/fetch-builder-props.js
4717
- var __defProp18 = Object.defineProperty;
4718
- var __defProps12 = Object.defineProperties;
4719
- var __getOwnPropDescs12 = Object.getOwnPropertyDescriptors;
4720
- var __getOwnPropSymbols18 = Object.getOwnPropertySymbols;
4721
- var __hasOwnProp18 = Object.prototype.hasOwnProperty;
4722
- var __propIsEnum18 = Object.prototype.propertyIsEnumerable;
4723
- var __defNormalProp18 = (obj, key, value) => key in obj ? __defProp18(obj, key, {
4897
+ var __defProp19 = Object.defineProperty;
4898
+ var __defProps13 = Object.defineProperties;
4899
+ var __getOwnPropDescs13 = Object.getOwnPropertyDescriptors;
4900
+ var __getOwnPropSymbols19 = Object.getOwnPropertySymbols;
4901
+ var __hasOwnProp19 = Object.prototype.hasOwnProperty;
4902
+ var __propIsEnum19 = Object.prototype.propertyIsEnumerable;
4903
+ var __defNormalProp19 = (obj, key, value) => key in obj ? __defProp19(obj, key, {
4724
4904
  enumerable: true,
4725
4905
  configurable: true,
4726
4906
  writable: true,
4727
4907
  value
4728
4908
  }) : obj[key] = value;
4729
- var __spreadValues18 = (a, b) => {
4909
+ var __spreadValues19 = (a, b) => {
4730
4910
  for (var prop in b || (b = {}))
4731
- if (__hasOwnProp18.call(b, prop))
4732
- __defNormalProp18(a, prop, b[prop]);
4733
- if (__getOwnPropSymbols18)
4734
- for (var prop of __getOwnPropSymbols18(b)) {
4735
- if (__propIsEnum18.call(b, prop))
4736
- __defNormalProp18(a, prop, b[prop]);
4911
+ if (__hasOwnProp19.call(b, prop))
4912
+ __defNormalProp19(a, prop, b[prop]);
4913
+ if (__getOwnPropSymbols19)
4914
+ for (var prop of __getOwnPropSymbols19(b)) {
4915
+ if (__propIsEnum19.call(b, prop))
4916
+ __defNormalProp19(a, prop, b[prop]);
4737
4917
  }
4738
4918
  return a;
4739
4919
  };
4740
- var __spreadProps12 = (a, b) => __defProps12(a, __getOwnPropDescs12(b));
4920
+ var __spreadProps13 = (a, b) => __defProps13(a, __getOwnPropDescs13(b));
4741
4921
  var __async7 = (__this, __arguments, generator) => {
4742
4922
  return new Promise((resolve, reject) => {
4743
4923
  var fulfilled = (value) => {
@@ -4761,10 +4941,10 @@ var __async7 = (__this, __arguments, generator) => {
4761
4941
  var fetchBuilderProps = (_args) => __async7(void 0, null, function* () {
4762
4942
  var _a, _b, _c;
4763
4943
  const urlPath = _args.path || ((_a = _args.url) == null ? void 0 : _a.pathname) || ((_b = _args.userAttributes) == null ? void 0 : _b.urlPath);
4764
- const getContentArgs = __spreadProps12(__spreadValues18({}, _args), {
4944
+ const getContentArgs = __spreadProps13(__spreadValues19({}, _args), {
4765
4945
  apiKey: _args.apiKey,
4766
4946
  model: _args.model || "page",
4767
- userAttributes: __spreadValues18(__spreadValues18({}, _args.userAttributes), urlPath ? {
4947
+ userAttributes: __spreadValues19(__spreadValues19({}, _args.userAttributes), urlPath ? {
4768
4948
  urlPath
4769
4949
  } : {}),
4770
4950
  options: getBuilderSearchParams(_args.searchParams || ((_c = _args.url) == null ? void 0 : _c.searchParams) || _args.options)