@contentful/experiences-visual-editor-react 0.0.1-alpha.7 → 0.0.1-alpha.8

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/dist/renderApp.js CHANGED
@@ -37,8 +37,8 @@ function styleInject(css, ref) {
37
37
  }
38
38
  }
39
39
 
40
- var css_248z$7 = "html,\nbody {\n margin: 0;\n padding: 0;\n}\n\n/*\n * All of these variables are tokens from Forma-36 and should not be adjusted as these\n * are global variables that may affect multiple places.\n * As our customers may use other design libraries, we try to avoid overlapping global\n * variables by always using the prefix `--exp-builder-` inside this SDK.\n */\n\n:root {\n /* Color tokens from Forma 36: https://f36.contentful.com/tokens/color-system */\n --exp-builder-blue100: #e8f5ff;\n --exp-builder-blue200: #ceecff;\n --exp-builder-blue300: #98cbff;\n --exp-builder-blue400: #40a0ff;\n --exp-builder-blue500: #036fe3;\n --exp-builder-blue600: #0059c8;\n --exp-builder-blue700: #0041ab;\n --exp-builder-blue800: #003298;\n --exp-builder-blue900: #002a8e;\n --exp-builder-gray100: #f7f9fa;\n --exp-builder-gray200: #e7ebee;\n --exp-builder-gray300: #cfd9e0;\n --exp-builder-gray400: #aec1cc;\n --exp-builder-gray500: #67728a;\n --exp-builder-gray600: #5a657c;\n --exp-builder-gray700: #414d63;\n --exp-builder-gray800: #1b273a;\n --exp-builder-gray900: #111b2b;\n --exp-builder-purple600: #6c3ecf;\n --exp-builder-red200: #ffe0e0;\n --exp-builder-red800: #7f0010;\n --exp-builder-color-white: #ffffff;\n --exp-builder-glow-primary: 0px 0px 0px 3px #e8f5ff;\n\n /* RGB colors for applying opacity */\n --exp-builder-blue100-rgb: 232, 245, 255;\n --exp-builder-blue300-rgb: 152, 203, 255;\n\n /* Spacing tokens from Forma 36: https://f36.contentful.com/tokens/spacing */\n --exp-builder-spacing-s: 0.75rem;\n --exp-builder-spacing-2xs: 0.25rem;\n\n /* Typography tokens from Forma 36: https://f36.contentful.com/tokens/typography */\n --exp-builder-font-size-l: 1rem;\n --exp-builder-font-size-m: 0.875rem;\n --exp-builder-font-stack-primary: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial,\n sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;\n --exp-builder-line-height-condensed: 1.25;\n}\n";
41
- styleInject(css_248z$7);
40
+ var css_248z$8 = "html,\nbody {\n margin: 0;\n padding: 0;\n}\n\n/*\n * All of these variables are tokens from Forma-36 and should not be adjusted as these\n * are global variables that may affect multiple places.\n * As our customers may use other design libraries, we try to avoid overlapping global\n * variables by always using the prefix `--exp-builder-` inside this SDK.\n */\n\n:root {\n /* Color tokens from Forma 36: https://f36.contentful.com/tokens/color-system */\n --exp-builder-blue100: #e8f5ff;\n --exp-builder-blue200: #ceecff;\n --exp-builder-blue300: #98cbff;\n --exp-builder-blue400: #40a0ff;\n --exp-builder-blue500: #036fe3;\n --exp-builder-blue600: #0059c8;\n --exp-builder-blue700: #0041ab;\n --exp-builder-blue800: #003298;\n --exp-builder-blue900: #002a8e;\n --exp-builder-gray100: #f7f9fa;\n --exp-builder-gray200: #e7ebee;\n --exp-builder-gray300: #cfd9e0;\n --exp-builder-gray400: #aec1cc;\n --exp-builder-gray500: #67728a;\n --exp-builder-gray600: #5a657c;\n --exp-builder-gray700: #414d63;\n --exp-builder-gray800: #1b273a;\n --exp-builder-gray900: #111b2b;\n --exp-builder-purple600: #6c3ecf;\n --exp-builder-red200: #ffe0e0;\n --exp-builder-red800: #7f0010;\n --exp-builder-color-white: #ffffff;\n --exp-builder-glow-primary: 0px 0px 0px 3px #e8f5ff;\n\n /* RGB colors for applying opacity */\n --exp-builder-blue100-rgb: 232, 245, 255;\n --exp-builder-blue300-rgb: 152, 203, 255;\n\n /* Spacing tokens from Forma 36: https://f36.contentful.com/tokens/spacing */\n --exp-builder-spacing-s: 0.75rem;\n --exp-builder-spacing-2xs: 0.25rem;\n\n /* Typography tokens from Forma 36: https://f36.contentful.com/tokens/typography */\n --exp-builder-font-size-l: 1rem;\n --exp-builder-font-size-m: 0.875rem;\n --exp-builder-font-stack-primary: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial,\n sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;\n --exp-builder-line-height-condensed: 1.25;\n}\n";
41
+ styleInject(css_248z$8);
42
42
 
43
43
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
44
44
 
@@ -33852,16 +33852,16 @@ var charenc_1 = charenc;
33852
33852
  // The _isBuffer check is for Safari 5-7 support, because it's missing
33853
33853
  // Object.prototype.constructor. Remove this eventually
33854
33854
  var isBuffer_1 = function (obj) {
33855
- return obj != null && (isBuffer$1(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
33855
+ return obj != null && (isBuffer$2(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
33856
33856
  };
33857
33857
 
33858
- function isBuffer$1 (obj) {
33858
+ function isBuffer$2 (obj) {
33859
33859
  return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
33860
33860
  }
33861
33861
 
33862
33862
  // For Node v0.10 support. Remove this eventually.
33863
33863
  function isSlowBuffer (obj) {
33864
- return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer$1(obj.slice(0, 0))
33864
+ return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer$2(obj.slice(0, 0))
33865
33865
  }
33866
33866
 
33867
33867
  (function(){
@@ -34081,6 +34081,7 @@ var INLINES;
34081
34081
  var marks = {};
34082
34082
 
34083
34083
  Object.defineProperty(marks, "__esModule", { value: true });
34084
+ marks.MARKS = void 0;
34084
34085
  /**
34085
34086
  * Map of all Contentful marks.
34086
34087
  */
@@ -34092,8 +34093,7 @@ var MARKS;
34092
34093
  MARKS["CODE"] = "code";
34093
34094
  MARKS["SUPERSCRIPT"] = "superscript";
34094
34095
  MARKS["SUBSCRIPT"] = "subscript";
34095
- })(MARKS || (MARKS = {}));
34096
- marks.default = MARKS;
34096
+ })(MARKS || (marks.MARKS = MARKS = {}));
34097
34097
 
34098
34098
  var schemaConstraints = {};
34099
34099
 
@@ -34107,15 +34107,12 @@ var schemaConstraints = {};
34107
34107
  }
34108
34108
  return to.concat(ar || Array.prototype.slice.call(from));
34109
34109
  };
34110
- var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
34111
- return (mod && mod.__esModule) ? mod : { "default": mod };
34112
- };
34113
34110
  var _a;
34114
34111
  Object.defineProperty(exports, "__esModule", { value: true });
34115
34112
  exports.V1_MARKS = exports.V1_NODE_TYPES = exports.TEXT_CONTAINERS = exports.HEADINGS = exports.CONTAINERS = exports.VOID_BLOCKS = exports.TABLE_BLOCKS = exports.LIST_ITEM_BLOCKS = exports.TOP_LEVEL_BLOCKS = void 0;
34116
34113
  var blocks_1 = blocks;
34117
34114
  var inlines_1 = inlines;
34118
- var marks_1 = __importDefault(marks);
34115
+ var marks_1 = marks;
34119
34116
  /**
34120
34117
  * Array of all top level block types.
34121
34118
  * Only these block types can be the direct children of the document.
@@ -34229,7 +34226,7 @@ var schemaConstraints = {};
34229
34226
  /**
34230
34227
  * Marks before `superscript` & `subscript` release.
34231
34228
  */
34232
- exports.V1_MARKS = [marks_1.default.BOLD, marks_1.default.CODE, marks_1.default.ITALIC, marks_1.default.UNDERLINE];
34229
+ exports.V1_MARKS = [marks_1.MARKS.BOLD, marks_1.MARKS.CODE, marks_1.MARKS.ITALIC, marks_1.MARKS.UNDERLINE];
34233
34230
 
34234
34231
  } (schemaConstraints));
34235
34232
 
@@ -34244,12 +34241,13 @@ Object.defineProperty(nodeTypes, "__esModule", { value: true });
34244
34241
  var emptyDocument = {};
34245
34242
 
34246
34243
  Object.defineProperty(emptyDocument, "__esModule", { value: true });
34244
+ emptyDocument.EMPTY_DOCUMENT = void 0;
34247
34245
  var blocks_1$1 = blocks;
34248
34246
  /**
34249
34247
  * A rich text document considered to be empty.
34250
34248
  * Any other document structure than this is not considered empty.
34251
34249
  */
34252
- var EMPTY_DOCUMENT = {
34250
+ emptyDocument.EMPTY_DOCUMENT = {
34253
34251
  nodeType: blocks_1$1.BLOCKS.DOCUMENT,
34254
34252
  data: {},
34255
34253
  content: [
@@ -34267,7 +34265,6 @@ var EMPTY_DOCUMENT = {
34267
34265
  },
34268
34266
  ],
34269
34267
  };
34270
- emptyDocument.default = EMPTY_DOCUMENT;
34271
34268
 
34272
34269
  var helpers = {};
34273
34270
 
@@ -34337,9 +34334,6 @@ helpers.isText = isText;
34337
34334
  __setModuleDefault(result, mod);
34338
34335
  return result;
34339
34336
  };
34340
- var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
34341
- return (mod && mod.__esModule) ? mod : { "default": mod };
34342
- };
34343
34337
  Object.defineProperty(exports, "__esModule", { value: true });
34344
34338
  exports.helpers = exports.EMPTY_DOCUMENT = exports.MARKS = exports.INLINES = exports.BLOCKS = void 0;
34345
34339
  var blocks_1 = blocks;
@@ -34347,12 +34341,12 @@ helpers.isText = isText;
34347
34341
  var inlines_1 = inlines;
34348
34342
  Object.defineProperty(exports, "INLINES", { enumerable: true, get: function () { return inlines_1.INLINES; } });
34349
34343
  var marks_1 = marks;
34350
- Object.defineProperty(exports, "MARKS", { enumerable: true, get: function () { return __importDefault(marks_1).default; } });
34344
+ Object.defineProperty(exports, "MARKS", { enumerable: true, get: function () { return marks_1.MARKS; } });
34351
34345
  __exportStar(schemaConstraints, exports);
34352
34346
  __exportStar(types, exports);
34353
34347
  __exportStar(nodeTypes, exports);
34354
34348
  var emptyDocument_1 = emptyDocument;
34355
- Object.defineProperty(exports, "EMPTY_DOCUMENT", { enumerable: true, get: function () { return __importDefault(emptyDocument_1).default; } });
34349
+ Object.defineProperty(exports, "EMPTY_DOCUMENT", { enumerable: true, get: function () { return emptyDocument_1.EMPTY_DOCUMENT; } });
34356
34350
  var helpers$1 = __importStar(helpers);
34357
34351
  exports.helpers = helpers$1;
34358
34352
 
@@ -34414,11 +34408,13 @@ const CONTENTFUL_COMPONENTS$1 = {
34414
34408
  },
34415
34409
  };
34416
34410
  const EMPTY_CONTAINER_HEIGHT$1 = '80px';
34411
+ const DEFAULT_IMAGE_WIDTH = '500px';
34417
34412
  var PostMessageMethods$2;
34418
34413
  (function (PostMessageMethods) {
34419
34414
  PostMessageMethods["REQUEST_ENTITIES"] = "REQUEST_ENTITIES";
34420
34415
  PostMessageMethods["REQUESTED_ENTITIES"] = "REQUESTED_ENTITIES";
34421
34416
  })(PostMessageMethods$2 || (PostMessageMethods$2 = {}));
34417
+ const SUPPORTED_IMAGE_FORMATS = ['jpg', 'png', 'webp', 'gif', 'avif'];
34422
34418
 
