@emailmaker/filemanager 1.1.75 → 1.1.84

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.
@@ -1,5 +1,5 @@
1
- import { B as e, F as t, G as n, H as r, I as i, J as a, b as o, k as s, q as c, t as l, v as u, x as d, y as f } from "./file-manager-hooks-vqT-4jeg.js";
2
- import { i as p, n as m, o as h, r as g, s as _, t as ee } from "./file-manager-useMediaListEngine-BitrHuUM.js";
1
+ import { C as e, H as t, L as n, R as r, S as i, W as a, X as o, Y as s, b as c, j as l, q as u, t as d, x as f } from "./file-manager-hooks-DQggJnuP.js";
2
+ import { i as p, n as m, o as h, r as g, s as _, t as ee } from "./file-manager-useMediaListEngine-ChZpHgET.js";
3
3
  import v from "react";
4
4
  import { Button as y, Checkbox as b, ColorPicker as x, Divider as te, Form as S, Input as C, InputNumber as w, Modal as ne, Space as T, Spin as E, Typography as re } from "antd";
5
5
  import { Fragment as ie, jsx as D, jsxs as O } from "react/jsx-runtime";
@@ -64,40 +64,40 @@ var A = {
64
64
  iconsHeaderDivider: "iconsHeaderDivider",
65
65
  copyToFolderModalBody: "copyToFolderModalBody",
66
66
  copyToFolderModalLoadingOverlay: "copyToFolderModalLoadingOverlay"
67
- }, le = ({ query: t, onQueryChange: r, onSubmit: i, hasResults: a = !1, inputRef: o }) => {
68
- let { t: s } = n(), { options: c } = e(), { config: l } = c, u = t.length > 0 && a;
67
+ }, le = ({ query: e, onQueryChange: n, onSubmit: r, hasResults: i = !1, inputRef: a }) => {
68
+ let { t: o } = u(), { options: s } = t(), { config: c } = s, l = e.length > 0 && i;
69
69
  return /* @__PURE__ */ O("div", {
70
70
  className: A.iconsSearchFormCenteredContainer,
71
71
  children: [/* @__PURE__ */ D(S, {
72
72
  layout: "inline",
73
- onFinish: i,
74
- className: u ? A.iconsSearchResults : A.iconsSearchFormCentered,
73
+ onFinish: r,
74
+ className: l ? A.iconsSearchResults : A.iconsSearchFormCentered,
75
75
  children: /* @__PURE__ */ D(S.Item, {
76
76
  className: A.iconsSearchFormInput,
77
77
  children: /* @__PURE__ */ D(C, {
78
- ref: o,
78
+ ref: a,
79
79
  className: A.iconsSearchFormInputInput,
80
80
  allowClear: !0,
81
81
  prefix: /* @__PURE__ */ D(ce, {
82
82
  size: 16,
83
- strokeWidth: l?.iconStrokeWidth,
84
- onClick: i
83
+ strokeWidth: c?.iconStrokeWidth,
84
+ onClick: r
85
85
  }),
86
- placeholder: s("Search icons"),
87
- value: t,
88
- onChange: (e) => r(e.target.value),
89
- onKeyDown: (e) => e.code === "Space" && i(),
90
- onPressEnter: i,
86
+ placeholder: o("Search icons"),
87
+ value: e,
88
+ onChange: (e) => n(e.target.value),
89
+ onKeyDown: (e) => e.code === "Space" && r(),
90
+ onPressEnter: r,
91
91
  spellCheck: "false"
92
92
  })
93
93
  })
94
- }), u && /* @__PURE__ */ D("div", {
94
+ }), l && /* @__PURE__ */ D("div", {
95
95
  className: `ant-divider ${A.iconsSearchDivider}`,
96
96
  role: "separator"
97
97
  })]
98
98
  });
99
99
  }, ue = (e) => {
100
- let { t } = n(), { colorHex: r, setColorHex: i, colorHex2: a, setColorHex2: o, colorHex3: s, setColorHex3: c, sizePx: l, setSizePx: u, strokeWidth: d, setStrokeWidth: f, showSecondColor: p, showThirdColor: m } = e;
100
+ let { t } = u(), { colorHex: n, setColorHex: r, colorHex2: i, setColorHex2: a, colorHex3: o, setColorHex3: s, sizePx: c, setSizePx: l, strokeWidth: d, setStrokeWidth: f, showSecondColor: p, showThirdColor: m } = e;
101
101
  return /* @__PURE__ */ D("div", {
102
102
  className: A.iconsControls,
103
103
  children: /* @__PURE__ */ O("div", {
@@ -114,12 +114,12 @@ var A = {
114
114
  min: 20,
115
115
  max: 200,
116
116
  step: 1,
117
- value: l,
117
+ value: c,
118
118
  suffix: /* @__PURE__ */ D("span", {
119
119
  className: A.iconsControlsNumSuffix,
120
120
  children: "px"
121
121
  }),
122
- onChange: (e) => u(typeof e == "number" && !Number.isNaN(e) ? e : 50),
122
+ onChange: (e) => l(typeof e == "number" && !Number.isNaN(e) ? e : 50),
123
123
  "aria-label": t("Size")
124
124
  })]
125
125
  }),
@@ -149,13 +149,13 @@ var A = {
149
149
  /* @__PURE__ */ O("div", {
150
150
  className: A.iconsControlElement,
151
151
  children: [/* @__PURE__ */ D("span", { children: t("Color1") }), /* @__PURE__ */ D(x, {
152
- value: r,
152
+ value: n,
153
153
  format: "hex",
154
154
  disabledAlpha: !0,
155
155
  showText: !0,
156
156
  onChange: (e, t) => {
157
157
  let n = typeof e == "string" ? e : e?.toHexString ? e.toHexString() : t;
158
- i(n);
158
+ r(n);
159
159
  },
160
160
  size: "middle"
161
161
  })]
@@ -163,13 +163,13 @@ var A = {
163
163
  p && /* @__PURE__ */ O("div", {
164
164
  className: A.iconsControlElement,
165
165
  children: [/* @__PURE__ */ D("span", { children: t("Color2") }), /* @__PURE__ */ D(x, {
166
- value: a,
166
+ value: i,
167
167
  format: "hex",
168
168
  disabledAlpha: !0,
169
169
  showText: !0,
170
170
  onChange: (e, t) => {
171
171
  let n = typeof e == "string" ? e : e?.toHexString ? e.toHexString() : t;
172
- o(n);
172
+ a(n);
173
173
  },
174
174
  size: "middle"
175
175
  })]
@@ -177,13 +177,13 @@ var A = {
177
177
  m && /* @__PURE__ */ O("div", {
178
178
  className: A.iconsControlElement,
179
179
  children: [/* @__PURE__ */ D("span", { children: t("Color3") }), /* @__PURE__ */ D(x, {
180
- value: s,
180
+ value: o,
181
181
  format: "hex",
182
182
  disabledAlpha: !0,
183
183
  showText: !0,
184
184
  onChange: (e, t) => {
185
185
  let n = typeof e == "string" ? e : e?.toHexString ? e.toHexString() : t;
186
- c(n);
186
+ s(n);
187
187
  },
188
188
  size: "middle"
189
189
  })]
@@ -196,8 +196,8 @@ var A = {
196
196
  }, j = /* @__PURE__ */ D(k, {
197
197
  style: { fontSize: 20 },
198
198
  spin: !0
199
- }), de = 240, fe = 160, M = 56, pe = ({ items: e, loading: t, isCollectingResults: r = !1, hasMore: i = !1, hasQuery: a, selectedHash: o, onItemClick: s, onInsert: c, onLoadMore: u, colorVars: d, svgTextMap: f, previewSize: p, selectedHashes: m, onToggleSelect: g }) => {
200
- let { t: y } = n(), { ThumbsUpIcon: x } = _(), te = !!(m && m.size > 0), S = v.useRef(null), { positionedItems: C, containerHeight: w, isNearEnd: ne, handleViewportChange: T } = ee({
199
+ }), de = 240, fe = 160, M = 56, pe = ({ items: e, loading: t, isCollectingResults: n = !1, hasMore: r = !1, hasQuery: i, selectedHash: a, onItemClick: o, onInsert: s, onLoadMore: c, colorVars: l, svgTextMap: f, previewSize: p, selectedHashes: m, onToggleSelect: g }) => {
200
+ let { t: y } = u(), { ThumbsUpIcon: x } = _(), te = !!(m && m.size > 0), S = v.useRef(null), { positionedItems: C, containerHeight: w, isNearEnd: ne, handleViewportChange: T } = ee({
201
201
  items: e,
202
202
  getId: (e) => e.hash,
203
203
  getPreviewSrc: () => void 0,
@@ -207,23 +207,23 @@ var A = {
207
207
  estimatedItemHeight: (p ?? 50) + M,
208
208
  gap: 16,
209
209
  prefetchThresholdPx: de
210
- }), re = l(T, [e.length, p ?? 50]);
210
+ }), re = d(T, [e.length, p ?? 50]);
211
211
  v.useEffect(() => {
212
- i || (S.current = null);
213
- }, [i, e.length]), v.useEffect(() => {
214
- if (!t && !r && i && e.length > 0 && ne) {
212
+ r || (S.current = null);
213
+ }, [r, e.length]), v.useEffect(() => {
214
+ if (!t && !n && r && e.length > 0 && ne) {
215
215
  if (S.current === e.length) return;
216
- S.current = e.length, u?.();
216
+ S.current = e.length, c?.();
217
217
  }
218
218
  }, [
219
- i,
220
219
  r,
220
+ n,
221
221
  ne,
222
222
  e.length,
223
223
  t,
224
- u
224
+ c
225
225
  ]);
226
- let k = a ? /* @__PURE__ */ D("div", {
226
+ let k = i ? /* @__PURE__ */ D("div", {
227
227
  className: A.iconsGridEmptyState,
228
228
  children: /* @__PURE__ */ D(h, {})
229
229
  }) : /* @__PURE__ */ D("div", {
@@ -261,7 +261,7 @@ var A = {
261
261
  className: A.iconsGridVirtualCanvas,
262
262
  style: { height: w },
263
263
  children: C.map(({ row: e, layout: t }) => {
264
- let n = e.item, r = !!(m && m.has(n.hash) || o === n.hash), i = f[n.hash];
264
+ let n = e.item, r = !!(m && m.has(n.hash) || a === n.hash), i = f[n.hash];
265
265
  return /* @__PURE__ */ O("div", {
266
266
  style: {
267
267
  position: "absolute",
@@ -271,25 +271,25 @@ var A = {
271
271
  height: t.height
272
272
  },
273
273
  className: `${A.iconsGridItem} ${r ? A.iconsGridItemSelected : ""} ${te ? A.iconsGridShowCheckboxes : ""}`,
274
- onClick: () => s(n),
274
+ onClick: () => o(n),
275
275
  children: [
276
276
  /* @__PURE__ */ D("div", {
277
277
  style: { height: p ?? 50 },
278
278
  className: A.iconsGridItemThumbnail,
279
279
  children: i ? /* @__PURE__ */ D("div", {
280
280
  style: {
281
- color: d?.colorHex,
282
- "--em-icon-grad-1": d?.colorHex ?? "#000",
283
- "--em-icon-grad-2": d?.colorHex2 ?? "#ff007a",
284
- "--em-icon-color-1": d?.colorHex ?? "#000",
285
- "--em-icon-color-2": d?.colorHex2 ?? "#ff007a",
286
- "--em-icon-color-3": d?.colorHex3 ?? "#00C2FF",
287
- "--em-icon-stroke-1": d?.colorHex ?? "#000",
288
- "--em-icon-stroke-2": d?.colorHex2 ?? "#ff007a",
289
- "--em-icon-stroke-3": d?.colorHex3 ?? "#00C2FF",
290
- "--em-icon-fill-1": d?.colorHex ?? "#000",
291
- "--em-icon-fill-2": d?.colorHex2 ?? "#ff007a",
292
- "--em-icon-fill-3": d?.colorHex3 ?? "#00C2FF"
281
+ color: l?.colorHex,
282
+ "--em-icon-grad-1": l?.colorHex ?? "#000",
283
+ "--em-icon-grad-2": l?.colorHex2 ?? "#ff007a",
284
+ "--em-icon-color-1": l?.colorHex ?? "#000",
285
+ "--em-icon-color-2": l?.colorHex2 ?? "#ff007a",
286
+ "--em-icon-color-3": l?.colorHex3 ?? "#00C2FF",
287
+ "--em-icon-stroke-1": l?.colorHex ?? "#000",
288
+ "--em-icon-stroke-2": l?.colorHex2 ?? "#ff007a",
289
+ "--em-icon-stroke-3": l?.colorHex3 ?? "#00C2FF",
290
+ "--em-icon-fill-1": l?.colorHex ?? "#000",
291
+ "--em-icon-fill-2": l?.colorHex2 ?? "#ff007a",
292
+ "--em-icon-fill-3": l?.colorHex3 ?? "#00C2FF"
293
293
  },
294
294
  dangerouslySetInnerHTML: { __html: i },
295
295
  className: A.iconsGridItemSvg
@@ -324,7 +324,7 @@ var A = {
324
324
  ]
325
325
  }, n.hash);
326
326
  })
327
- }), r && /* @__PURE__ */ D("div", {
327
+ }), n && /* @__PURE__ */ D("div", {
328
328
  className: A.iconsGridLoadingMore,
329
329
  children: /* @__PURE__ */ D(E, { indicator: j })
330
330
  })] }), t && e.length === 0 && /* @__PURE__ */ D("div", {
@@ -1759,15 +1759,15 @@ function it(e) {
1759
1759
  e ? "" : `c1=${n?.inlineColors?.colorHex ?? ""}|c2=${n?.inlineColors?.colorHex2 ?? ""}|c3=${n?.inlineColors?.colorHex3 ?? ""}`,
1760
1760
  n?.strokeWidth == null ? "" : `sw=${n.strokeWidth}`,
1761
1761
  `s=${o}`
1762
- ].filter(Boolean).join("|"), c = et.get(s);
1763
- if (c) return c;
1762
+ ].filter(Boolean).join("|"), l = et.get(s);
1763
+ if (l) return l;
1764
1764
  if (n?.signal?.aborted) throw new DOMException("Aborted", "AbortError");
1765
- let l = rt(i, a, o), d = l;
1766
- e ? d = $e(d, { strokeWidth: n?.strokeWidth }) : n?.inlineColors && (d = u(d, n.inlineColors));
1765
+ let u = rt(i, a, o), d = u;
1766
+ e ? d = $e(d, { strokeWidth: n?.strokeWidth }) : n?.inlineColors && (d = c(d, n.inlineColors));
1767
1767
  let f = `data:image/svg+xml;utf8,${encodeURIComponent(d)}`, p = {
1768
1768
  text: d,
1769
1769
  url: f,
1770
- original: l
1770
+ original: u
1771
1771
  };
1772
1772
  return et.set(s, p), p;
1773
1773
  }, [e]),
@@ -1777,28 +1777,28 @@ function it(e) {
1777
1777
  //#endregion
1778
1778
  //#region packages/file-manager/src/components/ImageIcons/useIconsCopyToFolder.tsx
1779
1779
  async function at(e) {
1780
- let { hashes: t, items: n, folderId: i, dataProviders: o, getPngDataUrlForItem: s, dataUrlToBlob: l, config: u } = e, d = 0, f = 0;
1780
+ let { hashes: t, items: n, folderId: r, dataProviders: i, getPngDataUrlForItem: c, dataUrlToBlob: l, config: u } = e, d = 0, f = 0;
1781
1781
  for (let e of t) {
1782
1782
  let t = n.find((t) => t.hash === e);
1783
1783
  if (!t) {
1784
1784
  f += 1;
1785
1785
  continue;
1786
1786
  }
1787
- let p = await s(t);
1787
+ let p = await c(t);
1788
1788
  if (!p) {
1789
1789
  f += 1;
1790
1790
  continue;
1791
1791
  }
1792
- let m = await r(o, a(`${t.name?.trim() || `icon-${e}`}.png`, u), i, !1, c(u)), h = l(p, "image/png"), g = new File([h], m, {
1792
+ let m = await a(i, o(`${t.name?.trim() || `icon-${e}`}.png`, u), r, !1, s(u)), h = l(p, "image/png"), g = new File([h], m, {
1793
1793
  type: "image/png",
1794
1794
  lastModified: Date.now()
1795
1795
  });
1796
1796
  try {
1797
- await o.uploadFile({
1797
+ await i.uploadFile({
1798
1798
  name: m,
1799
1799
  size: g.size,
1800
1800
  type: g.type,
1801
- folderId: i,
1801
+ folderId: r,
1802
1802
  data: g,
1803
1803
  extension: "png"
1804
1804
  }), d += 1;
@@ -1811,14 +1811,14 @@ async function at(e) {
1811
1811
  failCount: f
1812
1812
  };
1813
1813
  }
1814
- var ot = ({ items: t, selectedHashes: r, getPngDataUrlForItem: a, dataUrlToBlob: o, clearSelection: c }) => {
1815
- let { t: l } = n(), { options: u, state: d } = e(), f = i(), [p, h] = v.useState(!1), [g] = S.useForm(), [ee, y] = v.useState(!1), b = v.useRef(!1), { state: x, actions: { fetchFolders: te, fetchChildFolders: C, handleModalOk: w } } = s(), { EmptyFolderIcon: ne } = _(), { activeFormField: T, setActiveFormField: E, generateMenuItemsFromFolders: re } = m({
1814
+ var ot = ({ items: e, selectedHashes: n, getPngDataUrlForItem: i, dataUrlToBlob: a, clearSelection: o }) => {
1815
+ let { t: s } = u(), { options: c, state: d } = t(), f = r(), [p, h] = v.useState(!1), [g] = S.useForm(), [ee, y] = v.useState(!1), b = v.useRef(!1), { state: x, actions: { fetchFolders: te, fetchChildFolders: C, handleModalOk: w } } = l(), { EmptyFolderIcon: ne } = _(), { activeFormField: T, setActiveFormField: E, generateMenuItemsFromFolders: re } = m({
1816
1816
  folders: Array.isArray(x.folders) ? x.folders : [],
1817
1817
  selectedFolder: d.selectedFolder,
1818
1818
  EmptyFolderIcon: ne,
1819
1819
  handleCreateFolderModalOk: w,
1820
1820
  setIsLoading: y,
1821
- t: l
1821
+ t: s
1822
1822
  }), ie = v.useCallback(async () => {
1823
1823
  await te(), h(!0);
1824
1824
  }, [te]), D = v.useCallback(async (e) => {
@@ -1827,27 +1827,27 @@ var ot = ({ items: t, selectedHashes: r, getPngDataUrlForItem: a, dataUrlToBlob:
1827
1827
  T,
1828
1828
  g,
1829
1829
  E
1830
- ]), O = v.useCallback(async (e) => {
1830
+ ]), O = v.useCallback(async (t) => {
1831
1831
  try {
1832
- let { dataProviders: n } = u;
1833
- if (!n || !n.uploadFile && !n.uploadFiles) {
1832
+ let { dataProviders: r } = c;
1833
+ if (!r || !r.uploadFile && !r.uploadFiles) {
1834
1834
  f.error({
1835
1835
  id: "FILES_UPLOAD_PROVIDER_NOT_CONFIGURED",
1836
- message: l("API-endpoint for file upload is not configured"),
1836
+ message: s("API-endpoint for file upload is not configured"),
1837
1837
  placement: "bottomRight"
1838
1838
  });
1839
1839
  return;
1840
1840
  }
1841
- let i = e || d?.selectedFolder || void 0, s = Array.from(r);
1842
- if (s.length === 0) return;
1841
+ let l = t || d?.selectedFolder || void 0, u = Array.from(n);
1842
+ if (u.length === 0) return;
1843
1843
  let { successCount: p, failCount: m } = await at({
1844
- hashes: s,
1845
- items: t,
1846
- folderId: i,
1844
+ hashes: u,
1845
+ items: e,
1846
+ folderId: l,
1847
1847
  dataProviders: {
1848
- uploadFile: n.uploadFile ?? (async (e) => {
1849
- if (!n.uploadFiles) throw Error("Upload is not supported by data provider");
1850
- let t = await n.uploadFiles({
1848
+ uploadFile: r.uploadFile ?? (async (e) => {
1849
+ if (!r.uploadFiles) throw Error("Upload is not supported by data provider");
1850
+ let t = await r.uploadFiles({
1851
1851
  folderId: e.folderId,
1852
1852
  items: [{
1853
1853
  name: e.name,
@@ -1857,65 +1857,65 @@ var ot = ({ items: t, selectedHashes: r, getPngDataUrlForItem: a, dataUrlToBlob:
1857
1857
  data: e.data,
1858
1858
  extension: e.extension
1859
1859
  }]
1860
- }), r = t?.detailed?.[0];
1861
- if (!t || !t.success || !r || r.success === !1) {
1862
- let e = r?.error?.message || t?.error?.message || "Upload failed";
1860
+ }), n = t?.detailed?.[0];
1861
+ if (!t || !t.success || !n || n.success === !1) {
1862
+ let e = n?.error?.message || t?.error?.message || "Upload failed";
1863
1863
  throw Error(e);
1864
1864
  }
1865
- return r.data;
1865
+ return n.data;
1866
1866
  }),
1867
- getFiles: n.getFiles,
1868
- getFolders: n.getFolders
1867
+ getFiles: r.getFiles,
1868
+ getFolders: r.getFolders
1869
1869
  },
1870
- getPngDataUrlForItem: a,
1871
- dataUrlToBlob: o,
1872
- config: u?.config
1870
+ getPngDataUrlForItem: i,
1871
+ dataUrlToBlob: a,
1872
+ config: c?.config
1873
1873
  });
1874
1874
  p > 0 && f.success({
1875
1875
  id: "FILES_COPY_SUCCESS",
1876
- message: l("Files copied"),
1876
+ message: s("Files copied"),
1877
1877
  placement: "bottomRight",
1878
1878
  data: {
1879
1879
  successCount: p,
1880
- totalCount: s.length,
1881
- itemIds: s,
1882
- folderId: i ?? null
1880
+ totalCount: u.length,
1881
+ itemIds: u,
1882
+ folderId: l ?? null
1883
1883
  }
1884
1884
  }), m > 0 && f.error({
1885
1885
  id: "FILES_COPY_ERROR",
1886
- message: l("При копировании произошли ошибки"),
1886
+ message: s("При копировании произошли ошибки"),
1887
1887
  placement: "bottomRight",
1888
1888
  data: {
1889
1889
  failCount: m,
1890
- totalCount: s.length,
1891
- itemIds: s,
1892
- folderId: i ?? null
1890
+ totalCount: u.length,
1891
+ itemIds: u,
1892
+ folderId: l ?? null
1893
1893
  }
1894
- }), c();
1894
+ }), o();
1895
1895
  } catch (e) {
1896
1896
  console.error(e), f.error({
1897
1897
  id: "FILES_COPY_ERROR",
1898
- message: l("При копировании произошли ошибки"),
1898
+ message: s("При копировании произошли ошибки"),
1899
1899
  placement: "bottomRight",
1900
1900
  innerException: e,
1901
1901
  data: {
1902
- failCount: Array.from(r).length || 0,
1903
- totalCount: Array.from(r).length || 0,
1904
- itemIds: Array.from(r),
1902
+ failCount: Array.from(n).length || 0,
1903
+ totalCount: Array.from(n).length || 0,
1904
+ itemIds: Array.from(n),
1905
1905
  folderId: d?.selectedFolder ?? null
1906
1906
  }
1907
1907
  });
1908
1908
  }
1909
1909
  }, [
1910
- c,
1911
1910
  o,
1912
1911
  a,
1913
- t,
1912
+ i,
1913
+ e,
1914
1914
  f,
1915
- u,
1916
- r,
1915
+ c,
1916
+ n,
1917
1917
  d?.selectedFolder,
1918
- l
1918
+ s
1919
1919
  ]);
1920
1920
  return {
1921
1921
  isCopyIconsModalVisible: p,
@@ -1942,14 +1942,14 @@ var ot = ({ items: t, selectedHashes: r, getPngDataUrlForItem: a, dataUrlToBlob:
1942
1942
  handleCreateFolderAndCopy: v.useCallback(() => {
1943
1943
  let e = d.selectedFolder ?? "folders";
1944
1944
  E(e), g.setFieldsValue({
1945
- folderName: l("New folder"),
1945
+ folderName: s("New folder"),
1946
1946
  targetFolder: e
1947
1947
  });
1948
1948
  }, [
1949
1949
  g,
1950
1950
  d.selectedFolder,
1951
1951
  E,
1952
- l
1952
+ s
1953
1953
  ]),
1954
1954
  fetchChildFolders: C,
1955
1955
  generateMenuItemsFromFolders: re
@@ -1966,8 +1966,8 @@ async function ut(e, t, n) {
1966
1966
  };
1967
1967
  return await Promise.all(Array.from({ length: a }, () => o())), r;
1968
1968
  }
1969
- var dt = ({ customRequest: r, query: i, setQuery: a, inputRef: s }) => {
1970
- let { t: c } = n(), l = t(), [m, h] = v.useState(""), _ = i === void 0 ? m : i, ee = a === void 0 ? h : a, [b, x] = v.useState(""), [w, k] = v.useState([]), [ce, j] = v.useState(0), [de, fe] = v.useState(!1), [M, me] = v.useState(!1), [he, N] = v.useState(!1), [P, _e] = v.useState(null), [F, I] = v.useState({}), [L, ve] = v.useState({}), [R, ye] = v.useState("#000000"), [z, be] = v.useState("#ff007a"), [B, xe] = v.useState("#00C2FF"), [V, Se] = v.useState(1), [H, Ce] = v.useState(50), [we, Te] = v.useState(!1), { options: U } = e(), W = v.useRef(!1), G = v.useRef(null), Ee = v.useRef(0), De = v.useRef(null), Oe = v.useRef(null), K = v.useRef(void 0);
1969
+ var dt = ({ customRequest: r, query: a, setQuery: o, inputRef: s }) => {
1970
+ let { t: l } = u(), d = n(), [m, h] = v.useState(""), _ = a === void 0 ? m : a, ee = o === void 0 ? h : o, [b, x] = v.useState(""), [w, k] = v.useState([]), [ce, j] = v.useState(0), [de, fe] = v.useState(!1), [M, me] = v.useState(!1), [he, N] = v.useState(!1), [P, _e] = v.useState(null), [F, I] = v.useState({}), [L, ve] = v.useState({}), [R, ye] = v.useState("#000000"), [z, be] = v.useState("#ff007a"), [B, xe] = v.useState("#00C2FF"), [V, Se] = v.useState(1), [H, Ce] = v.useState(50), [we, Te] = v.useState(!1), { options: U } = t(), W = v.useRef(!1), G = v.useRef(null), Ee = v.useRef(0), De = v.useRef(null), Oe = v.useRef(null), K = v.useRef(void 0);
1971
1971
  K.current = ge(U?.config);
1972
1972
  let ke = v.useRef(U?.config?.locale);
1973
1973
  ke.current = U?.config?.locale;
@@ -1980,16 +1980,16 @@ var dt = ({ customRequest: r, query: i, setQuery: a, inputRef: s }) => {
1980
1980
  L,
1981
1981
  F
1982
1982
  ]), ze = !!J?.hasGradient, Y = v.useMemo(() => {
1983
- let e = d("icon-color-2", "i");
1984
- return w.some((t) => {
1985
- let n = F[t.hash];
1986
- return !!n && e.test(n);
1983
+ let t = e("icon-color-2", "i");
1984
+ return w.some((e) => {
1985
+ let n = F[e.hash];
1986
+ return !!n && t.test(n);
1987
1987
  });
1988
1988
  }, [w, F]), X = v.useMemo(() => {
1989
- let e = d("icon-color-3", "i");
1990
- return w.some((t) => {
1991
- let n = F[t.hash];
1992
- return !!n && e.test(n);
1989
+ let t = e("icon-color-3", "i");
1990
+ return w.some((e) => {
1991
+ let n = F[e.hash];
1992
+ return !!n && t.test(n);
1993
1993
  });
1994
1994
  }, [w, F]), Z = v.useMemo(() => J ? ze || J.colors.length >= 2 && Y : !1, [
1995
1995
  J,
@@ -2027,7 +2027,7 @@ var dt = ({ customRequest: r, query: i, setQuery: a, inputRef: s }) => {
2027
2027
  fe(r + t.length < n.length), j(r + t.length);
2028
2028
  } catch (e) {
2029
2029
  if (e?.name === "AbortError") return;
2030
- console.error(e), l.error(c("Request error"));
2030
+ console.error(e), d.error(l("Request error"));
2031
2031
  } finally {
2032
2032
  W.current && (e.initial ? me(!1) : N(!1)), Ne.current.delete(a);
2033
2033
  }
@@ -2037,7 +2037,7 @@ var dt = ({ customRequest: r, query: i, setQuery: a, inputRef: s }) => {
2037
2037
  he,
2038
2038
  M,
2039
2039
  ce,
2040
- c
2040
+ l
2041
2041
  ]);
2042
2042
  v.useEffect(() => {
2043
2043
  Oe.current = Ke;
@@ -2167,7 +2167,7 @@ var dt = ({ customRequest: r, query: i, setQuery: a, inputRef: s }) => {
2167
2167
  w,
2168
2168
  L
2169
2169
  ]);
2170
- let $e = v.useCallback((e) => u(e, {
2170
+ let $e = v.useCallback((e) => c(e, {
2171
2171
  colorHex: R,
2172
2172
  colorHex2: z,
2173
2173
  colorHex3: B
@@ -2212,8 +2212,8 @@ var dt = ({ customRequest: r, query: i, setQuery: a, inputRef: s }) => {
2212
2212
  signal: t,
2213
2213
  inlineColors: void 0
2214
2214
  })).text;
2215
- let r = $e(n), i = f(r, H);
2216
- return o(r, i.width, i.height);
2215
+ let r = $e(n), a = f(r, H);
2216
+ return i(r, a.width, a.height);
2217
2217
  } catch {
2218
2218
  return null;
2219
2219
  }
@@ -2238,14 +2238,14 @@ var dt = ({ customRequest: r, query: i, setQuery: a, inputRef: s }) => {
2238
2238
  if (!W.current || !n) return;
2239
2239
  await Promise.resolve(r(n));
2240
2240
  } catch (e) {
2241
- console.error("IconsTab: insert error", e), l.error(c("Request error"));
2241
+ console.error("IconsTab: insert error", e), d.error(l("Request error"));
2242
2242
  } finally {
2243
2243
  W.current && Te(!1);
2244
2244
  }
2245
2245
  }, [
2246
2246
  r,
2247
2247
  at,
2248
- c
2248
+ l
2249
2249
  ]), { isCopyIconsModalVisible: ft, isCopyLoading: $, copyForm: pt, openCopyModal: mt, closeCopyModal: ht, resetAfterClose: gt, handleCopyTreeSelect: _t, handleIconsCopyOk: vt, fetchChildFolders: yt, generateMenuItemsFromFolders: bt, handleCreateFolderAndCopy: xt } = ot({
2250
2250
  items: w,
2251
2251
  selectedHashes: q,
@@ -2265,17 +2265,17 @@ var dt = ({ customRequest: r, query: i, setQuery: a, inputRef: s }) => {
2265
2265
  children: [
2266
2266
  q.size,
2267
2267
  " ",
2268
- c("selected")
2268
+ l("selected")
2269
2269
  ]
2270
2270
  }), /* @__PURE__ */ D(y, {
2271
2271
  icon: /* @__PURE__ */ D(se, { size: 16 }),
2272
2272
  onClick: tt,
2273
- children: c("Deselected")
2273
+ children: l("Deselected")
2274
2274
  })]
2275
2275
  }), /* @__PURE__ */ D(T, { children: /* @__PURE__ */ D(y, {
2276
2276
  icon: /* @__PURE__ */ D(ae, { size: 16 }),
2277
2277
  onClick: mt,
2278
- children: c("Copy to folder")
2278
+ children: l("Copy to folder")
2279
2279
  }) })]
2280
2280
  }) : /* @__PURE__ */ D(le, {
2281
2281
  query: _,
@@ -2330,7 +2330,7 @@ var dt = ({ customRequest: r, query: i, setQuery: a, inputRef: s }) => {
2330
2330
  style: { height: 40 },
2331
2331
  loading: we,
2332
2332
  onClick: () => dt(nt),
2333
- children: c("Choose")
2333
+ children: l("Choose")
2334
2334
  }) })
2335
2335
  })]
2336
2336
  }) : null
@@ -2338,7 +2338,7 @@ var dt = ({ customRequest: r, query: i, setQuery: a, inputRef: s }) => {
2338
2338
  }), /* @__PURE__ */ D(ne, {
2339
2339
  title: /* @__PURE__ */ D("div", {
2340
2340
  className: "modal-title",
2341
- children: c("Copy to folder")
2341
+ children: l("Copy to folder")
2342
2342
  }),
2343
2343
  open: ft,
2344
2344
  onCancel: () => {
@@ -2358,7 +2358,7 @@ var dt = ({ customRequest: r, query: i, setQuery: a, inputRef: s }) => {
2358
2358
  children: [/* @__PURE__ */ D(oe, {
2359
2359
  size: 18,
2360
2360
  strokeWidth: U.config?.iconStrokeWidth
2361
- }), c("Create folder")]
2361
+ }), l("Create folder")]
2362
2362
  }), /* @__PURE__ */ D(y, {
2363
2363
  type: "primary",
2364
2364
  className: g.folderButton,
@@ -2366,7 +2366,7 @@ var dt = ({ customRequest: r, query: i, setQuery: a, inputRef: s }) => {
2366
2366
  ht();
2367
2367
  },
2368
2368
  loading: $,
2369
- children: c("Done")
2369
+ children: l("Done")
2370
2370
  })]
2371
2371
  }),
2372
2372
  afterClose: () => gt(),
@@ -2380,7 +2380,7 @@ var dt = ({ customRequest: r, query: i, setQuery: a, inputRef: s }) => {
2380
2380
  layout: "vertical",
2381
2381
  initialValues: {
2382
2382
  targetFolder: "folders",
2383
- folderName: c("New folder"),
2383
+ folderName: l("New folder"),
2384
2384
  is_force_create: !1
2385
2385
  },
2386
2386
  children: /* @__PURE__ */ O("div", {
@@ -2390,7 +2390,7 @@ var dt = ({ customRequest: r, query: i, setQuery: a, inputRef: s }) => {
2390
2390
  name: "targetFolder",
2391
2391
  rules: [{
2392
2392
  required: !0,
2393
- message: c("Select the destination folder")
2393
+ message: l("Select the destination folder")
2394
2394
  }],
2395
2395
  className: g.formItem,
2396
2396
  children: /* @__PURE__ */ D(p, {
@@ -2399,7 +2399,7 @@ var dt = ({ customRequest: r, query: i, setQuery: a, inputRef: s }) => {
2399
2399
  targetForm: pt,
2400
2400
  onTreeSelect: _t,
2401
2401
  onComplete: vt,
2402
- actionButtonText: c("Copy here")
2402
+ actionButtonText: l("Copy here")
2403
2403
  }),
2404
2404
  fetchChildFolders: yt,
2405
2405
  disabledFolders: [],
@@ -2413,7 +2413,7 @@ var dt = ({ customRequest: r, query: i, setQuery: a, inputRef: s }) => {
2413
2413
  style: { display: "none" },
2414
2414
  rules: [{
2415
2415
  required: !0,
2416
- validator: (e, t) => typeof t == "string" && t.trim().length === 0 ? Promise.reject(Error(c("Enter the name of the folder"))) : Promise.resolve()
2416
+ validator: (e, t) => typeof t == "string" && t.trim().length === 0 ? Promise.reject(Error(l("Enter the name of the folder"))) : Promise.resolve()
2417
2417
  }],
2418
2418
  children: /* @__PURE__ */ D(C, {})
2419
2419
  }),
@@ -2431,4 +2431,4 @@ var dt = ({ customRequest: r, query: i, setQuery: a, inputRef: s }) => {
2431
2431
  //#endregion
2432
2432
  export { dt as IconsTab, dt as default };
2433
2433
 
2434
- //# sourceMappingURL=file-manager-IconsTab-pUKiId5k.js.map
2434
+ //# sourceMappingURL=file-manager-IconsTab-DUvutF2N.js.map