@elementor/editor-controls 4.4.0-1136 → 4.4.0-1138

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -103,21 +103,23 @@ __export(index_exports, {
103
103
  createControl: () => createControl,
104
104
  createControlReplacementsRegistry: () => createControlReplacementsRegistry,
105
105
  enqueueFont: () => enqueueFont,
106
+ enqueueIconFonts: () => enqueueIconFonts,
106
107
  getControlReplacements: () => getControlReplacements,
107
108
  getFontAwesome7IconName: () => getFontAwesome7IconName,
108
109
  injectIntoRepeaterItemActions: () => injectIntoRepeaterItemActions,
109
110
  injectIntoRepeaterItemIcon: () => injectIntoRepeaterItemIcon,
110
111
  injectIntoRepeaterItemLabel: () => injectIntoRepeaterItemLabel,
111
- isDeletedCustomIconLibrary: () => isDeletedCustomIconLibrary,
112
112
  isUnitExtendedOption: () => isUnitExtendedOption,
113
113
  registerControlReplacement: () => registerControlReplacement,
114
+ registerIconLibraryProvider: () => registerIconLibraryProvider,
114
115
  resetFontAwesome7IconsCache: () => resetFontAwesome7IconsCache,
115
- resolveCustomIconSvg: () => resolveCustomIconSvg,
116
116
  resolveFontAwesome7Icon: () => resolveFontAwesome7Icon,
117
+ resolveProviderIconSvg: () => resolveProviderIconSvg,
117
118
  trackUpgradePromotionClick: () => trackUpgradePromotionClick,
118
119
  trackViewPromotion: () => trackViewPromotion,
119
120
  transitionProperties: () => transitionProperties,
120
121
  transitionsItemsList: () => transitionsItemsList,
122
+ unregisterIconLibraryProvider: () => unregisterIconLibraryProvider,
121
123
  useBoundProp: () => useBoundProp,
122
124
  useControlActions: () => useControlActions,
123
125
  useControlReplacement: () => useControlReplacement,
@@ -5732,7 +5734,7 @@ var AspectRatioControl = createControl(({ label }) => {
5732
5734
 
5733
5735
  // src/controls/svg-media-control.tsx
5734
5736
  var React92 = __toESM(require("react"));
5735
- var import_react55 = require("react");
5737
+ var import_react56 = require("react");
5736
5738
  var import_editor_current_user = require("@elementor/editor-current-user");
5737
5739
  var import_editor_props35 = require("@elementor/editor-props");
5738
5740
  var import_ui75 = require("@elementor/ui");
@@ -5806,7 +5808,7 @@ function measureIconLibraryAnchor(container, buttonGroup) {
5806
5808
 
5807
5809
  // src/controls/icon-library/icon-library-popover.tsx
5808
5810
  var React89 = __toESM(require("react"));
5809
- var import_react54 = require("react");
5811
+ var import_react55 = require("react");
5810
5812
  var import_editor_ui11 = require("@elementor/editor-ui");
5811
5813
  var import_icons25 = require("@elementor/icons");
5812
5814
  var import_session2 = require("@elementor/session");
@@ -5814,599 +5816,6 @@ var import_ui72 = require("@elementor/ui");
5814
5816
  var import_utils6 = require("@elementor/utils");
5815
5817
  var import_i18n37 = require("@wordpress/i18n");
5816
5818
 
5817
- // src/controls/icon-library/custom-icon-libraries.ts
5818
- var import_http_client3 = require("@elementor/http-client");
5819
- var import_query2 = require("@elementor/query");
5820
-
5821
- // src/controls/open-icon-library.ts
5822
- var import_editor_props34 = require("@elementor/editor-props");
5823
- function enqueueIconFonts(library) {
5824
- window.elementor?.helpers?.enqueueIconFonts?.(library);
5825
- }
5826
- function createIconPropValue(icon, library) {
5827
- return {
5828
- value: import_editor_props34.stringPropTypeUtil.create(icon),
5829
- library: import_editor_props34.stringPropTypeUtil.create(library)
5830
- };
5831
- }
5832
-
5833
- // src/controls/icon-library/fontello-svg-font.ts
5834
- function parseFontelloSvgFont(configJson, svgFont, prefix, displayPrefix, iconNames) {
5835
- const codepoints = parseConfigCodepoints(configJson, prefix);
5836
- const configPaths = parseConfigSvgPaths(configJson, prefix);
5837
- const glyphs = parseSvgFontGlyphs(svgFont);
5838
- const resolvedDisplayPrefix = displayPrefix || prefix.replace(/-$/, "");
5839
- const result = {};
5840
- for (const name of iconNames) {
5841
- const fromConfig = configPaths.get(name) ?? (prefix && name.startsWith(prefix) ? configPaths.get(name.slice(prefix.length)) : void 0);
5842
- const glyph = fromConfig ?? findGlyph(glyphs, codepoints, name, prefix);
5843
- if (!glyph) {
5844
- continue;
5845
- }
5846
- const value = `${resolvedDisplayPrefix} ${prefix}${name}`.trim();
5847
- result[value] = buildIconSvg(glyph);
5848
- }
5849
- return result;
5850
- }
5851
- function parseConfigCodepoints(configJson, prefix) {
5852
- const map = /* @__PURE__ */ new Map();
5853
- try {
5854
- const data = JSON.parse(configJson);
5855
- if (!Array.isArray(data.glyphs)) {
5856
- return map;
5857
- }
5858
- for (const glyph of data.glyphs) {
5859
- if (typeof glyph.css !== "string" || glyph.css === "" || typeof glyph.code !== "number") {
5860
- continue;
5861
- }
5862
- map.set(glyph.css, glyph.code);
5863
- if (prefix !== "" && !glyph.css.startsWith(prefix)) {
5864
- map.set(`${prefix}${glyph.css}`, glyph.code);
5865
- }
5866
- }
5867
- } catch {
5868
- return map;
5869
- }
5870
- return map;
5871
- }
5872
- function parseConfigSvgPaths(configJson, prefix) {
5873
- const map = /* @__PURE__ */ new Map();
5874
- try {
5875
- const data = JSON.parse(configJson);
5876
- if (!Array.isArray(data.glyphs)) {
5877
- return map;
5878
- }
5879
- for (const glyph of data.glyphs) {
5880
- if (typeof glyph.css !== "string" || glyph.css === "") {
5881
- continue;
5882
- }
5883
- let path = "";
5884
- let advance = 1e3;
5885
- if (typeof glyph.svg === "string") {
5886
- path = glyph.svg;
5887
- } else if (glyph.svg && typeof glyph.svg === "object" && "path" in glyph.svg && typeof glyph.svg.path === "string") {
5888
- path = glyph.svg.path;
5889
- if ("width" in glyph.svg && typeof glyph.svg.width === "number" && glyph.svg.width > 0) {
5890
- advance = glyph.svg.width;
5891
- }
5892
- }
5893
- if (path === "") {
5894
- continue;
5895
- }
5896
- const record = { d: path, units: 1e3, advance };
5897
- map.set(glyph.css, record);
5898
- if (prefix !== "" && !glyph.css.startsWith(prefix)) {
5899
- map.set(`${prefix}${glyph.css}`, record);
5900
- }
5901
- }
5902
- } catch {
5903
- return map;
5904
- }
5905
- return map;
5906
- }
5907
- function parseSvgFontGlyphs(svgFont) {
5908
- const byName = /* @__PURE__ */ new Map();
5909
- const byCode = /* @__PURE__ */ new Map();
5910
- const doc = new DOMParser().parseFromString(stripDoctype(svgFont), "image/svg+xml");
5911
- const font = doc.querySelector("font");
5912
- const face = doc.querySelector("font-face");
5913
- const fontAdvance = positiveInt(font?.getAttribute("horiz-adv-x"), 1e3);
5914
- const units2 = positiveInt(face?.getAttribute("units-per-em"), fontAdvance);
5915
- doc.querySelectorAll("glyph").forEach((node) => {
5916
- const d = node.getAttribute("d") ?? "";
5917
- if (d === "") {
5918
- return;
5919
- }
5920
- const record = {
5921
- d,
5922
- units: units2,
5923
- advance: positiveInt(node.getAttribute("horiz-adv-x"), fontAdvance)
5924
- };
5925
- const name = node.getAttribute("glyph-name") ?? "";
5926
- const unicode = node.getAttribute("unicode") ?? "";
5927
- const code = unicode.codePointAt(0);
5928
- if (name) {
5929
- byName.set(name, record);
5930
- }
5931
- if (code !== void 0) {
5932
- byCode.set(code, record);
5933
- }
5934
- });
5935
- return { byName, byCode };
5936
- }
5937
- function findGlyph(glyphs, codepoints, iconName, prefix) {
5938
- const names = [iconName];
5939
- if (prefix !== "" && iconName.startsWith(prefix)) {
5940
- names.push(iconName.slice(prefix.length));
5941
- }
5942
- for (const name of names) {
5943
- const byName = glyphs.byName.get(name);
5944
- if (byName) {
5945
- return byName;
5946
- }
5947
- const code = codepoints.get(name);
5948
- const byCode = code !== void 0 ? glyphs.byCode.get(code) : void 0;
5949
- if (byCode) {
5950
- return byCode;
5951
- }
5952
- }
5953
- return null;
5954
- }
5955
- function buildIconSvg(glyph) {
5956
- return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${glyph.advance} ${glyph.units}" fill="currentColor" width="100%" height="100%"><g transform="translate(0,${glyph.units}) scale(1,-1)"><path d="${escapeAttribute(glyph.d)}" fill="currentColor"></path></g></svg>`;
5957
- }
5958
- function stripDoctype(svgFont) {
5959
- return svgFont.replace(/<!DOCTYPE[^>]*>/is, "");
5960
- }
5961
- function positiveInt(value, fallback) {
5962
- if (!value) {
5963
- return fallback;
5964
- }
5965
- const parsed = Number.parseInt(value, 10);
5966
- return parsed > 0 ? parsed : fallback;
5967
- }
5968
- function escapeAttribute(value) {
5969
- return value.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
5970
- }
5971
-
5972
- // src/controls/icon-library/icomoon-selection.ts
5973
- var DEFAULT_ICOMOON_VIEWBOX = 1024;
5974
- function parseIcomoonSelection(selectionJson, prefix, displayPrefix, iconNames) {
5975
- let data;
5976
- try {
5977
- data = JSON.parse(selectionJson);
5978
- } catch {
5979
- return {};
5980
- }
5981
- const resolvedDisplayPrefix = displayPrefix || prefix.replace(/-$/, "");
5982
- const names = iconNames.length > 0 ? iconNames : namesFromSelection(data);
5983
- const result = {};
5984
- for (const name of names) {
5985
- const markup = svgForName(data, name, prefix);
5986
- if (!markup) {
5987
- continue;
5988
- }
5989
- result[`${resolvedDisplayPrefix} ${prefix}${name}`.trim()] = markup;
5990
- }
5991
- return result;
5992
- }
5993
- function namesFromSelection(data) {
5994
- if (!Array.isArray(data.icons)) {
5995
- return [];
5996
- }
5997
- return data.icons.flatMap((icon) => {
5998
- const name = iconEntryName(icon);
5999
- return name ? [name] : [];
6000
- });
6001
- }
6002
- function svgForName(data, iconName, prefix) {
6003
- const candidates = [iconName];
6004
- if (prefix && iconName.startsWith(prefix)) {
6005
- candidates.push(iconName.slice(prefix.length));
6006
- }
6007
- for (const icon of data.icons ?? []) {
6008
- const name = iconEntryName(icon);
6009
- if (!name || !candidates.includes(name)) {
6010
- continue;
6011
- }
6012
- const paths = Array.isArray(icon.icon?.paths) ? icon.icon.paths.filter((path) => typeof path === "string" && path !== "") : [];
6013
- if (paths.length === 0) {
6014
- return null;
6015
- }
6016
- const size = typeof icon.icon?.width === "number" && icon.icon.width > 0 ? icon.icon.width : DEFAULT_ICOMOON_VIEWBOX;
6017
- const pathMarkup = paths.map((d) => `<path d="${escapeAttribute2(d)}" fill="currentColor"></path>`).join("");
6018
- return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${size} ${size}" fill="currentColor" width="100%" height="100%">` + pathMarkup + "</svg>";
6019
- }
6020
- return null;
6021
- }
6022
- function iconEntryName(icon) {
6023
- if (typeof icon.properties?.name === "string") {
6024
- return icon.properties.name;
6025
- }
6026
- const tag = icon.icon?.tags;
6027
- return Array.isArray(tag) && typeof tag[0] === "string" ? tag[0] : "";
6028
- }
6029
- function escapeAttribute2(value) {
6030
- return value.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
6031
- }
6032
-
6033
- // src/controls/icon-library/custom-icon-libraries.ts
6034
- var NATIVE_TAB_NAMES = /* @__PURE__ */ new Set(["all", "recommended", "GoPro"]);
6035
- var DEFAULT_ICON_SIZE = 512;
6036
- var CUSTOM_ICON_LIBRARIES_QUERY_KEY = ["custom-icon-libraries"];
6037
- var CUSTOM_ICON_SVG_URL = "elementor/v1/atomic-widgets/custom-icon-svg";
6038
- var SUPPORTED_CUSTOM_ICON_TYPES = /* @__PURE__ */ new Set(["fontello", "icomoon", "fontastic"]);
6039
- var svgMapCache = /* @__PURE__ */ new Map();
6040
- var inFlightSvgMaps = /* @__PURE__ */ new Map();
6041
- function isDeletedCustomIconLibrary(library, iconValue) {
6042
- const libraryName = String(library);
6043
- if (!libraryName || !iconValue) {
6044
- return false;
6045
- }
6046
- if (NATIVE_TAB_NAMES.has(libraryName) || libraryName.startsWith("fa-")) {
6047
- return false;
6048
- }
6049
- return !getCustomIconLibraryConfigs().some((item) => item.name === libraryName);
6050
- }
6051
- function useCustomIconLibraries(enabled) {
6052
- return (0, import_query2.useQuery)({
6053
- queryKey: CUSTOM_ICON_LIBRARIES_QUERY_KEY,
6054
- queryFn: ({ signal }) => loadCustomIconLibraries(signal),
6055
- enabled: enabled && areCustomIconLibrariesEnabled(),
6056
- staleTime: Infinity
6057
- });
6058
- }
6059
- async function loadCustomIconLibraries(signal) {
6060
- const catalogs = await Promise.all(
6061
- getCustomIconLibraryConfigs().map((library) => loadCustomLibrary(library, signal))
6062
- );
6063
- return catalogs.flat();
6064
- }
6065
- async function resolveCustomIconSvg(library, iconValue, signal) {
6066
- const config = getCustomIconLibraryConfigs().find((item) => item.name === String(library));
6067
- if (!config) {
6068
- svgMapCache.delete(String(library));
6069
- return null;
6070
- }
6071
- const map = await loadLibrarySvgMap(String(library), config, signal);
6072
- const markup = map[iconValue];
6073
- return typeof markup === "string" && markup !== "" ? markup : null;
6074
- }
6075
- function areCustomIconLibrariesEnabled() {
6076
- return true === window.elementorCommon?.config?.fontAwesome?.v7?.customIconLibrariesEnabled;
6077
- }
6078
- function getCustomIconLibraryConfigs() {
6079
- if (!areCustomIconLibrariesEnabled()) {
6080
- return [];
6081
- }
6082
- const libraries = window.elementor?.config;
6083
- const items2 = Array.isArray(libraries?.icons?.libraries) ? libraries.icons.libraries : [];
6084
- return items2.flatMap((value) => {
6085
- const library = normalizeCustomIconLibraryConfig(value);
6086
- return library ? [library] : [];
6087
- });
6088
- }
6089
- function normalizeCustomIconLibraryConfig(value) {
6090
- if (!value || typeof value !== "object") {
6091
- return null;
6092
- }
6093
- const library = value;
6094
- const name = coerceLibraryName(library.name);
6095
- if (name === "" || NATIVE_TAB_NAMES.has(name) || library.native === true || name.startsWith("fa-")) {
6096
- return null;
6097
- }
6098
- if (typeof library.prefix !== "string") {
6099
- return null;
6100
- }
6101
- if (!library.fetchJson && library.icons === void 0) {
6102
- return null;
6103
- }
6104
- const resolved = {
6105
- ...library,
6106
- name,
6107
- prefix: library.prefix,
6108
- ...getPackUrls(name, library)
6109
- };
6110
- if (!resolveCustomIconType(resolved)) {
6111
- return null;
6112
- }
6113
- return resolved;
6114
- }
6115
- function coerceLibraryName(value) {
6116
- if (typeof value === "string") {
6117
- return value;
6118
- }
6119
- if (typeof value === "number" && Number.isFinite(value)) {
6120
- return String(value);
6121
- }
6122
- return "";
6123
- }
6124
- function getPackUrls(library, config) {
6125
- const derived = derivePackAssetUrls(config.fetchJson, resolveCustomIconType(config));
6126
- const packs = window.elementorCommon?.config?.fontAwesome?.v7?.customIconPacks;
6127
- if (!packs || typeof packs !== "object") {
6128
- return derived;
6129
- }
6130
- const pack = packs[library];
6131
- if (!pack || typeof pack !== "object") {
6132
- return derived;
6133
- }
6134
- const packType = typeof pack.type === "string" ? pack.type : config.custom_icon_type;
6135
- return {
6136
- ...derived,
6137
- configUrl: typeof pack.configUrl === "string" ? pack.configUrl : derived.configUrl,
6138
- fontUrl: typeof pack.fontUrl === "string" ? pack.fontUrl : derived.fontUrl,
6139
- selectionUrl: typeof pack.selectionUrl === "string" ? pack.selectionUrl : derived.selectionUrl,
6140
- custom_icon_type: packType ?? derived.custom_icon_type
6141
- };
6142
- }
6143
- function resolveCustomIconType(library) {
6144
- const type = typeof library.custom_icon_type === "string" ? library.custom_icon_type.toLowerCase() : "";
6145
- return SUPPORTED_CUSTOM_ICON_TYPES.has(type) ? type : "";
6146
- }
6147
- function derivePackAssetUrls(fetchJson, type) {
6148
- if (!fetchJson) {
6149
- return type ? { custom_icon_type: type } : {};
6150
- }
6151
- try {
6152
- const url = new URL(fetchJson, window.location.origin);
6153
- const base = url.href.replace(/\/[^/?#]+(?:\?.*)?$/, "");
6154
- if ("icomoon" === type) {
6155
- return {
6156
- custom_icon_type: type,
6157
- selectionUrl: `${base}/selection.json`,
6158
- fontUrl: `${base}/fonts/icomoon.svg`
6159
- };
6160
- }
6161
- if ("fontastic" === type) {
6162
- return {
6163
- custom_icon_type: type,
6164
- fontUrl: `${base}/fonts/fontastic.svg`
6165
- };
6166
- }
6167
- if ("fontello" === type) {
6168
- return {
6169
- custom_icon_type: type,
6170
- configUrl: `${base}/config.json`,
6171
- fontUrl: `${base}/font/fontello.svg`
6172
- };
6173
- }
6174
- return {};
6175
- } catch {
6176
- return type ? { custom_icon_type: type } : {};
6177
- }
6178
- }
6179
- async function loadCustomLibrary(library, signal) {
6180
- enqueueIconFonts(library.name);
6181
- const names = parseIconNames(await loadLibraryPayload(library, signal));
6182
- const svgMap = await loadLibrarySvgMap(library.name, library, signal);
6183
- return names.map((name) => {
6184
- const value = createCustomIconSelectionValue(library, name);
6185
- return {
6186
- id: `${library.name}:${name}`,
6187
- name,
6188
- label: name.replace(/-/g, " "),
6189
- library: library.name,
6190
- value,
6191
- aliases: [],
6192
- width: DEFAULT_ICON_SIZE,
6193
- height: DEFAULT_ICON_SIZE,
6194
- paths: [],
6195
- glyphClass: value,
6196
- svgMarkup: svgMap[value]
6197
- };
6198
- });
6199
- }
6200
- async function loadLibrarySvgMap(library, config, signal) {
6201
- if (!config) {
6202
- svgMapCache.delete(library);
6203
- inFlightSvgMaps.delete(library);
6204
- return {};
6205
- }
6206
- const cached = svgMapCache.get(library);
6207
- if (cached && Object.keys(cached).length > 0) {
6208
- return cached;
6209
- }
6210
- const pending = inFlightSvgMaps.get(library);
6211
- if (pending) {
6212
- return pending;
6213
- }
6214
- const request = fetchLibrarySvgMap(library, config, signal).finally(() => {
6215
- inFlightSvgMaps.delete(library);
6216
- });
6217
- inFlightSvgMaps.set(library, request);
6218
- return request;
6219
- }
6220
- async function fetchLibrarySvgMap(library, config, signal) {
6221
- const fromRest = await loadSvgMapFromRest(library, signal);
6222
- const restIcons = fromRest.icons;
6223
- if (Object.keys(restIcons).length > 0 && !fromRest.truncated) {
6224
- svgMapCache.set(library, restIcons);
6225
- return restIcons;
6226
- }
6227
- const fromPack = await loadSvgMapFromPackFiles(config, signal);
6228
- const merged = { ...fromPack, ...restIcons };
6229
- if (Object.keys(merged).length > 0) {
6230
- svgMapCache.set(library, merged);
6231
- return merged;
6232
- }
6233
- return {};
6234
- }
6235
- async function loadSvgMapFromRest(library, signal) {
6236
- try {
6237
- const response = await (0, import_http_client3.httpService)().get(CUSTOM_ICON_SVG_URL, { params: { library: String(library) }, signal });
6238
- return unwrapIconMap(response);
6239
- } catch {
6240
- return { icons: {}, truncated: false };
6241
- }
6242
- }
6243
- function unwrapIconMap(payload) {
6244
- let current = payload;
6245
- for (let depth = 0; depth < 4; depth++) {
6246
- if (!current || typeof current !== "object") {
6247
- return { icons: {}, truncated: false };
6248
- }
6249
- const record = current;
6250
- if (record.icons && typeof record.icons === "object" && !Array.isArray(record.icons)) {
6251
- const icons = {};
6252
- Object.entries(record.icons).forEach(([key, value]) => {
6253
- if (typeof value === "string" && value !== "") {
6254
- icons[key] = value;
6255
- }
6256
- });
6257
- return {
6258
- icons,
6259
- truncated: true === record.truncated
6260
- };
6261
- }
6262
- current = "data" in record ? record.data : void 0;
6263
- }
6264
- return { icons: {}, truncated: false };
6265
- }
6266
- async function loadSvgMapFromPackFiles(library, signal) {
6267
- const type = resolveCustomIconType(library);
6268
- if (!type) {
6269
- return {};
6270
- }
6271
- if ("icomoon" === type && library.selectionUrl) {
6272
- try {
6273
- const response = await fetch(library.selectionUrl, { signal, mode: "cors" });
6274
- if (response.ok) {
6275
- const selectionJson = await response.text();
6276
- const names2 = parseIconNames(safeJson(selectionJson));
6277
- const payloadNames2 = names2.length > 0 ? names2 : parseIconNames({ icons: library.icons });
6278
- const fromSelection = parseIcomoonSelection(
6279
- selectionJson,
6280
- library.prefix,
6281
- library.displayPrefix ?? "",
6282
- payloadNames2
6283
- );
6284
- if (Object.keys(fromSelection).length > 0) {
6285
- return fromSelection;
6286
- }
6287
- }
6288
- } catch {
6289
- }
6290
- }
6291
- const fontUrls = uniqueUrls([
6292
- library.fontUrl,
6293
- "fontello" === type && library.fetchJson ? packSiblingUrl(library.fetchJson, "font/fontello.svg") : null,
6294
- "fontastic" === type && library.fetchJson ? packSiblingUrl(library.fetchJson, "fonts/fontastic.svg") : null,
6295
- "icomoon" === type && library.fetchJson ? packSiblingUrl(library.fetchJson, "fonts/icomoon.svg") : null
6296
- ]);
6297
- if (fontUrls.length === 0) {
6298
- return {};
6299
- }
6300
- let configJson = "{}";
6301
- if (library.configUrl) {
6302
- try {
6303
- const configResponse = await fetch(library.configUrl, { signal, mode: "cors" });
6304
- if (configResponse.ok) {
6305
- configJson = await configResponse.text();
6306
- }
6307
- } catch {
6308
- configJson = "{}";
6309
- }
6310
- }
6311
- const names = parseIconNames(safeJson(configJson));
6312
- const payloadNames = names.length > 0 ? names : parseIconNames({ icons: library.icons });
6313
- for (const fontUrl of fontUrls) {
6314
- try {
6315
- const fontResponse = await fetch(fontUrl, { signal, mode: "cors" });
6316
- if (!fontResponse.ok) {
6317
- continue;
6318
- }
6319
- const fromFont = parseFontelloSvgFont(
6320
- configJson,
6321
- await fontResponse.text(),
6322
- library.prefix,
6323
- library.displayPrefix ?? "",
6324
- payloadNames
6325
- );
6326
- if (Object.keys(fromFont).length > 0) {
6327
- return fromFont;
6328
- }
6329
- } catch {
6330
- continue;
6331
- }
6332
- }
6333
- return {};
6334
- }
6335
- function packSiblingUrl(fetchJson, relativePath) {
6336
- try {
6337
- const url = new URL(fetchJson, window.location.origin);
6338
- url.pathname = url.pathname.replace(/\/[^/]+$/, `/${relativePath}`);
6339
- return url.href;
6340
- } catch {
6341
- return null;
6342
- }
6343
- }
6344
- function uniqueUrls(urls) {
6345
- return [...new Set(urls.filter((url) => typeof url === "string" && url !== ""))];
6346
- }
6347
- function safeJson(value) {
6348
- try {
6349
- return JSON.parse(value);
6350
- } catch {
6351
- return null;
6352
- }
6353
- }
6354
- async function loadLibraryPayload(library, signal) {
6355
- if (library.icons !== void 0) {
6356
- return { icons: library.icons };
6357
- }
6358
- if (!library.fetchJson) {
6359
- return null;
6360
- }
6361
- try {
6362
- const response = await fetch(library.fetchJson, { signal, mode: "cors" });
6363
- return response.ok ? response.json() : null;
6364
- } catch {
6365
- return null;
6366
- }
6367
- }
6368
- function parseIconNames(payload) {
6369
- if (!payload || typeof payload !== "object") {
6370
- return [];
6371
- }
6372
- const icons = payload.icons;
6373
- if (Array.isArray(icons)) {
6374
- return icons.flatMap((entry) => {
6375
- if (typeof entry === "string") {
6376
- return [normalizeIconName(entry)];
6377
- }
6378
- if (entry && typeof entry === "object" && "name" in entry && typeof entry.name === "string") {
6379
- return [normalizeIconName(entry.name)];
6380
- }
6381
- if (entry && typeof entry === "object" && "properties" in entry && entry.properties && typeof entry.properties === "object" && "name" in entry.properties && typeof entry.properties.name === "string") {
6382
- return [normalizeIconName(entry.properties.name)];
6383
- }
6384
- return [];
6385
- }).filter(Boolean);
6386
- }
6387
- if (icons && typeof icons === "object") {
6388
- return Object.keys(icons).map(normalizeIconName).filter(Boolean);
6389
- }
6390
- const glyphs = payload.glyphs;
6391
- if (Array.isArray(glyphs)) {
6392
- return glyphs.flatMap((entry) => {
6393
- if (entry && typeof entry === "object" && "css" in entry && typeof entry.css === "string") {
6394
- return [normalizeIconName(entry.css)];
6395
- }
6396
- return [];
6397
- }).filter(Boolean);
6398
- }
6399
- return [];
6400
- }
6401
- function normalizeIconName(name) {
6402
- return name.trim().replace(/^:/, "").replace(/:$/, "");
6403
- }
6404
- function createCustomIconSelectionValue(library, name) {
6405
- const prefix = library.prefix;
6406
- const displayPrefix = library.displayPrefix || prefix.replace(/-$/, "");
6407
- return `${displayPrefix} ${prefix}${name}`.trim();
6408
- }
6409
-
6410
5819
  // src/controls/icon-library/font-awesome-7-data.ts
6411
5820
  var FONT_AWESOME_7_LIBRARIES = [
6412
5821
  { file: "solid", library: "fa-solid" },
@@ -7233,6 +6642,39 @@ var IconLibraryGrid = ({
7233
6642
  );
7234
6643
  };
7235
6644
 
6645
+ // src/controls/icon-library/icon-library-providers.ts
6646
+ var import_react54 = require("react");
6647
+ var providers = /* @__PURE__ */ new Map();
6648
+ function registerIconLibraryProvider(provider) {
6649
+ providers.set(provider.id, provider);
6650
+ }
6651
+ function unregisterIconLibraryProvider(id) {
6652
+ providers.delete(id);
6653
+ }
6654
+ function useIconLibraryProviderIcons(enabled) {
6655
+ const [snapshot] = (0, import_react54.useState)(() => [...providers.values()]);
6656
+ const states = snapshot.map((provider) => provider.useIcons(enabled));
6657
+ return {
6658
+ data: states.flatMap((state) => state.data ?? []),
6659
+ isLoading: states.some((state) => state.isLoading)
6660
+ };
6661
+ }
6662
+ async function resolveProviderIconSvg(library, iconValue, signal) {
6663
+ for (const provider of providers.values()) {
6664
+ try {
6665
+ const markup = await provider.resolveSvg?.(library, iconValue, signal);
6666
+ if (markup) {
6667
+ return markup;
6668
+ }
6669
+ } catch (error) {
6670
+ if (signal?.aborted) {
6671
+ throw error;
6672
+ }
6673
+ }
6674
+ }
6675
+ return null;
6676
+ }
6677
+
7236
6678
  // src/controls/icon-library/icon-library-view-toggle.tsx
7237
6679
  var React87 = __toESM(require("react"));
7238
6680
  var import_icons24 = require("@elementor/icons");
@@ -7276,10 +6718,10 @@ var SvgElementIcon = React88.forwardRef(
7276
6718
  );
7277
6719
 
7278
6720
  // src/controls/icon-library/use-font-awesome-7-catalog.ts
7279
- var import_query3 = require("@elementor/query");
6721
+ var import_query2 = require("@elementor/query");
7280
6722
  var FONT_AWESOME_7_CATALOG_QUERY_KEY = ["font-awesome-7-catalog"];
7281
6723
  function useFontAwesome7Catalog(enabled) {
7282
- return (0, import_query3.useQuery)({
6724
+ return (0, import_query2.useQuery)({
7283
6725
  queryKey: FONT_AWESOME_7_CATALOG_QUERY_KEY,
7284
6726
  queryFn: ({ signal }) => loadFontAwesome7Catalog(signal),
7285
6727
  enabled,
@@ -7323,21 +6765,21 @@ var IconLibraryPopover = ({
7323
6765
  handleChange: handleSearchChange,
7324
6766
  setImmediateValue: setSearchValue
7325
6767
  } = (0, import_utils6.useDebounceState)({ delay: ICON_LIBRARY_SEARCH_DEBOUNCE_DELAY });
7326
- const [activeLibraries, setActiveLibraries] = (0, import_react54.useState)([]);
6768
+ const [activeLibraries, setActiveLibraries] = (0, import_react55.useState)([]);
7327
6769
  const [storedView, setStoredView] = (0, import_session2.useSessionStorage)(
7328
6770
  ICON_LIBRARY_VIEW_STORAGE_KEY,
7329
6771
  ICON_LIBRARY_VIEW_STORAGE_PREFIX
7330
6772
  );
7331
6773
  const view = isIconLibraryView(storedView) ? storedView : DEFAULT_ICON_LIBRARY_VIEW;
7332
6774
  const { data: fontAwesomeIcons = [], isLoading: isFontAwesomeLoading } = useFontAwesome7Catalog(open);
7333
- const { data: customIcons = [], isLoading: isCustomLoading } = useCustomIconLibraries(open);
7334
- const isLoading = isFontAwesomeLoading || isCustomLoading;
7335
- const icons = (0, import_react54.useMemo)(() => [...fontAwesomeIcons, ...customIcons], [customIcons, fontAwesomeIcons]);
7336
- const items2 = (0, import_react54.useMemo)(
6775
+ const { data: providerIcons = [], isLoading: isProviderLoading } = useIconLibraryProviderIcons(open);
6776
+ const isLoading = isFontAwesomeLoading || isProviderLoading;
6777
+ const icons = (0, import_react55.useMemo)(() => [...fontAwesomeIcons, ...providerIcons], [providerIcons, fontAwesomeIcons]);
6778
+ const items2 = (0, import_react55.useMemo)(
7337
6779
  () => createIconLibraryItems(icons, searchValue, activeLibraries),
7338
6780
  [activeLibraries, icons, searchValue]
7339
6781
  );
7340
- const selectedValue = (0, import_react54.useMemo)(
6782
+ const selectedValue = (0, import_react55.useMemo)(
7341
6783
  () => findFontAwesome7Icon(icons, selectedIconClass, selectedIconLibrary)?.id,
7342
6784
  [icons, selectedIconClass, selectedIconLibrary]
7343
6785
  );
@@ -7495,6 +6937,18 @@ var createIconLibraryItems = (icons, searchValue, libraries) => filterFontAwesom
7495
6937
  value: icon.id
7496
6938
  }));
7497
6939
 
6940
+ // src/controls/open-icon-library.ts
6941
+ var import_editor_props34 = require("@elementor/editor-props");
6942
+ function enqueueIconFonts(library) {
6943
+ window.elementor?.helpers?.enqueueIconFonts?.(library);
6944
+ }
6945
+ function createIconPropValue(icon, library) {
6946
+ return {
6947
+ value: import_editor_props34.stringPropTypeUtil.create(icon),
6948
+ library: import_editor_props34.stringPropTypeUtil.create(library)
6949
+ };
6950
+ }
6951
+
7498
6952
  // src/controls/svg-media-overlay.tsx
7499
6953
  var React90 = __toESM(require("react"));
7500
6954
  var import_icons26 = require("@elementor/icons");
@@ -7563,10 +7017,10 @@ var ICON_PREVIEW_COLOR = "#000000";
7563
7017
  var SvgMediaPreview = ({ isFetching, src, iconClassName, iconLibrary }) => {
7564
7018
  const shouldLoadIconCatalog = Boolean(iconClassName && iconLibrary);
7565
7019
  const { data: fontAwesomeIcons = [], isLoading: isFontAwesomeLoading } = useFontAwesome7Catalog(shouldLoadIconCatalog);
7566
- const { data: customIcons = [], isLoading: isCustomLoading } = useCustomIconLibraries(shouldLoadIconCatalog);
7567
- const icons = [...fontAwesomeIcons, ...customIcons];
7020
+ const { data: providerIcons = [], isLoading: isProviderLoading } = useIconLibraryProviderIcons(shouldLoadIconCatalog);
7021
+ const icons = [...fontAwesomeIcons, ...providerIcons];
7568
7022
  const selectedIcon = findFontAwesome7Icon(icons, iconClassName, iconLibrary);
7569
- const isLoadingCatalog = shouldLoadIconCatalog && (isFontAwesomeLoading || isCustomLoading);
7023
+ const isLoadingCatalog = shouldLoadIconCatalog && (isFontAwesomeLoading || isProviderLoading);
7570
7024
  if (isFetching || isLoadingCatalog) {
7571
7025
  return /* @__PURE__ */ React91.createElement(import_ui74.CircularProgress, { role: "progressbar" });
7572
7026
  }
@@ -7638,21 +7092,23 @@ var MODE_BROWSE = { mode: "browse" };
7638
7092
  var MODE_UPLOAD = { mode: "upload" };
7639
7093
  var SvgMediaControl = createControl(({ showIconLibrary = false, label }) => {
7640
7094
  const groupLabel = label ?? (0, import_i18n40.__)("SVG", "elementor");
7641
- const { value: svgValue, setValue: setSvgValue } = useBoundProp(import_editor_props35.svgSrcPropTypeUtil);
7642
- const { value: iconValue, setValue: setIconValue } = useBoundProp(import_editor_props35.iconPropTypeUtil);
7095
+ const { value: svgValue, setValue: setSvgValue, placeholder: svgPlaceholder } = useBoundProp(import_editor_props35.svgSrcPropTypeUtil);
7096
+ const { value: iconValue, setValue: setIconValue, placeholder: iconPlaceholder } = useBoundProp(import_editor_props35.iconPropTypeUtil);
7643
7097
  const id = svgValue?.id;
7644
- const url = svgValue?.url;
7645
- const { data: attachment, isFetching } = (0, import_wp_media2.useWpMediaAttachment)(id?.value || null);
7646
- const src = attachment?.url ?? url?.value ?? null;
7098
+ const hasOwnValue = svgValue !== null && svgValue !== void 0 || iconValue !== null && iconValue !== void 0;
7099
+ const previewSvgValue = hasOwnValue ? svgValue : svgPlaceholder;
7100
+ const previewIconValue = hasOwnValue ? iconValue : iconPlaceholder;
7101
+ const { data: attachment, isFetching } = (0, import_wp_media2.useWpMediaAttachment)(previewSvgValue?.id?.value || null);
7102
+ const src = attachment?.url ?? previewSvgValue?.url?.value ?? null;
7647
7103
  const { data: allowSvgUpload } = useUnfilteredFilesUpload();
7648
- const [unfilteredModalOpenState, setUnfilteredModalOpenState] = (0, import_react55.useState)(false);
7104
+ const [unfilteredModalOpenState, setUnfilteredModalOpenState] = (0, import_react56.useState)(false);
7649
7105
  const iconLibraryPopoverState = (0, import_ui75.usePopupState)({ variant: "popover" });
7650
- const controlContainerRef = (0, import_react55.useRef)(null);
7651
- const buttonGroupRef = (0, import_react55.useRef)(null);
7652
- const [iconLibraryAnchor, setIconLibraryAnchor] = (0, import_react55.useState)(null);
7106
+ const controlContainerRef = (0, import_react56.useRef)(null);
7107
+ const buttonGroupRef = (0, import_react56.useRef)(null);
7108
+ const [iconLibraryAnchor, setIconLibraryAnchor] = (0, import_react56.useState)(null);
7653
7109
  const { isAdmin } = (0, import_editor_current_user.useCurrentUserCapabilities)();
7654
- const selectedIconClass = showIconLibrary && typeof iconValue?.value?.value === "string" ? iconValue.value.value : null;
7655
- const selectedIconLibrary = showIconLibrary && typeof iconValue?.library?.value === "string" ? iconValue.library.value : null;
7110
+ const selectedIconClass = showIconLibrary && typeof previewIconValue?.value?.value === "string" ? previewIconValue.value.value : null;
7111
+ const selectedIconLibrary = showIconLibrary && typeof previewIconValue?.library?.value === "string" ? previewIconValue.library.value : null;
7656
7112
  const { open } = (0, import_wp_media2.useWpMediaFrame)({
7657
7113
  mediaTypes: ["svg"],
7658
7114
  multiple: false,
@@ -7701,7 +7157,7 @@ var SvgMediaControl = createControl(({ showIconLibrary = false, label }) => {
7701
7157
  setIconLibraryAnchor(anchor);
7702
7158
  iconLibraryPopoverState.open(event);
7703
7159
  };
7704
- (0, import_react55.useEffect)(() => {
7160
+ (0, import_react56.useEffect)(() => {
7705
7161
  if (!iconLibraryPopoverState.isOpen) {
7706
7162
  return;
7707
7163
  }
@@ -7983,7 +7439,7 @@ var BackgroundImageOverlayAttachment = () => {
7983
7439
 
7984
7440
  // src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
7985
7441
  var React96 = __toESM(require("react"));
7986
- var import_react56 = require("react");
7442
+ var import_react57 = require("react");
7987
7443
  var import_editor_props38 = require("@elementor/editor-props");
7988
7444
  var import_editor_ui12 = require("@elementor/editor-ui");
7989
7445
  var import_icons28 = require("@elementor/icons");
@@ -8005,7 +7461,7 @@ var BackgroundImageOverlayPosition = () => {
8005
7461
  const backgroundImageOffsetContext = useBoundProp(import_editor_props38.backgroundImagePositionOffsetPropTypeUtil);
8006
7462
  const stringPropContext = useBoundProp(import_editor_props38.stringPropTypeUtil);
8007
7463
  const isCustom = !!backgroundImageOffsetContext.value;
8008
- const rowRef = (0, import_react56.useRef)(null);
7464
+ const rowRef = (0, import_react57.useRef)(null);
8009
7465
  const handlePositionChange = (event) => {
8010
7466
  const value = event.target.value || null;
8011
7467
  if (value === "custom") {
@@ -8078,7 +7534,7 @@ var BackgroundImageOverlayRepeat = () => {
8078
7534
 
8079
7535
  // src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
8080
7536
  var React98 = __toESM(require("react"));
8081
- var import_react57 = require("react");
7537
+ var import_react58 = require("react");
8082
7538
  var import_editor_props39 = require("@elementor/editor-props");
8083
7539
  var import_icons30 = require("@elementor/icons");
8084
7540
  var import_ui81 = require("@elementor/ui");
@@ -8113,7 +7569,7 @@ var BackgroundImageOverlaySize = () => {
8113
7569
  const backgroundImageScaleContext = useBoundProp(import_editor_props39.backgroundImageSizeScalePropTypeUtil);
8114
7570
  const stringPropContext = useBoundProp(import_editor_props39.stringPropTypeUtil);
8115
7571
  const isCustom = !!backgroundImageScaleContext.value;
8116
- const rowRef = (0, import_react57.useRef)(null);
7572
+ const rowRef = (0, import_react58.useRef)(null);
8117
7573
  const handleSizeChange = (size) => {
8118
7574
  if (size === "custom") {
8119
7575
  backgroundImageScaleContext.setValue({ width: null, height: null });
@@ -8148,7 +7604,7 @@ var BackgroundImageOverlaySize = () => {
8148
7604
  };
8149
7605
 
8150
7606
  // src/controls/background-control/background-overlay/use-background-tabs-history.ts
8151
- var import_react58 = require("react");
7607
+ var import_react59 = require("react");
8152
7608
  var import_editor_props40 = require("@elementor/editor-props");
8153
7609
  var import_ui82 = require("@elementor/ui");
8154
7610
  var useBackgroundTabsHistory = ({
@@ -8169,7 +7625,7 @@ var useBackgroundTabsHistory = ({
8169
7625
  return "image";
8170
7626
  };
8171
7627
  const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui82.useTabs)(getCurrentOverlayType());
8172
- const valuesHistory = (0, import_react58.useRef)({
7628
+ const valuesHistory = (0, import_react59.useRef)({
8173
7629
  image: initialBackgroundImageOverlay,
8174
7630
  color: initialBackgroundColorOverlay2,
8175
7631
  gradient: initialBackgroundGradientOverlay2
@@ -8416,7 +7872,7 @@ var BackgroundClipField = () => {
8416
7872
 
8417
7873
  // src/controls/repeatable-control.tsx
8418
7874
  var React101 = __toESM(require("react"));
8419
- var import_react59 = require("react");
7875
+ var import_react60 = require("react");
8420
7876
  var import_editor_props43 = require("@elementor/editor-props");
8421
7877
  var import_ui85 = require("@elementor/ui");
8422
7878
  var PLACEHOLDER_REGEX = /\$\{([^}]+)\}/g;
@@ -8437,11 +7893,11 @@ var RepeatableControl = createControl(
8437
7893
  if (!childPropTypeUtil) {
8438
7894
  return null;
8439
7895
  }
8440
- const childArrayPropTypeUtil2 = (0, import_react59.useMemo)(
7896
+ const childArrayPropTypeUtil2 = (0, import_react60.useMemo)(
8441
7897
  () => (0, import_editor_props43.createArrayPropUtils)(childPropTypeUtil.key, childPropTypeUtil.schema, propKey),
8442
7898
  [childPropTypeUtil.key, childPropTypeUtil.schema, propKey]
8443
7899
  );
8444
- const contextValue = (0, import_react59.useMemo)(
7900
+ const contextValue = (0, import_react60.useMemo)(
8445
7901
  () => ({
8446
7902
  ...childControlConfig,
8447
7903
  placeholder: placeholder || "",
@@ -8573,7 +8029,7 @@ var getAllProperties = (pattern) => {
8573
8029
 
8574
8030
  // src/controls/key-value-control.tsx
8575
8031
  var React102 = __toESM(require("react"));
8576
- var import_react60 = require("react");
8032
+ var import_react61 = require("react");
8577
8033
  var import_editor_props44 = require("@elementor/editor-props");
8578
8034
  var import_ui86 = require("@elementor/ui");
8579
8035
  var import_i18n48 = require("@wordpress/i18n");
@@ -8600,9 +8056,9 @@ var getInitialFieldValue = (fieldValue) => {
8600
8056
  };
8601
8057
  var KeyValueControl = createControl((props = {}) => {
8602
8058
  const { value, setValue, ...propContext } = useBoundProp(import_editor_props44.keyValuePropTypeUtil);
8603
- const [keyError, setKeyError] = (0, import_react60.useState)("");
8604
- const [valueError, setValueError] = (0, import_react60.useState)("");
8605
- const [sessionState, setSessionState] = (0, import_react60.useState)({
8059
+ const [keyError, setKeyError] = (0, import_react61.useState)("");
8060
+ const [valueError, setValueError] = (0, import_react61.useState)("");
8061
+ const [sessionState, setSessionState] = (0, import_react61.useState)({
8606
8062
  key: getInitialFieldValue(value?.key),
8607
8063
  value: getInitialFieldValue(value?.value)
8608
8064
  });
@@ -8612,7 +8068,7 @@ var KeyValueControl = createControl((props = {}) => {
8612
8068
  keyHelper: void 0,
8613
8069
  valueHelper: void 0
8614
8070
  };
8615
- const [keyRegex, valueRegex, errMsg] = (0, import_react60.useMemo)(
8071
+ const [keyRegex, valueRegex, errMsg] = (0, import_react61.useMemo)(
8616
8072
  () => [
8617
8073
  props.regexKey ? new RegExp(props.regexKey) : void 0,
8618
8074
  props.regexValue ? new RegExp(props.regexValue) : void 0,
@@ -8744,7 +8200,7 @@ var PositionControl = () => {
8744
8200
 
8745
8201
  // src/controls/transform-control/transform-repeater-control.tsx
8746
8202
  var React116 = __toESM(require("react"));
8747
- var import_react68 = require("react");
8203
+ var import_react69 = require("react");
8748
8204
  var import_editor_props54 = require("@elementor/editor-props");
8749
8205
  var import_icons38 = require("@elementor/icons");
8750
8206
  var import_ui100 = require("@elementor/ui");
@@ -8803,7 +8259,7 @@ var import_i18n54 = require("@wordpress/i18n");
8803
8259
 
8804
8260
  // src/controls/transform-control/functions/move.tsx
8805
8261
  var React105 = __toESM(require("react"));
8806
- var import_react61 = require("react");
8262
+ var import_react62 = require("react");
8807
8263
  var import_editor_props47 = require("@elementor/editor-props");
8808
8264
  var import_icons32 = require("@elementor/icons");
8809
8265
  var import_ui89 = require("@elementor/ui");
@@ -8850,7 +8306,7 @@ var moveAxisControls = [
8850
8306
  ];
8851
8307
  var Move = () => {
8852
8308
  const context = useBoundProp(import_editor_props47.moveTransformPropTypeUtil);
8853
- const rowRefs = [(0, import_react61.useRef)(null), (0, import_react61.useRef)(null), (0, import_react61.useRef)(null)];
8309
+ const rowRefs = [(0, import_react62.useRef)(null), (0, import_react62.useRef)(null), (0, import_react62.useRef)(null)];
8854
8310
  return /* @__PURE__ */ React105.createElement(import_ui89.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React105.createElement(PropProvider, { ...context }, /* @__PURE__ */ React105.createElement(PropKeyProvider, { bind: TransformFunctionKeys.move }, moveAxisControls.map((control, index) => /* @__PURE__ */ React105.createElement(
8855
8311
  AxisRow,
8856
8312
  {
@@ -8865,7 +8321,7 @@ var Move = () => {
8865
8321
 
8866
8322
  // src/controls/transform-control/functions/rotate.tsx
8867
8323
  var React106 = __toESM(require("react"));
8868
- var import_react62 = require("react");
8324
+ var import_react63 = require("react");
8869
8325
  var import_editor_props48 = require("@elementor/editor-props");
8870
8326
  var import_icons33 = require("@elementor/icons");
8871
8327
  var import_ui90 = require("@elementor/ui");
@@ -8890,7 +8346,7 @@ var rotateAxisControls = [
8890
8346
  var rotateUnits = ["deg", "rad", "grad", "turn"];
8891
8347
  var Rotate = () => {
8892
8348
  const context = useBoundProp(import_editor_props48.rotateTransformPropTypeUtil);
8893
- const rowRefs = [(0, import_react62.useRef)(null), (0, import_react62.useRef)(null), (0, import_react62.useRef)(null)];
8349
+ const rowRefs = [(0, import_react63.useRef)(null), (0, import_react63.useRef)(null), (0, import_react63.useRef)(null)];
8894
8350
  return /* @__PURE__ */ React106.createElement(import_ui90.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React106.createElement(PropProvider, { ...context }, /* @__PURE__ */ React106.createElement(PropKeyProvider, { bind: TransformFunctionKeys.rotate }, rotateAxisControls.map((control, index) => /* @__PURE__ */ React106.createElement(
8895
8351
  AxisRow,
8896
8352
  {
@@ -8904,7 +8360,7 @@ var Rotate = () => {
8904
8360
 
8905
8361
  // src/controls/transform-control/functions/scale.tsx
8906
8362
  var React108 = __toESM(require("react"));
8907
- var import_react63 = require("react");
8363
+ var import_react64 = require("react");
8908
8364
  var import_editor_props49 = require("@elementor/editor-props");
8909
8365
  var import_icons34 = require("@elementor/icons");
8910
8366
  var import_ui92 = require("@elementor/ui");
@@ -8937,13 +8393,13 @@ var scaleAxisControls = [
8937
8393
  ];
8938
8394
  var Scale = () => {
8939
8395
  const context = useBoundProp(import_editor_props49.scaleTransformPropTypeUtil);
8940
- const rowRefs = [(0, import_react63.useRef)(null), (0, import_react63.useRef)(null), (0, import_react63.useRef)(null)];
8396
+ const rowRefs = [(0, import_react64.useRef)(null), (0, import_react64.useRef)(null), (0, import_react64.useRef)(null)];
8941
8397
  return /* @__PURE__ */ React108.createElement(import_ui92.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React108.createElement(PropProvider, { ...context }, /* @__PURE__ */ React108.createElement(PropKeyProvider, { bind: TransformFunctionKeys.scale }, scaleAxisControls.map((control, index) => /* @__PURE__ */ React108.createElement(ScaleAxisRow, { key: control.bind, ...control, anchorRef: rowRefs[index] })))));
8942
8398
  };
8943
8399
 
8944
8400
  // src/controls/transform-control/functions/skew.tsx
8945
8401
  var React109 = __toESM(require("react"));
8946
- var import_react64 = require("react");
8402
+ var import_react65 = require("react");
8947
8403
  var import_editor_props50 = require("@elementor/editor-props");
8948
8404
  var import_icons35 = require("@elementor/icons");
8949
8405
  var import_ui93 = require("@elementor/ui");
@@ -8963,7 +8419,7 @@ var skewAxisControls = [
8963
8419
  var skewUnits = ["deg", "rad", "grad", "turn"];
8964
8420
  var Skew = () => {
8965
8421
  const context = useBoundProp(import_editor_props50.skewTransformPropTypeUtil);
8966
- const rowRefs = [(0, import_react64.useRef)(null), (0, import_react64.useRef)(null), (0, import_react64.useRef)(null)];
8422
+ const rowRefs = [(0, import_react65.useRef)(null), (0, import_react65.useRef)(null), (0, import_react65.useRef)(null)];
8967
8423
  return /* @__PURE__ */ React109.createElement(import_ui93.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React109.createElement(PropProvider, { ...context }, /* @__PURE__ */ React109.createElement(PropKeyProvider, { bind: TransformFunctionKeys.skew }, skewAxisControls.map((control, index) => /* @__PURE__ */ React109.createElement(
8968
8424
  AxisRow,
8969
8425
  {
@@ -8976,7 +8432,7 @@ var Skew = () => {
8976
8432
  };
8977
8433
 
8978
8434
  // src/controls/transform-control/use-transform-tabs-history.tsx
8979
- var import_react65 = require("react");
8435
+ var import_react66 = require("react");
8980
8436
  var import_editor_props51 = require("@elementor/editor-props");
8981
8437
  var import_ui94 = require("@elementor/ui");
8982
8438
  var useTransformTabsHistory = ({
@@ -9003,7 +8459,7 @@ var useTransformTabsHistory = ({
9003
8459
  }
9004
8460
  };
9005
8461
  const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui94.useTabs)(getCurrentTransformType());
9006
- const valuesHistory = (0, import_react65.useRef)({
8462
+ const valuesHistory = (0, import_react66.useRef)({
9007
8463
  move: initialMove,
9008
8464
  scale: initialScale,
9009
8465
  rotate: initialRotate,
@@ -9147,7 +8603,7 @@ var import_i18n58 = require("@wordpress/i18n");
9147
8603
 
9148
8604
  // src/controls/transform-control/transform-base-controls/children-perspective-control.tsx
9149
8605
  var React113 = __toESM(require("react"));
9150
- var import_react66 = require("react");
8606
+ var import_react67 = require("react");
9151
8607
  var import_editor_props52 = require("@elementor/editor-props");
9152
8608
  var import_ui97 = require("@elementor/ui");
9153
8609
  var import_i18n56 = require("@wordpress/i18n");
@@ -9179,13 +8635,13 @@ var PerspectiveOriginControlProvider = () => {
9179
8635
  return /* @__PURE__ */ React113.createElement(PropProvider, { ...context }, CHILDREN_PERSPECTIVE_FIELDS.map((control) => /* @__PURE__ */ React113.createElement(PropKeyProvider, { bind: control.bind, key: control.bind }, /* @__PURE__ */ React113.createElement(ControlFields, { control }))));
9180
8636
  };
9181
8637
  var ControlFields = ({ control }) => {
9182
- const rowRef = (0, import_react66.useRef)(null);
8638
+ const rowRef = (0, import_react67.useRef)(null);
9183
8639
  return /* @__PURE__ */ React113.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React113.createElement(import_ui97.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React113.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React113.createElement(import_ui97.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React113.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef, disableCustom: true })));
9184
8640
  };
9185
8641
 
9186
8642
  // src/controls/transform-control/transform-base-controls/transform-origin-control.tsx
9187
8643
  var React114 = __toESM(require("react"));
9188
- var import_react67 = require("react");
8644
+ var import_react68 = require("react");
9189
8645
  var import_editor_props53 = require("@elementor/editor-props");
9190
8646
  var import_ui98 = require("@elementor/ui");
9191
8647
  var import_i18n57 = require("@wordpress/i18n");
@@ -9213,7 +8669,7 @@ var TransformOriginControl = () => {
9213
8669
  };
9214
8670
  var ControlFields2 = ({ control }) => {
9215
8671
  const context = useBoundProp(import_editor_props53.transformOriginPropTypeUtil);
9216
- const rowRef = (0, import_react67.useRef)(null);
8672
+ const rowRef = (0, import_react68.useRef)(null);
9217
8673
  return /* @__PURE__ */ React114.createElement(PropProvider, { ...context }, /* @__PURE__ */ React114.createElement(PropKeyProvider, { bind: control.bind }, /* @__PURE__ */ React114.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React114.createElement(import_ui98.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React114.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React114.createElement(import_ui98.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React114.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef })))));
9218
8674
  };
9219
8675
 
@@ -9261,7 +8717,7 @@ var SIZE11 = "tiny";
9261
8717
  var TransformRepeaterControl = createControl(
9262
8718
  ({ showChildrenPerspective }) => {
9263
8719
  const context = useBoundProp(import_editor_props54.transformPropTypeUtil);
9264
- const headerRef = (0, import_react68.useRef)(null);
8720
+ const headerRef = (0, import_react69.useRef)(null);
9265
8721
  const popupState = (0, import_ui100.usePopupState)({ variant: "popover" });
9266
8722
  return /* @__PURE__ */ React116.createElement(PropProvider, { ...context }, /* @__PURE__ */ React116.createElement(
9267
8723
  TransformSettingsControl,
@@ -9341,7 +8797,7 @@ var TransformBasePopoverTrigger = ({
9341
8797
 
9342
8798
  // src/controls/transition-control/transition-repeater-control.tsx
9343
8799
  var React119 = __toESM(require("react"));
9344
- var import_react71 = require("react");
8800
+ var import_react72 = require("react");
9345
8801
  var import_editor_props57 = require("@elementor/editor-props");
9346
8802
  var import_icons40 = require("@elementor/icons");
9347
8803
  var import_ui103 = require("@elementor/ui");
@@ -9350,15 +8806,15 @@ var import_i18n62 = require("@wordpress/i18n");
9350
8806
 
9351
8807
  // src/controls/selection-size-control.tsx
9352
8808
  var React117 = __toESM(require("react"));
9353
- var import_react69 = require("react");
8809
+ var import_react70 = require("react");
9354
8810
  var import_editor_props55 = require("@elementor/editor-props");
9355
8811
  var import_ui101 = require("@elementor/ui");
9356
8812
  var SelectionSizeControl = createControl(
9357
8813
  ({ selectionLabel, sizeLabel, selectionConfig, sizeConfigMap }) => {
9358
8814
  const { value, setValue, propType } = useBoundProp(import_editor_props55.selectionSizePropTypeUtil);
9359
- const rowRef = (0, import_react69.useRef)(null);
8815
+ const rowRef = (0, import_react70.useRef)(null);
9360
8816
  const sizeFieldId = sizeLabel.replace(/\s+/g, "-").toLowerCase();
9361
- const currentSizeConfig = (0, import_react69.useMemo)(() => {
8817
+ const currentSizeConfig = (0, import_react70.useMemo)(() => {
9362
8818
  switch (value.selection.$$type) {
9363
8819
  case "key-value":
9364
8820
  return sizeConfigMap[value?.selection?.value.value.value || ""];
@@ -9571,7 +9027,7 @@ function subscribeToTransitionEvent() {
9571
9027
 
9572
9028
  // src/controls/transition-control/transition-selector.tsx
9573
9029
  var React118 = __toESM(require("react"));
9574
- var import_react70 = require("react");
9030
+ var import_react71 = require("react");
9575
9031
  var import_editor_props56 = require("@elementor/editor-props");
9576
9032
  var import_editor_ui15 = require("@elementor/editor-ui");
9577
9033
  var import_icons39 = require("@elementor/icons");
@@ -9657,9 +9113,9 @@ var TransitionSelector = ({
9657
9113
  const {
9658
9114
  key: { value: transitionLabel }
9659
9115
  } = value;
9660
- const defaultRef = (0, import_react70.useRef)(null);
9116
+ const defaultRef = (0, import_react71.useRef)(null);
9661
9117
  const popoverState = (0, import_ui102.usePopupState)({ variant: "popover" });
9662
- const disabledCategories = (0, import_react70.useMemo)(() => {
9118
+ const disabledCategories = (0, import_react71.useMemo)(() => {
9663
9119
  return new Set(
9664
9120
  transitionProperties.filter((cat) => cat.properties.some((prop) => prop.isDisabled)).map((cat) => cat.label)
9665
9121
  );
@@ -9885,14 +9341,14 @@ var TransitionRepeaterControl = createControl(
9885
9341
  currentStyleState
9886
9342
  }) => {
9887
9343
  const currentStyleIsNormal = currentStyleState === null;
9888
- const [recentlyUsedList, setRecentlyUsedList] = (0, import_react71.useState)([]);
9344
+ const [recentlyUsedList, setRecentlyUsedList] = (0, import_react72.useState)([]);
9889
9345
  const proInstalled = (0, import_utils8.hasProInstalled)();
9890
9346
  const { value, setValue } = useBoundProp(childArrayPropTypeUtil);
9891
- const { allDisabled: disabledItems, proDisabled: proDisabledItems } = (0, import_react71.useMemo)(
9347
+ const { allDisabled: disabledItems, proDisabled: proDisabledItems } = (0, import_react72.useMemo)(
9892
9348
  () => getDisabledItemLabels(value),
9893
9349
  [value]
9894
9350
  );
9895
- const allowedTransitionSet = (0, import_react71.useMemo)(() => {
9351
+ const allowedTransitionSet = (0, import_react72.useMemo)(() => {
9896
9352
  const set = /* @__PURE__ */ new Set();
9897
9353
  transitionProperties.forEach((category) => {
9898
9354
  category.properties.forEach((prop) => {
@@ -9903,7 +9359,7 @@ var TransitionRepeaterControl = createControl(
9903
9359
  });
9904
9360
  return set;
9905
9361
  }, [proInstalled]);
9906
- (0, import_react71.useEffect)(() => {
9362
+ (0, import_react72.useEffect)(() => {
9907
9363
  if (!value || value.length === 0) {
9908
9364
  return;
9909
9365
  }
@@ -9915,10 +9371,10 @@ var TransitionRepeaterControl = createControl(
9915
9371
  setValue(sanitized);
9916
9372
  }
9917
9373
  }, [allowedTransitionSet]);
9918
- (0, import_react71.useEffect)(() => {
9374
+ (0, import_react72.useEffect)(() => {
9919
9375
  recentlyUsedListGetter().then(setRecentlyUsedList);
9920
9376
  }, [recentlyUsedListGetter]);
9921
- const allPropertiesUsed = (0, import_react71.useMemo)(() => areAllPropertiesUsed(value), [value]);
9377
+ const allPropertiesUsed = (0, import_react72.useMemo)(() => areAllPropertiesUsed(value), [value]);
9922
9378
  const isAddItemDisabled = !currentStyleIsNormal || allPropertiesUsed;
9923
9379
  return /* @__PURE__ */ React119.createElement(
9924
9380
  RepeatableControl,
@@ -10201,13 +9657,13 @@ var BoundTimeStringControl = ({ bind, ariaLabel }) => {
10201
9657
 
10202
9658
  // src/controls/inline-editing-control.tsx
10203
9659
  var React128 = __toESM(require("react"));
10204
- var import_react77 = require("react");
9660
+ var import_react78 = require("react");
10205
9661
  var import_editor_props65 = require("@elementor/editor-props");
10206
9662
  var import_ui112 = require("@elementor/ui");
10207
9663
 
10208
9664
  // src/components/inline-editor.tsx
10209
9665
  var React125 = __toESM(require("react"));
10210
- var import_react72 = require("react");
9666
+ var import_react73 = require("react");
10211
9667
  var import_ui109 = require("@elementor/ui");
10212
9668
  var import_extension_bold = __toESM(require("@tiptap/extension-bold"));
10213
9669
  var import_extension_document = __toESM(require("@tiptap/extension-document"));
@@ -10221,7 +9677,7 @@ var import_extension_subscript = __toESM(require("@tiptap/extension-subscript"))
10221
9677
  var import_extension_superscript = __toESM(require("@tiptap/extension-superscript"));
10222
9678
  var import_extension_text = __toESM(require("@tiptap/extension-text"));
10223
9679
  var import_extension_underline = __toESM(require("@tiptap/extension-underline"));
10224
- var import_react73 = require("@tiptap/react");
9680
+ var import_react74 = require("@tiptap/react");
10225
9681
 
10226
9682
  // src/utils/inline-editing.ts
10227
9683
  var import_editor_props64 = require("@elementor/editor-props");
@@ -10270,8 +9726,8 @@ var InlineEditor = React125.forwardRef((props, ref) => {
10270
9726
  onSelectionEnd,
10271
9727
  mountElement = null
10272
9728
  } = props;
10273
- const containerRef = (0, import_react72.useRef)(null);
10274
- const onBlurRef = (0, import_react72.useRef)(onBlur);
9729
+ const containerRef = (0, import_react73.useRef)(null);
9730
+ const onBlurRef = (0, import_react73.useRef)(onBlur);
10275
9731
  onBlurRef.current = onBlur;
10276
9732
  const documentContentSettings = !!expectedTag ? "block+" : "inline*";
10277
9733
  const onUpdate = ({ editor: updatedEditor }) => {
@@ -10293,7 +9749,7 @@ var InlineEditor = React125.forwardRef((props, ref) => {
10293
9749
  ...HTMLAttributes,
10294
9750
  class: elementClasses
10295
9751
  });
10296
- const editor = (0, import_react73.useEditor)({
9752
+ const editor = (0, import_react74.useEditor)({
10297
9753
  ...mountElement ? { element: mountElement } : {},
10298
9754
  extensions: [
10299
9755
  import_extension_document.default.extend({
@@ -10366,11 +9822,11 @@ var InlineEditor = React125.forwardRef((props, ref) => {
10366
9822
  if (mountElement) {
10367
9823
  return null;
10368
9824
  }
10369
- return /* @__PURE__ */ React125.createElement(import_ui109.Box, { ref: containerRef, sx, className: wrapperClassName }, /* @__PURE__ */ React125.createElement(import_react73.EditorContent, { ref, editor }));
9825
+ return /* @__PURE__ */ React125.createElement(import_ui109.Box, { ref: containerRef, sx, className: wrapperClassName }, /* @__PURE__ */ React125.createElement(import_react74.EditorContent, { ref, editor }));
10370
9826
  });
10371
9827
  var useOnUpdate = (callback, dependencies) => {
10372
- const hasMounted = (0, import_react72.useRef)(false);
10373
- (0, import_react72.useEffect)(() => {
9828
+ const hasMounted = (0, import_react73.useRef)(false);
9829
+ (0, import_react73.useEffect)(() => {
10374
9830
  if (hasMounted.current) {
10375
9831
  callback();
10376
9832
  } else {
@@ -10381,16 +9837,16 @@ var useOnUpdate = (callback, dependencies) => {
10381
9837
 
10382
9838
  // src/components/inline-editor-toolbar.tsx
10383
9839
  var React127 = __toESM(require("react"));
10384
- var import_react75 = require("react");
9840
+ var import_react76 = require("react");
10385
9841
  var import_editor_elements7 = require("@elementor/editor-elements");
10386
9842
  var import_icons42 = require("@elementor/icons");
10387
9843
  var import_ui111 = require("@elementor/ui");
10388
- var import_react76 = require("@tiptap/react");
9844
+ var import_react77 = require("@tiptap/react");
10389
9845
  var import_i18n66 = require("@wordpress/i18n");
10390
9846
 
10391
9847
  // src/components/url-popover.tsx
10392
9848
  var React126 = __toESM(require("react"));
10393
- var import_react74 = require("react");
9849
+ var import_react75 = require("react");
10394
9850
  var import_icons41 = require("@elementor/icons");
10395
9851
  var import_ui110 = require("@elementor/ui");
10396
9852
  var import_i18n65 = require("@wordpress/i18n");
@@ -10403,8 +9859,8 @@ var UrlPopover = ({
10403
9859
  openInNewTab,
10404
9860
  onToggleNewTab
10405
9861
  }) => {
10406
- const inputRef = (0, import_react74.useRef)(null);
10407
- (0, import_react74.useEffect)(() => {
9862
+ const inputRef = (0, import_react75.useRef)(null);
9863
+ (0, import_react75.useEffect)(() => {
10408
9864
  if (popupState.isOpen) {
10409
9865
  requestAnimationFrame(() => inputRef.current?.focus());
10410
9866
  }
@@ -10459,16 +9915,16 @@ var InlineEditorToolbar = ({
10459
9915
  sx = {},
10460
9916
  inControlPanel = false
10461
9917
  }) => {
10462
- const [urlValue, setUrlValue] = (0, import_react75.useState)("");
10463
- const [openInNewTab, setOpenInNewTab] = (0, import_react75.useState)(false);
10464
- const toolbarRef = (0, import_react75.useRef)(null);
9918
+ const [urlValue, setUrlValue] = (0, import_react76.useState)("");
9919
+ const [openInNewTab, setOpenInNewTab] = (0, import_react76.useState)(false);
9920
+ const toolbarRef = (0, import_react76.useRef)(null);
10465
9921
  const linkPopupState = (0, import_ui111.usePopupState)({ variant: "popover" });
10466
9922
  const isElementClickable = elementId ? checkIfElementIsClickable(elementId) : false;
10467
- const editorState = (0, import_react76.useEditorState)({
9923
+ const editorState = (0, import_react77.useEditorState)({
10468
9924
  editor,
10469
9925
  selector: (ctx) => possibleFormats.filter((format) => ctx.editor.isActive(format))
10470
9926
  });
10471
- const formatButtonsList = (0, import_react75.useMemo)(() => {
9927
+ const formatButtonsList = (0, import_react76.useMemo)(() => {
10472
9928
  const buttons = Object.values(formatButtons);
10473
9929
  if (isElementClickable) {
10474
9930
  return buttons.filter((button) => button.action !== "link");
@@ -10505,7 +9961,7 @@ var InlineEditorToolbar = ({
10505
9961
  }
10506
9962
  linkPopupState.close();
10507
9963
  };
10508
- (0, import_react75.useEffect)(() => {
9964
+ (0, import_react76.useEffect)(() => {
10509
9965
  if (!inControlPanel) {
10510
9966
  editor?.commands?.focus();
10511
9967
  }
@@ -10687,8 +10143,8 @@ var InlineEditingControl = createControl(
10687
10143
  const { setValue, placeholder, value } = useBoundProp(import_editor_props65.escapedHtmlPropTypeUtil);
10688
10144
  const { value: rawValue } = usePropKeyContext();
10689
10145
  const content = value ?? extractInlineHtmlContent(rawValue);
10690
- const [editor, setEditor] = (0, import_react77.useState)(null);
10691
- const handleChange = (0, import_react77.useCallback)(
10146
+ const [editor, setEditor] = (0, import_react78.useState)(null);
10147
+ const handleChange = (0, import_react78.useCallback)(
10692
10148
  (newValue) => {
10693
10149
  const html = newValue ?? "";
10694
10150
  setValue(html);
@@ -10875,7 +10331,7 @@ function useFormFieldSuggestions(options) {
10875
10331
 
10876
10332
  // src/controls/email-form-action-control/email-chips-field.tsx
10877
10333
  var React129 = __toESM(require("react"));
10878
- var import_react78 = require("react");
10334
+ var import_react79 = require("react");
10879
10335
  var import_editor_props67 = require("@elementor/editor-props");
10880
10336
  var import_ui113 = require("@elementor/ui");
10881
10337
 
@@ -10913,10 +10369,10 @@ function resolveMention(raw, suggestions) {
10913
10369
  }
10914
10370
  var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
10915
10371
  const { value, setValue, disabled } = useBoundProp(import_editor_props67.stringArrayPropTypeUtil);
10916
- const [inputValue, setInputValue] = (0, import_react78.useState)("");
10372
+ const [inputValue, setInputValue] = (0, import_react79.useState)("");
10917
10373
  const items2 = value || [];
10918
10374
  const selectedValues = items2.map((item) => import_editor_props67.stringPropTypeUtil.extract(item)).filter((val) => val !== null);
10919
- const suggestionOptions = (0, import_react78.useMemo)(
10375
+ const suggestionOptions = (0, import_react79.useMemo)(
10920
10376
  () => suggestions.map((suggestion) => `[${suggestion.value}]`),
10921
10377
  [suggestions]
10922
10378
  );
@@ -11144,24 +10600,24 @@ var GridSpanControl = createControl(
11144
10600
 
11145
10601
  // src/components/promotions/display-conditions-control.tsx
11146
10602
  var React136 = __toESM(require("react"));
11147
- var import_react80 = require("react");
10603
+ var import_react81 = require("react");
11148
10604
  var import_icons43 = require("@elementor/icons");
11149
10605
  var import_ui120 = require("@elementor/ui");
11150
10606
  var import_i18n70 = require("@wordpress/i18n");
11151
10607
 
11152
10608
  // src/components/promotions/promotion-trigger.tsx
11153
10609
  var React135 = __toESM(require("react"));
11154
- var import_react79 = require("react");
10610
+ var import_react80 = require("react");
11155
10611
  var import_editor_ui19 = require("@elementor/editor-ui");
11156
10612
  var import_ui119 = require("@elementor/ui");
11157
10613
  function getV4Promotion(key) {
11158
10614
  return window.elementor?.config?.v4Promotions?.[key];
11159
10615
  }
11160
- var PromotionTrigger = (0, import_react79.forwardRef)(
10616
+ var PromotionTrigger = (0, import_react80.forwardRef)(
11161
10617
  ({ promotionKey, children, trackingData }, ref) => {
11162
- const [isOpen, setIsOpen] = (0, import_react79.useState)(false);
10618
+ const [isOpen, setIsOpen] = (0, import_react80.useState)(false);
11163
10619
  const promotion = getV4Promotion(promotionKey);
11164
- const toggle = (0, import_react79.useCallback)(() => {
10620
+ const toggle = (0, import_react80.useCallback)(() => {
11165
10621
  setIsOpen((prev) => {
11166
10622
  if (!prev) {
11167
10623
  trackViewPromotion(trackingData);
@@ -11169,7 +10625,7 @@ var PromotionTrigger = (0, import_react79.forwardRef)(
11169
10625
  return !prev;
11170
10626
  });
11171
10627
  }, [trackingData]);
11172
- (0, import_react79.useImperativeHandle)(ref, () => ({ toggle }), [toggle]);
10628
+ (0, import_react80.useImperativeHandle)(ref, () => ({ toggle }), [toggle]);
11173
10629
  return /* @__PURE__ */ React135.createElement(React135.Fragment, null, promotion && /* @__PURE__ */ React135.createElement(
11174
10630
  import_editor_ui19.PromotionInfotip,
11175
10631
  {
@@ -11203,7 +10659,7 @@ var PromotionTrigger = (0, import_react79.forwardRef)(
11203
10659
  var ARIA_LABEL = (0, import_i18n70.__)("Display Conditions", "elementor");
11204
10660
  var TRACKING_DATA = { target_name: "display_conditions", location_l2: "general" };
11205
10661
  var DisplayConditionsControl = createControl(() => {
11206
- const triggerRef = (0, import_react80.useRef)(null);
10662
+ const triggerRef = (0, import_react81.useRef)(null);
11207
10663
  return /* @__PURE__ */ React136.createElement(
11208
10664
  import_ui120.Stack,
11209
10665
  {
@@ -11235,14 +10691,14 @@ var DisplayConditionsControl = createControl(() => {
11235
10691
 
11236
10692
  // src/components/promotions/attributes-control.tsx
11237
10693
  var React137 = __toESM(require("react"));
11238
- var import_react81 = require("react");
10694
+ var import_react82 = require("react");
11239
10695
  var import_icons44 = require("@elementor/icons");
11240
10696
  var import_ui121 = require("@elementor/ui");
11241
10697
  var import_i18n71 = require("@wordpress/i18n");
11242
10698
  var ARIA_LABEL2 = (0, import_i18n71.__)("Attributes", "elementor");
11243
10699
  var TRACKING_DATA2 = { target_name: "attributes", location_l2: "general" };
11244
10700
  var AttributesControl = createControl(() => {
11245
- const triggerRef = (0, import_react81.useRef)(null);
10701
+ const triggerRef = (0, import_react82.useRef)(null);
11246
10702
  return /* @__PURE__ */ React137.createElement(
11247
10703
  import_ui121.Stack,
11248
10704
  {
@@ -11279,7 +10735,7 @@ var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /*
11279
10735
 
11280
10736
  // src/components/repeater/repeater.tsx
11281
10737
  var React139 = __toESM(require("react"));
11282
- var import_react82 = require("react");
10738
+ var import_react83 = require("react");
11283
10739
  var import_icons46 = require("@elementor/icons");
11284
10740
  var import_ui123 = require("@elementor/ui");
11285
10741
  var import_i18n72 = require("@wordpress/i18n");
@@ -11301,7 +10757,7 @@ var Repeater3 = ({
11301
10757
  isSortable = true,
11302
10758
  adornment = ControlAdornments
11303
10759
  }) => {
11304
- const [openItem, setOpenItem] = (0, import_react82.useState)(initialOpenItem);
10760
+ const [openItem, setOpenItem] = (0, import_react83.useState)(initialOpenItem);
11305
10761
  const uniqueKeys = items2.map(
11306
10762
  (item, index) => isSortable && "getId" in itemSettings ? itemSettings.getId({ item, index }) : String(index)
11307
10763
  );
@@ -11477,10 +10933,10 @@ var RepeaterItem = ({
11477
10933
  ), /* @__PURE__ */ React139.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React139.createElement(import_ui123.Box, null, children({ anchorEl: ref }))));
11478
10934
  };
11479
10935
  var usePopover = (openOnMount, onOpen, onPopoverClose) => {
11480
- const [ref, setRef] = (0, import_react82.useState)(null);
10936
+ const [ref, setRef] = (0, import_react83.useState)(null);
11481
10937
  const popoverState = (0, import_ui123.usePopupState)({ variant: "popover" });
11482
10938
  const popoverProps = (0, import_ui123.bindPopover)(popoverState);
11483
- (0, import_react82.useEffect)(() => {
10939
+ (0, import_react83.useEffect)(() => {
11484
10940
  if (openOnMount && ref) {
11485
10941
  popoverState.open(ref);
11486
10942
  onOpen?.();
@@ -11543,7 +10999,7 @@ var differsFromExternal = (newState, externalState) => {
11543
10999
 
11544
11000
  // src/components/size/unit-select.tsx
11545
11001
  var React140 = __toESM(require("react"));
11546
- var import_react83 = require("react");
11002
+ var import_react84 = require("react");
11547
11003
  var import_editor_ui20 = require("@elementor/editor-ui");
11548
11004
  var import_ui124 = require("@elementor/ui");
11549
11005
  var menuItemContentStyles2 = {
@@ -11554,7 +11010,7 @@ var menuItemContentStyles2 = {
11554
11010
  var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
11555
11011
  const popupState = (0, import_ui124.usePopupState)({
11556
11012
  variant: "popover",
11557
- popupId: (0, import_react83.useId)()
11013
+ popupId: (0, import_react84.useId)()
11558
11014
  });
11559
11015
  const handleMenuItemClick = (index) => {
11560
11016
  onClick(options[index]);
@@ -11590,8 +11046,8 @@ var StyledButton3 = (0, import_ui124.styled)(import_ui124.Button, {
11590
11046
 
11591
11047
  // src/components/size/unstable-size-input.tsx
11592
11048
  var React141 = __toESM(require("react"));
11593
- var import_react84 = require("react");
11594
- var UnstableSizeInput = (0, import_react84.forwardRef)(
11049
+ var import_react85 = require("react");
11050
+ var UnstableSizeInput = (0, import_react85.forwardRef)(
11595
11051
  ({ type, value, onChange, onKeyDown, onKeyUp, InputProps, onBlur, focused, disabled }, ref) => {
11596
11052
  return /* @__PURE__ */ React141.createElement(
11597
11053
  NumberInput,
@@ -11659,7 +11115,7 @@ var hasValue = (value) => {
11659
11115
  };
11660
11116
 
11661
11117
  // src/hooks/use-font-families.ts
11662
- var import_react85 = require("react");
11118
+ var import_react86 = require("react");
11663
11119
  var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
11664
11120
  var getFontControlConfig = () => {
11665
11121
  const { controls } = (0, import_editor_v1_adapters5.getElementorConfig)();
@@ -11667,7 +11123,7 @@ var getFontControlConfig = () => {
11667
11123
  };
11668
11124
  var useFontFamilies = () => {
11669
11125
  const { groups, options } = getFontControlConfig();
11670
- return (0, import_react85.useMemo)(() => {
11126
+ return (0, import_react86.useMemo)(() => {
11671
11127
  if (!groups || !options) {
11672
11128
  return [];
11673
11129
  }
@@ -11764,21 +11220,23 @@ var useFontFamilies = () => {
11764
11220
  createControl,
11765
11221
  createControlReplacementsRegistry,
11766
11222
  enqueueFont,
11223
+ enqueueIconFonts,
11767
11224
  getControlReplacements,
11768
11225
  getFontAwesome7IconName,
11769
11226
  injectIntoRepeaterItemActions,
11770
11227
  injectIntoRepeaterItemIcon,
11771
11228
  injectIntoRepeaterItemLabel,
11772
- isDeletedCustomIconLibrary,
11773
11229
  isUnitExtendedOption,
11774
11230
  registerControlReplacement,
11231
+ registerIconLibraryProvider,
11775
11232
  resetFontAwesome7IconsCache,
11776
- resolveCustomIconSvg,
11777
11233
  resolveFontAwesome7Icon,
11234
+ resolveProviderIconSvg,
11778
11235
  trackUpgradePromotionClick,
11779
11236
  trackViewPromotion,
11780
11237
  transitionProperties,
11781
11238
  transitionsItemsList,
11239
+ unregisterIconLibraryProvider,
11782
11240
  useBoundProp,
11783
11241
  useControlActions,
11784
11242
  useControlReplacement,