@templatical/editor 0.11.0 → 0.12.0

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 (155) hide show
  1. package/dist/{AiChatSidebar-Cm5RM5Qh.js → AiChatSidebar-CXH7l1Ar.js} +13 -13
  2. package/dist/{AiFeatureMenu-D4D2Sqfk.js → AiFeatureMenu-BKbUUc1D.js} +10 -10
  3. package/dist/{BlockIssueBadge-BF4sdsr4.js → BlockIssueBadge-C-EPqWsh.js} +5 -5
  4. package/dist/{CloudEditor-CLwyq3kf.js → CloudEditor-F5YV5hE3.js} +166 -165
  5. package/dist/{CollaboratorBar-DjX-o5Pi.js → CollaboratorBar-ACUA7lBJ.js} +4 -4
  6. package/dist/{CommentsSidebar-BQJzyCc6.js → CommentsSidebar-CpRLN40c.js} +19 -19
  7. package/dist/{CountdownBlock-D_AsF4F3.js → CountdownBlock-C-6o19qS.js} +3 -3
  8. package/dist/{CountdownToolbar-BGTkFky9.js → CountdownToolbar-CDy9_2Yj.js} +3 -3
  9. package/dist/{DesignReferenceSidebar-O3epZMXD.js → DesignReferenceSidebar-0dTsBW08.js} +9 -9
  10. package/dist/{IssuesPanel-CPBbR8yp.js → IssuesPanel-I0z6k6-H.js} +11 -11
  11. package/dist/{LoadingTrack-e67FA0NP.js → LoadingTrack-C7mGWPHS.js} +1 -1
  12. package/dist/{ModuleBrowserModal-CVS4Sf7H.js → ModuleBrowserModal-Bz9hSjMS.js} +10 -10
  13. package/dist/{ModulePreviewCanvas-C10YXsL_.js → ModulePreviewCanvas-CpaumPMS.js} +23 -23
  14. package/dist/{NumberWithSuffix-eI9pPDWT.js → NumberWithSuffix-Cd7bz1Wk.js} +3 -3
  15. package/dist/{ParagraphEditor-BKoqcKIt.js → ParagraphEditor-BqRFV_Y-.js} +43 -43
  16. package/dist/{RichTextEditorContent-Dvn4woIt.js → RichTextEditorContent-Q5altsx1.js} +6 -6
  17. package/dist/{SaveModuleDialog-BMuIjxVn.js → SaveModuleDialog-DmfvH5D0.js} +7 -7
  18. package/dist/{SnapshotHistory-DZ5_W7e4.js → SnapshotHistory-C052o-8U.js} +13 -13
  19. package/dist/{TemplateScoringPanel-Bt5Rsgen.js → TemplateScoringPanel-CUs8XmIi.js} +24 -24
  20. package/dist/{TestEmailModal-EjpH-F-W.js → TestEmailModal-BIIxRWUt.js} +5 -5
  21. package/dist/{TitleEditor-Rv1deuV7.js → TitleEditor-FMh54Cx5.js} +18 -18
  22. package/dist/{TplModal-DSmCQIm4.js → TplModal-utMtXzSO.js} +4 -4
  23. package/dist/{blockTypeIcons-OhEkQhYj.js → blockTypeIcons-C6UGDmrC.js} +2 -2
  24. package/dist/bundle-stats.json +6 -6
  25. package/dist/cdn/chunks/{AiFeatureMenu-Dm9CL3u0.js → AiFeatureMenu-4NhCFeTh.js} +8 -8
  26. package/dist/cdn/chunks/{AiFeatureMenu-Dm9CL3u0.js.map → AiFeatureMenu-4NhCFeTh.js.map} +1 -1
  27. package/dist/cdn/chunks/{BlockIssueBadge-DjnFAeWq.js → BlockIssueBadge-BYKThwhE.js} +5 -5
  28. package/dist/cdn/chunks/{BlockIssueBadge-DjnFAeWq.js.map → BlockIssueBadge-BYKThwhE.js.map} +1 -1
  29. package/dist/cdn/chunks/{CloudEditor-XSmLmdgp.js → CloudEditor-OO8hWAVp.js} +177 -176
  30. package/dist/cdn/chunks/{CloudEditor-XSmLmdgp.js.map → CloudEditor-OO8hWAVp.js.map} +1 -1
  31. package/dist/cdn/chunks/{CollaboratorBar-BfoGJhns.js → CollaboratorBar-Dn5gXNDt.js} +4 -4
  32. package/dist/cdn/chunks/{CollaboratorBar-BfoGJhns.js.map → CollaboratorBar-Dn5gXNDt.js.map} +1 -1
  33. package/dist/cdn/chunks/{CountdownBlock-GRio55a1.js → CountdownBlock-hYoJdVOt.js} +3 -3
  34. package/dist/cdn/chunks/{CountdownBlock-GRio55a1.js.map → CountdownBlock-hYoJdVOt.js.map} +1 -1
  35. package/dist/cdn/chunks/{CountdownToolbar-Cd1oEopw.js → CountdownToolbar-BXjDFRHI.js} +4 -4
  36. package/dist/cdn/chunks/{CountdownToolbar-Cd1oEopw.js.map → CountdownToolbar-BXjDFRHI.js.map} +1 -1
  37. package/dist/cdn/chunks/{IssuesPanel-C-BiFQDQ.js → IssuesPanel-_5fEnivU.js} +10 -10
  38. package/dist/cdn/chunks/{IssuesPanel-C-BiFQDQ.js.map → IssuesPanel-_5fEnivU.js.map} +1 -1
  39. package/dist/cdn/chunks/{ModuleBrowserModal-Dj7gRT4Q.js → ModuleBrowserModal-DtCksAeW.js} +7 -7
  40. package/dist/cdn/chunks/{ModuleBrowserModal-Dj7gRT4Q.js.map → ModuleBrowserModal-DtCksAeW.js.map} +1 -1
  41. package/dist/cdn/chunks/{ModulePreviewCanvas-hwdveKb0.js → ModulePreviewCanvas-CCOvabZd.js} +31 -31
  42. package/dist/cdn/chunks/{ModulePreviewCanvas-hwdveKb0.js.map → ModulePreviewCanvas-CCOvabZd.js.map} +1 -1
  43. package/dist/cdn/chunks/{NumberWithSuffix-bE_6cfiA.js → NumberWithSuffix-ZuJ2ePB0.js} +3 -3
  44. package/dist/cdn/chunks/{NumberWithSuffix-bE_6cfiA.js.map → NumberWithSuffix-ZuJ2ePB0.js.map} +1 -1
  45. package/dist/cdn/chunks/{ParagraphEditor-y1kGJRBX.js → ParagraphEditor-BnhnFOW1.js} +34 -34
  46. package/dist/cdn/chunks/{ParagraphEditor-y1kGJRBX.js.map → ParagraphEditor-BnhnFOW1.js.map} +1 -1
  47. package/dist/cdn/chunks/{RichTextEditorContent-DPy9D4hc.js → RichTextEditorContent-DV2yknp8.js} +3 -3
  48. package/dist/cdn/chunks/{RichTextEditorContent-DPy9D4hc.js.map → RichTextEditorContent-DV2yknp8.js.map} +1 -1
  49. package/dist/cdn/chunks/{SaveModuleDialog-CPu5e2VG.js → SaveModuleDialog-CCX5U7VA.js} +5 -5
  50. package/dist/cdn/chunks/{SaveModuleDialog-CPu5e2VG.js.map → SaveModuleDialog-CCX5U7VA.js.map} +1 -1
  51. package/dist/cdn/chunks/{TitleEditor-CMzzOPye.js → TitleEditor-CQqklX0D.js} +13 -13
  52. package/dist/cdn/chunks/{TitleEditor-CMzzOPye.js.map → TitleEditor-CQqklX0D.js.map} +1 -1
  53. package/dist/cdn/chunks/blockTypeIcons-CpGPHppB.js +22 -0
  54. package/dist/cdn/chunks/{blockTypeIcons-BC5qpvuV.js.map → blockTypeIcons-CpGPHppB.js.map} +1 -1
  55. package/dist/{de-DIAGP7yH.js → cdn/chunks/de-DpBN9H7-.js} +13 -1
  56. package/dist/cdn/chunks/de-DpBN9H7-.js.map +1 -0
  57. package/dist/cdn/chunks/{draggable-iAb7QVJo.js → draggable-Bci-fq8y.js} +473 -465
  58. package/dist/cdn/chunks/draggable-Bci-fq8y.js.map +1 -0
  59. package/dist/{en-nqIW8Q9W.js → cdn/chunks/en-BhHtdIiU.js} +13 -1
  60. package/dist/cdn/chunks/en-BhHtdIiU.js.map +1 -0
  61. package/dist/cdn/chunks/{extensions-DH7ESsaz.js → extensions-Ds9GnMcd.js} +4 -4
  62. package/dist/cdn/chunks/{extensions-DH7ESsaz.js.map → extensions-Ds9GnMcd.js.map} +1 -1
  63. package/dist/cdn/chunks/{features-DmUOSthI.js → features-DxWz_Enw.js} +1055 -1056
  64. package/dist/cdn/chunks/features-DxWz_Enw.js.map +1 -0
  65. package/dist/cdn/chunks/{icons-DguD4x_X.js → icons-BflGUmFY.js} +146 -146
  66. package/dist/cdn/chunks/icons-BflGUmFY.js.map +1 -0
  67. package/dist/cdn/chunks/{liquid.browser-DUDc3U21.js → liquid.browser-DKKBzRQu.js} +502 -497
  68. package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +1 -0
  69. package/dist/cdn/chunks/{media-library-ClQUPxRM.js → media-library-C479-QcE.js} +364 -364
  70. package/dist/cdn/chunks/{media-library-ClQUPxRM.js.map → media-library-C479-QcE.js.map} +1 -1
  71. package/dist/cdn/chunks/{pt-BR-DCNnLLx9.js → pt-BR-Bth5a93y.js} +12 -2
  72. package/dist/cdn/chunks/pt-BR-Bth5a93y.js.map +1 -0
  73. package/dist/cdn/chunks/{pusher-CHo5Cua0.js → pusher-BICWUP2j.js} +3 -3
  74. package/dist/cdn/chunks/{pusher-CHo5Cua0.js.map → pusher-BICWUP2j.js.map} +1 -1
  75. package/dist/cdn/chunks/{quality-CIw_7cXv.js → quality-BL_pEvFP.js} +20 -20
  76. package/dist/cdn/chunks/{quality-CIw_7cXv.js.map → quality-BL_pEvFP.js.map} +1 -1
  77. package/dist/cdn/chunks/readableTextColor-f8Kykfnh.js.map +1 -1
  78. package/dist/cdn/chunks/{renderer-Bx8I7_Rb.js → renderer-DwPomkBw.js} +42 -39
  79. package/dist/cdn/chunks/renderer-DwPomkBw.js.map +1 -0
  80. package/dist/cdn/chunks/{src-C-GlM149.js → src-DzvOWQ9S.js} +62 -62
  81. package/dist/cdn/chunks/{src-C-GlM149.js.map → src-DzvOWQ9S.js.map} +1 -1
  82. package/dist/cdn/chunks/{styles-CfqCvq0Z.js → styles-D45rgVq8.js} +712 -624
  83. package/dist/cdn/chunks/styles-D45rgVq8.js.map +1 -0
  84. package/dist/cdn/chunks/{tiptap-BAwu9VcJ.js → tiptap-CwScfbsM.js} +5 -4
  85. package/dist/cdn/chunks/tiptap-CwScfbsM.js.map +1 -0
  86. package/dist/cdn/editor.css +1 -1
  87. package/dist/cdn/editor.js +105 -104
  88. package/dist/cdn/editor.js.map +1 -1
  89. package/dist/{check-BsNM6BDs.js → check-BRzXxFHr.js} +1 -1
  90. package/dist/{chevron-down-fcsZ5DU7.js → chevron-down-DmEgzmYT.js} +1 -1
  91. package/dist/{circle-alert-BZTbwc-B.js → circle-alert-BStvZr3O.js} +1 -1
  92. package/dist/{clock-B7iQRubC.js → clock-Blwp_1R6.js} +1 -1
  93. package/dist/{cloud-Dom4EH5Z.js → cloud-_olro76D.js} +6 -6
  94. package/dist/{createLucideIcon-C_fetdGM.js → createLucideIcon-CmPAC-gt.js} +3 -3
  95. package/dist/{cdn/chunks/de-DIAGP7yH.js → de-DpBN9H7-.js} +11 -3
  96. package/dist/{dist-ByBVNmRN.js → dist-412xXefB.js} +1 -1
  97. package/dist/{dist-XdF11ZkX.js → dist-BCQZZUE9.js} +1 -1
  98. package/dist/{dist-CD3wbUoR.js → dist-BNEdeWub.js} +1 -1
  99. package/dist/dist-BctFrpeA.js +472 -0
  100. package/dist/{dist-eVlXvuKI.js → dist-BlG7k25W.js} +1 -1
  101. package/dist/{dist-BLcYl_de.js → dist-BwgjpLfr.js} +1 -1
  102. package/dist/{dist-Dhs3W2WW.js → dist-Cz79qrLL.js} +1 -1
  103. package/dist/{dist-c2sj5PQ5.js → dist-D6x1cQeh.js} +3 -3
  104. package/dist/{dist-cT52Hh9L.js → dist-DJ9aD8yA.js} +3 -3
  105. package/dist/{dist-Cwl7XXr4.js → dist-DULfKmTh.js} +3 -3
  106. package/dist/{dist-Dem8ODLh.js → dist-DhKTdU52.js} +3 -2
  107. package/dist/{dist-BOHAk4zI.js → dist-b7Ak-CuM.js} +1 -1
  108. package/dist/{dist-B4NkMBYc.js → dist-o73iaGqy.js} +1 -1
  109. package/dist/{dist-BsB4nPJD.js → dist-u0iIJH3V.js} +1 -1
  110. package/dist/{cdn/chunks/en-nqIW8Q9W.js → en-BhHtdIiU.js} +11 -3
  111. package/dist/{extensions-B2lSGCA8.js → extensions-XPlNAKIL.js} +23 -23
  112. package/dist/formatRelativeTime-CtUU-QZ8.js +10 -0
  113. package/dist/{image-up-1xrPPJYH.js → image-up-BFPbw_Zq.js} +1 -1
  114. package/dist/index.d.ts +32 -0
  115. package/dist/{info-ByAFxArD.js → info-B_qLEBN2.js} +1 -1
  116. package/dist/{keys-DsRdOmg3.js → keys-mFiJ5N0_.js} +1 -1
  117. package/dist/{liquid.browser--qtl1Fqy.js → liquid.browser-CVjP5Mex.js} +501 -496
  118. package/dist/{list-checks-CKUP4UZU.js → list-checks-CGg7JxPm.js} +1 -1
  119. package/dist/{loader-circle-BuxX338d.js → loader-circle-CDF8eR_Q.js} +1 -1
  120. package/dist/{message-circle-nLwqegRi.js → message-circle-C3cHsCJl.js} +1 -1
  121. package/dist/{pt-BR-DCNnLLx9.js → pt-BR-Bth5a93y.js} +11 -1
  122. package/dist/{refresh-cw-DAkD6iDI.js → refresh-cw-Butml7Q4.js} +1 -1
  123. package/dist/{scan-line-DEELRJJ5.js → scan-line-XYEqim_E.js} +1 -1
  124. package/dist/{send-DCMgrNT4.js → send-k7npFJNO.js} +1 -1
  125. package/dist/{shield-check-BFtVr_ov.js → shield-check-CV6GbmCu.js} +1 -1
  126. package/dist/{sparkles-CeYIQ5RJ.js → sparkles-C965Xop4.js} +1 -1
  127. package/dist/style.css +1 -1
  128. package/dist/{styles-D_ztiOsh.js → styles-Dp4mJuCM.js} +817 -729
  129. package/dist/templatical-editor.js +117 -116
  130. package/dist/{text-align-start-BsmIoqLS.js → text-align-start-Bxnps8fH.js} +1 -1
  131. package/dist/{trash-2-C2S4-CIH.js → trash-2-DpGb7fIt.js} +1 -1
  132. package/dist/{triangle-alert-DMdedF6W.js → triangle-alert-BKYElAwz.js} +1 -1
  133. package/dist/{useAliveFlag-DlVvpZxc.js → useAliveFlag-BinvbqQR.js} +1 -1
  134. package/dist/{useCloudI18n-BEuiZdzs.js → useCloudI18n-L3H2XvdW.js} +2 -2
  135. package/dist/{useEditorCore-tZGAVvNz.js → useEditorCore-D7dQFRkw.js} +699 -769
  136. package/dist/{useI18n-DNspT6uw.js → useI18n-CTs_bP9d.js} +2 -2
  137. package/dist/{useMergeTag-abutjUud.js → useMergeTag-e3RSY-s3.js} +6 -6
  138. package/dist/usePopoverRoot-DVh7NY1q.js +8 -0
  139. package/dist/{vue.runtime.esm-bundler-mPytWZFh.js → vue.runtime.esm-bundler-B2k01iQh.js} +345 -337
  140. package/dist/{x-_9jw816B.js → x-CGjkjdKK.js} +1 -1
  141. package/package.json +11 -11
  142. package/dist/cdn/chunks/blockTypeIcons-BC5qpvuV.js +0 -22
  143. package/dist/cdn/chunks/de-DIAGP7yH.js.map +0 -1
  144. package/dist/cdn/chunks/draggable-iAb7QVJo.js.map +0 -1
  145. package/dist/cdn/chunks/en-nqIW8Q9W.js.map +0 -1
  146. package/dist/cdn/chunks/features-DmUOSthI.js.map +0 -1
  147. package/dist/cdn/chunks/icons-DguD4x_X.js.map +0 -1
  148. package/dist/cdn/chunks/liquid.browser-DUDc3U21.js.map +0 -1
  149. package/dist/cdn/chunks/pt-BR-DCNnLLx9.js.map +0 -1
  150. package/dist/cdn/chunks/renderer-Bx8I7_Rb.js.map +0 -1
  151. package/dist/cdn/chunks/styles-CfqCvq0Z.js.map +0 -1
  152. package/dist/cdn/chunks/tiptap-BAwu9VcJ.js.map +0 -1
  153. package/dist/dist-D6L_WdRL.js +0 -403
  154. package/dist/formatRelativeTime-CyDg5cDD.js +0 -12
  155. package/dist/usePopoverRoot-DG3mlvd1.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-iAb7QVJo.js";
