@templatical/editor 0.12.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/{AiChatSidebar-CXH7l1Ar.js → AiChatSidebar-B0-U5-sb.js} +3 -3
  2. package/dist/{AiFeatureMenu-BKbUUc1D.js → AiFeatureMenu-DxDwLS8B.js} +1 -1
  3. package/dist/{CloudEditor-CB16QzKM.js → CloudEditor-DaEfipBn.js} +190 -158
  4. package/dist/{CollaboratorBar-ACUA7lBJ.js → CollaboratorBar-DgwjisX2.js} +1 -1
  5. package/dist/{CountdownBlock-C-6o19qS.js → CountdownBlock-DO9fziwf.js} +1 -1
  6. package/dist/{CountdownToolbar-Dol7Q0Pv.js → CountdownToolbar-BeII06yJ.js} +1 -1
  7. package/dist/{DesignReferenceSidebar-0dTsBW08.js → DesignReferenceSidebar-BgPDbOsl.js} +19 -31
  8. package/dist/{ModuleBrowserModal-Bz9hSjMS.js → ModuleBrowserModal-DsZRr87F.js} +4 -4
  9. package/dist/{ModulePreviewCanvas-CpaumPMS.js → ModulePreviewCanvas-Dni9kK4j.js} +19 -19
  10. package/dist/{NumberWithSuffix-Bp40ik4l.js → NumberWithSuffix-D3fdj0iO.js} +1 -1
  11. package/dist/{ParagraphEditor-BqRFV_Y-.js → ParagraphEditor-CZ-cmhX3.js} +7 -7
  12. package/dist/{SaveModuleDialog-DmfvH5D0.js → SaveModuleDialog-C38VqN2T.js} +2 -2
  13. package/dist/{SnapshotHistory-C052o-8U.js → SnapshotHistory-ByloTpwh.js} +2 -2
  14. package/dist/{TemplateScoringPanel-CUs8XmIi.js → TemplateScoringPanel-CUxiPtEf.js} +1 -1
  15. package/dist/{TestEmailModal-BIIxRWUt.js → TestEmailModal-BvZBMBad.js} +2 -2
  16. package/dist/{TitleEditor-FMh54Cx5.js → TitleEditor-DbNOcvhR.js} +1 -1
  17. package/dist/{TplModal-utMtXzSO.js → TplModal-BYb-X5Bj.js} +1 -1
  18. package/dist/{blockTypeIcons-C6UGDmrC.js → blockTypeIcons-CyAom3iI.js} +4 -4
  19. package/dist/bundle-stats.json +8 -8
  20. package/dist/cdn/chunks/{AiFeatureMenu-4NhCFeTh.js → AiFeatureMenu-BSoy-SoF.js} +7 -7
  21. package/dist/cdn/chunks/{AiFeatureMenu-4NhCFeTh.js.map → AiFeatureMenu-BSoy-SoF.js.map} +1 -1
  22. package/dist/cdn/chunks/{BlockIssueBadge-BYKThwhE.js → BlockIssueBadge-BQDUuJxy.js} +4 -4
  23. package/dist/cdn/chunks/{BlockIssueBadge-BYKThwhE.js.map → BlockIssueBadge-BQDUuJxy.js.map} +1 -1
  24. package/dist/cdn/chunks/{CloudEditor-DSeihOan.js → CloudEditor-BZuzsQOZ.js} +231 -199
  25. package/dist/cdn/chunks/CloudEditor-BZuzsQOZ.js.map +1 -0
  26. package/dist/cdn/chunks/{CollaboratorBar-Dn5gXNDt.js → CollaboratorBar-DUpSrtDr.js} +3 -3
  27. package/dist/cdn/chunks/{CollaboratorBar-Dn5gXNDt.js.map → CollaboratorBar-DUpSrtDr.js.map} +1 -1
  28. package/dist/cdn/chunks/{CountdownBlock-hYoJdVOt.js → CountdownBlock-DChGTAsH.js} +2 -2
  29. package/dist/cdn/chunks/{CountdownBlock-hYoJdVOt.js.map → CountdownBlock-DChGTAsH.js.map} +1 -1
  30. package/dist/cdn/chunks/{CountdownToolbar-BQn0Kj0X.js → CountdownToolbar-C6gX2SJr.js} +3 -3
  31. package/dist/cdn/chunks/CountdownToolbar-C6gX2SJr.js.map +1 -0
  32. package/dist/cdn/chunks/{IssuesPanel-_5fEnivU.js → IssuesPanel-Bo1uhdSe.js} +6 -6
  33. package/dist/cdn/chunks/{IssuesPanel-_5fEnivU.js.map → IssuesPanel-Bo1uhdSe.js.map} +1 -1
  34. package/dist/cdn/chunks/{ModuleBrowserModal-DtCksAeW.js → ModuleBrowserModal-a-tZRCcD.js} +8 -8
  35. package/dist/cdn/chunks/{ModuleBrowserModal-DtCksAeW.js.map → ModuleBrowserModal-a-tZRCcD.js.map} +1 -1
  36. package/dist/cdn/chunks/{ModulePreviewCanvas-CCOvabZd.js → ModulePreviewCanvas-Bm6k0Op0.js} +24 -24
  37. package/dist/cdn/chunks/{ModulePreviewCanvas-CCOvabZd.js.map → ModulePreviewCanvas-Bm6k0Op0.js.map} +1 -1
  38. package/dist/cdn/chunks/{NumberWithSuffix-cdWjAK6y.js → NumberWithSuffix-HTbuD3VJ.js} +2 -2
  39. package/dist/cdn/chunks/{NumberWithSuffix-cdWjAK6y.js.map → NumberWithSuffix-HTbuD3VJ.js.map} +1 -1
  40. package/dist/cdn/chunks/{ParagraphEditor-BnhnFOW1.js → ParagraphEditor-pGrfSccu.js} +13 -13
  41. package/dist/cdn/chunks/{ParagraphEditor-BnhnFOW1.js.map → ParagraphEditor-pGrfSccu.js.map} +1 -1
  42. package/dist/cdn/chunks/{RichTextEditorContent-DV2yknp8.js → RichTextEditorContent-D7XZix_1.js} +4 -4
  43. package/dist/cdn/chunks/{RichTextEditorContent-DV2yknp8.js.map → RichTextEditorContent-D7XZix_1.js.map} +1 -1
  44. package/dist/cdn/chunks/{SaveModuleDialog-CCX5U7VA.js → SaveModuleDialog-C9PQ9x6j.js} +4 -4
  45. package/dist/cdn/chunks/{SaveModuleDialog-CCX5U7VA.js.map → SaveModuleDialog-C9PQ9x6j.js.map} +1 -1
  46. package/dist/cdn/chunks/{TitleEditor-CQqklX0D.js → TitleEditor-BvFbL16O.js} +7 -7
  47. package/dist/cdn/chunks/{TitleEditor-CQqklX0D.js.map → TitleEditor-BvFbL16O.js.map} +1 -1
  48. package/dist/cdn/chunks/{blockTypeIcons-CpGPHppB.js → blockTypeIcons-Kd1MT0u8.js} +7 -7
  49. package/dist/cdn/chunks/{blockTypeIcons-CpGPHppB.js.map → blockTypeIcons-Kd1MT0u8.js.map} +1 -1
  50. package/dist/cdn/chunks/{de-BpseTWOA.js → de-C2wOXoxs.js} +3 -1
  51. package/dist/cdn/chunks/de-C2wOXoxs.js.map +1 -0
  52. package/dist/cdn/chunks/{en-VGIQ0WNq.js → en-dR7zfNC3.js} +3 -1
  53. package/dist/cdn/chunks/en-dR7zfNC3.js.map +1 -0
  54. package/dist/cdn/chunks/{extensions-Ds9GnMcd.js → extensions-CuUjSmuA.js} +23 -23
  55. package/dist/cdn/chunks/{extensions-Ds9GnMcd.js.map → extensions-CuUjSmuA.js.map} +1 -1
  56. package/dist/cdn/chunks/{features-DxWz_Enw.js → features-DU6lA8l1.js} +471 -420
  57. package/dist/cdn/chunks/features-DU6lA8l1.js.map +1 -0
  58. package/dist/cdn/chunks/{icons-BflGUmFY.js → icons-BjHUZZyJ.js} +2 -2
  59. package/dist/cdn/chunks/{icons-BflGUmFY.js.map → icons-BjHUZZyJ.js.map} +1 -1
  60. package/dist/cdn/chunks/{media-library-C479-QcE.js → media-library-Byelliig.js} +575 -575
  61. package/dist/cdn/chunks/media-library-Byelliig.js.map +1 -0
  62. package/dist/{pt-BR-zAqpLQbW.js → cdn/chunks/pt-BR-BZ86xqK6.js} +4 -0
  63. package/dist/cdn/chunks/pt-BR-BZ86xqK6.js.map +1 -0
  64. package/dist/cdn/chunks/{quality-BL_pEvFP.js → quality-DNnYAntR.js} +83 -83
  65. package/dist/cdn/chunks/{quality-BL_pEvFP.js.map → quality-DNnYAntR.js.map} +1 -1
  66. package/dist/cdn/chunks/{renderer-C0vdAODQ.js → renderer-CZKO-Tav.js} +19 -19
  67. package/dist/cdn/chunks/{renderer-C0vdAODQ.js.map → renderer-CZKO-Tav.js.map} +1 -1
  68. package/dist/cdn/chunks/{src-DzvOWQ9S.js → src-DsqSXXjk.js} +53 -53
  69. package/dist/cdn/chunks/{src-DzvOWQ9S.js.map → src-DsqSXXjk.js.map} +1 -1
  70. package/dist/cdn/chunks/{styles-LfeoSNRA.js → styles-DiAdtiz9.js} +856 -780
  71. package/dist/cdn/chunks/styles-DiAdtiz9.js.map +1 -0
  72. package/dist/cdn/editor.css +1 -1
  73. package/dist/cdn/editor.js +124 -122
  74. package/dist/cdn/editor.js.map +1 -1
  75. package/dist/{de-BpseTWOA.js → de-C2wOXoxs.js} +2 -0
  76. package/dist/{dist-DJ9aD8yA.js → dist-Cgry6fNv.js} +53 -4
  77. package/dist/{en-VGIQ0WNq.js → en-dR7zfNC3.js} +2 -0
  78. package/dist/{cdn/chunks/pt-BR-zAqpLQbW.js → pt-BR-BZ86xqK6.js} +2 -2
  79. package/dist/style.css +1 -1
  80. package/dist/{styles-DSm9Ijxt.js → styles-D0RCAWhB.js} +857 -779
  81. package/dist/templatical-editor.js +94 -92
  82. package/dist/upload-BF7sxd1_.js +17 -0
  83. package/dist/{useEditorCore-D7dQFRkw.js → useEditorCore-DKYZ7aKk.js} +788 -735
  84. package/package.json +7 -7
  85. package/dist/cdn/chunks/CloudEditor-DSeihOan.js.map +0 -1
  86. package/dist/cdn/chunks/CountdownToolbar-BQn0Kj0X.js.map +0 -1
  87. package/dist/cdn/chunks/de-BpseTWOA.js.map +0 -1
  88. package/dist/cdn/chunks/en-VGIQ0WNq.js.map +0 -1
  89. package/dist/cdn/chunks/features-DxWz_Enw.js.map +0 -1
  90. package/dist/cdn/chunks/media-library-C479-QcE.js.map +0 -1
  91. package/dist/cdn/chunks/pt-BR-zAqpLQbW.js.map +0 -1
  92. package/dist/cdn/chunks/styles-LfeoSNRA.js.map +0 -1
@@ -1,8 +1,8 @@
1
- import { D as e, F as t, H as n, I as r, K as i, L as a, M as o, N as s, P as c, T as l, V as u, Z as d, c as f, ct as p, d as m, f as h, g, h as _, it as v, l as y, m as b, n as x, o as S, ot as C, p as w, s as T, st as E, tt as ee, u as D, v as O, x as k, y as A, z as te } from "./draggable-Bci-fq8y.js";
2
- import { Et as j, T as M, at as N, cn as ne, dn as P, ft as re, kt as F, ln as ie, on as I, ot as L, pn as ae, pt as oe, rt as se, sn as ce, st as le, un as ue, w as R, wt as de, xt as fe } from "./features-DxWz_Enw.js";
3
- import { B as pe, J as me, P as he, X as ge, h as _e, j as ve, u as ye, x as be, z as xe } from "./icons-BflGUmFY.js";
1
+ import { D as e, F as t, H as n, I as r, K as i, L as a, M as o, N as s, P as c, T as l, V as u, Z as d, c as f, ct as p, d as m, f as h, g, h as _, it as v, l as y, m as b, n as x, o as S, ot as C, p as w, s as T, st as E, tt as D, u as O, v as k, x as A, y as j, z as ee } from "./draggable-Bci-fq8y.js";
2
+ import { At as M, Dt as N, St as P, T as F, Tt as te, cn as ne, ct as re, dn as I, fn as L, it as ie, ln as R, mn as ae, mt as oe, ot as se, pt as ce, sn as le, st as ue, un as de, w as z } from "./features-DU6lA8l1.js";
3
+ import { B as fe, J as pe, P as me, X as he, h as ge, j as _e, u as ve, x as ye, z as be } from "./icons-BjHUZZyJ.js";
4
4
  //#region ../media-library/src/api-client.ts
