@emailmaker/emailmaker 1.1.71 → 1.1.72

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,24 +1,24 @@
1
1
  (function(){try{if(typeof document<"u"){var o=document.createElement("style");o.setAttribute("data-emailmaker","true"),o.appendChild(document.createTextNode(".blocks-app .image-preview{text-align:center;min-height:100px;position:relative}.blocks-app .image-preview .image-editor-modal{border:1px solid red}.blocks-app .image-preview__edit-button{position:absolute;bottom:10px;left:50%;transform:translate(-50%)}.blocks-app .image-preview img{border:1px solid var(--em-colorBorder);border-radius:6px;max-width:100%;max-height:500px}.blocks-app .image-editor-modal .ant-modal-container{flex-direction:column;min-height:100vh;display:flex;border-radius:0!important}.blocks-app .image-editor-modal .ant-modal-body{flex-grow:1;display:flex}.blocks-app .image-editor-modal .ant-modal-body #pixie-editor{flex-grow:1;height:calc(100vh - 70px);min-height:calc(100vh - 70px);overflow:hidden}.blocks-app .image-editor-modal .pi .text-on-primary{background:var(--em-colorPrimary);border-color:var(--em-colorPrimary)}.blocks-app .image-editor-modal .pi .text-on-primary:hover{background:var(--em-colorPrimaryHover);border-color:var(--em-colorPrimaryHover)}.blocks-app .image-editor-modal .pi .text-on-primary.rounded-full{border-radius:calc(var(--em-borderRadius) * 1px)}.blocks-app .image-editor-modal .pi .shadow-xl{box-shadow:none}.blocks-app .image-editor-modal .w-\\[4ch\\].text-sm.text-center{width:5ch}.blocks-app .image-editor-modal .pi .border-white{border-color:var(--em-colorPrimary)}.blocks-app .image-editor-modal .pi .bg-white\\/50{background-color:var(--em-colorPrimary)}.blocks-app .image-editor-modal .pi .text-on-primary{color:var(--em-colorWhite)}.blocks-app .serach-results .ant-row{align-items:center}.blocks-app .serach-results .blocks-search__divider-wrapper{margin-top:12px;position:relative}.blocks-app .serach-results .blocks-search__divider-wrapper .ant-divider-horizontal{border-top:1px solid var(--em-colorBorderSecondary);background:0 0;width:100%;height:1px;min-height:0;margin:0;position:static}.blocks-app .slideshow-container{width:524px;height:350px;margin:auto;position:relative;overflow:hidden}.blocks-app .slideshow-image{opacity:0;width:100%;height:100%;position:absolute;top:0;left:0}.blocks-app .image-ai .slideshow-image{width:auto;height:auto}.blocks-app .image-ai__image-item{text-align:center;border-radius:6px;justify-content:center;align-items:center;min-height:100px;display:flex;position:relative}.blocks-app .image-ai__image-item .buttons{justify-content:space-between;display:flex;position:absolute;bottom:10px;left:50%;transform:translate(-50%)}.blocks-app .image-ai .text-area-input-hybrid{border:none;outline:none;min-height:0;padding:0 0 0 1px}.blocks-app .image-ai .text-area-input-hybrid textarea{height:32px;min-height:32px;padding:3px 11px;line-height:26px}.blocks-app .image-ai__loading{justify-content:center;align-items:center;min-height:150px;display:flex}.blocks-app .image-ai__loading .spin{flex-direction:column;justify-content:center;align-items:center;height:150px;display:flex}.blocks-app .image-ai__loading .status{margin:3px 0 0}.blocks-app .image-ai__preview{border-radius:6px;margin-top:24px;overflow:hidden}.blocks-app .image-ai__preview .image-ai__image-item img{border-radius:calc(var(--em-borderRadius) * 1px);object-fit:contain;max-height:100%;transition:height 1s;top:50%;left:50%;overflow:hidden;transform:translate(-50%,-50%)}.blocks-app .image-ai .small{width:302px;height:202px}.blocks-app .image-ai .large{width:524px;height:350px}.blocks-app .image-ai .image-ai__row{padding:0 2px}.blocks-app .image-ai .image-ai__input-affix-wrapper{border-style:solid;border-width:calc(var(--em-borderWidth) * 1px);border-color:var(--em-colorFillSecondaryDarken);border-radius:calc(var(--em-borderRadius) * 1px);width:100%;padding-left:0;display:inline-flex}.blocks-app .image-ai .image-ai__input-affix-wrapper:hover{border-color:var(--em-borderColorHover)}.blocks-app .image-ai .image-ai__input-affix-wrapper.ant-input-affix-wrapper-focused{border-color:var(--em-colorPrimaryBorder)}.blocks-app .image-ai .image-ai__textarea{font-size:16px}.blocks-app .image-ai .image-ai__input-icon{font-size:16px;top:0;right:0}.dark .blocks-app .image-ai .image-ai__preview .image-ai__image-item img{background:#2b2b2b;border:1px solid #434343}.dark .blocks-app .image-ai .ant-btn{background:#1f1f1f}.dark .blocks-app .image-ai .ant-btn:hover{color:var(--em-colorPrimary)}.blocks-app .stock-tab img{border-radius:0;max-width:none;max-height:none}.blocks-app .stock-tab .stock-search-input{padding:0 2px}.blocks-app .stock-tab .my-masonry-grid{text-align:center;width:auto;display:flex}.blocks-app .stock-tab .my-masonry-grid_column{background-clip:padding-box}.blocks-app .stock-tab .list-item{cursor:pointer;background:#f0f2f5;border:1px solid #f0f2f5;border-radius:6px;min-height:100px;max-height:100px;margin-bottom:20px;transition:all .3s;display:inline-block;position:relative;overflow:hidden}.blocks-app .stock-tab .list-item .overlay-image{opacity:0;background-size:cover;width:110px;height:40px;transition:opacity .5s;position:absolute;bottom:10px;right:10px}.blocks-app .stock-tab .list-item .ant-spin{color:#f0f2f5;font-size:20px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.blocks-app .stock-tab .list-item img{object-fit:cover;opacity:0;border-radius:6px;height:auto;transition:opacity .5s ease-in-out;display:block}.blocks-app .stock-tab .list-item.loaded{border:1px solid #d9d9d9;max-height:1000px}.blocks-app .stock-tab .list-item.loaded img{opacity:1;height:100%}.blocks-app .stock-tab .list-item.loaded .loaded-image{opacity:.5}.blocks-app .stock-tab .list-item:hover{box-shadow:0 1px 2px -2px #00000029,0 3px 6px #0000001f,0 5px 12px 4px #00000017}.blocks-app .stock-tab .list-item:hover p.creator-info,.blocks-app .stock-tab .list-item:hover .overlay-image{opacity:1}.blocks-app .stock-tab .list-item p.creator-info{color:#fff;opacity:0;background-color:#00000080;border-radius:0 0 6px;margin:0;padding:5px;font-size:10px;line-height:1.2;position:absolute;bottom:0;right:0}.blocks-app .stock-tab .list-item p.creator-info:hover a{color:#fff;text-decoration:underline}.blocks-app .stock-tab .list-item p.creator-info a{color:#fff;text-decoration:none}.blocks-app .stock-color-filter{display:flex}.blocks-app .stock-color-filter label{border-width:1px;width:24px;height:24px;margin:4px;padding:0;font-size:0;border-radius:6px!important}.blocks-app .stock-color-filter label.all-colors{background-image:linear-gradient(135deg,red,#ff7f00,#ff0,#0f0,#00f,#8b00ff)}.blocks-app .stock-color-filter label.black-color{background:#222}.blocks-app .stock-color-filter label.bw-color{background-image:linear-gradient(135deg,#222 50%,#fff 50%)}.blocks-app .stock-color-filter label.white-color{background:#fff}.blocks-app .stock-color-filter label.orange-color{background:#fa8c16}.blocks-app .stock-color-filter label.red-color{background:#f5222d}.blocks-app .stock-color-filter label.purple-color{background:#722ed1}.blocks-app .stock-color-filter label.magenta-color{background:#eb2f96}.blocks-app .stock-color-filter label.green-color{background:#52c41a}.blocks-app .stock-color-filter label.teal-color{background:#43c3c3}.blocks-app .stock-color-filter label.blue-color{background:#1677ff}.blocks-app .stock-color-filter .ant-radio-button-wrapper:not(:first-child):before{display:none}.blocks-app .serach-results{padding-top:6px}.blocks-app .serach-results .stock-search-input{width:322px;padding:0 2px}.blocks-app .serach-results .blocks-search__divider-wrapper{width:calc(100% + 48px);margin-top:12px;margin-left:-24px;margin-right:-24px;position:relative}.blocks-app .serach-results .blocks-search__divider-wrapper .ant-divider-horizontal{pointer-events:none;border-top:1px solid var(--em-colorBorderSecondary);background:linear-gradient(180deg, var(--em-colorBgContainerDisabled), transparent 40%);border-bottom:none;width:100%;height:20px;min-height:20px;margin:0;position:relative;bottom:auto;left:auto;right:auto}.dark .blocks-app .image-center .stock-tab .serach-results .blocks-search__divider-wrapper .ant-divider-horizontal{background:linear-gradient(180deg, var(--em-colorBgBase), transparent 40%)}.dark .blocks-app .stock-tab .list-item{background:#2b2b2b;border:1px solid #2b2b2b}.dark .blocks-app .stock-tab .list-item.loaded{border:1px solid #434343}.blocks-app .image-center .image-center-image-preview{justify-content:center;align-items:center;display:flex}.blocks-app .image-center .ant-divider-horizontal{pointer-events:none;z-index:1;background:linear-gradient(180deg, var(--em-colorBgContainerDisabled), transparent 40%);width:calc(100% + 48px);height:20px;margin:24px -24px 0;position:absolute;bottom:-19px}.dark .blocks-app .image-center .ant-divider-horizontal{background:linear-gradient(180deg, var(--em-colorBgBase), transparent 40%)}.blocks-app .image-center .ant-divider-horizontal.ant-divider-with-text{background:0 0;width:calc(100% + 38px);margin:0 -24px 20px;position:relative;top:0}.blocks-app .image-center img{border-radius:4px;max-width:524px;max-height:352px}.blocks-app .image-center .image-size{justify-content:center;margin-top:6px;font-size:14px;line-height:22px;display:flex}.blocks-app .image-center .ant-upload.ant-upload-drag{border-radius:6px}.blocks-app .image-center .ant-modal-body .stock-search-input{margin-bottom:0}.blocks-app .image-center .ant-modal-body .serach-results .stock-search-input{margin-bottom:10px}.blocks-app .image-center .ant-modal-body .ant-form:not(.serach-results) .ant-form-item:last-child{margin-bottom:0}.blocks-app .image-center .ant-modal-body .ant-tabs{transition:all .7s cubic-bezier(.075,.82,.165,1)}.blocks-app .image-center .ant-modal-body .ant-tabs .ant-tabs-content-holder{overflow-y:clip}.blocks-app .ant-modal{transition:width .7s ease-in-out}")),document.head.appendChild(o)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- __emailmaker__.define("static/core/13d868f1.js", [
2
+ __emailmaker__.define("static/core/e84eccff.js", [
3
3
  "require",
4
4
  "exports",
5
5
  "module",
6
6
  "static/core/7df48ae1.js",
7
- "static/core/d2975cfe.js",
8
- "static/core/95c1e180.js",
9
- "static/core/319cf5c8.js",
10
- "static/core/e700a71a2.js",
11
- "static/core/4a3fcabb2.js",
7
+ "static/core/5da8610f.js",
8
+ "static/core/84e7cbac.js",
9
+ "static/core/8815169a.js",
10
+ "static/core/98529d8d2.js",
11
+ "static/core/ec8d567d2.js",
12
12
  "static/core/4c113afa.js",
13
13
  "static/core/fc878f95.js",
14
14
  "react",
15
15
  "react/jsx-runtime"
16
- ], function(ce, ht, dr) {
17
- const Ze = ce("./7df48ae1.js"), u = ce("./d2975cfe.js"), Z = ce("./95c1e180.js"), re = ce("./319cf5c8.js"), p = ce("./e700a71a2.js"), N = ce("./4a3fcabb2.js"), yt = ce("./4c113afa.js"), Xe = ce("./fc878f95.js");
18
- let r = ce("react");
19
- r = Ze.__toESM(r);
20
- let n = ce("react/jsx-runtime");
21
- var vt = Ze.__toESM(re.require_prop_types());
16
+ ], function(ce, ht, fn) {
17
+ const Ze = ce("./7df48ae1.js"), u = ce("./5da8610f.js"), Z = ce("./84e7cbac.js"), ne = ce("./8815169a.js"), p = ce("./98529d8d2.js"), N = ce("./ec8d567d2.js"), yt = ce("./4c113afa.js"), Xe = ce("./fc878f95.js");
18
+ let n = ce("react");
19
+ n = Ze.__toESM(n);
20
+ let r = ce("react/jsx-runtime");
21
+ var vt = Ze.__toESM(ne.require_prop_types());
22
22
  function Ct(t, e) {
23
23
  return { [t]: {
24
24
  Filter: e("Filter"),
@@ -106,13 +106,13 @@ __emailmaker__.define("static/core/13d868f1.js", [
106
106
  } };
107
107
  }
108
108
  function Je(t, e = "application/octet-stream") {
109
- let s = t.trim(), o = e?.trim() || "application/octet-stream";
110
- const i = s.indexOf(",");
111
- if (s.startsWith("data:") && i >= 0) {
112
- const f = s.slice(5, i).split(";")[0]?.trim();
113
- f && (o = f), s = s.slice(i + 1);
109
+ let a = t.trim(), o = e?.trim() || "application/octet-stream";
110
+ const i = a.indexOf(",");
111
+ if (a.startsWith("data:") && i >= 0) {
112
+ const f = a.slice(5, i).split(";")[0]?.trim();
113
+ f && (o = f), a = a.slice(i + 1);
114
114
  }
115
- const l = s.replace(/\s/g, ""), d = atob(l), g = new Uint8Array(d.length);
115
+ const l = a.replace(/\s/g, ""), d = atob(l), g = new Uint8Array(d.length);
116
116
  for (let f = 0; f < d.length; f++) g[f] = d.charCodeAt(f);
117
117
  return new Blob([g], { type: o });
118
118
  }
@@ -234,73 +234,73 @@ __emailmaker__.define("static/core/13d868f1.js", [
234
234
  }
235
235
  ]
236
236
  } };
237
- function At(t, e, s, o) {
237
+ function At(t, e, a, o) {
238
238
  if (e.type === "linear") {
239
- const i = t.createLinearGradient(s + e.coords.x1, o + e.coords.y1, s + e.coords.x2, o + e.coords.y2);
239
+ const i = t.createLinearGradient(a + e.coords.x1, o + e.coords.y1, a + e.coords.x2, o + e.coords.y2);
240
240
  return e.colorStops.forEach((l) => i.addColorStop(l.offset, l.color)), i;
241
241
  }
242
242
  if (e.type === "radial") {
243
- const i = t.createRadialGradient(s + e.coords.x1, o + e.coords.y1, e.coords.r1 ?? 0, s + e.coords.x2, o + e.coords.y2, e.coords.r2 ?? 0);
243
+ const i = t.createRadialGradient(a + e.coords.x1, o + e.coords.y1, e.coords.r1 ?? 0, a + e.coords.x2, o + e.coords.y2, e.coords.r2 ?? 0);
244
244
  return e.colorStops.forEach((l) => i.addColorStop(l.offset, l.color)), i;
245
245
  }
246
246
  throw new Error("Unknown gradient type");
247
247
  }
248
248
  function xt(t) {
249
249
  if (!this.backgroundColor) return;
250
- const e = this._getNonTransformedDimensions(), s = -e.x / 2, o = -e.y / 2, i = e.x, l = e.y, d = this.backgroundColor;
251
- if (typeof d == "string" || d instanceof CanvasGradient || d instanceof CanvasPattern) t.fillStyle = d, t.fillRect(s, o, i, l);
252
- else if (typeof d == "object" && "type" in d && (d.type === "linear" || d.type === "radial")) t.fillStyle = At(t, d, s, o), t.fillRect(s, o, i, l);
250
+ const e = this._getNonTransformedDimensions(), a = -e.x / 2, o = -e.y / 2, i = e.x, l = e.y, d = this.backgroundColor;
251
+ if (typeof d == "string" || d instanceof CanvasGradient || d instanceof CanvasPattern) t.fillStyle = d, t.fillRect(a, o, i, l);
252
+ else if (typeof d == "object" && "type" in d && (d.type === "linear" || d.type === "radial")) t.fillStyle = At(t, d, a, o), t.fillRect(a, o, i, l);
253
253
  else if ("source" in d && (d.source instanceof HTMLImageElement || d.source instanceof HTMLCanvasElement)) if (d.repeat) {
254
254
  const g = t.createPattern(d.source, d.repeat);
255
- g && (t.fillStyle = g, t.fillRect(s, o, i, l));
256
- } else t.drawImage(d.source, s, o, i, l);
255
+ g && (t.fillStyle = g, t.fillRect(a, o, i, l));
256
+ } else t.drawImage(d.source, a, o, i, l);
257
257
  this._removeShadow(t);
258
258
  }
259
259
  function It(t) {
260
260
  t?.fabric && t.fabric.on("object:added", (e) => {
261
- const s = e.target;
262
- s && s.name === "text" && (s._renderBackground = xt);
261
+ const a = e.target;
262
+ a && a.name === "text" && (a._renderBackground = xt);
263
263
  });
264
264
  }
265
265
  function St(t, e) {
266
266
  if (t === "json") return new Blob([e], { type: "application/json" });
267
267
  if (t === "svg") return new Blob([e], { type: "image/svg+xml" });
268
- const s = `image/${t}`;
269
- return Je(e.replace(/data:image\/([a-z]*)?;base64,/, ""), s);
268
+ const a = `image/${t}`;
269
+ return Je(e.replace(/data:image\/([a-z]*)?;base64,/, ""), a);
270
270
  }
271
- var Rt = ({ currentImageLink: t, prefetchedBlob: e, resolveImageBlob: s, onSave: o, uploadImageResultIsLoading: i }) => {
272
- const l = N.useCookieManager(), [d, g] = (0, r.useState)(), [f, C] = (0, r.useState)(), { __: I } = p.useI18n();
271
+ var Rt = ({ currentImageLink: t, prefetchedBlob: e, resolveImageBlob: a, onSave: o, uploadImageResultIsLoading: i }) => {
272
+ const l = N.useCookieManager(), [d, g] = (0, n.useState)(), [f, v] = (0, n.useState)(), { __: I } = p.useI18n();
273
273
  let w = u.useDispatch();
274
- const b = u.useStore(), R = u.useAppConfig(), v = u.useSelector(u.selectedCurrentUser), L = u.useSelector(Z.selectSecondModal), A = u.useSelector(u.selectProject), G = (0, r.useMemo)(() => {
274
+ const b = u.useStore(), R = u.useAppConfig(), C = u.useSelector(u.selectedCurrentUser), L = u.useSelector(Z.selectSecondModal), A = u.useSelector(u.selectProject), G = (0, n.useMemo)(() => {
275
275
  if (!R?.icons) return;
276
276
  const j = {};
277
277
  for (const [P, E] of Object.entries(R.icons)) typeof E == "string" && (j[P] = N.sanitizeHtml(E));
278
278
  return Object.keys(j).length > 0 ? j : void 0;
279
- }, [R?.icons]), O = (0, r.useRef)(!1), [D, H] = (0, r.useState)(), B = u.useEventEmitter(u.events.FILE_PROXY_EVENT_ID);
280
- (0, r.useEffect)(() => {
279
+ }, [R?.icons]), O = (0, n.useRef)(!1), [D, H] = (0, n.useState)(), B = u.useEventEmitter(u.events.FILE_PROXY_EVENT_ID);
280
+ (0, n.useEffect)(() => {
281
281
  let j = !1;
282
282
  return (async () => {
283
283
  const E = t;
284
284
  if (!E && !e) return;
285
285
  let x = e;
286
286
  if (!x && E) try {
287
- typeof s == "function" ? x = await s(E) : x = await (await fetch(E)).blob();
287
+ typeof a == "function" ? x = await a(E) : x = await (await fetch(E)).blob();
288
288
  } catch {
289
289
  if (j) return;
290
290
  if (x = await B.fire({
291
291
  url: E,
292
292
  project: A
293
- }).filter((U) => U instanceof Blob)[0], !x) {
294
- const U = l.get(u.APP_COOKIES.em_token) || await u.di.getInstance(b, Z.TOKEN_ID);
295
- x = await (await fetch(`https://app.emailmaker.ru/api/wp-json/cors-proxy/v1/get?url=${encodeURIComponent(E)}`, { headers: { authorization: `Bearer ${U}` } })).blob();
293
+ }).filter((M) => M instanceof Blob)[0], !x) {
294
+ const M = l.get(u.APP_COOKIES.em_token) || await u.di.getInstance(b, Z.TOKEN_ID);
295
+ x = await (await fetch(`https://app.emailmaker.ru/api/wp-json/cors-proxy/v1/get?url=${encodeURIComponent(E)}`, { headers: { authorization: `Bearer ${M}` } })).blob();
296
296
  }
297
297
  }
298
298
  if (j || !x) return;
299
299
  const S = new FileReader();
300
300
  S.onload = () => {
301
301
  if (j) return;
302
- const U = S.result;
303
- typeof U == "string" && (g(U), C(x.type), D?.tools.import.openBackgroundImage(U));
302
+ const M = S.result;
303
+ typeof M == "string" && (g(M), v(x.type), D?.tools.import.openBackgroundImage(M));
304
304
  }, S.onerror = () => {}, S.readAsDataURL(x);
305
305
  })().catch((E) => {}), () => {
306
306
  j = !0;
@@ -308,16 +308,16 @@ __emailmaker__.define("static/core/13d868f1.js", [
308
308
  }, [
309
309
  t,
310
310
  e,
311
- s,
311
+ a,
312
312
  l,
313
313
  D,
314
314
  B,
315
315
  A,
316
316
  b
317
317
  ]);
318
- const z = (0, r.useCallback)(() => {
319
- g(null), C(null), w(Z.closeSecondModal()), w(Z.closeModal(u.MODALS.UPLOAD_IMAGE_MODAL));
320
- }, [w]), V = (0, r.useRef)();
318
+ const z = (0, n.useCallback)(() => {
319
+ g(null), v(null), w(Z.closeSecondModal()), w(Z.closeModal(u.MODALS.UPLOAD_IMAGE_MODAL));
320
+ }, [w]), V = (0, n.useRef)();
321
321
  V.current = async function(j, P, E) {
322
322
  try {
323
323
  const x = St(E, j);
@@ -329,10 +329,10 @@ __emailmaker__.define("static/core/13d868f1.js", [
329
329
  throw x;
330
330
  }
331
331
  };
332
- const ee = (0, r.useCallback)((j) => {
332
+ const ee = (0, n.useCallback)((j) => {
333
333
  if (j && !(O.current && D)) {
334
334
  O.current = !0;
335
- const P = v.locale ? v.locale.replace("_", "-") : "ru-RU", E = v.theme === "system" ? matchMedia("(prefers-color-scheme: dark)").matches ? u.DARK : u.LIGHT : v.theme;
335
+ const P = C.locale ? C.locale.replace("_", "-") : "ru-RU", E = C.theme === "system" ? matchMedia("(prefers-color-scheme: dark)").matches ? u.DARK : u.LIGHT : C.theme;
336
336
  yt.Tf.init({
337
337
  selector: "#pixie-editor",
338
338
  baseUrl: p.getBundledHostAssetUrl(bt),
@@ -355,7 +355,7 @@ __emailmaker__.define("static/core/13d868f1.js", [
355
355
  },
356
356
  {
357
357
  type: "button",
358
- icon: (0, n.jsx)(p.EmIcons, {
358
+ icon: (0, r.jsx)(p.EmIcons, {
359
359
  icon: "HistoryOutlined",
360
360
  configIcons: G,
361
361
  style: { fontSize: 20 }
@@ -368,7 +368,7 @@ __emailmaker__.define("static/core/13d868f1.js", [
368
368
  },
369
369
  {
370
370
  type: "button",
371
- icon: (0, n.jsx)(p.EmIcons, {
371
+ icon: (0, r.jsx)(p.EmIcons, {
372
372
  icon: "CloseOutlined",
373
373
  configIcons: G,
374
374
  style: { fontSize: 20 }
@@ -384,9 +384,9 @@ __emailmaker__.define("static/core/13d868f1.js", [
384
384
  mode: "inline",
385
385
  forceOverlayModeOnMobile: !1
386
386
  },
387
- onSave: async function(x, S, U) {
387
+ onSave: async function(x, S, M) {
388
388
  try {
389
- await V.current(x, S, U);
389
+ await V.current(x, S, M);
390
390
  } catch {}
391
391
  }
392
392
  }).then((x) => {
@@ -394,22 +394,22 @@ __emailmaker__.define("static/core/13d868f1.js", [
394
394
  }).catch((x) => {});
395
395
  }
396
396
  }, [
397
- v.theme,
397
+ C.theme,
398
398
  d,
399
399
  D,
400
400
  H,
401
- v.locale,
401
+ C.locale,
402
402
  I,
403
403
  z,
404
404
  G
405
- ]), q = (0, r.useCallback)(() => {
405
+ ]), q = (0, n.useCallback)(() => {
406
406
  D?.tools.export.save(t?.split("/").pop().split(".")[0], f?.split("/")[1]);
407
407
  }, [
408
408
  D,
409
409
  t,
410
410
  f
411
411
  ]);
412
- return (0, n.jsxs)(p.Modal, {
412
+ return (0, r.jsxs)(p.Modal, {
413
413
  afterOpenChange: ee,
414
414
  width: "100%",
415
415
  style: {
@@ -422,18 +422,18 @@ __emailmaker__.define("static/core/13d868f1.js", [
422
422
  zIndex: 1100,
423
423
  mask: !1,
424
424
  open: L,
425
- footer: [(0, n.jsx)(p.Button, {
425
+ footer: [(0, r.jsx)(p.Button, {
426
426
  className: "em-analytics__profile-cancel",
427
427
  onClick: z,
428
428
  children: I("Cancel")
429
- }, "Cancel"), (0, n.jsx)(p.Button, {
429
+ }, "Cancel"), (0, r.jsx)(p.Button, {
430
430
  className: "em-analytics__profile-updapixiete",
431
431
  id: "save",
432
432
  type: "primary",
433
433
  onClick: q,
434
434
  children: I("Update")
435
435
  }, "Ok")],
436
- children: [i && (0, n.jsx)("div", {
436
+ children: [i && (0, r.jsx)("div", {
437
437
  style: {
438
438
  position: "absolute",
439
439
  height: "100%",
@@ -445,14 +445,14 @@ __emailmaker__.define("static/core/13d868f1.js", [
445
445
  zIndex: 10,
446
446
  opacity: .7
447
447
  },
448
- children: (0, n.jsx)(p.Spin, { size: "large" })
449
- }), (0, n.jsx)("div", { id: "pixie-editor" })]
448
+ children: (0, r.jsx)(p.Spin, { size: "large" })
449
+ }), (0, r.jsx)("div", { id: "pixie-editor" })]
450
450
  });
451
- }, kt = ({ currentImageLink: t, newLink: e, previewDisplayUrl: s, resolvedPreviewObjectUrl: o, resolvedPreviewBlob: i, resolveImageBlob: l, onSave: d, uploadImageResultIsLoading: g }) => {
452
- const f = s || o;
453
- return (0, n.jsxs)(n.Fragment, { children: [(0, n.jsx)("div", { children: (0, n.jsxs)("div", {
451
+ }, kt = ({ currentImageLink: t, newLink: e, previewDisplayUrl: a, resolvedPreviewObjectUrl: o, resolvedPreviewBlob: i, resolveImageBlob: l, onSave: d, uploadImageResultIsLoading: g }) => {
452
+ const f = a || o;
453
+ return (0, r.jsxs)(r.Fragment, { children: [(0, r.jsx)("div", { children: (0, r.jsxs)("div", {
454
454
  className: "image-preview",
455
- children: [g && (0, n.jsx)("div", {
455
+ children: [g && (0, r.jsx)("div", {
456
456
  style: {
457
457
  position: "absolute",
458
458
  height: "100%",
@@ -464,12 +464,12 @@ __emailmaker__.define("static/core/13d868f1.js", [
464
464
  zIndex: 10,
465
465
  opacity: .7
466
466
  },
467
- children: (0, n.jsx)(p.Spin, { size: "large" })
468
- }), f && (0, n.jsx)("img", {
467
+ children: (0, r.jsx)(p.Spin, { size: "large" })
468
+ }), f && (0, r.jsx)("img", {
469
469
  alt: "uploadedImage",
470
470
  src: f
471
471
  })]
472
- }) }), (0, n.jsx)(Rt, {
472
+ }) }), (0, r.jsx)(Rt, {
473
473
  currentImageLink: t,
474
474
  prefetchedBlob: i,
475
475
  resolveImageBlob: l,
@@ -497,19 +497,19 @@ __emailmaker__.define("static/core/13d868f1.js", [
497
497
  } : $e : $e;
498
498
  }
499
499
  function jt(t, e) {
500
- const s = Et(t);
500
+ const a = Et(t);
501
501
  let o;
502
- return s.unit === Re.Pixel ? o = `${s.value}px` : o = `${100 - s.value}%`, e ? `${o} 0px 0px 0px` : `0px 0px ${o} 0px`;
502
+ return a.unit === Re.Pixel ? o = `${a.value}px` : o = `${100 - a.value}%`, e ? `${o} 0px 0px 0px` : `0px 0px ${o} 0px`;
503
503
  }
504
- function et({ next: t, hasMore: e, children: s, loader: o, scrollThreshold: i = .8, endMessage: l, style: d, height: g, scrollableTarget: f, hasChildren: C, inverse: I = !1, pullDownToRefresh: w = !1, pullDownToRefreshContent: b, releaseToRefreshContent: R, pullDownToRefreshThreshold: v = 100, refreshFunction: L, onScroll: A, dataLength: G, initialScrollY: O, className: D = "", role: H, tabIndex: B, id: z, ...V }) {
505
- const [ee, q] = (0, r.useState)(!1), [j, P] = (0, r.useState)(!1), [E, x] = (0, r.useState)(0), S = (0, r.useRef)(null), U = (0, r.useRef)(null), _ = (0, r.useRef)(null), W = (0, r.useRef)(t);
506
- W.current = t;
507
- const a = (0, r.useRef)(L);
508
- a.current = L;
509
- const y = (0, r.useRef)(v);
510
- y.current = v;
511
- const K = (0, r.useRef)(!1), me = (0, r.useRef)(!1), T = (0, r.useRef)(0), J = (0, r.useRef)(0), $ = (0, r.useRef)(0), F = (0, r.useCallback)(() => f instanceof HTMLElement ? f : typeof f == "string" ? document.getElementById(f) : null, [f]);
512
- (0, r.useEffect)(() => {
504
+ function et({ next: t, hasMore: e, children: a, loader: o, scrollThreshold: i = .8, endMessage: l, style: d, height: g, scrollableTarget: f, hasChildren: v, inverse: I = !1, pullDownToRefresh: w = !1, pullDownToRefreshContent: b, releaseToRefreshContent: R, pullDownToRefreshThreshold: C = 100, refreshFunction: L, onScroll: A, dataLength: G, initialScrollY: O, className: D = "", role: H, tabIndex: B, id: z, ...V }) {
505
+ const [ee, q] = (0, n.useState)(!1), [j, P] = (0, n.useState)(!1), [E, x] = (0, n.useState)(0), S = (0, n.useRef)(null), M = (0, n.useRef)(null), _ = (0, n.useRef)(null), K = (0, n.useRef)(t);
506
+ K.current = t;
507
+ const s = (0, n.useRef)(L);
508
+ s.current = L;
509
+ const y = (0, n.useRef)(C);
510
+ y.current = C;
511
+ const W = (0, n.useRef)(!1), me = (0, n.useRef)(!1), T = (0, n.useRef)(0), J = (0, n.useRef)(0), $ = (0, n.useRef)(0), F = (0, n.useCallback)(() => f instanceof HTMLElement ? f : typeof f == "string" ? document.getElementById(f) : null, [f]);
512
+ (0, n.useEffect)(() => {
513
513
  if (typeof G > "u") throw new Error("mandatory prop \"dataLength\" is missing. The prop is needed when loading more content. Check README.md for usage");
514
514
  if (w && typeof L != "function") throw new Error(`Mandatory prop "refreshFunction" missing.
515
515
  Pull Down To Refresh functionality will not work
@@ -518,50 +518,50 @@ __emailmaker__.define("static/core/13d868f1.js", [
518
518
  const Y = g ? S.current : F();
519
519
  Y && Y.scrollHeight > O && Y.scrollTo(0, O);
520
520
  }
521
- }, []), (0, r.useEffect)(() => {
522
- K.current = !1, q(!1);
523
- }, [G]), (0, r.useEffect)(() => {
521
+ }, []), (0, n.useEffect)(() => {
522
+ W.current = !1, q(!1);
523
+ }, [G]), (0, n.useEffect)(() => {
524
524
  if (!e || typeof IntersectionObserver > "u") return;
525
- const Y = U.current;
525
+ const Y = M.current;
526
526
  if (!Y) return;
527
- const ne = g ? S.current : F(), M = new IntersectionObserver(([se]) => {
528
- !se.isIntersecting || K.current || (K.current = !0, q(!0), W.current());
527
+ const re = g ? S.current : F(), U = new IntersectionObserver(([ae]) => {
528
+ !ae.isIntersecting || W.current || (W.current = !0, q(!0), K.current());
529
529
  }, {
530
- root: ne,
530
+ root: re,
531
531
  rootMargin: jt(i, I),
532
532
  threshold: 0
533
533
  });
534
- return M.observe(Y), () => M.disconnect();
534
+ return U.observe(Y), () => U.disconnect();
535
535
  }, [
536
536
  e,
537
537
  i,
538
538
  I,
539
539
  g,
540
540
  F
541
- ]), (0, r.useEffect)(() => {
541
+ ]), (0, n.useEffect)(() => {
542
542
  var Y;
543
543
  if (!A) return;
544
- const ne = (Y = g ? S.current : F()) !== null && Y !== void 0 ? Y : typeof window < "u" ? window : null;
545
- if (!ne) return;
546
- const M = (se) => {
547
- setTimeout(() => A(se), 0);
544
+ const re = (Y = g ? S.current : F()) !== null && Y !== void 0 ? Y : typeof window < "u" ? window : null;
545
+ if (!re) return;
546
+ const U = (ae) => {
547
+ setTimeout(() => A(ae), 0);
548
548
  };
549
- return ne.addEventListener("scroll", M), () => ne.removeEventListener("scroll", M);
549
+ return re.addEventListener("scroll", U), () => re.removeEventListener("scroll", U);
550
550
  }, [
551
551
  A,
552
552
  g,
553
553
  F
554
- ]), (0, r.useEffect)(() => {
555
- var Y, ne;
554
+ ]), (0, n.useEffect)(() => {
555
+ var Y, re;
556
556
  if (!w) return;
557
- const M = (Y = g ? S.current : F()) !== null && Y !== void 0 ? Y : typeof window < "u" ? window : null;
558
- if (!M) return;
559
- if (!((ne = _.current) === null || ne === void 0) && ne.firstChild) {
557
+ const U = (Y = g ? S.current : F()) !== null && Y !== void 0 ? Y : typeof window < "u" ? window : null;
558
+ if (!U) return;
559
+ if (!((re = _.current) === null || re === void 0) && re.firstChild) {
560
560
  const X = _.current.firstChild.getBoundingClientRect().height;
561
561
  $.current = X, x(X);
562
562
  }
563
- const se = (X) => {
564
- (M instanceof HTMLElement ? M.scrollTop : document.documentElement.scrollTop) > 0 || (me.current = !0, X instanceof MouseEvent ? T.current = X.pageY : X instanceof TouchEvent && (T.current = X.touches[0].pageY), J.current = T.current, S.current && (S.current.style.willChange = "transform", S.current.style.transition = "transform 0.2s cubic-bezier(0,0,0.31,1)"));
563
+ const ae = (X) => {
564
+ (U instanceof HTMLElement ? U.scrollTop : document.documentElement.scrollTop) > 0 || (me.current = !0, X instanceof MouseEvent ? T.current = X.pageY : X instanceof TouchEvent && (T.current = X.touches[0].pageY), J.current = T.current, S.current && (S.current.style.willChange = "transform", S.current.style.transition = "transform 0.2s cubic-bezier(0,0,0.31,1)"));
565
565
  }, h = (X) => {
566
566
  if (!me.current || (X instanceof MouseEvent ? J.current = X.pageY : X instanceof TouchEvent && (J.current = X.touches[0].pageY), J.current < T.current)) return;
567
567
  const ue = J.current - T.current;
@@ -569,44 +569,44 @@ __emailmaker__.define("static/core/13d868f1.js", [
569
569
  }, te = () => {
570
570
  T.current = 0, J.current = 0, me.current = !1, P((X) => {
571
571
  var ue;
572
- return X && ((ue = a.current) === null || ue === void 0 || ue.call(a)), !1;
572
+ return X && ((ue = s.current) === null || ue === void 0 || ue.call(s)), !1;
573
573
  }), requestAnimationFrame(() => {
574
574
  S.current && (S.current.style.overflow = "auto", S.current.style.transform = "none", S.current.style.willChange = "unset");
575
575
  });
576
576
  };
577
- return M.addEventListener("touchstart", se), M.addEventListener("touchmove", h), M.addEventListener("touchend", te), M.addEventListener("mousedown", se), M.addEventListener("mousemove", h), M.addEventListener("mouseup", te), () => {
578
- M.removeEventListener("touchstart", se), M.removeEventListener("touchmove", h), M.removeEventListener("touchend", te), M.removeEventListener("mousedown", se), M.removeEventListener("mousemove", h), M.removeEventListener("mouseup", te);
577
+ return U.addEventListener("touchstart", ae), U.addEventListener("touchmove", h), U.addEventListener("touchend", te), U.addEventListener("mousedown", ae), U.addEventListener("mousemove", h), U.addEventListener("mouseup", te), () => {
578
+ U.removeEventListener("touchstart", ae), U.removeEventListener("touchmove", h), U.removeEventListener("touchend", te), U.removeEventListener("mousedown", ae), U.removeEventListener("mousemove", h), U.removeEventListener("mouseup", te);
579
579
  };
580
580
  }, [
581
581
  w,
582
582
  g,
583
583
  F
584
584
  ]);
585
- const he = {
585
+ const ye = {
586
586
  height: g ?? "auto",
587
587
  overflow: "auto",
588
588
  WebkitOverflowScrolling: "touch",
589
589
  ...d
590
- }, ie = C || !!(s && s instanceof Array && s.length), pe = w && g ? { overflow: "auto" } : {}, Ae = e ? (0, n.jsx)("div", {
591
- ref: U,
590
+ }, ie = v || !!(a && a instanceof Array && a.length), pe = w && g ? { overflow: "auto" } : {}, xe = e ? (0, r.jsx)("div", {
591
+ ref: M,
592
592
  style: { height: 1 }
593
593
  }) : null;
594
- return (0, n.jsx)("div", {
594
+ return (0, r.jsx)("div", {
595
595
  style: pe,
596
596
  className: "infinite-scroll-component__outerdiv",
597
- children: (0, n.jsxs)("div", {
597
+ children: (0, r.jsxs)("div", {
598
598
  ...V,
599
599
  role: H,
600
600
  tabIndex: B,
601
601
  id: z,
602
602
  className: ["infinite-scroll-component", D].filter(Boolean).join(" "),
603
603
  ref: S,
604
- style: he,
604
+ style: ye,
605
605
  children: [
606
- w && (0, n.jsx)("div", {
606
+ w && (0, r.jsx)("div", {
607
607
  style: { position: "relative" },
608
608
  ref: _,
609
- children: (0, n.jsx)("div", {
609
+ children: (0, r.jsx)("div", {
610
610
  style: {
611
611
  position: "absolute",
612
612
  left: 0,
@@ -616,10 +616,10 @@ __emailmaker__.define("static/core/13d868f1.js", [
616
616
  children: j ? R : b
617
617
  })
618
618
  }),
619
- s,
619
+ a,
620
620
  !ee && !ie && e && o,
621
621
  ee && e && o,
622
- Ae,
622
+ xe,
623
623
  !e && l
624
624
  ]
625
625
  })
@@ -627,56 +627,56 @@ __emailmaker__.define("static/core/13d868f1.js", [
627
627
  }
628
628
  function Ot(t, e) {
629
629
  if (t == null) return {};
630
- var s = Lt(t, e), o, i;
630
+ var a = Lt(t, e), o, i;
631
631
  if (Object.getOwnPropertySymbols) {
632
632
  var l = Object.getOwnPropertySymbols(t);
633
- for (i = 0; i < l.length; i++) o = l[i], !(e.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(t, o) && (s[o] = t[o]);
633
+ for (i = 0; i < l.length; i++) o = l[i], !(e.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(t, o) && (a[o] = t[o]);
634
634
  }
635
- return s;
635
+ return a;
636
636
  }
637
637
  function Lt(t, e) {
638
638
  if (t == null) return {};
639
- var s = {}, o = Object.keys(t), i, l;
640
- for (l = 0; l < o.length; l++) i = o[l], !(e.indexOf(i) >= 0) && (s[i] = t[i]);
641
- return s;
639
+ var a = {}, o = Object.keys(t), i, l;
640
+ for (l = 0; l < o.length; l++) i = o[l], !(e.indexOf(i) >= 0) && (a[i] = t[i]);
641
+ return a;
642
642
  }
643
- function De() {
644
- return De = Object.assign || function(t) {
643
+ function Be() {
644
+ return Be = Object.assign || function(t) {
645
645
  for (var e = 1; e < arguments.length; e++) {
646
- var s = arguments[e];
647
- for (var o in s) Object.prototype.hasOwnProperty.call(s, o) && (t[o] = s[o]);
646
+ var a = arguments[e];
647
+ for (var o in a) Object.prototype.hasOwnProperty.call(a, o) && (t[o] = a[o]);
648
648
  }
649
649
  return t;
650
- }, De.apply(this, arguments);
650
+ }, Be.apply(this, arguments);
651
651
  }
652
652
  function tt(t, e) {
653
- var s = Object.keys(t);
653
+ var a = Object.keys(t);
654
654
  if (Object.getOwnPropertySymbols) {
655
655
  var o = Object.getOwnPropertySymbols(t);
656
656
  e && (o = o.filter(function(i) {
657
657
  return Object.getOwnPropertyDescriptor(t, i).enumerable;
658
- })), s.push.apply(s, o);
658
+ })), a.push.apply(a, o);
659
659
  }
660
- return s;
660
+ return a;
661
661
  }
662
662
  function ke(t) {
663
663
  for (var e = 1; e < arguments.length; e++) {
664
- var s = arguments[e] != null ? arguments[e] : {};
665
- e % 2 ? tt(Object(s), !0).forEach(function(o) {
666
- Dt(t, o, s[o]);
667
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(s)) : tt(Object(s)).forEach(function(o) {
668
- Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(s, o));
664
+ var a = arguments[e] != null ? arguments[e] : {};
665
+ e % 2 ? tt(Object(a), !0).forEach(function(o) {
666
+ Dt(t, o, a[o]);
667
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(a)) : tt(Object(a)).forEach(function(o) {
668
+ Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(a, o));
669
669
  });
670
670
  }
671
671
  return t;
672
672
  }
673
- function Dt(t, e, s) {
673
+ function Dt(t, e, a) {
674
674
  return e in t ? Object.defineProperty(t, e, {
675
- value: s,
675
+ value: a,
676
676
  enumerable: !0,
677
677
  configurable: !0,
678
678
  writable: !0
679
- }) : t[e] = s, t;
679
+ }) : t[e] = a, t;
680
680
  }
681
681
  var Bt = {
682
682
  breakpointCols: void 0,
@@ -685,11 +685,11 @@ __emailmaker__.define("static/core/13d868f1.js", [
685
685
  children: void 0,
686
686
  columnAttrs: void 0,
687
687
  column: void 0
688
- }, Te = 2, Ne = class extends r.default.Component {
688
+ }, Ne = 2, Ge = class extends n.default.Component {
689
689
  constructor(t) {
690
690
  super(t), this.reCalculateColumnCount = this.reCalculateColumnCount.bind(this), this.reCalculateColumnCountDebounce = this.reCalculateColumnCountDebounce.bind(this);
691
691
  let e;
692
- this.props.breakpointCols && this.props.breakpointCols.default ? e = this.props.breakpointCols.default : e = parseInt(this.props.breakpointCols) || Te, this.state = { columnCount: e };
692
+ this.props.breakpointCols && this.props.breakpointCols.default ? e = this.props.breakpointCols.default : e = parseInt(this.props.breakpointCols) || Ne, this.state = { columnCount: e };
693
693
  }
694
694
  componentDidMount() {
695
695
  this.reCalculateColumnCount(), window && window.addEventListener("resize", this.reCalculateColumnCountDebounce);
@@ -712,35 +712,35 @@ __emailmaker__.define("static/core/13d868f1.js", [
712
712
  reCalculateColumnCount() {
713
713
  const t = window && window.innerWidth || Infinity;
714
714
  let e = this.props.breakpointCols;
715
- typeof e != "object" && (e = { default: parseInt(e) || Te });
716
- let s = Infinity, o = e.default || Te;
715
+ typeof e != "object" && (e = { default: parseInt(e) || Ne });
716
+ let a = Infinity, o = e.default || Ne;
717
717
  for (let i in e) {
718
718
  const l = parseInt(i);
719
- l > 0 && t <= l && l < s && (s = l, o = e[i]);
719
+ l > 0 && t <= l && l < a && (a = l, o = e[i]);
720
720
  }
721
721
  o = Math.max(1, parseInt(o) || 1), this.state.columnCount !== o && this.setState({ columnCount: o });
722
722
  }
723
723
  itemsInColumns() {
724
- const t = this.state.columnCount, e = new Array(t), s = r.default.Children.toArray(this.props.children);
725
- for (let o = 0; o < s.length; o++) {
724
+ const t = this.state.columnCount, e = new Array(t), a = n.default.Children.toArray(this.props.children);
725
+ for (let o = 0; o < a.length; o++) {
726
726
  const i = o % t;
727
- e[i] || (e[i] = []), e[i].push(s[o]);
727
+ e[i] || (e[i] = []), e[i].push(a[o]);
728
728
  }
729
729
  return e;
730
730
  }
731
731
  renderColumns() {
732
- const { column: t, columnAttrs: e = {}, columnClassName: s } = this.props, o = this.itemsInColumns(), i = `${100 / o.length}%`;
733
- let l = s;
732
+ const { column: t, columnAttrs: e = {}, columnClassName: a } = this.props, o = this.itemsInColumns(), i = `${100 / o.length}%`;
733
+ let l = a;
734
734
  l && typeof l != "string" && (this.logDeprecated("The property \"columnClassName\" requires a string"), typeof l > "u" && (l = "my-masonry-grid_column"));
735
735
  const d = ke(ke(ke({}, t), e), {}, {
736
736
  style: ke(ke({}, e.style), {}, { width: i }),
737
737
  className: l
738
738
  });
739
- return o.map((g, f) => r.default.createElement("div", De({}, d, { key: f }), g));
739
+ return o.map((g, f) => n.default.createElement("div", Be({}, d, { key: f }), g));
740
740
  }
741
741
  logDeprecated(t) {}
742
742
  render() {
743
- const t = this.props, { children: e, breakpointCols: s, columnClassName: o, columnAttrs: i, column: l, className: d } = t, g = Ot(t, [
743
+ const t = this.props, { children: e, breakpointCols: a, columnClassName: o, columnAttrs: i, column: l, className: d } = t, g = Ot(t, [
744
744
  "children",
745
745
  "breakpointCols",
746
746
  "columnClassName",
@@ -749,11 +749,11 @@ __emailmaker__.define("static/core/13d868f1.js", [
749
749
  "className"
750
750
  ]);
751
751
  let f = d;
752
- return typeof d != "string" && (this.logDeprecated("The property \"className\" requires a string"), typeof d > "u" && (f = "my-masonry-grid")), r.default.createElement("div", De({}, g, { className: f }), this.renderColumns());
752
+ return typeof d != "string" && (this.logDeprecated("The property \"className\" requires a string"), typeof d > "u" && (f = "my-masonry-grid")), n.default.createElement("div", Be({}, g, { className: f }), this.renderColumns());
753
753
  }
754
754
  };
755
- Ne.defaultProps = Bt;
756
- function Ge(t, e) {
755
+ Ge.defaultProps = Bt;
756
+ function Fe(t, e) {
757
757
  return t ? t.exhausted ? {
758
758
  ...t,
759
759
  src: null
@@ -762,18 +762,18 @@ __emailmaker__.define("static/core/13d868f1.js", [
762
762
  src: t.src || e || null
763
763
  } : null;
764
764
  }
765
- function rt({ items: t, getItemId: e, getRequestUrl: s, createController: o }) {
766
- const [i, l] = (0, r.useState)({}), d = (0, r.useRef)(new Map()), g = (0, r.useCallback)((f) => {
767
- const C = e(f), I = s(f), w = `${C}:${I}`;
765
+ function nt({ items: t, getItemId: e, getRequestUrl: a, createController: o }) {
766
+ const [i, l] = (0, n.useState)({}), d = (0, n.useRef)(new Map()), g = (0, n.useCallback)((f) => {
767
+ const v = e(f), I = a(f), w = `${v}:${I}`;
768
768
  if (d.current.has(w)) return {
769
- itemId: C,
769
+ itemId: v,
770
770
  requestUrl: I,
771
771
  cacheKey: w,
772
772
  controller: d.current.get(w)
773
773
  };
774
774
  const b = o(I);
775
775
  return d.current.set(w, b), {
776
- itemId: C,
776
+ itemId: v,
777
777
  requestUrl: I,
778
778
  cacheKey: w,
779
779
  controller: b
@@ -781,15 +781,15 @@ __emailmaker__.define("static/core/13d868f1.js", [
781
781
  }, [
782
782
  o,
783
783
  e,
784
- s
784
+ a
785
785
  ]);
786
- return (0, r.useEffect)(() => {
787
- const f = new Set(), C = {}, I = t.map((w) => {
788
- const { itemId: b, cacheKey: R, controller: v } = g(w);
789
- f.add(R), C[b] = v.src;
790
- const L = Ge(v.handleChangeSrc?.(), v.src);
791
- return L?.changed && L.src && (C[b] = L.src), v.subscribeToSrcChange?.((A) => {
792
- const G = Ge(A, v.src);
786
+ return (0, n.useEffect)(() => {
787
+ const f = new Set(), v = {}, I = t.map((w) => {
788
+ const { itemId: b, cacheKey: R, controller: C } = g(w);
789
+ f.add(R), v[b] = C.src;
790
+ const L = Fe(C.handleChangeSrc?.(), C.src);
791
+ return L?.changed && L.src && (v[b] = L.src), C.subscribeToSrcChange?.((A) => {
792
+ const G = Fe(A, C.src);
793
793
  !G?.changed || !G.src || l((O) => O[b] === G.src ? O : {
794
794
  ...O,
795
795
  [b]: G.src
@@ -798,32 +798,32 @@ __emailmaker__.define("static/core/13d868f1.js", [
798
798
  }).filter(Boolean);
799
799
  return d.current.forEach((w, b) => {
800
800
  f.has(b) || d.current.delete(b);
801
- }), l(C), () => {
801
+ }), l(v), () => {
802
802
  I.forEach((w) => w?.());
803
803
  };
804
804
  }, [g, t]), {
805
- getDisplaySrc: (0, r.useCallback)((f) => {
806
- const { itemId: C, requestUrl: I, controller: w } = g(f);
807
- return i[C] || w.src || I;
805
+ getDisplaySrc: (0, n.useCallback)((f) => {
806
+ const { itemId: v, requestUrl: I, controller: w } = g(f);
807
+ return i[v] || w.src || I;
808
808
  }, [i, g]),
809
- handleLoad: (0, r.useCallback)((f) => {
809
+ handleLoad: (0, n.useCallback)((f) => {
810
810
  g(f).controller.handleSuccess();
811
811
  }, [g]),
812
- handleError: (0, r.useCallback)((f) => {
813
- const { itemId: C, controller: I } = g(f), w = Ge(I.handleError(), I.src);
812
+ handleError: (0, n.useCallback)((f) => {
813
+ const { itemId: v, controller: I } = g(f), w = Fe(I.handleError(), I.src);
814
814
  w?.changed && w.src && l((b) => ({
815
815
  ...b,
816
- [C]: w.src
816
+ [v]: w.src
817
817
  }));
818
818
  }, [g])
819
819
  };
820
820
  }
821
- var nt = "blocks", Ut = ({ setCurrentImageLink: t, setModalHeight: e, setModalWidth: s, setImageStockList: o, imageStockList: i, currentReq: l, setCurrentReq: d, inputRef: g, setStockLink: f, customRequest: C }) => {
822
- const I = u.useAppConfig(), w = u.useIsStandalone(), [b, R] = (0, r.useState)(!1), [v, L] = (0, r.useState)(2), { __: A } = p.useI18n(), G = p.useNotification(), [O] = Z.useLazyGetUnsplashImageQuery(), [D] = Z.useLazyGetSearchImageQuery(), H = (0, r.useCallback)((a) => a instanceof Error || typeof a?.message == "string" && a.message ? a.message : typeof a?.error?.message == "string" && a.error.message ? a.error.message : A("Failed to load stock images through the configured proxy chain."), [A]), B = (0, r.useCallback)((a) => {
821
+ var rt = "blocks", Mt = ({ setCurrentImageLink: t, setModalHeight: e, setModalWidth: a, setImageStockList: o, imageStockList: i, currentReq: l, setCurrentReq: d, inputRef: g, setStockLink: f, customRequest: v }) => {
822
+ const I = u.useAppConfig(), w = u.useIsStandalone(), [b, R] = (0, n.useState)(!1), [C, L] = (0, n.useState)(2), { __: A } = p.useI18n(), G = p.useNotification(), [O] = Z.useLazyGetUnsplashImageQuery(), [D] = Z.useLazyGetSearchImageQuery(), H = (0, n.useCallback)((s) => s instanceof Error || typeof s?.message == "string" && s.message ? s.message : typeof s?.error?.message == "string" && s.error.message ? s.error.message : A("Failed to load stock images through the configured proxy chain."), [A]), B = (0, n.useCallback)((s) => {
823
823
  G.error({
824
824
  id: "STOCK_IMAGES_SEARCH_FAILED",
825
825
  title: A("Failed to load stock images"),
826
- description: H(a)
826
+ description: H(s)
827
827
  });
828
828
  }, [
829
829
  A,
@@ -832,122 +832,122 @@ __emailmaker__.define("static/core/13d868f1.js", [
832
832
  ]), z = async () => {
833
833
  b || (R(!0), D({
834
834
  query: l,
835
- page: v
836
- }).then((a) => {
837
- if (a?.error) {
838
- B(a.error), R(!1);
835
+ page: C
836
+ }).then((s) => {
837
+ if (s?.error) {
838
+ B(s.error), R(!1);
839
839
  return;
840
840
  }
841
- const y = a?.data?.results || [];
842
- o((K) => [...K, ...y]), R(!1), L((K) => K + 1);
841
+ const y = s?.data?.results || [];
842
+ o((W) => [...W, ...y]), R(!1), L((W) => W + 1);
843
843
  }).catch(() => {
844
844
  R(!1);
845
845
  }));
846
846
  };
847
- (0, r.useEffect)(() => {
847
+ (0, n.useEffect)(() => {
848
848
  l.keywords !== "" && V();
849
849
  }, [l.color, l.orientation]);
850
850
  const V = async () => {
851
- const a = await D({
851
+ const s = await D({
852
852
  query: l,
853
853
  page: 1
854
854
  });
855
- if (a?.error) {
856
- B(a.error), o([]);
855
+ if (s?.error) {
856
+ B(s.error), o([]);
857
857
  return;
858
858
  }
859
- const y = a?.data?.results || [];
859
+ const y = s?.data?.results || [];
860
860
  y.length > 0 ? (o(y), setTimeout(() => {
861
- s(1060), e("84vh");
861
+ a(1060), e("84vh");
862
862
  }, 0)) : o([]);
863
- }, [ee, q] = (0, r.useState)(null), j = (0, r.useCallback)((a, y, K) => `${a}${a.includes("?") ? "&" : "?"}w=${y}&q=${K}`, []), P = (0, r.useCallback)((a) => u.getProxiedUrl(a, {
863
+ }, [ee, q] = (0, n.useState)(null), j = (0, n.useCallback)((s, y, W) => `${s}${s.includes("?") ? "&" : "?"}w=${y}&q=${W}`, []), P = (0, n.useCallback)((s) => u.getProxiedUrl(s, {
864
864
  config: I,
865
865
  standalone: w,
866
866
  resourceType: "stockImages",
867
867
  intent: "display"
868
- }), [I, w]), { getDisplaySrc: E, handleLoad: x, handleError: S } = rt({
868
+ }), [I, w]), { getDisplaySrc: E, handleLoad: x, handleError: S } = nt({
869
869
  items: i,
870
- getItemId: (0, r.useCallback)((a) => a.id, []),
871
- getRequestUrl: (0, r.useCallback)((a) => j(a.urls.raw, 644, 96), [j]),
870
+ getItemId: (0, n.useCallback)((s) => s.id, []),
871
+ getRequestUrl: (0, n.useCallback)((s) => j(s.urls.raw, 644, 96), [j]),
872
872
  createController: P
873
- }), U = (a) => (y) => {
874
- x(a), y.target.parentNode.classList.add("loaded");
875
- }, _ = (a) => () => {
876
- S(a);
877
- }, W = (a, y, K) => {
878
- O(y.download_location), q(K), setTimeout(() => q(null), 2e3), f(`${a.raw}&w=1200&q=96`), t(`${a.raw}&w=1200&q=96`), C(`${a.raw}&w=1200&q=96`);
873
+ }), M = (s) => (y) => {
874
+ x(s), y.target.parentNode.classList.add("loaded");
875
+ }, _ = (s) => () => {
876
+ S(s);
877
+ }, K = (s, y, W) => {
878
+ O(y.download_location), q(W), setTimeout(() => q(null), 2e3), f(`${s.raw}&w=1200&q=96`), t(`${s.raw}&w=1200&q=96`), v(`${s.raw}&w=1200&q=96`);
879
879
  };
880
- return (0, n.jsxs)("div", {
880
+ return (0, r.jsxs)("div", {
881
881
  className: "stock-tab",
882
- children: [(0, n.jsxs)(p.Form, {
882
+ children: [(0, r.jsxs)(p.Form, {
883
883
  onValuesChange: V,
884
884
  className: i.length > 0 ? "serach-results" : "",
885
- children: [(0, n.jsxs)(p.Row, {
885
+ children: [(0, r.jsxs)(p.Row, {
886
886
  gutter: 24,
887
- children: [(0, n.jsx)(p.Col, {
887
+ children: [(0, r.jsx)(p.Col, {
888
888
  span: i.length > 0 ? "" : 24,
889
- children: (0, n.jsx)(p.Form.Item, {
889
+ children: (0, r.jsx)(p.Form.Item, {
890
890
  className: "stock-search-input",
891
- children: (0, n.jsx)(p.SearchInput, {
891
+ children: (0, r.jsx)(p.SearchInput, {
892
892
  onSearch: V,
893
893
  allowClear: !0,
894
894
  size: i.length > 0 ? "medium" : "large",
895
895
  placeholder: A("Search image"),
896
896
  value: l.keywords,
897
- onChange: (a) => d((y) => ({
897
+ onChange: (s) => d((y) => ({
898
898
  ...y,
899
- keywords: a.target.value
899
+ keywords: s.target.value
900
900
  })),
901
901
  ref: g,
902
902
  spellCheck: "false",
903
903
  enterButton: !1
904
904
  })
905
905
  })
906
- }), i.length > 0 && (0, n.jsxs)(n.Fragment, { children: [(0, n.jsx)(p.Col, { children: (0, n.jsxs)(p.Radio.Group, {
906
+ }), i.length > 0 && (0, r.jsxs)(r.Fragment, { children: [(0, r.jsx)(p.Col, { children: (0, r.jsxs)(p.Radio.Group, {
907
907
  defaultValue: "",
908
- onChange: (a) => d((y) => ({
908
+ onChange: (s) => d((y) => ({
909
909
  ...y,
910
- orientation: a.target.value
910
+ orientation: s.target.value
911
911
  })),
912
912
  children: [
913
- (0, n.jsx)(p.Tooltip, {
913
+ (0, r.jsx)(p.Tooltip, {
914
914
  title: A("All"),
915
915
  placement: "top",
916
- children: (0, n.jsx)(p.Radio.Button, {
916
+ children: (0, r.jsx)(p.Radio.Button, {
917
917
  value: "",
918
- children: (0, n.jsx)(N.EmIcons, { icon: "MixedView" })
918
+ children: (0, r.jsx)(N.EmIcons, { icon: "MixedView" })
919
919
  })
920
920
  }),
921
- (0, n.jsx)(p.Tooltip, {
921
+ (0, r.jsx)(p.Tooltip, {
922
922
  title: A("Landscape"),
923
923
  placement: "top",
924
- children: (0, n.jsx)(p.Radio.Button, {
924
+ children: (0, r.jsx)(p.Radio.Button, {
925
925
  value: "landscape",
926
- children: (0, n.jsx)(N.EmIcons, { icon: "LandscapeView" })
926
+ children: (0, r.jsx)(N.EmIcons, { icon: "LandscapeView" })
927
927
  })
928
928
  }),
929
- (0, n.jsx)(p.Tooltip, {
929
+ (0, r.jsx)(p.Tooltip, {
930
930
  title: A("Portrait"),
931
931
  placement: "top",
932
- children: (0, n.jsx)(p.Radio.Button, {
932
+ children: (0, r.jsx)(p.Radio.Button, {
933
933
  value: "portrait",
934
- children: (0, n.jsx)(N.EmIcons, { icon: "PortraitView" })
934
+ children: (0, r.jsx)(N.EmIcons, { icon: "PortraitView" })
935
935
  })
936
936
  }),
937
- (0, n.jsx)(p.Tooltip, {
937
+ (0, r.jsx)(p.Tooltip, {
938
938
  title: A("Squarish"),
939
939
  placement: "top",
940
- children: (0, n.jsx)(p.Radio.Button, {
940
+ children: (0, r.jsx)(p.Radio.Button, {
941
941
  value: "squarish",
942
- children: (0, n.jsx)(N.EmIcons, { icon: "SquareView" })
942
+ children: (0, r.jsx)(N.EmIcons, { icon: "SquareView" })
943
943
  })
944
944
  })
945
945
  ]
946
- }) }), (0, n.jsx)(p.Col, { children: (0, n.jsx)(p.RadioColorFilter, {
946
+ }) }), (0, r.jsx)(p.Col, { children: (0, r.jsx)(p.RadioColorFilter, {
947
947
  defaultValue: "",
948
- onChange: (a) => d((y) => ({
948
+ onChange: (s) => d((y) => ({
949
949
  ...y,
950
- color: a.target.value
950
+ color: s.target.value
951
951
  })),
952
952
  options: [
953
953
  {
@@ -1008,17 +1008,17 @@ __emailmaker__.define("static/core/13d868f1.js", [
1008
1008
  ],
1009
1009
  tooltipPlacement: "top"
1010
1010
  }) })] })]
1011
- }), i.length > 0 && (0, n.jsx)("div", {
1011
+ }), i.length > 0 && (0, r.jsx)("div", {
1012
1012
  className: "blocks-search__divider-wrapper",
1013
- children: (0, n.jsx)("div", {
1013
+ children: (0, r.jsx)("div", {
1014
1014
  className: "ant-divider ant-divider-horizontal",
1015
1015
  role: "separator"
1016
1016
  })
1017
1017
  })]
1018
- }), (0, n.jsx)("div", {
1018
+ }), (0, r.jsx)("div", {
1019
1019
  className: "serach-output-wrapper",
1020
1020
  style: { marginRight: -10 },
1021
- children: i.length > 0 && (0, n.jsx)("div", {
1021
+ children: i.length > 0 && (0, r.jsx)("div", {
1022
1022
  id: "scrollableDiv",
1023
1023
  style: {
1024
1024
  width: "100%",
@@ -1031,78 +1031,78 @@ __emailmaker__.define("static/core/13d868f1.js", [
1031
1031
  lineHeight: "0",
1032
1032
  boxSizing: "unset"
1033
1033
  },
1034
- children: (0, n.jsx)(et, {
1034
+ children: (0, r.jsx)(et, {
1035
1035
  dataLength: i && i.length,
1036
1036
  next: z,
1037
1037
  hasMore: i,
1038
- endMessage: (0, n.jsxs)(p.Divider, {
1038
+ endMessage: (0, r.jsxs)(p.Divider, {
1039
1039
  plain: !0,
1040
1040
  children: [A("That`s all we could find."), " 🤐"]
1041
1041
  }),
1042
1042
  scrollableTarget: "scrollableDiv",
1043
1043
  style: { overflow: "visible" },
1044
1044
  loader: null,
1045
- children: (0, n.jsx)(Ne, {
1045
+ children: (0, r.jsx)(Ge, {
1046
1046
  breakpointCols: { default: 3 },
1047
1047
  className: "my-masonry-grid",
1048
1048
  columnClassName: "my-masonry-grid_column",
1049
- children: i.map((a) => (0, n.jsxs)("div", {
1049
+ children: i.map((s) => (0, r.jsxs)("div", {
1050
1050
  className: "list-item",
1051
- onClick: () => W(a.urls, a.links, a.id),
1051
+ onClick: () => K(s.urls, s.links, s.id),
1052
1052
  children: [
1053
- (0, n.jsx)("img", {
1054
- className: ee === a.id ? "loaded-image" : "",
1053
+ (0, r.jsx)("img", {
1054
+ className: ee === s.id ? "loaded-image" : "",
1055
1055
  width: "322px",
1056
- src: E(a),
1057
- alt: a.description,
1058
- onLoad: U(a),
1059
- onError: _(a)
1056
+ src: E(s),
1057
+ alt: s.description,
1058
+ onLoad: M(s),
1059
+ onError: _(s)
1060
1060
  }),
1061
- (0, n.jsxs)("p", {
1061
+ (0, r.jsxs)("p", {
1062
1062
  className: "creator-info",
1063
1063
  onClick: (y) => y.stopPropagation(),
1064
1064
  children: [
1065
1065
  "Photo by",
1066
1066
  " ",
1067
- (0, n.jsx)("a", {
1067
+ (0, r.jsx)("a", {
1068
1068
  target: "_blank",
1069
- href: `${a.user.links.html}?utm_source=${nt}&utm_medium=referral`,
1069
+ href: `${s.user.links.html}?utm_source=${rt}&utm_medium=referral`,
1070
1070
  rel: "noreferrer",
1071
- children: a.user.name
1071
+ children: s.user.name
1072
1072
  }),
1073
1073
  " ",
1074
1074
  "on",
1075
1075
  " ",
1076
- (0, n.jsx)("a", {
1076
+ (0, r.jsx)("a", {
1077
1077
  target: "_blank",
1078
- href: `https://unsplash.com/?utm_source=${nt}&utm_medium=referral`,
1078
+ href: `https://unsplash.com/?utm_source=${rt}&utm_medium=referral`,
1079
1079
  rel: "noreferrer",
1080
1080
  children: "Unsplash"
1081
1081
  })
1082
1082
  ]
1083
1083
  }),
1084
- ee === a.id && (0, n.jsx)(p.Spin, {
1084
+ ee === s.id && (0, r.jsx)(p.Spin, {
1085
1085
  className: "ant-spin",
1086
1086
  size: "small"
1087
1087
  })
1088
1088
  ]
1089
- }, a.id))
1089
+ }, s.id))
1090
1090
  })
1091
1091
  })
1092
1092
  })
1093
1093
  })]
1094
1094
  });
1095
1095
  };
1096
- function at(t) {
1096
+ function st(t) {
1097
1097
  return /^(https?:)?\/\//i.test(t.trim());
1098
1098
  }
1099
- function Mt(t) {
1099
+ function Ut(t) {
1100
1100
  const e = t.trim();
1101
- return at(e) || /^data:/i.test(e) ? e : `data:image/jpeg;base64, ${t}`;
1101
+ return st(e) || /^data:/i.test(e) ? e : `data:image/jpeg;base64, ${t}`;
1102
1102
  }
1103
1103
  var Pt = ({ images: t, transitionDuration: e = 1e3 }) => {
1104
- const [s, o] = (0, r.useState)([]);
1105
- return (0, r.useEffect)(() => {
1104
+ const [a, o] = (0, n.useState)([]);
1105
+ return (0, n.useEffect)(() => {
1106
1106
  if (t.length > 0) {
1107
1107
  const i = t[t.length - 1];
1108
1108
  o((l) => [...l, {
@@ -1115,10 +1115,10 @@ __emailmaker__.define("static/core/13d868f1.js", [
1115
1115
  } : d));
1116
1116
  }, 1e3);
1117
1117
  }
1118
- }, [t]), (0, n.jsx)("div", {
1118
+ }, [t]), (0, r.jsx)("div", {
1119
1119
  className: "slideshow-container",
1120
- children: s.map((i, l) => (0, n.jsx)("img", {
1121
- src: Mt(i.src),
1120
+ children: a.map((i, l) => (0, r.jsx)("img", {
1121
+ src: Ut(i.src),
1122
1122
  alt: `Slide ${l + 1}`,
1123
1123
  className: "slideshow-image",
1124
1124
  style: {
@@ -1128,22 +1128,22 @@ __emailmaker__.define("static/core/13d868f1.js", [
1128
1128
  }, l))
1129
1129
  });
1130
1130
  };
1131
- function Tt({ setModalHeight: t, customRequest: e, aiTabRef: s, isImageUploaded: o, setIsImageUploaded: i, aiImageRequest: l, imageAiList: d, setImageAiList: g, isLoadingAi: f, setIsLoadingAi: C, onPluginAiImageLimitExceeded: I, onImageGenerateLimitExceeded: w }) {
1132
- const { __: b } = p.useI18n(), R = u.useAppConfig(), v = p.useNotification(), L = u.usePushToDataLayer(), { emailId: A, blockId: G, projectId: O } = u.useParams(), [D] = Z.useLazySendAiImageRequestQuery(), [H, { data: B = [] }] = Z.useLazyGetAiImageSSEQuery(), [z] = Z.useLazyGetLimitsStatsByTypeQuery(), V = R?.sendAIImageRequest || D, ee = R?.trigger || H, q = R?.handleLimitUsageEmitter || u.useEventEmitter(u.events.ON_LIMIT_ID), [j, P] = (0, r.useState)(0), [E, x] = (0, r.useState)(null), [S, U] = (0, r.useState)(!1), [_, W] = (0, r.useState)(b("Evaluating the task")), [a, y] = (0, r.useState)(!1), K = A || G, { limits: me } = R?.limits ? R : { limits: { ai_img_limit: 0 } }, { ai_img_limit: T } = me, J = !!(R.limits && R.counters) && u.PLUGIN.isPlugin, $ = u.useEventEmitter(u.events.AI_IMAGE_REQUEST_ID).hasListeners(), F = re.shouldCountAiUsage({
1131
+ function Tt({ setModalHeight: t, customRequest: e, aiTabRef: a, isImageUploaded: o, setIsImageUploaded: i, aiImageRequest: l, imageAiList: d, setImageAiList: g, isLoadingAi: f, setIsLoadingAi: v, onPluginAiImageLimitExceeded: I, onImageGenerateLimitExceeded: w }) {
1132
+ const { __: b } = p.useI18n(), R = u.useAppConfig(), C = p.useNotification(), L = u.usePushToDataLayer(), { emailId: A, blockId: G, projectId: O } = u.useParams(), [D] = Z.useLazySendAiImageRequestQuery(), [H, { data: B = [] }] = Z.useLazyGetAiImageSSEQuery(), [z] = Z.useLazyGetLimitsStatsByTypeQuery(), V = R?.sendAIImageRequest || D, ee = R?.trigger || H, q = R?.handleLimitUsageEmitter || u.useEventEmitter(u.events.ON_LIMIT_ID), [j, P] = (0, n.useState)(0), [E, x] = (0, n.useState)(null), [S, M] = (0, n.useState)(!1), [_, K] = (0, n.useState)(b("Evaluating the task")), [s, y] = (0, n.useState)(!1), W = A || G, { limits: me } = R?.limits ? R : { limits: { ai_img_limit: 0 } }, { ai_img_limit: T } = me, J = !!(R.limits && R.counters) && u.PLUGIN.isPlugin, $ = u.useEventEmitter(u.events.AI_IMAGE_REQUEST_ID).hasListeners(), F = ne.shouldCountAiUsage({
1133
1133
  limitsInPlugin: J,
1134
1134
  hostedAiActive: $
1135
- }), he = !$ && T > 0 && j >= T, ie = (0, r.useCallback)(() => {
1135
+ }), ye = !$ && T > 0 && j >= T, ie = (0, n.useCallback)(() => {
1136
1136
  q.fire({
1137
1137
  name: "AiImgCount",
1138
1138
  count: j + 1
1139
1139
  });
1140
- }, [q, j]), pe = (0, r.useMemo)(() => !he && (!F || T === 0 || j < T), [
1141
- he,
1140
+ }, [q, j]), pe = (0, n.useMemo)(() => !ye && (!F || T === 0 || j < T), [
1141
+ ye,
1142
1142
  F,
1143
1143
  j,
1144
1144
  T
1145
- ]), Ae = (0, r.useCallback)(async () => {
1146
- W(b("Evaluating the task")), l !== "" && !f && (C(!0), y(!0), g([]), L({
1145
+ ]), xe = (0, n.useCallback)(async () => {
1146
+ K(b("Evaluating the task")), l !== "" && !f && (v(!0), y(!0), g([]), L({
1147
1147
  event: "submit_form",
1148
1148
  action: "ai_image_generation",
1149
1149
  entity_id: A,
@@ -1157,18 +1157,18 @@ __emailmaker__.define("static/core/13d868f1.js", [
1157
1157
  if (te) throw te;
1158
1158
  if (h.data.status === 401) throw new Error(u.ERROR);
1159
1159
  if (h?.data?._eventResult) {
1160
- g(h.data.task.images), C(!1), y(!1), W(b("Evaluating the task"));
1160
+ g(h.data.task.images), v(!1), y(!1), K(b("Evaluating the task"));
1161
1161
  return;
1162
1162
  }
1163
- h?.data.status === 200 ? (h?.data.task.id && (W(h.data.task.message), x(h.data.task.id)), h.message && v.success({
1163
+ h?.data.status === 200 ? (h?.data.task.id && (K(h.data.task.message), x(h.data.task.id)), h.message && C.success({
1164
1164
  id: "AI_IMAGE_SEND_SUCCESS",
1165
1165
  title: h.message,
1166
1166
  placement: "bottomRight",
1167
1167
  data: l
1168
1168
  }), ee({
1169
1169
  task_id: h?.data.task.id,
1170
- entity_id: K
1171
- })) : (C(!1), y(!1), v.error({
1170
+ entity_id: W
1171
+ })) : (v(!1), y(!1), C.error({
1172
1172
  id: "AI_IMAGE_SEND_ERROR",
1173
1173
  title: h?.message || b("Something went wrong, please try again"),
1174
1174
  placement: "bottomRight",
@@ -1176,23 +1176,23 @@ __emailmaker__.define("static/core/13d868f1.js", [
1176
1176
  innerException: h
1177
1177
  }));
1178
1178
  }).catch((h) => {
1179
- C(!1), y(!1), (h?.error || h?.data) && v.fromError("AI_IMAGE_SEND_ERROR", l, h.error || h);
1179
+ v(!1), y(!1), (h?.error || h?.data) && C.fromError("AI_IMAGE_SEND_ERROR", l, h.error || h);
1180
1180
  }));
1181
1181
  }, [
1182
1182
  l,
1183
1183
  f,
1184
- C,
1184
+ v,
1185
1185
  y,
1186
1186
  g,
1187
1187
  L,
1188
1188
  A,
1189
1189
  O,
1190
1190
  V,
1191
- v,
1191
+ C,
1192
1192
  ee,
1193
- K,
1193
+ W,
1194
1194
  b
1195
- ]), Y = (0, r.useCallback)(async () => {
1195
+ ]), Y = (0, n.useCallback)(async () => {
1196
1196
  if (pe) {
1197
1197
  if (!u.PLUGIN.isPlugin && !$) {
1198
1198
  const h = N.resolveLimitActionPreflightExceededForType("image_generate", (await z("image_generate")).data?.stats);
@@ -1201,8 +1201,8 @@ __emailmaker__.define("static/core/13d868f1.js", [
1201
1201
  return;
1202
1202
  }
1203
1203
  }
1204
- F && (P((h) => h + 1), ie()), Ae();
1205
- } else J && (I ? I() : v.error({
1204
+ F && (P((h) => h + 1), ie()), xe();
1205
+ } else J && (I ? I() : C.error({
1206
1206
  title: b("The usage limit has been exceeded"),
1207
1207
  description: b(`The maximum number of requests for the current subscription period has been reached.
1208
1208
  Select the appropriate plan to fulfil more requests`),
@@ -1217,26 +1217,26 @@ Select the appropriate plan to fulfil more requests`),
1217
1217
  w,
1218
1218
  P,
1219
1219
  ie,
1220
- Ae,
1221
- v,
1220
+ xe,
1221
+ C,
1222
1222
  b,
1223
1223
  I
1224
1224
  ]);
1225
- (0, r.useEffect)(() => {
1225
+ (0, n.useEffect)(() => {
1226
1226
  J && P(R?.counters?.ai_img_counter || 0);
1227
1227
  }, [R, J]);
1228
- const ne = u.useEventEmitter(u.events.AI_IMAGE_PROGRESS_ID);
1229
- (0, r.useEffect)(() => {
1230
- const h = ne.event(({ progress: te, status: X }) => {
1231
- W(X || `${Math.round(te)}%`);
1228
+ const re = u.useEventEmitter(u.events.AI_IMAGE_PROGRESS_ID);
1229
+ (0, n.useEffect)(() => {
1230
+ const h = re.event(({ progress: te, status: X }) => {
1231
+ K(X || `${Math.round(te)}%`);
1232
1232
  });
1233
1233
  return () => h.dispose();
1234
- }, [ne]);
1235
- const M = (0, r.useCallback)(async (h) => {
1234
+ }, [re]);
1235
+ const U = (0, n.useCallback)(async (h) => {
1236
1236
  if (!o) {
1237
1237
  i(!0);
1238
1238
  try {
1239
- const te = at(h) ? await (await fetch(h)).blob() : Je(h);
1239
+ const te = st(h) ? await (await fetch(h)).blob() : Je(h);
1240
1240
  e({ file: new File([te], "image.jpeg", { type: te.type || "image/jpeg" }) });
1241
1241
  } catch {
1242
1242
  i(!1);
@@ -1246,8 +1246,8 @@ Select the appropriate plan to fulfil more requests`),
1246
1246
  o,
1247
1247
  i,
1248
1248
  e
1249
- ]), se = (0, r.useCallback)((h) => {
1250
- h.status !== "error" && h.status !== "Canceled" ? h.images ? (W(h.status), h.progress === 100 && (g(h.images), W(b("Evaluating the task")), x(null), y(!1))) : (g([h.data]), C(!1)) : (C(!1), y(!1), v.error({
1249
+ ]), ae = (0, n.useCallback)((h) => {
1250
+ h.status !== "error" && h.status !== "Canceled" ? h.images ? (K(h.status), h.progress === 100 && (g(h.images), K(b("Evaluating the task")), x(null), y(!1))) : (g([h.data]), v(!1)) : (v(!1), y(!1), C.error({
1251
1251
  id: "AI_IMAGE_GET_ERROR",
1252
1252
  title: b("Something went wrong, please try again"),
1253
1253
  placement: "bottomRight",
@@ -1255,23 +1255,23 @@ Select the appropriate plan to fulfil more requests`),
1255
1255
  }));
1256
1256
  }, [
1257
1257
  g,
1258
- W,
1258
+ K,
1259
1259
  b,
1260
- C,
1260
+ v,
1261
1261
  t,
1262
1262
  E,
1263
- v,
1263
+ C,
1264
1264
  y
1265
1265
  ]);
1266
- return (0, r.useEffect)(() => {
1267
- B.length > 1 && se(B[B.length - 1]);
1268
- }, [B, se]), (0, r.useEffect)(() => {
1266
+ return (0, n.useEffect)(() => {
1267
+ B.length > 1 && ae(B[B.length - 1]);
1268
+ }, [B, ae]), (0, n.useEffect)(() => {
1269
1269
  (f || d.length > 0) && setTimeout(() => {
1270
1270
  let h = 550;
1271
- s.current && (h = s.current.offsetHeight + 68), t(h);
1271
+ a.current && (h = a.current.offsetHeight + 68), t(h);
1272
1272
  }, 0);
1273
1273
  }, [
1274
- s,
1274
+ a,
1275
1275
  B,
1276
1276
  d.length,
1277
1277
  f,
@@ -1280,70 +1280,70 @@ Select the appropriate plan to fulfil more requests`),
1280
1280
  aiImageCounter: j,
1281
1281
  setAiImageCounter: P,
1282
1282
  currentAiImgLimits: T,
1283
- isFieldsDisabled: he,
1283
+ isFieldsDisabled: ye,
1284
1284
  canGenerateImage: pe,
1285
1285
  aiImageRequest: l,
1286
1286
  imageAiList: d,
1287
1287
  setImageAiList: g,
1288
1288
  isLoadingAi: f,
1289
- setIsLoadingAi: C,
1290
- loadingDuringGeneration: a,
1289
+ setIsLoadingAi: v,
1290
+ loadingDuringGeneration: s,
1291
1291
  setLoadingDuringGeneration: y,
1292
1292
  requestStatus: _,
1293
- setRequestStatus: W,
1293
+ setRequestStatus: K,
1294
1294
  handleGenerate: Y,
1295
1295
  handleLimitAiImgCount: ie,
1296
- convertBase64ToFile: M,
1296
+ convertBase64ToFile: U,
1297
1297
  isShiftPressed: S,
1298
- setIsShiftPressed: U,
1298
+ setIsShiftPressed: M,
1299
1299
  currentReqId: E,
1300
1300
  setCurrentReqId: x,
1301
1301
  limitsInPlugin: J
1302
1302
  };
1303
1303
  }
1304
- var Nt = ({ setModalHeight: t, customRequest: e, aiTabRef: s, inputAiRef: o, isImageUploaded: i, setIsImageUploaded: l, aiImageRequest: d, setAiImageRequest: g, imageAiList: f, setImageAiList: C, isLoadingAi: I, setIsLoadingAi: w }) => {
1305
- const b = u.useNavigate(), R = u.useDispatch(), { __: v, _n: L } = p.useI18n(), A = u.useAppConfig(), [G, O] = (0, r.useState)(!1), [D, H] = (0, r.useState)(null), { aiImageCounter: B, currentAiImgLimits: z, loadingDuringGeneration: V, requestStatus: ee, handleGenerate: q, convertBase64ToFile: j, isShiftPressed: P, setIsShiftPressed: E, limitsInPlugin: x } = Tt({
1304
+ var Nt = ({ setModalHeight: t, customRequest: e, aiTabRef: a, inputAiRef: o, isImageUploaded: i, setIsImageUploaded: l, aiImageRequest: d, setAiImageRequest: g, imageAiList: f, setImageAiList: v, isLoadingAi: I, setIsLoadingAi: w }) => {
1305
+ const b = u.useNavigate(), R = u.useDispatch(), { __: C, _n: L } = p.useI18n(), A = u.useAppConfig(), [G, O] = (0, n.useState)(!1), [D, H] = (0, n.useState)(null), { aiImageCounter: B, currentAiImgLimits: z, loadingDuringGeneration: V, requestStatus: ee, handleGenerate: q, convertBase64ToFile: j, isShiftPressed: P, setIsShiftPressed: E, limitsInPlugin: x } = Tt({
1306
1306
  setModalHeight: t,
1307
1307
  customRequest: e,
1308
- aiTabRef: s,
1308
+ aiTabRef: a,
1309
1309
  isImageUploaded: i,
1310
1310
  setIsImageUploaded: l,
1311
1311
  aiImageRequest: d,
1312
1312
  imageAiList: f,
1313
- setImageAiList: C,
1313
+ setImageAiList: v,
1314
1314
  isLoadingAi: I,
1315
1315
  setIsLoadingAi: w,
1316
1316
  onPluginAiImageLimitExceeded: () => O(!0),
1317
1317
  onImageGenerateLimitExceeded: H
1318
- }), S = G && z > 0 ? re.getAiTariffUpgradeStep(z) : null, U = S ? N.getLimitUpgradePresetDefinition(S.presetId) : null, _ = D ? N.getLimitUpgradePresetDefinition(D.presetId) : null, [W, a] = (0, r.useState)(!1), y = (0, r.useCallback)(() => a(!0), []), K = (0, r.useCallback)(() => a(!1), []), me = (0, r.useCallback)((F) => g(F.target.value), [g]), T = (0, r.useCallback)((F) => {
1318
+ }), S = G && z > 0 ? ne.getAiTariffUpgradeStep(z) : null, M = S ? N.getLimitUpgradePresetDefinition(S.presetId) : null, _ = D ? N.getLimitUpgradePresetDefinition(D.presetId) : null, [K, s] = (0, n.useState)(!1), y = (0, n.useCallback)(() => s(!0), []), W = (0, n.useCallback)(() => s(!1), []), me = (0, n.useCallback)((F) => g(F.target.value), [g]), T = (0, n.useCallback)((F) => {
1319
1319
  F.key === "Shift" ? E(!0) : F.key === "Enter" && !P && (F.preventDefault(), q());
1320
1320
  }, [
1321
1321
  P,
1322
1322
  q,
1323
1323
  E
1324
- ]), J = (0, r.useCallback)((F) => {
1324
+ ]), J = (0, n.useCallback)((F) => {
1325
1325
  F.key === "Shift" && E(!1);
1326
1326
  }, [E]), $ = f[f.length - 1];
1327
- return (0, n.jsxs)("div", {
1327
+ return (0, r.jsxs)("div", {
1328
1328
  className: "image-ai",
1329
1329
  children: [
1330
- U && S ? (0, n.jsx)(N.LimitUpgradeModal, {
1330
+ M && S ? (0, r.jsx)(N.LimitUpgradeModal, {
1331
1331
  open: !0,
1332
1332
  onClose: () => O(!1),
1333
- title: v(U.titleKey),
1334
- subtitle: v(U.subtitleKey),
1335
- usageResource: U.usageResource,
1333
+ title: C(M.titleKey),
1334
+ subtitle: C(M.subtitleKey),
1335
+ usageResource: M.usageResource,
1336
1336
  previousDisplay: N.presetLimitDisplay(S.previousLimit),
1337
1337
  nextDisplay: N.presetLimitDisplay(S.nextLimit),
1338
1338
  onChangePlan: () => {
1339
1339
  O(!1), document.body.classList.remove("editor"), b("/billing"), R(Z.openModal(u.MODALS.SWITCH_TO_PLAN_MODAL));
1340
1340
  }
1341
1341
  }) : null,
1342
- _ && D ? (0, n.jsx)(N.LimitUpgradeModal, {
1342
+ _ && D ? (0, r.jsx)(N.LimitUpgradeModal, {
1343
1343
  open: !0,
1344
1344
  onClose: () => H(null),
1345
- title: v(_.titleKey),
1346
- subtitle: v(_.subtitleKey),
1345
+ title: C(_.titleKey),
1346
+ subtitle: C(_.subtitleKey),
1347
1347
  usageResource: _.usageResource,
1348
1348
  previousDisplay: N.presetLimitDisplay(D.previousLimit),
1349
1349
  nextDisplay: N.presetLimitDisplay(D.nextLimit),
@@ -1351,48 +1351,48 @@ Select the appropriate plan to fulfil more requests`),
1351
1351
  H(null), document.body.classList.remove("editor"), b("/billing"), R(Z.openModal(u.MODALS.SWITCH_TO_PLAN_MODAL));
1352
1352
  }
1353
1353
  }) : null,
1354
- x && (0, n.jsx)(p.LimitsCounter, {
1355
- text: `${B} ${v("of")} ${z > 0 ? z : "∞"} images ${L("was used", "were used", B)}`,
1354
+ x && (0, r.jsx)(p.LimitsCounter, {
1355
+ text: `${B} ${C("of")} ${z > 0 ? z : "∞"} images ${L("was used", "were used", B)}`,
1356
1356
  exceeded: z > 0 && B >= z,
1357
1357
  style: { marginTop: -25 },
1358
- extra: (0, n.jsx)("span", {
1358
+ extra: (0, r.jsx)("span", {
1359
1359
  style: {
1360
1360
  textDecoration: "underline",
1361
1361
  cursor: "pointer"
1362
1362
  },
1363
1363
  onClick: () => b(A.billingPageUrl || u.APP_ROUTES.billing),
1364
- children: v("Need more?")
1364
+ children: C("Need more?")
1365
1365
  })
1366
1366
  }),
1367
- (0, n.jsx)(p.Row, {
1367
+ (0, r.jsx)(p.Row, {
1368
1368
  gutter: 24,
1369
1369
  className: "image-ai__row",
1370
- children: (0, n.jsx)(p.Col, {
1370
+ children: (0, r.jsx)(p.Col, {
1371
1371
  span: 24,
1372
- children: (0, n.jsx)(p.Form.Item, {
1372
+ children: (0, r.jsx)(p.Form.Item, {
1373
1373
  style: { margin: 0 },
1374
- children: (0, n.jsxs)("span", {
1375
- className: `ant-input-affix-wrapper ant-input-affix-wrapper-lg image-ai__input-affix-wrapper${W ? " ant-input-affix-wrapper-focused" : ""}`,
1376
- children: [(0, n.jsx)(p.TextArea, {
1374
+ children: (0, r.jsxs)("span", {
1375
+ className: `ant-input-affix-wrapper ant-input-affix-wrapper-lg image-ai__input-affix-wrapper${K ? " ant-input-affix-wrapper-focused" : ""}`,
1376
+ children: [(0, r.jsx)(p.TextArea, {
1377
1377
  ref: o,
1378
1378
  onKeyDown: T,
1379
1379
  onKeyUp: J,
1380
1380
  onFocus: y,
1381
- onBlur: K,
1381
+ onBlur: W,
1382
1382
  autoSize: !0,
1383
1383
  allowClear: !0,
1384
1384
  className: "text-area-input-hybrid image-ai__textarea",
1385
- placeholder: v("Generate image"),
1385
+ placeholder: C("Generate image"),
1386
1386
  value: d,
1387
1387
  onChange: me,
1388
1388
  spellCheck: "false"
1389
- }), (0, n.jsx)("span", {
1389
+ }), (0, r.jsx)("span", {
1390
1390
  className: "ant-input-suffix image-ai__input-suffix",
1391
- children: I || V ? (0, n.jsx)(N.EmIcons, {
1391
+ children: I || V ? (0, r.jsx)(N.EmIcons, {
1392
1392
  icon: "LoadingOutlined",
1393
1393
  className: "input-icon image-ai__input-icon",
1394
1394
  spin: !0
1395
- }) : (0, n.jsx)(N.EmIcons, {
1395
+ }) : (0, r.jsx)(N.EmIcons, {
1396
1396
  icon: "AI",
1397
1397
  className: "input-icon image-ai__input-icon",
1398
1398
  onClick: q
@@ -1402,110 +1402,110 @@ Select the appropriate plan to fulfil more requests`),
1402
1402
  })
1403
1403
  })
1404
1404
  }),
1405
- (I || f.length > 0) && (0, n.jsxs)("div", {
1405
+ (I || f.length > 0) && (0, r.jsxs)("div", {
1406
1406
  className: "image-ai__preview",
1407
- children: [I && f.length === 0 && (0, n.jsx)("div", {
1407
+ children: [I && f.length === 0 && (0, r.jsx)("div", {
1408
1408
  className: "image-ai__loading",
1409
- children: (0, n.jsxs)("div", {
1409
+ children: (0, r.jsxs)("div", {
1410
1410
  className: "spin",
1411
- children: [(0, n.jsx)(N.EmIcons, {
1411
+ children: [(0, r.jsx)(N.EmIcons, {
1412
1412
  icon: "LoadingOutlined",
1413
1413
  style: { fontSize: 48 },
1414
1414
  spin: !0
1415
- }), (0, n.jsx)("p", {
1415
+ }), (0, r.jsx)("p", {
1416
1416
  className: "status",
1417
1417
  children: ee
1418
1418
  })]
1419
1419
  })
1420
- }), f.length > 0 && (0, n.jsxs)("div", {
1420
+ }), f.length > 0 && (0, r.jsxs)("div", {
1421
1421
  className: "image-ai__image-item",
1422
- children: [(0, n.jsx)(Pt, { images: f }), (0, n.jsx)("div", {
1422
+ children: [(0, r.jsx)(Pt, { images: f }), (0, r.jsx)("div", {
1423
1423
  className: "buttons",
1424
- children: (0, n.jsx)(p.Button, {
1424
+ children: (0, r.jsx)(p.Button, {
1425
1425
  onClick: () => j($),
1426
- icon: (0, n.jsx)(N.EmIcons, { icon: "CheckOutlined" }),
1427
- children: v("Use this one")
1426
+ icon: (0, r.jsx)(N.EmIcons, { icon: "CheckOutlined" }),
1427
+ children: C("Use this one")
1428
1428
  })
1429
1429
  })]
1430
1430
  })]
1431
1431
  })
1432
1432
  ]
1433
1433
  });
1434
- }, Gt = ({ setNewLink: t, setCurrentImageLink: e, setModalHeight: s, setModalWidth: o, setImageGifList: i, imageGifList: l, currentReqGif: d, setCurrentReqGif: g, inputRef: f, setStockLink: C, customRequest: I }) => {
1435
- const { __: w } = p.useI18n(), b = u.useAppConfig(), R = u.useIsStandalone(), v = p.useNotification(), [L, A] = (0, r.useState)(null), [G, O] = (0, r.useState)(!1), [D, H] = (0, r.useState)(25), [B] = Z.useLazyGetSearchGifQuery(), z = (0, r.useCallback)((a) => a instanceof Error || typeof a?.message == "string" && a.message ? a.message : typeof a?.error?.message == "string" && a.error.message ? a.error.message : w("Failed to load GIFs through the configured proxy chain."), [w]), V = (0, r.useCallback)((a) => {
1436
- v.error({
1434
+ }, Gt = ({ setNewLink: t, setCurrentImageLink: e, setModalHeight: a, setModalWidth: o, setImageGifList: i, imageGifList: l, currentReqGif: d, setCurrentReqGif: g, inputRef: f, setStockLink: v, customRequest: I }) => {
1435
+ const { __: w } = p.useI18n(), b = u.useAppConfig(), R = u.useIsStandalone(), C = p.useNotification(), [L, A] = (0, n.useState)(null), [G, O] = (0, n.useState)(!1), [D, H] = (0, n.useState)(25), [B] = Z.useLazyGetSearchGifQuery(), z = (0, n.useCallback)((s) => s instanceof Error || typeof s?.message == "string" && s.message ? s.message : typeof s?.error?.message == "string" && s.error.message ? s.error.message : w("Failed to load GIFs through the configured proxy chain."), [w]), V = (0, n.useCallback)((s) => {
1436
+ C.error({
1437
1437
  id: "STOCK_GIFS_SEARCH_FAILED",
1438
1438
  title: w("Failed to load GIFs"),
1439
- description: z(a)
1439
+ description: z(s)
1440
1440
  });
1441
1441
  }, [
1442
1442
  w,
1443
1443
  z,
1444
- v
1444
+ C
1445
1445
  ]), ee = async () => {
1446
1446
  G || (O(!0), B({
1447
1447
  query: d,
1448
1448
  page: D
1449
- }).then((a) => {
1450
- if (a?.error) {
1451
- V(a.error), O(!1);
1449
+ }).then((s) => {
1450
+ if (s?.error) {
1451
+ V(s.error), O(!1);
1452
1452
  return;
1453
1453
  }
1454
- i((y) => [...y, ...a.data.data]), O(!1), H((y) => y + 25);
1454
+ i((y) => [...y, ...s.data.data]), O(!1), H((y) => y + 25);
1455
1455
  }).catch(() => {
1456
1456
  O(!1);
1457
1457
  }));
1458
1458
  }, q = async () => {
1459
- const a = await B({
1459
+ const s = await B({
1460
1460
  query: d,
1461
1461
  page: 0
1462
1462
  });
1463
- if (a?.error) {
1464
- V(a.error), i([]);
1463
+ if (s?.error) {
1464
+ V(s.error), i([]);
1465
1465
  return;
1466
1466
  }
1467
- a?.data?.data?.length > 0 && (i(a.data.data), setTimeout(() => {
1468
- s("84vh"), o(1060);
1467
+ s?.data?.data?.length > 0 && (i(s.data.data), setTimeout(() => {
1468
+ a("84vh"), o(1060);
1469
1469
  }, 0));
1470
- }, j = (a, y) => {
1470
+ }, j = (s, y) => {
1471
1471
  A(y), setTimeout(() => {
1472
1472
  A(null);
1473
- }, 2e3), C(`${a}`), e(`${a}`), I(`${a}`);
1474
- }, P = { default: 3 }, E = (0, r.useCallback)((a) => u.getProxiedUrl(a, {
1473
+ }, 2e3), v(`${s}`), e(`${s}`), I(`${s}`);
1474
+ }, P = { default: 3 }, E = (0, n.useCallback)((s) => u.getProxiedUrl(s, {
1475
1475
  config: b,
1476
1476
  standalone: R,
1477
1477
  resourceType: "generic",
1478
1478
  intent: "display"
1479
- }), [b, R]), { getDisplaySrc: x, handleLoad: S, handleError: U } = rt({
1479
+ }), [b, R]), { getDisplaySrc: x, handleLoad: S, handleError: M } = nt({
1480
1480
  items: l,
1481
- getItemId: (0, r.useCallback)((a) => a.id, []),
1482
- getRequestUrl: (0, r.useCallback)((a) => a.images.downsized.url, []),
1481
+ getItemId: (0, n.useCallback)((s) => s.id, []),
1482
+ getRequestUrl: (0, n.useCallback)((s) => s.images.downsized.url, []),
1483
1483
  createController: E
1484
- }), _ = (a) => (y) => {
1485
- S(a), y.target.parentNode.classList.add("loaded");
1486
- }, W = (a) => () => {
1487
- U(a);
1484
+ }), _ = (s) => (y) => {
1485
+ S(s), y.target.parentNode.classList.add("loaded");
1486
+ }, K = (s) => () => {
1487
+ M(s);
1488
1488
  };
1489
- return (0, n.jsxs)("div", {
1489
+ return (0, r.jsxs)("div", {
1490
1490
  className: "stock-tab",
1491
- children: [(0, n.jsxs)(p.Form, {
1491
+ children: [(0, r.jsxs)(p.Form, {
1492
1492
  onValuesChange: q,
1493
1493
  className: l.length > 0 ? "serach-results" : "",
1494
- children: [(0, n.jsx)(p.Row, {
1494
+ children: [(0, r.jsx)(p.Row, {
1495
1495
  gutter: 24,
1496
- children: (0, n.jsx)(p.Col, {
1496
+ children: (0, r.jsx)(p.Col, {
1497
1497
  span: l.length > 0 ? "" : 24,
1498
- children: (0, n.jsx)(p.Form.Item, {
1498
+ children: (0, r.jsx)(p.Form.Item, {
1499
1499
  className: "stock-search-input",
1500
- children: (0, n.jsx)(p.SearchInput, {
1500
+ children: (0, r.jsx)(p.SearchInput, {
1501
1501
  onSearch: q,
1502
1502
  allowClear: !0,
1503
1503
  size: l.length > 0 ? "medium" : "large",
1504
1504
  placeholder: w("Search GIFs"),
1505
1505
  value: d.keywords,
1506
- onChange: (a) => g((y) => ({
1506
+ onChange: (s) => g((y) => ({
1507
1507
  ...y,
1508
- keywords: a.target.value
1508
+ keywords: s.target.value
1509
1509
  })),
1510
1510
  ref: f,
1511
1511
  spellCheck: "false",
@@ -1513,17 +1513,17 @@ Select the appropriate plan to fulfil more requests`),
1513
1513
  })
1514
1514
  })
1515
1515
  })
1516
- }), l.length > 0 && (0, n.jsx)("div", {
1516
+ }), l.length > 0 && (0, r.jsx)("div", {
1517
1517
  className: "blocks-search__divider-wrapper",
1518
- children: (0, n.jsx)("div", {
1518
+ children: (0, r.jsx)("div", {
1519
1519
  className: "ant-divider ant-divider-horizontal",
1520
1520
  role: "separator"
1521
1521
  })
1522
1522
  })]
1523
- }), (0, n.jsx)("div", {
1523
+ }), (0, r.jsx)("div", {
1524
1524
  className: "serach-output-wrapper",
1525
1525
  style: { marginRight: -10 },
1526
- children: l.length > 0 && (0, n.jsx)("div", {
1526
+ children: l.length > 0 && (0, r.jsx)("div", {
1527
1527
  id: "scrollableDiv",
1528
1528
  style: {
1529
1529
  width: "100%",
@@ -1536,49 +1536,49 @@ Select the appropriate plan to fulfil more requests`),
1536
1536
  lineHeight: "0",
1537
1537
  boxSizing: "unset"
1538
1538
  },
1539
- children: (0, n.jsx)(et, {
1539
+ children: (0, r.jsx)(et, {
1540
1540
  dataLength: l && l.length,
1541
1541
  next: ee,
1542
1542
  hasMore: l,
1543
- endMessage: (0, n.jsxs)(p.Divider, {
1543
+ endMessage: (0, r.jsxs)(p.Divider, {
1544
1544
  plain: !0,
1545
1545
  children: [w("That`s all we could find."), " 🤐"]
1546
1546
  }),
1547
1547
  scrollableTarget: "scrollableDiv",
1548
1548
  style: { overflow: "visible" },
1549
- loader: (0, n.jsx)(p.Spin, { size: "small" }),
1550
- children: (0, n.jsx)(Ne, {
1549
+ loader: (0, r.jsx)(p.Spin, { size: "small" }),
1550
+ children: (0, r.jsx)(Ge, {
1551
1551
  breakpointCols: P,
1552
1552
  className: "my-masonry-grid",
1553
1553
  columnClassName: "my-masonry-grid_column",
1554
- children: l.map((a, y) => (0, n.jsxs)("div", {
1554
+ children: l.map((s, y) => (0, r.jsxs)("div", {
1555
1555
  className: "list-item",
1556
- onClick: () => j(a.images.downsized.url, a.id),
1556
+ onClick: () => j(s.images.downsized.url, s.id),
1557
1557
  children: [
1558
- (0, n.jsx)("img", {
1559
- className: L === a.id ? "loaded-image" : "",
1558
+ (0, r.jsx)("img", {
1559
+ className: L === s.id ? "loaded-image" : "",
1560
1560
  width: "322px",
1561
- src: x(a),
1562
- alt: a.title,
1563
- onLoad: _(a),
1564
- onError: W(a)
1561
+ src: x(s),
1562
+ alt: s.title,
1563
+ onLoad: _(s),
1564
+ onError: K(s)
1565
1565
  }),
1566
- (0, n.jsx)("a", {
1566
+ (0, r.jsx)("a", {
1567
1567
  rel: "noreferrer",
1568
1568
  href: "https://giphy.com/",
1569
1569
  target: "_blank",
1570
- onClick: (K) => K.stopPropagation(),
1571
- children: (0, n.jsx)("div", {
1570
+ onClick: (W) => W.stopPropagation(),
1571
+ children: (0, r.jsx)("div", {
1572
1572
  className: "overlay-image",
1573
1573
  style: { backgroundImage: "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAkCAYAAAB/up84AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABSBJREFUeNrsWjFv2zoQVoMW8BZ18xaN3qLRW9QtW9OtW92to98vaPoP3K1b1S1b3c2jvWlUNm3lw1s8Mpu3PAo4Iocr70jKlp0COuCQlpKPx/t43x1pv3h8fEwGeT5yNoTgeclLZvza6NgxXoNaGRktjE6MpjC2NVqh92bwt4HxBI1ro0s0dgN2tvD5a8a/9vkq0M+xYKdG81A7Gp6pyBjZddrnO6N36Hkbqyn8u4L3vYC0hjLHeAbPVhC4TwAK/ewNvLsEhyxgFXLK2l/D4tvnOVrUiPEh1k/JjvLYyWENdeTcKazBBr6AdY4AqBTmbkIzhO4gvMumYLxAYKzgPTvhBBajYNwCksHYhOyYiow1KONaKYlfO8bPEWyGEfi5Iu+Vjizg7EzB3xvwWTMxWkHG4mDnMF6BnSnYncLzHWGG4BqiwZkKQMC7I0cOVTCJhvRUKNgNCmCOxhNmrBEWzwGi0Y6rIihbsnOH/JgE2hshKrLZv4Px9yhj1twafRlid/UIGWvlFdlVLirIkIM12nETGLeO2tTPECBUZuT/a7JBMpSxUybYLjulUCN2iEpHQoyuGWZJUCa8R/VGSZvGB0iOdjAO9n8EtC2zUxICSIoW0ICTmA53DCDKQzWZg89XAXZ2B2iMavBnjDKpBX6B1tnAM5aqQgGhnU2D6GmHuqw7AkaOPmP/bsHpFC1kTLqVhglS6fFNgX1MCXUHO1zR1h5AFOoSc1jjmKx/An/1PoBQasBSoZZ3hpyaOrg0IW2sRkG8JsU8CaCaLckAhfi6AG0cmeuzkyMQMtL+SiySkY3oA/EgGeICK0UOZYQKVsQpDAjm2BpsaAGQLMKnMdok3yLtpKS70yT7OUBcm7UTHb5grk5y1Csrj40MqUbUpgW7NXo+RunckODkQvdXM37iwm7b1VA7lAaVB4jUUZOUIzNxfOougAwy3GUN0qWG2IJJ09V2NcvIFE8c54nQelEHFM6C6chUhI+WZjjffDQkrenPhqmlrAC9Naof/aLhXZeNNfMZOk+MtPOVRjNmTpfcCut0+biGZ3PBj1ywWTOfqV3v+yjLFuDPRs8Ddu05vLtmsuHQ0s73wehvR0t7aGkPevfCM5fcGr0MbOW9NSSFwF52cP5KcLIv+X4EUGbCemcOqpoz73/haE4CZNkRjAR20vwENXHRc2bWEMyQuUuGVe4hc6K6rBmg7pKN0XdGX7dts9E3Rr8afUATFl1PqgLAG6T3AoX1nSVtMP9l5r5FVyiu+D14/YssRHOheGVQYNMeinrhsMcV2WVPRR1rIRT4QmiA5r4G6oxp0y6ZzFh4LvhmB84MHz1xta9vWQMrcFR/3iF+7DmEu2YoyTshRbuMvGE9hnwGPQR1tdR04aCueKrqAIgiu/AqcCf1JXPhfuoYosGHn4Hgqa6AnCK4IfSkCa1eCJRxLGnn+mX0rfDOJok4AsQAUpwQlND2++HIgNiOVO1LVRIgtXDPs0bpunEU08vktHLMpoJS1/d9qEo6h6gAzq7RRaPV+QmBeICzUUh2fIHzk0s3HedXwkEy2ReQmjn4XDzDjqkN4D/J04/y/np5KbSrrtbwAyx+kTxdf9tfpvSZIW9O3FScHJAF8PEFc5F2lQzSi5wJheoG3U/t0xYOcgBAcOHuAkr7mY9ditoAiCz2q8uvEcD8gJpSDuGNl5hfnaTJ0/fpheMUr4CitHCO6fqdesj359xh1tWiqggfdUCmcz9ZivZ7+BnQM5P/BRgABx8sJWqTxoYAAAAASUVORK5CYII=)" }
1574
1574
  })
1575
1575
  }),
1576
- L === a.id && (0, n.jsx)(p.Spin, {
1576
+ L === s.id && (0, r.jsx)(p.Spin, {
1577
1577
  className: "ant-spin",
1578
1578
  size: "small"
1579
1579
  })
1580
1580
  ]
1581
- }, a.id + y))
1581
+ }, s.id + y))
1582
1582
  })
1583
1583
  })
1584
1584
  })
@@ -1592,32 +1592,32 @@ Select the appropriate plan to fulfil more requests`),
1592
1592
  if (t) {
1593
1593
  if (t.url) return t.url;
1594
1594
  if (typeof e.getFileById == "function" && t.id) {
1595
- const s = await e.getFileById(t.id);
1596
- if (s?.url) return s.url;
1597
- if (s?.thumbnailUrl) return s.thumbnailUrl;
1598
- if (s?.thumbnail) return s.thumbnail;
1595
+ const a = await e.getFileById(t.id);
1596
+ if (a?.url) return a.url;
1597
+ if (a?.thumbnailUrl) return a.thumbnailUrl;
1598
+ if (a?.thumbnail) return a.thumbnail;
1599
1599
  }
1600
1600
  if (typeof e.getFileUrl == "function" && t.folderId !== void 0 && t.name) {
1601
- const s = await e.getFileUrl(t.folderId || "", t.name);
1602
- if (s) return s;
1601
+ const a = await e.getFileUrl(t.folderId || "", t.name);
1602
+ if (a) return a;
1603
1603
  }
1604
1604
  if (typeof e.getUrl == "function" && t.name) {
1605
- const s = await e.getUrl(t);
1606
- if (s) return s;
1605
+ const a = await e.getUrl(t);
1606
+ if (a) return a;
1607
1607
  }
1608
1608
  return t.thumbnail || t.thumbnailUrl;
1609
1609
  }
1610
1610
  }
1611
- function Wt(t) {
1611
+ function Kt(t) {
1612
1612
  if (!(!t?.success || !Array.isArray(t.detailed))) return t.detailed.find((e) => e?.success && e.data)?.data;
1613
1613
  }
1614
- function Kt(t, e, s) {
1614
+ function Wt(t, e, a) {
1615
1615
  if (t) return {
1616
1616
  id: t.id,
1617
1617
  name: t.name || e.name,
1618
1618
  size: t.size ?? e.size,
1619
1619
  type: t.type || e.type,
1620
- folderId: t.folderId ?? s ?? "",
1620
+ folderId: t.folderId ?? a ?? "",
1621
1621
  url: t.url,
1622
1622
  thumbnail: t.thumbnail,
1623
1623
  thumbnailUrl: t.thumbnailUrl,
@@ -1631,11 +1631,11 @@ Select the appropriate plan to fulfil more requests`),
1631
1631
  childrenCount: t.childrenCount
1632
1632
  };
1633
1633
  }
1634
- async function Ht(t, e, s) {
1634
+ async function Ht(t, e, a) {
1635
1635
  if (!e) return;
1636
- const o = Ft(s ?? e.rootId);
1636
+ const o = Ft(a ?? e.rootId);
1637
1637
  let i;
1638
- typeof e.uploadFiles == "function" ? i = Wt(await e.uploadFiles({
1638
+ typeof e.uploadFiles == "function" ? i = Kt(await e.uploadFiles({
1639
1639
  folderId: o,
1640
1640
  items: [{
1641
1641
  name: t.name,
@@ -1644,7 +1644,7 @@ Select the appropriate plan to fulfil more requests`),
1644
1644
  folderId: o,
1645
1645
  data: t
1646
1646
  }]
1647
- })) : typeof e.uploadFile == "function" && (i = Kt(await e.uploadFile({
1647
+ })) : typeof e.uploadFile == "function" && (i = Wt(await e.uploadFile({
1648
1648
  name: t.name,
1649
1649
  size: t.size,
1650
1650
  type: t.type,
@@ -1657,31 +1657,31 @@ Select the appropriate plan to fulfil more requests`),
1657
1657
  url: l
1658
1658
  } : void 0;
1659
1659
  }
1660
- var st = "IMG", ot = "BACKGROUND", Vt = "GALLERY", we = "EDITOR", fe = "UPLOAD", Fe = "STOCK", ze = "GIF", We = "AI", qt = { mode: "select" }, Qt = { mode: "save" }, { Dragger: _t } = p.Upload, Yt = (t, e = "image") => Z.decodeFileNameFromUrl(t) ?? e, Ee = re.normalizeImageFormatForDisplay, Zt = (t, e) => {
1661
- const s = Ee(e);
1662
- return !s || t.includes(".") ? t : `${t}.${s}`;
1660
+ var at = "IMG", ot = "BACKGROUND", Vt = "GALLERY", Ae = "EDITOR", fe = "UPLOAD", ze = "STOCK", Ke = "GIF", We = "AI", qt = { mode: "select" }, Qt = { mode: "save" }, { Dragger: _t } = p.Upload, Yt = (t, e = "image") => Z.decodeFileNameFromUrl(t) ?? e, Ee = ne.normalizeImageFormatForDisplay, Zt = (t, e) => {
1661
+ const a = Ee(e);
1662
+ return !a || t.includes(".") ? t : `${t}.${a}`;
1663
1663
  }, Xt = (t, e) => new File([t], Zt(Yt(e), t.type), { type: t.type || "application/octet-stream" }), it = ({ dataProvider: t }) => {
1664
- const e = u.useAppConfig(), s = u.useIsStandalone(), { __: o } = p.useI18n(), i = u.useDispatch(), { projectId: l } = u.useParams(), [d] = Z.useLazyGetImageInfoQuery(), { modal: g } = p.App.useApp(), f = p.useNotification(), C = u.useSelector(Z.selectActiveModal), { request: I, resolveImagePicker: w } = N.useImagePicker(), [b, R] = (0, r.useState)(""), [v, L] = (0, r.useState)(""), [A, G] = (0, r.useState)(""), [O, D] = (0, r.useState)(""), [H, B] = (0, r.useState)(fe), [z, V] = (0, r.useState)({
1664
+ const e = u.useAppConfig(), a = u.useIsStandalone(), { __: o } = p.useI18n(), i = u.useDispatch(), { projectId: l } = u.useParams(), [d] = Z.useLazyGetImageInfoQuery(), { modal: g } = p.App.useApp(), f = p.useNotification(), v = u.useSelector(Z.selectActiveModal), { request: I, resolveImagePicker: w } = N.useImagePicker(), [b, R] = (0, n.useState)(""), [C, L] = (0, n.useState)(""), [A, G] = (0, n.useState)(""), [O, D] = (0, n.useState)(""), [H, B] = (0, n.useState)(fe), [z, V] = (0, n.useState)({
1665
1665
  width: "",
1666
1666
  height: "",
1667
1667
  size: "",
1668
1668
  format: ""
1669
- }), [ee, q] = (0, r.useState)("success"), [j, P] = (0, r.useState)(!1), E = r.default.useRef(null), x = r.default.useRef(null), S = r.default.useRef(null), U = r.default.useRef(null), _ = r.default.useRef(null), W = r.default.useRef(null), a = r.default.useRef(null), y = r.default.useRef(null), K = r.default.useRef(null), [me, T] = (0, r.useState)("auto"), [J, $] = (0, r.useState)(572), [F, he] = (0, r.useState)(!1), [ie, pe] = (0, r.useState)({
1669
+ }), [ee, q] = (0, n.useState)("success"), [j, P] = (0, n.useState)(!1), E = n.default.useRef(null), x = n.default.useRef(null), S = n.default.useRef(null), M = n.default.useRef(null), _ = n.default.useRef(null), K = n.default.useRef(null), s = n.default.useRef(null), y = n.default.useRef(null), W = n.default.useRef(null), [me, T] = (0, n.useState)("auto"), [J, $] = (0, n.useState)(572), [F, ye] = (0, n.useState)(!1), [ie, pe] = (0, n.useState)({
1670
1670
  keywords: "",
1671
1671
  color: "",
1672
1672
  orientation: ""
1673
- }), [Ae, Y] = (0, r.useState)({ keywords: "" }), [ne, M] = (0, r.useState)([]), [se, h] = (0, r.useState)([]), [te, X] = (0, r.useState)([]), [ue, lt] = (0, r.useState)(!1), [ct, Ke] = (0, r.useState)(""), [Jt, je] = (0, r.useState)(!1), [$t, Be] = (0, r.useState)(0), He = u.useSelector(u.selectProject), ut = He?.id !== void 0 ? String(He.id) : l || "", dt = u.useEventEmitter(u.events.UPLOAD_EVENT_ID), xe = r.default.useRef(re.createImageUrlBlobResolver()), Ve = r.default.useRef(""), Ce = r.default.useRef(0), Ie = r.default.useRef(""), [er, ft] = (0, r.useState)(""), [tr, mt] = (0, r.useState)(null), [rr, qe] = (0, r.useState)(""), Ue = (0, r.useCallback)((c) => {
1673
+ }), [xe, Y] = (0, n.useState)({ keywords: "" }), [re, U] = (0, n.useState)([]), [ae, h] = (0, n.useState)([]), [te, X] = (0, n.useState)([]), [ue, lt] = (0, n.useState)(!1), [ct, He] = (0, n.useState)(""), [Jt, je] = (0, n.useState)(!1), [$t, Me] = (0, n.useState)(0), Ve = u.useSelector(u.selectProject), ut = Ve?.id !== void 0 ? String(Ve.id) : l || "", dt = u.useEventEmitter(u.events.UPLOAD_EVENT_ID), ge = ne.useImageBlobResolver(), Oe = n.default.useRef(""), be = n.default.useRef(0), Ie = n.default.useRef(""), [en, ft] = (0, n.useState)(""), [tn, mt] = (0, n.useState)(null), [nn, qe] = (0, n.useState)(""), Ue = (0, n.useCallback)((c) => {
1674
1674
  if (!(c instanceof Blob)) return;
1675
1675
  Ie.current && URL.revokeObjectURL(Ie.current);
1676
1676
  const m = URL.createObjectURL(c);
1677
1677
  Ie.current = m, ft(m), mt(c);
1678
- }, []), ge = (0, r.useCallback)(() => {
1678
+ }, []), he = (0, n.useCallback)(() => {
1679
1679
  Ie.current && (URL.revokeObjectURL(Ie.current), Ie.current = ""), ft(""), mt(null);
1680
- }, []), le = (0, r.useCallback)(() => {
1680
+ }, []), le = (0, n.useCallback)(() => {
1681
1681
  qe("");
1682
- }, []), ye = N.isEditorLockedByPlan(He, { isPlugin: u.PLUGIN.isPlugin }), nr = (c) => {
1682
+ }, []), ve = N.isEditorLockedByPlan(Ve, { isPlugin: u.PLUGIN.isPlugin }), rn = (c) => {
1683
1683
  L(c.target.value);
1684
- }, Me = (0, r.useCallback)((c, m, k = o("The image could not be uploaded.")) => {
1684
+ }, Pe = (0, n.useCallback)((c, m, k = o("The image could not be uploaded.")) => {
1685
1685
  const Q = m instanceof Error ? m.message : k;
1686
1686
  f.error({
1687
1687
  id: "IMAGE_UPLOAD_ERROR",
@@ -1689,20 +1689,20 @@ Select the appropriate plan to fulfil more requests`),
1689
1689
  title: o("Upload failed"),
1690
1690
  description: Q
1691
1691
  });
1692
- }, [o, f]), ar = (0, r.useCallback)(async (c) => N.pickUploadImageUrlFromFireResults(await dt.fire({
1692
+ }, [o, f]), sn = (0, n.useCallback)(async (c) => N.pickUploadImageUrlFromFireResults(await dt.fire({
1693
1693
  file: c,
1694
1694
  project: ut
1695
- })), [ut, dt]), be = re.useImageBlobFetch(), sr = (0, r.useCallback)((c) => xe.current.resolve(re.canonicalImageUrlKey(c), void 0, be), [be]), Pe = async (c) => {
1695
+ })), [ut, dt]), we = ne.useImageBlobFetch(), an = (0, n.useCallback)((c) => ge.resolve(ne.canonicalImageUrlKey(c), void 0, we), [we, ge]), Te = async (c) => {
1696
1696
  if (c) try {
1697
- const m = await or(c);
1698
- m && _e(m) ? await Oe({ file: m }) : m || Me({ url: c }, null, o("Failed to download image from URL."));
1697
+ const m = await on(c);
1698
+ m && _e(m) ? await Le({ file: m }) : m || Pe({ url: c }, null, o("Failed to download image from URL."));
1699
1699
  } catch (m) {
1700
- Me({ url: c }, m, o("Failed to process image URL."));
1700
+ Pe({ url: c }, m, o("Failed to process image URL."));
1701
1701
  }
1702
- }, pt = r.default.useRef(Pe);
1703
- pt.current = Pe, r.default.useEffect(() => {
1702
+ }, pt = n.default.useRef(Te);
1703
+ pt.current = Te, n.default.useEffect(() => {
1704
1704
  if (H !== fe || !O) return;
1705
- const c = v.trim();
1705
+ const c = C.trim();
1706
1706
  if (!c || !c.toLowerCase().startsWith("http")) return;
1707
1707
  const m = setTimeout(() => {
1708
1708
  pt.current(c);
@@ -1711,14 +1711,14 @@ Select the appropriate plan to fulfil more requests`),
1711
1711
  clearTimeout(m);
1712
1712
  };
1713
1713
  }, [
1714
- v,
1714
+ C,
1715
1715
  H,
1716
1716
  O
1717
1717
  ]);
1718
- const or = async (c) => {
1718
+ const on = async (c) => {
1719
1719
  try {
1720
- const m = re.canonicalImageUrlKey(c);
1721
- return Xt(await xe.current.resolve(m, void 0, be), m);
1720
+ const m = ne.canonicalImageUrlKey(c);
1721
+ return Xt(await ge.resolve(m, void 0, we), m);
1722
1722
  } catch {}
1723
1723
  };
1724
1724
  document.onpaste = function(c) {
@@ -1728,7 +1728,7 @@ Select the appropriate plan to fulfil more requests`),
1728
1728
  const Q = m.getAsFile();
1729
1729
  _e(Q);
1730
1730
  const oe = { file: Q };
1731
- L(""), Oe(oe);
1731
+ L(""), Le(oe);
1732
1732
  return;
1733
1733
  }
1734
1734
  const k = c.clipboardData?.getData("text/plain");
@@ -1744,36 +1744,36 @@ Select the appropriate plan to fulfil more requests`),
1744
1744
  }
1745
1745
  });
1746
1746
  }
1747
- }, (0, r.useEffect)(() => {
1747
+ }, (0, n.useEffect)(() => {
1748
1748
  const c = (m) => {
1749
1749
  let k = null;
1750
- I?.kind === "background" ? (k = ot, D(ot)) : I?.kind === "img" && (D(st), k = st), I?.currentUrl && k && (R(I.currentUrl), B(m));
1750
+ I?.kind === "background" ? (k = ot, D(ot)) : I?.kind === "img" && (D(at), k = at), I?.currentUrl && k && (R(I.currentUrl), B(m));
1751
1751
  };
1752
- C === u.MODALS.UPLOAD_IMAGE_MODAL || C === u.MODALS.UPLOAD_BACKGROUND_MODAL ? c(we) : C === u.MODALS.UPLOAD_IMAGE_MODAL_AI || C === u.MODALS.UPLOAD_BACKGROUND_MODAL_AI ? (ye ? (je(!0), Be(2)) : c(We), setTimeout(() => K.current?.focus({ cursor: "start" }), 100)) : C === u.MODALS.UPLOAD_IMAGE_MODAL_UPLOAD || C === u.MODALS.UPLOAD_BACKGROUND_MODAL_UPLOAD ? (c(fe), setTimeout(() => W.current?.focus({ cursor: "start" }), 100)) : C === u.MODALS.UPLOAD_IMAGE_MODAL_STOCK || C === u.MODALS.UPLOAD_BACKGROUND_MODAL_STOCK ? (ye ? (je(!0), Be(3)) : c(Fe), setTimeout(() => y.current?.focus({ cursor: "start" }), 100)) : C === u.MODALS.UPLOAD_IMAGE_MODAL_GIF || C === u.MODALS.UPLOAD_BACKGROUND_MODAL_GIF ? (ye ? (je(!0), Be(3)) : c(ze), setTimeout(() => a.current?.focus({ cursor: "start" }), 100)) : C === u.MODALS.UPLOAD_IMAGE_MODAL_EDIT || C === u.MODALS.UPLOAD_BACKGROUND_MODAL_EDIT ? (ye ? (je(!0), Be(5)) : c(we), i(Z.openSecondModal(u.MODALS.IMAGE_EDITOR_MODAL))) : D("");
1752
+ v === u.MODALS.UPLOAD_IMAGE_MODAL || v === u.MODALS.UPLOAD_BACKGROUND_MODAL ? c(Ae) : v === u.MODALS.UPLOAD_IMAGE_MODAL_AI || v === u.MODALS.UPLOAD_BACKGROUND_MODAL_AI ? (ve ? (je(!0), Me(2)) : c(We), setTimeout(() => W.current?.focus({ cursor: "start" }), 100)) : v === u.MODALS.UPLOAD_IMAGE_MODAL_UPLOAD || v === u.MODALS.UPLOAD_BACKGROUND_MODAL_UPLOAD ? (c(fe), setTimeout(() => K.current?.focus({ cursor: "start" }), 100)) : v === u.MODALS.UPLOAD_IMAGE_MODAL_STOCK || v === u.MODALS.UPLOAD_BACKGROUND_MODAL_STOCK ? (ve ? (je(!0), Me(3)) : c(ze), setTimeout(() => y.current?.focus({ cursor: "start" }), 100)) : v === u.MODALS.UPLOAD_IMAGE_MODAL_GIF || v === u.MODALS.UPLOAD_BACKGROUND_MODAL_GIF ? (ve ? (je(!0), Me(3)) : c(Ke), setTimeout(() => s.current?.focus({ cursor: "start" }), 100)) : v === u.MODALS.UPLOAD_IMAGE_MODAL_EDIT || v === u.MODALS.UPLOAD_BACKGROUND_MODAL_EDIT ? (ve ? (je(!0), Me(5)) : c(Ae), i(Z.openSecondModal(u.MODALS.IMAGE_EDITOR_MODAL))) : D("");
1753
1753
  }, [
1754
- C,
1754
+ v,
1755
1755
  i,
1756
- ye,
1756
+ ve,
1757
1757
  I
1758
1758
  ]);
1759
- const Qe = (0, r.useCallback)(({ url: c = b || "", meta: m = qt }) => {
1759
+ const Qe = (0, n.useCallback)(({ url: c = b || "", meta: m = qt }) => {
1760
1760
  R(c), w({
1761
1761
  url: c,
1762
1762
  meta: m
1763
1763
  }), setTimeout(() => {
1764
- le(), ge(), pe({
1764
+ le(), he(), pe({
1765
1765
  keywords: "",
1766
1766
  color: "",
1767
1767
  orientation: ""
1768
- }), Y({ keywords: "" }), h([]), M([]), D(""), Ke(""), lt(!1), G(""), L(""), B(fe);
1768
+ }), Y({ keywords: "" }), h([]), U([]), D(""), He(""), lt(!1), G(""), L(""), B(fe);
1769
1769
  }, 200), i(Z.closeModal()), i(Z.closeSecondModal());
1770
1770
  }, [
1771
1771
  b,
1772
1772
  le,
1773
1773
  i,
1774
1774
  w,
1775
- ge
1776
- ]), gt = (0, r.useCallback)((c, m) => (T("auto"), P(!1), Qe({
1775
+ he
1776
+ ]), gt = (0, n.useCallback)((c, m) => (T("auto"), P(!1), Qe({
1777
1777
  url: c,
1778
1778
  meta: Qt
1779
1779
  }), f.success({
@@ -1785,79 +1785,80 @@ Select the appropriate plan to fulfil more requests`),
1785
1785
  Qe,
1786
1786
  f
1787
1787
  ]);
1788
- (0, r.useEffect)(() => {
1789
- const c = v || A, m = re.canonicalImageUrlKey(c);
1788
+ (0, n.useEffect)(() => {
1789
+ const c = C || A, m = ne.canonicalImageUrlKey(c);
1790
1790
  if (!c || !m) {
1791
- q(""), Ve.current = "", le(), ge(), xe.current.invalidateAll();
1791
+ q(""), Oe.current && ge.abandonKey(Oe.current), Oe.current = "", le(), he();
1792
1792
  return;
1793
1793
  }
1794
- const k = Ve.current;
1795
- k && k !== m && (xe.current.abandonKey(k), le(), ge()), Ve.current = m;
1796
- const Q = new AbortController(), oe = v ? 800 : 0, ae = ++Ce.current, Ye = setTimeout(async () => {
1794
+ const k = Oe.current;
1795
+ k && k !== m && (ge.abandonKey(k), le(), he()), Oe.current = m;
1796
+ const Q = new AbortController(), oe = C ? 800 : 0, se = ++be.current, Ye = setTimeout(async () => {
1797
1797
  try {
1798
1798
  const Se = async () => {
1799
- const de = await xe.current.resolve(m, Q.signal, be);
1800
- if (ae !== Ce.current) return;
1801
- const { width: ve, height: ur } = await re.getImageDimensionsFromBlob(de);
1802
- ae === Ce.current && (V({
1803
- width: ve,
1804
- height: ur,
1799
+ const de = await ge.resolve(m, Q.signal, we);
1800
+ if (se !== be.current) return;
1801
+ const { width: Ce, height: dn } = await ne.getImageDimensionsFromBlob(de);
1802
+ se === be.current && (V({
1803
+ width: Ce,
1804
+ height: dn,
1805
1805
  size: (de.size / 1024).toFixed(2),
1806
1806
  format: Ee(de.type)
1807
1807
  }), le(), Ue(de));
1808
1808
  };
1809
- if (s) await Se();
1809
+ if (a) await Se();
1810
1810
  else {
1811
- const de = await re.resolveDataProviderPreview(t, m);
1812
- if (de?.previewUrl && ae === Ce.current) {
1813
- qe(de.previewUrl), ge();
1811
+ const de = await ne.resolveDataProviderPreview(t, m);
1812
+ if (de?.previewUrl && se === be.current) {
1813
+ qe(de.previewUrl), he();
1814
1814
  try {
1815
- const { data: ve } = await d(m);
1816
- if (ae !== Ce.current) return;
1817
- ve ? V({
1818
- width: ve?.width,
1819
- height: ve?.height,
1820
- size: ve?.fileSize != null ? (ve.fileSize / 1024).toFixed(2) : "",
1821
- format: Ee(ve?.format)
1815
+ const { data: Ce } = await d(m);
1816
+ if (se !== be.current) return;
1817
+ Ce ? V({
1818
+ width: Ce?.width,
1819
+ height: Ce?.height,
1820
+ size: Ce?.fileSize != null ? (Ce.fileSize / 1024).toFixed(2) : "",
1821
+ format: Ee(Ce?.format)
1822
1822
  }) : await Se();
1823
1823
  } catch {
1824
1824
  await Se();
1825
1825
  }
1826
1826
  } else await Se();
1827
1827
  }
1828
- if (ae !== Ce.current) return;
1828
+ if (se !== be.current) return;
1829
1829
  q("success"), R(c), $(572), setTimeout(() => {
1830
1830
  let de = 0;
1831
1831
  x.current && (de = x.current.offsetHeight + 62), T(de);
1832
1832
  }, 0);
1833
1833
  } catch (Se) {
1834
- if (Se?.name === "AbortError" || Q.signal.aborted || ae !== Ce.current) return;
1835
- le(), ge(), q("error");
1834
+ if (Se?.name === "AbortError" || Q.signal.aborted || se !== be.current) return;
1835
+ le(), he(), q("error");
1836
1836
  }
1837
1837
  }, oe);
1838
1838
  return () => {
1839
1839
  clearTimeout(Ye), Q.abort();
1840
1840
  };
1841
1841
  }, [
1842
- v,
1842
+ C,
1843
1843
  A,
1844
- s,
1844
+ a,
1845
1845
  le,
1846
- be,
1846
+ we,
1847
1847
  d,
1848
1848
  ge,
1849
+ he,
1849
1850
  t,
1850
1851
  Ue
1851
- ]), (0, r.useEffect)(() => {
1852
- if (!b || v || A) return;
1853
- const c = re.canonicalImageUrlKey(b), m = new AbortController();
1852
+ ]), (0, n.useEffect)(() => {
1853
+ if (!b || C || A || !v) return;
1854
+ const c = ne.canonicalImageUrlKey(b), m = new AbortController();
1854
1855
  let k = !1;
1855
1856
  const Q = async () => {
1856
- const oe = await xe.current.resolve(c, m.signal, be);
1857
+ const oe = await ge.resolve(c, m.signal, we);
1857
1858
  if (k) return;
1858
- const { width: ae, height: Ye } = await re.getImageDimensionsFromBlob(oe);
1859
+ const { width: se, height: Ye } = await ne.getImageDimensionsFromBlob(oe);
1859
1860
  k || (le(), Ue(oe), V({
1860
- width: ae,
1861
+ width: se,
1861
1862
  height: Ye,
1862
1863
  size: (oe.size / 1024).toFixed(2),
1863
1864
  format: Ee(oe.type)
@@ -1865,18 +1866,18 @@ Select the appropriate plan to fulfil more requests`),
1865
1866
  };
1866
1867
  return (async () => {
1867
1868
  try {
1868
- if (!s) {
1869
- const oe = await re.resolveDataProviderPreview(t, c);
1869
+ if (!a) {
1870
+ const oe = await ne.resolveDataProviderPreview(t, c);
1870
1871
  if (oe?.previewUrl && !k) {
1871
- qe(oe.previewUrl), ge();
1872
+ qe(oe.previewUrl), he();
1872
1873
  try {
1873
- const { data: ae } = await d(c);
1874
+ const { data: se } = await d(c);
1874
1875
  if (k) return;
1875
- ae ? V({
1876
- width: ae?.width,
1877
- height: ae?.height,
1878
- size: ae?.fileSize != null ? (ae.fileSize / 1024).toFixed(2) : "",
1879
- format: Ee(ae?.format)
1876
+ se ? V({
1877
+ width: se?.width,
1878
+ height: se?.height,
1879
+ size: se?.fileSize != null ? (se.fileSize / 1024).toFixed(2) : "",
1880
+ format: Ee(se?.format)
1880
1881
  }) : await Q();
1881
1882
  return;
1882
1883
  } catch {
@@ -1892,25 +1893,27 @@ Select the appropriate plan to fulfil more requests`),
1892
1893
  k = !0, m.abort();
1893
1894
  };
1894
1895
  }, [
1895
- s,
1896
+ a,
1897
+ v,
1896
1898
  le,
1897
1899
  b,
1898
- be,
1900
+ we,
1899
1901
  d,
1902
+ ge,
1900
1903
  t,
1901
- v,
1904
+ C,
1902
1905
  A,
1903
1906
  Ue
1904
1907
  ]);
1905
- const ir = () => {
1908
+ const ln = () => {
1906
1909
  i(Z.closeModal()), setTimeout(() => {
1907
- le(), ge(), R(""), L(""), h([]), h([]), pe({
1910
+ le(), he(), R(""), L(""), h([]), h([]), pe({
1908
1911
  keywords: "",
1909
1912
  color: "",
1910
1913
  orientation: ""
1911
- }), Y({ keywords: "" }), T("auto"), !ue && Ke(""), $(572), B(fe);
1914
+ }), Y({ keywords: "" }), T("auto"), !ue && He(""), $(572), B(fe);
1912
1915
  }, 200);
1913
- }, lr = (c) => {
1916
+ }, cn = (c) => {
1914
1917
  c === Vt ? g.success({
1915
1918
  mask: { closable: !0 },
1916
1919
  centered: !0,
@@ -1918,7 +1921,7 @@ Select the appropriate plan to fulfil more requests`),
1918
1921
  content: o("The feature is under development."),
1919
1922
  okText: o("Ok. I'll be waiting"),
1920
1923
  onOk: () => {}
1921
- }) : c === we && b === "" ? g.warning({
1924
+ }) : c === Ae && b === "" ? g.warning({
1922
1925
  mask: { closable: !0 },
1923
1926
  centered: !0,
1924
1927
  title: o(""),
@@ -1929,11 +1932,11 @@ Select the appropriate plan to fulfil more requests`),
1929
1932
  }
1930
1933
  }) : (setTimeout(() => {
1931
1934
  let m = 0, k = 0;
1932
- c === fe && E.current ? (ie.keywords === "" && W.current?.focus({ cursor: "start" }), m = 300, k = 572) : c === we && x.current ? (m = x.current.offsetHeight + 62, k = 572) : c === Fe && S.current ? (ie.keywords === "" && y.current?.focus({ cursor: "start" }), m = 130, k = 572, se.length > 0 && (k = 1060, m = "84vh")) : c === ze && U.current ? (ie.keywords === "" && a.current?.focus({ cursor: "start" }), m = 130, k = 572, ne.length > 0 && (k = 1060, m = "84vh")) : c === We && _.current && (ct === "" && te.length === 0 ? (K.current?.focus({ cursor: "start" }), m = 130) : m = _.current.offsetHeight + 82, k = 572), T(m), $(k);
1935
+ c === fe && E.current ? (ie.keywords === "" && K.current?.focus({ cursor: "start" }), m = 300, k = 572) : c === Ae && x.current ? (m = x.current.offsetHeight + 62, k = 572) : c === ze && S.current ? (ie.keywords === "" && y.current?.focus({ cursor: "start" }), m = 130, k = 572, ae.length > 0 && (k = 1060, m = "84vh")) : c === Ke && M.current ? (ie.keywords === "" && s.current?.focus({ cursor: "start" }), m = 130, k = 572, re.length > 0 && (k = 1060, m = "84vh")) : c === We && _.current && (ct === "" && te.length === 0 ? (W.current?.focus({ cursor: "start" }), m = 130) : m = _.current.offsetHeight + 82, k = 572), T(m), $(k);
1933
1936
  }, 0), B(c));
1934
1937
  };
1935
- (0, r.useEffect)(() => {
1936
- ie.keywords === "" && (W?.current?.focus({ cursor: "start" }), h([]), setTimeout(() => {
1938
+ (0, n.useEffect)(() => {
1939
+ ie.keywords === "" && (K?.current?.focus({ cursor: "start" }), h([]), setTimeout(() => {
1937
1940
  T("auto"), $(572);
1938
1941
  }, 0));
1939
1942
  }, [
@@ -1950,158 +1953,158 @@ Select the appropriate plan to fulfil more requests`),
1950
1953
  title: "Upload",
1951
1954
  description: "You can only upload JPG/JPEG/PNG/WEBP/GIF/SVG file!"
1952
1955
  }), m;
1953
- }, Oe = async ({ file: c }) => {
1956
+ }, Le = async ({ file: c }) => {
1954
1957
  try {
1955
- he(!0);
1956
- const m = await re.prepareImageForEditorUpload(c, e), k = await ar(m);
1958
+ ye(!0);
1959
+ const m = await ne.prepareImageForEditorUpload(c, e), k = await sn(m);
1957
1960
  if (k) return gt(k, m), k;
1958
1961
  const Q = await Ht(m, t);
1959
1962
  if (Q?.url) return gt(Q.url, m), Q.url;
1960
- Me(m, null);
1963
+ Pe(m, null);
1961
1964
  return;
1962
1965
  } catch (m) {
1963
- Me(c, m);
1966
+ Pe(c, m);
1964
1967
  return;
1965
1968
  } finally {
1966
- he(!1);
1969
+ ye(!1);
1967
1970
  }
1968
- }, cr = (c) => Oe({ file: c });
1969
- let Le = [{
1971
+ }, un = (c) => Le({ file: c });
1972
+ let De = [{
1970
1973
  label: o("Upload"),
1971
1974
  key: fe,
1972
- children: (0, n.jsxs)("div", {
1975
+ children: (0, r.jsxs)("div", {
1973
1976
  ref: E,
1974
1977
  style: { paddingBottom: 24 },
1975
- children: [e.imageCenterLocalUploadEnabled !== !1 && (0, n.jsxs)(_t, {
1978
+ children: [e.imageCenterLocalUploadEnabled !== !1 && (0, r.jsxs)(_t, {
1976
1979
  showUploadList: !1,
1977
1980
  name: "Image",
1978
1981
  beforeUpload: _e,
1979
- customRequest: Oe,
1982
+ customRequest: Le,
1980
1983
  style: { marginBottom: 10 },
1981
1984
  multiple: !1,
1982
1985
  accept: "image/png, image/jpeg, image/jpg, image/webp, image/gif, image/svg+xml",
1983
1986
  children: [
1984
- (0, n.jsx)("p", {
1987
+ (0, r.jsx)("p", {
1985
1988
  className: "ant-upload-drag-icon",
1986
- children: (0, n.jsx)(N.EmIcons, { icon: "InboxOutlined" })
1989
+ children: (0, r.jsx)(N.EmIcons, { icon: "InboxOutlined" })
1987
1990
  }),
1988
- (0, n.jsx)("p", {
1991
+ (0, r.jsx)("p", {
1989
1992
  className: "ant-upload-text",
1990
1993
  children: o("Click to select, paste from the clipboard, or drag and drop")
1991
1994
  }),
1992
- (0, n.jsx)("p", {
1995
+ (0, r.jsx)("p", {
1993
1996
  className: "ant-upload-hint",
1994
1997
  children: o("Accepted formats: PNG, JPG, WEBP, SVG or GIF.")
1995
1998
  })
1996
1999
  ]
1997
- }), (0, n.jsx)(p.Form, {
2000
+ }), (0, r.jsx)(p.Form, {
1998
2001
  style: { padding: "0 2px 0 2px" },
1999
- children: (0, n.jsx)(p.Form.Item, {
2002
+ children: (0, r.jsx)(p.Form.Item, {
2000
2003
  validateStatus: ee,
2001
- children: (0, n.jsx)(p.Input, {
2002
- ref: W,
2004
+ children: (0, r.jsx)(p.Input, {
2005
+ ref: K,
2003
2006
  allowClear: !0,
2004
2007
  size: "large",
2005
2008
  placeholder: o("Paste image URL here"),
2006
- value: v,
2007
- onChange: nr,
2009
+ value: C,
2010
+ onChange: rn,
2008
2011
  spellCheck: "false"
2009
2012
  })
2010
2013
  })
2011
2014
  })]
2012
2015
  })
2013
2016
  }];
2014
- return e.imageCenterStockEnabled && !ye && Le.push({
2017
+ return e.imageCenterStockEnabled && !ve && De.push({
2015
2018
  label: o("Stock"),
2016
- key: Fe,
2017
- children: (0, n.jsx)("div", {
2019
+ key: ze,
2020
+ children: (0, r.jsx)("div", {
2018
2021
  ref: S,
2019
2022
  style: { paddingBottom: 24 },
2020
- children: (0, n.jsx)(Ut, {
2023
+ children: (0, r.jsx)(Mt, {
2021
2024
  currentReq: ie,
2022
2025
  setCurrentReq: pe,
2023
- imageStockList: se,
2026
+ imageStockList: ae,
2024
2027
  setImageStockList: h,
2025
2028
  setModalWidth: $,
2026
2029
  setModalHeight: T,
2027
2030
  setStockLink: G,
2028
2031
  setCurrentImageLink: R,
2029
2032
  inputRef: y,
2030
- customRequest: Pe
2033
+ customRequest: Te
2031
2034
  })
2032
2035
  })
2033
- }), e.imageCenterGifEnabled && !ye && Le.push({
2036
+ }), e.imageCenterGifEnabled && !ve && De.push({
2034
2037
  label: o("GIF"),
2035
- key: ze,
2036
- children: (0, n.jsx)("div", {
2037
- ref: U,
2038
+ key: Ke,
2039
+ children: (0, r.jsx)("div", {
2040
+ ref: M,
2038
2041
  style: { paddingBottom: 24 },
2039
- children: (0, n.jsx)(Gt, {
2040
- currentReqGif: Ae,
2042
+ children: (0, r.jsx)(Gt, {
2043
+ currentReqGif: xe,
2041
2044
  setCurrentReqGif: Y,
2042
- imageGifList: ne,
2043
- setImageGifList: M,
2045
+ imageGifList: re,
2046
+ setImageGifList: U,
2044
2047
  setModalWidth: $,
2045
2048
  setModalHeight: T,
2046
2049
  setStockLink: G,
2047
2050
  setCurrentImageLink: R,
2048
- inputRef: a,
2049
- customRequest: Pe
2051
+ inputRef: s,
2052
+ customRequest: Te
2050
2053
  })
2051
2054
  })
2052
- }), e.elementAIimageEnabled && !ye && Le.push({
2055
+ }), e.elementAIimageEnabled && !ve && De.push({
2053
2056
  label: o("AI"),
2054
2057
  key: We,
2055
- children: (0, n.jsx)("div", {
2058
+ children: (0, r.jsx)("div", {
2056
2059
  ref: _,
2057
2060
  style: { paddingBottom: 24 },
2058
- children: (0, n.jsx)(Nt, {
2061
+ children: (0, r.jsx)(Nt, {
2059
2062
  setModalHeight: T,
2060
- customRequest: Oe,
2063
+ customRequest: Le,
2061
2064
  aiImageRequest: ct,
2062
- setAiImageRequest: Ke,
2065
+ setAiImageRequest: He,
2063
2066
  imageAiList: te,
2064
2067
  setImageAiList: X,
2065
2068
  isLoadingAi: ue,
2066
2069
  setIsLoadingAi: lt,
2067
2070
  aiTabRef: _,
2068
- inputAiRef: K,
2071
+ inputAiRef: W,
2069
2072
  isImageUploaded: j,
2070
2073
  setIsImageUploaded: P
2071
2074
  })
2072
2075
  })
2073
- }), e.imageCenterEditorEnabled && Le.push({
2076
+ }), e.imageCenterEditorEnabled && De.push({
2074
2077
  label: "",
2075
- key: we,
2076
- children: (0, n.jsx)("div", {
2078
+ key: Ae,
2079
+ children: (0, r.jsx)("div", {
2077
2080
  ref: x,
2078
- children: (0, n.jsx)(kt, {
2081
+ children: (0, r.jsx)(kt, {
2079
2082
  currentImageLink: b,
2080
- newLink: v,
2081
- previewDisplayUrl: rr,
2082
- resolvedPreviewObjectUrl: er,
2083
- resolvedPreviewBlob: tr,
2084
- resolveImageBlob: sr,
2083
+ newLink: C,
2084
+ previewDisplayUrl: nn,
2085
+ resolvedPreviewObjectUrl: en,
2086
+ resolvedPreviewBlob: tn,
2087
+ resolveImageBlob: an,
2085
2088
  imageSize: z,
2086
- onSave: cr,
2089
+ onSave: un,
2087
2090
  uploadImageResultIsLoading: F || !1
2088
2091
  })
2089
2092
  })
2090
- }), (0, n.jsxs)(n.Fragment, { children: [(0, n.jsx)(p.Modal, {
2093
+ }), (0, r.jsxs)(r.Fragment, { children: [(0, r.jsx)(p.Modal, {
2091
2094
  width: J,
2092
2095
  className: "image-center",
2093
2096
  title: o("Image Center"),
2094
2097
  style: { minHeight: 390 },
2095
2098
  open: !!O,
2096
2099
  onOk: Qe,
2097
- onCancel: ir,
2098
- footer: H === we ? (0, n.jsx)(n.Fragment, {}) : null,
2099
- children: (0, n.jsx)(p.Spin, {
2100
+ onCancel: ln,
2101
+ footer: H === Ae ? (0, r.jsx)(r.Fragment, {}) : null,
2102
+ children: (0, r.jsx)(p.Spin, {
2100
2103
  spinning: F,
2101
- children: (0, n.jsx)(p.Tabs, {
2104
+ children: (0, r.jsx)(p.Tabs, {
2102
2105
  activeKey: H,
2103
- onChange: lr,
2104
- items: Le,
2106
+ onChange: cn,
2107
+ items: De,
2105
2108
  className: "modal-tabs",
2106
2109
  style: {
2107
2110
  height: me,
@@ -2109,7 +2112,7 @@ Select the appropriate plan to fulfil more requests`),
2109
2112
  }
2110
2113
  })
2111
2114
  })
2112
- }), (0, n.jsx)(N.PlanUpgradePrompt, {
2115
+ }), (0, r.jsx)(N.PlanUpgradePrompt, {
2113
2116
  open: Jt,
2114
2117
  onCancel: () => je(!1),
2115
2118
  initialSlide: $t