@elementor/editor-controls 0.36.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/index.d.mts +78 -45
  3. package/dist/index.d.ts +78 -45
  4. package/dist/index.js +951 -651
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +890 -596
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +8 -7
  9. package/src/bound-prop-context/use-bound-prop.ts +4 -1
  10. package/src/components/font-family-selector.tsx +23 -164
  11. package/src/components/popover-grid-container.tsx +7 -10
  12. package/src/components/repeater.tsx +24 -10
  13. package/src/components/size-control/size-input.tsx +125 -0
  14. package/src/components/{text-field-inner-selection.tsx → size-control/text-field-inner-selection.tsx} +33 -16
  15. package/src/components/text-field-popover.tsx +47 -0
  16. package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx +11 -3
  17. package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx +7 -3
  18. package/src/controls/box-shadow-repeater-control.tsx +8 -6
  19. package/src/controls/equal-unequal-sizes-control.tsx +24 -14
  20. package/src/controls/gap-control.tsx +17 -6
  21. package/src/controls/key-value-control.tsx +99 -0
  22. package/src/controls/linked-dimensions-control.tsx +62 -81
  23. package/src/controls/position-control.tsx +109 -0
  24. package/src/controls/repeatable-control.tsx +89 -0
  25. package/src/controls/size-control.tsx +181 -149
  26. package/src/controls/stroke-control.tsx +9 -6
  27. package/src/hooks/use-repeatable-control-context.ts +24 -0
  28. package/src/hooks/use-size-extended-options.ts +21 -0
  29. package/src/index.ts +4 -1
  30. package/src/utils/size-control.ts +10 -0
package/dist/index.js CHANGED
@@ -45,11 +45,14 @@ __export(index_exports, {
45
45
  FontFamilySelector: () => FontFamilySelector,
46
46
  GapControl: () => GapControl,
47
47
  ImageControl: () => ImageControl,
48
+ KeyValueControl: () => KeyValueControl,
48
49
  LinkControl: () => LinkControl,
49
50
  LinkedDimensionsControl: () => LinkedDimensionsControl,
50
51
  NumberControl: () => NumberControl,
52
+ PositionControl: () => PositionControl,
51
53
  PropKeyProvider: () => PropKeyProvider,
52
54
  PropProvider: () => PropProvider,
55
+ RepeatableControl: () => RepeatableControl,
53
56
  SelectControl: () => SelectControl,
54
57
  SizeControl: () => SizeControl,
55
58
  StrokeControl: () => StrokeControl,
@@ -512,12 +515,26 @@ var TextAreaControl = createControl(({ placeholder }) => {
512
515
  });
513
516
 
514
517
  // src/controls/size-control.tsx
515
- var React14 = __toESM(require("react"));
516
- var import_react8 = require("react");
518
+ var React16 = __toESM(require("react"));
519
+ var import_react10 = require("react");
517
520
  var import_editor_props6 = require("@elementor/editor-props");
521
+ var import_editor_responsive = require("@elementor/editor-responsive");
522
+ var import_ui12 = require("@elementor/ui");
523
+
524
+ // src/components/size-control/size-input.tsx
525
+ var React14 = __toESM(require("react"));
526
+ var import_react7 = require("react");
527
+ var import_icons2 = require("@elementor/icons");
518
528
  var import_ui10 = require("@elementor/ui");
519
529
 
520
- // src/components/text-field-inner-selection.tsx
530
+ // src/utils/size-control.ts
531
+ var defaultUnits = ["px", "%", "em", "rem", "vw", "vh"];
532
+ var defaultExtendedOptions = ["auto", "custom"];
533
+ function isUnitExtendedOption(unit) {
534
+ return defaultExtendedOptions.includes(unit);
535
+ }
536
+
537
+ // src/components/size-control/text-field-inner-selection.tsx
521
538
  var React13 = __toESM(require("react"));
522
539
  var import_react6 = require("react");
523
540
  var import_editor_ui2 = require("@elementor/editor-ui");
@@ -531,36 +548,36 @@ var TextFieldInnerSelection = (0, import_react6.forwardRef)(
531
548
  onBlur,
532
549
  onKeyDown,
533
550
  onKeyUp,
534
- endAdornment,
535
- startAdornment,
551
+ shouldBlockInput = false,
552
+ inputProps,
536
553
  disabled
537
554
  }, ref) => {
538
555
  return /* @__PURE__ */ React13.createElement(
539
556
  import_ui9.TextField,
540
557
  {
541
558
  ref,
559
+ sx: { input: { cursor: shouldBlockInput ? "default !important" : void 0 } },
542
560
  size: "tiny",
543
561
  fullWidth: true,
544
- type,
562
+ type: shouldBlockInput ? void 0 : type,
545
563
  value,
564
+ onChange: shouldBlockInput ? void 0 : onChange,
565
+ onKeyDown: shouldBlockInput ? void 0 : onKeyDown,
566
+ onKeyUp: shouldBlockInput ? void 0 : onKeyUp,
546
567
  disabled,
547
- onChange,
548
- onKeyDown,
549
- onKeyUp,
550
568
  onBlur,
551
569
  placeholder,
552
- InputProps: {
553
- endAdornment,
554
- startAdornment
555
- }
570
+ InputProps: inputProps
556
571
  }
557
572
  );
558
573
  }
559
574
  );
560
575
  var SelectionEndAdornment = ({
561
576
  options,
577
+ alternativeOptionLabels = {},
562
578
  onClick,
563
579
  value,
580
+ menuItemsAttributes = {},
564
581
  disabled
565
582
  }) => {
566
583
  const popupState = (0, import_ui9.usePopupState)({
@@ -580,12 +597,161 @@ var SelectionEndAdornment = ({
580
597
  sx: { font: "inherit", minWidth: "initial", textTransform: "uppercase" },
581
598
  ...(0, import_ui9.bindTrigger)(popupState)
582
599
  },
583
- value
584
- ), /* @__PURE__ */ React13.createElement(import_ui9.Menu, { MenuListProps: { dense: true }, ...(0, import_ui9.bindMenu)(popupState) }, options.map((option, index) => /* @__PURE__ */ React13.createElement(import_editor_ui2.MenuListItem, { key: option, onClick: () => handleMenuItemClick(index) }, option.toUpperCase()))));
600
+ alternativeOptionLabels[value] ?? value
601
+ ), /* @__PURE__ */ React13.createElement(import_ui9.Menu, { MenuListProps: { dense: true }, ...(0, import_ui9.bindMenu)(popupState) }, options.map((option, index) => /* @__PURE__ */ React13.createElement(
602
+ import_editor_ui2.MenuListItem,
603
+ {
604
+ key: option,
605
+ onClick: () => handleMenuItemClick(index),
606
+ ...menuItemsAttributes?.[option]
607
+ },
608
+ alternativeOptionLabels[option] ?? option.toUpperCase()
609
+ ))));
610
+ };
611
+
612
+ // src/components/size-control/size-input.tsx
613
+ var RESTRICTED_INPUT_KEYS = ["e", "E", "+", "-"];
614
+ var SizeInput = ({
615
+ units: units2,
616
+ handleUnitChange,
617
+ handleSizeChange,
618
+ placeholder,
619
+ startIcon,
620
+ onBlur,
621
+ onFocus,
622
+ onClick,
623
+ size,
624
+ unit,
625
+ popupState,
626
+ disabled
627
+ }) => {
628
+ const unitInputBufferRef = (0, import_react7.useRef)("");
629
+ const inputType = isUnitExtendedOption(unit) ? "text" : "number";
630
+ const inputValue = !isUnitExtendedOption(unit) && Number.isNaN(size) ? "" : size ?? "";
631
+ const handleKeyUp = (event) => {
632
+ const { key } = event;
633
+ if (!/^[a-zA-Z%]$/.test(key)) {
634
+ return;
635
+ }
636
+ event.preventDefault();
637
+ const newChar = key.toLowerCase();
638
+ const updatedBuffer = (unitInputBufferRef.current + newChar).slice(-3);
639
+ unitInputBufferRef.current = updatedBuffer;
640
+ const matchedUnit = units2.find((u) => u.includes(updatedBuffer)) || units2.find((u) => u.startsWith(newChar)) || units2.find((u) => u.includes(newChar));
641
+ if (matchedUnit) {
642
+ handleUnitChange(matchedUnit);
643
+ }
644
+ };
645
+ const popupAttributes = {
646
+ "aria-controls": popupState.isOpen ? popupState.popupId : void 0,
647
+ "aria-haspopup": true
648
+ };
649
+ const inputProps = {
650
+ ...popupAttributes,
651
+ autoComplete: "off",
652
+ onClick,
653
+ onFocus,
654
+ startAdornment: startIcon ? /* @__PURE__ */ React14.createElement(import_ui10.InputAdornment, { position: "start", disabled }, startIcon) : void 0,
655
+ endAdornment: /* @__PURE__ */ React14.createElement(
656
+ SelectionEndAdornment,
657
+ {
658
+ disabled,
659
+ options: units2,
660
+ onClick: handleUnitChange,
661
+ value: unit,
662
+ alternativeOptionLabels: {
663
+ custom: /* @__PURE__ */ React14.createElement(import_icons2.PencilIcon, { fontSize: "small" })
664
+ },
665
+ menuItemsAttributes: units2.includes("custom") ? {
666
+ custom: popupAttributes
667
+ } : void 0
668
+ }
669
+ )
670
+ };
671
+ return /* @__PURE__ */ React14.createElement(ControlActions, null, /* @__PURE__ */ React14.createElement(import_ui10.Box, null, /* @__PURE__ */ React14.createElement(
672
+ TextFieldInnerSelection,
673
+ {
674
+ disabled,
675
+ placeholder,
676
+ type: inputType,
677
+ value: inputValue,
678
+ onChange: handleSizeChange,
679
+ onKeyDown: (event) => {
680
+ if (RESTRICTED_INPUT_KEYS.includes(event.key)) {
681
+ event.preventDefault();
682
+ }
683
+ },
684
+ onKeyUp: handleKeyUp,
685
+ onBlur,
686
+ shouldBlockInput: isUnitExtendedOption(unit),
687
+ inputProps
688
+ }
689
+ )));
690
+ };
691
+
692
+ // src/components/text-field-popover.tsx
693
+ var React15 = __toESM(require("react"));
694
+ var import_ui11 = require("@elementor/ui");
695
+ var TextFieldPopover = (props) => {
696
+ const { popupState, restoreValue, anchorRef, value, onChange } = props;
697
+ return /* @__PURE__ */ React15.createElement(
698
+ import_ui11.Popover,
699
+ {
700
+ disablePortal: true,
701
+ ...(0, import_ui11.bindPopover)(popupState),
702
+ anchorOrigin: { vertical: "bottom", horizontal: "center" },
703
+ transformOrigin: { vertical: "top", horizontal: "center" },
704
+ onClose: () => {
705
+ restoreValue();
706
+ popupState.close();
707
+ }
708
+ },
709
+ /* @__PURE__ */ React15.createElement(
710
+ import_ui11.Paper,
711
+ {
712
+ sx: {
713
+ width: anchorRef.current.offsetWidth + "px",
714
+ borderRadius: 2,
715
+ p: 1.5
716
+ }
717
+ },
718
+ /* @__PURE__ */ React15.createElement(
719
+ import_ui11.TextField,
720
+ {
721
+ value,
722
+ onChange,
723
+ size: "tiny",
724
+ type: "text",
725
+ fullWidth: true,
726
+ inputProps: {
727
+ autoFocus: true
728
+ }
729
+ }
730
+ )
731
+ )
732
+ );
585
733
  };
586
734
 
735
+ // src/hooks/use-size-extended-options.ts
736
+ var import_react8 = require("react");
737
+ var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
738
+ var EXPERIMENT_ID = "e_v_3_30";
739
+ function useSizeExtendedOptions(options, disableCustom) {
740
+ return (0, import_react8.useMemo)(() => {
741
+ const isVersion330Active = (0, import_editor_v1_adapters.isExperimentActive)(EXPERIMENT_ID);
742
+ const shouldDisableCustom = !isVersion330Active || disableCustom;
743
+ const extendedOptions = [...options];
744
+ if (!shouldDisableCustom && !extendedOptions.includes("custom")) {
745
+ extendedOptions.push("custom");
746
+ } else if (options.includes("custom")) {
747
+ extendedOptions.splice(extendedOptions.indexOf("custom"), 1);
748
+ }
749
+ return extendedOptions;
750
+ }, [options, disableCustom]);
751
+ }
752
+
587
753
  // src/hooks/use-sync-external-state.tsx
