@templatical/editor 0.9.1 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/dist/{AiChatSidebar-BUKj9n02.js → AiChatSidebar-Dz5bH1z3.js} +13 -13
  2. package/dist/{AiFeatureMenu-Co14YVJt.js → AiFeatureMenu-D2Xn0jFx.js} +7 -7
  3. package/dist/{BlockIssueBadge-DThKKeub.js → BlockIssueBadge-CnqD1cGo.js} +5 -5
  4. package/dist/{CloudEditor-DHB1FoQD.js → CloudEditor-BizZwsfD.js} +237 -233
  5. package/dist/{CollaboratorBar-Bc6q0gB9.js → CollaboratorBar-Bn2JDu6l.js} +4 -4
  6. package/dist/{CommentsSidebar-DiH4R4F0.js → CommentsSidebar-BAG6rdVC.js} +12 -12
  7. package/dist/{CountdownBlock-BTPefclD.js → CountdownBlock-B_Hr9Bm9.js} +3 -3
  8. package/dist/{CountdownToolbar-Dvr2icg-.js → CountdownToolbar-DaqDLKLk.js} +3 -3
  9. package/dist/{DesignReferenceSidebar-BP32MgpS.js → DesignReferenceSidebar-I9LWjvrj.js} +9 -9
  10. package/dist/{IssuesPanel-B1LT91IX.js → IssuesPanel-B32Ifp4x.js} +8 -8
  11. package/dist/{LoadingTrack-xCOLUR3o.js → LoadingTrack-UTqOUN4O.js} +1 -1
  12. package/dist/{ModuleBrowserModal-CWegFoOA.js → ModuleBrowserModal-DodRped1.js} +10 -10
  13. package/dist/{ModulePreviewCanvas-D9WUSSRT.js → ModulePreviewCanvas-DhcnddJF.js} +3 -3
  14. package/dist/{NumberWithSuffix-CxUBW_V2.js → NumberWithSuffix-DB7GyyCI.js} +3 -3
  15. package/dist/{ParagraphEditor-DrAz2yot.js → ParagraphEditor-pJA9BHAL.js} +26 -26
  16. package/dist/{RichTextEditorContent-gR169m1-.js → RichTextEditorContent-dTGSUff_.js} +6 -6
  17. package/dist/{SaveModuleDialog-DWidA0c9.js → SaveModuleDialog-D634e99d.js} +7 -7
  18. package/dist/{SnapshotHistory-CIo2Jaw-.js → SnapshotHistory-m_nGAHlb.js} +9 -9
  19. package/dist/{TemplateScoringPanel-seBvvn8O.js → TemplateScoringPanel-BOQh9neV.js} +14 -14
  20. package/dist/{TestEmailModal-BuCuWp3N.js → TestEmailModal-DOcwoKkc.js} +5 -5
  21. package/dist/{TitleEditor-BmW0uMl7.js → TitleEditor-t6JMWamY.js} +12 -12
  22. package/dist/{TplModal-YFpBaiLj.js → TplModal-BAtbfDB0.js} +4 -4
  23. package/dist/{blockTypeIcons-DCkHXPhx.js → blockTypeIcons-C4lXx3Au.js} +2 -2
  24. package/dist/bundle-stats.json +6 -6
  25. package/dist/cdn/chunks/{AiFeatureMenu-Dayzk2H7.js → AiFeatureMenu-BeOyHAoZ.js} +3 -3
  26. package/dist/cdn/chunks/{AiFeatureMenu-Dayzk2H7.js.map → AiFeatureMenu-BeOyHAoZ.js.map} +1 -1
  27. package/dist/cdn/chunks/{BlockIssueBadge-D_US2wqo.js → BlockIssueBadge-C6YilQdl.js} +5 -5
  28. package/dist/cdn/chunks/{BlockIssueBadge-D_US2wqo.js.map → BlockIssueBadge-C6YilQdl.js.map} +1 -1
  29. package/dist/cdn/chunks/{CloudEditor-CrZk-OwQ.js → CloudEditor-DEA37rdW.js} +178 -174
  30. package/dist/cdn/chunks/CloudEditor-DEA37rdW.js.map +1 -0
  31. package/dist/cdn/chunks/{CollaboratorBar-C4CFs5EJ.js → CollaboratorBar-CKW7jOW4.js} +4 -4
  32. package/dist/cdn/chunks/{CollaboratorBar-C4CFs5EJ.js.map → CollaboratorBar-CKW7jOW4.js.map} +1 -1
  33. package/dist/cdn/chunks/{CountdownBlock-D6lCXhZA.js → CountdownBlock-DU9ga9Ki.js} +3 -3
  34. package/dist/cdn/chunks/{CountdownBlock-D6lCXhZA.js.map → CountdownBlock-DU9ga9Ki.js.map} +1 -1
  35. package/dist/cdn/chunks/{CountdownToolbar-BsGUxoRv.js → CountdownToolbar-BHWsxth7.js} +4 -4
  36. package/dist/cdn/chunks/{CountdownToolbar-BsGUxoRv.js.map → CountdownToolbar-BHWsxth7.js.map} +1 -1
  37. package/dist/cdn/chunks/{IssuesPanel-DeHTmRDz.js → IssuesPanel-BkYhij39.js} +9 -9
  38. package/dist/cdn/chunks/{IssuesPanel-DeHTmRDz.js.map → IssuesPanel-BkYhij39.js.map} +1 -1
  39. package/dist/cdn/chunks/{ModuleBrowserModal-Cgjz4xAz.js → ModuleBrowserModal-D51w942J.js} +9 -9
  40. package/dist/cdn/chunks/{ModuleBrowserModal-Cgjz4xAz.js.map → ModuleBrowserModal-D51w942J.js.map} +1 -1
  41. package/dist/cdn/chunks/{ModulePreviewCanvas-CeS9PsAA.js → ModulePreviewCanvas-BqTqcKHS.js} +3 -3
  42. package/dist/cdn/chunks/{ModulePreviewCanvas-CeS9PsAA.js.map → ModulePreviewCanvas-BqTqcKHS.js.map} +1 -1
  43. package/dist/cdn/chunks/{NumberWithSuffix-Bp-idLCc.js → NumberWithSuffix-DuUcF2zG.js} +3 -3
  44. package/dist/cdn/chunks/{NumberWithSuffix-Bp-idLCc.js.map → NumberWithSuffix-DuUcF2zG.js.map} +1 -1
  45. package/dist/cdn/chunks/{ParagraphEditor-fM9aFu8T.js → ParagraphEditor-Bqjn3ZNm.js} +45 -45
  46. package/dist/cdn/chunks/{ParagraphEditor-fM9aFu8T.js.map → ParagraphEditor-Bqjn3ZNm.js.map} +1 -1
  47. package/dist/cdn/chunks/{RichTextEditorContent-DwNPE5H5.js → RichTextEditorContent-mIkkb5EK.js} +4 -4
  48. package/dist/cdn/chunks/{RichTextEditorContent-DwNPE5H5.js.map → RichTextEditorContent-mIkkb5EK.js.map} +1 -1
  49. package/dist/cdn/chunks/{SaveModuleDialog-BrtDXzIz.js → SaveModuleDialog-Felfmkcj.js} +5 -5
  50. package/dist/cdn/chunks/{SaveModuleDialog-BrtDXzIz.js.map → SaveModuleDialog-Felfmkcj.js.map} +1 -1
  51. package/dist/cdn/chunks/{TitleEditor-D0rSnye0.js → TitleEditor-Dcldr8D6.js} +12 -12
  52. package/dist/cdn/chunks/{TitleEditor-D0rSnye0.js.map → TitleEditor-Dcldr8D6.js.map} +1 -1
  53. package/dist/cdn/chunks/blockTypeIcons-D05Wqf5u.js +22 -0
  54. package/dist/cdn/chunks/{blockTypeIcons-YOEe5mDE.js.map → blockTypeIcons-D05Wqf5u.js.map} +1 -1
  55. package/dist/{de-CATfXDKV.js → cdn/chunks/de-DIAGP7yH.js} +2 -6
  56. package/dist/cdn/chunks/de-DIAGP7yH.js.map +1 -0
  57. package/dist/cdn/chunks/{draggable-BwWMFq33.js → draggable-J_1CPXYc.js} +1254 -1253
  58. package/dist/cdn/chunks/draggable-J_1CPXYc.js.map +1 -0
  59. package/dist/{en-CwCAgYL5.js → cdn/chunks/en-nqIW8Q9W.js} +2 -6
  60. package/dist/cdn/chunks/en-nqIW8Q9W.js.map +1 -0
  61. package/dist/cdn/chunks/{extensions-GYsbQFPr.js → extensions-CNmpC18A.js} +127 -124
  62. package/dist/cdn/chunks/{extensions-GYsbQFPr.js.map → extensions-CNmpC18A.js.map} +1 -1
  63. package/dist/cdn/chunks/{features-D-2kVhHY.js → features-_ar9QbVv.js} +1006 -979
  64. package/dist/cdn/chunks/features-_ar9QbVv.js.map +1 -0
  65. package/dist/cdn/chunks/{icons-fZoyKV_s.js → icons-CnwCLJX-.js} +19 -33
  66. package/dist/cdn/chunks/icons-CnwCLJX-.js.map +1 -0
  67. package/dist/cdn/chunks/{media-library-CO2WOETY.js → media-library-9jyt7Bf9.js} +83 -79
  68. package/dist/cdn/chunks/media-library-9jyt7Bf9.js.map +1 -0
  69. package/dist/{pt-BR-D3Mg7AKe.js → cdn/chunks/pt-BR-DCNnLLx9.js} +2 -6
  70. package/dist/cdn/chunks/pt-BR-DCNnLLx9.js.map +1 -0
  71. package/dist/cdn/chunks/{quality-BxPiS-wv.js → quality-CO9mj_RH.js} +494 -484
  72. package/dist/cdn/chunks/quality-CO9mj_RH.js.map +1 -0
  73. package/dist/cdn/chunks/{renderer-CfHPFI5v.js → renderer-m6XTCWCL.js} +135 -117
  74. package/dist/cdn/chunks/renderer-m6XTCWCL.js.map +1 -0
  75. package/dist/cdn/chunks/{src-ftxPuuQh.js → src-DfMSYqvE.js} +9 -9
  76. package/dist/cdn/chunks/{src-ftxPuuQh.js.map → src-DfMSYqvE.js.map} +1 -1
  77. package/dist/cdn/chunks/{styles-CVUvPdKD.js → styles-1uFWdD5T.js} +1045 -1074
  78. package/dist/cdn/chunks/styles-1uFWdD5T.js.map +1 -0
  79. package/dist/cdn/chunks/{tiptap-BBbH3IT9.js → tiptap-CJbIm_hE.js} +5 -5
  80. package/dist/cdn/chunks/{tiptap-BBbH3IT9.js.map → tiptap-CJbIm_hE.js.map} +1 -1
  81. package/dist/cdn/editor.css +1 -1
  82. package/dist/cdn/editor.js +109 -100
  83. package/dist/cdn/editor.js.map +1 -1
  84. package/dist/{check-ChQyfxJ3.js → check-Bs6_uQpm.js} +1 -1
  85. package/dist/{chevron-down-DJjo0jSV.js → chevron-down-so1rnGwF.js} +1 -1
  86. package/dist/{circle-alert-CPH6l3Lc.js → circle-alert-CrKv0AuW.js} +1 -1
  87. package/dist/{clock-DHl_BIkU.js → clock-Cpx6GYpa.js} +1 -1
  88. package/dist/{cloud-VxYMtfXC.js → cloud-bHhCNRZa.js} +80 -74
  89. package/dist/{createLucideIcon-XgXOJ05E.js → createLucideIcon-DFBxEm5K.js} +3 -3
  90. package/dist/{cdn/chunks/de-CATfXDKV.js → de-DIAGP7yH.js} +0 -8
  91. package/dist/{dist-C0jo8wtG.js → dist-0RguD1vS.js} +1 -1
  92. package/dist/{dist-CNLAS2v2.js → dist-2-A7SaKm.js} +3 -3
  93. package/dist/{dist-UK-lbEBc.js → dist-74n2Mqc6.js} +1 -1
  94. package/dist/{dist-BzuC8o3y.js → dist-B3CcePtK.js} +3 -3
  95. package/dist/{dist-D8C6jIXM.js → dist-BejBMbBX.js} +3 -3
  96. package/dist/{dist-CIV3Brg-.js → dist-BufRk8ZY.js} +4 -6
  97. package/dist/{dist-DILjuzSv.js → dist-Bvje_Tqb.js} +1 -1
  98. package/dist/{dist-BDgf2G-V.js → dist-BxHa6kIT.js} +3 -3
  99. package/dist/{dist-CUpJmrjt.js → dist-CIK3BYgh.js} +1 -1
  100. package/dist/{dist-C8wMh_gi.js → dist-CMkZaqX1.js} +1 -1
  101. package/dist/{dist-BxP6TB0l.js → dist-CoaWXQ7N.js} +1 -1
  102. package/dist/{dist-D5lmdi1F.js → dist-D1YvgM6p.js} +1 -1
  103. package/dist/{dist-DYO-w_Jf.js → dist-DJ5YJLXn.js} +1 -1
  104. package/dist/{dist-DXaxGLsw.js → dist-DwEpKyry.js} +1 -1
  105. package/dist/{cdn/chunks/en-CwCAgYL5.js → en-nqIW8Q9W.js} +0 -8
  106. package/dist/{extensions-Mj2-D8uK.js → extensions-C810eSzv.js} +107 -104
  107. package/dist/{image-up-CPBCOMit.js → image-up-kMLE5GsI.js} +1 -1
  108. package/dist/index.d.ts +8 -0
  109. package/dist/{info-DIY9mguM.js → info-xqRxLfNz.js} +1 -1
  110. package/dist/keys-BoYBr3PU.js +10 -0
  111. package/dist/{list-checks-CSCyu3fH.js → list-checks-C81htkBJ.js} +1 -1
  112. package/dist/{loader-circle-Rz_4vJLH.js → loader-circle-C6cZPIum.js} +1 -1
  113. package/dist/{message-circle-D-umK_MU.js → message-circle-dqOBRe07.js} +1 -1
  114. package/dist/{cdn/chunks/pt-BR-D3Mg7AKe.js → pt-BR-DCNnLLx9.js} +0 -8
  115. package/dist/{refresh-cw-CvWF4jfR.js → refresh-cw-DCjNd6o0.js} +1 -1
  116. package/dist/{scan-line-wanvAFDr.js → scan-line-DXz0nZVJ.js} +1 -1
  117. package/dist/{send-BhbhbIFT.js → send-C4uH_WaI.js} +1 -1
  118. package/dist/{shield-check-CXPPMWth.js → shield-check-B3U68ssA.js} +1 -1
  119. package/dist/{sparkles-CrUN0KWY.js → sparkles-CsDweGUy.js} +1 -1
  120. package/dist/style.css +1 -1
  121. package/dist/{styles-CxwIlb7Y.js → styles-CBlNpqL9.js} +1031 -1074
  122. package/dist/templatical-editor.js +116 -107
  123. package/dist/{text-align-end-Bkq8oBrD.js → text-align-start-BkKQePFp.js} +11 -11
  124. package/dist/{trash-2-BpY5BCLT.js → trash-2-BIOkaEz1.js} +1 -1
  125. package/dist/{triangle-alert-MwJBKR2e.js → triangle-alert-Bbgu6uUG.js} +1 -1
  126. package/dist/{useAliveFlag-BLyG8L4d.js → useAliveFlag-Bc99FWyR.js} +1 -1
  127. package/dist/{useCloudI18n-DKWJg6rJ.js → useCloudI18n-DiwsLi6z.js} +2 -2
  128. package/dist/{useEditorCore-CEkf_VWX.js → useEditorCore-7c1QpPlw.js} +717 -694
  129. package/dist/{useI18n-Besvmtxy.js → useI18n-DskZMfRJ.js} +2 -2
  130. package/dist/{useMergeTag-WNzaCpXR.js → useMergeTag-Co4xYwG6.js} +4 -4
  131. package/dist/usePopoverRoot-DYH_gX8o.js +8 -0
  132. package/dist/{vue.runtime.esm-bundler-BDSGA5hA.js → vue.runtime.esm-bundler-D0Hg03Ub.js} +1289 -1288
  133. package/dist/{x-rcnxRG8Y.js → x-DWU6NCuE.js} +1 -1
  134. package/package.json +10 -10
  135. package/dist/cdn/chunks/CloudEditor-CrZk-OwQ.js.map +0 -1
  136. package/dist/cdn/chunks/blockTypeIcons-YOEe5mDE.js +0 -22
  137. package/dist/cdn/chunks/de-CATfXDKV.js.map +0 -1
  138. package/dist/cdn/chunks/draggable-BwWMFq33.js.map +0 -1
  139. package/dist/cdn/chunks/en-CwCAgYL5.js.map +0 -1
  140. package/dist/cdn/chunks/features-D-2kVhHY.js.map +0 -1
  141. package/dist/cdn/chunks/icons-fZoyKV_s.js.map +0 -1
  142. package/dist/cdn/chunks/media-library-CO2WOETY.js.map +0 -1
  143. package/dist/cdn/chunks/pt-BR-D3Mg7AKe.js.map +0 -1
  144. package/dist/cdn/chunks/quality-BxPiS-wv.js.map +0 -1
  145. package/dist/cdn/chunks/renderer-CfHPFI5v.js.map +0 -1
  146. package/dist/cdn/chunks/styles-CVUvPdKD.js.map +0 -1
  147. package/dist/keys-BiQlvx51.js +0 -10
  148. package/dist/usePopoverRoot-CKt956u-.js +0 -8
