@aswin.dev/editor 0.7.0 → 0.7.2

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 (182) hide show
  1. package/LICENSE +56 -0
  2. package/README.md +3 -3
  3. package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-EmQ19wiS.js} +37 -37
  4. package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-DeB0w_32.js} +67 -81
  5. package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-DoLD5Cde.js} +22 -22
  6. package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-DkNbDvJA.js} +12 -12
  7. package/dist/CloudEditor-zo9PjjvY.js +1214 -0
  8. package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-BsXMY-8e.js} +21 -21
  9. package/dist/CommentsSidebar-DIWIa4rS.js +436 -0
  10. package/dist/CountdownBlock-BCi7-DAM.js +92 -0
  11. package/dist/CountdownToolbar-BuS8p5ju.js +210 -0
  12. package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-RDlnhL-6.js} +58 -58
  13. package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-BJ59h9ok.js} +2 -2
  14. package/dist/ModuleBrowserModal-b7HbpByz.js +206 -0
  15. package/dist/ModulePreviewCanvas-D__YlOLS.js +108 -0
  16. package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-Ca3vNY84.js} +87 -87
  17. package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-B1aYPO-6.js} +182 -182
  18. package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-BmEVMrkJ.js} +38 -38
  19. package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-ClovqI6h.js} +28 -28
  20. package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-DoqtH0cw.js} +45 -50
  21. package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-DQv2ZAiL.js} +75 -75
  22. package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-iIeYJYsj.js} +28 -28
  23. package/dist/{TitleEditor-fStSADI-.js → TitleEditor-CTDIwRF_.js} +68 -68
  24. package/dist/{TplModal-BwSfxIHf.js → TplModal-CBq1J1pG.js} +14 -14
  25. package/dist/{accessibility-e8JYu_zd.js → accessibility-BU09xZrQ.js} +1 -1
  26. package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-QkC6f5UE.js} +19 -5
  27. package/dist/bundle-stats.json +7 -7
  28. package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js → AccessibilityPanel-BeU8nz7A.js} +28 -28
  29. package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js.map → AccessibilityPanel-BeU8nz7A.js.map} +1 -1
  30. package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js → AiFeatureMenu-B2mhscyP.js} +21 -21
  31. package/dist/cdn/chunks/AiFeatureMenu-B2mhscyP.js.map +1 -0
  32. package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js → BlockA11yBadge-C4g77gF0.js} +11 -11
  33. package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js.map → BlockA11yBadge-C4g77gF0.js.map} +1 -1
  34. package/dist/{CloudEditor-BCz1ZTYC.js → cdn/chunks/CloudEditor-Btyr0b0_.js} +486 -475
  35. package/dist/cdn/chunks/CloudEditor-Btyr0b0_.js.map +1 -0
  36. package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js → CollaboratorBar-YBiIjiRh.js} +15 -15
  37. package/dist/cdn/chunks/CollaboratorBar-YBiIjiRh.js.map +1 -0
  38. package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js +93 -0
  39. package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js.map +1 -0
  40. package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js +212 -0
  41. package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js.map +1 -0
  42. package/dist/{ModuleBrowserModal-DrUFMTDx.js → cdn/chunks/ModuleBrowserModal-C2CDWKW6.js} +51 -62
  43. package/dist/cdn/chunks/ModuleBrowserModal-C2CDWKW6.js.map +1 -0
  44. package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js +109 -0
  45. package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js.map +1 -0
  46. package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js → NumberWithSuffix-Ty1bp9vB.js} +64 -64
  47. package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js.map → NumberWithSuffix-Ty1bp9vB.js.map} +1 -1
  48. package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js → ParagraphEditor-BA1WbHI7.js} +188 -188
  49. package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js.map → ParagraphEditor-BA1WbHI7.js.map} +1 -1
  50. package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js → RichTextEditorContent-BtWCA_Oc.js} +30 -30
  51. package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js.map → RichTextEditorContent-BtWCA_Oc.js.map} +1 -1
  52. package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js → SaveModuleDialog-AwL0tkCV.js} +21 -21
  53. package/dist/cdn/chunks/SaveModuleDialog-AwL0tkCV.js.map +1 -0
  54. package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js → TitleEditor-DbSyeixS.js} +65 -65
  55. package/dist/cdn/chunks/TitleEditor-DbSyeixS.js.map +1 -0
  56. package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js +23 -0
  57. package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js.map +1 -0
  58. package/dist/cdn/chunks/{de-D8CnZxV9.js → de-_tooy3Q8.js} +250 -2
  59. package/dist/cdn/chunks/de-_tooy3Q8.js.map +1 -0
  60. package/dist/cdn/chunks/{draggable-Bcb86AsV.js → draggable-C-1_gch3.js} +2 -2
  61. package/dist/cdn/chunks/{draggable-Bcb86AsV.js.map → draggable-C-1_gch3.js.map} +1 -1
  62. package/dist/cdn/chunks/{en-8FHaQv4V.js → en-CNqLoIm9.js} +250 -2
  63. package/dist/cdn/chunks/en-CNqLoIm9.js.map +1 -0
  64. package/dist/cdn/chunks/{extensions-DIxF31tA.js → extensions-BVKQw_sp.js} +107 -107
  65. package/dist/cdn/chunks/extensions-BVKQw_sp.js.map +1 -0
  66. package/dist/cdn/chunks/{features-DEMb13KS.js → features-DIBEo4xl.js} +3388 -2289
  67. package/dist/cdn/chunks/features-DIBEo4xl.js.map +1 -0
  68. package/dist/cdn/chunks/{icons-CsLTcirh.js → icons-C1Gg-ov-.js} +346 -54
  69. package/dist/cdn/chunks/icons-C1Gg-ov-.js.map +1 -0
  70. package/dist/cdn/chunks/{media-library-CVaNvhpM.js → media-library-BTF_Ko70.js} +985 -985
  71. package/dist/cdn/chunks/media-library-BTF_Ko70.js.map +1 -0
  72. package/dist/cdn/chunks/{quality-BaBfc54_.js → quality-C5AmotmP.js} +312 -312
  73. package/dist/cdn/chunks/quality-C5AmotmP.js.map +1 -0
  74. package/dist/cdn/chunks/{renderer-CUxvx7ro.js → renderer-D0L44Vlp.js} +236 -142
  75. package/dist/cdn/chunks/renderer-D0L44Vlp.js.map +1 -0
  76. package/dist/cdn/chunks/{src-CRaqN-p8.js → src-RKexlYjA.js} +161 -161
  77. package/dist/cdn/chunks/src-RKexlYjA.js.map +1 -0
  78. package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js +57 -0
  79. package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js.map +1 -0
  80. package/dist/cdn/chunks/styles-CQR6ed13.js +4976 -0
  81. package/dist/cdn/chunks/styles-CQR6ed13.js.map +1 -0
  82. package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js → tiptap-CDzAbF2j.js} +43 -43
  83. package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js.map → tiptap-CDzAbF2j.js.map} +1 -1
  84. package/dist/cdn/editor.css +1 -1
  85. package/dist/cdn/editor.js +211 -123
  86. package/dist/cdn/editor.js.map +1 -1
  87. package/dist/{check-Da05j8yl.js → check-DJrpDKO_.js} +1 -1
  88. package/dist/{chevron-down-R2uY34iD.js → chevron-down-C5oBUhT8.js} +1 -1
  89. package/dist/chevron-right-BqCptpdp.js +10 -0
  90. package/dist/{circle-alert-DZuGWPX-.js → circle-alert-ZQQc98HC.js} +1 -1
  91. package/dist/{clock-CRp2sIub.js → clock-ik2pRJKG.js} +1 -1
  92. package/dist/{cloud-DEk_b4CR.js → cloud-DJG4tb4_.js} +485 -427
  93. package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-ClREiSx3.js} +6 -6
  94. package/dist/{de-Brqvgr43.js → de-2LEvILeZ.js} +249 -1
  95. package/dist/{dist-Cp0zXPAD.js → dist-BHAeXaUY.js} +1 -1
  96. package/dist/{dist-BaQIYPsn.js → dist-BSJvAvH3.js} +1 -1
  97. package/dist/{dist-wzMIGj-D.js → dist-BeFnymxK.js} +1 -1
  98. package/dist/dist-Bmir0gYb.js +1167 -0
  99. package/dist/{dist-DDJIWTRY.js → dist-BvPgo-UK.js} +1 -1
  100. package/dist/{dist-BFawx6IS.js → dist-CPVBKMmd.js} +51 -51
  101. package/dist/dist-CivF9P8b.js +382 -0
  102. package/dist/{dist-D6uC2xhi.js → dist-Df4ie7vZ.js} +1 -1
  103. package/dist/{dist-us-RpCWN.js → dist-DxOoemkW.js} +1 -1
  104. package/dist/{dist-KoBJjK1G.js → dist-HEQ52gTJ.js} +1 -1
  105. package/dist/{dist-DjviJBCi.js → dist-b-XUqAoF.js} +1 -1
  106. package/dist/{dist-D90y8dvT.js → dist-kZfaVUpW.js} +3 -3
  107. package/dist/{dist-aRzjfSRN.js → dist-wfAedlzi.js} +1 -1
  108. package/dist/{en-WDVp87TE.js → en-D2RU2Poj.js} +249 -1
  109. package/dist/{extensions-CUcl9Ok4.js → extensions-BQ1xXx3d.js} +103 -103
  110. package/dist/{image-up-MBZKKg9p.js → image-up-DT7gcJLN.js} +1 -1
  111. package/dist/index.d.ts +102 -14
  112. package/dist/{info-CJEC7piy.js → info-BSPGcsSM.js} +1 -1
  113. package/dist/keys-CvX8D-8C.js +10 -0
  114. package/dist/{loader-circle-DsY5Yg33.js → loader-circle-Balo8p3d.js} +1 -1
  115. package/dist/{message-circle-yElBbR2C.js → message-circle-B39qAHxs.js} +1 -1
  116. package/dist/pencil-BZJPNYWR.js +10 -0
  117. package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-DwDqGUM0.js} +1 -1
  118. package/dist/{scan-line-D0vcUekt.js → scan-line-DlghmhNf.js} +1 -1
  119. package/dist/{send-DH4oDQqC.js → send-DDdhIRj8.js} +1 -1
  120. package/dist/{shield-check-CfJgs2Hd.js → shield-check-OSQ-JVTX.js} +1 -1
  121. package/dist/{sparkles-CvRXGqFs.js → sparkles-BN4a-CoF.js} +1 -1
  122. package/dist/style.css +1 -1
  123. package/dist/styleConstants-wWRbcuEK.js +55 -0
  124. package/dist/styles-CavWjvol.js +5487 -0
  125. package/dist/templatical-editor.js +211 -119
  126. package/dist/{text-align-start-BT9VUDxK.js → text-align-start-D1weisjS.js} +1 -1
  127. package/dist/{trash-2-DbP2Y6t2.js → trash-2-CMWvQ5KX.js} +1 -1
  128. package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-DyidRNX_.js} +1 -1
  129. package/dist/undo-2-Cg8I7obC.js +16 -0
  130. package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-BTTNBk5i.js} +2 -2
  131. package/dist/{useEditorCore-C6ost42Q.js → useEditorCore-BGnzcT7p.js} +2424 -2249
  132. package/dist/{useI18n-lb2DHDiu.js → useI18n-C2xQZ6K9.js} +2 -2
  133. package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-CfuZq2fF.js} +4 -4
  134. package/dist/{vue.runtime.esm-bundler-DpvJL-nX.js → vue.runtime.esm-bundler-CjauPXjj.js} +1 -1
  135. package/dist/{x-u2oVmjN_.js → x-CgIhNcT9.js} +1 -1
  136. package/package.json +15 -15
  137. package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
  138. package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
  139. package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
  140. package/dist/ModulePreviewCanvas-CHdOwV_4.js +0 -106
  141. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +0 -1
  142. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +0 -1143
  143. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +0 -1
  144. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +0 -1
  145. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +0 -93
  146. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +0 -1
  147. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
  148. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +0 -1
  149. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +0 -195
  150. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +0 -1
  151. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +0 -107
  152. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +0 -1
  153. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +0 -1
  154. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +0 -1
  155. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +0 -22
  156. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +0 -1
  157. package/dist/cdn/chunks/de-D8CnZxV9.js.map +0 -1
  158. package/dist/cdn/chunks/en-8FHaQv4V.js.map +0 -1
  159. package/dist/cdn/chunks/extensions-DIxF31tA.js.map +0 -1
  160. package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
  161. package/dist/cdn/chunks/icons-CsLTcirh.js.map +0 -1
  162. package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +0 -1
  163. package/dist/cdn/chunks/quality-BaBfc54_.js.map +0 -1
  164. package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +0 -1
  165. package/dist/cdn/chunks/src-CRaqN-p8.js.map +0 -1
  166. package/dist/cdn/chunks/styleConstants-DP1VOca8.js +0 -57
  167. package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +0 -1
  168. package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
  169. package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
  170. package/dist/dist-B1IR0bpH.js +0 -326
  171. package/dist/dist-DJmnUmW9.js +0 -362
  172. package/dist/keys-ciNfSSGj.js +0 -10
  173. package/dist/styleConstants-fWzlIIwN.js +0 -55
  174. package/dist/styles-DEXEkBvg.js +0 -3176
  175. /package/dist/{_plugin-vue_export-helper-B0hnzhyu.js → _plugin-vue_export-helper-Bwh4ceeO.js} +0 -0
  176. /package/dist/{de-DCaaCE5s.js → de-D2npYjrZ.js} +0 -0
  177. /package/dist/{dist-iLBdeBDR.js → dist-DvHLtWVP.js} +0 -0
  178. /package/dist/{emojiData-PQyVa4bU.js → emojiData-DvQBBzmO.js} +0 -0
  179. /package/dist/{en-DXCyK4-X.js → en-ib-4h3_o.js} +0 -0
  180. /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-CFDZnEIs.js} +0 -0
  181. /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-7Rv0QDiO.js} +0 -0
  182. /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-C_9OpzBw.js} +0 -0
@@ -1,6 +1,6 @@
1
- import { $ as e, B as t, E as n, F as r, H as i, I as a, J as o, L as s, N as c, O as l, R as u, S as d, U as f, _ as p, at as m, b as h, c as g, ct as _, d as v, f as y, g as b, h as x, l as S, lt as C, m as w, n as T, p as E, s as D, st as O, u as k, y as A } from "./draggable-Bcb86AsV.js";
2
- import { E as j, Et as M, Ot as ee, St as N, T as P, an as te, ft as F, gt as I, in as ne, it as L, nn as re, on as R, ot as ie, pt as ae, rn as oe, rt as se, sn as ce, tn as le, tt as ue } from "./features-DEMb13KS.js";
3
- import { A as de, B as fe, E as pe, K as me, R as he, W as ge, b as _e, m as ve, q as ye } from "./icons-CsLTcirh.js";
1
+ import { C as e, D as t, G as n, H as r, I as i, L as a, P as o, R as s, W as c, X as l, _ as u, b as d, c as f, ct as p, d as m, dt as h, f as g, ft as _, g as v, h as y, k as b, l as x, m as S, n as C, p as w, tt as T, u as E, ut as D, v as O, x as k, z as A } from "./draggable-C-1_gch3.js";
2
+ import { E as j, Mt as M, T as N, Tt as P, at as ee, ct as te, dn as ne, gt as F, hn as I, it as L, kt as re, ln as R, mn as ie, mt as ae, nt as oe, pn as se, un as ce, vn as le, yt as ue } from "./features-DIBEo4xl.js";
3
+ import { $ as de, K as fe, M as pe, O as me, W as he, Z as ge, et as _e, h as ve, x as ye } from "./icons-C1Gg-ov-.js";
4
4
  //#region ../media-library/src/api-client.ts