588
- var import_react7 = require("react");
754
+ var import_react9 = require("react");
589
755
  var useSyncExternalState = ({
590
756
  external,
591
757
  setExternal,
@@ -604,8 +770,8 @@ var useSyncExternalState = ({
604
770
  }
605
771
  return externalValue;
606
772
  }
607
- const [internal, setInternal] = (0, import_react7.useState)(toInternal(external, null));
608
- (0, import_react7.useEffect)(() => {
773
+ const [internal, setInternal] = (0, import_react9.useState)(toInternal(external, null));
774
+ (0, import_react9.useEffect)(() => {
609
775
  setInternal((prevInternal) => toInternal(external, prevInternal));
610
776
  }, [external]);
611
777
  const setInternalValue = (setter) => {
@@ -618,149 +784,174 @@ var useSyncExternalState = ({
618
784
  };
619
785
 
620
786
  // src/controls/size-control.tsx
621
- var defaultUnits = ["px", "%", "em", "rem", "vw", "vh"];
622
- var defaultUnit = "px";
623
- var defaultSize = NaN;
624
- var SizeControl = createControl(
625
- ({ units: units2 = defaultUnits, extendedValues = [], placeholder, startIcon }) => {
626
- const { value: sizeValue, setValue: setSizeValue, restoreValue, disabled } = useBoundProp(import_editor_props6.sizePropTypeUtil);
627
- const [state, setState] = useSyncExternalState({
628
- external: sizeValue,
629
- setExternal: setSizeValue,
630
- persistWhen: (controlValue) => !!controlValue?.size || controlValue?.size === 0,
631
- fallback: (controlValue) => ({ unit: controlValue?.unit || defaultUnit, size: defaultSize })
632
- });
633
- const handleUnitChange = (unit) => {
634
- setState((prev) => ({
635
- size: prev?.size ?? defaultSize,
636
- unit
637
- }));
638
- };
639
- const handleSizeChange = (event) => {
640
- const { value: size } = event.target;
641
- setState((prev) => ({
642
- ...prev,
643
- size: size || size === "0" ? parseFloat(size) : defaultSize
644
- }));
645
- };
646
- const Input = extendedValues?.length ? ExtendedSizeInput : SizeInput;
647
- return /* @__PURE__ */ React14.createElement(
648
- Input,
649
- {
650
- disabled,
651
- size: state.size,
652
- unit: state.unit,
653
- placeholder,
654
- startIcon,
655
- units: units2,
656
- extendedValues,
657
- handleSizeChange,
658
- handleUnitChange,
659
- onBlur: restoreValue
787
+ var DEFAULT_UNIT = "px";
788
+ var DEFAULT_SIZE = NaN;
789
+ var SizeControl = createControl((props) => {
790
+ const defaultUnit = props.defaultUnit ?? DEFAULT_UNIT;
791
+ const { units: units2 = [...defaultUnits], placeholder, startIcon, anchorRef } = props;
792
+ const { value: sizeValue, setValue: setSizeValue, disabled, restoreValue } = useBoundProp(import_editor_props6.sizePropTypeUtil);
793
+ const [internalState, setInternalState] = (0, import_react10.useState)(createStateFromSizeProp(sizeValue, defaultUnit));
794
+ const activeBreakpoint = (0, import_editor_responsive.useActiveBreakpoint)();
795
+ const extendedOptions = useSizeExtendedOptions(props.extendedOptions || [], props.disableCustom ?? false);
796
+ const popupState = (0, import_ui12.usePopupState)({ variant: "popover" });
797
+ const [state, setState] = useSyncExternalState({
798
+ external: internalState,
799
+ setExternal: (newState) => setSizeValue(extractValueFromState(newState)),
800
+ persistWhen: (newState) => {
801
+ if (!newState?.unit) {
802
+ return false;
660
803
  }
661
- );
662
- }
663
- );
664
- var ExtendedSizeInput = (props) => {
665
- const { value: stringValue, setValue: setStringValue } = useBoundProp(import_editor_props6.stringPropTypeUtil);
666
- const { extendedValues = [] } = props;
667
- const unit = stringValue ?? props.unit;
804
+ if (isUnitExtendedOption(newState.unit)) {
805
+ return newState.unit === "auto" ? true : !!newState.custom;
806
+ }
807
+ return !!newState?.numeric || newState?.numeric === 0;
808
+ },
809
+ fallback: (newState) => ({
810
+ unit: newState?.unit ?? props.defaultUnit ?? DEFAULT_UNIT,
811
+ numeric: newState?.numeric ?? DEFAULT_SIZE,
812
+ custom: newState?.custom ?? ""
813
+ })
814
+ });
815
+ const { size: controlSize = DEFAULT_SIZE, unit: controlUnit = DEFAULT_UNIT } = extractValueFromState(state) || {};
668
816
  const handleUnitChange = (newUnit) => {
669
- if (extendedValues.includes(newUnit)) {
670
- setStringValue(newUnit);
671
- } else {
672
- props.handleUnitChange(newUnit);
817
+ if (newUnit === "custom") {
818
+ popupState.open(anchorRef?.current);
673
819
  }
820
+ setState((prev) => ({ ...prev, unit: newUnit }));
674
821
  };
675
- return /* @__PURE__ */ React14.createElement(
676
- SizeInput,
677
- {
678
- ...props,
679
- units: [...props.units, ...extendedValues],
680
- handleUnitChange,
681
- unit
682
- }
683
- );
684
- };
685
- var RESTRICTED_INPUT_KEYS = ["e", "E", "+", "-"];
686
- var SizeInput = ({
687
- units: units2,
688
- handleUnitChange,
689
- handleSizeChange,
690
- placeholder,
691
- startIcon,
692
- onBlur,
693
- size,
694
- unit,
695
- disabled
696
- }) => {
697
- const unitInputBufferRef = (0, import_react8.useRef)("");
698
- const handleKeyUp = (event) => {
699
- const { key } = event;
700
- if (!/^[a-zA-Z%]$/.test(key)) {
822
+ const handleSizeChange = (event) => {
823
+ const { value: size } = event.target;
824
+ if (controlUnit === "auto") {
825
+ setState((prev) => ({ ...prev, unit: controlUnit }));
701
826
  return;
702
827
  }
703
- event.preventDefault();
704
- const newChar = key.toLowerCase();
705
- const updatedBuffer = (unitInputBufferRef.current + newChar).slice(-3);
706
- unitInputBufferRef.current = updatedBuffer;
707
- const matchedUnit = units2.find((u) => u.includes(updatedBuffer)) || units2.find((u) => u.startsWith(newChar)) || units2.find((u) => u.includes(newChar));
708
- if (matchedUnit) {
709
- handleUnitChange(matchedUnit);
828
+ setState((prev) => ({
829
+ ...prev,
830
+ [controlUnit === "custom" ? "custom" : "numeric"]: formatSize(size, controlUnit),
831
+ unit: controlUnit
832
+ }));
833
+ };
834
+ const onInputFocus = (event) => {
835
+ if (isUnitExtendedOption(state.unit)) {
836
+ event.target?.blur();
710
837
  }
711
838
  };
712
- return /* @__PURE__ */ React14.createElement(ControlActions, null, /* @__PURE__ */ React14.createElement(import_ui10.Box, null, /* @__PURE__ */ React14.createElement(
713
- TextFieldInnerSelection,
839
+ const onInputClick = (event) => {
840
+ if (event.target.closest("input") && "custom" === state.unit) {
841
+ popupState.open(anchorRef?.current);
842
+ }
843
+ };
844
+ (0, import_react10.useEffect)(() => {
845
+ const newState = createStateFromSizeProp(sizeValue, defaultUnit);
846
+ const currentUnit = isUnitExtendedOption(state.unit) ? "custom" : "numeric";
847
+ const mergedStates = { ...state, [currentUnit]: newState[currentUnit] };
848
+ if (mergedStates.unit !== "auto" && areStatesEqual(state, mergedStates)) {
849
+ return;
850
+ }
851
+ if (state.unit === newState.unit) {
852
+ setInternalState(mergedStates);
853
+ return;
854
+ }
855
+ setState(newState);
856
+ }, [sizeValue]);
857
+ (0, import_react10.useEffect)(() => {
858
+ const newState = createStateFromSizeProp(sizeValue, defaultUnit);
859
+ if (activeBreakpoint && !areStatesEqual(newState, state)) {
860
+ setState(newState);
861
+ }
862
+ }, [activeBreakpoint]);
863
+ return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
864
+ SizeInput,
714
865
  {
715
866
  disabled,
716
- endAdornment: /* @__PURE__ */ React14.createElement(
717
- SelectionEndAdornment,
718
- {
719
- disabled,
720
- options: units2,
721
- onClick: handleUnitChange,
722
- value: unit ?? defaultUnit
723
- }
724
- ),
867
+ size: controlSize,
868
+ unit: controlUnit,
869
+ units: [...units2, ...extendedOptions || []],
725
870
  placeholder,
726
- startAdornment: startIcon ? /* @__PURE__ */ React14.createElement(import_ui10.InputAdornment, { position: "start", disabled }, startIcon) : void 0,
727
- type: "number",
728
- value: Number.isNaN(size) ? "" : size,
729
- onChange: handleSizeChange,
730
- onBlur,
731
- onKeyDown: (event) => {
732
- if (RESTRICTED_INPUT_KEYS.includes(event.key)) {
733
- event.preventDefault();
734
- }
735
- },
736
- onKeyUp: handleKeyUp
871
+ startIcon,
872
+ handleSizeChange,
873
+ handleUnitChange,
874
+ onBlur: restoreValue,
875
+ onFocus: onInputFocus,
876
+ onClick: onInputClick,
877
+ popupState
737
878
  }
738
- )));
739
- };
879
+ ), anchorRef?.current && /* @__PURE__ */ React16.createElement(
880
+ TextFieldPopover,
881
+ {
882
+ popupState,
883
+ anchorRef,
884
+ restoreValue,
885
+ value: controlSize,
886
+ onChange: handleSizeChange
887
+ }
888
+ ));
889
+ });
890
+ function formatSize(size, unit) {
891
+ if (isUnitExtendedOption(unit)) {
892
+ return unit === "auto" ? "" : String(size ?? "");
893
+ }
894
+ return size || size === 0 ? Number(size) : NaN;
895
+ }
896
+ function createStateFromSizeProp(sizeValue, defaultUnit) {
897
+ const unit = sizeValue?.unit ?? defaultUnit;
898
+ const size = sizeValue?.size ?? "";
899
+ return {
900
+ numeric: !isUnitExtendedOption(unit) && !isNaN(Number(size)) && (size || size === 0) ? Number(size) : DEFAULT_SIZE,
901
+ custom: unit === "custom" ? String(size) : "",
902
+ unit
903
+ };
904
+ }
905
+ function extractValueFromState(state) {
906
+ if (!state) {
907
+ return null;
908
+ }
909
+ if (!state?.unit) {
910
+ return { size: DEFAULT_SIZE, unit: DEFAULT_UNIT };
911
+ }
912
+ const { unit } = state;
913
+ if (unit === "auto") {
914
+ return { size: "", unit };
915
+ }
916
+ return {
917
+ size: state[unit === "custom" ? "custom" : "numeric"],
918
+ unit
919
+ };
920
+ }
921
+ function areStatesEqual(state1, state2) {
922
+ if (state1.unit !== state2.unit || state1.custom !== state2.custom) {
923
+ return false;
924
+ }
925
+ if (isUnitExtendedOption(state1.unit)) {
926
+ return state1.custom === state2.custom;
927
+ }
928
+ return state1.numeric === state2.numeric || isNaN(state1.numeric) && isNaN(state2.numeric);
929
+ }
740
930
 
741
931
  // src/controls/stroke-control.tsx
742
- var React17 = __toESM(require("react"));
932
+ var React19 = __toESM(require("react"));
933
+ var import_react11 = require("react");
743
934
  var import_editor_props8 = require("@elementor/editor-props");
744
- var import_ui13 = require("@elementor/ui");
935
+ var import_ui15 = require("@elementor/ui");
745
936
  var import_i18n3 = require("@wordpress/i18n");
746
937
 
747
938
  // src/components/section-content.tsx
748
- var React15 = __toESM(require("react"));
749
- var import_ui11 = require("@elementor/ui");
750
- var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */ React15.createElement(import_ui11.Stack, { gap, sx: { ...sx } }, children);
939
+ var React17 = __toESM(require("react"));
940
+ var import_ui13 = require("@elementor/ui");
941
+ var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */ React17.createElement(import_ui13.Stack, { gap, sx: { ...sx } }, children);
751
942
 
752
943
  // src/controls/color-control.tsx
753
- var React16 = __toESM(require("react"));
944
+ var React18 = __toESM(require("react"));
754
945
  var import_editor_props7 = require("@elementor/editor-props");
755
- var import_ui12 = require("@elementor/ui");
946
+ var import_ui14 = require("@elementor/ui");
756
947
  var ColorControl = createControl(
757
948
  ({ propTypeUtil = import_editor_props7.colorPropTypeUtil, anchorEl, slotProps = {}, ...props }) => {
758
949
  const { value, setValue, disabled } = useBoundProp(propTypeUtil);
759
950
  const handleChange = (selectedColor) => {
760
951
  setValue(selectedColor || null);
761
952
  };
762
- return /* @__PURE__ */ React16.createElement(ControlActions, null, /* @__PURE__ */ React16.createElement(
763
- import_ui12.UnstableColorField,
953
+ return /* @__PURE__ */ React18.createElement(ControlActions, null, /* @__PURE__ */ React18.createElement(
954
+ import_ui14.UnstableColorField,
764
955
  {
765
956
  size: "tiny",
766
957
  fullWidth: true,
@@ -791,48 +982,48 @@ var ColorControl = createControl(
791
982
  var units = ["px", "em", "rem"];
792
983
  var StrokeControl = createControl(() => {
793
984
  const propContext = useBoundProp(import_editor_props8.strokePropTypeUtil);
794
- return /* @__PURE__ */ React17.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React17.createElement(SectionContent, null, /* @__PURE__ */ React17.createElement(Control, { bind: "width", label: (0, import_i18n3.__)("Stroke width", "elementor") }, /* @__PURE__ */ React17.createElement(SizeControl, { units })), /* @__PURE__ */ React17.createElement(Control, { bind: "color", label: (0, import_i18n3.__)("Stroke color", "elementor") }, /* @__PURE__ */ React17.createElement(ColorControl, null))));
985
+ const rowRef = (0, import_react11.useRef)();
986
+ return /* @__PURE__ */ React19.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React19.createElement(SectionContent, null, /* @__PURE__ */ React19.createElement(Control, { bind: "width", label: (0, import_i18n3.__)("Stroke width", "elementor"), ref: rowRef }, /* @__PURE__ */ React19.createElement(SizeControl, { units, anchorRef: rowRef })), /* @__PURE__ */ React19.createElement(Control, { bind: "color", label: (0, import_i18n3.__)("Stroke color", "elementor") }, /* @__PURE__ */ React19.createElement(ColorControl, null))));
795
987
  });
796
- var Control = ({ bind, label, children }) => /* @__PURE__ */ React17.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React17.createElement(import_ui13.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React17.createElement(import_ui13.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React17.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React17.createElement(import_ui13.Grid, { item: true, xs: 6 }, children)));
988
+ var Control = (0, import_react11.forwardRef)(({ bind, label, children }, ref) => /* @__PURE__ */ React19.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React19.createElement(import_ui15.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref }, /* @__PURE__ */ React19.createElement(import_ui15.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React19.createElement(import_ui15.Grid, { item: true, xs: 6 }, children))));
797
989
 
798
990
  // src/controls/box-shadow-repeater-control.tsx
799
- var React24 = __toESM(require("react"));
991
+ var React26 = __toESM(require("react"));
992
+ var import_react15 = require("react");
800
993
  var import_editor_props9 = require("@elementor/editor-props");
801
- var import_ui18 = require("@elementor/ui");
994
+ var import_ui20 = require("@elementor/ui");
802
995
  var import_i18n5 = require("@wordpress/i18n");
803
996
 
804
997
  // src/components/popover-content.tsx
805
- var React18 = __toESM(require("react"));
806
- var import_ui14 = require("@elementor/ui");
807
- var PopoverContent = ({ alignItems, gap = 1.5, p, pt, pb, children }) => /* @__PURE__ */ React18.createElement(import_ui14.Stack, { alignItems, gap, p, pt, pb }, children);
998
+ var React20 = __toESM(require("react"));
999
+ var import_ui16 = require("@elementor/ui");
1000
+ var PopoverContent = ({ alignItems, gap = 1.5, p, pt, pb, children }) => /* @__PURE__ */ React20.createElement(import_ui16.Stack, { alignItems, gap, p, pt, pb }, children);
808
1001
 
809
1002
  // src/components/popover-grid-container.tsx
810
- var React19 = __toESM(require("react"));
811
- var import_ui15 = require("@elementor/ui");
812
- var PopoverGridContainer = ({
813
- gap = 1.5,
814
- alignItems = "center",
815
- flexWrap = "nowrap",
816
- children
817
- }) => /* @__PURE__ */ React19.createElement(import_ui15.Grid, { container: true, gap, alignItems, flexWrap }, children);
1003
+ var import_react12 = require("react");
1004
+ var React21 = __toESM(require("react"));
1005
+ var import_ui17 = require("@elementor/ui");
1006
+ var PopoverGridContainer = (0, import_react12.forwardRef)(
1007
+ ({ gap = 1.5, alignItems = "center", flexWrap = "nowrap", children }, ref) => /* @__PURE__ */ React21.createElement(import_ui17.Grid, { container: true, gap, alignItems, flexWrap, ref }, children)
1008
+ );
818
1009
 
819
1010
  // src/components/repeater.tsx
820
- var React23 = __toESM(require("react"));
821
- var import_react10 = require("react");
822
- var import_icons3 = require("@elementor/icons");
823
- var import_ui17 = require("@elementor/ui");
1011
+ var React25 = __toESM(require("react"));
1012
+ var import_react14 = require("react");
1013
+ var import_icons4 = require("@elementor/icons");
1014
+ var import_ui19 = require("@elementor/ui");
824
1015
  var import_i18n4 = require("@wordpress/i18n");
825
1016
 
826
1017
  // src/control-adornments/control-adornments.tsx
827
- var React21 = __toESM(require("react"));
1018
+ var React23 = __toESM(require("react"));
828
1019
 
829
1020
  // src/control-adornments/control-adornments-context.tsx
830
- var React20 = __toESM(require("react"));
831
- var import_react9 = require("react");
832
- var Context2 = (0, import_react9.createContext)(null);
833
- var ControlAdornmentsProvider = ({ children, items }) => /* @__PURE__ */ React20.createElement(Context2.Provider, { value: { items } }, children);
1021
+ var React22 = __toESM(require("react"));
1022
+ var import_react13 = require("react");
1023
+ var Context2 = (0, import_react13.createContext)(null);
1024
+ var ControlAdornmentsProvider = ({ children, items }) => /* @__PURE__ */ React22.createElement(Context2.Provider, { value: { items } }, children);
834
1025
  var useControlAdornments = () => {
835
- const context = (0, import_react9.useContext)(Context2);
1026
+ const context = (0, import_react13.useContext)(Context2);
836
1027
  return context?.items ?? [];
837
1028
  };
838
1029
 
@@ -842,7 +1033,7 @@ function ControlAdornments() {
842
1033
  if (items?.length === 0) {
843
1034
  return null;
844
1035
  }
845
- return /* @__PURE__ */ React21.createElement(React21.Fragment, null, items.map(({ Adornment, id }) => /* @__PURE__ */ React21.createElement(Adornment, { key: id })));
1036
+ return /* @__PURE__ */ React23.createElement(React23.Fragment, null, items.map(({ Adornment, id }) => /* @__PURE__ */ React23.createElement(Adornment, { key: id })));
846
1037
  }
847
1038
 
848
1039
  // src/locations.ts
@@ -851,15 +1042,15 @@ var { Slot: RepeaterItemIconSlot, inject: injectIntoRepeaterItemIcon } = (0, imp
851
1042
  var { Slot: RepeaterItemLabelSlot, inject: injectIntoRepeaterItemLabel } = (0, import_locations.createReplaceableLocation)();
852
1043
 
853
1044
  // src/components/sortable.tsx
854
- var React22 = __toESM(require("react"));
855
- var import_icons2 = require("@elementor/icons");
856
- var import_ui16 = require("@elementor/ui");
1045
+ var React24 = __toESM(require("react"));
1046
+ var import_icons3 = require("@elementor/icons");
1047
+ var import_ui18 = require("@elementor/ui");
857
1048
  var SortableProvider = (props) => {
858
- return /* @__PURE__ */ React22.createElement(import_ui16.List, { sx: { p: 0, my: -0.5, mx: 0 } }, /* @__PURE__ */ React22.createElement(import_ui16.UnstableSortableProvider, { restrictAxis: true, disableDragOverlay: false, variant: "static", ...props }));
1049
+ return /* @__PURE__ */ React24.createElement(import_ui18.List, { sx: { p: 0, my: -0.5, mx: 0 } }, /* @__PURE__ */ React24.createElement(import_ui18.UnstableSortableProvider, { restrictAxis: true, disableDragOverlay: false, variant: "static", ...props }));
859
1050
  };
860
1051
  var SortableItem = ({ id, children, disabled }) => {
861
- return /* @__PURE__ */ React22.createElement(
862
- import_ui16.UnstableSortableItem,
1052
+ return /* @__PURE__ */ React24.createElement(
1053
+ import_ui18.UnstableSortableItem,
863
1054
  {
864
1055
  id,
865
1056
  disabled,
@@ -871,12 +1062,12 @@ var SortableItem = ({ id, children, disabled }) => {
871
1062
  showDropIndication,
872
1063
  dropIndicationStyle
873
1064
  }) => {
874
- return /* @__PURE__ */ React22.createElement(StyledListItem, { ...itemProps, style: itemStyle }, !disabled && /* @__PURE__ */ React22.createElement(SortableTrigger, { ...triggerProps, style: triggerStyle }), children, showDropIndication && /* @__PURE__ */ React22.createElement(StyledDivider, { style: dropIndicationStyle }));
1065
+ return /* @__PURE__ */ React24.createElement(StyledListItem, { ...itemProps, style: itemStyle }, !disabled && /* @__PURE__ */ React24.createElement(SortableTrigger, { ...triggerProps, style: triggerStyle }), children, showDropIndication && /* @__PURE__ */ React24.createElement(StyledDivider, { style: dropIndicationStyle }));
875
1066
  }
876
1067
  }
877
1068
  );
878
1069
  };
879
- var StyledListItem = (0, import_ui16.styled)(import_ui16.ListItem)`
1070
+ var StyledListItem = (0, import_ui18.styled)(import_ui18.ListItem)`
880
1071
  position: relative;
881
1072
  margin-inline: 0px;
882
1073
  padding-inline: 0px;
@@ -905,8 +1096,8 @@ var StyledListItem = (0, import_ui16.styled)(import_ui16.ListItem)`
905
1096
  }
906
1097
  }
907
1098
  `;
908
- var SortableTrigger = (props) => /* @__PURE__ */ React22.createElement("div", { ...props, role: "button", className: "class-item-sortable-trigger" }, /* @__PURE__ */ React22.createElement(import_icons2.GripVerticalIcon, { fontSize: "tiny" }));
909
- var StyledDivider = (0, import_ui16.styled)(import_ui16.Divider)`
1099
+ var SortableTrigger = (props) => /* @__PURE__ */ React24.createElement("div", { ...props, role: "button", className: "class-item-sortable-trigger" }, /* @__PURE__ */ React24.createElement(import_icons3.GripVerticalIcon, { fontSize: "tiny" }));
1100
+ var StyledDivider = (0, import_ui18.styled)(import_ui18.Divider)`
910
1101
  height: 0px;
911
1102
  border: none;
912
1103
  overflow: visible;
@@ -933,16 +1124,18 @@ var Repeater = ({
933
1124
  openOnAdd = false,
934
1125
  addToBottom = false,
935
1126
  values: repeaterValues = [],
936
- setValues: setRepeaterValues
1127
+ setValues: setRepeaterValues,
1128
+ showDuplicate = true,
1129
+ showToggle = true
937
1130
  }) => {
938
- const [openItem, setOpenItem] = (0, import_react10.useState)(EMPTY_OPEN_ITEM);
1131
+ const [openItem, setOpenItem] = (0, import_react14.useState)(EMPTY_OPEN_ITEM);
939
1132
  const [items, setItems] = useSyncExternalState({
940
1133
  external: repeaterValues,
941
1134
  // @ts-expect-error - as long as persistWhen => true, value will never be null
942
1135
  setExternal: setRepeaterValues,
943
1136
  persistWhen: () => true
944
1137
  });
945
- const [uniqueKeys, setUniqueKeys] = (0, import_react10.useState)(items.map((_, index) => index));
1138
+ const [uniqueKeys, setUniqueKeys] = (0, import_react14.useState)(items.map((_, index) => index));
946
1139
  const generateNextKey = (source) => {
947
1140
  return 1 + Math.max(0, ...source);
948
1141
  };
@@ -999,8 +1192,8 @@ var Repeater = ({
999
1192
  });
1000
1193
  });
1001
1194
  };
1002
- return /* @__PURE__ */ React23.createElement(SectionContent, null, /* @__PURE__ */ React23.createElement(
1003
- import_ui17.Stack,
1195
+ return /* @__PURE__ */ React25.createElement(SectionContent, null, /* @__PURE__ */ React25.createElement(
1196
+ import_ui19.Stack,
1004
1197
  {
1005
1198
  direction: "row",
1006
1199
  justifyContent: "start",
@@ -1008,10 +1201,10 @@ var Repeater = ({
1008
1201
  gap: 1,
1009
1202
  sx: { marginInlineEnd: -0.75 }
1010
1203
  },
1011
- /* @__PURE__ */ React23.createElement(import_ui17.Typography, { component: "label", variant: "caption", color: "text.secondary" }, label),
1012
- /* @__PURE__ */ React23.createElement(ControlAdornments, null),
1013
- /* @__PURE__ */ React23.createElement(
1014
- import_ui17.IconButton,
1204
+ /* @__PURE__ */ React25.createElement(import_ui19.Typography, { component: "label", variant: "caption", color: "text.secondary" }, label),
1205
+ /* @__PURE__ */ React25.createElement(ControlAdornments, null),
1206
+ /* @__PURE__ */ React25.createElement(
1207
+ import_ui19.IconButton,
1015
1208
  {
1016
1209
  size: SIZE,
1017
1210
  sx: { ml: "auto" },
@@ -1019,27 +1212,29 @@ var Repeater = ({
1019
1212
  onClick: addRepeaterItem,
1020
1213
  "aria-label": (0, import_i18n4.__)("Add item", "elementor")
1021
1214
  },
1022
- /* @__PURE__ */ React23.createElement(import_icons3.PlusIcon, { fontSize: SIZE })
1215
+ /* @__PURE__ */ React25.createElement(import_icons4.PlusIcon, { fontSize: SIZE })
1023
1216
  )
1024
- ), 0 < uniqueKeys.length && /* @__PURE__ */ React23.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key, index) => {
1217
+ ), 0 < uniqueKeys.length && /* @__PURE__ */ React25.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key, index) => {
1025
1218
  const value = items[index];
1026
1219
  if (!value) {
1027
1220
  return null;
1028
1221
  }
1029
- return /* @__PURE__ */ React23.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled }, /* @__PURE__ */ React23.createElement(
1222
+ return /* @__PURE__ */ React25.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled }, /* @__PURE__ */ React25.createElement(
1030
1223
  RepeaterItem,
1031
1224
  {
1032
1225
  disabled,
1033
1226
  propDisabled: value?.disabled,
1034
- label: /* @__PURE__ */ React23.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React23.createElement(itemSettings.Label, { value })),
1035
- startIcon: /* @__PURE__ */ React23.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React23.createElement(itemSettings.Icon, { value })),
1227
+ label: /* @__PURE__ */ React25.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React25.createElement(itemSettings.Label, { value })),
1228
+ startIcon: /* @__PURE__ */ React25.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React25.createElement(itemSettings.Icon, { value })),
1036
1229
  removeItem: () => removeRepeaterItem(index),
1037
1230
  duplicateItem: () => duplicateRepeaterItem(index),
1038
1231
  toggleDisableItem: () => toggleDisableRepeaterItem(index),
1039
1232
  openOnMount: openOnAdd && openItem === key,
1040
- onOpen: () => setOpenItem(EMPTY_OPEN_ITEM)
1233
+ onOpen: () => setOpenItem(EMPTY_OPEN_ITEM),
1234
+ showDuplicate,
1235
+ showToggle
1041
1236
  },
1042
- (props) => /* @__PURE__ */ React23.createElement(itemSettings.Content, { ...props, value, bind: String(index) })
1237
+ (props) => /* @__PURE__ */ React25.createElement(itemSettings.Content, { ...props, value, bind: String(index) })
1043
1238
  ));
1044
1239
  })));
1045
1240
  };
@@ -1053,15 +1248,17 @@ var RepeaterItem = ({
1053
1248
  toggleDisableItem,
1054
1249
  openOnMount,
1055
1250
  onOpen,
1251
+ showDuplicate,
1252
+ showToggle,
1056
1253
  disabled
1057
1254
  }) => {
1058
- const [anchorEl, setAnchorEl] = (0, import_react10.useState)(null);
1255
+ const [anchorEl, setAnchorEl] = (0, import_react14.useState)(null);
1059
1256
  const { popoverState, popoverProps, ref, setRef } = usePopover(openOnMount, onOpen);
1060
1257
  const duplicateLabel = (0, import_i18n4.__)("Duplicate", "elementor");
1061
1258
  const toggleLabel = propDisabled ? (0, import_i18n4.__)("Show", "elementor") : (0, import_i18n4.__)("Hide", "elementor");
1062
1259
  const removeLabel = (0, import_i18n4.__)("Remove", "elementor");
1063
- return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(
1064
- import_ui17.UnstableTag,
1260
+ return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(
1261
+ import_ui19.UnstableTag,
1065
1262
  {
1066
1263
  disabled,
1067
1264
  label,
@@ -1070,12 +1267,12 @@ var RepeaterItem = ({
1070
1267
  ref: setRef,
1071
1268
  variant: "outlined",
1072
1269
  "aria-label": (0, import_i18n4.__)("Open item", "elementor"),
1073
- ...(0, import_ui17.bindTrigger)(popoverState),
1270
+ ...(0, import_ui19.bindTrigger)(popoverState),
1074
1271
  startIcon,
1075
- actions: /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(import_ui17.Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React23.createElement(import_ui17.IconButton, { size: SIZE, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React23.createElement(import_icons3.CopyIcon, { fontSize: SIZE }))), /* @__PURE__ */ React23.createElement(import_ui17.Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React23.createElement(import_ui17.IconButton, { size: SIZE, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React23.createElement(import_icons3.EyeOffIcon, { fontSize: SIZE }) : /* @__PURE__ */ React23.createElement(import_icons3.EyeIcon, { fontSize: SIZE }))), /* @__PURE__ */ React23.createElement(import_ui17.Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React23.createElement(import_ui17.IconButton, { size: SIZE, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React23.createElement(import_icons3.XIcon, { fontSize: SIZE }))))
1272
+ actions: /* @__PURE__ */ React25.createElement(React25.Fragment, null, showDuplicate && /* @__PURE__ */ React25.createElement(import_ui19.Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React25.createElement(import_ui19.IconButton, { size: SIZE, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React25.createElement(import_icons4.CopyIcon, { fontSize: SIZE }))), showToggle && /* @__PURE__ */ React25.createElement(import_ui19.Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React25.createElement(import_ui19.IconButton, { size: SIZE, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React25.createElement(import_icons4.EyeOffIcon, { fontSize: SIZE }) : /* @__PURE__ */ React25.createElement(import_icons4.EyeIcon, { fontSize: SIZE }))), /* @__PURE__ */ React25.createElement(import_ui19.Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React25.createElement(import_ui19.IconButton, { size: SIZE, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React25.createElement(import_icons4.XIcon, { fontSize: SIZE }))))
1076
1273
  }
1077
- ), /* @__PURE__ */ React23.createElement(
1078
- import_ui17.Popover,
1274
+ ), /* @__PURE__ */ React25.createElement(
1275
+ import_ui19.Popover,
1079
1276
  {
1080
1277
  disablePortal: true,
1081
1278
  slotProps: {
@@ -1088,14 +1285,14 @@ var RepeaterItem = ({
1088
1285
  ...popoverProps,
1089
1286
  anchorEl: ref
1090
1287
  },
1091
- /* @__PURE__ */ React23.createElement(import_ui17.Box, null, children({ anchorEl }))
1288
+ /* @__PURE__ */ React25.createElement(import_ui19.Box, null, children({ anchorEl }))
1092
1289
  ));
1093
1290
  };
1094
1291
  var usePopover = (openOnMount, onOpen) => {
1095
- const [ref, setRef] = (0, import_react10.useState)(null);
1096
- const popoverState = (0, import_ui17.usePopupState)({ variant: "popover" });
1097
- const popoverProps = (0, import_ui17.bindPopover)(popoverState);
1098
- (0, import_react10.useEffect)(() => {
1292
+ const [ref, setRef] = (0, import_react14.useState)(null);
1293
+ const popoverState = (0, import_ui19.usePopupState)({ variant: "popover" });
1294
+ const popoverProps = (0, import_ui19.bindPopover)(popoverState);
1295
+ (0, import_react14.useEffect)(() => {
1099
1296
  if (openOnMount && ref) {
1100
1297
  popoverState.open(ref);
1101
1298
  onOpen?.();
@@ -1112,7 +1309,7 @@ var usePopover = (openOnMount, onOpen) => {
1112
1309
  // src/controls/box-shadow-repeater-control.tsx
1113
1310
  var BoxShadowRepeaterControl = createControl(() => {
1114
1311
  const { propType, value, setValue, disabled } = useBoundProp(import_editor_props9.boxShadowPropTypeUtil);
1115
- return /* @__PURE__ */ React24.createElement(PropProvider, { propType, value, setValue, disabled }, /* @__PURE__ */ React24.createElement(
1312
+ return /* @__PURE__ */ React26.createElement(PropProvider, { propType, value, setValue, disabled }, /* @__PURE__ */ React26.createElement(
1116
1313
  Repeater,
1117
1314
  {
1118
1315
  openOnAdd: true,
@@ -1129,13 +1326,14 @@ var BoxShadowRepeaterControl = createControl(() => {
1129
1326
  }
1130
1327
  ));
1131
1328
  });
1132
- var ItemIcon = ({ value }) => /* @__PURE__ */ React24.createElement(import_ui18.UnstableColorIndicator, { size: "inherit", component: "span", value: value.value.color?.value });
1329
+ var ItemIcon = ({ value }) => /* @__PURE__ */ React26.createElement(import_ui20.UnstableColorIndicator, { size: "inherit", component: "span", value: value.value.color?.value });
1133
1330
  var ItemContent = ({ anchorEl, bind }) => {
1134
- return /* @__PURE__ */ React24.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React24.createElement(Content, { anchorEl }));
1331
+ return /* @__PURE__ */ React26.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React26.createElement(Content, { anchorEl }));
1135
1332
  };
1136
1333
  var Content = ({ anchorEl }) => {
1137
1334
  const context = useBoundProp(import_editor_props9.shadowPropTypeUtil);
1138
- return /* @__PURE__ */ React24.createElement(PropProvider, { ...context }, /* @__PURE__ */ React24.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React24.createElement(PopoverGridContainer, null, /* @__PURE__ */ React24.createElement(Control2, { bind: "color", label: (0, import_i18n5.__)("Color", "elementor") }, /* @__PURE__ */ React24.createElement(ColorControl, { anchorEl })), /* @__PURE__ */ React24.createElement(Control2, { bind: "position", label: (0, import_i18n5.__)("Position", "elementor"), sx: { overflow: "hidden" } }, /* @__PURE__ */ React24.createElement(
1335
+ const rowRef = [(0, import_react15.useRef)(), (0, import_react15.useRef)()];
1336
+ return /* @__PURE__ */ React26.createElement(PropProvider, { ...context }, /* @__PURE__ */ React26.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React26.createElement(PopoverGridContainer, null, /* @__PURE__ */ React26.createElement(Control2, { bind: "color", label: (0, import_i18n5.__)("Color", "elementor") }, /* @__PURE__ */ React26.createElement(ColorControl, { anchorEl })), /* @__PURE__ */ React26.createElement(Control2, { bind: "position", label: (0, import_i18n5.__)("Position", "elementor"), sx: { overflow: "hidden" } }, /* @__PURE__ */ React26.createElement(
1139
1337
  SelectControl,
1140
1338
  {
1141
1339
  options: [
@@ -1143,14 +1341,14 @@ var Content = ({ anchorEl }) => {
1143
1341
  { label: (0, import_i18n5.__)("Outset", "elementor"), value: null }
1144
1342
  ]
1145
1343
  }
1146
- ))), /* @__PURE__ */ React24.createElement(PopoverGridContainer, null, /* @__PURE__ */ React24.createElement(Control2, { bind: "hOffset", label: (0, import_i18n5.__)("Horizontal", "elementor") }, /* @__PURE__ */ React24.createElement(SizeControl, null)), /* @__PURE__ */ React24.createElement(Control2, { bind: "vOffset", label: (0, import_i18n5.__)("Vertical", "elementor") }, /* @__PURE__ */ React24.createElement(SizeControl, null))), /* @__PURE__ */ React24.createElement(PopoverGridContainer, null, /* @__PURE__ */ React24.createElement(Control2, { bind: "blur", label: (0, import_i18n5.__)("Blur", "elementor") }, /* @__PURE__ */ React24.createElement(SizeControl, null)), /* @__PURE__ */ React24.createElement(Control2, { bind: "spread", label: (0, import_i18n5.__)("Spread", "elementor") }, /* @__PURE__ */ React24.createElement(SizeControl, null)))));
1344
+ ))), /* @__PURE__ */ React26.createElement(PopoverGridContainer, { ref: rowRef[0] }, /* @__PURE__ */ React26.createElement(Control2, { bind: "hOffset", label: (0, import_i18n5.__)("Horizontal", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[0] })), /* @__PURE__ */ React26.createElement(Control2, { bind: "vOffset", label: (0, import_i18n5.__)("Vertical", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[0] }))), /* @__PURE__ */ React26.createElement(PopoverGridContainer, { ref: rowRef[1] }, /* @__PURE__ */ React26.createElement(Control2, { bind: "blur", label: (0, import_i18n5.__)("Blur", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[1] })), /* @__PURE__ */ React26.createElement(Control2, { bind: "spread", label: (0, import_i18n5.__)("Spread", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[1] })))));
1147
1345
  };
1148
1346
  var Control2 = ({
1149
1347
  label,
1150
1348
  bind,
1151
1349
  children,
1152
1350
  sx
1153
- }) => /* @__PURE__ */ React24.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React24.createElement(import_ui18.Grid, { item: true, xs: 6, sx }, /* @__PURE__ */ React24.createElement(import_ui18.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React24.createElement(import_ui18.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React24.createElement(import_ui18.FormLabel, { size: "tiny" }, label)), /* @__PURE__ */ React24.createElement(import_ui18.Grid, { item: true, xs: 12 }, children))));
1351
+ }) => /* @__PURE__ */ React26.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React26.createElement(import_ui20.Grid, { item: true, xs: 6, sx }, /* @__PURE__ */ React26.createElement(import_ui20.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React26.createElement(import_ui20.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React26.createElement(import_ui20.FormLabel, { size: "tiny" }, label)), /* @__PURE__ */ React26.createElement(import_ui20.Grid, { item: true, xs: 12 }, children))));
1154
1352
  var ItemLabel = ({ value }) => {
1155
1353
  const { position, hOffset, vOffset, blur, spread } = value.value;
1156
1354
  const { size: blurSize = "", unit: blurUnit = "" } = blur?.value || {};
@@ -1164,7 +1362,7 @@ var ItemLabel = ({ value }) => {
1164
1362
  blurSize + blurUnit,
1165
1363
  spreadSize + spreadUnit
1166
1364
  ].join(" ");
1167
- return /* @__PURE__ */ React24.createElement("span", { style: { textTransform: "capitalize" } }, positionLabel, ": ", sizes);
1365
+ return /* @__PURE__ */ React26.createElement("span", { style: { textTransform: "capitalize" } }, positionLabel, ": ", sizes);
1168
1366
  };
1169
1367
  var initialShadow = {
1170
1368
  $$type: "shadow",
@@ -1194,28 +1392,28 @@ var initialShadow = {
1194
1392
  };
1195
1393
 
1196
1394
  // src/controls/toggle-control.tsx
1197
- var React27 = __toESM(require("react"));
1395
+ var React29 = __toESM(require("react"));
1198
1396
  var import_editor_props10 = require("@elementor/editor-props");
1199
1397
 
1200
1398
  // src/components/control-toggle-button-group.tsx
1201
- var React26 = __toESM(require("react"));
1202
- var import_react11 = require("react");
1203
- var import_icons4 = require("@elementor/icons");
1204
- var import_ui20 = require("@elementor/ui");
1399
+ var React28 = __toESM(require("react"));
1400
+ var import_react16 = require("react");
1401
+ var import_icons5 = require("@elementor/icons");
1402
+ var import_ui22 = require("@elementor/ui");
1205
1403
 
1206
1404
  // src/components/conditional-tooltip.tsx
1207
- var React25 = __toESM(require("react"));
1208
- var import_ui19 = require("@elementor/ui");
1405
+ var React27 = __toESM(require("react"));
1406
+ var import_ui21 = require("@elementor/ui");
1209
1407
  var ConditionalTooltip = ({
1210
1408
  showTooltip,
1211
1409
  children,
1212
1410
  label
1213
1411
  }) => {
1214
- return showTooltip && label ? /* @__PURE__ */ React25.createElement(import_ui19.Tooltip, { title: label, disableFocusListener: true, placement: "top" }, children) : children;
1412
+ return showTooltip && label ? /* @__PURE__ */ React27.createElement(import_ui21.Tooltip, { title: label, disableFocusListener: true, placement: "top" }, children) : children;
1215
1413
  };
1216
1414
 
1217
1415
  // src/components/control-toggle-button-group.tsx
1218
- var StyledToggleButtonGroup = (0, import_ui20.styled)(import_ui20.ToggleButtonGroup)`
1416
+ var StyledToggleButtonGroup = (0, import_ui22.styled)(import_ui22.ToggleButtonGroup)`
1219
1417
  ${({ justify }) => `justify-content: ${justify};`}
1220
1418
  button:not( :last-of-type ) {
1221
1419
  border-start-end-radius: 0;
@@ -1244,17 +1442,17 @@ var ControlToggleButtonGroup = ({
1244
1442
  const shouldSliceItems = exclusive && maxItems !== void 0 && items.length > maxItems;
1245
1443
  const menuItems = shouldSliceItems ? items.slice(maxItems - 1) : [];
1246
1444
  const fixedItems = shouldSliceItems ? items.slice(0, maxItems - 1) : items;
1247
- const isRtl = "rtl" === (0, import_ui20.useTheme)().direction;
1445
+ const isRtl = "rtl" === (0, import_ui22.useTheme)().direction;
1248
1446
  const handleChange = (_, newValue) => {
1249
1447
  onChange(newValue);
1250
1448
  };
1251
- const getGridTemplateColumns = (0, import_react11.useMemo)(() => {
1449
+ const getGridTemplateColumns = (0, import_react16.useMemo)(() => {
1252
1450
  const isOffLimits = menuItems?.length;
1253
1451
  const itemsCount = isOffLimits ? fixedItems.length + 1 : fixedItems.length;
1254
1452
  const templateColumnsSuffix = isOffLimits ? "auto" : "";
1255
1453
  return `repeat(${itemsCount}, minmax(0, 25%)) ${templateColumnsSuffix}`;
1256
1454
  }, [menuItems?.length, fixedItems.length]);
1257
- return /* @__PURE__ */ React26.createElement(ControlActions, null, /* @__PURE__ */ React26.createElement(
1455
+ return /* @__PURE__ */ React28.createElement(ControlActions, null, /* @__PURE__ */ React28.createElement(
1258
1456
  StyledToggleButtonGroup,
1259
1457
  {
1260
1458
  justify,
@@ -1269,16 +1467,16 @@ var ControlToggleButtonGroup = ({
1269
1467
  width: `100%`
1270
1468
  }
1271
1469
  },
1272
- fixedItems.map(({ label, value: buttonValue, renderContent: Content3, showTooltip }) => /* @__PURE__ */ React26.createElement(
1470
+ fixedItems.map(({ label, value: buttonValue, renderContent: Content4, showTooltip }) => /* @__PURE__ */ React28.createElement(
1273
1471
  ConditionalTooltip,
1274
1472
  {
1275
1473
  key: buttonValue,
1276
1474
  label,
1277
1475
  showTooltip: showTooltip || false
1278
1476
  },
1279
- /* @__PURE__ */ React26.createElement(import_ui20.ToggleButton, { value: buttonValue, "aria-label": label, size, fullWidth }, /* @__PURE__ */ React26.createElement(Content3, { size }))
1477
+ /* @__PURE__ */ React28.createElement(import_ui22.ToggleButton, { value: buttonValue, "aria-label": label, size, fullWidth }, /* @__PURE__ */ React28.createElement(Content4, { size }))
1280
1478
  )),
1281
- menuItems.length && exclusive && /* @__PURE__ */ React26.createElement(
1479
+ menuItems.length && exclusive && /* @__PURE__ */ React28.createElement(
1282
1480
  SplitButtonGroup,
1283
1481
  {
1284
1482
  size,
@@ -1298,8 +1496,8 @@ var SplitButtonGroup = ({
1298
1496
  value
1299
1497
  }) => {
1300
1498
  const previewButton = usePreviewButton(items, value);
1301
- const [isMenuOpen, setIsMenuOpen] = (0, import_react11.useState)(false);
1302
- const menuButtonRef = (0, import_react11.useRef)(null);
1499
+ const [isMenuOpen, setIsMenuOpen] = (0, import_react16.useState)(false);
1500
+ const menuButtonRef = (0, import_react16.useRef)(null);
1303
1501
  const onMenuToggle = (ev) => {
1304
1502
  setIsMenuOpen((prev) => !prev);
1305
1503
  ev.preventDefault();
@@ -1312,8 +1510,8 @@ var SplitButtonGroup = ({
1312
1510
  const shouldRemove = newValue === value;
1313
1511
  onChange(shouldRemove ? null : newValue);
1314
1512
  };
1315
- return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(
1316
- import_ui20.ToggleButton,
1513
+ return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(
1514
+ import_ui22.ToggleButton,
1317
1515
  {
1318
1516
  value: previewButton.value,
1319
1517
  "aria-label": previewButton.label,
@@ -1326,8 +1524,8 @@ var SplitButtonGroup = ({
1326
1524
  ref: menuButtonRef
1327
1525
  },
1328
1526
  previewButton.renderContent({ size })
1329
- ), /* @__PURE__ */ React26.createElement(
1330
- import_ui20.ToggleButton,
1527
+ ), /* @__PURE__ */ React28.createElement(
1528
+ import_ui22.ToggleButton,
1331
1529
  {
1332
1530
  size,
1333
1531
  "aria-expanded": isMenuOpen ? "true" : void 0,
@@ -1337,9 +1535,9 @@ var SplitButtonGroup = ({
1337
1535
  ref: menuButtonRef,
1338
1536
  value: "__chevron-icon-button__"
1339
1537
  },
1340
- /* @__PURE__ */ React26.createElement(import_icons4.ChevronDownIcon, { fontSize: size })
1341
- ), /* @__PURE__ */ React26.createElement(
1342
- import_ui20.Menu,
1538
+ /* @__PURE__ */ React28.createElement(import_icons5.ChevronDownIcon, { fontSize: size })
1539
+ ), /* @__PURE__ */ React28.createElement(
1540
+ import_ui22.Menu,
1343
1541
  {
1344
1542
  open: isMenuOpen,
1345
1543
  onClose: () => setIsMenuOpen(false),
@@ -1356,22 +1554,22 @@ var SplitButtonGroup = ({
1356
1554
  mt: 0.5
1357
1555
  }
1358
1556
  },
1359
- items.map(({ label, value: buttonValue }) => /* @__PURE__ */ React26.createElement(
1360
- import_ui20.MenuItem,
1557
+ items.map(({ label, value: buttonValue }) => /* @__PURE__ */ React28.createElement(
1558
+ import_ui22.MenuItem,
1361
1559
  {
1362
1560
  key: buttonValue,
1363
1561
  selected: buttonValue === value,
1364
1562
  onClick: () => onMenuItemClick(buttonValue)
1365
1563
  },
1366
- /* @__PURE__ */ React26.createElement(import_ui20.ListItemText, null, /* @__PURE__ */ React26.createElement(import_ui20.Typography, { sx: { fontSize: "14px" } }, label))
1564
+ /* @__PURE__ */ React28.createElement(import_ui22.ListItemText, null, /* @__PURE__ */ React28.createElement(import_ui22.Typography, { sx: { fontSize: "14px" } }, label))
1367
1565
  ))
1368
1566
  ));
1369
1567
  };
1370
1568
  var usePreviewButton = (items, value) => {
1371
- const [previewButton, setPreviewButton] = (0, import_react11.useState)(
1569
+ const [previewButton, setPreviewButton] = (0, import_react16.useState)(
1372
1570
  items.find((item) => item.value === value) ?? items[0]
1373
1571
  );
1374
- (0, import_react11.useEffect)(() => {
1572
+ (0, import_react16.useEffect)(() => {
1375
1573
  const selectedButton = items.find((item) => item.value === value);
1376
1574
  if (selectedButton) {
1377
1575
  setPreviewButton(selectedButton);
@@ -1403,7 +1601,7 @@ var ToggleControl = createControl(
1403
1601
  fullWidth,
1404
1602
  size
1405
1603
  };
1406
- return exclusive ? /* @__PURE__ */ React27.createElement(
1604
+ return exclusive ? /* @__PURE__ */ React29.createElement(
1407
1605
  ControlToggleButtonGroup,
1408
1606
  {
1409
1607
  ...toggleButtonGroupProps,
@@ -1412,7 +1610,7 @@ var ToggleControl = createControl(
1412
1610
  disabled,
1413
1611
  exclusive: true
1414
1612
  }
1415
- ) : /* @__PURE__ */ React27.createElement(
1613
+ ) : /* @__PURE__ */ React29.createElement(
1416
1614
  ControlToggleButtonGroup,
1417
1615
  {
1418
1616
  ...toggleButtonGroupProps,
@@ -1426,9 +1624,9 @@ var ToggleControl = createControl(
1426
1624
  );
1427
1625
 
1428
1626
  // src/controls/number-control.tsx
1429
- var React28 = __toESM(require("react"));
1627
+ var React30 = __toESM(require("react"));
1430
1628
  var import_editor_props11 = require("@elementor/editor-props");
1431
- var import_ui21 = require("@elementor/ui");
1629
+ var import_ui23 = require("@elementor/ui");
1432
1630
  var isEmptyOrNaN = (value) => value === null || value === void 0 || value === "" || Number.isNaN(Number(value));
1433
1631
  var RESTRICTED_INPUT_KEYS2 = ["e", "E", "+", "-"];
1434
1632
  var NumberControl = createControl(
@@ -1449,8 +1647,8 @@ var NumberControl = createControl(
1449
1647
  const formattedValue = shouldForceInt ? +parseInt(eventValue) : Number(eventValue);
1450
1648
  setValue(Math.min(Math.max(formattedValue, min), max));
1451
1649
  };
1452
- return /* @__PURE__ */ React28.createElement(ControlActions, null, /* @__PURE__ */ React28.createElement(
1453
- import_ui21.TextField,
1650
+ return /* @__PURE__ */ React30.createElement(ControlActions, null, /* @__PURE__ */ React30.createElement(
1651
+ import_ui23.TextField,
1454
1652
  {
1455
1653
  size: "tiny",
1456
1654
  type: "number",
@@ -1471,18 +1669,18 @@ var NumberControl = createControl(
1471
1669
  );
1472
1670
 
1473
1671
  // src/controls/equal-unequal-sizes-control.tsx
1474
- var React30 = __toESM(require("react"));
1475
- var import_react12 = require("react");
1672
+ var React32 = __toESM(require("react"));
1673
+ var import_react17 = require("react");
1476
1674
  var import_editor_props12 = require("@elementor/editor-props");
1477
- var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
1478
- var import_ui23 = require("@elementor/ui");
1675
+ var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
1676
+ var import_ui25 = require("@elementor/ui");
1479
1677
  var import_i18n6 = require("@wordpress/i18n");
1480
1678
 
1481
1679
  // src/components/control-label.tsx
1482
- var React29 = __toESM(require("react"));
1483
- var import_ui22 = require("@elementor/ui");
1680
+ var React31 = __toESM(require("react"));
1681
+ var import_ui24 = require("@elementor/ui");
1484
1682
  var ControlLabel = ({ children }) => {
1485
- return /* @__PURE__ */ React29.createElement(import_ui22.Stack, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React29.createElement(ControlFormLabel, null, children), /* @__PURE__ */ React29.createElement(ControlAdornments, null));
1683
+ return /* @__PURE__ */ React31.createElement(import_ui24.Stack, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React31.createElement(ControlFormLabel, null, children), /* @__PURE__ */ React31.createElement(ControlAdornments, null));
1486
1684
  };
1487
1685
 
1488
1686
  // src/controls/equal-unequal-sizes-control.tsx
@@ -1503,9 +1701,8 @@ function EqualUnequalSizesControl({
1503
1701
  items,
1504
1702
  multiSizePropTypeUtil
1505
1703
  }) {
1506
- const popupId = (0, import_react12.useId)();
1507
- const controlRef = (0, import_react12.useRef)(null);
1508
- const popupState = (0, import_ui23.usePopupState)({ variant: "popover", popupId });
1704
+ const popupId = (0, import_react17.useId)();
1705
+ const popupState = (0, import_ui25.usePopupState)({ variant: "popover", popupId });
1509
1706
  const {
1510
1707
  propType: multiSizePropType,
1511
1708
  value: multiSizeValue,
@@ -1513,6 +1710,7 @@ function EqualUnequalSizesControl({
1513
1710
  disabled: multiSizeDisabled
1514
1711
  } = useBoundProp(multiSizePropTypeUtil);
1515
1712
  const { value: sizeValue, setValue: setSizeValue } = useBoundProp(import_editor_props12.sizePropTypeUtil);
1713
+ const rowRefs = [(0, import_react17.useRef)(), (0, import_react17.useRef)()];
1516
1714
  const splitEqualValue = () => {
1517
1715
  if (!sizeValue) {
1518
1716
  return null;
@@ -1539,21 +1737,27 @@ function EqualUnequalSizesControl({
1539
1737
  }
1540
1738
  return splitEqualValue() ?? null;
1541
1739
  };
1542
- const isShowingGeneralIndicator = !(0, import_editor_v1_adapters.isExperimentActive)("e_v_3_30") || !popupState.isOpen;
1740
+ const isShowingGeneralIndicator = !(0, import_editor_v1_adapters2.isExperimentActive)("e_v_3_30") || !popupState.isOpen;
1543
1741
  const isMixed = !!multiSizeValue;
1544
- return /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: controlRef }, /* @__PURE__ */ React30.createElement(import_ui23.Grid, { item: true, xs: 6 }, !isShowingGeneralIndicator ? /* @__PURE__ */ React30.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React30.createElement(ControlLabel, null, label)), /* @__PURE__ */ React30.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(import_ui23.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React30.createElement(SizeControl, { placeholder: isMixed ? (0, import_i18n6.__)("Mixed", "elementor") : void 0 }), /* @__PURE__ */ React30.createElement(import_ui23.Tooltip, { title: tooltipLabel, placement: "top" }, /* @__PURE__ */ React30.createElement(
1545
- import_ui23.ToggleButton,
1742
+ return /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(import_ui25.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React32.createElement(import_ui25.Grid, { item: true, xs: 6 }, !isShowingGeneralIndicator ? /* @__PURE__ */ React32.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React32.createElement(ControlLabel, null, label)), /* @__PURE__ */ React32.createElement(import_ui25.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(import_ui25.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React32.createElement(
1743
+ SizeControl,
1744
+ {
1745
+ placeholder: isMixed ? (0, import_i18n6.__)("Mixed", "elementor") : void 0,
1746
+ anchorRef: rowRefs[0]
1747
+ }
1748
+ ), /* @__PURE__ */ React32.createElement(import_ui25.Tooltip, { title: tooltipLabel, placement: "top" }, /* @__PURE__ */ React32.createElement(
1749
+ import_ui25.ToggleButton,
1546
1750
  {
1547
1751
  size: "tiny",
1548
1752
  value: "check",
1549
1753
  sx: { marginLeft: "auto" },
1550
- ...(0, import_ui23.bindToggle)(popupState),
1754
+ ...(0, import_ui25.bindToggle)(popupState),
1551
1755
  selected: popupState.isOpen,
1552
1756
  "aria-label": tooltipLabel
1553
1757
  },
1554
1758
  icon
1555
- ))))), /* @__PURE__ */ React30.createElement(
1556
- import_ui23.Popover,
1759
+ ))))), /* @__PURE__ */ React32.createElement(
1760
+ import_ui25.Popover,
1557
1761
  {
1558
1762
  disablePortal: true,
1559
1763
  disableScrollLock: true,
@@ -1565,12 +1769,12 @@ function EqualUnequalSizesControl({
1565
1769
  vertical: "top",
1566
1770
  horizontal: "right"
1567
1771
  },
1568
- ...(0, import_ui23.bindPopover)(popupState),
1772
+ ...(0, import_ui25.bindPopover)(popupState),
1569
1773
  slotProps: {
1570
- paper: { sx: { mt: 0.5, width: controlRef.current?.getBoundingClientRect().width } }
1774
+ paper: { sx: { mt: 0.5, width: rowRefs[0].current?.getBoundingClientRect().width } }
1571
1775
  }
1572
1776
  },
1573
- /* @__PURE__ */ React30.createElement(
1777
+ /* @__PURE__ */ React32.createElement(
1574
1778
  PropProvider,
1575
1779
  {
1576
1780
  propType: multiSizePropType,
@@ -1578,29 +1782,34 @@ function EqualUnequalSizesControl({
1578
1782
  setValue: setNestedProp,
1579
1783
  disabled: multiSizeDisabled
1580
1784
  },
1581
- /* @__PURE__ */ React30.createElement(PopoverContent, { p: 1.5, pt: 2.5, pb: 3 }, /* @__PURE__ */ React30.createElement(PopoverGridContainer, null, /* @__PURE__ */ React30.createElement(MultiSizeValueControl, { item: items[0] }), /* @__PURE__ */ React30.createElement(MultiSizeValueControl, { item: items[1] })), /* @__PURE__ */ React30.createElement(PopoverGridContainer, null, /* @__PURE__ */ React30.createElement(MultiSizeValueControl, { item: items[2] }), /* @__PURE__ */ React30.createElement(MultiSizeValueControl, { item: items[3] })))
1785
+ /* @__PURE__ */ React32.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React32.createElement(PopoverGridContainer, { ref: rowRefs[1] }, /* @__PURE__ */ React32.createElement(MultiSizeValueControl, { item: items[0], rowRef: rowRefs[1] }), /* @__PURE__ */ React32.createElement(MultiSizeValueControl, { item: items[1], rowRef: rowRefs[1] })), /* @__PURE__ */ React32.createElement(PopoverGridContainer, { ref: rowRefs[2] }, /* @__PURE__ */ React32.createElement(MultiSizeValueControl, { item: items[2], rowRef: rowRefs[2] }), /* @__PURE__ */ React32.createElement(MultiSizeValueControl, { item: items[3], rowRef: rowRefs[2] })))
1582
1786
  )
1583
1787
  ));
1584
1788
  }
1585
- var MultiSizeValueControl = ({ item }) => {
1586
- const isUsingNestedProps = (0, import_editor_v1_adapters.isExperimentActive)("e_v_3_30");
1587
- return /* @__PURE__ */ React30.createElement(PropKeyProvider, { bind: item.bind }, /* @__PURE__ */ React30.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(import_ui23.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React30.createElement(import_ui23.Grid, { item: true, xs: 12 }, isUsingNestedProps ? /* @__PURE__ */ React30.createElement(ControlLabel, null, item.label) : /* @__PURE__ */ React30.createElement(ControlFormLabel, null, item.label)), /* @__PURE__ */ React30.createElement(import_ui23.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React30.createElement(SizeControl, { startIcon: item.icon })))));
1789
+ var MultiSizeValueControl = ({
1790
+ item,
1791
+ rowRef
1792
+ }) => {
1793
+ const isUsingNestedProps = (0, import_editor_v1_adapters2.isExperimentActive)("e_v_3_30");
1794
+ return /* @__PURE__ */ React32.createElement(PropKeyProvider, { bind: item.bind }, /* @__PURE__ */ React32.createElement(import_ui25.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(import_ui25.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React32.createElement(import_ui25.Grid, { item: true, xs: 12 }, isUsingNestedProps ? /* @__PURE__ */ React32.createElement(ControlLabel, null, item.label) : /* @__PURE__ */ React32.createElement(ControlFormLabel, null, item.label)), /* @__PURE__ */ React32.createElement(import_ui25.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React32.createElement(SizeControl, { startIcon: item.icon, anchorRef: rowRef })))));
1588
1795
  };
1589
1796
 
1590
1797
  // src/controls/linked-dimensions-control.tsx
1591
- var React31 = __toESM(require("react"));
1798
+ var React33 = __toESM(require("react"));
1799
+ var import_react18 = require("react");
1592
1800
  var import_editor_props13 = require("@elementor/editor-props");
1593
- var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
1594
- var import_icons5 = require("@elementor/icons");
1595
- var import_ui24 = require("@elementor/ui");
1801
+ var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
1802
+ var import_icons6 = require("@elementor/icons");
1803
+ var import_ui26 = require("@elementor/ui");
1596
1804
  var import_i18n7 = require("@wordpress/i18n");
1597
1805
  var LinkedDimensionsControl = createControl(
1598
1806
  ({
1599
1807
  label,
1600
1808
  isSiteRtl = false,
1601
- extendedValues
1809
+ extendedOptions
1602
1810
  }) => {
1603
1811
  const { value: sizeValue, setValue: setSizeValue, disabled: sizeDisabled } = useBoundProp(import_editor_props13.sizePropTypeUtil);
1812
+ const gridRowRefs = [(0, import_react18.useRef)(), (0, import_react18.useRef)()];
1604
1813
  const {
1605
1814
  value: dimensionsValue,
1606
1815
  setValue: setDimensionsValue,
@@ -1608,7 +1817,7 @@ var LinkedDimensionsControl = createControl(
1608
1817
  disabled: dimensionsDisabled
1609
1818
  } = useBoundProp(import_editor_props13.dimensionsPropTypeUtil);
1610
1819
  const isLinked = !dimensionsValue && !sizeValue ? true : !!sizeValue;
1611
- const isUsingNestedProps = (0, import_editor_v1_adapters2.isExperimentActive)("e_v_3_30");
1820
+ const isUsingNestedProps = (0, import_editor_v1_adapters3.isExperimentActive)("e_v_3_30");
1612
1821
  const onLinkToggle = () => {
1613
1822
  if (!isLinked) {
1614
1823
  setSizeValue(dimensionsValue["block-start"]?.value ?? null);
@@ -1623,11 +1832,11 @@ var LinkedDimensionsControl = createControl(
1623
1832
  });
1624
1833
  };
1625
1834
  const tooltipLabel = label.toLowerCase();
1626
- const LinkedIcon = isLinked ? import_icons5.LinkIcon : import_icons5.DetachIcon;
1835
+ const LinkedIcon = isLinked ? import_icons6.LinkIcon : import_icons6.DetachIcon;
1627
1836
  const linkedLabel = (0, import_i18n7.__)("Link %s", "elementor").replace("%s", tooltipLabel);
1628
1837
  const unlinkedLabel = (0, import_i18n7.__)("Unlink %s", "elementor").replace("%s", tooltipLabel);
1629
1838
  const disabled = sizeDisabled || dimensionsDisabled;
1630
- return /* @__PURE__ */ React31.createElement(
1839
+ return /* @__PURE__ */ React33.createElement(
1631
1840
  PropProvider,
1632
1841
  {
1633
1842
  propType,
@@ -1635,8 +1844,8 @@ var LinkedDimensionsControl = createControl(
1635
1844
  setValue: setDimensionsValue,
1636
1845
  disabled
1637
1846
  },
1638
- /* @__PURE__ */ React31.createElement(import_ui24.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, isUsingNestedProps ? /* @__PURE__ */ React31.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React31.createElement(ControlLabel, null, label), /* @__PURE__ */ React31.createElement(import_ui24.Tooltip, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React31.createElement(
1639
- import_ui24.ToggleButton,
1847
+ /* @__PURE__ */ React33.createElement(import_ui26.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, isUsingNestedProps ? /* @__PURE__ */ React33.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React33.createElement(ControlLabel, null, label), /* @__PURE__ */ React33.createElement(import_ui26.Tooltip, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React33.createElement(
1848
+ import_ui26.ToggleButton,
1640
1849
  {
1641
1850
  "aria-label": isLinked ? unlinkedLabel : linkedLabel,
1642
1851
  size: "tiny",
@@ -1646,54 +1855,18 @@ var LinkedDimensionsControl = createControl(
1646
1855
  onChange: onLinkToggle,
1647
1856
  disabled
1648
1857
  },
1649
- /* @__PURE__ */ React31.createElement(LinkedIcon, { fontSize: "tiny" })
1858
+ /* @__PURE__ */ React33.createElement(LinkedIcon, { fontSize: "tiny" })
1650
1859
  ))),
1651
- /* @__PURE__ */ React31.createElement(import_ui24.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(Label, { bind: "block-start", label: (0, import_i18n7.__)("Top", "elementor") })), /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(
1652
- Control3,
1653
- {
1654
- bind: "block-start",
1655
- startIcon: /* @__PURE__ */ React31.createElement(import_icons5.SideTopIcon, { fontSize: "tiny" }),
1656
- isLinked,
1657
- extendedValues
1658
- }
1659
- ))), /* @__PURE__ */ React31.createElement(import_ui24.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(
1660
- Label,
1661
- {
1662
- bind: "inline-end",
1663
- label: isSiteRtl ? (0, import_i18n7.__)("Left", "elementor") : (0, import_i18n7.__)("Right", "elementor")
1664
- }
1665
- )), /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(
1666
- Control3,
1667
- {
1668
- bind: "inline-end",
1669
- startIcon: isSiteRtl ? /* @__PURE__ */ React31.createElement(import_icons5.SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React31.createElement(import_icons5.SideRightIcon, { fontSize: "tiny" }),
1670
- isLinked,
1671
- extendedValues
1672
- }
1673
- )))),
1674
- /* @__PURE__ */ React31.createElement(import_ui24.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(Label, { bind: "block-end", label: (0, import_i18n7.__)("Bottom", "elementor") })), /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(
1675
- Control3,
1676
- {
1677
- bind: "block-end",
1678
- startIcon: /* @__PURE__ */ React31.createElement(import_icons5.SideBottomIcon, { fontSize: "tiny" }),
1679
- isLinked,
1680
- extendedValues
1681
- }
1682
- ))), /* @__PURE__ */ React31.createElement(import_ui24.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(
1683
- Label,
1684
- {
1685
- bind: "inline-start",
1686
- label: isSiteRtl ? (0, import_i18n7.__)("Right", "elementor") : (0, import_i18n7.__)("Left", "elementor")
1687
- }
1688
- )), /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(
1860
+ getCssMarginProps(isSiteRtl).map((row, index) => /* @__PURE__ */ React33.createElement(import_ui26.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", key: index, ref: gridRowRefs[index] }, row.map(({ icon, ...props }) => /* @__PURE__ */ React33.createElement(import_ui26.Grid, { container: true, gap: 0.75, alignItems: "center", key: props.bind }, /* @__PURE__ */ React33.createElement(import_ui26.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React33.createElement(Label, { ...props })), /* @__PURE__ */ React33.createElement(import_ui26.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React33.createElement(
1689
1861
  Control3,
1690
1862
  {
1691
- bind: "inline-start",
1863
+ bind: props.bind,
1864
+ startIcon: icon,
1692
1865
  isLinked,
1693
- extendedValues,
1694
- startIcon: isSiteRtl ? /* @__PURE__ */ React31.createElement(import_icons5.SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React31.createElement(import_icons5.SideLeftIcon, { fontSize: "tiny" })
1866
+ extendedOptions,
1867
+ anchorRef: gridRowRefs[index]
1695
1868
  }
1696
- ))))
1869
+ ))))))
1697
1870
  );
1698
1871
  }
1699
1872
  );
@@ -1701,35 +1874,63 @@ var Control3 = ({
1701
1874
  bind,
1702
1875
  startIcon,
1703
1876
  isLinked,
1704
- extendedValues
1877
+ extendedOptions,
1878
+ anchorRef
1705
1879
  }) => {
1706
1880
  if (isLinked) {
1707
- return /* @__PURE__ */ React31.createElement(SizeControl, { startIcon, extendedValues });
1881
+ return /* @__PURE__ */ React33.createElement(SizeControl, { startIcon, extendedOptions, anchorRef });
1708
1882
  }
1709
- return /* @__PURE__ */ React31.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React31.createElement(SizeControl, { startIcon, extendedValues }));
1883
+ return /* @__PURE__ */ React33.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React33.createElement(SizeControl, { startIcon, extendedOptions, anchorRef }));
1710
1884
  };
1711
1885
  var Label = ({ label, bind }) => {
1712
- const isUsingNestedProps = (0, import_editor_v1_adapters2.isExperimentActive)("e_v_3_30");
1886
+ const isUsingNestedProps = (0, import_editor_v1_adapters3.isExperimentActive)("e_v_3_30");
1713
1887
  if (!isUsingNestedProps) {
1714
- return /* @__PURE__ */ React31.createElement(ControlFormLabel, null, label);
1888
+ return /* @__PURE__ */ React33.createElement(ControlFormLabel, null, label);
1715
1889
  }
1716
- return /* @__PURE__ */ React31.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React31.createElement(ControlLabel, null, label));
1890
+ return /* @__PURE__ */ React33.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React33.createElement(ControlLabel, null, label));
1717
1891
  };
1892
+ function getCssMarginProps(isSiteRtl) {
1893
+ return [
1894
+ [
1895
+ {
1896
+ bind: "block-start",
1897
+ label: (0, import_i18n7.__)("Top", "elementor"),
1898
+ icon: /* @__PURE__ */ React33.createElement(import_icons6.SideTopIcon, { fontSize: "tiny" })
1899
+ },
1900
+ {
1901
+ bind: "inline-end",
1902
+ label: isSiteRtl ? (0, import_i18n7.__)("Left", "elementor") : (0, import_i18n7.__)("Right", "elementor"),
1903
+ icon: isSiteRtl ? /* @__PURE__ */ React33.createElement(import_icons6.SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React33.createElement(import_icons6.SideRightIcon, { fontSize: "tiny" })
1904
+ }
1905
+ ],
1906
+ [
1907
+ {
1908
+ bind: "block-end",
1909
+ label: (0, import_i18n7.__)("Bottom", "elementor"),
1910
+ icon: /* @__PURE__ */ React33.createElement(import_icons6.SideBottomIcon, { fontSize: "tiny" })
1911
+ },
1912
+ {
1913
+ bind: "inline-start",
1914
+ label: isSiteRtl ? (0, import_i18n7.__)("Right", "elementor") : (0, import_i18n7.__)("Left", "elementor"),
1915
+ icon: isSiteRtl ? /* @__PURE__ */ React33.createElement(import_icons6.SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React33.createElement(import_icons6.SideLeftIcon, { fontSize: "tiny" })
1916
+ }
1917
+ ]
1918
+ ];
1919
+ }
1718
1920
 
1719
1921
  // src/controls/font-family-control/font-family-control.tsx
1720
- var React33 = __toESM(require("react"));
1922
+ var React35 = __toESM(require("react"));
1721
1923
  var import_editor_props14 = require("@elementor/editor-props");
1722
- var import_icons7 = require("@elementor/icons");
1723
- var import_ui26 = require("@elementor/ui");
1924
+ var import_icons8 = require("@elementor/icons");
1925
+ var import_ui28 = require("@elementor/ui");
1724
1926
 
1725
1927
  // src/components/font-family-selector.tsx
1726
- var import_react13 = require("react");
1727
- var React32 = __toESM(require("react"));
1928
+ var React34 = __toESM(require("react"));
1929
+ var import_react19 = require("react");
1728
1930
  var import_editor_ui3 = require("@elementor/editor-ui");
1729
- var import_icons6 = require("@elementor/icons");
1730
- var import_ui25 = require("@elementor/ui");
1931
+ var import_icons7 = require("@elementor/icons");
1932
+ var import_ui27 = require("@elementor/ui");
1731
1933
  var import_utils2 = require("@elementor/utils");
1732
- var import_react_virtual = require("@tanstack/react-virtual");
1733
1934
  var import_i18n8 = require("@wordpress/i18n");
1734
1935
 
1735
1936
  // src/controls/font-family-control/enqueue-font.tsx
@@ -1762,36 +1963,30 @@ var FontFamilySelector = ({
1762
1963
  onFontFamilyChange,
1763
1964
  onClose
1764
1965
  }) => {
1765
- const [searchValue, setSearchValue] = (0, import_react13.useState)("");
1966
+ const [searchValue, setSearchValue] = (0, import_react19.useState)("");
1766
1967
  const filteredFontFamilies = useFilteredFontFamilies(fontFamilies, searchValue);
1767
- const handleSearch = (event) => {
1768
- setSearchValue(event.target.value);
1968
+ const handleSearch = (value) => {
1969
+ setSearchValue(value);
1769
1970
  };
1770
1971
  const handleClose = () => {
1771
1972
  setSearchValue("");
1772
1973
  onClose();
1773
1974
  };
1774
- return /* @__PURE__ */ React32.createElement(import_ui25.Stack, null, /* @__PURE__ */ React32.createElement(
1975
+ return /* @__PURE__ */ React34.createElement(import_ui27.Stack, null, /* @__PURE__ */ React34.createElement(
1775
1976
  import_editor_ui3.PopoverHeader,
1776
1977
  {
1777
1978
  title: (0, import_i18n8.__)("Font Family", "elementor"),
1778
1979
  onClose: handleClose,
1779
- icon: /* @__PURE__ */ React32.createElement(import_icons6.TextIcon, { fontSize: SIZE2 })
1980
+ icon: /* @__PURE__ */ React34.createElement(import_icons7.TextIcon, { fontSize: SIZE2 })
1780
1981
  }
1781
- ), /* @__PURE__ */ React32.createElement(import_ui25.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React32.createElement(
1782
- import_ui25.TextField,
1982
+ ), /* @__PURE__ */ React34.createElement(
1983
+ import_editor_ui3.PopoverSearch,
1783
1984
  {
1784
- autoFocus: true,
1785
- fullWidth: true,
1786
- size: SIZE2,
1787
1985
  value: searchValue,
1788
- placeholder: (0, import_i18n8.__)("Search", "elementor"),
1789
- onChange: handleSearch,
1790
- InputProps: {
1791
- startAdornment: /* @__PURE__ */ React32.createElement(import_ui25.InputAdornment, { position: "start" }, /* @__PURE__ */ React32.createElement(import_icons6.SearchIcon, { fontSize: SIZE2 }))
1792
- }
1986
+ onSearch: handleSearch,
1987
+ placeholder: (0, import_i18n8.__)("Search", "elementor")
1793
1988
  }
1794
- )), /* @__PURE__ */ React32.createElement(import_ui25.Divider, null), filteredFontFamilies.length > 0 ? /* @__PURE__ */ React32.createElement(
1989
+ ), /* @__PURE__ */ React34.createElement(import_ui27.Divider, null), filteredFontFamilies.length > 0 ? /* @__PURE__ */ React34.createElement(
1795
1990
  FontList,
1796
1991
  {
1797
1992
  fontListItems: filteredFontFamilies,
@@ -1799,8 +1994,8 @@ var FontFamilySelector = ({
1799
1994
  handleClose,
1800
1995
  fontFamily
1801
1996
  }
1802
- ) : /* @__PURE__ */ React32.createElement(import_ui25.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, /* @__PURE__ */ React32.createElement(import_ui25.Stack, { alignItems: "center", p: 2.5, gap: 1.5, overflow: "hidden" }, /* @__PURE__ */ React32.createElement(import_icons6.TextIcon, { fontSize: "large" }), /* @__PURE__ */ React32.createElement(import_ui25.Box, { sx: { maxWidth: 160, overflow: "hidden" } }, /* @__PURE__ */ React32.createElement(import_ui25.Typography, { align: "center", variant: "subtitle2", color: "text.secondary" }, (0, import_i18n8.__)("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React32.createElement(
1803
- import_ui25.Typography,
1997
+ ) : /* @__PURE__ */ React34.createElement(import_editor_ui3.PopoverScrollableContent, null, /* @__PURE__ */ React34.createElement(import_ui27.Stack, { alignItems: "center", p: 2.5, gap: 1.5, overflow: "hidden" }, /* @__PURE__ */ React34.createElement(import_icons7.TextIcon, { fontSize: "large" }), /* @__PURE__ */ React34.createElement(import_ui27.Box, { sx: { maxWidth: 160, overflow: "hidden" } }, /* @__PURE__ */ React34.createElement(import_ui27.Typography, { align: "center", variant: "subtitle2", color: "text.secondary" }, (0, import_i18n8.__)("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React34.createElement(
1998
+ import_ui27.Typography,
1804
1999
  {
1805
2000
  variant: "subtitle2",
1806
2001
  color: "text.secondary",
@@ -1810,11 +2005,11 @@ var FontFamilySelector = ({
1810
2005
  justifyContent: "center"
1811
2006
  }
1812
2007
  },
1813
- /* @__PURE__ */ React32.createElement("span", null, "\u201C"),
1814
- /* @__PURE__ */ React32.createElement("span", { style: { maxWidth: "80%", overflow: "hidden", textOverflow: "ellipsis" } }, searchValue),
1815
- /* @__PURE__ */ React32.createElement("span", null, "\u201D.")
1816
- )), /* @__PURE__ */ React32.createElement(import_ui25.Typography, { align: "center", variant: "caption", color: "text.secondary" }, (0, import_i18n8.__)("Try something else.", "elementor"), /* @__PURE__ */ React32.createElement(
1817
- import_ui25.Link,
2008
+ /* @__PURE__ */ React34.createElement("span", null, "\u201C"),
2009
+ /* @__PURE__ */ React34.createElement("span", { style: { maxWidth: "80%", overflow: "hidden", textOverflow: "ellipsis" } }, searchValue),
2010
+ /* @__PURE__ */ React34.createElement("span", null, "\u201D.")
2011
+ )), /* @__PURE__ */ React34.createElement(import_ui27.Typography, { align: "center", variant: "caption", color: "text.secondary" }, (0, import_i18n8.__)("Try something else.", "elementor"), /* @__PURE__ */ React34.createElement(
2012
+ import_ui27.Link,
1818
2013
  {
1819
2014
  color: "secondary",
1820
2015
  variant: "caption",
@@ -1824,10 +2019,7 @@ var FontFamilySelector = ({
1824
2019
  (0, import_i18n8.__)("Clear & try again", "elementor")
1825
2020
  )))));
1826
2021
  };
1827
- var LIST_ITEM_HEIGHT = 36;
1828
- var LIST_ITEMS_BUFFER = 6;
1829
2022
  var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
1830
- const containerRef = (0, import_react13.useRef)(null);
1831
2023
  const selectedItem = fontListItems.find((item) => item.value === fontFamily);
1832
2024
  const debouncedVirtualizeChange = useDebounce(({ getVirtualIndexes }) => {
1833
2025
  getVirtualIndexes().forEach((index) => {
@@ -1837,123 +2029,22 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
1837
2029
  }
1838
2030
  });
1839
2031
  }, 100);
1840
- const virtualizer = (0, import_react_virtual.useVirtualizer)({
1841
- count: fontListItems.length,
1842
- getScrollElement: () => containerRef.current,
1843
- estimateSize: () => LIST_ITEM_HEIGHT,
1844
- overscan: LIST_ITEMS_BUFFER,
1845
- onChange: debouncedVirtualizeChange
1846
- });
1847
- (0, import_react13.useEffect)(
1848
- () => {
1849
- virtualizer.scrollToIndex(fontListItems.findIndex((item) => item.value === fontFamily));
1850
- },
1851
- // eslint-disable-next-line react-compiler/react-compiler
1852
- // eslint-disable-next-line react-hooks/exhaustive-deps
1853
- [fontFamily]
1854
- );
1855
- return /* @__PURE__ */ React32.createElement(
1856
- import_ui25.Box,
2032
+ return /* @__PURE__ */ React34.createElement(
2033
+ import_editor_ui3.PopoverMenuList,
1857
2034
  {
1858
- ref: containerRef,
1859
- sx: {
1860
- overflowY: "auto",
1861
- height: 260,
1862
- width: 220
1863
- }
1864
- },
1865
- /* @__PURE__ */ React32.createElement(
1866
- StyledMenuList,
1867
- {
1868
- role: "listbox",
1869
- style: {
1870
- height: `${virtualizer.getTotalSize()}px`
1871
- },
1872
- "data-testid": "font-list"
1873
- },
1874
- virtualizer.getVirtualItems().map((virtualRow) => {
1875
- const item = fontListItems[virtualRow.index];
1876
- const isLast = virtualRow.index === fontListItems.length - 1;
1877
- const isFirst = virtualRow.index === 1;
1878
- const isSelected = selectedItem?.value === item.value;
1879
- const tabIndexFallback = !selectedItem ? 0 : -1;
1880
- if (item.type === "category") {
1881
- return /* @__PURE__ */ React32.createElement(
1882
- import_ui25.MenuSubheader,
1883
- {
1884
- key: virtualRow.key,
1885
- style: {
1886
- transform: `translateY(${virtualRow.start}px)`
1887
- }
1888
- },
1889
- item.value
1890
- );
1891
- }
1892
- return /* @__PURE__ */ React32.createElement(
1893
- "li",
1894
- {
1895
- key: virtualRow.key,
1896
- role: "option",
1897
- "aria-selected": isSelected,
1898
- onClick: () => {
1899
- setFontFamily(item.value);
1900
- handleClose();
1901
- },
1902
- onKeyDown: (event) => {
1903
- if (event.key === "Enter") {
1904
- setFontFamily(item.value);
1905
- handleClose();
1906
- }
1907
- if (event.key === "ArrowDown" && isLast) {
1908
- event.preventDefault();
1909
- event.stopPropagation();
1910
- }
1911
- if (event.key === "ArrowUp" && isFirst) {
1912
- event.preventDefault();
1913
- event.stopPropagation();
1914
- }
1915
- },
1916
- tabIndex: isSelected ? 0 : tabIndexFallback,
1917
- style: {
1918
- transform: `translateY(${virtualRow.start}px)`,
1919
- fontFamily: item.value
1920
- }
1921
- },
1922
- item.value
1923
- );
1924
- })
1925
- )
2035
+ items: fontListItems,
2036
+ selectedValue: selectedItem?.value,
2037
+ onChange: debouncedVirtualizeChange,
2038
+ onSelect: setFontFamily,
2039
+ onClose: handleClose,
2040
+ itemStyle: (item) => ({ fontFamily: item.value }),
2041
+ "data-testid": "font-list"
2042
+ }
1926
2043
  );
1927
2044
  };
1928
- var StyledMenuList = (0, import_ui25.styled)(import_ui25.MenuList)(({ theme }) => ({
1929
- "& > li": {
1930
- height: LIST_ITEM_HEIGHT,
1931
- position: "absolute",
1932
- top: 0,
1933
- left: 0,
1934
- width: "100%",
1935
- display: "flex",
1936
- alignItems: "center"
1937
- },
1938
- '& > [role="option"]': {
1939
- ...theme.typography.caption,
1940
- lineHeight: "inherit",
1941
- padding: theme.spacing(0.75, 2, 0.75, 4),
1942
- "&:hover, &:focus": {
1943
- backgroundColor: theme.palette.action.hover
1944
- },
1945
- '&[aria-selected="true"]': {
1946
- backgroundColor: theme.palette.action.selected
1947
- },
1948
- cursor: "pointer",
1949
- textOverflow: "ellipsis"
1950
- },
1951
- width: "100%",
1952
- position: "relative"
1953
- }));
1954
2045
  var useDebounce = (fn, delay) => {
1955
- const [debouncedFn] = (0, import_react13.useState)(() => (0, import_utils2.debounce)(fn, delay));
1956
- (0, import_react13.useEffect)(() => () => debouncedFn.cancel(), [debouncedFn]);
2046
+ const [debouncedFn] = (0, import_react19.useState)(() => (0, import_utils2.debounce)(fn, delay));
2047
+ (0, import_react19.useEffect)(() => () => debouncedFn.cancel(), [debouncedFn]);
1957
2048
  return debouncedFn;
1958
2049
  };
1959
2050
 
@@ -1961,26 +2052,26 @@ var useDebounce = (fn, delay) => {
1961
2052
  var SIZE3 = "tiny";
1962
2053
  var FontFamilyControl = createControl(({ fontFamilies }) => {
1963
2054
  const { value: fontFamily, setValue: setFontFamily, disabled } = useBoundProp(import_editor_props14.stringPropTypeUtil);
1964
- const popoverState = (0, import_ui26.usePopupState)({ variant: "popover" });
1965
- return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(ControlActions, null, /* @__PURE__ */ React33.createElement(
1966
- import_ui26.UnstableTag,
2055
+ const popoverState = (0, import_ui28.usePopupState)({ variant: "popover" });
2056
+ return /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(ControlActions, null, /* @__PURE__ */ React35.createElement(
2057
+ import_ui28.UnstableTag,
1967
2058
  {
1968
2059
  variant: "outlined",
1969
2060
  label: fontFamily,
1970
- endIcon: /* @__PURE__ */ React33.createElement(import_icons7.ChevronDownIcon, { fontSize: SIZE3 }),
1971
- ...(0, import_ui26.bindTrigger)(popoverState),
2061
+ endIcon: /* @__PURE__ */ React35.createElement(import_icons8.ChevronDownIcon, { fontSize: SIZE3 }),
2062
+ ...(0, import_ui28.bindTrigger)(popoverState),
1972
2063
  fullWidth: true,
1973
2064
  disabled
1974
2065
  }
1975
- )), /* @__PURE__ */ React33.createElement(
1976
- import_ui26.Popover,
2066
+ )), /* @__PURE__ */ React35.createElement(
2067
+ import_ui28.Popover,
1977
2068
  {
1978
2069
  disablePortal: true,
1979
2070
  disableScrollLock: true,
1980
2071
  anchorOrigin: { vertical: "bottom", horizontal: "left" },
1981
- ...(0, import_ui26.bindPopover)(popoverState)
2072
+ ...(0, import_ui28.bindPopover)(popoverState)
1982
2073
  },
1983
- /* @__PURE__ */ React33.createElement(
2074
+ /* @__PURE__ */ React35.createElement(
1984
2075
  FontFamilySelector,
1985
2076
  {
1986
2077
  fontFamilies,
@@ -1993,14 +2084,14 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
1993
2084
  });
1994
2085
 
1995
2086
  // src/controls/url-control.tsx
1996
- var React34 = __toESM(require("react"));
2087
+ var React36 = __toESM(require("react"));
1997
2088
  var import_editor_props15 = require("@elementor/editor-props");
1998
- var import_ui27 = require("@elementor/ui");
2089
+ var import_ui29 = require("@elementor/ui");
1999
2090
  var UrlControl = createControl(({ placeholder }) => {
2000
2091
  const { value, setValue, disabled } = useBoundProp(import_editor_props15.urlPropTypeUtil);
2001
2092
  const handleChange = (event) => setValue(event.target.value);
2002
- return /* @__PURE__ */ React34.createElement(ControlActions, null, /* @__PURE__ */ React34.createElement(
2003
- import_ui27.TextField,
2093
+ return /* @__PURE__ */ React36.createElement(ControlActions, null, /* @__PURE__ */ React36.createElement(
2094
+ import_ui29.TextField,
2004
2095
  {
2005
2096
  size: "tiny",
2006
2097
  fullWidth: true,
@@ -2013,24 +2104,24 @@ var UrlControl = createControl(({ placeholder }) => {
2013
2104
  });
2014
2105
 
2015
2106
  // src/controls/link-control.tsx
2016
- var React36 = __toESM(require("react"));
2017
- var import_react15 = require("react");
2107
+ var React38 = __toESM(require("react"));
2108
+ var import_react21 = require("react");
2018
2109
  var import_editor_elements = require("@elementor/editor-elements");
2019
2110
  var import_editor_props16 = require("@elementor/editor-props");
2020
2111
  var import_editor_ui4 = require("@elementor/editor-ui");
2021
2112
  var import_http_client2 = require("@elementor/http-client");
2022
- var import_icons9 = require("@elementor/icons");
2113
+ var import_icons10 = require("@elementor/icons");
2023
2114
  var import_session = require("@elementor/session");
2024
- var import_ui29 = require("@elementor/ui");
2115
+ var import_ui31 = require("@elementor/ui");
2025
2116
  var import_utils3 = require("@elementor/utils");
2026
2117
  var import_i18n9 = require("@wordpress/i18n");
2027
2118
 
2028
2119
  // src/components/autocomplete.tsx
2029
- var React35 = __toESM(require("react"));
2030
- var import_react14 = require("react");
2031
- var import_icons8 = require("@elementor/icons");
2032
- var import_ui28 = require("@elementor/ui");
2033
- var Autocomplete = (0, import_react14.forwardRef)((props, ref) => {
2120
+ var React37 = __toESM(require("react"));
2121
+ var import_react20 = require("react");
2122
+ var import_icons9 = require("@elementor/icons");
2123
+ var import_ui30 = require("@elementor/ui");
2124
+ var Autocomplete = (0, import_react20.forwardRef)((props, ref) => {
2034
2125
  const {
2035
2126
  options,
2036
2127
  onOptionChange,
@@ -2046,8 +2137,8 @@ var Autocomplete = (0, import_react14.forwardRef)((props, ref) => {
2046
2137
  const muiWarningPreventer = allowCustomValues || !!value?.toString()?.length;
2047
2138
  const isOptionEqualToValue = muiWarningPreventer ? void 0 : () => true;
2048
2139
  const isValueFromOptions = typeof value === "number" && !!findMatchingOption(options, value);
2049
- return /* @__PURE__ */ React35.createElement(
2050
- import_ui28.Autocomplete,
2140
+ return /* @__PURE__ */ React37.createElement(
2141
+ import_ui30.Autocomplete,
2051
2142
  {
2052
2143
  ...restProps,
2053
2144
  ref,
@@ -2064,8 +2155,8 @@ var Autocomplete = (0, import_react14.forwardRef)((props, ref) => {
2064
2155
  groupBy: isCategorizedOptionPool(options) ? (optionId) => findMatchingOption(options, optionId)?.groupLabel || optionId : void 0,
2065
2156
  isOptionEqualToValue,
2066
2157
  filterOptions: () => optionKeys,
2067
- renderOption: (optionProps, optionId) => /* @__PURE__ */ React35.createElement(import_ui28.Box, { component: "li", ...optionProps, key: optionProps.id }, findMatchingOption(options, optionId)?.label ?? optionId),
2068
- renderInput: (params) => /* @__PURE__ */ React35.createElement(
2158
+ renderOption: (optionProps, optionId) => /* @__PURE__ */ React37.createElement(import_ui30.Box, { component: "li", ...optionProps, key: optionProps.id }, findMatchingOption(options, optionId)?.label ?? optionId),
2159
+ renderInput: (params) => /* @__PURE__ */ React37.createElement(
2069
2160
  TextInput,
2070
2161
  {
2071
2162
  params,
@@ -2088,8 +2179,8 @@ var TextInput = ({
2088
2179
  const onChange = (event) => {
2089
2180
  handleChange(event.target.value);
2090
2181
  };
2091
- return /* @__PURE__ */ React35.createElement(
2092
- import_ui28.TextField,
2182
+ return /* @__PURE__ */ React37.createElement(
2183
+ import_ui30.TextField,
2093
2184
  {
2094
2185
  ...params,
2095
2186
  placeholder,
@@ -2101,7 +2192,7 @@ var TextInput = ({
2101
2192
  },
2102
2193
  InputProps: {
2103
2194
  ...params.InputProps,
2104
- endAdornment: /* @__PURE__ */ React35.createElement(ClearButton, { params, allowClear, handleChange })
2195
+ endAdornment: /* @__PURE__ */ React37.createElement(ClearButton, { params, allowClear, handleChange })
2105
2196
  }
2106
2197
  }
2107
2198
  );
@@ -2110,7 +2201,7 @@ var ClearButton = ({
2110
2201
  allowClear,
2111
2202
  handleChange,
2112
2203
  params
2113
- }) => /* @__PURE__ */ React35.createElement(import_ui28.InputAdornment, { position: "end" }, allowClear && /* @__PURE__ */ React35.createElement(import_ui28.IconButton, { size: params.size, onClick: () => handleChange(null), sx: { cursor: "pointer" } }, /* @__PURE__ */ React35.createElement(import_icons8.XIcon, { fontSize: params.size })));
2204
+ }) => /* @__PURE__ */ React37.createElement(import_ui30.InputAdornment, { position: "end" }, allowClear && /* @__PURE__ */ React37.createElement(import_ui30.IconButton, { size: params.size, onClick: () => handleChange(null), sx: { cursor: "pointer" } }, /* @__PURE__ */ React37.createElement(import_icons9.XIcon, { fontSize: params.size })));
2114
2205
  function findMatchingOption(options, optionId = null) {
2115
2206
  const formattedOption = (optionId || "").toString();
2116
2207
  return options.find(({ id }) => formattedOption === id.toString());
@@ -2140,7 +2231,7 @@ var learnMoreButton = {
2140
2231
  var LinkControl = createControl((props) => {
2141
2232
  const { value, path, setValue, ...propContext } = useBoundProp(import_editor_props16.linkPropTypeUtil);
2142
2233
  const [linkSessionValue, setLinkSessionValue] = (0, import_session.useSessionStorage)(path.join("/"));
2143
- const [isActive, setIsActive] = (0, import_react15.useState)(!!value);
2234
+ const [isActive, setIsActive] = (0, import_react21.useState)(!!value);
2144
2235
  const {
2145
2236
  allowCustomValues,
2146
2237
  queryOptions: { endpoint = "", requestParams = {} },
@@ -2148,8 +2239,8 @@ var LinkControl = createControl((props) => {
2148
2239
  minInputLength = 2,
2149
2240
  context: { elementId }
2150
2241
  } = props || {};
2151
- const [linkInLinkRestriction, setLinkInLinkRestriction] = (0, import_react15.useState)((0, import_editor_elements.getLinkInLinkRestriction)(elementId));
2152
- const [options, setOptions] = (0, import_react15.useState)(
2242
+ const [linkInLinkRestriction, setLinkInLinkRestriction] = (0, import_react21.useState)((0, import_editor_elements.getLinkInLinkRestriction)(elementId));
2243
+ const [options, setOptions] = (0, import_react21.useState)(
2153
2244
  generateFirstLoadedOption(value)
2154
2245
  );
2155
2246
  const shouldDisableAddingLink = !isActive && linkInLinkRestriction.shouldRestrict;
@@ -2200,7 +2291,7 @@ var LinkControl = createControl((props) => {
2200
2291
  }
2201
2292
  debounceFetch({ ...requestParams, term: newValue });
2202
2293
  };
2203
- const debounceFetch = (0, import_react15.useMemo)(
2294
+ const debounceFetch = (0, import_react21.useMemo)(
2204
2295
  () => (0, import_utils3.debounce)(
2205
2296
  (params) => fetchOptions(endpoint, params).then((newOptions) => {
2206
2297
  setOptions(formatOptions(newOptions));
@@ -2209,8 +2300,8 @@ var LinkControl = createControl((props) => {
2209
2300
  ),
2210
2301
  [endpoint]
2211
2302
  );
2212
- return /* @__PURE__ */ React36.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React36.createElement(import_ui29.Stack, { gap: 1.5 }, /* @__PURE__ */ React36.createElement(
2213
- import_ui29.Stack,
2303
+ return /* @__PURE__ */ React38.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React38.createElement(import_ui31.Stack, { gap: 1.5 }, /* @__PURE__ */ React38.createElement(
2304
+ import_ui31.Stack,
2214
2305
  {
2215
2306
  direction: "row",
2216
2307
  sx: {
@@ -2219,8 +2310,8 @@ var LinkControl = createControl((props) => {
2219
2310
  marginInlineEnd: -0.75
2220
2311
  }
2221
2312
  },
2222
- /* @__PURE__ */ React36.createElement(ControlFormLabel, null, (0, import_i18n9.__)("Link", "elementor")),
2223
- /* @__PURE__ */ React36.createElement(ConditionalInfoTip, { isVisible: !isActive, linkInLinkRestriction }, /* @__PURE__ */ React36.createElement(
2313
+ /* @__PURE__ */ React38.createElement(ControlFormLabel, null, (0, import_i18n9.__)("Link", "elementor")),
2314
+ /* @__PURE__ */ React38.createElement(ConditionalInfoTip, { isVisible: !isActive, linkInLinkRestriction }, /* @__PURE__ */ React38.createElement(
2224
2315
  ToggleIconControl,
2225
2316
  {
2226
2317
  disabled: shouldDisableAddingLink,
@@ -2229,7 +2320,7 @@ var LinkControl = createControl((props) => {
2229
2320
  label: (0, import_i18n9.__)("Toggle link", "elementor")
2230
2321
  }
2231
2322
  ))
2232
- ), /* @__PURE__ */ React36.createElement(import_ui29.Collapse, { in: isActive, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React36.createElement(import_ui29.Stack, { gap: 1.5 }, /* @__PURE__ */ React36.createElement(PropKeyProvider, { bind: "destination" }, /* @__PURE__ */ React36.createElement(ControlActions, null, /* @__PURE__ */ React36.createElement(
2323
+ ), /* @__PURE__ */ React38.createElement(import_ui31.Collapse, { in: isActive, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React38.createElement(import_ui31.Stack, { gap: 1.5 }, /* @__PURE__ */ React38.createElement(PropKeyProvider, { bind: "destination" }, /* @__PURE__ */ React38.createElement(ControlActions, null, /* @__PURE__ */ React38.createElement(
2233
2324
  Autocomplete,
2234
2325
  {
2235
2326
  options,
@@ -2240,10 +2331,10 @@ var LinkControl = createControl((props) => {
2240
2331
  onTextChange,
2241
2332
  minInputLength
2242
2333
  }
2243
- ))), /* @__PURE__ */ React36.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React36.createElement(SwitchControl, { disabled: propContext.disabled || !value }))))));
2334
+ ))), /* @__PURE__ */ React38.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React38.createElement(SwitchControl, { disabled: propContext.disabled || !value }))))));
2244
2335
  });
2245
2336
  var ToggleIconControl = ({ disabled, active, onIconClick, label }) => {
2246
- return /* @__PURE__ */ React36.createElement(import_ui29.IconButton, { size: SIZE4, onClick: onIconClick, "aria-label": label, disabled }, active ? /* @__PURE__ */ React36.createElement(import_icons9.MinusIcon, { fontSize: SIZE4 }) : /* @__PURE__ */ React36.createElement(import_icons9.PlusIcon, { fontSize: SIZE4 }));
2337
+ return /* @__PURE__ */ React38.createElement(import_ui31.IconButton, { size: SIZE4, onClick: onIconClick, "aria-label": label, disabled }, active ? /* @__PURE__ */ React38.createElement(import_icons10.MinusIcon, { fontSize: SIZE4 }) : /* @__PURE__ */ React38.createElement(import_icons10.PlusIcon, { fontSize: SIZE4 }));
2247
2338
  };
2248
2339
  var SwitchControl = ({ disabled }) => {
2249
2340
  const { value = false, setValue } = useBoundProp(import_editor_props16.booleanPropTypeUtil);
@@ -2255,7 +2346,7 @@ var SwitchControl = ({ disabled }) => {
2255
2346
  opacity: 0
2256
2347
  }
2257
2348
  } : {};
2258
- return /* @__PURE__ */ React36.createElement(import_ui29.Grid, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React36.createElement(import_ui29.Grid, { item: true }, /* @__PURE__ */ React36.createElement(ControlFormLabel, null, (0, import_i18n9.__)("Open in a new tab", "elementor"))), /* @__PURE__ */ React36.createElement(import_ui29.Grid, { item: true, sx: { marginInlineEnd: -1 } }, /* @__PURE__ */ React36.createElement(import_ui29.Switch, { checked: value, onClick, disabled, inputProps })));
2349
+ return /* @__PURE__ */ React38.createElement(import_ui31.Grid, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true }, /* @__PURE__ */ React38.createElement(ControlFormLabel, null, (0, import_i18n9.__)("Open in a new tab", "elementor"))), /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, sx: { marginInlineEnd: -1 } }, /* @__PURE__ */ React38.createElement(import_ui31.Switch, { checked: value, onClick, disabled, inputProps })));
2259
2350
  };
2260
2351
  async function fetchOptions(ajaxUrl, params) {
2261
2352
  if (!params || !ajaxUrl) {
@@ -2292,15 +2383,15 @@ var ConditionalInfoTip = ({ linkInLinkRestriction, isVisible, children }) => {
2292
2383
  (0, import_editor_elements.selectElement)(elementId);
2293
2384
  }
2294
2385
  };
2295
- return shouldRestrict && isVisible ? /* @__PURE__ */ React36.createElement(
2296
- import_ui29.Infotip,
2386
+ return shouldRestrict && isVisible ? /* @__PURE__ */ React38.createElement(
2387
+ import_ui31.Infotip,
2297
2388
  {
2298
2389
  placement: "right",
2299
- content: /* @__PURE__ */ React36.createElement(
2390
+ content: /* @__PURE__ */ React38.createElement(
2300
2391
  import_editor_ui4.InfoTipCard,
2301
2392
  {
2302
2393
  content: INFOTIP_CONTENT[reason],
2303
- svgIcon: /* @__PURE__ */ React36.createElement(import_icons9.AlertTriangleIcon, null),
2394
+ svgIcon: /* @__PURE__ */ React38.createElement(import_icons10.AlertTriangleIcon, null),
2304
2395
  learnMoreButton,
2305
2396
  ctaButton: {
2306
2397
  label: (0, import_i18n9.__)("Take me there", "elementor"),
@@ -2309,19 +2400,20 @@ var ConditionalInfoTip = ({ linkInLinkRestriction, isVisible, children }) => {
2309
2400
  }
2310
2401
  )
2311
2402
  },
2312
- /* @__PURE__ */ React36.createElement(import_ui29.Box, null, children)
2313
- ) : /* @__PURE__ */ React36.createElement(React36.Fragment, null, children);
2403
+ /* @__PURE__ */ React38.createElement(import_ui31.Box, null, children)
2404
+ ) : /* @__PURE__ */ React38.createElement(React38.Fragment, null, children);
2314
2405
  };
2315
2406
  var INFOTIP_CONTENT = {
2316
- descendant: /* @__PURE__ */ React36.createElement(React36.Fragment, null, (0, import_i18n9.__)("To add a link to this container,", "elementor"), /* @__PURE__ */ React36.createElement("br", null), (0, import_i18n9.__)("first remove the link from the elements inside of it.", "elementor")),
2317
- ancestor: /* @__PURE__ */ React36.createElement(React36.Fragment, null, (0, import_i18n9.__)("To add a link to this element,", "elementor"), /* @__PURE__ */ React36.createElement("br", null), (0, import_i18n9.__)("first remove the link from its parent container.", "elementor"))
2407
+ descendant: /* @__PURE__ */ React38.createElement(React38.Fragment, null, (0, import_i18n9.__)("To add a link to this container,", "elementor"), /* @__PURE__ */ React38.createElement("br", null), (0, import_i18n9.__)("first remove the link from the elements inside of it.", "elementor")),
2408
+ ancestor: /* @__PURE__ */ React38.createElement(React38.Fragment, null, (0, import_i18n9.__)("To add a link to this element,", "elementor"), /* @__PURE__ */ React38.createElement("br", null), (0, import_i18n9.__)("first remove the link from its parent container.", "elementor"))
2318
2409
  };
2319
2410
 
2320
2411
  // src/controls/gap-control.tsx
2321
- var React37 = __toESM(require("react"));
2412
+ var React39 = __toESM(require("react"));
2413
+ var import_react22 = require("react");
2322
2414
  var import_editor_props17 = require("@elementor/editor-props");
2323
- var import_icons10 = require("@elementor/icons");
2324
- var import_ui30 = require("@elementor/ui");
2415
+ var import_icons11 = require("@elementor/icons");
2416
+ var import_ui32 = require("@elementor/ui");
2325
2417
  var import_i18n10 = require("@wordpress/i18n");
2326
2418
  var GapControl = createControl(({ label }) => {
2327
2419
  const {
@@ -2330,6 +2422,7 @@ var GapControl = createControl(({ label }) => {
2330
2422
  propType,
2331
2423
  disabled: directionDisabled
2332
2424
  } = useBoundProp(import_editor_props17.layoutDirectionPropTypeUtil);
2425
+ const stackRef = (0, import_react22.useRef)();
2333
2426
  const { value: sizeValue, setValue: setSizeValue, disabled: sizeDisabled } = useBoundProp(import_editor_props17.sizePropTypeUtil);
2334
2427
  const isLinked = !directionValue && !sizeValue ? true : !!sizeValue;
2335
2428
  const onLinkToggle = () => {
@@ -2344,12 +2437,12 @@ var GapControl = createControl(({ label }) => {
2344
2437
  });
2345
2438
  };
2346
2439
  const tooltipLabel = label.toLowerCase();
2347
- const LinkedIcon = isLinked ? import_icons10.LinkIcon : import_icons10.DetachIcon;
2440
+ const LinkedIcon = isLinked ? import_icons11.LinkIcon : import_icons11.DetachIcon;
2348
2441
  const linkedLabel = (0, import_i18n10.__)("Link %s", "elementor").replace("%s", tooltipLabel);
2349
2442
  const unlinkedLabel = (0, import_i18n10.__)("Unlink %s", "elementor").replace("%s", tooltipLabel);
2350
2443
  const disabled = sizeDisabled || directionDisabled;
2351
- return /* @__PURE__ */ React37.createElement(PropProvider, { propType, value: directionValue, setValue: setDirectionValue }, /* @__PURE__ */ React37.createElement(import_ui30.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(ControlLabel, null, label), /* @__PURE__ */ React37.createElement(import_ui30.Tooltip, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React37.createElement(
2352
- import_ui30.ToggleButton,
2444
+ return /* @__PURE__ */ React39.createElement(PropProvider, { propType, value: directionValue, setValue: setDirectionValue }, /* @__PURE__ */ React39.createElement(import_ui32.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(ControlLabel, null, label), /* @__PURE__ */ React39.createElement(import_ui32.Tooltip, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React39.createElement(
2445
+ import_ui32.ToggleButton,
2353
2446
  {
2354
2447
  "aria-label": isLinked ? unlinkedLabel : linkedLabel,
2355
2448
  size: "tiny",
@@ -2359,23 +2452,27 @@ var GapControl = createControl(({ label }) => {
2359
2452
  onChange: onLinkToggle,
2360
2453
  disabled
2361
2454
  },
2362
- /* @__PURE__ */ React37.createElement(LinkedIcon, { fontSize: "tiny" })
2363
- ))), /* @__PURE__ */ React37.createElement(import_ui30.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(import_ui30.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React37.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(ControlFormLabel, null, (0, import_i18n10.__)("Column", "elementor"))), /* @__PURE__ */ React37.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(Control4, { bind: "column", isLinked }))), /* @__PURE__ */ React37.createElement(import_ui30.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React37.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(ControlFormLabel, null, (0, import_i18n10.__)("Row", "elementor"))), /* @__PURE__ */ React37.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(Control4, { bind: "row", isLinked })))));
2455
+ /* @__PURE__ */ React39.createElement(LinkedIcon, { fontSize: "tiny" })
2456
+ ))), /* @__PURE__ */ React39.createElement(import_ui32.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: stackRef }, /* @__PURE__ */ React39.createElement(import_ui32.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React39.createElement(import_ui32.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(ControlFormLabel, null, (0, import_i18n10.__)("Column", "elementor"))), /* @__PURE__ */ React39.createElement(import_ui32.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(Control4, { bind: "column", isLinked, anchorRef: stackRef }))), /* @__PURE__ */ React39.createElement(import_ui32.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React39.createElement(import_ui32.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(ControlFormLabel, null, (0, import_i18n10.__)("Row", "elementor"))), /* @__PURE__ */ React39.createElement(import_ui32.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(Control4, { bind: "row", isLinked, anchorRef: stackRef })))));
2364
2457
  });
2365
- var Control4 = ({ bind, isLinked }) => {
2458
+ var Control4 = ({
2459
+ bind,
2460
+ isLinked,
2461
+ anchorRef
2462
+ }) => {
2366
2463
  if (isLinked) {
2367
- return /* @__PURE__ */ React37.createElement(SizeControl, null);
2464
+ return /* @__PURE__ */ React39.createElement(SizeControl, { anchorRef });
2368
2465
  }
2369
- return /* @__PURE__ */ React37.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React37.createElement(SizeControl, null));
2466
+ return /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React39.createElement(SizeControl, { anchorRef }));
2370
2467
  };
2371
2468
 
2372
2469
  // src/controls/aspect-ratio-control.tsx
2373
- var React38 = __toESM(require("react"));
2374
- var import_react16 = require("react");
2470
+ var React40 = __toESM(require("react"));
2471
+ var import_react23 = require("react");
2375
2472
  var import_editor_props18 = require("@elementor/editor-props");
2376
2473
  var import_editor_ui5 = require("@elementor/editor-ui");
2377
- var import_icons11 = require("@elementor/icons");
2378
- var import_ui31 = require("@elementor/ui");
2474
+ var import_icons12 = require("@elementor/icons");
2475
+ var import_ui33 = require("@elementor/ui");
2379
2476
  var import_i18n11 = require("@wordpress/i18n");
2380
2477
  var RATIO_OPTIONS = [
2381
2478
  { label: (0, import_i18n11.__)("Auto", "elementor"), value: "auto" },
@@ -2392,10 +2489,10 @@ var AspectRatioControl = createControl(({ label }) => {
2392
2489
  const { value: aspectRatioValue, setValue: setAspectRatioValue, disabled } = useBoundProp(import_editor_props18.stringPropTypeUtil);
2393
2490
  const isCustomSelected = aspectRatioValue && !RATIO_OPTIONS.some((option) => option.value === aspectRatioValue);
2394
2491
  const [initialWidth, initialHeight] = isCustomSelected ? aspectRatioValue.split("/") : ["", ""];
2395
- const [isCustom, setIsCustom] = (0, import_react16.useState)(isCustomSelected);
2396
- const [customWidth, setCustomWidth] = (0, import_react16.useState)(initialWidth);
2397
- const [customHeight, setCustomHeight] = (0, import_react16.useState)(initialHeight);
2398
- const [selectedValue, setSelectedValue] = (0, import_react16.useState)(
2492
+ const [isCustom, setIsCustom] = (0, import_react23.useState)(isCustomSelected);
2493
+ const [customWidth, setCustomWidth] = (0, import_react23.useState)(initialWidth);
2494
+ const [customHeight, setCustomHeight] = (0, import_react23.useState)(initialHeight);
2495
+ const [selectedValue, setSelectedValue] = (0, import_react23.useState)(
2399
2496
  isCustomSelected ? CUSTOM_RATIO : aspectRatioValue || ""
2400
2497
  );
2401
2498
  const handleSelectChange = (event) => {
@@ -2422,8 +2519,8 @@ var AspectRatioControl = createControl(({ label }) => {
2422
2519
  setAspectRatioValue(`${customWidth}/${newHeight}`);
2423
2520
  }
2424
2521
  };
2425
- return /* @__PURE__ */ React38.createElement(ControlActions, null, /* @__PURE__ */ React38.createElement(import_ui31.Stack, { direction: "column", pt: 2, gap: 2 }, /* @__PURE__ */ React38.createElement(import_ui31.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(ControlLabel, null, label)), /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(
2426
- import_ui31.Select,
2522
+ return /* @__PURE__ */ React40.createElement(ControlActions, null, /* @__PURE__ */ React40.createElement(import_ui33.Stack, { direction: "column", pt: 2, gap: 2 }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(ControlLabel, null, label)), /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(
2523
+ import_ui33.Select,
2427
2524
  {
2428
2525
  size: "tiny",
2429
2526
  displayEmpty: true,
@@ -2434,10 +2531,10 @@ var AspectRatioControl = createControl(({ label }) => {
2434
2531
  fullWidth: true
2435
2532
  },
2436
2533
  [...RATIO_OPTIONS, { label: (0, import_i18n11.__)("Custom", "elementor"), value: CUSTOM_RATIO }].map(
2437
- ({ label: optionLabel, ...props }) => /* @__PURE__ */ React38.createElement(import_editor_ui5.MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, optionLabel)
2534
+ ({ label: optionLabel, ...props }) => /* @__PURE__ */ React40.createElement(import_editor_ui5.MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, optionLabel)
2438
2535
  )
2439
- ))), isCustom && /* @__PURE__ */ React38.createElement(import_ui31.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(
2440
- import_ui31.TextField,
2536
+ ))), isCustom && /* @__PURE__ */ React40.createElement(import_ui33.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(
2537
+ import_ui33.TextField,
2441
2538
  {
2442
2539
  size: "tiny",
2443
2540
  type: "number",
@@ -2446,11 +2543,11 @@ var AspectRatioControl = createControl(({ label }) => {
2446
2543
  value: customWidth,
2447
2544
  onChange: handleCustomWidthChange,
2448
2545
  InputProps: {
2449
- startAdornment: /* @__PURE__ */ React38.createElement(import_icons11.ArrowsMoveHorizontalIcon, { fontSize: "tiny" })
2546
+ startAdornment: /* @__PURE__ */ React40.createElement(import_icons12.ArrowsMoveHorizontalIcon, { fontSize: "tiny" })
2450
2547
  }
2451
2548
  }
2452
- )), /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(
2453
- import_ui31.TextField,
2549
+ )), /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(
2550
+ import_ui33.TextField,
2454
2551
  {
2455
2552
  size: "tiny",
2456
2553
  type: "number",
@@ -2459,26 +2556,26 @@ var AspectRatioControl = createControl(({ label }) => {
2459
2556
  value: customHeight,
2460
2557
  onChange: handleCustomHeightChange,
2461
2558
  InputProps: {
2462
- startAdornment: /* @__PURE__ */ React38.createElement(import_icons11.ArrowsMoveVerticalIcon, { fontSize: "tiny" })
2559
+ startAdornment: /* @__PURE__ */ React40.createElement(import_icons12.ArrowsMoveVerticalIcon, { fontSize: "tiny" })
2463
2560
  }
2464
2561
  }
2465
2562
  )))));
2466
2563
  });
2467
2564
 
2468
2565
  // src/controls/svg-media-control.tsx
2469
- var React40 = __toESM(require("react"));
2470
- var import_react18 = require("react");
2566
+ var React42 = __toESM(require("react"));
2567
+ var import_react25 = require("react");
2471
2568
  var import_editor_props19 = require("@elementor/editor-props");
2472
- var import_icons12 = require("@elementor/icons");
2473
- var import_ui33 = require("@elementor/ui");
2569
+ var import_icons13 = require("@elementor/icons");
2570
+ var import_ui35 = require("@elementor/ui");
2474
2571
  var import_wp_media2 = require("@elementor/wp-media");
2475
2572
  var import_i18n13 = require("@wordpress/i18n");
2476
2573
 
2477
2574
  // src/components/enable-unfiltered-modal.tsx
2478
- var React39 = __toESM(require("react"));
2479
- var import_react17 = require("react");
2575
+ var React41 = __toESM(require("react"));
2576
+ var import_react24 = require("react");
2480
2577
  var import_editor_current_user = require("@elementor/editor-current-user");
2481
- var import_ui32 = require("@elementor/ui");
2578
+ var import_ui34 = require("@elementor/ui");
2482
2579
  var import_i18n12 = require("@wordpress/i18n");
2483
2580
  var ADMIN_TITLE_TEXT = (0, import_i18n12.__)("Enable Unfiltered Uploads", "elementor");
2484
2581
  var ADMIN_CONTENT_TEXT = (0, import_i18n12.__)(
@@ -2499,7 +2596,7 @@ var WAIT_FOR_CLOSE_TIMEOUT_MS = 300;
2499
2596
  var EnableUnfilteredModal = (props) => {
2500
2597
  const { mutateAsync, isPending } = useUpdateUnfilteredFilesUpload();
2501
2598
  const { canUser } = (0, import_editor_current_user.useCurrentUserCapabilities)();
2502
- const [isError, setIsError] = (0, import_react17.useState)(false);
2599
+ const [isError, setIsError] = (0, import_react24.useState)(false);
2503
2600
  const canManageOptions = canUser("manage_options");
2504
2601
  const onClose = (enabled) => {
2505
2602
  props.onClose(enabled);
@@ -2518,10 +2615,10 @@ var EnableUnfilteredModal = (props) => {
2518
2615
  }
2519
2616
  };
2520
2617
  const dialogProps = { ...props, isPending, handleEnable, isError, onClose };
2521
- return canManageOptions ? /* @__PURE__ */ React39.createElement(AdminDialog, { ...dialogProps }) : /* @__PURE__ */ React39.createElement(NonAdminDialog, { ...dialogProps });
2618
+ return canManageOptions ? /* @__PURE__ */ React41.createElement(AdminDialog, { ...dialogProps }) : /* @__PURE__ */ React41.createElement(NonAdminDialog, { ...dialogProps });
2522
2619
  };
2523
- var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */ React39.createElement(import_ui32.Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React39.createElement(import_ui32.DialogHeader, { logo: false }, /* @__PURE__ */ React39.createElement(import_ui32.DialogTitle, null, ADMIN_TITLE_TEXT)), /* @__PURE__ */ React39.createElement(import_ui32.Divider, null), /* @__PURE__ */ React39.createElement(import_ui32.DialogContent, null, /* @__PURE__ */ React39.createElement(import_ui32.DialogContentText, null, isError ? /* @__PURE__ */ React39.createElement(React39.Fragment, null, ADMIN_FAILED_CONTENT_TEXT_PT1, " ", /* @__PURE__ */ React39.createElement("br", null), " ", ADMIN_FAILED_CONTENT_TEXT_PT2) : ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React39.createElement(import_ui32.DialogActions, null, /* @__PURE__ */ React39.createElement(import_ui32.Button, { size: "medium", color: "secondary", onClick: () => onClose(false) }, (0, import_i18n12.__)("Cancel", "elementor")), /* @__PURE__ */ React39.createElement(
2524
- import_ui32.Button,
2620
+ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */ React41.createElement(import_ui34.Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React41.createElement(import_ui34.DialogHeader, { logo: false }, /* @__PURE__ */ React41.createElement(import_ui34.DialogTitle, null, ADMIN_TITLE_TEXT)), /* @__PURE__ */ React41.createElement(import_ui34.Divider, null), /* @__PURE__ */ React41.createElement(import_ui34.DialogContent, null, /* @__PURE__ */ React41.createElement(import_ui34.DialogContentText, null, isError ? /* @__PURE__ */ React41.createElement(React41.Fragment, null, ADMIN_FAILED_CONTENT_TEXT_PT1, " ", /* @__PURE__ */ React41.createElement("br", null), " ", ADMIN_FAILED_CONTENT_TEXT_PT2) : ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React41.createElement(import_ui34.DialogActions, null, /* @__PURE__ */ React41.createElement(import_ui34.Button, { size: "medium", color: "secondary", onClick: () => onClose(false) }, (0, import_i18n12.__)("Cancel", "elementor")), /* @__PURE__ */ React41.createElement(
2621
+ import_ui34.Button,
2525
2622
  {
2526
2623
  size: "medium",
2527
2624
  onClick: () => handleEnable(),
@@ -2529,16 +2626,16 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
2529
2626
  color: "primary",
2530
2627
  disabled: isPending
2531
2628
  },
2532
- isPending ? /* @__PURE__ */ React39.createElement(import_ui32.CircularProgress, { size: 24 }) : (0, import_i18n12.__)("Enable", "elementor")
2629
+ isPending ? /* @__PURE__ */ React41.createElement(import_ui34.CircularProgress, { size: 24 }) : (0, import_i18n12.__)("Enable", "elementor")
2533
2630
  )));
2534
- var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */ React39.createElement(import_ui32.Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React39.createElement(import_ui32.DialogHeader, { logo: false }, /* @__PURE__ */ React39.createElement(import_ui32.DialogTitle, null, NON_ADMIN_TITLE_TEXT)), /* @__PURE__ */ React39.createElement(import_ui32.Divider, null), /* @__PURE__ */ React39.createElement(import_ui32.DialogContent, null, /* @__PURE__ */ React39.createElement(import_ui32.DialogContentText, null, NON_ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React39.createElement(import_ui32.DialogActions, null, /* @__PURE__ */ React39.createElement(import_ui32.Button, { size: "medium", onClick: () => onClose(false), variant: "contained", color: "primary" }, (0, import_i18n12.__)("Got it", "elementor"))));
2631
+ var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */ React41.createElement(import_ui34.Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React41.createElement(import_ui34.DialogHeader, { logo: false }, /* @__PURE__ */ React41.createElement(import_ui34.DialogTitle, null, NON_ADMIN_TITLE_TEXT)), /* @__PURE__ */ React41.createElement(import_ui34.Divider, null), /* @__PURE__ */ React41.createElement(import_ui34.DialogContent, null, /* @__PURE__ */ React41.createElement(import_ui34.DialogContentText, null, NON_ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React41.createElement(import_ui34.DialogActions, null, /* @__PURE__ */ React41.createElement(import_ui34.Button, { size: "medium", onClick: () => onClose(false), variant: "contained", color: "primary" }, (0, import_i18n12.__)("Got it", "elementor"))));
2535
2632
 
2536
2633
  // src/controls/svg-media-control.tsx
2537
2634
  var TILE_SIZE = 8;
2538
2635
  var TILE_WHITE = "transparent";
2539
2636
  var TILE_BLACK = "#c1c1c1";
2540
2637
  var TILES_GRADIENT_FORMULA = `linear-gradient(45deg, ${TILE_BLACK} 25%, ${TILE_WHITE} 0, ${TILE_WHITE} 75%, ${TILE_BLACK} 0, ${TILE_BLACK})`;
2541
- var StyledCard = (0, import_ui33.styled)(import_ui33.Card)`
2638
+ var StyledCard = (0, import_ui35.styled)(import_ui35.Card)`
2542
2639
  background-color: white;
2543
2640
  background-image: ${TILES_GRADIENT_FORMULA}, ${TILES_GRADIENT_FORMULA};
2544
2641
  background-size: ${TILE_SIZE}px ${TILE_SIZE}px;
@@ -2547,7 +2644,7 @@ var StyledCard = (0, import_ui33.styled)(import_ui33.Card)`
2547
2644
  ${TILE_SIZE / 2}px ${TILE_SIZE / 2}px;
2548
2645
  border: none;
2549
2646
  `;
2550
- var StyledCardMediaContainer = (0, import_ui33.styled)(import_ui33.Stack)`
2647
+ var StyledCardMediaContainer = (0, import_ui35.styled)(import_ui35.Stack)`
2551
2648
  position: relative;
2552
2649
  height: 140px;
2553
2650
  object-fit: contain;
@@ -2564,7 +2661,7 @@ var SvgMediaControl = createControl(() => {
2564
2661
  const { data: attachment, isFetching } = (0, import_wp_media2.useWpMediaAttachment)(id?.value || null);
2565
2662
  const src = attachment?.url ?? url?.value ?? null;
2566
2663
  const { data: allowSvgUpload } = useUnfilteredFilesUpload();
2567
- const [unfilteredModalOpenState, setUnfilteredModalOpenState] = (0, import_react18.useState)(false);
2664
+ const [unfilteredModalOpenState, setUnfilteredModalOpenState] = (0, import_react25.useState)(false);
2568
2665
  const { open } = (0, import_wp_media2.useWpMediaFrame)({
2569
2666
  mediaTypes: ["svg"],
2570
2667
  multiple: false,
@@ -2592,16 +2689,16 @@ var SvgMediaControl = createControl(() => {
2592
2689
  open(openOptions);
2593
2690
  }
2594
2691
  };
2595
- return /* @__PURE__ */ React40.createElement(import_ui33.Stack, { gap: 1 }, /* @__PURE__ */ React40.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: onCloseUnfilteredModal }), /* @__PURE__ */ React40.createElement(ControlFormLabel, null, " ", (0, import_i18n13.__)("SVG", "elementor"), " "), /* @__PURE__ */ React40.createElement(ControlActions, null, /* @__PURE__ */ React40.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React40.createElement(StyledCardMediaContainer, null, isFetching ? /* @__PURE__ */ React40.createElement(import_ui33.CircularProgress, { role: "progressbar" }) : /* @__PURE__ */ React40.createElement(
2596
- import_ui33.CardMedia,
2692
+ return /* @__PURE__ */ React42.createElement(import_ui35.Stack, { gap: 1 }, /* @__PURE__ */ React42.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: onCloseUnfilteredModal }), /* @__PURE__ */ React42.createElement(ControlFormLabel, null, " ", (0, import_i18n13.__)("SVG", "elementor"), " "), /* @__PURE__ */ React42.createElement(ControlActions, null, /* @__PURE__ */ React42.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React42.createElement(StyledCardMediaContainer, null, isFetching ? /* @__PURE__ */ React42.createElement(import_ui35.CircularProgress, { role: "progressbar" }) : /* @__PURE__ */ React42.createElement(
2693
+ import_ui35.CardMedia,
2597
2694
  {
2598
2695
  component: "img",
2599
2696
  image: src,
2600
2697
  alt: (0, import_i18n13.__)("Preview SVG", "elementor"),
2601
2698
  sx: { maxHeight: "140px", width: "50px" }
2602
2699
  }
2603
- )), /* @__PURE__ */ React40.createElement(
2604
- import_ui33.CardOverlay,
2700
+ )), /* @__PURE__ */ React42.createElement(
2701
+ import_ui35.CardOverlay,
2605
2702
  {
2606
2703
  sx: {
2607
2704
  "&:hover": {
@@ -2609,8 +2706,8 @@ var SvgMediaControl = createControl(() => {
2609
2706
  }
2610
2707
  }
2611
2708
  },
2612
- /* @__PURE__ */ React40.createElement(import_ui33.Stack, { gap: 1 }, /* @__PURE__ */ React40.createElement(
2613
- import_ui33.Button,
2709
+ /* @__PURE__ */ React42.createElement(import_ui35.Stack, { gap: 1 }, /* @__PURE__ */ React42.createElement(
2710
+ import_ui35.Button,
2614
2711
  {
2615
2712
  size: "tiny",
2616
2713
  color: "inherit",
@@ -2618,13 +2715,13 @@ var SvgMediaControl = createControl(() => {
2618
2715
  onClick: () => handleClick(MODE_BROWSE)
2619
2716
  },
2620
2717
  (0, import_i18n13.__)("Select SVG", "elementor")
2621
- ), /* @__PURE__ */ React40.createElement(
2622
- import_ui33.Button,
2718
+ ), /* @__PURE__ */ React42.createElement(
2719
+ import_ui35.Button,
2623
2720
  {
2624
2721
  size: "tiny",
2625
2722
  variant: "text",
2626
2723
  color: "inherit",
2627
- startIcon: /* @__PURE__ */ React40.createElement(import_icons12.UploadIcon, null),
2724
+ startIcon: /* @__PURE__ */ React42.createElement(import_icons13.UploadIcon, null),
2628
2725
  onClick: () => handleClick(MODE_UPLOAD)
2629
2726
  },
2630
2727
  (0, import_i18n13.__)("Upload", "elementor")
@@ -2633,16 +2730,16 @@ var SvgMediaControl = createControl(() => {
2633
2730
  });
2634
2731
 
2635
2732
  // src/controls/background-control/background-control.tsx
2636
- var React47 = __toESM(require("react"));
2733
+ var React49 = __toESM(require("react"));
2637
2734
  var import_editor_props25 = require("@elementor/editor-props");
2638
- var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
2639
- var import_ui41 = require("@elementor/ui");
2735
+ var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
2736
+ var import_ui43 = require("@elementor/ui");
2640
2737
  var import_i18n19 = require("@wordpress/i18n");
2641
2738
 
2642
2739
  // src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
2643
- var React46 = __toESM(require("react"));
2740
+ var React48 = __toESM(require("react"));
2644
2741
  var import_editor_props24 = require("@elementor/editor-props");
2645
- var import_ui40 = require("@elementor/ui");
2742
+ var import_ui42 = require("@elementor/ui");
2646
2743
  var import_wp_media3 = require("@elementor/wp-media");
2647
2744
  var import_i18n18 = require("@wordpress/i18n");
2648
2745
 
@@ -2651,9 +2748,9 @@ var import_env = require("@elementor/env");
2651
2748
  var { env } = (0, import_env.parseEnv)("@elementor/editor-controls");
2652
2749
 
2653
2750
  // src/controls/background-control/background-gradient-color-control.tsx
2654
- var React41 = __toESM(require("react"));
2751
+ var React43 = __toESM(require("react"));
2655
2752
  var import_editor_props20 = require("@elementor/editor-props");
2656
- var import_ui34 = require("@elementor/ui");
2753
+ var import_ui36 = require("@elementor/ui");
2657
2754
  var BackgroundGradientColorControl = createControl(() => {
2658
2755
  const { value, setValue } = useBoundProp(import_editor_props20.backgroundGradientOverlayPropTypeUtil);
2659
2756
  const handleChange = (newValue) => {
@@ -2691,8 +2788,8 @@ var BackgroundGradientColorControl = createControl(() => {
2691
2788
  positions: positions?.value.split(" ")
2692
2789
  };
2693
2790
  };
2694
- return /* @__PURE__ */ React41.createElement(ControlActions, null, /* @__PURE__ */ React41.createElement(
2695
- import_ui34.UnstableGradientBox,
2791
+ return /* @__PURE__ */ React43.createElement(ControlActions, null, /* @__PURE__ */ React43.createElement(
2792
+ import_ui36.UnstableGradientBox,
2696
2793
  {
2697
2794
  sx: { width: "auto", padding: 1.5 },
2698
2795
  value: normalizeValue(),
@@ -2716,34 +2813,35 @@ var initialBackgroundGradientOverlay = import_editor_props20.backgroundGradientO
2716
2813
  });
2717
2814
 
2718
2815
  // src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
2719
- var React42 = __toESM(require("react"));
2720
- var import_icons13 = require("@elementor/icons");
2721
- var import_ui35 = require("@elementor/ui");
2816
+ var React44 = __toESM(require("react"));
2817
+ var import_icons14 = require("@elementor/icons");
2818
+ var import_ui37 = require("@elementor/ui");
2722
2819
  var import_i18n14 = require("@wordpress/i18n");
2723
2820
  var attachmentControlOptions = [
2724
2821
  {
2725
2822
  value: "fixed",
2726
2823
  label: (0, import_i18n14.__)("Fixed", "elementor"),
2727
- renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(import_icons13.PinIcon, { fontSize: size }),
2824
+ renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(import_icons14.PinIcon, { fontSize: size }),
2728
2825
  showTooltip: true
2729
2826
  },
2730
2827
  {
2731
2828
  value: "scroll",
2732
2829
  label: (0, import_i18n14.__)("Scroll", "elementor"),
2733
- renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(import_icons13.PinnedOffIcon, { fontSize: size }),
2830
+ renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(import_icons14.PinnedOffIcon, { fontSize: size }),
2734
2831
  showTooltip: true
2735
2832
  }
2736
2833
  ];
2737
2834
  var BackgroundImageOverlayAttachment = () => {
2738
- return /* @__PURE__ */ React42.createElement(PopoverGridContainer, null, /* @__PURE__ */ React42.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(ControlFormLabel, null, (0, import_i18n14.__)("Attachment", "elementor"))), /* @__PURE__ */ React42.createElement(import_ui35.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React42.createElement(ToggleControl, { options: attachmentControlOptions })));
2835
+ return /* @__PURE__ */ React44.createElement(PopoverGridContainer, null, /* @__PURE__ */ React44.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(ControlFormLabel, null, (0, import_i18n14.__)("Attachment", "elementor"))), /* @__PURE__ */ React44.createElement(import_ui37.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React44.createElement(ToggleControl, { options: attachmentControlOptions })));
2739
2836
  };
2740
2837
 
2741
2838
  // src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
2742
- var React43 = __toESM(require("react"));
2839
+ var React45 = __toESM(require("react"));
2840
+ var import_react26 = require("react");
2743
2841
  var import_editor_props21 = require("@elementor/editor-props");
2744
2842
  var import_editor_ui6 = require("@elementor/editor-ui");
2745
- var import_icons14 = require("@elementor/icons");
2746
- var import_ui36 = require("@elementor/ui");
2843
+ var import_icons15 = require("@elementor/icons");
2844
+ var import_ui38 = require("@elementor/ui");
2747
2845
  var import_i18n15 = require("@wordpress/i18n");
2748
2846
  var backgroundPositionOptions = [
2749
2847
  { label: (0, import_i18n15.__)("Center center", "elementor"), value: "center center" },
@@ -2761,6 +2859,7 @@ var BackgroundImageOverlayPosition = () => {
2761
2859
  const backgroundImageOffsetContext = useBoundProp(import_editor_props21.backgroundImagePositionOffsetPropTypeUtil);
2762
2860
  const stringPropContext = useBoundProp(import_editor_props21.stringPropTypeUtil);
2763
2861
  const isCustom = !!backgroundImageOffsetContext.value;
2862
+ const rowRef = (0, import_react26.useRef)();
2764
2863
  const handlePositionChange = (event) => {
2765
2864
  const value = event.target.value || null;
2766
2865
  if (value === "custom") {
@@ -2769,8 +2868,8 @@ var BackgroundImageOverlayPosition = () => {
2769
2868
  stringPropContext.setValue(value);
2770
2869
  }
2771
2870
  };
2772
- return /* @__PURE__ */ React43.createElement(import_ui36.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React43.createElement(import_ui36.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React43.createElement(PopoverGridContainer, null, /* @__PURE__ */ React43.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(ControlFormLabel, null, (0, import_i18n15.__)("Position", "elementor"))), /* @__PURE__ */ React43.createElement(import_ui36.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React43.createElement(
2773
- import_ui36.Select,
2871
+ return /* @__PURE__ */ React45.createElement(import_ui38.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React45.createElement(import_ui38.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React45.createElement(PopoverGridContainer, null, /* @__PURE__ */ React45.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlFormLabel, null, (0, import_i18n15.__)("Position", "elementor"))), /* @__PURE__ */ React45.createElement(import_ui38.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React45.createElement(
2872
+ import_ui38.Select,
2774
2873
  {
2775
2874
  fullWidth: true,
2776
2875
  size: "tiny",
@@ -2778,74 +2877,87 @@ var BackgroundImageOverlayPosition = () => {
2778
2877
  disabled: stringPropContext.disabled,
2779
2878
  value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? ""
2780
2879
  },
2781
- backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React43.createElement(import_editor_ui6.MenuListItem, { key: value, value: value ?? "" }, label))
2782
- )))), isCustom ? /* @__PURE__ */ React43.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React43.createElement(import_ui36.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React43.createElement(import_ui36.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React43.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React43.createElement(SizeControl, { startIcon: /* @__PURE__ */ React43.createElement(import_icons14.LetterXIcon, { fontSize: "tiny" }) }))), /* @__PURE__ */ React43.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React43.createElement(SizeControl, { startIcon: /* @__PURE__ */ React43.createElement(import_icons14.LetterYIcon, { fontSize: "tiny" }) })))))) : null);
2880
+ backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React45.createElement(import_editor_ui6.MenuListItem, { key: value, value: value ?? "" }, label))
2881
+ )))), isCustom ? /* @__PURE__ */ React45.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React45.createElement(import_ui38.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React45.createElement(import_ui38.Grid, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React45.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React45.createElement(
2882
+ SizeControl,
2883
+ {
2884
+ startIcon: /* @__PURE__ */ React45.createElement(import_icons15.LetterXIcon, { fontSize: "tiny" }),
2885
+ anchorRef: rowRef
2886
+ }
2887
+ ))), /* @__PURE__ */ React45.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React45.createElement(
2888
+ SizeControl,
2889
+ {
2890
+ startIcon: /* @__PURE__ */ React45.createElement(import_icons15.LetterYIcon, { fontSize: "tiny" }),
2891
+ anchorRef: rowRef
2892
+ }
2893
+ )))))) : null);
2783
2894
  };
2784
2895
 
2785
2896
  // src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
2786
- var React44 = __toESM(require("react"));
2787
- var import_icons15 = require("@elementor/icons");
2788
- var import_ui37 = require("@elementor/ui");
2897
+ var React46 = __toESM(require("react"));
2898
+ var import_icons16 = require("@elementor/icons");
2899
+ var import_ui39 = require("@elementor/ui");
2789
2900
  var import_i18n16 = require("@wordpress/i18n");
2790
2901
  var repeatControlOptions = [
2791
2902
  {
2792
2903
  value: "repeat",
2793
2904
  label: (0, import_i18n16.__)("Repeat", "elementor"),
2794
- renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(import_icons15.GridDotsIcon, { fontSize: size }),
2905
+ renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(import_icons16.GridDotsIcon, { fontSize: size }),
2795
2906
  showTooltip: true
2796
2907
  },
2797
2908
  {
2798
2909
  value: "repeat-x",
2799
2910
  label: (0, import_i18n16.__)("Repeat-x", "elementor"),
2800
- renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(import_icons15.DotsHorizontalIcon, { fontSize: size }),
2911
+ renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(import_icons16.DotsHorizontalIcon, { fontSize: size }),
2801
2912
  showTooltip: true
2802
2913
  },
2803
2914
  {
2804
2915
  value: "repeat-y",
2805
2916
  label: (0, import_i18n16.__)("Repeat-y", "elementor"),
2806
- renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(import_icons15.DotsVerticalIcon, { fontSize: size }),
2917
+ renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(import_icons16.DotsVerticalIcon, { fontSize: size }),
2807
2918
  showTooltip: true
2808
2919
  },
2809
2920
  {
2810
2921
  value: "no-repeat",
2811
2922
  label: (0, import_i18n16.__)("No-repeat", "elementor"),
2812
- renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(import_icons15.XIcon, { fontSize: size }),
2923
+ renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(import_icons16.XIcon, { fontSize: size }),
2813
2924
  showTooltip: true
2814
2925
  }
2815
2926
  ];
2816
2927
  var BackgroundImageOverlayRepeat = () => {
2817
- return /* @__PURE__ */ React44.createElement(PopoverGridContainer, null, /* @__PURE__ */ React44.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(ControlFormLabel, null, (0, import_i18n16.__)("Repeat", "elementor"))), /* @__PURE__ */ React44.createElement(import_ui37.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React44.createElement(ToggleControl, { options: repeatControlOptions })));
2928
+ return /* @__PURE__ */ React46.createElement(PopoverGridContainer, null, /* @__PURE__ */ React46.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlFormLabel, null, (0, import_i18n16.__)("Repeat", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui39.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React46.createElement(ToggleControl, { options: repeatControlOptions })));
2818
2929
  };
2819
2930
 
2820
2931
  // src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
2821
- var React45 = __toESM(require("react"));
2932
+ var React47 = __toESM(require("react"));
2933
+ var import_react27 = require("react");
2822
2934
  var import_editor_props22 = require("@elementor/editor-props");
2823
- var import_icons16 = require("@elementor/icons");
2824
- var import_ui38 = require("@elementor/ui");
2935
+ var import_icons17 = require("@elementor/icons");
2936
+ var import_ui40 = require("@elementor/ui");
2825
2937
  var import_i18n17 = require("@wordpress/i18n");
2826
2938
  var sizeControlOptions = [
2827
2939
  {
2828
2940
  value: "auto",
2829
2941
  label: (0, import_i18n17.__)("Auto", "elementor"),
2830
- renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(import_icons16.LetterAIcon, { fontSize: size }),
2942
+ renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(import_icons17.LetterAIcon, { fontSize: size }),
2831
2943
  showTooltip: true
2832
2944
  },
2833
2945
  {
2834
2946
  value: "cover",
2835
2947
  label: (0, import_i18n17.__)("Cover", "elementor"),
2836
- renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(import_icons16.ArrowsMaximizeIcon, { fontSize: size }),
2948
+ renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(import_icons17.ArrowsMaximizeIcon, { fontSize: size }),
2837
2949
  showTooltip: true
2838
2950
  },
2839
2951
  {
2840
2952
  value: "contain",
2841
2953
  label: (0, import_i18n17.__)("Contain", "elementor"),
2842
- renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(import_icons16.ArrowBarBothIcon, { fontSize: size }),
2954
+ renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(import_icons17.ArrowBarBothIcon, { fontSize: size }),
2843
2955
  showTooltip: true
2844
2956
  },
2845
2957
  {
2846
2958
  value: "custom",
2847
2959
  label: (0, import_i18n17.__)("Custom", "elementor"),
2848
- renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(import_icons16.PencilIcon, { fontSize: size }),
2960
+ renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(import_icons17.PencilIcon, { fontSize: size }),
2849
2961
  showTooltip: true
2850
2962
  }
2851
2963
  ];
@@ -2853,6 +2965,7 @@ var BackgroundImageOverlaySize = () => {
2853
2965
  const backgroundImageScaleContext = useBoundProp(import_editor_props22.backgroundImageSizeScalePropTypeUtil);
2854
2966
  const stringPropContext = useBoundProp(import_editor_props22.stringPropTypeUtil);
2855
2967
  const isCustom = !!backgroundImageScaleContext.value;
2968
+ const rowRef = (0, import_react27.useRef)();
2856
2969
  const handleSizeChange = (size) => {
2857
2970
  if (size === "custom") {
2858
2971
  backgroundImageScaleContext.setValue({ width: null, height: null });
@@ -2860,7 +2973,7 @@ var BackgroundImageOverlaySize = () => {
2860
2973
  stringPropContext.setValue(size);
2861
2974
  }
2862
2975
  };
2863
- return /* @__PURE__ */ React45.createElement(import_ui38.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React45.createElement(import_ui38.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React45.createElement(PopoverGridContainer, null, /* @__PURE__ */ React45.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlFormLabel, null, (0, import_i18n17.__)("Size", "elementor"))), /* @__PURE__ */ React45.createElement(import_ui38.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React45.createElement(
2976
+ return /* @__PURE__ */ React47.createElement(import_ui40.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React47.createElement(import_ui40.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React47.createElement(PopoverGridContainer, null, /* @__PURE__ */ React47.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlFormLabel, null, (0, import_i18n17.__)("Size", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui40.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React47.createElement(
2864
2977
  ControlToggleButtonGroup,
2865
2978
  {
2866
2979
  exclusive: true,
@@ -2869,25 +2982,27 @@ var BackgroundImageOverlaySize = () => {
2869
2982
  disabled: stringPropContext.disabled,
2870
2983
  value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value
2871
2984
  }
2872
- )))), isCustom ? /* @__PURE__ */ React45.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React45.createElement(import_ui38.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React45.createElement(PopoverGridContainer, null, /* @__PURE__ */ React45.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React45.createElement(
2985
+ )))), isCustom ? /* @__PURE__ */ React47.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React47.createElement(import_ui40.Grid, { item: true, xs: 12, ref: rowRef }, /* @__PURE__ */ React47.createElement(PopoverGridContainer, null, /* @__PURE__ */ React47.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React47.createElement(
2873
2986
  SizeControl,
2874
2987
  {
2875
- startIcon: /* @__PURE__ */ React45.createElement(import_icons16.ArrowsMoveHorizontalIcon, { fontSize: "tiny" }),
2876
- extendedValues: ["auto"]
2988
+ startIcon: /* @__PURE__ */ React47.createElement(import_icons17.ArrowsMoveHorizontalIcon, { fontSize: "tiny" }),
2989
+ extendedOptions: ["auto"],
2990
+ anchorRef: rowRef
2877
2991
  }
2878
- ))), /* @__PURE__ */ React45.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React45.createElement(
2992
+ ))), /* @__PURE__ */ React47.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React47.createElement(
2879
2993
  SizeControl,
2880
2994
  {
2881
- startIcon: /* @__PURE__ */ React45.createElement(import_icons16.ArrowsMoveVerticalIcon, { fontSize: "tiny" }),
2882
- extendedValues: ["auto"]
2995
+ startIcon: /* @__PURE__ */ React47.createElement(import_icons17.ArrowsMoveVerticalIcon, { fontSize: "tiny" }),
2996
+ extendedOptions: ["auto"],
2997
+ anchorRef: rowRef
2883
2998
  }
2884
2999
  )))))) : null);
2885
3000
  };
2886
3001
 
2887
3002
  // src/controls/background-control/background-overlay/use-background-tabs-history.ts
2888
- var import_react19 = require("react");
3003
+ var import_react28 = require("react");
2889
3004
  var import_editor_props23 = require("@elementor/editor-props");
2890
- var import_ui39 = require("@elementor/ui");
3005
+ var import_ui41 = require("@elementor/ui");
2891
3006
  var useBackgroundTabsHistory = ({
2892
3007
  color: initialBackgroundColorOverlay2,
2893
3008
  image: initialBackgroundImageOverlay,
@@ -2905,8 +3020,8 @@ var useBackgroundTabsHistory = ({
2905
3020
  }
2906
3021
  return "image";
2907
3022
  };
2908
- const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui39.useTabs)(getCurrentOverlayType());
2909
- const valuesHistory = (0, import_react19.useRef)({
3023
+ const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui41.useTabs)(getCurrentOverlayType());
3024
+ const valuesHistory = (0, import_react28.useRef)({
2910
3025
  image: initialBackgroundImageOverlay,
2911
3026
  color: initialBackgroundColorOverlay2,
2912
3027
  gradient: initialBackgroundGradientOverlay2
@@ -2981,7 +3096,7 @@ var backgroundResolutionOptions = [
2981
3096
  ];
2982
3097
  var BackgroundOverlayRepeaterControl = createControl(() => {
2983
3098
  const { propType, value: overlayValues, setValue, disabled } = useBoundProp(import_editor_props24.backgroundOverlayPropTypeUtil);
2984
- return /* @__PURE__ */ React46.createElement(PropProvider, { propType, value: overlayValues, setValue, disabled }, /* @__PURE__ */ React46.createElement(
3099
+ return /* @__PURE__ */ React48.createElement(PropProvider, { propType, value: overlayValues, setValue, disabled }, /* @__PURE__ */ React48.createElement(
2985
3100
  Repeater,
2986
3101
  {
2987
3102
  openOnAdd: true,
@@ -2999,7 +3114,7 @@ var BackgroundOverlayRepeaterControl = createControl(() => {
2999
3114
  ));
3000
3115
  });
3001
3116
  var ItemContent2 = ({ anchorEl = null, bind }) => {
3002
- return /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React46.createElement(Content2, { anchorEl }));
3117
+ return /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React48.createElement(Content2, { anchorEl }));
3003
3118
  };
3004
3119
  var Content2 = ({ anchorEl }) => {
3005
3120
  const { getTabsProps, getTabProps, getTabPanelProps } = useBackgroundTabsHistory({
@@ -3007,27 +3122,27 @@ var Content2 = ({ anchorEl }) => {
3007
3122
  color: initialBackgroundColorOverlay.value,
3008
3123
  gradient: initialBackgroundGradientOverlay.value
3009
3124
  });
3010
- return /* @__PURE__ */ React46.createElement(import_ui40.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React46.createElement(import_ui40.Box, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React46.createElement(
3011
- import_ui40.Tabs,
3125
+ return /* @__PURE__ */ React48.createElement(import_ui42.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React48.createElement(import_ui42.Box, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React48.createElement(
3126
+ import_ui42.Tabs,
3012
3127
  {
3013
3128
  size: "small",
3014
3129
  variant: "fullWidth",
3015
3130
  ...getTabsProps(),
3016
3131
  "aria-label": (0, import_i18n18.__)("Background Overlay", "elementor")
3017
3132
  },
3018
- /* @__PURE__ */ React46.createElement(import_ui40.Tab, { label: (0, import_i18n18.__)("Image", "elementor"), ...getTabProps("image") }),
3019
- /* @__PURE__ */ React46.createElement(import_ui40.Tab, { label: (0, import_i18n18.__)("Gradient", "elementor"), ...getTabProps("gradient") }),
3020
- /* @__PURE__ */ React46.createElement(import_ui40.Tab, { label: (0, import_i18n18.__)("Color", "elementor"), ...getTabProps("color") })
3021
- )), /* @__PURE__ */ React46.createElement(import_ui40.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React46.createElement(PopoverContent, null, /* @__PURE__ */ React46.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React46.createElement(import_ui40.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React46.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React46.createElement(import_ui40.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React46.createElement(PopoverContent, null, /* @__PURE__ */ React46.createElement(ColorOverlayContent, { anchorEl }))));
3133
+ /* @__PURE__ */ React48.createElement(import_ui42.Tab, { label: (0, import_i18n18.__)("Image", "elementor"), ...getTabProps("image") }),
3134
+ /* @__PURE__ */ React48.createElement(import_ui42.Tab, { label: (0, import_i18n18.__)("Gradient", "elementor"), ...getTabProps("gradient") }),
3135
+ /* @__PURE__ */ React48.createElement(import_ui42.Tab, { label: (0, import_i18n18.__)("Color", "elementor"), ...getTabProps("color") })
3136
+ )), /* @__PURE__ */ React48.createElement(import_ui42.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React48.createElement(PopoverContent, null, /* @__PURE__ */ React48.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React48.createElement(import_ui42.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React48.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React48.createElement(import_ui42.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React48.createElement(PopoverContent, null, /* @__PURE__ */ React48.createElement(ColorOverlayContent, { anchorEl }))));
3022
3137
  };
3023
3138
  var ItemIcon2 = ({ value }) => {
3024
3139
  switch (value.$$type) {
3025
3140
  case "background-image-overlay":
3026
- return /* @__PURE__ */ React46.createElement(ItemIconImage, { value });
3141
+ return /* @__PURE__ */ React48.createElement(ItemIconImage, { value });
3027
3142
  case "background-color-overlay":
3028
- return /* @__PURE__ */ React46.createElement(ItemIconColor, { value });
3143
+ return /* @__PURE__ */ React48.createElement(ItemIconColor, { value });
3029
3144
  case "background-gradient-overlay":
3030
- return /* @__PURE__ */ React46.createElement(ItemIconGradient, { value });
3145
+ return /* @__PURE__ */ React48.createElement(ItemIconGradient, { value });
3031
3146
  default:
3032
3147
  return null;
3033
3148
  }
@@ -3040,12 +3155,12 @@ var extractColorFrom = (prop) => {
3040
3155
  };
3041
3156
  var ItemIconColor = ({ value: prop }) => {
3042
3157
  const color = extractColorFrom(prop);
3043
- return /* @__PURE__ */ React46.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
3158
+ return /* @__PURE__ */ React48.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
3044
3159
  };
3045
3160
  var ItemIconImage = ({ value }) => {
3046
3161
  const { imageUrl } = useImage(value);
3047
- return /* @__PURE__ */ React46.createElement(
3048
- import_ui40.CardMedia,
3162
+ return /* @__PURE__ */ React48.createElement(
3163
+ import_ui42.CardMedia,
3049
3164
  {
3050
3165
  image: imageUrl,
3051
3166
  sx: (theme) => ({
@@ -3059,49 +3174,49 @@ var ItemIconImage = ({ value }) => {
3059
3174
  };
3060
3175
  var ItemIconGradient = ({ value }) => {
3061
3176
  const gradient = getGradientValue(value);
3062
- return /* @__PURE__ */ React46.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
3177
+ return /* @__PURE__ */ React48.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
3063
3178
  };
3064
3179
  var ItemLabel2 = ({ value }) => {
3065
3180
  switch (value.$$type) {
3066
3181
  case "background-image-overlay":
3067
- return /* @__PURE__ */ React46.createElement(ItemLabelImage, { value });
3182
+ return /* @__PURE__ */ React48.createElement(ItemLabelImage, { value });
3068
3183
  case "background-color-overlay":
3069
- return /* @__PURE__ */ React46.createElement(ItemLabelColor, { value });
3184
+ return /* @__PURE__ */ React48.createElement(ItemLabelColor, { value });
3070
3185
  case "background-gradient-overlay":
3071
- return /* @__PURE__ */ React46.createElement(ItemLabelGradient, { value });
3186
+ return /* @__PURE__ */ React48.createElement(ItemLabelGradient, { value });
3072
3187
  default:
3073
3188
  return null;
3074
3189
  }
3075
3190
  };
3076
3191
  var ItemLabelColor = ({ value: prop }) => {
3077
3192
  const color = extractColorFrom(prop);
3078
- return /* @__PURE__ */ React46.createElement("span", null, color);
3193
+ return /* @__PURE__ */ React48.createElement("span", null, color);
3079
3194
  };
3080
3195
  var ItemLabelImage = ({ value }) => {
3081
3196
  const { imageTitle } = useImage(value);
3082
- return /* @__PURE__ */ React46.createElement("span", null, imageTitle);
3197
+ return /* @__PURE__ */ React48.createElement("span", null, imageTitle);
3083
3198
  };
3084
3199
  var ItemLabelGradient = ({ value }) => {
3085
3200
  if (value.value.type.value === "linear") {
3086
- return /* @__PURE__ */ React46.createElement("span", null, (0, import_i18n18.__)("Linear Gradient", "elementor"));
3201
+ return /* @__PURE__ */ React48.createElement("span", null, (0, import_i18n18.__)("Linear Gradient", "elementor"));
3087
3202
  }
3088
- return /* @__PURE__ */ React46.createElement("span", null, (0, import_i18n18.__)("Radial Gradient", "elementor"));
3203
+ return /* @__PURE__ */ React48.createElement("span", null, (0, import_i18n18.__)("Radial Gradient", "elementor"));
3089
3204
  };
3090
3205
  var ColorOverlayContent = ({ anchorEl }) => {
3091
3206
  const propContext = useBoundProp(import_editor_props24.backgroundColorOverlayPropTypeUtil);
3092
- return /* @__PURE__ */ React46.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React46.createElement(ColorControl, { anchorEl })));
3207
+ return /* @__PURE__ */ React48.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React48.createElement(ColorControl, { anchorEl })));
3093
3208
  };
3094
3209
  var ImageOverlayContent = () => {
3095
3210
  const propContext = useBoundProp(import_editor_props24.backgroundImageOverlayPropTypeUtil);
3096
- return /* @__PURE__ */ React46.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React46.createElement(import_ui40.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React46.createElement(import_ui40.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(
3211
+ return /* @__PURE__ */ React48.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React48.createElement(import_ui42.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React48.createElement(import_ui42.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React48.createElement(
3097
3212
  ImageControl,
3098
3213
  {
3099
3214
  resolutionLabel: (0, import_i18n18.__)("Resolution", "elementor"),
3100
3215
  sizes: backgroundResolutionOptions
3101
3216
  }
3102
- )))), /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React46.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React46.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React46.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React46.createElement(BackgroundImageOverlayAttachment, null)));
3217
+ )))), /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React48.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React48.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React48.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React48.createElement(BackgroundImageOverlayAttachment, null)));
3103
3218
  };
3104
- var StyledUnstableColorIndicator = (0, import_ui40.styled)(import_ui40.UnstableColorIndicator)(({ theme }) => ({
3219
+ var StyledUnstableColorIndicator = (0, import_ui42.styled)(import_ui42.UnstableColorIndicator)(({ theme }) => ({
3105
3220
  borderRadius: `${theme.shape.borderRadius / 2}px`
3106
3221
  }));
3107
3222
  var useImage = (image) => {
@@ -3137,22 +3252,204 @@ var getGradientValue = (value) => {
3137
3252
  // src/controls/background-control/background-control.tsx
3138
3253
  var BackgroundControl = createControl(() => {
3139
3254
  const propContext = useBoundProp(import_editor_props25.backgroundPropTypeUtil);
3140
- const isUsingNestedProps = (0, import_editor_v1_adapters3.isExperimentActive)("e_v_3_30");
3255
+ const isUsingNestedProps = (0, import_editor_v1_adapters4.isExperimentActive)("e_v_3_30");
3141
3256
  const colorLabel = (0, import_i18n19.__)("Color", "elementor");
3142
- return /* @__PURE__ */ React47.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React47.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React47.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React47.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React47.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui41.Grid, { item: true, xs: 6 }, isUsingNestedProps ? /* @__PURE__ */ React47.createElement(ControlLabel, null, colorLabel) : /* @__PURE__ */ React47.createElement(ControlFormLabel, null, colorLabel)), /* @__PURE__ */ React47.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ColorControl, null)))));
3257
+ return /* @__PURE__ */ React49.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React49.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React49.createElement(import_ui43.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(import_ui43.Grid, { item: true, xs: 6 }, isUsingNestedProps ? /* @__PURE__ */ React49.createElement(ControlLabel, null, colorLabel) : /* @__PURE__ */ React49.createElement(ControlFormLabel, null, colorLabel)), /* @__PURE__ */ React49.createElement(import_ui43.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ColorControl, null)))));
3143
3258
  });
3144
3259
 
3145
3260
  // src/controls/switch-control.tsx
3146
- var React48 = __toESM(require("react"));
3261
+ var React50 = __toESM(require("react"));
3147
3262
  var import_editor_props26 = require("@elementor/editor-props");
3148
- var import_ui42 = require("@elementor/ui");
3263
+ var import_ui44 = require("@elementor/ui");
3149
3264
  var SwitchControl2 = createControl(() => {
3150
3265
  const { value, setValue, disabled } = useBoundProp(import_editor_props26.booleanPropTypeUtil);
3151
3266
  const handleChange = (event) => {
3152
3267
  setValue(event.target.checked);
3153
3268
  };
3154
- return /* @__PURE__ */ React48.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React48.createElement(import_ui42.Switch, { checked: !!value, onChange: handleChange, size: "small", disabled }));
3269
+ return /* @__PURE__ */ React50.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React50.createElement(import_ui44.Switch, { checked: !!value, onChange: handleChange, size: "small", disabled }));
3270
+ });
3271
+
3272
+ // src/controls/repeatable-control.tsx
3273
+ var React51 = __toESM(require("react"));
3274
+ var import_react30 = require("react");
3275
+ var import_editor_props27 = require("@elementor/editor-props");
3276
+ var import_i18n20 = require("@wordpress/i18n");
3277
+
3278
+ // src/hooks/use-repeatable-control-context.ts
3279
+ var import_react29 = require("react");
3280
+ var RepeatableControlContext = (0, import_react29.createContext)(void 0);
3281
+ var useRepeatableControlContext = () => {
3282
+ const context = (0, import_react29.useContext)(RepeatableControlContext);
3283
+ if (!context) {
3284
+ throw new Error("useRepeatableControlContext must be used within RepeatableControl");
3285
+ }
3286
+ return context;
3287
+ };
3288
+
3289
+ // src/controls/repeatable-control.tsx
3290
+ var RepeatableControl = createControl(
3291
+ ({ label, childControlConfig, showDuplicate, showToggle }) => {
3292
+ const { propTypeUtil: childPropTypeUtil } = childControlConfig;
3293
+ if (!childPropTypeUtil) {
3294
+ return null;
3295
+ }
3296
+ const childArrayPropTypeUtil = (0, import_react30.useMemo)(
3297
+ () => (0, import_editor_props27.createArrayPropUtils)(childPropTypeUtil.key, childPropTypeUtil.schema),
3298
+ [childPropTypeUtil.key, childPropTypeUtil.schema]
3299
+ );
3300
+ const { propType, value, setValue } = useBoundProp(childArrayPropTypeUtil);
3301
+ return /* @__PURE__ */ React51.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React51.createElement(RepeatableControlContext.Provider, { value: childControlConfig }, /* @__PURE__ */ React51.createElement(
3302
+ Repeater,
3303
+ {
3304
+ openOnAdd: true,
3305
+ values: value ?? [],
3306
+ setValues: setValue,
3307
+ label,
3308
+ itemSettings: {
3309
+ Icon: ItemIcon3,
3310
+ Label: ItemLabel3,
3311
+ Content: ItemContent3,
3312
+ initialValues: childPropTypeUtil.create(null)
3313
+ },
3314
+ showDuplicate,
3315
+ showToggle
3316
+ }
3317
+ )));
3318
+ }
3319
+ );
3320
+ var ItemContent3 = ({ bind }) => {
3321
+ return /* @__PURE__ */ React51.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React51.createElement(Content3, null));
3322
+ };
3323
+ var ItemIcon3 = () => /* @__PURE__ */ React51.createElement(React51.Fragment, null);
3324
+ var Content3 = () => {
3325
+ const { component: ChildControl, props = {} } = useRepeatableControlContext();
3326
+ return /* @__PURE__ */ React51.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React51.createElement(PopoverGridContainer, null, /* @__PURE__ */ React51.createElement(ChildControl, { ...props })));
3327
+ };
3328
+ var ItemLabel3 = () => {
3329
+ const { label = (0, import_i18n20.__)("Empty", "elementor") } = useRepeatableControlContext();
3330
+ return /* @__PURE__ */ React51.createElement("span", null, label);
3331
+ };
3332
+
3333
+ // src/controls/key-value-control.tsx
3334
+ var React52 = __toESM(require("react"));
3335
+ var import_react31 = require("react");
3336
+ var import_editor_props28 = require("@elementor/editor-props");
3337
+ var import_ui45 = require("@elementor/ui");
3338
+ var import_i18n21 = require("@wordpress/i18n");
3339
+ var KeyValueControl = createControl((props = {}) => {
3340
+ const { value, setValue } = useBoundProp(import_editor_props28.keyValuePropTypeUtil);
3341
+ const [keyError, setKeyError] = (0, import_react31.useState)(null);
3342
+ const [valueError, setValueError] = (0, import_react31.useState)(null);
3343
+ const keyLabel = props.keyName || (0, import_i18n21.__)("Key", "elementor");
3344
+ const valueLabel = props.valueName || (0, import_i18n21.__)("Value", "elementor");
3345
+ const keyValue = value?.key?.value || "";
3346
+ const valueValue = value?.value?.value || "";
3347
+ const [keyRegex, valueRegex, errMsg] = (0, import_react31.useMemo)(
3348
+ () => [
3349
+ props.regexKey ? new RegExp(props.regexKey) : void 0,
3350
+ props.regexValue ? new RegExp(props.regexValue) : void 0,
3351
+ props.validationErrorMessage || (0, import_i18n21.__)("Invalid Format", "elementor")
3352
+ ],
3353
+ [props.regexKey, props.regexValue, props.validationErrorMessage]
3354
+ );
3355
+ const validate = (newValue, FieldType) => {
3356
+ if (FieldType === "key" && keyRegex) {
3357
+ const isValid = keyRegex.test(newValue);
3358
+ setKeyError(isValid ? null : errMsg);
3359
+ } else if (FieldType === "value" && valueRegex) {
3360
+ const isValid = valueRegex.test(newValue);
3361
+ setValueError(isValid ? null : errMsg);
3362
+ }
3363
+ };
3364
+ const handleChange = (event, fieldType) => {
3365
+ const newValue = event.target.value;
3366
+ validate(newValue, fieldType);
3367
+ setValue({
3368
+ ...value,
3369
+ [fieldType]: {
3370
+ value: newValue,
3371
+ $$type: "string"
3372
+ }
3373
+ });
3374
+ };
3375
+ const isKeyInvalid = keyError !== null;
3376
+ const isValueInvalid = valueError !== null;
3377
+ return /* @__PURE__ */ React52.createElement(ControlActions, null, /* @__PURE__ */ React52.createElement(import_ui45.Grid, { container: true, gap: 1.5, p: 1.5, sx: props.sx }, /* @__PURE__ */ React52.createElement(import_ui45.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React52.createElement(import_ui45.FormLabel, { size: "tiny" }, keyLabel), /* @__PURE__ */ React52.createElement(
3378
+ import_ui45.TextField,
3379
+ {
3380
+ sx: { pt: 1 },
3381
+ size: "tiny",
3382
+ fullWidth: true,
3383
+ value: keyValue,
3384
+ onChange: (e) => handleChange(e, "key"),
3385
+ error: isKeyInvalid
3386
+ }
3387
+ ), isKeyInvalid && /* @__PURE__ */ React52.createElement(import_ui45.FormHelperText, { error: true }, keyError)), /* @__PURE__ */ React52.createElement(import_ui45.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React52.createElement(import_ui45.FormLabel, { size: "tiny" }, valueLabel), /* @__PURE__ */ React52.createElement(
3388
+ import_ui45.TextField,
3389
+ {
3390
+ sx: { pt: 1 },
3391
+ size: "tiny",
3392
+ fullWidth: true,
3393
+ value: valueValue,
3394
+ onChange: (e) => handleChange(e, "value"),
3395
+ disabled: isKeyInvalid,
3396
+ error: isValueInvalid
3397
+ }
3398
+ ), isValueInvalid && /* @__PURE__ */ React52.createElement(import_ui45.FormHelperText, { error: true }, valueError))));
3155
3399
  });
3400
+
3401
+ // src/controls/position-control.tsx
3402
+ var React53 = __toESM(require("react"));
3403
+ var import_react32 = require("react");
3404
+ var import_editor_props29 = require("@elementor/editor-props");
3405
+ var import_editor_ui7 = require("@elementor/editor-ui");
3406
+ var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
3407
+ var import_icons18 = require("@elementor/icons");
3408
+ var import_ui46 = require("@elementor/ui");
3409
+ var import_i18n22 = require("@wordpress/i18n");
3410
+ var positionOptions = [
3411
+ { label: (0, import_i18n22.__)("Center center", "elementor"), value: "center center" },
3412
+ { label: (0, import_i18n22.__)("Center left", "elementor"), value: "center left" },
3413
+ { label: (0, import_i18n22.__)("Center right", "elementor"), value: "center right" },
3414
+ { label: (0, import_i18n22.__)("Top center", "elementor"), value: "top center" },
3415
+ { label: (0, import_i18n22.__)("Top left", "elementor"), value: "top left" },
3416
+ { label: (0, import_i18n22.__)("Top right", "elementor"), value: "top right" },
3417
+ { label: (0, import_i18n22.__)("Bottom center", "elementor"), value: "bottom center" },
3418
+ { label: (0, import_i18n22.__)("Bottom left", "elementor"), value: "bottom left" },
3419
+ { label: (0, import_i18n22.__)("Bottom right", "elementor"), value: "bottom right" }
3420
+ ];
3421
+ var PositionControl = () => {
3422
+ const positionContext = useBoundProp(import_editor_props29.positionPropTypeUtil);
3423
+ const stringPropContext = useBoundProp(import_editor_props29.stringPropTypeUtil);
3424
+ const isVersion331Active = (0, import_editor_v1_adapters5.isExperimentActive)("e_v_3_31");
3425
+ const isCustom = !!positionContext.value && isVersion331Active;
3426
+ const availablePositionOptions = (0, import_react32.useMemo)(() => {
3427
+ const options = [...positionOptions];
3428
+ if (isVersion331Active) {
3429
+ options.push({ label: (0, import_i18n22.__)("Custom", "elementor"), value: "custom" });
3430
+ }
3431
+ return options;
3432
+ }, [isVersion331Active]);
3433
+ const handlePositionChange = (event) => {
3434
+ const value = event.target.value || null;
3435
+ if (value === "custom" && isVersion331Active) {
3436
+ positionContext.setValue({ x: null, y: null });
3437
+ } else {
3438
+ stringPropContext.setValue(value);
3439
+ }
3440
+ };
3441
+ return /* @__PURE__ */ React53.createElement(import_ui46.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React53.createElement(import_ui46.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React53.createElement(import_ui46.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ControlFormLabel, null, (0, import_i18n22.__)("Object position", "elementor"))), /* @__PURE__ */ React53.createElement(import_ui46.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React53.createElement(
3442
+ import_ui46.Select,
3443
+ {
3444
+ size: "tiny",
3445
+ disabled: stringPropContext.disabled,
3446
+ value: (positionContext.value ? "custom" : stringPropContext.value) ?? "",
3447
+ onChange: handlePositionChange,
3448
+ fullWidth: true
3449
+ },
3450
+ availablePositionOptions.map(({ label, value }) => /* @__PURE__ */ React53.createElement(import_editor_ui7.MenuListItem, { key: value, value: value ?? "" }, label))
3451
+ )))), isCustom && /* @__PURE__ */ React53.createElement(PropProvider, { ...positionContext }, /* @__PURE__ */ React53.createElement(import_ui46.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React53.createElement(import_ui46.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React53.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React53.createElement(SizeControl, { startIcon: /* @__PURE__ */ React53.createElement(import_icons18.LetterXIcon, { fontSize: "tiny" }) }))), /* @__PURE__ */ React53.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React53.createElement(SizeControl, { startIcon: /* @__PURE__ */ React53.createElement(import_icons18.LetterYIcon, { fontSize: "tiny" }) })))))));
3452
+ };
3156
3453
  // Annotate the CommonJS export names for ESM import in node:
3157
3454
  0 && (module.exports = {
3158
3455
  AspectRatioControl,
@@ -3170,11 +3467,14 @@ var SwitchControl2 = createControl(() => {
3170
3467
  FontFamilySelector,
3171
3468
  GapControl,
3172
3469
  ImageControl,
3470
+ KeyValueControl,
3173
3471
  LinkControl,
3174
3472
  LinkedDimensionsControl,
3175
3473
  NumberControl,
3474
+ PositionControl,
3176
3475
  PropKeyProvider,
3177
3476
  PropProvider,
3477
+ RepeatableControl,
3178
3478
  SelectControl,
3179
3479
  SizeControl,
3180
3480
  StrokeControl,