34423
34419
  const structureComponents = new Set([
34424
34420
  CONTENTFUL_COMPONENTS$1.section.id,
@@ -34569,24 +34565,18 @@ const transformAlignment = (cfHorizontalAlignment, cfVerticalAlignment, cfFlexDi
34569
34565
  ? `safe ${cfHorizontalAlignment}`
34570
34566
  : cfHorizontalAlignment,
34571
34567
  };
34572
- const transformBackgroundImage = (cfBackgroundImageUrl, cfBackgroundImageScaling, cfBackgroundImageAlignment) => {
34573
- const matchBackgroundSize = (backgroundImageScaling) => {
34574
- if ('fill' === backgroundImageScaling)
34568
+ const transformBackgroundImage = (cfBackgroundImageUrl, cfBackgroundImageOptions) => {
34569
+ const matchBackgroundSize = (scaling) => {
34570
+ if ('fill' === scaling)
34575
34571
  return 'cover';
34576
- if ('fit' === backgroundImageScaling)
34572
+ if ('fit' === scaling)
34577
34573
  return 'contain';
34578
- return undefined;
34579
34574
  };
34580
- const matchBackgroundPosition = (cfBackgroundImageAlignment) => {
34581
- if (!cfBackgroundImageAlignment) {
34582
- return undefined;
34583
- }
34584
- if ('string' !== typeof cfBackgroundImageAlignment) {
34585
- return undefined;
34575
+ const matchBackgroundPosition = (alignment) => {
34576
+ if (!alignment || 'string' !== typeof alignment) {
34577
+ return;
34586
34578
  }
34587
- let [horizontalAlignment, verticalAlignment] = cfBackgroundImageAlignment
34588
- .trim()
34589
- .split(/\s+/, 2);
34579
+ let [horizontalAlignment, verticalAlignment] = alignment.trim().split(/\s+/, 2);
34590
34580
  // Special case for handling single values
34591
34581
  // for backwards compatibility with single values 'right','left', 'center', 'top','bottom'
34592
34582
  if (horizontalAlignment && !verticalAlignment) {
@@ -34622,50 +34612,29 @@ const transformBackgroundImage = (cfBackgroundImageUrl, cfBackgroundImageScaling
34622
34612
  return `${horizontalAlignment} ${verticalAlignment}`;
34623
34613
  };
34624
34614
  if (!cfBackgroundImageUrl) {
34625
- return undefined;
34626
- }
34627
- return {
34628
- backgroundImage: `url(${cfBackgroundImageUrl})`,
34629
- backgroundRepeat: cfBackgroundImageScaling === 'tile' ? 'repeat' : 'no-repeat',
34630
- backgroundPosition: matchBackgroundPosition(cfBackgroundImageAlignment),
34631
- backgroundSize: matchBackgroundSize(cfBackgroundImageScaling),
34632
- };
34633
- };
34634
- const transformContentValue = (value, variableDefinition) => {
34635
- if (variableDefinition.type === 'RichText') {
34636
- return transformRichText(value);
34615
+ return;
34637
34616
  }
34638
- return value;
34639
- };
34640
- const transformRichText = (value) => {
34641
- if (typeof value === 'string') {
34642
- return {
34643
- data: {},
34644
- content: [
34645
- {
34646
- nodeType: dist.BLOCKS.PARAGRAPH,
34647
- data: {},
34648
- content: [
34649
- {
34650
- data: {},
34651
- nodeType: 'text',
34652
- value: value,
34653
- marks: [],
34654
- },
34655
- ],
34656
- },
34657
- ],
34658
- nodeType: dist.BLOCKS.DOCUMENT,
34659
- };
34617
+ let backgroundImage;
34618
+ let backgroundImageSet;
34619
+ if (typeof cfBackgroundImageUrl === 'string') {
34620
+ backgroundImage = `url(${cfBackgroundImageUrl})`;
34660
34621
  }
34661
- if (typeof value === 'object' && value.nodeType === dist.BLOCKS.DOCUMENT) {
34662
- return value;
34622
+ else {
34623
+ const imgSet = cfBackgroundImageUrl.srcSet?.join(',');
34624
+ backgroundImage = `url(${cfBackgroundImageUrl.url})`;
34625
+ backgroundImageSet = `image-set(${imgSet})`;
34663
34626
  }
34664
- return undefined;
34627
+ return {
34628
+ backgroundImage,
34629
+ backgroundImage2: backgroundImageSet,
34630
+ backgroundRepeat: cfBackgroundImageOptions?.scaling === 'tile' ? 'repeat' : 'no-repeat',
34631
+ backgroundPosition: matchBackgroundPosition(cfBackgroundImageOptions?.alignment),
34632
+ backgroundSize: matchBackgroundSize(cfBackgroundImageOptions?.scaling),
34633
+ };
34665
34634
  };
34666
34635
  const transformWidthSizing = ({ value, cfMargin, }) => {
34667
34636
  if (!value || !cfMargin)
34668
- return undefined;
34637
+ return;
34669
34638
  const transformedValue = transformFill(value);
34670
34639
  const marginValues = cfMargin.split(' ');
34671
34640
  const rightMargin = marginValues[1] || '0px';
@@ -34683,7 +34652,12 @@ const transformWidthSizing = ({ value, cfMargin, }) => {
34683
34652
  return transformedValue;
34684
34653
  };
34685
34654
 
34686
- const toCSSAttribute = (key) => key.replace(/[A-Z]/g, (m) => '-' + m.toLowerCase());
34655
+ const toCSSAttribute = (key) => {
34656
+ let val = key.replace(/[A-Z]/g, (m) => '-' + m.toLowerCase());
34657
+ // Remove the number from the end of the key to allow for overrides on style properties
34658
+ val = val.replace(/\d+$/, '');
34659
+ return val;
34660
+ };
34687
34661
  const buildStyleTag = ({ styles, nodeId }) => {
34688
34662
  const stylesStr = Object.entries(styles)
34689
34663
  .filter(([, value]) => value !== undefined)
@@ -34693,13 +34667,13 @@ const buildStyleTag = ({ styles, nodeId }) => {
34693
34667
  const styleRule = `.${className}{ ${stylesStr} }`;
34694
34668
  return [className, styleRule];
34695
34669
  };
34696
- const buildCfStyles = ({ cfHorizontalAlignment, cfVerticalAlignment, cfFlexDirection, cfFlexWrap, cfMargin, cfPadding, cfBackgroundColor, cfWidth, cfHeight, cfMaxWidth, cfBorder, cfGap, cfBackgroundImageUrl, cfBackgroundImageAlignment, cfBackgroundImageScaling, cfFontSize, cfFontWeight, cfLineHeight, cfLetterSpacing, cfTextColor, cfTextAlign, cfTextTransform, cfTextBold, cfTextItalic, cfTextUnderline, cfColumnSpan, }) => {
34670
+ const buildCfStyles = ({ cfHorizontalAlignment, cfVerticalAlignment, cfFlexDirection, cfFlexWrap, cfMargin, cfPadding, cfBackgroundColor, cfWidth, cfHeight, cfMaxWidth, cfBorder, cfGap, cfBackgroundImageUrl, cfBackgroundImageOptions, cfFontSize, cfFontWeight, cfImageOptions, cfLineHeight, cfLetterSpacing, cfTextColor, cfTextAlign, cfTextTransform, cfTextBold, cfTextItalic, cfTextUnderline, cfColumnSpan, }) => {
34697
34671
  return {
34698
34672
  margin: cfMargin,
34699
34673
  padding: cfPadding,
34700
34674
  backgroundColor: cfBackgroundColor,
34701
- width: transformWidthSizing({ value: cfWidth, cfMargin }),
34702
- height: transformFill(cfHeight),
34675
+ width: transformWidthSizing({ value: cfWidth || cfImageOptions?.width, cfMargin }),
34676
+ height: transformFill(cfHeight || cfImageOptions?.height),
34703
34677
  maxWidth: cfMaxWidth,
34704
34678
  ...transformGridColumn(cfColumnSpan),
34705
34679
  ...transformBorderStyle(cfBorder),
@@ -34707,7 +34681,7 @@ const buildCfStyles = ({ cfHorizontalAlignment, cfVerticalAlignment, cfFlexDirec
34707
34681
  ...transformAlignment(cfHorizontalAlignment, cfVerticalAlignment, cfFlexDirection),
34708
34682
  flexDirection: cfFlexDirection,
34709
34683
  flexWrap: cfFlexWrap,
34710
- ...transformBackgroundImage(cfBackgroundImageUrl, cfBackgroundImageScaling, cfBackgroundImageAlignment),
34684
+ ...transformBackgroundImage(cfBackgroundImageUrl, cfBackgroundImageOptions),
34711
34685
  fontSize: cfFontSize,
34712
34686
  fontWeight: cfTextBold ? 'bold' : cfFontWeight,
34713
34687
  fontStyle: cfTextItalic ? 'italic' : 'normal',
@@ -34718,10 +34692,12 @@ const buildCfStyles = ({ cfHorizontalAlignment, cfVerticalAlignment, cfFlexDirec
34718
34692
  textTransform: cfTextTransform,
34719
34693
  textDecoration: cfTextUnderline ? 'underline' : 'none',
34720
34694
  boxSizing: 'border-box',
34695
+ objectFit: cfImageOptions?.objectFit,
34696
+ objectPosition: cfImageOptions?.objectPosition,
34721
34697
  };
34722
34698
  };
34723
34699
  /**
34724
- * Container/section default behaviour:
34700
+ * Container/section default behavior:
34725
34701
  * Default height => height: EMPTY_CONTAINER_HEIGHT (120px)
34726
34702
  * If a container component has children => height: 'fit-content'
34727
34703
  */
@@ -34735,6 +34711,206 @@ const calculateNodeDefaultHeight = ({ blockId, children, value, }) => {
34735
34711
  return EMPTY_CONTAINER_HEIGHT$1;
34736
34712
  };
34737
34713
 
34714
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
34715
+ function get$1(obj, path) {
34716
+ if (!path.length) {
34717
+ return obj;
34718
+ }
34719
+ try {
34720
+ const [currentPath, ...nextPath] = path;
34721
+ return get$1(obj[currentPath], nextPath);
34722
+ }
34723
+ catch (err) {
34724
+ return undefined;
34725
+ }
34726
+ }
34727
+
34728
+ const getBoundValue = (entryOrAsset, path) => {
34729
+ const value = get$1(entryOrAsset, path.split('/').slice(2, -1));
34730
+ return value && typeof value == 'object' && value.url
34731
+ ? value.url
34732
+ : value;
34733
+ };
34734
+
34735
+ const transformRichText = (entryOrAsset, path) => {
34736
+ const value = getBoundValue(entryOrAsset, path);
34737
+ if (typeof value === 'string') {
34738
+ return {
34739
+ data: {},
34740
+ content: [
34741
+ {
34742
+ nodeType: dist.BLOCKS.PARAGRAPH,
34743
+ data: {},
34744
+ content: [
34745
+ {
34746
+ data: {},
34747
+ nodeType: 'text',
34748
+ value: value,
34749
+ marks: [],
34750
+ },
34751
+ ],
34752
+ },
34753
+ ],
34754
+ nodeType: dist.BLOCKS.DOCUMENT,
34755
+ };
34756
+ }
34757
+ if (typeof value === 'object' && value.nodeType === dist.BLOCKS.DOCUMENT) {
34758
+ return value;
34759
+ }
34760
+ return undefined;
34761
+ };
34762
+
34763
+ function getOptimizedImageUrl(url, width, quality, format) {
34764
+ const params = new URLSearchParams();
34765
+ if (width) {
34766
+ params.append('w', width.toString());
34767
+ }
34768
+ if (quality && quality > 0 && quality < 100) {
34769
+ params.append('q', quality.toString());
34770
+ }
34771
+ if (format) {
34772
+ params.append('fm', format);
34773
+ }
34774
+ const queryString = params.toString();
34775
+ return `${url}${queryString ? '?' + queryString : ''}`;
34776
+ }
34777
+
34778
+ const MAX_WIDTH_ALLOWED$1 = 2000;
34779
+ const getOptimizedBackgroundImageAsset = (file, widthStyle, quality = 100, format) => {
34780
+ if (!validateParams(file, quality, format)) ;
34781
+ const url = file.url;
34782
+ const { width1x, width2x } = getWidths(widthStyle, file);
34783
+ const imageUrl1x = getOptimizedImageUrl(url, width1x, quality, format);
34784
+ const imageUrl2x = getOptimizedImageUrl(url, width2x, quality, format);
34785
+ const srcSet = [`url(${imageUrl1x}) 1x`, `url(${imageUrl2x}) 2x`];
34786
+ const returnedUrlImageUrl = getOptimizedImageUrl(url, width2x, quality, format);
34787
+ const optimizedBackgroundImageAsset = {
34788
+ url: returnedUrlImageUrl,
34789
+ srcSet,
34790
+ file,
34791
+ };
34792
+ return optimizedBackgroundImageAsset;
34793
+ function validateParams(file, quality, format) {
34794
+ if (!file.details.image) {
34795
+ throw Error('No image in file asset to transform');
34796
+ }
34797
+ if (quality < 0 || quality > 100) {
34798
+ throw Error('Quality must be between 0 and 100');
34799
+ }
34800
+ if (format && !SUPPORTED_IMAGE_FORMATS.includes(format)) {
34801
+ throw Error(`Format must be one of ${SUPPORTED_IMAGE_FORMATS.join(', ')}`);
34802
+ }
34803
+ return true;
34804
+ }
34805
+ };
34806
+ function getWidths(widthStyle, file) {
34807
+ let width1x = 0;
34808
+ let width2x = 0;
34809
+ const intrinsicImageWidth = file.details.image.width;
34810
+ if (widthStyle.endsWith('px')) {
34811
+ width1x = Math.min(Number(widthStyle.replace('px', '')), intrinsicImageWidth);
34812
+ }
34813
+ else {
34814
+ width1x = Math.min(MAX_WIDTH_ALLOWED$1, intrinsicImageWidth);
34815
+ }
34816
+ width2x = Math.min(width1x * 2, intrinsicImageWidth);
34817
+ return { width1x, width2x };
34818
+ }
34819
+
34820
+ const MAX_WIDTH_ALLOWED = 4000;
34821
+ const getOptimizedImageAsset = (file, sizes, quality = 100, format) => {
34822
+ if (!validateParams(file, quality, format)) ;
34823
+ const url = file.url;
34824
+ const maxWidth = Math.min(file.details.image.width, MAX_WIDTH_ALLOWED);
34825
+ const numOfParts = Math.max(2, Math.ceil(maxWidth / 500));
34826
+ const widthParts = Array.from({ length: numOfParts }, (_, index) => Math.ceil((index + 1) * (maxWidth / numOfParts)));
34827
+ const srcSet = sizes
34828
+ ? widthParts.map((width) => `${getOptimizedImageUrl(url, width, quality, format)} ${width}w`)
34829
+ : [];
34830
+ const intrinsicImageWidth = file.details.image.width;
34831
+ if (intrinsicImageWidth > MAX_WIDTH_ALLOWED) {
34832
+ srcSet.push(`${getOptimizedImageUrl(url, undefined, quality, format)} ${intrinsicImageWidth}w`);
34833
+ }
34834
+ const returnedUrl = getOptimizedImageUrl(url, file.details.image.width > 2000 ? 2000 : undefined, quality, format);
34835
+ const optimizedImageAsset = {
34836
+ url: returnedUrl,
34837
+ srcSet,
34838
+ sizes,
34839
+ file,
34840
+ };
34841
+ return optimizedImageAsset;
34842
+ function validateParams(file, quality, format) {
34843
+ if (!file.details.image) {
34844
+ throw Error('No image in file asset to transform');
34845
+ }
34846
+ if (quality < 0 || quality > 100) {
34847
+ throw Error('Quality must be between 0 and 100');
34848
+ }
34849
+ if (format && !SUPPORTED_IMAGE_FORMATS.includes(format)) {
34850
+ throw Error(`Format must be one of ${SUPPORTED_IMAGE_FORMATS.join(', ')}`);
34851
+ }
34852
+ return true;
34853
+ }
34854
+ };
34855
+
34856
+ const transformMedia = (asset, variables, resolveDesignValue, variableName, path) => {
34857
+ let value;
34858
+ //TODO: this will be better served by injectable type transformers instead of if statement
34859
+ if (variableName === 'cfImageAsset') {
34860
+ const optionsVariableName = 'cfImageOptions';
34861
+ const options = resolveDesignValue(variables[optionsVariableName]?.type === 'DesignValue'
34862
+ ? variables[optionsVariableName].valuesByBreakpoint
34863
+ : {}, optionsVariableName);
34864
+ if (!options) {
34865
+ console.error(`Error transforming image asset: Required variable [${optionsVariableName}] missing from component definition`);
34866
+ return;
34867
+ }
34868
+ try {
34869
+ value = getOptimizedImageAsset(asset.fields.file, options.targetSize, Number(options.quality), options.format);
34870
+ return value;
34871
+ }
34872
+ catch (error) {
34873
+ console.error('Error transforming image asset', error);
34874
+ }
34875
+ return;
34876
+ }
34877
+ if (variableName === 'cfBackgroundImageUrl') {
34878
+ const width = resolveDesignValue(variables['cfWidth']?.type === 'DesignValue' ? variables['cfWidth'].valuesByBreakpoint : {}, 'cfWidth');
34879
+ const optionsVariableName = 'cfBackgroundImageOptions';
34880
+ const options = resolveDesignValue(variables[optionsVariableName]?.type === 'DesignValue'
34881
+ ? variables[optionsVariableName].valuesByBreakpoint
34882
+ : {}, optionsVariableName);
34883
+ if (!options) {
34884
+ console.error(`Error transforming image asset: Required variable [${optionsVariableName}] missing from component definition`);
34885
+ return;
34886
+ }
34887
+ try {
34888
+ value = getOptimizedBackgroundImageAsset(asset.fields.file, width, Number(options.quality), options.format);
34889
+ return value;
34890
+ }
34891
+ catch (error) {
34892
+ console.error('Error transforming image asset', error);
34893
+ }
34894
+ return;
34895
+ }
34896
+ // return getBoundValue(asset, entityStore, binding, path);
34897
+ return getBoundValue(asset, path);
34898
+ };
34899
+
34900
+ const transformBoundContentValue = (variables, entityStore, binding, resolveDesignValue, variableName, variableDefinition, path) => {
34901
+ const entityOrAsset = entityStore.getEntryOrAsset(binding, path);
34902
+ if (!entityOrAsset)
34903
+ return;
34904
+ switch (variableDefinition.type) {
34905
+ case 'Media':
34906
+ return transformMedia(entityOrAsset, variables, resolveDesignValue, variableName, path);
34907
+ case 'RichText':
34908
+ return transformRichText(entityOrAsset, path);
34909
+ default:
34910
+ return getBoundValue(entityOrAsset, path);
34911
+ }
34912
+ };
34913
+
34738
34914
  const getDataFromTree = (tree) => {
34739
34915
  let dataSource = {};
34740
34916
  let unboundValues = {};
@@ -34873,42 +35049,6 @@ const builtInStyles = {
34873
35049
  description: 'The spacing between the elements of the section',
34874
35050
  defaultValue: '0px',
34875
35051
  },
34876
- cfBackgroundImageUrl: {
34877
- displayName: 'Background image',
34878
- type: 'Text',
34879
- defaultValue: '',
34880
- description: 'Background image for section or container',
34881
- },
34882
- cfBackgroundImageScaling: {
34883
- displayName: 'Image scaling',
34884
- type: 'Text',
34885
- group: 'style',
34886
- description: 'Adjust background image to fit, fill or tile the container',
34887
- defaultValue: 'fit',
34888
- validations: {
34889
- in: [
34890
- {
34891
- value: 'fill',
34892
- displayName: 'Fill',
34893
- },
34894
- {
34895
- value: 'fit',
34896
- displayName: 'Fit',
34897
- },
34898
- {
34899
- value: 'tile',
34900
- displayName: 'Tile',
34901
- },
34902
- ],
34903
- },
34904
- },
34905
- cfBackgroundImageAlignment: {
34906
- displayName: 'Image alignment',
34907
- type: 'Text',
34908
- group: 'style',
34909
- description: 'Align background image to the edges of the container',
34910
- defaultValue: 'left top',
34911
- },
34912
35052
  cfHyperlink: {
34913
35053
  displayName: 'Hyperlink',
34914
35054
  type: 'Text',
@@ -34956,6 +35096,40 @@ const optionalBuiltInStyles = {
34956
35096
  description: 'The font weight of the element',
34957
35097
  defaultValue: '400',
34958
35098
  },
35099
+ cfImageAsset: {
35100
+ displayName: 'Image',
35101
+ type: 'Media',
35102
+ description: 'Image to display',
35103
+ },
35104
+ cfImageOptions: {
35105
+ displayName: 'Image options',
35106
+ type: 'Object',
35107
+ group: 'style',
35108
+ defaultValue: {
35109
+ width: DEFAULT_IMAGE_WIDTH,
35110
+ height: '100%',
35111
+ objectFit: 'none',
35112
+ objectPosition: 'center center',
35113
+ quality: '100',
35114
+ targetSize: DEFAULT_IMAGE_WIDTH,
35115
+ },
35116
+ },
35117
+ cfBackgroundImageUrl: {
35118
+ displayName: 'Background image',
35119
+ type: 'Media',
35120
+ description: 'Background image for component',
35121
+ },
35122
+ cfBackgroundImageOptions: {
35123
+ displayName: 'Background image options',
35124
+ type: 'Object',
35125
+ group: 'style',
35126
+ defaultValue: {
35127
+ scaling: 'fill',
35128
+ alignment: 'left top',
35129
+ quality: '100',
35130
+ targetSize: '2000px',
35131
+ },
35132
+ },
34959
35133
  cfLineHeight: {
34960
35134
  displayName: 'Line Height',
34961
35135
  type: 'Text',
@@ -35338,29 +35512,9 @@ const sendMessage = (eventType, data) => {
35338
35512
  }, '*');
35339
35513
  };
35340
35514
 
35341
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
35342
- function get$1(obj, path) {
35343
- if (!path.length) {
35344
- return obj;
35345
- }
35346
- try {
35347
- const [currentPath, ...nextPath] = path;
35348
- return get$1(obj[currentPath], nextPath);
35349
- }
35350
- catch (err) {
35351
- return undefined;
35352
- }
35353
- }
35354
-
35355
- function transformAssetFileToUrl(fieldValue) {
35356
- return fieldValue && typeof fieldValue == 'object' && fieldValue.url
35357
- ? fieldValue.url
35358
- : fieldValue;
35359
- }
35360
-
35361
35515
  /**
35362
35516
  * Base Store for entities
35363
- * Can be extened for the different loading behaviours (editor, production, ..)
35517
+ * Can be extended for the different loading behaviours (editor, production, ..)
35364
35518
  */
35365
35519
  class EntityStoreBase {
35366
35520
  constructor({ entities, locale }) {
@@ -35377,68 +35531,26 @@ class EntityStoreBase {
35377
35531
  updateEntity(entity) {
35378
35532
  this.addEntity(entity);
35379
35533
  }
35380
- getValueDeep(headLinkOrEntity, deepPath) {
35381
- const resolveFieldset = (unresolvedFieldset, headEntity) => {
35382
- const resolvedFieldset = [];
35383
- let entityToResolveFieldsFrom = headEntity;
35384
- for (let i = 0; i < unresolvedFieldset.length; i++) {
35385
- const isLeaf = i === unresolvedFieldset.length - 1; // with last row, we are not expecting a link, but a value
35386
- const row = unresolvedFieldset[i];
35387
- const [, field, _localeQualifier] = row;
35388
- if (!entityToResolveFieldsFrom) {
35389
- throw new Error(`Logic Error: Cannot resolve field ${field} of a fieldset as there is no entity to resolve it from.`);
35390
- }
35391
- if (isLeaf) {
35392
- resolvedFieldset.push([entityToResolveFieldsFrom, field, _localeQualifier]);
35393
- break;
35394
- }
35395
- const fieldValue = get$1(entityToResolveFieldsFrom, ['fields', field]);
35396
- if (undefined === fieldValue) {
35397
- return {
35398
- resolvedFieldset,
35399
- isFullyResolved: false,
35400
- reason: `Cannot resolve field Link<${entityToResolveFieldsFrom.sys.type}>(sys.id=${entityToResolveFieldsFrom.sys.id}).fields[${field}] as field value is not defined`,
35401
- };
35402
- }
35403
- else if (isLink(fieldValue)) {
35404
- const entity = this.getEntityFromLink(fieldValue);
35405
- if (entity === undefined) {
35406
- throw new Error(`Logic Error: Broken Precondition [by the time resolution of deep path happens all referents should be in EntityStore]: Cannot resolve field ${field} of a fieldset row [${JSON.stringify(row)}] as linked entity not found in the EntityStore. ${JSON.stringify({
35407
- link: fieldValue,
35408
- })}`);
35409
- }
35410
- resolvedFieldset.push([entityToResolveFieldsFrom, field, _localeQualifier]);
35411
- entityToResolveFieldsFrom = entity; // we move up
35412
- }
35413
- else {
35414
- // TODO: Eg. when someone changed the schema and the field is not a link anymore, what should we return then?
35415
- throw new Error(`LogicError: Invalid value of a field we consider a reference field. Cannot resolve field ${field} of a fieldset as it is not a link, neither undefined.`);
35416
- }
35534
+ getEntryOrAsset(linkOrEntryOrAsset, path) {
35535
+ if (isDeepPath(path)) {
35536
+ return this.getDeepEntry(linkOrEntryOrAsset, path);
35537
+ }
35538
+ let entity;
35539
+ if (isLink(linkOrEntryOrAsset)) {
35540
+ const resolvedEntity = linkOrEntryOrAsset.sys.linkType === 'Entry'
35541
+ ? this.entryMap.get(linkOrEntryOrAsset.sys.id)
35542
+ : this.assetMap.get(linkOrEntryOrAsset.sys.id);
35543
+ if (!resolvedEntity || resolvedEntity.sys.type !== linkOrEntryOrAsset.sys.linkType) {
35544
+ console.warn(`Experience references unresolved entity: ${JSON.stringify(linkOrEntryOrAsset)}`);
35545
+ return;
35417
35546
  }
35418
- return {
35419
- resolvedFieldset,
35420
- isFullyResolved: true,
35421
- };
35422
- };
35423
- const headEntity = isLink(headLinkOrEntity)
35424
- ? this.getEntityFromLink(headLinkOrEntity)
35425
- : headLinkOrEntity;
35426
- if (undefined === headEntity) {
35427
- return;
35547
+ entity = resolvedEntity;
35428
35548
  }
35429
- const unresolvedFieldset = parseDataSourcePathIntoFieldset(deepPath);
35430
- // The purpose here is to take this intermediate representation of the deep-path
35431
- // and to follow the links to the leaf-entity and field
35432
- // in case we can't follow till the end, we should signal that there was null-reference in the path
35433
- const { resolvedFieldset, isFullyResolved, reason } = resolveFieldset(unresolvedFieldset, headEntity);
35434
- if (!isFullyResolved) {
35435
- reason &&
35436
- console.debug(`[experiences-sdk-react::EntityStoreBased::getValueDeep()] Deep path wasn't resolved till leaf node, falling back to undefined, because: ${reason}`);
35437
- return undefined;
35549
+ else {
35550
+ // We already have the complete entity in preview & delivery (resolved by the CMA client)
35551
+ entity = linkOrEntryOrAsset;
35438
35552
  }
35439
- const [leafEntity, field /* localeQualifier */] = resolvedFieldset[resolvedFieldset.length - 1];
35440
- const fieldValue = get$1(leafEntity, ['fields', field]); // is allowed to be undefined (when non-required field not set; or even when field does NOT exist on the type)
35441
- return transformAssetFileToUrl(fieldValue);
35553
+ return entity;
35442
35554
  }
35443
35555
  /**
35444
35556
  * @deprecated in the base class this should be simply an abstract method
@@ -35495,7 +35607,7 @@ class EntityStoreBase {
35495
35607
  if (missing.length) {
35496
35608
  // TODO: move to `debug` utils once it is extracted
35497
35609
  console.warn(`Asset "${id}" is not in the store`);
35498
- return undefined;
35610
+ return;
35499
35611
  }
35500
35612
  return resolved[0];
35501
35613
  }
@@ -35511,7 +35623,7 @@ class EntityStoreBase {
35511
35623
  if (missing.length) {
35512
35624
  // TODO: move to `debug` utils once it is extracted
35513
35625
  console.warn(`Entry "${id}" is not in the store`);
35514
- return undefined;
35626
+ return;
35515
35627
  }
35516
35628
  return resolved[0];
35517
35629
  }
@@ -35522,6 +35634,70 @@ class EntityStoreBase {
35522
35634
  }
35523
35635
  return resolved;
35524
35636
  }
35637
+ getDeepEntry(linkOrEntryOrAsset, path) {
35638
+ const resolveFieldset = (unresolvedFieldset, headEntry) => {
35639
+ const resolvedFieldset = [];
35640
+ let entityToResolveFieldsFrom = headEntry;
35641
+ for (let i = 0; i < unresolvedFieldset.length; i++) {
35642
+ const isLeaf = i === unresolvedFieldset.length - 1; // with last row, we are not expecting a link, but a value
35643
+ const row = unresolvedFieldset[i];
35644
+ const [, field, _localeQualifier] = row;
35645
+ if (!entityToResolveFieldsFrom) {
35646
+ throw new Error(`Logic Error: Cannot resolve field ${field} of a fieldset as there is no entity to resolve it from.`);
35647
+ }
35648
+ if (isLeaf) {
35649
+ resolvedFieldset.push([entityToResolveFieldsFrom, field, _localeQualifier]);
35650
+ break;
35651
+ }
35652
+ const fieldValue = get$1(entityToResolveFieldsFrom, ['fields', field]);
35653
+ if (undefined === fieldValue) {
35654
+ return {
35655
+ resolvedFieldset,
35656
+ isFullyResolved: false,
35657
+ reason: `Cannot resolve field Link<${entityToResolveFieldsFrom.sys.type}>(sys.id=${entityToResolveFieldsFrom.sys.id}).fields[${field}] as field value is not defined`,
35658
+ };
35659
+ }
35660
+ else if (isLink(fieldValue)) {
35661
+ const entity = this.getEntityFromLink(fieldValue);
35662
+ if (entity === undefined) {
35663
+ return {
35664
+ resolvedFieldset,
35665
+ isFullyResolved: false,
35666
+ reason: `Field reference Link (sys.id=${fieldValue.sys.id}) not found in the EntityStore, waiting...`,
35667
+ };
35668
+ }
35669
+ resolvedFieldset.push([entityToResolveFieldsFrom, field, _localeQualifier]);
35670
+ entityToResolveFieldsFrom = entity; // we move up
35671
+ }
35672
+ else {
35673
+ // TODO: Eg. when someone changed the schema and the field is not a link anymore, what should we return then?
35674
+ throw new Error(`LogicError: Invalid value of a field we consider a reference field. Cannot resolve field ${field} of a fieldset as it is not a link, neither undefined.`);
35675
+ }
35676
+ }
35677
+ return {
35678
+ resolvedFieldset,
35679
+ isFullyResolved: true,
35680
+ };
35681
+ };
35682
+ const headEntity = isLink(linkOrEntryOrAsset)
35683
+ ? this.getEntityFromLink(linkOrEntryOrAsset)
35684
+ : linkOrEntryOrAsset;
35685
+ if (undefined === headEntity) {
35686
+ return;
35687
+ }
35688
+ const unresolvedFieldset = parseDataSourcePathIntoFieldset(path);
35689
+ // The purpose here is to take this intermediate representation of the deep-path
35690
+ // and to follow the links to the leaf-entity and field
35691
+ // in case we can't follow till the end, we should signal that there was null-reference in the path
35692
+ const { resolvedFieldset, isFullyResolved, reason } = resolveFieldset(unresolvedFieldset, headEntity);
35693
+ if (!isFullyResolved) {
35694
+ reason &&
35695
+ console.debug(`[exp-builder.sdk::EntityStoreBased::getValueDeep()] Deep path wasn't resolved till leaf node, falling back to undefined, because: ${reason}`);
35696
+ return;
35697
+ }
35698
+ const [leafEntity] = resolvedFieldset[resolvedFieldset.length - 1];
35699
+ return leafEntity;
35700
+ }
35525
35701
  isAsset(entity) {
35526
35702
  return entity.sys.type === 'Asset';
35527
35703
  }
@@ -35700,11 +35876,16 @@ class EditorModeEntityStore extends EditorEntityStore {
35700
35876
  const { missing: missingAssetIds } = this.getEntitiesFromMap('Asset', uniqueAssetIds);
35701
35877
  return { missingEntryIds, missingAssetIds };
35702
35878
  }
35703
- getValue(entityLink, path) {
35704
- if (!entityLink || !entityLink.sys)
35879
+ getValue(entityLinkOrEntity, path) {
35880
+ const entity = this.getEntryOrAsset(entityLinkOrEntity, path.join('/'));
35881
+ if (!entity) {
35705
35882
  return;
35706
- const fieldValue = super.getValue(entityLink, path);
35707
- return transformAssetFileToUrl(fieldValue);
35883
+ }
35884
+ const fieldValue = get$1(entity, path);
35885
+ // walk around to render asset files
35886
+ return fieldValue && typeof fieldValue == 'object' && fieldValue.url
35887
+ ? fieldValue.url
35888
+ : fieldValue;
35708
35889
  }
35709
35890
  }
35710
35891
 
@@ -36610,13 +36791,21 @@ function requireUseSyncExternalStoreShim_development () {
36610
36791
  return useSyncExternalStoreShim_development;
36611
36792
  }
36612
36793
 
36613
- if (process.env.NODE_ENV === 'production') {
36614
- shim.exports = requireUseSyncExternalStoreShim_production_min();
36615
- } else {
36616
- shim.exports = requireUseSyncExternalStoreShim_development();
36794
+ var hasRequiredShim;
36795
+
36796
+ function requireShim () {
36797
+ if (hasRequiredShim) return shim.exports;
36798
+ hasRequiredShim = 1;
36799
+
36800
+ if (process.env.NODE_ENV === 'production') {
36801
+ shim.exports = requireUseSyncExternalStoreShim_production_min();
36802
+ } else {
36803
+ shim.exports = requireUseSyncExternalStoreShim_development();
36804
+ }
36805
+ return shim.exports;
36617
36806
  }
36618
36807
 
36619
- var shimExports = shim.exports;
36808
+ var shimExports = requireShim();
36620
36809
 
36621
36810
  var withSelector = {exports: {}};
36622
36811
 
@@ -36627,7 +36816,7 @@ var hasRequiredWithSelector_production_min;
36627
36816
  function requireWithSelector_production_min () {
36628
36817
  if (hasRequiredWithSelector_production_min) return withSelector_production_min;
36629
36818
  hasRequiredWithSelector_production_min = 1;
36630
- var h=reactExports,n=shimExports;function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q="function"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;
36819
+ var h=reactExports,n=requireShim();function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q="function"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;
36631
36820
  withSelector_production_min.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f;}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return [function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);
36632
36821
  u(function(){f.hasValue=!0;f.value=d;},[d]);w(d);return d};
36633
36822
  return withSelector_production_min;
@@ -36653,7 +36842,7 @@ function requireWithSelector_development () {
36653
36842
  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
36654
36843
  }
36655
36844
  var React = reactExports;
36656
- var shim = shimExports;
36845
+ var shim = requireShim();
36657
36846
 
36658
36847
  /**
36659
36848
  * inlined Object.is polyfill to avoid requiring consumers ship their own
@@ -37137,7 +37326,7 @@ function getStatics(component) {
37137
37326
  return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
37138
37327
  }
37139
37328
 
37140
- var defineProperty$1 = Object.defineProperty;
37329
+ var defineProperty$2 = Object.defineProperty;
37141
37330
  var getOwnPropertyNames = Object.getOwnPropertyNames;
37142
37331
  var getOwnPropertySymbols = Object.getOwnPropertySymbols;
37143
37332
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
@@ -37171,7 +37360,7 @@ function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
37171
37360
 
37172
37361
  try {
37173
37362
  // Avoid failures from read-only properties
37174
- defineProperty$1(targetComponent, key, descriptor);
37363
+ defineProperty$2(targetComponent, key, descriptor);
37175
37364
  } catch (e) {}
37176
37365
  }
37177
37366
  }
@@ -38627,6 +38816,8 @@ var rafSchd = function rafSchd(fn) {
38627
38816
  return wrapperFn;
38628
38817
  };
38629
38818
 
38819
+ var rafSchd$1 = rafSchd;
38820
+
38630
38821
  const isProduction$1 = process.env.NODE_ENV === 'production';
38631
38822
  const spacesAndTabs = /[ \t]{2,}/g;
38632
38823
  const lineStartWithSpaces = /^[ \t]*/gm;
@@ -41511,7 +41702,7 @@ function getScrollListener({
41511
41702
  function updateScroll() {
41512
41703
  onWindowScroll(getWindowScroll());
41513
41704
  }
41514
- const scheduled = rafSchd(updateScroll);
41705
+ const scheduled = rafSchd$1(updateScroll);
41515
41706
  const binding = getWindowScrollBinding(scheduled);
41516
41707
  let unbind = noop$2;
41517
41708
  function isActive() {
@@ -42672,8 +42863,8 @@ var createFluidScroller = (({
42672
42863
  scrollDroppable,
42673
42864
  getAutoScrollerOptions = () => defaultAutoScrollerOptions
42674
42865
  }) => {
42675
- const scheduleWindowScroll = rafSchd(scrollWindow);
42676
- const scheduleDroppableScroll = rafSchd(scrollDroppable);
42866
+ const scheduleWindowScroll = rafSchd$1(scrollWindow);
42867
+ const scheduleDroppableScroll = rafSchd$1(scrollDroppable);
42677
42868
  let dragging = null;
42678
42869
  const tryScroll = state => {
42679
42870
  !dragging ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot fluid scroll if not dragging') : invariant(false) : void 0;
@@ -44434,7 +44625,7 @@ function tryStart({
44434
44625
  };
44435
44626
  }
44436
44627
  function fluidLift(clientSelection) {
44437
- const move$1 = rafSchd(client => {
44628
+ const move$1 = rafSchd$1(client => {
44438
44629
  tryDispatchWhenDragging(() => move({
44439
44630
  client
44440
44631
  }));
@@ -45501,7 +45692,7 @@ function useDroppablePublisher(args) {
45501
45692
  const scroll = getClosestScroll();
45502
45693
  memoizedUpdateScroll(scroll.x, scroll.y);
45503
45694
  }, [getClosestScroll, memoizedUpdateScroll]);
45504
- const scheduleScrollUpdate = useMemo(() => rafSchd(updateScroll), [updateScroll]);
45695
+ const scheduleScrollUpdate = useMemo(() => rafSchd$1(updateScroll), [updateScroll]);
45505
45696
  const onClosestScroll = useCallback(() => {
45506
45697
  const dragging = whileDraggingRef.current;
45507
45698
  const closest = getClosestScrollableFromDrag(dragging);
@@ -46168,9 +46359,9 @@ var classnames = {exports: {}};
46168
46359
  var classnamesExports = classnames.exports;
46169
46360
  var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
46170
46361
 
46171
- var css_248z$6 = ".styles-module_DraggableComponent__m5-dA {\n pointer-events: all;\n position: relative;\n transition: outline 0.2s;\n cursor: grab;\n box-sizing: border-box;\n display: flex;\n}\n\n.styles-module_DraggableComponent__m5-dA:before {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n outline-offset: -2px;\n outline: 2px solid transparent;\n z-index: 1;\n pointer-events: none;\n}\n\n.styles-module_DraggableClone__X8zTA:before {\n outline: 2px solid var(--exp-builder-blue500);\n}\n\n.styles-module_DraggableClone__X8zTA,\n.styles-module_DraggableClone__X8zTA * {\n pointer-events: none !important;\n}\n\n.styles-module_DraggableComponent__m5-dA:not(.styles-module_userIsDragging__lqbjG) :not(.styles-module_DraggableComponent__m5-dA) {\n pointer-events: none;\n}\n\n.styles-module_isDragging__WHjPU {\n overflow: hidden;\n}\n\n.styles-module_isSelected__BzICQ:before {\n outline: 2px solid transparent !important;\n}\n\n.styles-module_overlay__r4th9 {\n position: absolute;\n display: flex;\n align-items: center;\n min-width: max-content;\n height: 24px;\n z-index: 1;\n font-family: var(--exp-builder-font-stack-primary);\n font-size: 14px;\n font-weight: 500;\n background-color: var(--exp-builder-gray500);\n color: var(--exp-builder-color-white);\n border-radius: 0 0 2px 0;\n padding: 4px 12px 4px 12px;\n transition: opacity 0.2s;\n opacity: 0;\n text-wrap: nowrap;\n}\n\n.styles-module_overlayContainer__eiX-5 {\n opacity: 0;\n}\n\n.styles-module_overlayAssembly__tOzZU {\n background-color: var(--exp-builder-purple600);\n}\n\n.styles-module_userIsDragging__lqbjG > .styles-module_overlay__r4th9,\n.styles-module_userIsDragging__lqbjG > .styles-module_overlayContainer__eiX-5 {\n opacity: 0 !important;\n}\n\n.styles-module_userIsDragging__lqbjG:before {\n outline: 2px solid transparent !important;\n}\n\n.styles-module_DraggableComponent__m5-dA:hover:not(:has(div[data-rfd-draggable-id]:hover)) > .styles-module_overlay__r4th9 {\n opacity: 1;\n}\n\n.styles-module_DraggableComponent__m5-dA:hover:before,\n.styles-module_DraggableComponent__m5-dA:hover div[data-rfd-draggable-id]:before {\n outline: 2px dashed var(--exp-builder-gray500);\n}\n\n.styles-module_DraggableComponent__m5-dA:hover:not(:has(div[data-rfd-draggable-id]:hover)):before {\n outline: 2px solid var(--exp-builder-gray500);\n}\n\n.styles-module_isAssemblyBlock__Y3Avk:hover:before,\n.styles-module_isAssemblyBlock__Y3Avk:hover div[data-rfd-draggable-id]:before,\n.styles-module_DraggableComponent__m5-dA:hover div[data-rfd-draggable-id][data-cf-node-block-type^='assembly']:before {\n outline: 2px dashed var(--exp-builder-purple600);\n}\n\n.styles-module_isAssemblyBlock__Y3Avk:hover:not(:has(div[data-rfd-draggable-id]:hover)):before {\n outline: 2px solid var(--exp-builder-purple600);\n}\n";
46362
+ var css_248z$7 = ".styles-module_DraggableComponent__m5-dA {\n pointer-events: all;\n position: relative;\n transition: outline 0.2s;\n cursor: grab;\n box-sizing: border-box;\n display: flex;\n}\n\n.styles-module_DraggableComponent__m5-dA:before {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n outline-offset: -2px;\n outline: 2px solid transparent;\n z-index: 1;\n pointer-events: none;\n}\n\n.styles-module_DraggableClone__X8zTA:before {\n outline: 2px solid var(--exp-builder-blue500);\n}\n\n.styles-module_DraggableClone__X8zTA,\n.styles-module_DraggableClone__X8zTA * {\n pointer-events: none !important;\n}\n\n.styles-module_DraggableComponent__m5-dA:not(.styles-module_userIsDragging__lqbjG) :not(.styles-module_DraggableComponent__m5-dA) {\n pointer-events: none;\n}\n\n.styles-module_isDragging__WHjPU {\n overflow: hidden;\n}\n\n.styles-module_isSelected__BzICQ:before {\n outline: 2px solid transparent !important;\n}\n\n.styles-module_overlay__r4th9 {\n position: absolute;\n display: flex;\n align-items: center;\n min-width: max-content;\n height: 24px;\n z-index: 1;\n font-family: var(--exp-builder-font-stack-primary);\n font-size: 14px;\n font-weight: 500;\n background-color: var(--exp-builder-gray500);\n color: var(--exp-builder-color-white);\n border-radius: 0 0 2px 0;\n padding: 4px 12px 4px 12px;\n transition: opacity 0.2s;\n opacity: 0;\n text-wrap: nowrap;\n}\n\n.styles-module_overlayContainer__eiX-5 {\n opacity: 0;\n}\n\n.styles-module_overlayAssembly__tOzZU {\n background-color: var(--exp-builder-purple600);\n}\n\n.styles-module_userIsDragging__lqbjG > .styles-module_overlay__r4th9,\n.styles-module_userIsDragging__lqbjG > .styles-module_overlayContainer__eiX-5 {\n opacity: 0 !important;\n}\n\n.styles-module_userIsDragging__lqbjG:before {\n outline: 2px solid transparent !important;\n}\n\n.styles-module_DraggableComponent__m5-dA:hover:not(:has(div[data-rfd-draggable-id]:hover)) > .styles-module_overlay__r4th9 {\n opacity: 1;\n}\n\n.styles-module_DraggableComponent__m5-dA:hover:before,\n.styles-module_DraggableComponent__m5-dA:hover div[data-rfd-draggable-id]:before {\n outline: 2px dashed var(--exp-builder-gray500);\n}\n\n.styles-module_DraggableComponent__m5-dA:hover:not(:has(div[data-rfd-draggable-id]:hover)):before {\n outline: 2px solid var(--exp-builder-gray500);\n}\n\n.styles-module_isAssemblyBlock__Y3Avk:hover:before,\n.styles-module_isAssemblyBlock__Y3Avk:hover div[data-rfd-draggable-id]:before,\n.styles-module_DraggableComponent__m5-dA:hover div[data-rfd-draggable-id][data-cf-node-block-type^='assembly']:before {\n outline: 2px dashed var(--exp-builder-purple600);\n}\n\n.styles-module_isAssemblyBlock__Y3Avk:hover:not(:has(div[data-rfd-draggable-id]:hover)):before {\n outline: 2px solid var(--exp-builder-purple600);\n}\n";
46172
46363
  var styles$3 = {"DraggableComponent":"styles-module_DraggableComponent__m5-dA","DraggableClone":"styles-module_DraggableClone__X8zTA","userIsDragging":"styles-module_userIsDragging__lqbjG","isDragging":"styles-module_isDragging__WHjPU","isSelected":"styles-module_isSelected__BzICQ","overlay":"styles-module_overlay__r4th9","overlayContainer":"styles-module_overlayContainer__eiX-5","overlayAssembly":"styles-module_overlayAssembly__tOzZU","isAssemblyBlock":"styles-module_isAssemblyBlock__Y3Avk"};
46173
- styleInject(css_248z$6);
46364
+ styleInject(css_248z$7);
46174
46365
 
46175
46366
  const SCROLL_STATES = {
46176
46367
  Start: 'scrollStart',
@@ -46274,13 +46465,14 @@ const CF_STYLE_ATTRIBUTES = [
46274
46465
  'cfWidth',
46275
46466
  'cfMaxWidth',
46276
46467
  'cfHeight',
46468
+ 'cfImageAsset',
46469
+ 'cfImageOptions',
46470
+ 'cfBackgroundImageUrl',
46471
+ 'cfBackgroundImageOptions',
46277
46472
  'cfFlexDirection',
46278
46473
  'cfFlexWrap',
46279
46474
  'cfBorder',
46280
46475
  'cfGap',
46281
- 'cfBackgroundImageUrl',
46282
- 'cfBackgroundImageScaling',
46283
- 'cfBackgroundImageAlignment',
46284
46476
  'cfFontSize',
46285
46477
  'cfFontWeight',
46286
46478
  'cfLineHeight',
@@ -46295,6 +46487,8 @@ const CF_STYLE_ATTRIBUTES = [
46295
46487
  // we need to keep those in this constant array
46296
46488
  // so that omit() in <VisualEditorBlock> and <CompositionBlock>
46297
46489
  // can filter them out and not pass as props
46490
+ 'cfBackgroundImageScaling',
46491
+ 'cfBackgroundImageAlignment',
46298
46492
  'cfBackgroundImageAlignmentVertical',
46299
46493
  'cfBackgroundImageAlignmentHorizontal',
46300
46494
  ];
@@ -46808,14 +47002,20 @@ const createAssemblyRegistration = ({ definitionId, definitionName, component, }
46808
47002
  /** Detect free variable `global` from Node.js. */
46809
47003
  var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
46810
47004
 
47005
+ var freeGlobal$1 = freeGlobal;
47006
+
46811
47007
  /** Detect free variable `self`. */
46812
47008
  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
46813
47009
 
46814
47010
  /** Used as a reference to the global object. */
46815
- var root = freeGlobal || freeSelf || Function('return this')();
47011
+ var root = freeGlobal$1 || freeSelf || Function('return this')();
47012
+
47013
+ var root$1 = root;
46816
47014
 
46817
47015
  /** Built-in value references. */
46818
- var Symbol$1 = root.Symbol;
47016
+ var Symbol$1 = root$1.Symbol;
47017
+
47018
+ var Symbol$2 = Symbol$1;
46819
47019
 
46820
47020
  /** Used for built-in method references. */
46821
47021
  var objectProto$f = Object.prototype;
@@ -46831,7 +47031,7 @@ var hasOwnProperty$c = objectProto$f.hasOwnProperty;
46831
47031
  var nativeObjectToString$1 = objectProto$f.toString;
46832
47032
 
46833
47033
  /** Built-in value references. */
46834
- var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
47034
+ var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
46835
47035
 
46836
47036
  /**
46837
47037
  * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
@@ -46886,7 +47086,7 @@ var nullTag = '[object Null]',
46886
47086
  undefinedTag = '[object Undefined]';
46887
47087
 
46888
47088
  /** Built-in value references. */
46889
- var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
47089
+ var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : undefined;
46890
47090
 
46891
47091
  /**
46892
47092
  * The base implementation of `getTag` without fallbacks for buggy environments.
@@ -47002,11 +47202,13 @@ function arrayMap(array, iteratee) {
47002
47202
  */
47003
47203
  var isArray = Array.isArray;
47004
47204
 
47205
+ var isArray$1 = isArray;
47206
+
47005
47207
  /** Used as references for various `Number` constants. */
47006
47208
  var INFINITY$1 = 1 / 0;
47007
47209
 
47008
47210
  /** Used to convert symbols to primitives and strings. */
47009
- var symbolProto$2 = Symbol$1 ? Symbol$1.prototype : undefined,
47211
+ var symbolProto$2 = Symbol$2 ? Symbol$2.prototype : undefined,
47010
47212
  symbolToString = symbolProto$2 ? symbolProto$2.toString : undefined;
47011
47213
 
47012
47214
  /**
@@ -47022,7 +47224,7 @@ function baseToString(value) {
47022
47224
  if (typeof value == 'string') {
47023
47225
  return value;
47024
47226
  }
47025
- if (isArray(value)) {
47227
+ if (isArray$1(value)) {
47026
47228
  // Recursively convert values (susceptible to call stack limits).
47027
47229
  return arrayMap(value, baseToString) + '';
47028
47230
  }
@@ -47117,11 +47319,13 @@ function isFunction(value) {
47117
47319
  }
47118
47320
 
47119
47321
  /** Used to detect overreaching core-js shims. */
47120
- var coreJsData = root['__core-js_shared__'];
47322
+ var coreJsData = root$1['__core-js_shared__'];
47323
+
47324
+ var coreJsData$1 = coreJsData;
47121
47325
 
47122
47326
  /** Used to detect methods masquerading as native. */
47123
47327
  var maskSrcKey = (function() {
47124
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
47328
+ var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || '');
47125
47329
  return uid ? ('Symbol(src)_1.' + uid) : '';
47126
47330
  }());
47127
47331
 
@@ -47228,7 +47432,9 @@ function getNative(object, key) {
47228
47432
  }
47229
47433
 
47230
47434
  /* Built-in method references that are verified to be native. */
47231
- var WeakMap$1 = getNative(root, 'WeakMap');
47435
+ var WeakMap$1 = getNative(root$1, 'WeakMap');
47436
+
47437
+ var WeakMap$2 = WeakMap$1;
47232
47438
 
47233
47439
  /** Built-in value references. */
47234
47440
  var objectCreate = Object.create;
@@ -47257,6 +47463,8 @@ var baseCreate = (function() {
47257
47463
  };
47258
47464
  }());
47259
47465
 
47466
+ var baseCreate$1 = baseCreate;
47467
+
47260
47468
  /**
47261
47469
  * A faster alternative to `Function#apply`, this function invokes `func`
47262
47470
  * with the `this` binding of `thisArg` and the arguments of `args`.
@@ -47365,6 +47573,8 @@ var defineProperty = (function() {
47365
47573
  } catch (e) {}
47366
47574
  }());
47367
47575
 
47576
+ var defineProperty$1 = defineProperty;
47577
+
47368
47578
  /**
47369
47579
  * The base implementation of `setToString` without support for hot loop shorting.
47370
47580
  *
@@ -47373,8 +47583,8 @@ var defineProperty = (function() {
47373
47583
  * @param {Function} string The `toString` result.
47374
47584
  * @returns {Function} Returns `func`.
47375
47585
  */
47376
- var baseSetToString = !defineProperty ? identity : function(func, string) {
47377
- return defineProperty(func, 'toString', {
47586
+ var baseSetToString = !defineProperty$1 ? identity : function(func, string) {
47587
+ return defineProperty$1(func, 'toString', {
47378
47588
  'configurable': true,
47379
47589
  'enumerable': false,
47380
47590
  'value': constant(string),
@@ -47394,6 +47604,8 @@ var baseSetToString$1 = baseSetToString;
47394
47604
  */
47395
47605
  var setToString = shortOut(baseSetToString$1);
47396
47606
 
47607
+ var setToString$1 = setToString;
47608
+
47397
47609
  /**
47398
47610
  * A specialized version of `_.forEach` for arrays without support for
47399
47611
  * iteratee shorthands.
@@ -47449,8 +47661,8 @@ function isIndex(value, length) {
47449
47661
  * @param {*} value The value to assign.
47450
47662
  */
47451
47663
  function baseAssignValue(object, key, value) {
47452
- if (key == '__proto__' && defineProperty) {
47453
- defineProperty(object, key, {
47664
+ if (key == '__proto__' && defineProperty$1) {
47665
+ defineProperty$1(object, key, {
47454
47666
  'configurable': true,
47455
47667
  'enumerable': true,
47456
47668
  'value': value,
@@ -47735,6 +47947,8 @@ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsAr
47735
47947
  !propertyIsEnumerable$1.call(value, 'callee');
47736
47948
  };
47737
47949
 
47950
+ var isArguments$1 = isArguments;
47951
+
47738
47952
  /**
47739
47953
  * This method returns `false`.
47740
47954
  *
@@ -47762,7 +47976,7 @@ var freeModule$2 = freeExports$2 && typeof module == 'object' && module && !modu
47762
47976
  var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
47763
47977
 
47764
47978
  /** Built-in value references. */
47765
- var Buffer$1 = moduleExports$2 ? root.Buffer : undefined;
47979
+ var Buffer$1 = moduleExports$2 ? root$1.Buffer : undefined;
47766
47980
 
47767
47981
  /* Built-in method references for those with the same name as other `lodash` methods. */
47768
47982
  var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : undefined;
@@ -47786,6 +48000,8 @@ var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : undefined;
47786
48000
  */
47787
48001
  var isBuffer = nativeIsBuffer || stubFalse;
47788
48002
 
48003
+ var isBuffer$1 = isBuffer;
48004
+
47789
48005
  /** `Object#toString` result references. */
47790
48006
  var argsTag$2 = '[object Arguments]',
47791
48007
  arrayTag$2 = '[object Array]',
@@ -47864,7 +48080,7 @@ var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !modu
47864
48080
  var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
47865
48081
 
47866
48082
  /** Detect free variable `process` from Node.js. */
47867
- var freeProcess = moduleExports$1 && freeGlobal.process;
48083
+ var freeProcess = moduleExports$1 && freeGlobal$1.process;
47868
48084
 
47869
48085
  /** Used to access faster Node.js helpers. */
47870
48086
  var nodeUtil = (function() {
@@ -47881,8 +48097,10 @@ var nodeUtil = (function() {
47881
48097
  } catch (e) {}
47882
48098
  }());
47883
48099
 
48100
+ var nodeUtil$1 = nodeUtil;
48101
+
47884
48102
  /* Node.js helper references. */
47885
- var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
48103
+ var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
47886
48104
 
47887
48105
  /**
47888
48106
  * Checks if `value` is classified as a typed array.
@@ -47903,6 +48121,8 @@ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
47903
48121
  */
47904
48122
  var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
47905
48123
 
48124
+ var isTypedArray$1 = isTypedArray;
48125
+
47906
48126
  /** Used for built-in method references. */
47907
48127
  var objectProto$9 = Object.prototype;
47908
48128
 
@@ -47918,10 +48138,10 @@ var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
47918
48138
  * @returns {Array} Returns the array of property names.
47919
48139
  */
47920
48140
  function arrayLikeKeys(value, inherited) {
47921
- var isArr = isArray(value),
47922
- isArg = !isArr && isArguments(value),
47923
- isBuff = !isArr && !isArg && isBuffer(value),
47924
- isType = !isArr && !isArg && !isBuff && isTypedArray(value),
48141
+ var isArr = isArray$1(value),
48142
+ isArg = !isArr && isArguments$1(value),
48143
+ isBuff = !isArr && !isArg && isBuffer$1(value),
48144
+ isType = !isArr && !isArg && !isBuff && isTypedArray$1(value),
47925
48145
  skipIndexes = isArr || isArg || isBuff || isType,
47926
48146
  result = skipIndexes ? baseTimes(value.length, String) : [],
47927
48147
  length = result.length;
@@ -47961,6 +48181,8 @@ function overArg(func, transform) {
47961
48181
  /* Built-in method references for those with the same name as other `lodash` methods. */
47962
48182
  var nativeKeys = overArg(Object.keys, Object);
47963
48183
 
48184
+ var nativeKeys$1 = nativeKeys;
48185
+
47964
48186
  /** Used for built-in method references. */
47965
48187
  var objectProto$8 = Object.prototype;
47966
48188
 
@@ -47976,7 +48198,7 @@ var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
47976
48198
  */
47977
48199
  function baseKeys(object) {
47978
48200
  if (!isPrototype(object)) {
47979
- return nativeKeys(object);
48201
+ return nativeKeys$1(object);
47980
48202
  }
47981
48203
  var result = [];
47982
48204
  for (var key in Object(object)) {
@@ -48106,7 +48328,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
48106
48328
  * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
48107
48329
  */
48108
48330
  function isKey(value, object) {
48109
- if (isArray(value)) {
48331
+ if (isArray$1(value)) {
48110
48332
  return false;
48111
48333
  }
48112
48334
  var type = typeof value;
@@ -48121,6 +48343,8 @@ function isKey(value, object) {
48121
48343
  /* Built-in method references that are verified to be native. */
48122
48344
  var nativeCreate = getNative(Object, 'create');
48123
48345
 
48346
+ var nativeCreate$1 = nativeCreate;
48347
+
48124
48348
  /**
48125
48349
  * Removes all key-value entries from the hash.
48126
48350
  *
@@ -48129,7 +48353,7 @@ var nativeCreate = getNative(Object, 'create');
48129
48353
  * @memberOf Hash
48130
48354
  */
48131
48355
  function hashClear() {
48132
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
48356
+ this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
48133
48357
  this.size = 0;
48134
48358
  }
48135
48359
 
@@ -48169,7 +48393,7 @@ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
48169
48393
  */
48170
48394
  function hashGet(key) {
48171
48395
  var data = this.__data__;
48172
- if (nativeCreate) {
48396
+ if (nativeCreate$1) {
48173
48397
  var result = data[key];
48174
48398
  return result === HASH_UNDEFINED$2 ? undefined : result;
48175
48399
  }
@@ -48193,7 +48417,7 @@ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
48193
48417
  */
48194
48418
  function hashHas(key) {
48195
48419
  var data = this.__data__;
48196
- return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$4.call(data, key);
48420
+ return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$4.call(data, key);
48197
48421
  }
48198
48422
 
48199
48423
  /** Used to stand-in for `undefined` hash values. */
@@ -48212,7 +48436,7 @@ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
48212
48436
  function hashSet(key, value) {
48213
48437
  var data = this.__data__;
48214
48438
  this.size += this.has(key) ? 0 : 1;
48215
- data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;
48439
+ data[key] = (nativeCreate$1 && value === undefined) ? HASH_UNDEFINED$1 : value;
48216
48440
  return this;
48217
48441
  }
48218
48442
 
@@ -48381,7 +48605,9 @@ ListCache.prototype.has = listCacheHas;
48381
48605
  ListCache.prototype.set = listCacheSet;
48382
48606
 
48383
48607
  /* Built-in method references that are verified to be native. */
48384
- var Map$1 = getNative(root, 'Map');
48608
+ var Map$1 = getNative(root$1, 'Map');
48609
+
48610
+ var Map$2 = Map$1;
48385
48611
 
48386
48612
  /**
48387
48613
  * Removes all key-value entries from the map.
@@ -48394,7 +48620,7 @@ function mapCacheClear() {
48394
48620
  this.size = 0;
48395
48621
  this.__data__ = {
48396
48622
  'hash': new Hash,
48397
- 'map': new (Map$1 || ListCache),
48623
+ 'map': new (Map$2 || ListCache),
48398
48624
  'string': new Hash
48399
48625
  };
48400
48626
  }
@@ -48630,6 +48856,8 @@ var stringToPath = memoizeCapped(function(string) {
48630
48856
  return result;
48631
48857
  });
48632
48858
 
48859
+ var stringToPath$1 = stringToPath;
48860
+
48633
48861
  /**
48634
48862
  * Converts `value` to a string. An empty string is returned for `null`
48635
48863
  * and `undefined` values. The sign of `-0` is preserved.
@@ -48664,10 +48892,10 @@ function toString(value) {
48664
48892
  * @returns {Array} Returns the cast property path array.
48665
48893
  */
48666
48894
  function castPath(value, object) {
48667
- if (isArray(value)) {
48895
+ if (isArray$1(value)) {
48668
48896
  return value;
48669
48897
  }
48670
- return isKey(value, object) ? [value] : stringToPath(toString(value));
48898
+ return isKey(value, object) ? [value] : stringToPath$1(toString(value));
48671
48899
  }
48672
48900
 
48673
48901
  /** Used as references for various `Number` constants. */
@@ -48758,7 +48986,7 @@ function arrayPush(array, values) {
48758
48986
  }
48759
48987
 
48760
48988
  /** Built-in value references. */
48761
- var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : undefined;
48989
+ var spreadableSymbol = Symbol$2 ? Symbol$2.isConcatSpreadable : undefined;
48762
48990
 
48763
48991
  /**
48764
48992
  * Checks if `value` is a flattenable `arguments` object or array.
@@ -48768,7 +48996,7 @@ var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : undefined;
48768
48996
  * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
48769
48997
  */
48770
48998
  function isFlattenable(value) {
48771
- return isArray(value) || isArguments(value) ||
48999
+ return isArray$1(value) || isArguments$1(value) ||
48772
49000
  !!(spreadableSymbol && value && value[spreadableSymbol]);
48773
49001
  }
48774
49002
 
@@ -48833,12 +49061,14 @@ function flatten(array) {
48833
49061
  * @returns {Function} Returns the new function.
48834
49062
  */
48835
49063
  function flatRest(func) {
48836
- return setToString(overRest(func, undefined, flatten), func + '');
49064
+ return setToString$1(overRest(func, undefined, flatten), func + '');
48837
49065
  }
48838
49066
 
48839
49067
  /** Built-in value references. */
48840
49068
  var getPrototype = overArg(Object.getPrototypeOf, Object);
48841
49069
 
49070
+ var getPrototype$1 = getPrototype;
49071
+
48842
49072
  /** `Object#toString` result references. */
48843
49073
  var objectTag$3 = '[object Object]';
48844
49074
 
@@ -48887,7 +49117,7 @@ function isPlainObject$1(value) {
48887
49117
  if (!isObjectLike(value) || baseGetTag(value) != objectTag$3) {
48888
49118
  return false;
48889
49119
  }
48890
- var proto = getPrototype(value);
49120
+ var proto = getPrototype$1(value);
48891
49121
  if (proto === null) {
48892
49122
  return true;
48893
49123
  }
@@ -48998,7 +49228,7 @@ function stackSet(key, value) {
48998
49228
  var data = this.__data__;
48999
49229
  if (data instanceof ListCache) {
49000
49230
  var pairs = data.__data__;
49001
- if (!Map$1 || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
49231
+ if (!Map$2 || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
49002
49232
  pairs.push([key, value]);
49003
49233
  this.size = ++data.size;
49004
49234
  return this;
@@ -49065,7 +49295,7 @@ var freeModule = freeExports && typeof module == 'object' && module && !module.n
49065
49295
  var moduleExports = freeModule && freeModule.exports === freeExports;
49066
49296
 
49067
49297
  /** Built-in value references. */
49068
- var Buffer = moduleExports ? root.Buffer : undefined,
49298
+ var Buffer = moduleExports ? root$1.Buffer : undefined,
49069
49299
  allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
49070
49300
 
49071
49301
  /**
@@ -49187,7 +49417,7 @@ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
49187
49417
  var result = [];
49188
49418
  while (object) {
49189
49419
  arrayPush(result, getSymbols$1(object));
49190
- object = getPrototype(object);
49420
+ object = getPrototype$1(object);
49191
49421
  }
49192
49422
  return result;
49193
49423
  };
@@ -49219,7 +49449,7 @@ function copySymbolsIn(source, object) {
49219
49449
  */
49220
49450
  function baseGetAllKeys(object, keysFunc, symbolsFunc) {
49221
49451
  var result = keysFunc(object);
49222
- return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
49452
+ return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
49223
49453
  }
49224
49454
 
49225
49455
  /**
@@ -49246,13 +49476,19 @@ function getAllKeysIn(object) {
49246
49476
  }
49247
49477
 
49248
49478
  /* Built-in method references that are verified to be native. */
49249
- var DataView = getNative(root, 'DataView');
49479
+ var DataView = getNative(root$1, 'DataView');
49480
+
49481
+ var DataView$1 = DataView;
49250
49482
 
49251
49483
  /* Built-in method references that are verified to be native. */
49252
- var Promise$1 = getNative(root, 'Promise');
49484
+ var Promise$1 = getNative(root$1, 'Promise');
49485
+
49486
+ var Promise$2 = Promise$1;
49253
49487
 
49254
49488
  /* Built-in method references that are verified to be native. */
49255
- var Set$1 = getNative(root, 'Set');
49489
+ var Set$1 = getNative(root$1, 'Set');
49490
+
49491
+ var Set$2 = Set$1;
49256
49492
 
49257
49493
  /** `Object#toString` result references. */
49258
49494
  var mapTag$4 = '[object Map]',
@@ -49264,11 +49500,11 @@ var mapTag$4 = '[object Map]',
49264
49500
  var dataViewTag$3 = '[object DataView]';
49265
49501
 
49266
49502
  /** Used to detect maps, sets, and weakmaps. */
49267
- var dataViewCtorString = toSource(DataView),
49268
- mapCtorString = toSource(Map$1),
49269
- promiseCtorString = toSource(Promise$1),
49270
- setCtorString = toSource(Set$1),
49271
- weakMapCtorString = toSource(WeakMap$1);
49503
+ var dataViewCtorString = toSource(DataView$1),
49504
+ mapCtorString = toSource(Map$2),
49505
+ promiseCtorString = toSource(Promise$2),
49506
+ setCtorString = toSource(Set$2),
49507
+ weakMapCtorString = toSource(WeakMap$2);
49272
49508
 
49273
49509
  /**
49274
49510
  * Gets the `toStringTag` of `value`.
@@ -49280,11 +49516,11 @@ var dataViewCtorString = toSource(DataView),
49280
49516
  var getTag = baseGetTag;
49281
49517
 
49282
49518
  // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
49283
- if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$3) ||
49284
- (Map$1 && getTag(new Map$1) != mapTag$4) ||
49285
- (Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
49286
- (Set$1 && getTag(new Set$1) != setTag$4) ||
49287
- (WeakMap$1 && getTag(new WeakMap$1) != weakMapTag$1)) {
49519
+ if ((DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$3) ||
49520
+ (Map$2 && getTag(new Map$2) != mapTag$4) ||
49521
+ (Promise$2 && getTag(Promise$2.resolve()) != promiseTag) ||
49522
+ (Set$2 && getTag(new Set$2) != setTag$4) ||
49523
+ (WeakMap$2 && getTag(new WeakMap$2) != weakMapTag$1)) {
49288
49524
  getTag = function(value) {
49289
49525
  var result = baseGetTag(value),
49290
49526
  Ctor = result == objectTag$2 ? value.constructor : undefined,
@@ -49331,7 +49567,7 @@ function initCloneArray(array) {
49331
49567
  }
49332
49568
 
49333
49569
  /** Built-in value references. */
49334
- var Uint8Array$1 = root.Uint8Array;
49570
+ var Uint8Array$1 = root$1.Uint8Array;
49335
49571
 
49336
49572
  var Uint8Array$2 = Uint8Array$1;
49337
49573
 
@@ -49378,7 +49614,7 @@ function cloneRegExp(regexp) {
49378
49614
  }
49379
49615
 
49380
49616
  /** Used to convert symbols to primitives and strings. */
49381
- var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : undefined,
49617
+ var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : undefined,
49382
49618
  symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : undefined;
49383
49619
 
49384
49620
  /**
@@ -49484,7 +49720,7 @@ function initCloneByTag(object, tag, isDeep) {
49484
49720
  */
49485
49721
  function initCloneObject(object) {
49486
49722
  return (typeof object.constructor == 'function' && !isPrototype(object))
49487
- ? baseCreate(getPrototype(object))
49723
+ ? baseCreate$1(getPrototype$1(object))
49488
49724
  : {};
49489
49725
  }
49490
49726
 
@@ -49503,7 +49739,7 @@ function baseIsMap(value) {
49503
49739
  }
49504
49740
 
49505
49741
  /* Node.js helper references. */
49506
- var nodeIsMap = nodeUtil && nodeUtil.isMap;
49742
+ var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
49507
49743
 
49508
49744
  /**
49509
49745
  * Checks if `value` is classified as a `Map` object.
@@ -49524,6 +49760,8 @@ var nodeIsMap = nodeUtil && nodeUtil.isMap;
49524
49760
  */
49525
49761
  var isMap$1 = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
49526
49762
 
49763
+ var isMap$2 = isMap$1;
49764
+
49527
49765
  /** `Object#toString` result references. */
49528
49766
  var setTag$2 = '[object Set]';
49529
49767
 
@@ -49539,7 +49777,7 @@ function baseIsSet(value) {
49539
49777
  }
49540
49778
 
49541
49779
  /* Node.js helper references. */
49542
- var nodeIsSet = nodeUtil && nodeUtil.isSet;
49780
+ var nodeIsSet = nodeUtil$1 && nodeUtil$1.isSet;
49543
49781
 
49544
49782
  /**
49545
49783
  * Checks if `value` is classified as a `Set` object.
@@ -49560,6 +49798,8 @@ var nodeIsSet = nodeUtil && nodeUtil.isSet;
49560
49798
  */
49561
49799
  var isSet$1 = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
49562
49800
 
49801
+ var isSet$2 = isSet$1;
49802
+
49563
49803
  /** Used to compose bitmasks for cloning. */
49564
49804
  var CLONE_DEEP_FLAG$1 = 1,
49565
49805
  CLONE_FLAT_FLAG$1 = 2,
@@ -49641,7 +49881,7 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
49641
49881
  if (!isObject(value)) {
49642
49882
  return value;
49643
49883
  }
49644
- var isArr = isArray(value);
49884
+ var isArr = isArray$1(value);
49645
49885
  if (isArr) {
49646
49886
  result = initCloneArray(value);
49647
49887
  if (!isDeep) {
@@ -49651,7 +49891,7 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
49651
49891
  var tag = getTag$1(value),
49652
49892
  isFunc = tag == funcTag || tag == genTag;
49653
49893
 
49654
- if (isBuffer(value)) {
49894
+ if (isBuffer$1(value)) {
49655
49895
  return cloneBuffer(value, isDeep);
49656
49896
  }
49657
49897
  if (tag == objectTag$1 || tag == argsTag$1 || (isFunc && !object)) {
@@ -49676,11 +49916,11 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
49676
49916
  }
49677
49917
  stack.set(value, result);
49678
49918
 
49679
- if (isSet$1(value)) {
49919
+ if (isSet$2(value)) {
49680
49920
  value.forEach(function(subValue) {
49681
49921
  result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
49682
49922
  });
49683
- } else if (isMap$1(value)) {
49923
+ } else if (isMap$2(value)) {
49684
49924
  value.forEach(function(subValue, key) {
49685
49925
  result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
49686
49926
  });
@@ -49921,7 +50161,7 @@ var arrayBufferTag = '[object ArrayBuffer]',
49921
50161
  dataViewTag = '[object DataView]';
49922
50162
 
49923
50163
  /** Used to convert symbols to primitives and strings. */
49924
- var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined,
50164
+ var symbolProto = Symbol$2 ? Symbol$2.prototype : undefined,
49925
50165
  symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
49926
50166
 
49927
50167
  /**
@@ -50122,8 +50362,8 @@ var hasOwnProperty = objectProto.hasOwnProperty;
50122
50362
  * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
50123
50363
  */
50124
50364
  function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
50125
- var objIsArr = isArray(object),
50126
- othIsArr = isArray(other),
50365
+ var objIsArr = isArray$1(object),
50366
+ othIsArr = isArray$1(other),
50127
50367
  objTag = objIsArr ? arrayTag : getTag$1(object),
50128
50368
  othTag = othIsArr ? arrayTag : getTag$1(other);
50129
50369
 
@@ -50134,8 +50374,8 @@ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
50134
50374
  othIsObj = othTag == objectTag,
50135
50375
  isSameTag = objTag == othTag;
50136
50376
 
50137
- if (isSameTag && isBuffer(object)) {
50138
- if (!isBuffer(other)) {
50377
+ if (isSameTag && isBuffer$1(object)) {
50378
+ if (!isBuffer$1(other)) {
50139
50379
  return false;
50140
50380
  }
50141
50381
  objIsArr = true;
@@ -50143,7 +50383,7 @@ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
50143
50383
  }
50144
50384
  if (isSameTag && !objIsObj) {
50145
50385
  stack || (stack = new Stack);
50146
- return (objIsArr || isTypedArray(object))
50386
+ return (objIsArr || isTypedArray$1(object))
50147
50387
  ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
50148
50388
  : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
50149
50389
  }
@@ -50327,6 +50567,8 @@ var omit = flatRest(function(object, paths) {
50327
50567
  return result;
50328
50568
  });
50329
50569
 
50570
+ var omit$1 = omit;
50571
+
50330
50572
  const useEditorStore = create((set, get) => ({
50331
50573
  dataSource: {},
50332
50574
  unboundValues: {},
@@ -50475,48 +50717,25 @@ const useComponentProps = ({ node, areEntitiesFetched, resolveDesignValue, rende
50475
50717
  };
50476
50718
  }
50477
50719
  else if (variableMapping.type === 'BoundValue') {
50478
- if (!areEntitiesFetched) {
50479
- console.debug(`[experiences-sdk-react::useComponentProps] Idle-cycle: as entities are not fetched(areEntitiesFetched=${areEntitiesFetched}), we cannot resolve bound values for ${variableName} so we just resolve them to default values.`);
50480
- // Just forcing default value (if we're in idle-cycle, entities are missing)
50481
- return {
50482
- ...acc,
50483
- [variableName]: transformContentValue(variableDefinition.defaultValue, variableDefinition),
50484
- };
50485
- }
50486
- if (isDeepPath(variableMapping.path)) {
50487
- const [, uuid] = variableMapping.path.split('/');
50488
- const link = dataSource[uuid];
50489
- const boundValue = entityStore?.getValueDeep(link, variableMapping.path);
50490
- const value = boundValue || variableDefinition.defaultValue;
50491
- return {
50492
- ...acc,
50493
- [variableName]: transformContentValue(value, variableDefinition),
50494
- };
50495
- }
50496
- // // take value from the datasource for both bound and unbound value types
50497
- const [, uuid, ...path] = variableMapping.path.split('/');
50720
+ const [, uuid, path] = variableMapping.path.split('/');
50498
50721
  const binding = dataSource[uuid];
50499
- let boundValue = areEntitiesFetched
50500
- ? entityStore.getValue(binding, path.slice(0, -1))
50501
- : undefined;
50722
+ const variableDefinition = definition.variables[variableName];
50723
+ let boundValue = transformBoundContentValue(node.data.props, entityStore, binding, resolveDesignValue, variableName, variableDefinition, variableMapping.path);
50502
50724
  // In some cases, there may be an asset linked in the path, so we need to consider this scenario:
50503
50725
  // If no 'boundValue' is found, we also attempt to extract the value associated with the second-to-last item in the path.
50504
50726
  // If successful, it means we have identified the linked asset.
50505
50727
  if (!boundValue) {
50506
50728
  const maybeBoundAsset = areEntitiesFetched
50507
- ? entityStore.getValue(binding, path.slice(0, -2))
50729
+ ? entityStore.getValue(binding, path.split('/').slice(0, -2))
50508
50730
  : undefined;
50509
50731
  if (isLinkToAsset(maybeBoundAsset)) {
50510
50732
  boundValue = maybeBoundAsset;
50511
50733
  }
50512
50734
  }
50513
- if (typeof boundValue === 'object' && boundValue.sys?.linkType === 'Asset') {
50514
- boundValue = entityStore?.getValue(boundValue, ['fields', 'file']);
50515
- }
50516
50735
  const value = boundValue || variableDefinition.defaultValue;
50517
50736
  return {
50518
50737
  ...acc,
50519
- [variableName]: transformContentValue(value, variableDefinition),
50738
+ [variableName]: value,
50520
50739
  };
50521
50740
  }
50522
50741
  else {
@@ -50589,12 +50808,15 @@ const useComponentProps = ({ node, areEntitiesFetched, resolveDesignValue, rende
50589
50808
  'data-cf-node-block-id': node.data.blockId,
50590
50809
  'data-cf-node-block-type': node.type,
50591
50810
  };
50811
+ //List explicit style props that will end up being passed to the component
50812
+ const stylesToKeep = ['cfImageAsset'];
50813
+ const stylesToRemove = CF_STYLE_ATTRIBUTES.filter((style) => !stylesToKeep.includes(style));
50592
50814
  const componentProps = {
50593
50815
  className: componentClass,
50594
50816
  editorMode: true,
50595
50817
  node,
50596
50818
  renderDropzone,
50597
- ...omit(props, CF_STYLE_ATTRIBUTES, ['cfHyperlink', 'cfOpenInNewTab']),
50819
+ ...omit$1(props, stylesToRemove, ['cfHyperlink', 'cfOpenInNewTab']),
50598
50820
  ...(definition.children ? { children: renderDropzone(node) } : {}),
50599
50821
  };
50600
50822
  return { componentProps, wrapperProps };
@@ -50720,6 +50942,7 @@ var richTextReactRenderer_es5 = {};
50720
50942
 
50721
50943
  var marks = createCommonjsModule(function (module, exports) {
50722
50944
  Object.defineProperty(exports, "__esModule", { value: true });
50945
+ exports.MARKS = void 0;
50723
50946
  /**
50724
50947
  * Map of all Contentful marks.
50725
50948
  */
@@ -50731,12 +50954,12 @@ var richTextReactRenderer_es5 = {};
50731
50954
  MARKS["CODE"] = "code";
50732
50955
  MARKS["SUPERSCRIPT"] = "superscript";
50733
50956
  MARKS["SUBSCRIPT"] = "subscript";
50734
- })(MARKS || (MARKS = {}));
50735
- exports.default = MARKS;
50957
+ })(MARKS || (exports.MARKS = MARKS = {}));
50736
50958
 
50737
50959
  });
50738
50960
 
50739
50961
  unwrapExports(marks);
50962
+ marks.MARKS;
50740
50963
 
50741
50964
  var schemaConstraints = createCommonjsModule(function (module, exports) {
50742
50965
  var __spreadArray = (commonjsGlobal$1 && commonjsGlobal$1.__spreadArray) || function (to, from, pack) {
@@ -50748,15 +50971,12 @@ var richTextReactRenderer_es5 = {};
50748
50971
  }
50749
50972
  return to.concat(ar || Array.prototype.slice.call(from));
50750
50973
  };
50751
- var __importDefault = (commonjsGlobal$1 && commonjsGlobal$1.__importDefault) || function (mod) {
50752
- return (mod && mod.__esModule) ? mod : { "default": mod };
50753
- };
50754
50974
  var _a;
50755
50975
  Object.defineProperty(exports, "__esModule", { value: true });
50756
50976
  exports.V1_MARKS = exports.V1_NODE_TYPES = exports.TEXT_CONTAINERS = exports.HEADINGS = exports.CONTAINERS = exports.VOID_BLOCKS = exports.TABLE_BLOCKS = exports.LIST_ITEM_BLOCKS = exports.TOP_LEVEL_BLOCKS = void 0;
50757
50977
 
50758
50978
 
50759
- var marks_1 = __importDefault(marks);
50979
+
50760
50980
  /**
50761
50981
  * Array of all top level block types.
50762
50982
  * Only these block types can be the direct children of the document.
@@ -50870,7 +51090,7 @@ var richTextReactRenderer_es5 = {};
50870
51090
  /**
50871
51091
  * Marks before `superscript` & `subscript` release.
50872
51092
  */
50873
- exports.V1_MARKS = [marks_1.default.BOLD, marks_1.default.CODE, marks_1.default.ITALIC, marks_1.default.UNDERLINE];
51093
+ exports.V1_MARKS = [marks.MARKS.BOLD, marks.MARKS.CODE, marks.MARKS.ITALIC, marks.MARKS.UNDERLINE];
50874
51094
 
50875
51095
  });
50876
51096
 
@@ -50901,12 +51121,13 @@ var richTextReactRenderer_es5 = {};
50901
51121
 
50902
51122
  var emptyDocument = createCommonjsModule(function (module, exports) {
50903
51123
  Object.defineProperty(exports, "__esModule", { value: true });
51124
+ exports.EMPTY_DOCUMENT = void 0;
50904
51125
 
50905
51126
  /**
50906
51127
  * A rich text document considered to be empty.
50907
51128
  * Any other document structure than this is not considered empty.
50908
51129
  */
50909
- var EMPTY_DOCUMENT = {
51130
+ exports.EMPTY_DOCUMENT = {
50910
51131
  nodeType: blocks.BLOCKS.DOCUMENT,
50911
51132
  data: {},
50912
51133
  content: [
@@ -50924,11 +51145,11 @@ var richTextReactRenderer_es5 = {};
50924
51145
  },
50925
51146
  ],
50926
51147
  };
50927
- exports.default = EMPTY_DOCUMENT;
50928
51148
 
50929
51149
  });
50930
51150
 
50931
51151
  unwrapExports(emptyDocument);
51152
+ emptyDocument.EMPTY_DOCUMENT;
50932
51153
 
50933
51154
  var helpers = createCommonjsModule(function (module, exports) {
50934
51155
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -51004,9 +51225,6 @@ var richTextReactRenderer_es5 = {};
51004
51225
  __setModuleDefault(result, mod);
51005
51226
  return result;
51006
51227
  };
51007
- var __importDefault = (commonjsGlobal$1 && commonjsGlobal$1.__importDefault) || function (mod) {
51008
- return (mod && mod.__esModule) ? mod : { "default": mod };
51009
- };
51010
51228
  Object.defineProperty(exports, "__esModule", { value: true });
51011
51229
  exports.helpers = exports.EMPTY_DOCUMENT = exports.MARKS = exports.INLINES = exports.BLOCKS = void 0;
51012
51230
 
@@ -51014,12 +51232,12 @@ var richTextReactRenderer_es5 = {};
51014
51232
 
51015
51233
  Object.defineProperty(exports, "INLINES", { enumerable: true, get: function () { return inlines.INLINES; } });
51016
51234
 
51017
- Object.defineProperty(exports, "MARKS", { enumerable: true, get: function () { return __importDefault(marks).default; } });
51235
+ Object.defineProperty(exports, "MARKS", { enumerable: true, get: function () { return marks.MARKS; } });
51018
51236
  __exportStar(schemaConstraints, exports);
51019
51237
  __exportStar(types, exports);
51020
51238
  __exportStar(nodeTypes, exports);
51021
51239
 
51022
- Object.defineProperty(exports, "EMPTY_DOCUMENT", { enumerable: true, get: function () { return __importDefault(emptyDocument).default; } });
51240
+ Object.defineProperty(exports, "EMPTY_DOCUMENT", { enumerable: true, get: function () { return emptyDocument.EMPTY_DOCUMENT; } });
51023
51241
  var helpers$1 = __importStar(helpers);
51024
51242
  exports.helpers = helpers$1;
51025
51243
 
@@ -51050,7 +51268,7 @@ var richTextReactRenderer_es5 = {};
51050
51268
  var nodeValue = renderText ? renderText(node.value) : node.value;
51051
51269
  if (preserveWhitespace) {
51052
51270
  // Preserve multiple spaces.
51053
- nodeValue = nodeValue.replace(/ {2,}/g, function (match) { return '&nbsp;'.repeat(match.length); });
51271
+ nodeValue = nodeValue.replace(/ {2,}/g, function (match) { return '\u00A0'.repeat(match.length); });
51054
51272
  // Preserve line breaks.
51055
51273
  var lines_1 = nodeValue.split('\n');
51056
51274
  var jsxLines_1 = [];
@@ -51159,13 +51377,16 @@ var PostMessageMethods;
51159
51377
  PostMessageMethods["REQUESTED_ENTITIES"] = "REQUESTED_ENTITIES";
51160
51378
  })(PostMessageMethods || (PostMessageMethods = {}));
51161
51379
 
51162
- var css_248z$4 = ".cf-heading {\n white-space: pre-line;\n}\n";
51380
+ var css_248z$5 = ".cf-heading {\n white-space: pre-line;\n}\n";
51381
+ styleInject(css_248z$5);
51382
+
51383
+ var css_248z$4 = ".cf-richtext {\n white-space: pre-line;\n}\n";
51163
51384
  styleInject(css_248z$4);
51164
51385
 
51165
- var css_248z$3 = ".cf-richtext {\n white-space: pre-line;\n}\n";
51386
+ var css_248z$3 = ".cf-text {\n white-space: pre-line;\n}\n";
51166
51387
  styleInject(css_248z$3);
51167
51388
 
51168
- var css_248z$2$1 = ".cf-text {\n white-space: pre-line;\n}\n";
51389
+ var css_248z$2$1 = ".cf-no-image {\n position: relative;\n}\n\n.cf-no-image img {\n background-color: var(--cf-color-gray100);\n outline-offset: -2px;\n outline: 2px solid rgba(var(--cf-color-gray400-rgb), 0.5);\n}\n\n[data-ctfl-draggable-id] .cf-no-image {\n width: 100%;\n height: 100%;\n}\n\n[data-ctfl-draggable-id] .cf-no-image img {\n width: 100%;\n}\n\n.cf-no-image svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n height: var(--cf-text-3xl);\n width: var(--cf-text-3xl);\n max-height: 100%;\n max-width: 100%;\n}\n\n.cf-no-image svg path {\n fill: var(--cf-color-gray400);\n}\n";
51169
51390
  styleInject(css_248z$2$1);
51170
51391
 
51171
51392
  var css_248z$1$1 = ".contentful-container {\n position: relative;\n display: flex;\n box-sizing: border-box;\n pointer-events: all;\n}\n\n.contentful-container::-webkit-scrollbar {\n display: none; /* Safari and Chrome */\n}\n\n.cf-single-column-wrapper {\n position: relative;\n}\n\n.cf-container-wrapper {\n position: relative;\n width: 100%;\n}\n\n.cf-container-label {\n position: absolute;\n pointer-events: none;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow-x: clip;\n font-family: var(--exp-builder-font-stack-primary);\n font-size: 12px;\n color: var(--exp-builder-gray400);\n z-index: 10;\n}\n\n/* used by ContentfulSectionAsHyperlink.tsx */\n\n.contentful-container-link,\n.contentful-container-link:active,\n.contentful-container-link:visited,\n.contentful-container-link:hover,\n.contentful-container-link:read-write,\n.contentful-container-link:focus-visible {\n color: inherit;\n text-decoration: unset;\n outline: unset;\n}\n";
@@ -51193,8 +51414,8 @@ const Flex = reactExports.forwardRef(({ id, children, onMouseEnter, onMouseUp, o
51193
51414
  });
51194
51415
  Flex.displayName = 'Flex';
51195
51416
 
51196
- var css_248z$5 = ".Columns {\n display: flex;\n gap: 24px;\n grid-template-columns: repeat(12, 1fr);\n flex-direction: column;\n min-height: 0; /* NEW */\n min-width: 0; /* NEW; needed for Firefox */\n}\n\n@media (min-width: 768px) {\n .Columns {\n display: grid;\n }\n}\n\n.cf-single-column-wrapper {\n position: relative;\n}\n\n.cf-single-column {\n pointer-events: all;\n}\n\n.cf-single-column-label {\n pointer-events: none;\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n font-family: var(--exp-builder-font-stack-primary);\n font-size: 12px;\n color: var(--exp-builder-gray400);\n z-index: 100;\n}\n";
51197
- styleInject(css_248z$5);
51417
+ var css_248z$6 = ".Columns {\n display: flex;\n gap: 24px;\n grid-template-columns: repeat(12, 1fr);\n flex-direction: column;\n min-height: 0; /* NEW */\n min-width: 0; /* NEW; needed for Firefox */\n}\n\n@media (min-width: 768px) {\n .Columns {\n display: grid;\n }\n}\n\n.cf-single-column-wrapper {\n position: relative;\n}\n\n.cf-single-column {\n pointer-events: all;\n}\n\n.cf-single-column-label {\n pointer-events: none;\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n font-family: var(--exp-builder-font-stack-primary);\n font-size: 12px;\n color: var(--exp-builder-gray400);\n z-index: 100;\n}\n";
51418
+ styleInject(css_248z$6);
51198
51419
 
51199
51420
  const ColumnWrapper = reactExports.forwardRef((props, ref) => {
51200
51421
  return (React.createElement("div", { ref: ref, ...props, style: {
@@ -51417,7 +51638,7 @@ const DraggableChildComponent = (props) => {
51417
51638
  })));
51418
51639
  };
51419
51640
 
51420
- var css_248z$2 = ".styles-module_container__te-1H {\n margin-left: auto;\n margin-right: auto;\n position: relative;\n height: 100%;\n width: 100%;\n background-color: transparent;\n transition: background-color 0.2s;\n pointer-events: all !important;\n}\n\n.styles-module_container__te-1H:not(.styles-module_isRoot__5cn-i):before {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n outline-offset: -1px;\n outline: 2px solid transparent;\n z-index: 1;\n transition: outline 0.2s;\n pointer-events: none;\n}\n\n.styles-module_isRoot__5cn-i,\n.styles-module_isEmptyCanvas__0XHZR {\n flex: 1;\n}\n\n.styles-module_isEmptyZone__zVpnZ {\n min-height: 80px;\n}\n\n.styles-module_isDragging__Gm8v5:not(.styles-module_isRoot__5cn-i):before {\n outline: 2px dashed var(--exp-builder-gray300);\n}\n\n.styles-module_isDestination__5sCQx:not(.styles-module_isRoot__5cn-i):before {\n transition:\n outline 0.2s,\n background-color 0.2s;\n outline: 2px dashed var(--exp-builder-blue400);\n background-color: rgba(var(--exp-builder-blue100-rgb), 0.5);\n z-index: 2;\n}\n\n.styles-module_hitbox__YQ-1Z {\n position: fixed;\n pointer-events: all !important;\n}\n";
51641
+ var css_248z$2 = ".styles-module_container__te-1H {\n margin-left: auto;\n margin-right: auto;\n position: relative;\n height: 100%;\n width: 100%;\n background-color: transparent;\n transition: background-color 0.2s;\n pointer-events: all !important;\n}\n\n.styles-module_container__te-1H:not(.styles-module_isRoot__5cn-i):before {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n outline-offset: -1px;\n outline: 2px solid transparent;\n z-index: 1;\n transition: outline 0.2s;\n pointer-events: none;\n}\n\n.styles-module_isRoot__5cn-i,\n.styles-module_isEmptyCanvas__0XHZR {\n flex: 1;\n}\n\n.styles-module_isEmptyZone__zVpnZ {\n min-height: 80px;\n}\n\n.styles-module_isDragging__Gm8v5:not(.styles-module_isRoot__5cn-i):before {\n outline: 2px dashed var(--exp-builder-gray300);\n}\n\n.styles-module_isDestination__5sCQx:not(.styles-module_isRoot__5cn-i):before {\n transition:\n outline 0.2s,\n background-color 0.2s;\n outline: 2px dashed var(--exp-builder-blue400);\n background-color: rgba(var(--exp-builder-blue100-rgb), 0.5);\n z-index: 2;\n}\n\n.styles-module_hitbox__YQ-1Z {\n position: fixed;\n pointer-events: all !important;\n}\n\n.styles-module_hitbox__YQ-1Z {\n position: fixed;\n pointer-events: all !important;\n}\n";
51421
51642
  var styles$2 = {"container":"styles-module_container__te-1H","isRoot":"styles-module_isRoot__5cn-i","isEmptyCanvas":"styles-module_isEmptyCanvas__0XHZR","isEmptyZone":"styles-module_isEmptyZone__zVpnZ","isDragging":"styles-module_isDragging__Gm8v5","isDestination":"styles-module_isDestination__5sCQx","hitbox":"styles-module_hitbox__YQ-1Z"};
51422
51643
  styleInject(css_248z$2);
51423
51644