useblocks 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,20 +1,20 @@
1
1
  (function(){try{if(typeof document<"u"){var o=document.createElement("style");o.setAttribute("data-useblocks","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(--ub-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(--ub-colorPrimary);border-color:var(--ub-colorPrimary)}.blocks-app .image-editor-modal .pi .text-on-primary:hover{background:var(--ub-colorPrimaryHover);border-color:var(--ub-colorPrimaryHover)}.blocks-app .image-editor-modal .pi .text-on-primary.rounded-full{border-radius:calc(var(--ub-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(--ub-colorPrimary)}.blocks-app .image-editor-modal .pi .bg-white\\/50{background-color:var(--ub-colorPrimary)}.blocks-app .image-editor-modal .pi .text-on-primary{color:var(--ub-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(--ub-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(--ub-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(--ub-borderWidth) * 1px);border-color:var(--ub-colorFillSecondaryDarken);border-radius:calc(var(--ub-borderRadius) * 1px);width:100%;padding-left:0;display:inline-flex}.blocks-app .image-ai .image-ai__input-affix-wrapper:hover{border-color:var(--ub-borderColorHover)}.blocks-app .image-ai .image-ai__input-affix-wrapper.ant-input-affix-wrapper-focused{border-color:var(--ub-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(--ub-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(--ub-colorBorderSecondary);background:linear-gradient(180deg, var(--ub-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(--ub-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(--ub-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(--ub-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
- __useblocks__.define("static/core/36bf6931.js", [
2
+ __useblocks__.define("static/core/9bcb736c.js", [
3
3
  "require",
4
4
  "exports",
5
5
  "module",
6
6
  "static/core/df237243.js",
7
- "static/core/ea6c5c93.js",
8
- "static/core/23546a64.js",
9
- "static/core/35ad3ae5.js",
10
- "static/core/3f22a9d32.js",
11
- "static/core/63206e112.js",
7
+ "static/core/bfab4558.js",
8
+ "static/core/45b5e246.js",
9
+ "static/core/241f0387.js",
10
+ "static/core/dd94baa62.js",
11
+ "static/core/d082c64e2.js",
12
12
  "static/core/cf655a1a.js",
13
13
  "static/core/6e2a0152.js",
14
14
  "react",
15
15
  "react/jsx-runtime"
16
16
  ], function(ce, ht, fn) {
17
- const Ze = ce("./df237243.js"), u = ce("./ea6c5c93.js"), Z = ce("./23546a64.js"), ne = ce("./35ad3ae5.js"), p = ce("./3f22a9d32.js"), N = ce("./63206e112.js"), yt = ce("./cf655a1a.js"), Xe = ce("./6e2a0152.js");
17
+ const Ze = ce("./df237243.js"), u = ce("./bfab4558.js"), Z = ce("./45b5e246.js"), ne = ce("./241f0387.js"), p = ce("./dd94baa62.js"), N = ce("./d082c64e2.js"), yt = ce("./cf655a1a.js"), Xe = ce("./6e2a0152.js");
18
18
  let n = ce("react");
19
19
  n = Ze.__toESM(n);
20
20
  let r = ce("react/jsx-runtime");
@@ -269,9 +269,9 @@ __useblocks__.define("static/core/36bf6931.js", [
269
269
  return Je(e.replace(/data:image\/([a-z]*)?;base64,/, ""), a);
270
270
  }
271
271
  var Rt = ({ currentImageLink: t, prefetchedBlob: e, resolveImageBlob: a, onSave: o, uploadImageResultIsLoading: i }) => {
272
- const l = N.useCookieManager(), [d, g] = (0, n.useState)(), [f, C] = (0, n.useState)(), { __: I } = p.useI18n();
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, n.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));
@@ -290,17 +290,17 @@ __useblocks__.define("static/core/36bf6931.js", [
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.useblocks.io/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.useblocks.io/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;
@@ -316,7 +316,7 @@ __useblocks__.define("static/core/36bf6931.js", [
316
316
  b
317
317
  ]);
318
318
  const z = (0, n.useCallback)(() => {
319
- g(null), C(null), w(Z.closeSecondModal()), w(Z.closeModal(u.MODALS.UPLOAD_IMAGE_MODAL));
319
+ g(null), v(null), w(Z.closeSecondModal()), w(Z.closeModal(u.MODALS.UPLOAD_IMAGE_MODAL));
320
320
  }, [w]), V = (0, n.useRef)();
321
321
  V.current = async function(j, P, E) {
322
322
  try {
@@ -332,7 +332,7 @@ __useblocks__.define("static/core/36bf6931.js", [
332
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("_", "-") : "en-US", E = v.theme === "system" ? matchMedia("(prefers-color-scheme: dark)").matches ? u.DARK : u.LIGHT : v.theme;
335
+ const P = C.locale ? C.locale.replace("_", "-") : "en-US", 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),
@@ -384,9 +384,9 @@ __useblocks__.define("static/core/36bf6931.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,11 +394,11 @@ __useblocks__.define("static/core/36bf6931.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
@@ -501,14 +501,14 @@ __useblocks__.define("static/core/36bf6931.js", [
501
501
  let o;
502
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: a, 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, n.useState)(!1), [j, P] = (0, n.useState)(!1), [E, x] = (0, n.useState)(0), S = (0, n.useRef)(null), U = (0, n.useRef)(null), _ = (0, n.useRef)(null), W = (0, n.useRef)(t);
506
- W.current = t;
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
507
  const s = (0, n.useRef)(L);
508
508
  s.current = L;
509
- const y = (0, n.useRef)(v);
510
- y.current = v;
511
- const K = (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]);
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
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.
@@ -519,19 +519,19 @@ __useblocks__.define("static/core/36bf6931.js", [
519
519
  Y && Y.scrollHeight > O && Y.scrollTo(0, O);
520
520
  }
521
521
  }, []), (0, n.useEffect)(() => {
522
- K.current = !1, q(!1);
522
+ W.current = !1, q(!1);
523
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 re = g ? S.current : F(), M = new IntersectionObserver(([ae]) => {
528
- !ae.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
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,
@@ -543,10 +543,10 @@ __useblocks__.define("static/core/36bf6931.js", [
543
543
  if (!A) return;
544
544
  const re = (Y = g ? S.current : F()) !== null && Y !== void 0 ? Y : typeof window < "u" ? window : null;
545
545
  if (!re) return;
546
- const M = (ae) => {
546
+ const U = (ae) => {
547
547
  setTimeout(() => A(ae), 0);
548
548
  };
549
- return re.addEventListener("scroll", M), () => re.removeEventListener("scroll", M);
549
+ return re.addEventListener("scroll", U), () => re.removeEventListener("scroll", U);
550
550
  }, [
551
551
  A,
552
552
  g,
@@ -554,14 +554,14 @@ __useblocks__.define("static/core/36bf6931.js", [
554
554
  ]), (0, n.useEffect)(() => {
555
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;
557
+ const U = (Y = g ? S.current : F()) !== null && Y !== void 0 ? Y : typeof window < "u" ? window : null;
558
+ if (!U) return;
559
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
563
  const ae = (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)"));
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;
@@ -574,21 +574,21 @@ __useblocks__.define("static/core/36bf6931.js", [
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", ae), M.addEventListener("touchmove", h), M.addEventListener("touchend", te), M.addEventListener("mousedown", ae), M.addEventListener("mousemove", h), M.addEventListener("mouseup", te), () => {
578
- M.removeEventListener("touchstart", ae), M.removeEventListener("touchmove", h), M.removeEventListener("touchend", te), M.removeEventListener("mousedown", ae), 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 || !!(a && a instanceof Array && a.length), pe = w && g ? { overflow: "auto" } : {}, Ae = e ? (0, r.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
594
  return (0, r.jsx)("div", {
@@ -601,7 +601,7 @@ __useblocks__.define("static/core/36bf6931.js", [
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
606
  w && (0, r.jsx)("div", {
607
607
  style: { position: "relative" },
@@ -619,7 +619,7 @@ __useblocks__.define("static/core/36bf6931.js", [
619
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
  })
@@ -640,14 +640,14 @@ __useblocks__.define("static/core/36bf6931.js", [
640
640
  for (l = 0; l < o.length; l++) i = o[l], !(e.indexOf(i) >= 0) && (a[i] = t[i]);
641
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
646
  var a = arguments[e];
647
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
653
  var a = Object.keys(t);
@@ -685,11 +685,11 @@ __useblocks__.define("static/core/36bf6931.js", [
685
685
  children: void 0,
686
686
  columnAttrs: void 0,
687
687
  column: void 0
688
- }, Te = 2, Ne = class extends n.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,8 +712,8 @@ __useblocks__.define("static/core/36bf6931.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 a = 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
719
  l > 0 && t <= l && l < a && (a = l, o = e[i]);
@@ -736,7 +736,7 @@ __useblocks__.define("static/core/36bf6931.js", [
736
736
  style: ke(ke({}, e.style), {}, { width: i }),
737
737
  className: l
738
738
  });
739
- return o.map((g, f) => n.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() {
@@ -749,11 +749,11 @@ __useblocks__.define("static/core/36bf6931.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")), n.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
@@ -764,16 +764,16 @@ __useblocks__.define("static/core/36bf6931.js", [
764
764
  }
765
765
  function nt({ items: t, getItemId: e, getRequestUrl: a, createController: o }) {
766
766
  const [i, l] = (0, n.useState)({}), d = (0, n.useRef)(new Map()), g = (0, n.useCallback)((f) => {
767
- const C = e(f), I = a(f), w = `${C}:${I}`;
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
@@ -784,12 +784,12 @@ __useblocks__.define("static/core/36bf6931.js", [
784
784
  a
785
785
  ]);
786
786
  return (0, n.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);
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,28 +798,28 @@ __useblocks__.define("static/core/36bf6931.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
805
  getDisplaySrc: (0, n.useCallback)((f) => {
806
- const { itemId: C, requestUrl: I, controller: w } = g(f);
807
- return i[C] || w.src || I;
806
+ const { itemId: v, requestUrl: I, controller: w } = g(f);
807
+ return i[v] || w.src || I;
808
808
  }, [i, g]),
809
809
  handleLoad: (0, n.useCallback)((f) => {
810
810
  g(f).controller.handleSuccess();
811
811
  }, [g]),
812
812
  handleError: (0, n.useCallback)((f) => {
813
- const { itemId: C, controller: I } = g(f), w = Ge(I.handleError(), I.src);
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 rt = "blocks", Ut = ({ setCurrentImageLink: t, setModalHeight: e, setModalWidth: a, 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, n.useState)(!1), [v, 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) => {
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"),
@@ -832,14 +832,14 @@ __useblocks__.define("static/core/36bf6931.js", [
832
832
  ]), z = async () => {
833
833
  b || (R(!0), D({
834
834
  query: l,
835
- page: v
835
+ page: C
836
836
  }).then((s) => {
837
837
  if (s?.error) {
838
838
  B(s.error), R(!1);
839
839
  return;
840
840
  }
841
841
  const y = s?.data?.results || [];
842
- o((K) => [...K, ...y]), R(!1), L((K) => K + 1);
842
+ o((W) => [...W, ...y]), R(!1), L((W) => W + 1);
843
843
  }).catch(() => {
844
844
  R(!1);
845
845
  }));
@@ -860,7 +860,7 @@ __useblocks__.define("static/core/36bf6931.js", [
860
860
  y.length > 0 ? (o(y), setTimeout(() => {
861
861
  a(1060), e("84vh");
862
862
  }, 0)) : o([]);
863
- }, [ee, q] = (0, n.useState)(null), j = (0, n.useCallback)((s, y, K) => `${s}${s.includes("?") ? "&" : "?"}w=${y}&q=${K}`, []), P = (0, n.useCallback)((s) => u.getProxiedUrl(s, {
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",
@@ -870,12 +870,12 @@ __useblocks__.define("static/core/36bf6931.js", [
870
870
  getItemId: (0, n.useCallback)((s) => s.id, []),
871
871
  getRequestUrl: (0, n.useCallback)((s) => j(s.urls.raw, 644, 96), [j]),
872
872
  createController: P
873
- }), U = (s) => (y) => {
873
+ }), M = (s) => (y) => {
874
874
  x(s), y.target.parentNode.classList.add("loaded");
875
875
  }, _ = (s) => () => {
876
876
  S(s);
877
- }, W = (s, y, K) => {
878
- O(y.download_location), q(K), setTimeout(() => q(null), 2e3), f(`${s.raw}&w=1200&q=96`), t(`${s.raw}&w=1200&q=96`), C(`${s.raw}&w=1200&q=96`);
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
880
  return (0, r.jsxs)("div", {
881
881
  className: "stock-tab",
@@ -1042,20 +1042,20 @@ __useblocks__.define("static/core/36bf6931.js", [
1042
1042
  scrollableTarget: "scrollableDiv",
1043
1043
  style: { overflow: "visible" },
1044
1044
  loader: null,
1045
- children: (0, r.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
1049
  children: i.map((s) => (0, r.jsxs)("div", {
1050
1050
  className: "list-item",
1051
- onClick: () => W(s.urls, s.links, s.id),
1051
+ onClick: () => K(s.urls, s.links, s.id),
1052
1052
  children: [
1053
1053
  (0, r.jsx)("img", {
1054
1054
  className: ee === s.id ? "loaded-image" : "",
1055
1055
  width: "322px",
1056
1056
  src: E(s),
1057
1057
  alt: s.description,
1058
- onLoad: U(s),
1058
+ onLoad: M(s),
1059
1059
  onError: _(s)
1060
1060
  }),
1061
1061
  (0, r.jsxs)("p", {
@@ -1096,7 +1096,7 @@ __useblocks__.define("static/core/36bf6931.js", [
1096
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
1101
  return st(e) || /^data:/i.test(e) ? e : `data:image/jpeg;base64, ${t}`;
1102
1102
  }
@@ -1118,7 +1118,7 @@ __useblocks__.define("static/core/36bf6931.js", [
1118
1118
  }, [t]), (0, r.jsx)("div", {
1119
1119
  className: "slideshow-container",
1120
1120
  children: a.map((i, l) => (0, r.jsx)("img", {
1121
- src: Mt(i.src),
1121
+ src: Ut(i.src),
1122
1122
  alt: `Slide ${l + 1}`,
1123
1123
  className: "slideshow-image",
1124
1124
  style: {
@@ -1128,22 +1128,22 @@ __useblocks__.define("static/core/36bf6931.js", [
1128
1128
  }, l))
1129
1129
  });
1130
1130
  };
1131
- function Tt({ setModalHeight: t, customRequest: e, aiTabRef: a, 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, n.useState)(0), [E, x] = (0, n.useState)(null), [S, U] = (0, n.useState)(!1), [_, W] = (0, n.useState)(b("Evaluating the task")), [s, y] = (0, n.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 = ne.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, n.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, n.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, n.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 @@ __useblocks__.define("static/core/36bf6931.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,21 +1176,21 @@ __useblocks__.define("static/core/36bf6931.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
1195
  ]), Y = (0, n.useCallback)(async () => {
1196
1196
  if (pe) {
@@ -1201,8 +1201,8 @@ __useblocks__.define("static/core/36bf6931.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,8 +1217,8 @@ 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
  ]);
@@ -1228,11 +1228,11 @@ Select the appropriate plan to fulfil more requests`),
1228
1228
  const re = u.useEventEmitter(u.events.AI_IMAGE_PROGRESS_ID);
1229
1229
  (0, n.useEffect)(() => {
1230
1230
  const h = re.event(({ progress: te, status: X }) => {
1231
- W(X || `${Math.round(te)}%`);
1231
+ K(X || `${Math.round(te)}%`);
1232
1232
  });
1233
1233
  return () => h.dispose();
1234
1234
  }, [re]);
1235
- const M = (0, n.useCallback)(async (h) => {
1235
+ const U = (0, n.useCallback)(async (h) => {
1236
1236
  if (!o) {
1237
1237
  i(!0);
1238
1238
  try {
@@ -1247,7 +1247,7 @@ Select the appropriate plan to fulfil more requests`),
1247
1247
  i,
1248
1248
  e
1249
1249
  ]), ae = (0, n.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({
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,12 +1255,12 @@ 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
1266
  return (0, n.useEffect)(() => {
@@ -1280,29 +1280,29 @@ 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,
1289
+ setIsLoadingAi: v,
1290
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: a, 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, 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({
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
1308
  aiTabRef: a,
@@ -1310,12 +1310,12 @@ Select the appropriate plan to fulfil more requests`),
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 ? ne.getAiTariffUpgradeStep(z) : null, U = S ? N.getLimitUpgradePresetDefinition(S.presetId) : null, _ = D ? N.getLimitUpgradePresetDefinition(D.presetId) : null, [W, s] = (0, n.useState)(!1), y = (0, n.useCallback)(() => s(!0), []), K = (0, n.useCallback)(() => s(!1), []), me = (0, n.useCallback)((F) => g(F.target.value), [g]), T = (0, n.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,
@@ -1327,12 +1327,12 @@ Select the appropriate plan to fulfil more requests`),
1327
1327
  return (0, r.jsxs)("div", {
1328
1328
  className: "image-ai",
1329
1329
  children: [
1330
- U && S ? (0, r.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: () => {
@@ -1342,8 +1342,8 @@ Select the appropriate plan to fulfil more requests`),
1342
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),
@@ -1352,7 +1352,7 @@ Select the appropriate plan to fulfil more requests`),
1352
1352
  }
1353
1353
  }) : null,
1354
1354
  x && (0, r.jsx)(p.LimitsCounter, {
1355
- text: `${B} ${v("of")} ${z > 0 ? z : "∞"} images ${L("was used", "were used", B)}`,
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
1358
  extra: (0, r.jsx)("span", {
@@ -1361,7 +1361,7 @@ Select the appropriate plan to fulfil more requests`),
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
1367
  (0, r.jsx)(p.Row, {
@@ -1372,17 +1372,17 @@ Select the appropriate plan to fulfil more requests`),
1372
1372
  children: (0, r.jsx)(p.Form.Item, {
1373
1373
  style: { margin: 0 },
1374
1374
  children: (0, r.jsxs)("span", {
1375
- className: `ant-input-affix-wrapper ant-input-affix-wrapper-lg image-ai__input-affix-wrapper${W ? " ant-input-affix-wrapper-focused" : ""}`,
1375
+ className: `ant-input-affix-wrapper ant-input-affix-wrapper-lg image-ai__input-affix-wrapper${K ? " ant-input-affix-wrapper-focused" : ""}`,
1376
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"
@@ -1424,16 +1424,16 @@ Select the appropriate plan to fulfil more requests`),
1424
1424
  children: (0, r.jsx)(p.Button, {
1425
1425
  onClick: () => j($),
1426
1426
  icon: (0, r.jsx)(N.EmIcons, { icon: "CheckOutlined" }),
1427
- children: v("Use this one")
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: a, 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, 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
- 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
1439
  description: z(s)
@@ -1441,7 +1441,7 @@ Select the appropriate plan to fulfil more requests`),
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,
@@ -1470,21 +1470,21 @@ Select the appropriate plan to fulfil more requests`),
1470
1470
  }, j = (s, y) => {
1471
1471
  A(y), setTimeout(() => {
1472
1472
  A(null);
1473
- }, 2e3), C(`${s}`), e(`${s}`), I(`${s}`);
1473
+ }, 2e3), v(`${s}`), e(`${s}`), I(`${s}`);
1474
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 } = nt({
1479
+ }), [b, R]), { getDisplaySrc: x, handleLoad: S, handleError: M } = nt({
1480
1480
  items: l,
1481
1481
  getItemId: (0, n.useCallback)((s) => s.id, []),
1482
1482
  getRequestUrl: (0, n.useCallback)((s) => s.images.downsized.url, []),
1483
1483
  createController: E
1484
1484
  }), _ = (s) => (y) => {
1485
1485
  S(s), y.target.parentNode.classList.add("loaded");
1486
- }, W = (s) => () => {
1487
- U(s);
1486
+ }, K = (s) => () => {
1487
+ M(s);
1488
1488
  };
1489
1489
  return (0, r.jsxs)("div", {
1490
1490
  className: "stock-tab",
@@ -1547,7 +1547,7 @@ Select the appropriate plan to fulfil more requests`),
1547
1547
  scrollableTarget: "scrollableDiv",
1548
1548
  style: { overflow: "visible" },
1549
1549
  loader: (0, r.jsx)(p.Spin, { size: "small" }),
1550
- children: (0, r.jsx)(Ne, {
1550
+ children: (0, r.jsx)(Ge, {
1551
1551
  breakpointCols: P,
1552
1552
  className: "my-masonry-grid",
1553
1553
  columnClassName: "my-masonry-grid_column",
@@ -1561,13 +1561,13 @@ Select the appropriate plan to fulfil more requests`),
1561
1561
  src: x(s),
1562
1562
  alt: s.title,
1563
1563
  onLoad: _(s),
1564
- onError: W(s)
1564
+ onError: K(s)
1565
1565
  }),
1566
1566
  (0, r.jsx)("a", {
1567
1567
  rel: "noreferrer",
1568
1568
  href: "https://giphy.com/",
1569
1569
  target: "_blank",
1570
- onClick: (K) => K.stopPropagation(),
1570
+ onClick: (W) => W.stopPropagation(),
1571
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=)" }
@@ -1608,10 +1608,10 @@ Select the appropriate plan to fulfil more requests`),
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, a) {
1614
+ function Wt(t, e, a) {
1615
1615
  if (t) return {
1616
1616
  id: t.id,
1617
1617
  name: t.name || e.name,
@@ -1635,7 +1635,7 @@ Select the appropriate plan to fulfil more requests`),
1635
1635
  if (!e) return;
1636
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 at = "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 = ne.normalizeImageFormatForDisplay, Zt = (t, e) => {
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
1661
  const a = Ee(e);
1662
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(), a = 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, n.useState)(""), [v, 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)({
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, n.useState)("success"), [j, P] = (0, n.useState)(!1), E = n.default.useRef(null), x = n.default.useRef(null), S = n.default.useRef(null), U = n.default.useRef(null), _ = n.default.useRef(null), W = n.default.useRef(null), s = n.default.useRef(null), y = n.default.useRef(null), K = n.default.useRef(null), [me, T] = (0, n.useState)("auto"), [J, $] = (0, n.useState)(572), [F, he] = (0, n.useState)(!1), [ie, pe] = (0, n.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, n.useState)({ keywords: "" }), [re, M] = (0, n.useState)([]), [ae, h] = (0, n.useState)([]), [te, X] = (0, n.useState)([]), [ue, lt] = (0, n.useState)(!1), [ct, Ke] = (0, n.useState)(""), [Jt, je] = (0, n.useState)(!1), [$t, Be] = (0, n.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 = n.default.useRef(ne.createImageUrlBlobResolver()), Ve = n.default.useRef(""), Ce = 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) => {
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, n.useCallback)(() => {
1678
+ }, []), he = (0, n.useCallback)(() => {
1679
1679
  Ie.current && (URL.revokeObjectURL(Ie.current), Ie.current = ""), ft(""), mt(null);
1680
1680
  }, []), le = (0, n.useCallback)(() => {
1681
1681
  qe("");
1682
- }, []), ye = N.isEditorLockedByPlan(He, { isPlugin: u.PLUGIN.isPlugin }), rn = (c) => {
1682
+ }, []), ve = N.isEditorLockedByPlan(Ve, { isPlugin: u.PLUGIN.isPlugin }), rn = (c) => {
1683
1683
  L(c.target.value);
1684
- }, Me = (0, n.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",
@@ -1692,17 +1692,17 @@ Select the appropriate plan to fulfil more requests`),
1692
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 = ne.useImageBlobFetch(), an = (0, n.useCallback)((c) => xe.current.resolve(ne.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
1697
  const m = await on(c);
1698
- m && _e(m) ? await Oe({ file: m }) : m || Me({ url: c }, null, o("Failed to download image from URL."));
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 = n.default.useRef(Pe);
1703
- pt.current = Pe, n.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
1718
  const on = async (c) => {
1719
1719
  try {
1720
1720
  const m = ne.canonicalImageUrlKey(c);
1721
- return Xt(await xe.current.resolve(m, void 0, be), m);
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");
@@ -1749,11 +1749,11 @@ Select the appropriate plan to fulfil more requests`),
1749
1749
  let k = null;
1750
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(() => s.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
1759
  const Qe = (0, n.useCallback)(({ url: c = b || "", meta: m = qt }) => {
@@ -1761,18 +1761,18 @@ Select the appropriate plan to fulfil more requests`),
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
1775
+ he
1776
1776
  ]), gt = (0, n.useCallback)((c, m) => (T("auto"), P(!1), Qe({
1777
1777
  url: c,
1778
1778
  meta: Qt
@@ -1786,21 +1786,21 @@ Select the appropriate plan to fulfil more requests`),
1786
1786
  f
1787
1787
  ]);
1788
1788
  (0, n.useEffect)(() => {
1789
- const c = v || A, m = ne.canonicalImageUrlKey(c);
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, se = ++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 (se !== Ce.current) return;
1801
- const { width: ve, height: dn } = await ne.getImageDimensionsFromBlob(de);
1802
- se === Ce.current && (V({
1803
- width: ve,
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
1804
  height: dn,
1805
1805
  size: (de.size / 1024).toFixed(2),
1806
1806
  format: Ee(de.type)
@@ -1809,51 +1809,52 @@ Select the appropriate plan to fulfil more requests`),
1809
1809
  if (a) await Se();
1810
1810
  else {
1811
1811
  const de = await ne.resolveDataProviderPreview(t, m);
1812
- if (de?.previewUrl && se === Ce.current) {
1813
- qe(de.previewUrl), ge();
1812
+ if (de?.previewUrl && se === be.current) {
1813
+ qe(de.previewUrl), he();
1814
1814
  try {
1815
- const { data: ve } = await d(m);
1816
- if (se !== 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 (se !== 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 || se !== 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
1844
  a,
1845
1845
  le,
1846
- be,
1846
+ we,
1847
1847
  d,
1848
1848
  ge,
1849
+ he,
1849
1850
  t,
1850
1851
  Ue
1851
1852
  ]), (0, n.useEffect)(() => {
1852
- if (!b || v || A) return;
1853
+ if (!b || C || A || !v) return;
1853
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
1859
  const { width: se, height: Ye } = await ne.getImageDimensionsFromBlob(oe);
1859
1860
  k || (le(), Ue(oe), V({
@@ -1868,7 +1869,7 @@ Select the appropriate plan to fulfil more requests`),
1868
1869
  if (!a) {
1869
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
1874
  const { data: se } = await d(c);
1874
1875
  if (k) return;
@@ -1893,22 +1894,24 @@ Select the appropriate plan to fulfil more requests`),
1893
1894
  };
1894
1895
  }, [
1895
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
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
1916
  }, cn = (c) => {
1914
1917
  c === Vt ? g.success({
@@ -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, ae.length > 0 && (k = 1060, m = "84vh")) : c === ze && U.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 ? (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
1938
  (0, n.useEffect)(() => {
1936
- ie.keywords === "" && (W?.current?.focus({ cursor: "start" }), h([]), setTimeout(() => {
1939
+ ie.keywords === "" && (K?.current?.focus({ cursor: "start" }), h([]), setTimeout(() => {
1937
1940
  T("auto"), $(572);
1938
1941
  }, 0));
1939
1942
  }, [
@@ -1950,23 +1953,23 @@ 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);
1958
+ ye(!0);
1956
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
- }, un = (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
1975
  children: (0, r.jsxs)("div", {
@@ -1976,7 +1979,7 @@ Select the appropriate plan to fulfil more requests`),
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",
@@ -1999,11 +2002,11 @@ Select the appropriate plan to fulfil more requests`),
1999
2002
  children: (0, r.jsx)(p.Form.Item, {
2000
2003
  validateStatus: ee,
2001
2004
  children: (0, r.jsx)(p.Input, {
2002
- ref: W,
2005
+ ref: K,
2003
2006
  allowClear: !0,
2004
2007
  size: "large",
2005
2008
  placeholder: o("Paste image URL here"),
2006
- value: v,
2009
+ value: C,
2007
2010
  onChange: rn,
2008
2011
  spellCheck: "false"
2009
2012
  })
@@ -2011,13 +2014,13 @@ Select the appropriate plan to fulfil more requests`),
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,
2019
+ key: ze,
2017
2020
  children: (0, r.jsx)("div", {
2018
2021
  ref: S,
2019
2022
  style: { paddingBottom: 24 },
2020
- children: (0, r.jsx)(Ut, {
2023
+ children: (0, r.jsx)(Mt, {
2021
2024
  currentReq: ie,
2022
2025
  setCurrentReq: pe,
2023
2026
  imageStockList: ae,
@@ -2027,29 +2030,29 @@ Select the appropriate plan to fulfil more requests`),
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,
2038
+ key: Ke,
2036
2039
  children: (0, r.jsx)("div", {
2037
- ref: U,
2040
+ ref: M,
2038
2041
  style: { paddingBottom: 24 },
2039
2042
  children: (0, r.jsx)(Gt, {
2040
- currentReqGif: Ae,
2043
+ currentReqGif: xe,
2041
2044
  setCurrentReqGif: Y,
2042
2045
  imageGifList: re,
2043
- setImageGifList: M,
2046
+ setImageGifList: U,
2044
2047
  setModalWidth: $,
2045
2048
  setModalHeight: T,
2046
2049
  setStockLink: G,
2047
2050
  setCurrentImageLink: R,
2048
2051
  inputRef: s,
2049
- customRequest: Pe
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
2058
  children: (0, r.jsx)("div", {
@@ -2057,27 +2060,27 @@ Select the appropriate plan to fulfil more requests`),
2057
2060
  style: { paddingBottom: 24 },
2058
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,
2078
+ key: Ae,
2076
2079
  children: (0, r.jsx)("div", {
2077
2080
  ref: x,
2078
2081
  children: (0, r.jsx)(kt, {
2079
2082
  currentImageLink: b,
2080
- newLink: v,
2083
+ newLink: C,
2081
2084
  previewDisplayUrl: nn,
2082
2085
  resolvedPreviewObjectUrl: en,
2083
2086
  resolvedPreviewBlob: tn,
@@ -2095,13 +2098,13 @@ Select the appropriate plan to fulfil more requests`),
2095
2098
  open: !!O,
2096
2099
  onOk: Qe,
2097
2100
  onCancel: ln,
2098
- footer: H === we ? (0, r.jsx)(r.Fragment, {}) : null,
2101
+ footer: H === Ae ? (0, r.jsx)(r.Fragment, {}) : null,
2099
2102
  children: (0, r.jsx)(p.Spin, {
2100
2103
  spinning: F,
2101
2104
  children: (0, r.jsx)(p.Tabs, {
2102
2105
  activeKey: H,
2103
2106
  onChange: cn,
2104
- items: Le,
2107
+ items: De,
2105
2108
  className: "modal-tabs",
2106
2109
  style: {
2107
2110
  height: me,