2
- import { At as M, Ot as te, T as N, at as ne, cn as re, ct as ie, dn as ae, ht as P, ln as F, mt as I, on as L, ot as oe, pn as se, rt as ce, sn as le, un as ue, vt as de, w as R, wt as fe } from "./features-DmUOSthI.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-DguD4x_X.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 ee, u as D, v as O, x as k, y as A, z as te } from "./draggable-Bci-fq8y.js";
2
+ import { Et as j, T as M, at as N, cn as ne, dn as P, ft as re, kt as F, ln as ie, on as I, ot as L, pn as ae, pt as oe, rt as se, sn as ce, st as le, un as ue, w as R, wt as de, xt as fe } from "./features-DxWz_Enw.js";
3
+ import { B as pe, J as me, P as he, X as ge, h as _e, j as ve, u as ye, x as be, z as xe } from "./icons-BflGUmFY.js";
4
4
  //#region ../media-library/src/api-client.ts
5
5
  var Se = class {
6
6
  authManager;
@@ -37,7 +37,7 @@ var Se = class {
37
37
  async browseMedia(e) {
38
38
  let t = new URLSearchParams();
39
39
  e.folder_id && t.set("folder_id", e.folder_id), e.search && t.set("search", e.search), e.category && t.set("category", e.category), e.sort && t.set("sort", e.sort), e.cursor && t.set("cursor", e.cursor);
40
- let n = t.toString(), r = `${N(R["media.browse"], this.baseParams)}${n ? `?${n}` : ""}`, i = await this.authManager.authenticatedFetch(r, { headers: { Accept: "application/json" } });
40
+ let n = t.toString(), r = `${M(R["media.browse"], this.baseParams)}${n ? `?${n}` : ""}`, i = await this.authManager.authenticatedFetch(r, { headers: { Accept: "application/json" } });
41
41
  if (!i.ok) {
42
42
  let e = await i.json().catch(() => ({ message: `HTTP error ${i.status}` }));
43
43
  throw Error(e.message, { cause: e });
@@ -47,7 +47,7 @@ var Se = class {
47
47
  async uploadMedia(e, t) {
48
48
  let n = new FormData();
49
49
  n.append("file", e), t && n.append("folder_id", t);
50
- let r = N(R["media.upload"], this.baseParams), i = await this.authManager.authenticatedFetch(r, {
50
+ let r = M(R["media.upload"], this.baseParams), i = await this.authManager.authenticatedFetch(r, {
51
51
  method: "POST",
52
52
  headers: { Accept: "application/json" },
53
53
  body: n
@@ -59,7 +59,7 @@ var Se = class {
59
59
  return (await i.json()).data;
60
60
  }
61
61
  async updateMedia(e, t, n) {
62
- return this.request(N(R["media.update"], {
62
+ return this.request(M(R["media.update"], {
63
63
  ...this.baseParams,
64
64
  media: e
65
65
  }), {
@@ -71,13 +71,13 @@ var Se = class {
71
71
  });
72
72
  }
73
73
  async deleteMedia(e) {
74
- return this.request(N(R["media.delete"], this.baseParams), {
74
+ return this.request(M(R["media.delete"], this.baseParams), {
75
75
  method: "POST",
76
76
  body: JSON.stringify({ ids: e })
77
77
  });
78
78
  }
79
79
  async moveMedia(e, t) {
80
- return this.request(N(R["media.move"], this.baseParams), {
80
+ return this.request(M(R["media.move"], this.baseParams), {
81
81
  method: "POST",
82
82
  body: JSON.stringify({
83
83
  ids: e,
@@ -86,10 +86,10 @@ var Se = class {
86
86
  });
87
87
  }
88
88
  async getMediaFolders() {
89
- return this.request(N(R["folders.index"], this.baseParams));
89
+ return this.request(M(R["folders.index"], this.baseParams));
90
90
  }
91
91
  async createMediaFolder(e, t) {
92
- return this.request(N(R["folders.store"], this.baseParams), {
92
+ return this.request(M(R["folders.store"], this.baseParams), {
93
93
  method: "POST",
94
94
  body: JSON.stringify({
95
95
  name: e,
@@ -98,7 +98,7 @@ var Se = class {
98
98
  });
99
99
  }
100
100
  async renameMediaFolder(e, t) {
101
- return this.request(N(R["folders.update"], {
101
+ return this.request(M(R["folders.update"], {
102
102
  ...this.baseParams,
103
103
  mediaFolder: e
104
104
  }), {
@@ -107,13 +107,13 @@ var Se = class {
107
107
  });
108
108
  }
109
109
  async deleteMediaFolder(e) {
110
- return this.request(N(R["folders.destroy"], {
110
+ return this.request(M(R["folders.destroy"], {
111
111
  ...this.baseParams,
112
112
  mediaFolder: e
113
113
  }), { method: "DELETE" });
114
114
  }
115
115
  async checkMediaUsage(e) {
116
- let t = await this.authManager.authenticatedFetch(N(R["media.checkUsage"], this.baseParams), {
116
+ let t = await this.authManager.authenticatedFetch(M(R["media.checkUsage"], this.baseParams), {
117
117
  method: "POST",
118
118
  headers: {
119
119
  "Content-Type": "application/json",
@@ -128,10 +128,10 @@ var Se = class {
128
128
  return t.json();
129
129
  }
130
130
  async getFrequentlyUsed() {
131
- return this.request(N(R["media.frequentlyUsed"], this.baseParams));
131
+ return this.request(M(R["media.frequentlyUsed"], this.baseParams));
132
132
  }
133
133
  async importFromUrl(e, t) {
134
- return this.request(N(R["media.importFromUrl"], this.baseParams), {
134
+ return this.request(M(R["media.importFromUrl"], this.baseParams), {
135
135
  method: "POST",
136
136
  body: JSON.stringify({
137
137
  url: e,
@@ -142,7 +142,7 @@ var Se = class {
142
142
  async replaceMedia(e, t) {
143
143
  let n = new FormData();
144
144
  n.append("file", t);
145
- let r = N(R["media.replace"], {
145
+ let r = M(R["media.replace"], {
146
146
  ...this.baseParams,
147
147
  media: e
148
148
  }), i = await this.authManager.authenticatedFetch(r, {
@@ -161,9 +161,9 @@ var Se = class {
161
161
  //#region ../media-library/src/composable.ts
162
162
  function Ce(e) {
163
163
  if (!e.projectId) throw Error("projectId is required for useMediaLibrary");
164
- let t = new Se(e.authManager), n = d([]), r = d([]), i = d(null), a = d("files"), o = d(""), s = d(null), c = d("newest"), l = d(!1), u = d(!1), f = d(!1), p = d(null), m = d(null), h = d(/* @__PURE__ */ new Set()), g = d(null), _ = d([]), v = d({}), y = d(!1), b = d([]), x = d(!1), S = d(null), C = d(!1), w = d(null), T = d(!1), E = d(null), D = d(null), O = 0;
165
- async function k() {
166
- let r = ++O;
164
+ let t = new Se(e.authManager), n = d([]), r = d([]), i = d(null), a = d("files"), o = d(""), s = d(null), c = d("newest"), l = d(!1), u = d(!1), f = d(!1), p = d(null), m = d(null), h = d(/* @__PURE__ */ new Set()), g = d(null), _ = d([]), v = d({}), y = d(!1), b = d([]), x = d(!1), S = d(null), C = d(!1), w = d(null), T = d(!1), E = d(null), ee = d(null), D = 0;
165
+ async function O() {
166
+ let r = ++D;
167
167
  l.value = !0;
168
168
  try {
169
169
  let e = await t.browseMedia({
@@ -172,18 +172,18 @@ function Ce(e) {
172
172
  category: s.value || void 0,
173
173
  sort: c.value === "newest" ? void 0 : c.value
174
174
  });
175
- if (r !== O) return;
175
+ if (r !== D) return;
176
176
  n.value = e.data, p.value = e.meta.next_cursor, f.value = !!e.meta.next_cursor;
177
177
  } catch (t) {
178
- if (r !== O) return;
178
+ if (r !== D) return;
179
179
  e.onError?.(t);
180
180
  } finally {
181
- r === O && (l.value = !1);
181
+ r === D && (l.value = !1);
182
182
  }
183
183
  }
184
- async function A() {
184
+ async function k() {
185
185
  if (!f.value || !p.value || l.value) return;
186
- let r = ++O;
186
+ let r = ++D;
187
187
  l.value = !0;
188
188
  try {
189
189
  let e = await t.browseMedia({
@@ -193,29 +193,29 @@ function Ce(e) {
193
193
  sort: c.value === "newest" ? void 0 : c.value,
194
194
  cursor: p.value
195
195
  });
196
- if (r !== O) return;
196
+ if (r !== D) return;
197
197
  n.value = [...n.value, ...e.data], p.value = e.meta.next_cursor, f.value = !!e.meta.next_cursor;
198
198
  } catch (t) {
199
- if (r !== O) return;
199
+ if (r !== D) return;
200
200
  e.onError?.(t);
201
201
  } finally {
202
- r === O && (l.value = !1);
202
+ r === D && (l.value = !1);
203
203
  }
204
204
  }
205
- async function j(e) {
206
- o.value = e, await k();
205
+ async function A(e) {
206
+ o.value = e, await O();
207
207
  }
208
- async function ee(e) {
209
- s.value = e, await k();
208
+ async function te(e) {
209
+ s.value = e, await O();
210
210
  }
211
- async function M(e) {
212
- c.value = e, await k();
211
+ async function j(e) {
212
+ c.value = e, await O();
213
213
  }
214
- async function te(e) {
215
- a.value = "files", i.value = e, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await k();
214
+ async function M(e) {
215
+ a.value = "files", i.value = e, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await O();
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 F();
218
+ a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await I();
219
219
  }
220
220
  async function ne(r) {
221
221
  u.value = !0;
@@ -228,7 +228,7 @@ function Ce(e) {
228
228
  u.value = !1;
229
229
  }
230
230
  }
231
- async function re(r) {
231
+ async function P(r) {
232
232
  u.value = !0, m.value = {
233
233
  current: 0,
234
234
  total: r.length
@@ -249,7 +249,7 @@ function Ce(e) {
249
249
  u.value = !1, m.value = null;
250
250
  }
251
251
  }
252
- async function ie(r) {
252
+ async function re(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 ae(r, i, a) {
264
+ async function F(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 P() {
272
+ async function ie() {
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 F() {
279
+ async function I() {
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 I() {
286
+ async function L() {
287
287
  if (h.value.size === 0) return !1;
288
288
  b.value = [...h.value];
289
289
  try {
@@ -295,7 +295,7 @@ function Ce(e) {
295
295
  return e.onError?.(t), !1;
296
296
  }
297
297
  }
298
- async function L() {
298
+ async function ae() {
299
299
  if (y.value = !1, b.value.length !== 0) try {
300
300
  await t.deleteMedia(b.value), n.value = n.value.filter((e) => !b.value.includes(e.id)), _.value = _.value.filter((e) => !b.value.includes(e.id)), h.value = /* @__PURE__ */ new Set(), g.value = null, b.value = [], v.value = {};
301
301
  } catch (t) {
@@ -324,19 +324,19 @@ function Ce(e) {
324
324
  h.value = /* @__PURE__ */ new Set(), g.value = null;
325
325
  }
326
326
  function ue(e) {
327
- g.value = e, h.value = new Set([e.id]);
327
+ g.value = e, h.value = /* @__PURE__ */ new Set([e.id]);
328
328
  }
329
- async function de() {
329
+ async function R() {
330
330
  try {
331
331
  r.value = await t.getMediaFolders();
332
332
  } catch (t) {
333
333
  e.onError?.(t);
334
334
  }
335
335
  }
336
- async function R(n, r) {
336
+ async function de(n, r) {
337
337
  try {
338
338
  let e = await t.createMediaFolder(n, r);
339
- return await de(), e;
339
+ return await R(), e;
340
340
  } catch (t) {
341
341
  return e.onError?.(t), null;
342
342
  }
@@ -353,7 +353,7 @@ function Ce(e) {
353
353
  }
354
354
  async function pe(n, r) {
355
355
  try {
356
- await t.renameMediaFolder(n, r), await de();
356
+ await t.renameMediaFolder(n, r), await R();
357
357
  } catch (t) {
358
358
  e.onError?.(t);
359
359
  }
@@ -361,7 +361,7 @@ function Ce(e) {
361
361
  async function me(n) {
362
362
  try {
363
363
  let e = fe(r.value, n)?.parent_id ?? null;
364
- await t.deleteMediaFolder(n), i.value === n && (i.value = e), await de(), await k();
364
+ await t.deleteMediaFolder(n), i.value === n && (i.value = e), await R(), await O();
365
365
  } catch (t) {
366
366
  e.onError?.(t);
367
367
  }
@@ -369,20 +369,20 @@ function Ce(e) {
369
369
  async function he(n) {
370
370
  E.value = n, w.value = null;
371
371
  try {
372
- D.value = (await t.checkMediaUsage([n.id])).data[n.id] ?? null, T.value = !0;
372
+ ee.value = (await t.checkMediaUsage([n.id])).data[n.id] ?? null, T.value = !0;
373
373
  } catch (t) {
374
374
  e.onError?.(t);
375
375
  }
376
376
  }
377
377
  function ge() {
378
- T.value = !1, E.value = null, D.value = null, w.value = null;
378
+ T.value = !1, E.value = null, ee.value = null, w.value = null;
379
379
  }
380
380
  async function _e(r) {
381
381
  if (!E.value) return null;
382
382
  C.value = !0, w.value = null;
383
383
  try {
384
384
  let e = await t.replaceMedia(E.value.id, r);
385
- return n.value = n.value.map((t) => t.id === e.id ? e : t), _.value = _.value.map((t) => t.id === e.id ? e : t), g.value?.id === e.id && (g.value = e), T.value = !1, E.value = null, D.value = null, e;
385
+ return n.value = n.value.map((t) => t.id === e.id ? e : t), _.value = _.value.map((t) => t.id === e.id ? e : t), g.value?.id === e.id && (g.value = e), T.value = !1, E.value = null, ee.value = null, e;
386
386
  } catch (t) {
387
387
  return w.value = t instanceof Error ? t.message : "Replace failed", e.onError?.(t), null;
388
388
  } finally {
@@ -414,38 +414,38 @@ function Ce(e) {
414
414
  frequentlyUsedItems: _,
415
415
  deleteUsageInfo: v,
416
416
  showDeleteWarning: y,
417
- loadItems: k,
418
- loadMore: A,
419
- search: j,
420
- filterByCategory: ee,
421
- sortBy: M,
422
- navigateToFolder: te,
417
+ loadItems: O,
418
+ loadMore: k,
419
+ search: A,
420
+ filterByCategory: te,
421
+ sortBy: j,
422
+ navigateToFolder: M,
423
423
  showFrequentlyUsed: N,
424
424
  uploadFile: ne,
425
- uploadFiles: re,
426
- moveSelected: ie,
427
- updateFile: ae,
428
- deleteSelected: P,
425
+ uploadFiles: P,
426
+ moveSelected: re,
427
+ updateFile: F,
428
+ deleteSelected: ie,
429
429
  isImportingFromUrl: x,
430
430
  importFromUrlError: S,
431
431
  importFromUrl: se,
432
432
  toggleSelection: ce,
433
433
  clearSelection: le,
434
434
  selectItem: ue,
435
- loadFolders: de,
436
- createFolder: R,
435
+ loadFolders: R,
436
+ createFolder: de,
437
437
  renameFolder: pe,
438
438
  deleteFolder: me,
439
439
  findFolderInTree: fe,
440
- loadFrequentlyUsed: F,
441
- checkUsageBeforeDelete: I,
442
- confirmDelete: L,
440
+ loadFrequentlyUsed: I,
441
+ checkUsageBeforeDelete: L,
442
+ confirmDelete: ae,
443
443
  cancelDelete: oe,
444
444
  isReplacing: C,
445
445
  replaceError: w,
446
446
  showReplaceWarning: T,
447
447
  pendingReplaceItem: E,
448
- replaceUsageInfo: D,
448
+ replaceUsageInfo: ee,
449
449
  checkUsageBeforeReplace: he,
450
450
  cancelReplace: ge,
451
451
  replaceFile: _e,
@@ -473,7 +473,7 @@ var we = {
473
473
  }, Te = ["onClick"], Ee = {
474
474
  key: 1,
475
475
  style: { color: "var(--tpl-text)" }
476
- }, De = /* @__PURE__ */ A({
476
+ }, De = /* @__PURE__ */ k({
477
477
  __name: "MediaBreadcrumb",
478
478
  props: {
479
479
  folders: {},
@@ -497,7 +497,7 @@ var we = {
497
497
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
498
498
  style: { color: "var(--tpl-primary)" },
499
499
  onClick: t[0] ||= (e) => r("navigate", null)
500
- }, p(v(i).mediaLibrary.allFiles), 1), (o(!0), g(O, null, c(a.value, (e, t) => (o(), g(O, { key: e.id }, [j(v(te), {
500
+ }, p(v(i).mediaLibrary.allFiles), 1), (o(!0), g(D, null, c(a.value, (e, t) => (o(), g(D, { key: e.id }, [A(v(de), {
501
501
  size: 12,
502
502
  "stroke-width": 2
503
503
  }), t < a.value.length - 1 ? (o(), g("button", {
@@ -600,7 +600,7 @@ function Ne(e, t, n, r) {
600
600
  //#region ../media-library/src/keys.ts
601
601
  var Pe = Symbol("templaticalMediaPopoverTarget");
602
602
  //#endregion
603
- //#region ../../node_modules/.pnpm/vue-advanced-cropper@2.8.9_vue@3.5.38_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.39_typescript@6.0.3_/node_modules/vue-advanced-cropper/dist/index.esm-bundler.js
604
604
  function Fe(e, t) {
605
605
  var n = Object.keys(e);
606
606
  if (Object.getOwnPropertySymbols) {
@@ -943,7 +943,7 @@ var at = U("vue-handler-wrapper"), ot = {
943
943
  };
944
944
  ot.render = function(e, n, i, a, s, c) {
945
945
  var l = r("DraggableElement");
946
- return o(), b("div", { class: c.classes.root }, [j(l, {
946
+ return o(), b("div", { class: c.classes.root }, [A(l, {
947
947
  class: c.classes.draggable,
948
948
  onDrag: n[1] ||= function(t) {
949
949
  return e.$emit("drag", t);
@@ -1580,7 +1580,7 @@ Yt.render = function(e, t, n, i, a, s) {
1580
1580
  onLeave: s.onLeave
1581
1581
  }, {
1582
1582
  default: u((function() {
1583
- return [j("div", { class: s.classes.default }, null, 2)];
1583
+ return [A("div", { class: s.classes.default }, null, 2)];
1584
1584
  })),
1585
1585
  _: 1
1586
1586
  }, 8, [
@@ -1644,7 +1644,7 @@ Qt.render = function(e, t, n, i, a, s) {
1644
1644
  onLeave: s.onLeave
1645
1645
  }, {
1646
1646
  default: u((function() {
1647
- return [j("div", { class: s.classes.root }, null, 2)];
1647
+ return [A("div", { class: s.classes.root }, null, 2)];
1648
1648
  })),
1649
1649
  _: 1
1650
1650
  }, 8, [
@@ -1848,7 +1848,7 @@ nn.render = function(e, n, r, i, s, l) {
1848
1848
  style: l.style
1849
1849
  }, [
1850
1850
  t(e.$slots, "default"),
1851
- j("div", null, [(o(!0), b(O, null, c(l.lineNodes, (function(e) {
1851
+ A("div", null, [(o(!0), b(D, null, c(l.lineNodes, (function(e) {
1852
1852
  return o(), b(a(e.component), {
1853
1853
  key: e.name,
1854
1854
  "default-class": e.class,
@@ -1871,7 +1871,7 @@ nn.render = function(e, n, r, i, s, l) {
1871
1871
  "onDrag"
1872
1872
  ]);
1873
1873
  })), 128))]),
1874
- (o(!0), b(O, null, c(l.handlerNodes, (function(e) {
1874
+ (o(!0), b(D, null, c(l.handlerNodes, (function(e) {
1875
1875
  return o(), b("div", {
1876
1876
  key: e.name,
1877
1877
  style: e.wrapperStyle,
@@ -2157,11 +2157,11 @@ function fn(e, t) {
2157
2157
  };
2158
2158
  }
2159
2159
  dn.render = function(e, t, n, r, i, a) {
2160
- return o(), b("div", { class: a.classes.root }, [j("div", {
2160
+ return o(), b("div", { class: a.classes.root }, [A("div", {
2161
2161
  ref: "wrapper",
2162
2162
  class: a.classes.wrapper,
2163
2163
  style: a.wrapperStyle
2164
- }, [j("img", {
2164
+ }, [A("img", {
2165
2165
  ref: "image",
2166
2166
  src: n.image.src,
2167
2167
  class: a.classes.image,
@@ -2480,11 +2480,11 @@ gn.render = function(e, t, r, i, a, s) {
2480
2480
  ref: "root",
2481
2481
  class: s.classes.root,
2482
2482
  style: s.style
2483
- }, [j("div", {
2483
+ }, [A("div", {
2484
2484
  ref: "wrapper",
2485
2485
  class: s.classes.wrapper,
2486
2486
  style: s.wrapperStyle
2487
- }, [n(j("img", {
2487
+ }, [n(A("img", {
2488
2488
  ref: "image",
2489
2489
  src: r.image && r.image.src,
2490
2490
  class: s.classes.image,
@@ -2624,7 +2624,7 @@ yn.render = function(e, t, n, i, a, s) {
2624
2624
  return o(), b("div", {
2625
2625
  class: s.classes.stencil,
2626
2626
  style: s.style
2627
- }, [j(d, {
2627
+ }, [A(d, {
2628
2628
  width: n.stencilCoordinates.width,
2629
2629
  height: n.stencilCoordinates.height,
2630
2630
  transitions: n.transitions,
@@ -2642,13 +2642,13 @@ yn.render = function(e, t, n, i, a, s) {
2642
2642
  onResizeEnd: s.onResizeEnd
2643
2643
  }, {
2644
2644
  default: u((function() {
2645
- return [j(l, {
2645
+ return [A(l, {
2646
2646
  movable: n.movable,
2647
2647
  onMove: s.onMove,
2648
2648
  onMoveEnd: s.onMoveEnd
2649
2649
  }, {
2650
2650
  default: u((function() {
2651
- return [j(c, {
2651
+ return [A(c, {
2652
2652
  image: n.image,
2653
2653
  coordinates: n.coordinates,
2654
2654
  width: n.stencilCoordinates.width,
@@ -2821,7 +2821,7 @@ xn.render = function(e, t, n, i, a, s) {
2821
2821
  return o(), b("div", {
2822
2822
  class: s.classes.stencil,
2823
2823
  style: s.style
2824
- }, [j(d, {
2824
+ }, [A(d, {
2825
2825
  width: n.stencilCoordinates.width,
2826
2826
  height: n.stencilCoordinates.height,
2827
2827
  transitions: n.transitions,
@@ -2839,13 +2839,13 @@ xn.render = function(e, t, n, i, a, s) {
2839
2839
  onResizeEnd: s.onResizeEnd
2840
2840
  }, {
2841
2841
  default: u((function() {
2842
- return [j(l, {
2842
+ return [A(l, {
2843
2843
  movable: n.movable,
2844
2844
  onMove: s.onMove,
2845
2845
  onMoveEnd: s.onMoveEnd
2846
2846
  }, {
2847
2847
  default: u((function() {
2848
- return [j(c, {
2848
+ return [A(c, {
2849
2849
  image: n.image,
2850
2850
  coordinates: n.coordinates,
2851
2851
  width: n.stencilCoordinates.width,
@@ -4009,10 +4009,10 @@ wn.render = function(t, r, i, s, c, l) {
4009
4009
  return o(), b("div", {
4010
4010
  ref: "cropper",
4011
4011
  class: l.classes.cropper
4012
- }, [j("div", {
4012
+ }, [A("div", {
4013
4013
  ref: "stretcher",
4014
4014
  class: l.classes.stretcher
4015
- }, null, 2), j("div", {
4015
+ }, null, 2), A("div", {
4016
4016
  class: l.classes.boundaries,
4017
4017
  style: l.boundariesStyle
4018
4018
  }, [(o(), b(a(i.backgroundWrapperComponent), {
@@ -4026,11 +4026,11 @@ wn.render = function(t, r, i, s, c, l) {
4026
4026
  }, {
4027
4027
  default: u((function() {
4028
4028
  return [
4029
- j("div", {
4029
+ A("div", {
4030
4030
  class: l.classes.background,
4031
4031
  style: l.boundariesStyle
4032
4032
  }, null, 6),
4033
- j("div", { class: l.classes.imageWrapper }, [j("img", {
4033
+ A("div", { class: l.classes.imageWrapper }, [A("img", {
4034
4034
  ref: "image",
4035
4035
  crossorigin: c.imageAttributes.crossOrigin,
4036
4036
  src: c.imageAttributes.src,
@@ -4038,7 +4038,7 @@ wn.render = function(t, r, i, s, c, l) {
4038
4038
  style: l.imageStyle,
4039
4039
  onMousedown: r[1] ||= y((function() {}), ["prevent"])
4040
4040
  }, null, 46, ["crossorigin", "src"])], 2),
4041
- j("div", {
4041
+ A("div", {
4042
4042
  class: l.classes.foreground,
4043
4043
  style: l.boundariesStyle
4044
4044
  }, null, 6),
@@ -4130,7 +4130,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4130
4130
  }, nr = {
4131
4131
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
4132
4132
  style: { color: "var(--tpl-text-muted)" }
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({
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__*/ se(/* @__PURE__ */ k({
4134
4134
  __name: "MediaEditModal",
4135
4135
  props: {
4136
4136
  visible: { type: Boolean },
@@ -4138,56 +4138,56 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4138
4138
  },
4139
4139
  emits: ["save", "close"],
4140
4140
  setup(e, { emit: t }) {
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 ? [
4141
+ let r = e, i = t, { t: a } = z(), s = l("tplUiTheme"), f = l(Pe, d(null)), T = a.mediaLibrary, { isImageMimeType: ee } = Oe(), k = d(""), j = d(""), M = d(null), N = d("free"), ne = d(void 0), P = d(void 0), re = d(""), F = d(""), ie = d(void 0), I = d(null), L = d(!1), ae = d(!1), oe = d(!1), se = h(() => r.item ? [
4142
4142
  "image/jpeg",
4143
4143
  "image/png",
4144
4144
  "image/webp",
4145
4145
  "image/gif"
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);
4147
- ee(() => r.visible, (e) => {
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));
4146
+ ].includes(r.item.mime_type) : !1), ce = h(() => N.value === "original" ? ie.value : ke[N.value]), le = h(() => I.value ? Ne(I.value.width, I.value.height, ne.value, P.value) : null);
4147
+ te(() => r.visible, (e) => {
4148
+ e && r.item && (k.value = r.item.filename, j.value = r.item.alt_text || "", N.value = "free", ne.value = void 0, P.value = void 0, re.value = "", F.value = "", ie.value = void 0, I.value = null, L.value = !1, oe.value = !1, r.item.width && r.item.height && (ie.value = r.item.width / r.item.height));
4149
4149
  });
4150
4150
  function ue(e) {
4151
- e.coordinates && (F.value = {
4151
+ e.coordinates && (I.value = {
4152
4152
  width: Math.round(e.coordinates.width),
4153
4153
  height: Math.round(e.coordinates.height)
4154
4154
  }, oe.value = !0);
4155
4155
  }
4156
- function de() {
4157
- I.value = !0, !P.value && r.item?.width && r.item?.height && (P.value = r.item.width / r.item.height);
4156
+ function R() {
4157
+ L.value = !0, !ie.value && r.item?.width && r.item?.height && (ie.value = r.item.width / r.item.height);
4158
4158
  }
4159
- function R(e) {
4159
+ function de(e) {
4160
4160
  let t = e.target.value;
4161
- ie.value = t, ne.value = t && parseInt(t, 10) || void 0;
4161
+ re.value = t, ne.value = t && parseInt(t, 10) || void 0;
4162
4162
  }
4163
4163
  function fe(e) {
4164
4164
  let t = e.target.value;
4165
- ae.value = t, re.value = t && parseInt(t, 10) || void 0;
4165
+ F.value = t, P.value = t && parseInt(t, 10) || void 0;
4166
4166
  }
4167
4167
  async function pe() {
4168
- let e = A.value.trim();
4169
- if (!e || !r.item || L.value) return;
4170
- let t = D(r.item.mime_type), n;
4171
- if (se.value && te.value && oe.value) {
4172
- L.value = !0;
4168
+ let e = k.value.trim();
4169
+ if (!e || !r.item || ae.value) return;
4170
+ let t = ee(r.item.mime_type), n;
4171
+ if (se.value && M.value && oe.value) {
4172
+ ae.value = !0;
4173
4173
  try {
4174
- let { canvas: e } = te.value.getResult();
4174
+ let { canvas: e } = M.value.getResult();
4175
4175
  if (e) {
4176
- let t = je(e, ne.value, re.value), i = Ae(r.item.mime_type);
4176
+ let t = je(e, ne.value, P.value), i = Ae(r.item.mime_type);
4177
4177
  n = { file: await Me(t, r.item.filename, i) };
4178
4178
  }
4179
4179
  } catch {
4180
- L.value = !1;
4180
+ ae.value = !1;
4181
4181
  return;
4182
4182
  }
4183
- L.value = !1;
4183
+ ae.value = !1;
4184
4184
  }
4185
- i("save", r.item.id, e, t ? M.value : void 0, n), i("close");
4185
+ i("save", r.item.id, e, t ? j.value : void 0, n), i("close");
4186
4186
  }
4187
4187
  function me(e) {
4188
- e.key === "Enter" && !L.value && (e.preventDefault(), pe()), e.key === "Escape" && i("close");
4188
+ e.key === "Enter" && !ae.value && (e.preventDefault(), pe()), e.key === "Escape" && i("close");
4189
4189
  }
4190
- return (t, r) => (o(), b(m, { to: v(f) || "body" }, [j(x, {
4190
+ return (t, r) => (o(), b(m, { to: v(f) || "body" }, [A(x, {
4191
4191
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
4192
4192
  "enter-from-class": "tpl:opacity-0",
4193
4193
  "enter-to-class": "tpl:opacity-100",
@@ -4208,17 +4208,17 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4208
4208
  }, [
4209
4209
  w("div", On, [w("h3", kn, p(v(a).mediaLibrary.editFile), 1)]),
4210
4210
  w("div", An, [
4211
- se.value ? (o(), g("div", jn, [w("div", Mn, [j(v(wn), {
4211
+ se.value ? (o(), g("div", jn, [w("div", Mn, [A(v(wn), {
4212
4212
  ref_key: "cropperRef",
4213
- ref: te,
4213
+ ref: M,
4214
4214
  src: e.item.url,
4215
4215
  "stencil-props": { aspectRatio: ce.value },
4216
4216
  class: "tpl:h-full tpl:w-full",
4217
4217
  "background-class": "tpl-cropper-background",
4218
4218
  onChange: ue,
4219
- onReady: de
4219
+ onReady: R
4220
4220
  }, null, 8, ["src", "stencil-props"])]), w("div", Nn, [
4221
- w("div", null, [w("label", Pn, p(v(a).mediaLibrary.cropAspectRatio), 1), w("div", Fn, [(o(), g(O, null, c([
4221
+ w("div", null, [w("label", Pn, p(v(a).mediaLibrary.cropAspectRatio), 1), w("div", Fn, [(o(), g(D, null, c([
4222
4222
  "free",
4223
4223
  "square",
4224
4224
  "landscape43",
@@ -4235,8 +4235,8 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4235
4235
  }),
4236
4236
  onClick: (t) => N.value = e
4237
4237
  }, p(v(T)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13, In)), 64))])]),
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", {
4239
- value: ie.value,
4238
+ w("div", Ln, [w("div", Rn, [w("label", zn, [O(p(v(a).mediaLibrary.cropMaxWidth) + " ", 1), w("span", Bn, p(v(a).mediaLibrary.cropOptional), 1)]), w("div", Vn, [w("input", {
4239
+ value: re.value,
4240
4240
  type: "number",
4241
4241
  min: "1",
4242
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",
@@ -4245,10 +4245,10 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4245
4245
  "background-color": "var(--tpl-bg)",
4246
4246
  color: "var(--tpl-text)"
4247
4247
  },
4248
- placeholder: F.value?.width?.toString() || "",
4249
- onInput: R
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", {
4251
- value: ae.value,
4248
+ placeholder: I.value?.width?.toString() || "",
4249
+ onInput: de
4250
+ }, null, 40, Hn), w("span", Un, p(v(a).mediaLibrary.cropPixels), 1)])]), w("div", Wn, [w("label", Gn, [O(p(v(a).mediaLibrary.cropMaxHeight) + " ", 1), w("span", Kn, p(v(a).mediaLibrary.cropOptional), 1)]), w("div", qn, [w("input", {
4251
+ value: F.value,
4252
4252
  type: "number",
4253
4253
  min: "1",
4254
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",
@@ -4257,13 +4257,13 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4257
4257
  "background-color": "var(--tpl-bg)",
4258
4258
  color: "var(--tpl-text)"
4259
4259
  },
4260
- placeholder: F.value?.height?.toString() || "",
4260
+ placeholder: I.value?.height?.toString() || "",
4261
4261
  onInput: fe
4262
4262
  }, null, 40, Jn), w("span", Yn, p(v(a).mediaLibrary.cropPixels), 1)])])]),
4263
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)
4264
4264
  ])])) : _("", !0),
4265
4265
  w("div", Qn, [w("label", $n, p(v(a).mediaLibrary.fileName), 1), n(w("input", {
4266
- "onUpdate:modelValue": r[0] ||= (e) => A.value = e,
4266
+ "onUpdate:modelValue": r[0] ||= (e) => k.value = e,
4267
4267
  type: "text",
4268
4268
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
4269
4269
  style: {
@@ -4272,9 +4272,9 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4272
4272
  color: "var(--tpl-text)"
4273
4273
  },
4274
4274
  autofocus: !se.value
4275
- }, null, 8, er), [[S, A.value]])]),
4276
- v(D)(e.item.mime_type) ? (o(), g("div", tr, [w("label", nr, p(v(a).mediaLibrary.altText), 1), n(w("input", {
4277
- "onUpdate:modelValue": r[1] ||= (e) => M.value = e,
4275
+ }, null, 8, er), [[S, k.value]])]),
4276
+ v(ee)(e.item.mime_type) ? (o(), g("div", tr, [w("label", nr, p(v(a).mediaLibrary.altText), 1), n(w("input", {
4277
+ "onUpdate:modelValue": r[1] ||= (e) => j.value = e,
4278
4278
  type: "text",
4279
4279
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
4280
4280
  style: {
@@ -4283,7 +4283,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4283
4283
  color: "var(--tpl-text)"
4284
4284
  },
4285
4285
  placeholder: v(a).mediaLibrary.altTextPlaceholder
4286
- }, null, 8, rr), [[S, M.value]])])) : _("", !0)
4286
+ }, null, 8, rr), [[S, j.value]])])) : _("", !0)
4287
4287
  ]),
4288
4288
  w("div", ir, [w("button", {
4289
4289
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
@@ -4296,9 +4296,9 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4296
4296
  }, p(v(a).mediaLibrary.cancel), 1), w("button", {
4297
4297
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white tpl:transition-all tpl:duration-150 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
4298
4298
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
4299
- disabled: L.value,
4299
+ disabled: ae.value,
4300
4300
  onClick: pe
4301
- }, p(L.value ? v(a).mediaLibrary.saving : v(a).mediaLibrary.saveChanges), 9, ar)])
4301
+ }, p(ae.value ? v(a).mediaLibrary.saving : v(a).mediaLibrary.saveChanges), 9, ar)])
4302
4302
  ], 2)], 40, Dn)) : _("", !0)]),
4303
4303
  _: 1
4304
4304
  })], 8, ["to"]));
@@ -4312,7 +4312,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4312
4312
  }, lr = {
4313
4313
  key: 3,
4314
4314
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:opacity-0 tpl:transition-opacity tpl:group-hover:opacity-100"
4315
- }, ur = ["title"], dr = ["title"], fr = { key: 0 }, pr = ["placeholder"], mr = 5, hr = /* @__PURE__ */ A({
4315
+ }, ur = ["title"], dr = ["title"], fr = { key: 0 }, pr = ["placeholder"], mr = 5, hr = /* @__PURE__ */ k({
4316
4316
  __name: "MediaFolderTreeNode",
4317
4317
  props: {
4318
4318
  folder: {},
@@ -4326,31 +4326,31 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4326
4326
  "deleteFolder"
4327
4327
  ],
4328
4328
  setup(e, { emit: t }) {
4329
- let i = e, a = t, { t: s } = z(), l = d(!1), u = d(!1), m = d(""), x = d(!1), T = d(""), D = h(() => (i.folder.children?.length ?? 0) > 0), k = h(() => i.depth < mr - 1), A = h(() => i.currentFolderId === i.folder.id), ee = h(() => !i.currentFolderId || !i.folder.children ? !1 : N(i.folder.children, i.currentFolderId)), M = h(() => l.value || ee.value);
4330
- function N(e, t) {
4331
- for (let n of e) if (n.id === t || n.children && N(n.children, t)) return !0;
4329
+ let i = e, a = t, { t: s } = z(), l = d(!1), u = d(!1), m = d(""), x = d(!1), T = d(""), ee = h(() => (i.folder.children?.length ?? 0) > 0), O = h(() => i.depth < mr - 1), k = h(() => i.currentFolderId === i.folder.id), te = h(() => !i.currentFolderId || !i.folder.children ? !1 : M(i.folder.children, i.currentFolderId)), j = h(() => l.value || te.value);
4330
+ function M(e, t) {
4331
+ for (let n of e) if (n.id === t || n.children && M(n.children, t)) return !0;
4332
4332
  return !1;
4333
4333
  }
4334
- function ne() {
4334
+ function N() {
4335
4335
  l.value = !l.value;
4336
4336
  }
4337
- function re() {
4337
+ function ne() {
4338
4338
  u.value = !0, m.value = i.folder.name;
4339
4339
  }
4340
- function ae() {
4340
+ function P() {
4341
4341
  let e = m.value.trim();
4342
4342
  e && e !== i.folder.name && a("renameFolder", i.folder.id, e), u.value = !1, m.value = "";
4343
4343
  }
4344
- function F() {
4344
+ function re() {
4345
4345
  u.value = !1, m.value = "";
4346
4346
  }
4347
- function I() {
4347
+ function F() {
4348
4348
  x.value = !0, T.value = "", l.value = !0;
4349
4349
  }
4350
- function L() {
4350
+ function ie() {
4351
4351
  T.value.trim() && a("createFolder", T.value.trim(), i.folder.id), x.value = !1, T.value = "";
4352
4352
  }
4353
- function oe() {
4353
+ function I() {
4354
4354
  x.value = !1, T.value = "";
4355
4355
  }
4356
4356
  return (t, i) => {
@@ -4359,23 +4359,23 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4359
4359
  class: "tpl:group tpl:flex tpl:w-full tpl:items-center tpl:gap-1 tpl:py-1.5 tpl:pr-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
4360
4360
  style: E({
4361
4361
  paddingLeft: `${e.depth * 16 + 8}px`,
4362
- backgroundColor: A.value ? "var(--tpl-bg-active)" : "transparent",
4363
- color: A.value ? "var(--tpl-primary)" : "var(--tpl-text)"
4362
+ backgroundColor: k.value ? "var(--tpl-bg-active)" : "transparent",
4363
+ color: k.value ? "var(--tpl-primary)" : "var(--tpl-text)"
4364
4364
  })
4365
4365
  }, [
4366
- D.value || x.value ? (o(), g("button", {
4366
+ ee.value || x.value ? (o(), g("button", {
4367
4367
  key: 0,
4368
4368
  class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4369
- onClick: y(ne, ["stop"])
4370
- }, [j(v(te), {
4371
- class: C(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": M.value }]),
4369
+ onClick: y(N, ["stop"])
4370
+ }, [A(v(de), {
4371
+ class: C(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": j.value }]),
4372
4372
  size: 10,
4373
4373
  "stroke-width": 2
4374
4374
  }, null, 8, ["class"])])) : (o(), g("span", sr)),
4375
4375
  w("button", {
4376
4376
  class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
4377
4377
  onClick: i[0] ||= (t) => a("navigate", e.folder.id)
4378
- }, [j(v(me), {
4378
+ }, [A(v(xe), {
4379
4379
  class: "tpl:shrink-0",
4380
4380
  size: 14,
4381
4381
  "stroke-width": 1.5
@@ -4391,38 +4391,38 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4391
4391
  color: "var(--tpl-text)"
4392
4392
  },
4393
4393
  autofocus: "",
4394
- onKeydown: [f(ae, ["enter"]), f(F, ["escape"])],
4395
- onBlur: ae,
4394
+ onKeydown: [f(P, ["enter"]), f(re, ["escape"])],
4395
+ onBlur: P,
4396
4396
  onClick: i[2] ||= y(() => {}, ["stop"])
4397
4397
  }, null, 544)), [[S, m.value]]) : _("", !0),
4398
4398
  u.value ? _("", !0) : (o(), g("span", lr, [
4399
- k.value ? (o(), g("button", {
4399
+ O.value ? (o(), g("button", {
4400
4400
  key: 0,
4401
4401
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4402
4402
  title: v(s).mediaLibrary.addSubfolder,
4403
- onClick: y(I, ["stop"])
4404
- }, [j(v(ge), {
4403
+ onClick: y(F, ["stop"])
4404
+ }, [A(v(be), {
4405
4405
  size: 12,
4406
4406
  "stroke-width": 2
4407
4407
  })], 8, ur)) : _("", !0),
4408
4408
  w("button", {
4409
4409
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4410
4410
  title: v(s).mediaLibrary.renameFolder,
4411
- onClick: y(re, ["stop"])
4412
- }, [j(v(P), {
4411
+ onClick: y(ne, ["stop"])
4412
+ }, [A(v(oe), {
4413
4413
  size: 12,
4414
4414
  "stroke-width": 2
4415
4415
  })], 8, dr),
4416
4416
  w("button", {
4417
4417
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4418
4418
  onClick: i[3] ||= y((t) => a("deleteFolder", e.folder.id), ["stop"])
4419
- }, [j(v(ie), {
4419
+ }, [A(v(le), {
4420
4420
  size: 12,
4421
4421
  "stroke-width": 2,
4422
4422
  style: { color: "var(--tpl-danger)" }
4423
4423
  })])
4424
4424
  ]))
4425
- ], 4), M.value ? (o(), g("div", fr, [(o(!0), g(O, null, c(e.folder.children, (t) => (o(), b(l, {
4425
+ ], 4), j.value ? (o(), g("div", fr, [(o(!0), g(D, null, c(e.folder.children, (t) => (o(), b(l, {
4426
4426
  key: t.id,
4427
4427
  folder: t,
4428
4428
  "current-folder-id": e.currentFolderId,
@@ -4450,15 +4450,15 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4450
4450
  },
4451
4451
  placeholder: v(s).mediaLibrary.subfolderName,
4452
4452
  autofocus: "",
4453
- onKeydown: [f(L, ["enter"]), f(oe, ["escape"])],
4454
- onBlur: L
4453
+ onKeydown: [f(ie, ["enter"]), f(I, ["escape"])],
4454
+ onBlur: ie
4455
4455
  }, null, 40, pr), [[S, T.value]])], 4)) : _("", !0)])) : _("", !0)]);
4456
4456
  };
4457
4457
  }
4458
4458
  }), gr = { class: "tpl:flex tpl:h-full tpl:flex-col tpl:overflow-y-auto" }, _r = {
4459
4459
  key: 0,
4460
4460
  class: "tpl:px-3 tpl:py-2"
4461
- }, vr = ["placeholder"], yr = /* @__PURE__ */ A({
4461
+ }, vr = ["placeholder"], yr = /* @__PURE__ */ k({
4462
4462
  __name: "MediaFolderTree",
4463
4463
  props: {
4464
4464
  folders: {},
@@ -4492,11 +4492,11 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4492
4492
  color: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
4493
4493
  }),
4494
4494
  onClick: d[0] ||= (e) => r("navigate", null)
4495
- }, [j(v(be), {
4495
+ }, [A(v(pe), {
4496
4496
  size: 14,
4497
4497
  "stroke-width": 1.5
4498
- }), k(" " + p(v(i).mediaLibrary.allFiles), 1)], 4),
4499
- (o(!0), g(O, null, c(e.folders, (t) => (o(), b(hr, {
4498
+ }), O(" " + p(v(i).mediaLibrary.allFiles), 1)], 4),
4499
+ (o(!0), g(D, null, c(e.folders, (t) => (o(), b(hr, {
4500
4500
  key: t.id,
4501
4501
  folder: t,
4502
4502
  "current-folder-id": e.currentFolderId,
@@ -4525,10 +4525,10 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4525
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",
4526
4526
  style: { color: "var(--tpl-text-muted)" },
4527
4527
  onClick: l
4528
- }, [j(v(ge), {
4528
+ }, [A(v(be), {
4529
4529
  size: 14,
4530
4530
  "stroke-width": 1.5
4531
- }), k(" " + p(v(i).mediaLibrary.newFolder), 1)])),
4531
+ }), O(" " + p(v(i).mediaLibrary.newFolder), 1)])),
4532
4532
  d[7] ||= w("div", { class: "tpl:flex-1" }, null, -1),
4533
4533
  e.hasFrequentlyUsed ? (o(), g("button", {
4534
4534
  key: 2,
@@ -4539,13 +4539,13 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4539
4539
  color: e.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
4540
4540
  }),
4541
4541
  onClick: d[6] ||= (e) => r("showFrequentlyUsed")
4542
- }, [j(v(ye), {
4542
+ }, [A(v(ye), {
4543
4543
  size: 14,
4544
4544
  "stroke-width": 1.5
4545
- }), k(" " + p(v(i).mediaLibrary.frequentlyUsed), 1)], 4)) : _("", !0)
4545
+ }), O(" " + p(v(i).mediaLibrary.frequentlyUsed), 1)], 4)) : _("", !0)
4546
4546
  ]));
4547
4547
  }
4548
- }), br = { class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2" }, xr = /* @__PURE__ */ A({
4548
+ }), br = { class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2" }, xr = /* @__PURE__ */ k({
4549
4549
  __name: "MediaFileIcon",
4550
4550
  props: { mimeType: {} },
4551
4551
  setup(e) {
@@ -4756,7 +4756,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4756
4756
  }, Yr = {
4757
4757
  key: 4,
4758
4758
  class: "tpl:flex tpl:justify-center tpl:py-4"
4759
- }, Xr = /*#__PURE__*/ ce(/* @__PURE__ */ A({
4759
+ }, Xr = /*#__PURE__*/ se(/* @__PURE__ */ k({
4760
4760
  __name: "MediaGrid",
4761
4761
  props: {
4762
4762
  items: {},
@@ -4782,7 +4782,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4782
4782
  r("select", e);
4783
4783
  }
4784
4784
  let { t: u } = z(), f = d(null);
4785
- ae(f, ([{ isIntersecting: e }]) => {
4785
+ P(f, ([{ isIntersecting: e }]) => {
4786
4786
  e && n.hasMore && !n.isLoading && r("loadMore");
4787
4787
  }, { threshold: .1 });
4788
4788
  function m(e) {
@@ -4799,16 +4799,16 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4799
4799
  e.isLoading && e.items.length === 0 ? (o(), g("div", {
4800
4800
  key: 0,
4801
4801
  class: C(e.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
4802
- }, [(o(), g(O, null, c(8, (t) => w("div", {
4802
+ }, [(o(), g(D, null, c(8, (t) => w("div", {
4803
4803
  key: t,
4804
4804
  class: C(["tpl-pulse tpl:rounded-lg", e.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
4805
4805
  style: { "background-color": "var(--tpl-bg-hover)" }
4806
- }, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), g("div", Cr, [j(v(be), {
4806
+ }, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), g("div", Cr, [A(v(pe), {
4807
4807
  class: "tpl:mb-3",
4808
4808
  size: 40,
4809
4809
  "stroke-width": 1,
4810
4810
  style: { color: "var(--tpl-text-dim)" }
4811
- }), w("p", wr, p(v(u).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (o(), g("div", Lr, [(o(!0), g(O, null, c(e.items, (t) => (o(), g("div", {
4811
+ }), w("p", wr, p(v(u).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (o(), g("div", Lr, [(o(!0), g(D, null, c(e.items, (t) => (o(), g("div", {
4812
4812
  key: t.id,
4813
4813
  class: C(["tpl-media-list-item tpl:group tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-150", [!s(t) && !e.selectedIds.has(t.id) ? "tpl:opacity-60" : ""]]),
4814
4814
  style: E({ backgroundColor: e.selectedIds.has(t.id) ? "var(--tpl-bg-hover)" : "transparent" }),
@@ -4820,14 +4820,14 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4820
4820
  alt: t.filename,
4821
4821
  class: "tpl:size-full tpl:object-cover",
4822
4822
  loading: "lazy"
4823
- }, null, 8, Br)) : (o(), g("div", Vr, [j(xr, { "mime-type": t.mime_type }, null, 8, ["mime-type"])]))]),
4824
- w("div", Hr, [w("p", Ur, p(t.filename), 1), w("p", Wr, [k(p(m(t.size)) + " · " + p(h(t.created_at)) + " ", 1), v(a)(t.mime_type) && t.width && t.height ? (o(), g(O, { key: 0 }, [k(" · " + p(t.width) + "×" + p(t.height), 1)], 64)) : _("", !0)])]),
4823
+ }, null, 8, Br)) : (o(), g("div", Vr, [A(xr, { "mime-type": t.mime_type }, null, 8, ["mime-type"])]))]),
4824
+ w("div", Hr, [w("p", Ur, p(t.filename), 1), w("p", Wr, [O(p(m(t.size)) + " · " + p(h(t.created_at)) + " ", 1), v(a)(t.mime_type) && t.width && t.height ? (o(), g(D, { key: 0 }, [O(" · " + p(t.width) + "×" + p(t.height), 1)], 64)) : _("", !0)])]),
4825
4825
  w("div", Gr, [w("button", {
4826
4826
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
4827
4827
  style: { color: "var(--tpl-text-muted)" },
4828
4828
  title: v(u).mediaLibrary.editFile,
4829
4829
  onClick: y((e) => r("edit", t), ["stop"])
4830
- }, [j(v(P), {
4830
+ }, [A(v(oe), {
4831
4831
  size: 12,
4832
4832
  "stroke-width": 2
4833
4833
  })], 8, Kr), w("button", {
@@ -4835,15 +4835,15 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4835
4835
  style: { color: "var(--tpl-text-muted)" },
4836
4836
  title: v(u).mediaLibrary.replaceFile,
4837
4837
  onClick: y((e) => r("replace", t), ["stop"])
4838
- }, [j(v(I), {
4838
+ }, [A(v(re), {
4839
4839
  size: 12,
4840
4840
  "stroke-width": 2
4841
4841
  })], 8, qr)]),
4842
- e.selectedIds.has(t.id) ? (o(), g("div", Jr, [j(v(M), {
4842
+ e.selectedIds.has(t.id) ? (o(), g("div", Jr, [A(v(j), {
4843
4843
  size: 12,
4844
4844
  "stroke-width": 3
4845
4845
  })])) : _("", !0)
4846
- ], 14, Rr))), 128))])) : (o(), g("div", Tr, [(o(!0), g(O, null, c(e.items, (t) => (o(), g("div", {
4846
+ ], 14, Rr))), 128))])) : (o(), g("div", Tr, [(o(!0), g(D, null, c(e.items, (t) => (o(), g("div", {
4847
4847
  key: t.id,
4848
4848
  class: C(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
4849
4849
  "tpl:cursor-pointer",
@@ -4872,7 +4872,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4872
4872
  style: { "background-color": "rgba(0, 0, 0, 0.6)" },
4873
4873
  title: v(u).mediaLibrary.editFile,
4874
4874
  onClick: y((e) => r("edit", t), ["stop"])
4875
- }, [j(v(P), {
4875
+ }, [A(v(oe), {
4876
4876
  size: 11,
4877
4877
  "stroke-width": 2
4878
4878
  })], 8, Pr), w("button", {
@@ -4880,11 +4880,11 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4880
4880
  style: { "background-color": "rgba(0, 0, 0, 0.6)" },
4881
4881
  title: v(u).mediaLibrary.replaceFile,
4882
4882
  onClick: y((e) => r("replace", t), ["stop"])
4883
- }, [j(v(I), {
4883
+ }, [A(v(re), {
4884
4884
  size: 11,
4885
4885
  "stroke-width": 2
4886
4886
  })], 8, Fr)]),
4887
- e.selectedIds.has(t.id) ? (o(), g("div", Ir, [j(v(M), {
4887
+ e.selectedIds.has(t.id) ? (o(), g("div", Ir, [A(v(j), {
4888
4888
  size: 12,
4889
4889
  "stroke-width": 3
4890
4890
  })])) : _("", !0)
@@ -4894,7 +4894,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4894
4894
  ref: f,
4895
4895
  class: "tpl:h-4"
4896
4896
  }, null, 512),
4897
- e.isLoading && e.items.length > 0 ? (o(), g("div", Yr, [j(v(de), {
4897
+ e.isLoading && e.items.length > 0 ? (o(), g("div", Yr, [A(v(F), {
4898
4898
  class: "tpl-spinner",
4899
4899
  size: 20,
4900
4900
  "stroke-width": 2,
@@ -4915,7 +4915,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4915
4915
  }, ri = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, ii = ["disabled"], ai = ["disabled"], oi = {
4916
4916
  key: 0,
4917
4917
  class: "tpl:flex tpl:items-center tpl:gap-1.5"
4918
- }, si = { key: 1 }, ci = /* @__PURE__ */ A({
4918
+ }, si = { key: 1 }, ci = /* @__PURE__ */ k({
4919
4919
  __name: "MediaImportUrlModal",
4920
4920
  props: {
4921
4921
  visible: { type: Boolean },
@@ -4925,7 +4925,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4925
4925
  emits: ["import", "close"],
4926
4926
  setup(e, { emit: t }) {
4927
4927
  let r = e, i = t, { t: a } = z(), s = l("tplUiTheme"), c = l(Pe, d(null)), f = d("");
4928
- ee(() => r.visible, (e) => {
4928
+ te(() => r.visible, (e) => {
4929
4929
  e && (f.value = "");
4930
4930
  });
4931
4931
  function h() {
@@ -4938,7 +4938,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4938
4938
  function E(e) {
4939
4939
  e.key === "Enter" && (e.preventDefault(), h()), e.key === "Escape" && T();
4940
4940
  }
4941
- return (t, r) => (o(), b(m, { to: v(c) || "body" }, [j(x, {
4941
+ return (t, r) => (o(), b(m, { to: v(c) || "body" }, [A(x, {
4942
4942
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
4943
4943
  "enter-from-class": "tpl:opacity-0",
4944
4944
  "enter-to-class": "tpl:opacity-100",
@@ -4983,11 +4983,11 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4983
4983
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
4984
4984
  disabled: !f.value.trim() || e.isImporting,
4985
4985
  onClick: h
4986
- }, [e.isImporting ? (o(), g("span", oi, [j(v(de), {
4986
+ }, [e.isImporting ? (o(), g("span", oi, [A(v(F), {
4987
4987
  class: "tpl:animate-spin",
4988
4988
  size: 12,
4989
4989
  "stroke-width": 2
4990
- }), k(" " + p(v(a).mediaLibrary.importing), 1)])) : (o(), g("span", si, p(v(a).mediaLibrary.import), 1))], 8, ai)])
4990
+ }), O(" " + p(v(a).mediaLibrary.importing), 1)])) : (o(), g("span", si, p(v(a).mediaLibrary.import), 1))], 8, ai)])
4991
4991
  ])], 40, Zr)) : _("", !0)]),
4992
4992
  _: 1
4993
4993
  })], 8, ["to"]));
@@ -4996,7 +4996,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4996
4996
  key: 0,
4997
4997
  class: "tpl:shrink-0",
4998
4998
  style: { color: "var(--tpl-text-dim)" }
4999
- }, pi = /* @__PURE__ */ A({
4999
+ }, pi = /* @__PURE__ */ k({
5000
5000
  __name: "MediaMovePicker",
5001
5001
  props: {
5002
5002
  folders: {},
@@ -5014,7 +5014,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5014
5014
  }), r.children?.length && n.push(...a(r.children, t + 1));
5015
5015
  return n;
5016
5016
  }
5017
- return L(i, () => {
5017
+ return I(i, () => {
5018
5018
  n("close");
5019
5019
  }), (t, s) => (o(), g("div", {
5020
5020
  ref_key: "pickerRef",
@@ -5029,11 +5029,11 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5029
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",
5030
5030
  style: { color: "var(--tpl-text)" },
5031
5031
  onClick: s[0] ||= (e) => n("select", null)
5032
- }, [j(v(be), {
5032
+ }, [A(v(pe), {
5033
5033
  class: "tpl:shrink-0",
5034
5034
  size: 14,
5035
5035
  "stroke-width": 1.5
5036
- }), k(" " + p(v(r).mediaLibrary.moveToRoot), 1)])), (o(!0), g(O, null, c(a(e.folders), (t) => (o(), g("button", {
5036
+ }), O(" " + p(v(r).mediaLibrary.moveToRoot), 1)])), (o(!0), g(D, null, c(a(e.folders), (t) => (o(), g("button", {
5037
5037
  key: t.id,
5038
5038
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:py-1.5 tpl:pr-3 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
5039
5039
  style: E({
@@ -5044,7 +5044,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5044
5044
  disabled: t.id === e.currentFolderId,
5045
5045
  onClick: (e) => n("select", t.id)
5046
5046
  }, [
5047
- j(v(me), {
5047
+ A(v(xe), {
5048
5048
  class: "tpl:shrink-0",
5049
5049
  size: 14,
5050
5050
  "stroke-width": 1.5
@@ -5069,7 +5069,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5069
5069
  }, xi = {
5070
5070
  class: "tpl:block tpl:text-[10px]",
5071
5071
  style: { color: "var(--tpl-text-muted)" }
5072
- }, Si = ["value"], Ci = ["value"], wi = /*#__PURE__*/ ce(/* @__PURE__ */ A({
5072
+ }, Si = ["value"], Ci = ["value"], wi = /*#__PURE__*/ se(/* @__PURE__ */ k({
5073
5073
  __name: "MediaPreviewPanel",
5074
5074
  props: {
5075
5075
  item: {},
@@ -5144,23 +5144,23 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5144
5144
  alt: e.item.alt_text || e.item.filename,
5145
5145
  class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
5146
5146
  style: { border: "1px solid var(--tpl-border)" }
5147
- }, null, 8, hi)) : (o(), g("div", gi, [j(xr, {
5147
+ }, null, 8, hi)) : (o(), g("div", gi, [A(xr, {
5148
5148
  "mime-type": e.item.mime_type,
5149
5149
  class: "tpl-preview-icon"
5150
5150
  }, null, 8, ["mime-type"])])),
5151
5151
  w("div", _i, [
5152
5152
  w("p", vi, p(e.item.filename), 1),
5153
5153
  w("p", yi, [
5154
- k(p(b(e.item.size)) + " · " + p(x(e.item.created_at)) + " ", 1),
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),
5156
- m.value ? (o(), g(O, { key: 1 }, [
5157
- n[0] ||= k(" · ", -1),
5158
- j(v(me), {
5154
+ O(p(b(e.item.size)) + " · " + p(x(e.item.created_at)) + " ", 1),
5155
+ y.value && e.item.width && e.item.height ? (o(), g(D, { key: 0 }, [O(" · " + p(e.item.width) + "×" + p(e.item.height) + "px ", 1)], 64)) : _("", !0),
5156
+ m.value ? (o(), g(D, { key: 1 }, [
5157
+ n[0] ||= O(" · ", -1),
5158
+ A(v(xe), {
5159
5159
  class: "tpl:mb-px tpl:inline",
5160
5160
  size: 9,
5161
5161
  "stroke-width": 2
5162
5162
  }),
5163
- k(" " + p(m.value), 1)
5163
+ O(" " + p(m.value), 1)
5164
5164
  ], 64)) : _("", !0)
5165
5165
  ]),
5166
5166
  y.value ? (o(), g("p", {
@@ -5178,7 +5178,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5178
5178
  },
5179
5179
  value: e.selectedConversion,
5180
5180
  onChange: d
5181
- }, [(o(!0), g(O, null, c(s.value, (e) => (o(), g("option", {
5181
+ }, [(o(!0), g(D, null, c(s.value, (e) => (o(), g("option", {
5182
5182
  key: e.value,
5183
5183
  value: e.value
5184
5184
  }, p(e.label), 9, Ci))), 128))], 40, Si)])) : _("", !0)
@@ -5210,7 +5210,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5210
5210
  key: 1,
5211
5211
  class: "tpl:mb-3 tpl:text-xs",
5212
5212
  style: { color: "var(--tpl-danger)" }
5213
- }, Ii = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Li = ["disabled"], Ri = ["disabled"], zi = /* @__PURE__ */ A({
5213
+ }, Ii = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Li = ["disabled"], Ri = ["disabled"], zi = /* @__PURE__ */ k({
5214
5214
  __name: "MediaReplaceModal",
5215
5215
  props: {
5216
5216
  visible: { type: Boolean },
@@ -5226,20 +5226,20 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5226
5226
  let e = n.item.filename.split(".");
5227
5227
  return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
5228
5228
  }), C = h(() => S.value ? `.${S.value}` : "*"), T = h(() => (n.usageInfo?.template_count ?? 0) > 0);
5229
- ee(() => n.visible, (e) => {
5229
+ te(() => n.visible, (e) => {
5230
5230
  e || (f.value = null, c.value && (c.value.value = ""));
5231
5231
  });
5232
5232
  function E(e) {
5233
5233
  let t = e.target;
5234
5234
  t.files && t.files.length > 0 && (f.value = t.files[0]);
5235
5235
  }
5236
- function D() {
5236
+ function ee() {
5237
5237
  f.value && r("replace", f.value);
5238
5238
  }
5239
- function O(e) {
5239
+ function D(e) {
5240
5240
  e.key === "Escape" && r("close");
5241
5241
  }
5242
- return (t, n) => (o(), b(m, { to: v(s) || "body" }, [j(x, {
5242
+ return (t, n) => (o(), b(m, { to: v(s) || "body" }, [A(x, {
5243
5243
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
5244
5244
  "enter-from-class": "tpl:opacity-0",
5245
5245
  "enter-to-class": "tpl:opacity-100",
@@ -5253,7 +5253,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5253
5253
  class: "tpl tpl:fixed tpl:inset-0 tpl:z-[10000] tpl:flex tpl:items-center tpl:justify-center",
5254
5254
  style: { "background-color": "var(--tpl-overlay)" },
5255
5255
  onClick: n[1] ||= y((e) => r("close"), ["self"]),
5256
- onKeydown: O
5256
+ onKeydown: D
5257
5257
  }, [w("div", Ei, [
5258
5258
  w("h3", Di, p(v(i).mediaLibrary.replaceWarningTitle), 1),
5259
5259
  w("p", Oi, p(v(i).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${S.value}`)), 1),
@@ -5286,7 +5286,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5286
5286
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white tpl:transition-all tpl:duration-150 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
5287
5287
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
5288
5288
  disabled: !f.value || e.isReplacing,
5289
- onClick: D
5289
+ onClick: ee
5290
5290
  }, p(e.isReplacing ? v(i).mediaLibrary.replacing : v(i).mediaLibrary.replace), 9, Ri)])
5291
5291
  ])], 40, Ti)) : _("", !0)]),
5292
5292
  _: 1
@@ -5304,7 +5304,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5304
5304
  }, Ui = {
5305
5305
  class: "tpl:mt-1 tpl:text-[10px]",
5306
5306
  style: { color: "var(--tpl-text-dim)" }
5307
- }, Wi = /* @__PURE__ */ A({
5307
+ }, Wi = /* @__PURE__ */ k({
5308
5308
  __name: "MediaUploadZone",
5309
5309
  props: {
5310
5310
  isUploading: { type: Boolean },
@@ -5322,7 +5322,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5322
5322
  let t = u(e);
5323
5323
  t.length && n("upload", t);
5324
5324
  }
5325
- let { isOverDropZone: m } = re(l, { onDrop: (e) => {
5325
+ let { isOverDropZone: m } = ne(l, { onDrop: (e) => {
5326
5326
  e?.length && f(e);
5327
5327
  } }), { open: h, onChange: _ } = ue({
5328
5328
  accept: s.value,
@@ -5339,7 +5339,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5339
5339
  "background-color": "var(--tpl-bg)"
5340
5340
  },
5341
5341
  onClick: n[0] ||= (e) => v(h)()
5342
- }, [e.isUploading ? (o(), g("div", Bi, [j(v(de), {
5342
+ }, [e.isUploading ? (o(), g("div", Bi, [A(v(F), {
5343
5343
  class: "tpl-spinner",
5344
5344
  size: 20,
5345
5345
  "stroke-width": 2,
@@ -5347,8 +5347,8 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5347
5347
  }), w("span", Vi, p(e.uploadProgress && e.uploadProgress.total > 1 ? v(i)(v(r).mediaLibrary.uploadingProgress, {
5348
5348
  current: e.uploadProgress.current,
5349
5349
  total: e.uploadProgress.total
5350
- }) : v(r).mediaLibrary.uploading), 1)])) : (o(), g(O, { key: 1 }, [
5351
- j(v(oe), {
5350
+ }) : v(r).mediaLibrary.uploading), 1)])) : (o(), g(D, { key: 1 }, [
5351
+ A(v(L), {
5352
5352
  class: "tpl:mb-2",
5353
5353
  size: 24,
5354
5354
  "stroke-width": 1.5,
@@ -5382,7 +5382,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5382
5382
  "background-color": "var(--tpl-text)",
5383
5383
  color: "var(--tpl-bg-elevated)"
5384
5384
  }
5385
- }, Yi = /* @__PURE__ */ A({
5385
+ }, Yi = /* @__PURE__ */ k({
5386
5386
  __name: "StorageProgressRing",
5387
5387
  props: {
5388
5388
  usedBytes: {},
@@ -5433,7 +5433,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5433
5433
  "stroke-dasharray": l.value,
5434
5434
  "stroke-dashoffset": m.value,
5435
5435
  class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
5436
- }, null, 8, qi)], 8, Gi)), j(x, {
5436
+ }, null, 8, qi)], 8, Gi)), A(x, {
5437
5437
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
5438
5438
  "enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
5439
5439
  "enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
@@ -5441,7 +5441,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5441
5441
  "leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
5442
5442
  "leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
5443
5443
  }, {
5444
- default: u(() => [i.value ? (o(), g("div", Ji, [k(p(E.value) + " ", 1), t[2] ||= w("div", {
5444
+ default: u(() => [i.value ? (o(), g("div", Ji, [O(p(E.value) + " ", 1), t[2] ||= w("div", {
5445
5445
  class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
5446
5446
  style: { "background-color": "var(--tpl-text)" }
5447
5447
  }, null, -1)])) : _("", !0)]),
@@ -5474,18 +5474,18 @@ function Xi(e) {
5474
5474
  function y(e) {
5475
5475
  return v[e]?.() ?? e;
5476
5476
  }
5477
- ee(o, (e) => {
5477
+ te(o, (e) => {
5478
5478
  e && n.value && t.loadFolders();
5479
- }), ee(() => t.previewItem.value?.id, () => {
5479
+ }), te(() => t.previewItem.value?.id, () => {
5480
5480
  c.value = "original";
5481
5481
  });
5482
- let b = se((e) => {
5482
+ let b = ae((e) => {
5483
5483
  t.search(e);
5484
5484
  }, 300);
5485
5485
  function x(e) {
5486
5486
  s.value = e, b(e);
5487
5487
  }
5488
- let { copy: S, copied: C } = le({
5488
+ let { copy: S, copied: C } = ce({
5489
5489
  copiedDuring: 2e3,
5490
5490
  legacy: !0
5491
5491
  });
@@ -5498,25 +5498,25 @@ function Xi(e) {
5498
5498
  async function E(e, n) {
5499
5499
  await t.createFolder(e, n);
5500
5500
  }
5501
- async function D(e, n) {
5501
+ async function ee(e, n) {
5502
5502
  await t.renameFolder(e, n);
5503
5503
  }
5504
- async function O(e) {
5504
+ async function D(e) {
5505
5505
  await t.deleteFolder(e);
5506
5506
  }
5507
- function k(e) {
5507
+ function O(e) {
5508
5508
  l.value = e;
5509
5509
  }
5510
- async function A(e, n, r, i) {
5510
+ async function k(e, n, r, i) {
5511
5511
  i && await t.replaceMediaDirectly(e, i.file), await t.updateFile(e, n, r), l.value = null;
5512
5512
  }
5513
- async function j(e) {
5513
+ async function A(e) {
5514
5514
  await t.importFromUrl(e) && (u.value = !1);
5515
5515
  }
5516
- async function M(e) {
5516
+ async function j(e) {
5517
5517
  f.value = !1, await t.moveSelected(e);
5518
5518
  }
5519
- async function te() {
5519
+ async function M() {
5520
5520
  await t.checkUsageBeforeDelete();
5521
5521
  }
5522
5522
  function N(e) {
@@ -5525,7 +5525,7 @@ function Xi(e) {
5525
5525
  async function ne(e) {
5526
5526
  await t.replaceFile(e);
5527
5527
  }
5528
- function re() {
5528
+ function P() {
5529
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";
5530
5530
  }
5531
5531
  return {
@@ -5547,16 +5547,16 @@ function Xi(e) {
5547
5547
  handleUpload: w,
5548
5548
  handleSelect: T,
5549
5549
  handleCreateFolder: E,
5550
- handleRenameFolder: D,
5551
- handleDeleteFolder: O,
5552
- handleEditItem: k,
5553
- handleEditSave: A,
5554
- handleImportFromUrl: j,
5555
- handleMoveToFolder: M,
5556
- handleDeleteClick: te,
5550
+ handleRenameFolder: ee,
5551
+ handleDeleteFolder: D,
5552
+ handleEditItem: O,
5553
+ handleEditSave: k,
5554
+ handleImportFromUrl: A,
5555
+ handleMoveToFolder: j,
5556
+ handleDeleteClick: M,
5557
5557
  handleReplaceItem: N,
5558
5558
  handleReplaceFile: ne,
5559
- resetUI: re
5559
+ resetUI: P
5560
5560
  };
5561
5561
  }
5562
5562
  //#endregion
@@ -5627,7 +5627,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5627
5627
  }, Ra = {
5628
5628
  key: 1,
5629
5629
  class: "tpl:relative"
5630
- }, za = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ba = ["disabled"], Va = /* @__PURE__ */ A({
5630
+ }, za = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ba = ["disabled"], Va = /* @__PURE__ */ k({
5631
5631
  __name: "MediaLibraryModal",
5632
5632
  props: {
5633
5633
  visible: { type: Boolean },
@@ -5637,35 +5637,35 @@ var Zi = ["data-tpl-theme"], Qi = {
5637
5637
  emits: ["close", "select"],
5638
5638
  setup(e, { emit: t }) {
5639
5639
  let n = e, r = t, { t: i } = z(), a = l("tplUiTheme");
5640
- s(Pe, D(() => n.popoverTarget ?? null));
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), re = h(() => T.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: ie, availableCategories: ae } = Oe(), P = Ce({
5640
+ s(Pe, ee(() => n.popoverTarget ?? null));
5641
+ let d = l("authManager"), f = l("projectId"), S = h(() => f.value), T = l("planConfig"), k = h(() => T.hasFeature("media_folders")), M = h(() => T.hasFeature("import_from_url")), ne = h(() => T.config.value?.storage.used_bytes ?? 0), P = h(() => T.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: re, availableCategories: F } = Oe(), I = Ce({
5642
5642
  projectId: S.value,
5643
5643
  authManager: d
5644
- }), I = Xi({
5645
- library: P,
5646
- canUseMediaFolders: A,
5644
+ }), L = Xi({
5645
+ library: I,
5646
+ canUseMediaFolders: k,
5647
5647
  translations: i
5648
5648
  });
5649
- ee(() => n.visible, (e) => {
5650
- e ? (P.loadItems(), P.loadFrequentlyUsed()) : I.resetUI();
5649
+ te(() => n.visible, (e) => {
5650
+ e ? (I.loadItems(), I.loadFrequentlyUsed()) : L.resetUI();
5651
5651
  });
5652
- function L(e) {
5652
+ function ae(e) {
5653
5653
  e.key === "Escape" && r("close");
5654
5654
  }
5655
- F(document, "keydown", L);
5655
+ ie(document, "keydown", ae);
5656
5656
  function oe() {
5657
- return P.previewItem.value ? n.accept?.length ? ie(P.previewItem.value.mime_type, n.accept) : !0 : !1;
5657
+ return I.previewItem.value ? n.accept?.length ? re(I.previewItem.value.mime_type, n.accept) : !0 : !1;
5658
5658
  }
5659
5659
  function se() {
5660
5660
  if (oe()) {
5661
- let e = P.previewItem.value;
5661
+ let e = I.previewItem.value;
5662
5662
  r("select", {
5663
5663
  ...e,
5664
- url: I.selectedUrl.value || e.url
5664
+ url: L.selectedUrl.value || e.url
5665
5665
  }), r("close");
5666
5666
  }
5667
5667
  }
5668
- return (t, n) => (o(), b(m, { to: e.popoverTarget || "body" }, [j(x, {
5668
+ return (t, n) => (o(), b(m, { to: e.popoverTarget || "body" }, [A(x, {
5669
5669
  "enter-active-class": "tpl:transition tpl:duration-200",
5670
5670
  "enter-from-class": "tpl:opacity-0",
5671
5671
  "enter-to-class": "tpl:opacity-100",
@@ -5680,13 +5680,13 @@ var Zi = ["data-tpl-theme"], Qi = {
5680
5680
  onClick: n[18] ||= y((e) => r("close"), ["self"])
5681
5681
  }, [w("div", Qi, [
5682
5682
  w("div", $i, [w("h2", ea, p(v(i).mediaLibrary.title), 1), w("div", ta, [
5683
- j(Yi, {
5684
- "used-bytes": N.value,
5685
- "limit-bytes": re.value,
5683
+ A(Yi, {
5684
+ "used-bytes": ne.value,
5685
+ "limit-bytes": P.value,
5686
5686
  size: 22
5687
5687
  }, null, 8, ["used-bytes", "limit-bytes"]),
5688
5688
  w("div", na, [w("input", {
5689
- value: v(I).searchInput.value,
5689
+ value: v(L).searchInput.value,
5690
5690
  type: "text",
5691
5691
  class: "tpl:w-52 tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-xs tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:outline-none tpl:focus:shadow-[var(--tpl-ring)]",
5692
5692
  style: {
@@ -5695,8 +5695,8 @@ var Zi = ["data-tpl-theme"], Qi = {
5695
5695
  color: "var(--tpl-text)"
5696
5696
  },
5697
5697
  placeholder: v(i).mediaLibrary.searchPlaceholder,
5698
- onInput: n[0] ||= (e) => v(I).handleSearchInput(e.target.value)
5699
- }, null, 40, ra), j(v(xe), {
5698
+ onInput: n[0] ||= (e) => v(L).handleSearchInput(e.target.value)
5699
+ }, null, 40, ra), A(v(_e), {
5700
5700
  class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
5701
5701
  size: 13,
5702
5702
  "stroke-width": 2,
@@ -5706,12 +5706,12 @@ var Zi = ["data-tpl-theme"], Qi = {
5706
5706
  class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
5707
5707
  style: { color: "var(--tpl-text-muted)" },
5708
5708
  onClick: n[1] ||= (e) => r("close")
5709
- }, [j(v(ne), {
5709
+ }, [A(v(N), {
5710
5710
  size: 18,
5711
5711
  "stroke-width": 2
5712
5712
  })])
5713
5713
  ])]),
5714
- w("div", ia, [j(x, {
5714
+ w("div", ia, [A(x, {
5715
5715
  "enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
5716
5716
  "enter-from-class": "tpl:-ml-48 tpl:opacity-0",
5717
5717
  "enter-to-class": "tpl:ml-0 tpl:opacity-100",
@@ -5719,16 +5719,16 @@ var Zi = ["data-tpl-theme"], Qi = {
5719
5719
  "leave-from-class": "tpl:ml-0 tpl:opacity-100",
5720
5720
  "leave-to-class": "tpl:-ml-48 tpl:opacity-0"
5721
5721
  }, {
5722
- default: u(() => [A.value && v(I).showSidebar.value ? (o(), g("div", aa, [j(yr, {
5723
- folders: v(P).folders.value,
5724
- "current-folder-id": v(P).currentFolderId.value,
5725
- "view-mode": v(P).viewMode.value,
5726
- "has-frequently-used": v(I).hasFrequentlyUsed.value,
5727
- onNavigate: v(P).navigateToFolder,
5728
- onCreateFolder: v(I).handleCreateFolder,
5729
- onRenameFolder: v(I).handleRenameFolder,
5730
- onDeleteFolder: v(I).handleDeleteFolder,
5731
- onShowFrequentlyUsed: v(P).showFrequentlyUsed
5722
+ default: u(() => [k.value && v(L).showSidebar.value ? (o(), g("div", aa, [A(yr, {
5723
+ folders: v(I).folders.value,
5724
+ "current-folder-id": v(I).currentFolderId.value,
5725
+ "view-mode": v(I).viewMode.value,
5726
+ "has-frequently-used": v(L).hasFrequentlyUsed.value,
5727
+ onNavigate: v(I).navigateToFolder,
5728
+ onCreateFolder: v(L).handleCreateFolder,
5729
+ onRenameFolder: v(L).handleRenameFolder,
5730
+ onDeleteFolder: v(L).handleDeleteFolder,
5731
+ onShowFrequentlyUsed: v(I).showFrequentlyUsed
5732
5732
  }, null, 8, [
5733
5733
  "folders",
5734
5734
  "current-folder-id",
@@ -5742,25 +5742,25 @@ var Zi = ["data-tpl-theme"], Qi = {
5742
5742
  ])])) : _("", !0)]),
5743
5743
  _: 1
5744
5744
  }), w("div", oa, [w("div", sa, [w("div", ca, [
5745
- A.value ? (o(), g("button", {
5745
+ k.value ? (o(), g("button", {
5746
5746
  key: 0,
5747
5747
  class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
5748
5748
  style: E({
5749
- color: v(I).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5750
- backgroundColor: v(I).showSidebar.value ? "var(--tpl-bg)" : "transparent",
5751
- border: v(I).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
5749
+ color: v(L).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5750
+ backgroundColor: v(L).showSidebar.value ? "var(--tpl-bg)" : "transparent",
5751
+ border: v(L).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
5752
5752
  }),
5753
- title: v(I).showSidebar.value ? v(i).mediaLibrary.hideFolders : v(i).mediaLibrary.showFolders,
5754
- onClick: n[2] ||= (e) => v(I).showSidebar.value = !v(I).showSidebar.value
5755
- }, [j(v(ve), {
5753
+ title: v(L).showSidebar.value ? v(i).mediaLibrary.hideFolders : v(i).mediaLibrary.showFolders,
5754
+ onClick: n[2] ||= (e) => v(L).showSidebar.value = !v(L).showSidebar.value
5755
+ }, [A(v(me), {
5756
5756
  size: 16,
5757
5757
  "stroke-width": 2
5758
5758
  })], 12, la)) : _("", !0),
5759
- v(P).viewMode.value === "frequently-used" ? (o(), g("span", ua, p(v(i).mediaLibrary.frequentlyUsed), 1)) : (o(), b(De, {
5759
+ v(I).viewMode.value === "frequently-used" ? (o(), g("span", ua, p(v(i).mediaLibrary.frequentlyUsed), 1)) : (o(), b(De, {
5760
5760
  key: 2,
5761
- folders: v(P).folders.value,
5762
- "current-folder-id": v(P).currentFolderId.value,
5763
- onNavigate: v(P).navigateToFolder
5761
+ folders: v(I).folders.value,
5762
+ "current-folder-id": v(I).currentFolderId.value,
5763
+ onNavigate: v(I).navigateToFolder
5764
5764
  }, null, 8, [
5765
5765
  "folders",
5766
5766
  "current-folder-id",
@@ -5769,27 +5769,27 @@ var Zi = ["data-tpl-theme"], Qi = {
5769
5769
  w("div", da, [w("button", {
5770
5770
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
5771
5771
  style: E({
5772
- color: v(I).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5773
- backgroundColor: v(I).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
5772
+ color: v(L).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5773
+ backgroundColor: v(L).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
5774
5774
  }),
5775
5775
  title: v(i).mediaLibrary.viewGrid,
5776
- onClick: n[3] ||= (e) => v(I).layoutMode.value = "grid"
5777
- }, [j(v(_e), {
5776
+ onClick: n[3] ||= (e) => v(L).layoutMode.value = "grid"
5777
+ }, [A(v(ge), {
5778
5778
  size: 14,
5779
5779
  "stroke-width": 2
5780
5780
  })], 12, fa), w("button", {
5781
5781
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
5782
5782
  style: E({
5783
- color: v(I).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5784
- backgroundColor: v(I).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
5783
+ color: v(L).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5784
+ backgroundColor: v(L).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
5785
5785
  }),
5786
5786
  title: v(i).mediaLibrary.viewList,
5787
- onClick: n[4] ||= (e) => v(I).layoutMode.value = "list"
5788
- }, [j(v(he), {
5787
+ onClick: n[4] ||= (e) => v(L).layoutMode.value = "list"
5788
+ }, [A(v(ve), {
5789
5789
  size: 14,
5790
5790
  "stroke-width": 2
5791
5791
  })], 12, pa)])
5792
- ]), w("div", ma, [v(ae).length > 1 ? (o(), g("select", {
5792
+ ]), w("div", ma, [v(F).length > 1 ? (o(), g("select", {
5793
5793
  key: 0,
5794
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",
5795
5795
  style: {
@@ -5797,20 +5797,20 @@ var Zi = ["data-tpl-theme"], Qi = {
5797
5797
  "background-color": "var(--tpl-bg)",
5798
5798
  color: "var(--tpl-text)"
5799
5799
  },
5800
- value: v(P).categoryFilter.value ?? "",
5801
- onChange: n[5] ||= (e) => v(P).filterByCategory(e.target.value || null)
5802
- }, [w("option", ga, p(v(i).mediaLibrary.filterAll), 1), (o(!0), g(O, null, c(v(ae), (e) => (o(), g("option", {
5800
+ value: v(I).categoryFilter.value ?? "",
5801
+ onChange: n[5] ||= (e) => v(I).filterByCategory(e.target.value || null)
5802
+ }, [w("option", ga, p(v(i).mediaLibrary.filterAll), 1), (o(!0), g(D, null, c(v(F), (e) => (o(), g("option", {
5803
5803
  key: e,
5804
5804
  value: e
5805
- }, p(v(I).getCategoryLabel(e)), 9, _a))), 128))], 40, ha)) : _("", !0), w("select", {
5805
+ }, p(v(L).getCategoryLabel(e)), 9, _a))), 128))], 40, ha)) : _("", !0), w("select", {
5806
5806
  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",
5807
5807
  style: {
5808
5808
  "border-color": "var(--tpl-border)",
5809
5809
  "background-color": "var(--tpl-bg)",
5810
5810
  color: "var(--tpl-text)"
5811
5811
  },
5812
- value: v(P).sortOption.value,
5813
- onChange: n[6] ||= (e) => v(P).sortBy(e.target.value)
5812
+ value: v(I).sortOption.value,
5813
+ onChange: n[6] ||= (e) => v(I).sortBy(e.target.value)
5814
5814
  }, [
5815
5815
  w("option", ya, p(v(i).mediaLibrary.sortNewest), 1),
5816
5816
  w("option", ba, p(v(i).mediaLibrary.sortOldest), 1),
@@ -5818,15 +5818,15 @@ var Zi = ["data-tpl-theme"], Qi = {
5818
5818
  w("option", Sa, p(v(i).mediaLibrary.sortNameDesc), 1),
5819
5819
  w("option", Ca, p(v(i).mediaLibrary.sortSizeAsc), 1),
5820
5820
  w("option", wa, p(v(i).mediaLibrary.sortSizeDesc), 1)
5821
- ], 40, va)])]), w("div", Ta, [v(P).viewMode.value === "files" ? (o(), g("div", Ea, [j(Wi, {
5822
- "is-uploading": v(P).isUploading.value,
5823
- "upload-progress": v(P).uploadProgress.value,
5824
- onUpload: v(I).handleUpload
5821
+ ], 40, va)])]), w("div", Ta, [v(I).viewMode.value === "files" ? (o(), g("div", Ea, [A(Wi, {
5822
+ "is-uploading": v(I).isUploading.value,
5823
+ "upload-progress": v(I).uploadProgress.value,
5824
+ onUpload: v(L).handleUpload
5825
5825
  }, null, 8, [
5826
5826
  "is-uploading",
5827
5827
  "upload-progress",
5828
5828
  "onUpload"
5829
- ]), te.value ? (o(), g("button", {
5829
+ ]), M.value ? (o(), g("button", {
5830
5830
  key: 0,
5831
5831
  class: "tpl:mt-2 tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
5832
5832
  style: {
@@ -5834,22 +5834,22 @@ var Zi = ["data-tpl-theme"], Qi = {
5834
5834
  color: "var(--tpl-text-muted)",
5835
5835
  "background-color": "var(--tpl-bg)"
5836
5836
  },
5837
- onClick: n[7] ||= (e) => v(I).showImportUrlModal.value = !0
5838
- }, [j(v(pe), {
5837
+ onClick: n[7] ||= (e) => v(L).showImportUrlModal.value = !0
5838
+ }, [A(v(he), {
5839
5839
  size: 14,
5840
5840
  "stroke-width": 2
5841
- }), k(" " + p(v(i).mediaLibrary.importFromUrl), 1)])) : _("", !0)])) : _("", !0), j(Xr, {
5842
- items: v(I).displayItems.value,
5843
- "selected-ids": v(P).selectedItems.value,
5844
- "is-loading": v(P).isLoading.value,
5845
- "has-more": v(P).viewMode.value === "files" && v(P).hasMore.value,
5841
+ }), O(" " + p(v(i).mediaLibrary.importFromUrl), 1)])) : _("", !0)])) : _("", !0), A(Xr, {
5842
+ items: v(L).displayItems.value,
5843
+ "selected-ids": v(I).selectedItems.value,
5844
+ "is-loading": v(I).isLoading.value,
5845
+ "has-more": v(I).viewMode.value === "files" && v(I).hasMore.value,
5846
5846
  accept: e.accept,
5847
- layout: v(I).layoutMode.value,
5848
- onSelect: v(I).handleSelect,
5849
- onToggle: v(P).toggleSelection,
5850
- onLoadMore: v(P).loadMore,
5851
- onEdit: v(I).handleEditItem,
5852
- onReplace: v(I).handleReplaceItem
5847
+ layout: v(L).layoutMode.value,
5848
+ onSelect: v(L).handleSelect,
5849
+ onToggle: v(I).toggleSelection,
5850
+ onLoadMore: v(I).loadMore,
5851
+ onEdit: v(L).handleEditItem,
5852
+ onReplace: v(L).handleReplaceItem
5853
5853
  }, null, 8, [
5854
5854
  "items",
5855
5855
  "selected-ids",
@@ -5863,36 +5863,36 @@ var Zi = ["data-tpl-theme"], Qi = {
5863
5863
  "onEdit",
5864
5864
  "onReplace"
5865
5865
  ])])])]),
5866
- j(ci, {
5867
- visible: v(I).showImportUrlModal.value,
5868
- "is-importing": v(P).isImportingFromUrl.value,
5869
- error: v(P).importFromUrlError.value,
5870
- onImport: v(I).handleImportFromUrl,
5871
- onClose: n[8] ||= (e) => v(I).showImportUrlModal.value = !1
5866
+ A(ci, {
5867
+ visible: v(L).showImportUrlModal.value,
5868
+ "is-importing": v(I).isImportingFromUrl.value,
5869
+ error: v(I).importFromUrlError.value,
5870
+ onImport: v(L).handleImportFromUrl,
5871
+ onClose: n[8] ||= (e) => v(L).showImportUrlModal.value = !1
5872
5872
  }, null, 8, [
5873
5873
  "visible",
5874
5874
  "is-importing",
5875
5875
  "error",
5876
5876
  "onImport"
5877
5877
  ]),
5878
- j(or, {
5879
- visible: !!v(I).editingItem.value,
5880
- item: v(I).editingItem.value,
5881
- onSave: v(I).handleEditSave,
5882
- onClose: n[9] ||= (e) => v(I).editingItem.value = null
5878
+ A(or, {
5879
+ visible: !!v(L).editingItem.value,
5880
+ item: v(L).editingItem.value,
5881
+ onSave: v(L).handleEditSave,
5882
+ onClose: n[9] ||= (e) => v(L).editingItem.value = null
5883
5883
  }, null, 8, [
5884
5884
  "visible",
5885
5885
  "item",
5886
5886
  "onSave"
5887
5887
  ]),
5888
- j(zi, {
5889
- visible: v(P).showReplaceWarning.value,
5890
- item: v(P).pendingReplaceItem.value,
5891
- "usage-info": v(P).replaceUsageInfo.value,
5892
- "is-replacing": v(P).isReplacing.value,
5893
- error: v(P).replaceError.value,
5894
- onReplace: v(I).handleReplaceFile,
5895
- onClose: v(P).cancelReplace
5888
+ A(zi, {
5889
+ visible: v(I).showReplaceWarning.value,
5890
+ item: v(I).pendingReplaceItem.value,
5891
+ "usage-info": v(I).replaceUsageInfo.value,
5892
+ "is-replacing": v(I).isReplacing.value,
5893
+ error: v(I).replaceError.value,
5894
+ onReplace: v(L).handleReplaceFile,
5895
+ onClose: v(I).cancelReplace
5896
5896
  }, null, 8, [
5897
5897
  "visible",
5898
5898
  "item",
@@ -5902,7 +5902,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5902
5902
  "onReplace",
5903
5903
  "onClose"
5904
5904
  ]),
5905
- j(x, {
5905
+ A(x, {
5906
5906
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
5907
5907
  "enter-from-class": "tpl:opacity-0",
5908
5908
  "enter-to-class": "tpl:opacity-100",
@@ -5910,7 +5910,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5910
5910
  "leave-from-class": "tpl:opacity-100",
5911
5911
  "leave-to-class": "tpl:opacity-0"
5912
5912
  }, {
5913
- default: u(() => [v(P).showDeleteWarning.value ? (o(), g("div", {
5913
+ default: u(() => [v(I).showDeleteWarning.value ? (o(), g("div", {
5914
5914
  key: 0,
5915
5915
  class: "tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-lg)]",
5916
5916
  style: {
@@ -5918,19 +5918,19 @@ var Zi = ["data-tpl-theme"], Qi = {
5918
5918
  "backdrop-filter": "blur(8px)",
5919
5919
  "-webkit-backdrop-filter": "blur(8px)"
5920
5920
  },
5921
- onClick: n[12] ||= y((...e) => v(P).cancelDelete && v(P).cancelDelete(...e), ["self"])
5921
+ onClick: n[12] ||= y((...e) => v(I).cancelDelete && v(I).cancelDelete(...e), ["self"])
5922
5922
  }, [w("div", Da, [
5923
5923
  w("h3", Oa, p(v(i).mediaLibrary.deleteWarningTitle), 1),
5924
5924
  w("p", {
5925
- class: C(["tpl:text-xs", v(I).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
5925
+ class: C(["tpl:text-xs", v(L).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
5926
5926
  style: { color: "var(--tpl-text-muted)" }
5927
5927
  }, p(v(i).mediaLibrary.deleteWarningMessage), 3),
5928
- v(I).hasUsedFiles.value ? (o(), g("p", ka, p(v(i).mediaLibrary.deleteWarningUsageNote), 1)) : _("", !0),
5929
- v(I).hasUsedFiles.value ? (o(), g("div", Aa, [(o(!0), g(O, null, c(v(P).deleteUsageInfo.value, (e, t) => (o(), g("div", {
5928
+ v(L).hasUsedFiles.value ? (o(), g("p", ka, p(v(i).mediaLibrary.deleteWarningUsageNote), 1)) : _("", !0),
5929
+ v(L).hasUsedFiles.value ? (o(), g("div", Aa, [(o(!0), g(D, null, c(v(I).deleteUsageInfo.value, (e, t) => (o(), g("div", {
5930
5930
  key: t,
5931
5931
  class: "tpl:text-xs",
5932
5932
  style: { color: "var(--tpl-text)" }
5933
- }, [e.template_count > 0 ? (o(), g(O, { key: 0 }, [w("span", ja, p(v(I).displayItems.value.find((e) => e.id === t)?.filename || t), 1), w("span", Ma, " - " + p(v(i).mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : _("", !0)]))), 128))])) : _("", !0),
5933
+ }, [e.template_count > 0 ? (o(), g(D, { key: 0 }, [w("span", ja, p(v(L).displayItems.value.find((e) => e.id === t)?.filename || t), 1), w("span", Ma, " - " + p(v(i).mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : _("", !0)]))), 128))])) : _("", !0),
5934
5934
  w("div", Na, [w("button", {
5935
5935
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
5936
5936
  style: {
@@ -5938,7 +5938,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5938
5938
  color: "var(--tpl-text)",
5939
5939
  "background-color": "var(--tpl-bg)"
5940
5940
  },
5941
- onClick: n[10] ||= (...e) => v(P).cancelDelete && v(P).cancelDelete(...e)
5941
+ onClick: n[10] ||= (...e) => v(I).cancelDelete && v(I).cancelDelete(...e)
5942
5942
  }, p(v(i).mediaLibrary.cancel), 1), w("button", {
5943
5943
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
5944
5944
  style: {
@@ -5946,31 +5946,31 @@ var Zi = ["data-tpl-theme"], Qi = {
5946
5946
  color: "var(--tpl-danger)",
5947
5947
  "background-color": "var(--tpl-danger-light)"
5948
5948
  },
5949
- onClick: n[11] ||= (...e) => v(P).confirmDelete && v(P).confirmDelete(...e)
5950
- }, p(v(I).hasUsedFiles.value ? v(i).mediaLibrary.deleteAnyway : v(i).mediaLibrary.confirmDelete), 1)])
5949
+ onClick: n[11] ||= (...e) => v(I).confirmDelete && v(I).confirmDelete(...e)
5950
+ }, p(v(L).hasUsedFiles.value ? v(i).mediaLibrary.deleteAnyway : v(i).mediaLibrary.confirmDelete), 1)])
5951
5951
  ])])) : _("", !0)]),
5952
5952
  _: 1
5953
5953
  }),
5954
- w("div", Pa, [w("div", Fa, [v(P).previewItem.value ? (o(), b(wi, {
5954
+ w("div", Pa, [w("div", Fa, [v(I).previewItem.value ? (o(), b(wi, {
5955
5955
  key: 0,
5956
- "selected-conversion": v(I).selectedConversion.value,
5957
- "onUpdate:selectedConversion": n[13] ||= (e) => v(I).selectedConversion.value = e,
5958
- item: v(P).previewItem.value,
5959
- folders: v(P).folders.value
5956
+ "selected-conversion": v(L).selectedConversion.value,
5957
+ "onUpdate:selectedConversion": n[13] ||= (e) => v(L).selectedConversion.value = e,
5958
+ item: v(I).previewItem.value,
5959
+ folders: v(I).folders.value
5960
5960
  }, null, 8, [
5961
5961
  "selected-conversion",
5962
5962
  "item",
5963
5963
  "folders"
5964
- ])) : _("", !0)]), w("div", Ia, [v(P).selectedItems.value.size > 0 ? (o(), g("div", La, [v(P).previewItem.value ? (o(), g("button", {
5964
+ ])) : _("", !0)]), w("div", Ia, [v(I).selectedItems.value.size > 0 ? (o(), g("div", La, [v(I).previewItem.value ? (o(), g("button", {
5965
5965
  key: 0,
5966
5966
  class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
5967
5967
  style: E({
5968
- borderColor: v(I).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
5969
- color: v(I).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
5968
+ borderColor: v(L).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
5969
+ color: v(L).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
5970
5970
  backgroundColor: "var(--tpl-bg)"
5971
5971
  }),
5972
- onClick: n[14] ||= (e) => v(I).copy(v(I).selectedUrl.value)
5973
- }, [v(I).copied.value ? (o(), b(v(M), {
5972
+ onClick: n[14] ||= (e) => v(L).copy(v(L).selectedUrl.value)
5973
+ }, [v(L).copied.value ? (o(), b(v(j), {
5974
5974
  key: 1,
5975
5975
  size: 12,
5976
5976
  "stroke-width": 2
@@ -5978,25 +5978,25 @@ var Zi = ["data-tpl-theme"], Qi = {
5978
5978
  key: 0,
5979
5979
  size: 12,
5980
5980
  "stroke-width": 2
5981
- })), k(" " + p(v(I).copied.value ? v(i).mediaLibrary.copied : v(i).mediaLibrary.copyUrl), 1)], 4)) : _("", !0), A.value ? (o(), g("div", Ra, [w("button", {
5981
+ })), O(" " + p(v(L).copied.value ? v(i).mediaLibrary.copied : v(i).mediaLibrary.copyUrl), 1)], 4)) : _("", !0), k.value ? (o(), g("div", Ra, [w("button", {
5982
5982
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
5983
5983
  style: {
5984
5984
  "border-color": "var(--tpl-border)",
5985
5985
  color: "var(--tpl-text)",
5986
5986
  "background-color": "var(--tpl-bg)"
5987
5987
  },
5988
- onClick: n[15] ||= (e) => v(I).showMovePicker.value = !v(I).showMovePicker.value
5989
- }, p(v(i).mediaLibrary.moveSelected), 1), v(I).showMovePicker.value ? (o(), b(pi, {
5988
+ onClick: n[15] ||= (e) => v(L).showMovePicker.value = !v(L).showMovePicker.value
5989
+ }, p(v(i).mediaLibrary.moveSelected), 1), v(L).showMovePicker.value ? (o(), b(pi, {
5990
5990
  key: 0,
5991
- folders: v(P).folders.value,
5992
- "current-folder-id": v(P).currentFolderId.value,
5993
- onSelect: v(I).handleMoveToFolder,
5994
- onClose: n[16] ||= (e) => v(I).showMovePicker.value = !1
5991
+ folders: v(I).folders.value,
5992
+ "current-folder-id": v(I).currentFolderId.value,
5993
+ onSelect: v(L).handleMoveToFolder,
5994
+ onClose: n[16] ||= (e) => v(L).showMovePicker.value = !1
5995
5995
  }, null, 8, [
5996
5996
  "folders",
5997
5997
  "current-folder-id",
5998
5998
  "onSelect"
5999
- ])) : _("", !0)])) : _("", !0)])) : _("", !0), w("div", za, [v(P).selectedItems.value.size > 0 ? (o(), g("button", {
5999
+ ])) : _("", !0)])) : _("", !0)])) : _("", !0), w("div", za, [v(I).selectedItems.value.size > 0 ? (o(), g("button", {
6000
6000
  key: 0,
6001
6001
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
6002
6002
  style: {
@@ -6004,7 +6004,7 @@ var Zi = ["data-tpl-theme"], Qi = {
6004
6004
  color: "var(--tpl-danger)",
6005
6005
  "background-color": "var(--tpl-danger-light)"
6006
6006
  },
6007
- onClick: n[17] ||= (...e) => v(I).handleDeleteClick && v(I).handleDeleteClick(...e)
6007
+ onClick: n[17] ||= (...e) => v(L).handleDeleteClick && v(L).handleDeleteClick(...e)
6008
6008
  }, p(v(i).mediaLibrary.deleteSelected), 1)) : _("", !0), w("button", {
6009
6009
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-4 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
6010
6010
  style: {
@@ -6022,4 +6022,4 @@ var Zi = ["data-tpl-theme"], Qi = {
6022
6022
  //#endregion
6023
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 };
6024
6024
 
6025
- //# sourceMappingURL=media-library-ClQUPxRM.js.map
6025
+ //# sourceMappingURL=media-library-C479-QcE.js.map