@@ -1,6 +1,6 @@
1
- import { D as e, F as t, H as n, I as r, K as i, L as a, M as o, N as s, P as c, T as l, V as u, Z as d, c as f, ct as p, d as m, f as h, g, h as _, it as v, l as y, m as b, n as x, o as S, ot as C, p as w, s as T, st as E, tt as D, u as O, v as k, x as A, y as j, z as ee } from "./draggable-BwWMFq33.js";
2
- import { At as M, Ot as te, T as N, an as ne, at as re, cn as P, ct as ie, dn as F, ht as I, in as ae, ln as L, mt as oe, on as se, ot as ce, rt as le, sn as ue, vt as de, w as R, wt as fe } from "./features-D-2kVhHY.js";
3
- import { A as pe, E as me, G as he, J as ge, R as _e, V as ve, b as ye, m as be, q as xe } from "./icons-fZoyKV_s.js";
1
+ import { D as e, F as t, H as n, I as r, K as i, L as a, M as o, N as s, P as c, T as l, V as u, Z as d, c as f, ct as p, d as m, f as h, g, h as _, it as v, l as y, m as b, n as x, o as S, ot as C, p as w, s as T, st as E, tt as D, u as O, v as k, x as A, y as j, z as ee } from "./draggable-J_1CPXYc.js";
2
+ import { At as M, Ot as te, T as N, an as ne, at as re, cn as ie, ct as ae, fn as P, ht as F, ln as I, mt as L, on as oe, ot as se, rt as ce, sn as le, un as ue, vt as de, w as R, wt as fe } from "./features-_ar9QbVv.js";
3
+ import { B as pe, K as me, L as he, T as ge, W as _e, k as ve, p as ye, q as be, y as xe } from "./icons-CnwCLJX-.js";
4
4
  //#region ../media-library/src/api-client.ts