5
- var Se = class {
5
+ var xe = class {
6
6
  authManager;
7
7
  constructor(e) {
8
8
  this.authManager = e;
@@ -37,7 +37,7 @@ var Se = class {
37
37
  async browseMedia(e) {
38
38
  let t = new URLSearchParams();
39
39
  e.folder_id && t.set("folder_id", e.folder_id), e.search && t.set("search", e.search), e.category && t.set("category", e.category), e.sort && t.set("sort", e.sort), e.cursor && t.set("cursor", e.cursor);
40
- let n = t.toString(), r = `${M(R["media.browse"], this.baseParams)}${n ? `?${n}` : ""}`, i = await this.authManager.authenticatedFetch(r, { headers: { Accept: "application/json" } });
40
+ let n = t.toString(), r = `${F(z["media.browse"], this.baseParams)}${n ? `?${n}` : ""}`, i = await this.authManager.authenticatedFetch(r, { headers: { Accept: "application/json" } });
41
41
  if (!i.ok) {
42
42
  let e = await i.json().catch(() => ({ message: `HTTP error ${i.status}` }));
43
43
  throw Error(e.message, { cause: e });
@@ -47,7 +47,7 @@ var Se = class {
47
47
  async uploadMedia(e, t) {
48
48
  let n = new FormData();
49
49
  n.append("file", e), t && n.append("folder_id", t);
50
- let r = M(R["media.upload"], this.baseParams), i = await this.authManager.authenticatedFetch(r, {
50
+ let r = F(z["media.upload"], this.baseParams), i = await this.authManager.authenticatedFetch(r, {
51
51
  method: "POST",
52
52
  headers: { Accept: "application/json" },
53
53
  body: n
@@ -59,7 +59,7 @@ var Se = class {
59
59
  return (await i.json()).data;
60
60
  }
61
61
  async updateMedia(e, t, n) {
62
- return this.request(M(R["media.update"], {
62
+ return this.request(F(z["media.update"], {
63
63
  ...this.baseParams,
64
64
  media: e
65
65
  }), {
@@ -71,13 +71,13 @@ var Se = class {
71
71
  });
72
72
  }
73
73
  async deleteMedia(e) {
74
- return this.request(M(R["media.delete"], this.baseParams), {
74
+ return this.request(F(z["media.delete"], this.baseParams), {
75
75
  method: "POST",
76
76
  body: JSON.stringify({ ids: e })
77
77
  });
78
78
  }
79
79
  async moveMedia(e, t) {
80
- return this.request(M(R["media.move"], this.baseParams), {
80
+ return this.request(F(z["media.move"], this.baseParams), {
81
81
  method: "POST",
82
82
  body: JSON.stringify({
83
83
  ids: e,
@@ -86,10 +86,10 @@ var Se = class {
86
86
  });
87
87
  }
88
88
  async getMediaFolders() {
89
- return this.request(M(R["folders.index"], this.baseParams));
89
+ return this.request(F(z["folders.index"], this.baseParams));
90
90
  }
91
91
  async createMediaFolder(e, t) {
92
- return this.request(M(R["folders.store"], this.baseParams), {
92
+ return this.request(F(z["folders.store"], this.baseParams), {
93
93
  method: "POST",
94
94
  body: JSON.stringify({
95
95
  name: e,
@@ -98,7 +98,7 @@ var Se = class {
98
98
  });
99
99
  }
100
100
  async renameMediaFolder(e, t) {
101
- return this.request(M(R["folders.update"], {
101
+ return this.request(F(z["folders.update"], {
102
102
  ...this.baseParams,
103
103
  mediaFolder: e
104
104
  }), {
@@ -107,13 +107,13 @@ var Se = class {
107
107
  });
108
108
  }
109
109
  async deleteMediaFolder(e) {
110
- return this.request(M(R["folders.destroy"], {
110
+ return this.request(F(z["folders.destroy"], {
111
111
  ...this.baseParams,
112
112
  mediaFolder: e
113
113
  }), { method: "DELETE" });
114
114
  }
115
115
  async checkMediaUsage(e) {
116
- let t = await this.authManager.authenticatedFetch(M(R["media.checkUsage"], this.baseParams), {
116
+ let t = await this.authManager.authenticatedFetch(F(z["media.checkUsage"], this.baseParams), {
117
117
  method: "POST",
118
118
  headers: {
119
119
  "Content-Type": "application/json",
@@ -128,10 +128,10 @@ var Se = class {
128
128
  return t.json();
129
129
  }
130
130
  async getFrequentlyUsed() {
131
- return this.request(M(R["media.frequentlyUsed"], this.baseParams));
131
+ return this.request(F(z["media.frequentlyUsed"], this.baseParams));
132
132
  }
133
133
  async importFromUrl(e, t) {
134
- return this.request(M(R["media.importFromUrl"], this.baseParams), {
134
+ return this.request(F(z["media.importFromUrl"], this.baseParams), {
135
135
  method: "POST",
136
136
  body: JSON.stringify({
137
137
  url: e,
@@ -142,7 +142,7 @@ var Se = class {
142
142
  async replaceMedia(e, t) {
143
143
  let n = new FormData();
144
144
  n.append("file", t);
145
- let r = M(R["media.replace"], {
145
+ let r = F(z["media.replace"], {
146
146
  ...this.baseParams,
147
147
  media: e
148
148
  }), i = await this.authManager.authenticatedFetch(r, {
@@ -159,11 +159,11 @@ var Se = class {
159
159
  };
160
160
  //#endregion
161
161
  //#region ../media-library/src/composable.ts
162
- function Ce(e) {
162
+ function Se(e) {
163
163
  if (!e.projectId) throw Error("projectId is required for useMediaLibrary");
164
- let t = new Se(e.authManager), n = d([]), r = d([]), i = d(null), a = d("files"), o = d(""), s = d(null), c = d("newest"), l = d(!1), u = d(!1), f = d(!1), p = d(null), m = d(null), h = d(/* @__PURE__ */ new Set()), g = d(null), _ = d([]), v = d({}), y = d(!1), b = d([]), x = d(!1), S = d(null), C = d(!1), w = d(null), T = d(!1), E = d(null), ee = d(null), D = 0;
165
- async function O() {
166
- let r = ++D;
164
+ let t = new xe(e.authManager), n = d([]), r = d([]), i = d(null), a = d("files"), o = d(""), s = d(null), c = d("newest"), l = d(!1), u = d(!1), f = d(!1), p = d(null), m = d(null), h = d(/* @__PURE__ */ new Set()), g = d(null), _ = d([]), v = d({}), y = d(!1), b = d([]), x = d(!1), S = d(null), C = d(!1), w = d(null), T = d(!1), E = d(null), D = d(null), O = 0;
165
+ async function k() {
166
+ let r = ++O;
167
167
  l.value = !0;
168
168
  try {
169
169
  let e = await t.browseMedia({
@@ -172,18 +172,18 @@ function Ce(e) {
172
172
  category: s.value || void 0,
173
173
  sort: c.value === "newest" ? void 0 : c.value
174
174
  });
175
- if (r !== D) return;
175
+ if (r !== O) return;
176
176
  n.value = e.data, p.value = e.meta.next_cursor, f.value = !!e.meta.next_cursor;
177
177
  } catch (t) {
178
- if (r !== D) return;
178
+ if (r !== O) return;
179
179
  e.onError?.(t);
180
180
  } finally {
181
- r === D && (l.value = !1);
181
+ r === O && (l.value = !1);
182
182
  }
183
183
  }
184
- async function k() {
184
+ async function A() {
185
185
  if (!f.value || !p.value || l.value) return;
186
- let r = ++D;
186
+ let r = ++O;
187
187
  l.value = !0;
188
188
  try {
189
189
  let e = await t.browseMedia({
@@ -193,31 +193,31 @@ function Ce(e) {
193
193
  sort: c.value === "newest" ? void 0 : c.value,
194
194
  cursor: p.value
195
195
  });
196
- if (r !== D) return;
196
+ if (r !== O) return;
197
197
  n.value = [...n.value, ...e.data], p.value = e.meta.next_cursor, f.value = !!e.meta.next_cursor;
198
198
  } catch (t) {
199
- if (r !== D) return;
199
+ if (r !== O) return;
200
200
  e.onError?.(t);
201
201
  } finally {
202
- r === D && (l.value = !1);
202
+ r === O && (l.value = !1);
203
203
  }
204
204
  }
205
- async function A(e) {
206
- o.value = e, await O();
207
- }
208
- async function te(e) {
209
- s.value = e, await O();
210
- }
211
205
  async function j(e) {
212
- c.value = e, await O();
206
+ o.value = e, await k();
207
+ }
208
+ async function ee(e) {
209
+ s.value = e, await k();
213
210
  }
214
211
  async function M(e) {
215
- a.value = "files", i.value = e, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await O();
212
+ c.value = e, await k();
216
213
  }
217
- async function N() {
218
- a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await I();
214
+ async function N(e) {
215
+ a.value = "files", i.value = e, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await k();
219
216
  }
220
- async function ne(r) {
217
+ async function P() {
218
+ a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await L();
219
+ }
220
+ async function F(r) {
221
221
  u.value = !0;
222
222
  try {
223
223
  let e = await t.uploadMedia(r, i.value);
@@ -228,7 +228,7 @@ function Ce(e) {
228
228
  u.value = !1;
229
229
  }
230
230
  }
231
- async function P(r) {
231
+ async function te(r) {
232
232
  u.value = !0, m.value = {
233
233
  current: 0,
234
234
  total: r.length
@@ -249,7 +249,7 @@ function Ce(e) {
249
249
  u.value = !1, m.value = null;
250
250
  }
251
251
  }
252
- async function re(r) {
252
+ async function ne(r) {
253
253
  if (h.value.size !== 0) try {
254
254
  let e = await t.moveMedia([...h.value], r);
255
255
  if (i.value === null) {
@@ -261,7 +261,7 @@ function Ce(e) {
261
261
  e.onError?.(t);
262
262
  }
263
263
  }
264
- async function F(r, i, a) {
264
+ async function re(r, i, a) {
265
265
  try {
266
266
  let e = await t.updateMedia(r, i, a);
267
267
  n.value = n.value.map((t) => t.id === r ? e : t), g.value?.id === r && (g.value = e);
@@ -269,21 +269,21 @@ function Ce(e) {
269
269
  e.onError?.(t);
270
270
  }
271
271
  }
272
- async function ie() {
272
+ async function I() {
273
273
  if (h.value.size !== 0) try {
274
274
  await t.deleteMedia([...h.value]), n.value = n.value.filter((e) => !h.value.has(e.id)), _.value = _.value.filter((e) => !h.value.has(e.id)), h.value = /* @__PURE__ */ new Set(), g.value = null;
275
275
  } catch (t) {
276
276
  e.onError?.(t);
277
277
  }
278
278
  }
279
- async function I() {
279
+ async function L() {
280
280
  try {
281
281
  _.value = await t.getFrequentlyUsed();
282
282
  } catch (t) {
283
283
  e.onError?.(t);
284
284
  }
285
285
  }
286
- async function L() {
286
+ async function ie() {
287
287
  if (h.value.size === 0) return !1;
288
288
  b.value = [...h.value];
289
289
  try {
@@ -295,17 +295,17 @@ function Ce(e) {
295
295
  return e.onError?.(t), !1;
296
296
  }
297
297
  }
298
- async function ae() {
298
+ async function R() {
299
299
  if (y.value = !1, b.value.length !== 0) try {
300
300
  await t.deleteMedia(b.value), n.value = n.value.filter((e) => !b.value.includes(e.id)), _.value = _.value.filter((e) => !b.value.includes(e.id)), h.value = /* @__PURE__ */ new Set(), g.value = null, b.value = [], v.value = {};
301
301
  } catch (t) {
302
302
  e.onError?.(t);
303
303
  }
304
304
  }
305
- function oe() {
305
+ function ae() {
306
306
  y.value = !1, b.value = [], v.value = {};
307
307
  }
308
- async function se(r) {
308
+ async function oe(r) {
309
309
  x.value = !0, S.value = null;
310
310
  try {
311
311
  let e = await t.importFromUrl(r, i.value);
@@ -316,17 +316,17 @@ function Ce(e) {
316
316
  x.value = !1;
317
317
  }
318
318
  }
319
- function ce(e) {
319
+ function se(e) {
320
320
  let t = new Set(h.value);
321
321
  t.has(e) ? t.delete(e) : t.add(e), h.value = t;
322
322
  }
323
- function le() {
323
+ function ce() {
324
324
  h.value = /* @__PURE__ */ new Set(), g.value = null;
325
325
  }
326
- function ue(e) {
326
+ function le(e) {
327
327
  g.value = e, h.value = /* @__PURE__ */ new Set([e.id]);
328
328
  }
329
- async function R() {
329
+ async function ue() {
330
330
  try {
331
331
  r.value = await t.getMediaFolders();
332
332
  } catch (t) {
@@ -336,60 +336,60 @@ function Ce(e) {
336
336
  async function de(n, r) {
337
337
  try {
338
338
  let e = await t.createMediaFolder(n, r);
339
- return await R(), e;
339
+ return await ue(), e;
340
340
  } catch (t) {
341
341
  return e.onError?.(t), null;
342
342
  }
343
343
  }
344
- function fe(e, t) {
344
+ function z(e, t) {
345
345
  for (let n of e) {
346
346
  if (n.id === t) return n;
347
347
  if (n.children) {
348
- let e = fe(n.children, t);
348
+ let e = z(n.children, t);
349
349
  if (e) return e;
350
350
  }
351
351
  }
352
352
  return null;
353
353
  }
354
- async function pe(n, r) {
354
+ async function fe(n, r) {
355
355
  try {
356
- await t.renameMediaFolder(n, r), await R();
356
+ await t.renameMediaFolder(n, r), await ue();
357
357
  } catch (t) {
358
358
  e.onError?.(t);
359
359
  }
360
360
  }
361
- async function me(n) {
361
+ async function pe(n) {
362
362
  try {
363
- let e = fe(r.value, n)?.parent_id ?? null;
364
- await t.deleteMediaFolder(n), i.value === n && (i.value = e), await R(), await O();
363
+ let e = z(r.value, n)?.parent_id ?? null;
364
+ await t.deleteMediaFolder(n), i.value === n && (i.value = e), await ue(), await k();
365
365
  } catch (t) {
366
366
  e.onError?.(t);
367
367
  }
368
368
  }
369
- async function he(n) {
369
+ async function me(n) {
370
370
  E.value = n, w.value = null;
371
371
  try {
372
- ee.value = (await t.checkMediaUsage([n.id])).data[n.id] ?? null, T.value = !0;
372
+ D.value = (await t.checkMediaUsage([n.id])).data[n.id] ?? null, T.value = !0;
373
373
  } catch (t) {
374
374
  e.onError?.(t);
375
375
  }
376
376
  }
377
- function ge() {
378
- T.value = !1, E.value = null, ee.value = null, w.value = null;
377
+ function he() {
378
+ T.value = !1, E.value = null, D.value = null, w.value = null;
379
379
  }
380
- async function _e(r) {
380
+ async function ge(r) {
381
381
  if (!E.value) return null;
382
382
  C.value = !0, w.value = null;
383
383
  try {
384
384
  let e = await t.replaceMedia(E.value.id, r);
385
- return n.value = n.value.map((t) => t.id === e.id ? e : t), _.value = _.value.map((t) => t.id === e.id ? e : t), g.value?.id === e.id && (g.value = e), T.value = !1, E.value = null, ee.value = null, e;
385
+ return n.value = n.value.map((t) => t.id === e.id ? e : t), _.value = _.value.map((t) => t.id === e.id ? e : t), g.value?.id === e.id && (g.value = e), T.value = !1, E.value = null, D.value = null, e;
386
386
  } catch (t) {
387
387
  return w.value = t instanceof Error ? t.message : "Replace failed", e.onError?.(t), null;
388
388
  } finally {
389
389
  C.value = !1;
390
390
  }
391
391
  }
392
- async function ve(r, i) {
392
+ async function _e(r, i) {
393
393
  try {
394
394
  let e = await t.replaceMedia(r, i);
395
395
  return n.value = n.value.map((t) => t.id === e.id ? e : t), _.value = _.value.map((t) => t.id === e.id ? e : t), g.value?.id === e.id && (g.value = e), e;
@@ -414,47 +414,47 @@ function Ce(e) {
414
414
  frequentlyUsedItems: _,
415
415
  deleteUsageInfo: v,
416
416
  showDeleteWarning: y,
417
- loadItems: O,
418
- loadMore: k,
419
- search: A,
420
- filterByCategory: te,
421
- sortBy: j,
422
- navigateToFolder: M,
423
- showFrequentlyUsed: N,
424
- uploadFile: ne,
425
- uploadFiles: P,
426
- moveSelected: re,
427
- updateFile: F,
428
- deleteSelected: ie,
417
+ loadItems: k,
418
+ loadMore: A,
419
+ search: j,
420
+ filterByCategory: ee,
421
+ sortBy: M,
422
+ navigateToFolder: N,
423
+ showFrequentlyUsed: P,
424
+ uploadFile: F,
425
+ uploadFiles: te,
426
+ moveSelected: ne,
427
+ updateFile: re,
428
+ deleteSelected: I,
429
429
  isImportingFromUrl: x,
430
430
  importFromUrlError: S,
431
- importFromUrl: se,
432
- toggleSelection: ce,
433
- clearSelection: le,
434
- selectItem: ue,
435
- loadFolders: R,
431
+ importFromUrl: oe,
432
+ toggleSelection: se,
433
+ clearSelection: ce,
434
+ selectItem: le,
435
+ loadFolders: ue,
436
436
  createFolder: de,
437
- renameFolder: pe,
438
- deleteFolder: me,
439
- findFolderInTree: fe,
440
- loadFrequentlyUsed: I,
441
- checkUsageBeforeDelete: L,
442
- confirmDelete: ae,
443
- cancelDelete: oe,
437
+ renameFolder: fe,
438
+ deleteFolder: pe,
439
+ findFolderInTree: z,
440
+ loadFrequentlyUsed: L,
441
+ checkUsageBeforeDelete: ie,
442
+ confirmDelete: R,
443
+ cancelDelete: ae,
444
444
  isReplacing: C,
445
445
  replaceError: w,
446
446
  showReplaceWarning: T,
447
447
  pendingReplaceItem: E,
448
- replaceUsageInfo: ee,
449
- checkUsageBeforeReplace: he,
450
- cancelReplace: ge,
451
- replaceFile: _e,
452
- replaceMediaDirectly: ve
448
+ replaceUsageInfo: D,
449
+ checkUsageBeforeReplace: me,
450
+ cancelReplace: he,
451
+ replaceFile: ge,
452
+ replaceMediaDirectly: _e
453
453
  };
454
454
  }
455
455
  //#endregion
456
456
  //#region ../media-library/src/composables/useI18n.ts
457
- function z(e) {
457
+ function B(e) {
458
458
  let t = e ?? l("translations"), n = i(t) ? t.value : t;
459
459
  function r(e, t) {
460
460
  return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
@@ -466,14 +466,14 @@ function z(e) {
466
466
  }
467
467
  //#endregion
468
468
  //#region ../media-library/src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
469
- var we = {
469
+ var Ce = {
470
470
  key: 0,
471
471
  class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs",
472
472
  style: { color: "var(--tpl-text-muted)" }
473
- }, Te = ["onClick"], Ee = {
473
+ }, we = ["onClick"], Te = {
474
474
  key: 1,
475
475
  style: { color: "var(--tpl-text)" }
476
- }, De = /* @__PURE__ */ k({
476
+ }, Ee = /* @__PURE__ */ A({
477
477
  __name: "MediaBreadcrumb",
478
478
  props: {
479
479
  folders: {},
@@ -481,7 +481,7 @@ var we = {
481
481
  },
482
482
  emits: ["navigate"],
483
483
  setup(e, { emit: t }) {
484
- let n = e, r = t, { t: i } = z(), a = h(() => {
484
+ let n = e, r = t, { t: i } = B(), a = h(() => {
485
485
  if (!n.currentFolderId) return [];
486
486
  let e = [];
487
487
  return s(n.folders, n.currentFolderId, e), e;
@@ -493,11 +493,11 @@ var we = {
493
493
  }
494
494
  return !1;
495
495
  }
496
- return (e, t) => a.value.length > 0 ? (o(), g("div", we, [w("button", {
496
+ return (e, t) => a.value.length > 0 ? (o(), g("div", Ce, [w("button", {
497
497
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
498
498
  style: { color: "var(--tpl-primary)" },
499
499
  onClick: t[0] ||= (e) => r("navigate", null)
500
- }, p(v(i).mediaLibrary.allFiles), 1), (o(!0), g(D, null, c(a.value, (e, t) => (o(), g(D, { key: e.id }, [A(v(de), {
500
+ }, p(v(i).mediaLibrary.allFiles), 1), (o(!0), g(O, null, c(a.value, (e, t) => (o(), g(O, { key: e.id }, [j(v(te), {
501
501
  size: 12,
502
502
  "stroke-width": 2
503
503
  }), t < a.value.length - 1 ? (o(), g("button", {
@@ -505,12 +505,12 @@ var we = {
505
505
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
506
506
  style: { color: "var(--tpl-primary)" },
507
507
  onClick: (t) => r("navigate", e.id)
508
- }, p(e.name), 9, Te)) : (o(), g("span", Ee, p(e.name), 1))], 64))), 128))])) : _("", !0);
508
+ }, p(e.name), 9, we)) : (o(), g("span", Te, p(e.name), 1))], 64))), 128))])) : _("", !0);
509
509
  }
510
510
  });
511
511
  //#endregion
512
512
  //#region ../media-library/src/composables/useMediaCategories.ts
513
- function Oe() {
513
+ function De() {
514
514
  let e = l("planConfig"), t = h(() => e.config.value?.media ?? null), n = h(() => t.value?.use_media_library ?? !0), r = h(() => t.value?.categories ?? null), i = h(() => r.value ? Object.values(r.value).flatMap((e) => e.mime_types) : []), a = h(() => i.value.join(",")), o = h(() => t.value?.max_file_size ?? 0);
515
515
  function s(e, t) {
516
516
  return r.value ? !t || t.length === 0 ? i.value.includes(e) : t.some((t) => r.value[t]?.mime_types.includes(e)) : !1;
@@ -536,14 +536,14 @@ function Oe() {
536
536
  }
537
537
  //#endregion
538
538
  //#region ../media-library/src/composables/useImageCrop.ts
539
- var ke = {
539
+ var Oe = {
540
540
  free: void 0,
541
541
  square: 1,
542
542
  landscape43: 4 / 3,
543
543
  landscape169: 16 / 9,
544
544
  original: void 0
545
545
  };
546
- function Ae(e) {
546
+ function ke(e) {
547
547
  return e === "image/png" || e === "image/gif" ? {
548
548
  mimeType: "image/png",
549
549
  quality: 1
@@ -555,7 +555,7 @@ function Ae(e) {
555
555
  quality: .92
556
556
  };
557
557
  }
558
- function je(e, t, n) {
558
+ function Ae(e, t, n) {
559
559
  let r = e.width, i = e.height;
560
560
  if (!t && !n) return e;
561
561
  let a = r, o = i;
@@ -569,7 +569,7 @@ function je(e, t, n) {
569
569
  let c = s.getContext("2d");
570
570
  return c && (c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(e, 0, 0, a, o)), s;
571
571
  }
572
- function Me(e, t, n) {
572
+ function je(e, t, n) {
573
573
  return new Promise((r, i) => {
574
574
  e.toBlob((e) => {
575
575
  if (!e) {
@@ -581,7 +581,7 @@ function Me(e, t, n) {
581
581
  }, n.mimeType, n.quality);
582
582
  });
583
583
  }
584
- function Ne(e, t, n, r) {
584
+ function Me(e, t, n, r) {
585
585
  let i = e, a = t;
586
586
  if (n && i > n) {
587
587
  let e = n / i;
@@ -598,10 +598,10 @@ function Ne(e, t, n, r) {
598
598
  }
599
599
  //#endregion
600
600
  //#region ../media-library/src/keys.ts
601
- var Pe = Symbol("templaticalMediaPopoverTarget");
601
+ var Ne = Symbol("templaticalMediaPopoverTarget");
602
602
  //#endregion
603
603
  //#region ../../node_modules/.pnpm/vue-advanced-cropper@2.8.9_vue@3.5.39_typescript@6.0.3_/node_modules/vue-advanced-cropper/dist/index.esm-bundler.js
604
- function Fe(e, t) {
604
+ function Pe(e, t) {
605
605
  var n = Object.keys(e);
606
606
  if (Object.getOwnPropertySymbols) {
607
607
  var r = Object.getOwnPropertySymbols(e);
@@ -611,18 +611,18 @@ function Fe(e, t) {
611
611
  }
612
612
  return n;
613
613
  }
614
- function B(e) {
614
+ function V(e) {
615
615
  for (var t = 1; t < arguments.length; t++) {
616
616
  var n = arguments[t] == null ? {} : arguments[t];
617
- t % 2 ? Fe(Object(n), !0).forEach((function(t) {
618
- V(e, t, n[t]);
619
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Fe(Object(n)).forEach((function(t) {
617
+ t % 2 ? Pe(Object(n), !0).forEach((function(t) {
618
+ H(e, t, n[t]);
619
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Pe(Object(n)).forEach((function(t) {
620
620
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
621
621
  }));
622
622
  }
623
623
  return e;
624
624
  }
625
- function V(e, t, n) {
625
+ function H(e, t, n) {
626
626
  return t in e ? Object.defineProperty(e, t, {
627
627
  value: n,
628
628
  enumerable: !0,
@@ -630,7 +630,7 @@ function V(e, t, n) {
630
630
  writable: !0
631
631
  }) : e[t] = n, e;
632
632
  }
633
- function Ie(e, t) {
633
+ function Fe(e, t) {
634
634
  if (e == null) return {};
635
635
  var n, r, i = function(e, t) {
636
636
  if (e == null) return {};
@@ -644,28 +644,28 @@ function Ie(e, t) {
644
644
  }
645
645
  return i;
646
646
  }
647
- function Le(e) {
647
+ function Ie(e) {
648
648
  return function(e) {
649
- if (Array.isArray(e)) return Re(e);
649
+ if (Array.isArray(e)) return Le(e);
650
650
  }(e) || function(e) {
651
651
  if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
652
652
  }(e) || function(e, t) {
653
653
  if (e) {
654
- if (typeof e == "string") return Re(e, t);
654
+ if (typeof e == "string") return Le(e, t);
655
655
  var n = Object.prototype.toString.call(e).slice(8, -1);
656
656
  if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
657
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Re(e, t);
657
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Le(e, t);
658
658
  }
659
659
  }(e) || function() {
660
660
  throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
661
661
  }();
662
662
  }
663
- function Re(e, t) {
663
+ function Le(e, t) {
664
664
  (t == null || t > e.length) && (t = e.length);
665
665
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
666
666
  return r;
667
667
  }
668
- var ze, Be, Ve, H = (ze = function(e) {
668
+ var Re, ze, Be, U = (Re = function(e) {
669
669
  (function() {
670
670
  var t = {}.hasOwnProperty;
671
671
  function n() {
@@ -687,15 +687,15 @@ var ze, Be, Ve, H = (ze = function(e) {
687
687
  }
688
688
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
689
689
  })();
690
- }, ze(Ve = {
691
- path: Be,
690
+ }, Re(Be = {
691
+ path: ze,
692
692
  exports: {},
693
693
  require: function(e, t) {
694
694
  return function() {
695
695
  throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
696
- }(t == null && Ve.path);
696
+ }(t == null && Be.path);
697
697
  }
698
- }, Ve.exports), Ve.exports), U = function(e) {
698
+ }, Be.exports), Be.exports), W = function(e) {
699
699
  return function(t, n) {
700
700
  if (!t) return e;
701
701
  var r;
@@ -707,7 +707,7 @@ var ze, Be, Ve, H = (ze = function(e) {
707
707
  }), "") : "");
708
708
  };
709
709
  };
710
- function He(e, t, n) {
710
+ function Ve(e, t, n) {
711
711
  var r, i, a, o, s;
712
712
  function c() {
713
713
  var l = Date.now() - o;
@@ -725,65 +725,65 @@ function He(e, t, n) {
725
725
  r &&= (s = e.apply(a, i), a = i = null, clearTimeout(r), null);
726
726
  }, l;
727
727
  }
728
- He.debounce = He;
729
- var Ue = He, W = function() {
730
- return W = Object.assign || function(e) {
728
+ Ve.debounce = Ve;
729
+ var He = Ve, G = function() {
730
+ return G = Object.assign || function(e) {
731
731
  for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
732
732
  return e;
733
- }, W.apply(this, arguments);
733
+ }, G.apply(this, arguments);
734
734
  };
735
- function We(e, t) {
735
+ function Ue(e, t) {
736
736
  var n, r;
737
737
  return e && t ? (n = "" + e + t[0].toUpperCase() + t.slice(1), r = e + "-" + t) : (n = e || t, r = e || t), {
738
738
  name: n,
739
739
  classname: r
740
740
  };
741
741
  }
742
- function Ge(e) {
742
+ function We(e) {
743
743
  return /^blob:/.test(e);
744
744
  }
745
- function Ke(e) {
746
- return Ge(e) || function(e) {
745
+ function Ge(e) {
746
+ return We(e) || function(e) {
747
747
  return /^data:/.test(e);
748
748
  }(e);
749
749
  }
750
- function qe(e) {
750
+ function Ke(e) {
751
751
  return !!(e && e.constructor && e.call && e.apply);
752
752
  }
753
- function G(e) {
753
+ function K(e) {
754
754
  return e === void 0;
755
755
  }
756
- function Je(e) {
756
+ function qe(e) {
757
757
  return typeof e == "object" && !!e;
758
758
  }
759
- function Ye(e, t, n) {
759
+ function Je(e, t, n) {
760
760
  var r = {};
761
- return Je(e) ? (Object.keys(t).forEach((function(i) {
762
- G(e[i]) ? r[i] = t[i] : Je(t[i]) ? Je(e[i]) ? r[i] = Ye(e[i], t[i], n[i]) : r[i] = e[i] ? t[i] : n[i] : !0 === t[i] || !1 === t[i] ? r[i] = !!e[i] : r[i] = e[i];
761
+ return qe(e) ? (Object.keys(t).forEach((function(i) {
762
+ K(e[i]) ? r[i] = t[i] : qe(t[i]) ? qe(e[i]) ? r[i] = Je(e[i], t[i], n[i]) : r[i] = e[i] ? t[i] : n[i] : !0 === t[i] || !1 === t[i] ? r[i] = !!e[i] : r[i] = e[i];
763
763
  })), r) : e ? t : n;
764
764
  }
765
- function Xe(e) {
765
+ function Ye(e) {
766
766
  var t = Number(e);
767
767
  return Number.isNaN(t) ? e : t;
768
768
  }
769
- function Ze(e) {
769
+ function Xe(e) {
770
770
  return typeof (e == "number" || function(e) {
771
771
  return typeof e == "object" && !!e;
772
- }(e) && toString.call(e) == "[object Number]") && !Qe(e);
772
+ }(e) && toString.call(e) == "[object Number]") && !Ze(e);
773
773
  }
774
- function Qe(e) {
774
+ function Ze(e) {
775
775
  return e != e;
776
776
  }
777
- function $e(e, t) {
777
+ function Qe(e, t) {
778
778
  return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
779
779
  }
780
- var et = function(e, t) {
780
+ var $e = function(e, t) {
781
781
  e === void 0 && (e = {}), t === void 0 && (t = {}), this.type = "manipulateImage", this.move = e, this.scale = t;
782
- }, tt = function(e, t) {
782
+ }, et = function(e, t) {
783
783
  t === void 0 && (t = {}), this.type = "resize", this.directions = e, this.params = t;
784
- }, nt = function(e) {
784
+ }, tt = function(e) {
785
785
  this.type = "move", this.directions = e;
786
- }, rt = function() {
786
+ }, nt = function() {
787
787
  function e(e, t, n, r, i) {
788
788
  this.type = "drag", this.nativeEvent = e, this.position = n, this.previousPosition = r, this.element = t, this.anchor = i;
789
789
  }
@@ -801,7 +801,7 @@ var et = function(e, t) {
801
801
  top: 0
802
802
  };
803
803
  }, e;
804
- }(), it = {
804
+ }(), rt = {
805
805
  name: "DraggableElement",
806
806
  props: { classname: { type: String } },
807
807
  beforeMount: function() {
@@ -822,7 +822,7 @@ var et = function(e, t) {
822
822
  this.hovered && !this.touches.length && (this.hovered = !1, this.$emit("leave"));
823
823
  },
824
824
  onTouchStart: function(e) {
825
- e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches = Le(e.touches), this.hovered ||= (this.$emit("enter"), !0), e.touches.length && this.initAnchor(this.touches.reduce((function(t, n) {
825
+ e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches = Ie(e.touches), this.hovered ||= (this.$emit("enter"), !0), e.touches.length && this.initAnchor(this.touches.reduce((function(t, n) {
826
826
  return {
827
827
  clientX: t.clientX + n.clientX / e.touches.length,
828
828
  clientY: t.clientY + n.clientY / e.touches.length
@@ -868,11 +868,11 @@ var et = function(e, t) {
868
868
  };
869
869
  },
870
870
  processMove: function(e, t) {
871
- var n = Le(t);
871
+ var n = Ie(t);
872
872
  if (this.touches.length) {
873
873
  if (this.touches.length === 1 && n.length === 1) {
874
874
  var r = this.$refs.draggable;
875
- this.$emit("drag", new rt(e, r, {
875
+ this.$emit("drag", new nt(e, r, {
876
876
  left: n[0].clientX,
877
877
  top: n[0].clientY
878
878
  }, {
@@ -894,7 +894,7 @@ var et = function(e, t) {
894
894
  "enter"
895
895
  ]
896
896
  };
897
- it.render = function(e, n, r, i, a, s) {
897
+ rt.render = function(e, n, r, i, a, s) {
898
898
  return o(), b("div", {
899
899
  ref: "draggable",
900
900
  class: r.classname,
@@ -912,9 +912,9 @@ it.render = function(e, n, r, i, a, s) {
912
912
  }
913
913
  }, [t(e.$slots, "default")], 34);
914
914
  };
915
- var at = U("vue-handler-wrapper"), ot = {
915
+ var it = W("vue-handler-wrapper"), at = {
916
916
  name: "HandlerWrapper",
917
- components: { DraggableElement: it },
917
+ components: { DraggableElement: rt },
918
918
  props: {
919
919
  horizontalPosition: { type: String },
920
920
  verticalPosition: { type: String },
@@ -926,12 +926,12 @@ var at = U("vue-handler-wrapper"), ot = {
926
926
  computed: { classes: function() {
927
927
  var e;
928
928
  if (this.horizontalPosition || this.verticalPosition) {
929
- var t, n = We(this.horizontalPosition, this.verticalPosition);
930
- e = at((V(t = {}, n.classname, !0), V(t, "disabled", this.disabled), t));
931
- } else e = at({ disabled: this.disabled });
929
+ var t, n = Ue(this.horizontalPosition, this.verticalPosition);
930
+ e = it((H(t = {}, n.classname, !0), H(t, "disabled", this.disabled), t));
931
+ } else e = it({ disabled: this.disabled });
932
932
  return {
933
933
  root: e,
934
- draggable: at("draggable")
934
+ draggable: it("draggable")
935
935
  };
936
936
  } },
937
937
  emits: [
@@ -941,9 +941,9 @@ var at = U("vue-handler-wrapper"), ot = {
941
941
  "drag-end"
942
942
  ]
943
943
  };
944
- ot.render = function(e, n, i, a, s, c) {
944
+ at.render = function(e, n, i, a, s, c) {
945
945
  var l = r("DraggableElement");
946
- return o(), b("div", { class: c.classes.root }, [A(l, {
946
+ return o(), b("div", { class: c.classes.root }, [j(l, {
947
947
  class: c.classes.draggable,
948
948
  onDrag: n[1] ||= function(t) {
949
949
  return e.$emit("drag", t);
@@ -964,9 +964,9 @@ ot.render = function(e, n, i, a, s, c) {
964
964
  _: 3
965
965
  }, 8, ["class"])], 2);
966
966
  };
967
- var st = U("vue-line-wrapper"), ct = {
967
+ var ot = W("vue-line-wrapper"), st = {
968
968
  name: "LineWrapper",
969
- components: { DraggableElement: it },
969
+ components: { DraggableElement: rt },
970
970
  props: {
971
971
  position: {
972
972
  type: String,
@@ -979,7 +979,7 @@ var st = U("vue-line-wrapper"), ct = {
979
979
  },
980
980
  computed: { classname: function() {
981
981
  var e;
982
- return st((V(e = {}, this.position, !0), V(e, "disabled", this.disabled), e));
982
+ return ot((H(e = {}, this.position, !0), H(e, "disabled", this.disabled), e));
983
983
  } },
984
984
  emits: [
985
985
  "leave",
@@ -988,7 +988,7 @@ var st = U("vue-line-wrapper"), ct = {
988
988
  "drag-end"
989
989
  ]
990
990
  };
991
- ct.render = function(e, n, i, a, s, c) {
991
+ st.render = function(e, n, i, a, s, c) {
992
992
  var l = r("DraggableElement");
993
993
  return o(), b(l, {
994
994
  class: c.classname,
@@ -1011,23 +1011,23 @@ ct.render = function(e, n, i, a, s, c) {
1011
1011
  _: 3
1012
1012
  }, 8, ["class"]);
1013
1013
  };
1014
- var K = [
1014
+ var q = [
1015
1015
  "left",
1016
1016
  "right",
1017
1017
  "top",
1018
1018
  "bottom"
1019
- ], lt = ["left", "right"], ut = ["top", "bottom"], dt = ["left", "top"], ft = [
1019
+ ], ct = ["left", "right"], lt = ["top", "bottom"], ut = ["left", "top"], dt = [
1020
1020
  "fill-area",
1021
1021
  "fit-area",
1022
1022
  "stencil",
1023
1023
  "none"
1024
- ], pt = {
1024
+ ], ft = {
1025
1025
  left: 0,
1026
1026
  top: 0,
1027
1027
  width: 0,
1028
1028
  height: 0
1029
1029
  };
1030
- function mt(e, t, n) {
1030
+ function pt(e, t, n) {
1031
1031
  return !(n ||= [
1032
1032
  "width",
1033
1033
  "height",
@@ -1037,7 +1037,7 @@ function mt(e, t, n) {
1037
1037
  return e[n] !== t[n];
1038
1038
  }));
1039
1039
  }
1040
- function q(e) {
1040
+ function J(e) {
1041
1041
  return {
1042
1042
  left: e.left,
1043
1043
  top: e.top,
@@ -1045,31 +1045,31 @@ function q(e) {
1045
1045
  bottom: e.top + e.height
1046
1046
  };
1047
1047
  }
1048
- function ht(e, t) {
1048
+ function mt(e, t) {
1049
1049
  return {
1050
1050
  left: e.left - t.left,
1051
1051
  top: e.top - t.top
1052
1052
  };
1053
1053
  }
1054
- function J(e) {
1054
+ function Y(e) {
1055
1055
  return {
1056
1056
  left: e.left + e.width / 2,
1057
1057
  top: e.top + e.height / 2
1058
1058
  };
1059
1059
  }
1060
- function gt(e, t) {
1060
+ function ht(e, t) {
1061
1061
  var n = {
1062
1062
  left: 0,
1063
1063
  top: 0,
1064
1064
  right: 0,
1065
1065
  bottom: 0
1066
1066
  };
1067
- return K.forEach((function(r) {
1068
- var i = t[r], a = q(e)[r];
1067
+ return q.forEach((function(r) {
1068
+ var i = t[r], a = J(e)[r];
1069
1069
  n[r] = i !== void 0 && a !== void 0 ? r === "left" || r === "top" ? Math.max(0, i - a) : Math.max(0, a - i) : 0;
1070
1070
  })), n;
1071
1071
  }
1072
- function Y(e, t) {
1072
+ function gt(e, t) {
1073
1073
  return {
1074
1074
  left: e.left - t.left,
1075
1075
  top: e.top - t.top,
@@ -1084,7 +1084,7 @@ function _t(e) {
1084
1084
  };
1085
1085
  }
1086
1086
  function X(e, t) {
1087
- return W(W({}, e), {
1087
+ return G(G({}, e), {
1088
1088
  left: e.left + t.left,
1089
1089
  top: e.top + t.top
1090
1090
  });
@@ -1092,7 +1092,7 @@ function X(e, t) {
1092
1092
  function Z(e, t, n, r) {
1093
1093
  if (t !== 1) {
1094
1094
  if (n) {
1095
- var i = J(e);
1095
+ var i = Y(e);
1096
1096
  return {
1097
1097
  width: e.width * t,
1098
1098
  height: e.height * t,
@@ -1119,7 +1119,7 @@ function yt(e, t) {
1119
1119
  var n = {
1120
1120
  left: 0,
1121
1121
  top: 0
1122
- }, r = gt(e, t);
1122
+ }, r = ht(e, t);
1123
1123
  return r.left && r.left > 0 ? n.left = r.left : r.right && r.right > 0 && (n.left = -r.right), r.top && r.top > 0 ? n.top = r.top : r.bottom && r.bottom > 0 && (n.top = -r.bottom), n;
1124
1124
  }
1125
1125
  function bt(e, t) {
@@ -1157,7 +1157,7 @@ function Ct(e, t) {
1157
1157
  };
1158
1158
  }
1159
1159
  function wt(e, t) {
1160
- var n = gt($(e, t), t);
1160
+ var n = ht($(e, t), t);
1161
1161
  return n.left + n.right + n.top + n.bottom ? n.left + n.right > n.top + n.bottom ? Math.min((e.width + n.left + n.right) / e.width, vt(e, t)) : Math.min((e.height + n.top + n.bottom) / e.height, vt(e, t)) : 1;
1162
1162
  }
1163
1163
  function $(e, t, n) {
@@ -1172,7 +1172,7 @@ function Tt(e) {
1172
1172
  };
1173
1173
  }
1174
1174
  function Et(e, t) {
1175
- return W(W({}, e), {
1175
+ return G(G({}, e), {
1176
1176
  minWidth: Math.min(t.width, e.minWidth),
1177
1177
  minHeight: Math.min(t.height, e.minHeight),
1178
1178
  maxWidth: Math.min(t.width, e.maxWidth),
@@ -1182,7 +1182,7 @@ function Et(e, t) {
1182
1182
  function Dt(e, t, n) {
1183
1183
  n === void 0 && (n = !0);
1184
1184
  var r = {};
1185
- return K.forEach((function(i) {
1185
+ return q.forEach((function(i) {
1186
1186
  var a = e[i], o = t[i];
1187
1187
  a !== void 0 && o !== void 0 ? r[i] = i === "left" || i === "top" ? n ? Math.max(a, o) : Math.min(a, o) : n ? Math.min(a, o) : Math.max(a, o) : o === void 0 ? a !== void 0 && (r[i] = a) : r[i] = o;
1188
1188
  })), r;
@@ -1252,20 +1252,20 @@ function Nt(e) {
1252
1252
  return Mt({
1253
1253
  coordinates: e,
1254
1254
  positionRestrictions: a,
1255
- event: new nt({
1255
+ event: new tt({
1256
1256
  left: t.left - e.left,
1257
1257
  top: t.top - e.top
1258
1258
  })
1259
1259
  });
1260
- }, l = W({}, t);
1260
+ }, l = G({}, t);
1261
1261
  return (Array.isArray(n) ? n : [n]).forEach((function(e) {
1262
1262
  var t = {};
1263
- G((t = typeof e == "function" ? e({
1263
+ K((t = typeof e == "function" ? e({
1264
1264
  coordinates: l,
1265
1265
  imageSize: r,
1266
1266
  visibleArea: s
1267
- }) : e).width) && G(t.height) || (l = function(e, t) {
1268
- return c(W(W(W({}, e), jt({
1267
+ }) : e).width) && K(t.height) || (l = function(e, t) {
1268
+ return c(G(G(G({}, e), jt({
1269
1269
  width: t.width,
1270
1270
  height: t.height,
1271
1271
  sizeRestrictions: i,
@@ -1277,12 +1277,12 @@ function Nt(e) {
1277
1277
  left: e.left,
1278
1278
  top: e.top
1279
1279
  });
1280
- }(l, W(W({}, l), t))), G(t.left) && G(t.top) || (l = c(l, W(W({}, l), t)));
1280
+ }(l, G(G({}, l), t))), K(t.left) && K(t.top) || (l = c(l, G(G({}, l), t)));
1281
1281
  })), l;
1282
1282
  }
1283
1283
  function Pt(e) {
1284
- var t = e.getAreaRestrictions, n = e.boundaries, r = e.coordinates, i = e.visibleArea, a = e.stencilSize, o = e.sizeRestrictions, s = e.positionRestrictions, c, l, u, d = W({}, r), f = W({}, i), p = W({}, a);
1285
- c = Q(p), l = Q(d), u === void 0 && (u = .001), (c === 0 || l === 0 ? Math.abs(l - c) < u : Math.abs(l / c) < 1 + u && Math.abs(l / c) > 1 - u) || (d = W(W({}, d), jt({
1284
+ var t = e.getAreaRestrictions, n = e.boundaries, r = e.coordinates, i = e.visibleArea, a = e.stencilSize, o = e.sizeRestrictions, s = e.positionRestrictions, c, l, u, d = G({}, r), f = G({}, i), p = G({}, a);
1285
+ c = Q(p), l = Q(d), u === void 0 && (u = .001), (c === 0 || l === 0 ? Math.abs(l - c) < u : Math.abs(l / c) < 1 + u && Math.abs(l / c) > 1 - u) || (d = G(G({}, d), jt({
1286
1286
  sizeRestrictions: o,
1287
1287
  width: d.width,
1288
1288
  height: d.height,
@@ -1295,16 +1295,16 @@ function Pt(e) {
1295
1295
  visibleArea: f,
1296
1296
  type: "resize"
1297
1297
  }));
1298
- return m !== 1 && (f = Z(f, m), d = Z(d, m)), f = $(f = X(f, ht(J(d), J(f))), t({
1298
+ return m !== 1 && (f = Z(f, m), d = Z(d, m)), f = $(f = X(f, mt(Y(d), Y(f))), t({
1299
1299
  visibleArea: f,
1300
1300
  type: "move"
1301
1301
  })), {
1302
- coordinates: d = $(d, Ot(q(f), s)),
1302
+ coordinates: d = $(d, Ot(J(f), s)),
1303
1303
  visibleArea: f
1304
1304
  };
1305
1305
  }
1306
1306
  function Ft(e) {
1307
- var t = e.event, n = e.getAreaRestrictions, r = e.boundaries, i = e.coordinates, a = e.visibleArea, o = e.positionRestrictions, s = W({}, i), c = W({}, a);
1307
+ var t = e.event, n = e.getAreaRestrictions, r = e.boundaries, i = e.coordinates, a = e.visibleArea, o = e.positionRestrictions, s = G({}, i), c = G({}, a);
1308
1308
  if (i && a && t.type !== "manipulateImage") {
1309
1309
  var l = {
1310
1310
  width: 0,
@@ -1315,10 +1315,10 @@ function Ft(e) {
1315
1315
  visibleArea: c,
1316
1316
  type: "resize"
1317
1317
  }));
1318
- c = Z(c, u), u !== 1 && (l.height /= u, l.width /= u), c = $(c = X(c, ht(J(s), J(c))), n({
1318
+ c = Z(c, u), u !== 1 && (l.height /= u, l.width /= u), c = $(c = X(c, mt(Y(s), Y(c))), n({
1319
1319
  visibleArea: c,
1320
1320
  type: "move"
1321
- })), s = $(s, Ot(q(c), o));
1321
+ })), s = $(s, Ot(J(c), o));
1322
1322
  }
1323
1323
  return {
1324
1324
  coordinates: s,
@@ -1326,7 +1326,7 @@ function Ft(e) {
1326
1326
  };
1327
1327
  }
1328
1328
  function It(e) {
1329
- var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.getAreaRestrictions, a = W({}, r), o = W({}, n);
1329
+ var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.getAreaRestrictions, a = G({}, r), o = G({}, n);
1330
1330
  if (t.type === "setCoordinates") {
1331
1331
  var s = Math.max(0, o.width - a.width), c = Math.max(0, o.height - a.height);
1332
1332
  s > c ? a = Z(a, Math.min(o.width / a.width, vt(a, i({
@@ -1335,7 +1335,7 @@ function It(e) {
1335
1335
  })))) : c > s && (a = Z(a, Math.min(o.height / a.height, vt(a, i({
1336
1336
  visibleArea: a,
1337
1337
  type: "resize"
1338
- }))))), a = $(a = X(a, _t(yt(o, q(a)))), i({
1338
+ }))))), a = $(a = X(a, _t(yt(o, J(a)))), i({
1339
1339
  visibleArea: a,
1340
1340
  type: "move"
1341
1341
  }));
@@ -1360,7 +1360,7 @@ function Rt(e) {
1360
1360
  height: .8 * a.height,
1361
1361
  width: .8 * a.height * o
1362
1362
  };
1363
- return jt(W(W({}, s), {
1363
+ return jt(G(G({}, s), {
1364
1364
  aspectRatio: r,
1365
1365
  sizeRestrictions: i
1366
1366
  }));
@@ -1388,7 +1388,7 @@ function Bt(e) {
1388
1388
  top: n.top + n.height / 2 - o.height / 2,
1389
1389
  width: o.width,
1390
1390
  height: o.height
1391
- }, c = gt(n, q(W({
1391
+ }, c = ht(n, J(G({
1392
1392
  left: 0,
1393
1393
  top: 0
1394
1394
  }, r))), l = {};
@@ -1406,10 +1406,10 @@ function Bt(e) {
1406
1406
  };
1407
1407
  }
1408
1408
  function Vt(e, t) {
1409
- return Dt(e, q(t));
1409
+ return Dt(e, J(t));
1410
1410
  }
1411
1411
  function Ht(e) {
1412
- var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.sizeRestrictions, a = e.getAreaRestrictions, o = e.positionRestrictions, s = e.adjustStencil, c = t.scale, l = t.move, u = W({}, r), d = W({}, n), f = 1, p = 1, m = c.factor && Math.abs(c.factor - 1) > .001;
1412
+ var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.sizeRestrictions, a = e.getAreaRestrictions, o = e.positionRestrictions, s = e.adjustStencil, c = t.scale, l = t.move, u = G({}, r), d = G({}, n), f = 1, p = 1, m = c.factor && Math.abs(c.factor - 1) > .001;
1413
1413
  u = X(u, {
1414
1414
  left: l.left || 0,
1415
1415
  top: l.top || 0
@@ -1434,49 +1434,49 @@ function Ht(e) {
1434
1434
  })), a({
1435
1435
  visibleArea: u,
1436
1436
  type: "move"
1437
- })), d.width *= p, d.height *= p, d.left = u.left + g * p, d.top = u.top + v * p, d = $(d, Ot(q(u), o)), c.factor && m && s && (c.factor > 1 ? f = Math.min(h.area.maximum, c.factor) / p : c.factor < 1 && (f = Math.max(d.height / u.height, d.width / u.width, c.factor / p)), f !== 1 && (u = X(u = $(u = Z(u, f, c.factor > 1 ? c.center : J(d)), a({
1437
+ })), d.width *= p, d.height *= p, d.left = u.left + g * p, d.top = u.top + v * p, d = $(d, Ot(J(u), o)), c.factor && m && s && (c.factor > 1 ? f = Math.min(h.area.maximum, c.factor) / p : c.factor < 1 && (f = Math.max(d.height / u.height, d.width / u.width, c.factor / p)), f !== 1 && (u = X(u = $(u = Z(u, f, c.factor > 1 ? c.center : Y(d)), a({
1438
1438
  visibleArea: u,
1439
1439
  type: "move"
1440
- })), _t(yt(d, q(u)))))), {
1440
+ })), _t(yt(d, J(u)))))), {
1441
1441
  coordinates: d,
1442
1442
  visibleArea: u
1443
1443
  };
1444
1444
  }
1445
1445
  function Ut(e) {
1446
- var t = e.aspectRatio, n = e.getAreaRestrictions, r = e.coordinates, i = e.visibleArea, a = e.sizeRestrictions, o = e.positionRestrictions, s = e.imageSize, c = e.previousImageSize, l = e.angle, u = W({}, r), d = W({}, i), f = Ct(J(W({
1446
+ var t = e.aspectRatio, n = e.getAreaRestrictions, r = e.coordinates, i = e.visibleArea, a = e.sizeRestrictions, o = e.positionRestrictions, s = e.imageSize, c = e.previousImageSize, l = e.angle, u = G({}, r), d = G({}, i), f = Ct(Y(G({
1447
1447
  left: 0,
1448
1448
  top: 0
1449
1449
  }, c)), l);
1450
- return (u = W(W({}, jt({
1450
+ return (u = G(G({}, jt({
1451
1451
  sizeRestrictions: a,
1452
1452
  aspectRatio: t,
1453
1453
  width: u.width,
1454
1454
  height: u.height
1455
- })), Ct(J(u), l))).left -= f.left - s.width / 2 + u.width / 2, u.top -= f.top - s.height / 2 + u.height / 2, d = Z(d, wt(d, n({
1455
+ })), Ct(Y(u), l))).left -= f.left - s.width / 2 + u.width / 2, u.top -= f.top - s.height / 2 + u.height / 2, d = Z(d, wt(d, n({
1456
1456
  visibleArea: d,
1457
1457
  type: "resize"
1458
1458
  }))), {
1459
1459
  coordinates: u = $(u, o),
1460
- visibleArea: d = $(d = X(d, ht(J(u), J(r))), n({
1460
+ visibleArea: d = $(d = X(d, mt(Y(u), Y(r))), n({
1461
1461
  visibleArea: d,
1462
1462
  type: "move"
1463
1463
  }))
1464
1464
  };
1465
1465
  }
1466
1466
  function Wt(e) {
1467
- var t = e.flip, n = e.previousFlip, r = e.rotate, i = e.getAreaRestrictions, a = e.coordinates, o = e.visibleArea, s = e.imageSize, c = W({}, a), l = W({}, o), u = n.horizontal !== t.horizontal, d = n.vertical !== t.vertical;
1467
+ var t = e.flip, n = e.previousFlip, r = e.rotate, i = e.getAreaRestrictions, a = e.coordinates, o = e.visibleArea, s = e.imageSize, c = G({}, a), l = G({}, o), u = n.horizontal !== t.horizontal, d = n.vertical !== t.vertical;
1468
1468
  if (u || d) {
1469
1469
  var f = Ct({
1470
1470
  left: s.width / 2,
1471
1471
  top: s.height / 2
1472
- }, -r), p = Ct(J(c), -r), m = Ct({
1472
+ }, -r), p = Ct(Y(c), -r), m = Ct({
1473
1473
  left: u ? f.left - (p.left - f.left) : p.left,
1474
1474
  top: d ? f.top - (p.top - f.top) : p.top
1475
1475
  }, r);
1476
- c = X(c, ht(m, J(c))), p = Ct(J(l), -r), l = $(l = X(l, ht(m = Ct({
1476
+ c = X(c, mt(m, Y(c))), p = Ct(Y(l), -r), l = $(l = X(l, mt(m = Ct({
1477
1477
  left: u ? f.left - (p.left - f.left) : p.left,
1478
1478
  top: d ? f.top - (p.top - f.top) : p.top
1479
- }, r), J(l))), i({
1479
+ }, r), Y(l))), i({
1480
1480
  visibleArea: l,
1481
1481
  type: "move"
1482
1482
  }));
@@ -1487,10 +1487,10 @@ function Wt(e) {
1487
1487
  };
1488
1488
  }
1489
1489
  function Gt(e) {
1490
- var t = e.directions, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a = e.sizeRestrictions, o = e.preserveRatio, s = e.compensate, c = W({}, t), l = Y(n, c).width, u = Y(n, c).height;
1490
+ var t = e.directions, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a = e.sizeRestrictions, o = e.preserveRatio, s = e.compensate, c = G({}, t), l = gt(n, c).width, u = gt(n, c).height;
1491
1491
  l < 0 && (c.left < 0 && c.right < 0 ? (c.left = -(n.width - a.minWidth) / (c.left / c.right), c.right = -(n.width - a.minWidth) / (c.right / c.left)) : c.left < 0 ? c.left = -(n.width - a.minWidth) : c.right < 0 && (c.right = -(n.width - a.minWidth))), u < 0 && (c.top < 0 && c.bottom < 0 ? (c.top = -(n.height - a.minHeight) / (c.top / c.bottom), c.bottom = -(n.height - a.minHeight) / (c.bottom / c.top)) : c.top < 0 ? c.top = -(n.height - a.minHeight) : c.bottom < 0 && (c.bottom = -(n.height - a.minHeight)));
1492
- var d = gt(Y(n, c), i);
1493
- s && (d.left && d.left > 0 && d.right === 0 ? (c.right += d.left, c.left -= d.left) : d.right && d.right > 0 && d.left === 0 && (c.left += d.right, c.right -= d.right), d.top && d.top > 0 && d.bottom === 0 ? (c.bottom += d.top, c.top -= d.top) : d.bottom && d.bottom > 0 && d.top === 0 && (c.top += d.bottom, c.bottom -= d.bottom), d = gt(Y(n, c), i));
1492
+ var d = ht(gt(n, c), i);
1493
+ s && (d.left && d.left > 0 && d.right === 0 ? (c.right += d.left, c.left -= d.left) : d.right && d.right > 0 && d.left === 0 && (c.left += d.right, c.right -= d.right), d.top && d.top > 0 && d.bottom === 0 ? (c.bottom += d.top, c.top -= d.top) : d.bottom && d.bottom > 0 && d.top === 0 && (c.top += d.bottom, c.bottom -= d.bottom), d = ht(gt(n, c), i));
1494
1494
  var f = {
1495
1495
  width: Infinity,
1496
1496
  height: Infinity,
@@ -1499,27 +1499,27 @@ function Gt(e) {
1499
1499
  top: Infinity,
1500
1500
  bottom: Infinity
1501
1501
  };
1502
- if (K.forEach((function(e) {
1502
+ if (q.forEach((function(e) {
1503
1503
  var t = d[e];
1504
1504
  t && c[e] && (f[e] = Math.max(0, 1 - t / c[e]));
1505
1505
  })), o) {
1506
- var p = Math.min.apply(null, K.map((function(e) {
1506
+ var p = Math.min.apply(null, q.map((function(e) {
1507
1507
  return f[e];
1508
1508
  })));
1509
- p !== Infinity && K.forEach((function(e) {
1509
+ p !== Infinity && q.forEach((function(e) {
1510
1510
  c[e] *= p;
1511
1511
  }));
1512
- } else K.forEach((function(e) {
1512
+ } else q.forEach((function(e) {
1513
1513
  f[e] !== Infinity && (c[e] *= f[e]);
1514
1514
  }));
1515
- if (l = Y(n, c).width, u = Y(n, c).height, c.right + c.left && (l > a.maxWidth ? f.width = (a.maxWidth - n.width) / (c.right + c.left) : l < a.minWidth && (f.width = (a.minWidth - n.width) / (c.right + c.left))), c.bottom + c.top && (u > a.maxHeight ? f.height = (a.maxHeight - n.height) / (c.bottom + c.top) : u < a.minHeight && (f.height = (a.minHeight - n.height) / (c.bottom + c.top))), o) {
1515
+ if (l = gt(n, c).width, u = gt(n, c).height, c.right + c.left && (l > a.maxWidth ? f.width = (a.maxWidth - n.width) / (c.right + c.left) : l < a.minWidth && (f.width = (a.minWidth - n.width) / (c.right + c.left))), c.bottom + c.top && (u > a.maxHeight ? f.height = (a.maxHeight - n.height) / (c.bottom + c.top) : u < a.minHeight && (f.height = (a.minHeight - n.height) / (c.bottom + c.top))), o) {
1516
1516
  var m = Math.min(f.width, f.height);
1517
- m !== Infinity && K.forEach((function(e) {
1517
+ m !== Infinity && q.forEach((function(e) {
1518
1518
  c[e] *= m;
1519
1519
  }));
1520
- } else f.width !== Infinity && lt.forEach((function(e) {
1520
+ } else f.width !== Infinity && ct.forEach((function(e) {
1521
1521
  c[e] *= f.width;
1522
- })), f.height !== Infinity && ut.forEach((function(e) {
1522
+ })), f.height !== Infinity && lt.forEach((function(e) {
1523
1523
  c[e] *= f.height;
1524
1524
  }));
1525
1525
  return c;
@@ -1527,9 +1527,9 @@ function Gt(e) {
1527
1527
  function Kt(e, t, n) {
1528
1528
  return t == 0 && n == 0 ? e / 2 : t == 0 ? 0 : n == 0 ? e : e * Math.abs(t / (t + n));
1529
1529
  }
1530
- var qt = U("vue-simple-handler"), Jt = U("vue-simple-handler-wrapper"), Yt = {
1530
+ var qt = W("vue-simple-handler"), Jt = W("vue-simple-handler-wrapper"), Yt = {
1531
1531
  name: "SimpleHandler",
1532
- components: { HandlerWrapper: ot },
1532
+ components: { HandlerWrapper: at },
1533
1533
  props: {
1534
1534
  defaultClass: { type: String },
1535
1535
  hoverClass: { type: String },
@@ -1545,10 +1545,10 @@ var qt = U("vue-simple-handler"), Jt = U("vue-simple-handler-wrapper"), Yt = {
1545
1545
  return { hover: !1 };
1546
1546
  },
1547
1547
  computed: { classes: function() {
1548
- var e, t = (V(e = {}, this.horizontalPosition, !!this.horizontalPosition), V(e, this.verticalPosition, !!this.verticalPosition), V(e, `${this.horizontalPosition}-${this.verticalPosition}`, !!(this.verticalPosition && this.horizontalPosition)), V(e, "hover", this.hover), e);
1548
+ var e, t = (H(e = {}, this.horizontalPosition, !!this.horizontalPosition), H(e, this.verticalPosition, !!this.verticalPosition), H(e, `${this.horizontalPosition}-${this.verticalPosition}`, !!(this.verticalPosition && this.horizontalPosition)), H(e, "hover", this.hover), e);
1549
1549
  return {
1550
- default: H(qt(t), this.defaultClass, this.hover && this.hoverClass),
1551
- wrapper: H(Jt(t), this.wrapperClass)
1550
+ default: U(qt(t), this.defaultClass, this.hover && this.hoverClass),
1551
+ wrapper: U(Jt(t), this.wrapperClass)
1552
1552
  };
1553
1553
  } },
1554
1554
  methods: {
@@ -1580,7 +1580,7 @@ Yt.render = function(e, t, n, i, a, s) {
1580
1580
  onLeave: s.onLeave
1581
1581
  }, {
1582
1582
  default: u((function() {
1583
- return [A("div", { class: s.classes.default }, null, 2)];
1583
+ return [j("div", { class: s.classes.default }, null, 2)];
1584
1584
  })),
1585
1585
  _: 1
1586
1586
  }, 8, [
@@ -1594,9 +1594,9 @@ Yt.render = function(e, t, n, i, a, s) {
1594
1594
  "onLeave"
1595
1595
  ]);
1596
1596
  };
1597
- var Xt = U("vue-simple-line"), Zt = U("vue-simple-line-wrapper"), Qt = {
1597
+ var Xt = W("vue-simple-line"), Zt = W("vue-simple-line-wrapper"), Qt = {
1598
1598
  name: "SimpleLine",
1599
- components: { LineWrapper: ct },
1599
+ components: { LineWrapper: st },
1600
1600
  props: {
1601
1601
  defaultClass: { type: String },
1602
1602
  hoverClass: { type: String },
@@ -1612,8 +1612,8 @@ var Xt = U("vue-simple-line"), Zt = U("vue-simple-line-wrapper"), Qt = {
1612
1612
  },
1613
1613
  computed: { classes: function() {
1614
1614
  return {
1615
- root: H(Xt(V({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass),
1616
- wrapper: H(Zt(V({}, this.position, !0)), this.wrapperClass)
1615
+ root: U(Xt(H({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass),
1616
+ wrapper: U(Zt(H({}, this.position, !0)), this.wrapperClass)
1617
1617
  };
1618
1618
  } },
1619
1619
  methods: {
@@ -1644,7 +1644,7 @@ Qt.render = function(e, t, n, i, a, s) {
1644
1644
  onLeave: s.onLeave
1645
1645
  }, {
1646
1646
  default: u((function() {
1647
- return [A("div", { class: s.classes.root }, null, 2)];
1647
+ return [j("div", { class: s.classes.root }, null, 2)];
1648
1648
  })),
1649
1649
  _: 1
1650
1650
  }, 8, [
@@ -1657,7 +1657,7 @@ Qt.render = function(e, t, n, i, a, s) {
1657
1657
  "onLeave"
1658
1658
  ]);
1659
1659
  };
1660
- var $t = U("vue-bounding-box"), en = [
1660
+ var $t = W("vue-bounding-box"), en = [
1661
1661
  "east",
1662
1662
  "west",
1663
1663
  null
@@ -1743,7 +1743,7 @@ var $t = U("vue-bounding-box"), en = [
1743
1743
  return en.forEach((function(t) {
1744
1744
  tn.forEach((function(n) {
1745
1745
  if (t !== n) {
1746
- var r = We(t, n);
1746
+ var r = Ue(t, n);
1747
1747
  e.push({
1748
1748
  name: r.name,
1749
1749
  classname: r.classname,
@@ -1775,8 +1775,8 @@ var $t = U("vue-bounding-box"), en = [
1775
1775
  n.horizontalDirection && n.verticalDirection || !e.lines[n.name] || t.push({
1776
1776
  name: n.name,
1777
1777
  component: e.linesComponent,
1778
- class: H(e.classes.lines.default, e.classes.lines[n.name], !e.resizable && e.classes.lines.disabled),
1779
- wrapperClass: H(e.classes.linesWrappers.default, e.classes.linesWrappers[n.name], !e.resizable && e.classes.linesWrappers.disabled),
1778
+ class: U(e.classes.lines.default, e.classes.lines[n.name], !e.resizable && e.classes.lines.disabled),
1779
+ wrapperClass: U(e.classes.linesWrappers.default, e.classes.linesWrappers[n.name], !e.resizable && e.classes.linesWrappers.disabled),
1780
1780
  hoverClass: e.classes.lines.hover,
1781
1781
  verticalDirection: n.verticalDirection,
1782
1782
  horizontalDirection: n.horizontalDirection,
@@ -1791,8 +1791,8 @@ var $t = U("vue-bounding-box"), en = [
1791
1791
  var a = {
1792
1792
  name: i.name,
1793
1793
  component: e.handlersComponent,
1794
- class: H(e.classes.handlers.default, e.classes.handlers[i.name]),
1795
- wrapperClass: H(e.classes.handlersWrappers.default, e.classes.handlersWrappers[i.name]),
1794
+ class: U(e.classes.handlers.default, e.classes.handlers[i.name]),
1795
+ wrapperClass: U(e.classes.handlersWrappers.default, e.classes.handlersWrappers[i.name]),
1796
1796
  hoverClass: e.classes.handlers.hover,
1797
1797
  verticalDirection: i.verticalDirection,
1798
1798
  horizontalDirection: i.horizontalDirection,
@@ -1801,7 +1801,7 @@ var $t = U("vue-bounding-box"), en = [
1801
1801
  if (n && r) {
1802
1802
  var o = i.horizontalDirection, s = i.verticalDirection, c = o === "east" ? n : o === "west" ? 0 : n / 2, l = s === "south" ? r : s === "north" ? 0 : r / 2;
1803
1803
  a.wrapperClass = $t("handler"), a.wrapperStyle = { transform: `translate(${c}px, ${l}px)` }, e.transitions && e.transitions.enabled && (a.wrapperStyle.transition = `${e.transitions.time}ms ${e.transitions.timingFunction}`);
1804
- } else a.wrapperClass = $t("handler", V({}, i.classname, !0));
1804
+ } else a.wrapperClass = $t("handler", H({}, i.classname, !0));
1805
1805
  t.push(a);
1806
1806
  }
1807
1807
  })), t;
@@ -1827,7 +1827,7 @@ var $t = U("vue-bounding-box"), en = [
1827
1827
  top: 0,
1828
1828
  bottom: 0
1829
1829
  };
1830
- t === "west" ? s.left -= a : t === "east" && (s.right += a), n === "north" ? s.top -= o : n === "south" && (s.bottom += o), !n && t ? r = "width" : n && !t && (r = "height"), this.resizable && this.$emit("resize", new tt(s, {
1830
+ t === "west" ? s.left -= a : t === "east" && (s.right += a), n === "north" ? s.top -= o : n === "south" && (s.bottom += o), !n && t ? r = "width" : n && !t && (r = "height"), this.resizable && this.$emit("resize", new et(s, {
1831
1831
  allowedDirections: {
1832
1832
  left: t === "west" || !t,
1833
1833
  right: t === "east" || !t,
@@ -1848,7 +1848,7 @@ nn.render = function(e, n, r, i, s, l) {
1848
1848
  style: l.style
1849
1849
  }, [
1850
1850
  t(e.$slots, "default"),
1851
- A("div", null, [(o(!0), b(D, null, c(l.lineNodes, (function(e) {
1851
+ j("div", null, [(o(!0), b(O, null, c(l.lineNodes, (function(e) {
1852
1852
  return o(), b(a(e.component), {
1853
1853
  key: e.name,
1854
1854
  "default-class": e.class,
@@ -1871,7 +1871,7 @@ nn.render = function(e, n, r, i, s, l) {
1871
1871
  "onDrag"
1872
1872
  ]);
1873
1873
  })), 128))]),
1874
- (o(!0), b(D, null, c(l.handlerNodes, (function(e) {
1874
+ (o(!0), b(O, null, c(l.handlerNodes, (function(e) {
1875
1875
  return o(), b("div", {
1876
1876
  key: e.name,
1877
1877
  style: e.wrapperStyle,
@@ -1901,7 +1901,7 @@ nn.render = function(e, n, r, i, s, l) {
1901
1901
  })), 128))
1902
1902
  ], 6);
1903
1903
  };
1904
- var rn = U("vue-draggable-area"), an = {
1904
+ var rn = W("vue-draggable-area"), an = {
1905
1905
  name: "DraggableArea",
1906
1906
  props: {
1907
1907
  movable: {
@@ -1929,14 +1929,14 @@ var rn = U("vue-draggable-area"), an = {
1929
1929
  onTouchStart: function(e) {
1930
1930
  if (e.cancelable) {
1931
1931
  var t = this.movable && e.touches.length === 1;
1932
- t && (this.touches = Le(e.touches)), (this.touchStarted || t) && (e.preventDefault(), e.stopPropagation());
1932
+ t && (this.touches = Ie(e.touches)), (this.touchStarted || t) && (e.preventDefault(), e.stopPropagation());
1933
1933
  }
1934
1934
  },
1935
1935
  onTouchEnd: function() {
1936
1936
  this.touchStarted = !1, this.processEnd();
1937
1937
  },
1938
1938
  onTouchMove: function(e) {
1939
- this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : $e({
1939
+ this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : Qe({
1940
1940
  x: this.touches[0].clientX,
1941
1941
  y: this.touches[0].clientY
1942
1942
  }, {
@@ -1975,10 +1975,10 @@ var rn = U("vue-draggable-area"), an = {
1975
1975
  };
1976
1976
  },
1977
1977
  processMove: function(e, t) {
1978
- var n = Le(t);
1978
+ var n = Ie(t);
1979
1979
  if (this.touches.length) {
1980
1980
  var r = this.$refs.container.getBoundingClientRect(), i = r.left, a = r.top;
1981
- this.touches.length === 1 && n.length === 1 && this.$emit("move", new nt({
1981
+ this.touches.length === 1 && n.length === 1 && this.$emit("move", new tt({
1982
1982
  left: n[0].clientX - (i + this.anchor.x),
1983
1983
  top: n[0].clientY - (a + this.anchor.y)
1984
1984
  }));
@@ -2078,7 +2078,7 @@ function ln(e) {
2078
2078
  return null;
2079
2079
  }
2080
2080
  }
2081
- var un = U("vue-preview-result"), dn = {
2081
+ var un = W("vue-preview-result"), dn = {
2082
2082
  name: "PreviewResult",
2083
2083
  props: {
2084
2084
  image: { type: Object },
@@ -2102,7 +2102,7 @@ var un = U("vue-preview-result"), dn = {
2102
2102
  root: un(),
2103
2103
  wrapper: un("wrapper"),
2104
2104
  imageWrapper: un("image-wrapper"),
2105
- image: H(un("image"), this.imageClass)
2105
+ image: U(un("image"), this.imageClass)
2106
2106
  };
2107
2107
  },
2108
2108
  wrapperStyle: function() {
@@ -2143,7 +2143,7 @@ function fn(e, t) {
2143
2143
  return e.forEach((function(t) {
2144
2144
  a.left += (t.clientX - r) / e.length, a.top += (t.clientY - i) / e.length;
2145
2145
  })), e.forEach((function(e) {
2146
- o += $e({
2146
+ o += Qe({
2147
2147
  x: a.left,
2148
2148
  y: a.top
2149
2149
  }, {
@@ -2157,11 +2157,11 @@ function fn(e, t) {
2157
2157
  };
2158
2158
  }
2159
2159
  dn.render = function(e, t, n, r, i, a) {
2160
- return o(), b("div", { class: a.classes.root }, [A("div", {
2160
+ return o(), b("div", { class: a.classes.root }, [j("div", {
2161
2161
  ref: "wrapper",
2162
2162
  class: a.classes.wrapper,
2163
2163
  style: a.wrapperStyle
2164
- }, [A("img", {
2164
+ }, [j("img", {
2165
2165
  ref: "image",
2166
2166
  src: n.image.src,
2167
2167
  class: a.classes.image,
@@ -2198,18 +2198,18 @@ var pn = {
2198
2198
  window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
2199
2199
  },
2200
2200
  created: function() {
2201
- this.transforming = !1, this.debouncedProcessEnd = Ue(this.processEnd), this.touches = [];
2201
+ this.transforming = !1, this.debouncedProcessEnd = He(this.processEnd), this.touches = [];
2202
2202
  },
2203
2203
  methods: {
2204
2204
  processMove: function(e, t) {
2205
2205
  if (this.touches.length) {
2206
- if (this.touches.length === 1 && t.length === 1) this.$emit("move", new et({
2206
+ if (this.touches.length === 1 && t.length === 1) this.$emit("move", new $e({
2207
2207
  left: this.touches[0].clientX - t[0].clientX,
2208
2208
  top: this.touches[0].clientY - t[0].clientY
2209
2209
  }));
2210
2210
  else if (this.touches.length > 1 && this.touchResize) {
2211
2211
  var n = fn(t, this.$refs.container), r = this.oldGeometricProperties;
2212
- r.count === n.count && r.count > 1 && this.$emit("resize", new et({
2212
+ r.count === n.count && r.count > 1 && this.$emit("resize", new $e({
2213
2213
  left: r.centerMass.left - n.centerMass.left,
2214
2214
  top: r.centerMass.top - n.centerMass.top
2215
2215
  }, {
@@ -2232,7 +2232,7 @@ var pn = {
2232
2232
  onTouchStart: function(e) {
2233
2233
  if (e.cancelable && (this.touchMove || this.touchResize && e.touches.length > 1) && this.processEvent(e)) {
2234
2234
  var t = this.$refs.container, n = t.getBoundingClientRect(), r = n.left, i = n.top, a = n.bottom, o = n.right;
2235
- this.touches = Le(e.touches).filter((function(e) {
2235
+ this.touches = Ie(e.touches).filter((function(e) {
2236
2236
  return e.clientX > r && e.clientX < o && e.clientY > i && e.clientY < a;
2237
2237
  })), this.oldGeometricProperties = fn(this.touches, t);
2238
2238
  }
@@ -2243,7 +2243,7 @@ var pn = {
2243
2243
  onTouchMove: function(e) {
2244
2244
  var t = this;
2245
2245
  if (this.touches.length) {
2246
- var n = Le(e.touches).filter((function(e) {
2246
+ var n = Ie(e.touches).filter((function(e) {
2247
2247
  return !e.identifier || t.touches.find((function(t) {
2248
2248
  return t.identifier === e.identifier;
2249
2249
  }));
@@ -2272,11 +2272,11 @@ var pn = {
2272
2272
  },
2273
2273
  onWheel: function(e) {
2274
2274
  if (this.wheelResize && this.processEvent(e)) {
2275
- var t = this.$refs.container.getBoundingClientRect(), n = t.left, r = t.top, i = 1 + this.wheelResize.ratio * (o = e.deltaY || e.detail || e.wheelDelta, (s = +o) == 0 || Qe(s) ? s : s > 0 ? 1 : -1), a = {
2275
+ var t = this.$refs.container.getBoundingClientRect(), n = t.left, r = t.top, i = 1 + this.wheelResize.ratio * (o = e.deltaY || e.detail || e.wheelDelta, (s = +o) == 0 || Ze(s) ? s : s > 0 ? 1 : -1), a = {
2276
2276
  left: e.clientX - n,
2277
2277
  top: e.clientY - r
2278
2278
  };
2279
- this.$emit("resize", new et({}, {
2279
+ this.$emit("resize", new $e({}, {
2280
2280
  factor: i,
2281
2281
  center: a
2282
2282
  })), this.touches.length || this.debouncedProcessEnd();
@@ -2351,7 +2351,7 @@ mn.render = function(e, n, i, a, s, c) {
2351
2351
  "wheel-resize"
2352
2352
  ]);
2353
2353
  };
2354
- var hn = U("vue-preview"), gn = {
2354
+ var hn = W("vue-preview"), gn = {
2355
2355
  props: {
2356
2356
  coordinates: { type: Object },
2357
2357
  transitions: { type: Object },
@@ -2384,7 +2384,7 @@ var hn = U("vue-preview"), gn = {
2384
2384
  root: hn({ fill: this.fill }),
2385
2385
  wrapper: hn("wrapper"),
2386
2386
  imageWrapper: hn("image-wrapper"),
2387
- image: H(hn("image"), this.imageClass)
2387
+ image: U(hn("image"), this.imageClass)
2388
2388
  };
2389
2389
  },
2390
2390
  style: function() {
@@ -2403,7 +2403,7 @@ var hn = U("vue-preview"), gn = {
2403
2403
  },
2404
2404
  imageStyle: function() {
2405
2405
  if (this.coordinates && this.image) {
2406
- var e = this.coordinates.width / this.size.width, t = B(B({
2406
+ var e = this.coordinates.width / this.size.width, t = V(V({
2407
2407
  rotate: 0,
2408
2408
  flip: {
2409
2409
  horizontal: !1,
@@ -2480,11 +2480,11 @@ gn.render = function(e, t, r, i, a, s) {
2480
2480
  ref: "root",
2481
2481
  class: s.classes.root,
2482
2482
  style: s.style
2483
- }, [A("div", {
2483
+ }, [j("div", {
2484
2484
  ref: "wrapper",
2485
2485
  class: s.classes.wrapper,
2486
2486
  style: s.wrapperStyle
2487
- }, [n(A("img", {
2487
+ }, [n(j("img", {
2488
2488
  ref: "image",
2489
2489
  src: r.image && r.image.src,
2490
2490
  class: s.classes.image,
@@ -2499,7 +2499,7 @@ _n.render = function(t, n, i, a, s, c) {
2499
2499
  var l = r("preview");
2500
2500
  return o(), b(l, e(t.$attrs, { fill: !0 }), null, 16);
2501
2501
  };
2502
- var vn = U("vue-rectangle-stencil"), yn = {
2502
+ var vn = W("vue-rectangle-stencil"), yn = {
2503
2503
  name: "RectangleStencil",
2504
2504
  components: {
2505
2505
  StencilPreview: _n,
@@ -2574,13 +2574,13 @@ var vn = U("vue-rectangle-stencil"), yn = {
2574
2574
  computed: {
2575
2575
  classes: function() {
2576
2576
  return {
2577
- stencil: H(vn({
2577
+ stencil: U(vn({
2578
2578
  movable: this.movable,
2579
2579
  moving: this.moving,
2580
2580
  resizing: this.resizing
2581
2581
  }), this.moving && this.movingClass, this.resizing && this.resizingClass),
2582
- preview: H(vn("preview"), this.previewClass),
2583
- boundingBox: H(vn("bounding-box"), this.boundingBoxClass)
2582
+ preview: U(vn("preview"), this.previewClass),
2583
+ boundingBox: U(vn("bounding-box"), this.boundingBoxClass)
2584
2584
  };
2585
2585
  },
2586
2586
  style: function() {
@@ -2624,7 +2624,7 @@ yn.render = function(e, t, n, i, a, s) {
2624
2624
  return o(), b("div", {
2625
2625
  class: s.classes.stencil,
2626
2626
  style: s.style
2627
- }, [A(d, {
2627
+ }, [j(d, {
2628
2628
  width: n.stencilCoordinates.width,
2629
2629
  height: n.stencilCoordinates.height,
2630
2630
  transitions: n.transitions,
@@ -2642,13 +2642,13 @@ yn.render = function(e, t, n, i, a, s) {
2642
2642
  onResizeEnd: s.onResizeEnd
2643
2643
  }, {
2644
2644
  default: u((function() {
2645
- return [A(l, {
2645
+ return [j(l, {
2646
2646
  movable: n.movable,
2647
2647
  onMove: s.onMove,
2648
2648
  onMoveEnd: s.onMoveEnd
2649
2649
  }, {
2650
2650
  default: u((function() {
2651
- return [A(c, {
2651
+ return [j(c, {
2652
2652
  image: n.image,
2653
2653
  coordinates: n.coordinates,
2654
2654
  width: n.stencilCoordinates.width,
@@ -2690,7 +2690,7 @@ yn.render = function(e, t, n, i, a, s) {
2690
2690
  "onResizeEnd"
2691
2691
  ])], 6);
2692
2692
  };
2693
- var bn = U("vue-circle-stencil"), xn = {
2693
+ var bn = W("vue-circle-stencil"), xn = {
2694
2694
  components: {
2695
2695
  StencilPreview: _n,
2696
2696
  BoundingBox: nn,
@@ -2771,13 +2771,13 @@ var bn = U("vue-circle-stencil"), xn = {
2771
2771
  computed: {
2772
2772
  classes: function() {
2773
2773
  return {
2774
- stencil: H(bn({
2774
+ stencil: U(bn({
2775
2775
  movable: this.movable,
2776
2776
  moving: this.moving,
2777
2777
  resizing: this.resizing
2778
2778
  }), this.moving && this.movingClass, this.resizing && this.resizingClass),
2779
- preview: H(bn("preview"), this.previewClass),
2780
- boundingBox: H(bn("bounding-box"), this.boundingBoxClass)
2779
+ preview: U(bn("preview"), this.previewClass),
2780
+ boundingBox: U(bn("bounding-box"), this.boundingBoxClass)
2781
2781
  };
2782
2782
  },
2783
2783
  style: function() {
@@ -2821,7 +2821,7 @@ xn.render = function(e, t, n, i, a, s) {
2821
2821
  return o(), b("div", {
2822
2822
  class: s.classes.stencil,
2823
2823
  style: s.style
2824
- }, [A(d, {
2824
+ }, [j(d, {
2825
2825
  width: n.stencilCoordinates.width,
2826
2826
  height: n.stencilCoordinates.height,
2827
2827
  transitions: n.transitions,
@@ -2839,13 +2839,13 @@ xn.render = function(e, t, n, i, a, s) {
2839
2839
  onResizeEnd: s.onResizeEnd
2840
2840
  }, {
2841
2841
  default: u((function() {
2842
- return [A(l, {
2842
+ return [j(l, {
2843
2843
  movable: n.movable,
2844
2844
  onMove: s.onMove,
2845
2845
  onMoveEnd: s.onMoveEnd
2846
2846
  }, {
2847
2847
  default: u((function() {
2848
- return [A(c, {
2848
+ return [j(c, {
2849
2849
  image: n.image,
2850
2850
  coordinates: n.coordinates,
2851
2851
  width: n.stencilCoordinates.width,
@@ -2887,7 +2887,7 @@ xn.render = function(e, t, n, i, a, s) {
2887
2887
  "onResizeEnd"
2888
2888
  ])], 6);
2889
2889
  };
2890
- var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
2890
+ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
2891
2891
  name: "Cropper",
2892
2892
  components: { BackgroundWrapper: mn },
2893
2893
  props: {
@@ -2953,7 +2953,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
2953
2953
  type: String,
2954
2954
  default: "fit-area",
2955
2955
  validator: function(e) {
2956
- return ft.indexOf(e) !== -1;
2956
+ return dt.indexOf(e) !== -1;
2957
2957
  }
2958
2958
  },
2959
2959
  roundResult: {
@@ -2987,24 +2987,24 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
2987
2987
  resizeAlgorithm: {
2988
2988
  type: Function,
2989
2989
  default: function(e) {
2990
- var t = e.event, n = e.coordinates, r = e.aspectRatio, i = e.positionRestrictions, a = e.sizeRestrictions, o = W(W({}, n), {
2990
+ var t = e.event, n = e.coordinates, r = e.aspectRatio, i = e.positionRestrictions, a = e.sizeRestrictions, o = G(G({}, n), {
2991
2991
  right: n.left + n.width,
2992
2992
  bottom: n.top + n.height
2993
- }), s = t.params || {}, c = W({}, t.directions), l = s.allowedDirections || {
2993
+ }), s = t.params || {}, c = G({}, t.directions), l = s.allowedDirections || {
2994
2994
  left: !0,
2995
2995
  right: !0,
2996
2996
  bottom: !0,
2997
2997
  top: !0
2998
2998
  };
2999
- a.widthFrozen && (c.left = 0, c.right = 0), a.heightFrozen && (c.top = 0, c.bottom = 0), K.forEach((function(e) {
2999
+ a.widthFrozen && (c.left = 0, c.right = 0), a.heightFrozen && (c.top = 0, c.bottom = 0), q.forEach((function(e) {
3000
3000
  l[e] || (c[e] = 0);
3001
3001
  }));
3002
- var u = Y(o, c = Gt({
3002
+ var u = gt(o, c = Gt({
3003
3003
  coordinates: o,
3004
3004
  directions: c,
3005
3005
  sizeRestrictions: a,
3006
3006
  positionRestrictions: i
3007
- })).width, d = Y(o, c).height, f = s.preserveRatio ? Q(o) : bt(u / d, r);
3007
+ })).width, d = gt(o, c).height, f = s.preserveRatio ? Q(o) : bt(u / d, r);
3008
3008
  if (f) {
3009
3009
  var p = s.respectDirection;
3010
3010
  if (p ||= o.width >= o.height || f === 1 ? "width" : "height", p === "width") {
@@ -3029,10 +3029,10 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3029
3029
  compensate: s.compensate
3030
3030
  });
3031
3031
  }
3032
- return u = Y(o, c).width, d = Y(o, c).height, (f = s.preserveRatio ? Q(o) : bt(u / d, r)) && Math.abs(f - u / d) > .001 && K.forEach((function(e) {
3032
+ return u = gt(o, c).width, d = gt(o, c).height, (f = s.preserveRatio ? Q(o) : bt(u / d, r)) && Math.abs(f - u / d) > .001 && q.forEach((function(e) {
3033
3033
  l[e] || (c[e] = 0);
3034
3034
  })), Mt({
3035
- event: new nt({
3035
+ event: new tt({
3036
3036
  left: -c.left,
3037
3037
  top: -c.top
3038
3038
  }),
@@ -3060,7 +3060,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3060
3060
  fitCoordinates: {
3061
3061
  type: Function,
3062
3062
  default: function(e) {
3063
- var t = e.visibleArea, n = e.coordinates, r = e.aspectRatio, i = e.sizeRestrictions, a = e.positionRestrictions, o = W(W({}, n), jt({
3063
+ var t = e.visibleArea, n = e.coordinates, r = e.aspectRatio, i = e.sizeRestrictions, a = e.positionRestrictions, o = G(G({}, n), jt({
3064
3064
  width: n.width,
3065
3065
  height: n.height,
3066
3066
  aspectRatio: r,
@@ -3071,15 +3071,15 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3071
3071
  minWidth: Math.min(t.width, i.minWidth)
3072
3072
  }
3073
3073
  }));
3074
- return o = $(o = X(o, ht(J(n), J(o))), Ot(q(t), a));
3074
+ return o = $(o = X(o, mt(Y(n), Y(o))), Ot(J(t), a));
3075
3075
  }
3076
3076
  },
3077
3077
  fitVisibleArea: {
3078
3078
  type: Function,
3079
3079
  default: function(e) {
3080
- var t = e.visibleArea, n = e.boundaries, r = e.getAreaRestrictions, i = e.coordinates, a = W({}, t);
3080
+ var t = e.visibleArea, n = e.boundaries, r = e.getAreaRestrictions, i = e.coordinates, a = G({}, t);
3081
3081
  a.height = a.width / Q(n), a.top += (t.height - a.height) / 2, (i.height - a.height > 0 || i.width - a.width > 0) && (a = Z(a, Math.max(i.height / a.height, i.width / a.width)));
3082
- var o = _t(yt(i, q(a = Z(a, wt(a, r({
3082
+ var o = _t(yt(i, J(a = Z(a, wt(a, r({
3083
3083
  visibleArea: a,
3084
3084
  type: "resize"
3085
3085
  }))))));
@@ -3160,7 +3160,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3160
3160
  height: 0
3161
3161
  },
3162
3162
  visibleArea: null,
3163
- coordinates: B({}, pt)
3163
+ coordinates: V({}, ft)
3164
3164
  };
3165
3165
  },
3166
3166
  computed: {
@@ -3198,7 +3198,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3198
3198
  return !!(this.visibleArea && this.imageLoaded);
3199
3199
  },
3200
3200
  settings: function() {
3201
- var e = Ye(this.resizeImage, {
3201
+ var e = Je(this.resizeImage, {
3202
3202
  touch: !0,
3203
3203
  wheel: { ratio: .1 },
3204
3204
  adjustStencil: !0
@@ -3208,7 +3208,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3208
3208
  adjustStencil: !1
3209
3209
  });
3210
3210
  return {
3211
- moveImage: Ye(this.moveImage, {
3211
+ moveImage: Je(this.moveImage, {
3212
3212
  touch: !0,
3213
3213
  mouse: !0
3214
3214
  }, {
@@ -3239,13 +3239,13 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3239
3239
  if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {
3240
3240
  var e = this.sizeRestrictionsAlgorithm({
3241
3241
  imageSize: this.imageSize,
3242
- minWidth: G(this.minWidth) ? 0 : Xe(this.minWidth),
3243
- minHeight: G(this.minHeight) ? 0 : Xe(this.minHeight),
3244
- maxWidth: G(this.maxWidth) ? Infinity : Xe(this.maxWidth),
3245
- maxHeight: G(this.maxHeight) ? Infinity : Xe(this.maxHeight)
3242
+ minWidth: K(this.minWidth) ? 0 : Ye(this.minWidth),
3243
+ minHeight: K(this.minHeight) ? 0 : Ye(this.minHeight),
3244
+ maxWidth: K(this.maxWidth) ? Infinity : Ye(this.maxWidth),
3245
+ maxHeight: K(this.maxHeight) ? Infinity : Ye(this.maxHeight)
3246
3246
  });
3247
3247
  if (e = function(e) {
3248
- var t = e.areaRestrictions, n = e.sizeRestrictions, r = e.boundaries, i = e.positionRestrictions, a = W(W({}, n), {
3248
+ var t = e.areaRestrictions, n = e.sizeRestrictions, r = e.boundaries, i = e.positionRestrictions, a = G(G({}, n), {
3249
3249
  minWidth: n.minWidth === void 0 ? 0 : n.minWidth,
3250
3250
  minHeight: n.minHeight === void 0 ? 0 : n.minHeight,
3251
3251
  maxWidth: n.maxWidth === void 0 ? Infinity : n.maxWidth,
@@ -3291,14 +3291,14 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3291
3291
  classes: function() {
3292
3292
  return {
3293
3293
  cropper: Cn(),
3294
- image: H(Cn("image"), this.imageClass),
3294
+ image: U(Cn("image"), this.imageClass),
3295
3295
  stencil: Cn("stencil"),
3296
- boundaries: H(Cn("boundaries"), this.boundariesClass),
3297
- stretcher: H(Cn("stretcher")),
3298
- background: H(Cn("background"), this.backgroundClass),
3299
- foreground: H(Cn("foreground"), this.foregroundClass),
3300
- imageWrapper: H(Cn("image-wrapper")),
3301
- cropperWrapper: H(Cn("cropper-wrapper"))
3296
+ boundaries: U(Cn("boundaries"), this.boundariesClass),
3297
+ stretcher: U(Cn("stretcher")),
3298
+ background: U(Cn("background"), this.backgroundClass),
3299
+ foreground: U(Cn("foreground"), this.foregroundClass),
3300
+ imageWrapper: U(Cn("image-wrapper")),
3301
+ cropperWrapper: U(Cn("cropper-wrapper"))
3302
3302
  };
3303
3303
  },
3304
3304
  stencilCoordinates: function() {
@@ -3335,7 +3335,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3335
3335
  }, n = {
3336
3336
  left: (1 - 1 / this.coefficient) * e.width / 2,
3337
3337
  top: (1 - 1 / this.coefficient) * e.height / 2
3338
- }, r = B(B({}, this.imageTransforms), {}, {
3338
+ }, r = V(V({}, this.imageTransforms), {}, {
3339
3339
  scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / e.width),
3340
3340
  scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / e.height)
3341
3341
  }), i = {
@@ -3384,7 +3384,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3384
3384
  }
3385
3385
  },
3386
3386
  created: function() {
3387
- this.debouncedUpdate = Ue(this.update, this.debounce), this.debouncedDisableTransitions = Ue(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
3387
+ this.debouncedUpdate = He(this.update, this.debounce), this.debouncedDisableTransitions = He(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
3388
3388
  },
3389
3389
  mounted: function() {
3390
3390
  this.$refs.image.addEventListener("load", this.onSuccessLoadImage), this.$refs.image.addEventListener("error", this.onFailLoadImage), this.onChangeImage(), window.addEventListener("resize", this.refresh), window.addEventListener("orientationchange", this.refresh);
@@ -3394,16 +3394,16 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3394
3394
  },
3395
3395
  methods: {
3396
3396
  getResult: function() {
3397
- var e = this.initialized ? this.prepareResult(B({}, this.coordinates)) : this.defaultCoordinates(), t = {
3397
+ var e = this.initialized ? this.prepareResult(V({}, this.coordinates)) : this.defaultCoordinates(), t = {
3398
3398
  rotate: this.imageTransforms.rotate % 360,
3399
- flip: B({}, this.imageTransforms.flip)
3399
+ flip: V({}, this.imageTransforms.flip)
3400
3400
  };
3401
3401
  if (this.src && this.imageLoaded) {
3402
3402
  var n = this;
3403
3403
  return {
3404
3404
  image: this.image,
3405
3405
  coordinates: e,
3406
- visibleArea: this.visibleArea ? B({}, this.visibleArea) : null,
3406
+ visibleArea: this.visibleArea ? V({}, this.visibleArea) : null,
3407
3407
  imageTransforms: t,
3408
3408
  get canvas() {
3409
3409
  return n.canvas ? n.getCanvas() : void 0;
@@ -3413,14 +3413,14 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3413
3413
  return {
3414
3414
  image: this.image,
3415
3415
  coordinates: e,
3416
- visibleArea: this.visibleArea ? B({}, this.visibleArea) : null,
3416
+ visibleArea: this.visibleArea ? V({}, this.visibleArea) : null,
3417
3417
  canvas: void 0,
3418
3418
  imageTransforms: t
3419
3419
  };
3420
3420
  },
3421
3421
  zoom: function(e, t) {
3422
3422
  var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
3423
- this.onManipulateImage(new et({}, {
3423
+ this.onManipulateImage(new $e({}, {
3424
3424
  factor: 1 / e,
3425
3425
  center: t
3426
3426
  }), {
@@ -3430,7 +3430,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3430
3430
  },
3431
3431
  move: function(e, t) {
3432
3432
  var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
3433
- this.onManipulateImage(new et({
3433
+ this.onManipulateImage(new $e({
3434
3434
  left: e || 0,
3435
3435
  top: t || 0
3436
3436
  }), {
@@ -3473,7 +3473,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3473
3473
  top: Math.round(t.top)
3474
3474
  };
3475
3475
  return i.width > n.maxWidth ? i.width = Math.floor(t.width) : i.width < n.minWidth && (i.width = Math.ceil(t.width)), i.height > n.maxHeight ? i.height = Math.floor(t.height) : i.height < n.minHeight && (i.height = Math.ceil(t.height)), $(i, r);
3476
- }(B(B({}, this.getPublicProperties()), {}, {
3476
+ }(V(V({}, this.getPublicProperties()), {}, {
3477
3477
  positionRestrictions: Vt(this.positionRestrictions, this.visibleArea),
3478
3478
  coordinates: e
3479
3479
  })) : e;
@@ -3495,16 +3495,16 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3495
3495
  sizeRestrictions: this.sizeRestrictions,
3496
3496
  stencilSize: this.getStencilSize()
3497
3497
  });
3498
- return B(B({}, a), {}, { changed: !mt(a.visibleArea, t) || !mt(a.coordinates, n) });
3498
+ return V(V({}, a), {}, { changed: !pt(a.visibleArea, t) || !pt(a.coordinates, n) });
3499
3499
  },
3500
3500
  runAutoZoom: function(e) {
3501
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, r = n !== void 0 && n, i = Ie(t, Sn), a = this.processAutoZoom(e, this.visibleArea, this.coordinates, i), o = a.visibleArea, s = a.coordinates, c = a.changed;
3501
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, r = n !== void 0 && n, i = Fe(t, Sn), a = this.processAutoZoom(e, this.visibleArea, this.coordinates, i), o = a.visibleArea, s = a.coordinates, c = a.changed;
3502
3502
  r && c && this.enableTransitions(), this.visibleArea = o, this.coordinates = s, r && c && this.debouncedDisableTransitions();
3503
3503
  },
3504
3504
  normalizeEvent: function(e) {
3505
3505
  return function(e) {
3506
3506
  var t = e.event, n = e.visibleArea, r = e.coefficient;
3507
- if (t.type === "manipulateImage") return W(W({}, t), {
3507
+ if (t.type === "manipulateImage") return G(G({}, t), {
3508
3508
  move: {
3509
3509
  left: t.move && t.move.left ? r * t.move.left : 0,
3510
3510
  top: t.move && t.move.top ? r * t.move.top : 0
@@ -3518,19 +3518,19 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3518
3518
  }
3519
3519
  });
3520
3520
  if (t.type === "resize") {
3521
- var i = W(W({}, t), { directions: W({}, t.directions) });
3522
- return K.forEach((function(e) {
3521
+ var i = G(G({}, t), { directions: G({}, t.directions) });
3522
+ return q.forEach((function(e) {
3523
3523
  i.directions[e] *= r;
3524
3524
  })), i;
3525
3525
  }
3526
3526
  if (t.type === "move") {
3527
- var a = W(W({}, t), { directions: W({}, t.directions) });
3528
- return dt.forEach((function(e) {
3527
+ var a = G(G({}, t), { directions: G({}, t.directions) });
3528
+ return ut.forEach((function(e) {
3529
3529
  a.directions[e] *= r;
3530
3530
  })), a;
3531
3531
  }
3532
3532
  return t;
3533
- }(B(B({}, this.getPublicProperties()), {}, { event: e }));
3533
+ }(V(V({}, this.getPublicProperties()), {}, { event: e }));
3534
3534
  },
3535
3535
  getCanvas: function() {
3536
3536
  if (this.$refs.canvas) {
@@ -3540,12 +3540,12 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3540
3540
  height: t.naturalHeight
3541
3541
  }, o = St(a, r), s = e.getContext("2d");
3542
3542
  e.height = o.height, e.width = o.width, s.save();
3543
- var c = Ct(J(W({
3543
+ var c = Ct(Y(G({
3544
3544
  left: 0,
3545
3545
  top: 0
3546
3546
  }, a)), r);
3547
3547
  return s.translate(-(c.left - o.width / 2), -(c.top - o.height / 2)), s.rotate(r * Math.PI / 180), s.translate(i.horizontal ? a.width : 0, i.vertical ? a.height : 0), s.scale(i.horizontal ? -1 : 1, i.vertical ? -1 : 1), s.drawImage(t, 0, 0, a.width, a.height), s.restore(), e;
3548
- }(this.$refs.sourceCanvas, t, this.imageTransforms) : t, r = B({
3548
+ }(this.$refs.sourceCanvas, t, this.imageTransforms) : t, r = V({
3549
3549
  minWidth: 0,
3550
3550
  minHeight: 0,
3551
3551
  maxWidth: Infinity,
@@ -3610,7 +3610,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3610
3610
  this.$refs.cropper, this.$refs.image;
3611
3611
  var t = this.defaultSize;
3612
3612
  t ||= this.stencilSize ? zt : Rt, this.sizeRestrictions;
3613
- var n = qe(t) ? t({
3613
+ var n = Ke(t) ? t({
3614
3614
  boundaries: this.boundaries,
3615
3615
  imageSize: this.imageSize,
3616
3616
  aspectRatio: this.getAspectRatio(),
@@ -3619,13 +3619,13 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3619
3619
  visibleArea: this.visibleArea
3620
3620
  }) : t, r = this.defaultPosition || Lt, i = [n, function(t) {
3621
3621
  var n = t.coordinates;
3622
- return B({}, qe(r) ? r({
3622
+ return V({}, Ke(r) ? r({
3623
3623
  coordinates: n,
3624
3624
  imageSize: e.imageSize,
3625
3625
  visibleArea: e.visibleArea
3626
3626
  }) : e.defaultPosition);
3627
3627
  }];
3628
- this.delayedTransforms && i.push.apply(i, Le(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(i, !0), this.delayedTransforms = null;
3628
+ this.delayedTransforms && i.push.apply(i, Ie(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(i, !0), this.delayedTransforms = null;
3629
3629
  }
3630
3630
  },
3631
3631
  clearImage: function() {
@@ -3655,7 +3655,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3655
3655
  cropper: n,
3656
3656
  imageSize: e.imageSize
3657
3657
  };
3658
- if (qe(e.defaultBoundaries) ? e.boundaries = e.defaultBoundaries(t) : e.defaultBoundaries === "fit" ? e.boundaries = function(e) {
3658
+ if (Ke(e.defaultBoundaries) ? e.boundaries = e.defaultBoundaries(t) : e.defaultBoundaries === "fit" ? e.boundaries = function(e) {
3659
3659
  var t = e.cropper, n = e.imageSize, r = t.clientHeight, i = t.clientWidth, a = r, o = n.width * r / n.height;
3660
3660
  return o > i && (o = i, a = n.height * i / n.width), {
3661
3661
  width: o,
@@ -3672,10 +3672,10 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3672
3672
  },
3673
3673
  resetVisibleArea: function() {
3674
3674
  var e = this;
3675
- return this.appliedImageTransforms = B(B({}, this.defaultImageTransforms), {}, { flip: B({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then((function() {
3675
+ return this.appliedImageTransforms = V(V({}, this.defaultImageTransforms), {}, { flip: V({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then((function() {
3676
3676
  e.priority !== "visible-area" && (e.visibleArea = null, e.resetCoordinates());
3677
3677
  var t, n, r, i, a, o, s = e.defaultVisibleArea || Bt;
3678
- e.visibleArea = qe(s) ? s({
3678
+ e.visibleArea = Ke(s) ? s({
3679
3679
  imageSize: e.imageSize,
3680
3680
  boundaries: e.boundaries,
3681
3681
  coordinates: e.priority === "visible-area" ? null : e.coordinates,
@@ -3685,7 +3685,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3685
3685
  visibleArea: e.visibleArea,
3686
3686
  boundaries: e.boundaries,
3687
3687
  getAreaRestrictions: e.getAreaRestrictions
3688
- }, n = t.visibleArea, r = t.boundaries, i = t.getAreaRestrictions, a = W({}, n), o = Q(r), a.width / a.height !== o && (a.height = a.width / o), $(a, i({
3688
+ }, n = t.visibleArea, r = t.boundaries, i = t.getAreaRestrictions, a = G({}, n), o = Q(r), a.width / a.height !== o && (a.height = a.width / o), $(a, i({
3689
3689
  visibleArea: a,
3690
3690
  type: "move"
3691
3691
  }))), e.priority === "visible-area" ? e.resetCoordinates() : e.coordinates = e.fitCoordinates({
@@ -3726,7 +3726,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3726
3726
  var e, t = this;
3727
3727
  if (this.imageLoaded = !1, this.delayedTransforms = null, this.src) {
3728
3728
  if (function(e) {
3729
- if (Ke(e)) return !1;
3729
+ if (Ge(e)) return !1;
3730
3730
  var t = window.location, n = /(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e) || [], r = {
3731
3731
  protocol: n[1] || "",
3732
3732
  host: n[2] || "",
@@ -3736,7 +3736,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3736
3736
  };
3737
3737
  return !(!r.protocol && !r.host && !r.port || r.protocol && r.protocol == t.protocol && r.host && r.host == t.host && r.host && i(r) == i(t));
3738
3738
  }(this.src)) {
3739
- var n = G(this.crossOrigin) ? this.canvas : this.crossOrigin;
3739
+ var n = K(this.crossOrigin) ? this.canvas : this.crossOrigin;
3740
3740
  !0 === n && (n = "anonymous"), this.imageAttributes.crossOrigin = n || null;
3741
3741
  }
3742
3742
  if (this.checkOrientation) {
@@ -3779,13 +3779,13 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3779
3779
  },
3780
3780
  onParseImage: function(e) {
3781
3781
  var t = this, n = e.source, r = e.arrayBuffer, i = e.orientation;
3782
- this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, r && i && i > 1 ? Ge(n) || !Ke(n) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([r])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(e) {
3782
+ this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, r && i && i > 1 ? We(n) || !Ge(n) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([r])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(e) {
3783
3783
  for (var t = [], n = new Uint8Array(e); n.length > 0;) {
3784
3784
  var r = n.subarray(0, 8192);
3785
3785
  t.push(String.fromCharCode.apply(null, Array.from ? Array.from(r) : r.slice())), n = n.subarray(8192);
3786
3786
  }
3787
3787
  return "data:image/jpeg;base64," + btoa(t.join(""));
3788
- }(r) : this.imageAttributes.src = n, qe(this.defaultTransforms) ? this.appliedImageTransforms = on(this.defaultTransforms()) : Je(this.defaultTransforms) ? this.appliedImageTransforms = on(this.defaultTransforms) : this.appliedImageTransforms = function(e) {
3788
+ }(r) : this.imageAttributes.src = n, Ke(this.defaultTransforms) ? this.appliedImageTransforms = on(this.defaultTransforms()) : qe(this.defaultTransforms) ? this.appliedImageTransforms = on(this.defaultTransforms) : this.appliedImageTransforms = function(e) {
3789
3789
  var t = on({});
3790
3790
  if (e) switch (e) {
3791
3791
  case 2:
@@ -3809,7 +3809,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3809
3809
  case 8: t.rotate = -90;
3810
3810
  }
3811
3811
  return t;
3812
- }(i), this.defaultImageTransforms = B(B({}, this.appliedImageTransforms), {}, { flip: B({}, this.appliedImageTransforms.flip) }), this.$nextTick((function() {
3812
+ }(i), this.defaultImageTransforms = V(V({}, this.appliedImageTransforms), {}, { flip: V({}, this.appliedImageTransforms.flip) }), this.$nextTick((function() {
3813
3813
  var e = t.$refs.image;
3814
3814
  e && e.complete && (function(e) {
3815
3815
  return !!e.naturalWidth;
@@ -3825,7 +3825,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3825
3825
  onMove: function(e) {
3826
3826
  var t = this;
3827
3827
  this.transitionsOptions.enabled || this.awaitRender((function() {
3828
- t.coordinates = t.moveAlgorithm(B(B({}, t.getPublicProperties()), {}, {
3828
+ t.coordinates = t.moveAlgorithm(V(V({}, t.getPublicProperties()), {}, {
3829
3829
  positionRestrictions: Vt(t.positionRestrictions, t.visibleArea),
3830
3830
  coordinates: t.coordinates,
3831
3831
  event: t.normalizeEvent(e)
@@ -3836,7 +3836,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3836
3836
  var t = this;
3837
3837
  this.transitionsOptions.enabled || this.stencilSize && !this.autoZoom || this.awaitRender((function() {
3838
3838
  var n = t.sizeRestrictions, r = Math.min(t.coordinates.width, t.coordinates.height, 20 * t.coefficient);
3839
- t.coordinates = t.resizeAlgorithm(B(B({}, t.getPublicProperties()), {}, {
3839
+ t.coordinates = t.resizeAlgorithm(V(V({}, t.getPublicProperties()), {}, {
3840
3840
  positionRestrictions: Vt(t.positionRestrictions, t.visibleArea),
3841
3841
  sizeRestrictions: {
3842
3842
  maxWidth: Math.min(n.maxWidth, t.visibleArea.width),
@@ -3853,7 +3853,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3853
3853
  if (!this.transitionsOptions.enabled) {
3854
3854
  var n = t.transitions, r = n !== void 0 && n, i = t.normalize, a = i === void 0 || i;
3855
3855
  r && this.enableTransitions();
3856
- var o = Ht(B(B({}, this.getPublicProperties()), {}, {
3856
+ var o = Ht(V(V({}, this.getPublicProperties()), {}, {
3857
3857
  event: a ? this.normalizeEvent(e) : e,
3858
3858
  getAreaRestrictions: this.getAreaRestrictions,
3859
3859
  imageRestriction: this.imageRestriction,
@@ -3881,9 +3881,9 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3881
3881
  var s = this.$refs.stencil.aspectRatios();
3882
3882
  t = s.minimum, n = s.maximum;
3883
3883
  }
3884
- if (G(t) && (t = G(i) ? a : i), G(n) && (n = G(i) ? o : i), !e && (G(t) || G(n))) {
3884
+ if (K(t) && (t = K(i) ? a : i), K(n) && (n = K(i) ? o : i), !e && (K(t) || K(n))) {
3885
3885
  var c = this.getStencilSize(), l = c ? Q(c) : null;
3886
- G(t) && (t = Ze(l) ? l : void 0), G(n) && (n = Ze(l) ? l : void 0);
3886
+ K(t) && (t = Xe(l) ? l : void 0), K(n) && (n = Xe(l) ? l : void 0);
3887
3887
  }
3888
3888
  return {
3889
3889
  minimum: t,
@@ -3901,7 +3901,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3901
3901
  coefficient: this.coefficient,
3902
3902
  coordinates: this.coordinates,
3903
3903
  aspectRatio: this.getAspectRatio(!0)
3904
- }, t = e.boundaries, n = e.stencilSize, r = e.aspectRatio, bt(Q(i = qe(n) ? n({
3904
+ }, t = e.boundaries, n = e.stencilSize, r = e.aspectRatio, bt(Q(i = Ke(n) ? n({
3905
3905
  boundaries: t,
3906
3906
  aspectRatio: r
3907
3907
  }) : n), r) && (i = jt({
@@ -3946,13 +3946,13 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3946
3946
  };
3947
3947
  },
3948
3948
  defaultCoordinates: function() {
3949
- return B({}, pt);
3949
+ return V({}, ft);
3950
3950
  },
3951
3951
  flip: function(e, t) {
3952
3952
  var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
3953
3953
  if (!this.transitionsActive) {
3954
3954
  r && this.enableTransitions();
3955
- var i = B({}, this.imageTransforms.flip), a = Wt({
3955
+ var i = V({}, this.imageTransforms.flip), a = Wt({
3956
3956
  flip: {
3957
3957
  horizontal: e ? !i.horizontal : i.horizontal,
3958
3958
  vertical: t ? !i.vertical : i.vertical
@@ -3974,7 +3974,7 @@ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
3974
3974
  var t = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).transitions, n = t === void 0 || t;
3975
3975
  if (!this.transitionsActive) {
3976
3976
  n && this.enableTransitions();
3977
- var r = B({}, this.imageSize);
3977
+ var r = V({}, this.imageSize);
3978
3978
  this.appliedImageTransforms.rotate += e;
3979
3979
  var i = Ut({
3980
3980
  visibleArea: this.visibleArea,
@@ -4009,10 +4009,10 @@ wn.render = function(t, r, i, s, c, l) {
4009
4009
  return o(), b("div", {
4010
4010
  ref: "cropper",
4011
4011
  class: l.classes.cropper
4012
- }, [A("div", {
4012
+ }, [j("div", {
4013
4013
  ref: "stretcher",
4014
4014
  class: l.classes.stretcher
4015
- }, null, 2), A("div", {
4015
+ }, null, 2), j("div", {
4016
4016
  class: l.classes.boundaries,
4017
4017
  style: l.boundariesStyle
4018
4018
  }, [(o(), b(a(i.backgroundWrapperComponent), {
@@ -4026,11 +4026,11 @@ wn.render = function(t, r, i, s, c, l) {
4026
4026
  }, {
4027
4027
  default: u((function() {
4028
4028
  return [
4029
- A("div", {
4029
+ j("div", {
4030
4030
  class: l.classes.background,
4031
4031
  style: l.boundariesStyle
4032
4032
  }, null, 6),
4033
- A("div", { class: l.classes.imageWrapper }, [A("img", {
4033
+ j("div", { class: l.classes.imageWrapper }, [j("img", {
4034
4034
  ref: "image",
4035
4035
  crossorigin: c.imageAttributes.crossOrigin,
4036
4036
  src: c.imageAttributes.src,
@@ -4038,7 +4038,7 @@ wn.render = function(t, r, i, s, c, l) {
4038
4038
  style: l.imageStyle,
4039
4039
  onMousedown: r[1] ||= y((function() {}), ["prevent"])
4040
4040
  }, null, 46, ["crossorigin", "src"])], 2),
4041
- A("div", {
4041
+ j("div", {
4042
4042
  class: l.classes.foreground,
4043
4043
  style: l.boundariesStyle
4044
4044
  }, null, 6),
@@ -4130,7 +4130,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4130
4130
  }, nr = {
4131
4131
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
4132
4132
  style: { color: "var(--tpl-text-muted)" }
4133
- }, rr = ["placeholder"], ir = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, ar = ["disabled"], or = /*#__PURE__*/ se(/* @__PURE__ */ k({
4133
+ }, rr = ["placeholder"], ir = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, ar = ["disabled"], or = /*#__PURE__*/ ie(/* @__PURE__ */ A({
4134
4134
  __name: "MediaEditModal",
4135
4135
  props: {
4136
4136
  visible: { type: Boolean },
@@ -4138,56 +4138,56 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4138
4138
  },
4139
4139
  emits: ["save", "close"],
4140
4140
  setup(e, { emit: t }) {
4141
- let r = e, i = t, { t: a } = z(), s = l("tplUiTheme"), f = l(Pe, d(null)), T = a.mediaLibrary, { isImageMimeType: ee } = Oe(), k = d(""), j = d(""), M = d(null), N = d("free"), ne = d(void 0), P = d(void 0), re = d(""), F = d(""), ie = d(void 0), I = d(null), L = d(!1), ae = d(!1), oe = d(!1), se = h(() => r.item ? [
4141
+ let r = e, i = t, { t: a } = B(), s = l("tplUiTheme"), f = l(Ne, d(null)), T = a.mediaLibrary, { isImageMimeType: D } = De(), A = d(""), M = d(""), N = d(null), P = d("free"), F = d(void 0), te = d(void 0), ne = d(""), re = d(""), I = d(void 0), L = d(null), ie = d(!1), R = d(!1), ae = d(!1), oe = h(() => r.item ? [
4142
4142
  "image/jpeg",
4143
4143
  "image/png",
4144
4144
  "image/webp",
4145
4145
  "image/gif"
4146
- ].includes(r.item.mime_type) : !1), ce = h(() => N.value === "original" ? ie.value : ke[N.value]), le = h(() => I.value ? Ne(I.value.width, I.value.height, ne.value, P.value) : null);
4147
- te(() => r.visible, (e) => {
4148
- e && r.item && (k.value = r.item.filename, j.value = r.item.alt_text || "", N.value = "free", ne.value = void 0, P.value = void 0, re.value = "", F.value = "", ie.value = void 0, I.value = null, L.value = !1, oe.value = !1, r.item.width && r.item.height && (ie.value = r.item.width / r.item.height));
4146
+ ].includes(r.item.mime_type) : !1), se = h(() => P.value === "original" ? I.value : Oe[P.value]), ce = h(() => L.value ? Me(L.value.width, L.value.height, F.value, te.value) : null);
4147
+ ee(() => r.visible, (e) => {
4148
+ e && r.item && (A.value = r.item.filename, M.value = r.item.alt_text || "", P.value = "free", F.value = void 0, te.value = void 0, ne.value = "", re.value = "", I.value = void 0, L.value = null, ie.value = !1, ae.value = !1, r.item.width && r.item.height && (I.value = r.item.width / r.item.height));
4149
4149
  });
4150
- function ue(e) {
4151
- e.coordinates && (I.value = {
4150
+ function le(e) {
4151
+ e.coordinates && (L.value = {
4152
4152
  width: Math.round(e.coordinates.width),
4153
4153
  height: Math.round(e.coordinates.height)
4154
- }, oe.value = !0);
4154
+ }, ae.value = !0);
4155
4155
  }
4156
- function R() {
4157
- L.value = !0, !ie.value && r.item?.width && r.item?.height && (ie.value = r.item.width / r.item.height);
4156
+ function ue() {
4157
+ ie.value = !0, !I.value && r.item?.width && r.item?.height && (I.value = r.item.width / r.item.height);
4158
4158
  }
4159
4159
  function de(e) {
4160
4160
  let t = e.target.value;
4161
- re.value = t, ne.value = t && parseInt(t, 10) || void 0;
4161
+ ne.value = t, F.value = t && parseInt(t, 10) || void 0;
4162
4162
  }
4163
- function fe(e) {
4163
+ function z(e) {
4164
4164
  let t = e.target.value;
4165
- F.value = t, P.value = t && parseInt(t, 10) || void 0;
4165
+ re.value = t, te.value = t && parseInt(t, 10) || void 0;
4166
4166
  }
4167
- async function pe() {
4168
- let e = k.value.trim();
4169
- if (!e || !r.item || ae.value) return;
4170
- let t = ee(r.item.mime_type), n;
4171
- if (se.value && M.value && oe.value) {
4172
- ae.value = !0;
4167
+ async function fe() {
4168
+ let e = A.value.trim();
4169
+ if (!e || !r.item || R.value) return;
4170
+ let t = D(r.item.mime_type), n;
4171
+ if (oe.value && N.value && ae.value) {
4172
+ R.value = !0;
4173
4173
  try {
4174
- let { canvas: e } = M.value.getResult();
4174
+ let { canvas: e } = N.value.getResult();
4175
4175
  if (e) {
4176
- let t = je(e, ne.value, P.value), i = Ae(r.item.mime_type);
4177
- n = { file: await Me(t, r.item.filename, i) };
4176
+ let t = Ae(e, F.value, te.value), i = ke(r.item.mime_type);
4177
+ n = { file: await je(t, r.item.filename, i) };
4178
4178
  }
4179
4179
  } catch {
4180
- ae.value = !1;
4180
+ R.value = !1;
4181
4181
  return;
4182
4182
  }
4183
- ae.value = !1;
4183
+ R.value = !1;
4184
4184
  }
4185
- i("save", r.item.id, e, t ? j.value : void 0, n), i("close");
4185
+ i("save", r.item.id, e, t ? M.value : void 0, n), i("close");
4186
4186
  }
4187
- function me(e) {
4188
- e.key === "Enter" && !ae.value && (e.preventDefault(), pe()), e.key === "Escape" && i("close");
4187
+ function pe(e) {
4188
+ e.key === "Enter" && !R.value && (e.preventDefault(), fe()), e.key === "Escape" && i("close");
4189
4189
  }
4190
- return (t, r) => (o(), b(m, { to: v(f) || "body" }, [A(x, {
4190
+ return (t, r) => (o(), b(m, { to: v(f) || "body" }, [j(x, {
4191
4191
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
4192
4192
  "enter-from-class": "tpl:opacity-0",
4193
4193
  "enter-to-class": "tpl:opacity-100",
@@ -4201,24 +4201,24 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4201
4201
  class: "tpl tpl:fixed tpl:inset-0 tpl:z-[10000] tpl:flex tpl:items-center tpl:justify-center",
4202
4202
  style: { "background-color": "var(--tpl-overlay)" },
4203
4203
  onClick: r[3] ||= y((e) => i("close"), ["self"]),
4204
- onKeydown: me
4204
+ onKeydown: pe
4205
4205
  }, [w("div", {
4206
- class: C(["tpl:mx-4 tpl:flex tpl:max-h-[90vh] tpl:w-full tpl:flex-col tpl:overflow-hidden tpl:rounded-lg tpl:shadow-xl", se.value ? "tpl:max-w-2xl" : "tpl:max-w-sm"]),
4206
+ class: C(["tpl:mx-4 tpl:flex tpl:max-h-[90vh] tpl:w-full tpl:flex-col tpl:overflow-hidden tpl:rounded-lg tpl:shadow-xl", oe.value ? "tpl:max-w-2xl" : "tpl:max-w-sm"]),
4207
4207
  style: { "background-color": "var(--tpl-bg-elevated)" }
4208
4208
  }, [
4209
4209
  w("div", On, [w("h3", kn, p(v(a).mediaLibrary.editFile), 1)]),
4210
4210
  w("div", An, [
4211
- se.value ? (o(), g("div", jn, [w("div", Mn, [A(v(wn), {
4211
+ oe.value ? (o(), g("div", jn, [w("div", Mn, [j(v(wn), {
4212
4212
  ref_key: "cropperRef",
4213
- ref: M,
4213
+ ref: N,
4214
4214
  src: e.item.url,
4215
- "stencil-props": { aspectRatio: ce.value },
4215
+ "stencil-props": { aspectRatio: se.value },
4216
4216
  class: "tpl:h-full tpl:w-full",
4217
4217
  "background-class": "tpl-cropper-background",
4218
- onChange: ue,
4219
- onReady: R
4218
+ onChange: le,
4219
+ onReady: ue
4220
4220
  }, null, 8, ["src", "stencil-props"])]), w("div", Nn, [
4221
- w("div", null, [w("label", Pn, p(v(a).mediaLibrary.cropAspectRatio), 1), w("div", Fn, [(o(), g(D, null, c([
4221
+ w("div", null, [w("label", Pn, p(v(a).mediaLibrary.cropAspectRatio), 1), w("div", Fn, [(o(), g(O, null, c([
4222
4222
  "free",
4223
4223
  "square",
4224
4224
  "landscape43",
@@ -4229,14 +4229,14 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4229
4229
  type: "button",
4230
4230
  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",
4231
4231
  style: E({
4232
- borderColor: N.value === e ? "var(--tpl-primary)" : "var(--tpl-border)",
4233
- backgroundColor: N.value === e ? "var(--tpl-primary-light)" : "var(--tpl-bg)",
4234
- color: N.value === e ? "var(--tpl-primary)" : "var(--tpl-text)"
4232
+ borderColor: P.value === e ? "var(--tpl-primary)" : "var(--tpl-border)",
4233
+ backgroundColor: P.value === e ? "var(--tpl-primary-light)" : "var(--tpl-bg)",
4234
+ color: P.value === e ? "var(--tpl-primary)" : "var(--tpl-text)"
4235
4235
  }),
4236
- onClick: (t) => N.value = e
4236
+ onClick: (t) => P.value = e
4237
4237
  }, p(v(T)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13, In)), 64))])]),
4238
- w("div", Ln, [w("div", Rn, [w("label", zn, [O(p(v(a).mediaLibrary.cropMaxWidth) + " ", 1), w("span", Bn, p(v(a).mediaLibrary.cropOptional), 1)]), w("div", Vn, [w("input", {
4239
- value: re.value,
4238
+ w("div", Ln, [w("div", Rn, [w("label", zn, [k(p(v(a).mediaLibrary.cropMaxWidth) + " ", 1), w("span", Bn, p(v(a).mediaLibrary.cropOptional), 1)]), w("div", Vn, [w("input", {
4239
+ value: ne.value,
4240
4240
  type: "number",
4241
4241
  min: "1",
4242
4242
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-8 tpl:pl-3 tpl:text-xs tpl:outline-none",
@@ -4245,10 +4245,10 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4245
4245
  "background-color": "var(--tpl-bg)",
4246
4246
  color: "var(--tpl-text)"
4247
4247
  },
4248
- placeholder: I.value?.width?.toString() || "",
4248
+ placeholder: L.value?.width?.toString() || "",
4249
4249
  onInput: de
4250
- }, null, 40, Hn), w("span", Un, p(v(a).mediaLibrary.cropPixels), 1)])]), w("div", Wn, [w("label", Gn, [O(p(v(a).mediaLibrary.cropMaxHeight) + " ", 1), w("span", Kn, p(v(a).mediaLibrary.cropOptional), 1)]), w("div", qn, [w("input", {
4251
- value: F.value,
4250
+ }, null, 40, Hn), w("span", Un, p(v(a).mediaLibrary.cropPixels), 1)])]), w("div", Wn, [w("label", Gn, [k(p(v(a).mediaLibrary.cropMaxHeight) + " ", 1), w("span", Kn, p(v(a).mediaLibrary.cropOptional), 1)]), w("div", qn, [w("input", {
4251
+ value: re.value,
4252
4252
  type: "number",
4253
4253
  min: "1",
4254
4254
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-8 tpl:pl-3 tpl:text-xs tpl:outline-none",
@@ -4257,13 +4257,13 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4257
4257
  "background-color": "var(--tpl-bg)",
4258
4258
  color: "var(--tpl-text)"
4259
4259
  },
4260
- placeholder: I.value?.height?.toString() || "",
4261
- onInput: fe
4260
+ placeholder: L.value?.height?.toString() || "",
4261
+ onInput: z
4262
4262
  }, null, 40, Jn), w("span", Yn, p(v(a).mediaLibrary.cropPixels), 1)])])]),
4263
- le.value ? (o(), g("div", Xn, [w("span", null, p(v(a).mediaLibrary.cropOutputSize) + ": ", 1), w("span", Zn, p(le.value.width) + " x " + p(le.value.height) + " " + p(v(a).mediaLibrary.cropPixels), 1)])) : _("", !0)
4263
+ ce.value ? (o(), g("div", Xn, [w("span", null, p(v(a).mediaLibrary.cropOutputSize) + ": ", 1), w("span", Zn, p(ce.value.width) + " x " + p(ce.value.height) + " " + p(v(a).mediaLibrary.cropPixels), 1)])) : _("", !0)
4264
4264
  ])])) : _("", !0),
4265
4265
  w("div", Qn, [w("label", $n, p(v(a).mediaLibrary.fileName), 1), n(w("input", {
4266
- "onUpdate:modelValue": r[0] ||= (e) => k.value = e,
4266
+ "onUpdate:modelValue": r[0] ||= (e) => A.value = e,
4267
4267
  type: "text",
4268
4268
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
4269
4269
  style: {
@@ -4271,10 +4271,10 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4271
4271
  "background-color": "var(--tpl-bg)",
4272
4272
  color: "var(--tpl-text)"
4273
4273
  },
4274
- autofocus: !se.value
4275
- }, null, 8, er), [[S, k.value]])]),
4276
- v(ee)(e.item.mime_type) ? (o(), g("div", tr, [w("label", nr, p(v(a).mediaLibrary.altText), 1), n(w("input", {
4277
- "onUpdate:modelValue": r[1] ||= (e) => j.value = e,
4274
+ autofocus: !oe.value
4275
+ }, null, 8, er), [[S, A.value]])]),
4276
+ v(D)(e.item.mime_type) ? (o(), g("div", tr, [w("label", nr, p(v(a).mediaLibrary.altText), 1), n(w("input", {
4277
+ "onUpdate:modelValue": r[1] ||= (e) => M.value = e,
4278
4278
  type: "text",
4279
4279
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
4280
4280
  style: {
@@ -4283,7 +4283,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4283
4283
  color: "var(--tpl-text)"
4284
4284
  },
4285
4285
  placeholder: v(a).mediaLibrary.altTextPlaceholder
4286
- }, null, 8, rr), [[S, j.value]])])) : _("", !0)
4286
+ }, null, 8, rr), [[S, M.value]])])) : _("", !0)
4287
4287
  ]),
4288
4288
  w("div", ir, [w("button", {
4289
4289
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
@@ -4296,9 +4296,9 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4296
4296
  }, p(v(a).mediaLibrary.cancel), 1), w("button", {
4297
4297
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white tpl:transition-all tpl:duration-150 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
4298
4298
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
4299
- disabled: ae.value,
4300
- onClick: pe
4301
- }, p(ae.value ? v(a).mediaLibrary.saving : v(a).mediaLibrary.saveChanges), 9, ar)])
4299
+ disabled: R.value,
4300
+ onClick: fe
4301
+ }, p(R.value ? v(a).mediaLibrary.saving : v(a).mediaLibrary.saveChanges), 9, ar)])
4302
4302
  ], 2)], 40, Dn)) : _("", !0)]),
4303
4303
  _: 1
4304
4304
  })], 8, ["to"]));
@@ -4312,7 +4312,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4312
4312
  }, lr = {
4313
4313
  key: 3,
4314
4314
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:opacity-0 tpl:transition-opacity tpl:group-hover:opacity-100"
4315
- }, ur = ["title"], dr = ["title"], fr = { key: 0 }, pr = ["placeholder"], mr = 5, hr = /* @__PURE__ */ k({
4315
+ }, ur = ["title"], dr = ["title"], fr = { key: 0 }, pr = ["placeholder"], mr = 5, hr = /* @__PURE__ */ A({
4316
4316
  __name: "MediaFolderTreeNode",
4317
4317
  props: {
4318
4318
  folder: {},
@@ -4326,31 +4326,31 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4326
4326
  "deleteFolder"
4327
4327
  ],
4328
4328
  setup(e, { emit: t }) {
4329
- let i = e, a = t, { t: s } = z(), l = d(!1), u = d(!1), m = d(""), x = d(!1), T = d(""), ee = h(() => (i.folder.children?.length ?? 0) > 0), O = h(() => i.depth < mr - 1), k = h(() => i.currentFolderId === i.folder.id), te = h(() => !i.currentFolderId || !i.folder.children ? !1 : M(i.folder.children, i.currentFolderId)), j = h(() => l.value || te.value);
4330
- function M(e, t) {
4331
- for (let n of e) if (n.id === t || n.children && M(n.children, t)) return !0;
4329
+ let i = e, a = t, { t: s } = B(), l = d(!1), u = d(!1), m = d(""), x = d(!1), T = d(""), D = h(() => (i.folder.children?.length ?? 0) > 0), k = h(() => i.depth < mr - 1), A = h(() => i.currentFolderId === i.folder.id), ee = h(() => !i.currentFolderId || !i.folder.children ? !1 : N(i.folder.children, i.currentFolderId)), M = h(() => l.value || ee.value);
4330
+ function N(e, t) {
4331
+ for (let n of e) if (n.id === t || n.children && N(n.children, t)) return !0;
4332
4332
  return !1;
4333
4333
  }
4334
- function N() {
4334
+ function P() {
4335
4335
  l.value = !l.value;
4336
4336
  }
4337
- function ne() {
4337
+ function F() {
4338
4338
  u.value = !0, m.value = i.folder.name;
4339
4339
  }
4340
- function P() {
4340
+ function ne() {
4341
4341
  let e = m.value.trim();
4342
4342
  e && e !== i.folder.name && a("renameFolder", i.folder.id, e), u.value = !1, m.value = "";
4343
4343
  }
4344
- function re() {
4344
+ function I() {
4345
4345
  u.value = !1, m.value = "";
4346
4346
  }
4347
- function F() {
4347
+ function L() {
4348
4348
  x.value = !0, T.value = "", l.value = !0;
4349
4349
  }
4350
4350
  function ie() {
4351
4351
  T.value.trim() && a("createFolder", T.value.trim(), i.folder.id), x.value = !1, T.value = "";
4352
4352
  }
4353
- function I() {
4353
+ function R() {
4354
4354
  x.value = !1, T.value = "";
4355
4355
  }
4356
4356
  return (t, i) => {
@@ -4359,23 +4359,23 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4359
4359
  class: "tpl:group tpl:flex tpl:w-full tpl:items-center tpl:gap-1 tpl:py-1.5 tpl:pr-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
4360
4360
  style: E({
4361
4361
  paddingLeft: `${e.depth * 16 + 8}px`,
4362
- backgroundColor: k.value ? "var(--tpl-bg-active)" : "transparent",
4363
- color: k.value ? "var(--tpl-primary)" : "var(--tpl-text)"
4362
+ backgroundColor: A.value ? "var(--tpl-bg-active)" : "transparent",
4363
+ color: A.value ? "var(--tpl-primary)" : "var(--tpl-text)"
4364
4364
  })
4365
4365
  }, [
4366
- ee.value || x.value ? (o(), g("button", {
4366
+ D.value || x.value ? (o(), g("button", {
4367
4367
  key: 0,
4368
4368
  class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4369
- onClick: y(N, ["stop"])
4370
- }, [A(v(de), {
4371
- class: C(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": j.value }]),
4369
+ onClick: y(P, ["stop"])
4370
+ }, [j(v(te), {
4371
+ class: C(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": M.value }]),
4372
4372
  size: 10,
4373
4373
  "stroke-width": 2
4374
4374
  }, null, 8, ["class"])])) : (o(), g("span", sr)),
4375
4375
  w("button", {
4376
4376
  class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
4377
4377
  onClick: i[0] ||= (t) => a("navigate", e.folder.id)
4378
- }, [A(v(xe), {
4378
+ }, [j(v(be), {
4379
4379
  class: "tpl:shrink-0",
4380
4380
  size: 14,
4381
4381
  "stroke-width": 1.5
@@ -4391,38 +4391,38 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4391
4391
  color: "var(--tpl-text)"
4392
4392
  },
4393
4393
  autofocus: "",
4394
- onKeydown: [f(P, ["enter"]), f(re, ["escape"])],
4395
- onBlur: P,
4394
+ onKeydown: [f(ne, ["enter"]), f(I, ["escape"])],
4395
+ onBlur: ne,
4396
4396
  onClick: i[2] ||= y(() => {}, ["stop"])
4397
4397
  }, null, 544)), [[S, m.value]]) : _("", !0),
4398
4398
  u.value ? _("", !0) : (o(), g("span", lr, [
4399
- O.value ? (o(), g("button", {
4399
+ k.value ? (o(), g("button", {
4400
4400
  key: 0,
4401
4401
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4402
4402
  title: v(s).mediaLibrary.addSubfolder,
4403
- onClick: y(F, ["stop"])
4404
- }, [A(v(be), {
4403
+ onClick: y(L, ["stop"])
4404
+ }, [j(v(ye), {
4405
4405
  size: 12,
4406
4406
  "stroke-width": 2
4407
4407
  })], 8, ur)) : _("", !0),
4408
4408
  w("button", {
4409
4409
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4410
4410
  title: v(s).mediaLibrary.renameFolder,
4411
- onClick: y(ne, ["stop"])
4412
- }, [A(v(oe), {
4411
+ onClick: y(F, ["stop"])
4412
+ }, [j(v(oe), {
4413
4413
  size: 12,
4414
4414
  "stroke-width": 2
4415
4415
  })], 8, dr),
4416
4416
  w("button", {
4417
4417
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4418
4418
  onClick: i[3] ||= y((t) => a("deleteFolder", e.folder.id), ["stop"])
4419
- }, [A(v(le), {
4419
+ }, [j(v(re), {
4420
4420
  size: 12,
4421
4421
  "stroke-width": 2,
4422
4422
  style: { color: "var(--tpl-danger)" }
4423
4423
  })])
4424
4424
  ]))
4425
- ], 4), j.value ? (o(), g("div", fr, [(o(!0), g(D, null, c(e.folder.children, (t) => (o(), b(l, {
4425
+ ], 4), M.value ? (o(), g("div", fr, [(o(!0), g(O, null, c(e.folder.children, (t) => (o(), b(l, {
4426
4426
  key: t.id,
4427
4427
  folder: t,
4428
4428
  "current-folder-id": e.currentFolderId,
@@ -4450,7 +4450,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4450
4450
  },
4451
4451
  placeholder: v(s).mediaLibrary.subfolderName,
4452
4452
  autofocus: "",
4453
- onKeydown: [f(ie, ["enter"]), f(I, ["escape"])],
4453
+ onKeydown: [f(ie, ["enter"]), f(R, ["escape"])],
4454
4454
  onBlur: ie
4455
4455
  }, null, 40, pr), [[S, T.value]])], 4)) : _("", !0)])) : _("", !0)]);
4456
4456
  };
@@ -4458,7 +4458,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4458
4458
  }), gr = { class: "tpl:flex tpl:h-full tpl:flex-col tpl:overflow-y-auto" }, _r = {
4459
4459
  key: 0,
4460
4460
  class: "tpl:px-3 tpl:py-2"
4461
- }, vr = ["placeholder"], yr = /* @__PURE__ */ k({
4461
+ }, vr = ["placeholder"], yr = /* @__PURE__ */ A({
4462
4462
  __name: "MediaFolderTree",
4463
4463
  props: {
4464
4464
  folders: {},
@@ -4474,7 +4474,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4474
4474
  "showFrequentlyUsed"
4475
4475
  ],
4476
4476
  setup(e, { emit: t }) {
4477
- let r = t, { t: i } = z(), a = d(!1), s = d("");
4477
+ let r = t, { t: i } = B(), a = d(!1), s = d("");
4478
4478
  function l() {
4479
4479
  a.value = !0, s.value = "";
4480
4480
  }
@@ -4492,11 +4492,11 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4492
4492
  color: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
4493
4493
  }),
4494
4494
  onClick: d[0] ||= (e) => r("navigate", null)
4495
- }, [A(v(pe), {
4495
+ }, [j(v(fe), {
4496
4496
  size: 14,
4497
4497
  "stroke-width": 1.5
4498
- }), O(" " + p(v(i).mediaLibrary.allFiles), 1)], 4),
4499
- (o(!0), g(D, null, c(e.folders, (t) => (o(), b(hr, {
4498
+ }), k(" " + p(v(i).mediaLibrary.allFiles), 1)], 4),
4499
+ (o(!0), g(O, null, c(e.folders, (t) => (o(), b(hr, {
4500
4500
  key: t.id,
4501
4501
  folder: t,
4502
4502
  "current-folder-id": e.currentFolderId,
@@ -4525,10 +4525,10 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4525
4525
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
4526
4526
  style: { color: "var(--tpl-text-muted)" },
4527
4527
  onClick: l
4528
- }, [A(v(be), {
4528
+ }, [j(v(ye), {
4529
4529
  size: 14,
4530
4530
  "stroke-width": 1.5
4531
- }), O(" " + p(v(i).mediaLibrary.newFolder), 1)])),
4531
+ }), k(" " + p(v(i).mediaLibrary.newFolder), 1)])),
4532
4532
  d[7] ||= w("div", { class: "tpl:flex-1" }, null, -1),
4533
4533
  e.hasFrequentlyUsed ? (o(), g("button", {
4534
4534
  key: 2,
@@ -4539,13 +4539,13 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4539
4539
  color: e.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
4540
4540
  }),
4541
4541
  onClick: d[6] ||= (e) => r("showFrequentlyUsed")
4542
- }, [A(v(ye), {
4542
+ }, [j(v(ve), {
4543
4543
  size: 14,
4544
4544
  "stroke-width": 1.5
4545
- }), O(" " + p(v(i).mediaLibrary.frequentlyUsed), 1)], 4)) : _("", !0)
4545
+ }), k(" " + p(v(i).mediaLibrary.frequentlyUsed), 1)], 4)) : _("", !0)
4546
4546
  ]));
4547
4547
  }
4548
- }), br = { class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2" }, xr = /* @__PURE__ */ k({
4548
+ }), br = { class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2" }, xr = /* @__PURE__ */ A({
4549
4549
  __name: "MediaFileIcon",
4550
4550
  props: { mimeType: {} },
4551
4551
  setup(e) {
@@ -4756,7 +4756,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4756
4756
  }, Yr = {
4757
4757
  key: 4,
4758
4758
  class: "tpl:flex tpl:justify-center tpl:py-4"
4759
- }, Xr = /*#__PURE__*/ se(/* @__PURE__ */ k({
4759
+ }, Xr = /*#__PURE__*/ ie(/* @__PURE__ */ A({
4760
4760
  __name: "MediaGrid",
4761
4761
  props: {
4762
4762
  items: {},
@@ -4774,15 +4774,15 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4774
4774
  "replace"
4775
4775
  ],
4776
4776
  setup(e, { emit: t }) {
4777
- let n = e, r = t, { isAcceptedMimeType: i, isImageMimeType: a } = Oe();
4777
+ let n = e, r = t, { isAcceptedMimeType: i, isImageMimeType: a } = De();
4778
4778
  function s(e) {
4779
4779
  return !n.accept || n.accept.length === 0 ? !0 : i(e.mime_type, n.accept);
4780
4780
  }
4781
4781
  function l(e) {
4782
4782
  r("select", e);
4783
4783
  }
4784
- let { t: u } = z(), f = d(null);
4785
- P(f, ([{ isIntersecting: e }]) => {
4784
+ let { t: u } = B(), f = d(null);
4785
+ L(f, ([{ isIntersecting: e }]) => {
4786
4786
  e && n.hasMore && !n.isLoading && r("loadMore");
4787
4787
  }, { threshold: .1 });
4788
4788
  function m(e) {
@@ -4799,16 +4799,16 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4799
4799
  e.isLoading && e.items.length === 0 ? (o(), g("div", {
4800
4800
  key: 0,
4801
4801
  class: C(e.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
4802
- }, [(o(), g(D, null, c(8, (t) => w("div", {
4802
+ }, [(o(), g(O, null, c(8, (t) => w("div", {
4803
4803
  key: t,
4804
4804
  class: C(["tpl-pulse tpl:rounded-lg", e.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
4805
4805
  style: { "background-color": "var(--tpl-bg-hover)" }
4806
- }, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), g("div", Cr, [A(v(pe), {
4806
+ }, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), g("div", Cr, [j(v(fe), {
4807
4807
  class: "tpl:mb-3",
4808
4808
  size: 40,
4809
4809
  "stroke-width": 1,
4810
4810
  style: { color: "var(--tpl-text-dim)" }
4811
- }), w("p", wr, p(v(u).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (o(), g("div", Lr, [(o(!0), g(D, null, c(e.items, (t) => (o(), g("div", {
4811
+ }), w("p", wr, p(v(u).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (o(), g("div", Lr, [(o(!0), g(O, null, c(e.items, (t) => (o(), g("div", {
4812
4812
  key: t.id,
4813
4813
  class: C(["tpl-media-list-item tpl:group tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-150", [!s(t) && !e.selectedIds.has(t.id) ? "tpl:opacity-60" : ""]]),
4814
4814
  style: E({ backgroundColor: e.selectedIds.has(t.id) ? "var(--tpl-bg-hover)" : "transparent" }),
@@ -4820,14 +4820,14 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4820
4820
  alt: t.filename,
4821
4821
  class: "tpl:size-full tpl:object-cover",
4822
4822
  loading: "lazy"
4823
- }, null, 8, Br)) : (o(), g("div", Vr, [A(xr, { "mime-type": t.mime_type }, null, 8, ["mime-type"])]))]),
4824
- w("div", Hr, [w("p", Ur, p(t.filename), 1), w("p", Wr, [O(p(m(t.size)) + " · " + p(h(t.created_at)) + " ", 1), v(a)(t.mime_type) && t.width && t.height ? (o(), g(D, { key: 0 }, [O(" · " + p(t.width) + "×" + p(t.height), 1)], 64)) : _("", !0)])]),
4823
+ }, null, 8, Br)) : (o(), g("div", Vr, [j(xr, { "mime-type": t.mime_type }, null, 8, ["mime-type"])]))]),
4824
+ w("div", Hr, [w("p", Ur, p(t.filename), 1), w("p", Wr, [k(p(m(t.size)) + " · " + p(h(t.created_at)) + " ", 1), v(a)(t.mime_type) && t.width && t.height ? (o(), g(O, { key: 0 }, [k(" · " + p(t.width) + "×" + p(t.height), 1)], 64)) : _("", !0)])]),
4825
4825
  w("div", Gr, [w("button", {
4826
4826
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
4827
4827
  style: { color: "var(--tpl-text-muted)" },
4828
4828
  title: v(u).mediaLibrary.editFile,
4829
4829
  onClick: y((e) => r("edit", t), ["stop"])
4830
- }, [A(v(oe), {
4830
+ }, [j(v(oe), {
4831
4831
  size: 12,
4832
4832
  "stroke-width": 2
4833
4833
  })], 8, Kr), w("button", {
@@ -4835,15 +4835,15 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4835
4835
  style: { color: "var(--tpl-text-muted)" },
4836
4836
  title: v(u).mediaLibrary.replaceFile,
4837
4837
  onClick: y((e) => r("replace", t), ["stop"])
4838
- }, [A(v(re), {
4838
+ }, [j(v(ce), {
4839
4839
  size: 12,
4840
4840
  "stroke-width": 2
4841
4841
  })], 8, qr)]),
4842
- e.selectedIds.has(t.id) ? (o(), g("div", Jr, [A(v(j), {
4842
+ e.selectedIds.has(t.id) ? (o(), g("div", Jr, [j(v(N), {
4843
4843
  size: 12,
4844
4844
  "stroke-width": 3
4845
4845
  })])) : _("", !0)
4846
- ], 14, Rr))), 128))])) : (o(), g("div", Tr, [(o(!0), g(D, null, c(e.items, (t) => (o(), g("div", {
4846
+ ], 14, Rr))), 128))])) : (o(), g("div", Tr, [(o(!0), g(O, null, c(e.items, (t) => (o(), g("div", {
4847
4847
  key: t.id,
4848
4848
  class: C(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
4849
4849
  "tpl:cursor-pointer",
@@ -4872,7 +4872,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4872
4872
  style: { "background-color": "rgba(0, 0, 0, 0.6)" },
4873
4873
  title: v(u).mediaLibrary.editFile,
4874
4874
  onClick: y((e) => r("edit", t), ["stop"])
4875
- }, [A(v(oe), {
4875
+ }, [j(v(oe), {
4876
4876
  size: 11,
4877
4877
  "stroke-width": 2
4878
4878
  })], 8, Pr), w("button", {
@@ -4880,11 +4880,11 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4880
4880
  style: { "background-color": "rgba(0, 0, 0, 0.6)" },
4881
4881
  title: v(u).mediaLibrary.replaceFile,
4882
4882
  onClick: y((e) => r("replace", t), ["stop"])
4883
- }, [A(v(re), {
4883
+ }, [j(v(ce), {
4884
4884
  size: 11,
4885
4885
  "stroke-width": 2
4886
4886
  })], 8, Fr)]),
4887
- e.selectedIds.has(t.id) ? (o(), g("div", Ir, [A(v(j), {
4887
+ e.selectedIds.has(t.id) ? (o(), g("div", Ir, [j(v(N), {
4888
4888
  size: 12,
4889
4889
  "stroke-width": 3
4890
4890
  })])) : _("", !0)
@@ -4894,7 +4894,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4894
4894
  ref: f,
4895
4895
  class: "tpl:h-4"
4896
4896
  }, null, 512),
4897
- e.isLoading && e.items.length > 0 ? (o(), g("div", Yr, [A(v(F), {
4897
+ e.isLoading && e.items.length > 0 ? (o(), g("div", Yr, [j(v(M), {
4898
4898
  class: "tpl-spinner",
4899
4899
  size: 20,
4900
4900
  "stroke-width": 2,
@@ -4915,7 +4915,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4915
4915
  }, ri = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, ii = ["disabled"], ai = ["disabled"], oi = {
4916
4916
  key: 0,
4917
4917
  class: "tpl:flex tpl:items-center tpl:gap-1.5"
4918
- }, si = { key: 1 }, ci = /* @__PURE__ */ k({
4918
+ }, si = { key: 1 }, ci = /* @__PURE__ */ A({
4919
4919
  __name: "MediaImportUrlModal",
4920
4920
  props: {
4921
4921
  visible: { type: Boolean },
@@ -4924,8 +4924,8 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4924
4924
  },
4925
4925
  emits: ["import", "close"],
4926
4926
  setup(e, { emit: t }) {
4927
- let r = e, i = t, { t: a } = z(), s = l("tplUiTheme"), c = l(Pe, d(null)), f = d("");
4928
- te(() => r.visible, (e) => {
4927
+ let r = e, i = t, { t: a } = B(), s = l("tplUiTheme"), c = l(Ne, d(null)), f = d("");
4928
+ ee(() => r.visible, (e) => {
4929
4929
  e && (f.value = "");
4930
4930
  });
4931
4931
  function h() {
@@ -4938,7 +4938,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4938
4938
  function E(e) {
4939
4939
  e.key === "Enter" && (e.preventDefault(), h()), e.key === "Escape" && T();
4940
4940
  }
4941
- return (t, r) => (o(), b(m, { to: v(c) || "body" }, [A(x, {
4941
+ return (t, r) => (o(), b(m, { to: v(c) || "body" }, [j(x, {
4942
4942
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
4943
4943
  "enter-from-class": "tpl:opacity-0",
4944
4944
  "enter-to-class": "tpl:opacity-100",
@@ -4983,11 +4983,11 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4983
4983
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
4984
4984
  disabled: !f.value.trim() || e.isImporting,
4985
4985
  onClick: h
4986
- }, [e.isImporting ? (o(), g("span", oi, [A(v(F), {
4986
+ }, [e.isImporting ? (o(), g("span", oi, [j(v(M), {
4987
4987
  class: "tpl:animate-spin",
4988
4988
  size: 12,
4989
4989
  "stroke-width": 2
4990
- }), O(" " + p(v(a).mediaLibrary.importing), 1)])) : (o(), g("span", si, p(v(a).mediaLibrary.import), 1))], 8, ai)])
4990
+ }), k(" " + p(v(a).mediaLibrary.importing), 1)])) : (o(), g("span", si, p(v(a).mediaLibrary.import), 1))], 8, ai)])
4991
4991
  ])], 40, Zr)) : _("", !0)]),
4992
4992
  _: 1
4993
4993
  })], 8, ["to"]));
@@ -4996,7 +4996,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4996
4996
  key: 0,
4997
4997
  class: "tpl:shrink-0",
4998
4998
  style: { color: "var(--tpl-text-dim)" }
4999
- }, pi = /* @__PURE__ */ k({
4999
+ }, pi = /* @__PURE__ */ A({
5000
5000
  __name: "MediaMovePicker",
5001
5001
  props: {
5002
5002
  folders: {},
@@ -5004,7 +5004,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5004
5004
  },
5005
5005
  emits: ["select", "close"],
5006
5006
  setup(e, { emit: t }) {
5007
- let n = t, { t: r } = z(), i = d(null);
5007
+ let n = t, { t: r } = B(), i = d(null);
5008
5008
  function a(e, t = 0) {
5009
5009
  let n = [];
5010
5010
  for (let r of e) n.push({
@@ -5014,7 +5014,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5014
5014
  }), r.children?.length && n.push(...a(r.children, t + 1));
5015
5015
  return n;
5016
5016
  }
5017
- return I(i, () => {
5017
+ return le(i, () => {
5018
5018
  n("close");
5019
5019
  }), (t, s) => (o(), g("div", {
5020
5020
  ref_key: "pickerRef",
@@ -5029,11 +5029,11 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5029
5029
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
5030
5030
  style: { color: "var(--tpl-text)" },
5031
5031
  onClick: s[0] ||= (e) => n("select", null)
5032
- }, [A(v(pe), {
5032
+ }, [j(v(fe), {
5033
5033
  class: "tpl:shrink-0",
5034
5034
  size: 14,
5035
5035
  "stroke-width": 1.5
5036
- }), O(" " + p(v(r).mediaLibrary.moveToRoot), 1)])), (o(!0), g(D, null, c(a(e.folders), (t) => (o(), g("button", {
5036
+ }), k(" " + p(v(r).mediaLibrary.moveToRoot), 1)])), (o(!0), g(O, null, c(a(e.folders), (t) => (o(), g("button", {
5037
5037
  key: t.id,
5038
5038
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:py-1.5 tpl:pr-3 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
5039
5039
  style: E({
@@ -5044,7 +5044,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5044
5044
  disabled: t.id === e.currentFolderId,
5045
5045
  onClick: (e) => n("select", t.id)
5046
5046
  }, [
5047
- A(v(xe), {
5047
+ j(v(be), {
5048
5048
  class: "tpl:shrink-0",
5049
5049
  size: 14,
5050
5050
  "stroke-width": 1.5
@@ -5069,7 +5069,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5069
5069
  }, xi = {
5070
5070
  class: "tpl:block tpl:text-[10px]",
5071
5071
  style: { color: "var(--tpl-text-muted)" }
5072
- }, Si = ["value"], Ci = ["value"], wi = /*#__PURE__*/ se(/* @__PURE__ */ k({
5072
+ }, Si = ["value"], Ci = ["value"], wi = /*#__PURE__*/ ie(/* @__PURE__ */ A({
5073
5073
  __name: "MediaPreviewPanel",
5074
5074
  props: {
5075
5075
  item: {},
@@ -5078,7 +5078,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5078
5078
  },
5079
5079
  emits: ["update:selectedConversion"],
5080
5080
  setup(e, { emit: t }) {
5081
- let n = e, r = t, { t: i } = z(), { isImageMimeType: a } = Oe(), s = h(() => {
5081
+ let n = e, r = t, { t: i } = B(), { isImageMimeType: a } = De(), s = h(() => {
5082
5082
  if (!y.value || !n.item.conversions_generated) return [];
5083
5083
  let e = [];
5084
5084
  return n.item.small_url && e.push({
@@ -5144,23 +5144,23 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5144
5144
  alt: e.item.alt_text || e.item.filename,
5145
5145
  class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
5146
5146
  style: { border: "1px solid var(--tpl-border)" }
5147
- }, null, 8, hi)) : (o(), g("div", gi, [A(xr, {
5147
+ }, null, 8, hi)) : (o(), g("div", gi, [j(xr, {
5148
5148
  "mime-type": e.item.mime_type,
5149
5149
  class: "tpl-preview-icon"
5150
5150
  }, null, 8, ["mime-type"])])),
5151
5151
  w("div", _i, [
5152
5152
  w("p", vi, p(e.item.filename), 1),
5153
5153
  w("p", yi, [
5154
- O(p(b(e.item.size)) + " · " + p(x(e.item.created_at)) + " ", 1),
5155
- y.value && e.item.width && e.item.height ? (o(), g(D, { key: 0 }, [O(" · " + p(e.item.width) + "×" + p(e.item.height) + "px ", 1)], 64)) : _("", !0),
5156
- m.value ? (o(), g(D, { key: 1 }, [
5157
- n[0] ||= O(" · ", -1),
5158
- A(v(xe), {
5154
+ k(p(b(e.item.size)) + " · " + p(x(e.item.created_at)) + " ", 1),
5155
+ y.value && e.item.width && e.item.height ? (o(), g(O, { key: 0 }, [k(" · " + p(e.item.width) + "×" + p(e.item.height) + "px ", 1)], 64)) : _("", !0),
5156
+ m.value ? (o(), g(O, { key: 1 }, [
5157
+ n[0] ||= k(" · ", -1),
5158
+ j(v(be), {
5159
5159
  class: "tpl:mb-px tpl:inline",
5160
5160
  size: 9,
5161
5161
  "stroke-width": 2
5162
5162
  }),
5163
- O(" " + p(m.value), 1)
5163
+ k(" " + p(m.value), 1)
5164
5164
  ], 64)) : _("", !0)
5165
5165
  ]),
5166
5166
  y.value ? (o(), g("p", {
@@ -5178,7 +5178,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5178
5178
  },
5179
5179
  value: e.selectedConversion,
5180
5180
  onChange: d
5181
- }, [(o(!0), g(D, null, c(s.value, (e) => (o(), g("option", {
5181
+ }, [(o(!0), g(O, null, c(s.value, (e) => (o(), g("option", {
5182
5182
  key: e.value,
5183
5183
  value: e.value
5184
5184
  }, p(e.label), 9, Ci))), 128))], 40, Si)])) : _("", !0)
@@ -5210,7 +5210,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5210
5210
  key: 1,
5211
5211
  class: "tpl:mb-3 tpl:text-xs",
5212
5212
  style: { color: "var(--tpl-danger)" }
5213
- }, Ii = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Li = ["disabled"], Ri = ["disabled"], zi = /* @__PURE__ */ k({
5213
+ }, Ii = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Li = ["disabled"], Ri = ["disabled"], zi = /* @__PURE__ */ A({
5214
5214
  __name: "MediaReplaceModal",
5215
5215
  props: {
5216
5216
  visible: { type: Boolean },
@@ -5221,25 +5221,25 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5221
5221
  },
5222
5222
  emits: ["replace", "close"],
5223
5223
  setup(e, { emit: t }) {
5224
- let n = e, r = t, { t: i } = z(), a = l("tplUiTheme"), s = l(Pe, d(null)), c = d(null), f = d(null), S = h(() => {
5224
+ let n = e, r = t, { t: i } = B(), a = l("tplUiTheme"), s = l(Ne, d(null)), c = d(null), f = d(null), S = h(() => {
5225
5225
  if (!n.item) return "";
5226
5226
  let e = n.item.filename.split(".");
5227
5227
  return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
5228
5228
  }), C = h(() => S.value ? `.${S.value}` : "*"), T = h(() => (n.usageInfo?.template_count ?? 0) > 0);
5229
- te(() => n.visible, (e) => {
5229
+ ee(() => n.visible, (e) => {
5230
5230
  e || (f.value = null, c.value && (c.value.value = ""));
5231
5231
  });
5232
5232
  function E(e) {
5233
5233
  let t = e.target;
5234
5234
  t.files && t.files.length > 0 && (f.value = t.files[0]);
5235
5235
  }
5236
- function ee() {
5236
+ function D() {
5237
5237
  f.value && r("replace", f.value);
5238
5238
  }
5239
- function D(e) {
5239
+ function O(e) {
5240
5240
  e.key === "Escape" && r("close");
5241
5241
  }
5242
- return (t, n) => (o(), b(m, { to: v(s) || "body" }, [A(x, {
5242
+ return (t, n) => (o(), b(m, { to: v(s) || "body" }, [j(x, {
5243
5243
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
5244
5244
  "enter-from-class": "tpl:opacity-0",
5245
5245
  "enter-to-class": "tpl:opacity-100",
@@ -5253,7 +5253,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5253
5253
  class: "tpl tpl:fixed tpl:inset-0 tpl:z-[10000] tpl:flex tpl:items-center tpl:justify-center",
5254
5254
  style: { "background-color": "var(--tpl-overlay)" },
5255
5255
  onClick: n[1] ||= y((e) => r("close"), ["self"]),
5256
- onKeydown: D
5256
+ onKeydown: O
5257
5257
  }, [w("div", Ei, [
5258
5258
  w("h3", Di, p(v(i).mediaLibrary.replaceWarningTitle), 1),
5259
5259
  w("p", Oi, p(v(i).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${S.value}`)), 1),
@@ -5286,7 +5286,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5286
5286
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white tpl:transition-all tpl:duration-150 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
5287
5287
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
5288
5288
  disabled: !f.value || e.isReplacing,
5289
- onClick: ee
5289
+ onClick: D
5290
5290
  }, p(e.isReplacing ? v(i).mediaLibrary.replacing : v(i).mediaLibrary.replace), 9, Ri)])
5291
5291
  ])], 40, Ti)) : _("", !0)]),
5292
5292
  _: 1
@@ -5304,7 +5304,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5304
5304
  }, Ui = {
5305
5305
  class: "tpl:mt-1 tpl:text-[10px]",
5306
5306
  style: { color: "var(--tpl-text-dim)" }
5307
- }, Wi = /* @__PURE__ */ k({
5307
+ }, Wi = /* @__PURE__ */ A({
5308
5308
  __name: "MediaUploadZone",
5309
5309
  props: {
5310
5310
  isUploading: { type: Boolean },
@@ -5312,7 +5312,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5312
5312
  },
5313
5313
  emits: ["upload"],
5314
5314
  setup(e, { emit: t }) {
5315
- let n = t, { t: r, format: i } = z(), { allAcceptedMimeTypes: a, allAcceptedInputString: s, maxFileSize: c } = Oe(), l = d();
5315
+ let n = t, { t: r, format: i } = B(), { allAcceptedMimeTypes: a, allAcceptedInputString: s, maxFileSize: c } = De(), l = d();
5316
5316
  function u(e) {
5317
5317
  let t = [];
5318
5318
  for (let n of Array.from(e)) a.value.includes(n.type) && n.size <= c.value && t.push(n);
@@ -5322,9 +5322,9 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5322
5322
  let t = u(e);
5323
5323
  t.length && n("upload", t);
5324
5324
  }
5325
- let { isOverDropZone: m } = ne(l, { onDrop: (e) => {
5325
+ let { isOverDropZone: m } = R(l, { onDrop: (e) => {
5326
5326
  e?.length && f(e);
5327
- } }), { open: h, onChange: _ } = ue({
5327
+ } }), { open: h, onChange: _ } = I({
5328
5328
  accept: s.value,
5329
5329
  multiple: !0
5330
5330
  });
@@ -5339,7 +5339,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5339
5339
  "background-color": "var(--tpl-bg)"
5340
5340
  },
5341
5341
  onClick: n[0] ||= (e) => v(h)()
5342
- }, [e.isUploading ? (o(), g("div", Bi, [A(v(F), {
5342
+ }, [e.isUploading ? (o(), g("div", Bi, [j(v(M), {
5343
5343
  class: "tpl-spinner",
5344
5344
  size: 20,
5345
5345
  "stroke-width": 2,
@@ -5347,8 +5347,8 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5347
5347
  }), w("span", Vi, p(e.uploadProgress && e.uploadProgress.total > 1 ? v(i)(v(r).mediaLibrary.uploadingProgress, {
5348
5348
  current: e.uploadProgress.current,
5349
5349
  total: e.uploadProgress.total
5350
- }) : v(r).mediaLibrary.uploading), 1)])) : (o(), g(D, { key: 1 }, [
5351
- A(v(L), {
5350
+ }) : v(r).mediaLibrary.uploading), 1)])) : (o(), g(O, { key: 1 }, [
5351
+ j(v(ue), {
5352
5352
  class: "tpl:mb-2",
5353
5353
  size: 24,
5354
5354
  "stroke-width": 1.5,
@@ -5382,7 +5382,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5382
5382
  "background-color": "var(--tpl-text)",
5383
5383
  color: "var(--tpl-bg-elevated)"
5384
5384
  }
5385
- }, Yi = /* @__PURE__ */ k({
5385
+ }, Yi = /* @__PURE__ */ A({
5386
5386
  __name: "StorageProgressRing",
5387
5387
  props: {
5388
5388
  usedBytes: {},
@@ -5390,7 +5390,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5390
5390
  size: {}
5391
5391
  },
5392
5392
  setup(e) {
5393
- let t = e, { t: n, format: r } = z(), i = d(!1), a = h(() => t.size ?? 24), s = h(() => Math.max(2, a.value / 8)), c = h(() => (a.value - s.value) / 2), l = h(() => 2 * Math.PI * c.value), f = h(() => t.limitBytes <= 0 ? 0 : Math.min(100, t.usedBytes / t.limitBytes * 100)), m = h(() => l.value - f.value / 100 * l.value), v = h(() => f.value >= 95 ? "var(--tpl-danger)" : f.value >= 75 ? "var(--tpl-warning, #f59e0b)" : "var(--tpl-primary)");
5393
+ let t = e, { t: n, format: r } = B(), i = d(!1), a = h(() => t.size ?? 24), s = h(() => Math.max(2, a.value / 8)), c = h(() => (a.value - s.value) / 2), l = h(() => 2 * Math.PI * c.value), f = h(() => t.limitBytes <= 0 ? 0 : Math.min(100, t.usedBytes / t.limitBytes * 100)), m = h(() => l.value - f.value / 100 * l.value), v = h(() => f.value >= 95 ? "var(--tpl-danger)" : f.value >= 75 ? "var(--tpl-warning, #f59e0b)" : "var(--tpl-primary)");
5394
5394
  function y(e) {
5395
5395
  if (e === 0) return "0 B";
5396
5396
  let t = 1024, n = [
@@ -5433,7 +5433,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5433
5433
  "stroke-dasharray": l.value,
5434
5434
  "stroke-dashoffset": m.value,
5435
5435
  class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
5436
- }, null, 8, qi)], 8, Gi)), A(x, {
5436
+ }, null, 8, qi)], 8, Gi)), j(x, {
5437
5437
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
5438
5438
  "enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
5439
5439
  "enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
@@ -5441,7 +5441,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5441
5441
  "leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
5442
5442
  "leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
5443
5443
  }, {
5444
- default: u(() => [i.value ? (o(), g("div", Ji, [O(p(E.value) + " ", 1), t[2] ||= w("div", {
5444
+ default: u(() => [i.value ? (o(), g("div", Ji, [k(p(E.value) + " ", 1), t[2] ||= w("div", {
5445
5445
  class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
5446
5446
  style: { "background-color": "var(--tpl-text)" }
5447
5447
  }, null, -1)])) : _("", !0)]),
@@ -5474,9 +5474,9 @@ function Xi(e) {
5474
5474
  function y(e) {
5475
5475
  return v[e]?.() ?? e;
5476
5476
  }
5477
- te(o, (e) => {
5477
+ ee(o, (e) => {
5478
5478
  e && n.value && t.loadFolders();
5479
- }), te(() => t.previewItem.value?.id, () => {
5479
+ }), ee(() => t.previewItem.value?.id, () => {
5480
5480
  c.value = "original";
5481
5481
  });
5482
5482
  let b = ae((e) => {
@@ -5485,7 +5485,7 @@ function Xi(e) {
5485
5485
  function x(e) {
5486
5486
  s.value = e, b(e);
5487
5487
  }
5488
- let { copy: S, copied: C } = ce({
5488
+ let { copy: S, copied: C } = ne({
5489
5489
  copiedDuring: 2e3,
5490
5490
  legacy: !0
5491
5491
  });
@@ -5498,34 +5498,34 @@ function Xi(e) {
5498
5498
  async function E(e, n) {
5499
5499
  await t.createFolder(e, n);
5500
5500
  }
5501
- async function ee(e, n) {
5501
+ async function D(e, n) {
5502
5502
  await t.renameFolder(e, n);
5503
5503
  }
5504
- async function D(e) {
5504
+ async function O(e) {
5505
5505
  await t.deleteFolder(e);
5506
5506
  }
5507
- function O(e) {
5507
+ function k(e) {
5508
5508
  l.value = e;
5509
5509
  }
5510
- async function k(e, n, r, i) {
5510
+ async function A(e, n, r, i) {
5511
5511
  i && await t.replaceMediaDirectly(e, i.file), await t.updateFile(e, n, r), l.value = null;
5512
5512
  }
5513
- async function A(e) {
5513
+ async function j(e) {
5514
5514
  await t.importFromUrl(e) && (u.value = !1);
5515
5515
  }
5516
- async function j(e) {
5516
+ async function M(e) {
5517
5517
  f.value = !1, await t.moveSelected(e);
5518
5518
  }
5519
- async function M() {
5519
+ async function N() {
5520
5520
  await t.checkUsageBeforeDelete();
5521
5521
  }
5522
- function N(e) {
5522
+ function P(e) {
5523
5523
  t.checkUsageBeforeReplace(e);
5524
5524
  }
5525
- async function ne(e) {
5525
+ async function F(e) {
5526
5526
  await t.replaceFile(e);
5527
5527
  }
5528
- function P() {
5528
+ function te() {
5529
5529
  t.clearSelection(), t.cancelDelete(), t.cancelReplace(), s.value = "", t.categoryFilter.value = null, t.sortOption.value = "newest", t.viewMode.value = "files", l.value = null, u.value = !1, c.value = "original";
5530
5530
  }
5531
5531
  return {
@@ -5547,16 +5547,16 @@ function Xi(e) {
5547
5547
  handleUpload: w,
5548
5548
  handleSelect: T,
5549
5549
  handleCreateFolder: E,
5550
- handleRenameFolder: ee,
5551
- handleDeleteFolder: D,
5552
- handleEditItem: O,
5553
- handleEditSave: k,
5554
- handleImportFromUrl: A,
5555
- handleMoveToFolder: j,
5556
- handleDeleteClick: M,
5557
- handleReplaceItem: N,
5558
- handleReplaceFile: ne,
5559
- resetUI: P
5550
+ handleRenameFolder: D,
5551
+ handleDeleteFolder: O,
5552
+ handleEditItem: k,
5553
+ handleEditSave: A,
5554
+ handleImportFromUrl: j,
5555
+ handleMoveToFolder: M,
5556
+ handleDeleteClick: N,
5557
+ handleReplaceItem: P,
5558
+ handleReplaceFile: F,
5559
+ resetUI: te
5560
5560
  };
5561
5561
  }
5562
5562
  //#endregion
@@ -5627,7 +5627,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5627
5627
  }, Ra = {
5628
5628
  key: 1,
5629
5629
  class: "tpl:relative"
5630
- }, za = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ba = ["disabled"], Va = /* @__PURE__ */ k({
5630
+ }, za = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ba = ["disabled"], Va = /* @__PURE__ */ A({
5631
5631
  __name: "MediaLibraryModal",
5632
5632
  props: {
5633
5633
  visible: { type: Boolean },
@@ -5636,28 +5636,28 @@ var Zi = ["data-tpl-theme"], Qi = {
5636
5636
  },
5637
5637
  emits: ["close", "select"],
5638
5638
  setup(e, { emit: t }) {
5639
- let n = e, r = t, { t: i } = z(), a = l("tplUiTheme");
5640
- s(Pe, ee(() => n.popoverTarget ?? null));
5641
- let d = l("authManager"), f = l("projectId"), S = h(() => f.value), T = l("planConfig"), k = h(() => T.hasFeature("media_folders")), M = h(() => T.hasFeature("import_from_url")), ne = h(() => T.config.value?.storage.used_bytes ?? 0), P = h(() => T.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: re, availableCategories: F } = Oe(), I = Ce({
5639
+ let n = e, r = t, { t: i } = B(), a = l("tplUiTheme");
5640
+ s(Ne, D(() => n.popoverTarget ?? null));
5641
+ let d = l("authManager"), f = l("projectId"), S = h(() => f.value), T = l("planConfig"), A = h(() => T.hasFeature("media_folders")), M = h(() => T.hasFeature("import_from_url")), F = h(() => T.config.value?.storage.used_bytes ?? 0), te = h(() => T.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: ne, availableCategories: re } = De(), I = Se({
5642
5642
  projectId: S.value,
5643
5643
  authManager: d
5644
5644
  }), L = Xi({
5645
5645
  library: I,
5646
- canUseMediaFolders: k,
5646
+ canUseMediaFolders: A,
5647
5647
  translations: i
5648
5648
  });
5649
- te(() => n.visible, (e) => {
5649
+ ee(() => n.visible, (e) => {
5650
5650
  e ? (I.loadItems(), I.loadFrequentlyUsed()) : L.resetUI();
5651
5651
  });
5652
- function ae(e) {
5652
+ function ie(e) {
5653
5653
  e.key === "Escape" && r("close");
5654
5654
  }
5655
- ie(document, "keydown", ae);
5656
- function oe() {
5657
- return I.previewItem.value ? n.accept?.length ? re(I.previewItem.value.mime_type, n.accept) : !0 : !1;
5655
+ de(document, "keydown", ie);
5656
+ function R() {
5657
+ return I.previewItem.value ? n.accept?.length ? ne(I.previewItem.value.mime_type, n.accept) : !0 : !1;
5658
5658
  }
5659
- function se() {
5660
- if (oe()) {
5659
+ function ae() {
5660
+ if (R()) {
5661
5661
  let e = I.previewItem.value;
5662
5662
  r("select", {
5663
5663
  ...e,
@@ -5665,7 +5665,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5665
5665
  }), r("close");
5666
5666
  }
5667
5667
  }
5668
- return (t, n) => (o(), b(m, { to: e.popoverTarget || "body" }, [A(x, {
5668
+ return (t, n) => (o(), b(m, { to: e.popoverTarget || "body" }, [j(x, {
5669
5669
  "enter-active-class": "tpl:transition tpl:duration-200",
5670
5670
  "enter-from-class": "tpl:opacity-0",
5671
5671
  "enter-to-class": "tpl:opacity-100",
@@ -5680,9 +5680,9 @@ var Zi = ["data-tpl-theme"], Qi = {
5680
5680
  onClick: n[18] ||= y((e) => r("close"), ["self"])
5681
5681
  }, [w("div", Qi, [
5682
5682
  w("div", $i, [w("h2", ea, p(v(i).mediaLibrary.title), 1), w("div", ta, [
5683
- A(Yi, {
5684
- "used-bytes": ne.value,
5685
- "limit-bytes": P.value,
5683
+ j(Yi, {
5684
+ "used-bytes": F.value,
5685
+ "limit-bytes": te.value,
5686
5686
  size: 22
5687
5687
  }, null, 8, ["used-bytes", "limit-bytes"]),
5688
5688
  w("div", na, [w("input", {
@@ -5696,7 +5696,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5696
5696
  },
5697
5697
  placeholder: v(i).mediaLibrary.searchPlaceholder,
5698
5698
  onInput: n[0] ||= (e) => v(L).handleSearchInput(e.target.value)
5699
- }, null, 40, ra), A(v(_e), {
5699
+ }, null, 40, ra), j(v(ge), {
5700
5700
  class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
5701
5701
  size: 13,
5702
5702
  "stroke-width": 2,
@@ -5706,12 +5706,12 @@ var Zi = ["data-tpl-theme"], Qi = {
5706
5706
  class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
5707
5707
  style: { color: "var(--tpl-text-muted)" },
5708
5708
  onClick: n[1] ||= (e) => r("close")
5709
- }, [A(v(N), {
5709
+ }, [j(v(se), {
5710
5710
  size: 18,
5711
5711
  "stroke-width": 2
5712
5712
  })])
5713
5713
  ])]),
5714
- w("div", ia, [A(x, {
5714
+ w("div", ia, [j(x, {
5715
5715
  "enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
5716
5716
  "enter-from-class": "tpl:-ml-48 tpl:opacity-0",
5717
5717
  "enter-to-class": "tpl:ml-0 tpl:opacity-100",
@@ -5719,7 +5719,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5719
5719
  "leave-from-class": "tpl:ml-0 tpl:opacity-100",
5720
5720
  "leave-to-class": "tpl:-ml-48 tpl:opacity-0"
5721
5721
  }, {
5722
- default: u(() => [k.value && v(L).showSidebar.value ? (o(), g("div", aa, [A(yr, {
5722
+ default: u(() => [A.value && v(L).showSidebar.value ? (o(), g("div", aa, [j(yr, {
5723
5723
  folders: v(I).folders.value,
5724
5724
  "current-folder-id": v(I).currentFolderId.value,
5725
5725
  "view-mode": v(I).viewMode.value,
@@ -5742,7 +5742,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5742
5742
  ])])) : _("", !0)]),
5743
5743
  _: 1
5744
5744
  }), w("div", oa, [w("div", sa, [w("div", ca, [
5745
- k.value ? (o(), g("button", {
5745
+ A.value ? (o(), g("button", {
5746
5746
  key: 0,
5747
5747
  class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
5748
5748
  style: E({
@@ -5752,11 +5752,11 @@ var Zi = ["data-tpl-theme"], Qi = {
5752
5752
  }),
5753
5753
  title: v(L).showSidebar.value ? v(i).mediaLibrary.hideFolders : v(i).mediaLibrary.showFolders,
5754
5754
  onClick: n[2] ||= (e) => v(L).showSidebar.value = !v(L).showSidebar.value
5755
- }, [A(v(me), {
5755
+ }, [j(v(pe), {
5756
5756
  size: 16,
5757
5757
  "stroke-width": 2
5758
5758
  })], 12, la)) : _("", !0),
5759
- v(I).viewMode.value === "frequently-used" ? (o(), g("span", ua, p(v(i).mediaLibrary.frequentlyUsed), 1)) : (o(), b(De, {
5759
+ v(I).viewMode.value === "frequently-used" ? (o(), g("span", ua, p(v(i).mediaLibrary.frequentlyUsed), 1)) : (o(), b(Ee, {
5760
5760
  key: 2,
5761
5761
  folders: v(I).folders.value,
5762
5762
  "current-folder-id": v(I).currentFolderId.value,
@@ -5774,7 +5774,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5774
5774
  }),
5775
5775
  title: v(i).mediaLibrary.viewGrid,
5776
5776
  onClick: n[3] ||= (e) => v(L).layoutMode.value = "grid"
5777
- }, [A(v(ge), {
5777
+ }, [j(v(he), {
5778
5778
  size: 14,
5779
5779
  "stroke-width": 2
5780
5780
  })], 12, fa), w("button", {
@@ -5785,11 +5785,11 @@ var Zi = ["data-tpl-theme"], Qi = {
5785
5785
  }),
5786
5786
  title: v(i).mediaLibrary.viewList,
5787
5787
  onClick: n[4] ||= (e) => v(L).layoutMode.value = "list"
5788
- }, [A(v(ve), {
5788
+ }, [j(v(_e), {
5789
5789
  size: 14,
5790
5790
  "stroke-width": 2
5791
5791
  })], 12, pa)])
5792
- ]), w("div", ma, [v(F).length > 1 ? (o(), g("select", {
5792
+ ]), w("div", ma, [v(re).length > 1 ? (o(), g("select", {
5793
5793
  key: 0,
5794
5794
  class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
5795
5795
  style: {
@@ -5799,7 +5799,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5799
5799
  },
5800
5800
  value: v(I).categoryFilter.value ?? "",
5801
5801
  onChange: n[5] ||= (e) => v(I).filterByCategory(e.target.value || null)
5802
- }, [w("option", ga, p(v(i).mediaLibrary.filterAll), 1), (o(!0), g(D, null, c(v(F), (e) => (o(), g("option", {
5802
+ }, [w("option", ga, p(v(i).mediaLibrary.filterAll), 1), (o(!0), g(O, null, c(v(re), (e) => (o(), g("option", {
5803
5803
  key: e,
5804
5804
  value: e
5805
5805
  }, p(v(L).getCategoryLabel(e)), 9, _a))), 128))], 40, ha)) : _("", !0), w("select", {
@@ -5818,7 +5818,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5818
5818
  w("option", Sa, p(v(i).mediaLibrary.sortNameDesc), 1),
5819
5819
  w("option", Ca, p(v(i).mediaLibrary.sortSizeAsc), 1),
5820
5820
  w("option", wa, p(v(i).mediaLibrary.sortSizeDesc), 1)
5821
- ], 40, va)])]), w("div", Ta, [v(I).viewMode.value === "files" ? (o(), g("div", Ea, [A(Wi, {
5821
+ ], 40, va)])]), w("div", Ta, [v(I).viewMode.value === "files" ? (o(), g("div", Ea, [j(Wi, {
5822
5822
  "is-uploading": v(I).isUploading.value,
5823
5823
  "upload-progress": v(I).uploadProgress.value,
5824
5824
  onUpload: v(L).handleUpload
@@ -5835,10 +5835,10 @@ var Zi = ["data-tpl-theme"], Qi = {
5835
5835
  "background-color": "var(--tpl-bg)"
5836
5836
  },
5837
5837
  onClick: n[7] ||= (e) => v(L).showImportUrlModal.value = !0
5838
- }, [A(v(he), {
5838
+ }, [j(v(me), {
5839
5839
  size: 14,
5840
5840
  "stroke-width": 2
5841
- }), O(" " + p(v(i).mediaLibrary.importFromUrl), 1)])) : _("", !0)])) : _("", !0), A(Xr, {
5841
+ }), k(" " + p(v(i).mediaLibrary.importFromUrl), 1)])) : _("", !0)])) : _("", !0), j(Xr, {
5842
5842
  items: v(L).displayItems.value,
5843
5843
  "selected-ids": v(I).selectedItems.value,
5844
5844
  "is-loading": v(I).isLoading.value,
@@ -5863,7 +5863,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5863
5863
  "onEdit",
5864
5864
  "onReplace"
5865
5865
  ])])])]),
5866
- A(ci, {
5866
+ j(ci, {
5867
5867
  visible: v(L).showImportUrlModal.value,
5868
5868
  "is-importing": v(I).isImportingFromUrl.value,
5869
5869
  error: v(I).importFromUrlError.value,
@@ -5875,7 +5875,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5875
5875
  "error",
5876
5876
  "onImport"
5877
5877
  ]),
5878
- A(or, {
5878
+ j(or, {
5879
5879
  visible: !!v(L).editingItem.value,
5880
5880
  item: v(L).editingItem.value,
5881
5881
  onSave: v(L).handleEditSave,
@@ -5885,7 +5885,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5885
5885
  "item",
5886
5886
  "onSave"
5887
5887
  ]),
5888
- A(zi, {
5888
+ j(zi, {
5889
5889
  visible: v(I).showReplaceWarning.value,
5890
5890
  item: v(I).pendingReplaceItem.value,
5891
5891
  "usage-info": v(I).replaceUsageInfo.value,
@@ -5902,7 +5902,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5902
5902
  "onReplace",
5903
5903
  "onClose"
5904
5904
  ]),
5905
- A(x, {
5905
+ j(x, {
5906
5906
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
5907
5907
  "enter-from-class": "tpl:opacity-0",
5908
5908
  "enter-to-class": "tpl:opacity-100",
@@ -5926,11 +5926,11 @@ var Zi = ["data-tpl-theme"], Qi = {
5926
5926
  style: { color: "var(--tpl-text-muted)" }
5927
5927
  }, p(v(i).mediaLibrary.deleteWarningMessage), 3),
5928
5928
  v(L).hasUsedFiles.value ? (o(), g("p", ka, p(v(i).mediaLibrary.deleteWarningUsageNote), 1)) : _("", !0),
5929
- v(L).hasUsedFiles.value ? (o(), g("div", Aa, [(o(!0), g(D, null, c(v(I).deleteUsageInfo.value, (e, t) => (o(), g("div", {
5929
+ v(L).hasUsedFiles.value ? (o(), g("div", Aa, [(o(!0), g(O, null, c(v(I).deleteUsageInfo.value, (e, t) => (o(), g("div", {
5930
5930
  key: t,
5931
5931
  class: "tpl:text-xs",
5932
5932
  style: { color: "var(--tpl-text)" }
5933
- }, [e.template_count > 0 ? (o(), g(D, { key: 0 }, [w("span", ja, p(v(L).displayItems.value.find((e) => e.id === t)?.filename || t), 1), w("span", Ma, " - " + p(v(i).mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : _("", !0)]))), 128))])) : _("", !0),
5933
+ }, [e.template_count > 0 ? (o(), g(O, { key: 0 }, [w("span", ja, p(v(L).displayItems.value.find((e) => e.id === t)?.filename || t), 1), w("span", Ma, " - " + p(v(i).mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : _("", !0)]))), 128))])) : _("", !0),
5934
5934
  w("div", Na, [w("button", {
5935
5935
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
5936
5936
  style: {
@@ -5970,15 +5970,15 @@ var Zi = ["data-tpl-theme"], Qi = {
5970
5970
  backgroundColor: "var(--tpl-bg)"
5971
5971
  }),
5972
5972
  onClick: n[14] ||= (e) => v(L).copy(v(L).selectedUrl.value)
5973
- }, [v(L).copied.value ? (o(), b(v(j), {
5973
+ }, [v(L).copied.value ? (o(), b(v(N), {
5974
5974
  key: 1,
5975
5975
  size: 12,
5976
5976
  "stroke-width": 2
5977
- })) : (o(), b(v(fe), {
5977
+ })) : (o(), b(v(P), {
5978
5978
  key: 0,
5979
5979
  size: 12,
5980
5980
  "stroke-width": 2
5981
- })), O(" " + p(v(L).copied.value ? v(i).mediaLibrary.copied : v(i).mediaLibrary.copyUrl), 1)], 4)) : _("", !0), k.value ? (o(), g("div", Ra, [w("button", {
5981
+ })), k(" " + p(v(L).copied.value ? v(i).mediaLibrary.copied : v(i).mediaLibrary.copyUrl), 1)], 4)) : _("", !0), A.value ? (o(), g("div", Ra, [w("button", {
5982
5982
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
5983
5983
  style: {
5984
5984
  "border-color": "var(--tpl-border)",
@@ -6011,8 +6011,8 @@ var Zi = ["data-tpl-theme"], Qi = {
6011
6011
  "background-color": "var(--tpl-primary)",
6012
6012
  color: "var(--tpl-bg)"
6013
6013
  },
6014
- disabled: !oe(),
6015
- onClick: se
6014
+ disabled: !R(),
6015
+ onClick: ae
6016
6016
  }, p(e.accept?.length ? v(i).mediaLibrary.selectImage : v(i).mediaLibrary.selectFile), 9, Ba)])])])
6017
6017
  ])], 8, Zi)) : _("", !0)]),
6018
6018
  _: 1
@@ -6020,6 +6020,6 @@ var Zi = ["data-tpl-theme"], Qi = {
6020
6020
  }
6021
6021
  });
6022
6022
  //#endregion
6023
- export { zi as a, ci as c, or as d, Oe as f, Se as g, Ce as h, Wi as i, Xr as l, z as m, Xi as n, wi as o, De as p, Yi as r, pi as s, Va as t, yr as u };
6023
+ export { zi as a, ci as c, or as d, De as f, xe as g, Se as h, Wi as i, Xr as l, B as m, Xi as n, wi as o, Ee as p, Yi as r, pi as s, Va as t, yr as u };
6024
6024
 
6025
- //# sourceMappingURL=media-library-C479-QcE.js.map
6025
+ //# sourceMappingURL=media-library-Byelliig.js.map