@builder.io/sdk-solid 3.0.5 → 3.0.7

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/edge/index.js CHANGED
@@ -4111,8 +4111,13 @@ var provideBuilderContext = (block, context) => {
4111
4111
 
4112
4112
  // src/constants/device-sizes.ts
4113
4113
  var SIZES = {
4114
+ xsmall: {
4115
+ min: 0,
4116
+ default: 160,
4117
+ max: 320
4118
+ },
4114
4119
  small: {
4115
- min: 320,
4120
+ min: 321,
4116
4121
  default: 321,
4117
4122
  max: 640
4118
4123
  },
@@ -4128,15 +4133,28 @@ var SIZES = {
4128
4133
  }
4129
4134
  };
4130
4135
  var getMaxWidthQueryForSize = (size, sizeValues = SIZES) => `@media (max-width: ${sizeValues[size].max}px)`;
4131
- var getSizesForBreakpoints = ({
4132
- small,
4133
- medium
4134
- }) => {
4136
+ var getSizesForBreakpoints = (breakpoints) => {
4135
4137
  const newSizes = fastClone(SIZES);
4138
+ if (!breakpoints) {
4139
+ return newSizes;
4140
+ }
4141
+ const {
4142
+ xsmall,
4143
+ small,
4144
+ medium
4145
+ } = breakpoints;
4146
+ if (xsmall) {
4147
+ const xsmallMin = Math.floor(xsmall / 2);
4148
+ newSizes.xsmall = {
4149
+ max: xsmall,
4150
+ min: xsmallMin,
4151
+ default: xsmallMin + 1
4152
+ };
4153
+ }
4136
4154
  if (!small || !medium) {
4137
4155
  return newSizes;
4138
4156
  }
4139
- const smallMin = Math.floor(small / 2);
4157
+ const smallMin = xsmall ? newSizes.xsmall.max + 1 : Math.floor(small / 2);
4140
4158
  newSizes.small = {
4141
4159
  max: small,
4142
4160
  min: smallMin,
@@ -4194,9 +4212,11 @@ function BlockStyles(props) {
4194
4212
  const styles = processedBlock.responsiveStyles;
4195
4213
  const content = props.context.content;
4196
4214
  const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(content?.meta?.breakpoints || {});
4215
+ const contentHasXSmallBreakpoint = Boolean(content?.meta?.breakpoints?.xsmall);
4197
4216
  const largeStyles = styles?.large;
4198
4217
  const mediumStyles = styles?.medium;
4199
4218
  const smallStyles = styles?.small;
4219
+ const xsmallStyles = styles?.xsmall;
4200
4220
  const className = processedBlock.id;
4201
4221
  if (!className) {
4202
4222
  return "";
@@ -4215,6 +4235,11 @@ function BlockStyles(props) {
4215
4235
  styles: smallStyles,
4216
4236
  mediaQuery: getMaxWidthQueryForSize("small", sizesWithUpdatedBreakpoints)
4217
4237
  }) : "";
4238
+ const xsmallStylesClass = xsmallStyles && contentHasXSmallBreakpoint ? createCssClass({
4239
+ className,
4240
+ styles: xsmallStyles,
4241
+ mediaQuery: getMaxWidthQueryForSize("xsmall", sizesWithUpdatedBreakpoints)
4242
+ }) : "";
4218
4243
  const hoverAnimation = processedBlock.animations && processedBlock.animations.find((item) => item.trigger === "hover");
4219
4244
  let hoverStylesClass = "";
4220
4245
  if (hoverAnimation) {
@@ -4228,7 +4253,7 @@ function BlockStyles(props) {
4228
4253
  }
4229
4254
  }) || "";
4230
4255
  }
4231
- return [largeStylesClass, mediumStylesClass, smallStylesClass, hoverStylesClass].join(" ");
4256
+ return [largeStylesClass, mediumStylesClass, smallStylesClass, xsmallStylesClass, hoverStylesClass].join(" ");
4232
4257
  });
4233
4258
  return createComponent(Show, {
4234
4259
  get when() {
@@ -4788,7 +4813,7 @@ function Block(props) {
4788
4813
  });
4789
4814
  }
4790
4815
  var block_default = Block;
4791
- var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-3c4beb0c {
4816
+ var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-3d7ff108 {
4792
4817
  display: flex;
4793
4818
  flex-direction: column;
4794
4819
  align-items: stretch;
@@ -4801,8 +4826,9 @@ function BlocksWrapper(props) {
4801
4826
  if (!props.path) {
4802
4827
  return void 0;
4803
4828
  }
4829
+ const thisPrefix = "this.";
4804
4830
  const pathPrefix = "component.options.";
4805
- return props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
4831
+ return props.path.startsWith(thisPrefix) ? props.path.replace(thisPrefix, "") : props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
4806
4832
  });
4807
4833
  function onClick() {
4808
4834
  if (isEditing() && !props.blocks?.length) {
@@ -4831,7 +4857,7 @@ function BlocksWrapper(props) {
4831
4857
  });
4832
4858
  return [createComponent(Dynamic, mergeProps({
4833
4859
  get ["class"]() {
4834
- return className() + " dynamic-3c4beb0c";
4860
+ return className() + " dynamic-3d7ff108";
4835
4861
  },
4836
4862
  ref(r$) {
4837
4863
  const _ref$ = blocksWrapperRef;
@@ -5524,8 +5550,58 @@ var handleABTesting = async ({
5524
5550
  };
5525
5551
  };
5526
5552
 
5553
+ // src/helpers/user-attributes.ts
5554
+ var USER_ATTRIBUTES_COOKIE_NAME = "builder.userAttributes";
5555
+ function createUserAttributesService() {
5556
+ let canTrack = true;
5557
+ const subscribers = /* @__PURE__ */ new Set();
5558
+ return {
5559
+ setUserAttributes(newAttrs) {
5560
+ if (!isBrowser()) {
5561
+ return;
5562
+ }
5563
+ const userAttributes = {
5564
+ ...this.getUserAttributes(),
5565
+ ...newAttrs
5566
+ };
5567
+ setCookie({
5568
+ name: USER_ATTRIBUTES_COOKIE_NAME,
5569
+ value: JSON.stringify(userAttributes),
5570
+ canTrack
5571
+ });
5572
+ subscribers.forEach((callback) => callback(userAttributes));
5573
+ },
5574
+ getUserAttributes() {
5575
+ if (!isBrowser()) {
5576
+ return {};
5577
+ }
5578
+ return JSON.parse(getCookieSync({
5579
+ name: USER_ATTRIBUTES_COOKIE_NAME,
5580
+ canTrack
5581
+ }) || "{}");
5582
+ },
5583
+ subscribeOnUserAttributesChange(callback) {
5584
+ subscribers.add(callback);
5585
+ return () => {
5586
+ subscribers.delete(callback);
5587
+ };
5588
+ },
5589
+ setCanTrack(value) {
5590
+ canTrack = value;
5591
+ }
5592
+ };
5593
+ }
5594
+ var userAttributesService = createUserAttributesService();
5595
+ var setClientUserAttributes = (attributes) => {
5596
+ userAttributesService.setUserAttributes(attributes);
5597
+ };
5598
+
5527
5599
  // src/helpers/canTrack.ts
5528
- var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
5600
+ var getDefaultCanTrack = (canTrack) => {
5601
+ const result = checkIsDefined(canTrack) ? canTrack : true;
5602
+ userAttributesService.setCanTrack(result);
5603
+ return result;
5604
+ };
5529
5605
 
5530
5606
  // src/blocks/accordion/component-info.ts
5531
5607
  var defaultTitle = {
@@ -6255,8 +6331,408 @@ var componentInfo5 = {
6255
6331
  }
6256
6332
  };
6257
6333
 
6258
- // src/blocks/section/component-info.ts
6334
+ // src/blocks/personalization-container/component-info.ts
6259
6335
  var componentInfo6 = {
6336
+ name: "PersonalizationContainer",
6337
+ shouldReceiveBuilderProps: {
6338
+ builderBlock: true,
6339
+ builderContext: true
6340
+ },
6341
+ noWrap: true,
6342
+ image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",
6343
+ canHaveChildren: true,
6344
+ inputs: [{
6345
+ name: "variants",
6346
+ defaultValue: [],
6347
+ behavior: "personalizationVariantList",
6348
+ type: "list",
6349
+ subFields: [{
6350
+ name: "name",
6351
+ type: "text"
6352
+ }, {
6353
+ name: "query",
6354
+ friendlyName: "Targeting rules",
6355
+ type: "BuilderQuery",
6356
+ defaultValue: []
6357
+ }, {
6358
+ name: "startDate",
6359
+ type: "date"
6360
+ }, {
6361
+ name: "endDate",
6362
+ type: "date"
6363
+ }, {
6364
+ name: "blocks",
6365
+ type: "uiBlocks",
6366
+ hideFromUI: true,
6367
+ defaultValue: []
6368
+ }]
6369
+ }]
6370
+ };
6371
+ var _tmpl$8 = /* @__PURE__ */ template(`<script>`);
6372
+ function InlinedScript(props) {
6373
+ return (() => {
6374
+ const _el$ = _tmpl$8();
6375
+ effect((_p$) => {
6376
+ const _v$ = props.scriptStr, _v$2 = props.id, _v$3 = props.nonce || "";
6377
+ _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
6378
+ _v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
6379
+ _v$3 !== _p$._v$3 && setAttribute(_el$, "nonce", _p$._v$3 = _v$3);
6380
+ return _p$;
6381
+ }, {
6382
+ _v$: void 0,
6383
+ _v$2: void 0,
6384
+ _v$3: void 0
6385
+ });
6386
+ return _el$;
6387
+ })();
6388
+ }
6389
+ var inlined_script_default = InlinedScript;
6390
+
6391
+ // src/functions/is-previewing.ts
6392
+ function isPreviewing(_search) {
6393
+ const search = _search || (isBrowser() ? window.location.search : void 0);
6394
+ if (!search) {
6395
+ return false;
6396
+ }
6397
+ const normalizedSearch = getSearchString(search);
6398
+ return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
6399
+ }
6400
+
6401
+ // src/blocks/personalization-container/helpers/inlined-fns.ts
6402
+ function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
6403
+ function isString(val) {
6404
+ return typeof val === "string";
6405
+ }
6406
+ function isNumber(val) {
6407
+ return typeof val === "number";
6408
+ }
6409
+ function objectMatchesQuery(userattr, query2) {
6410
+ const result = (() => {
6411
+ const property = query2.property;
6412
+ const operator = query2.operator;
6413
+ let testValue = query2.value;
6414
+ if (query2 && query2.property === "urlPath" && query2.value && typeof query2.value === "string" && query2.value !== "/" && query2.value.endsWith("/")) {
6415
+ testValue = query2.value.slice(0, -1);
6416
+ }
6417
+ if (!(property && operator)) {
6418
+ return true;
6419
+ }
6420
+ if (Array.isArray(testValue)) {
6421
+ if (operator === "isNot") {
6422
+ return testValue.every((val) => objectMatchesQuery(userattr, {
6423
+ property,
6424
+ operator,
6425
+ value: val
6426
+ }));
6427
+ }
6428
+ return !!testValue.find((val) => objectMatchesQuery(userattr, {
6429
+ property,
6430
+ operator,
6431
+ value: val
6432
+ }));
6433
+ }
6434
+ const value = userattr[property];
6435
+ if (Array.isArray(value)) {
6436
+ return value.includes(testValue);
6437
+ }
6438
+ switch (operator) {
6439
+ case "is":
6440
+ return value === testValue;
6441
+ case "isNot":
6442
+ return value !== testValue;
6443
+ case "contains":
6444
+ return (isString(value) || Array.isArray(value)) && value.includes(String(testValue));
6445
+ case "startsWith":
6446
+ return isString(value) && value.startsWith(String(testValue));
6447
+ case "endsWith":
6448
+ return isString(value) && value.endsWith(String(testValue));
6449
+ case "greaterThan":
6450
+ return isNumber(value) && isNumber(testValue) && value > testValue;
6451
+ case "lessThan":
6452
+ return isNumber(value) && isNumber(testValue) && value < testValue;
6453
+ case "greaterThanOrEqualTo":
6454
+ return isNumber(value) && isNumber(testValue) && value >= testValue;
6455
+ case "lessThanOrEqualTo":
6456
+ return isNumber(value) && isNumber(testValue) && value <= testValue;
6457
+ default:
6458
+ return false;
6459
+ }
6460
+ })();
6461
+ return result;
6462
+ }
6463
+ const item = {
6464
+ query,
6465
+ startDate,
6466
+ endDate
6467
+ };
6468
+ const now = userAttributes.date && new Date(userAttributes.date) || /* @__PURE__ */ new Date();
6469
+ if (item.startDate && new Date(item.startDate) > now) {
6470
+ return false;
6471
+ } else if (item.endDate && new Date(item.endDate) < now) {
6472
+ return false;
6473
+ }
6474
+ if (!item.query || !item.query.length) {
6475
+ return true;
6476
+ }
6477
+ return item.query.every((filter) => {
6478
+ return objectMatchesQuery(userAttributes, filter);
6479
+ });
6480
+ }
6481
+ var PERSONALIZATION_SCRIPT = `function getPersonalizedVariant(variants, blockId, locale) {
6482
+ if (!navigator.cookieEnabled) {
6483
+ return;
6484
+ }
6485
+ function getCookie(name) {
6486
+ const nameEQ = name + '=';
6487
+ const ca = document.cookie.split(';');
6488
+ for (let i = 0; i < ca.length; i++) {
6489
+ let c = ca[i];
6490
+ while (c.charAt(0) == ' ') c = c.substring(1, c.length);
6491
+ if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
6492
+ }
6493
+ return null;
6494
+ }
6495
+ function removeVariants() {
6496
+ variants?.forEach(function (_, index) {
6497
+ document.querySelector('template[data-variant-id="' + blockId + '-' + index + '"]')?.remove();
6498
+ });
6499
+ document.querySelector('script[data-id="variants-script-' + blockId + '"]')?.remove();
6500
+ document.querySelector('style[data-id="variants-styles-' + blockId + '"]')?.remove();
6501
+ }
6502
+ const attributes = JSON.parse(getCookie('builder.userAttributes') || '{}');
6503
+ if (locale) {
6504
+ attributes.locale = locale;
6505
+ }
6506
+ const winningVariantIndex = variants?.findIndex(function (variant) {
6507
+ return filterWithCustomTargeting(attributes, variant.query, variant.startDate, variant.endDate);
6508
+ });
6509
+ const isDebug = location.href.includes('builder.debug=true');
6510
+ if (isDebug) {
6511
+ console.debug('PersonalizationContainer', {
6512
+ attributes,
6513
+ variants,
6514
+ winningVariantIndex
6515
+ });
6516
+ }
6517
+ if (winningVariantIndex !== -1) {
6518
+ const winningVariant = document.querySelector('template[data-variant-id="' + blockId + '-' + winningVariantIndex + '"]');
6519
+ if (winningVariant) {
6520
+ const parentNode = winningVariant.parentNode;
6521
+ if (parentNode) {
6522
+ const newParent = parentNode.cloneNode(false);
6523
+ newParent.appendChild(winningVariant.content.firstChild);
6524
+ newParent.appendChild(winningVariant.content.lastChild);
6525
+ parentNode.parentNode?.replaceChild(newParent, parentNode);
6526
+ }
6527
+ if (isDebug) {
6528
+ console.debug('PersonalizationContainer', 'Winning variant Replaced:', winningVariant);
6529
+ }
6530
+ }
6531
+ } else if (variants && variants.length > 0) {
6532
+ removeVariants();
6533
+ }
6534
+ }`;
6535
+ var FILTER_WITH_CUSTOM_TARGETING_SCRIPT = "function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {\n function isString(val) {\n return typeof val === 'string';\n }\n function isNumber(val) {\n return typeof val === 'number';\n }\n function objectMatchesQuery(userattr, query) {\n const result = (() => {\n const property = query.property;\n const operator = query.operator;\n let testValue = query.value;\n if (query && query.property === 'urlPath' && query.value && typeof query.value === 'string' && query.value !== '/' && query.value.endsWith('/')) {\n testValue = query.value.slice(0, -1);\n }\n if (!(property && operator)) {\n return true;\n }\n if (Array.isArray(testValue)) {\n if (operator === 'isNot') {\n return testValue.every(val => objectMatchesQuery(userattr, {\n property,\n operator,\n value: val\n }));\n }\n return !!testValue.find(val => objectMatchesQuery(userattr, {\n property,\n operator,\n value: val\n }));\n }\n const value = userattr[property];\n if (Array.isArray(value)) {\n return value.includes(testValue);\n }\n switch (operator) {\n case 'is':\n return value === testValue;\n case 'isNot':\n return value !== testValue;\n case 'contains':\n return (isString(value) || Array.isArray(value)) && value.includes(String(testValue));\n case 'startsWith':\n return isString(value) && value.startsWith(String(testValue));\n case 'endsWith':\n return isString(value) && value.endsWith(String(testValue));\n case 'greaterThan':\n return isNumber(value) && isNumber(testValue) && value > testValue;\n case 'lessThan':\n return isNumber(value) && isNumber(testValue) && value < testValue;\n case 'greaterThanOrEqualTo':\n return isNumber(value) && isNumber(testValue) && value >= testValue;\n case 'lessThanOrEqualTo':\n return isNumber(value) && isNumber(testValue) && value <= testValue;\n default:\n return false;\n }\n })();\n return result;\n }\n const item = {\n query,\n startDate,\n endDate\n };\n const now = userAttributes.date && new Date(userAttributes.date) || new Date();\n if (item.startDate && new Date(item.startDate) > now) {\n return false;\n } else if (item.endDate && new Date(item.endDate) < now) {\n return false;\n }\n if (!item.query || !item.query.length) {\n return true;\n }\n return item.query.every(filter => {\n return objectMatchesQuery(userAttributes, filter);\n });\n}";
6536
+
6537
+ // src/blocks/personalization-container/helpers.ts
6538
+ function checkShouldRenderVariants(variants, canTrack) {
6539
+ const hasVariants = variants && variants.length > 0;
6540
+ if (TARGET === "reactNative")
6541
+ return false;
6542
+ if (!hasVariants)
6543
+ return false;
6544
+ if (!canTrack)
6545
+ return false;
6546
+ if (TARGET === "vue" || TARGET === "svelte")
6547
+ return true;
6548
+ if (isBrowser())
6549
+ return false;
6550
+ return true;
6551
+ }
6552
+ function getBlocksToRender({
6553
+ variants,
6554
+ previewingIndex,
6555
+ isHydrated,
6556
+ filteredVariants,
6557
+ fallbackBlocks
6558
+ }) {
6559
+ const fallback = {
6560
+ blocks: fallbackBlocks ?? [],
6561
+ path: "this.children"
6562
+ };
6563
+ if (isHydrated && isEditing()) {
6564
+ if (typeof previewingIndex === "number" && previewingIndex < (variants?.length ?? 0)) {
6565
+ const variant = variants[previewingIndex];
6566
+ return {
6567
+ blocks: variant.blocks,
6568
+ path: `component.options.variants.${previewingIndex}.blocks`
6569
+ };
6570
+ }
6571
+ return fallback;
6572
+ }
6573
+ if (isBrowser()) {
6574
+ const winningVariant = filteredVariants?.[0];
6575
+ if (winningVariant) {
6576
+ return {
6577
+ blocks: winningVariant.blocks,
6578
+ path: `component.options.variants.${variants?.indexOf(winningVariant)}.blocks`
6579
+ };
6580
+ }
6581
+ }
6582
+ return fallback;
6583
+ }
6584
+ var getPersonalizationScript = (variants, blockId, locale) => {
6585
+ return `
6586
+ (function() {
6587
+ ${FILTER_WITH_CUSTOM_TARGETING_SCRIPT}
6588
+ ${PERSONALIZATION_SCRIPT}
6589
+ getPersonalizedVariant(${JSON.stringify(variants)}, "${blockId}"${locale ? `, "${locale}"` : ""})
6590
+ })();
6591
+ `;
6592
+ };
6593
+
6594
+ // src/blocks/personalization-container/personalization-container.tsx
6595
+ var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
6596
+ var _tmpl$25 = /* @__PURE__ */ template(`<template>`);
6597
+ function PersonalizationContainer(props) {
6598
+ const [userAttributes, setUserAttributes] = createSignal(userAttributesService.getUserAttributes());
6599
+ const [scriptStr, setScriptStr] = createSignal(getPersonalizationScript(props.variants, props.builderBlock?.id || "none", props.builderContext?.rootState?.locale));
6600
+ const [unsubscribers, setUnsubscribers] = createSignal([]);
6601
+ const [shouldRenderVariants, setShouldRenderVariants] = createSignal(checkShouldRenderVariants(props.variants, getDefaultCanTrack(props.builderContext?.canTrack)));
6602
+ const [isHydrated, setIsHydrated] = createSignal(false);
6603
+ const filteredVariants = createMemo(() => {
6604
+ return (props.variants || []).filter((variant) => {
6605
+ return filterWithCustomTargeting({
6606
+ ...props.builderContext?.rootState?.locale ? {
6607
+ locale: props.builderContext?.rootState?.locale
6608
+ } : {},
6609
+ ...userAttributes()
6610
+ }, variant.query, variant.startDate, variant.endDate);
6611
+ });
6612
+ });
6613
+ const blocksToRender = createMemo(() => {
6614
+ return getBlocksToRender({
6615
+ variants: props.variants,
6616
+ fallbackBlocks: props.builderBlock?.children,
6617
+ isHydrated: isHydrated(),
6618
+ filteredVariants: filteredVariants(),
6619
+ previewingIndex: props.previewingIndex
6620
+ });
6621
+ });
6622
+ const hideVariantsStyleString = createMemo(() => {
6623
+ return (props.variants || []).map((_, index) => `[data-variant-id="${props.builderBlock?.id}-${index}"] { display: none; } `).join("");
6624
+ });
6625
+ let rootRef;
6626
+ onMount(() => {
6627
+ setIsHydrated(true);
6628
+ const unsub = userAttributesService.subscribeOnUserAttributesChange((attrs) => {
6629
+ setUserAttributes(attrs);
6630
+ });
6631
+ if (!(isEditing() || isPreviewing())) {
6632
+ const variant = filteredVariants()[0];
6633
+ if (rootRef) {
6634
+ rootRef.dispatchEvent(new CustomEvent("builder.variantLoaded", {
6635
+ detail: {
6636
+ variant: variant || "default",
6637
+ content: props.builderContext?.content
6638
+ },
6639
+ bubbles: true
6640
+ }));
6641
+ const observer = new IntersectionObserver((entries) => {
6642
+ entries.forEach((entry) => {
6643
+ if (entry.isIntersecting && rootRef) {
6644
+ rootRef.dispatchEvent(new CustomEvent("builder.variantDisplayed", {
6645
+ detail: {
6646
+ variant: variant || "default",
6647
+ content: props.builderContext?.content
6648
+ },
6649
+ bubbles: true
6650
+ }));
6651
+ }
6652
+ });
6653
+ });
6654
+ observer.observe(rootRef);
6655
+ }
6656
+ }
6657
+ unsubscribers().push(unsub);
6658
+ });
6659
+ return (() => {
6660
+ const _el$ = _tmpl$9();
6661
+ const _ref$ = rootRef;
6662
+ typeof _ref$ === "function" ? use(_ref$, _el$) : rootRef = _el$;
6663
+ spread(_el$, mergeProps({
6664
+ get ["class"]() {
6665
+ return `builder-personalization-container ${props.attributes?.className || ""}`;
6666
+ }
6667
+ }, () => props.attributes), false, true);
6668
+ insert(_el$, createComponent(Show, {
6669
+ get when() {
6670
+ return shouldRenderVariants();
6671
+ },
6672
+ get children() {
6673
+ return [createComponent(For, {
6674
+ get each() {
6675
+ return props.variants;
6676
+ },
6677
+ children: (variant, _index) => {
6678
+ const index = _index();
6679
+ return (() => {
6680
+ const _el$2 = _tmpl$25();
6681
+ setAttribute(_el$2, "key", index);
6682
+ insert(_el$2, createComponent(blocks_default, {
6683
+ get blocks() {
6684
+ return variant.blocks;
6685
+ },
6686
+ get parent() {
6687
+ return props.builderBlock?.id;
6688
+ },
6689
+ path: `component.options.variants.${index}.blocks`
6690
+ }));
6691
+ effect(() => setAttribute(_el$2, "data-variant-id", `${props.builderBlock?.id}-${index}`));
6692
+ return _el$2;
6693
+ })();
6694
+ }
6695
+ }), createComponent(inlined_styles_default, {
6696
+ get nonce() {
6697
+ return props.builderContext?.nonce || "";
6698
+ },
6699
+ get styles() {
6700
+ return hideVariantsStyleString();
6701
+ },
6702
+ get id() {
6703
+ return `variants-styles-${props.builderBlock?.id}`;
6704
+ }
6705
+ }), createComponent(inlined_script_default, {
6706
+ get nonce() {
6707
+ return props.builderContext?.nonce || "";
6708
+ },
6709
+ get scriptStr() {
6710
+ return scriptStr();
6711
+ },
6712
+ get id() {
6713
+ return `variants-script-${props.builderBlock?.id}`;
6714
+ }
6715
+ })];
6716
+ }
6717
+ }), null);
6718
+ insert(_el$, createComponent(blocks_default, {
6719
+ get blocks() {
6720
+ return blocksToRender().blocks;
6721
+ },
6722
+ get parent() {
6723
+ return props.builderBlock?.id;
6724
+ },
6725
+ get path() {
6726
+ return blocksToRender().path;
6727
+ }
6728
+ }), null);
6729
+ return _el$;
6730
+ })();
6731
+ }
6732
+ var personalization_container_default = PersonalizationContainer;
6733
+
6734
+ // src/blocks/section/component-info.ts
6735
+ var componentInfo7 = {
6260
6736
  name: "Core:Section",
6261
6737
  static: true,
6262
6738
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -6298,7 +6774,7 @@ var componentInfo6 = {
6298
6774
  };
6299
6775
 
6300
6776
  // src/blocks/slot/component-info.ts
6301
- var componentInfo7 = {
6777
+ var componentInfo8 = {
6302
6778
  name: "Slot",
6303
6779
  isRSC: true,
6304
6780
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -6316,10 +6792,10 @@ var componentInfo7 = {
6316
6792
  builderComponents: true
6317
6793
  }
6318
6794
  };
6319
- var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
6795
+ var _tmpl$10 = /* @__PURE__ */ template(`<div>`);
6320
6796
  function Slot(props) {
6321
6797
  return (() => {
6322
- const _el$ = _tmpl$8();
6798
+ const _el$ = _tmpl$10();
6323
6799
  _el$.style.setProperty("pointer-events", "auto");
6324
6800
  spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
6325
6801
  "builder-slot": props.name
@@ -6347,7 +6823,7 @@ function Slot(props) {
6347
6823
  var slot_default = Slot;
6348
6824
 
6349
6825
  // src/blocks/symbol/component-info.ts
6350
- var componentInfo8 = {
6826
+ var componentInfo9 = {
6351
6827
  name: "Symbol",
6352
6828
  noWrap: true,
6353
6829
  static: true,
@@ -6429,7 +6905,7 @@ var defaultElement = {
6429
6905
  }
6430
6906
  }
6431
6907
  };
6432
- var componentInfo9 = {
6908
+ var componentInfo10 = {
6433
6909
  name: "Builder: Tabs",
6434
6910
  inputs: [{
6435
6911
  name: "tabs",
@@ -6533,8 +7009,8 @@ var componentInfo9 = {
6533
7009
  builderLinkComponent: true
6534
7010
  }
6535
7011
  };
6536
- var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
6537
- var _tmpl$25 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
7012
+ var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
7013
+ var _tmpl$26 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
6538
7014
  var _tmpl$33 = /* @__PURE__ */ template(`<span>`);
6539
7015
  function Tabs(props) {
6540
7016
  const [activeTab, setActiveTab] = createSignal(props.defaultActiveTab ? props.defaultActiveTab - 1 : 0);
@@ -6549,7 +7025,7 @@ function Tabs(props) {
6549
7025
  }
6550
7026
  }
6551
7027
  return (() => {
6552
- const _el$ = _tmpl$25(), _el$2 = _el$.firstChild;
7028
+ const _el$ = _tmpl$26(), _el$2 = _el$.firstChild;
6553
7029
  _el$2.style.setProperty("display", "flex");
6554
7030
  _el$2.style.setProperty("flex-direction", "row");
6555
7031
  _el$2.style.setProperty("overflow", "auto");
@@ -6601,7 +7077,7 @@ function Tabs(props) {
6601
7077
  return activeTabContent(activeTab());
6602
7078
  },
6603
7079
  get children() {
6604
- const _el$3 = _tmpl$9();
7080
+ const _el$3 = _tmpl$11();
6605
7081
  insert(_el$3, createComponent(blocks_default, {
6606
7082
  get parent() {
6607
7083
  return props.builderBlock.id;
@@ -6633,7 +7109,7 @@ var tabs_default = Tabs;
6633
7109
  delegateEvents(["click"]);
6634
7110
 
6635
7111
  // src/blocks/text/component-info.ts
6636
- var componentInfo10 = {
7112
+ var componentInfo11 = {
6637
7113
  shouldReceiveBuilderProps: {
6638
7114
  builderBlock: TARGET === "reactNative" ? true : false,
6639
7115
  builderContext: true
@@ -6656,10 +7132,10 @@ var componentInfo10 = {
6656
7132
  textAlign: "center"
6657
7133
  }
6658
7134
  };
6659
- var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
7135
+ var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-text>`);
6660
7136
  function Text(props) {
6661
7137
  return (() => {
6662
- const _el$ = _tmpl$10();
7138
+ const _el$ = _tmpl$12();
6663
7139
  _el$.style.setProperty("outline", "none");
6664
7140
  effect(() => _el$.innerHTML = props.text?.toString() || "");
6665
7141
  return _el$;
@@ -6668,7 +7144,7 @@ function Text(props) {
6668
7144
  var text_default = Text;
6669
7145
 
6670
7146
  // src/blocks/custom-code/component-info.ts
6671
- var componentInfo11 = {
7147
+ var componentInfo12 = {
6672
7148
  name: "Custom Code",
6673
7149
  static: true,
6674
7150
  requiredPermissions: ["editCode"],
@@ -6691,7 +7167,7 @@ var componentInfo11 = {
6691
7167
  advanced: true
6692
7168
  }]
6693
7169
  };
6694
- var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
7170
+ var _tmpl$13 = /* @__PURE__ */ template(`<div>`);
6695
7171
  function CustomCode(props) {
6696
7172
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
6697
7173
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -6725,7 +7201,7 @@ function CustomCode(props) {
6725
7201
  }
6726
7202
  });
6727
7203
  return (() => {
6728
- const _el$ = _tmpl$11();
7204
+ const _el$ = _tmpl$13();
6729
7205
  const _ref$ = elementRef;
6730
7206
  typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
6731
7207
  effect((_p$) => {
@@ -6743,7 +7219,7 @@ function CustomCode(props) {
6743
7219
  var custom_code_default = CustomCode;
6744
7220
 
6745
7221
  // src/blocks/embed/component-info.ts
6746
- var componentInfo12 = {
7222
+ var componentInfo13 = {
6747
7223
  name: "Embed",
6748
7224
  static: true,
6749
7225
  inputs: [{
@@ -6765,7 +7241,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
6765
7241
  var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
6766
7242
 
6767
7243
  // src/blocks/embed/embed.tsx
6768
- var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-embed>`);
7244
+ var _tmpl$14 = /* @__PURE__ */ template(`<div class=builder-embed>`);
6769
7245
  function Embed(props) {
6770
7246
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
6771
7247
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -6802,7 +7278,7 @@ function Embed(props) {
6802
7278
  }
6803
7279
  createEffect(on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0));
6804
7280
  return (() => {
6805
- const _el$ = _tmpl$12();
7281
+ const _el$ = _tmpl$14();
6806
7282
  const _ref$ = elem;
6807
7283
  typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
6808
7284
  effect(() => _el$.innerHTML = props.content);
@@ -6812,7 +7288,7 @@ function Embed(props) {
6812
7288
  var embed_default = Embed;
6813
7289
 
6814
7290
  // src/blocks/form/form/component-info.ts
6815
- var componentInfo13 = {
7291
+ var componentInfo14 = {
6816
7292
  name: "Form:Form",
6817
7293
  // editableTags: ['builder-form-error']
6818
7294
  defaults: {
@@ -7068,8 +7544,8 @@ function logFetch(url) {
7068
7544
  }
7069
7545
 
7070
7546
  // src/blocks/form/form/form.tsx
7071
- var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-04a43b72">`);
7072
- var _tmpl$26 = /* @__PURE__ */ template(`<form>`);
7547
+ var _tmpl$15 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-04a43b72">`);
7548
+ var _tmpl$27 = /* @__PURE__ */ template(`<form>`);
7073
7549
  var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-04a43b72 {
7074
7550
  padding: 10px;
7075
7551
  color: red;
@@ -7262,7 +7738,7 @@ function FormComponent(props) {
7262
7738
  }
7263
7739
  let formRef;
7264
7740
  return [(() => {
7265
- const _el$ = _tmpl$26();
7741
+ const _el$ = _tmpl$27();
7266
7742
  _el$.addEventListener("submit", (event) => onSubmit(event));
7267
7743
  const _ref$ = formRef;
7268
7744
  typeof _ref$ === "function" ? use(_ref$, _el$) : formRef = _el$;
@@ -7318,7 +7794,7 @@ function FormComponent(props) {
7318
7794
  return memo(() => submissionState() === "error")() && responseData();
7319
7795
  },
7320
7796
  get children() {
7321
- const _el$2 = _tmpl$13();
7797
+ const _el$2 = _tmpl$15();
7322
7798
  insert(_el$2, () => JSON.stringify(responseData(), null, 2));
7323
7799
  return _el$2;
7324
7800
  }
@@ -7345,7 +7821,7 @@ function FormComponent(props) {
7345
7821
  var form_default = FormComponent;
7346
7822
 
7347
7823
  // src/blocks/form/input/component-info.ts
7348
- var componentInfo14 = {
7824
+ var componentInfo15 = {
7349
7825
  name: "Form:Input",
7350
7826
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
7351
7827
  inputs: [
@@ -7397,10 +7873,10 @@ var componentInfo14 = {
7397
7873
  borderColor: "#ccc"
7398
7874
  }
7399
7875
  };
7400
- var _tmpl$14 = /* @__PURE__ */ template(`<input>`);
7876
+ var _tmpl$16 = /* @__PURE__ */ template(`<input>`);
7401
7877
  function FormInputComponent(props) {
7402
7878
  return (() => {
7403
- const _el$ = _tmpl$14();
7879
+ const _el$ = _tmpl$16();
7404
7880
  spread(_el$, mergeProps({}, () => props.attributes, {
7405
7881
  get key() {
7406
7882
  return isEditing() && props.defaultValue ? props.defaultValue : "default-key";
@@ -7430,7 +7906,7 @@ function FormInputComponent(props) {
7430
7906
  var input_default = FormInputComponent;
7431
7907
 
7432
7908
  // src/blocks/form/select/component-info.ts
7433
- var componentInfo15 = {
7909
+ var componentInfo16 = {
7434
7910
  name: "Form:Select",
7435
7911
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
7436
7912
  defaultStyles: {
@@ -7473,11 +7949,11 @@ var componentInfo15 = {
7473
7949
  static: true,
7474
7950
  noWrap: true
7475
7951
  };
7476
- var _tmpl$15 = /* @__PURE__ */ template(`<select>`);
7477
- var _tmpl$27 = /* @__PURE__ */ template(`<option>`);
7952
+ var _tmpl$17 = /* @__PURE__ */ template(`<select>`);
7953
+ var _tmpl$28 = /* @__PURE__ */ template(`<option>`);
7478
7954
  function SelectComponent(props) {
7479
7955
  return (() => {
7480
- const _el$ = _tmpl$15();
7956
+ const _el$ = _tmpl$17();
7481
7957
  spread(_el$, mergeProps({}, () => props.attributes, {
7482
7958
  get value() {
7483
7959
  return props.value;
@@ -7502,7 +7978,7 @@ function SelectComponent(props) {
7502
7978
  children: (option, _index) => {
7503
7979
  const index = _index();
7504
7980
  return (() => {
7505
- const _el$2 = _tmpl$27();
7981
+ const _el$2 = _tmpl$28();
7506
7982
  insert(_el$2, () => option.name || option.value);
7507
7983
  effect(() => setAttribute(_el$2, "key", `${option.name}-${index}`));
7508
7984
  effect(() => _el$2.value = option.value);
@@ -7516,7 +7992,7 @@ function SelectComponent(props) {
7516
7992
  var select_default = SelectComponent;
7517
7993
 
7518
7994
  // src/blocks/form/submit-button/component-info.ts
7519
- var componentInfo16 = {
7995
+ var componentInfo17 = {
7520
7996
  name: "Form:SubmitButton",
7521
7997
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
7522
7998
  defaultStyles: {
@@ -7542,10 +8018,10 @@ var componentInfo16 = {
7542
8018
  // TODO: defaultChildren
7543
8019
  // canHaveChildren: true,
7544
8020
  };
7545
- var _tmpl$16 = /* @__PURE__ */ template(`<button type=submit>`);
8021
+ var _tmpl$18 = /* @__PURE__ */ template(`<button type=submit>`);
7546
8022
  function SubmitButton(props) {
7547
8023
  return (() => {
7548
- const _el$ = _tmpl$16();
8024
+ const _el$ = _tmpl$18();
7549
8025
  spread(_el$, mergeProps({}, () => props.attributes), false, true);
7550
8026
  insert(_el$, () => props.text);
7551
8027
  return _el$;
@@ -7554,7 +8030,7 @@ function SubmitButton(props) {
7554
8030
  var submit_button_default = SubmitButton;
7555
8031
 
7556
8032
  // src/blocks/form/textarea/component-info.ts
7557
- var componentInfo17 = {
8033
+ var componentInfo18 = {
7558
8034
  name: "Form:TextArea",
7559
8035
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
7560
8036
  inputs: [{
@@ -7591,10 +8067,10 @@ var componentInfo17 = {
7591
8067
  static: true,
7592
8068
  noWrap: true
7593
8069
  };
7594
- var _tmpl$17 = /* @__PURE__ */ template(`<textarea>`);
8070
+ var _tmpl$19 = /* @__PURE__ */ template(`<textarea>`);
7595
8071
  function Textarea(props) {
7596
8072
  return (() => {
7597
- const _el$ = _tmpl$17();
8073
+ const _el$ = _tmpl$19();
7598
8074
  spread(_el$, mergeProps({}, () => props.attributes, {
7599
8075
  get placeholder() {
7600
8076
  return props.placeholder;
@@ -7618,7 +8094,7 @@ function Textarea(props) {
7618
8094
  var textarea_default = Textarea;
7619
8095
 
7620
8096
  // src/blocks/img/component-info.ts
7621
- var componentInfo18 = {
8097
+ var componentInfo19 = {
7622
8098
  // friendlyName?
7623
8099
  name: "Raw:Img",
7624
8100
  hideFromInsertMenu: true,
@@ -7633,10 +8109,10 @@ var componentInfo18 = {
7633
8109
  noWrap: true,
7634
8110
  static: true
7635
8111
  };
7636
- var _tmpl$18 = /* @__PURE__ */ template(`<img>`);
8112
+ var _tmpl$20 = /* @__PURE__ */ template(`<img>`);
7637
8113
  function ImgComponent(props) {
7638
8114
  return (() => {
7639
- const _el$ = _tmpl$18();
8115
+ const _el$ = _tmpl$20();
7640
8116
  spread(_el$, mergeProps({
7641
8117
  get style() {
7642
8118
  return {
@@ -7660,7 +8136,7 @@ function ImgComponent(props) {
7660
8136
  var img_default = ImgComponent;
7661
8137
 
7662
8138
  // src/blocks/video/component-info.ts
7663
- var componentInfo19 = {
8139
+ var componentInfo20 = {
7664
8140
  name: "Video",
7665
8141
  canHaveChildren: true,
7666
8142
  defaultStyles: {
@@ -7745,8 +8221,8 @@ var componentInfo19 = {
7745
8221
  builderBlock: true
7746
8222
  }
7747
8223
  };
7748
- var _tmpl$19 = /* @__PURE__ */ template(`<source type=video/mp4>`);
7749
- var _tmpl$28 = /* @__PURE__ */ template(`<div>`);
8224
+ var _tmpl$21 = /* @__PURE__ */ template(`<source type=video/mp4>`);
8225
+ var _tmpl$29 = /* @__PURE__ */ template(`<div>`);
7750
8226
  var _tmpl$35 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
7751
8227
  function Video(props) {
7752
8228
  const videoProps = createMemo(() => {
@@ -7807,7 +8283,7 @@ function Video(props) {
7807
8283
  return !props.lazyLoad;
7808
8284
  },
7809
8285
  get children() {
7810
- const _el$3 = _tmpl$19();
8286
+ const _el$3 = _tmpl$21();
7811
8287
  effect(() => setAttribute(_el$3, "src", props.video));
7812
8288
  return _el$3;
7813
8289
  }
@@ -7817,7 +8293,7 @@ function Video(props) {
7817
8293
  return props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length);
7818
8294
  },
7819
8295
  get children() {
7820
- const _el$4 = _tmpl$28();
8296
+ const _el$4 = _tmpl$29();
7821
8297
  _el$4.style.setProperty("width", "100%");
7822
8298
  _el$4.style.setProperty("pointer-events", "none");
7823
8299
  _el$4.style.setProperty("font-size", "0px");
@@ -7830,7 +8306,7 @@ function Video(props) {
7830
8306
  return props.builderBlock?.children?.length && props.fitContent;
7831
8307
  },
7832
8308
  get children() {
7833
- const _el$5 = _tmpl$28();
8309
+ const _el$5 = _tmpl$29();
7834
8310
  _el$5.style.setProperty("display", "flex");
7835
8311
  _el$5.style.setProperty("flex-direction", "column");
7836
8312
  _el$5.style.setProperty("align-items", "stretch");
@@ -7843,7 +8319,7 @@ function Video(props) {
7843
8319
  return props.builderBlock?.children?.length && !props.fitContent;
7844
8320
  },
7845
8321
  get children() {
7846
- const _el$6 = _tmpl$28();
8322
+ const _el$6 = _tmpl$29();
7847
8323
  _el$6.style.setProperty("pointer-events", "none");
7848
8324
  _el$6.style.setProperty("display", "flex");
7849
8325
  _el$6.style.setProperty("flex-direction", "column");
@@ -7865,31 +8341,31 @@ var video_default = Video;
7865
8341
  // src/constants/extra-components.ts
7866
8342
  var getExtraComponents = () => [{
7867
8343
  component: custom_code_default,
7868
- ...componentInfo11
8344
+ ...componentInfo12
7869
8345
  }, {
7870
8346
  component: embed_default,
7871
- ...componentInfo12
8347
+ ...componentInfo13
7872
8348
  }, ...TARGET === "rsc" ? [] : [{
7873
8349
  component: form_default,
7874
- ...componentInfo13
8350
+ ...componentInfo14
7875
8351
  }, {
7876
8352
  component: input_default,
7877
- ...componentInfo14
8353
+ ...componentInfo15
7878
8354
  }, {
7879
8355
  component: submit_button_default,
7880
- ...componentInfo16
8356
+ ...componentInfo17
7881
8357
  }, {
7882
8358
  component: select_default,
7883
- ...componentInfo15
8359
+ ...componentInfo16
7884
8360
  }, {
7885
8361
  component: textarea_default,
7886
- ...componentInfo17
8362
+ ...componentInfo18
7887
8363
  }], {
7888
8364
  component: img_default,
7889
- ...componentInfo18
8365
+ ...componentInfo19
7890
8366
  }, {
7891
8367
  component: video_default,
7892
- ...componentInfo19
8368
+ ...componentInfo20
7893
8369
  }];
7894
8370
 
7895
8371
  // src/constants/builder-registered-components.ts
@@ -7907,19 +8383,22 @@ var getDefaultRegisteredComponents = () => [{
7907
8383
  ...componentInfo5
7908
8384
  }, {
7909
8385
  component: section_default,
7910
- ...componentInfo6
8386
+ ...componentInfo7
7911
8387
  }, {
7912
8388
  component: slot_default,
7913
- ...componentInfo7
8389
+ ...componentInfo8
7914
8390
  }, {
7915
8391
  component: symbol_default,
7916
- ...componentInfo8
8392
+ ...componentInfo9
7917
8393
  }, {
7918
8394
  component: text_default,
7919
- ...componentInfo10
7920
- }, ...TARGET === "rsc" ? [] : [{
8395
+ ...componentInfo11
8396
+ }, ...TARGET === "react" ? [{
8397
+ component: personalization_container_default,
8398
+ ...componentInfo6
8399
+ }] : [], ...TARGET === "rsc" ? [] : [{
7921
8400
  component: tabs_default,
7922
- ...componentInfo9
8401
+ ...componentInfo10
7923
8402
  }, {
7924
8403
  component: accordion_default,
7925
8404
  ...componentInfo
@@ -7957,7 +8436,7 @@ var getVariants = (content) => Object.values(content?.variations || {}).map((var
7957
8436
  testVariationId: variant.id,
7958
8437
  id: content?.id
7959
8438
  }));
7960
- var checkShouldRenderVariants = ({
8439
+ var checkShouldRenderVariants2 = ({
7961
8440
  canTrack,
7962
8441
  content
7963
8442
  }) => {
@@ -7990,25 +8469,6 @@ var getUpdateVariantVisibilityScript = ({
7990
8469
  }) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
7991
8470
  "${variationId}", "${contentId}", ${isHydrationTarget}
7992
8471
  )`;
7993
- var _tmpl$20 = /* @__PURE__ */ template(`<script>`);
7994
- function InlinedScript(props) {
7995
- return (() => {
7996
- const _el$ = _tmpl$20();
7997
- effect((_p$) => {
7998
- const _v$ = props.scriptStr, _v$2 = props.id, _v$3 = props.nonce || "";
7999
- _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
8000
- _v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
8001
- _v$3 !== _p$._v$3 && setAttribute(_el$, "nonce", _p$._v$3 = _v$3);
8002
- return _p$;
8003
- }, {
8004
- _v$: void 0,
8005
- _v$2: void 0,
8006
- _v$3: void 0
8007
- });
8008
- return _el$;
8009
- })();
8010
- }
8011
- var inlined_script_default = InlinedScript;
8012
8472
 
8013
8473
  // src/helpers/preview-lru-cache/get.ts
8014
8474
  function getPreviewContent(_searchParams) {
@@ -8016,7 +8476,7 @@ function getPreviewContent(_searchParams) {
8016
8476
  }
8017
8477
 
8018
8478
  // src/constants/sdk-version.ts
8019
- var SDK_VERSION = "3.0.5";
8479
+ var SDK_VERSION = "3.0.7";
8020
8480
 
8021
8481
  // src/helpers/sdk-headers.ts
8022
8482
  var getSdkHeaders = () => ({
@@ -8311,16 +8771,6 @@ async function fetchEntries(options) {
8311
8771
  return _processContentResult(options, content);
8312
8772
  }
8313
8773
 
8314
- // src/functions/is-previewing.ts
8315
- function isPreviewing(_search) {
8316
- const search = _search || (isBrowser() ? window.location.search : void 0);
8317
- if (!search) {
8318
- return false;
8319
- }
8320
- const normalizedSearch = getSearchString(search);
8321
- return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
8322
- }
8323
-
8324
8774
  // src/helpers/uuid.ts
8325
8775
  function uuidv4() {
8326
8776
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
@@ -8643,7 +9093,9 @@ var setupBrowserForEditing = (options = {}) => {
8643
9093
  // Supports builder-model="..." attribute which is needed to
8644
9094
  // scope our '+ add block' button styling
8645
9095
  supportsAddBlockScoping: true,
8646
- supportsCustomBreakpoints: true
9096
+ supportsCustomBreakpoints: true,
9097
+ supportsXSmallBreakpoint: TARGET === "reactNative" ? false : true,
9098
+ blockLevelPersonalization: true
8647
9099
  }
8648
9100
  }, "*");
8649
9101
  window.parent?.postMessage({
@@ -9379,7 +9831,7 @@ var content_default = ContentComponent;
9379
9831
 
9380
9832
  // src/components/content-variants/content-variants.tsx
9381
9833
  function ContentVariants(props) {
9382
- const [shouldRenderVariants, setShouldRenderVariants] = createSignal(checkShouldRenderVariants({
9834
+ const [shouldRenderVariants, setShouldRenderVariants] = createSignal(checkShouldRenderVariants2({
9383
9835
  canTrack: getDefaultCanTrack(props.canTrack),
9384
9836
  content: props.content
9385
9837
  }));
@@ -9605,7 +10057,7 @@ var fetchSymbolContent = async ({
9605
10057
  };
9606
10058
 
9607
10059
  // src/blocks/symbol/symbol.tsx
9608
- var _tmpl$21 = /* @__PURE__ */ template(`<div>`);
10060
+ var _tmpl$30 = /* @__PURE__ */ template(`<div>`);
9609
10061
  function Symbol2(props) {
9610
10062
  const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
9611
10063
  const blocksWrapper = createMemo(() => {
@@ -9637,7 +10089,7 @@ function Symbol2(props) {
9637
10089
  }
9638
10090
  createEffect(on(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
9639
10091
  return (() => {
9640
- const _el$ = _tmpl$21();
10092
+ const _el$ = _tmpl$30();
9641
10093
  spread(_el$, mergeProps({
9642
10094
  get ["class"]() {
9643
10095
  return className();
@@ -9729,4 +10181,4 @@ var fetchBuilderProps = async (_args) => {
9729
10181
  };
9730
10182
  };
9731
10183
 
9732
- export { blocks_default as Blocks, builder_context_default as BuilderContext, button_default as Button, columns_default as Columns, content_variants_default as Content, fragment_default as Fragment, image_default as Image, section_default as Section, symbol_default as Symbol, text_default as Text, video_default as Video, _processContentResult, createRegisterComponentMessage, fetchBuilderProps, fetchEntries, fetchOneEntry, getBuilderSearchParams, isEditing, isPreviewing, register, setEditorSettings, subscribeToEditor, track };
10184
+ export { blocks_default as Blocks, builder_context_default as BuilderContext, button_default as Button, columns_default as Columns, content_variants_default as Content, fragment_default as Fragment, image_default as Image, section_default as Section, symbol_default as Symbol, text_default as Text, video_default as Video, _processContentResult, createRegisterComponentMessage, fetchBuilderProps, fetchEntries, fetchOneEntry, getBuilderSearchParams, isEditing, isPreviewing, register, setClientUserAttributes, setEditorSettings, subscribeToEditor, track };