5
5
  var Se = class {
6
6
  authManager;
@@ -215,7 +215,7 @@ function Ce(e) {
215
215
  a.value = "files", i.value = e, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await k();
216
216
  }
217
217
  async function N() {
218
- a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await I();
218
+ a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await F();
219
219
  }
220
220
  async function ne(r) {
221
221
  u.value = !0;
@@ -249,7 +249,7 @@ function Ce(e) {
249
249
  u.value = !1, m.value = null;
250
250
  }
251
251
  }
252
- async function P(r) {
252
+ async function ie(r) {
253
253
  if (h.value.size !== 0) try {
254
254
  let e = await t.moveMedia([...h.value], r);
255
255
  if (i.value === null) {
@@ -261,7 +261,7 @@ function Ce(e) {
261
261
  e.onError?.(t);
262
262
  }
263
263
  }
264
- async function ie(r, i, a) {
264
+ async function ae(r, i, a) {
265
265
  try {
266
266
  let e = await t.updateMedia(r, i, a);
267
267
  n.value = n.value.map((t) => t.id === r ? e : t), g.value?.id === r && (g.value = e);
@@ -269,21 +269,21 @@ function Ce(e) {
269
269
  e.onError?.(t);
270
270
  }
271
271
  }
272
- async function F() {
272
+ async function P() {
273
273
  if (h.value.size !== 0) try {
274
274
  await t.deleteMedia([...h.value]), n.value = n.value.filter((e) => !h.value.has(e.id)), _.value = _.value.filter((e) => !h.value.has(e.id)), h.value = /* @__PURE__ */ new Set(), g.value = null;
275
275
  } catch (t) {
276
276
  e.onError?.(t);
277
277
  }
278
278
  }
279
- async function I() {
279
+ async function F() {
280
280
  try {
281
281
  _.value = await t.getFrequentlyUsed();
282
282
  } catch (t) {
283
283
  e.onError?.(t);
284
284
  }
285
285
  }
286
- async function ae() {
286
+ async function I() {
287
287
  if (h.value.size === 0) return !1;
288
288
  b.value = [...h.value];
289
289
  try {
@@ -423,9 +423,9 @@ function Ce(e) {
423
423
  showFrequentlyUsed: N,
424
424
  uploadFile: ne,
425
425
  uploadFiles: re,
426
- moveSelected: P,
427
- updateFile: ie,
428
- deleteSelected: F,
426
+ moveSelected: ie,
427
+ updateFile: ae,
428
+ deleteSelected: P,
429
429
  isImportingFromUrl: x,
430
430
  importFromUrlError: S,
431
431
  importFromUrl: se,
@@ -437,8 +437,8 @@ function Ce(e) {
437
437
  renameFolder: pe,
438
438
  deleteFolder: me,
439
439
  findFolderInTree: fe,
440
- loadFrequentlyUsed: I,
441
- checkUsageBeforeDelete: ae,
440
+ loadFrequentlyUsed: F,
441
+ checkUsageBeforeDelete: I,
442
442
  confirmDelete: L,
443
443
  cancelDelete: oe,
444
444
  isReplacing: C,
@@ -559,7 +559,11 @@ function je(e, t, n) {
559
559
  let r = e.width, i = e.height;
560
560
  if (!t && !n) return e;
561
561
  let a = r, o = i;
562
- if (t && r > t && (a = t, o = Math.round(t / r * i)), n && o > n && (o = n, a = Math.round(a * (n / (i * (t ? t / r : 1))))), a === r && o === i) return e;
562
+ if (t && r > t && (a = t, o = Math.round(t / r * i)), n && o > n) {
563
+ let e = n / o;
564
+ a = Math.round(a * e), o = n;
565
+ }
566
+ if (a === r && o === i) return e;
563
567
  let s = document.createElement("canvas");
564
568
  s.width = a, s.height = o;
565
569
  let c = s.getContext("2d");
@@ -596,7 +600,7 @@ function Ne(e, t, n, r) {
596
600
  //#region ../media-library/src/keys.ts
597
601
  var Pe = Symbol("templaticalMediaPopoverTarget");
598
602
  //#endregion
599
- //#region ../../node_modules/.pnpm/vue-advanced-cropper@2.8.9_vue@3.5.34_typescript@6.0.3_/node_modules/vue-advanced-cropper/dist/index.esm-bundler.js
603
+ //#region ../../node_modules/.pnpm/vue-advanced-cropper@2.8.9_vue@3.5.35_typescript@6.0.3_/node_modules/vue-advanced-cropper/dist/index.esm-bundler.js
600
604
  function Fe(e, t) {
601
605
  var n = Object.keys(e);
602
606
  if (Object.getOwnPropertySymbols) {
@@ -4126,7 +4130,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4126
4130
  }, nr = {
4127
4131
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
4128
4132
  style: { color: "var(--tpl-text-muted)" }
4129
- }, rr = ["placeholder"], ir = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, ar = ["disabled"], or = /* @__PURE__ */ le(/* @__PURE__ */ A({
4133
+ }, rr = ["placeholder"], ir = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, ar = ["disabled"], or = /* @__PURE__ */ ce(/* @__PURE__ */ A({
4130
4134
  __name: "MediaEditModal",
4131
4135
  props: {
4132
4136
  visible: { type: Boolean },
@@ -4134,31 +4138,31 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4134
4138
  },
4135
4139
  emits: ["save", "close"],
4136
4140
  setup(e, { emit: t }) {
4137
- let r = e, i = t, { t: a } = z(), s = l("tplUiTheme"), f = l(Pe, d(null)), T = a.mediaLibrary, { isImageMimeType: D } = Oe(), A = d(""), M = d(""), te = d(null), N = d("free"), ne = d(void 0), re = d(void 0), P = d(""), ie = d(""), F = d(void 0), I = d(null), ae = d(!1), L = d(!1), oe = d(!1), se = h(() => r.item ? [
4141
+ let r = e, i = t, { t: a } = z(), s = l("tplUiTheme"), f = l(Pe, d(null)), T = a.mediaLibrary, { isImageMimeType: D } = Oe(), A = d(""), M = d(""), te = d(null), N = d("free"), ne = d(void 0), re = d(void 0), ie = d(""), ae = d(""), P = d(void 0), F = d(null), I = d(!1), L = d(!1), oe = d(!1), se = h(() => r.item ? [
4138
4142
  "image/jpeg",
4139
4143
  "image/png",
4140
4144
  "image/webp",
4141
4145
  "image/gif"
4142
- ].includes(r.item.mime_type) : !1), ce = h(() => N.value === "original" ? F.value : ke[N.value]), le = h(() => I.value ? Ne(I.value.width, I.value.height, ne.value, re.value) : null);
4146
+ ].includes(r.item.mime_type) : !1), ce = h(() => N.value === "original" ? P.value : ke[N.value]), le = h(() => F.value ? Ne(F.value.width, F.value.height, ne.value, re.value) : null);
4143
4147
  ee(() => r.visible, (e) => {
4144
- e && r.item && (A.value = r.item.filename, M.value = r.item.alt_text || "", N.value = "free", ne.value = void 0, re.value = void 0, P.value = "", ie.value = "", F.value = void 0, I.value = null, ae.value = !1, oe.value = !1, r.item.width && r.item.height && (F.value = r.item.width / r.item.height));
4148
+ e && r.item && (A.value = r.item.filename, M.value = r.item.alt_text || "", N.value = "free", ne.value = void 0, re.value = void 0, ie.value = "", ae.value = "", P.value = void 0, F.value = null, I.value = !1, oe.value = !1, r.item.width && r.item.height && (P.value = r.item.width / r.item.height));
4145
4149
  });
4146
4150
  function ue(e) {
4147
- e.coordinates && (I.value = {
4151
+ e.coordinates && (F.value = {
4148
4152
  width: Math.round(e.coordinates.width),
4149
4153
  height: Math.round(e.coordinates.height)
4150
4154
  }, oe.value = !0);
4151
4155
  }
4152
4156
  function de() {
4153
- ae.value = !0, !F.value && r.item?.width && r.item?.height && (F.value = r.item.width / r.item.height);
4157
+ I.value = !0, !P.value && r.item?.width && r.item?.height && (P.value = r.item.width / r.item.height);
4154
4158
  }
4155
4159
  function R(e) {
4156
4160
  let t = e.target.value;
4157
- P.value = t, ne.value = t && parseInt(t, 10) || void 0;
4161
+ ie.value = t, ne.value = t && parseInt(t, 10) || void 0;
4158
4162
  }
4159
4163
  function fe(e) {
4160
4164
  let t = e.target.value;
4161
- ie.value = t, re.value = t && parseInt(t, 10) || void 0;
4165
+ ae.value = t, re.value = t && parseInt(t, 10) || void 0;
4162
4166
  }
4163
4167
  async function pe() {
4164
4168
  let e = A.value.trim();
@@ -4232,7 +4236,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4232
4236
  onClick: (t) => N.value = e
4233
4237
  }, p(v(T)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13, In)), 64))])]),
4234
4238
  w("div", Ln, [w("div", Rn, [w("label", zn, [k(p(v(a).mediaLibrary.cropMaxWidth) + " ", 1), w("span", Bn, p(v(a).mediaLibrary.cropOptional), 1)]), w("div", Vn, [w("input", {
4235
- value: P.value,
4239
+ value: ie.value,
4236
4240
  type: "number",
4237
4241
  min: "1",
4238
4242
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-8 tpl:pl-3 tpl:text-xs tpl:outline-none",
@@ -4241,10 +4245,10 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4241
4245
  "background-color": "var(--tpl-bg)",
4242
4246
  color: "var(--tpl-text)"
4243
4247
  },
4244
- placeholder: I.value?.width?.toString() || "",
4248
+ placeholder: F.value?.width?.toString() || "",
4245
4249
  onInput: R
4246
4250
  }, null, 40, Hn), w("span", Un, p(v(a).mediaLibrary.cropPixels), 1)])]), w("div", Wn, [w("label", Gn, [k(p(v(a).mediaLibrary.cropMaxHeight) + " ", 1), w("span", Kn, p(v(a).mediaLibrary.cropOptional), 1)]), w("div", qn, [w("input", {
4247
- value: ie.value,
4251
+ value: ae.value,
4248
4252
  type: "number",
4249
4253
  min: "1",
4250
4254
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-8 tpl:pl-3 tpl:text-xs tpl:outline-none",
@@ -4253,7 +4257,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4253
4257
  "background-color": "var(--tpl-bg)",
4254
4258
  color: "var(--tpl-text)"
4255
4259
  },
4256
- placeholder: I.value?.height?.toString() || "",
4260
+ placeholder: F.value?.height?.toString() || "",
4257
4261
  onInput: fe
4258
4262
  }, null, 40, Jn), w("span", Yn, p(v(a).mediaLibrary.cropPixels), 1)])])]),
4259
4263
  le.value ? (o(), g("div", Xn, [w("span", null, p(v(a).mediaLibrary.cropOutputSize) + ": ", 1), w("span", Zn, p(le.value.width) + " x " + p(le.value.height) + " " + p(v(a).mediaLibrary.cropPixels), 1)])) : _("", !0)
@@ -4333,14 +4337,14 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4333
4337
  function re() {
4334
4338
  u.value = !0, m.value = i.folder.name;
4335
4339
  }
4336
- function P() {
4340
+ function ie() {
4337
4341
  let e = m.value.trim();
4338
4342
  e && e !== i.folder.name && a("renameFolder", i.folder.id, e), u.value = !1, m.value = "";
4339
4343
  }
4340
- function F() {
4344
+ function P() {
4341
4345
  u.value = !1, m.value = "";
4342
4346
  }
4343
- function ae() {
4347
+ function I() {
4344
4348
  x.value = !0, T.value = "", l.value = !0;
4345
4349
  }
4346
4350
  function L() {
@@ -4371,7 +4375,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4371
4375
  w("button", {
4372
4376
  class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
4373
4377
  onClick: i[0] ||= (t) => a("navigate", e.folder.id)
4374
- }, [j(v(xe), {
4378
+ }, [j(v(me), {
4375
4379
  class: "tpl:shrink-0",
4376
4380
  size: 14,
4377
4381
  "stroke-width": 1.5
@@ -4387,8 +4391,8 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4387
4391
  color: "var(--tpl-text)"
4388
4392
  },
4389
4393
  autofocus: "",
4390
- onKeydown: [f(P, ["enter"]), f(F, ["escape"])],
4391
- onBlur: P,
4394
+ onKeydown: [f(ie, ["enter"]), f(P, ["escape"])],
4395
+ onBlur: ie,
4392
4396
  onClick: i[2] ||= y(() => {}, ["stop"])
4393
4397
  }, null, 544)), [[S, m.value]]) : _("", !0),
4394
4398
  u.value ? _("", !0) : (o(), g("span", lr, [
@@ -4396,8 +4400,8 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4396
4400
  key: 0,
4397
4401
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4398
4402
  title: v(s).mediaLibrary.addSubfolder,
4399
- onClick: y(ae, ["stop"])
4400
- }, [j(v(me), {
4403
+ onClick: y(I, ["stop"])
4404
+ }, [j(v(ge), {
4401
4405
  size: 12,
4402
4406
  "stroke-width": 2
4403
4407
  })], 8, ur)) : _("", !0),
@@ -4405,14 +4409,14 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4405
4409
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4406
4410
  title: v(s).mediaLibrary.renameFolder,
4407
4411
  onClick: y(re, ["stop"])
4408
- }, [j(v(I), {
4412
+ }, [j(v(F), {
4409
4413
  size: 12,
4410
4414
  "stroke-width": 2
4411
4415
  })], 8, dr),
4412
4416
  w("button", {
4413
4417
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4414
4418
  onClick: i[3] ||= y((t) => a("deleteFolder", e.folder.id), ["stop"])
4415
- }, [j(v(ie), {
4419
+ }, [j(v(ae), {
4416
4420
  size: 12,
4417
4421
  "stroke-width": 2,
4418
4422
  style: { color: "var(--tpl-danger)" }
@@ -4488,7 +4492,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4488
4492
  color: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
4489
4493
  }),
4490
4494
  onClick: d[0] ||= (e) => r("navigate", null)
4491
- }, [j(v(ge), {
4495
+ }, [j(v(be), {
4492
4496
  size: 14,
4493
4497
  "stroke-width": 1.5
4494
4498
  }), k(" " + p(v(i).mediaLibrary.allFiles), 1)], 4),
@@ -4521,7 +4525,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4521
4525
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
4522
4526
  style: { color: "var(--tpl-text-muted)" },
4523
4527
  onClick: l
4524
- }, [j(v(me), {
4528
+ }, [j(v(ge), {
4525
4529
  size: 14,
4526
4530
  "stroke-width": 1.5
4527
4531
  }), k(" " + p(v(i).mediaLibrary.newFolder), 1)])),
@@ -4535,7 +4539,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4535
4539
  color: e.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
4536
4540
  }),
4537
4541
  onClick: d[6] ||= (e) => r("showFrequentlyUsed")
4538
- }, [j(v(be), {
4542
+ }, [j(v(ye), {
4539
4543
  size: 14,
4540
4544
  "stroke-width": 1.5
4541
4545
  }), k(" " + p(v(i).mediaLibrary.frequentlyUsed), 1)], 4)) : _("", !0)
@@ -4752,7 +4756,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4752
4756
  }, Yr = {
4753
4757
  key: 4,
4754
4758
  class: "tpl:flex tpl:justify-center tpl:py-4"
4755
- }, Xr = /* @__PURE__ */ le(/* @__PURE__ */ A({
4759
+ }, Xr = /* @__PURE__ */ ce(/* @__PURE__ */ A({
4756
4760
  __name: "MediaGrid",
4757
4761
  props: {
4758
4762
  items: {},
@@ -4778,7 +4782,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4778
4782
  r("select", e);
4779
4783
  }
4780
4784
  let { t: u } = z(), f = d(null);
4781
- L(f, ([{ isIntersecting: e }]) => {
4785
+ ue(f, ([{ isIntersecting: e }]) => {
4782
4786
  e && n.hasMore && !n.isLoading && r("loadMore");
4783
4787
  }, { threshold: .1 });
4784
4788
  function m(e) {
@@ -4799,7 +4803,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4799
4803
  key: t,
4800
4804
  class: C(["tpl-pulse tpl:rounded-lg", e.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
4801
4805
  style: { "background-color": "var(--tpl-bg-hover)" }
4802
- }, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), g("div", Cr, [j(v(ge), {
4806
+ }, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), g("div", Cr, [j(v(be), {
4803
4807
  class: "tpl:mb-3",
4804
4808
  size: 40,
4805
4809
  "stroke-width": 1,
@@ -4823,7 +4827,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4823
4827
  style: { color: "var(--tpl-text-muted)" },
4824
4828
  title: v(u).mediaLibrary.editFile,
4825
4829
  onClick: y((e) => r("edit", t), ["stop"])
4826
- }, [j(v(I), {
4830
+ }, [j(v(F), {
4827
4831
  size: 12,
4828
4832
  "stroke-width": 2
4829
4833
  })], 8, Kr), w("button", {
@@ -4831,7 +4835,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4831
4835
  style: { color: "var(--tpl-text-muted)" },
4832
4836
  title: v(u).mediaLibrary.replaceFile,
4833
4837
  onClick: y((e) => r("replace", t), ["stop"])
4834
- }, [j(v(oe), {
4838
+ }, [j(v(L), {
4835
4839
  size: 12,
4836
4840
  "stroke-width": 2
4837
4841
  })], 8, qr)]),
@@ -4868,7 +4872,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4868
4872
  style: { "background-color": "rgba(0, 0, 0, 0.6)" },
4869
4873
  title: v(u).mediaLibrary.editFile,
4870
4874
  onClick: y((e) => r("edit", t), ["stop"])
4871
- }, [j(v(I), {
4875
+ }, [j(v(F), {
4872
4876
  size: 11,
4873
4877
  "stroke-width": 2
4874
4878
  })], 8, Pr), w("button", {
@@ -4876,7 +4880,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4876
4880
  style: { "background-color": "rgba(0, 0, 0, 0.6)" },
4877
4881
  title: v(u).mediaLibrary.replaceFile,
4878
4882
  onClick: y((e) => r("replace", t), ["stop"])
4879
- }, [j(v(oe), {
4883
+ }, [j(v(L), {
4880
4884
  size: 11,
4881
4885
  "stroke-width": 2
4882
4886
  })], 8, Fr)]),
@@ -5010,7 +5014,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5010
5014
  }), r.children?.length && n.push(...a(r.children, t + 1));
5011
5015
  return n;
5012
5016
  }
5013
- return ae(i, () => {
5017
+ return ne(i, () => {
5014
5018
  n("close");
5015
5019
  }), (t, s) => (o(), g("div", {
5016
5020
  ref_key: "pickerRef",
@@ -5025,7 +5029,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5025
5029
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
5026
5030
  style: { color: "var(--tpl-text)" },
5027
5031
  onClick: s[0] ||= (e) => n("select", null)
5028
- }, [j(v(ge), {
5032
+ }, [j(v(be), {
5029
5033
  class: "tpl:shrink-0",
5030
5034
  size: 14,
5031
5035
  "stroke-width": 1.5
@@ -5040,7 +5044,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5040
5044
  disabled: t.id === e.currentFolderId,
5041
5045
  onClick: (e) => n("select", t.id)
5042
5046
  }, [
5043
- j(v(xe), {
5047
+ j(v(me), {
5044
5048
  class: "tpl:shrink-0",
5045
5049
  size: 14,
5046
5050
  "stroke-width": 1.5
@@ -5065,7 +5069,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5065
5069
  }, xi = {
5066
5070
  class: "tpl:block tpl:text-[10px]",
5067
5071
  style: { color: "var(--tpl-text-muted)" }
5068
- }, Si = ["value"], Ci = ["value"], wi = /* @__PURE__ */ le(/* @__PURE__ */ A({
5072
+ }, Si = ["value"], Ci = ["value"], wi = /* @__PURE__ */ ce(/* @__PURE__ */ A({
5069
5073
  __name: "MediaPreviewPanel",
5070
5074
  props: {
5071
5075
  item: {},
@@ -5151,7 +5155,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5151
5155
  y.value && e.item.width && e.item.height ? (o(), g(O, { key: 0 }, [k(" · " + p(e.item.width) + "×" + p(e.item.height) + "px ", 1)], 64)) : _("", !0),
5152
5156
  m.value ? (o(), g(O, { key: 1 }, [
5153
5157
  n[0] ||= k(" · ", -1),
5154
- j(v(xe), {
5158
+ j(v(me), {
5155
5159
  class: "tpl:mb-px tpl:inline",
5156
5160
  size: 9,
5157
5161
  "stroke-width": 2
@@ -5318,9 +5322,9 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5318
5322
  let t = u(e);
5319
5323
  t.length && n("upload", t);
5320
5324
  }
5321
- let { isOverDropZone: m } = se(l, { onDrop: (e) => {
5325
+ let { isOverDropZone: m } = le(l, { onDrop: (e) => {
5322
5326
  e?.length && f(e);
5323
- } }), { open: h, onChange: _ } = P({
5327
+ } }), { open: h, onChange: _ } = I({
5324
5328
  accept: s.value,
5325
5329
  multiple: !0
5326
5330
  });
@@ -5344,7 +5348,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5344
5348
  current: e.uploadProgress.current,
5345
5349
  total: e.uploadProgress.total
5346
5350
  }) : v(r).mediaLibrary.uploading), 1)])) : (o(), g(O, { key: 1 }, [
5347
- j(v(ce), {
5351
+ j(v(se), {
5348
5352
  class: "tpl:mb-2",
5349
5353
  size: 24,
5350
5354
  "stroke-width": 1.5,
@@ -5475,13 +5479,13 @@ function Xi(e) {
5475
5479
  }), ee(() => t.previewItem.value?.id, () => {
5476
5480
  c.value = "original";
5477
5481
  });
5478
- let b = F((e) => {
5482
+ let b = P((e) => {
5479
5483
  t.search(e);
5480
5484
  }, 300);
5481
5485
  function x(e) {
5482
5486
  s.value = e, b(e);
5483
5487
  }
5484
- let { copy: S, copied: C } = ne({
5488
+ let { copy: S, copied: C } = oe({
5485
5489
  copiedDuring: 2e3,
5486
5490
  legacy: !0
5487
5491
  });
@@ -5518,10 +5522,10 @@ function Xi(e) {
5518
5522
  function N(e) {
5519
5523
  t.checkUsageBeforeReplace(e);
5520
5524
  }
5521
- async function re(e) {
5525
+ async function ne(e) {
5522
5526
  await t.replaceFile(e);
5523
5527
  }
5524
- function P() {
5528
+ function re() {
5525
5529
  t.clearSelection(), t.cancelDelete(), t.cancelReplace(), s.value = "", t.categoryFilter.value = null, t.sortOption.value = "newest", t.viewMode.value = "files", l.value = null, u.value = !1, c.value = "original";
5526
5530
  }
5527
5531
  return {
@@ -5551,8 +5555,8 @@ function Xi(e) {
5551
5555
  handleMoveToFolder: M,
5552
5556
  handleDeleteClick: te,
5553
5557
  handleReplaceItem: N,
5554
- handleReplaceFile: re,
5555
- resetUI: P
5558
+ handleReplaceFile: ne,
5559
+ resetUI: re
5556
5560
  };
5557
5561
  }
5558
5562
  //#endregion
@@ -5634,7 +5638,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5634
5638
  setup(e, { emit: t }) {
5635
5639
  let n = e, r = t, { t: i } = z(), a = l("tplUiTheme");
5636
5640
  s(Pe, D(() => n.popoverTarget ?? null));
5637
- let d = l("authManager"), f = l("projectId"), S = h(() => f.value), T = l("planConfig"), A = h(() => T.hasFeature("media_folders")), te = h(() => T.hasFeature("import_from_url")), N = h(() => T.config.value?.storage.used_bytes ?? 0), ne = h(() => T.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: P, availableCategories: ie } = Oe(), F = Ce({
5641
+ let d = l("authManager"), f = l("projectId"), S = h(() => f.value), T = l("planConfig"), A = h(() => T.hasFeature("media_folders")), te = h(() => T.hasFeature("import_from_url")), N = h(() => T.config.value?.storage.used_bytes ?? 0), ne = h(() => T.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: ae, availableCategories: P } = Oe(), F = Ce({
5638
5642
  projectId: S.value,
5639
5643
  authManager: d
5640
5644
  }), I = Xi({
@@ -5645,15 +5649,15 @@ var Zi = ["data-tpl-theme"], Qi = {
5645
5649
  ee(() => n.visible, (e) => {
5646
5650
  e ? (F.loadItems(), F.loadFrequentlyUsed()) : I.resetUI();
5647
5651
  });
5648
- function ae(e) {
5652
+ function L(e) {
5649
5653
  e.key === "Escape" && r("close");
5650
5654
  }
5651
- ue(document, "keydown", ae);
5652
- function L() {
5653
- return F.previewItem.value ? n.accept?.length ? P(F.previewItem.value.mime_type, n.accept) : !0 : !1;
5654
- }
5655
+ ie(document, "keydown", L);
5655
5656
  function oe() {
5656
- if (L()) {
5657
+ return F.previewItem.value ? n.accept?.length ? ae(F.previewItem.value.mime_type, n.accept) : !0 : !1;
5658
+ }
5659
+ function se() {
5660
+ if (oe()) {
5657
5661
  let e = F.previewItem.value;
5658
5662
  r("select", {
5659
5663
  ...e,
@@ -5692,7 +5696,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5692
5696
  },
5693
5697
  placeholder: v(i).mediaLibrary.searchPlaceholder,
5694
5698
  onInput: n[0] ||= (e) => v(I).handleSearchInput(e.target.value)
5695
- }, null, 40, ra), j(v(ye), {
5699
+ }, null, 40, ra), j(v(xe), {
5696
5700
  class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
5697
5701
  size: 13,
5698
5702
  "stroke-width": 2,
@@ -5748,7 +5752,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5748
5752
  }),
5749
5753
  title: v(I).showSidebar.value ? v(i).mediaLibrary.hideFolders : v(i).mediaLibrary.showFolders,
5750
5754
  onClick: n[2] ||= (e) => v(I).showSidebar.value = !v(I).showSidebar.value
5751
- }, [j(v(pe), {
5755
+ }, [j(v(ve), {
5752
5756
  size: 16,
5753
5757
  "stroke-width": 2
5754
5758
  })], 12, la)) : _("", !0),
@@ -5770,7 +5774,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5770
5774
  }),
5771
5775
  title: v(i).mediaLibrary.viewGrid,
5772
5776
  onClick: n[3] ||= (e) => v(I).layoutMode.value = "grid"
5773
- }, [j(v(he), {
5777
+ }, [j(v(_e), {
5774
5778
  size: 14,
5775
5779
  "stroke-width": 2
5776
5780
  })], 12, fa), w("button", {
@@ -5781,11 +5785,11 @@ var Zi = ["data-tpl-theme"], Qi = {
5781
5785
  }),
5782
5786
  title: v(i).mediaLibrary.viewList,
5783
5787
  onClick: n[4] ||= (e) => v(I).layoutMode.value = "list"
5784
- }, [j(v(_e), {
5788
+ }, [j(v(he), {
5785
5789
  size: 14,
5786
5790
  "stroke-width": 2
5787
5791
  })], 12, pa)])
5788
- ]), w("div", ma, [v(ie).length > 1 ? (o(), g("select", {
5792
+ ]), w("div", ma, [v(P).length > 1 ? (o(), g("select", {
5789
5793
  key: 0,
5790
5794
  class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
5791
5795
  style: {
@@ -5795,7 +5799,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5795
5799
  },
5796
5800
  value: v(F).categoryFilter.value ?? "",
5797
5801
  onChange: n[5] ||= (e) => v(F).filterByCategory(e.target.value || null)
5798
- }, [w("option", ga, p(v(i).mediaLibrary.filterAll), 1), (o(!0), g(O, null, c(v(ie), (e) => (o(), g("option", {
5802
+ }, [w("option", ga, p(v(i).mediaLibrary.filterAll), 1), (o(!0), g(O, null, c(v(P), (e) => (o(), g("option", {
5799
5803
  key: e,
5800
5804
  value: e
5801
5805
  }, p(v(I).getCategoryLabel(e)), 9, _a))), 128))], 40, ha)) : _("", !0), w("select", {
@@ -5831,7 +5835,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5831
5835
  "background-color": "var(--tpl-bg)"
5832
5836
  },
5833
5837
  onClick: n[7] ||= (e) => v(I).showImportUrlModal.value = !0
5834
- }, [j(v(ve), {
5838
+ }, [j(v(pe), {
5835
5839
  size: 14,
5836
5840
  "stroke-width": 2
5837
5841
  }), k(" " + p(v(i).mediaLibrary.importFromUrl), 1)])) : _("", !0)])) : _("", !0), j(Xr, {
@@ -6007,8 +6011,8 @@ var Zi = ["data-tpl-theme"], Qi = {
6007
6011
  "background-color": "var(--tpl-primary)",
6008
6012
  color: "var(--tpl-bg)"
6009
6013
  },
6010
- disabled: !L(),
6011
- onClick: oe
6014
+ disabled: !oe(),
6015
+ onClick: se
6012
6016
  }, p(e.accept?.length ? v(i).mediaLibrary.selectImage : v(i).mediaLibrary.selectFile), 9, Ba)])])])
6013
6017
  ])], 8, Zi)) : _("", !0)]),
6014
6018
  _: 1
@@ -6018,4 +6022,4 @@ var Zi = ["data-tpl-theme"], Qi = {
6018
6022
  //#endregion
6019
6023
  export { zi as a, ci as c, or as d, Oe as f, Se as g, Ce as h, Wi as i, Xr as l, z as m, Xi as n, wi as o, De as p, Yi as r, pi as s, Va as t, yr as u };
6020
6024
 
6021
- //# sourceMappingURL=media-library-CO2WOETY.js.map
6025
+ //# sourceMappingURL=media-library-9jyt7Bf9.js.map