5
5
  var be = class {
6
6
  constructor(e) {
@@ -36,7 +36,7 @@ var be = class {
36
36
  async browseMedia(e) {
37
37
  let t = new URLSearchParams();
38
38
  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);
39
- let n = t.toString(), r = `${j(P["media.browse"], this.baseParams)}${n ? `?${n}` : ""}`, i = await this.authManager.authenticatedFetch(r, { headers: { Accept: "application/json" } });
39
+ let n = t.toString(), r = `${j(N["media.browse"], this.baseParams)}${n ? `?${n}` : ""}`, i = await this.authManager.authenticatedFetch(r, { headers: { Accept: "application/json" } });
40
40
  if (!i.ok) {
41
41
  let e = await i.json().catch(() => ({ message: `HTTP error ${i.status}` }));
42
42
  throw Error(e.message, { cause: e });
@@ -46,7 +46,7 @@ var be = class {
46
46
  async uploadMedia(e, t) {
47
47
  let n = new FormData();
48
48
  n.append("file", e), t && n.append("folder_id", t);
49
- let r = j(P["media.upload"], this.baseParams), i = await this.authManager.authenticatedFetch(r, {
49
+ let r = j(N["media.upload"], this.baseParams), i = await this.authManager.authenticatedFetch(r, {
50
50
  method: "POST",
51
51
  headers: { Accept: "application/json" },
52
52
  body: n
@@ -58,7 +58,7 @@ var be = class {
58
58
  return (await i.json()).data;
59
59
  }
60
60
  async updateMedia(e, t, n) {
61
- return this.request(j(P["media.update"], {
61
+ return this.request(j(N["media.update"], {
62
62
  ...this.baseParams,
63
63
  media: e
64
64
  }), {
@@ -70,13 +70,13 @@ var be = class {
70
70
  });
71
71
  }
72
72
  async deleteMedia(e) {
73
- return this.request(j(P["media.delete"], this.baseParams), {
73
+ return this.request(j(N["media.delete"], this.baseParams), {
74
74
  method: "POST",
75
75
  body: JSON.stringify({ ids: e })
76
76
  });
77
77
  }
78
78
  async moveMedia(e, t) {
79
- return this.request(j(P["media.move"], this.baseParams), {
79
+ return this.request(j(N["media.move"], this.baseParams), {
80
80
  method: "POST",
81
81
  body: JSON.stringify({
82
82
  ids: e,
@@ -85,10 +85,10 @@ var be = class {
85
85
  });
86
86
  }
87
87
  async getMediaFolders() {
88
- return this.request(j(P["folders.index"], this.baseParams));
88
+ return this.request(j(N["folders.index"], this.baseParams));
89
89
  }
90
90
  async createMediaFolder(e, t) {
91
- return this.request(j(P["folders.store"], this.baseParams), {
91
+ return this.request(j(N["folders.store"], this.baseParams), {
92
92
  method: "POST",
93
93
  body: JSON.stringify({
94
94
  name: e,
@@ -97,7 +97,7 @@ var be = class {
97
97
  });
98
98
  }
99
99
  async renameMediaFolder(e, t) {
100
- return this.request(j(P["folders.update"], {
100
+ return this.request(j(N["folders.update"], {
101
101
  ...this.baseParams,
102
102
  mediaFolder: e
103
103
  }), {
@@ -106,13 +106,13 @@ var be = class {
106
106
  });
107
107
  }
108
108
  async deleteMediaFolder(e) {
109
- return this.request(j(P["folders.destroy"], {
109
+ return this.request(j(N["folders.destroy"], {
110
110
  ...this.baseParams,
111
111
  mediaFolder: e
112
112
  }), { method: "DELETE" });
113
113
  }
114
114
  async checkMediaUsage(e) {
115
- let t = await this.authManager.authenticatedFetch(j(P["media.checkUsage"], this.baseParams), {
115
+ let t = await this.authManager.authenticatedFetch(j(N["media.checkUsage"], this.baseParams), {
116
116
  method: "POST",
117
117
  headers: {
118
118
  "Content-Type": "application/json",
@@ -127,10 +127,10 @@ var be = class {
127
127
  return t.json();
128
128
  }
129
129
  async getFrequentlyUsed() {
130
- return this.request(j(P["media.frequentlyUsed"], this.baseParams));
130
+ return this.request(j(N["media.frequentlyUsed"], this.baseParams));
131
131
  }
132
132
  async importFromUrl(e, t) {
133
- return this.request(j(P["media.importFromUrl"], this.baseParams), {
133
+ return this.request(j(N["media.importFromUrl"], this.baseParams), {
134
134
  method: "POST",
135
135
  body: JSON.stringify({
136
136
  url: e,
@@ -141,7 +141,7 @@ var be = class {
141
141
  async replaceMedia(e, t) {
142
142
  let n = new FormData();
143
143
  n.append("file", t);
144
- let r = j(P["media.replace"], {
144
+ let r = j(N["media.replace"], {
145
145
  ...this.baseParams,
146
146
  media: e
147
147
  }), i = await this.authManager.authenticatedFetch(r, {
@@ -158,186 +158,186 @@ var be = class {
158
158
  };
159
159
  //#endregion
160
160
  //#region ../media-library/src/composable.ts
161
- function xe(t) {
162
- if (!t.projectId) throw Error("projectId is required for useMediaLibrary");
163
- let n = new be(t.authManager), r = e([]), i = e([]), a = e(null), o = e("files"), s = e(""), c = e(null), l = e("newest"), u = e(!1), d = e(!1), f = e(!1), p = e(null), m = e(null), h = e(/* @__PURE__ */ new Set()), g = e(null), _ = e([]), v = e({}), y = e(!1), b = e([]), x = e(!1), S = e(null), C = e(!1), w = e(null), T = e(!1), E = e(null), D = e(null), O = 0;
161
+ function xe(e) {
162
+ if (!e.projectId) throw Error("projectId is required for useMediaLibrary");
163
+ let t = new be(e.authManager), n = T([]), r = T([]), i = T(null), a = T("files"), o = T(""), s = T(null), c = T("newest"), l = T(!1), u = T(!1), d = T(!1), f = T(null), p = T(null), m = T(/* @__PURE__ */ new Set()), h = T(null), g = T([]), _ = T({}), v = T(!1), y = T([]), b = T(!1), x = T(null), S = T(!1), C = T(null), w = T(!1), E = T(null), D = T(null), O = 0;
164
164
  async function k() {
165
- let e = ++O;
166
- u.value = !0;
165
+ let r = ++O;
166
+ l.value = !0;
167
167
  try {
168
- let t = await n.browseMedia({
169
- folder_id: s.value ? void 0 : a.value,
170
- search: s.value || void 0,
171
- category: c.value || void 0,
172
- sort: l.value === "newest" ? void 0 : l.value
168
+ let e = await t.browseMedia({
169
+ folder_id: o.value ? void 0 : i.value,
170
+ search: o.value || void 0,
171
+ category: s.value || void 0,
172
+ sort: c.value === "newest" ? void 0 : c.value
173
173
  });
174
- if (e !== O) return;
175
- r.value = t.data, p.value = t.meta.next_cursor, f.value = !!t.meta.next_cursor;
176
- } catch (n) {
177
- if (e !== O) return;
178
- t.onError?.(n);
174
+ if (r !== O) return;
175
+ n.value = e.data, f.value = e.meta.next_cursor, d.value = !!e.meta.next_cursor;
176
+ } catch (t) {
177
+ if (r !== O) return;
178
+ e.onError?.(t);
179
179
  } finally {
180
- e === O && (u.value = !1);
180
+ r === O && (l.value = !1);
181
181
  }
182
182
  }
183
183
  async function A() {
184
- if (!f.value || !p.value || u.value) return;
185
- let e = ++O;
186
- u.value = !0;
184
+ if (!d.value || !f.value || l.value) return;
185
+ let r = ++O;
186
+ l.value = !0;
187
187
  try {
188
- let t = await n.browseMedia({
189
- folder_id: s.value ? void 0 : a.value,
190
- search: s.value || void 0,
191
- category: c.value || void 0,
192
- sort: l.value === "newest" ? void 0 : l.value,
193
- cursor: p.value
188
+ let e = await t.browseMedia({
189
+ folder_id: o.value ? void 0 : i.value,
190
+ search: o.value || void 0,
191
+ category: s.value || void 0,
192
+ sort: c.value === "newest" ? void 0 : c.value,
193
+ cursor: f.value
194
194
  });
195
- if (e !== O) return;
196
- r.value = [...r.value, ...t.data], p.value = t.meta.next_cursor, f.value = !!t.meta.next_cursor;
197
- } catch (n) {
198
- if (e !== O) return;
199
- t.onError?.(n);
195
+ if (r !== O) return;
196
+ n.value = [...n.value, ...e.data], f.value = e.meta.next_cursor, d.value = !!e.meta.next_cursor;
197
+ } catch (t) {
198
+ if (r !== O) return;
199
+ e.onError?.(t);
200
200
  } finally {
201
- e === O && (u.value = !1);
201
+ r === O && (l.value = !1);
202
202
  }
203
203
  }
204
204
  async function j(e) {
205
- s.value = e, await k();
205
+ o.value = e, await k();
206
206
  }
207
207
  async function M(e) {
208
- c.value = e, await k();
209
- }
210
- async function ee(e) {
211
- l.value = e, await k();
208
+ s.value = e, await k();
212
209
  }
213
210
  async function N(e) {
214
- o.value = "files", a.value = e, s.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await k();
211
+ c.value = e, await k();
215
212
  }
216
- async function P() {
217
- o.value = "frequently-used", a.value = null, s.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await re();
213
+ async function P(e) {
214
+ a.value = "files", i.value = e, o.value = "", m.value = /* @__PURE__ */ new Set(), h.value = null, await k();
218
215
  }
219
- async function te(e) {
220
- d.value = !0;
216
+ async function ee() {
217
+ a.value = "frequently-used", i.value = null, o.value = "", m.value = /* @__PURE__ */ new Set(), h.value = null, await re();
218
+ }
219
+ async function te(r) {
220
+ u.value = !0;
221
221
  try {
222
- let t = await n.uploadMedia(e, a.value);
223
- return r.value = [t, ...r.value], t;
224
- } catch (e) {
225
- return t.onError?.(e), null;
222
+ let e = await t.uploadMedia(r, i.value);
223
+ return n.value = [e, ...n.value], e;
224
+ } catch (t) {
225
+ return e.onError?.(t), null;
226
226
  } finally {
227
- d.value = !1;
227
+ u.value = !1;
228
228
  }
229
229
  }
230
- async function F(e) {
231
- d.value = !0, m.value = {
230
+ async function ne(r) {
231
+ u.value = !0, p.value = {
232
232
  current: 0,
233
- total: e.length
233
+ total: r.length
234
234
  };
235
235
  try {
236
- for (let i = 0; i < e.length; i++) {
237
- m.value = {
238
- current: i + 1,
239
- total: e.length
236
+ for (let a = 0; a < r.length; a++) {
237
+ p.value = {
238
+ current: a + 1,
239
+ total: r.length
240
240
  };
241
241
  try {
242
- r.value = [await n.uploadMedia(e[i], a.value), ...r.value];
243
- } catch (e) {
244
- t.onError?.(e);
242
+ n.value = [await t.uploadMedia(r[a], i.value), ...n.value];
243
+ } catch (t) {
244
+ e.onError?.(t);
245
245
  }
246
246
  }
247
247
  } finally {
248
- d.value = !1, m.value = null;
248
+ u.value = !1, p.value = null;
249
249
  }
250
250
  }
251
- async function I(e) {
252
- if (h.value.size !== 0) try {
253
- let t = await n.moveMedia([...h.value], e);
254
- if (a.value === null) {
255
- let e = new Map(t.map((e) => [e.id, e]));
256
- r.value = r.value.map((t) => e.get(t.id) ?? t);
257
- } else r.value = r.value.filter((e) => !h.value.has(e.id));
258
- h.value = /* @__PURE__ */ new Set(), g.value = null;
259
- } catch (e) {
260
- t.onError?.(e);
251
+ async function F(r) {
252
+ if (m.value.size !== 0) try {
253
+ let e = await t.moveMedia([...m.value], r);
254
+ if (i.value === null) {
255
+ let t = new Map(e.map((e) => [e.id, e]));
256
+ n.value = n.value.map((e) => t.get(e.id) ?? e);
257
+ } else n.value = n.value.filter((e) => !m.value.has(e.id));
258
+ m.value = /* @__PURE__ */ new Set(), h.value = null;
259
+ } catch (t) {
260
+ e.onError?.(t);
261
261
  }
262
262
  }
263
- async function ne(e, i, a) {
263
+ async function I(r, i, a) {
264
264
  try {
265
- let t = await n.updateMedia(e, i, a);
266
- r.value = r.value.map((n) => n.id === e ? t : n), g.value?.id === e && (g.value = t);
267
- } catch (e) {
268
- t.onError?.(e);
265
+ let e = await t.updateMedia(r, i, a);
266
+ n.value = n.value.map((t) => t.id === r ? e : t), h.value?.id === r && (h.value = e);
267
+ } catch (t) {
268
+ e.onError?.(t);
269
269
  }
270
270
  }
271
271
  async function L() {
272
- if (h.value.size !== 0) try {
273
- await n.deleteMedia([...h.value]), r.value = r.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;
274
- } catch (e) {
275
- t.onError?.(e);
272
+ if (m.value.size !== 0) try {
273
+ await t.deleteMedia([...m.value]), n.value = n.value.filter((e) => !m.value.has(e.id)), g.value = g.value.filter((e) => !m.value.has(e.id)), m.value = /* @__PURE__ */ new Set(), h.value = null;
274
+ } catch (t) {
275
+ e.onError?.(t);
276
276
  }
277
277
  }
278
278
  async function re() {
279
279
  try {
280
- _.value = await n.getFrequentlyUsed();
281
- } catch (e) {
282
- t.onError?.(e);
280
+ g.value = await t.getFrequentlyUsed();
281
+ } catch (t) {
282
+ e.onError?.(t);
283
283
  }
284
284
  }
285
285
  async function R() {
286
- if (h.value.size === 0) return !1;
287
- b.value = [...h.value];
286
+ if (m.value.size === 0) return !1;
287
+ y.value = [...m.value];
288
288
  try {
289
- let e = await n.checkMediaUsage(b.value);
290
- v.value = e.data;
291
- let t = Object.values(e.data).some((e) => e.template_count > 0);
292
- return y.value = !0, t;
293
- } catch (e) {
294
- return t.onError?.(e), !1;
289
+ let e = await t.checkMediaUsage(y.value);
290
+ _.value = e.data;
291
+ let n = Object.values(e.data).some((e) => e.template_count > 0);
292
+ return v.value = !0, n;
293
+ } catch (t) {
294
+ return e.onError?.(t), !1;
295
295
  }
296
296
  }
297
297
  async function ie() {
298
- if (y.value = !1, b.value.length !== 0) try {
299
- await n.deleteMedia(b.value), r.value = r.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 = {};
300
- } catch (e) {
301
- t.onError?.(e);
298
+ if (v.value = !1, y.value.length !== 0) try {
299
+ await t.deleteMedia(y.value), n.value = n.value.filter((e) => !y.value.includes(e.id)), g.value = g.value.filter((e) => !y.value.includes(e.id)), m.value = /* @__PURE__ */ new Set(), h.value = null, y.value = [], _.value = {};
300
+ } catch (t) {
301
+ e.onError?.(t);
302
302
  }
303
303
  }
304
304
  function ae() {
305
- y.value = !1, b.value = [], v.value = {};
305
+ v.value = !1, y.value = [], _.value = {};
306
306
  }
307
- async function oe(e) {
308
- x.value = !0, S.value = null;
307
+ async function oe(r) {
308
+ b.value = !0, x.value = null;
309
309
  try {
310
- let t = await n.importFromUrl(e, a.value);
311
- return r.value = [t, ...r.value], t;
312
- } catch (e) {
313
- return S.value = e instanceof Error ? e.message : "Import failed", t.onError?.(e), null;
310
+ let e = await t.importFromUrl(r, i.value);
311
+ return n.value = [e, ...n.value], e;
312
+ } catch (t) {
313
+ return x.value = t instanceof Error ? t.message : "Import failed", e.onError?.(t), null;
314
314
  } finally {
315
- x.value = !1;
315
+ b.value = !1;
316
316
  }
317
317
  }
318
318
  function se(e) {
319
- let t = new Set(h.value);
320
- t.has(e) ? t.delete(e) : t.add(e), h.value = t;
319
+ let t = new Set(m.value);
320
+ t.has(e) ? t.delete(e) : t.add(e), m.value = t;
321
321
  }
322
322
  function ce() {
323
- h.value = /* @__PURE__ */ new Set(), g.value = null;
323
+ m.value = /* @__PURE__ */ new Set(), h.value = null;
324
324
  }
325
325
  function le(e) {
326
- g.value = e, h.value = new Set([e.id]);
326
+ h.value = e, m.value = new Set([e.id]);
327
327
  }
328
328
  async function ue() {
329
329
  try {
330
- i.value = await n.getMediaFolders();
331
- } catch (e) {
332
- t.onError?.(e);
330
+ r.value = await t.getMediaFolders();
331
+ } catch (t) {
332
+ e.onError?.(t);
333
333
  }
334
334
  }
335
- async function de(e, r) {
335
+ async function de(n, r) {
336
336
  try {
337
- let t = await n.createMediaFolder(e, r);
338
- return await ue(), t;
339
- } catch (e) {
340
- return t.onError?.(e), null;
337
+ let e = await t.createMediaFolder(n, r);
338
+ return await ue(), e;
339
+ } catch (t) {
340
+ return e.onError?.(t), null;
341
341
  }
342
342
  }
343
343
  function fe(e, t) {
@@ -350,83 +350,83 @@ function xe(t) {
350
350
  }
351
351
  return null;
352
352
  }
353
- async function pe(e, r) {
353
+ async function pe(n, r) {
354
354
  try {
355
- await n.renameMediaFolder(e, r), await ue();
356
- } catch (e) {
357
- t.onError?.(e);
355
+ await t.renameMediaFolder(n, r), await ue();
356
+ } catch (t) {
357
+ e.onError?.(t);
358
358
  }
359
359
  }
360
- async function me(e) {
360
+ async function me(n) {
361
361
  try {
362
- let t = fe(i.value, e)?.parent_id ?? null;
363
- await n.deleteMediaFolder(e), a.value === e && (a.value = t), await ue(), await k();
364
- } catch (e) {
365
- t.onError?.(e);
362
+ let e = fe(r.value, n)?.parent_id ?? null;
363
+ await t.deleteMediaFolder(n), i.value === n && (i.value = e), await ue(), await k();
364
+ } catch (t) {
365
+ e.onError?.(t);
366
366
  }
367
367
  }
368
- async function he(e) {
369
- E.value = e, w.value = null;
368
+ async function he(n) {
369
+ E.value = n, C.value = null;
370
370
  try {
371
- D.value = (await n.checkMediaUsage([e.id])).data[e.id] ?? null, T.value = !0;
372
- } catch (e) {
373
- t.onError?.(e);
371
+ D.value = (await t.checkMediaUsage([n.id])).data[n.id] ?? null, w.value = !0;
372
+ } catch (t) {
373
+ e.onError?.(t);
374
374
  }
375
375
  }
376
376
  function ge() {
377
- T.value = !1, E.value = null, D.value = null, w.value = null;
377
+ w.value = !1, E.value = null, D.value = null, C.value = null;
378
378
  }
379
- async function _e(e) {
379
+ async function _e(r) {
380
380
  if (!E.value) return null;
381
- C.value = !0, w.value = null;
381
+ S.value = !0, C.value = null;
382
382
  try {
383
- let t = await n.replaceMedia(E.value.id, e);
384
- return r.value = r.value.map((e) => e.id === t.id ? t : e), _.value = _.value.map((e) => e.id === t.id ? t : e), g.value?.id === t.id && (g.value = t), T.value = !1, E.value = null, D.value = null, t;
385
- } catch (e) {
386
- return w.value = e instanceof Error ? e.message : "Replace failed", t.onError?.(e), null;
383
+ let e = await t.replaceMedia(E.value.id, r);
384
+ return n.value = n.value.map((t) => t.id === e.id ? e : t), g.value = g.value.map((t) => t.id === e.id ? e : t), h.value?.id === e.id && (h.value = e), w.value = !1, E.value = null, D.value = null, e;
385
+ } catch (t) {
386
+ return C.value = t instanceof Error ? t.message : "Replace failed", e.onError?.(t), null;
387
387
  } finally {
388
- C.value = !1;
388
+ S.value = !1;
389
389
  }
390
390
  }
391
- async function ve(e, i) {
391
+ async function ve(r, i) {
392
392
  try {
393
- let t = await n.replaceMedia(e, i);
394
- return r.value = r.value.map((e) => e.id === t.id ? t : e), _.value = _.value.map((e) => e.id === t.id ? t : e), g.value?.id === t.id && (g.value = t), t;
395
- } catch (e) {
396
- return t.onError?.(e), null;
393
+ let e = await t.replaceMedia(r, i);
394
+ return n.value = n.value.map((t) => t.id === e.id ? e : t), g.value = g.value.map((t) => t.id === e.id ? e : t), h.value?.id === e.id && (h.value = e), e;
395
+ } catch (t) {
396
+ return e.onError?.(t), null;
397
397
  }
398
398
  }
399
399
  return {
400
- items: r,
401
- folders: i,
402
- currentFolderId: a,
403
- viewMode: o,
404
- searchQuery: s,
405
- categoryFilter: c,
406
- sortOption: l,
407
- isLoading: u,
408
- isUploading: d,
409
- uploadProgress: m,
410
- hasMore: f,
411
- selectedItems: h,
412
- previewItem: g,
413
- frequentlyUsedItems: _,
414
- deleteUsageInfo: v,
415
- showDeleteWarning: y,
400
+ items: n,
401
+ folders: r,
402
+ currentFolderId: i,
403
+ viewMode: a,
404
+ searchQuery: o,
405
+ categoryFilter: s,
406
+ sortOption: c,
407
+ isLoading: l,
408
+ isUploading: u,
409
+ uploadProgress: p,
410
+ hasMore: d,
411
+ selectedItems: m,
412
+ previewItem: h,
413
+ frequentlyUsedItems: g,
414
+ deleteUsageInfo: _,
415
+ showDeleteWarning: v,
416
416
  loadItems: k,
417
417
  loadMore: A,
418
418
  search: j,
419
419
  filterByCategory: M,
420
- sortBy: ee,
421
- navigateToFolder: N,
422
- showFrequentlyUsed: P,
420
+ sortBy: N,
421
+ navigateToFolder: P,
422
+ showFrequentlyUsed: ee,
423
423
  uploadFile: te,
424
- uploadFiles: F,
425
- moveSelected: I,
426
- updateFile: ne,
424
+ uploadFiles: ne,
425
+ moveSelected: F,
426
+ updateFile: I,
427
427
  deleteSelected: L,
428
- isImportingFromUrl: x,
429
- importFromUrlError: S,
428
+ isImportingFromUrl: b,
429
+ importFromUrlError: x,
430
430
  importFromUrl: oe,
431
431
  toggleSelection: se,
432
432
  clearSelection: ce,
@@ -440,9 +440,9 @@ function xe(t) {
440
440
  checkUsageBeforeDelete: R,
441
441
  confirmDelete: ie,
442
442
  cancelDelete: ae,
443
- isReplacing: C,
444
- replaceError: w,
445
- showReplaceWarning: T,
443
+ isReplacing: S,
444
+ replaceError: C,
445
+ showReplaceWarning: w,
446
446
  pendingReplaceItem: E,
447
447
  replaceUsageInfo: D,
448
448
  checkUsageBeforeReplace: he,
@@ -454,7 +454,7 @@ function xe(t) {
454
454
  //#endregion
455
455
  //#region ../media-library/src/composables/useI18n.ts
456
456
  function z(e) {
457
- let t = e ?? n("translations"), r = o(t) ? t.value : t;
457
+ let n = e ?? t("translations"), r = l(n) ? n.value : n;
458
458
  function i(e, t) {
459
459
  return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
460
460
  }
@@ -472,7 +472,7 @@ var Se = {
472
472
  }, Ce = ["onClick"], we = {
473
473
  key: 1,
474
474
  style: { color: "var(--tpl-text)" }
475
- }, Te = /* @__PURE__ */ d({
475
+ }, Te = /* @__PURE__ */ e({
476
476
  __name: "MediaBreadcrumb",
477
477
  props: {
478
478
  folders: {},
@@ -480,37 +480,37 @@ var Se = {
480
480
  },
481
481
  emits: ["navigate"],
482
482
  setup(e, { emit: t }) {
483
- let n = e, i = t, { t: a } = z(), o = E(() => {
483
+ let n = e, r = t, { t: a } = z(), s = S(() => {
484
484
  if (!n.currentFolderId) return [];
485
485
  let e = [];
486
- return s(n.folders, n.currentFolderId, e), e;
486
+ return c(n.folders, n.currentFolderId, e), e;
487
487
  });
488
- function s(e, t, n) {
488
+ function c(e, t, n) {
489
489
  for (let r of e) {
490
490
  if (r.id === t) return n.push(r), !0;
491
- if (r.children && s(r.children, t, n)) return n.unshift(r), !0;
491
+ if (r.children && c(r.children, t, n)) return n.unshift(r), !0;
492
492
  }
493
493
  return !1;
494
494
  }
495
- return (e, t) => o.value.length > 0 ? (c(), p("div", Se, [w("button", {
495
+ return (e, t) => s.value.length > 0 ? (o(), O("div", Se, [y("button", {
496
496
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
497
497
  style: { color: "var(--tpl-primary)" },
498
- onClick: t[0] ||= (e) => i("navigate", null)
499
- }, C(m(a).mediaLibrary.allFiles), 1), (c(!0), p(v, null, r(o.value, (e, t) => (c(), p(v, { key: e.id }, [h(m(M), {
498
+ onClick: t[0] ||= (e) => r("navigate", null)
499
+ }, _(p(a).mediaLibrary.allFiles), 1), (o(!0), O(g, null, i(s.value, (e, t) => (o(), O(g, { key: e.id }, [k(p(re), {
500
500
  size: 12,
501
501
  "stroke-width": 2
502
- }), t < o.value.length - 1 ? (c(), p("button", {
502
+ }), t < s.value.length - 1 ? (o(), O("button", {
503
503
  key: 0,
504
504
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
505
505
  style: { color: "var(--tpl-primary)" },
506
- onClick: (t) => i("navigate", e.id)
507
- }, C(e.name), 9, Ce)) : (c(), p("span", we, C(e.name), 1))], 64))), 128))])) : b("", !0);
506
+ onClick: (t) => r("navigate", e.id)
507
+ }, _(e.name), 9, Ce)) : (o(), O("span", we, _(e.name), 1))], 64))), 128))])) : u("", !0);
508
508
  }
509
509
  });
510
510
  //#endregion
511
511
  //#region ../media-library/src/composables/useMediaCategories.ts
512
512
  function Ee() {
513
- let e = n("planConfig"), t = E(() => e.config.value?.media ?? null), r = E(() => t.value?.use_media_library ?? !0), i = E(() => t.value?.categories ?? null), a = E(() => i.value ? Object.values(i.value).flatMap((e) => e.mime_types) : []), o = E(() => a.value.join(",")), s = E(() => t.value?.max_file_size ?? 0);
513
+ let e = t("planConfig"), n = S(() => e.config.value?.media ?? null), r = S(() => n.value?.use_media_library ?? !0), i = S(() => n.value?.categories ?? null), a = S(() => i.value ? Object.values(i.value).flatMap((e) => e.mime_types) : []), o = S(() => a.value.join(",")), s = S(() => n.value?.max_file_size ?? 0);
514
514
  function c(e, t) {
515
515
  return i.value ? !t || t.length === 0 ? a.value.includes(e) : t.some((t) => i.value[t]?.mime_types.includes(e)) : !1;
516
516
  }
@@ -527,7 +527,7 @@ function Ee() {
527
527
  allAcceptedMimeTypes: a,
528
528
  allAcceptedInputString: o,
529
529
  maxFileSize: s,
530
- availableCategories: E(() => i.value ? Object.keys(i.value) : []),
530
+ availableCategories: S(() => i.value ? Object.keys(i.value) : []),
531
531
  isAcceptedMimeType: c,
532
532
  isImageMimeType: l,
533
533
  getCategoryForMimeType: u
@@ -886,21 +886,21 @@ var Ze = function(e, t) {
886
886
  "enter"
887
887
  ]
888
888
  };
889
- tt.render = function(e, t, n, r, i, o) {
890
- return c(), x("div", {
889
+ tt.render = function(e, t, n, r, i, s) {
890
+ return o(), v("div", {
891
891
  ref: "draggable",
892
892
  class: n.classname,
893
893
  onTouchstart: t[1] ||= function() {
894
- return o.onTouchStart && o.onTouchStart.apply(o, arguments);
894
+ return s.onTouchStart && s.onTouchStart.apply(s, arguments);
895
895
  },
896
896
  onMousedown: t[2] ||= function() {
897
- return o.onMouseDown && o.onMouseDown.apply(o, arguments);
897
+ return s.onMouseDown && s.onMouseDown.apply(s, arguments);
898
898
  },
899
899
  onMouseover: t[3] ||= function() {
900
- return o.onMouseOver && o.onMouseOver.apply(o, arguments);
900
+ return s.onMouseOver && s.onMouseOver.apply(s, arguments);
901
901
  },
902
902
  onMouseleave: t[4] ||= function() {
903
- return o.onMouseLeave && o.onMouseLeave.apply(o, arguments);
903
+ return s.onMouseLeave && s.onMouseLeave.apply(s, arguments);
904
904
  }
905
905
  }, [a(e.$slots, "default")], 34);
906
906
  };
@@ -933,9 +933,9 @@ var nt = U("vue-handler-wrapper"), rt = {
933
933
  "drag-end"
934
934
  ]
935
935
  };
936
- rt.render = function(e, t, n, r, o, l) {
936
+ rt.render = function(e, t, n, r, i, l) {
937
937
  var u = s("DraggableElement");
938
- return c(), x("div", { class: l.classes.root }, [h(u, {
938
+ return o(), v("div", { class: l.classes.root }, [k(u, {
939
939
  class: l.classes.draggable,
940
940
  onDrag: t[1] ||= function(t) {
941
941
  return e.$emit("drag", t);
@@ -950,7 +950,7 @@ rt.render = function(e, t, n, r, o, l) {
950
950
  return e.$emit("enter");
951
951
  }
952
952
  }, {
953
- default: i((function() {
953
+ default: c((function() {
954
954
  return [a(e.$slots, "default")];
955
955
  })),
956
956
  _: 3
@@ -980,9 +980,9 @@ var it = U("vue-line-wrapper"), at = {
980
980
  "drag-end"
981
981
  ]
982
982
  };
983
- at.render = function(e, t, n, r, o, l) {
983
+ at.render = function(e, t, n, r, i, l) {
984
984
  var u = s("DraggableElement");
985
- return c(), x(u, {
985
+ return o(), v(u, {
986
986
  class: l.classname,
987
987
  onDrag: t[1] ||= function(t) {
988
988
  return e.$emit("drag", t);
@@ -997,7 +997,7 @@ at.render = function(e, t, n, r, o, l) {
997
997
  return e.$emit("enter");
998
998
  }
999
999
  }, {
1000
- default: i((function() {
1000
+ default: c((function() {
1001
1001
  return [a(e.$slots, "default")];
1002
1002
  })),
1003
1003
  _: 3
@@ -1559,20 +1559,20 @@ var Wt = U("vue-simple-handler"), Gt = U("vue-simple-handler-wrapper"), Kt = {
1559
1559
  },
1560
1560
  emits: ["drag", "drag-end"]
1561
1561
  };
1562
- Kt.render = function(e, t, n, r, a, o) {
1562
+ Kt.render = function(e, t, n, r, i, a) {
1563
1563
  var l = s("HandlerWrapper");
1564
- return c(), x(l, {
1565
- class: o.classes.wrapper,
1564
+ return o(), v(l, {
1565
+ class: a.classes.wrapper,
1566
1566
  "vertical-position": n.verticalPosition,
1567
1567
  "horizontal-position": n.horizontalPosition,
1568
1568
  disabled: n.disabled,
1569
- onDrag: o.onDrag,
1570
- onDragEnd: o.onDragEnd,
1571
- onEnter: o.onEnter,
1572
- onLeave: o.onLeave
1569
+ onDrag: a.onDrag,
1570
+ onDragEnd: a.onDragEnd,
1571
+ onEnter: a.onEnter,
1572
+ onLeave: a.onLeave
1573
1573
  }, {
1574
- default: i((function() {
1575
- return [h("div", { class: o.classes.default }, null, 2)];
1574
+ default: c((function() {
1575
+ return [k("div", { class: a.classes.default }, null, 2)];
1576
1576
  })),
1577
1577
  _: 1
1578
1578
  }, 8, [
@@ -1624,19 +1624,19 @@ var qt = U("vue-simple-line"), Jt = U("vue-simple-line-wrapper"), Yt = {
1624
1624
  },
1625
1625
  emits: ["drag", "drag-end"]
1626
1626
  };
1627
- Yt.render = function(e, t, n, r, a, o) {
1627
+ Yt.render = function(e, t, n, r, i, a) {
1628
1628
  var l = s("LineWrapper");
1629
- return c(), x(l, {
1630
- class: o.classes.wrapper,
1629
+ return o(), v(l, {
1630
+ class: a.classes.wrapper,
1631
1631
  position: n.position,
1632
1632
  disabled: n.disabled,
1633
- onDrag: o.onDrag,
1634
- onDragEnd: o.onDragEnd,
1635
- onEnter: o.onEnter,
1636
- onLeave: o.onLeave
1633
+ onDrag: a.onDrag,
1634
+ onDragEnd: a.onDragEnd,
1635
+ onEnter: a.onEnter,
1636
+ onLeave: a.onLeave
1637
1637
  }, {
1638
- default: i((function() {
1639
- return [h("div", { class: o.classes.root }, null, 2)];
1638
+ default: c((function() {
1639
+ return [k("div", { class: a.classes.root }, null, 2)];
1640
1640
  })),
1641
1641
  _: 1
1642
1642
  }, 8, [
@@ -1833,15 +1833,15 @@ var Xt = U("vue-bounding-box"), Zt = [
1833
1833
  },
1834
1834
  emits: ["resize", "resize-end"]
1835
1835
  };
1836
- $t.render = function(e, t, n, i, o, s) {
1837
- return c(), x("div", {
1836
+ $t.render = function(e, t, n, r, s, c) {
1837
+ return o(), v("div", {
1838
1838
  ref: "box",
1839
- class: s.classes.root,
1840
- style: s.style
1839
+ class: c.classes.root,
1840
+ style: c.style
1841
1841
  }, [
1842
1842
  a(e.$slots, "default"),
1843
- h("div", null, [(c(!0), x(v, null, r(s.lineNodes, (function(e) {
1844
- return c(), x(u(e.component), {
1843
+ k("div", null, [(o(!0), v(g, null, i(c.lineNodes, (function(e) {
1844
+ return o(), v(A(e.component), {
1845
1845
  key: e.name,
1846
1846
  "default-class": e.class,
1847
1847
  "hover-class": e.hoverClass,
@@ -1849,10 +1849,10 @@ $t.render = function(e, t, n, i, o, s) {
1849
1849
  position: e.name,
1850
1850
  disabled: e.disabled,
1851
1851
  onDrag: function(t) {
1852
- return s.onHandlerDrag(t, e.horizontalDirection, e.verticalDirection);
1852
+ return c.onHandlerDrag(t, e.horizontalDirection, e.verticalDirection);
1853
1853
  },
1854
1854
  onDragEnd: t[1] ||= function(e) {
1855
- return s.onEnd();
1855
+ return c.onEnd();
1856
1856
  }
1857
1857
  }, null, 8, [
1858
1858
  "default-class",
@@ -1863,12 +1863,12 @@ $t.render = function(e, t, n, i, o, s) {
1863
1863
  "onDrag"
1864
1864
  ]);
1865
1865
  })), 128))]),
1866
- (c(!0), x(v, null, r(s.handlerNodes, (function(e) {
1867
- return c(), x("div", {
1866
+ (o(!0), v(g, null, i(c.handlerNodes, (function(e) {
1867
+ return o(), v("div", {
1868
1868
  key: e.name,
1869
1869
  style: e.wrapperStyle,
1870
1870
  class: e.wrapperClass
1871
- }, [(c(), x(u(e.component), {
1871
+ }, [(o(), v(A(e.component), {
1872
1872
  "default-class": e.class,
1873
1873
  "hover-class": e.hoverClass,
1874
1874
  "wrapper-class": e.wrapperClass,
@@ -1876,10 +1876,10 @@ $t.render = function(e, t, n, i, o, s) {
1876
1876
  "vertical-position": e.verticalDirection,
1877
1877
  disabled: e.disabled,
1878
1878
  onDrag: function(t) {
1879
- return s.onHandlerDrag(t, e.horizontalDirection, e.verticalDirection);
1879
+ return c.onHandlerDrag(t, e.horizontalDirection, e.verticalDirection);
1880
1880
  },
1881
1881
  onDragEnd: t[2] ||= function(e) {
1882
- return s.onEnd();
1882
+ return c.onEnd();
1883
1883
  }
1884
1884
  }, null, 8, [
1885
1885
  "default-class",
@@ -1982,14 +1982,14 @@ var en = U("vue-draggable-area"), tn = {
1982
1982
  },
1983
1983
  emits: ["move", "move-end"]
1984
1984
  };
1985
- tn.render = function(e, t, n, r, i, o) {
1986
- return c(), x("div", {
1985
+ tn.render = function(e, t, n, r, i, s) {
1986
+ return o(), v("div", {
1987
1987
  ref: "container",
1988
1988
  onTouchstart: t[1] ||= function() {
1989
- return o.onTouchStart && o.onTouchStart.apply(o, arguments);
1989
+ return s.onTouchStart && s.onTouchStart.apply(s, arguments);
1990
1990
  },
1991
1991
  onMousedown: t[2] ||= function() {
1992
- return o.onMouseDown && o.onMouseDown.apply(o, arguments);
1992
+ return s.onMouseDown && s.onMouseDown.apply(s, arguments);
1993
1993
  }
1994
1994
  }, [a(e.$slots, "default")], 544);
1995
1995
  };
@@ -2149,11 +2149,11 @@ function ln(e, t) {
2149
2149
  };
2150
2150
  }
2151
2151
  cn.render = function(e, t, n, r, i, a) {
2152
- return c(), x("div", { class: a.classes.root }, [h("div", {
2152
+ return o(), v("div", { class: a.classes.root }, [k("div", {
2153
2153
  ref: "wrapper",
2154
2154
  class: a.classes.wrapper,
2155
2155
  style: a.wrapperStyle
2156
- }, [h("img", {
2156
+ }, [k("img", {
2157
2157
  ref: "image",
2158
2158
  src: n.image.src,
2159
2159
  class: a.classes.image,
@@ -2282,17 +2282,17 @@ var un = {
2282
2282
  "transform-end"
2283
2283
  ]
2284
2284
  };
2285
- un.render = function(e, t, n, r, i, o) {
2286
- return c(), x("div", {
2285
+ un.render = function(e, t, n, r, i, s) {
2286
+ return o(), v("div", {
2287
2287
  ref: "container",
2288
2288
  onTouchstart: t[1] ||= function() {
2289
- return o.onTouchStart && o.onTouchStart.apply(o, arguments);
2289
+ return s.onTouchStart && s.onTouchStart.apply(s, arguments);
2290
2290
  },
2291
2291
  onMousedown: t[2] ||= function() {
2292
- return o.onMouseDown && o.onMouseDown.apply(o, arguments);
2292
+ return s.onMouseDown && s.onMouseDown.apply(s, arguments);
2293
2293
  },
2294
2294
  onWheel: t[3] ||= function() {
2295
- return o.onWheel && o.onWheel.apply(o, arguments);
2295
+ return s.onWheel && s.onWheel.apply(s, arguments);
2296
2296
  }
2297
2297
  }, [a(e.$slots, "default")], 544);
2298
2298
  };
@@ -2318,9 +2318,9 @@ var dn = {
2318
2318
  },
2319
2319
  emits: ["resize", "move"]
2320
2320
  };
2321
- dn.render = function(e, t, n, r, o, l) {
2321
+ dn.render = function(e, t, n, r, i, l) {
2322
2322
  var u = s("transformable-image");
2323
- return c(), x(u, {
2323
+ return o(), v(u, {
2324
2324
  "touch-move": n.touchMove,
2325
2325
  "touch-resize": n.touchResize,
2326
2326
  "mouse-move": n.mouseMove,
@@ -2332,7 +2332,7 @@ dn.render = function(e, t, n, r, o, l) {
2332
2332
  return e.$emit("resize", t);
2333
2333
  }
2334
2334
  }, {
2335
- default: i((function() {
2335
+ default: c((function() {
2336
2336
  return [a(e.$slots, "default")];
2337
2337
  })),
2338
2338
  _: 3
@@ -2467,29 +2467,29 @@ var fn = U("vue-preview"), pn = {
2467
2467
  }
2468
2468
  }
2469
2469
  };
2470
- pn.render = function(e, t, n, r, i, a) {
2471
- return c(), x("div", {
2470
+ pn.render = function(e, t, r, i, a, s) {
2471
+ return o(), v("div", {
2472
2472
  ref: "root",
2473
- class: a.classes.root,
2474
- style: a.style
2475
- }, [h("div", {
2473
+ class: s.classes.root,
2474
+ style: s.style
2475
+ }, [k("div", {
2476
2476
  ref: "wrapper",
2477
- class: a.classes.wrapper,
2478
- style: a.wrapperStyle
2479
- }, [f(h("img", {
2477
+ class: s.classes.wrapper,
2478
+ style: s.wrapperStyle
2479
+ }, [n(k("img", {
2480
2480
  ref: "image",
2481
- src: n.image && n.image.src,
2482
- class: a.classes.image,
2483
- style: a.imageStyle
2484
- }, null, 14, ["src"]), [[g, n.image && n.image.src]])], 6)], 6);
2481
+ src: r.image && r.image.src,
2482
+ class: s.classes.image,
2483
+ style: s.imageStyle
2484
+ }, null, 14, ["src"]), [[x, r.image && r.image.src]])], 6)], 6);
2485
2485
  };
2486
2486
  var mn = {
2487
2487
  components: { Preview: pn },
2488
2488
  inheritAttrs: !1
2489
2489
  };
2490
2490
  mn.render = function(e, t, n, r, i, a) {
2491
- var o = s("preview");
2492
- return c(), x(o, l(e.$attrs, { fill: !0 }), null, 16);
2491
+ var c = s("preview");
2492
+ return o(), v(c, b(e.$attrs, { fill: !0 }), null, 16);
2493
2493
  };
2494
2494
  var hn = U("vue-rectangle-stencil"), gn = {
2495
2495
  name: "RectangleStencil",
@@ -2611,16 +2611,16 @@ var hn = U("vue-rectangle-stencil"), gn = {
2611
2611
  "move-end"
2612
2612
  ]
2613
2613
  };
2614
- gn.render = function(e, t, n, r, a, o) {
2614
+ gn.render = function(e, t, n, r, i, a) {
2615
2615
  var l = s("stencil-preview"), u = s("draggable-area"), d = s("bounding-box");
2616
- return c(), x("div", {
2617
- class: o.classes.stencil,
2618
- style: o.style
2619
- }, [h(d, {
2616
+ return o(), v("div", {
2617
+ class: a.classes.stencil,
2618
+ style: a.style
2619
+ }, [k(d, {
2620
2620
  width: n.stencilCoordinates.width,
2621
2621
  height: n.stencilCoordinates.height,
2622
2622
  transitions: n.transitions,
2623
- class: o.classes.boundingBox,
2623
+ class: a.classes.boundingBox,
2624
2624
  handlers: n.handlers,
2625
2625
  "handlers-component": n.handlersComponent,
2626
2626
  "handlers-classes": n.handlersClasses,
@@ -2630,22 +2630,22 @@ gn.render = function(e, t, n, r, a, o) {
2630
2630
  "lines-classes": n.linesClasses,
2631
2631
  "lines-wrappers-classes": n.linesWrappersClasses,
2632
2632
  resizable: n.resizable,
2633
- onResize: o.onResize,
2634
- onResizeEnd: o.onResizeEnd
2633
+ onResize: a.onResize,
2634
+ onResizeEnd: a.onResizeEnd
2635
2635
  }, {
2636
- default: i((function() {
2637
- return [h(u, {
2636
+ default: c((function() {
2637
+ return [k(u, {
2638
2638
  movable: n.movable,
2639
- onMove: o.onMove,
2640
- onMoveEnd: o.onMoveEnd
2639
+ onMove: a.onMove,
2640
+ onMoveEnd: a.onMoveEnd
2641
2641
  }, {
2642
- default: i((function() {
2643
- return [h(l, {
2642
+ default: c((function() {
2643
+ return [k(l, {
2644
2644
  image: n.image,
2645
2645
  coordinates: n.coordinates,
2646
2646
  width: n.stencilCoordinates.width,
2647
2647
  height: n.stencilCoordinates.height,
2648
- class: o.classes.preview,
2648
+ class: a.classes.preview,
2649
2649
  transitions: n.transitions
2650
2650
  }, null, 8, [
2651
2651
  "image",
@@ -2808,16 +2808,16 @@ var _n = U("vue-circle-stencil"), vn = {
2808
2808
  "move-end"
2809
2809
  ]
2810
2810
  };
2811
- vn.render = function(e, t, n, r, a, o) {
2811
+ vn.render = function(e, t, n, r, i, a) {
2812
2812
  var l = s("stencil-preview"), u = s("draggable-area"), d = s("bounding-box");
2813
- return c(), x("div", {
2814
- class: o.classes.stencil,
2815
- style: o.style
2816
- }, [h(d, {
2813
+ return o(), v("div", {
2814
+ class: a.classes.stencil,
2815
+ style: a.style
2816
+ }, [k(d, {
2817
2817
  width: n.stencilCoordinates.width,
2818
2818
  height: n.stencilCoordinates.height,
2819
2819
  transitions: n.transitions,
2820
- class: o.classes.boundingBox,
2820
+ class: a.classes.boundingBox,
2821
2821
  handlers: n.handlers,
2822
2822
  "handlers-component": n.handlersComponent,
2823
2823
  "handlers-classes": n.handlersClasses,
@@ -2827,22 +2827,22 @@ vn.render = function(e, t, n, r, a, o) {
2827
2827
  "lines-classes": n.linesClasses,
2828
2828
  "lines-wrappers-classes": n.linesWrappersClasses,
2829
2829
  resizable: n.resizable,
2830
- onResize: o.onResize,
2831
- onResizeEnd: o.onResizeEnd
2830
+ onResize: a.onResize,
2831
+ onResizeEnd: a.onResizeEnd
2832
2832
  }, {
2833
- default: i((function() {
2834
- return [h(u, {
2833
+ default: c((function() {
2834
+ return [k(u, {
2835
2835
  movable: n.movable,
2836
- onMove: o.onMove,
2837
- onMoveEnd: o.onMoveEnd
2836
+ onMove: a.onMove,
2837
+ onMoveEnd: a.onMoveEnd
2838
2838
  }, {
2839
- default: i((function() {
2840
- return [h(l, {
2839
+ default: c((function() {
2840
+ return [k(l, {
2841
2841
  image: n.image,
2842
2842
  coordinates: n.coordinates,
2843
2843
  width: n.stencilCoordinates.width,
2844
2844
  height: n.stencilCoordinates.height,
2845
- class: o.classes.preview,
2845
+ class: a.classes.preview,
2846
2846
  transitions: n.transitions
2847
2847
  }, null, 8, [
2848
2848
  "image",
@@ -3997,54 +3997,54 @@ var yn = ["transitions"], bn = U("vue-advanced-cropper"), xn = {
3997
3997
  ref: "sourceCanvas",
3998
3998
  style: { display: "none" }
3999
3999
  };
4000
- xn.render = function(e, t, n, r, a, o) {
4001
- return c(), x("div", {
4000
+ xn.render = function(e, t, r, i, a, s) {
4001
+ return o(), v("div", {
4002
4002
  ref: "cropper",
4003
- class: o.classes.cropper
4004
- }, [h("div", {
4003
+ class: s.classes.cropper
4004
+ }, [k("div", {
4005
4005
  ref: "stretcher",
4006
- class: o.classes.stretcher
4007
- }, null, 2), h("div", {
4008
- class: o.classes.boundaries,
4009
- style: o.boundariesStyle
4010
- }, [(c(), x(u(n.backgroundWrapperComponent), {
4011
- class: o.classes.cropperWrapper,
4012
- "wheel-resize": o.settings.resizeImage.wheel,
4013
- "touch-resize": o.settings.resizeImage.touch,
4014
- "touch-move": o.settings.moveImage.touch,
4015
- "mouse-move": o.settings.moveImage.mouse,
4016
- onMove: o.onManipulateImage,
4017
- onResize: o.onManipulateImage
4006
+ class: s.classes.stretcher
4007
+ }, null, 2), k("div", {
4008
+ class: s.classes.boundaries,
4009
+ style: s.boundariesStyle
4010
+ }, [(o(), v(A(r.backgroundWrapperComponent), {
4011
+ class: s.classes.cropperWrapper,
4012
+ "wheel-resize": s.settings.resizeImage.wheel,
4013
+ "touch-resize": s.settings.resizeImage.touch,
4014
+ "touch-move": s.settings.moveImage.touch,
4015
+ "mouse-move": s.settings.moveImage.mouse,
4016
+ onMove: s.onManipulateImage,
4017
+ onResize: s.onManipulateImage
4018
4018
  }, {
4019
- default: i((function() {
4019
+ default: c((function() {
4020
4020
  return [
4021
- h("div", {
4022
- class: o.classes.background,
4023
- style: o.boundariesStyle
4021
+ k("div", {
4022
+ class: s.classes.background,
4023
+ style: s.boundariesStyle
4024
4024
  }, null, 6),
4025
- h("div", { class: o.classes.imageWrapper }, [h("img", {
4025
+ k("div", { class: s.classes.imageWrapper }, [k("img", {
4026
4026
  ref: "image",
4027
4027
  crossorigin: a.imageAttributes.crossOrigin,
4028
4028
  src: a.imageAttributes.src,
4029
- class: o.classes.image,
4030
- style: o.imageStyle,
4031
- onMousedown: t[1] ||= k((function() {}), ["prevent"])
4029
+ class: s.classes.image,
4030
+ style: s.imageStyle,
4031
+ onMousedown: t[1] ||= m((function() {}), ["prevent"])
4032
4032
  }, null, 46, ["crossorigin", "src"])], 2),
4033
- h("div", {
4034
- class: o.classes.foreground,
4035
- style: o.boundariesStyle
4033
+ k("div", {
4034
+ class: s.classes.foreground,
4035
+ style: s.boundariesStyle
4036
4036
  }, null, 6),
4037
- f((c(), x(u(n.stencilComponent), l({
4037
+ n((o(), v(A(r.stencilComponent), b({
4038
4038
  ref: "stencil",
4039
- image: o.image,
4039
+ image: s.image,
4040
4040
  coordinates: a.coordinates,
4041
- "stencil-coordinates": o.stencilCoordinates,
4042
- transitions: o.transitionsOptions
4043
- }, n.stencilProps, {
4044
- onResize: o.onResize,
4045
- onResizeEnd: o.onResizeEnd,
4046
- onMove: o.onMove,
4047
- onMoveEnd: o.onMoveEnd
4041
+ "stencil-coordinates": s.stencilCoordinates,
4042
+ transitions: s.transitionsOptions
4043
+ }, r.stencilProps, {
4044
+ onResize: s.onResize,
4045
+ onResizeEnd: s.onResizeEnd,
4046
+ onMove: s.onMove,
4047
+ onMoveEnd: s.onMoveEnd
4048
4048
  }), null, 16, [
4049
4049
  "image",
4050
4050
  "coordinates",
@@ -4054,9 +4054,9 @@ xn.render = function(e, t, n, r, a, o) {
4054
4054
  "onResizeEnd",
4055
4055
  "onMove",
4056
4056
  "onMoveEnd"
4057
- ])), [[g, a.imageLoaded]]),
4058
- n.canvas ? (c(), x("canvas", Sn, null, 512)) : b("", !0),
4059
- n.canvas ? (c(), x("canvas", Cn, null, 512)) : b("", !0)
4057
+ ])), [[x, a.imageLoaded]]),
4058
+ r.canvas ? (o(), v("canvas", Sn, null, 512)) : u("", !0),
4059
+ r.canvas ? (o(), v("canvas", Cn, null, 512)) : u("", !0)
4060
4060
  ];
4061
4061
  })),
4062
4062
  _: 1
@@ -4122,22 +4122,22 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4122
4122
  }, $n = {
4123
4123
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
4124
4124
  style: { color: "var(--tpl-text-muted)" }
4125
- }, er = ["placeholder"], tr = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, nr = ["disabled"], rr = /* @__PURE__ */ ue(/* @__PURE__ */ d({
4125
+ }, er = ["placeholder"], tr = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, nr = ["disabled"], rr = /* @__PURE__ */ oe(/* @__PURE__ */ e({
4126
4126
  __name: "MediaEditModal",
4127
4127
  props: {
4128
4128
  visible: { type: Boolean },
4129
4129
  item: {}
4130
4130
  },
4131
4131
  emits: ["save", "close"],
4132
- setup(a, { emit: o }) {
4133
- let s = a, l = o, { t: u } = z(), d = n("tplUiTheme"), g = u.mediaLibrary, { isImageMimeType: S } = Ee(), j = e(""), M = e(""), ee = e(null), N = e("free"), P = e(void 0), te = e(void 0), F = e(""), I = e(""), ne = e(void 0), L = e(null), re = e(!1), R = e(!1), ie = e(!1), ae = E(() => s.item ? [
4132
+ setup(e, { emit: a }) {
4133
+ let s = e, l = a, { t: b } = z(), x = t("tplUiTheme"), E = b.mediaLibrary, { isImageMimeType: A } = Ee(), j = T(""), M = T(""), N = T(null), P = T("free"), ee = T(void 0), te = T(void 0), ne = T(""), F = T(""), I = T(void 0), L = T(null), re = T(!1), R = T(!1), ie = T(!1), ae = S(() => s.item ? [
4134
4134
  "image/jpeg",
4135
4135
  "image/png",
4136
4136
  "image/webp",
4137
4137
  "image/gif"
4138
- ].includes(s.item.mime_type) : !1), oe = E(() => N.value === "original" ? ne.value : De[N.value]), se = E(() => L.value ? je(L.value.width, L.value.height, P.value, te.value) : null);
4139
- t(() => s.visible, (e) => {
4140
- e && s.item && (j.value = s.item.filename, M.value = s.item.alt_text || "", N.value = "free", P.value = void 0, te.value = void 0, F.value = "", I.value = "", ne.value = void 0, L.value = null, re.value = !1, ie.value = !1, s.item.width && s.item.height && (ne.value = s.item.width / s.item.height));
4138
+ ].includes(s.item.mime_type) : !1), oe = S(() => P.value === "original" ? I.value : De[P.value]), se = S(() => L.value ? je(L.value.width, L.value.height, ee.value, te.value) : null);
4139
+ r(() => s.visible, (e) => {
4140
+ e && s.item && (j.value = s.item.filename, M.value = s.item.alt_text || "", P.value = "free", ee.value = void 0, te.value = void 0, ne.value = "", F.value = "", I.value = void 0, L.value = null, re.value = !1, ie.value = !1, s.item.width && s.item.height && (I.value = s.item.width / s.item.height));
4141
4141
  });
4142
4142
  function ce(e) {
4143
4143
  e.coordinates && (L.value = {
@@ -4146,26 +4146,26 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4146
4146
  }, ie.value = !0);
4147
4147
  }
4148
4148
  function le() {
4149
- re.value = !0, !ne.value && s.item?.width && s.item?.height && (ne.value = s.item.width / s.item.height);
4149
+ re.value = !0, !I.value && s.item?.width && s.item?.height && (I.value = s.item.width / s.item.height);
4150
4150
  }
4151
4151
  function ue(e) {
4152
4152
  let t = e.target.value;
4153
- F.value = t, P.value = t && parseInt(t, 10) || void 0;
4153
+ ne.value = t, ee.value = t && parseInt(t, 10) || void 0;
4154
4154
  }
4155
4155
  function de(e) {
4156
4156
  let t = e.target.value;
4157
- I.value = t, te.value = t && parseInt(t, 10) || void 0;
4157
+ F.value = t, te.value = t && parseInt(t, 10) || void 0;
4158
4158
  }
4159
4159
  async function fe() {
4160
4160
  let e = j.value.trim();
4161
4161
  if (!e || !s.item || R.value) return;
4162
- let t = S(s.item.mime_type), n;
4163
- if (ae.value && ee.value && ie.value) {
4162
+ let t = A(s.item.mime_type), n;
4163
+ if (ae.value && N.value && ie.value) {
4164
4164
  R.value = !0;
4165
4165
  try {
4166
- let { canvas: e } = ee.value.getResult();
4166
+ let { canvas: e } = N.value.getResult();
4167
4167
  if (e) {
4168
- let t = ke(e, P.value, te.value), r = Oe(s.item.mime_type);
4168
+ let t = ke(e, ee.value, te.value), r = Oe(s.item.mime_type);
4169
4169
  n = { file: await Ae(t, s.item.filename, r) };
4170
4170
  }
4171
4171
  } catch {
@@ -4179,7 +4179,7 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4179
4179
  function pe(e) {
4180
4180
  e.key === "Enter" && !R.value && (e.preventDefault(), fe()), e.key === "Escape" && l("close");
4181
4181
  }
4182
- return (e, t) => (c(), x(y, { to: "body" }, [h(T, {
4182
+ return (t, r) => (o(), v(w, { to: "body" }, [k(C, {
4183
4183
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
4184
4184
  "enter-from-class": "tpl:opacity-0",
4185
4185
  "enter-to-class": "tpl:opacity-100",
@@ -4187,48 +4187,48 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4187
4187
  "leave-from-class": "tpl:opacity-100",
4188
4188
  "leave-to-class": "tpl:opacity-0"
4189
4189
  }, {
4190
- default: i(() => [a.visible && a.item ? (c(), p("div", {
4190
+ default: c(() => [e.visible && e.item ? (o(), O("div", {
4191
4191
  key: 0,
4192
- "data-tpl-theme": m(d),
4192
+ "data-tpl-theme": p(x),
4193
4193
  class: "tpl tpl:fixed tpl:inset-0 tpl:z-[10000] tpl:flex tpl:items-center tpl:justify-center",
4194
4194
  style: { "background-color": "var(--tpl-overlay)" },
4195
- onClick: t[3] ||= k((e) => l("close"), ["self"]),
4195
+ onClick: r[3] ||= m((e) => l("close"), ["self"]),
4196
4196
  onKeydown: pe
4197
- }, [w("div", {
4198
- class: O(["tpl:mx-4 tpl:flex tpl:max-h-[90vh] tpl:w-full tpl:flex-col tpl:overflow-hidden tpl:rounded-lg tpl:shadow-xl", ae.value ? "tpl:max-w-2xl" : "tpl:max-w-sm"]),
4197
+ }, [y("div", {
4198
+ class: D(["tpl:mx-4 tpl:flex tpl:max-h-[90vh] tpl:w-full tpl:flex-col tpl:overflow-hidden tpl:rounded-lg tpl:shadow-xl", ae.value ? "tpl:max-w-2xl" : "tpl:max-w-sm"]),
4199
4199
  style: { "background-color": "var(--tpl-bg-elevated)" }
4200
4200
  }, [
4201
- w("div", Tn, [w("h3", En, C(m(u).mediaLibrary.editFile), 1)]),
4202
- w("div", Dn, [
4203
- ae.value ? (c(), p("div", On, [w("div", kn, [h(m(xn), {
4201
+ y("div", Tn, [y("h3", En, _(p(b).mediaLibrary.editFile), 1)]),
4202
+ y("div", Dn, [
4203
+ ae.value ? (o(), O("div", On, [y("div", kn, [k(p(xn), {
4204
4204
  ref_key: "cropperRef",
4205
- ref: ee,
4206
- src: a.item.url,
4205
+ ref: N,
4206
+ src: e.item.url,
4207
4207
  "stencil-props": { aspectRatio: oe.value },
4208
4208
  class: "tpl:h-full tpl:w-full",
4209
4209
  "background-class": "tpl-cropper-background",
4210
4210
  onChange: ce,
4211
4211
  onReady: le
4212
- }, null, 8, ["src", "stencil-props"])]), w("div", An, [
4213
- w("div", null, [w("label", jn, C(m(u).mediaLibrary.cropAspectRatio), 1), w("div", Mn, [(c(), p(v, null, r([
4212
+ }, null, 8, ["src", "stencil-props"])]), y("div", An, [
4213
+ y("div", null, [y("label", jn, _(p(b).mediaLibrary.cropAspectRatio), 1), y("div", Mn, [(o(), O(g, null, i([
4214
4214
  "free",
4215
4215
  "square",
4216
4216
  "landscape43",
4217
4217
  "landscape169",
4218
4218
  "original"
4219
- ], (e) => w("button", {
4219
+ ], (e) => y("button", {
4220
4220
  key: e,
4221
4221
  type: "button",
4222
4222
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
4223
- style: _({
4224
- borderColor: N.value === e ? "var(--tpl-primary)" : "var(--tpl-border)",
4225
- backgroundColor: N.value === e ? "var(--tpl-primary-light)" : "var(--tpl-bg)",
4226
- color: N.value === e ? "var(--tpl-primary)" : "var(--tpl-text)"
4223
+ style: h({
4224
+ borderColor: P.value === e ? "var(--tpl-primary)" : "var(--tpl-border)",
4225
+ backgroundColor: P.value === e ? "var(--tpl-primary-light)" : "var(--tpl-bg)",
4226
+ color: P.value === e ? "var(--tpl-primary)" : "var(--tpl-text)"
4227
4227
  }),
4228
- onClick: (t) => N.value = e
4229
- }, C(m(g)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13, Nn)), 64))])]),
4230
- w("div", Pn, [w("div", Fn, [w("label", In, [A(C(m(u).mediaLibrary.cropMaxWidth) + " ", 1), w("span", Ln, C(m(u).mediaLibrary.cropOptional), 1)]), w("div", Rn, [w("input", {
4231
- value: F.value,
4228
+ onClick: (t) => P.value = e
4229
+ }, _(p(E)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13, Nn)), 64))])]),
4230
+ y("div", Pn, [y("div", Fn, [y("label", In, [d(_(p(b).mediaLibrary.cropMaxWidth) + " ", 1), y("span", Ln, _(p(b).mediaLibrary.cropOptional), 1)]), y("div", Rn, [y("input", {
4231
+ value: ne.value,
4232
4232
  type: "number",
4233
4233
  min: "1",
4234
4234
  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",
@@ -4239,8 +4239,8 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4239
4239
  },
4240
4240
  placeholder: L.value?.width?.toString() || "",
4241
4241
  onInput: ue
4242
- }, null, 40, zn), w("span", Bn, C(m(u).mediaLibrary.cropPixels), 1)])]), w("div", Vn, [w("label", Hn, [A(C(m(u).mediaLibrary.cropMaxHeight) + " ", 1), w("span", Un, C(m(u).mediaLibrary.cropOptional), 1)]), w("div", Wn, [w("input", {
4243
- value: I.value,
4242
+ }, null, 40, zn), y("span", Bn, _(p(b).mediaLibrary.cropPixels), 1)])]), y("div", Vn, [y("label", Hn, [d(_(p(b).mediaLibrary.cropMaxHeight) + " ", 1), y("span", Un, _(p(b).mediaLibrary.cropOptional), 1)]), y("div", Wn, [y("input", {
4243
+ value: F.value,
4244
4244
  type: "number",
4245
4245
  min: "1",
4246
4246
  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",
@@ -4251,11 +4251,11 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4251
4251
  },
4252
4252
  placeholder: L.value?.height?.toString() || "",
4253
4253
  onInput: de
4254
- }, null, 40, Gn), w("span", Kn, C(m(u).mediaLibrary.cropPixels), 1)])])]),
4255
- se.value ? (c(), p("div", qn, [w("span", null, C(m(u).mediaLibrary.cropOutputSize) + ": ", 1), w("span", Jn, C(se.value.width) + " x " + C(se.value.height) + " " + C(m(u).mediaLibrary.cropPixels), 1)])) : b("", !0)
4256
- ])])) : b("", !0),
4257
- w("div", Yn, [w("label", Xn, C(m(u).mediaLibrary.fileName), 1), f(w("input", {
4258
- "onUpdate:modelValue": t[0] ||= (e) => j.value = e,
4254
+ }, null, 40, Gn), y("span", Kn, _(p(b).mediaLibrary.cropPixels), 1)])])]),
4255
+ se.value ? (o(), O("div", qn, [y("span", null, _(p(b).mediaLibrary.cropOutputSize) + ": ", 1), y("span", Jn, _(se.value.width) + " x " + _(se.value.height) + " " + _(p(b).mediaLibrary.cropPixels), 1)])) : u("", !0)
4256
+ ])])) : u("", !0),
4257
+ y("div", Yn, [y("label", Xn, _(p(b).mediaLibrary.fileName), 1), n(y("input", {
4258
+ "onUpdate:modelValue": r[0] ||= (e) => j.value = e,
4259
4259
  type: "text",
4260
4260
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
4261
4261
  style: {
@@ -4264,9 +4264,9 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4264
4264
  color: "var(--tpl-text)"
4265
4265
  },
4266
4266
  autofocus: !ae.value
4267
- }, null, 8, Zn), [[D, j.value]])]),
4268
- m(S)(a.item.mime_type) ? (c(), p("div", Qn, [w("label", $n, C(m(u).mediaLibrary.altText), 1), f(w("input", {
4269
- "onUpdate:modelValue": t[1] ||= (e) => M.value = e,
4267
+ }, null, 8, Zn), [[f, j.value]])]),
4268
+ p(A)(e.item.mime_type) ? (o(), O("div", Qn, [y("label", $n, _(p(b).mediaLibrary.altText), 1), n(y("input", {
4269
+ "onUpdate:modelValue": r[1] ||= (e) => M.value = e,
4270
4270
  type: "text",
4271
4271
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
4272
4272
  style: {
@@ -4274,24 +4274,24 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4274
4274
  "background-color": "var(--tpl-bg)",
4275
4275
  color: "var(--tpl-text)"
4276
4276
  },
4277
- placeholder: m(u).mediaLibrary.altTextPlaceholder
4278
- }, null, 8, er), [[D, M.value]])])) : b("", !0)
4277
+ placeholder: p(b).mediaLibrary.altTextPlaceholder
4278
+ }, null, 8, er), [[f, M.value]])])) : u("", !0)
4279
4279
  ]),
4280
- w("div", tr, [w("button", {
4280
+ y("div", tr, [y("button", {
4281
4281
  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",
4282
4282
  style: {
4283
4283
  "border-color": "var(--tpl-border)",
4284
4284
  color: "var(--tpl-text)",
4285
4285
  "background-color": "var(--tpl-bg)"
4286
4286
  },
4287
- onClick: t[2] ||= (e) => l("close")
4288
- }, C(m(u).mediaLibrary.cancel), 1), w("button", {
4287
+ onClick: r[2] ||= (e) => l("close")
4288
+ }, _(p(b).mediaLibrary.cancel), 1), y("button", {
4289
4289
  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",
4290
4290
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
4291
4291
  disabled: R.value,
4292
4292
  onClick: fe
4293
- }, C(R.value ? m(u).mediaLibrary.saving : m(u).mediaLibrary.saveChanges), 9, nr)])
4294
- ], 2)], 40, wn)) : b("", !0)]),
4293
+ }, _(R.value ? p(b).mediaLibrary.saving : p(b).mediaLibrary.saveChanges), 9, nr)])
4294
+ ], 2)], 40, wn)) : u("", !0)]),
4295
4295
  _: 1
4296
4296
  })]));
4297
4297
  }
@@ -4304,7 +4304,7 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4304
4304
  }, or = {
4305
4305
  key: 3,
4306
4306
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:opacity-0 tpl:transition-opacity tpl:group-hover:opacity-100"
4307
- }, sr = ["title"], cr = ["title"], lr = { key: 0 }, ur = ["placeholder"], dr = 5, fr = /* @__PURE__ */ d({
4307
+ }, sr = ["title"], cr = ["title"], lr = { key: 0 }, ur = ["placeholder"], dr = 5, fr = /* @__PURE__ */ e({
4308
4308
  __name: "MediaFolderTreeNode",
4309
4309
  props: {
4310
4310
  folder: {},
@@ -4317,64 +4317,64 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4317
4317
  "renameFolder",
4318
4318
  "deleteFolder"
4319
4319
  ],
4320
- setup(t, { emit: n }) {
4321
- let i = t, a = n, { t: o } = z(), l = e(!1), u = e(!1), d = e(""), g = e(!1), y = e(""), T = E(() => (i.folder.children?.length ?? 0) > 0), A = E(() => i.depth < dr - 1), j = E(() => i.currentFolderId === i.folder.id), ee = E(() => !i.currentFolderId || !i.folder.children ? !1 : P(i.folder.children, i.currentFolderId)), N = E(() => l.value || ee.value);
4320
+ setup(e, { emit: t }) {
4321
+ let r = e, a = t, { t: c } = z(), l = T(!1), d = T(!1), b = T(""), x = T(!1), C = T(""), w = S(() => (r.folder.children?.length ?? 0) > 0), A = S(() => r.depth < dr - 1), j = S(() => r.currentFolderId === r.folder.id), M = S(() => !r.currentFolderId || !r.folder.children ? !1 : P(r.folder.children, r.currentFolderId)), N = S(() => l.value || M.value);
4322
4322
  function P(e, t) {
4323
4323
  for (let n of e) if (n.id === t || n.children && P(n.children, t)) return !0;
4324
4324
  return !1;
4325
4325
  }
4326
- function te() {
4326
+ function ee() {
4327
4327
  l.value = !l.value;
4328
4328
  }
4329
- function F() {
4330
- u.value = !0, d.value = i.folder.name;
4329
+ function ne() {
4330
+ d.value = !0, b.value = r.folder.name;
4331
4331
  }
4332
4332
  function I() {
4333
- let e = d.value.trim();
4334
- e && e !== i.folder.name && a("renameFolder", i.folder.id, e), u.value = !1, d.value = "";
4335
- }
4336
- function ne() {
4337
- u.value = !1, d.value = "";
4333
+ let e = b.value.trim();
4334
+ e && e !== r.folder.name && a("renameFolder", r.folder.id, e), d.value = !1, b.value = "";
4338
4335
  }
4339
4336
  function L() {
4340
- g.value = !0, y.value = "", l.value = !0;
4341
- }
4342
- function re() {
4343
- y.value.trim() && a("createFolder", y.value.trim(), i.folder.id), g.value = !1, y.value = "";
4337
+ d.value = !1, b.value = "";
4344
4338
  }
4345
4339
  function R() {
4346
- g.value = !1, y.value = "";
4340
+ x.value = !0, C.value = "", l.value = !0;
4347
4341
  }
4348
- return (e, n) => {
4349
- let i = s("MediaFolderTreeNode", !0);
4350
- return c(), p("div", null, [w("div", {
4342
+ function ie() {
4343
+ C.value.trim() && a("createFolder", C.value.trim(), r.folder.id), x.value = !1, C.value = "";
4344
+ }
4345
+ function ae() {
4346
+ x.value = !1, C.value = "";
4347
+ }
4348
+ return (t, r) => {
4349
+ let l = s("MediaFolderTreeNode", !0);
4350
+ return o(), O("div", null, [y("div", {
4351
4351
  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",
4352
- style: _({
4353
- paddingLeft: `${t.depth * 16 + 8}px`,
4352
+ style: h({
4353
+ paddingLeft: `${e.depth * 16 + 8}px`,
4354
4354
  backgroundColor: j.value ? "var(--tpl-bg-active)" : "transparent",
4355
4355
  color: j.value ? "var(--tpl-primary)" : "var(--tpl-text)"
4356
4356
  })
4357
4357
  }, [
4358
- T.value || g.value ? (c(), p("button", {
4358
+ w.value || x.value ? (o(), O("button", {
4359
4359
  key: 0,
4360
4360
  class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4361
- onClick: k(te, ["stop"])
4362
- }, [h(m(M), {
4363
- class: O(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": N.value }]),
4361
+ onClick: m(ee, ["stop"])
4362
+ }, [k(p(re), {
4363
+ class: D(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": N.value }]),
4364
4364
  size: 10,
4365
4365
  "stroke-width": 2
4366
- }, null, 8, ["class"])])) : (c(), p("span", ir)),
4367
- w("button", {
4366
+ }, null, 8, ["class"])])) : (o(), O("span", ir)),
4367
+ y("button", {
4368
4368
  class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
4369
- onClick: n[0] ||= (e) => a("navigate", t.folder.id)
4370
- }, [h(m(me), {
4369
+ onClick: r[0] ||= (t) => a("navigate", e.folder.id)
4370
+ }, [k(p(de), {
4371
4371
  class: "tpl:shrink-0",
4372
4372
  size: 14,
4373
4373
  "stroke-width": 1.5
4374
- }), u.value ? b("", !0) : (c(), p("span", ar, C(t.folder.name), 1))]),
4375
- u.value ? f((c(), p("input", {
4374
+ }), d.value ? u("", !0) : (o(), O("span", ar, _(e.folder.name), 1))]),
4375
+ d.value ? n((o(), O("input", {
4376
4376
  key: 2,
4377
- "onUpdate:modelValue": n[1] ||= (e) => d.value = e,
4377
+ "onUpdate:modelValue": r[1] ||= (e) => b.value = e,
4378
4378
  type: "text",
4379
4379
  class: "tpl:min-w-0 tpl:flex-1 tpl:rounded tpl:border tpl:px-1.5 tpl:py-0.5 tpl:text-xs tpl:outline-none",
4380
4380
  style: {
@@ -4383,56 +4383,56 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4383
4383
  color: "var(--tpl-text)"
4384
4384
  },
4385
4385
  autofocus: "",
4386
- onKeydown: [S(I, ["enter"]), S(ne, ["escape"])],
4386
+ onKeydown: [E(I, ["enter"]), E(L, ["escape"])],
4387
4387
  onBlur: I,
4388
- onClick: n[2] ||= k(() => {}, ["stop"])
4389
- }, null, 544)), [[D, d.value]]) : b("", !0),
4390
- u.value ? b("", !0) : (c(), p("span", or, [
4391
- A.value ? (c(), p("button", {
4388
+ onClick: r[2] ||= m(() => {}, ["stop"])
4389
+ }, null, 544)), [[f, b.value]]) : u("", !0),
4390
+ d.value ? u("", !0) : (o(), O("span", or, [
4391
+ A.value ? (o(), O("button", {
4392
4392
  key: 0,
4393
4393
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4394
- title: m(o).mediaLibrary.addSubfolder,
4395
- onClick: k(L, ["stop"])
4396
- }, [h(m(pe), {
4394
+ title: p(c).mediaLibrary.addSubfolder,
4395
+ onClick: m(R, ["stop"])
4396
+ }, [k(p(me), {
4397
4397
  size: 12,
4398
4398
  "stroke-width": 2
4399
- })], 8, sr)) : b("", !0),
4400
- w("button", {
4399
+ })], 8, sr)) : u("", !0),
4400
+ y("button", {
4401
4401
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4402
- title: m(o).mediaLibrary.renameFolder,
4403
- onClick: k(F, ["stop"])
4404
- }, [h(m(ae), {
4402
+ title: p(c).mediaLibrary.renameFolder,
4403
+ onClick: m(ne, ["stop"])
4404
+ }, [k(p(F), {
4405
4405
  size: 12,
4406
4406
  "stroke-width": 2
4407
4407
  })], 8, cr),
4408
- w("button", {
4408
+ y("button", {
4409
4409
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4410
- onClick: n[3] ||= k((e) => a("deleteFolder", t.folder.id), ["stop"])
4411
- }, [h(m(ie), {
4410
+ onClick: r[3] ||= m((t) => a("deleteFolder", e.folder.id), ["stop"])
4411
+ }, [k(p(te), {
4412
4412
  size: 12,
4413
4413
  "stroke-width": 2,
4414
4414
  style: { color: "var(--tpl-danger)" }
4415
4415
  })])
4416
4416
  ]))
4417
- ], 4), N.value ? (c(), p("div", lr, [(c(!0), p(v, null, r(t.folder.children, (e) => (c(), x(i, {
4418
- key: e.id,
4419
- folder: e,
4420
- "current-folder-id": t.currentFolderId,
4421
- depth: t.depth + 1,
4422
- onNavigate: n[4] ||= (e) => a("navigate", e),
4423
- onCreateFolder: n[5] ||= (e, t) => a("createFolder", e, t),
4424
- onRenameFolder: n[6] ||= (e, t) => a("renameFolder", e, t),
4425
- onDeleteFolder: n[7] ||= (e) => a("deleteFolder", e)
4417
+ ], 4), N.value ? (o(), O("div", lr, [(o(!0), O(g, null, i(e.folder.children, (t) => (o(), v(l, {
4418
+ key: t.id,
4419
+ folder: t,
4420
+ "current-folder-id": e.currentFolderId,
4421
+ depth: e.depth + 1,
4422
+ onNavigate: r[4] ||= (e) => a("navigate", e),
4423
+ onCreateFolder: r[5] ||= (e, t) => a("createFolder", e, t),
4424
+ onRenameFolder: r[6] ||= (e, t) => a("renameFolder", e, t),
4425
+ onDeleteFolder: r[7] ||= (e) => a("deleteFolder", e)
4426
4426
  }, null, 8, [
4427
4427
  "folder",
4428
4428
  "current-folder-id",
4429
4429
  "depth"
4430
- ]))), 128)), g.value ? (c(), p("div", {
4430
+ ]))), 128)), x.value ? (o(), O("div", {
4431
4431
  key: 0,
4432
- style: _({ paddingLeft: `${(t.depth + 1) * 16 + 8}px` }),
4432
+ style: h({ paddingLeft: `${(e.depth + 1) * 16 + 8}px` }),
4433
4433
  class: "tpl:py-1.5 tpl:pr-2"
4434
- }, [f(w("input", {
4435
- "onUpdate:modelValue": n[8] ||= (e) => y.value = e,
4434
+ }, [n(y("input", {
4435
+ "onUpdate:modelValue": r[8] ||= (e) => C.value = e,
4436
4436
  type: "text",
4437
4437
  class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
4438
4438
  style: {
@@ -4440,17 +4440,17 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4440
4440
  "background-color": "var(--tpl-bg)",
4441
4441
  color: "var(--tpl-text)"
4442
4442
  },
4443
- placeholder: m(o).mediaLibrary.subfolderName,
4443
+ placeholder: p(c).mediaLibrary.subfolderName,
4444
4444
  autofocus: "",
4445
- onKeydown: [S(re, ["enter"]), S(R, ["escape"])],
4446
- onBlur: re
4447
- }, null, 40, ur), [[D, y.value]])], 4)) : b("", !0)])) : b("", !0)]);
4445
+ onKeydown: [E(ie, ["enter"]), E(ae, ["escape"])],
4446
+ onBlur: ie
4447
+ }, null, 40, ur), [[f, C.value]])], 4)) : u("", !0)])) : u("", !0)]);
4448
4448
  };
4449
4449
  }
4450
4450
  }), pr = { class: "tpl:flex tpl:h-full tpl:flex-col tpl:overflow-y-auto" }, mr = {
4451
4451
  key: 0,
4452
4452
  class: "tpl:px-3 tpl:py-2"
4453
- }, hr = ["placeholder"], gr = /* @__PURE__ */ d({
4453
+ }, hr = ["placeholder"], gr = /* @__PURE__ */ e({
4454
4454
  __name: "MediaFolderTree",
4455
4455
  props: {
4456
4456
  folders: {},
@@ -4465,41 +4465,41 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4465
4465
  "deleteFolder",
4466
4466
  "showFrequentlyUsed"
4467
4467
  ],
4468
- setup(t, { emit: n }) {
4469
- let i = n, { t: a } = z(), o = e(!1), s = e("");
4468
+ setup(e, { emit: t }) {
4469
+ let r = t, { t: a } = z(), s = T(!1), c = T("");
4470
4470
  function l() {
4471
- o.value = !0, s.value = "";
4471
+ s.value = !0, c.value = "";
4472
4472
  }
4473
- function u() {
4474
- s.value.trim() && i("createFolder", s.value.trim()), o.value = !1, s.value = "";
4473
+ function m() {
4474
+ c.value.trim() && r("createFolder", c.value.trim()), s.value = !1, c.value = "";
4475
4475
  }
4476
- function d() {
4477
- o.value = !1, s.value = "";
4476
+ function b() {
4477
+ s.value = !1, c.value = "";
4478
4478
  }
4479
- return (e, n) => (c(), p("div", pr, [
4480
- w("button", {
4479
+ return (t, x) => (o(), O("div", pr, [
4480
+ y("button", {
4481
4481
  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:font-medium tpl:transition-all tpl:duration-150",
4482
- style: _({
4483
- backgroundColor: t.viewMode === "files" && t.currentFolderId === null ? "var(--tpl-bg-active)" : "transparent",
4484
- color: t.viewMode === "files" && t.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
4482
+ style: h({
4483
+ backgroundColor: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-bg-active)" : "transparent",
4484
+ color: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
4485
4485
  }),
4486
- onClick: n[0] ||= (e) => i("navigate", null)
4487
- }, [h(m(ye), {
4486
+ onClick: x[0] ||= (e) => r("navigate", null)
4487
+ }, [k(p(_e), {
4488
4488
  size: 14,
4489
4489
  "stroke-width": 1.5
4490
- }), A(" " + C(m(a).mediaLibrary.allFiles), 1)], 4),
4491
- (c(!0), p(v, null, r(t.folders, (e) => (c(), x(fr, {
4492
- key: e.id,
4493
- folder: e,
4494
- "current-folder-id": t.currentFolderId,
4490
+ }), d(" " + _(p(a).mediaLibrary.allFiles), 1)], 4),
4491
+ (o(!0), O(g, null, i(e.folders, (t) => (o(), v(fr, {
4492
+ key: t.id,
4493
+ folder: t,
4494
+ "current-folder-id": e.currentFolderId,
4495
4495
  depth: 0,
4496
- onNavigate: n[1] ||= (e) => i("navigate", e),
4497
- onCreateFolder: n[2] ||= (e, t) => i("createFolder", e, t),
4498
- onRenameFolder: n[3] ||= (e, t) => i("renameFolder", e, t),
4499
- onDeleteFolder: n[4] ||= (e) => i("deleteFolder", e)
4496
+ onNavigate: x[1] ||= (e) => r("navigate", e),
4497
+ onCreateFolder: x[2] ||= (e, t) => r("createFolder", e, t),
4498
+ onRenameFolder: x[3] ||= (e, t) => r("renameFolder", e, t),
4499
+ onDeleteFolder: x[4] ||= (e) => r("deleteFolder", e)
4500
4500
  }, null, 8, ["folder", "current-folder-id"]))), 128)),
4501
- o.value ? (c(), p("div", mr, [f(w("input", {
4502
- "onUpdate:modelValue": n[5] ||= (e) => s.value = e,
4501
+ s.value ? (o(), O("div", mr, [n(y("input", {
4502
+ "onUpdate:modelValue": x[5] ||= (e) => c.value = e,
4503
4503
  type: "text",
4504
4504
  class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
4505
4505
  style: {
@@ -4507,37 +4507,37 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4507
4507
  "background-color": "var(--tpl-bg)",
4508
4508
  color: "var(--tpl-text)"
4509
4509
  },
4510
- placeholder: m(a).mediaLibrary.folderName,
4510
+ placeholder: p(a).mediaLibrary.folderName,
4511
4511
  autofocus: "",
4512
- onKeydown: [S(u, ["enter"]), S(d, ["escape"])],
4513
- onBlur: u
4514
- }, null, 40, hr), [[D, s.value]])])) : b("", !0),
4515
- o.value ? b("", !0) : (c(), p("button", {
4512
+ onKeydown: [E(m, ["enter"]), E(b, ["escape"])],
4513
+ onBlur: m
4514
+ }, null, 40, hr), [[f, c.value]])])) : u("", !0),
4515
+ s.value ? u("", !0) : (o(), O("button", {
4516
4516
  key: 1,
4517
4517
  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",
4518
4518
  style: { color: "var(--tpl-text-muted)" },
4519
4519
  onClick: l
4520
- }, [h(m(pe), {
4520
+ }, [k(p(me), {
4521
4521
  size: 14,
4522
4522
  "stroke-width": 1.5
4523
- }), A(" " + C(m(a).mediaLibrary.newFolder), 1)])),
4524
- n[7] ||= w("div", { class: "tpl:flex-1" }, null, -1),
4525
- t.hasFrequentlyUsed ? (c(), p("button", {
4523
+ }), d(" " + _(p(a).mediaLibrary.newFolder), 1)])),
4524
+ x[7] ||= y("div", { class: "tpl:flex-1" }, null, -1),
4525
+ e.hasFrequentlyUsed ? (o(), O("button", {
4526
4526
  key: 2,
4527
4527
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:border-t tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
4528
- style: _({
4528
+ style: h({
4529
4529
  borderColor: "var(--tpl-border)",
4530
- backgroundColor: t.viewMode === "frequently-used" ? "var(--tpl-bg-active)" : "transparent",
4531
- color: t.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
4530
+ backgroundColor: e.viewMode === "frequently-used" ? "var(--tpl-bg-active)" : "transparent",
4531
+ color: e.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
4532
4532
  }),
4533
- onClick: n[6] ||= (e) => i("showFrequentlyUsed")
4534
- }, [h(m(ve), {
4533
+ onClick: x[6] ||= (e) => r("showFrequentlyUsed")
4534
+ }, [k(p(ve), {
4535
4535
  size: 14,
4536
4536
  "stroke-width": 1.5
4537
- }), A(" " + C(m(a).mediaLibrary.frequentlyUsed), 1)], 4)) : b("", !0)
4537
+ }), d(" " + _(p(a).mediaLibrary.frequentlyUsed), 1)], 4)) : u("", !0)
4538
4538
  ]));
4539
4539
  }
4540
- }), _r = { class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2" }, vr = /* @__PURE__ */ d({
4540
+ }), _r = { class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2" }, vr = /* @__PURE__ */ e({
4541
4541
  __name: "MediaFileIcon",
4542
4542
  props: { mimeType: {} },
4543
4543
  setup(e) {
@@ -4637,8 +4637,8 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4637
4637
  color: "#6b7280",
4638
4638
  bgColor: "#f9fafb",
4639
4639
  icon: "document"
4640
- }, i = E(() => n[t.mimeType] ?? r);
4641
- return (e, t) => (c(), p("div", _r, [i.value.icon === "document" ? (c(), p("svg", {
4640
+ }, i = S(() => n[t.mimeType] ?? r);
4641
+ return (e, t) => (o(), O("div", _r, [i.value.icon === "document" ? (o(), O("svg", {
4642
4642
  key: 0,
4643
4643
  width: "60",
4644
4644
  height: "60",
@@ -4646,23 +4646,23 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4646
4646
  fill: "none",
4647
4647
  stroke: "currentColor",
4648
4648
  "stroke-width": "1.5",
4649
- style: _({ color: i.value.color })
4649
+ style: h({ color: i.value.color })
4650
4650
  }, [...t[0] ||= [
4651
- w("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }, null, -1),
4652
- w("polyline", { points: "14 2 14 8 20 8" }, null, -1),
4653
- w("line", {
4651
+ y("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }, null, -1),
4652
+ y("polyline", { points: "14 2 14 8 20 8" }, null, -1),
4653
+ y("line", {
4654
4654
  x1: "8",
4655
4655
  y1: "13",
4656
4656
  x2: "16",
4657
4657
  y2: "13"
4658
4658
  }, null, -1),
4659
- w("line", {
4659
+ y("line", {
4660
4660
  x1: "8",
4661
4661
  y1: "17",
4662
4662
  x2: "12",
4663
4663
  y2: "17"
4664
4664
  }, null, -1)
4665
- ]], 4)) : i.value.icon === "video" ? (c(), p("svg", {
4665
+ ]], 4)) : i.value.icon === "video" ? (o(), O("svg", {
4666
4666
  key: 1,
4667
4667
  width: "40",
4668
4668
  height: "40",
@@ -4670,18 +4670,18 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4670
4670
  fill: "none",
4671
4671
  stroke: "currentColor",
4672
4672
  "stroke-width": "1.5",
4673
- style: _({ color: i.value.color })
4674
- }, [...t[1] ||= [w("rect", {
4673
+ style: h({ color: i.value.color })
4674
+ }, [...t[1] ||= [y("rect", {
4675
4675
  x: "2",
4676
4676
  y: "4",
4677
4677
  width: "20",
4678
4678
  height: "16",
4679
4679
  rx: "2"
4680
- }, null, -1), w("polygon", {
4680
+ }, null, -1), y("polygon", {
4681
4681
  points: "10,8 16,12 10,16",
4682
4682
  fill: "currentColor",
4683
4683
  stroke: "none"
4684
- }, null, -1)]], 4)) : (c(), p("svg", {
4684
+ }, null, -1)]], 4)) : (o(), O("svg", {
4685
4685
  key: 2,
4686
4686
  width: "40",
4687
4687
  height: "40",
@@ -4689,23 +4689,23 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4689
4689
  fill: "none",
4690
4690
  stroke: "currentColor",
4691
4691
  "stroke-width": "1.5",
4692
- style: _({ color: i.value.color })
4692
+ style: h({ color: i.value.color })
4693
4693
  }, [...t[2] ||= [
4694
- w("path", { d: "M9 18V5l12-2v13" }, null, -1),
4695
- w("circle", {
4694
+ y("path", { d: "M9 18V5l12-2v13" }, null, -1),
4695
+ y("circle", {
4696
4696
  cx: "6",
4697
4697
  cy: "18",
4698
4698
  r: "3"
4699
4699
  }, null, -1),
4700
- w("circle", {
4700
+ y("circle", {
4701
4701
  cx: "18",
4702
4702
  cy: "16",
4703
4703
  r: "3"
4704
4704
  }, null, -1)
4705
- ]], 4)), w("span", {
4705
+ ]], 4)), y("span", {
4706
4706
  class: "tpl:text-xs tpl:font-bold tpl:tracking-wider",
4707
- style: _({ color: i.value.color })
4708
- }, C(i.value.label), 5)]));
4707
+ style: h({ color: i.value.color })
4708
+ }, _(i.value.label), 5)]));
4709
4709
  }
4710
4710
  }), yr = { class: "tpl:p-4" }, br = {
4711
4711
  key: 1,
@@ -4748,7 +4748,7 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4748
4748
  }, Kr = {
4749
4749
  key: 4,
4750
4750
  class: "tpl:flex tpl:justify-center tpl:py-4"
4751
- }, qr = /* @__PURE__ */ ue(/* @__PURE__ */ d({
4751
+ }, qr = /* @__PURE__ */ oe(/* @__PURE__ */ e({
4752
4752
  __name: "MediaGrid",
4753
4753
  props: {
4754
4754
  items: {},
@@ -4765,133 +4765,133 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4765
4765
  "edit",
4766
4766
  "replace"
4767
4767
  ],
4768
- setup(t, { emit: n }) {
4769
- let i = t, a = n, { isAcceptedMimeType: o, isImageMimeType: s } = Ee();
4770
- function l(e) {
4771
- return !i.accept || i.accept.length === 0 ? !0 : o(e.mime_type, i.accept);
4768
+ setup(e, { emit: t }) {
4769
+ let n = e, r = t, { isAcceptedMimeType: a, isImageMimeType: s } = Ee();
4770
+ function c(e) {
4771
+ return !n.accept || n.accept.length === 0 ? !0 : a(e.mime_type, n.accept);
4772
4772
  }
4773
- function u(e) {
4774
- a("select", e);
4773
+ function l(e) {
4774
+ r("select", e);
4775
4775
  }
4776
- let { t: d } = z(), f = e(null);
4777
- R(f, ([{ isIntersecting: e }]) => {
4778
- e && i.hasMore && !i.isLoading && a("loadMore");
4776
+ let { t: f } = z(), b = T(null);
4777
+ I(b, ([{ isIntersecting: e }]) => {
4778
+ e && n.hasMore && !n.isLoading && r("loadMore");
4779
4779
  }, { threshold: .1 });
4780
- function g(e) {
4780
+ function x(e) {
4781
4781
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
4782
4782
  }
4783
- function y(e) {
4783
+ function S(e) {
4784
4784
  return new Date(e).toLocaleDateString(void 0, {
4785
4785
  year: "numeric",
4786
4786
  month: "short",
4787
4787
  day: "numeric"
4788
4788
  });
4789
4789
  }
4790
- return (e, n) => (c(), p("div", yr, [
4791
- t.isLoading && t.items.length === 0 ? (c(), p("div", {
4790
+ return (t, n) => (o(), O("div", yr, [
4791
+ e.isLoading && e.items.length === 0 ? (o(), O("div", {
4792
4792
  key: 0,
4793
- class: O(t.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
4794
- }, [(c(), p(v, null, r(8, (e) => w("div", {
4795
- key: e,
4796
- class: O(["tpl-pulse tpl:rounded-lg", t.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
4793
+ class: D(e.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
4794
+ }, [(o(), O(g, null, i(8, (t) => y("div", {
4795
+ key: t,
4796
+ class: D(["tpl-pulse tpl:rounded-lg", e.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
4797
4797
  style: { "background-color": "var(--tpl-bg-hover)" }
4798
- }, null, 2)), 64))], 2)) : t.items.length === 0 ? (c(), p("div", br, [h(m(ye), {
4798
+ }, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), O("div", br, [k(p(_e), {
4799
4799
  class: "tpl:mb-3",
4800
4800
  size: 40,
4801
4801
  "stroke-width": 1,
4802
4802
  style: { color: "var(--tpl-text-dim)" }
4803
- }), w("p", xr, C(m(d).mediaLibrary.noFiles), 1)])) : t.layout === "list" ? (c(), p("div", Pr, [(c(!0), p(v, null, r(t.items, (e) => (c(), p("div", {
4804
- key: e.id,
4805
- class: O(["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", [!l(e) && !t.selectedIds.has(e.id) ? "tpl:opacity-60" : ""]]),
4806
- style: _({ backgroundColor: t.selectedIds.has(e.id) ? "var(--tpl-bg-hover)" : "transparent" }),
4807
- onClick: (t) => u(e)
4803
+ }), y("p", xr, _(p(f).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (o(), O("div", Pr, [(o(!0), O(g, null, i(e.items, (t) => (o(), O("div", {
4804
+ key: t.id,
4805
+ class: D(["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", [!c(t) && !e.selectedIds.has(t.id) ? "tpl:opacity-60" : ""]]),
4806
+ style: h({ backgroundColor: e.selectedIds.has(t.id) ? "var(--tpl-bg-hover)" : "transparent" }),
4807
+ onClick: (e) => l(t)
4808
4808
  }, [
4809
- w("div", Ir, [m(s)(e.mime_type) ? (c(), p("img", {
4809
+ y("div", Ir, [p(s)(t.mime_type) ? (o(), O("img", {
4810
4810
  key: 0,
4811
- src: e.small_url || e.url,
4812
- alt: e.filename,
4811
+ src: t.small_url || t.url,
4812
+ alt: t.filename,
4813
4813
  class: "tpl:size-full tpl:object-cover",
4814
4814
  loading: "lazy"
4815
- }, null, 8, Lr)) : (c(), p("div", Rr, [h(vr, { "mime-type": e.mime_type }, null, 8, ["mime-type"])]))]),
4816
- w("div", zr, [w("p", Br, C(e.filename), 1), w("p", Vr, [A(C(g(e.size)) + " · " + C(y(e.created_at)) + " ", 1), m(s)(e.mime_type) && e.width && e.height ? (c(), p(v, { key: 0 }, [A(" · " + C(e.width) + "×" + C(e.height), 1)], 64)) : b("", !0)])]),
4817
- w("div", Hr, [w("button", {
4815
+ }, null, 8, Lr)) : (o(), O("div", Rr, [k(vr, { "mime-type": t.mime_type }, null, 8, ["mime-type"])]))]),
4816
+ y("div", zr, [y("p", Br, _(t.filename), 1), y("p", Vr, [d(_(x(t.size)) + " · " + _(S(t.created_at)) + " ", 1), p(s)(t.mime_type) && t.width && t.height ? (o(), O(g, { key: 0 }, [d(" · " + _(t.width) + "×" + _(t.height), 1)], 64)) : u("", !0)])]),
4817
+ y("div", Hr, [y("button", {
4818
4818
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
4819
4819
  style: { color: "var(--tpl-text-muted)" },
4820
- title: m(d).mediaLibrary.editFile,
4821
- onClick: k((t) => a("edit", e), ["stop"])
4822
- }, [h(m(ae), {
4820
+ title: p(f).mediaLibrary.editFile,
4821
+ onClick: m((e) => r("edit", t), ["stop"])
4822
+ }, [k(p(F), {
4823
4823
  size: 12,
4824
4824
  "stroke-width": 2
4825
- })], 8, Ur), w("button", {
4825
+ })], 8, Ur), y("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
- title: m(d).mediaLibrary.replaceFile,
4829
- onClick: k((t) => a("replace", e), ["stop"])
4830
- }, [h(m(F), {
4828
+ title: p(f).mediaLibrary.replaceFile,
4829
+ onClick: m((e) => r("replace", t), ["stop"])
4830
+ }, [k(p(ae), {
4831
4831
  size: 12,
4832
4832
  "stroke-width": 2
4833
4833
  })], 8, Wr)]),
4834
- t.selectedIds.has(e.id) ? (c(), p("div", Gr, [h(m(ee), {
4834
+ e.selectedIds.has(t.id) ? (o(), O("div", Gr, [k(p(M), {
4835
4835
  size: 12,
4836
4836
  "stroke-width": 3
4837
- })])) : b("", !0)
4838
- ], 14, Fr))), 128))])) : (c(), p("div", Sr, [(c(!0), p(v, null, r(t.items, (e) => (c(), p("div", {
4839
- key: e.id,
4840
- class: O(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
4837
+ })])) : u("", !0)
4838
+ ], 14, Fr))), 128))])) : (o(), O("div", Sr, [(o(!0), O(g, null, i(e.items, (t) => (o(), O("div", {
4839
+ key: t.id,
4840
+ class: D(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
4841
4841
  "tpl:cursor-pointer",
4842
- !l(e) && !t.selectedIds.has(e.id) ? "tpl:opacity-60" : "",
4843
- t.selectedIds.has(e.id) ? "tpl-media-item--selected" : ""
4842
+ !c(t) && !e.selectedIds.has(t.id) ? "tpl:opacity-60" : "",
4843
+ e.selectedIds.has(t.id) ? "tpl-media-item--selected" : ""
4844
4844
  ]]),
4845
- style: _({
4846
- borderColor: t.selectedIds.has(e.id) ? "var(--tpl-primary)" : "transparent",
4847
- backgroundColor: !l(e) && !t.selectedIds.has(e.id) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
4845
+ style: h({
4846
+ borderColor: e.selectedIds.has(t.id) ? "var(--tpl-primary)" : "transparent",
4847
+ backgroundColor: !c(t) && !e.selectedIds.has(t.id) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
4848
4848
  }),
4849
- onClick: (t) => u(e)
4849
+ onClick: (e) => l(t)
4850
4850
  }, [
4851
- w("div", wr, [m(s)(e.mime_type) ? (c(), p("img", {
4851
+ y("div", wr, [p(s)(t.mime_type) ? (o(), O("img", {
4852
4852
  key: 0,
4853
- src: e.small_url || e.url,
4854
- alt: e.filename,
4853
+ src: t.small_url || t.url,
4854
+ alt: t.filename,
4855
4855
  class: "tpl:size-full tpl:object-cover",
4856
4856
  loading: "lazy"
4857
- }, null, 8, Tr)) : (c(), x(vr, {
4857
+ }, null, 8, Tr)) : (o(), v(vr, {
4858
4858
  key: 1,
4859
- "mime-type": e.mime_type
4859
+ "mime-type": t.mime_type
4860
4860
  }, null, 8, ["mime-type"]))]),
4861
- w("div", Er, [w("p", Dr, C(e.filename), 1), w("p", Or, [w("span", null, C(g(e.size)), 1), m(s)(e.mime_type) && e.width && e.height ? (c(), p("span", kr, C(e.width) + "×" + C(e.height), 1)) : b("", !0)])]),
4862
- w("div", Ar, [w("button", {
4861
+ y("div", Er, [y("p", Dr, _(t.filename), 1), y("p", Or, [y("span", null, _(x(t.size)), 1), p(s)(t.mime_type) && t.width && t.height ? (o(), O("span", kr, _(t.width) + "×" + _(t.height), 1)) : u("", !0)])]),
4862
+ y("div", Ar, [y("button", {
4863
4863
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-white",
4864
4864
  style: { "background-color": "rgba(0, 0, 0, 0.6)" },
4865
- title: m(d).mediaLibrary.editFile,
4866
- onClick: k((t) => a("edit", e), ["stop"])
4867
- }, [h(m(ae), {
4865
+ title: p(f).mediaLibrary.editFile,
4866
+ onClick: m((e) => r("edit", t), ["stop"])
4867
+ }, [k(p(F), {
4868
4868
  size: 11,
4869
4869
  "stroke-width": 2
4870
- })], 8, jr), w("button", {
4870
+ })], 8, jr), y("button", {
4871
4871
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-white",
4872
4872
  style: { "background-color": "rgba(0, 0, 0, 0.6)" },
4873
- title: m(d).mediaLibrary.replaceFile,
4874
- onClick: k((t) => a("replace", e), ["stop"])
4875
- }, [h(m(F), {
4873
+ title: p(f).mediaLibrary.replaceFile,
4874
+ onClick: m((e) => r("replace", t), ["stop"])
4875
+ }, [k(p(ae), {
4876
4876
  size: 11,
4877
4877
  "stroke-width": 2
4878
4878
  })], 8, Mr)]),
4879
- t.selectedIds.has(e.id) ? (c(), p("div", Nr, [h(m(ee), {
4879
+ e.selectedIds.has(t.id) ? (o(), O("div", Nr, [k(p(M), {
4880
4880
  size: 12,
4881
4881
  "stroke-width": 3
4882
- })])) : b("", !0)
4882
+ })])) : u("", !0)
4883
4883
  ], 14, Cr))), 128))])),
4884
- w("div", {
4884
+ y("div", {
4885
4885
  ref_key: "sentinelRef",
4886
- ref: f,
4886
+ ref: b,
4887
4887
  class: "tpl:h-4"
4888
4888
  }, null, 512),
4889
- t.isLoading && t.items.length > 0 ? (c(), p("div", Kr, [h(m(I), {
4889
+ e.isLoading && e.items.length > 0 ? (o(), O("div", Kr, [k(p(ue), {
4890
4890
  class: "tpl-spinner",
4891
4891
  size: 20,
4892
4892
  "stroke-width": 2,
4893
4893
  style: { color: "var(--tpl-primary)" }
4894
- })])) : b("", !0)
4894
+ })])) : u("", !0)
4895
4895
  ]));
4896
4896
  }
4897
4897
  }), [["__scopeId", "data-v-78d7ed75"]]), Jr = ["data-tpl-theme"], Yr = {
@@ -4907,7 +4907,7 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4907
4907
  }, ei = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, ti = ["disabled"], ni = ["disabled"], ri = {
4908
4908
  key: 0,
4909
4909
  class: "tpl:flex tpl:items-center tpl:gap-1.5"
4910
- }, ii = { key: 1 }, ai = /* @__PURE__ */ d({
4910
+ }, ii = { key: 1 }, ai = /* @__PURE__ */ e({
4911
4911
  __name: "MediaImportUrlModal",
4912
4912
  props: {
4913
4913
  visible: { type: Boolean },
@@ -4915,22 +4915,22 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4915
4915
  error: {}
4916
4916
  },
4917
4917
  emits: ["import", "close"],
4918
- setup(r, { emit: a }) {
4919
- let o = r, s = a, { t: l } = z(), u = n("tplUiTheme"), d = e("");
4920
- t(() => o.visible, (e) => {
4921
- e && (d.value = "");
4918
+ setup(e, { emit: i }) {
4919
+ let a = e, s = i, { t: l } = z(), h = t("tplUiTheme"), g = T("");
4920
+ r(() => a.visible, (e) => {
4921
+ e && (g.value = "");
4922
4922
  });
4923
- function g() {
4924
- let e = d.value.trim();
4925
- !e || o.isImporting || s("import", e);
4923
+ function b() {
4924
+ let e = g.value.trim();
4925
+ !e || a.isImporting || s("import", e);
4926
4926
  }
4927
- function _() {
4928
- o.isImporting || s("close");
4927
+ function x() {
4928
+ a.isImporting || s("close");
4929
4929
  }
4930
- function v(e) {
4931
- e.key === "Enter" && (e.preventDefault(), g()), e.key === "Escape" && _();
4930
+ function S(e) {
4931
+ e.key === "Enter" && (e.preventDefault(), b()), e.key === "Escape" && x();
4932
4932
  }
4933
- return (e, t) => (c(), x(y, { to: "body" }, [h(T, {
4933
+ return (t, r) => (o(), v(w, { to: "body" }, [k(C, {
4934
4934
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
4935
4935
  "enter-from-class": "tpl:opacity-0",
4936
4936
  "enter-to-class": "tpl:opacity-100",
@@ -4938,17 +4938,17 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4938
4938
  "leave-from-class": "tpl:opacity-100",
4939
4939
  "leave-to-class": "tpl:opacity-0"
4940
4940
  }, {
4941
- default: i(() => [r.visible ? (c(), p("div", {
4941
+ default: c(() => [e.visible ? (o(), O("div", {
4942
4942
  key: 0,
4943
- "data-tpl-theme": m(u),
4943
+ "data-tpl-theme": p(h),
4944
4944
  class: "tpl tpl:fixed tpl:inset-0 tpl:z-[10000] tpl:flex tpl:items-center tpl:justify-center",
4945
4945
  style: { "background-color": "var(--tpl-overlay)" },
4946
- onClick: k(_, ["self"]),
4947
- onKeydown: v
4948
- }, [w("div", Yr, [
4949
- w("h3", Xr, C(m(l).mediaLibrary.importFromUrl), 1),
4950
- w("div", Zr, [f(w("input", {
4951
- "onUpdate:modelValue": t[0] ||= (e) => d.value = e,
4946
+ onClick: m(x, ["self"]),
4947
+ onKeydown: S
4948
+ }, [y("div", Yr, [
4949
+ y("h3", Xr, _(p(l).mediaLibrary.importFromUrl), 1),
4950
+ y("div", Zr, [n(y("input", {
4951
+ "onUpdate:modelValue": r[0] ||= (e) => g.value = e,
4952
4952
  type: "url",
4953
4953
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
4954
4954
  style: {
@@ -4956,31 +4956,31 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4956
4956
  "background-color": "var(--tpl-bg)",
4957
4957
  color: "var(--tpl-text)"
4958
4958
  },
4959
- placeholder: m(l).mediaLibrary.importUrlPlaceholder,
4960
- disabled: r.isImporting,
4959
+ placeholder: p(l).mediaLibrary.importUrlPlaceholder,
4960
+ disabled: e.isImporting,
4961
4961
  autofocus: ""
4962
- }, null, 8, Qr), [[D, d.value]])]),
4963
- r.error ? (c(), p("p", $r, C(r.error), 1)) : b("", !0),
4964
- w("div", ei, [w("button", {
4965
- class: O(["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", { "tpl:cursor-not-allowed tpl:opacity-50": r.isImporting }]),
4962
+ }, null, 8, Qr), [[f, g.value]])]),
4963
+ e.error ? (o(), O("p", $r, _(e.error), 1)) : u("", !0),
4964
+ y("div", ei, [y("button", {
4965
+ class: D(["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", { "tpl:cursor-not-allowed tpl:opacity-50": e.isImporting }]),
4966
4966
  style: {
4967
4967
  "border-color": "var(--tpl-border)",
4968
4968
  color: "var(--tpl-text)",
4969
4969
  "background-color": "var(--tpl-bg)"
4970
4970
  },
4971
- disabled: r.isImporting,
4972
- onClick: _
4973
- }, C(m(l).mediaLibrary.cancel), 11, ti), w("button", {
4971
+ disabled: e.isImporting,
4972
+ onClick: x
4973
+ }, _(p(l).mediaLibrary.cancel), 11, ti), y("button", {
4974
4974
  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",
4975
4975
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
4976
- disabled: !d.value.trim() || r.isImporting,
4977
- onClick: g
4978
- }, [r.isImporting ? (c(), p("span", ri, [h(m(I), {
4976
+ disabled: !g.value.trim() || e.isImporting,
4977
+ onClick: b
4978
+ }, [e.isImporting ? (o(), O("span", ri, [k(p(ue), {
4979
4979
  class: "tpl:animate-spin",
4980
4980
  size: 12,
4981
4981
  "stroke-width": 2
4982
- }), A(" " + C(m(l).mediaLibrary.importing), 1)])) : (c(), p("span", ii, C(m(l).mediaLibrary.import), 1))], 8, ni)])
4983
- ])], 40, Jr)) : b("", !0)]),
4982
+ }), d(" " + _(p(l).mediaLibrary.importing), 1)])) : (o(), O("span", ii, _(p(l).mediaLibrary.import), 1))], 8, ni)])
4983
+ ])], 40, Jr)) : u("", !0)]),
4984
4984
  _: 1
4985
4985
  })]));
4986
4986
  }
@@ -4988,15 +4988,15 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
4988
4988
  key: 0,
4989
4989
  class: "tpl:shrink-0",
4990
4990
  style: { color: "var(--tpl-text-dim)" }
4991
- }, ui = /* @__PURE__ */ d({
4991
+ }, ui = /* @__PURE__ */ e({
4992
4992
  __name: "MediaMovePicker",
4993
4993
  props: {
4994
4994
  folders: {},
4995
4995
  currentFolderId: {}
4996
4996
  },
4997
4997
  emits: ["select", "close"],
4998
- setup(t, { emit: n }) {
4999
- let i = n, { t: a } = z(), o = e(null);
4998
+ setup(e, { emit: t }) {
4999
+ let n = t, { t: r } = z(), a = T(null);
5000
5000
  function s(e, t = 0) {
5001
5001
  let n = [];
5002
5002
  for (let r of e) n.push({
@@ -5006,43 +5006,43 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
5006
5006
  }), r.children?.length && n.push(...s(r.children, t + 1));
5007
5007
  return n;
5008
5008
  }
5009
- return le(o, () => {
5010
- i("close");
5011
- }), (e, n) => (c(), p("div", {
5009
+ return R(a, () => {
5010
+ n("close");
5011
+ }), (t, c) => (o(), O("div", {
5012
5012
  ref_key: "pickerRef",
5013
- ref: o,
5013
+ ref: a,
5014
5014
  class: "tpl:absolute tpl:bottom-full tpl:left-0 tpl:z-10 tpl:mb-2 tpl:w-56 tpl:overflow-hidden tpl:rounded-lg tpl:border tpl:shadow-lg",
5015
5015
  style: {
5016
5016
  "border-color": "var(--tpl-border)",
5017
5017
  "background-color": "var(--tpl-bg-elevated)"
5018
5018
  }
5019
- }, [w("div", oi, [t.currentFolderId === null ? b("", !0) : (c(), p("button", {
5019
+ }, [y("div", oi, [e.currentFolderId === null ? u("", !0) : (o(), O("button", {
5020
5020
  key: 0,
5021
5021
  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",
5022
5022
  style: { color: "var(--tpl-text)" },
5023
- onClick: n[0] ||= (e) => i("select", null)
5024
- }, [h(m(ye), {
5023
+ onClick: c[0] ||= (e) => n("select", null)
5024
+ }, [k(p(_e), {
5025
5025
  class: "tpl:shrink-0",
5026
5026
  size: 14,
5027
5027
  "stroke-width": 1.5
5028
- }), A(" " + C(m(a).mediaLibrary.moveToRoot), 1)])), (c(!0), p(v, null, r(s(t.folders), (e) => (c(), p("button", {
5029
- key: e.id,
5028
+ }), d(" " + _(p(r).mediaLibrary.moveToRoot), 1)])), (o(!0), O(g, null, i(s(e.folders), (t) => (o(), O("button", {
5029
+ key: t.id,
5030
5030
  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",
5031
- style: _({
5032
- paddingLeft: `${e.depth * 16 + 12}px`,
5033
- color: e.id === t.currentFolderId ? "var(--tpl-text-dim)" : "var(--tpl-text)",
5034
- opacity: e.id === t.currentFolderId ? .5 : 1
5031
+ style: h({
5032
+ paddingLeft: `${t.depth * 16 + 12}px`,
5033
+ color: t.id === e.currentFolderId ? "var(--tpl-text-dim)" : "var(--tpl-text)",
5034
+ opacity: t.id === e.currentFolderId ? .5 : 1
5035
5035
  }),
5036
- disabled: e.id === t.currentFolderId,
5037
- onClick: (t) => i("select", e.id)
5036
+ disabled: t.id === e.currentFolderId,
5037
+ onClick: (e) => n("select", t.id)
5038
5038
  }, [
5039
- h(m(me), {
5039
+ k(p(de), {
5040
5040
  class: "tpl:shrink-0",
5041
5041
  size: 14,
5042
5042
  "stroke-width": 1.5
5043
5043
  }),
5044
- w("span", ci, C(e.name), 1),
5045
- e.id === t.currentFolderId ? (c(), p("span", li, C(m(a).mediaLibrary.currentFolder), 1)) : b("", !0)
5044
+ y("span", ci, _(t.name), 1),
5045
+ t.id === e.currentFolderId ? (o(), O("span", li, _(p(r).mediaLibrary.currentFolder), 1)) : u("", !0)
5046
5046
  ], 12, si))), 128))])], 512));
5047
5047
  }
5048
5048
  }), di = { class: "tpl:flex tpl:items-center tpl:gap-3" }, fi = ["src", "alt"], pi = {
@@ -5061,7 +5061,7 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
5061
5061
  }, vi = {
5062
5062
  class: "tpl:block tpl:text-[10px]",
5063
5063
  style: { color: "var(--tpl-text-muted)" }
5064
- }, yi = ["value"], bi = ["value"], xi = /* @__PURE__ */ ue(/* @__PURE__ */ d({
5064
+ }, yi = ["value"], bi = ["value"], xi = /* @__PURE__ */ oe(/* @__PURE__ */ e({
5065
5065
  __name: "MediaPreviewPanel",
5066
5066
  props: {
5067
5067
  item: {},
@@ -5070,8 +5070,8 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
5070
5070
  },
5071
5071
  emits: ["update:selectedConversion"],
5072
5072
  setup(e, { emit: t }) {
5073
- let n = e, i = t, { t: a } = z(), { isImageMimeType: o } = Ee(), s = E(() => {
5074
- if (!_.value || !n.item.conversions_generated) return [];
5073
+ let n = e, r = t, { t: a } = z(), { isImageMimeType: s } = Ee(), c = S(() => {
5074
+ if (!b.value || !n.item.conversions_generated) return [];
5075
5075
  let e = [];
5076
5076
  return n.item.small_url && e.push({
5077
5077
  value: "small",
@@ -5090,8 +5090,8 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
5090
5090
  label: a.mediaLibrary.conversionOriginal,
5091
5091
  url: n.item.url
5092
5092
  }), e;
5093
- }), l = E(() => _.value && s.value.length > 1), u = E(() => {
5094
- if (!_.value) return null;
5093
+ }), l = S(() => b.value && c.value.length > 1), f = S(() => {
5094
+ if (!b.value) return null;
5095
5095
  switch (n.selectedConversion) {
5096
5096
  case "small": return n.item.small_url || n.item.url;
5097
5097
  case "medium": return n.item.medium_url || n.item.url;
@@ -5099,69 +5099,69 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
5099
5099
  default: return n.item.url;
5100
5100
  }
5101
5101
  });
5102
- function d(e) {
5102
+ function m(e) {
5103
5103
  let t = e.target;
5104
- i("update:selectedConversion", t.value);
5104
+ r("update:selectedConversion", t.value);
5105
5105
  }
5106
- function f(e, t, n = []) {
5106
+ function h(e, t, n = []) {
5107
5107
  for (let r of e) {
5108
5108
  let e = [...n, r.name];
5109
5109
  if (r.id === t) return e;
5110
5110
  if (r.children) {
5111
- let n = f(r.children, t, e);
5111
+ let n = h(r.children, t, e);
5112
5112
  if (n) return n;
5113
5113
  }
5114
5114
  }
5115
5115
  return null;
5116
5116
  }
5117
- let g = E(() => {
5117
+ let v = S(() => {
5118
5118
  if (!n.item.folder_id || !n.folders) return null;
5119
- let e = f(n.folders, n.item.folder_id);
5119
+ let e = h(n.folders, n.item.folder_id);
5120
5120
  return e ? e.join("/") : null;
5121
- }), _ = E(() => o(n.item.mime_type));
5122
- function y(e) {
5121
+ }), b = S(() => s(n.item.mime_type));
5122
+ function x(e) {
5123
5123
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
5124
5124
  }
5125
- function x(e) {
5125
+ function C(e) {
5126
5126
  return new Date(e).toLocaleDateString(void 0, {
5127
5127
  year: "numeric",
5128
5128
  month: "short",
5129
5129
  day: "numeric"
5130
5130
  });
5131
5131
  }
5132
- return (t, n) => (c(), p("div", di, [
5133
- _.value ? (c(), p("img", {
5132
+ return (t, n) => (o(), O("div", di, [
5133
+ b.value ? (o(), O("img", {
5134
5134
  key: 0,
5135
- src: u.value ?? void 0,
5135
+ src: f.value ?? void 0,
5136
5136
  alt: e.item.alt_text || e.item.filename,
5137
5137
  class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
5138
5138
  style: { border: "1px solid var(--tpl-border)" }
5139
- }, null, 8, fi)) : (c(), p("div", pi, [h(vr, {
5139
+ }, null, 8, fi)) : (o(), O("div", pi, [k(vr, {
5140
5140
  "mime-type": e.item.mime_type,
5141
5141
  class: "tpl-preview-icon"
5142
5142
  }, null, 8, ["mime-type"])])),
5143
- w("div", mi, [
5144
- w("p", hi, C(e.item.filename), 1),
5145
- w("p", gi, [
5146
- A(C(y(e.item.size)) + " · " + C(x(e.item.created_at)) + " ", 1),
5147
- _.value && e.item.width && e.item.height ? (c(), p(v, { key: 0 }, [A(" · " + C(e.item.width) + "×" + C(e.item.height) + "px ", 1)], 64)) : b("", !0),
5148
- g.value ? (c(), p(v, { key: 1 }, [
5149
- n[0] ||= A(" · ", -1),
5150
- h(m(me), {
5143
+ y("div", mi, [
5144
+ y("p", hi, _(e.item.filename), 1),
5145
+ y("p", gi, [
5146
+ d(_(x(e.item.size)) + " · " + _(C(e.item.created_at)) + " ", 1),
5147
+ b.value && e.item.width && e.item.height ? (o(), O(g, { key: 0 }, [d(" · " + _(e.item.width) + "×" + _(e.item.height) + "px ", 1)], 64)) : u("", !0),
5148
+ v.value ? (o(), O(g, { key: 1 }, [
5149
+ n[0] ||= d(" · ", -1),
5150
+ k(p(de), {
5151
5151
  class: "tpl:mb-px tpl:inline",
5152
5152
  size: 9,
5153
5153
  "stroke-width": 2
5154
5154
  }),
5155
- A(" " + C(g.value), 1)
5156
- ], 64)) : b("", !0)
5155
+ d(" " + _(v.value), 1)
5156
+ ], 64)) : u("", !0)
5157
5157
  ]),
5158
- _.value ? (c(), p("p", {
5158
+ b.value ? (o(), O("p", {
5159
5159
  key: 0,
5160
- class: O(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !e.item.alt_text }]),
5160
+ class: D(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !e.item.alt_text }]),
5161
5161
  style: { color: "var(--tpl-text-dim)" }
5162
- }, C(e.item.alt_text || "\xA0"), 3)) : b("", !0)
5162
+ }, _(e.item.alt_text || "\xA0"), 3)) : u("", !0)
5163
5163
  ]),
5164
- l.value ? (c(), p("div", _i, [w("label", vi, C(m(a).mediaLibrary.conversionLabel), 1), w("select", {
5164
+ l.value ? (o(), O("div", _i, [y("label", vi, _(p(a).mediaLibrary.conversionLabel), 1), y("select", {
5165
5165
  class: "tpl:mt-0.5 tpl:rounded-md tpl:border tpl:py-1 tpl:pr-6 tpl:pl-2 tpl:text-xs tpl:outline-none",
5166
5166
  style: {
5167
5167
  "border-color": "var(--tpl-border)",
@@ -5169,11 +5169,11 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
5169
5169
  color: "var(--tpl-text)"
5170
5170
  },
5171
5171
  value: e.selectedConversion,
5172
- onChange: d
5173
- }, [(c(!0), p(v, null, r(s.value, (e) => (c(), p("option", {
5172
+ onChange: m
5173
+ }, [(o(!0), O(g, null, i(c.value, (e) => (o(), O("option", {
5174
5174
  key: e.value,
5175
5175
  value: e.value
5176
- }, C(e.label), 9, bi))), 128))], 40, yi)])) : b("", !0)
5176
+ }, _(e.label), 9, bi))), 128))], 40, yi)])) : u("", !0)
5177
5177
  ]));
5178
5178
  }
5179
5179
  }), [["__scopeId", "data-v-56be5670"]]), Si = ["data-tpl-theme"], Ci = {
@@ -5202,7 +5202,7 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
5202
5202
  key: 1,
5203
5203
  class: "tpl:mb-3 tpl:text-xs",
5204
5204
  style: { color: "var(--tpl-danger)" }
5205
- }, Ni = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Pi = ["disabled"], Fi = ["disabled"], Ii = /* @__PURE__ */ d({
5205
+ }, Ni = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Pi = ["disabled"], Fi = ["disabled"], Ii = /* @__PURE__ */ e({
5206
5206
  __name: "MediaReplaceModal",
5207
5207
  props: {
5208
5208
  visible: { type: Boolean },
@@ -5212,26 +5212,26 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
5212
5212
  error: {}
5213
5213
  },
5214
5214
  emits: ["replace", "close"],
5215
- setup(r, { emit: a }) {
5216
- let o = r, s = a, { t: l } = z(), u = n("tplUiTheme"), d = e(null), f = e(null), g = E(() => {
5217
- if (!o.item) return "";
5218
- let e = o.item.filename.split(".");
5215
+ setup(e, { emit: n }) {
5216
+ let i = e, a = n, { t: s } = z(), l = t("tplUiTheme"), d = T(null), f = T(null), h = S(() => {
5217
+ if (!i.item) return "";
5218
+ let e = i.item.filename.split(".");
5219
5219
  return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
5220
- }), _ = E(() => g.value ? `.${g.value}` : "*"), v = E(() => (o.usageInfo?.template_count ?? 0) > 0);
5221
- t(() => o.visible, (e) => {
5220
+ }), g = S(() => h.value ? `.${h.value}` : "*"), b = S(() => (i.usageInfo?.template_count ?? 0) > 0);
5221
+ r(() => i.visible, (e) => {
5222
5222
  e || (f.value = null, d.value && (d.value.value = ""));
5223
5223
  });
5224
- function S(e) {
5224
+ function x(e) {
5225
5225
  let t = e.target;
5226
5226
  t.files && t.files.length > 0 && (f.value = t.files[0]);
5227
5227
  }
5228
- function D() {
5229
- f.value && s("replace", f.value);
5228
+ function E() {
5229
+ f.value && a("replace", f.value);
5230
5230
  }
5231
- function O(e) {
5232
- e.key === "Escape" && s("close");
5231
+ function D(e) {
5232
+ e.key === "Escape" && a("close");
5233
5233
  }
5234
- return (e, t) => (c(), x(y, { to: "body" }, [h(T, {
5234
+ return (t, n) => (o(), v(w, { to: "body" }, [k(C, {
5235
5235
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
5236
5236
  "enter-from-class": "tpl:opacity-0",
5237
5237
  "enter-to-class": "tpl:opacity-100",
@@ -5239,48 +5239,48 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
5239
5239
  "leave-from-class": "tpl:opacity-100",
5240
5240
  "leave-to-class": "tpl:opacity-0"
5241
5241
  }, {
5242
- default: i(() => [r.visible && r.item ? (c(), p("div", {
5242
+ default: c(() => [e.visible && e.item ? (o(), O("div", {
5243
5243
  key: 0,
5244
- "data-tpl-theme": m(u),
5244
+ "data-tpl-theme": p(l),
5245
5245
  class: "tpl tpl:fixed tpl:inset-0 tpl:z-[10000] tpl:flex tpl:items-center tpl:justify-center",
5246
5246
  style: { "background-color": "var(--tpl-overlay)" },
5247
- onClick: t[1] ||= k((e) => s("close"), ["self"]),
5248
- onKeydown: O
5249
- }, [w("div", Ci, [
5250
- w("h3", wi, C(m(l).mediaLibrary.replaceWarningTitle), 1),
5251
- w("p", Ti, C(m(l).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${g.value}`)), 1),
5252
- v.value ? (c(), p("p", Ei, C(m(l).mediaLibrary.replaceWarningUsageNote.replace("{count}", r.usageInfo.template_count.toString())), 1)) : b("", !0),
5253
- w("div", Di, [w("p", Oi, C(r.item.filename), 1)]),
5254
- w("div", ki, [w("label", Ai, C(m(l).mediaLibrary.replaceSelectFile), 1), w("input", {
5247
+ onClick: n[1] ||= m((e) => a("close"), ["self"]),
5248
+ onKeydown: D
5249
+ }, [y("div", Ci, [
5250
+ y("h3", wi, _(p(s).mediaLibrary.replaceWarningTitle), 1),
5251
+ y("p", Ti, _(p(s).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${h.value}`)), 1),
5252
+ b.value ? (o(), O("p", Ei, _(p(s).mediaLibrary.replaceWarningUsageNote.replace("{count}", e.usageInfo.template_count.toString())), 1)) : u("", !0),
5253
+ y("div", Di, [y("p", Oi, _(e.item.filename), 1)]),
5254
+ y("div", ki, [y("label", Ai, _(p(s).mediaLibrary.replaceSelectFile), 1), y("input", {
5255
5255
  ref_key: "fileInputRef",
5256
5256
  ref: d,
5257
5257
  type: "file",
5258
- accept: _.value,
5258
+ accept: g.value,
5259
5259
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs",
5260
5260
  style: {
5261
5261
  "border-color": "var(--tpl-border)",
5262
5262
  "background-color": "var(--tpl-bg)",
5263
5263
  color: "var(--tpl-text)"
5264
5264
  },
5265
- onChange: S
5265
+ onChange: x
5266
5266
  }, null, 40, ji)]),
5267
- r.error ? (c(), p("p", Mi, C(r.error), 1)) : b("", !0),
5268
- w("div", Ni, [w("button", {
5267
+ e.error ? (o(), O("p", Mi, _(e.error), 1)) : u("", !0),
5268
+ y("div", Ni, [y("button", {
5269
5269
  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",
5270
5270
  style: {
5271
5271
  "border-color": "var(--tpl-border)",
5272
5272
  color: "var(--tpl-text)",
5273
5273
  "background-color": "var(--tpl-bg)"
5274
5274
  },
5275
- disabled: r.isReplacing,
5276
- onClick: t[0] ||= (e) => s("close")
5277
- }, C(m(l).mediaLibrary.cancel), 9, Pi), w("button", {
5275
+ disabled: e.isReplacing,
5276
+ onClick: n[0] ||= (e) => a("close")
5277
+ }, _(p(s).mediaLibrary.cancel), 9, Pi), y("button", {
5278
5278
  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",
5279
5279
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
5280
- disabled: !f.value || r.isReplacing,
5281
- onClick: D
5282
- }, C(r.isReplacing ? m(l).mediaLibrary.replacing : m(l).mediaLibrary.replace), 9, Fi)])
5283
- ])], 40, Si)) : b("", !0)]),
5280
+ disabled: !f.value || e.isReplacing,
5281
+ onClick: E
5282
+ }, _(e.isReplacing ? p(s).mediaLibrary.replacing : p(s).mediaLibrary.replace), 9, Fi)])
5283
+ ])], 40, Si)) : u("", !0)]),
5284
5284
  _: 1
5285
5285
  })]));
5286
5286
  }
@@ -5296,58 +5296,58 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
5296
5296
  }, Bi = {
5297
5297
  class: "tpl:mt-1 tpl:text-[10px]",
5298
5298
  style: { color: "var(--tpl-text-dim)" }
5299
- }, Vi = /* @__PURE__ */ d({
5299
+ }, Vi = /* @__PURE__ */ e({
5300
5300
  __name: "MediaUploadZone",
5301
5301
  props: {
5302
5302
  isUploading: { type: Boolean },
5303
5303
  uploadProgress: {}
5304
5304
  },
5305
5305
  emits: ["upload"],
5306
- setup(t, { emit: n }) {
5307
- let r = n, { t: i, format: a } = z(), { allAcceptedMimeTypes: o, allAcceptedInputString: s, maxFileSize: l } = Ee(), u = e();
5308
- function d(e) {
5306
+ setup(e, { emit: t }) {
5307
+ let n = t, { t: r, format: i } = z(), { allAcceptedMimeTypes: a, allAcceptedInputString: s, maxFileSize: c } = Ee(), l = T();
5308
+ function u(e) {
5309
5309
  let t = [];
5310
- for (let n of Array.from(e)) o.value.includes(n.type) && n.size <= l.value && t.push(n);
5310
+ for (let n of Array.from(e)) a.value.includes(n.type) && n.size <= c.value && t.push(n);
5311
5311
  return t;
5312
5312
  }
5313
- function f(e) {
5314
- let t = d(e);
5315
- t.length && r("upload", t);
5313
+ function d(e) {
5314
+ let t = u(e);
5315
+ t.length && n("upload", t);
5316
5316
  }
5317
- let { isOverDropZone: g } = oe(u, { onDrop: (e) => {
5318
- e?.length && f(e);
5319
- } }), { open: _, onChange: y } = te({
5317
+ let { isOverDropZone: f } = ne(l, { onDrop: (e) => {
5318
+ e?.length && d(e);
5319
+ } }), { open: m, onChange: h } = ie({
5320
5320
  accept: s.value,
5321
5321
  multiple: !0
5322
5322
  });
5323
- return y((e) => {
5324
- e?.length && f(e);
5325
- }), (e, n) => (c(), p("div", {
5323
+ return h((e) => {
5324
+ e?.length && d(e);
5325
+ }), (t, n) => (o(), O("div", {
5326
5326
  ref_key: "dropZoneRef",
5327
- ref: u,
5328
- class: O(["tpl-upload-zone tpl:flex tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-lg tpl:border-2 tpl:border-dashed tpl:p-5 tpl:text-center tpl:transition-all tpl:duration-150", m(g) ? "tpl-upload-zone-active" : ""]),
5327
+ ref: l,
5328
+ class: D(["tpl-upload-zone tpl:flex tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-lg tpl:border-2 tpl:border-dashed tpl:p-5 tpl:text-center tpl:transition-all tpl:duration-150", p(f) ? "tpl-upload-zone-active" : ""]),
5329
5329
  style: {
5330
5330
  "border-color": "var(--tpl-border-light)",
5331
5331
  "background-color": "var(--tpl-bg)"
5332
5332
  },
5333
- onClick: n[0] ||= (e) => m(_)()
5334
- }, [t.isUploading ? (c(), p("div", Li, [h(m(I), {
5333
+ onClick: n[0] ||= (e) => p(m)()
5334
+ }, [e.isUploading ? (o(), O("div", Li, [k(p(ue), {
5335
5335
  class: "tpl-spinner",
5336
5336
  size: 20,
5337
5337
  "stroke-width": 2,
5338
5338
  style: { color: "var(--tpl-primary)" }
5339
- }), w("span", Ri, C(t.uploadProgress && t.uploadProgress.total > 1 ? m(a)(m(i).mediaLibrary.uploadingProgress, {
5340
- current: t.uploadProgress.current,
5341
- total: t.uploadProgress.total
5342
- }) : m(i).mediaLibrary.uploading), 1)])) : (c(), p(v, { key: 1 }, [
5343
- h(m(L), {
5339
+ }), y("span", Ri, _(e.uploadProgress && e.uploadProgress.total > 1 ? p(i)(p(r).mediaLibrary.uploadingProgress, {
5340
+ current: e.uploadProgress.current,
5341
+ total: e.uploadProgress.total
5342
+ }) : p(r).mediaLibrary.uploading), 1)])) : (o(), O(g, { key: 1 }, [
5343
+ k(p(ee), {
5344
5344
  class: "tpl:mb-2",
5345
5345
  size: 24,
5346
5346
  "stroke-width": 1.5,
5347
5347
  style: { color: "var(--tpl-text-dim)" }
5348
5348
  }),
5349
- w("p", zi, C(m(i).mediaLibrary.dropOrClick), 1),
5350
- w("p", Bi, C(m(i).mediaLibrary.acceptedFormats), 1)
5349
+ y("p", zi, _(p(r).mediaLibrary.dropOrClick), 1),
5350
+ y("p", Bi, _(p(r).mediaLibrary.acceptedFormats), 1)
5351
5351
  ], 64))], 2));
5352
5352
  }
5353
5353
  }), Hi = [
@@ -5374,16 +5374,16 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
5374
5374
  "background-color": "var(--tpl-text)",
5375
5375
  color: "var(--tpl-bg-elevated)"
5376
5376
  }
5377
- }, Ki = /* @__PURE__ */ d({
5377
+ }, Ki = /* @__PURE__ */ e({
5378
5378
  __name: "StorageProgressRing",
5379
5379
  props: {
5380
5380
  usedBytes: {},
5381
5381
  limitBytes: {},
5382
5382
  size: {}
5383
5383
  },
5384
- setup(t) {
5385
- let n = t, { t: r, format: a } = z(), o = e(!1), s = E(() => n.size ?? 24), l = E(() => Math.max(2, s.value / 8)), u = E(() => (s.value - l.value) / 2), d = E(() => 2 * Math.PI * u.value), f = E(() => n.limitBytes <= 0 ? 0 : Math.min(100, n.usedBytes / n.limitBytes * 100)), m = E(() => d.value - f.value / 100 * d.value), g = E(() => f.value >= 95 ? "var(--tpl-danger)" : f.value >= 75 ? "var(--tpl-warning, #f59e0b)" : "var(--tpl-primary)");
5386
- function _(e) {
5384
+ setup(e) {
5385
+ let t = e, { t: n, format: r } = z(), i = T(!1), a = S(() => t.size ?? 24), s = S(() => Math.max(2, a.value / 8)), l = S(() => (a.value - s.value) / 2), f = S(() => 2 * Math.PI * l.value), p = S(() => t.limitBytes <= 0 ? 0 : Math.min(100, t.usedBytes / t.limitBytes * 100)), m = S(() => f.value - p.value / 100 * f.value), h = S(() => p.value >= 95 ? "var(--tpl-danger)" : p.value >= 75 ? "var(--tpl-warning, #f59e0b)" : "var(--tpl-primary)");
5386
+ function g(e) {
5387
5387
  if (e === 0) return "0 B";
5388
5388
  let t = 1024, n = [
5389
5389
  "B",
@@ -5393,39 +5393,39 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
5393
5393
  ], r = Math.floor(Math.log(e) / Math.log(t));
5394
5394
  return `${(e / t ** +r).toFixed(+(r >= 2))} ${n[r]}`;
5395
5395
  }
5396
- let v = E(() => _(n.usedBytes)), y = E(() => _(n.limitBytes)), x = E(() => Math.max(0, n.limitBytes - n.usedBytes)), S = E(() => _(x.value)), D = E(() => a(r.mediaLibrary.storageTooltip, {
5396
+ let v = S(() => g(t.usedBytes)), b = S(() => g(t.limitBytes)), x = S(() => Math.max(0, t.limitBytes - t.usedBytes)), w = S(() => g(x.value)), E = S(() => r(n.mediaLibrary.storageTooltip, {
5397
5397
  used: v.value,
5398
- total: y.value,
5399
- remaining: S.value
5398
+ total: b.value,
5399
+ remaining: w.value
5400
5400
  }));
5401
- return (e, t) => (c(), p("div", {
5401
+ return (e, t) => (o(), O("div", {
5402
5402
  class: "tpl:relative tpl:inline-flex tpl:cursor-help tpl:items-center tpl:justify-center",
5403
- onMouseenter: t[0] ||= (e) => o.value = !0,
5404
- onMouseleave: t[1] ||= (e) => o.value = !1
5405
- }, [(c(), p("svg", {
5406
- width: s.value,
5407
- height: s.value,
5403
+ onMouseenter: t[0] ||= (e) => i.value = !0,
5404
+ onMouseleave: t[1] ||= (e) => i.value = !1
5405
+ }, [(o(), O("svg", {
5406
+ width: a.value,
5407
+ height: a.value,
5408
5408
  class: "tpl:-rotate-90",
5409
- viewBox: `0 0 ${s.value} ${s.value}`
5410
- }, [w("circle", {
5411
- cx: s.value / 2,
5412
- cy: s.value / 2,
5413
- r: u.value,
5409
+ viewBox: `0 0 ${a.value} ${a.value}`
5410
+ }, [y("circle", {
5411
+ cx: a.value / 2,
5412
+ cy: a.value / 2,
5413
+ r: l.value,
5414
5414
  fill: "none",
5415
- "stroke-width": l.value,
5415
+ "stroke-width": s.value,
5416
5416
  style: { stroke: "var(--tpl-border)" }
5417
- }, null, 8, Ui), w("circle", {
5418
- cx: s.value / 2,
5419
- cy: s.value / 2,
5420
- r: u.value,
5417
+ }, null, 8, Ui), y("circle", {
5418
+ cx: a.value / 2,
5419
+ cy: a.value / 2,
5420
+ r: l.value,
5421
5421
  fill: "none",
5422
- "stroke-width": l.value,
5423
- stroke: g.value,
5422
+ "stroke-width": s.value,
5423
+ stroke: h.value,
5424
5424
  "stroke-linecap": "round",
5425
- "stroke-dasharray": d.value,
5425
+ "stroke-dasharray": f.value,
5426
5426
  "stroke-dashoffset": m.value,
5427
5427
  class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
5428
- }, null, 8, Wi)], 8, Hi)), h(T, {
5428
+ }, null, 8, Wi)], 8, Hi)), k(C, {
5429
5429
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
5430
5430
  "enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
5431
5431
  "enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
@@ -5433,122 +5433,122 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
5433
5433
  "leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
5434
5434
  "leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
5435
5435
  }, {
5436
- default: i(() => [o.value ? (c(), p("div", Gi, [A(C(D.value) + " ", 1), t[2] ||= w("div", {
5436
+ default: c(() => [i.value ? (o(), O("div", Gi, [d(_(E.value) + " ", 1), t[2] ||= y("div", {
5437
5437
  class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
5438
5438
  style: { "background-color": "var(--tpl-text)" }
5439
- }, null, -1)])) : b("", !0)]),
5439
+ }, null, -1)])) : u("", !0)]),
5440
5440
  _: 1
5441
5441
  })], 32));
5442
5442
  }
5443
5443
  });
5444
5444
  //#endregion
5445
5445
  //#region ../media-library/src/composables/useMediaLibraryUI.ts
5446
- function qi(n) {
5447
- let { library: r, canUseMediaFolders: i, translations: a } = n;
5448
- function o() {
5449
- return "value" in a && typeof a.value == "object" ? a.value : a;
5446
+ function qi(e) {
5447
+ let { library: t, canUseMediaFolders: n, translations: i } = e;
5448
+ function a() {
5449
+ return "value" in i && typeof i.value == "object" ? i.value : i;
5450
5450
  }
5451
- let s = e("grid"), c = e(!1), l = e(""), u = e("original"), d = e(null), f = e(!1), p = e(!1), m = E(() => {
5452
- let e = r.previewItem.value;
5451
+ let o = T("grid"), s = T(!1), c = T(""), l = T("original"), u = T(null), d = T(!1), f = T(!1), p = S(() => {
5452
+ let e = t.previewItem.value;
5453
5453
  if (!e) return null;
5454
- switch (u.value) {
5454
+ switch (l.value) {
5455
5455
  case "small": return e.small_url || e.url;
5456
5456
  case "medium": return e.medium_url || e.url;
5457
5457
  case "large": return e.large_url || e.url;
5458
5458
  default: return e.url;
5459
5459
  }
5460
- }), h = E(() => r.frequentlyUsedItems.value.length > 0), g = E(() => r.viewMode.value === "frequently-used" ? r.frequentlyUsedItems.value : r.items.value), _ = E(() => Object.values(r.deleteUsageInfo.value).some((e) => e.template_count > 0)), v = {
5461
- images: () => o().mediaLibrary.filterImages,
5462
- documents: () => o().mediaLibrary.filterDocuments,
5463
- videos: () => o().mediaLibrary.filterVideos,
5464
- audio: () => o().mediaLibrary.filterAudio
5460
+ }), m = S(() => t.frequentlyUsedItems.value.length > 0), h = S(() => t.viewMode.value === "frequently-used" ? t.frequentlyUsedItems.value : t.items.value), g = S(() => Object.values(t.deleteUsageInfo.value).some((e) => e.template_count > 0)), _ = {
5461
+ images: () => a().mediaLibrary.filterImages,
5462
+ documents: () => a().mediaLibrary.filterDocuments,
5463
+ videos: () => a().mediaLibrary.filterVideos,
5464
+ audio: () => a().mediaLibrary.filterAudio
5465
5465
  };
5466
- function y(e) {
5467
- return v[e]?.() ?? e;
5466
+ function v(e) {
5467
+ return _[e]?.() ?? e;
5468
5468
  }
5469
- t(c, (e) => {
5470
- e && i.value && r.loadFolders();
5471
- }), t(() => r.previewItem.value?.id, () => {
5472
- u.value = "original";
5469
+ r(s, (e) => {
5470
+ e && n.value && t.loadFolders();
5471
+ }), r(() => t.previewItem.value?.id, () => {
5472
+ l.value = "original";
5473
5473
  });
5474
- let b = ce((e) => {
5475
- r.search(e);
5474
+ let y = le((e) => {
5475
+ t.search(e);
5476
5476
  }, 300);
5477
- function x(e) {
5478
- l.value = e, b(e);
5477
+ function b(e) {
5478
+ c.value = e, y(e);
5479
5479
  }
5480
- let { copy: S, copied: C } = re({
5480
+ let { copy: x, copied: C } = ce({
5481
5481
  copiedDuring: 2e3,
5482
5482
  legacy: !0
5483
5483
  });
5484
5484
  async function w(e) {
5485
- await r.uploadFiles(e);
5485
+ await t.uploadFiles(e);
5486
5486
  }
5487
- function T(e) {
5488
- r.selectItem(e);
5487
+ function E(e) {
5488
+ t.selectItem(e);
5489
5489
  }
5490
- async function D(e, t) {
5491
- await r.createFolder(e, t);
5490
+ async function D(e, n) {
5491
+ await t.createFolder(e, n);
5492
5492
  }
5493
- async function O(e, t) {
5494
- await r.renameFolder(e, t);
5493
+ async function O(e, n) {
5494
+ await t.renameFolder(e, n);
5495
5495
  }
5496
5496
  async function k(e) {
5497
- await r.deleteFolder(e);
5497
+ await t.deleteFolder(e);
5498
5498
  }
5499
5499
  function A(e) {
5500
- d.value = e;
5500
+ u.value = e;
5501
5501
  }
5502
- async function j(e, t, n, i) {
5503
- i && await r.replaceMediaDirectly(e, i.file), await r.updateFile(e, t, n), d.value = null;
5502
+ async function j(e, n, r, i) {
5503
+ i && await t.replaceMediaDirectly(e, i.file), await t.updateFile(e, n, r), u.value = null;
5504
5504
  }
5505
5505
  async function M(e) {
5506
- await r.importFromUrl(e) && (f.value = !1);
5506
+ await t.importFromUrl(e) && (d.value = !1);
5507
5507
  }
5508
- async function ee(e) {
5509
- p.value = !1, await r.moveSelected(e);
5508
+ async function N(e) {
5509
+ f.value = !1, await t.moveSelected(e);
5510
5510
  }
5511
- async function N() {
5512
- await r.checkUsageBeforeDelete();
5511
+ async function P() {
5512
+ await t.checkUsageBeforeDelete();
5513
5513
  }
5514
- function P(e) {
5515
- r.checkUsageBeforeReplace(e);
5514
+ function ee(e) {
5515
+ t.checkUsageBeforeReplace(e);
5516
5516
  }
5517
5517
  async function te(e) {
5518
- await r.replaceFile(e);
5518
+ await t.replaceFile(e);
5519
5519
  }
5520
- function F() {
5521
- r.clearSelection(), r.cancelDelete(), r.cancelReplace(), l.value = "", r.categoryFilter.value = null, r.sortOption.value = "newest", r.viewMode.value = "files", d.value = null, f.value = !1, u.value = "original";
5520
+ function ne() {
5521
+ t.clearSelection(), t.cancelDelete(), t.cancelReplace(), c.value = "", t.categoryFilter.value = null, t.sortOption.value = "newest", t.viewMode.value = "files", u.value = null, d.value = !1, l.value = "original";
5522
5522
  }
5523
5523
  return {
5524
- layoutMode: s,
5525
- showSidebar: c,
5526
- searchInput: l,
5527
- selectedConversion: u,
5528
- editingItem: d,
5529
- showImportUrlModal: f,
5530
- showMovePicker: p,
5531
- selectedUrl: m,
5532
- hasFrequentlyUsed: h,
5533
- displayItems: g,
5534
- hasUsedFiles: _,
5535
- copy: S,
5524
+ layoutMode: o,
5525
+ showSidebar: s,
5526
+ searchInput: c,
5527
+ selectedConversion: l,
5528
+ editingItem: u,
5529
+ showImportUrlModal: d,
5530
+ showMovePicker: f,
5531
+ selectedUrl: p,
5532
+ hasFrequentlyUsed: m,
5533
+ displayItems: h,
5534
+ hasUsedFiles: g,
5535
+ copy: x,
5536
5536
  copied: C,
5537
- getCategoryLabel: y,
5538
- handleSearchInput: x,
5537
+ getCategoryLabel: v,
5538
+ handleSearchInput: b,
5539
5539
  handleUpload: w,
5540
- handleSelect: T,
5540
+ handleSelect: E,
5541
5541
  handleCreateFolder: D,
5542
5542
  handleRenameFolder: O,
5543
5543
  handleDeleteFolder: k,
5544
5544
  handleEditItem: A,
5545
5545
  handleEditSave: j,
5546
5546
  handleImportFromUrl: M,
5547
- handleMoveToFolder: ee,
5548
- handleDeleteClick: N,
5549
- handleReplaceItem: P,
5547
+ handleMoveToFolder: N,
5548
+ handleDeleteClick: P,
5549
+ handleReplaceItem: ee,
5550
5550
  handleReplaceFile: te,
5551
- resetUI: F
5551
+ resetUI: ne
5552
5552
  };
5553
5553
  }
5554
5554
  //#endregion
@@ -5619,42 +5619,42 @@ var Ji = ["data-tpl-theme"], Yi = {
5619
5619
  }, Fa = {
5620
5620
  key: 1,
5621
5621
  class: "tpl:relative"
5622
- }, Ia = { class: "tpl:flex tpl:items-center tpl:gap-2" }, La = ["disabled"], Ra = /* @__PURE__ */ d({
5622
+ }, Ia = { class: "tpl:flex tpl:items-center tpl:gap-2" }, La = ["disabled"], Ra = /* @__PURE__ */ e({
5623
5623
  __name: "MediaLibraryModal",
5624
5624
  props: {
5625
5625
  visible: { type: Boolean },
5626
5626
  accept: {}
5627
5627
  },
5628
5628
  emits: ["close", "select"],
5629
- setup(e, { emit: a }) {
5630
- let o = e, s = a, { t: l } = z(), u = n("tplUiTheme"), d = n("authManager"), f = n("projectId"), g = E(() => f.value), S = n("planConfig"), D = E(() => S.hasFeature("media_folders")), j = E(() => S.hasFeature("import_from_url")), M = E(() => S.config.value?.storage.used_bytes ?? 0), P = E(() => S.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: te, availableCategories: F } = Ee(), I = xe({
5631
- projectId: g.value,
5632
- authManager: d
5633
- }), L = qi({
5634
- library: I,
5635
- canUseMediaFolders: D,
5629
+ setup(e, { emit: n }) {
5630
+ let a = e, s = n, { t: l } = z(), f = t("tplUiTheme"), b = t("authManager"), x = t("projectId"), T = S(() => x.value), E = t("planConfig"), A = S(() => E.hasFeature("media_folders")), j = S(() => E.hasFeature("import_from_url")), N = S(() => E.config.value?.storage.used_bytes ?? 0), ee = S(() => E.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: te, availableCategories: ne } = Ee(), F = xe({
5631
+ projectId: T.value,
5632
+ authManager: b
5633
+ }), I = qi({
5634
+ library: F,
5635
+ canUseMediaFolders: A,
5636
5636
  translations: l
5637
5637
  });
5638
- t(() => o.visible, (e) => {
5639
- e ? (I.loadItems(), I.loadFrequentlyUsed()) : L.resetUI();
5638
+ r(() => a.visible, (e) => {
5639
+ e ? (F.loadItems(), F.loadFrequentlyUsed()) : I.resetUI();
5640
5640
  });
5641
5641
  function re(e) {
5642
5642
  e.key === "Escape" && s("close");
5643
5643
  }
5644
- ne(document, "keydown", re);
5644
+ se(document, "keydown", re);
5645
5645
  function R() {
5646
- return I.previewItem.value ? o.accept?.length ? te(I.previewItem.value.mime_type, o.accept) : !0 : !1;
5646
+ return F.previewItem.value ? a.accept?.length ? te(F.previewItem.value.mime_type, a.accept) : !0 : !1;
5647
5647
  }
5648
5648
  function ie() {
5649
5649
  if (R()) {
5650
- let e = I.previewItem.value;
5650
+ let e = F.previewItem.value;
5651
5651
  s("select", {
5652
5652
  ...e,
5653
- url: L.selectedUrl.value || e.url
5653
+ url: I.selectedUrl.value || e.url
5654
5654
  }), s("close");
5655
5655
  }
5656
5656
  }
5657
- return (t, n) => (c(), x(y, { to: "body" }, [h(T, {
5657
+ return (t, n) => (o(), v(w, { to: "body" }, [k(C, {
5658
5658
  "enter-active-class": "tpl:transition tpl:duration-200",
5659
5659
  "enter-from-class": "tpl:opacity-0",
5660
5660
  "enter-to-class": "tpl:opacity-100",
@@ -5662,20 +5662,20 @@ var Ji = ["data-tpl-theme"], Yi = {
5662
5662
  "leave-from-class": "tpl:opacity-100",
5663
5663
  "leave-to-class": "tpl:opacity-0"
5664
5664
  }, {
5665
- default: i(() => [e.visible ? (c(), p("div", {
5665
+ default: c(() => [e.visible ? (o(), O("div", {
5666
5666
  key: 0,
5667
- "data-tpl-theme": m(u),
5667
+ "data-tpl-theme": p(f),
5668
5668
  class: "tpl tpl-media-overlay tpl:fixed tpl:inset-0 tpl:z-[9999]",
5669
- onClick: n[18] ||= k((e) => s("close"), ["self"])
5670
- }, [w("div", Yi, [
5671
- w("div", Xi, [w("h2", Zi, C(m(l).mediaLibrary.title), 1), w("div", Qi, [
5672
- h(Ki, {
5673
- "used-bytes": M.value,
5674
- "limit-bytes": P.value,
5669
+ onClick: n[18] ||= m((e) => s("close"), ["self"])
5670
+ }, [y("div", Yi, [
5671
+ y("div", Xi, [y("h2", Zi, _(p(l).mediaLibrary.title), 1), y("div", Qi, [
5672
+ k(Ki, {
5673
+ "used-bytes": N.value,
5674
+ "limit-bytes": ee.value,
5675
5675
  size: 22
5676
5676
  }, null, 8, ["used-bytes", "limit-bytes"]),
5677
- w("div", $i, [w("input", {
5678
- value: m(L).searchInput.value,
5677
+ y("div", $i, [y("input", {
5678
+ value: p(I).searchInput.value,
5679
5679
  type: "text",
5680
5680
  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)]",
5681
5681
  style: {
@@ -5683,24 +5683,24 @@ var Ji = ["data-tpl-theme"], Yi = {
5683
5683
  "background-color": "var(--tpl-bg)",
5684
5684
  color: "var(--tpl-text)"
5685
5685
  },
5686
- placeholder: m(l).mediaLibrary.searchPlaceholder,
5687
- onInput: n[0] ||= (e) => m(L).handleSearchInput(e.target.value)
5688
- }, null, 40, ea), h(m(_e), {
5686
+ placeholder: p(l).mediaLibrary.searchPlaceholder,
5687
+ onInput: n[0] ||= (e) => p(I).handleSearchInput(e.target.value)
5688
+ }, null, 40, ea), k(p(ye), {
5689
5689
  class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
5690
5690
  size: 13,
5691
5691
  "stroke-width": 2,
5692
5692
  style: { color: "var(--tpl-text-dim)" }
5693
5693
  })]),
5694
- w("button", {
5694
+ y("button", {
5695
5695
  class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
5696
5696
  style: { color: "var(--tpl-text-muted)" },
5697
5697
  onClick: n[1] ||= (e) => s("close")
5698
- }, [h(m(se), {
5698
+ }, [k(p(L), {
5699
5699
  size: 18,
5700
5700
  "stroke-width": 2
5701
5701
  })])
5702
5702
  ])]),
5703
- w("div", ta, [h(T, {
5703
+ y("div", ta, [k(C, {
5704
5704
  "enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
5705
5705
  "enter-from-class": "tpl:-ml-48 tpl:opacity-0",
5706
5706
  "enter-to-class": "tpl:ml-0 tpl:opacity-100",
@@ -5708,16 +5708,16 @@ var Ji = ["data-tpl-theme"], Yi = {
5708
5708
  "leave-from-class": "tpl:ml-0 tpl:opacity-100",
5709
5709
  "leave-to-class": "tpl:-ml-48 tpl:opacity-0"
5710
5710
  }, {
5711
- default: i(() => [D.value && m(L).showSidebar.value ? (c(), p("div", na, [h(gr, {
5712
- folders: m(I).folders.value,
5713
- "current-folder-id": m(I).currentFolderId.value,
5714
- "view-mode": m(I).viewMode.value,
5715
- "has-frequently-used": m(L).hasFrequentlyUsed.value,
5716
- onNavigate: m(I).navigateToFolder,
5717
- onCreateFolder: m(L).handleCreateFolder,
5718
- onRenameFolder: m(L).handleRenameFolder,
5719
- onDeleteFolder: m(L).handleDeleteFolder,
5720
- onShowFrequentlyUsed: m(I).showFrequentlyUsed
5711
+ default: c(() => [A.value && p(I).showSidebar.value ? (o(), O("div", na, [k(gr, {
5712
+ folders: p(F).folders.value,
5713
+ "current-folder-id": p(F).currentFolderId.value,
5714
+ "view-mode": p(F).viewMode.value,
5715
+ "has-frequently-used": p(I).hasFrequentlyUsed.value,
5716
+ onNavigate: p(F).navigateToFolder,
5717
+ onCreateFolder: p(I).handleCreateFolder,
5718
+ onRenameFolder: p(I).handleRenameFolder,
5719
+ onDeleteFolder: p(I).handleDeleteFolder,
5720
+ onShowFrequentlyUsed: p(F).showFrequentlyUsed
5721
5721
  }, null, 8, [
5722
5722
  "folders",
5723
5723
  "current-folder-id",
@@ -5728,57 +5728,57 @@ var Ji = ["data-tpl-theme"], Yi = {
5728
5728
  "onRenameFolder",
5729
5729
  "onDeleteFolder",
5730
5730
  "onShowFrequentlyUsed"
5731
- ])])) : b("", !0)]),
5731
+ ])])) : u("", !0)]),
5732
5732
  _: 1
5733
- }), w("div", ra, [w("div", ia, [w("div", aa, [
5734
- D.value ? (c(), p("button", {
5733
+ }), y("div", ra, [y("div", ia, [y("div", aa, [
5734
+ A.value ? (o(), O("button", {
5735
5735
  key: 0,
5736
5736
  class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
5737
- style: _({
5738
- color: m(L).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5739
- backgroundColor: m(L).showSidebar.value ? "var(--tpl-bg)" : "transparent",
5740
- border: m(L).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
5737
+ style: h({
5738
+ color: p(I).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5739
+ backgroundColor: p(I).showSidebar.value ? "var(--tpl-bg)" : "transparent",
5740
+ border: p(I).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
5741
5741
  }),
5742
- title: m(L).showSidebar.value ? m(l).mediaLibrary.hideFolders : m(l).mediaLibrary.showFolders,
5743
- onClick: n[2] ||= (e) => m(L).showSidebar.value = !m(L).showSidebar.value
5744
- }, [h(m(de), {
5742
+ title: p(I).showSidebar.value ? p(l).mediaLibrary.hideFolders : p(l).mediaLibrary.showFolders,
5743
+ onClick: n[2] ||= (e) => p(I).showSidebar.value = !p(I).showSidebar.value
5744
+ }, [k(p(pe), {
5745
5745
  size: 16,
5746
5746
  "stroke-width": 2
5747
- })], 12, oa)) : b("", !0),
5748
- m(I).viewMode.value === "frequently-used" ? (c(), p("span", sa, C(m(l).mediaLibrary.frequentlyUsed), 1)) : (c(), x(Te, {
5747
+ })], 12, oa)) : u("", !0),
5748
+ p(F).viewMode.value === "frequently-used" ? (o(), O("span", sa, _(p(l).mediaLibrary.frequentlyUsed), 1)) : (o(), v(Te, {
5749
5749
  key: 2,
5750
- folders: m(I).folders.value,
5751
- "current-folder-id": m(I).currentFolderId.value,
5752
- onNavigate: m(I).navigateToFolder
5750
+ folders: p(F).folders.value,
5751
+ "current-folder-id": p(F).currentFolderId.value,
5752
+ onNavigate: p(F).navigateToFolder
5753
5753
  }, null, 8, [
5754
5754
  "folders",
5755
5755
  "current-folder-id",
5756
5756
  "onNavigate"
5757
5757
  ])),
5758
- w("div", ca, [w("button", {
5758
+ y("div", ca, [y("button", {
5759
5759
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
5760
- style: _({
5761
- color: m(L).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5762
- backgroundColor: m(L).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
5760
+ style: h({
5761
+ color: p(I).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5762
+ backgroundColor: p(I).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
5763
5763
  }),
5764
- title: m(l).mediaLibrary.viewGrid,
5765
- onClick: n[3] ||= (e) => m(L).layoutMode.value = "grid"
5766
- }, [h(m(ge), {
5764
+ title: p(l).mediaLibrary.viewGrid,
5765
+ onClick: n[3] ||= (e) => p(I).layoutMode.value = "grid"
5766
+ }, [k(p(ge), {
5767
5767
  size: 14,
5768
5768
  "stroke-width": 2
5769
- })], 12, la), w("button", {
5769
+ })], 12, la), y("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
- style: _({
5772
- color: m(L).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5773
- backgroundColor: m(L).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
5771
+ style: h({
5772
+ color: p(I).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5773
+ backgroundColor: p(I).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
5774
5774
  }),
5775
- title: m(l).mediaLibrary.viewList,
5776
- onClick: n[4] ||= (e) => m(L).layoutMode.value = "list"
5777
- }, [h(m(he), {
5775
+ title: p(l).mediaLibrary.viewList,
5776
+ onClick: n[4] ||= (e) => p(I).layoutMode.value = "list"
5777
+ }, [k(p(he), {
5778
5778
  size: 14,
5779
5779
  "stroke-width": 2
5780
5780
  })], 12, ua)])
5781
- ]), w("div", da, [m(F).length > 1 ? (c(), p("select", {
5781
+ ]), y("div", da, [p(ne).length > 1 ? (o(), O("select", {
5782
5782
  key: 0,
5783
5783
  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",
5784
5784
  style: {
@@ -5786,36 +5786,36 @@ var Ji = ["data-tpl-theme"], Yi = {
5786
5786
  "background-color": "var(--tpl-bg)",
5787
5787
  color: "var(--tpl-text)"
5788
5788
  },
5789
- value: m(I).categoryFilter.value ?? "",
5790
- onChange: n[5] ||= (e) => m(I).filterByCategory(e.target.value || null)
5791
- }, [w("option", pa, C(m(l).mediaLibrary.filterAll), 1), (c(!0), p(v, null, r(m(F), (e) => (c(), p("option", {
5789
+ value: p(F).categoryFilter.value ?? "",
5790
+ onChange: n[5] ||= (e) => p(F).filterByCategory(e.target.value || null)
5791
+ }, [y("option", pa, _(p(l).mediaLibrary.filterAll), 1), (o(!0), O(g, null, i(p(ne), (e) => (o(), O("option", {
5792
5792
  key: e,
5793
5793
  value: e
5794
- }, C(m(L).getCategoryLabel(e)), 9, ma))), 128))], 40, fa)) : b("", !0), w("select", {
5794
+ }, _(p(I).getCategoryLabel(e)), 9, ma))), 128))], 40, fa)) : u("", !0), y("select", {
5795
5795
  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",
5796
5796
  style: {
5797
5797
  "border-color": "var(--tpl-border)",
5798
5798
  "background-color": "var(--tpl-bg)",
5799
5799
  color: "var(--tpl-text)"
5800
5800
  },
5801
- value: m(I).sortOption.value,
5802
- onChange: n[6] ||= (e) => m(I).sortBy(e.target.value)
5801
+ value: p(F).sortOption.value,
5802
+ onChange: n[6] ||= (e) => p(F).sortBy(e.target.value)
5803
5803
  }, [
5804
- w("option", ga, C(m(l).mediaLibrary.sortNewest), 1),
5805
- w("option", _a, C(m(l).mediaLibrary.sortOldest), 1),
5806
- w("option", va, C(m(l).mediaLibrary.sortNameAsc), 1),
5807
- w("option", ya, C(m(l).mediaLibrary.sortNameDesc), 1),
5808
- w("option", ba, C(m(l).mediaLibrary.sortSizeAsc), 1),
5809
- w("option", xa, C(m(l).mediaLibrary.sortSizeDesc), 1)
5810
- ], 40, ha)])]), w("div", Sa, [m(I).viewMode.value === "files" ? (c(), p("div", Ca, [h(Vi, {
5811
- "is-uploading": m(I).isUploading.value,
5812
- "upload-progress": m(I).uploadProgress.value,
5813
- onUpload: m(L).handleUpload
5804
+ y("option", ga, _(p(l).mediaLibrary.sortNewest), 1),
5805
+ y("option", _a, _(p(l).mediaLibrary.sortOldest), 1),
5806
+ y("option", va, _(p(l).mediaLibrary.sortNameAsc), 1),
5807
+ y("option", ya, _(p(l).mediaLibrary.sortNameDesc), 1),
5808
+ y("option", ba, _(p(l).mediaLibrary.sortSizeAsc), 1),
5809
+ y("option", xa, _(p(l).mediaLibrary.sortSizeDesc), 1)
5810
+ ], 40, ha)])]), y("div", Sa, [p(F).viewMode.value === "files" ? (o(), O("div", Ca, [k(Vi, {
5811
+ "is-uploading": p(F).isUploading.value,
5812
+ "upload-progress": p(F).uploadProgress.value,
5813
+ onUpload: p(I).handleUpload
5814
5814
  }, null, 8, [
5815
5815
  "is-uploading",
5816
5816
  "upload-progress",
5817
5817
  "onUpload"
5818
- ]), j.value ? (c(), p("button", {
5818
+ ]), j.value ? (o(), O("button", {
5819
5819
  key: 0,
5820
5820
  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",
5821
5821
  style: {
@@ -5823,22 +5823,22 @@ var Ji = ["data-tpl-theme"], Yi = {
5823
5823
  color: "var(--tpl-text-muted)",
5824
5824
  "background-color": "var(--tpl-bg)"
5825
5825
  },
5826
- onClick: n[7] ||= (e) => m(L).showImportUrlModal.value = !0
5827
- }, [h(m(fe), {
5826
+ onClick: n[7] ||= (e) => p(I).showImportUrlModal.value = !0
5827
+ }, [k(p(fe), {
5828
5828
  size: 14,
5829
5829
  "stroke-width": 2
5830
- }), A(" " + C(m(l).mediaLibrary.importFromUrl), 1)])) : b("", !0)])) : b("", !0), h(qr, {
5831
- items: m(L).displayItems.value,
5832
- "selected-ids": m(I).selectedItems.value,
5833
- "is-loading": m(I).isLoading.value,
5834
- "has-more": m(I).viewMode.value === "files" && m(I).hasMore.value,
5830
+ }), d(" " + _(p(l).mediaLibrary.importFromUrl), 1)])) : u("", !0)])) : u("", !0), k(qr, {
5831
+ items: p(I).displayItems.value,
5832
+ "selected-ids": p(F).selectedItems.value,
5833
+ "is-loading": p(F).isLoading.value,
5834
+ "has-more": p(F).viewMode.value === "files" && p(F).hasMore.value,
5835
5835
  accept: e.accept,
5836
- layout: m(L).layoutMode.value,
5837
- onSelect: m(L).handleSelect,
5838
- onToggle: m(I).toggleSelection,
5839
- onLoadMore: m(I).loadMore,
5840
- onEdit: m(L).handleEditItem,
5841
- onReplace: m(L).handleReplaceItem
5836
+ layout: p(I).layoutMode.value,
5837
+ onSelect: p(I).handleSelect,
5838
+ onToggle: p(F).toggleSelection,
5839
+ onLoadMore: p(F).loadMore,
5840
+ onEdit: p(I).handleEditItem,
5841
+ onReplace: p(I).handleReplaceItem
5842
5842
  }, null, 8, [
5843
5843
  "items",
5844
5844
  "selected-ids",
@@ -5852,36 +5852,36 @@ var Ji = ["data-tpl-theme"], Yi = {
5852
5852
  "onEdit",
5853
5853
  "onReplace"
5854
5854
  ])])])]),
5855
- h(ai, {
5856
- visible: m(L).showImportUrlModal.value,
5857
- "is-importing": m(I).isImportingFromUrl.value,
5858
- error: m(I).importFromUrlError.value,
5859
- onImport: m(L).handleImportFromUrl,
5860
- onClose: n[8] ||= (e) => m(L).showImportUrlModal.value = !1
5855
+ k(ai, {
5856
+ visible: p(I).showImportUrlModal.value,
5857
+ "is-importing": p(F).isImportingFromUrl.value,
5858
+ error: p(F).importFromUrlError.value,
5859
+ onImport: p(I).handleImportFromUrl,
5860
+ onClose: n[8] ||= (e) => p(I).showImportUrlModal.value = !1
5861
5861
  }, null, 8, [
5862
5862
  "visible",
5863
5863
  "is-importing",
5864
5864
  "error",
5865
5865
  "onImport"
5866
5866
  ]),
5867
- h(rr, {
5868
- visible: !!m(L).editingItem.value,
5869
- item: m(L).editingItem.value,
5870
- onSave: m(L).handleEditSave,
5871
- onClose: n[9] ||= (e) => m(L).editingItem.value = null
5867
+ k(rr, {
5868
+ visible: !!p(I).editingItem.value,
5869
+ item: p(I).editingItem.value,
5870
+ onSave: p(I).handleEditSave,
5871
+ onClose: n[9] ||= (e) => p(I).editingItem.value = null
5872
5872
  }, null, 8, [
5873
5873
  "visible",
5874
5874
  "item",
5875
5875
  "onSave"
5876
5876
  ]),
5877
- h(Ii, {
5878
- visible: m(I).showReplaceWarning.value,
5879
- item: m(I).pendingReplaceItem.value,
5880
- "usage-info": m(I).replaceUsageInfo.value,
5881
- "is-replacing": m(I).isReplacing.value,
5882
- error: m(I).replaceError.value,
5883
- onReplace: m(L).handleReplaceFile,
5884
- onClose: m(I).cancelReplace
5877
+ k(Ii, {
5878
+ visible: p(F).showReplaceWarning.value,
5879
+ item: p(F).pendingReplaceItem.value,
5880
+ "usage-info": p(F).replaceUsageInfo.value,
5881
+ "is-replacing": p(F).isReplacing.value,
5882
+ error: p(F).replaceError.value,
5883
+ onReplace: p(I).handleReplaceFile,
5884
+ onClose: p(F).cancelReplace
5885
5885
  }, null, 8, [
5886
5886
  "visible",
5887
5887
  "item",
@@ -5891,7 +5891,7 @@ var Ji = ["data-tpl-theme"], Yi = {
5891
5891
  "onReplace",
5892
5892
  "onClose"
5893
5893
  ]),
5894
- h(T, {
5894
+ k(C, {
5895
5895
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
5896
5896
  "enter-from-class": "tpl:opacity-0",
5897
5897
  "enter-to-class": "tpl:opacity-100",
@@ -5899,7 +5899,7 @@ var Ji = ["data-tpl-theme"], Yi = {
5899
5899
  "leave-from-class": "tpl:opacity-100",
5900
5900
  "leave-to-class": "tpl:opacity-0"
5901
5901
  }, {
5902
- default: i(() => [m(I).showDeleteWarning.value ? (c(), p("div", {
5902
+ default: c(() => [p(F).showDeleteWarning.value ? (o(), O("div", {
5903
5903
  key: 0,
5904
5904
  class: "tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-lg)]",
5905
5905
  style: {
@@ -5907,85 +5907,85 @@ var Ji = ["data-tpl-theme"], Yi = {
5907
5907
  "backdrop-filter": "blur(8px)",
5908
5908
  "-webkit-backdrop-filter": "blur(8px)"
5909
5909
  },
5910
- onClick: n[12] ||= k((...e) => m(I).cancelDelete && m(I).cancelDelete(...e), ["self"])
5911
- }, [w("div", wa, [
5912
- w("h3", Ta, C(m(l).mediaLibrary.deleteWarningTitle), 1),
5913
- w("p", {
5914
- class: O(["tpl:text-xs", m(L).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
5910
+ onClick: n[12] ||= m((...e) => p(F).cancelDelete && p(F).cancelDelete(...e), ["self"])
5911
+ }, [y("div", wa, [
5912
+ y("h3", Ta, _(p(l).mediaLibrary.deleteWarningTitle), 1),
5913
+ y("p", {
5914
+ class: D(["tpl:text-xs", p(I).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
5915
5915
  style: { color: "var(--tpl-text-muted)" }
5916
- }, C(m(l).mediaLibrary.deleteWarningMessage), 3),
5917
- m(L).hasUsedFiles.value ? (c(), p("p", Ea, C(m(l).mediaLibrary.deleteWarningUsageNote), 1)) : b("", !0),
5918
- m(L).hasUsedFiles.value ? (c(), p("div", Da, [(c(!0), p(v, null, r(m(I).deleteUsageInfo.value, (e, t) => (c(), p("div", {
5916
+ }, _(p(l).mediaLibrary.deleteWarningMessage), 3),
5917
+ p(I).hasUsedFiles.value ? (o(), O("p", Ea, _(p(l).mediaLibrary.deleteWarningUsageNote), 1)) : u("", !0),
5918
+ p(I).hasUsedFiles.value ? (o(), O("div", Da, [(o(!0), O(g, null, i(p(F).deleteUsageInfo.value, (e, t) => (o(), O("div", {
5919
5919
  key: t,
5920
5920
  class: "tpl:text-xs",
5921
5921
  style: { color: "var(--tpl-text)" }
5922
- }, [e.template_count > 0 ? (c(), p(v, { key: 0 }, [w("span", Oa, C(m(L).displayItems.value.find((e) => e.id === t)?.filename || t), 1), w("span", ka, " - " + C(m(l).mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : b("", !0)]))), 128))])) : b("", !0),
5923
- w("div", Aa, [w("button", {
5922
+ }, [e.template_count > 0 ? (o(), O(g, { key: 0 }, [y("span", Oa, _(p(I).displayItems.value.find((e) => e.id === t)?.filename || t), 1), y("span", ka, " - " + _(p(l).mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : u("", !0)]))), 128))])) : u("", !0),
5923
+ y("div", Aa, [y("button", {
5924
5924
  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",
5925
5925
  style: {
5926
5926
  "border-color": "var(--tpl-border)",
5927
5927
  color: "var(--tpl-text)",
5928
5928
  "background-color": "var(--tpl-bg)"
5929
5929
  },
5930
- onClick: n[10] ||= (...e) => m(I).cancelDelete && m(I).cancelDelete(...e)
5931
- }, C(m(l).mediaLibrary.cancel), 1), w("button", {
5930
+ onClick: n[10] ||= (...e) => p(F).cancelDelete && p(F).cancelDelete(...e)
5931
+ }, _(p(l).mediaLibrary.cancel), 1), y("button", {
5932
5932
  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",
5933
5933
  style: {
5934
5934
  "border-color": "var(--tpl-danger)",
5935
5935
  color: "var(--tpl-danger)",
5936
5936
  "background-color": "var(--tpl-danger-light)"
5937
5937
  },
5938
- onClick: n[11] ||= (...e) => m(I).confirmDelete && m(I).confirmDelete(...e)
5939
- }, C(m(L).hasUsedFiles.value ? m(l).mediaLibrary.deleteAnyway : m(l).mediaLibrary.confirmDelete), 1)])
5940
- ])])) : b("", !0)]),
5938
+ onClick: n[11] ||= (...e) => p(F).confirmDelete && p(F).confirmDelete(...e)
5939
+ }, _(p(I).hasUsedFiles.value ? p(l).mediaLibrary.deleteAnyway : p(l).mediaLibrary.confirmDelete), 1)])
5940
+ ])])) : u("", !0)]),
5941
5941
  _: 1
5942
5942
  }),
5943
- w("div", ja, [w("div", Ma, [m(I).previewItem.value ? (c(), x(xi, {
5943
+ y("div", ja, [y("div", Ma, [p(F).previewItem.value ? (o(), v(xi, {
5944
5944
  key: 0,
5945
- "selected-conversion": m(L).selectedConversion.value,
5946
- "onUpdate:selectedConversion": n[13] ||= (e) => m(L).selectedConversion.value = e,
5947
- item: m(I).previewItem.value,
5948
- folders: m(I).folders.value
5945
+ "selected-conversion": p(I).selectedConversion.value,
5946
+ "onUpdate:selectedConversion": n[13] ||= (e) => p(I).selectedConversion.value = e,
5947
+ item: p(F).previewItem.value,
5948
+ folders: p(F).folders.value
5949
5949
  }, null, 8, [
5950
5950
  "selected-conversion",
5951
5951
  "item",
5952
5952
  "folders"
5953
- ])) : b("", !0)]), w("div", Na, [m(I).selectedItems.value.size > 0 ? (c(), p("div", Pa, [m(I).previewItem.value ? (c(), p("button", {
5953
+ ])) : u("", !0)]), y("div", Na, [p(F).selectedItems.value.size > 0 ? (o(), O("div", Pa, [p(F).previewItem.value ? (o(), O("button", {
5954
5954
  key: 0,
5955
5955
  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",
5956
- style: _({
5957
- borderColor: m(L).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
5958
- color: m(L).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
5956
+ style: h({
5957
+ borderColor: p(I).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
5958
+ color: p(I).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
5959
5959
  backgroundColor: "var(--tpl-bg)"
5960
5960
  }),
5961
- onClick: n[14] ||= (e) => m(L).copy(m(L).selectedUrl.value)
5962
- }, [m(L).copied.value ? (c(), x(m(ee), {
5961
+ onClick: n[14] ||= (e) => p(I).copy(p(I).selectedUrl.value)
5962
+ }, [p(I).copied.value ? (o(), v(p(M), {
5963
5963
  key: 1,
5964
5964
  size: 12,
5965
5965
  "stroke-width": 2
5966
- })) : (c(), x(m(N), {
5966
+ })) : (o(), v(p(P), {
5967
5967
  key: 0,
5968
5968
  size: 12,
5969
5969
  "stroke-width": 2
5970
- })), A(" " + C(m(L).copied.value ? m(l).mediaLibrary.copied : m(l).mediaLibrary.copyUrl), 1)], 4)) : b("", !0), D.value ? (c(), p("div", Fa, [w("button", {
5970
+ })), d(" " + _(p(I).copied.value ? p(l).mediaLibrary.copied : p(l).mediaLibrary.copyUrl), 1)], 4)) : u("", !0), A.value ? (o(), O("div", Fa, [y("button", {
5971
5971
  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",
5972
5972
  style: {
5973
5973
  "border-color": "var(--tpl-border)",
5974
5974
  color: "var(--tpl-text)",
5975
5975
  "background-color": "var(--tpl-bg)"
5976
5976
  },
5977
- onClick: n[15] ||= (e) => m(L).showMovePicker.value = !m(L).showMovePicker.value
5978
- }, C(m(l).mediaLibrary.moveSelected), 1), m(L).showMovePicker.value ? (c(), x(ui, {
5977
+ onClick: n[15] ||= (e) => p(I).showMovePicker.value = !p(I).showMovePicker.value
5978
+ }, _(p(l).mediaLibrary.moveSelected), 1), p(I).showMovePicker.value ? (o(), v(ui, {
5979
5979
  key: 0,
5980
- folders: m(I).folders.value,
5981
- "current-folder-id": m(I).currentFolderId.value,
5982
- onSelect: m(L).handleMoveToFolder,
5983
- onClose: n[16] ||= (e) => m(L).showMovePicker.value = !1
5980
+ folders: p(F).folders.value,
5981
+ "current-folder-id": p(F).currentFolderId.value,
5982
+ onSelect: p(I).handleMoveToFolder,
5983
+ onClose: n[16] ||= (e) => p(I).showMovePicker.value = !1
5984
5984
  }, null, 8, [
5985
5985
  "folders",
5986
5986
  "current-folder-id",
5987
5987
  "onSelect"
5988
- ])) : b("", !0)])) : b("", !0)])) : b("", !0), w("div", Ia, [m(I).selectedItems.value.size > 0 ? (c(), p("button", {
5988
+ ])) : u("", !0)])) : u("", !0)])) : u("", !0), y("div", Ia, [p(F).selectedItems.value.size > 0 ? (o(), O("button", {
5989
5989
  key: 0,
5990
5990
  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",
5991
5991
  style: {
@@ -5993,8 +5993,8 @@ var Ji = ["data-tpl-theme"], Yi = {
5993
5993
  color: "var(--tpl-danger)",
5994
5994
  "background-color": "var(--tpl-danger-light)"
5995
5995
  },
5996
- onClick: n[17] ||= (...e) => m(L).handleDeleteClick && m(L).handleDeleteClick(...e)
5997
- }, C(m(l).mediaLibrary.deleteSelected), 1)) : b("", !0), w("button", {
5996
+ onClick: n[17] ||= (...e) => p(I).handleDeleteClick && p(I).handleDeleteClick(...e)
5997
+ }, _(p(l).mediaLibrary.deleteSelected), 1)) : u("", !0), y("button", {
5998
5998
  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",
5999
5999
  style: {
6000
6000
  "background-color": "var(--tpl-primary)",
@@ -6002,8 +6002,8 @@ var Ji = ["data-tpl-theme"], Yi = {
6002
6002
  },
6003
6003
  disabled: !R(),
6004
6004
  onClick: ie
6005
- }, C(e.accept?.length ? m(l).mediaLibrary.selectImage : m(l).mediaLibrary.selectFile), 9, La)])])])
6006
- ])], 8, Ji)) : b("", !0)]),
6005
+ }, _(e.accept?.length ? p(l).mediaLibrary.selectImage : p(l).mediaLibrary.selectFile), 9, La)])])])
6006
+ ])], 8, Ji)) : u("", !0)]),
6007
6007
  _: 1
6008
6008
  })]));
6009
6009
  }
@@ -6011,4 +6011,4 @@ var Ji = ["data-tpl-theme"], Yi = {
6011
6011
  //#endregion
6012
6012
  export { Ii as a, ai as c, rr as d, Ee as f, be as g, xe as h, Vi as i, qr as l, z as m, qi as n, xi as o, Te as p, Ki as r, ui as s, Ra as t, gr as u };
6013
6013
 
6014
- //# sourceMappingURL=media-library-CVaNvhpM.js.map
6014
+ //# sourceMappingURL=media-library-BTF_Ko70.js.map