vuefinder 1.0.2 → 1.0.4
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.
- package/README.md +1 -0
- package/dist/style.css +1 -1
- package/dist/vuefinder.js +1132 -1125
- package/dist/vuefinder.umd.cjs +8 -8
- package/package.json +1 -1
package/dist/vuefinder.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as V, watch as Nt, inject as R, openBlock as x, createElementBlock as C, createElementVNode as d, unref as _, normalizeClass as ue, createTextVNode as Me, toDisplayString as
|
|
1
|
+
import { ref as V, watch as Nt, inject as R, openBlock as x, createElementBlock as C, createElementVNode as d, unref as _, normalizeClass as ue, createTextVNode as Me, toDisplayString as $, createCommentVNode as oe, createVNode as ye, TransitionGroup as Ti, withCtx as ee, Fragment as se, renderList as ve, reactive as dt, onMounted as xe, onUpdated as Ai, withDirectives as ge, vShow as at, withModifiers as Oe, nextTick as mt, vModelSelect as sr, customRef as Oi, withKeys as Ke, isRef as Pi, vModelText as Ye, normalizeStyle as Cr, provide as yt, createBlock as ce, resolveDynamicComponent as Ii, renderSlot as lr } from "vue";
|
|
2
2
|
import wt from "plupload";
|
|
3
3
|
const ht = (o, { method: e = "get", params: t = {}, json: n = !0 }) => {
|
|
4
4
|
const a = { method: e };
|
|
@@ -7,13 +7,13 @@ const ht = (o, { method: e = "get", params: t = {}, json: n = !0 }) => {
|
|
|
7
7
|
else {
|
|
8
8
|
a.headers = {};
|
|
9
9
|
let i = new FormData();
|
|
10
|
-
for (const [l,
|
|
11
|
-
i.append(l,
|
|
10
|
+
for (const [l, h] of Object.entries(t))
|
|
11
|
+
i.append(l, h);
|
|
12
12
|
a.body = i;
|
|
13
13
|
}
|
|
14
|
-
return fetch(o, a).then((i) => i.ok ? n ? i.json() : i.text() : Promise.reject(
|
|
14
|
+
return fetch(o, a).then((i) => i.ok ? n ? i.json() : i.text() : i.json().then(Promise.reject.bind(Promise)));
|
|
15
15
|
};
|
|
16
|
-
function
|
|
16
|
+
function Ni(o) {
|
|
17
17
|
return { all: o = o || /* @__PURE__ */ new Map(), on: function(e, t) {
|
|
18
18
|
var n = o.get(e);
|
|
19
19
|
n ? n.push(t) : o.set(e, [t]);
|
|
@@ -36,25 +36,25 @@ function St(o) {
|
|
|
36
36
|
function n() {
|
|
37
37
|
t.value === null || t.value === "" ? localStorage.removeItem(o + "_storage") : localStorage.setItem(o + "_storage", JSON.stringify(t.value));
|
|
38
38
|
}
|
|
39
|
-
function a(
|
|
40
|
-
t.value = Object.assign({ ...t.value }, { [
|
|
39
|
+
function a(h, m) {
|
|
40
|
+
t.value = Object.assign({ ...t.value }, { [h]: m });
|
|
41
41
|
}
|
|
42
42
|
function i() {
|
|
43
43
|
t.value = null;
|
|
44
44
|
}
|
|
45
|
-
return { getStore: (
|
|
45
|
+
return { getStore: (h, m = null) => t.value === null || t.value === "" ? m : t.value.hasOwnProperty(h) ? t.value[h] : m, setStore: a, clearStore: i };
|
|
46
46
|
}
|
|
47
|
-
const
|
|
48
|
-
function
|
|
47
|
+
const cr = V("");
|
|
48
|
+
function ke() {
|
|
49
49
|
function o(e) {
|
|
50
|
-
|
|
50
|
+
cr.value = e;
|
|
51
51
|
}
|
|
52
|
-
return { apiUrl:
|
|
52
|
+
return { apiUrl: cr, setApiUrl: o };
|
|
53
53
|
}
|
|
54
|
-
const
|
|
54
|
+
const Li = { class: "border-neutral-300 flex justify-between items-center py-1 text-sm" }, ji = {
|
|
55
55
|
key: 0,
|
|
56
56
|
class: "flex text-center"
|
|
57
|
-
},
|
|
57
|
+
}, Vi = ["aria-label"], zi = /* @__PURE__ */ d("svg", {
|
|
58
58
|
xmlns: "http://www.w3.org/2000/svg",
|
|
59
59
|
class: "h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300",
|
|
60
60
|
fill: "none",
|
|
@@ -67,9 +67,9 @@ const Ni = { class: "border-neutral-300 flex justify-between items-center py-1 t
|
|
|
67
67
|
"stroke-linejoin": "round",
|
|
68
68
|
d: "M12 10.5v6m3-3H9m4.06-7.19l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"
|
|
69
69
|
})
|
|
70
|
-
], -1),
|
|
71
|
-
|
|
72
|
-
],
|
|
70
|
+
], -1), Bi = [
|
|
71
|
+
zi
|
|
72
|
+
], Ri = ["aria-label"], Hi = /* @__PURE__ */ d("svg", {
|
|
73
73
|
xmlns: "http://www.w3.org/2000/svg",
|
|
74
74
|
class: "h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300",
|
|
75
75
|
fill: "none",
|
|
@@ -82,21 +82,21 @@ const Ni = { class: "border-neutral-300 flex justify-between items-center py-1 t
|
|
|
82
82
|
"stroke-linejoin": "round",
|
|
83
83
|
d: "M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"
|
|
84
84
|
})
|
|
85
|
-
], -1),
|
|
86
|
-
|
|
87
|
-
],
|
|
85
|
+
], -1), Ui = [
|
|
86
|
+
Hi
|
|
87
|
+
], Ki = ["aria-label"], Yi = /* @__PURE__ */ d("path", {
|
|
88
88
|
"stroke-linecap": "round",
|
|
89
89
|
"stroke-linejoin": "round",
|
|
90
90
|
d: "M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"
|
|
91
|
-
}, null, -1),
|
|
92
|
-
|
|
93
|
-
],
|
|
91
|
+
}, null, -1), Wi = [
|
|
92
|
+
Yi
|
|
93
|
+
], Xi = ["aria-label"], Fi = /* @__PURE__ */ d("path", {
|
|
94
94
|
"stroke-linecap": "round",
|
|
95
95
|
"stroke-linejoin": "round",
|
|
96
96
|
d: "M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"
|
|
97
|
-
}, null, -1),
|
|
98
|
-
|
|
99
|
-
],
|
|
97
|
+
}, null, -1), qi = [
|
|
98
|
+
Fi
|
|
99
|
+
], Gi = ["aria-label"], Ji = /* @__PURE__ */ d("svg", {
|
|
100
100
|
xmlns: "http://www.w3.org/2000/svg",
|
|
101
101
|
class: "h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300",
|
|
102
102
|
fill: "none",
|
|
@@ -109,101 +109,101 @@ const Ni = { class: "border-neutral-300 flex justify-between items-center py-1 t
|
|
|
109
109
|
"stroke-linejoin": "round",
|
|
110
110
|
d: "M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5"
|
|
111
111
|
})
|
|
112
|
-
], -1),
|
|
113
|
-
|
|
114
|
-
],
|
|
112
|
+
], -1), Zi = [
|
|
113
|
+
Ji
|
|
114
|
+
], Qi = ["aria-label"], en = /* @__PURE__ */ d("path", {
|
|
115
115
|
"stroke-linecap": "round",
|
|
116
116
|
"stroke-linejoin": "round",
|
|
117
117
|
d: "M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5m6 4.125l2.25 2.25m0 0l2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"
|
|
118
|
-
}, null, -1),
|
|
119
|
-
|
|
120
|
-
],
|
|
118
|
+
}, null, -1), tn = [
|
|
119
|
+
en
|
|
120
|
+
], rn = ["aria-label"], nn = /* @__PURE__ */ d("path", {
|
|
121
121
|
"stroke-linecap": "round",
|
|
122
122
|
"stroke-linejoin": "round",
|
|
123
123
|
d: "M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"
|
|
124
|
-
}, null, -1),
|
|
125
|
-
|
|
126
|
-
],
|
|
124
|
+
}, null, -1), on = [
|
|
125
|
+
nn
|
|
126
|
+
], an = {
|
|
127
127
|
key: 1,
|
|
128
128
|
class: "flex text-center"
|
|
129
|
-
},
|
|
129
|
+
}, sn = { class: "pl-2" }, ln = { class: "dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded" }, cn = { class: "flex text-center items-center justify-end" }, un = ["aria-label"], dn = /* @__PURE__ */ d("path", {
|
|
130
130
|
"stroke-linecap": "round",
|
|
131
131
|
"stroke-linejoin": "round",
|
|
132
132
|
d: "M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z"
|
|
133
|
-
}, null, -1),
|
|
134
|
-
|
|
135
|
-
],
|
|
133
|
+
}, null, -1), hn = [
|
|
134
|
+
dn
|
|
135
|
+
], fn = ["aria-label"], mn = {
|
|
136
136
|
xmlns: "http://www.w3.org/2000/svg",
|
|
137
137
|
class: "h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300",
|
|
138
138
|
fill: "none",
|
|
139
139
|
viewBox: "0 0 24 24",
|
|
140
140
|
stroke: "none",
|
|
141
141
|
"stroke-width": "1.5"
|
|
142
|
-
},
|
|
142
|
+
}, pn = {
|
|
143
143
|
key: 0,
|
|
144
144
|
"stroke-linecap": "round",
|
|
145
145
|
"stroke-linejoin": "round",
|
|
146
146
|
d: "M9 9V4.5M9 9H4.5M9 9L3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5l5.25 5.25"
|
|
147
|
-
},
|
|
147
|
+
}, gn = {
|
|
148
148
|
key: 1,
|
|
149
149
|
"stroke-linecap": "round",
|
|
150
150
|
"stroke-linejoin": "round",
|
|
151
151
|
d: "M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"
|
|
152
|
-
},
|
|
152
|
+
}, vn = ["aria-label"], bn = {
|
|
153
153
|
key: 0,
|
|
154
154
|
"stroke-linecap": "round",
|
|
155
155
|
"stroke-linejoin": "round",
|
|
156
156
|
d: "M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"
|
|
157
|
-
},
|
|
157
|
+
}, yn = {
|
|
158
158
|
key: 1,
|
|
159
159
|
"stroke-linecap": "round",
|
|
160
160
|
"stroke-linejoin": "round",
|
|
161
161
|
d: "M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 010 3.75H5.625a1.875 1.875 0 010-3.75z"
|
|
162
|
-
},
|
|
162
|
+
}, wn = {
|
|
163
163
|
name: "VFToolbar"
|
|
164
|
-
},
|
|
164
|
+
}, xn = /* @__PURE__ */ Object.assign(wn, {
|
|
165
165
|
props: {
|
|
166
166
|
data: Object
|
|
167
167
|
},
|
|
168
168
|
setup(o) {
|
|
169
|
-
const e = R("emitter"), { getStore: t, setStore: n } = R("storage"), { t: a } = R("i18n"), i = V(t("viewport", "grid")), l = V([]),
|
|
170
|
-
e.on("vf-search-query", ({ newQuery:
|
|
171
|
-
m.value =
|
|
169
|
+
const e = R("emitter"), { getStore: t, setStore: n } = R("storage"), { t: a } = R("i18n"), i = V(t("viewport", "grid")), l = V([]), h = V(t("full-screen", !1)), m = V("");
|
|
170
|
+
e.on("vf-search-query", ({ newQuery: f }) => {
|
|
171
|
+
m.value = f;
|
|
172
172
|
});
|
|
173
|
-
const
|
|
174
|
-
|
|
173
|
+
const v = () => {
|
|
174
|
+
h.value = !h.value, e.emit("vf-fullscreen-toggle");
|
|
175
175
|
};
|
|
176
|
-
return e.on("vf-nodes-selected", (
|
|
177
|
-
l.value =
|
|
178
|
-
}), e.on("vf-view-toggle", (
|
|
179
|
-
n("viewport",
|
|
180
|
-
}), (
|
|
181
|
-
m.value.length ? (x(), C("div",
|
|
182
|
-
d("div",
|
|
183
|
-
Me(
|
|
184
|
-
d("span",
|
|
176
|
+
return e.on("vf-nodes-selected", (f) => {
|
|
177
|
+
l.value = f;
|
|
178
|
+
}), e.on("vf-view-toggle", (f) => {
|
|
179
|
+
n("viewport", f), i.value = f;
|
|
180
|
+
}), (f, p) => (x(), C("div", Li, [
|
|
181
|
+
m.value.length ? (x(), C("div", an, [
|
|
182
|
+
d("div", sn, [
|
|
183
|
+
Me($(_(a)("Search results for")) + " ", 1),
|
|
184
|
+
d("span", ln, $(m.value), 1)
|
|
185
185
|
])
|
|
186
|
-
])) : (x(), C("div",
|
|
186
|
+
])) : (x(), C("div", ji, [
|
|
187
187
|
d("div", {
|
|
188
188
|
class: "mx-1.5",
|
|
189
189
|
"aria-label": _(a)("New Folder"),
|
|
190
190
|
"data-microtip-position": "bottom-right",
|
|
191
191
|
role: "tooltip",
|
|
192
|
-
onClick:
|
|
193
|
-
},
|
|
192
|
+
onClick: p[0] || (p[0] = (b) => _(e).emit("vf-modal-show", { type: "new-folder", items: l.value }))
|
|
193
|
+
}, Bi, 8, Vi),
|
|
194
194
|
d("div", {
|
|
195
195
|
class: "mx-1.5",
|
|
196
196
|
"aria-label": _(a)("New File"),
|
|
197
197
|
"data-microtip-position": "bottom",
|
|
198
198
|
role: "tooltip",
|
|
199
|
-
onClick:
|
|
200
|
-
},
|
|
199
|
+
onClick: p[1] || (p[1] = (b) => _(e).emit("vf-modal-show", { type: "new-file", items: l.value }))
|
|
200
|
+
}, Ui, 8, Ri),
|
|
201
201
|
d("div", {
|
|
202
202
|
class: "mx-1.5",
|
|
203
203
|
"aria-label": _(a)("Rename"),
|
|
204
204
|
"data-microtip-position": "bottom",
|
|
205
205
|
role: "tooltip",
|
|
206
|
-
onClick:
|
|
206
|
+
onClick: p[2] || (p[2] = (b) => l.value.length != 1 || _(e).emit("vf-modal-show", { type: "rename", items: l.value }))
|
|
207
207
|
}, [
|
|
208
208
|
(x(), C("svg", {
|
|
209
209
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -212,14 +212,14 @@ const Ni = { class: "border-neutral-300 flex justify-between items-center py-1 t
|
|
|
212
212
|
viewBox: "0 0 24 24",
|
|
213
213
|
stroke: "none",
|
|
214
214
|
"stroke-width": "1.5"
|
|
215
|
-
},
|
|
216
|
-
], 8,
|
|
215
|
+
}, Wi, 2))
|
|
216
|
+
], 8, Ki),
|
|
217
217
|
d("div", {
|
|
218
218
|
class: "mx-1.5",
|
|
219
219
|
"aria-label": _(a)("Delete"),
|
|
220
220
|
"data-microtip-position": "bottom",
|
|
221
221
|
role: "tooltip",
|
|
222
|
-
onClick:
|
|
222
|
+
onClick: p[3] || (p[3] = (b) => !l.value.length || _(e).emit("vf-modal-show", { type: "delete", items: l.value }))
|
|
223
223
|
}, [
|
|
224
224
|
(x(), C("svg", {
|
|
225
225
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -228,22 +228,22 @@ const Ni = { class: "border-neutral-300 flex justify-between items-center py-1 t
|
|
|
228
228
|
viewBox: "0 0 24 24",
|
|
229
229
|
stroke: "none",
|
|
230
230
|
"stroke-width": "1.5"
|
|
231
|
-
},
|
|
232
|
-
], 8,
|
|
231
|
+
}, qi, 2))
|
|
232
|
+
], 8, Xi),
|
|
233
233
|
d("div", {
|
|
234
234
|
class: "mx-1.5",
|
|
235
235
|
"aria-label": _(a)("Upload"),
|
|
236
236
|
"data-microtip-position": "bottom",
|
|
237
237
|
role: "tooltip",
|
|
238
|
-
onClick:
|
|
239
|
-
},
|
|
238
|
+
onClick: p[4] || (p[4] = (b) => _(e).emit("vf-modal-show", { type: "upload", items: l.value }))
|
|
239
|
+
}, Zi, 8, Gi),
|
|
240
240
|
l.value.length == 1 && l.value[0].mime_type == "application/zip" ? (x(), C("div", {
|
|
241
241
|
key: 0,
|
|
242
242
|
class: "mx-1.5",
|
|
243
243
|
"aria-label": _(a)("Unrchive"),
|
|
244
244
|
"data-microtip-position": "bottom",
|
|
245
245
|
role: "tooltip",
|
|
246
|
-
onClick:
|
|
246
|
+
onClick: p[5] || (p[5] = (b) => !l.value.length || _(e).emit("vf-modal-show", { type: "unarchive", items: l.value }))
|
|
247
247
|
}, [
|
|
248
248
|
(x(), C("svg", {
|
|
249
249
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -252,14 +252,14 @@ const Ni = { class: "border-neutral-300 flex justify-between items-center py-1 t
|
|
|
252
252
|
viewBox: "0 0 24 24",
|
|
253
253
|
stroke: "none",
|
|
254
254
|
"stroke-width": "1.5"
|
|
255
|
-
},
|
|
256
|
-
], 8,
|
|
255
|
+
}, tn, 2))
|
|
256
|
+
], 8, Qi)) : (x(), C("div", {
|
|
257
257
|
key: 1,
|
|
258
258
|
class: "mx-1.5",
|
|
259
259
|
"aria-label": _(a)("Archive"),
|
|
260
260
|
"data-microtip-position": "bottom",
|
|
261
261
|
role: "tooltip",
|
|
262
|
-
onClick:
|
|
262
|
+
onClick: p[6] || (p[6] = (b) => !l.value.length || _(e).emit("vf-modal-show", { type: "archive", items: l.value }))
|
|
263
263
|
}, [
|
|
264
264
|
(x(), C("svg", {
|
|
265
265
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -268,10 +268,10 @@ const Ni = { class: "border-neutral-300 flex justify-between items-center py-1 t
|
|
|
268
268
|
viewBox: "0 0 24 24",
|
|
269
269
|
stroke: "none",
|
|
270
270
|
"stroke-width": "1.5"
|
|
271
|
-
},
|
|
272
|
-
], 8,
|
|
271
|
+
}, on, 2))
|
|
272
|
+
], 8, rn))
|
|
273
273
|
])),
|
|
274
|
-
d("div",
|
|
274
|
+
d("div", cn, [
|
|
275
275
|
d("div", {
|
|
276
276
|
class: "mx-1.5",
|
|
277
277
|
"aria-label": _(a)("Dark Mode"),
|
|
@@ -279,31 +279,31 @@ const Ni = { class: "border-neutral-300 flex justify-between items-center py-1 t
|
|
|
279
279
|
role: "tooltip"
|
|
280
280
|
}, [
|
|
281
281
|
(x(), C("svg", {
|
|
282
|
-
onClick:
|
|
282
|
+
onClick: p[7] || (p[7] = (b) => _(e).emit("vf-darkMode-toggle")),
|
|
283
283
|
viewBox: "0 0 24 24",
|
|
284
284
|
"stroke-width": "2",
|
|
285
285
|
"stroke-linecap": "round",
|
|
286
286
|
"stroke-linejoin": "round",
|
|
287
287
|
class: "h-6 w-6 m-auto cursor-pointer stroke-sky-500 fill-sky-100 hover:stroke-sky-600 dark:stroke-gray-400 dark:fill-gray-400/20 dark:hover:stroke-gray-300"
|
|
288
|
-
},
|
|
289
|
-
], 8,
|
|
288
|
+
}, hn))
|
|
289
|
+
], 8, un),
|
|
290
290
|
d("div", {
|
|
291
291
|
class: "mx-1.5",
|
|
292
292
|
"aria-label": _(a)("Toggle Full Screen"),
|
|
293
293
|
"data-microtip-position": "bottom",
|
|
294
294
|
role: "tooltip",
|
|
295
|
-
onClick:
|
|
295
|
+
onClick: v
|
|
296
296
|
}, [
|
|
297
|
-
(x(), C("svg",
|
|
298
|
-
|
|
297
|
+
(x(), C("svg", mn, [
|
|
298
|
+
h.value ? (x(), C("path", pn)) : (x(), C("path", gn))
|
|
299
299
|
]))
|
|
300
|
-
], 8,
|
|
300
|
+
], 8, fn),
|
|
301
301
|
d("div", {
|
|
302
302
|
class: "mx-1.5",
|
|
303
303
|
"aria-label": _(a)("Change View"),
|
|
304
304
|
"data-microtip-position": "bottom-left",
|
|
305
305
|
role: "tooltip",
|
|
306
|
-
onClick:
|
|
306
|
+
onClick: p[8] || (p[8] = (b) => m.value.length || _(e).emit("vf-view-toggle", i.value == "list" ? "grid" : "list"))
|
|
307
307
|
}, [
|
|
308
308
|
(x(), C("svg", {
|
|
309
309
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -313,19 +313,19 @@ const Ni = { class: "border-neutral-300 flex justify-between items-center py-1 t
|
|
|
313
313
|
stroke: "none",
|
|
314
314
|
"stroke-width": "1.5"
|
|
315
315
|
}, [
|
|
316
|
-
i.value == "grid" ? (x(), C("path",
|
|
317
|
-
i.value == "list" ? (x(), C("path",
|
|
316
|
+
i.value == "grid" ? (x(), C("path", bn)) : oe("", !0),
|
|
317
|
+
i.value == "list" ? (x(), C("path", yn)) : oe("", !0)
|
|
318
318
|
], 2))
|
|
319
|
-
], 8,
|
|
319
|
+
], 8, vn)
|
|
320
320
|
])
|
|
321
321
|
]));
|
|
322
322
|
}
|
|
323
323
|
});
|
|
324
|
-
var
|
|
324
|
+
var _n = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Mr = { exports: {} };
|
|
325
325
|
(function(o, e) {
|
|
326
326
|
(function(t, n) {
|
|
327
327
|
o.exports = n();
|
|
328
|
-
})(
|
|
328
|
+
})(_n, function() {
|
|
329
329
|
function t(u, s) {
|
|
330
330
|
if (!(u instanceof s))
|
|
331
331
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -357,7 +357,7 @@ var xn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
357
357
|
}
|
|
358
358
|
return r;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function h(u) {
|
|
361
361
|
for (var s = 1; s < arguments.length; s++) {
|
|
362
362
|
var r = arguments[s] != null ? arguments[s] : {};
|
|
363
363
|
s % 2 ? l(Object(r), !0).forEach(function(g) {
|
|
@@ -377,19 +377,19 @@ var xn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
377
377
|
writable: !0,
|
|
378
378
|
configurable: !0
|
|
379
379
|
}
|
|
380
|
-
}), s &&
|
|
380
|
+
}), s && f(u, s);
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
return
|
|
382
|
+
function v(u) {
|
|
383
|
+
return v = Object.setPrototypeOf ? Object.getPrototypeOf : function(r) {
|
|
384
384
|
return r.__proto__ || Object.getPrototypeOf(r);
|
|
385
|
-
},
|
|
385
|
+
}, v(u);
|
|
386
386
|
}
|
|
387
|
-
function
|
|
388
|
-
return
|
|
387
|
+
function f(u, s) {
|
|
388
|
+
return f = Object.setPrototypeOf || function(g, c) {
|
|
389
389
|
return g.__proto__ = c, g;
|
|
390
|
-
},
|
|
390
|
+
}, f(u, s);
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function p() {
|
|
393
393
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
394
394
|
return !1;
|
|
395
395
|
if (typeof Proxy == "function")
|
|
@@ -402,11 +402,11 @@ var xn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
404
|
function b(u, s, r) {
|
|
405
|
-
return
|
|
405
|
+
return p() ? b = Reflect.construct : b = function(c, y, w) {
|
|
406
406
|
var k = [null];
|
|
407
407
|
k.push.apply(k, y);
|
|
408
408
|
var S = Function.bind.apply(c, k), O = new S();
|
|
409
|
-
return w &&
|
|
409
|
+
return w && f(O, w.prototype), O;
|
|
410
410
|
}, b.apply(null, arguments);
|
|
411
411
|
}
|
|
412
412
|
function A(u) {
|
|
@@ -425,7 +425,7 @@ var xn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
425
425
|
s.set(g, c);
|
|
426
426
|
}
|
|
427
427
|
function c() {
|
|
428
|
-
return b(g, arguments,
|
|
428
|
+
return b(g, arguments, v(this).constructor);
|
|
429
429
|
}
|
|
430
430
|
return c.prototype = Object.create(g.prototype, {
|
|
431
431
|
constructor: {
|
|
@@ -434,7 +434,7 @@ var xn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
434
434
|
writable: !0,
|
|
435
435
|
configurable: !0
|
|
436
436
|
}
|
|
437
|
-
}),
|
|
437
|
+
}), f(c, g);
|
|
438
438
|
}, M(u);
|
|
439
439
|
}
|
|
440
440
|
function T(u) {
|
|
@@ -442,23 +442,23 @@ var xn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
442
442
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
443
443
|
return u;
|
|
444
444
|
}
|
|
445
|
-
function
|
|
445
|
+
function I(u, s) {
|
|
446
446
|
return s && (typeof s == "object" || typeof s == "function") ? s : T(u);
|
|
447
447
|
}
|
|
448
448
|
function z(u) {
|
|
449
|
-
var s =
|
|
449
|
+
var s = p();
|
|
450
450
|
return function() {
|
|
451
|
-
var g =
|
|
451
|
+
var g = v(u), c;
|
|
452
452
|
if (s) {
|
|
453
|
-
var y =
|
|
453
|
+
var y = v(this).constructor;
|
|
454
454
|
c = Reflect.construct(g, arguments, y);
|
|
455
455
|
} else
|
|
456
456
|
c = g.apply(this, arguments);
|
|
457
|
-
return
|
|
457
|
+
return I(this, c);
|
|
458
458
|
};
|
|
459
459
|
}
|
|
460
460
|
function B(u, s) {
|
|
461
|
-
for (; !Object.prototype.hasOwnProperty.call(u, s) && (u =
|
|
461
|
+
for (; !Object.prototype.hasOwnProperty.call(u, s) && (u = v(u), u !== null); )
|
|
462
462
|
;
|
|
463
463
|
return u;
|
|
464
464
|
}
|
|
@@ -472,14 +472,14 @@ var xn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
472
472
|
}, P(u, s, r || u);
|
|
473
473
|
}
|
|
474
474
|
function ne(u, s) {
|
|
475
|
-
return X(u) || le(u, s) || fe(u, s) ||
|
|
475
|
+
return X(u) || le(u, s) || fe(u, s) || N();
|
|
476
476
|
}
|
|
477
477
|
function F(u) {
|
|
478
478
|
return D(u) || q(u) || fe(u) || U();
|
|
479
479
|
}
|
|
480
480
|
function D(u) {
|
|
481
481
|
if (Array.isArray(u))
|
|
482
|
-
return
|
|
482
|
+
return L(u);
|
|
483
483
|
}
|
|
484
484
|
function X(u) {
|
|
485
485
|
if (Array.isArray(u))
|
|
@@ -511,15 +511,15 @@ var xn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
511
511
|
function fe(u, s) {
|
|
512
512
|
if (!!u) {
|
|
513
513
|
if (typeof u == "string")
|
|
514
|
-
return
|
|
514
|
+
return L(u, s);
|
|
515
515
|
var r = Object.prototype.toString.call(u).slice(8, -1);
|
|
516
516
|
if (r === "Object" && u.constructor && (r = u.constructor.name), r === "Map" || r === "Set")
|
|
517
517
|
return Array.from(u);
|
|
518
518
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))
|
|
519
|
-
return
|
|
519
|
+
return L(u, s);
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function L(u, s) {
|
|
523
523
|
(s == null || s > u.length) && (s = u.length);
|
|
524
524
|
for (var r = 0, g = new Array(s); r < s; r++)
|
|
525
525
|
g[r] = u[r];
|
|
@@ -529,7 +529,7 @@ var xn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
529
529
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
530
530
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function N() {
|
|
533
533
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
534
534
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
535
535
|
}
|
|
@@ -629,7 +629,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
629
629
|
x: u.scrollLeft >= 0 ? u.scrollLeft : Ne().x,
|
|
630
630
|
y: u.scrollTop >= 0 ? u.scrollTop : Ne().y
|
|
631
631
|
};
|
|
632
|
-
},
|
|
632
|
+
}, Rt = function(u) {
|
|
633
633
|
var s = u.elementRect, r = u.containerRect, g = u.tolerance, c = g === void 0 ? {
|
|
634
634
|
x: 0,
|
|
635
635
|
y: 0
|
|
@@ -644,7 +644,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
644
644
|
}, Kr = function(u) {
|
|
645
645
|
var s = u.scrollAmount, r = u.initialPointerPos, g = u.pointerPos, c = {};
|
|
646
646
|
return g.x > r.x - s.x ? (c.left = r.x - s.x, c.width = g.x - r.x + s.x) : (c.left = g.x, c.width = r.x - g.x - s.x), g.y > r.y - s.y ? (c.top = r.y - s.y, c.height = g.y - r.y + s.y) : (c.top = g.y, c.height = r.y - g.y - s.y), c;
|
|
647
|
-
},
|
|
647
|
+
}, Ht = function(s) {
|
|
648
648
|
var r = {
|
|
649
649
|
x: 0,
|
|
650
650
|
y: 0
|
|
@@ -669,7 +669,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
669
669
|
}, Yr = function(s) {
|
|
670
670
|
var r = s.style.transform;
|
|
671
671
|
if (!r || r.indexOf("translate") < 0)
|
|
672
|
-
return
|
|
672
|
+
return Ht(s);
|
|
673
673
|
var g = {
|
|
674
674
|
x: 0,
|
|
675
675
|
y: 0
|
|
@@ -681,7 +681,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
681
681
|
g.x = parseInt(S[0]) || 0, g.y = parseInt(S[1]) || 0;
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
|
-
return !g.x && !g.x ?
|
|
684
|
+
return !g.x && !g.x ? Ht(s) : g;
|
|
685
685
|
}, Wr = function(s) {
|
|
686
686
|
var r = s.style, g = {
|
|
687
687
|
x: parseInt(r.left) || 0,
|
|
@@ -712,15 +712,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
712
712
|
y: y.y,
|
|
713
713
|
x: y.x + c.right - g.right
|
|
714
714
|
}, w);
|
|
715
|
-
},
|
|
715
|
+
}, Ut = function(u) {
|
|
716
716
|
var s = u.computedStyle, r = u.node, g = s.position, c = g === "absolute" || g === "relative" || g === "fixed";
|
|
717
717
|
!(r instanceof HTMLDocument) && !c && (r.style.position = "relative");
|
|
718
718
|
}, qr = function(u) {
|
|
719
719
|
var s = u.shiftKey, r = u.keyboardDragSpeed, g = u.zoom, c = u.key, y = u.dragKeys, w = u.scrollDiff, k = u.canScroll, S = u.scrollCallback, O = {
|
|
720
720
|
x: 0,
|
|
721
721
|
y: 0
|
|
722
|
-
},
|
|
723
|
-
return y.left.includes(c) && (O.x = w.x ||
|
|
722
|
+
}, E = s ? r * 4 * g : r * g;
|
|
723
|
+
return y.left.includes(c) && (O.x = w.x || -E, !s && !w.x && k && S(["left"], r)), y.right.includes(c) && (O.x = w.x || E, !s && !w.x && k && S(["right"], r)), y.up.includes(c) && (O.y = w.y || -E, !s && !w.y && k && S(["top"], r)), y.down.includes(c) && (O.y = w.y || E, !s && !w.y && k && S(["bottom"], r)), O;
|
|
724
724
|
}, Gr = function(u) {
|
|
725
725
|
var s = u.element, r = u.force, g = u.multiSelectionToggle, c = u.SelectedSet, y = u.hoverClassName;
|
|
726
726
|
s.classList.contains(y) && !r || (c.has(s) ? g && c.delete(s) : c.add(s), s.classList.add(y));
|
|
@@ -732,10 +732,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
732
732
|
w && !k ? g.delete(s) : !w && k && g.add(s), s.classList.remove(y);
|
|
733
733
|
}, vt = function(u, s) {
|
|
734
734
|
return u.left < s.right && u.right > s.left && u.top < s.bottom && u.bottom > s.top;
|
|
735
|
-
},
|
|
735
|
+
}, Kt = function(u) {
|
|
736
736
|
var s = u.element, r = u.posDirection, g = u.containerRect, c = u.useTransform, y = Xr(s, c), w = Y(y, "+", r);
|
|
737
737
|
Fe(s, w, c);
|
|
738
|
-
var k = s.getBoundingClientRect(), S =
|
|
738
|
+
var k = s.getBoundingClientRect(), S = Rt({
|
|
739
739
|
elementRect: k,
|
|
740
740
|
containerRect: g
|
|
741
741
|
});
|
|
@@ -777,19 +777,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
777
777
|
}],
|
|
778
778
|
"Interaction:update": [{
|
|
779
779
|
name: "dragmove",
|
|
780
|
-
condition: function(
|
|
781
|
-
return
|
|
780
|
+
condition: function(E) {
|
|
781
|
+
return E.event;
|
|
782
782
|
}
|
|
783
783
|
}],
|
|
784
784
|
"Interaction:end": [{
|
|
785
785
|
name: "callback"
|
|
786
786
|
}]
|
|
787
787
|
}, w = function() {
|
|
788
|
-
var
|
|
788
|
+
var E = ne(S[k], 2), j = E[0], K = E[1];
|
|
789
789
|
["pre", !1].forEach(function(Q) {
|
|
790
790
|
return s(Q ? "".concat(j, ":").concat(Q) : j, function(me) {
|
|
791
791
|
return K.forEach(function(re) {
|
|
792
|
-
return (!re.condition || re.condition(me)) && r(Q ? "".concat(Q).concat(re.name) : re.name,
|
|
792
|
+
return (!re.condition || re.condition(me)) && r(Q ? "".concat(Q).concat(re.name) : re.name, h({
|
|
793
793
|
items: c.elements,
|
|
794
794
|
isDragging: g.isDragging
|
|
795
795
|
}, me));
|
|
@@ -800,13 +800,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
800
800
|
w();
|
|
801
801
|
}, je = function(u) {
|
|
802
802
|
return u ? !Array.isArray(u) && (u instanceof HTMLElement || u instanceof SVGElement) ? [u] : F(u) : [];
|
|
803
|
-
},
|
|
803
|
+
}, Yt = function(u, s) {
|
|
804
804
|
u.style.left = "".concat(s.left, "px"), u.style.top = "".concat(s.top, "px"), u.style.width = "".concat(s.width, "px"), u.style.height = "".concat(s.height, "px");
|
|
805
805
|
}, ti = /* @__PURE__ */ function() {
|
|
806
806
|
function u(s) {
|
|
807
807
|
var r = this, g = s.area, c = s.PS, y = s.zoom;
|
|
808
808
|
t(this, u), i(this, "_modificationCallback", void 0), i(this, "_modificationObserver", void 0), i(this, "_zoom", void 0), i(this, "_node", void 0), i(this, "_parentNodes", void 0), i(this, "_computedStyle", void 0), i(this, "_computedBorder", void 0), i(this, "_rect", void 0), i(this, "setArea", function(w) {
|
|
809
|
-
r._node = w,
|
|
809
|
+
r._node = w, Ut({
|
|
810
810
|
computedStyle: r.computedStyle,
|
|
811
811
|
node: r._node
|
|
812
812
|
}), setTimeout(function() {
|
|
@@ -878,8 +878,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
878
878
|
}(), ri = /* @__PURE__ */ function() {
|
|
879
879
|
function u(s) {
|
|
880
880
|
var r = this, g = s.DS, c = s.dragKeys, y = s.draggability, w = s.keyboardDrag, k = s.keyboardDragSpeed, S = s.useTransform, O = s.zoom;
|
|
881
|
-
t(this, u), i(this, "_useTransform", void 0), i(this, "_prevCursorPos", void 0), i(this, "_prevScrollPos", void 0), i(this, "_elements", []), i(this, "_draggability", void 0), i(this, "_dragKeys", void 0), i(this, "_dragKeysFlat", void 0), i(this, "_keyboardDrag", void 0), i(this, "_keyboardDragSpeed", void 0), i(this, "_zoom", void 0), i(this, "keyboardDrag", function(
|
|
882
|
-
var j =
|
|
881
|
+
t(this, u), i(this, "_useTransform", void 0), i(this, "_prevCursorPos", void 0), i(this, "_prevScrollPos", void 0), i(this, "_elements", []), i(this, "_draggability", void 0), i(this, "_dragKeys", void 0), i(this, "_dragKeysFlat", void 0), i(this, "_keyboardDrag", void 0), i(this, "_keyboardDragSpeed", void 0), i(this, "_zoom", void 0), i(this, "keyboardDrag", function(E) {
|
|
882
|
+
var j = E.event, K = E.key;
|
|
883
883
|
if (!(!r._keyboardDrag || !r._dragKeysFlat.includes(K) || !r.DS.SelectedSet.size || !r._draggability || r.DS.continue)) {
|
|
884
884
|
var Q = {
|
|
885
885
|
event: j,
|
|
@@ -898,7 +898,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
898
898
|
dragKeys: r._dragKeys
|
|
899
899
|
});
|
|
900
900
|
r._elements.forEach(function(re) {
|
|
901
|
-
return
|
|
901
|
+
return Kt({
|
|
902
902
|
element: re,
|
|
903
903
|
posDirection: me,
|
|
904
904
|
containerRect: r.DS.SelectorArea.rect,
|
|
@@ -906,8 +906,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
906
906
|
});
|
|
907
907
|
}), r.DS.publish(["Interaction:update:pre", "Interaction:update"], Q);
|
|
908
908
|
}
|
|
909
|
-
}), i(this, "keyboardEnd", function(
|
|
910
|
-
var j =
|
|
909
|
+
}), i(this, "keyboardEnd", function(E) {
|
|
910
|
+
var j = E.event, K = E.key;
|
|
911
911
|
if (!(!r._keyboardDrag || !r._dragKeysFlat.includes(K) || !r.DS.SelectedSet.size || !r._draggability)) {
|
|
912
912
|
var Q = {
|
|
913
913
|
event: j,
|
|
@@ -916,17 +916,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
916
916
|
};
|
|
917
917
|
r.DS.publish(["Interaction:end:pre", "Interaction:end"], Q);
|
|
918
918
|
}
|
|
919
|
-
}), i(this, "start", function(
|
|
920
|
-
var j =
|
|
919
|
+
}), i(this, "start", function(E) {
|
|
920
|
+
var j = E.isDragging, K = E.isDraggingKeyboard;
|
|
921
921
|
!j || K || (r._prevCursorPos = null, r._prevScrollPos = null, r._elements = r.DS.getSelection(), r.handleZIndex(!0));
|
|
922
|
-
}), i(this, "stop", function(
|
|
923
|
-
|
|
924
|
-
}), i(this, "update", function(
|
|
925
|
-
var j =
|
|
922
|
+
}), i(this, "stop", function(E) {
|
|
923
|
+
E != null && E.isKeyboard || (r._prevCursorPos = null, r._prevScrollPos = null, r.handleZIndex(!1), r._elements = []);
|
|
924
|
+
}), i(this, "update", function(E) {
|
|
925
|
+
var j = E.isDragging, K = E.isDraggingKeyboard;
|
|
926
926
|
if (!(!j || !r._elements.length || K || r.DS.continue)) {
|
|
927
927
|
var Q = Y(r._cursorDiff, "+", r._scrollDiff);
|
|
928
928
|
r._elements.forEach(function(me) {
|
|
929
|
-
return
|
|
929
|
+
return Kt({
|
|
930
930
|
element: me,
|
|
931
931
|
posDirection: Q,
|
|
932
932
|
containerRect: r.DS.SelectorArea.rect,
|
|
@@ -934,22 +934,22 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
934
934
|
});
|
|
935
935
|
});
|
|
936
936
|
}
|
|
937
|
-
}), i(this, "handleZIndex", function(
|
|
937
|
+
}), i(this, "handleZIndex", function(E) {
|
|
938
938
|
r._elements.forEach(function(j) {
|
|
939
|
-
return j.style.zIndex = "".concat((parseInt(j.style.zIndex) || 0) +
|
|
939
|
+
return j.style.zIndex = "".concat((parseInt(j.style.zIndex) || 0) + E ? 9999 : -9998);
|
|
940
940
|
});
|
|
941
941
|
}), this.DS = g, this._useTransform = S, this._keyboardDragSpeed = k, this._keyboardDrag = w, this._zoom = O, this._draggability = y, this._dragKeys = {
|
|
942
|
-
up: c.up.map(function(
|
|
943
|
-
return
|
|
942
|
+
up: c.up.map(function(E) {
|
|
943
|
+
return E.toLowerCase();
|
|
944
944
|
}),
|
|
945
|
-
down: c.down.map(function(
|
|
946
|
-
return
|
|
945
|
+
down: c.down.map(function(E) {
|
|
946
|
+
return E.toLowerCase();
|
|
947
947
|
}),
|
|
948
|
-
left: c.left.map(function(
|
|
949
|
-
return
|
|
948
|
+
left: c.left.map(function(E) {
|
|
949
|
+
return E.toLowerCase();
|
|
950
950
|
}),
|
|
951
|
-
right: c.right.map(function(
|
|
952
|
-
return
|
|
951
|
+
right: c.right.map(function(E) {
|
|
952
|
+
return E.toLowerCase();
|
|
953
953
|
})
|
|
954
954
|
}, this._dragKeysFlat = [].concat(F(this._dragKeys.up), F(this._dragKeys.down), F(this._dragKeys.left), F(this._dragKeys.right)), this.DS.subscribe("Interaction:start", this.start), this.DS.subscribe("Interaction:end", this.stop), this.DS.subscribe("Interaction:update", this.update), this.DS.subscribe("KeyStore:down", this.keyboardDrag), this.DS.subscribe("KeyStore:up", this.keyboardEnd);
|
|
955
955
|
}
|
|
@@ -1001,7 +1001,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1001
1001
|
}), i(this, "onClick", function(S) {
|
|
1002
1002
|
var O = S.event;
|
|
1003
1003
|
if (!!r._canInteract(O) && !(O.detail > 0)) {
|
|
1004
|
-
var
|
|
1004
|
+
var E = r.DS, j = E.stores, K = j.PointerStore, Q = j.KeyStore, me = E.SelectableSet, re = E.SelectedSet;
|
|
1005
1005
|
K.start(O);
|
|
1006
1006
|
var Ve = O.target;
|
|
1007
1007
|
!me.has(Ve) || (Q.isMultiSelectKeyPressed(O) || re.clear(), re.toggle(Ve), r.reset());
|
|
@@ -1011,10 +1011,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1011
1011
|
passive: !1
|
|
1012
1012
|
}), document.removeEventListener("mouseup", r.reset), document.removeEventListener("touchend", r.reset);
|
|
1013
1013
|
}), i(this, "update", function(S) {
|
|
1014
|
-
var O = S.event,
|
|
1014
|
+
var O = S.event, E = S.scroll_directions, j = S.scroll_multiplier;
|
|
1015
1015
|
r.isInteracting && r.DS.publish(["Interaction:update:pre", "Interaction:update"], {
|
|
1016
1016
|
event: O,
|
|
1017
|
-
scroll_directions:
|
|
1017
|
+
scroll_directions: E,
|
|
1018
1018
|
scroll_multiplier: j,
|
|
1019
1019
|
isDragging: r.isDragging
|
|
1020
1020
|
});
|
|
@@ -1081,7 +1081,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1081
1081
|
m(r, u);
|
|
1082
1082
|
var s = z(r);
|
|
1083
1083
|
function r(g) {
|
|
1084
|
-
var c, y = g.elements, w = g.className, k = g.hoverClassName, S = g.draggability, O = g.useTransform,
|
|
1084
|
+
var c, y = g.elements, w = g.className, k = g.hoverClassName, S = g.draggability, O = g.useTransform, E = g.DS;
|
|
1085
1085
|
return t(this, r), c = s.call(this), i(T(c), "_initElements", void 0), i(T(c), "_className", void 0), i(T(c), "_hoverClassName", void 0), i(T(c), "_useTransform", void 0), i(T(c), "_draggability", void 0), i(T(c), "init", function() {
|
|
1086
1086
|
return c._initElements.forEach(function(j) {
|
|
1087
1087
|
return c.add(j);
|
|
@@ -1106,24 +1106,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1106
1106
|
return j.forEach(function(K) {
|
|
1107
1107
|
return c.delete(K);
|
|
1108
1108
|
});
|
|
1109
|
-
}), c.DS =
|
|
1109
|
+
}), c.DS = E, c._initElements = je(y), c._className = w, c._hoverClassName = k, c._useTransform = O, c._draggability = S, c.DS.subscribe("Interaction:init", c.init), c;
|
|
1110
1110
|
}
|
|
1111
1111
|
return a(r, [{
|
|
1112
1112
|
key: "add",
|
|
1113
1113
|
value: function(c) {
|
|
1114
1114
|
return c.classList.add(this._className), c.addEventListener("click", this._onClick), c.addEventListener("mousedown", this._onPointer), c.addEventListener("touchstart", this._onPointer, {
|
|
1115
1115
|
passive: !1
|
|
1116
|
-
}), this._draggability && !this._useTransform &&
|
|
1116
|
+
}), this._draggability && !this._useTransform && Ut({
|
|
1117
1117
|
computedStyle: window.getComputedStyle(c),
|
|
1118
1118
|
node: c
|
|
1119
|
-
}), P(
|
|
1119
|
+
}), P(v(r.prototype), "add", this).call(this, c);
|
|
1120
1120
|
}
|
|
1121
1121
|
}, {
|
|
1122
1122
|
key: "delete",
|
|
1123
1123
|
value: function(c) {
|
|
1124
1124
|
return c.classList.remove(this._className), c.classList.remove(this._hoverClassName), c.removeEventListener("click", this._onClick), c.removeEventListener("mousedown", this._onPointer), c.removeEventListener("touchstart", this._onPointer, {
|
|
1125
1125
|
passive: !1
|
|
1126
|
-
}), P(
|
|
1126
|
+
}), P(v(r.prototype), "delete", this).call(this, c);
|
|
1127
1127
|
}
|
|
1128
1128
|
}, {
|
|
1129
1129
|
key: "elements",
|
|
@@ -1153,24 +1153,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1153
1153
|
return a(r, [{
|
|
1154
1154
|
key: "add",
|
|
1155
1155
|
value: function(c) {
|
|
1156
|
-
if (!P(
|
|
1156
|
+
if (!P(v(r.prototype), "has", this).call(this, c)) {
|
|
1157
1157
|
var y = {
|
|
1158
1158
|
items: this.elements,
|
|
1159
1159
|
item: c
|
|
1160
1160
|
};
|
|
1161
|
-
return this.DS.publish("Selected:added:pre", y), P(
|
|
1161
|
+
return this.DS.publish("Selected:added:pre", y), P(v(r.prototype), "add", this).call(this, c), c.classList.add(this._className), c.style.zIndex = "".concat((parseInt(c.style.zIndex) || 0) + 1), this.DS.publish("Selected:added", y), this;
|
|
1162
1162
|
}
|
|
1163
1163
|
}
|
|
1164
1164
|
}, {
|
|
1165
1165
|
key: "delete",
|
|
1166
1166
|
value: function(c) {
|
|
1167
|
-
if (!!P(
|
|
1167
|
+
if (!!P(v(r.prototype), "has", this).call(this, c)) {
|
|
1168
1168
|
var y = {
|
|
1169
1169
|
items: this.elements,
|
|
1170
1170
|
item: c
|
|
1171
1171
|
};
|
|
1172
1172
|
this.DS.publish("Selected:removed:pre", y);
|
|
1173
|
-
var w = P(
|
|
1173
|
+
var w = P(v(r.prototype), "delete", this).call(this, c);
|
|
1174
1174
|
return c.classList.remove(this._className), c.style.zIndex = "".concat((parseInt(c.style.zIndex) || 0) - 1), this.DS.publish("Selected:removed", y), w;
|
|
1175
1175
|
}
|
|
1176
1176
|
}
|
|
@@ -1195,10 +1195,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1195
1195
|
var k = w.isDragging;
|
|
1196
1196
|
k || r.DS.continue || r._handleInsideSelection();
|
|
1197
1197
|
}), i(this, "_handleInsideSelection", function(w, k) {
|
|
1198
|
-
for (var S = r.DS, O = S.SelectableSet,
|
|
1198
|
+
for (var S = r.DS, O = S.SelectableSet, E = S.SelectorArea, j = S.Selector, K = O.elements.map(function(De) {
|
|
1199
1199
|
return [De, De.getBoundingClientRect()];
|
|
1200
1200
|
}), Q = [], me = [], re = 0, Ve = K.length; re < Ve; re++)
|
|
1201
|
-
|
|
1201
|
+
!E.isInside(K[re][0], K[re][1]) || (vt(K[re][1], j.rect) ? Q.push(K[re][0]) : me.push(K[re][0]));
|
|
1202
1202
|
var ot = r.DS.stores.KeyStore.isMultiSelectKeyPressed(k) && r._multiSelectToggling;
|
|
1203
1203
|
r.DS.continue || (Q.forEach(function(De) {
|
|
1204
1204
|
return Gr({
|
|
@@ -1232,20 +1232,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1232
1232
|
t(this, u), i(this, "_rect", void 0), i(this, "start", function(k) {
|
|
1233
1233
|
var S = k.isDragging;
|
|
1234
1234
|
if (!S) {
|
|
1235
|
-
var O = r.DS.stores.PointerStore,
|
|
1236
|
-
|
|
1235
|
+
var O = r.DS.stores.PointerStore, E = O.initialValArea;
|
|
1236
|
+
Yt(r.HTMLNode, te(E, 1)), r.HTMLNode.style.display = "block", r._rect = null;
|
|
1237
1237
|
}
|
|
1238
1238
|
}), i(this, "stop", function() {
|
|
1239
1239
|
r.HTMLNode.style.width = "0", r.HTMLNode.style.height = "0", r.HTMLNode.style.display = "none";
|
|
1240
1240
|
}), i(this, "update", function(k) {
|
|
1241
1241
|
var S = k.isDragging;
|
|
1242
1242
|
if (!(S || r.DS.continue)) {
|
|
1243
|
-
var O = r.DS.stores,
|
|
1244
|
-
scrollAmount:
|
|
1243
|
+
var O = r.DS.stores, E = O.ScrollStore, j = O.PointerStore, K = Kr({
|
|
1244
|
+
scrollAmount: E.scrollAmount,
|
|
1245
1245
|
initialPointerPos: j.initialValArea,
|
|
1246
1246
|
pointerPos: j.currentValArea
|
|
1247
1247
|
});
|
|
1248
|
-
|
|
1248
|
+
Yt(r.HTMLNode, K), r._rect = null;
|
|
1249
1249
|
}
|
|
1250
1250
|
}), this.DS = g, this.HTMLNode = c || it(w), this.HTMLNode.classList.add(y), this.DS.subscribe("Interaction:start", this.start), this.DS.subscribe("Interaction:update", this.update), this.DS.subscribe("Interaction:end", this.stop);
|
|
1251
1251
|
}
|
|
@@ -1265,8 +1265,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1265
1265
|
r.HTMLNode[O](r.DS.Selector.HTMLNode), document[S][O](r.HTMLNode);
|
|
1266
1266
|
}), i(this, "updatePos", function() {
|
|
1267
1267
|
r._rect = null;
|
|
1268
|
-
var k = r.DS.Area.rect, S = r.DS.Area.computedBorder, O = r.HTMLNode.style,
|
|
1269
|
-
O.top !==
|
|
1268
|
+
var k = r.DS.Area.rect, S = r.DS.Area.computedBorder, O = r.HTMLNode.style, E = "".concat(k.top + S.top, "px"), j = "".concat(k.left + S.left, "px"), K = "".concat(k.width, "px"), Q = "".concat(k.height, "px");
|
|
1269
|
+
O.top !== E && (O.top = E), O.left !== j && (O.left = j), O.width !== K && (O.width = K), O.height !== Q && (O.height = Q);
|
|
1270
1270
|
}), i(this, "stop", function(k) {
|
|
1271
1271
|
r.stopAutoScroll(), k && r.applyElements("remove");
|
|
1272
1272
|
}), i(this, "startAutoScroll", function() {
|
|
@@ -1276,7 +1276,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1276
1276
|
}), i(this, "handleAutoScroll", function() {
|
|
1277
1277
|
if (!r.DS.continue) {
|
|
1278
1278
|
var k = r.DS, S = k.stores.PointerStore, O = k.Area;
|
|
1279
|
-
r.currentEdges =
|
|
1279
|
+
r.currentEdges = Rt({
|
|
1280
1280
|
elementRect: te(S.currentVal),
|
|
1281
1281
|
containerRect: r.rect,
|
|
1282
1282
|
tolerance: r._overflowTolerance
|
|
@@ -1516,10 +1516,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1516
1516
|
}]), u;
|
|
1517
1517
|
}(), fi = /* @__PURE__ */ function() {
|
|
1518
1518
|
function u(s) {
|
|
1519
|
-
var r = this, g = s.area, c = g === void 0 ? document : g, y = s.selectables, w = y === void 0 ? [] : y, k = s.autoScrollSpeed, S = k === void 0 ? 5 : k, O = s.overflowTolerance,
|
|
1519
|
+
var r = this, g = s.area, c = g === void 0 ? document : g, y = s.selectables, w = y === void 0 ? [] : y, k = s.autoScrollSpeed, S = k === void 0 ? 5 : k, O = s.overflowTolerance, E = O === void 0 ? {
|
|
1520
1520
|
x: 25,
|
|
1521
1521
|
y: 25
|
|
1522
|
-
} : O, j = s.zoom, K = j === void 0 ? 1 : j, Q = s.customStyles, me = Q === void 0 ? !1 : Q, re = s.multiSelectMode, Ve = re === void 0 ? !1 : re, ot = s.multiSelectToggling, De = ot === void 0 ? !0 : ot,
|
|
1522
|
+
} : O, j = s.zoom, K = j === void 0 ? 1 : j, Q = s.customStyles, me = Q === void 0 ? !1 : Q, re = s.multiSelectMode, Ve = re === void 0 ? !1 : re, ot = s.multiSelectToggling, De = ot === void 0 ? !0 : ot, Wt = s.multiSelectKeys, mi = Wt === void 0 ? ["Control", "Shift", "Meta"] : Wt, Xt = s.selector, pi = Xt === void 0 ? void 0 : Xt, Ft = s.draggability, bt = Ft === void 0 ? !0 : Ft, qt = s.immediateDrag, gi = qt === void 0 ? !0 : qt, Gt = s.keyboardDrag, vi = Gt === void 0 ? !0 : Gt, bi = s.dragKeys, Jt = s.keyboardDragSpeed, yi = Jt === void 0 ? 10 : Jt, Zt = s.useTransform, Qt = Zt === void 0 ? !0 : Zt, er = s.hoverClass, tr = er === void 0 ? "ds-hover" : er, rr = s.selectableClass, ir = rr === void 0 ? "ds-selectable" : rr, nr = s.selectedClass, wi = nr === void 0 ? "ds-selected" : nr, or = s.selectorClass, xi = or === void 0 ? "ds-selector" : or, ar = s.selectorAreaClass, _i = ar === void 0 ? "ds-selector-area" : ar, ki = s.callback, Si = s.onDragMove, Di = s.onDragStartBegin, Ci = s.onDragStart, Mi = s.onElementSelect, $i = s.onElementUnselect;
|
|
1523
1523
|
t(this, u), i(this, "continue", !1), i(this, "start", function() {
|
|
1524
1524
|
r.stopped = !1, r.Interaction.init();
|
|
1525
1525
|
}), i(this, "break", function() {
|
|
@@ -1580,25 +1580,25 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1580
1580
|
DS: this,
|
|
1581
1581
|
selectorAreaClass: _i,
|
|
1582
1582
|
autoScrollSpeed: S,
|
|
1583
|
-
overflowTolerance:
|
|
1583
|
+
overflowTolerance: E
|
|
1584
1584
|
}), this.SelectableSet = new oi({
|
|
1585
1585
|
elements: w,
|
|
1586
1586
|
DS: this,
|
|
1587
|
-
className:
|
|
1588
|
-
hoverClassName:
|
|
1589
|
-
useTransform:
|
|
1587
|
+
className: ir,
|
|
1588
|
+
hoverClassName: tr,
|
|
1589
|
+
useTransform: Qt,
|
|
1590
1590
|
draggability: bt
|
|
1591
1591
|
}), this.SelectedSet = new ai({
|
|
1592
1592
|
DS: this,
|
|
1593
1593
|
className: wi
|
|
1594
1594
|
}), this.Selection = new si({
|
|
1595
1595
|
DS: this,
|
|
1596
|
-
hoverClassName:
|
|
1596
|
+
hoverClassName: tr,
|
|
1597
1597
|
multiSelectToggling: De
|
|
1598
1598
|
}), this.Drag = new ri({
|
|
1599
1599
|
DS: this,
|
|
1600
1600
|
draggability: bt,
|
|
1601
|
-
useTransform:
|
|
1601
|
+
useTransform: Qt,
|
|
1602
1602
|
keyboardDrag: vi,
|
|
1603
1603
|
dragKeys: Object.assign({
|
|
1604
1604
|
up: ["ArrowUp"],
|
|
@@ -1613,7 +1613,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1613
1613
|
DS: this,
|
|
1614
1614
|
draggability: bt,
|
|
1615
1615
|
immediateDrag: gi,
|
|
1616
|
-
selectableClass:
|
|
1616
|
+
selectableClass: ir
|
|
1617
1617
|
}), ei({
|
|
1618
1618
|
subscribe: this.subscribe,
|
|
1619
1619
|
publish: this.publish,
|
|
@@ -1629,30 +1629,30 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1629
1629
|
var g = r.callback, c = r.onDragMove, y = r.onDragStart, w = r.onDragStartBegin, k = r.onElementSelect, S = r.onElementUnselect, O = function(j, K) {
|
|
1630
1630
|
return console.warn("[DragSelect] ".concat(j, ' is deprecated. Use DragSelect.subscribe("').concat(K, '", (callbackObject) => {}) instead. Act Now! See docs for more info'));
|
|
1631
1631
|
};
|
|
1632
|
-
g && (O("callback", "callback"), this.subscribe("callback", function(
|
|
1633
|
-
var j =
|
|
1634
|
-
|
|
1635
|
-
var K =
|
|
1632
|
+
g && (O("callback", "callback"), this.subscribe("callback", function(E) {
|
|
1633
|
+
var j = E.items;
|
|
1634
|
+
E.item;
|
|
1635
|
+
var K = E.event;
|
|
1636
1636
|
return g(j, K);
|
|
1637
|
-
})), c && (O("onDragMove", "dragmove"), this.subscribe("dragmove", function(
|
|
1638
|
-
|
|
1639
|
-
var j =
|
|
1637
|
+
})), c && (O("onDragMove", "dragmove"), this.subscribe("dragmove", function(E) {
|
|
1638
|
+
E.items, E.item;
|
|
1639
|
+
var j = E.event;
|
|
1640
1640
|
return c(j);
|
|
1641
|
-
})), y && (O("onDragStart", "dragstart"), this.subscribe("dragstart", function(
|
|
1642
|
-
|
|
1643
|
-
var j =
|
|
1641
|
+
})), y && (O("onDragStart", "dragstart"), this.subscribe("dragstart", function(E) {
|
|
1642
|
+
E.items, E.item;
|
|
1643
|
+
var j = E.event;
|
|
1644
1644
|
return y(j);
|
|
1645
|
-
})), w && (O("onDragStartBegin", "dragstart"), this.subscribe("dragstart", function(
|
|
1646
|
-
|
|
1647
|
-
var j =
|
|
1645
|
+
})), w && (O("onDragStartBegin", "dragstart"), this.subscribe("dragstart", function(E) {
|
|
1646
|
+
E.items, E.item;
|
|
1647
|
+
var j = E.event;
|
|
1648
1648
|
return w(j);
|
|
1649
|
-
})), k && (O("onElementSelect", "elementselect"), this.subscribe("elementselect", function(
|
|
1650
|
-
|
|
1651
|
-
var j =
|
|
1649
|
+
})), k && (O("onElementSelect", "elementselect"), this.subscribe("elementselect", function(E) {
|
|
1650
|
+
E.items;
|
|
1651
|
+
var j = E.item, K = E.event;
|
|
1652
1652
|
return k(j, K);
|
|
1653
|
-
})), S && (O("onElementUnselect", "elementunselect"), this.subscribe("elementunselect", function(
|
|
1654
|
-
|
|
1655
|
-
var j =
|
|
1653
|
+
})), S && (O("onElementUnselect", "elementunselect"), this.subscribe("elementunselect", function(E) {
|
|
1654
|
+
E.items;
|
|
1655
|
+
var j = E.item, K = E.event;
|
|
1656
1656
|
return S(j, K);
|
|
1657
1657
|
}));
|
|
1658
1658
|
}
|
|
@@ -1735,56 +1735,56 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1735
1735
|
return fi;
|
|
1736
1736
|
});
|
|
1737
1737
|
})(Mr);
|
|
1738
|
-
const
|
|
1738
|
+
const kn = Mr.exports, Sn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a = t(o) / t(n) | 0, o / e.pow(n, a)).toFixed(0) + " " + (a ? "KMGTPEZY"[--a] + "iB" : "B"), Dn = (o, e = "en-US") => new Date(o * 1e3).toLocaleString(e), Cn = {
|
|
1739
1739
|
key: 0,
|
|
1740
1740
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1741
1741
|
class: "h-5 w-5",
|
|
1742
1742
|
viewBox: "0 0 20 20",
|
|
1743
1743
|
fill: "currentColor"
|
|
1744
|
-
},
|
|
1744
|
+
}, Mn = /* @__PURE__ */ d("path", {
|
|
1745
1745
|
"fill-rule": "evenodd",
|
|
1746
1746
|
d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
|
|
1747
1747
|
"clip-rule": "evenodd"
|
|
1748
|
-
}, null, -1),
|
|
1749
|
-
|
|
1750
|
-
],
|
|
1748
|
+
}, null, -1), $n = [
|
|
1749
|
+
Mn
|
|
1750
|
+
], En = {
|
|
1751
1751
|
key: 1,
|
|
1752
1752
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1753
1753
|
class: "h-5 w-5",
|
|
1754
1754
|
viewBox: "0 0 20 20",
|
|
1755
1755
|
fill: "currentColor"
|
|
1756
|
-
},
|
|
1756
|
+
}, Tn = /* @__PURE__ */ d("path", {
|
|
1757
1757
|
"fill-rule": "evenodd",
|
|
1758
1758
|
d: "M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",
|
|
1759
1759
|
"clip-rule": "evenodd"
|
|
1760
|
-
}, null, -1),
|
|
1761
|
-
|
|
1762
|
-
],
|
|
1760
|
+
}, null, -1), An = [
|
|
1761
|
+
Tn
|
|
1762
|
+
], On = {
|
|
1763
1763
|
name: "VFSortIcon"
|
|
1764
|
-
}, st = /* @__PURE__ */ Object.assign(
|
|
1764
|
+
}, st = /* @__PURE__ */ Object.assign(On, {
|
|
1765
1765
|
props: { direction: String },
|
|
1766
1766
|
setup(o) {
|
|
1767
1767
|
return (e, t) => (x(), C("div", null, [
|
|
1768
|
-
o.direction == "down" ? (x(), C("svg",
|
|
1769
|
-
o.direction == "up" ? (x(), C("svg",
|
|
1768
|
+
o.direction == "down" ? (x(), C("svg", Cn, $n)) : oe("", !0),
|
|
1769
|
+
o.direction == "up" ? (x(), C("svg", En, An)) : oe("", !0)
|
|
1770
1770
|
]));
|
|
1771
1771
|
}
|
|
1772
|
-
}),
|
|
1772
|
+
}), Pn = ["onClick"], In = {
|
|
1773
1773
|
name: "VFToast.vue"
|
|
1774
|
-
},
|
|
1774
|
+
}, Nn = /* @__PURE__ */ Object.assign(In, {
|
|
1775
1775
|
setup(o) {
|
|
1776
1776
|
const e = R("emitter"), { getStore: t } = R("storage"), n = V(t("full-screen", !1)), a = (m) => m == "error" ? "text-red-400 border-red-400" : "text-lime-600 border-lime-600", i = V([]), l = (m) => {
|
|
1777
1777
|
i.value.splice(m, 1);
|
|
1778
|
-
},
|
|
1779
|
-
let
|
|
1780
|
-
|
|
1778
|
+
}, h = (m) => {
|
|
1779
|
+
let v = i.value.findIndex((f) => f.id === m);
|
|
1780
|
+
v !== -1 && l(v);
|
|
1781
1781
|
};
|
|
1782
1782
|
return e.on("vf-toast-push", (m) => {
|
|
1783
|
-
let
|
|
1784
|
-
m.id =
|
|
1785
|
-
|
|
1783
|
+
let v = new Date().getTime().toString(36).concat(performance.now().toString(), Math.random().toString()).replace(/\./g, "");
|
|
1784
|
+
m.id = v, i.value.push(m), setTimeout(() => {
|
|
1785
|
+
h(v);
|
|
1786
1786
|
}, 5e3);
|
|
1787
|
-
}), (m,
|
|
1787
|
+
}), (m, v) => (x(), C("div", {
|
|
1788
1788
|
class: ue([n.value.value ? "fixed" : "absolute", "bottom-0 max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2"])
|
|
1789
1789
|
}, [
|
|
1790
1790
|
ye(Ti, {
|
|
@@ -1793,20 +1793,20 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
1793
1793
|
"leave-to-class": "opacity-0"
|
|
1794
1794
|
}, {
|
|
1795
1795
|
default: ee(() => [
|
|
1796
|
-
(x(!0), C(se, null, ve(i.value, (
|
|
1797
|
-
onClick: (b) => l(
|
|
1798
|
-
key:
|
|
1799
|
-
class: ue([a(
|
|
1800
|
-
},
|
|
1796
|
+
(x(!0), C(se, null, ve(i.value, (f, p) => (x(), C("div", {
|
|
1797
|
+
onClick: (b) => l(p),
|
|
1798
|
+
key: f,
|
|
1799
|
+
class: ue([a(f.type), "inline-block mx-auto my-0.5 py-0.5 px-2 min-w-max bg-gray-50 border text-xs rounded cursor-pointer"])
|
|
1800
|
+
}, $(f.label), 11, Pn))), 128))
|
|
1801
1801
|
]),
|
|
1802
1802
|
_: 1
|
|
1803
1803
|
})
|
|
1804
1804
|
], 2));
|
|
1805
1805
|
}
|
|
1806
|
-
}), Ie = (o) => Object.entries(o).map((e) => e.map(encodeURIComponent).join("=")).join("&"), { apiUrl:
|
|
1806
|
+
}), Ie = (o) => Object.entries(o).map((e) => e.map(encodeURIComponent).join("=")).join("&"), { apiUrl: Ln } = ke(), Dt = (o, e) => Ln.value + "?" + Ie({ q: "preview", adapter: o, path: e }), jn = { class: "relative flex-auto flex flex-col overflow-hidden" }, Vn = {
|
|
1807
1807
|
key: 0,
|
|
1808
1808
|
class: "grid grid-cols-12 border-b border-neutral-300 dark:border-gray-700 text-xs select-none"
|
|
1809
|
-
},
|
|
1809
|
+
}, zn = { class: "absolute" }, Bn = /* @__PURE__ */ d("svg", {
|
|
1810
1810
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1811
1811
|
class: "absolute h-6 w-6 md:h-12 md:w-12 m-auto stroke-neutral-500 fill-white dark:fill-gray-700 dark:stroke-gray-600 z-10",
|
|
1812
1812
|
fill: "none",
|
|
@@ -1819,7 +1819,7 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
1819
1819
|
"stroke-linejoin": "round",
|
|
1820
1820
|
d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
|
|
1821
1821
|
})
|
|
1822
|
-
], -1),
|
|
1822
|
+
], -1), Rn = { class: "text-neutral-700 dark:text-neutral-300 p-1 absolute text-center top-4 right-[-2rem] md:top-5 md:right-[-2.4rem] z-20 text-xs" }, Hn = ["onDblclick", "onTouchstart", "onContextmenu", "data-type", "data-item", "data-index"], Un = { class: "grid grid-cols-12 items-center" }, Kn = { class: "flex col-span-7 items-center" }, Yn = {
|
|
1823
1823
|
key: 0,
|
|
1824
1824
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1825
1825
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -1827,13 +1827,13 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
1827
1827
|
viewBox: "0 0 24 24",
|
|
1828
1828
|
stroke: "currentColor",
|
|
1829
1829
|
"stroke-width": "1"
|
|
1830
|
-
},
|
|
1830
|
+
}, Wn = /* @__PURE__ */ d("path", {
|
|
1831
1831
|
"stroke-linecap": "round",
|
|
1832
1832
|
"stroke-linejoin": "round",
|
|
1833
1833
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
1834
|
-
}, null, -1),
|
|
1835
|
-
|
|
1836
|
-
],
|
|
1834
|
+
}, null, -1), Xn = [
|
|
1835
|
+
Wn
|
|
1836
|
+
], Fn = {
|
|
1837
1837
|
key: 1,
|
|
1838
1838
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1839
1839
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -1841,13 +1841,13 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
1841
1841
|
viewBox: "0 0 24 24",
|
|
1842
1842
|
stroke: "currentColor",
|
|
1843
1843
|
"stroke-width": "1"
|
|
1844
|
-
},
|
|
1844
|
+
}, qn = /* @__PURE__ */ d("path", {
|
|
1845
1845
|
"stroke-linecap": "round",
|
|
1846
1846
|
"stroke-linejoin": "round",
|
|
1847
1847
|
d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
|
|
1848
|
-
}, null, -1),
|
|
1849
|
-
|
|
1850
|
-
],
|
|
1848
|
+
}, null, -1), Gn = [
|
|
1849
|
+
qn
|
|
1850
|
+
], Jn = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, Zn = { class: "col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap" }, Qn = ["onDblclick", "onTouchstart", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], eo = { class: "grid grid-cols-12 items-center" }, to = { class: "flex col-span-7 items-center" }, ro = {
|
|
1851
1851
|
key: 0,
|
|
1852
1852
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1853
1853
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -1855,13 +1855,13 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
1855
1855
|
viewBox: "0 0 24 24",
|
|
1856
1856
|
stroke: "currentColor",
|
|
1857
1857
|
"stroke-width": "1"
|
|
1858
|
-
},
|
|
1858
|
+
}, io = /* @__PURE__ */ d("path", {
|
|
1859
1859
|
"stroke-linecap": "round",
|
|
1860
1860
|
"stroke-linejoin": "round",
|
|
1861
1861
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
1862
|
-
}, null, -1),
|
|
1863
|
-
|
|
1864
|
-
],
|
|
1862
|
+
}, null, -1), no = [
|
|
1863
|
+
io
|
|
1864
|
+
], oo = {
|
|
1865
1865
|
key: 1,
|
|
1866
1866
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1867
1867
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -1869,13 +1869,13 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
1869
1869
|
viewBox: "0 0 24 24",
|
|
1870
1870
|
stroke: "currentColor",
|
|
1871
1871
|
"stroke-width": "1"
|
|
1872
|
-
},
|
|
1872
|
+
}, ao = /* @__PURE__ */ d("path", {
|
|
1873
1873
|
"stroke-linecap": "round",
|
|
1874
1874
|
"stroke-linejoin": "round",
|
|
1875
1875
|
d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
|
|
1876
|
-
}, null, -1),
|
|
1877
|
-
|
|
1878
|
-
],
|
|
1876
|
+
}, null, -1), so = [
|
|
1877
|
+
ao
|
|
1878
|
+
], lo = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, co = { class: "col-span-2 text-center" }, uo = { class: "col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap" }, ho = ["onDblclick", "onTouchstart", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], fo = { class: "relative" }, mo = {
|
|
1879
1879
|
key: 0,
|
|
1880
1880
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1881
1881
|
class: "h-10 w-10 md:h-12 md:w-12 m-auto fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -1883,13 +1883,13 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
1883
1883
|
viewBox: "0 0 24 24",
|
|
1884
1884
|
stroke: "currentColor",
|
|
1885
1885
|
"stroke-width": "1"
|
|
1886
|
-
},
|
|
1886
|
+
}, po = /* @__PURE__ */ d("path", {
|
|
1887
1887
|
"stroke-linecap": "round",
|
|
1888
1888
|
"stroke-linejoin": "round",
|
|
1889
1889
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
1890
|
-
}, null, -1),
|
|
1891
|
-
|
|
1892
|
-
],
|
|
1890
|
+
}, null, -1), go = [
|
|
1891
|
+
po
|
|
1892
|
+
], vo = ["src"], bo = {
|
|
1893
1893
|
key: 2,
|
|
1894
1894
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1895
1895
|
class: "h-10 w-10 md:h-12 md:w-12 m-auto text-neutral-500",
|
|
@@ -1897,93 +1897,93 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
1897
1897
|
viewBox: "0 0 24 24",
|
|
1898
1898
|
stroke: "currentColor",
|
|
1899
1899
|
"stroke-width": "1"
|
|
1900
|
-
},
|
|
1900
|
+
}, yo = /* @__PURE__ */ d("path", {
|
|
1901
1901
|
"stroke-linecap": "round",
|
|
1902
1902
|
"stroke-linejoin": "round",
|
|
1903
1903
|
d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
|
|
1904
|
-
}, null, -1),
|
|
1905
|
-
|
|
1906
|
-
],
|
|
1904
|
+
}, null, -1), wo = [
|
|
1905
|
+
yo
|
|
1906
|
+
], xo = {
|
|
1907
1907
|
key: 3,
|
|
1908
1908
|
class: "absolute hidden md:block top-1/2 w-full text-center text-neutral-500"
|
|
1909
|
-
},
|
|
1909
|
+
}, _o = { class: "break-all" }, ko = {
|
|
1910
1910
|
name: "VFExplorer"
|
|
1911
|
-
},
|
|
1911
|
+
}, So = /* @__PURE__ */ Object.assign(ko, {
|
|
1912
1912
|
props: {
|
|
1913
1913
|
view: String,
|
|
1914
1914
|
data: Object,
|
|
1915
1915
|
search: Object
|
|
1916
1916
|
},
|
|
1917
1917
|
setup(o) {
|
|
1918
|
-
const e = o, t = R("emitter"), { setStore: n, getStore: a } = R("storage"), i = (
|
|
1918
|
+
const e = o, t = R("emitter"), { setStore: n, getStore: a } = R("storage"), i = (L) => L == null ? void 0 : L.substring(0, 3), l = (L) => L.replace(/((?=([\w\W]{0,14}))([\w\W]{8,})([\w\W]{8,}))/, "$2..$4"), h = V(null), m = V(null), v = V(0), f = V(null), { t: p } = R("i18n"), b = Math.floor(Math.random() * 2 ** 32), A = V(a("full-screen", !1));
|
|
1919
1919
|
t.on("vf-fullscreen-toggle", () => {
|
|
1920
1920
|
A.value = !A.value, n("full-screen", A.value);
|
|
1921
1921
|
});
|
|
1922
1922
|
const M = V("");
|
|
1923
|
-
t.on("vf-search-query", ({ newQuery:
|
|
1924
|
-
M.value =
|
|
1923
|
+
t.on("vf-search-query", ({ newQuery: L }) => {
|
|
1924
|
+
M.value = L, L ? t.emit("vf-fetch", { params: { q: "search", adapter: e.data.adapter, path: e.data.dirname, filter: L } }) : t.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: e.data.dirname } });
|
|
1925
1925
|
});
|
|
1926
1926
|
let T = null;
|
|
1927
|
-
const
|
|
1927
|
+
const I = () => {
|
|
1928
1928
|
T && clearTimeout(T);
|
|
1929
|
-
}, z = (
|
|
1929
|
+
}, z = (L) => {
|
|
1930
1930
|
T = setTimeout(() => {
|
|
1931
|
-
B(
|
|
1931
|
+
B(L);
|
|
1932
1932
|
}, 500);
|
|
1933
|
-
}, B = (
|
|
1934
|
-
|
|
1935
|
-
}, P = dt({ active: !1, column: "", order: "" }), ne = (
|
|
1936
|
-
let U = [...e.data.files],
|
|
1937
|
-
if (!
|
|
1933
|
+
}, B = (L) => {
|
|
1934
|
+
L.type == "dir" ? (t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: L.path } })) : t.emit("vf-modal-show", { type: "preview", adapter: e.data.adapter, item: L });
|
|
1935
|
+
}, P = dt({ active: !1, column: "", order: "" }), ne = (L = !0) => {
|
|
1936
|
+
let U = [...e.data.files], N = P.column, Y = P.order == "asc" ? 1 : -1;
|
|
1937
|
+
if (!L)
|
|
1938
1938
|
return U;
|
|
1939
1939
|
const H = (te, G) => typeof te == "string" && typeof G == "string" ? te.toLowerCase().localeCompare(G.toLowerCase()) : te < G ? -1 : te > G ? 1 : 0;
|
|
1940
|
-
return P.active && (U = U.slice().sort((te, G) => H(te[
|
|
1941
|
-
}, F = (
|
|
1942
|
-
P.active && P.column ==
|
|
1943
|
-
}, D = () =>
|
|
1944
|
-
if (
|
|
1945
|
-
return
|
|
1946
|
-
|
|
1947
|
-
}, q = (
|
|
1948
|
-
|
|
1949
|
-
let
|
|
1950
|
-
if (
|
|
1940
|
+
return P.active && (U = U.slice().sort((te, G) => H(te[N], G[N]) * Y)), U;
|
|
1941
|
+
}, F = (L) => {
|
|
1942
|
+
P.active && P.column == L ? (P.active = P.order == "asc", P.column = L, P.order = "desc") : (P.active = !0, P.column = L, P.order = "asc");
|
|
1943
|
+
}, D = () => f.value.getSelection().map((L) => JSON.parse(L.dataset.item)), X = (L, U) => {
|
|
1944
|
+
if (L.altKey || L.ctrlKey || L.metaKey)
|
|
1945
|
+
return L.preventDefault(), !1;
|
|
1946
|
+
L.dataTransfer.setDragImage(m.value, 0, 15), L.dataTransfer.effectAllowed = "all", L.dataTransfer.dropEffect = "copy", L.dataTransfer.setData("items", JSON.stringify(D()));
|
|
1947
|
+
}, q = (L, U) => {
|
|
1948
|
+
L.preventDefault();
|
|
1949
|
+
let N = JSON.parse(L.dataTransfer.getData("items"));
|
|
1950
|
+
if (N.find((Y) => Y.storage != a("adapter", "local"))) {
|
|
1951
1951
|
alert("Moving items between different storages is not supported yet.");
|
|
1952
1952
|
return;
|
|
1953
1953
|
}
|
|
1954
|
-
t.emit("vf-modal-show", { type: "move", items: { from:
|
|
1955
|
-
}, le = (
|
|
1956
|
-
|
|
1954
|
+
t.emit("vf-modal-show", { type: "move", items: { from: N, to: U } });
|
|
1955
|
+
}, le = (L, U) => {
|
|
1956
|
+
L.preventDefault(), !U || U.type !== "dir" || f.value.getSelection().find((N) => N == L.currentTarget) ? (L.dataTransfer.dropEffect = "none", L.dataTransfer.effectAllowed = "none") : L.dataTransfer.dropEffect = "copy";
|
|
1957
1957
|
};
|
|
1958
1958
|
return xe(() => {
|
|
1959
|
-
|
|
1960
|
-
area:
|
|
1959
|
+
f.value = new kn({
|
|
1960
|
+
area: h.value,
|
|
1961
1961
|
keyboardDrag: !1,
|
|
1962
1962
|
selectedClass: "vf-explorer-selected",
|
|
1963
1963
|
selectorClass: "vf-explorer-selector"
|
|
1964
1964
|
}), t.on("vf-explorer-update", () => mt(() => {
|
|
1965
|
-
|
|
1966
|
-
})),
|
|
1965
|
+
f.value.clearSelection(), f.value.setSelectables(document.getElementsByClassName("vf-item-" + b));
|
|
1966
|
+
})), f.value.subscribe("predragstart", ({ event: L, isDragging: U }) => {
|
|
1967
1967
|
if (U)
|
|
1968
|
-
|
|
1968
|
+
v.value = f.value.getSelection().length, f.value.break();
|
|
1969
1969
|
else {
|
|
1970
|
-
const
|
|
1971
|
-
|
|
1970
|
+
const N = L.target.offsetWidth - L.offsetX, Y = L.target.offsetHeight - L.offsetY;
|
|
1971
|
+
N < 15 && Y < 15 && (f.value.clearSelection(), f.value.break());
|
|
1972
1972
|
}
|
|
1973
|
-
}),
|
|
1974
|
-
|
|
1975
|
-
}),
|
|
1976
|
-
t.emit("vf-nodes-selected", D()),
|
|
1973
|
+
}), f.value.subscribe("predragmove", ({ isDragging: L }) => {
|
|
1974
|
+
L && f.value.break();
|
|
1975
|
+
}), f.value.subscribe("callback", ({ items: L, event: U, isDragging: N }) => {
|
|
1976
|
+
t.emit("vf-nodes-selected", D()), v.value = f.value.getSelection().length;
|
|
1977
1977
|
});
|
|
1978
|
-
}), xe(() => {
|
|
1978
|
+
}), Ai(() => f.value.start()), xe(() => {
|
|
1979
1979
|
Nt(() => e.view, () => t.emit("vf-explorer-update"));
|
|
1980
|
-
}), (
|
|
1981
|
-
o.view == "list" || M.value.length ? (x(), C("div",
|
|
1980
|
+
}), (L, U) => (x(), C("div", jn, [
|
|
1981
|
+
o.view == "list" || M.value.length ? (x(), C("div", Vn, [
|
|
1982
1982
|
d("div", {
|
|
1983
|
-
onClick: U[0] || (U[0] = (
|
|
1983
|
+
onClick: U[0] || (U[0] = (N) => F("basename")),
|
|
1984
1984
|
class: "col-span-7 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center pl-1"
|
|
1985
1985
|
}, [
|
|
1986
|
-
Me(
|
|
1986
|
+
Me($(_(p)("Name")) + " ", 1),
|
|
1987
1987
|
ge(ye(st, {
|
|
1988
1988
|
direction: P.order == "asc" ? "down" : "up"
|
|
1989
1989
|
}, null, 8, ["direction"]), [
|
|
@@ -1992,10 +1992,10 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
1992
1992
|
]),
|
|
1993
1993
|
M.value.length ? oe("", !0) : (x(), C("div", {
|
|
1994
1994
|
key: 0,
|
|
1995
|
-
onClick: U[1] || (U[1] = (
|
|
1995
|
+
onClick: U[1] || (U[1] = (N) => F("file_size")),
|
|
1996
1996
|
class: "col-span-2 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center border-l border-r dark:border-gray-700"
|
|
1997
1997
|
}, [
|
|
1998
|
-
Me(
|
|
1998
|
+
Me($(_(p)("Size")) + " ", 1),
|
|
1999
1999
|
ge(ye(st, {
|
|
2000
2000
|
direction: P.order == "asc" ? "down" : "up"
|
|
2001
2001
|
}, null, 8, ["direction"]), [
|
|
@@ -2004,10 +2004,10 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
2004
2004
|
])),
|
|
2005
2005
|
M.value.length ? oe("", !0) : (x(), C("div", {
|
|
2006
2006
|
key: 1,
|
|
2007
|
-
onClick: U[2] || (U[2] = (
|
|
2007
|
+
onClick: U[2] || (U[2] = (N) => F("last_modified")),
|
|
2008
2008
|
class: "col-span-3 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center"
|
|
2009
2009
|
}, [
|
|
2010
|
-
Me(
|
|
2010
|
+
Me($(_(p)("Date")) + " ", 1),
|
|
2011
2011
|
ge(ye(st, {
|
|
2012
2012
|
direction: P.order == "asc" ? "down" : "up"
|
|
2013
2013
|
}, null, 8, ["direction"]), [
|
|
@@ -2016,10 +2016,10 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
2016
2016
|
])),
|
|
2017
2017
|
M.value.length ? (x(), C("div", {
|
|
2018
2018
|
key: 2,
|
|
2019
|
-
onClick: U[3] || (U[3] = (
|
|
2019
|
+
onClick: U[3] || (U[3] = (N) => F("path")),
|
|
2020
2020
|
class: "col-span-5 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center border-l dark:border-gray-700"
|
|
2021
2021
|
}, [
|
|
2022
|
-
Me(
|
|
2022
|
+
Me($(_(p)("Filepath")) + " ", 1),
|
|
2023
2023
|
ge(ye(st, {
|
|
2024
2024
|
direction: P.order == "asc" ? "down" : "up"
|
|
2025
2025
|
}, null, 8, ["direction"]), [
|
|
@@ -2027,99 +2027,98 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
2027
2027
|
])
|
|
2028
2028
|
])) : oe("", !0)
|
|
2029
2029
|
])) : oe("", !0),
|
|
2030
|
-
d("div",
|
|
2030
|
+
d("div", zn, [
|
|
2031
2031
|
d("div", {
|
|
2032
2032
|
ref_key: "dragImage",
|
|
2033
2033
|
ref: m,
|
|
2034
2034
|
class: "absolute -z-50 -top-96"
|
|
2035
2035
|
}, [
|
|
2036
|
-
|
|
2037
|
-
d("div",
|
|
2036
|
+
Bn,
|
|
2037
|
+
d("div", Rn, $(v.value), 1)
|
|
2038
2038
|
], 512)
|
|
2039
2039
|
]),
|
|
2040
2040
|
d("div", {
|
|
2041
|
-
style: Lt(A.value ? "height: 100%;" : ""),
|
|
2042
2041
|
class: ue([A.value ? "" : "resize-y", "h-full w-full text-xs vf-selector-area min-h-[150px] overflow-auto p-1 z-0"]),
|
|
2043
2042
|
ref_key: "selectorArea",
|
|
2044
|
-
ref:
|
|
2045
|
-
onContextmenu: U[7] || (U[7] = Oe((
|
|
2043
|
+
ref: h,
|
|
2044
|
+
onContextmenu: U[7] || (U[7] = Oe((N) => _(t).emit("vf-contextmenu-show", { event: N, area: h.value, items: D() }), ["self", "prevent"]))
|
|
2046
2045
|
}, [
|
|
2047
|
-
M.value.length ? (x(!0), C(se, { key: 0 }, ve(ne(), (
|
|
2048
|
-
onDblclick: (H) => B(
|
|
2049
|
-
onTouchstart: (H) => z(
|
|
2050
|
-
onTouchend: U[4] || (U[4] = (H) =>
|
|
2051
|
-
onContextmenu: Oe((H) => _(t).emit("vf-contextmenu-show", { event: H, area:
|
|
2046
|
+
M.value.length ? (x(!0), C(se, { key: 0 }, ve(ne(), (N, Y) => (x(), C("div", {
|
|
2047
|
+
onDblclick: (H) => B(N),
|
|
2048
|
+
onTouchstart: (H) => z(N),
|
|
2049
|
+
onTouchend: U[4] || (U[4] = (H) => I()),
|
|
2050
|
+
onContextmenu: Oe((H) => _(t).emit("vf-contextmenu-show", { event: H, area: h.value, items: D(), target: N }), ["prevent"]),
|
|
2052
2051
|
class: ue(["vf-item-" + _(b), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
|
|
2053
|
-
"data-type":
|
|
2054
|
-
"data-item": JSON.stringify(
|
|
2052
|
+
"data-type": N.type,
|
|
2053
|
+
"data-item": JSON.stringify(N),
|
|
2055
2054
|
"data-index": Y
|
|
2056
2055
|
}, [
|
|
2057
|
-
d("div",
|
|
2058
|
-
d("div",
|
|
2059
|
-
|
|
2060
|
-
d("span",
|
|
2056
|
+
d("div", Un, [
|
|
2057
|
+
d("div", Kn, [
|
|
2058
|
+
N.type == "dir" ? (x(), C("svg", Yn, Xn)) : (x(), C("svg", Fn, Gn)),
|
|
2059
|
+
d("span", Jn, $(N.basename), 1)
|
|
2061
2060
|
]),
|
|
2062
|
-
d("div",
|
|
2061
|
+
d("div", Zn, $(N.path), 1)
|
|
2063
2062
|
])
|
|
2064
|
-
], 42,
|
|
2065
|
-
o.view == "list" && !M.value.length ? (x(!0), C(se, { key: 1 }, ve(ne(), (
|
|
2063
|
+
], 42, Hn))), 256)) : oe("", !0),
|
|
2064
|
+
o.view == "list" && !M.value.length ? (x(!0), C(se, { key: 1 }, ve(ne(), (N, Y) => (x(), C("div", {
|
|
2066
2065
|
draggable: "true",
|
|
2067
|
-
onDblclick: (H) => B(
|
|
2068
|
-
onTouchstart: (H) => z(
|
|
2069
|
-
onTouchend: U[5] || (U[5] = (H) =>
|
|
2070
|
-
onContextmenu: Oe((H) => _(t).emit("vf-contextmenu-show", { event: H, area:
|
|
2066
|
+
onDblclick: (H) => B(N),
|
|
2067
|
+
onTouchstart: (H) => z(N),
|
|
2068
|
+
onTouchend: U[5] || (U[5] = (H) => I()),
|
|
2069
|
+
onContextmenu: Oe((H) => _(t).emit("vf-contextmenu-show", { event: H, area: h.value, items: D(), target: N }), ["prevent"]),
|
|
2071
2070
|
onDragstart: (H) => X(H),
|
|
2072
|
-
onDragover: (H) => le(H,
|
|
2073
|
-
onDrop: (H) => q(H,
|
|
2071
|
+
onDragover: (H) => le(H, N),
|
|
2072
|
+
onDrop: (H) => q(H, N),
|
|
2074
2073
|
class: ue(["vf-item-" + _(b), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
|
|
2075
|
-
"data-type":
|
|
2076
|
-
"data-item": JSON.stringify(
|
|
2074
|
+
"data-type": N.type,
|
|
2075
|
+
"data-item": JSON.stringify(N),
|
|
2077
2076
|
"data-index": Y
|
|
2078
2077
|
}, [
|
|
2079
|
-
d("div",
|
|
2080
|
-
d("div",
|
|
2081
|
-
|
|
2082
|
-
d("span",
|
|
2078
|
+
d("div", eo, [
|
|
2079
|
+
d("div", to, [
|
|
2080
|
+
N.type == "dir" ? (x(), C("svg", ro, no)) : (x(), C("svg", oo, so)),
|
|
2081
|
+
d("span", lo, $(N.basename), 1)
|
|
2083
2082
|
]),
|
|
2084
|
-
d("div",
|
|
2085
|
-
d("div",
|
|
2083
|
+
d("div", co, $(N.file_size ? _(Sn)(N.file_size) : ""), 1),
|
|
2084
|
+
d("div", uo, $(_(Dn)(N.last_modified)), 1)
|
|
2086
2085
|
])
|
|
2087
|
-
], 42,
|
|
2088
|
-
o.view == "grid" && !M.value.length ? (x(!0), C(se, { key: 2 }, ve(ne(!1), (
|
|
2086
|
+
], 42, Qn))), 256)) : oe("", !0),
|
|
2087
|
+
o.view == "grid" && !M.value.length ? (x(!0), C(se, { key: 2 }, ve(ne(!1), (N, Y) => {
|
|
2089
2088
|
var H, te;
|
|
2090
2089
|
return x(), C("div", {
|
|
2091
2090
|
draggable: "true",
|
|
2092
|
-
onDblclick: (G) => B(
|
|
2093
|
-
onTouchstart: (G) => z(
|
|
2094
|
-
onTouchend: U[6] || (U[6] = (G) =>
|
|
2095
|
-
onContextmenu: Oe((G) => _(t).emit("vf-contextmenu-show", { event: G, area:
|
|
2091
|
+
onDblclick: (G) => B(N),
|
|
2092
|
+
onTouchstart: (G) => z(N),
|
|
2093
|
+
onTouchend: U[6] || (U[6] = (G) => I()),
|
|
2094
|
+
onContextmenu: Oe((G) => _(t).emit("vf-contextmenu-show", { event: G, area: h.value, items: D(), target: N }), ["prevent"]),
|
|
2096
2095
|
onDragstart: (G) => X(G),
|
|
2097
|
-
onDragover: (G) => le(G,
|
|
2098
|
-
onDrop: (G) => q(G,
|
|
2096
|
+
onDragover: (G) => le(G, N),
|
|
2097
|
+
onDrop: (G) => q(G, N),
|
|
2099
2098
|
class: ue(["vf-item-" + _(b), "border border-transparent hover:bg-neutral-50 m-0.5 dark:hover:bg-gray-700 inline-flex w-[5.5rem] h-20 md:w-24 md:h-24 text-center justify-center select-none"]),
|
|
2100
|
-
"data-type":
|
|
2101
|
-
"data-item": JSON.stringify(
|
|
2099
|
+
"data-type": N.type,
|
|
2100
|
+
"data-item": JSON.stringify(N),
|
|
2102
2101
|
"data-index": Y
|
|
2103
2102
|
}, [
|
|
2104
2103
|
d("div", null, [
|
|
2105
|
-
d("div",
|
|
2106
|
-
|
|
2104
|
+
d("div", fo, [
|
|
2105
|
+
N.type == "dir" ? (x(), C("svg", mo, go)) : ((H = N.mime_type) != null ? H : "").startsWith("image") ? (x(), C("img", {
|
|
2107
2106
|
key: 1,
|
|
2108
2107
|
class: "h-10 md:h-12 m-auto",
|
|
2109
|
-
src: _(Dt)(_(a)("adapter", e.data.adapter),
|
|
2108
|
+
src: _(Dt)(_(a)("adapter", e.data.adapter), N.path),
|
|
2110
2109
|
alt: ""
|
|
2111
|
-
}, null, 8,
|
|
2112
|
-
((te =
|
|
2110
|
+
}, null, 8, vo)) : (x(), C("svg", bo, wo)),
|
|
2111
|
+
((te = N.mime_type) != null ? te : "").startsWith("image") ? oe("", !0) : (x(), C("div", xo, $(i(N.extension)), 1))
|
|
2113
2112
|
]),
|
|
2114
|
-
d("span",
|
|
2113
|
+
d("span", _o, $(l(N.basename)), 1)
|
|
2115
2114
|
])
|
|
2116
|
-
], 42,
|
|
2115
|
+
], 42, ho);
|
|
2117
2116
|
}), 256)) : oe("", !0)
|
|
2118
|
-
],
|
|
2119
|
-
ye(
|
|
2117
|
+
], 34),
|
|
2118
|
+
ye(Nn)
|
|
2120
2119
|
]));
|
|
2121
2120
|
}
|
|
2122
|
-
}),
|
|
2121
|
+
}), Do = { class: "p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none" }, Co = { class: "flex leading-5 items-center" }, Mo = ["aria-label"], $o = /* @__PURE__ */ d("svg", {
|
|
2123
2122
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2124
2123
|
class: "h-5 w-5",
|
|
2125
2124
|
fill: "none",
|
|
@@ -2132,12 +2131,12 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
2132
2131
|
"stroke-linejoin": "round",
|
|
2133
2132
|
d: "M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"
|
|
2134
2133
|
})
|
|
2135
|
-
], -1),
|
|
2136
|
-
|
|
2137
|
-
],
|
|
2134
|
+
], -1), Eo = [
|
|
2135
|
+
$o
|
|
2136
|
+
], To = ["value"], Ao = { class: "ml-3" }, Oo = { key: 0 }, Po = { class: "ml-1" }, Io = { class: "flex leading-5 items-center" }, No = {
|
|
2138
2137
|
value: "",
|
|
2139
2138
|
disabled: ""
|
|
2140
|
-
},
|
|
2139
|
+
}, Lo = /* @__PURE__ */ d("option", { value: "tr" }, "Turkish", -1), jo = /* @__PURE__ */ d("option", { value: "en" }, "English", -1), Vo = /* @__PURE__ */ d("option", { value: "fr" }, "French", -1), zo = ["aria-label"], Bo = /* @__PURE__ */ d("svg", {
|
|
2141
2140
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2142
2141
|
class: "h-5 w-5 stroke-slate-500 cursor-pointer",
|
|
2143
2142
|
fill: "none",
|
|
@@ -2150,102 +2149,102 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
2150
2149
|
"stroke-linejoin": "round",
|
|
2151
2150
|
d: "M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
2152
2151
|
})
|
|
2153
|
-
], -1),
|
|
2154
|
-
|
|
2155
|
-
],
|
|
2152
|
+
], -1), Ro = [
|
|
2153
|
+
Bo
|
|
2154
|
+
], Ho = {
|
|
2156
2155
|
name: "VFStatusbar"
|
|
2157
|
-
},
|
|
2156
|
+
}, Uo = /* @__PURE__ */ Object.assign(Ho, {
|
|
2158
2157
|
props: {
|
|
2159
2158
|
data: Object
|
|
2160
2159
|
},
|
|
2161
2160
|
setup(o) {
|
|
2162
2161
|
var b;
|
|
2163
|
-
const e = o, t = R("emitter"), { getStore: n, setStore: a } = R("storage"), i = V(0), l = V((b = n("adapter")) != null ? b : e.data.adapter), { t:
|
|
2164
|
-
t.emit("vf-search-exit"), t.emit("vf-fetch", { q: "index", adapter: l.value }), a("adapter", l.value);
|
|
2162
|
+
const e = o, t = R("emitter"), { getStore: n, setStore: a } = R("storage"), i = V(0), l = V((b = n("adapter")) != null ? b : e.data.adapter), { t: h, changeLocale: m } = R("i18n"), v = V(n("locale", "")), f = () => {
|
|
2163
|
+
t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter: l.value } }), a("adapter", l.value);
|
|
2165
2164
|
};
|
|
2166
2165
|
t.on("vf-nodes-selected", (A) => {
|
|
2167
2166
|
i.value = A.length;
|
|
2168
2167
|
});
|
|
2169
|
-
const
|
|
2168
|
+
const p = V("");
|
|
2170
2169
|
return t.on("vf-search-query", ({ newQuery: A }) => {
|
|
2171
|
-
|
|
2172
|
-
}), (A, M) => (x(), C("div",
|
|
2173
|
-
d("div",
|
|
2170
|
+
p.value = A;
|
|
2171
|
+
}), (A, M) => (x(), C("div", Do, [
|
|
2172
|
+
d("div", Co, [
|
|
2174
2173
|
d("div", {
|
|
2175
2174
|
class: "mx-2",
|
|
2176
|
-
"aria-label": _(
|
|
2175
|
+
"aria-label": _(h)("Storage"),
|
|
2177
2176
|
"data-microtip-position": "top-right",
|
|
2178
2177
|
role: "tooltip"
|
|
2179
|
-
},
|
|
2178
|
+
}, Eo, 8, Mo),
|
|
2180
2179
|
ge(d("select", {
|
|
2181
2180
|
"onUpdate:modelValue": M[0] || (M[0] = (T) => l.value = T),
|
|
2182
|
-
onChange:
|
|
2181
|
+
onChange: f,
|
|
2183
2182
|
class: "py-0.5 text-sm text-slate-500 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8"
|
|
2184
2183
|
}, [
|
|
2185
|
-
(x(!0), C(se, null, ve(o.data.storages, (T) => (x(), C("option", { value: T },
|
|
2184
|
+
(x(!0), C(se, null, ve(o.data.storages, (T) => (x(), C("option", { value: T }, $(T), 9, To))), 256))
|
|
2186
2185
|
], 544), [
|
|
2187
|
-
[
|
|
2186
|
+
[sr, l.value]
|
|
2188
2187
|
]),
|
|
2189
|
-
d("div",
|
|
2190
|
-
|
|
2191
|
-
d("span",
|
|
2188
|
+
d("div", Ao, [
|
|
2189
|
+
p.value.length ? (x(), C("span", Oo, $(o.data.files.length) + " items found. ", 1)) : oe("", !0),
|
|
2190
|
+
d("span", Po, $(i.value > 0 ? i.value + " " + _(h)("item(s) selected.") : ""), 1)
|
|
2192
2191
|
])
|
|
2193
2192
|
]),
|
|
2194
|
-
d("div",
|
|
2193
|
+
d("div", Io, [
|
|
2195
2194
|
ge(d("select", {
|
|
2196
|
-
"onUpdate:modelValue": M[1] || (M[1] = (T) =>
|
|
2195
|
+
"onUpdate:modelValue": M[1] || (M[1] = (T) => v.value = T),
|
|
2197
2196
|
onChange: M[2] || (M[2] = (T) => _(m)(T.target.value)),
|
|
2198
2197
|
class: "py-0.5 text-sm text-slate-500 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8 mr-3"
|
|
2199
2198
|
}, [
|
|
2200
|
-
d("option",
|
|
2201
|
-
No,
|
|
2199
|
+
d("option", No, $(_(h)("Language")), 1),
|
|
2202
2200
|
Lo,
|
|
2203
|
-
jo
|
|
2201
|
+
jo,
|
|
2202
|
+
Vo
|
|
2204
2203
|
], 544), [
|
|
2205
|
-
[
|
|
2204
|
+
[sr, v.value]
|
|
2206
2205
|
]),
|
|
2207
2206
|
d("span", {
|
|
2208
|
-
"aria-label": _(
|
|
2207
|
+
"aria-label": _(h)("About"),
|
|
2209
2208
|
"data-microtip-position": "top-left",
|
|
2210
2209
|
role: "tooltip",
|
|
2211
|
-
onClick: M[3] || (M[3] = (T) => _(t).emit("vf-modal-show", { type: "message", title: "Vuefinder 1.0", message: _(
|
|
2212
|
-
},
|
|
2210
|
+
onClick: M[3] || (M[3] = (T) => _(t).emit("vf-modal-show", { type: "message", title: "Vuefinder 1.0", message: _(h)("Vuefinder is a file manager component for vue 3.") }))
|
|
2211
|
+
}, Ro, 8, zo)
|
|
2213
2212
|
])
|
|
2214
2213
|
]));
|
|
2215
2214
|
}
|
|
2216
|
-
}),
|
|
2215
|
+
}), Ko = (o, e = 0, t = !1) => {
|
|
2217
2216
|
let n;
|
|
2218
2217
|
return (...a) => {
|
|
2219
2218
|
t && !n && o(...a), clearTimeout(n), n = setTimeout(() => {
|
|
2220
2219
|
o(...a);
|
|
2221
2220
|
}, e);
|
|
2222
2221
|
};
|
|
2223
|
-
},
|
|
2222
|
+
}, Yo = (o, e, t) => {
|
|
2224
2223
|
const n = V(o);
|
|
2225
|
-
return
|
|
2224
|
+
return Oi((i, l) => ({
|
|
2226
2225
|
get() {
|
|
2227
2226
|
return i(), n.value;
|
|
2228
2227
|
},
|
|
2229
|
-
set:
|
|
2230
|
-
(
|
|
2231
|
-
n.value =
|
|
2228
|
+
set: Ko(
|
|
2229
|
+
(h) => {
|
|
2230
|
+
n.value = h, l();
|
|
2232
2231
|
},
|
|
2233
2232
|
e,
|
|
2234
2233
|
t
|
|
2235
2234
|
)
|
|
2236
2235
|
}));
|
|
2237
|
-
},
|
|
2236
|
+
}, Wo = { class: "flex p-1.5 bg-neutral-100 dark:bg-gray-800 border-t border-b border-neutral-300 dark:border-gray-700/50 items-center select-none text-xs" }, Xo = ["aria-label"], Fo = /* @__PURE__ */ d("path", {
|
|
2238
2237
|
"fill-rule": "evenodd",
|
|
2239
2238
|
d: "M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",
|
|
2240
2239
|
"clip-rule": "evenodd"
|
|
2241
|
-
}, null, -1),
|
|
2242
|
-
|
|
2243
|
-
],
|
|
2244
|
-
|
|
2245
|
-
],
|
|
2240
|
+
}, null, -1), qo = [
|
|
2241
|
+
Fo
|
|
2242
|
+
], Go = ["onClick"], Jo = /* @__PURE__ */ d("path", { d: "M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z" }, null, -1), Zo = [
|
|
2243
|
+
Jo
|
|
2244
|
+
], Qo = { class: "flex leading-5" }, ea = /* @__PURE__ */ d("span", { class: "text-neutral-300 dark:text-gray-600 mx-0.5" }, "/", -1), ta = ["title", "onClick"], ra = {
|
|
2246
2245
|
key: 1,
|
|
2247
2246
|
class: "flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full"
|
|
2248
|
-
},
|
|
2247
|
+
}, ia = /* @__PURE__ */ d("svg", {
|
|
2249
2248
|
class: "h-6 w-6 p-1 m-auto stroke-gray-400 fill-gray-100 dark:stroke-gray-400 dark:fill-gray-400/20",
|
|
2250
2249
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2251
2250
|
viewBox: "0 0 20 20",
|
|
@@ -2256,48 +2255,48 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
2256
2255
|
"stroke-linejoin": "round",
|
|
2257
2256
|
d: "M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"
|
|
2258
2257
|
})
|
|
2259
|
-
], -1),
|
|
2258
|
+
], -1), na = ["onKeydown", "placeholder"], oa = /* @__PURE__ */ d("path", {
|
|
2260
2259
|
"stroke-linecap": "round",
|
|
2261
2260
|
"stroke-linejoin": "round",
|
|
2262
2261
|
d: "M6 18L18 6M6 6l12 12"
|
|
2263
|
-
}, null, -1),
|
|
2264
|
-
|
|
2265
|
-
],
|
|
2262
|
+
}, null, -1), aa = [
|
|
2263
|
+
oa
|
|
2264
|
+
], sa = {
|
|
2266
2265
|
name: "VFBreadcrumb"
|
|
2267
|
-
},
|
|
2266
|
+
}, la = /* @__PURE__ */ Object.assign(sa, {
|
|
2268
2267
|
props: {
|
|
2269
2268
|
data: Object
|
|
2270
2269
|
},
|
|
2271
2270
|
setup(o) {
|
|
2272
|
-
const e = o, t = R("emitter"), { getStore: n } = R("storage"), a = V(null), i = V([]), l = V(!1),
|
|
2271
|
+
const e = o, t = R("emitter"), { getStore: n } = R("storage"), a = V(null), i = V([]), l = V(!1), h = V(null), { t: m } = R("i18n");
|
|
2273
2272
|
t.on("vf-explorer-update", () => {
|
|
2274
2273
|
var B;
|
|
2275
|
-
let
|
|
2274
|
+
let I = [], z = [];
|
|
2276
2275
|
a.value = (B = e.data.dirname) != null ? B : n("adapter", "local") + "://", a.value.length == 0 && (i.value = []), a.value.replace(n("adapter", "local") + "://", "").split("/").forEach(function(P) {
|
|
2277
|
-
|
|
2276
|
+
I.push(P), I.join("/") != "" && z.push({
|
|
2278
2277
|
basename: P,
|
|
2279
2278
|
name: P,
|
|
2280
|
-
path: n("adapter", "local") + "://" +
|
|
2279
|
+
path: n("adapter", "local") + "://" + I.join("/"),
|
|
2281
2280
|
type: "dir"
|
|
2282
2281
|
});
|
|
2283
2282
|
}), z.length > 4 && (z = z.slice(-5), z[0].name = ".."), i.value = z;
|
|
2284
2283
|
});
|
|
2285
|
-
const
|
|
2286
|
-
l.value = !1,
|
|
2284
|
+
const v = () => {
|
|
2285
|
+
l.value = !1, p.value = "";
|
|
2287
2286
|
};
|
|
2288
2287
|
t.on("vf-search-exit", () => {
|
|
2289
|
-
|
|
2288
|
+
v();
|
|
2290
2289
|
});
|
|
2291
|
-
const
|
|
2292
|
-
l.value = !0, mt(() =>
|
|
2293
|
-
},
|
|
2294
|
-
Nt(
|
|
2295
|
-
t.emit("vf-search-query", { newQuery:
|
|
2290
|
+
const f = () => {
|
|
2291
|
+
l.value = !0, mt(() => h.value.focus());
|
|
2292
|
+
}, p = Yo("", 400);
|
|
2293
|
+
Nt(p, (I) => {
|
|
2294
|
+
t.emit("vf-search-query", { newQuery: I });
|
|
2296
2295
|
});
|
|
2297
|
-
const b = () => i.value.length && !l.value, A = (
|
|
2296
|
+
const b = () => i.value.length && !l.value, A = (I) => {
|
|
2298
2297
|
var B;
|
|
2299
|
-
|
|
2300
|
-
let z = JSON.parse(
|
|
2298
|
+
I.preventDefault();
|
|
2299
|
+
let z = JSON.parse(I.dataTransfer.getData("items"));
|
|
2301
2300
|
if (z.find((P) => P.storage != n("adapter", "local"))) {
|
|
2302
2301
|
alert("Moving items between different storages is not supported yet.");
|
|
2303
2302
|
return;
|
|
@@ -2306,12 +2305,12 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
2306
2305
|
type: "move",
|
|
2307
2306
|
items: { from: z, to: (B = i.value[i.value.length - 2]) != null ? B : { path: n("adapter", "local") + "://" } }
|
|
2308
2307
|
});
|
|
2309
|
-
}, M = (
|
|
2310
|
-
|
|
2308
|
+
}, M = (I) => {
|
|
2309
|
+
I.preventDefault(), b() ? I.dataTransfer.dropEffect = "copy" : (I.dataTransfer.dropEffect = "none", I.dataTransfer.effectAllowed = "none");
|
|
2311
2310
|
}, T = () => {
|
|
2312
|
-
|
|
2311
|
+
p.value == "" && v();
|
|
2313
2312
|
};
|
|
2314
|
-
return (
|
|
2313
|
+
return (I, z) => (x(), C("div", Wo, [
|
|
2315
2314
|
d("span", {
|
|
2316
2315
|
"aria-label": _(m)("Go up a directory"),
|
|
2317
2316
|
"data-microtip-position": "bottom-right",
|
|
@@ -2322,70 +2321,70 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
2322
2321
|
onDrop: z[1] || (z[1] = (B) => A(B)),
|
|
2323
2322
|
onClick: z[2] || (z[2] = (B) => {
|
|
2324
2323
|
var P, ne;
|
|
2325
|
-
return !b() || _(t).emit("vf-fetch", { q: "index", adapter: o.data.adapter, path: (ne = (P = i.value[i.value.length - 2]) == null ? void 0 : P.path) != null ? ne : _(n)("adapter", "local") + "://" });
|
|
2324
|
+
return !b() || _(t).emit("vf-fetch", { params: { q: "index", adapter: o.data.adapter, path: (ne = (P = i.value[i.value.length - 2]) == null ? void 0 : P.path) != null ? ne : _(n)("adapter", "local") + "://" } });
|
|
2326
2325
|
}),
|
|
2327
2326
|
class: ue(["h-6 w-6 p-0.5 rounded", b() ? "text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer" : "text-gray-400 dark:text-neutral-500"]),
|
|
2328
2327
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2329
2328
|
viewBox: "0 0 20 20",
|
|
2330
2329
|
fill: "currentColor"
|
|
2331
|
-
},
|
|
2332
|
-
], 8,
|
|
2333
|
-
l.value ? (x(), C("div",
|
|
2334
|
-
|
|
2330
|
+
}, qo, 34))
|
|
2331
|
+
], 8, Xo),
|
|
2332
|
+
l.value ? (x(), C("div", ra, [
|
|
2333
|
+
ia,
|
|
2335
2334
|
ge(d("input", {
|
|
2336
2335
|
ref_key: "searchInput",
|
|
2337
|
-
ref:
|
|
2338
|
-
onKeydown: Ke(
|
|
2336
|
+
ref: h,
|
|
2337
|
+
onKeydown: Ke(v, ["esc"]),
|
|
2339
2338
|
onBlur: T,
|
|
2340
|
-
"onUpdate:modelValue": z[4] || (z[4] = (B) =>
|
|
2339
|
+
"onUpdate:modelValue": z[4] || (z[4] = (B) => Pi(p) ? p.value = B : null),
|
|
2341
2340
|
placeholder: _(m)("Search anything.."),
|
|
2342
2341
|
class: "py-0 px-2 w-full border-0 ring-0 outline-0 text-sm text-gray-600 focus:ring-transparent focus:border-transparent dark:focus:ring-transparent dark:focus:border-transparent dark:text-gray-300 bg-transparent",
|
|
2343
2342
|
type: "text"
|
|
2344
|
-
}, null, 40,
|
|
2345
|
-
[Ye, _(
|
|
2343
|
+
}, null, 40, na), [
|
|
2344
|
+
[Ye, _(p)]
|
|
2346
2345
|
]),
|
|
2347
2346
|
(x(), C("svg", {
|
|
2348
2347
|
class: "w-6 h-6 cursor-pointer",
|
|
2349
|
-
onClick:
|
|
2348
|
+
onClick: v,
|
|
2350
2349
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2351
2350
|
fill: "none",
|
|
2352
2351
|
viewBox: "0 0 24 24",
|
|
2353
2352
|
"stroke-width": "1.5",
|
|
2354
2353
|
stroke: "currentColor"
|
|
2355
|
-
},
|
|
2354
|
+
}, aa))
|
|
2356
2355
|
])) : (x(), C("div", {
|
|
2357
2356
|
key: 0,
|
|
2358
2357
|
class: "group flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full",
|
|
2359
|
-
onClick: Oe(
|
|
2358
|
+
onClick: Oe(f, ["self"])
|
|
2360
2359
|
}, [
|
|
2361
2360
|
(x(), C("svg", {
|
|
2362
|
-
onClick: z[3] || (z[3] = (B) => _(t).emit("vf-fetch", { q: "index", adapter: o.data.adapter })),
|
|
2361
|
+
onClick: z[3] || (z[3] = (B) => _(t).emit("vf-fetch", { params: { q: "index", adapter: o.data.adapter } })),
|
|
2363
2362
|
class: "h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-gray-800 cursor-pointer",
|
|
2364
2363
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2365
2364
|
viewBox: "0 0 20 20",
|
|
2366
2365
|
fill: "currentColor"
|
|
2367
|
-
},
|
|
2368
|
-
d("div",
|
|
2366
|
+
}, Zo)),
|
|
2367
|
+
d("div", Qo, [
|
|
2369
2368
|
(x(!0), C(se, null, ve(i.value, (B, P) => (x(), C("div", { key: P }, [
|
|
2370
|
-
|
|
2369
|
+
ea,
|
|
2371
2370
|
d("span", {
|
|
2372
2371
|
class: "px-1.5 py-1 text-slate-700 dark:text-slate-200 hover:bg-neutral-100 dark:hover:bg-gray-800 rounded cursor-pointer",
|
|
2373
2372
|
title: B.basename,
|
|
2374
|
-
onClick: (ne) => _(t).emit("vf-fetch", { q: "index", adapter: o.data.adapter, path: B.path })
|
|
2375
|
-
},
|
|
2373
|
+
onClick: (ne) => _(t).emit("vf-fetch", { params: { q: "index", adapter: o.data.adapter, path: B.path } })
|
|
2374
|
+
}, $(B.name), 9, ta)
|
|
2376
2375
|
]))), 128))
|
|
2377
2376
|
])
|
|
2378
|
-
], 8,
|
|
2377
|
+
], 8, Go))
|
|
2379
2378
|
]));
|
|
2380
2379
|
}
|
|
2381
|
-
}),
|
|
2380
|
+
}), ca = ["onClick"], ua = /* @__PURE__ */ d("span", { class: "px-1" }, null, -1), da = {
|
|
2382
2381
|
name: "VFContextMenu"
|
|
2383
|
-
},
|
|
2382
|
+
}, ha = /* @__PURE__ */ Object.assign(da, {
|
|
2384
2383
|
props: {
|
|
2385
2384
|
current: Object
|
|
2386
2385
|
},
|
|
2387
2386
|
setup(o) {
|
|
2388
|
-
const e = o, t = R("emitter"), n = V(null), { apiUrl: a } =
|
|
2387
|
+
const e = o, t = R("emitter"), n = V(null), { apiUrl: a } = ke(), i = dt({
|
|
2389
2388
|
active: !1,
|
|
2390
2389
|
items: [],
|
|
2391
2390
|
positions: {
|
|
@@ -2396,91 +2395,91 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
2396
2395
|
t.on("vf-context-selected", (b) => {
|
|
2397
2396
|
l.value = b;
|
|
2398
2397
|
});
|
|
2399
|
-
const { t:
|
|
2398
|
+
const { t: h } = R("i18n"), m = {
|
|
2400
2399
|
newfolder: {
|
|
2401
|
-
title: () =>
|
|
2400
|
+
title: () => h("New Folder"),
|
|
2402
2401
|
action: () => {
|
|
2403
2402
|
t.emit("vf-modal-show", { type: "new-folder" });
|
|
2404
2403
|
}
|
|
2405
2404
|
},
|
|
2406
2405
|
delete: {
|
|
2407
|
-
title: () =>
|
|
2406
|
+
title: () => h("Delete"),
|
|
2408
2407
|
action: () => {
|
|
2409
2408
|
t.emit("vf-modal-show", { type: "delete", items: l });
|
|
2410
2409
|
}
|
|
2411
2410
|
},
|
|
2412
2411
|
refresh: {
|
|
2413
|
-
title: () =>
|
|
2412
|
+
title: () => h("Refresh"),
|
|
2414
2413
|
action: () => {
|
|
2415
|
-
t.emit("vf-fetch", { q: "index", adapter: e.current.adapter, path: e.current.dirname });
|
|
2414
|
+
t.emit("vf-fetch", { params: { q: "index", adapter: e.current.adapter, path: e.current.dirname } });
|
|
2416
2415
|
}
|
|
2417
2416
|
},
|
|
2418
2417
|
preview: {
|
|
2419
|
-
title: () =>
|
|
2418
|
+
title: () => h("Preview"),
|
|
2420
2419
|
action: () => {
|
|
2421
2420
|
t.emit("vf-modal-show", { type: "preview", adapter: e.current.adapter, item: l.value[0] });
|
|
2422
2421
|
}
|
|
2423
2422
|
},
|
|
2424
2423
|
open: {
|
|
2425
|
-
title: () =>
|
|
2424
|
+
title: () => h("Open"),
|
|
2426
2425
|
action: () => {
|
|
2427
|
-
t.emit("vf-search-exit"), t.emit("vf-fetch", { q: "index", adapter: e.current.adapter, path: l.value[0].path });
|
|
2426
|
+
t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter: e.current.adapter, path: l.value[0].path } });
|
|
2428
2427
|
}
|
|
2429
2428
|
},
|
|
2430
2429
|
openDir: {
|
|
2431
|
-
title: () =>
|
|
2430
|
+
title: () => h("Open containing folder"),
|
|
2432
2431
|
action: () => {
|
|
2433
|
-
t.emit("vf-search-exit"), t.emit("vf-fetch", { q: "index", adapter: e.current.adapter, path: l.value[0].dir });
|
|
2432
|
+
t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter: e.current.adapter, path: l.value[0].dir } });
|
|
2434
2433
|
}
|
|
2435
2434
|
},
|
|
2436
2435
|
download: {
|
|
2437
|
-
title: () =>
|
|
2436
|
+
title: () => h("Download"),
|
|
2438
2437
|
action: () => {
|
|
2439
2438
|
const b = a.value + "?" + Ie({ q: "download", adapter: l.value[0].adapter, path: l.value[0].path });
|
|
2440
2439
|
t.emit("vf-download", b);
|
|
2441
2440
|
}
|
|
2442
2441
|
},
|
|
2443
2442
|
archive: {
|
|
2444
|
-
title: () =>
|
|
2443
|
+
title: () => h("Archive"),
|
|
2445
2444
|
action: () => {
|
|
2446
2445
|
t.emit("vf-modal-show", { type: "archive", items: l });
|
|
2447
2446
|
}
|
|
2448
2447
|
},
|
|
2449
2448
|
unarchive: {
|
|
2450
|
-
title: () =>
|
|
2449
|
+
title: () => h("Unarchive"),
|
|
2451
2450
|
action: () => {
|
|
2452
2451
|
t.emit("vf-modal-show", { type: "unarchive", items: l });
|
|
2453
2452
|
}
|
|
2454
2453
|
},
|
|
2455
2454
|
rename: {
|
|
2456
|
-
title: () =>
|
|
2455
|
+
title: () => h("Rename"),
|
|
2457
2456
|
action: () => {
|
|
2458
2457
|
t.emit("vf-modal-show", { type: "rename", items: l });
|
|
2459
2458
|
}
|
|
2460
2459
|
}
|
|
2461
|
-
},
|
|
2460
|
+
}, v = (b) => {
|
|
2462
2461
|
t.emit("vf-contextmenu-hide"), b.action();
|
|
2463
|
-
},
|
|
2462
|
+
}, f = V("");
|
|
2464
2463
|
t.on("vf-search-query", ({ newQuery: b }) => {
|
|
2465
|
-
|
|
2464
|
+
f.value = b;
|
|
2466
2465
|
}), t.on("vf-contextmenu-show", ({ event: b, area: A, items: M, target: T = null }) => {
|
|
2467
|
-
if (i.items = [],
|
|
2466
|
+
if (i.items = [], f.value)
|
|
2468
2467
|
if (T)
|
|
2469
|
-
i.items.push(m.openDir), t.emit("vf-context-selected", [T]);
|
|
2468
|
+
i.items.push(m.openDir), t.emit("vf-context-selected", [T]), console.log("search item selected");
|
|
2470
2469
|
else
|
|
2471
2470
|
return;
|
|
2472
2471
|
else
|
|
2473
|
-
!T && !
|
|
2474
|
-
|
|
2472
|
+
!T && !f.value ? (i.items.push(m.refresh), i.items.push(m.newfolder), t.emit("vf-context-selected", []), console.log("no files selected")) : M.length > 1 && M.some((I) => I.path === T.path) ? (i.items.push(m.refresh), i.items.push(m.archive), i.items.push(m.delete), t.emit("vf-context-selected", M), console.log(M.length + " selected (more than 1 item.)")) : (T.type == "dir" ? i.items.push(m.open) : (i.items.push(m.preview), i.items.push(m.download)), i.items.push(m.rename), T.mime_type == "application/zip" ? i.items.push(m.unarchive) : i.items.push(m.archive), i.items.push(m.delete), t.emit("vf-context-selected", [T]), console.log(T.type + " is selected"));
|
|
2473
|
+
p(b, A);
|
|
2475
2474
|
}), t.on("vf-contextmenu-hide", () => {
|
|
2476
2475
|
i.active = !1;
|
|
2477
2476
|
});
|
|
2478
|
-
const
|
|
2477
|
+
const p = (b, A) => {
|
|
2479
2478
|
i.active = !0, mt(() => {
|
|
2480
|
-
let M = A.getBoundingClientRect(), T = b.pageX,
|
|
2481
|
-
T = M.right - b.pageX + window.scrollX < B ? T - B : T,
|
|
2479
|
+
let M = A.getBoundingClientRect(), T = b.pageX, I = b.pageY, z = n.value.offsetHeight, B = n.value.offsetWidth;
|
|
2480
|
+
T = M.right - b.pageX + window.scrollX < B ? T - B : T, I = M.bottom - b.pageY + window.scrollY < z ? I - z : I, i.positions = {
|
|
2482
2481
|
left: T + "px",
|
|
2483
|
-
top:
|
|
2482
|
+
top: I + "px"
|
|
2484
2483
|
};
|
|
2485
2484
|
});
|
|
2486
2485
|
};
|
|
@@ -2489,46 +2488,46 @@ const _n = Mr.exports, kn = (o, e, t, n, a) => (e = Math, t = e.log, n = 1024, a
|
|
|
2489
2488
|
class: "z-30 absolute text-xs bg-neutral-50 dark:bg-gray-800 dark:text-gray-200 border border-neutral-300 dark:border-gray-600 shadow rounded select-none",
|
|
2490
2489
|
ref_key: "contextmenu",
|
|
2491
2490
|
ref: n,
|
|
2492
|
-
style:
|
|
2491
|
+
style: Cr(i.positions)
|
|
2493
2492
|
}, [
|
|
2494
2493
|
(x(!0), C(se, null, ve(i.items, (M) => (x(), C("li", {
|
|
2495
2494
|
class: "px-2 py-1.5 cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700",
|
|
2496
2495
|
key: M.title,
|
|
2497
|
-
onClick: (T) =>
|
|
2496
|
+
onClick: (T) => v(M)
|
|
2498
2497
|
}, [
|
|
2499
|
-
|
|
2500
|
-
d("span", null,
|
|
2501
|
-
], 8,
|
|
2498
|
+
ua,
|
|
2499
|
+
d("span", null, $(M.title()), 1)
|
|
2500
|
+
], 8, ca))), 128))
|
|
2502
2501
|
], 4)) : oe("", !0);
|
|
2503
2502
|
}
|
|
2504
|
-
}),
|
|
2503
|
+
}), fa = (o, e) => {
|
|
2505
2504
|
const t = o[e];
|
|
2506
2505
|
return t ? typeof t == "function" ? t() : Promise.resolve(t) : new Promise((n, a) => {
|
|
2507
2506
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(a.bind(null, new Error("Unknown variable dynamic import: " + e)));
|
|
2508
2507
|
});
|
|
2509
2508
|
};
|
|
2510
|
-
async function
|
|
2511
|
-
const e = await
|
|
2509
|
+
async function ma(o) {
|
|
2510
|
+
const e = await fa(/* @__PURE__ */ Object.assign({ "../locales/en.json": () => import("./en.8df71796.js"), "../locales/tr.json": () => import("./tr.a655a0c7.js") }), `../locales/${o}.json`);
|
|
2512
2511
|
return JSON.parse(e.default);
|
|
2513
2512
|
}
|
|
2514
|
-
function
|
|
2513
|
+
function pa(o, e) {
|
|
2515
2514
|
const { getStore: t, setStore: n } = St(o), a = ["en", "tr"], i = V({}), l = (m) => {
|
|
2516
|
-
a.includes(m) || (console.log("The selected locale is not yet supported. The fallback language is set as 'en'"), m = "en"),
|
|
2517
|
-
i.value =
|
|
2515
|
+
a.includes(m) || (console.log("The selected locale is not yet supported. The fallback language is set as 'en'"), m = "en"), ma(m).then((v) => {
|
|
2516
|
+
i.value = v, n("locale", m), n("translations", v), console.log(m + " is loaded.");
|
|
2518
2517
|
});
|
|
2519
2518
|
};
|
|
2520
2519
|
t("locale") ? i.value = t("translations") : l(e);
|
|
2521
|
-
function
|
|
2520
|
+
function h(m) {
|
|
2522
2521
|
return i.value.hasOwnProperty(m) ? i.value[m] : "";
|
|
2523
2522
|
}
|
|
2524
|
-
return { t:
|
|
2523
|
+
return { t: h, support_locales: a, changeLocale: l };
|
|
2525
2524
|
}
|
|
2526
|
-
const
|
|
2525
|
+
const ga = /* @__PURE__ */ d("iframe", {
|
|
2527
2526
|
id: "download_frame",
|
|
2528
2527
|
style: { display: "none" }
|
|
2529
|
-
}, null, -1),
|
|
2528
|
+
}, null, -1), va = {
|
|
2530
2529
|
name: "VueFinder"
|
|
2531
|
-
},
|
|
2530
|
+
}, ba = /* @__PURE__ */ Object.assign(va, {
|
|
2532
2531
|
props: {
|
|
2533
2532
|
url: {
|
|
2534
2533
|
type: [String]
|
|
@@ -2551,21 +2550,21 @@ const pa = /* @__PURE__ */ d("iframe", {
|
|
|
2551
2550
|
}
|
|
2552
2551
|
},
|
|
2553
2552
|
setup(o) {
|
|
2554
|
-
const e = o, t =
|
|
2553
|
+
const e = o, t = Ni(), { setStore: n, getStore: a } = St(e.id);
|
|
2555
2554
|
yt("emitter", t), yt("storage", St(e.id));
|
|
2556
|
-
const i =
|
|
2555
|
+
const i = pa(e.id, e.locale);
|
|
2557
2556
|
yt("i18n", i);
|
|
2558
|
-
const { apiUrl: l, setApiUrl:
|
|
2559
|
-
|
|
2560
|
-
const m = dt({ adapter: "local", storages: [], dirname: ".", files: [] }),
|
|
2557
|
+
const { apiUrl: l, setApiUrl: h } = ke();
|
|
2558
|
+
h(e.url);
|
|
2559
|
+
const m = dt({ adapter: "local", storages: [], dirname: ".", files: [] }), v = V(a("viewport", "grid")), f = V(a("darkMode", e.dark));
|
|
2561
2560
|
t.on("vf-darkMode-toggle", () => {
|
|
2562
|
-
|
|
2561
|
+
f.value = !f.value, n("darkMode", f.value);
|
|
2563
2562
|
});
|
|
2564
|
-
const
|
|
2563
|
+
const p = V(a("full-screen", !1));
|
|
2565
2564
|
t.on("vf-fullscreen-toggle", () => {
|
|
2566
|
-
|
|
2565
|
+
p.value = !p.value, n("full-screen", p.value);
|
|
2567
2566
|
}), t.on("vf-view-toggle", (M) => {
|
|
2568
|
-
|
|
2567
|
+
v.value = M;
|
|
2569
2568
|
});
|
|
2570
2569
|
const b = dt({
|
|
2571
2570
|
active: !1,
|
|
@@ -2580,40 +2579,42 @@ const pa = /* @__PURE__ */ d("iframe", {
|
|
|
2580
2579
|
const A = (M) => {
|
|
2581
2580
|
Object.assign(m, M), t.emit("vf-nodes-selected", {}), t.emit("vf-explorer-update");
|
|
2582
2581
|
};
|
|
2583
|
-
return t.on("vf-fetch", (M) => {
|
|
2584
|
-
ht(l.value, { params: M }).then((
|
|
2585
|
-
t.emit("vf-modal-close"), A(
|
|
2582
|
+
return t.on("vf-fetch", ({ params: M, onError: T = null }) => {
|
|
2583
|
+
ht(l.value, { params: M }).then((I) => {
|
|
2584
|
+
t.emit("vf-modal-close"), A(I);
|
|
2585
|
+
}).catch((I) => {
|
|
2586
|
+
T && T(I);
|
|
2586
2587
|
});
|
|
2587
2588
|
}), t.on("vf-download", (M) => {
|
|
2588
2589
|
document.getElementById("download_frame").src = M, t.emit("vf-modal-close");
|
|
2589
2590
|
}), xe(() => {
|
|
2590
|
-
t.emit("vf-fetch", { q: "index", adapter: a("adapter", m.adapter) });
|
|
2591
|
+
t.emit("vf-fetch", { params: { q: "index", adapter: a("adapter", m.adapter) } });
|
|
2591
2592
|
}), (M, T) => (x(), C("div", {
|
|
2592
|
-
class: ue(
|
|
2593
|
+
class: ue(f.value ? "dark" : "")
|
|
2593
2594
|
}, [
|
|
2594
2595
|
d("div", {
|
|
2595
|
-
class: ue([
|
|
2596
|
-
style:
|
|
2597
|
-
onMousedown: T[0] || (T[0] = (
|
|
2596
|
+
class: ue([p.value ? "fixed w-screen inset-0 z-20" : "relative", "border flex flex-col rounded-md bg-white dark:bg-gray-800 text-gray-700 dark:text-neutral-400 border-neutral-300 dark:border-gray-900 min-w-min select-none"]),
|
|
2597
|
+
style: Cr(p.value ? "" : "max-height: " + o.maxHeight),
|
|
2598
|
+
onMousedown: T[0] || (T[0] = (I) => _(t).emit("vf-contextmenu-hide"))
|
|
2598
2599
|
}, [
|
|
2599
|
-
ye(
|
|
2600
|
-
ye(
|
|
2601
|
-
ye(
|
|
2602
|
-
view:
|
|
2600
|
+
ye(xn, { data: m }, null, 8, ["data"]),
|
|
2601
|
+
ye(la, { data: m }, null, 8, ["data"]),
|
|
2602
|
+
ye(So, {
|
|
2603
|
+
view: v.value,
|
|
2603
2604
|
data: m
|
|
2604
2605
|
}, null, 8, ["view", "data"]),
|
|
2605
|
-
ye(
|
|
2606
|
+
ye(Uo, { data: m }, null, 8, ["data"])
|
|
2606
2607
|
], 38),
|
|
2607
|
-
b.active ? (x(), ce(
|
|
2608
|
+
b.active ? (x(), ce(Ii("v-f-modal-" + b.type), {
|
|
2608
2609
|
key: 0,
|
|
2609
2610
|
selection: b.data,
|
|
2610
2611
|
current: m
|
|
2611
2612
|
}, null, 8, ["selection", "current"])) : oe("", !0),
|
|
2612
|
-
ye(
|
|
2613
|
-
|
|
2613
|
+
ye(ha, { current: m }, null, 8, ["current"]),
|
|
2614
|
+
ga
|
|
2614
2615
|
], 2));
|
|
2615
2616
|
}
|
|
2616
|
-
}),
|
|
2617
|
+
}), ya = /* @__PURE__ */ d("div", { class: "fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" }, null, -1), wa = { class: "fixed z-10 inset-0 overflow-y-auto" }, xa = { class: "relative bg-white dark:bg-gray-800 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-4xl md:max-w-2xl lg:max-w-3xl xl:max-w-5xl sm:w-full" }, _a = { class: "bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, ka = { class: "bg-gray-50 dark:bg-gray-800 dark:border-t dark:border-gray-700 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, Se = {
|
|
2617
2618
|
__name: "ModalLayout",
|
|
2618
2619
|
setup(o) {
|
|
2619
2620
|
const e = R("emitter");
|
|
@@ -2628,25 +2629,25 @@ const pa = /* @__PURE__ */ d("iframe", {
|
|
|
2628
2629
|
onKeyup: n[1] || (n[1] = Ke((a) => _(e).emit("vf-modal-close"), ["esc"])),
|
|
2629
2630
|
tabindex: "0"
|
|
2630
2631
|
}, [
|
|
2631
|
-
|
|
2632
|
-
d("div",
|
|
2632
|
+
ya,
|
|
2633
|
+
d("div", wa, [
|
|
2633
2634
|
d("div", {
|
|
2634
2635
|
class: "flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0",
|
|
2635
2636
|
onMousedown: n[0] || (n[0] = Oe((a) => _(e).emit("vf-modal-close"), ["self"]))
|
|
2636
2637
|
}, [
|
|
2637
|
-
d("div",
|
|
2638
|
-
d("div", xa, [
|
|
2639
|
-
cr(t.$slots, "default")
|
|
2640
|
-
]),
|
|
2638
|
+
d("div", xa, [
|
|
2641
2639
|
d("div", _a, [
|
|
2642
|
-
|
|
2640
|
+
lr(t.$slots, "default")
|
|
2641
|
+
]),
|
|
2642
|
+
d("div", ka, [
|
|
2643
|
+
lr(t.$slots, "buttons")
|
|
2643
2644
|
])
|
|
2644
2645
|
])
|
|
2645
2646
|
], 32)
|
|
2646
2647
|
])
|
|
2647
2648
|
], 32));
|
|
2648
2649
|
}
|
|
2649
|
-
},
|
|
2650
|
+
}, Sa = { class: "sm:flex sm:items-start" }, Da = /* @__PURE__ */ d("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
2650
2651
|
/* @__PURE__ */ d("svg", {
|
|
2651
2652
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2652
2653
|
class: "h-6 w-6 stroke-red-600 dark:stroke-red-200",
|
|
@@ -2661,10 +2662,10 @@ const pa = /* @__PURE__ */ d("iframe", {
|
|
|
2661
2662
|
d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
|
|
2662
2663
|
})
|
|
2663
2664
|
])
|
|
2664
|
-
], -1),
|
|
2665
|
+
], -1), Ca = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left" }, Ma = {
|
|
2665
2666
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2666
2667
|
id: "modal-title"
|
|
2667
|
-
},
|
|
2668
|
+
}, $a = { class: "mt-2" }, Ea = { class: "text-sm text-gray-500" }, Ta = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Aa = {
|
|
2668
2669
|
key: 0,
|
|
2669
2670
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2670
2671
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -2672,13 +2673,13 @@ const pa = /* @__PURE__ */ d("iframe", {
|
|
|
2672
2673
|
viewBox: "0 0 24 24",
|
|
2673
2674
|
stroke: "currentColor",
|
|
2674
2675
|
"stroke-width": "1"
|
|
2675
|
-
},
|
|
2676
|
+
}, Oa = /* @__PURE__ */ d("path", {
|
|
2676
2677
|
"stroke-linecap": "round",
|
|
2677
2678
|
"stroke-linejoin": "round",
|
|
2678
2679
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
2679
|
-
}, null, -1),
|
|
2680
|
-
|
|
2681
|
-
],
|
|
2680
|
+
}, null, -1), Pa = [
|
|
2681
|
+
Oa
|
|
2682
|
+
], Ia = {
|
|
2682
2683
|
key: 1,
|
|
2683
2684
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2684
2685
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -2686,52 +2687,52 @@ const pa = /* @__PURE__ */ d("iframe", {
|
|
|
2686
2687
|
viewBox: "0 0 24 24",
|
|
2687
2688
|
stroke: "currentColor",
|
|
2688
2689
|
"stroke-width": "1"
|
|
2689
|
-
},
|
|
2690
|
+
}, Na = /* @__PURE__ */ d("path", {
|
|
2690
2691
|
"stroke-linecap": "round",
|
|
2691
2692
|
"stroke-linejoin": "round",
|
|
2692
2693
|
d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
|
|
2693
|
-
}, null, -1),
|
|
2694
|
-
|
|
2695
|
-
],
|
|
2694
|
+
}, null, -1), La = [
|
|
2695
|
+
Na
|
|
2696
|
+
], ja = { class: "ml-1.5" }, Va = { class: "m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center" }, za = {
|
|
2696
2697
|
name: "VFModalDelete"
|
|
2697
|
-
},
|
|
2698
|
+
}, Ba = /* @__PURE__ */ Object.assign(za, {
|
|
2698
2699
|
props: {
|
|
2699
2700
|
selection: Object,
|
|
2700
2701
|
current: Object
|
|
2701
2702
|
},
|
|
2702
2703
|
setup(o) {
|
|
2703
2704
|
const e = o, t = R("emitter"), { getStore: n } = R("storage"), { t: a } = R("i18n"), i = V(e.selection.items), l = () => {
|
|
2704
|
-
i.value.length && t.emit("vf-fetch", {
|
|
2705
|
+
i.value.length && t.emit("vf-fetch", { params: {
|
|
2705
2706
|
q: "delete",
|
|
2706
2707
|
adapter: n("adapter", "local"),
|
|
2707
2708
|
path: e.current.dirname,
|
|
2708
|
-
items: JSON.stringify(i.value.map(({ path:
|
|
2709
|
-
});
|
|
2709
|
+
items: JSON.stringify(i.value.map(({ path: h, type: m }) => ({ path: h, type: m })))
|
|
2710
|
+
} });
|
|
2710
2711
|
};
|
|
2711
|
-
return (
|
|
2712
|
+
return (h, m) => (x(), ce(Se, null, {
|
|
2712
2713
|
buttons: ee(() => [
|
|
2713
2714
|
d("button", {
|
|
2714
2715
|
type: "button",
|
|
2715
2716
|
onClick: l,
|
|
2716
2717
|
class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"
|
|
2717
|
-
},
|
|
2718
|
+
}, $(_(a)("Yes, Delete!")), 1),
|
|
2718
2719
|
d("button", {
|
|
2719
2720
|
type: "button",
|
|
2720
|
-
onClick: m[0] || (m[0] = (
|
|
2721
|
+
onClick: m[0] || (m[0] = (v) => _(t).emit("vf-modal-close")),
|
|
2721
2722
|
class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
|
2722
|
-
},
|
|
2723
|
-
d("div",
|
|
2723
|
+
}, $(_(a)("Cancel")), 1),
|
|
2724
|
+
d("div", Va, $(_(a)("This action cannot be undone.")), 1)
|
|
2724
2725
|
]),
|
|
2725
2726
|
default: ee(() => [
|
|
2726
|
-
d("div",
|
|
2727
|
-
|
|
2728
|
-
d("div",
|
|
2729
|
-
d("h3",
|
|
2730
|
-
d("div",
|
|
2731
|
-
d("p",
|
|
2732
|
-
(x(!0), C(se, null, ve(i.value, (
|
|
2733
|
-
|
|
2734
|
-
d("span",
|
|
2727
|
+
d("div", Sa, [
|
|
2728
|
+
Da,
|
|
2729
|
+
d("div", Ca, [
|
|
2730
|
+
d("h3", Ma, $(_(a)("Delete files")), 1),
|
|
2731
|
+
d("div", $a, [
|
|
2732
|
+
d("p", Ea, $(_(a)("Are you sure you want to delete these files ?")), 1),
|
|
2733
|
+
(x(!0), C(se, null, ve(i.value, (v) => (x(), C("p", Ta, [
|
|
2734
|
+
v.type == "dir" ? (x(), C("svg", Aa, Pa)) : (x(), C("svg", Ia, La)),
|
|
2735
|
+
d("span", ja, $(v.basename), 1)
|
|
2735
2736
|
]))), 256))
|
|
2736
2737
|
])
|
|
2737
2738
|
])
|
|
@@ -2740,7 +2741,7 @@ const pa = /* @__PURE__ */ d("iframe", {
|
|
|
2740
2741
|
_: 1
|
|
2741
2742
|
}));
|
|
2742
2743
|
}
|
|
2743
|
-
}),
|
|
2744
|
+
}), Ra = { class: "sm:flex sm:items-start" }, Ha = /* @__PURE__ */ d("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
2744
2745
|
/* @__PURE__ */ d("svg", {
|
|
2745
2746
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2746
2747
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -2755,34 +2756,34 @@ const pa = /* @__PURE__ */ d("iframe", {
|
|
|
2755
2756
|
d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
2756
2757
|
})
|
|
2757
2758
|
])
|
|
2758
|
-
], -1),
|
|
2759
|
+
], -1), Ua = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left" }, Ka = {
|
|
2759
2760
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2760
2761
|
id: "modal-title"
|
|
2761
|
-
},
|
|
2762
|
+
}, Ya = { class: "mt-2" }, Wa = { class: "text-sm text-gray-500" }, Xa = {
|
|
2762
2763
|
name: "VFModalMessage"
|
|
2763
|
-
},
|
|
2764
|
+
}, Fa = /* @__PURE__ */ Object.assign(Xa, {
|
|
2764
2765
|
props: {
|
|
2765
2766
|
selection: Object
|
|
2766
2767
|
},
|
|
2767
2768
|
setup(o) {
|
|
2768
2769
|
const e = R("emitter"), { t } = R("i18n");
|
|
2769
|
-
return (n, a) => (x(), ce(
|
|
2770
|
+
return (n, a) => (x(), ce(Se, null, {
|
|
2770
2771
|
buttons: ee(() => [
|
|
2771
2772
|
d("button", {
|
|
2772
2773
|
type: "button",
|
|
2773
2774
|
onClick: a[0] || (a[0] = (i) => _(e).emit("vf-modal-close")),
|
|
2774
2775
|
class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
|
2775
|
-
},
|
|
2776
|
+
}, $(_(t)("Close")), 1)
|
|
2776
2777
|
]),
|
|
2777
2778
|
default: ee(() => {
|
|
2778
|
-
var i, l,
|
|
2779
|
+
var i, l, h, m;
|
|
2779
2780
|
return [
|
|
2780
|
-
d("div",
|
|
2781
|
-
|
|
2782
|
-
d("div",
|
|
2783
|
-
d("h3",
|
|
2784
|
-
d("div",
|
|
2785
|
-
d("p",
|
|
2781
|
+
d("div", Ra, [
|
|
2782
|
+
Ha,
|
|
2783
|
+
d("div", Ua, [
|
|
2784
|
+
d("h3", Ka, $((l = (i = o.selection) == null ? void 0 : i.title) != null ? l : "Title"), 1),
|
|
2785
|
+
d("div", Ya, [
|
|
2786
|
+
d("p", Wa, $((m = (h = o.selection) == null ? void 0 : h.message) != null ? m : "Message") + ".", 1)
|
|
2786
2787
|
])
|
|
2787
2788
|
])
|
|
2788
2789
|
])
|
|
@@ -2791,7 +2792,7 @@ const pa = /* @__PURE__ */ d("iframe", {
|
|
|
2791
2792
|
_: 1
|
|
2792
2793
|
}));
|
|
2793
2794
|
}
|
|
2794
|
-
}),
|
|
2795
|
+
}), qa = { class: "sm:flex sm:items-start" }, Ga = /* @__PURE__ */ d("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
2795
2796
|
/* @__PURE__ */ d("svg", {
|
|
2796
2797
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2797
2798
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -2806,52 +2807,52 @@ const pa = /* @__PURE__ */ d("iframe", {
|
|
|
2806
2807
|
d: "M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"
|
|
2807
2808
|
})
|
|
2808
2809
|
])
|
|
2809
|
-
], -1),
|
|
2810
|
+
], -1), Ja = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Za = {
|
|
2810
2811
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2811
2812
|
id: "modal-title"
|
|
2812
|
-
},
|
|
2813
|
+
}, Qa = { class: "mt-2" }, es = { class: "text-sm text-gray-500" }, ts = ["onKeyup", "placeholder"], rs = {
|
|
2813
2814
|
name: "VFModalNewFolder"
|
|
2814
|
-
},
|
|
2815
|
+
}, is = /* @__PURE__ */ Object.assign(rs, {
|
|
2815
2816
|
props: {
|
|
2816
2817
|
selection: Object,
|
|
2817
2818
|
current: Object
|
|
2818
2819
|
},
|
|
2819
2820
|
setup(o) {
|
|
2820
2821
|
const e = o, t = R("emitter"), { getStore: n } = R("storage"), { t: a } = R("i18n"), i = V(""), l = () => {
|
|
2821
|
-
i.value != "" && (t.emit("vf-fetch", {
|
|
2822
|
+
i.value != "" && (t.emit("vf-fetch", { params: {
|
|
2822
2823
|
q: "newfolder",
|
|
2823
2824
|
adapter: n("adapter", "local"),
|
|
2824
2825
|
path: e.current.dirname,
|
|
2825
2826
|
name: i.value
|
|
2826
|
-
}), t.emit("vf-toast-push", { label: "New Folder is created successfully", type: "success" }));
|
|
2827
|
+
} }), t.emit("vf-toast-push", { label: "New Folder is created successfully", type: "success" }));
|
|
2827
2828
|
};
|
|
2828
|
-
return (
|
|
2829
|
+
return (h, m) => (x(), ce(Se, null, {
|
|
2829
2830
|
buttons: ee(() => [
|
|
2830
2831
|
d("button", {
|
|
2831
2832
|
type: "button",
|
|
2832
2833
|
onClick: l,
|
|
2833
2834
|
class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"
|
|
2834
|
-
},
|
|
2835
|
+
}, $(_(a)("Create")), 1),
|
|
2835
2836
|
d("button", {
|
|
2836
2837
|
type: "button",
|
|
2837
|
-
onClick: m[1] || (m[1] = (
|
|
2838
|
+
onClick: m[1] || (m[1] = (v) => _(t).emit("vf-modal-close")),
|
|
2838
2839
|
class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
|
2839
|
-
},
|
|
2840
|
+
}, $(_(a)("Cancel")), 1)
|
|
2840
2841
|
]),
|
|
2841
2842
|
default: ee(() => [
|
|
2842
|
-
d("div",
|
|
2843
|
-
|
|
2844
|
-
d("div",
|
|
2845
|
-
d("h3",
|
|
2846
|
-
d("div",
|
|
2847
|
-
d("p",
|
|
2843
|
+
d("div", qa, [
|
|
2844
|
+
Ga,
|
|
2845
|
+
d("div", Ja, [
|
|
2846
|
+
d("h3", Za, $(_(a)("New Folder")), 1),
|
|
2847
|
+
d("div", Qa, [
|
|
2848
|
+
d("p", es, $(_(a)("Create a new folder")), 1),
|
|
2848
2849
|
ge(d("input", {
|
|
2849
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
2850
|
+
"onUpdate:modelValue": m[0] || (m[0] = (v) => i.value = v),
|
|
2850
2851
|
onKeyup: Ke(l, ["enter"]),
|
|
2851
2852
|
class: "px-2 py-1 border rounded dark:bg-gray-500 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",
|
|
2852
2853
|
placeholder: _(a)("Folder Name"),
|
|
2853
2854
|
type: "text"
|
|
2854
|
-
}, null, 40,
|
|
2855
|
+
}, null, 40, ts), [
|
|
2855
2856
|
[Ye, i.value]
|
|
2856
2857
|
])
|
|
2857
2858
|
])
|
|
@@ -2861,7 +2862,7 @@ const pa = /* @__PURE__ */ d("iframe", {
|
|
|
2861
2862
|
_: 1
|
|
2862
2863
|
}));
|
|
2863
2864
|
}
|
|
2864
|
-
}),
|
|
2865
|
+
}), ns = { class: "sm:flex sm:items-start" }, os = /* @__PURE__ */ d("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
2865
2866
|
/* @__PURE__ */ d("svg", {
|
|
2866
2867
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2867
2868
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -2876,26 +2877,26 @@ const pa = /* @__PURE__ */ d("iframe", {
|
|
|
2876
2877
|
d: "M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
|
|
2877
2878
|
})
|
|
2878
2879
|
])
|
|
2879
|
-
], -1),
|
|
2880
|
+
], -1), as = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ss = {
|
|
2880
2881
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2881
2882
|
id: "modal-title"
|
|
2882
|
-
},
|
|
2883
|
+
}, ls = { class: "mt-2" }, cs = { class: "text-sm text-gray-500" }, us = ["onKeyup", "placeholder"], ds = {
|
|
2883
2884
|
name: "VFModalNewFile"
|
|
2884
|
-
},
|
|
2885
|
+
}, hs = /* @__PURE__ */ Object.assign(ds, {
|
|
2885
2886
|
props: {
|
|
2886
2887
|
selection: Object,
|
|
2887
2888
|
current: Object
|
|
2888
2889
|
},
|
|
2889
2890
|
setup(o) {
|
|
2890
2891
|
const e = o, t = R("emitter"), { getStore: n } = R("storage"), { t: a } = R("i18n"), i = V(""), l = () => {
|
|
2891
|
-
i.value != "" && t.emit("vf-fetch", {
|
|
2892
|
+
i.value != "" && t.emit("vf-fetch", { params: {
|
|
2892
2893
|
q: "newfile",
|
|
2893
2894
|
adapter: n("adapter", "local"),
|
|
2894
2895
|
path: e.current.dirname,
|
|
2895
2896
|
name: i.value
|
|
2896
|
-
});
|
|
2897
|
+
} });
|
|
2897
2898
|
};
|
|
2898
|
-
return (
|
|
2899
|
+
return (h, m) => (x(), ce(Se, null, {
|
|
2899
2900
|
buttons: ee(() => [
|
|
2900
2901
|
d("button", {
|
|
2901
2902
|
type: "button",
|
|
@@ -2904,24 +2905,24 @@ const pa = /* @__PURE__ */ d("iframe", {
|
|
|
2904
2905
|
}, "Create!"),
|
|
2905
2906
|
d("button", {
|
|
2906
2907
|
type: "button",
|
|
2907
|
-
onClick: m[1] || (m[1] = (
|
|
2908
|
+
onClick: m[1] || (m[1] = (v) => _(t).emit("vf-modal-close")),
|
|
2908
2909
|
class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
|
2909
2910
|
}, "Cancel")
|
|
2910
2911
|
]),
|
|
2911
2912
|
default: ee(() => [
|
|
2912
|
-
d("div",
|
|
2913
|
-
|
|
2914
|
-
d("div",
|
|
2915
|
-
d("h3",
|
|
2916
|
-
d("div",
|
|
2917
|
-
d("p",
|
|
2913
|
+
d("div", ns, [
|
|
2914
|
+
os,
|
|
2915
|
+
d("div", as, [
|
|
2916
|
+
d("h3", ss, $(_(a)("New File")), 1),
|
|
2917
|
+
d("div", ls, [
|
|
2918
|
+
d("p", cs, $(_(a)("Create a new file")), 1),
|
|
2918
2919
|
ge(d("input", {
|
|
2919
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
2920
|
+
"onUpdate:modelValue": m[0] || (m[0] = (v) => i.value = v),
|
|
2920
2921
|
onKeyup: Ke(l, ["enter"]),
|
|
2921
2922
|
class: "px-2 py-1 border rounded dark:bg-gray-500 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",
|
|
2922
2923
|
placeholder: _(a)("File Name"),
|
|
2923
2924
|
type: "text"
|
|
2924
|
-
}, null, 40,
|
|
2925
|
+
}, null, 40, us), [
|
|
2925
2926
|
[Ye, i.value]
|
|
2926
2927
|
])
|
|
2927
2928
|
])
|
|
@@ -2931,58 +2932,58 @@ const pa = /* @__PURE__ */ d("iframe", {
|
|
|
2931
2932
|
_: 1
|
|
2932
2933
|
}));
|
|
2933
2934
|
}
|
|
2934
|
-
}),
|
|
2935
|
+
}), fs = { class: "flex" }, ms = {
|
|
2935
2936
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2936
2937
|
id: "modal-title"
|
|
2937
|
-
},
|
|
2938
|
+
}, ps = { class: "ml-auto mb-2" }, gs = {
|
|
2938
2939
|
key: 0,
|
|
2939
2940
|
class: "p-2 border font-normal whitespace-pre-wrap border-gray-200 dark:border-gray-700/50 dark:text-gray-200 rounded min-h-[200px] max-h-[60vh] text-xs overflow-auto"
|
|
2940
|
-
},
|
|
2941
|
+
}, vs = { key: 1 }, bs = {
|
|
2941
2942
|
__name: "Text",
|
|
2942
2943
|
props: {
|
|
2943
2944
|
selection: Object
|
|
2944
2945
|
},
|
|
2945
2946
|
emits: ["load"],
|
|
2946
2947
|
setup(o, { emit: e }) {
|
|
2947
|
-
const t = o, n = V(""), a = V(""), i = V(null), l = V(!1), { apiUrl:
|
|
2948
|
+
const t = o, n = V(""), a = V(""), i = V(null), l = V(!1), { apiUrl: h } = ke(), { t: m } = R("i18n");
|
|
2948
2949
|
xe(() => {
|
|
2949
|
-
ht(
|
|
2950
|
+
ht(h.value, {
|
|
2950
2951
|
params: { q: "preview", adapter: t.selection.adapter, path: t.selection.item.path },
|
|
2951
2952
|
json: !1
|
|
2952
|
-
}).then((
|
|
2953
|
-
n.value =
|
|
2953
|
+
}).then((p) => {
|
|
2954
|
+
n.value = p, e("load");
|
|
2954
2955
|
});
|
|
2955
2956
|
});
|
|
2956
|
-
const
|
|
2957
|
+
const v = () => {
|
|
2957
2958
|
l.value = !l.value, a.value = n.value, l.value == !0 && mt(() => {
|
|
2958
2959
|
i.value.focus();
|
|
2959
2960
|
});
|
|
2960
|
-
},
|
|
2961
|
-
ht(
|
|
2961
|
+
}, f = () => {
|
|
2962
|
+
ht(h.value, {
|
|
2962
2963
|
method: "POST",
|
|
2963
2964
|
params: { q: "save", adapter: t.selection.adapter, path: t.selection.item.path, content: a.value },
|
|
2964
2965
|
json: !1
|
|
2965
|
-
}).then((
|
|
2966
|
-
n.value =
|
|
2967
|
-
}).catch((
|
|
2966
|
+
}).then((p) => {
|
|
2967
|
+
n.value = p, e("load"), l.value = !l.value;
|
|
2968
|
+
}).catch((p) => console.log(p.statusText));
|
|
2968
2969
|
};
|
|
2969
|
-
return (
|
|
2970
|
-
d("div",
|
|
2971
|
-
d("div",
|
|
2972
|
-
d("div",
|
|
2970
|
+
return (p, b) => (x(), C(se, null, [
|
|
2971
|
+
d("div", fs, [
|
|
2972
|
+
d("div", ms, $(o.selection.item.basename), 1),
|
|
2973
|
+
d("div", ps, [
|
|
2973
2974
|
l.value ? (x(), C("button", {
|
|
2974
2975
|
key: 0,
|
|
2975
|
-
onClick:
|
|
2976
|
+
onClick: f,
|
|
2976
2977
|
class: "ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"
|
|
2977
|
-
},
|
|
2978
|
+
}, $(_(m)("Save")), 1)) : oe("", !0),
|
|
2978
2979
|
d("button", {
|
|
2979
2980
|
class: "ml-1 px-2 py-1 text-blue-500",
|
|
2980
|
-
onClick: b[0] || (b[0] = (A) =>
|
|
2981
|
-
},
|
|
2981
|
+
onClick: b[0] || (b[0] = (A) => v())
|
|
2982
|
+
}, $(l.value ? _(m)("Cancel") : _(m)("Edit")), 1)
|
|
2982
2983
|
])
|
|
2983
2984
|
]),
|
|
2984
2985
|
d("div", null, [
|
|
2985
|
-
l.value ? (x(), C("div",
|
|
2986
|
+
l.value ? (x(), C("div", vs, [
|
|
2986
2987
|
ge(d("textarea", {
|
|
2987
2988
|
ref_key: "editInput",
|
|
2988
2989
|
ref: i,
|
|
@@ -2995,7 +2996,7 @@ const pa = /* @__PURE__ */ d("iframe", {
|
|
|
2995
2996
|
}, null, 512), [
|
|
2996
2997
|
[Ye, a.value]
|
|
2997
2998
|
])
|
|
2998
|
-
])) : (x(), C("pre",
|
|
2999
|
+
])) : (x(), C("pre", gs, $(n.value), 1))
|
|
2999
3000
|
])
|
|
3000
3001
|
], 64));
|
|
3001
3002
|
}
|
|
@@ -3009,7 +3010,7 @@ const pa = /* @__PURE__ */ d("iframe", {
|
|
|
3009
3010
|
*
|
|
3010
3011
|
* Date: 2021-06-12T08:00:17.411Z
|
|
3011
3012
|
*/
|
|
3012
|
-
function
|
|
3013
|
+
function ur(o, e) {
|
|
3013
3014
|
var t = Object.keys(o);
|
|
3014
3015
|
if (Object.getOwnPropertySymbols) {
|
|
3015
3016
|
var n = Object.getOwnPropertySymbols(o);
|
|
@@ -3022,9 +3023,9 @@ function dr(o, e) {
|
|
|
3022
3023
|
function $r(o) {
|
|
3023
3024
|
for (var e = 1; e < arguments.length; e++) {
|
|
3024
3025
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
3025
|
-
e % 2 ?
|
|
3026
|
-
|
|
3027
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) :
|
|
3026
|
+
e % 2 ? ur(Object(t), !0).forEach(function(n) {
|
|
3027
|
+
xs(o, n, t[n]);
|
|
3028
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : ur(Object(t)).forEach(function(n) {
|
|
3028
3029
|
Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
|
|
3029
3030
|
});
|
|
3030
3031
|
}
|
|
@@ -3037,20 +3038,20 @@ function ut(o) {
|
|
|
3037
3038
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
3038
3039
|
}, ut(o);
|
|
3039
3040
|
}
|
|
3040
|
-
function
|
|
3041
|
+
function ys(o, e) {
|
|
3041
3042
|
if (!(o instanceof e))
|
|
3042
3043
|
throw new TypeError("Cannot call a class as a function");
|
|
3043
3044
|
}
|
|
3044
|
-
function
|
|
3045
|
+
function dr(o, e) {
|
|
3045
3046
|
for (var t = 0; t < e.length; t++) {
|
|
3046
3047
|
var n = e[t];
|
|
3047
3048
|
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(o, n.key, n);
|
|
3048
3049
|
}
|
|
3049
3050
|
}
|
|
3050
|
-
function ys(o, e, t) {
|
|
3051
|
-
return e && hr(o.prototype, e), t && hr(o, t), o;
|
|
3052
|
-
}
|
|
3053
3051
|
function ws(o, e, t) {
|
|
3052
|
+
return e && dr(o.prototype, e), t && dr(o, t), o;
|
|
3053
|
+
}
|
|
3054
|
+
function xs(o, e, t) {
|
|
3054
3055
|
return e in o ? Object.defineProperty(o, e, {
|
|
3055
3056
|
value: t,
|
|
3056
3057
|
enumerable: !0,
|
|
@@ -3059,17 +3060,17 @@ function ws(o, e, t) {
|
|
|
3059
3060
|
}) : o[e] = t, o;
|
|
3060
3061
|
}
|
|
3061
3062
|
function Er(o) {
|
|
3062
|
-
return
|
|
3063
|
+
return _s(o) || ks(o) || Ss(o) || Ds();
|
|
3063
3064
|
}
|
|
3064
|
-
function
|
|
3065
|
+
function _s(o) {
|
|
3065
3066
|
if (Array.isArray(o))
|
|
3066
3067
|
return Ct(o);
|
|
3067
3068
|
}
|
|
3068
|
-
function
|
|
3069
|
+
function ks(o) {
|
|
3069
3070
|
if (typeof Symbol < "u" && o[Symbol.iterator] != null || o["@@iterator"] != null)
|
|
3070
3071
|
return Array.from(o);
|
|
3071
3072
|
}
|
|
3072
|
-
function
|
|
3073
|
+
function Ss(o, e) {
|
|
3073
3074
|
if (!!o) {
|
|
3074
3075
|
if (typeof o == "string")
|
|
3075
3076
|
return Ct(o, e);
|
|
@@ -3086,13 +3087,13 @@ function Ct(o, e) {
|
|
|
3086
3087
|
n[t] = o[t];
|
|
3087
3088
|
return n;
|
|
3088
3089
|
}
|
|
3089
|
-
function
|
|
3090
|
+
function Ds() {
|
|
3090
3091
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
3091
3092
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3092
3093
|
}
|
|
3093
|
-
var pt = typeof window < "u" && typeof window.document < "u", _e = pt ? window : {},
|
|
3094
|
+
var pt = typeof window < "u" && typeof window.document < "u", _e = pt ? window : {}, Lt = pt && _e.document.documentElement ? "ontouchstart" in _e.document.documentElement : !1, jt = pt ? "PointerEvent" in _e : !1, J = "cropper", Vt = "all", Tr = "crop", Ar = "move", Or = "zoom", Te = "e", Ae = "w", ze = "s", Ce = "n", qe = "ne", Ge = "nw", Je = "se", Ze = "sw", Mt = "".concat(J, "-crop"), hr = "".concat(J, "-disabled"), he = "".concat(J, "-hidden"), fr = "".concat(J, "-hide"), Cs = "".concat(J, "-invisible"), ft = "".concat(J, "-modal"), $t = "".concat(J, "-move"), et = "".concat(J, "Action"), lt = "".concat(J, "Preview"), zt = "crop", Pr = "move", Ir = "none", Et = "crop", Tt = "cropend", At = "cropmove", Ot = "cropstart", mr = "dblclick", Ms = Lt ? "touchstart" : "mousedown", $s = Lt ? "touchmove" : "mousemove", Es = Lt ? "touchend touchcancel" : "mouseup", pr = jt ? "pointerdown" : Ms, gr = jt ? "pointermove" : $s, vr = jt ? "pointerup pointercancel" : Es, br = "ready", yr = "resize", wr = "wheel", Pt = "zoom", xr = "image/jpeg", Ts = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, As = /^data:/, Os = /^data:image\/jpeg;base64,/, Ps = /^img|canvas$/i, Nr = 200, Lr = 100, _r = {
|
|
3094
3095
|
viewMode: 0,
|
|
3095
|
-
dragMode:
|
|
3096
|
+
dragMode: zt,
|
|
3096
3097
|
initialAspectRatio: NaN,
|
|
3097
3098
|
aspectRatio: NaN,
|
|
3098
3099
|
data: null,
|
|
@@ -3130,11 +3131,11 @@ var pt = typeof window < "u" && typeof window.document < "u", _e = pt ? window :
|
|
|
3130
3131
|
cropend: null,
|
|
3131
3132
|
crop: null,
|
|
3132
3133
|
zoom: null
|
|
3133
|
-
},
|
|
3134
|
+
}, Is = '<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>', Ns = Number.isNaN || _e.isNaN;
|
|
3134
3135
|
function W(o) {
|
|
3135
|
-
return typeof o == "number" && !
|
|
3136
|
+
return typeof o == "number" && !Ns(o);
|
|
3136
3137
|
}
|
|
3137
|
-
var
|
|
3138
|
+
var kr = function(e) {
|
|
3138
3139
|
return e > 0 && e < 1 / 0;
|
|
3139
3140
|
};
|
|
3140
3141
|
function xt(o) {
|
|
@@ -3143,13 +3144,13 @@ function xt(o) {
|
|
|
3143
3144
|
function Pe(o) {
|
|
3144
3145
|
return ut(o) === "object" && o !== null;
|
|
3145
3146
|
}
|
|
3146
|
-
var
|
|
3147
|
+
var Ls = Object.prototype.hasOwnProperty;
|
|
3147
3148
|
function Be(o) {
|
|
3148
3149
|
if (!Pe(o))
|
|
3149
3150
|
return !1;
|
|
3150
3151
|
try {
|
|
3151
3152
|
var e = o.constructor, t = e.prototype;
|
|
3152
|
-
return e && t &&
|
|
3153
|
+
return e && t && Ls.call(t, "isPrototypeOf");
|
|
3153
3154
|
} catch {
|
|
3154
3155
|
return !1;
|
|
3155
3156
|
}
|
|
@@ -3157,9 +3158,9 @@ function Be(o) {
|
|
|
3157
3158
|
function de(o) {
|
|
3158
3159
|
return typeof o == "function";
|
|
3159
3160
|
}
|
|
3160
|
-
var
|
|
3161
|
+
var js = Array.prototype.slice;
|
|
3161
3162
|
function jr(o) {
|
|
3162
|
-
return Array.from ? Array.from(o) :
|
|
3163
|
+
return Array.from ? Array.from(o) : js.call(o);
|
|
3163
3164
|
}
|
|
3164
3165
|
function ie(o, e) {
|
|
3165
3166
|
return o && de(e) && (Array.isArray(o) || W(o.length) ? jr(o).forEach(function(t, n) {
|
|
@@ -3176,19 +3177,19 @@ var Z = Object.assign || function(e) {
|
|
|
3176
3177
|
e[l] = i[l];
|
|
3177
3178
|
});
|
|
3178
3179
|
}), e;
|
|
3179
|
-
},
|
|
3180
|
+
}, Vs = /\.\d*(?:0|9){12}\d*$/;
|
|
3180
3181
|
function He(o) {
|
|
3181
3182
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1e11;
|
|
3182
|
-
return
|
|
3183
|
+
return Vs.test(o) ? Math.round(o * e) / e : o;
|
|
3183
3184
|
}
|
|
3184
|
-
var
|
|
3185
|
+
var zs = /^width|height|left|top|marginLeft|marginTop$/;
|
|
3185
3186
|
function $e(o, e) {
|
|
3186
3187
|
var t = o.style;
|
|
3187
3188
|
ie(e, function(n, a) {
|
|
3188
|
-
|
|
3189
|
+
zs.test(a) && W(n) && (n = "".concat(n, "px")), t[a] = n;
|
|
3189
3190
|
});
|
|
3190
3191
|
}
|
|
3191
|
-
function
|
|
3192
|
+
function Bs(o, e) {
|
|
3192
3193
|
return o.classList ? o.classList.contains(e) : o.className.indexOf(e) > -1;
|
|
3193
3194
|
}
|
|
3194
3195
|
function ae(o, e) {
|
|
@@ -3233,17 +3234,17 @@ function Re(o, e, t) {
|
|
|
3233
3234
|
t ? ae(o, e) : we(o, e);
|
|
3234
3235
|
}
|
|
3235
3236
|
}
|
|
3236
|
-
var
|
|
3237
|
-
function
|
|
3238
|
-
return o.replace(
|
|
3237
|
+
var Rs = /([a-z\d])([A-Z])/g;
|
|
3238
|
+
function Bt(o) {
|
|
3239
|
+
return o.replace(Rs, "$1-$2").toLowerCase();
|
|
3239
3240
|
}
|
|
3240
3241
|
function It(o, e) {
|
|
3241
|
-
return Pe(o[e]) ? o[e] : o.dataset ? o.dataset[e] : o.getAttribute("data-".concat(
|
|
3242
|
+
return Pe(o[e]) ? o[e] : o.dataset ? o.dataset[e] : o.getAttribute("data-".concat(Bt(e)));
|
|
3242
3243
|
}
|
|
3243
3244
|
function tt(o, e, t) {
|
|
3244
|
-
Pe(t) ? o[e] = t : o.dataset ? o.dataset[e] = t : o.setAttribute("data-".concat(
|
|
3245
|
+
Pe(t) ? o[e] = t : o.dataset ? o.dataset[e] = t : o.setAttribute("data-".concat(Bt(e)), t);
|
|
3245
3246
|
}
|
|
3246
|
-
function
|
|
3247
|
+
function Hs(o, e) {
|
|
3247
3248
|
if (Pe(o[e]))
|
|
3248
3249
|
try {
|
|
3249
3250
|
delete o[e];
|
|
@@ -3257,7 +3258,7 @@ function Rs(o, e) {
|
|
|
3257
3258
|
o.dataset[e] = void 0;
|
|
3258
3259
|
}
|
|
3259
3260
|
else
|
|
3260
|
-
o.removeAttribute("data-".concat(
|
|
3261
|
+
o.removeAttribute("data-".concat(Bt(e)));
|
|
3261
3262
|
}
|
|
3262
3263
|
var Vr = /\s\s*/, zr = function() {
|
|
3263
3264
|
var o = !1;
|
|
@@ -3289,13 +3290,13 @@ function pe(o, e, t) {
|
|
|
3289
3290
|
var n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, a = t;
|
|
3290
3291
|
e.trim().split(Vr).forEach(function(i) {
|
|
3291
3292
|
if (n.once && !zr) {
|
|
3292
|
-
var l = o.listeners,
|
|
3293
|
+
var l = o.listeners, h = l === void 0 ? {} : l;
|
|
3293
3294
|
a = function() {
|
|
3294
|
-
delete
|
|
3295
|
-
for (var
|
|
3296
|
-
|
|
3297
|
-
t.apply(o,
|
|
3298
|
-
},
|
|
3295
|
+
delete h[i][t], o.removeEventListener(i, a, n);
|
|
3296
|
+
for (var v = arguments.length, f = new Array(v), p = 0; p < v; p++)
|
|
3297
|
+
f[p] = arguments[p];
|
|
3298
|
+
t.apply(o, f);
|
|
3299
|
+
}, h[i] || (h[i] = {}), h[i][t] && o.removeEventListener(i, h[i][t], n), h[i][t] = a, o.listeners = h;
|
|
3299
3300
|
}
|
|
3300
3301
|
o.addEventListener(i, a, n);
|
|
3301
3302
|
});
|
|
@@ -3315,30 +3316,30 @@ function Br(o) {
|
|
|
3315
3316
|
top: e.top + (window.pageYOffset - document.documentElement.clientTop)
|
|
3316
3317
|
};
|
|
3317
3318
|
}
|
|
3318
|
-
var _t = _e.location,
|
|
3319
|
-
function
|
|
3320
|
-
var e = o.match(
|
|
3319
|
+
var _t = _e.location, Us = /^(\w+:)\/\/([^:/?#]*):?(\d*)/i;
|
|
3320
|
+
function Sr(o) {
|
|
3321
|
+
var e = o.match(Us);
|
|
3321
3322
|
return e !== null && (e[1] !== _t.protocol || e[2] !== _t.hostname || e[3] !== _t.port);
|
|
3322
3323
|
}
|
|
3323
|
-
function
|
|
3324
|
+
function Dr(o) {
|
|
3324
3325
|
var e = "timestamp=".concat(new Date().getTime());
|
|
3325
3326
|
return o + (o.indexOf("?") === -1 ? "?" : "&") + e;
|
|
3326
3327
|
}
|
|
3327
3328
|
function Qe(o) {
|
|
3328
3329
|
var e = o.rotate, t = o.scaleX, n = o.scaleY, a = o.translateX, i = o.translateY, l = [];
|
|
3329
3330
|
W(a) && a !== 0 && l.push("translateX(".concat(a, "px)")), W(i) && i !== 0 && l.push("translateY(".concat(i, "px)")), W(e) && e !== 0 && l.push("rotate(".concat(e, "deg)")), W(t) && t !== 1 && l.push("scaleX(".concat(t, ")")), W(n) && n !== 1 && l.push("scaleY(".concat(n, ")"));
|
|
3330
|
-
var
|
|
3331
|
+
var h = l.length ? l.join(" ") : "none";
|
|
3331
3332
|
return {
|
|
3332
|
-
WebkitTransform:
|
|
3333
|
-
msTransform:
|
|
3334
|
-
transform:
|
|
3333
|
+
WebkitTransform: h,
|
|
3334
|
+
msTransform: h,
|
|
3335
|
+
transform: h
|
|
3335
3336
|
};
|
|
3336
3337
|
}
|
|
3337
|
-
function
|
|
3338
|
+
function Ks(o) {
|
|
3338
3339
|
var e = $r({}, o), t = 0;
|
|
3339
3340
|
return ie(o, function(n, a) {
|
|
3340
3341
|
delete e[a], ie(e, function(i) {
|
|
3341
|
-
var l = Math.abs(n.startX - i.startX),
|
|
3342
|
+
var l = Math.abs(n.startX - i.startX), h = Math.abs(n.startY - i.startY), m = Math.abs(n.endX - i.endX), v = Math.abs(n.endY - i.endY), f = Math.sqrt(l * l + h * h), p = Math.sqrt(m * m + v * v), b = (p - f) / f;
|
|
3342
3343
|
Math.abs(b) > Math.abs(t) && (t = b);
|
|
3343
3344
|
});
|
|
3344
3345
|
}), t;
|
|
@@ -3353,7 +3354,7 @@ function ct(o, e) {
|
|
|
3353
3354
|
startY: n
|
|
3354
3355
|
}, a);
|
|
3355
3356
|
}
|
|
3356
|
-
function
|
|
3357
|
+
function Ys(o) {
|
|
3357
3358
|
var e = 0, t = 0, n = 0;
|
|
3358
3359
|
return ie(o, function(a) {
|
|
3359
3360
|
var i = a.startX, l = a.startY;
|
|
@@ -3364,10 +3365,10 @@ function Ks(o) {
|
|
|
3364
3365
|
};
|
|
3365
3366
|
}
|
|
3366
3367
|
function Ee(o) {
|
|
3367
|
-
var e = o.aspectRatio, t = o.height, n = o.width, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "contain", i =
|
|
3368
|
+
var e = o.aspectRatio, t = o.height, n = o.width, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "contain", i = kr(n), l = kr(t);
|
|
3368
3369
|
if (i && l) {
|
|
3369
|
-
var
|
|
3370
|
-
a === "contain" &&
|
|
3370
|
+
var h = t * e;
|
|
3371
|
+
a === "contain" && h > n || a === "cover" && h < n ? t = n / e : n = t * e;
|
|
3371
3372
|
} else
|
|
3372
3373
|
i ? t = n / e : l && (n = t * e);
|
|
3373
3374
|
return {
|
|
@@ -3375,83 +3376,83 @@ function Ee(o) {
|
|
|
3375
3376
|
height: t
|
|
3376
3377
|
};
|
|
3377
3378
|
}
|
|
3378
|
-
function
|
|
3379
|
+
function Ws(o) {
|
|
3379
3380
|
var e = o.width, t = o.height, n = o.degree;
|
|
3380
3381
|
if (n = Math.abs(n) % 180, n === 90)
|
|
3381
3382
|
return {
|
|
3382
3383
|
width: t,
|
|
3383
3384
|
height: e
|
|
3384
3385
|
};
|
|
3385
|
-
var a = n % 90 * Math.PI / 180, i = Math.sin(a), l = Math.cos(a),
|
|
3386
|
+
var a = n % 90 * Math.PI / 180, i = Math.sin(a), l = Math.cos(a), h = e * l + t * i, m = e * i + t * l;
|
|
3386
3387
|
return n > 90 ? {
|
|
3387
3388
|
width: m,
|
|
3388
|
-
height:
|
|
3389
|
+
height: h
|
|
3389
3390
|
} : {
|
|
3390
|
-
width:
|
|
3391
|
+
width: h,
|
|
3391
3392
|
height: m
|
|
3392
3393
|
};
|
|
3393
3394
|
}
|
|
3394
|
-
function
|
|
3395
|
-
var a = e.aspectRatio, i = e.naturalWidth, l = e.naturalHeight,
|
|
3395
|
+
function Xs(o, e, t, n) {
|
|
3396
|
+
var a = e.aspectRatio, i = e.naturalWidth, l = e.naturalHeight, h = e.rotate, m = h === void 0 ? 0 : h, v = e.scaleX, f = v === void 0 ? 1 : v, p = e.scaleY, b = p === void 0 ? 1 : p, A = t.aspectRatio, M = t.naturalWidth, T = t.naturalHeight, I = n.fillColor, z = I === void 0 ? "transparent" : I, B = n.imageSmoothingEnabled, P = B === void 0 ? !0 : B, ne = n.imageSmoothingQuality, F = ne === void 0 ? "low" : ne, D = n.maxWidth, X = D === void 0 ? 1 / 0 : D, q = n.maxHeight, le = q === void 0 ? 1 / 0 : q, fe = n.minWidth, L = fe === void 0 ? 0 : fe, U = n.minHeight, N = U === void 0 ? 0 : U, Y = document.createElement("canvas"), H = Y.getContext("2d"), te = Ee({
|
|
3396
3397
|
aspectRatio: A,
|
|
3397
3398
|
width: X,
|
|
3398
3399
|
height: le
|
|
3399
3400
|
}), G = Ee({
|
|
3400
3401
|
aspectRatio: A,
|
|
3401
|
-
width:
|
|
3402
|
-
height:
|
|
3402
|
+
width: L,
|
|
3403
|
+
height: N
|
|
3403
3404
|
}, "cover"), We = Math.min(te.width, Math.max(G.width, M)), Xe = Math.min(te.height, Math.max(G.height, T)), rt = Ee({
|
|
3404
3405
|
aspectRatio: a,
|
|
3405
3406
|
width: X,
|
|
3406
3407
|
height: le
|
|
3407
3408
|
}), it = Ee({
|
|
3408
3409
|
aspectRatio: a,
|
|
3409
|
-
width:
|
|
3410
|
-
height:
|
|
3410
|
+
width: L,
|
|
3411
|
+
height: N
|
|
3411
3412
|
}, "cover"), nt = Math.min(rt.width, Math.max(it.width, i)), Ne = Math.min(rt.height, Math.max(it.height, l)), gt = [-nt / 2, -Ne / 2, nt, Ne];
|
|
3412
|
-
return Y.width = He(We), Y.height = He(Xe), H.fillStyle = z, H.fillRect(0, 0, We, Xe), H.save(), H.translate(We / 2, Xe / 2), H.rotate(m * Math.PI / 180), H.scale(
|
|
3413
|
+
return Y.width = He(We), Y.height = He(Xe), H.fillStyle = z, H.fillRect(0, 0, We, Xe), H.save(), H.translate(We / 2, Xe / 2), H.rotate(m * Math.PI / 180), H.scale(f, b), H.imageSmoothingEnabled = P, H.imageSmoothingQuality = F, H.drawImage.apply(H, [o].concat(Er(gt.map(function(Le) {
|
|
3413
3414
|
return Math.floor(He(Le));
|
|
3414
3415
|
})))), H.restore(), Y;
|
|
3415
3416
|
}
|
|
3416
3417
|
var Rr = String.fromCharCode;
|
|
3417
|
-
function
|
|
3418
|
+
function Fs(o, e, t) {
|
|
3418
3419
|
var n = "";
|
|
3419
3420
|
t += e;
|
|
3420
3421
|
for (var a = e; a < t; a += 1)
|
|
3421
3422
|
n += Rr(o.getUint8(a));
|
|
3422
3423
|
return n;
|
|
3423
3424
|
}
|
|
3424
|
-
var
|
|
3425
|
-
function
|
|
3426
|
-
var e = o.replace(
|
|
3425
|
+
var qs = /^data:.*,/;
|
|
3426
|
+
function Gs(o) {
|
|
3427
|
+
var e = o.replace(qs, ""), t = atob(e), n = new ArrayBuffer(t.length), a = new Uint8Array(n);
|
|
3427
3428
|
return ie(a, function(i, l) {
|
|
3428
3429
|
a[l] = t.charCodeAt(l);
|
|
3429
3430
|
}), n;
|
|
3430
3431
|
}
|
|
3431
|
-
function
|
|
3432
|
+
function Js(o, e) {
|
|
3432
3433
|
for (var t = [], n = 8192, a = new Uint8Array(o); a.length > 0; )
|
|
3433
3434
|
t.push(Rr.apply(null, jr(a.subarray(0, n)))), a = a.subarray(n);
|
|
3434
3435
|
return "data:".concat(e, ";base64,").concat(btoa(t.join("")));
|
|
3435
3436
|
}
|
|
3436
|
-
function
|
|
3437
|
+
function Zs(o) {
|
|
3437
3438
|
var e = new DataView(o), t;
|
|
3438
3439
|
try {
|
|
3439
3440
|
var n, a, i;
|
|
3440
3441
|
if (e.getUint8(0) === 255 && e.getUint8(1) === 216)
|
|
3441
|
-
for (var l = e.byteLength,
|
|
3442
|
-
if (e.getUint8(
|
|
3443
|
-
a =
|
|
3442
|
+
for (var l = e.byteLength, h = 2; h + 1 < l; ) {
|
|
3443
|
+
if (e.getUint8(h) === 255 && e.getUint8(h + 1) === 225) {
|
|
3444
|
+
a = h;
|
|
3444
3445
|
break;
|
|
3445
3446
|
}
|
|
3446
|
-
|
|
3447
|
+
h += 1;
|
|
3447
3448
|
}
|
|
3448
3449
|
if (a) {
|
|
3449
|
-
var m = a + 4,
|
|
3450
|
-
if (
|
|
3451
|
-
var
|
|
3452
|
-
if (n =
|
|
3453
|
-
var
|
|
3454
|
-
|
|
3450
|
+
var m = a + 4, v = a + 10;
|
|
3451
|
+
if (Fs(e, m, 4) === "Exif") {
|
|
3452
|
+
var f = e.getUint16(v);
|
|
3453
|
+
if (n = f === 18761, (n || f === 19789) && e.getUint16(v + 2, n) === 42) {
|
|
3454
|
+
var p = e.getUint32(v + 4, n);
|
|
3455
|
+
p >= 8 && (i = v + p);
|
|
3455
3456
|
}
|
|
3456
3457
|
}
|
|
3457
3458
|
}
|
|
@@ -3468,7 +3469,7 @@ function Js(o) {
|
|
|
3468
3469
|
}
|
|
3469
3470
|
return t;
|
|
3470
3471
|
}
|
|
3471
|
-
function
|
|
3472
|
+
function Qs(o) {
|
|
3472
3473
|
var e = 0, t = 1, n = 1;
|
|
3473
3474
|
switch (o) {
|
|
3474
3475
|
case 2:
|
|
@@ -3499,62 +3500,62 @@ function Zs(o) {
|
|
|
3499
3500
|
scaleY: n
|
|
3500
3501
|
};
|
|
3501
3502
|
}
|
|
3502
|
-
var
|
|
3503
|
+
var el = {
|
|
3503
3504
|
render: function() {
|
|
3504
3505
|
this.initContainer(), this.initCanvas(), this.initCropBox(), this.renderCanvas(), this.cropped && this.renderCropBox();
|
|
3505
3506
|
},
|
|
3506
3507
|
initContainer: function() {
|
|
3507
3508
|
var e = this.element, t = this.options, n = this.container, a = this.cropper, i = Number(t.minContainerWidth), l = Number(t.minContainerHeight);
|
|
3508
3509
|
ae(a, he), we(e, he);
|
|
3509
|
-
var
|
|
3510
|
+
var h = {
|
|
3510
3511
|
width: Math.max(n.offsetWidth, i >= 0 ? i : Nr),
|
|
3511
3512
|
height: Math.max(n.offsetHeight, l >= 0 ? l : Lr)
|
|
3512
3513
|
};
|
|
3513
|
-
this.containerData =
|
|
3514
|
-
width:
|
|
3515
|
-
height:
|
|
3514
|
+
this.containerData = h, $e(a, {
|
|
3515
|
+
width: h.width,
|
|
3516
|
+
height: h.height
|
|
3516
3517
|
}), ae(e, he), we(a, he);
|
|
3517
3518
|
},
|
|
3518
3519
|
initCanvas: function() {
|
|
3519
|
-
var e = this.containerData, t = this.imageData, n = this.options.viewMode, a = Math.abs(t.rotate) % 180 === 90, i = a ? t.naturalHeight : t.naturalWidth, l = a ? t.naturalWidth : t.naturalHeight,
|
|
3520
|
-
e.height *
|
|
3521
|
-
var
|
|
3522
|
-
aspectRatio:
|
|
3520
|
+
var e = this.containerData, t = this.imageData, n = this.options.viewMode, a = Math.abs(t.rotate) % 180 === 90, i = a ? t.naturalHeight : t.naturalWidth, l = a ? t.naturalWidth : t.naturalHeight, h = i / l, m = e.width, v = e.height;
|
|
3521
|
+
e.height * h > e.width ? n === 3 ? m = e.height * h : v = e.width / h : n === 3 ? v = e.width / h : m = e.height * h;
|
|
3522
|
+
var f = {
|
|
3523
|
+
aspectRatio: h,
|
|
3523
3524
|
naturalWidth: i,
|
|
3524
3525
|
naturalHeight: l,
|
|
3525
3526
|
width: m,
|
|
3526
|
-
height:
|
|
3527
|
+
height: v
|
|
3527
3528
|
};
|
|
3528
|
-
this.canvasData =
|
|
3529
|
+
this.canvasData = f, this.limited = n === 1 || n === 2, this.limitCanvas(!0, !0), f.width = Math.min(Math.max(f.width, f.minWidth), f.maxWidth), f.height = Math.min(Math.max(f.height, f.minHeight), f.maxHeight), f.left = (e.width - f.width) / 2, f.top = (e.height - f.height) / 2, f.oldLeft = f.left, f.oldTop = f.top, this.initialCanvasData = Z({}, f);
|
|
3529
3530
|
},
|
|
3530
3531
|
limitCanvas: function(e, t) {
|
|
3531
|
-
var n = this.options, a = this.containerData, i = this.canvasData, l = this.cropBoxData,
|
|
3532
|
+
var n = this.options, a = this.containerData, i = this.canvasData, l = this.cropBoxData, h = n.viewMode, m = i.aspectRatio, v = this.cropped && l;
|
|
3532
3533
|
if (e) {
|
|
3533
|
-
var
|
|
3534
|
-
|
|
3534
|
+
var f = Number(n.minCanvasWidth) || 0, p = Number(n.minCanvasHeight) || 0;
|
|
3535
|
+
h > 1 ? (f = Math.max(f, a.width), p = Math.max(p, a.height), h === 3 && (p * m > f ? f = p * m : p = f / m)) : h > 0 && (f ? f = Math.max(f, v ? l.width : 0) : p ? p = Math.max(p, v ? l.height : 0) : v && (f = l.width, p = l.height, p * m > f ? f = p * m : p = f / m));
|
|
3535
3536
|
var b = Ee({
|
|
3536
3537
|
aspectRatio: m,
|
|
3537
|
-
width:
|
|
3538
|
-
height:
|
|
3538
|
+
width: f,
|
|
3539
|
+
height: p
|
|
3539
3540
|
});
|
|
3540
|
-
|
|
3541
|
+
f = b.width, p = b.height, i.minWidth = f, i.minHeight = p, i.maxWidth = 1 / 0, i.maxHeight = 1 / 0;
|
|
3541
3542
|
}
|
|
3542
3543
|
if (t)
|
|
3543
|
-
if (
|
|
3544
|
+
if (h > (v ? 0 : 1)) {
|
|
3544
3545
|
var A = a.width - i.width, M = a.height - i.height;
|
|
3545
|
-
i.minLeft = Math.min(0, A), i.minTop = Math.min(0, M), i.maxLeft = Math.max(0, A), i.maxTop = Math.max(0, M),
|
|
3546
|
+
i.minLeft = Math.min(0, A), i.minTop = Math.min(0, M), i.maxLeft = Math.max(0, A), i.maxTop = Math.max(0, M), v && this.limited && (i.minLeft = Math.min(l.left, l.left + (l.width - i.width)), i.minTop = Math.min(l.top, l.top + (l.height - i.height)), i.maxLeft = l.left, i.maxTop = l.top, h === 2 && (i.width >= a.width && (i.minLeft = Math.min(0, A), i.maxLeft = Math.max(0, A)), i.height >= a.height && (i.minTop = Math.min(0, M), i.maxTop = Math.max(0, M))));
|
|
3546
3547
|
} else
|
|
3547
3548
|
i.minLeft = -i.width, i.minTop = -i.height, i.maxLeft = a.width, i.maxTop = a.height;
|
|
3548
3549
|
},
|
|
3549
3550
|
renderCanvas: function(e, t) {
|
|
3550
3551
|
var n = this.canvasData, a = this.imageData;
|
|
3551
3552
|
if (t) {
|
|
3552
|
-
var i =
|
|
3553
|
+
var i = Ws({
|
|
3553
3554
|
width: a.naturalWidth * Math.abs(a.scaleX || 1),
|
|
3554
3555
|
height: a.naturalHeight * Math.abs(a.scaleY || 1),
|
|
3555
3556
|
degree: a.rotate || 0
|
|
3556
|
-
}), l = i.width,
|
|
3557
|
-
n.left -= (m - n.width) / 2, n.top -= (
|
|
3557
|
+
}), l = i.width, h = i.height, m = n.width * (l / n.naturalWidth), v = n.height * (h / n.naturalHeight);
|
|
3558
|
+
n.left -= (m - n.width) / 2, n.top -= (v - n.height) / 2, n.width = m, n.height = v, n.aspectRatio = l / h, n.naturalWidth = l, n.naturalHeight = h, this.limitCanvas(!0, !1);
|
|
3558
3559
|
}
|
|
3559
3560
|
(n.width > n.maxWidth || n.width < n.minWidth) && (n.left = n.oldLeft), (n.height > n.maxHeight || n.height < n.minHeight) && (n.top = n.oldTop), n.width = Math.min(Math.max(n.width, n.minWidth), n.maxWidth), n.height = Math.min(Math.max(n.height, n.minHeight), n.maxHeight), this.limitCanvas(!1, !0), n.left = Math.min(Math.max(n.left, n.minLeft), n.maxLeft), n.top = Math.min(Math.max(n.top, n.minTop), n.maxTop), n.oldLeft = n.left, n.oldTop = n.top, $e(this.canvas, Z({
|
|
3560
3561
|
width: n.width,
|
|
@@ -3587,16 +3588,16 @@ var Qs = {
|
|
|
3587
3588
|
n && (t.height * n > t.width ? i.height = i.width / n : i.width = i.height * n), this.cropBoxData = i, this.limitCropBox(!0, !0), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), i.width = Math.max(i.minWidth, i.width * a), i.height = Math.max(i.minHeight, i.height * a), i.left = t.left + (t.width - i.width) / 2, i.top = t.top + (t.height - i.height) / 2, i.oldLeft = i.left, i.oldTop = i.top, this.initialCropBoxData = Z({}, i);
|
|
3588
3589
|
},
|
|
3589
3590
|
limitCropBox: function(e, t) {
|
|
3590
|
-
var n = this.options, a = this.containerData, i = this.canvasData, l = this.cropBoxData,
|
|
3591
|
+
var n = this.options, a = this.containerData, i = this.canvasData, l = this.cropBoxData, h = this.limited, m = n.aspectRatio;
|
|
3591
3592
|
if (e) {
|
|
3592
|
-
var
|
|
3593
|
-
|
|
3593
|
+
var v = Number(n.minCropBoxWidth) || 0, f = Number(n.minCropBoxHeight) || 0, p = h ? Math.min(a.width, i.width, i.width + i.left, a.width - i.left) : a.width, b = h ? Math.min(a.height, i.height, i.height + i.top, a.height - i.top) : a.height;
|
|
3594
|
+
v = Math.min(v, a.width), f = Math.min(f, a.height), m && (v && f ? f * m > v ? f = v / m : v = f * m : v ? f = v / m : f && (v = f * m), b * m > p ? b = p / m : p = b * m), l.minWidth = Math.min(v, p), l.minHeight = Math.min(f, b), l.maxWidth = p, l.maxHeight = b;
|
|
3594
3595
|
}
|
|
3595
|
-
t && (
|
|
3596
|
+
t && (h ? (l.minLeft = Math.max(0, i.left), l.minTop = Math.max(0, i.top), l.maxLeft = Math.min(a.width, i.left + i.width) - l.width, l.maxTop = Math.min(a.height, i.top + i.height) - l.height) : (l.minLeft = 0, l.minTop = 0, l.maxLeft = a.width - l.width, l.maxTop = a.height - l.height));
|
|
3596
3597
|
},
|
|
3597
3598
|
renderCropBox: function() {
|
|
3598
3599
|
var e = this.options, t = this.containerData, n = this.cropBoxData;
|
|
3599
|
-
(n.width > n.maxWidth || n.width < n.minWidth) && (n.left = n.oldLeft), (n.height > n.maxHeight || n.height < n.minHeight) && (n.top = n.oldTop), n.width = Math.min(Math.max(n.width, n.minWidth), n.maxWidth), n.height = Math.min(Math.max(n.height, n.minHeight), n.maxHeight), this.limitCropBox(!1, !0), n.left = Math.min(Math.max(n.left, n.minLeft), n.maxLeft), n.top = Math.min(Math.max(n.top, n.minTop), n.maxTop), n.oldLeft = n.left, n.oldTop = n.top, e.movable && e.cropBoxMovable && tt(this.face, et, n.width >= t.width && n.height >= t.height ? Ar :
|
|
3600
|
+
(n.width > n.maxWidth || n.width < n.minWidth) && (n.left = n.oldLeft), (n.height > n.maxHeight || n.height < n.minHeight) && (n.top = n.oldTop), n.width = Math.min(Math.max(n.width, n.minWidth), n.maxWidth), n.height = Math.min(Math.max(n.height, n.minHeight), n.maxHeight), this.limitCropBox(!1, !0), n.left = Math.min(Math.max(n.left, n.minLeft), n.maxLeft), n.top = Math.min(Math.max(n.top, n.minTop), n.maxTop), n.oldLeft = n.left, n.oldTop = n.top, e.movable && e.cropBoxMovable && tt(this.face, et, n.width >= t.width && n.height >= t.height ? Ar : Vt), $e(this.cropBox, Z({
|
|
3600
3601
|
width: n.width,
|
|
3601
3602
|
height: n.height
|
|
3602
3603
|
}, Qe({
|
|
@@ -3607,18 +3608,18 @@ var Qs = {
|
|
|
3607
3608
|
output: function() {
|
|
3608
3609
|
this.preview(), Ue(this.element, Et, this.getData());
|
|
3609
3610
|
}
|
|
3610
|
-
},
|
|
3611
|
+
}, tl = {
|
|
3611
3612
|
initPreview: function() {
|
|
3612
3613
|
var e = this.element, t = this.crossOrigin, n = this.options.preview, a = t ? this.crossOriginUrl : this.url, i = e.alt || "The image to preview", l = document.createElement("img");
|
|
3613
3614
|
if (t && (l.crossOrigin = t), l.src = a, l.alt = i, this.viewBox.appendChild(l), this.viewBoxImage = l, !!n) {
|
|
3614
|
-
var
|
|
3615
|
-
typeof n == "string" ?
|
|
3616
|
-
var
|
|
3615
|
+
var h = n;
|
|
3616
|
+
typeof n == "string" ? h = e.ownerDocument.querySelectorAll(n) : n.querySelector && (h = [n]), this.previews = h, ie(h, function(m) {
|
|
3617
|
+
var v = document.createElement("img");
|
|
3617
3618
|
tt(m, lt, {
|
|
3618
3619
|
width: m.offsetWidth,
|
|
3619
3620
|
height: m.offsetHeight,
|
|
3620
3621
|
html: m.innerHTML
|
|
3621
|
-
}), t && (
|
|
3622
|
+
}), t && (v.crossOrigin = t), v.src = a, v.alt = i, v.style.cssText = 'display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"', m.innerHTML = "", m.appendChild(v);
|
|
3622
3623
|
});
|
|
3623
3624
|
}
|
|
3624
3625
|
},
|
|
@@ -3628,62 +3629,62 @@ var Qs = {
|
|
|
3628
3629
|
$e(e, {
|
|
3629
3630
|
width: t.width,
|
|
3630
3631
|
height: t.height
|
|
3631
|
-
}), e.innerHTML = t.html,
|
|
3632
|
+
}), e.innerHTML = t.html, Hs(e, lt);
|
|
3632
3633
|
});
|
|
3633
3634
|
},
|
|
3634
3635
|
preview: function() {
|
|
3635
|
-
var e = this.imageData, t = this.canvasData, n = this.cropBoxData, a = n.width, i = n.height, l = e.width,
|
|
3636
|
+
var e = this.imageData, t = this.canvasData, n = this.cropBoxData, a = n.width, i = n.height, l = e.width, h = e.height, m = n.left - t.left - e.left, v = n.top - t.top - e.top;
|
|
3636
3637
|
!this.cropped || this.disabled || ($e(this.viewBoxImage, Z({
|
|
3637
3638
|
width: l,
|
|
3638
|
-
height:
|
|
3639
|
+
height: h
|
|
3639
3640
|
}, Qe(Z({
|
|
3640
3641
|
translateX: -m,
|
|
3641
|
-
translateY: -
|
|
3642
|
-
}, e)))), ie(this.previews, function(
|
|
3643
|
-
var
|
|
3644
|
-
a && (
|
|
3642
|
+
translateY: -v
|
|
3643
|
+
}, e)))), ie(this.previews, function(f) {
|
|
3644
|
+
var p = It(f, lt), b = p.width, A = p.height, M = b, T = A, I = 1;
|
|
3645
|
+
a && (I = b / a, T = i * I), i && T > A && (I = A / i, M = a * I, T = A), $e(f, {
|
|
3645
3646
|
width: M,
|
|
3646
3647
|
height: T
|
|
3647
|
-
}), $e(
|
|
3648
|
-
width: l *
|
|
3649
|
-
height:
|
|
3648
|
+
}), $e(f.getElementsByTagName("img")[0], Z({
|
|
3649
|
+
width: l * I,
|
|
3650
|
+
height: h * I
|
|
3650
3651
|
}, Qe(Z({
|
|
3651
|
-
translateX: -m *
|
|
3652
|
-
translateY: -
|
|
3652
|
+
translateX: -m * I,
|
|
3653
|
+
translateY: -v * I
|
|
3653
3654
|
}, e))));
|
|
3654
3655
|
}));
|
|
3655
3656
|
}
|
|
3656
|
-
},
|
|
3657
|
+
}, rl = {
|
|
3657
3658
|
bind: function() {
|
|
3658
3659
|
var e = this.element, t = this.options, n = this.cropper;
|
|
3659
|
-
de(t.cropstart) && pe(e, Ot, t.cropstart), de(t.cropmove) && pe(e, At, t.cropmove), de(t.cropend) && pe(e, Tt, t.cropend), de(t.crop) && pe(e, Et, t.crop), de(t.zoom) && pe(e, Pt, t.zoom), pe(n,
|
|
3660
|
+
de(t.cropstart) && pe(e, Ot, t.cropstart), de(t.cropmove) && pe(e, At, t.cropmove), de(t.cropend) && pe(e, Tt, t.cropend), de(t.crop) && pe(e, Et, t.crop), de(t.zoom) && pe(e, Pt, t.zoom), pe(n, pr, this.onCropStart = this.cropStart.bind(this)), t.zoomable && t.zoomOnWheel && pe(n, wr, this.onWheel = this.wheel.bind(this), {
|
|
3660
3661
|
passive: !1,
|
|
3661
3662
|
capture: !0
|
|
3662
|
-
}), t.toggleDragModeOnDblclick && pe(n,
|
|
3663
|
+
}), t.toggleDragModeOnDblclick && pe(n, mr, this.onDblclick = this.dblclick.bind(this)), pe(e.ownerDocument, gr, this.onCropMove = this.cropMove.bind(this)), pe(e.ownerDocument, vr, this.onCropEnd = this.cropEnd.bind(this)), t.responsive && pe(window, yr, this.onResize = this.resize.bind(this));
|
|
3663
3664
|
},
|
|
3664
3665
|
unbind: function() {
|
|
3665
3666
|
var e = this.element, t = this.options, n = this.cropper;
|
|
3666
|
-
de(t.cropstart) && be(e, Ot, t.cropstart), de(t.cropmove) && be(e, At, t.cropmove), de(t.cropend) && be(e, Tt, t.cropend), de(t.crop) && be(e, Et, t.crop), de(t.zoom) && be(e, Pt, t.zoom), be(n,
|
|
3667
|
+
de(t.cropstart) && be(e, Ot, t.cropstart), de(t.cropmove) && be(e, At, t.cropmove), de(t.cropend) && be(e, Tt, t.cropend), de(t.crop) && be(e, Et, t.crop), de(t.zoom) && be(e, Pt, t.zoom), be(n, pr, this.onCropStart), t.zoomable && t.zoomOnWheel && be(n, wr, this.onWheel, {
|
|
3667
3668
|
passive: !1,
|
|
3668
3669
|
capture: !0
|
|
3669
|
-
}), t.toggleDragModeOnDblclick && be(n,
|
|
3670
|
+
}), t.toggleDragModeOnDblclick && be(n, mr, this.onDblclick), be(e.ownerDocument, gr, this.onCropMove), be(e.ownerDocument, vr, this.onCropEnd), t.responsive && be(window, yr, this.onResize);
|
|
3670
3671
|
}
|
|
3671
|
-
},
|
|
3672
|
+
}, il = {
|
|
3672
3673
|
resize: function() {
|
|
3673
3674
|
if (!this.disabled) {
|
|
3674
3675
|
var e = this.options, t = this.container, n = this.containerData, a = t.offsetWidth / n.width, i = t.offsetHeight / n.height, l = Math.abs(a - 1) > Math.abs(i - 1) ? a : i;
|
|
3675
3676
|
if (l !== 1) {
|
|
3676
|
-
var
|
|
3677
|
-
e.restore && (
|
|
3678
|
-
f
|
|
3679
|
-
})), this.setCropBoxData(ie(m, function(
|
|
3680
|
-
m[
|
|
3677
|
+
var h, m;
|
|
3678
|
+
e.restore && (h = this.getCanvasData(), m = this.getCropBoxData()), this.render(), e.restore && (this.setCanvasData(ie(h, function(v, f) {
|
|
3679
|
+
h[f] = v * l;
|
|
3680
|
+
})), this.setCropBoxData(ie(m, function(v, f) {
|
|
3681
|
+
m[f] = v * l;
|
|
3681
3682
|
})));
|
|
3682
3683
|
}
|
|
3683
3684
|
}
|
|
3684
3685
|
},
|
|
3685
3686
|
dblclick: function() {
|
|
3686
|
-
this.disabled || this.options.dragMode === Ir || this.setDragMode(
|
|
3687
|
+
this.disabled || this.options.dragMode === Ir || this.setDragMode(Bs(this.dragBox, Mt) ? Pr : zt);
|
|
3687
3688
|
},
|
|
3688
3689
|
wheel: function(e) {
|
|
3689
3690
|
var t = this, n = Number(this.options.wheelZoomRatio) || 0.1, a = 1;
|
|
@@ -3695,9 +3696,9 @@ var Qs = {
|
|
|
3695
3696
|
var t = e.buttons, n = e.button;
|
|
3696
3697
|
if (!(this.disabled || (e.type === "mousedown" || e.type === "pointerdown" && e.pointerType === "mouse") && (W(t) && t !== 1 || W(n) && n !== 0 || e.ctrlKey))) {
|
|
3697
3698
|
var a = this.options, i = this.pointers, l;
|
|
3698
|
-
e.changedTouches ? ie(e.changedTouches, function(
|
|
3699
|
-
i[
|
|
3700
|
-
}) : i[e.pointerId || 0] = ct(e), Object.keys(i).length > 1 && a.zoomable && a.zoomOnTouch ? l = Or : l = It(e.target, et), !!
|
|
3699
|
+
e.changedTouches ? ie(e.changedTouches, function(h) {
|
|
3700
|
+
i[h.identifier] = ct(h);
|
|
3701
|
+
}) : i[e.pointerId || 0] = ct(e), Object.keys(i).length > 1 && a.zoomable && a.zoomOnTouch ? l = Or : l = It(e.target, et), !!Ts.test(l) && Ue(this.element, Ot, {
|
|
3701
3702
|
originalEvent: e,
|
|
3702
3703
|
action: l
|
|
3703
3704
|
}) !== !1 && (e.preventDefault(), this.action = l, this.cropping = !1, l === Tr && (this.cropping = !0, ae(this.dragBox, ft)));
|
|
@@ -3726,10 +3727,10 @@ var Qs = {
|
|
|
3726
3727
|
}));
|
|
3727
3728
|
}
|
|
3728
3729
|
}
|
|
3729
|
-
},
|
|
3730
|
+
}, nl = {
|
|
3730
3731
|
change: function(e) {
|
|
3731
|
-
var t = this.options, n = this.canvasData, a = this.containerData, i = this.cropBoxData, l = this.pointers,
|
|
3732
|
-
!m && e.shiftKey && (m =
|
|
3732
|
+
var t = this.options, n = this.canvasData, a = this.containerData, i = this.cropBoxData, l = this.pointers, h = this.action, m = t.aspectRatio, v = i.left, f = i.top, p = i.width, b = i.height, A = v + p, M = f + b, T = 0, I = 0, z = a.width, B = a.height, P = !0, ne;
|
|
3733
|
+
!m && e.shiftKey && (m = p && b ? p / b : 1), this.limited && (T = i.minLeft, I = i.minTop, z = T + Math.min(a.width, n.width, n.left + n.width), B = I + Math.min(a.height, n.height, n.top + n.height));
|
|
3733
3734
|
var F = l[Object.keys(l)[0]], D = {
|
|
3734
3735
|
x: F.endX - F.startX,
|
|
3735
3736
|
y: F.endY - F.startY
|
|
@@ -3739,80 +3740,80 @@ var Qs = {
|
|
|
3739
3740
|
A + D.x > z && (D.x = z - A);
|
|
3740
3741
|
break;
|
|
3741
3742
|
case Ae:
|
|
3742
|
-
|
|
3743
|
+
v + D.x < T && (D.x = T - v);
|
|
3743
3744
|
break;
|
|
3744
3745
|
case Ce:
|
|
3745
|
-
|
|
3746
|
+
f + D.y < I && (D.y = I - f);
|
|
3746
3747
|
break;
|
|
3747
3748
|
case ze:
|
|
3748
3749
|
M + D.y > B && (D.y = B - M);
|
|
3749
3750
|
break;
|
|
3750
3751
|
}
|
|
3751
3752
|
};
|
|
3752
|
-
switch (
|
|
3753
|
-
case
|
|
3754
|
-
|
|
3753
|
+
switch (h) {
|
|
3754
|
+
case Vt:
|
|
3755
|
+
v += D.x, f += D.y;
|
|
3755
3756
|
break;
|
|
3756
3757
|
case Te:
|
|
3757
|
-
if (D.x >= 0 && (A >= z || m && (
|
|
3758
|
+
if (D.x >= 0 && (A >= z || m && (f <= I || M >= B))) {
|
|
3758
3759
|
P = !1;
|
|
3759
3760
|
break;
|
|
3760
3761
|
}
|
|
3761
|
-
X(Te),
|
|
3762
|
+
X(Te), p += D.x, p < 0 && (h = Ae, p = -p, v -= p), m && (b = p / m, f += (i.height - b) / 2);
|
|
3762
3763
|
break;
|
|
3763
3764
|
case Ce:
|
|
3764
|
-
if (D.y <= 0 && (
|
|
3765
|
+
if (D.y <= 0 && (f <= I || m && (v <= T || A >= z))) {
|
|
3765
3766
|
P = !1;
|
|
3766
3767
|
break;
|
|
3767
3768
|
}
|
|
3768
|
-
X(Ce), b -= D.y,
|
|
3769
|
+
X(Ce), b -= D.y, f += D.y, b < 0 && (h = ze, b = -b, f -= b), m && (p = b * m, v += (i.width - p) / 2);
|
|
3769
3770
|
break;
|
|
3770
3771
|
case Ae:
|
|
3771
|
-
if (D.x <= 0 && (
|
|
3772
|
+
if (D.x <= 0 && (v <= T || m && (f <= I || M >= B))) {
|
|
3772
3773
|
P = !1;
|
|
3773
3774
|
break;
|
|
3774
3775
|
}
|
|
3775
|
-
X(Ae),
|
|
3776
|
+
X(Ae), p -= D.x, v += D.x, p < 0 && (h = Te, p = -p, v -= p), m && (b = p / m, f += (i.height - b) / 2);
|
|
3776
3777
|
break;
|
|
3777
3778
|
case ze:
|
|
3778
|
-
if (D.y >= 0 && (M >= B || m && (
|
|
3779
|
+
if (D.y >= 0 && (M >= B || m && (v <= T || A >= z))) {
|
|
3779
3780
|
P = !1;
|
|
3780
3781
|
break;
|
|
3781
3782
|
}
|
|
3782
|
-
X(ze), b += D.y, b < 0 && (
|
|
3783
|
+
X(ze), b += D.y, b < 0 && (h = Ce, b = -b, f -= b), m && (p = b * m, v += (i.width - p) / 2);
|
|
3783
3784
|
break;
|
|
3784
3785
|
case qe:
|
|
3785
3786
|
if (m) {
|
|
3786
|
-
if (D.y <= 0 && (
|
|
3787
|
+
if (D.y <= 0 && (f <= I || A >= z)) {
|
|
3787
3788
|
P = !1;
|
|
3788
3789
|
break;
|
|
3789
3790
|
}
|
|
3790
|
-
X(Ce), b -= D.y,
|
|
3791
|
+
X(Ce), b -= D.y, f += D.y, p = b * m;
|
|
3791
3792
|
} else
|
|
3792
|
-
X(Ce), X(Te), D.x >= 0 ? A < z ?
|
|
3793
|
-
|
|
3793
|
+
X(Ce), X(Te), D.x >= 0 ? A < z ? p += D.x : D.y <= 0 && f <= I && (P = !1) : p += D.x, D.y <= 0 ? f > I && (b -= D.y, f += D.y) : (b -= D.y, f += D.y);
|
|
3794
|
+
p < 0 && b < 0 ? (h = Ze, b = -b, p = -p, f -= b, v -= p) : p < 0 ? (h = Ge, p = -p, v -= p) : b < 0 && (h = Je, b = -b, f -= b);
|
|
3794
3795
|
break;
|
|
3795
3796
|
case Ge:
|
|
3796
3797
|
if (m) {
|
|
3797
|
-
if (D.y <= 0 && (
|
|
3798
|
+
if (D.y <= 0 && (f <= I || v <= T)) {
|
|
3798
3799
|
P = !1;
|
|
3799
3800
|
break;
|
|
3800
3801
|
}
|
|
3801
|
-
X(Ce), b -= D.y,
|
|
3802
|
+
X(Ce), b -= D.y, f += D.y, p = b * m, v += i.width - p;
|
|
3802
3803
|
} else
|
|
3803
|
-
X(Ce), X(Ae), D.x <= 0 ?
|
|
3804
|
-
|
|
3804
|
+
X(Ce), X(Ae), D.x <= 0 ? v > T ? (p -= D.x, v += D.x) : D.y <= 0 && f <= I && (P = !1) : (p -= D.x, v += D.x), D.y <= 0 ? f > I && (b -= D.y, f += D.y) : (b -= D.y, f += D.y);
|
|
3805
|
+
p < 0 && b < 0 ? (h = Je, b = -b, p = -p, f -= b, v -= p) : p < 0 ? (h = qe, p = -p, v -= p) : b < 0 && (h = Ze, b = -b, f -= b);
|
|
3805
3806
|
break;
|
|
3806
3807
|
case Ze:
|
|
3807
3808
|
if (m) {
|
|
3808
|
-
if (D.x <= 0 && (
|
|
3809
|
+
if (D.x <= 0 && (v <= T || M >= B)) {
|
|
3809
3810
|
P = !1;
|
|
3810
3811
|
break;
|
|
3811
3812
|
}
|
|
3812
|
-
X(Ae),
|
|
3813
|
+
X(Ae), p -= D.x, v += D.x, b = p / m;
|
|
3813
3814
|
} else
|
|
3814
|
-
X(ze), X(Ae), D.x <= 0 ?
|
|
3815
|
-
|
|
3815
|
+
X(ze), X(Ae), D.x <= 0 ? v > T ? (p -= D.x, v += D.x) : D.y >= 0 && M >= B && (P = !1) : (p -= D.x, v += D.x), D.y >= 0 ? M < B && (b += D.y) : b += D.y;
|
|
3816
|
+
p < 0 && b < 0 ? (h = qe, b = -b, p = -p, f -= b, v -= p) : p < 0 ? (h = Je, p = -p, v -= p) : b < 0 && (h = Ge, b = -b, f -= b);
|
|
3816
3817
|
break;
|
|
3817
3818
|
case Je:
|
|
3818
3819
|
if (m) {
|
|
@@ -3820,30 +3821,30 @@ var Qs = {
|
|
|
3820
3821
|
P = !1;
|
|
3821
3822
|
break;
|
|
3822
3823
|
}
|
|
3823
|
-
X(Te),
|
|
3824
|
+
X(Te), p += D.x, b = p / m;
|
|
3824
3825
|
} else
|
|
3825
|
-
X(ze), X(Te), D.x >= 0 ? A < z ?
|
|
3826
|
-
|
|
3826
|
+
X(ze), X(Te), D.x >= 0 ? A < z ? p += D.x : D.y >= 0 && M >= B && (P = !1) : p += D.x, D.y >= 0 ? M < B && (b += D.y) : b += D.y;
|
|
3827
|
+
p < 0 && b < 0 ? (h = Ge, b = -b, p = -p, f -= b, v -= p) : p < 0 ? (h = Ze, p = -p, v -= p) : b < 0 && (h = qe, b = -b, f -= b);
|
|
3827
3828
|
break;
|
|
3828
3829
|
case Ar:
|
|
3829
3830
|
this.move(D.x, D.y), P = !1;
|
|
3830
3831
|
break;
|
|
3831
3832
|
case Or:
|
|
3832
|
-
this.zoom(
|
|
3833
|
+
this.zoom(Ks(l), e), P = !1;
|
|
3833
3834
|
break;
|
|
3834
3835
|
case Tr:
|
|
3835
3836
|
if (!D.x || !D.y) {
|
|
3836
3837
|
P = !1;
|
|
3837
3838
|
break;
|
|
3838
3839
|
}
|
|
3839
|
-
ne = Br(this.cropper),
|
|
3840
|
+
ne = Br(this.cropper), v = F.startX - ne.left, f = F.startY - ne.top, p = i.minWidth, b = i.minHeight, D.x > 0 ? h = D.y > 0 ? Je : qe : D.x < 0 && (v -= p, h = D.y > 0 ? Ze : Ge), D.y < 0 && (f -= b), this.cropped || (we(this.cropBox, he), this.cropped = !0, this.limited && this.limitCropBox(!0, !0));
|
|
3840
3841
|
break;
|
|
3841
3842
|
}
|
|
3842
|
-
P && (i.width =
|
|
3843
|
+
P && (i.width = p, i.height = b, i.left = v, i.top = f, this.action = h, this.renderCropBox()), ie(l, function(q) {
|
|
3843
3844
|
q.startX = q.endX, q.startY = q.endY;
|
|
3844
3845
|
});
|
|
3845
3846
|
}
|
|
3846
|
-
},
|
|
3847
|
+
}, ol = {
|
|
3847
3848
|
crop: function() {
|
|
3848
3849
|
return this.ready && !this.cropped && !this.disabled && (this.cropped = !0, this.limitCropBox(!0, !0), this.options.modal && ae(this.dragBox, ft), we(this.cropBox, he), this.setCropBoxData(this.initialCropBoxData)), this;
|
|
3849
3850
|
},
|
|
@@ -3865,10 +3866,10 @@ var Qs = {
|
|
|
3865
3866
|
}))) : (this.isImg && (this.replaced = !0), this.options.data = null, this.uncreate(), this.load(e))), this;
|
|
3866
3867
|
},
|
|
3867
3868
|
enable: function() {
|
|
3868
|
-
return this.ready && this.disabled && (this.disabled = !1, we(this.cropper,
|
|
3869
|
+
return this.ready && this.disabled && (this.disabled = !1, we(this.cropper, hr)), this;
|
|
3869
3870
|
},
|
|
3870
3871
|
disable: function() {
|
|
3871
|
-
return this.ready && !this.disabled && (this.disabled = !0, ae(this.cropper,
|
|
3872
|
+
return this.ready && !this.disabled && (this.disabled = !0, ae(this.cropper, hr)), this;
|
|
3872
3873
|
},
|
|
3873
3874
|
destroy: function() {
|
|
3874
3875
|
var e = this.element;
|
|
@@ -3887,9 +3888,9 @@ var Qs = {
|
|
|
3887
3888
|
return e = Number(e), e < 0 ? e = 1 / (1 - e) : e = 1 + e, this.zoomTo(n.width * e / n.naturalWidth, null, t);
|
|
3888
3889
|
},
|
|
3889
3890
|
zoomTo: function(e, t, n) {
|
|
3890
|
-
var a = this.options, i = this.canvasData, l = i.width,
|
|
3891
|
+
var a = this.options, i = this.canvasData, l = i.width, h = i.height, m = i.naturalWidth, v = i.naturalHeight;
|
|
3891
3892
|
if (e = Number(e), e >= 0 && this.ready && !this.disabled && a.zoomable) {
|
|
3892
|
-
var
|
|
3893
|
+
var f = m * e, p = v * e;
|
|
3893
3894
|
if (Ue(this.element, Pt, {
|
|
3894
3895
|
ratio: e,
|
|
3895
3896
|
oldRatio: l / m,
|
|
@@ -3897,14 +3898,14 @@ var Qs = {
|
|
|
3897
3898
|
}) === !1)
|
|
3898
3899
|
return this;
|
|
3899
3900
|
if (n) {
|
|
3900
|
-
var b = this.pointers, A = Br(this.cropper), M = b && Object.keys(b).length ?
|
|
3901
|
+
var b = this.pointers, A = Br(this.cropper), M = b && Object.keys(b).length ? Ys(b) : {
|
|
3901
3902
|
pageX: n.pageX,
|
|
3902
3903
|
pageY: n.pageY
|
|
3903
3904
|
};
|
|
3904
|
-
i.left -= (
|
|
3905
|
+
i.left -= (f - l) * ((M.pageX - A.left - i.left) / l), i.top -= (p - h) * ((M.pageY - A.top - i.top) / h);
|
|
3905
3906
|
} else
|
|
3906
|
-
Be(t) && W(t.x) && W(t.y) ? (i.left -= (
|
|
3907
|
-
i.width =
|
|
3907
|
+
Be(t) && W(t.x) && W(t.y) ? (i.left -= (f - l) * ((t.x - i.left) / l), i.top -= (p - h) * ((t.y - i.top) / h)) : (i.left -= (f - l) / 2, i.top -= (p - h) / 2);
|
|
3908
|
+
i.width = f, i.height = p, this.renderCanvas(!0);
|
|
3908
3909
|
}
|
|
3909
3910
|
return this;
|
|
3910
3911
|
},
|
|
@@ -3935,12 +3936,12 @@ var Qs = {
|
|
|
3935
3936
|
width: i.width,
|
|
3936
3937
|
height: i.height
|
|
3937
3938
|
};
|
|
3938
|
-
var
|
|
3939
|
-
if (ie(l, function(
|
|
3940
|
-
l[
|
|
3939
|
+
var h = n.width / n.naturalWidth;
|
|
3940
|
+
if (ie(l, function(f, p) {
|
|
3941
|
+
l[p] = f / h;
|
|
3941
3942
|
}), e) {
|
|
3942
|
-
var m = Math.round(l.y + l.height),
|
|
3943
|
-
l.x = Math.round(l.x), l.y = Math.round(l.y), l.width =
|
|
3943
|
+
var m = Math.round(l.y + l.height), v = Math.round(l.x + l.width);
|
|
3944
|
+
l.x = Math.round(l.x), l.y = Math.round(l.y), l.width = v - l.x, l.height = m - l.y;
|
|
3944
3945
|
}
|
|
3945
3946
|
} else
|
|
3946
3947
|
l = {
|
|
@@ -3956,8 +3957,8 @@ var Qs = {
|
|
|
3956
3957
|
if (this.ready && !this.disabled && Be(e)) {
|
|
3957
3958
|
var l = !1;
|
|
3958
3959
|
t.rotatable && W(e.rotate) && e.rotate !== n.rotate && (n.rotate = e.rotate, l = !0), t.scalable && (W(e.scaleX) && e.scaleX !== n.scaleX && (n.scaleX = e.scaleX, l = !0), W(e.scaleY) && e.scaleY !== n.scaleY && (n.scaleY = e.scaleY, l = !0)), l && this.renderCanvas(!0, !0);
|
|
3959
|
-
var
|
|
3960
|
-
W(e.x) && (i.left = e.x *
|
|
3960
|
+
var h = n.width / n.naturalWidth;
|
|
3961
|
+
W(e.x) && (i.left = e.x * h + a.left), W(e.y) && (i.top = e.y * h + a.top), W(e.width) && (i.width = e.width * h), W(e.height) && (i.height = e.height * h), this.setCropBoxData(i);
|
|
3961
3962
|
}
|
|
3962
3963
|
return this;
|
|
3963
3964
|
},
|
|
@@ -3994,39 +3995,39 @@ var Qs = {
|
|
|
3994
3995
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
3995
3996
|
if (!this.ready || !window.HTMLCanvasElement)
|
|
3996
3997
|
return null;
|
|
3997
|
-
var t = this.canvasData, n =
|
|
3998
|
+
var t = this.canvasData, n = Xs(this.image, this.imageData, t, e);
|
|
3998
3999
|
if (!this.cropped)
|
|
3999
4000
|
return n;
|
|
4000
|
-
var a = this.getData(), i = a.x, l = a.y,
|
|
4001
|
-
|
|
4002
|
-
var
|
|
4003
|
-
aspectRatio:
|
|
4001
|
+
var a = this.getData(), i = a.x, l = a.y, h = a.width, m = a.height, v = n.width / Math.floor(t.naturalWidth);
|
|
4002
|
+
v !== 1 && (i *= v, l *= v, h *= v, m *= v);
|
|
4003
|
+
var f = h / m, p = Ee({
|
|
4004
|
+
aspectRatio: f,
|
|
4004
4005
|
width: e.maxWidth || 1 / 0,
|
|
4005
4006
|
height: e.maxHeight || 1 / 0
|
|
4006
4007
|
}), b = Ee({
|
|
4007
|
-
aspectRatio:
|
|
4008
|
+
aspectRatio: f,
|
|
4008
4009
|
width: e.minWidth || 0,
|
|
4009
4010
|
height: e.minHeight || 0
|
|
4010
4011
|
}, "cover"), A = Ee({
|
|
4011
|
-
aspectRatio:
|
|
4012
|
-
width: e.width || (
|
|
4013
|
-
height: e.height || (
|
|
4012
|
+
aspectRatio: f,
|
|
4013
|
+
width: e.width || (v !== 1 ? n.width : h),
|
|
4014
|
+
height: e.height || (v !== 1 ? n.height : m)
|
|
4014
4015
|
}), M = A.width, T = A.height;
|
|
4015
|
-
M = Math.min(
|
|
4016
|
-
var
|
|
4017
|
-
|
|
4016
|
+
M = Math.min(p.width, Math.max(b.width, M)), T = Math.min(p.height, Math.max(b.height, T));
|
|
4017
|
+
var I = document.createElement("canvas"), z = I.getContext("2d");
|
|
4018
|
+
I.width = He(M), I.height = He(T), z.fillStyle = e.fillColor || "transparent", z.fillRect(0, 0, M, T);
|
|
4018
4019
|
var B = e.imageSmoothingEnabled, P = B === void 0 ? !0 : B, ne = e.imageSmoothingQuality;
|
|
4019
4020
|
z.imageSmoothingEnabled = P, ne && (z.imageSmoothingQuality = ne);
|
|
4020
|
-
var F = n.width, D = n.height, X = i, q = l, le, fe,
|
|
4021
|
-
X <= -
|
|
4021
|
+
var F = n.width, D = n.height, X = i, q = l, le, fe, L, U, N, Y;
|
|
4022
|
+
X <= -h || X > F ? (X = 0, le = 0, L = 0, N = 0) : X <= 0 ? (L = -X, X = 0, le = Math.min(F, h + X), N = le) : X <= F && (L = 0, le = Math.min(h, F - X), N = le), le <= 0 || q <= -m || q > D ? (q = 0, fe = 0, U = 0, Y = 0) : q <= 0 ? (U = -q, q = 0, fe = Math.min(D, m + q), Y = fe) : q <= D && (U = 0, fe = Math.min(m, D - q), Y = fe);
|
|
4022
4023
|
var H = [X, q, le, fe];
|
|
4023
|
-
if (
|
|
4024
|
-
var te = M /
|
|
4025
|
-
H.push(
|
|
4024
|
+
if (N > 0 && Y > 0) {
|
|
4025
|
+
var te = M / h;
|
|
4026
|
+
H.push(L * te, U * te, N * te, Y * te);
|
|
4026
4027
|
}
|
|
4027
4028
|
return z.drawImage.apply(z, [n].concat(Er(H.map(function(G) {
|
|
4028
4029
|
return Math.floor(He(G));
|
|
4029
|
-
})))),
|
|
4030
|
+
})))), I;
|
|
4030
4031
|
},
|
|
4031
4032
|
setAspectRatio: function(e) {
|
|
4032
4033
|
var t = this.options;
|
|
@@ -4035,19 +4036,19 @@ var Qs = {
|
|
|
4035
4036
|
setDragMode: function(e) {
|
|
4036
4037
|
var t = this.options, n = this.dragBox, a = this.face;
|
|
4037
4038
|
if (this.ready && !this.disabled) {
|
|
4038
|
-
var i = e ===
|
|
4039
|
+
var i = e === zt, l = t.movable && e === Pr;
|
|
4039
4040
|
e = i || l ? e : Ir, t.dragMode = e, tt(n, et, e), Re(n, Mt, i), Re(n, $t, l), t.cropBoxMovable || (tt(a, et, e), Re(a, Mt, i), Re(a, $t, l));
|
|
4040
4041
|
}
|
|
4041
4042
|
return this;
|
|
4042
4043
|
}
|
|
4043
|
-
},
|
|
4044
|
+
}, al = _e.Cropper, Hr = /* @__PURE__ */ function() {
|
|
4044
4045
|
function o(e) {
|
|
4045
4046
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
4046
|
-
if (
|
|
4047
|
+
if (ys(this, o), !e || !Ps.test(e.tagName))
|
|
4047
4048
|
throw new Error("The first argument is required and must be an <img> or <canvas> element.");
|
|
4048
|
-
this.element = e, this.options = Z({},
|
|
4049
|
+
this.element = e, this.options = Z({}, _r, Be(t) && t), this.cropped = !1, this.disabled = !1, this.pointers = {}, this.ready = !1, this.reloading = !1, this.replaced = !1, this.sized = !1, this.sizing = !1, this.init();
|
|
4049
4050
|
}
|
|
4050
|
-
return
|
|
4051
|
+
return ws(o, [{
|
|
4051
4052
|
key: "init",
|
|
4052
4053
|
value: function() {
|
|
4053
4054
|
var t = this.element, n = t.tagName.toLowerCase(), a;
|
|
@@ -4072,59 +4073,59 @@ var Qs = {
|
|
|
4072
4073
|
this.clone();
|
|
4073
4074
|
return;
|
|
4074
4075
|
}
|
|
4075
|
-
if (
|
|
4076
|
-
|
|
4076
|
+
if (As.test(t)) {
|
|
4077
|
+
Os.test(t) ? this.read(Gs(t)) : this.clone();
|
|
4077
4078
|
return;
|
|
4078
4079
|
}
|
|
4079
|
-
var l = new XMLHttpRequest(),
|
|
4080
|
-
this.reloading = !0, this.xhr = l, l.onabort =
|
|
4081
|
-
l.getResponseHeader("content-type") !==
|
|
4080
|
+
var l = new XMLHttpRequest(), h = this.clone.bind(this);
|
|
4081
|
+
this.reloading = !0, this.xhr = l, l.onabort = h, l.onerror = h, l.ontimeout = h, l.onprogress = function() {
|
|
4082
|
+
l.getResponseHeader("content-type") !== xr && l.abort();
|
|
4082
4083
|
}, l.onload = function() {
|
|
4083
4084
|
n.read(l.response);
|
|
4084
4085
|
}, l.onloadend = function() {
|
|
4085
4086
|
n.reloading = !1, n.xhr = null;
|
|
4086
|
-
}, i.checkCrossOrigin &&
|
|
4087
|
+
}, i.checkCrossOrigin && Sr(t) && a.crossOrigin && (t = Dr(t)), l.open("GET", t, !0), l.responseType = "arraybuffer", l.withCredentials = a.crossOrigin === "use-credentials", l.send();
|
|
4087
4088
|
}
|
|
4088
4089
|
}
|
|
4089
4090
|
}, {
|
|
4090
4091
|
key: "read",
|
|
4091
4092
|
value: function(t) {
|
|
4092
|
-
var n = this.options, a = this.imageData, i =
|
|
4093
|
+
var n = this.options, a = this.imageData, i = Zs(t), l = 0, h = 1, m = 1;
|
|
4093
4094
|
if (i > 1) {
|
|
4094
|
-
this.url =
|
|
4095
|
-
var
|
|
4096
|
-
l =
|
|
4095
|
+
this.url = Js(t, xr);
|
|
4096
|
+
var v = Qs(i);
|
|
4097
|
+
l = v.rotate, h = v.scaleX, m = v.scaleY;
|
|
4097
4098
|
}
|
|
4098
|
-
n.rotatable && (a.rotate = l), n.scalable && (a.scaleX =
|
|
4099
|
+
n.rotatable && (a.rotate = l), n.scalable && (a.scaleX = h, a.scaleY = m), this.clone();
|
|
4099
4100
|
}
|
|
4100
4101
|
}, {
|
|
4101
4102
|
key: "clone",
|
|
4102
4103
|
value: function() {
|
|
4103
4104
|
var t = this.element, n = this.url, a = t.crossOrigin, i = n;
|
|
4104
|
-
this.options.checkCrossOrigin &&
|
|
4105
|
+
this.options.checkCrossOrigin && Sr(n) && (a || (a = "anonymous"), i = Dr(n)), this.crossOrigin = a, this.crossOriginUrl = i;
|
|
4105
4106
|
var l = document.createElement("img");
|
|
4106
|
-
a && (l.crossOrigin = a), l.src = i || n, l.alt = t.alt || "The image to crop", this.image = l, l.onload = this.start.bind(this), l.onerror = this.stop.bind(this), ae(l,
|
|
4107
|
+
a && (l.crossOrigin = a), l.src = i || n, l.alt = t.alt || "The image to crop", this.image = l, l.onload = this.start.bind(this), l.onerror = this.stop.bind(this), ae(l, fr), t.parentNode.insertBefore(l, t.nextSibling);
|
|
4107
4108
|
}
|
|
4108
4109
|
}, {
|
|
4109
4110
|
key: "start",
|
|
4110
4111
|
value: function() {
|
|
4111
4112
|
var t = this, n = this.image;
|
|
4112
4113
|
n.onload = null, n.onerror = null, this.sizing = !0;
|
|
4113
|
-
var a = _e.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(_e.navigator.userAgent), i = function(
|
|
4114
|
+
var a = _e.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(_e.navigator.userAgent), i = function(v, f) {
|
|
4114
4115
|
Z(t.imageData, {
|
|
4115
|
-
naturalWidth:
|
|
4116
|
-
naturalHeight:
|
|
4117
|
-
aspectRatio:
|
|
4116
|
+
naturalWidth: v,
|
|
4117
|
+
naturalHeight: f,
|
|
4118
|
+
aspectRatio: v / f
|
|
4118
4119
|
}), t.initialImageData = Z({}, t.imageData), t.sizing = !1, t.sized = !0, t.build();
|
|
4119
4120
|
};
|
|
4120
4121
|
if (n.naturalWidth && !a) {
|
|
4121
4122
|
i(n.naturalWidth, n.naturalHeight);
|
|
4122
4123
|
return;
|
|
4123
4124
|
}
|
|
4124
|
-
var l = document.createElement("img"),
|
|
4125
|
+
var l = document.createElement("img"), h = document.body || document.documentElement;
|
|
4125
4126
|
this.sizingImage = l, l.onload = function() {
|
|
4126
|
-
i(l.width, l.height), a ||
|
|
4127
|
-
}, l.src = n.src, a || (l.style.cssText = "left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",
|
|
4127
|
+
i(l.width, l.height), a || h.removeChild(l);
|
|
4128
|
+
}, l.src = n.src, a || (l.style.cssText = "left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;", h.appendChild(l));
|
|
4128
4129
|
}
|
|
4129
4130
|
}, {
|
|
4130
4131
|
key: "stop",
|
|
@@ -4137,11 +4138,11 @@ var Qs = {
|
|
|
4137
4138
|
value: function() {
|
|
4138
4139
|
if (!(!this.sized || this.ready)) {
|
|
4139
4140
|
var t = this.element, n = this.options, a = this.image, i = t.parentNode, l = document.createElement("div");
|
|
4140
|
-
l.innerHTML =
|
|
4141
|
-
var
|
|
4142
|
-
this.container = i, this.cropper =
|
|
4141
|
+
l.innerHTML = Is;
|
|
4142
|
+
var h = l.querySelector(".".concat(J, "-container")), m = h.querySelector(".".concat(J, "-canvas")), v = h.querySelector(".".concat(J, "-drag-box")), f = h.querySelector(".".concat(J, "-crop-box")), p = f.querySelector(".".concat(J, "-face"));
|
|
4143
|
+
this.container = i, this.cropper = h, this.canvas = m, this.dragBox = v, this.cropBox = f, this.viewBox = h.querySelector(".".concat(J, "-view-box")), this.face = p, m.appendChild(a), ae(t, he), i.insertBefore(h, t.nextSibling), this.isImg || we(a, fr), this.initPreview(), this.bind(), n.initialAspectRatio = Math.max(0, n.initialAspectRatio) || NaN, n.aspectRatio = Math.max(0, n.aspectRatio) || NaN, n.viewMode = Math.max(0, Math.min(3, Math.round(n.viewMode))) || 0, ae(f, he), n.guides || ae(f.getElementsByClassName("".concat(J, "-dashed")), he), n.center || ae(f.getElementsByClassName("".concat(J, "-center")), he), n.background && ae(h, "".concat(J, "-bg")), n.highlight || ae(p, Cs), n.cropBoxMovable && (ae(p, $t), tt(p, et, Vt)), n.cropBoxResizable || (ae(f.getElementsByClassName("".concat(J, "-line")), he), ae(f.getElementsByClassName("".concat(J, "-point")), he)), this.render(), this.ready = !0, this.setDragMode(n.dragMode), n.autoCrop && this.crop(), this.setData(n.data), de(n.ready) && pe(t, br, n.ready, {
|
|
4143
4144
|
once: !0
|
|
4144
|
-
}), Ue(t,
|
|
4145
|
+
}), Ue(t, br);
|
|
4145
4146
|
}
|
|
4146
4147
|
}
|
|
4147
4148
|
}, {
|
|
@@ -4157,80 +4158,80 @@ var Qs = {
|
|
|
4157
4158
|
}], [{
|
|
4158
4159
|
key: "noConflict",
|
|
4159
4160
|
value: function() {
|
|
4160
|
-
return window.Cropper =
|
|
4161
|
+
return window.Cropper = al, o;
|
|
4161
4162
|
}
|
|
4162
4163
|
}, {
|
|
4163
4164
|
key: "setDefaults",
|
|
4164
4165
|
value: function(t) {
|
|
4165
|
-
Z(
|
|
4166
|
+
Z(_r, Be(t) && t);
|
|
4166
4167
|
}
|
|
4167
4168
|
}]), o;
|
|
4168
4169
|
}();
|
|
4169
|
-
Z(Hr.prototype,
|
|
4170
|
-
const
|
|
4170
|
+
Z(Hr.prototype, el, tl, rl, il, nl, ol);
|
|
4171
|
+
const sl = { class: "flex" }, ll = {
|
|
4171
4172
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
4172
4173
|
id: "modal-title"
|
|
4173
|
-
},
|
|
4174
|
+
}, cl = { class: "ml-auto mb-2" }, ul = { class: "w-full flex justify-center" }, dl = ["src"], hl = {
|
|
4174
4175
|
__name: "Image",
|
|
4175
4176
|
props: {
|
|
4176
4177
|
selection: Object
|
|
4177
4178
|
},
|
|
4178
4179
|
emits: ["load"],
|
|
4179
4180
|
setup(o, { emit: e }) {
|
|
4180
|
-
const t = o, { t: n } = R("i18n"), a =
|
|
4181
|
-
|
|
4182
|
-
crop(
|
|
4181
|
+
const t = o, { t: n } = R("i18n"), { apiUrl: a } = ke(), i = V(null), l = V(null), h = V(!1), m = () => {
|
|
4182
|
+
h.value = !h.value, h.value ? l.value = new Hr(i.value, {
|
|
4183
|
+
crop(f) {
|
|
4183
4184
|
}
|
|
4184
|
-
}) :
|
|
4185
|
-
},
|
|
4186
|
-
|
|
4185
|
+
}) : l.value.destroy();
|
|
4186
|
+
}, v = () => {
|
|
4187
|
+
l.value.getCroppedCanvas({
|
|
4187
4188
|
width: 795,
|
|
4188
4189
|
height: 341
|
|
4189
4190
|
}).toBlob(
|
|
4190
|
-
(
|
|
4191
|
-
ht(
|
|
4191
|
+
(f) => {
|
|
4192
|
+
ht(a.value, {
|
|
4192
4193
|
method: "POST",
|
|
4193
|
-
params: { q: "upload", adapter: t.selection.adapter, path: t.selection.item.path, file:
|
|
4194
|
+
params: { q: "upload", adapter: t.selection.adapter, path: t.selection.item.path, file: f },
|
|
4194
4195
|
name: t.selection.item.basename,
|
|
4195
4196
|
json: !1
|
|
4196
|
-
}).then((
|
|
4197
|
-
|
|
4198
|
-
}).catch((
|
|
4197
|
+
}).then((p) => {
|
|
4198
|
+
i.value.src = Dt(t.selection.adapter, t.selection.item.path), m(), e("load");
|
|
4199
|
+
}).catch((p) => console.log(p.statusText));
|
|
4199
4200
|
}
|
|
4200
4201
|
);
|
|
4201
4202
|
};
|
|
4202
4203
|
return onMounted(() => {
|
|
4203
4204
|
e("load");
|
|
4204
|
-
}), (
|
|
4205
|
-
d("div",
|
|
4206
|
-
d("h3",
|
|
4207
|
-
d("div",
|
|
4208
|
-
|
|
4205
|
+
}), (f, p) => (x(), C(se, null, [
|
|
4206
|
+
d("div", sl, [
|
|
4207
|
+
d("h3", ll, $(o.selection.item.basename), 1),
|
|
4208
|
+
d("div", cl, [
|
|
4209
|
+
h.value ? (x(), C("button", {
|
|
4209
4210
|
key: 0,
|
|
4210
|
-
onClick:
|
|
4211
|
+
onClick: v,
|
|
4211
4212
|
class: "ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"
|
|
4212
|
-
},
|
|
4213
|
+
}, $(_(n)("Crop")), 1)) : oe("", !0),
|
|
4213
4214
|
d("button", {
|
|
4214
4215
|
class: "ml-1 px-2 py-1 text-blue-500",
|
|
4215
|
-
onClick:
|
|
4216
|
-
},
|
|
4216
|
+
onClick: p[0] || (p[0] = (b) => m())
|
|
4217
|
+
}, $(h.value ? _(n)("Cancel") : _(n)("Edit")), 1)
|
|
4217
4218
|
])
|
|
4218
4219
|
]),
|
|
4219
|
-
d("div",
|
|
4220
|
+
d("div", ul, [
|
|
4220
4221
|
d("img", {
|
|
4221
4222
|
ref_key: "image",
|
|
4222
|
-
ref:
|
|
4223
|
+
ref: i,
|
|
4223
4224
|
class: "max-w-[60vh] max-h-[60vh]",
|
|
4224
4225
|
src: _(Dt)(t.selection.adapter, t.selection.item.path),
|
|
4225
4226
|
alt: ""
|
|
4226
|
-
}, null, 8,
|
|
4227
|
+
}, null, 8, dl)
|
|
4227
4228
|
])
|
|
4228
4229
|
], 64));
|
|
4229
4230
|
}
|
|
4230
|
-
},
|
|
4231
|
+
}, fl = {
|
|
4231
4232
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
4232
4233
|
id: "modal-title"
|
|
4233
|
-
},
|
|
4234
|
+
}, ml = /* @__PURE__ */ d("div", null, " Default view.. ", -1), pl = {
|
|
4234
4235
|
__name: "Default",
|
|
4235
4236
|
props: {
|
|
4236
4237
|
selection: Object
|
|
@@ -4240,84 +4241,84 @@ const al = { class: "flex" }, sl = {
|
|
|
4240
4241
|
return xe(() => {
|
|
4241
4242
|
e("load");
|
|
4242
4243
|
}), (t, n) => (x(), C(se, null, [
|
|
4243
|
-
d("h3",
|
|
4244
|
-
|
|
4244
|
+
d("h3", fl, $(o.selection.item.basename), 1),
|
|
4245
|
+
ml
|
|
4245
4246
|
], 64));
|
|
4246
4247
|
}
|
|
4247
|
-
},
|
|
4248
|
+
}, gl = {
|
|
4248
4249
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
4249
4250
|
id: "modal-title"
|
|
4250
|
-
},
|
|
4251
|
+
}, vl = {
|
|
4251
4252
|
class: "w-full",
|
|
4252
4253
|
preload: "",
|
|
4253
4254
|
controls: ""
|
|
4254
|
-
},
|
|
4255
|
+
}, bl = ["src"], yl = /* @__PURE__ */ Me(" Your browser does not support the video tag. "), wl = {
|
|
4255
4256
|
__name: "Video",
|
|
4256
4257
|
props: {
|
|
4257
4258
|
selection: Object
|
|
4258
4259
|
},
|
|
4259
4260
|
emits: ["load"],
|
|
4260
4261
|
setup(o, { emit: e }) {
|
|
4261
|
-
const t = o, { apiUrl: n } =
|
|
4262
|
+
const t = o, { apiUrl: n } = ke(), a = () => n.value + "?" + Ie({ q: "preview", adapter: t.selection.adapter, path: t.selection.item.path });
|
|
4262
4263
|
return xe(() => {
|
|
4263
4264
|
e("load");
|
|
4264
4265
|
}), (i, l) => (x(), C(se, null, [
|
|
4265
|
-
d("h3",
|
|
4266
|
+
d("h3", gl, $(o.selection.item.basename), 1),
|
|
4266
4267
|
d("div", null, [
|
|
4267
|
-
d("video",
|
|
4268
|
+
d("video", vl, [
|
|
4268
4269
|
d("source", {
|
|
4269
4270
|
src: a(),
|
|
4270
4271
|
type: "video/mp4"
|
|
4271
|
-
}, null, 8,
|
|
4272
|
-
|
|
4272
|
+
}, null, 8, bl),
|
|
4273
|
+
yl
|
|
4273
4274
|
])
|
|
4274
4275
|
])
|
|
4275
4276
|
], 64));
|
|
4276
4277
|
}
|
|
4277
|
-
},
|
|
4278
|
+
}, xl = {
|
|
4278
4279
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
4279
4280
|
id: "modal-title"
|
|
4280
|
-
},
|
|
4281
|
+
}, _l = {
|
|
4281
4282
|
class: "w-full",
|
|
4282
4283
|
controls: ""
|
|
4283
|
-
},
|
|
4284
|
+
}, kl = ["src"], Sl = /* @__PURE__ */ Me(" Your browser does not support the audio element. "), Dl = {
|
|
4284
4285
|
__name: "Audio",
|
|
4285
4286
|
props: {
|
|
4286
4287
|
selection: Object
|
|
4287
4288
|
},
|
|
4288
4289
|
emits: ["load"],
|
|
4289
4290
|
setup(o, { emit: e }) {
|
|
4290
|
-
const t = o, { apiUrl: n } =
|
|
4291
|
+
const t = o, { apiUrl: n } = ke(), a = () => n.value + "?" + Ie({ q: "preview", adapter: t.selection.adapter, path: t.selection.item.path });
|
|
4291
4292
|
return xe(() => {
|
|
4292
4293
|
e("load");
|
|
4293
4294
|
}), (i, l) => (x(), C(se, null, [
|
|
4294
|
-
d("h3",
|
|
4295
|
+
d("h3", xl, $(o.selection.item.basename), 1),
|
|
4295
4296
|
d("div", null, [
|
|
4296
|
-
d("audio",
|
|
4297
|
+
d("audio", _l, [
|
|
4297
4298
|
d("source", {
|
|
4298
4299
|
src: a(),
|
|
4299
4300
|
type: "audio/mpeg"
|
|
4300
|
-
}, null, 8,
|
|
4301
|
-
|
|
4301
|
+
}, null, 8, kl),
|
|
4302
|
+
Sl
|
|
4302
4303
|
])
|
|
4303
4304
|
])
|
|
4304
4305
|
], 64));
|
|
4305
4306
|
}
|
|
4306
|
-
},
|
|
4307
|
+
}, Cl = {
|
|
4307
4308
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
4308
4309
|
id: "modal-title"
|
|
4309
|
-
},
|
|
4310
|
+
}, Ml = ["data"], $l = ["src"], El = {
|
|
4310
4311
|
__name: "Pdf",
|
|
4311
4312
|
props: {
|
|
4312
4313
|
selection: Object
|
|
4313
4314
|
},
|
|
4314
4315
|
emits: ["load"],
|
|
4315
4316
|
setup(o, { emit: e }) {
|
|
4316
|
-
const t = o, { apiUrl: n } =
|
|
4317
|
+
const t = o, { apiUrl: n } = ke(), a = () => n.value + "?" + Ie({ q: "preview", adapter: t.selection.adapter, path: t.selection.item.path });
|
|
4317
4318
|
return xe(() => {
|
|
4318
4319
|
e("load");
|
|
4319
4320
|
}), (i, l) => (x(), C(se, null, [
|
|
4320
|
-
d("h3",
|
|
4321
|
+
d("h3", Cl, $(o.selection.item.basename), 1),
|
|
4321
4322
|
d("div", null, [
|
|
4322
4323
|
d("object", {
|
|
4323
4324
|
class: "h-[60vh]",
|
|
@@ -4337,15 +4338,15 @@ const al = { class: "flex" }, sl = {
|
|
|
4337
4338
|
<a href="https://example.com/test.pdf">Download the PDF</a>
|
|
4338
4339
|
.
|
|
4339
4340
|
</p>
|
|
4340
|
-
`, 8,
|
|
4341
|
-
], 8,
|
|
4341
|
+
`, 8, $l)
|
|
4342
|
+
], 8, Ml)
|
|
4342
4343
|
])
|
|
4343
4344
|
], 64));
|
|
4344
4345
|
}
|
|
4345
|
-
},
|
|
4346
|
+
}, Tl = { class: "sm:flex sm:items-start" }, Al = { class: "mt-3 text-center sm:mt-0 sm:text-left w-full" }, Ol = { class: "text-gray-700 dark:text-gray-200 text-sm" }, Pl = {
|
|
4346
4347
|
key: 0,
|
|
4347
4348
|
class: "flex leading-5"
|
|
4348
|
-
},
|
|
4349
|
+
}, Il = /* @__PURE__ */ d("svg", {
|
|
4349
4350
|
class: "animate-spin -ml-1 mr-3 h-5 w-5 text-white",
|
|
4350
4351
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4351
4352
|
fill: "none",
|
|
@@ -4364,69 +4365,69 @@ const al = { class: "flex" }, sl = {
|
|
|
4364
4365
|
fill: "currentColor",
|
|
4365
4366
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
4366
4367
|
})
|
|
4367
|
-
], -1),
|
|
4368
|
+
], -1), Nl = {
|
|
4368
4369
|
name: "VFModalPreview"
|
|
4369
|
-
},
|
|
4370
|
+
}, Ll = /* @__PURE__ */ Object.assign(Nl, {
|
|
4370
4371
|
props: {
|
|
4371
4372
|
selection: Object
|
|
4372
4373
|
},
|
|
4373
4374
|
setup(o) {
|
|
4374
|
-
const e = o, { apiUrl: t } =
|
|
4375
|
-
var
|
|
4376
|
-
return ((
|
|
4375
|
+
const e = o, { apiUrl: t } = ke(), n = R("emitter"), { t: a } = R("i18n"), i = V(!1), l = (v) => i.value = v, h = (v) => {
|
|
4376
|
+
var f;
|
|
4377
|
+
return ((f = e.selection.item.mime_type) != null ? f : "").startsWith(v);
|
|
4377
4378
|
}, m = () => {
|
|
4378
|
-
const
|
|
4379
|
-
n.emit("vf-download",
|
|
4379
|
+
const v = t.value + "?" + Ie({ q: "download", adapter: e.selection.adapter, path: e.selection.item.path });
|
|
4380
|
+
n.emit("vf-download", v);
|
|
4380
4381
|
};
|
|
4381
|
-
return (
|
|
4382
|
+
return (v, f) => (x(), ce(Se, null, {
|
|
4382
4383
|
buttons: ee(() => [
|
|
4383
4384
|
d("button", {
|
|
4384
4385
|
type: "button",
|
|
4385
|
-
onClick:
|
|
4386
|
+
onClick: f[6] || (f[6] = (p) => _(n).emit("vf-modal-close")),
|
|
4386
4387
|
class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
|
4387
|
-
},
|
|
4388
|
+
}, $(_(a)("Close")), 1),
|
|
4388
4389
|
d("button", {
|
|
4389
4390
|
type: "button",
|
|
4390
|
-
onClick:
|
|
4391
|
+
onClick: f[7] || (f[7] = (p) => m()),
|
|
4391
4392
|
class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
|
4392
|
-
},
|
|
4393
|
+
}, $(_(a)("Download")), 1)
|
|
4393
4394
|
]),
|
|
4394
4395
|
default: ee(() => [
|
|
4395
|
-
d("div",
|
|
4396
|
-
d("div",
|
|
4396
|
+
d("div", Tl, [
|
|
4397
|
+
d("div", Al, [
|
|
4397
4398
|
d("div", null, [
|
|
4398
|
-
|
|
4399
|
+
h("text") ? (x(), ce(bs, {
|
|
4399
4400
|
key: 0,
|
|
4400
4401
|
selection: o.selection,
|
|
4401
|
-
onLoad:
|
|
4402
|
-
}, null, 8, ["selection"])) :
|
|
4402
|
+
onLoad: f[0] || (f[0] = (p) => l(!0))
|
|
4403
|
+
}, null, 8, ["selection"])) : h("image") ? (x(), ce(hl, {
|
|
4403
4404
|
key: 1,
|
|
4404
4405
|
selection: o.selection,
|
|
4405
|
-
onLoad:
|
|
4406
|
-
}, null, 8, ["selection"])) :
|
|
4406
|
+
onLoad: f[1] || (f[1] = (p) => l(!0))
|
|
4407
|
+
}, null, 8, ["selection"])) : h("video") ? (x(), ce(wl, {
|
|
4407
4408
|
key: 2,
|
|
4408
4409
|
selection: o.selection,
|
|
4409
|
-
onLoad:
|
|
4410
|
-
}, null, 8, ["selection"])) :
|
|
4410
|
+
onLoad: f[2] || (f[2] = (p) => l(!0))
|
|
4411
|
+
}, null, 8, ["selection"])) : h("audio") ? (x(), ce(Dl, {
|
|
4411
4412
|
key: 3,
|
|
4412
4413
|
selection: o.selection,
|
|
4413
|
-
onLoad:
|
|
4414
|
-
}, null, 8, ["selection"])) :
|
|
4414
|
+
onLoad: f[3] || (f[3] = (p) => l(!0))
|
|
4415
|
+
}, null, 8, ["selection"])) : h("application/pdf") ? (x(), ce(El, {
|
|
4415
4416
|
key: 4,
|
|
4416
4417
|
selection: o.selection,
|
|
4417
|
-
onLoad:
|
|
4418
|
-
}, null, 8, ["selection"])) : (x(), ce(
|
|
4418
|
+
onLoad: f[4] || (f[4] = (p) => l(!0))
|
|
4419
|
+
}, null, 8, ["selection"])) : (x(), ce(pl, {
|
|
4419
4420
|
key: 5,
|
|
4420
4421
|
selection: o.selection,
|
|
4421
|
-
onLoad:
|
|
4422
|
+
onLoad: f[5] || (f[5] = (p) => l(!0))
|
|
4422
4423
|
}, null, 8, ["selection"]))
|
|
4423
4424
|
]),
|
|
4424
|
-
d("div",
|
|
4425
|
-
d("p", null,
|
|
4426
|
-
d("p", null, "mime_type: " +
|
|
4427
|
-
i.value == !1 ? (x(), C("div",
|
|
4428
|
-
|
|
4429
|
-
d("span", null,
|
|
4425
|
+
d("div", Ol, [
|
|
4426
|
+
d("p", null, $(o.selection.item.path), 1),
|
|
4427
|
+
d("p", null, "mime_type: " + $(o.selection.item.mime_type), 1),
|
|
4428
|
+
i.value == !1 ? (x(), C("div", Pl, [
|
|
4429
|
+
Il,
|
|
4430
|
+
d("span", null, $(_(a)("Loading")), 1)
|
|
4430
4431
|
])) : oe("", !0)
|
|
4431
4432
|
])
|
|
4432
4433
|
])
|
|
@@ -4435,7 +4436,7 @@ const al = { class: "flex" }, sl = {
|
|
|
4435
4436
|
_: 1
|
|
4436
4437
|
}));
|
|
4437
4438
|
}
|
|
4438
|
-
}),
|
|
4439
|
+
}), jl = { class: "sm:flex sm:items-start" }, Vl = /* @__PURE__ */ d("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
4439
4440
|
/* @__PURE__ */ d("svg", {
|
|
4440
4441
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4441
4442
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -4450,10 +4451,10 @@ const al = { class: "flex" }, sl = {
|
|
|
4450
4451
|
d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
|
|
4451
4452
|
})
|
|
4452
4453
|
])
|
|
4453
|
-
], -1),
|
|
4454
|
+
], -1), zl = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Bl = {
|
|
4454
4455
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
4455
4456
|
id: "modal-title"
|
|
4456
|
-
},
|
|
4457
|
+
}, Rl = { class: "mt-2" }, Hl = { class: "flex text-sm text-gray-800 dark:text-gray-400 py-2" }, Ul = {
|
|
4457
4458
|
key: 0,
|
|
4458
4459
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4459
4460
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -4461,13 +4462,13 @@ const al = { class: "flex" }, sl = {
|
|
|
4461
4462
|
viewBox: "0 0 24 24",
|
|
4462
4463
|
stroke: "currentColor",
|
|
4463
4464
|
"stroke-width": "1"
|
|
4464
|
-
},
|
|
4465
|
+
}, Kl = /* @__PURE__ */ d("path", {
|
|
4465
4466
|
"stroke-linecap": "round",
|
|
4466
4467
|
"stroke-linejoin": "round",
|
|
4467
4468
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
4468
|
-
}, null, -1),
|
|
4469
|
-
|
|
4470
|
-
],
|
|
4469
|
+
}, null, -1), Yl = [
|
|
4470
|
+
Kl
|
|
4471
|
+
], Wl = {
|
|
4471
4472
|
key: 1,
|
|
4472
4473
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4473
4474
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -4475,61 +4476,67 @@ const al = { class: "flex" }, sl = {
|
|
|
4475
4476
|
viewBox: "0 0 24 24",
|
|
4476
4477
|
stroke: "currentColor",
|
|
4477
4478
|
"stroke-width": "1"
|
|
4478
|
-
},
|
|
4479
|
+
}, Xl = /* @__PURE__ */ d("path", {
|
|
4479
4480
|
"stroke-linecap": "round",
|
|
4480
4481
|
"stroke-linejoin": "round",
|
|
4481
4482
|
d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
|
|
4482
|
-
}, null, -1),
|
|
4483
|
-
|
|
4484
|
-
],
|
|
4483
|
+
}, null, -1), Fl = [
|
|
4484
|
+
Xl
|
|
4485
|
+
], ql = { class: "ml-1.5" }, Gl = ["onKeyup"], Jl = { class: "text-red-600" }, Zl = {
|
|
4485
4486
|
name: "VFModalRename"
|
|
4486
|
-
},
|
|
4487
|
+
}, Ql = /* @__PURE__ */ Object.assign(Zl, {
|
|
4487
4488
|
props: {
|
|
4488
4489
|
selection: Object,
|
|
4489
4490
|
current: Object
|
|
4490
4491
|
},
|
|
4491
4492
|
setup(o) {
|
|
4492
|
-
const e = o, t = R("emitter"), { getStore: n } = R("storage"), { t: a } = R("i18n"), i = V(e.selection.items[0]), l = V(e.selection.items[0].basename),
|
|
4493
|
+
const e = o, t = R("emitter"), { getStore: n } = R("storage"), { t: a } = R("i18n"), i = V(e.selection.items[0]), l = V(e.selection.items[0].basename), h = V(""), m = () => {
|
|
4493
4494
|
l.value != "" && t.emit("vf-fetch", {
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4495
|
+
params: {
|
|
4496
|
+
q: "rename",
|
|
4497
|
+
adapter: n("adapter", "local"),
|
|
4498
|
+
path: e.current.dirname,
|
|
4499
|
+
item: i.value.path,
|
|
4500
|
+
name: l.value
|
|
4501
|
+
},
|
|
4502
|
+
onError: (v) => {
|
|
4503
|
+
h.value = v.message, t.emit("vf-toast-push", { label: v.message, type: "error" });
|
|
4504
|
+
}
|
|
4499
4505
|
});
|
|
4500
4506
|
};
|
|
4501
|
-
return (
|
|
4507
|
+
return (v, f) => (x(), ce(Se, null, {
|
|
4502
4508
|
buttons: ee(() => [
|
|
4503
4509
|
d("button", {
|
|
4504
4510
|
type: "button",
|
|
4505
|
-
onClick:
|
|
4511
|
+
onClick: m,
|
|
4506
4512
|
class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"
|
|
4507
|
-
},
|
|
4513
|
+
}, $(_(a)("Rename")), 1),
|
|
4508
4514
|
d("button", {
|
|
4509
4515
|
type: "button",
|
|
4510
|
-
onClick:
|
|
4516
|
+
onClick: f[1] || (f[1] = (p) => _(t).emit("vf-modal-close")),
|
|
4511
4517
|
class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
|
4512
|
-
},
|
|
4518
|
+
}, $(_(a)("Cancel")), 1)
|
|
4513
4519
|
]),
|
|
4514
4520
|
default: ee(() => [
|
|
4515
|
-
d("div",
|
|
4516
|
-
|
|
4517
|
-
d("div",
|
|
4518
|
-
d("h3",
|
|
4519
|
-
d("div",
|
|
4520
|
-
d("p",
|
|
4521
|
-
i.value.type == "dir" ? (x(), C("svg",
|
|
4522
|
-
d("span",
|
|
4521
|
+
d("div", jl, [
|
|
4522
|
+
Vl,
|
|
4523
|
+
d("div", zl, [
|
|
4524
|
+
d("h3", Bl, $(_(a)("Rename")), 1),
|
|
4525
|
+
d("div", Rl, [
|
|
4526
|
+
d("p", Hl, [
|
|
4527
|
+
i.value.type == "dir" ? (x(), C("svg", Ul, Yl)) : (x(), C("svg", Wl, Fl)),
|
|
4528
|
+
d("span", ql, $(i.value.basename), 1)
|
|
4523
4529
|
]),
|
|
4524
4530
|
ge(d("input", {
|
|
4525
|
-
"onUpdate:modelValue":
|
|
4526
|
-
onKeyup: Ke(
|
|
4531
|
+
"onUpdate:modelValue": f[0] || (f[0] = (p) => l.value = p),
|
|
4532
|
+
onKeyup: Ke(m, ["enter"]),
|
|
4527
4533
|
class: "px-2 py-1 border rounded dark:bg-gray-500 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",
|
|
4528
4534
|
placeholder: "Name",
|
|
4529
4535
|
type: "text"
|
|
4530
|
-
}, null, 40,
|
|
4536
|
+
}, null, 40, Gl), [
|
|
4531
4537
|
[Ye, l.value]
|
|
4532
|
-
])
|
|
4538
|
+
]),
|
|
4539
|
+
d("div", Jl, $(h.value), 1)
|
|
4533
4540
|
])
|
|
4534
4541
|
])
|
|
4535
4542
|
])
|
|
@@ -4537,7 +4544,7 @@ const al = { class: "flex" }, sl = {
|
|
|
4537
4544
|
_: 1
|
|
4538
4545
|
}));
|
|
4539
4546
|
}
|
|
4540
|
-
}),
|
|
4547
|
+
}), ec = { class: "sm:flex sm:items-start" }, tc = /* @__PURE__ */ d("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
4541
4548
|
/* @__PURE__ */ d("svg", {
|
|
4542
4549
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4543
4550
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -4552,26 +4559,26 @@ const al = { class: "flex" }, sl = {
|
|
|
4552
4559
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"
|
|
4553
4560
|
})
|
|
4554
4561
|
])
|
|
4555
|
-
], -1),
|
|
4562
|
+
], -1), rc = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left" }, ic = {
|
|
4556
4563
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
4557
4564
|
id: "modal-title"
|
|
4558
|
-
},
|
|
4565
|
+
}, nc = { class: "mt-2" }, oc = { class: "text-gray-500 mb-1" }, ac = ["id"], sc = {
|
|
4559
4566
|
key: 0,
|
|
4560
4567
|
class: "py-2"
|
|
4561
|
-
},
|
|
4568
|
+
}, lc = ["disabled", "onClick"], cc = {
|
|
4562
4569
|
name: "VFModalUpload"
|
|
4563
|
-
},
|
|
4570
|
+
}, uc = /* @__PURE__ */ Object.assign(cc, {
|
|
4564
4571
|
props: {
|
|
4565
4572
|
current: Object
|
|
4566
4573
|
},
|
|
4567
4574
|
setup(o) {
|
|
4568
|
-
const e = o, t = R("emitter"), { apiUrl: n } =
|
|
4575
|
+
const e = o, t = R("emitter"), { apiUrl: n } = ke(), { t: a } = R("i18n"), i = V(null), l = V(null), h = V(null), m = V([]), v = V(!0), f = () => {
|
|
4569
4576
|
i.value.start();
|
|
4570
4577
|
};
|
|
4571
4578
|
return xe(() => {
|
|
4572
4579
|
i.value = new wt.Uploader({
|
|
4573
4580
|
runtimes: "html5",
|
|
4574
|
-
browse_button:
|
|
4581
|
+
browse_button: h.value,
|
|
4575
4582
|
container: l.value,
|
|
4576
4583
|
max_file_size: "10mb",
|
|
4577
4584
|
multiple_queues: !0,
|
|
@@ -4580,8 +4587,8 @@ const al = { class: "flex" }, sl = {
|
|
|
4580
4587
|
init: {
|
|
4581
4588
|
PostInit: function() {
|
|
4582
4589
|
},
|
|
4583
|
-
FilesAdded: function(
|
|
4584
|
-
|
|
4590
|
+
FilesAdded: function(p, b) {
|
|
4591
|
+
v.value = !1, wt.each(b, function(A) {
|
|
4585
4592
|
m.value.push({
|
|
4586
4593
|
id: A.id,
|
|
4587
4594
|
name: A.name,
|
|
@@ -4590,46 +4597,46 @@ const al = { class: "flex" }, sl = {
|
|
|
4590
4597
|
});
|
|
4591
4598
|
});
|
|
4592
4599
|
},
|
|
4593
|
-
UploadProgress: function(
|
|
4600
|
+
UploadProgress: function(p, b) {
|
|
4594
4601
|
m.value[m.value.findIndex((A) => A.id == b.id)].percent = b.percent + "%";
|
|
4595
4602
|
},
|
|
4596
4603
|
UploadComplete: function() {
|
|
4597
|
-
|
|
4604
|
+
v.value = !0, t.emit("vf-fetch", { params: { q: "index", adapter: e.current.adapter, path: e.current.dirname } });
|
|
4598
4605
|
},
|
|
4599
|
-
Error: function(
|
|
4606
|
+
Error: function(p, b) {
|
|
4600
4607
|
}
|
|
4601
4608
|
}
|
|
4602
4609
|
}), i.value.init();
|
|
4603
|
-
}), (
|
|
4610
|
+
}), (p, b) => (x(), ce(Se, null, {
|
|
4604
4611
|
buttons: ee(() => [
|
|
4605
4612
|
d("button", {
|
|
4606
|
-
disabled:
|
|
4607
|
-
onClick: Oe(
|
|
4613
|
+
disabled: v.value,
|
|
4614
|
+
onClick: Oe(f, ["prevent"]),
|
|
4608
4615
|
type: "button",
|
|
4609
|
-
class: ue([
|
|
4610
|
-
},
|
|
4616
|
+
class: ue([v.value ? "bg-red-200 hover:bg-red-200" : "bg-red-600 hover:bg-red-700", "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"])
|
|
4617
|
+
}, $(_(a)("Upload")), 11, lc),
|
|
4611
4618
|
d("button", {
|
|
4612
4619
|
type: "button",
|
|
4613
4620
|
onClick: b[0] || (b[0] = (A) => _(t).emit("vf-modal-close")),
|
|
4614
4621
|
class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
|
4615
|
-
},
|
|
4622
|
+
}, $(_(a)("Cancel")), 1)
|
|
4616
4623
|
]),
|
|
4617
4624
|
default: ee(() => [
|
|
4618
|
-
d("div",
|
|
4619
|
-
|
|
4620
|
-
d("div",
|
|
4621
|
-
d("h3",
|
|
4622
|
-
d("div",
|
|
4623
|
-
d("div",
|
|
4625
|
+
d("div", ec, [
|
|
4626
|
+
tc,
|
|
4627
|
+
d("div", rc, [
|
|
4628
|
+
d("h3", ic, $(_(a)("Upload files")), 1),
|
|
4629
|
+
d("div", nc, [
|
|
4630
|
+
d("div", oc, [
|
|
4624
4631
|
(x(!0), C(se, null, ve(m.value, (A) => (x(), C("div", null, [
|
|
4625
4632
|
d("div", {
|
|
4626
4633
|
id: A.id
|
|
4627
4634
|
}, [
|
|
4628
|
-
Me(
|
|
4629
|
-
d("b", null,
|
|
4630
|
-
], 8,
|
|
4635
|
+
Me($(A.name) + " ( " + $(A.size) + ") ", 1),
|
|
4636
|
+
d("b", null, $(A.percent), 1)
|
|
4637
|
+
], 8, ac)
|
|
4631
4638
|
]))), 256)),
|
|
4632
|
-
m.value.length ? oe("", !0) : (x(), C("div",
|
|
4639
|
+
m.value.length ? oe("", !0) : (x(), C("div", sc, $(_(a)("No files selected!")), 1))
|
|
4633
4640
|
]),
|
|
4634
4641
|
d("div", {
|
|
4635
4642
|
class: "text-gray-500",
|
|
@@ -4638,10 +4645,10 @@ const al = { class: "flex" }, sl = {
|
|
|
4638
4645
|
}, [
|
|
4639
4646
|
d("button", {
|
|
4640
4647
|
ref_key: "pickFiles",
|
|
4641
|
-
ref:
|
|
4648
|
+
ref: h,
|
|
4642
4649
|
type: "button",
|
|
4643
4650
|
class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
|
4644
|
-
},
|
|
4651
|
+
}, $(_(a)("Select Files")), 513)
|
|
4645
4652
|
], 512)
|
|
4646
4653
|
])
|
|
4647
4654
|
])
|
|
@@ -4650,7 +4657,7 @@ const al = { class: "flex" }, sl = {
|
|
|
4650
4657
|
_: 1
|
|
4651
4658
|
}));
|
|
4652
4659
|
}
|
|
4653
|
-
}),
|
|
4660
|
+
}), dc = { class: "sm:flex sm:items-start" }, hc = /* @__PURE__ */ d("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
4654
4661
|
/* @__PURE__ */ d("svg", {
|
|
4655
4662
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4656
4663
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -4665,10 +4672,10 @@ const al = { class: "flex" }, sl = {
|
|
|
4665
4672
|
d: "M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"
|
|
4666
4673
|
})
|
|
4667
4674
|
])
|
|
4668
|
-
], -1),
|
|
4675
|
+
], -1), fc = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, mc = {
|
|
4669
4676
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
4670
4677
|
id: "modal-title"
|
|
4671
|
-
},
|
|
4678
|
+
}, pc = { class: "mt-2" }, gc = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, vc = {
|
|
4672
4679
|
key: 0,
|
|
4673
4680
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4674
4681
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -4676,13 +4683,13 @@ const al = { class: "flex" }, sl = {
|
|
|
4676
4683
|
viewBox: "0 0 24 24",
|
|
4677
4684
|
stroke: "currentColor",
|
|
4678
4685
|
"stroke-width": "1"
|
|
4679
|
-
},
|
|
4686
|
+
}, bc = /* @__PURE__ */ d("path", {
|
|
4680
4687
|
"stroke-linecap": "round",
|
|
4681
4688
|
"stroke-linejoin": "round",
|
|
4682
4689
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
4683
|
-
}, null, -1),
|
|
4684
|
-
|
|
4685
|
-
],
|
|
4690
|
+
}, null, -1), yc = [
|
|
4691
|
+
bc
|
|
4692
|
+
], wc = {
|
|
4686
4693
|
key: 1,
|
|
4687
4694
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4688
4695
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -4690,59 +4697,59 @@ const al = { class: "flex" }, sl = {
|
|
|
4690
4697
|
viewBox: "0 0 24 24",
|
|
4691
4698
|
stroke: "currentColor",
|
|
4692
4699
|
"stroke-width": "1"
|
|
4693
|
-
},
|
|
4700
|
+
}, xc = /* @__PURE__ */ d("path", {
|
|
4694
4701
|
"stroke-linecap": "round",
|
|
4695
4702
|
"stroke-linejoin": "round",
|
|
4696
4703
|
d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
|
|
4697
|
-
}, null, -1),
|
|
4698
|
-
|
|
4699
|
-
],
|
|
4704
|
+
}, null, -1), _c = [
|
|
4705
|
+
xc
|
|
4706
|
+
], kc = { class: "ml-1.5" }, Sc = ["onKeyup", "placeholder"], Dc = {
|
|
4700
4707
|
name: "VFModalArchive"
|
|
4701
|
-
},
|
|
4708
|
+
}, Cc = /* @__PURE__ */ Object.assign(Dc, {
|
|
4702
4709
|
props: {
|
|
4703
4710
|
selection: Object,
|
|
4704
4711
|
current: Object
|
|
4705
4712
|
},
|
|
4706
4713
|
setup(o) {
|
|
4707
|
-
const e = o, t = R("emitter"), { getStore: n } = R("storage"), { t: a } = R("i18n"), i = V(""), l = V(e.selection.items),
|
|
4708
|
-
l.value.length && t.emit("vf-fetch", {
|
|
4714
|
+
const e = o, t = R("emitter"), { getStore: n } = R("storage"), { t: a } = R("i18n"), i = V(""), l = V(e.selection.items), h = () => {
|
|
4715
|
+
l.value.length && t.emit("vf-fetch", { params: {
|
|
4709
4716
|
q: "archive",
|
|
4710
4717
|
adapter: n("adapter", "local"),
|
|
4711
4718
|
path: e.current.dirname,
|
|
4712
|
-
items: JSON.stringify(l.value.map(({ path: m, type:
|
|
4719
|
+
items: JSON.stringify(l.value.map(({ path: m, type: v }) => ({ path: m, type: v }))),
|
|
4713
4720
|
name: i.value
|
|
4714
|
-
});
|
|
4721
|
+
} });
|
|
4715
4722
|
};
|
|
4716
|
-
return (m,
|
|
4723
|
+
return (m, v) => (x(), ce(Se, null, {
|
|
4717
4724
|
buttons: ee(() => [
|
|
4718
4725
|
d("button", {
|
|
4719
4726
|
type: "button",
|
|
4720
|
-
onClick:
|
|
4727
|
+
onClick: h,
|
|
4721
4728
|
class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"
|
|
4722
|
-
},
|
|
4729
|
+
}, $(_(a)("Archive")), 1),
|
|
4723
4730
|
d("button", {
|
|
4724
4731
|
type: "button",
|
|
4725
|
-
onClick:
|
|
4732
|
+
onClick: v[1] || (v[1] = (f) => _(t).emit("vf-modal-close")),
|
|
4726
4733
|
class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
|
4727
|
-
},
|
|
4734
|
+
}, $(_(a)("Cancel")), 1)
|
|
4728
4735
|
]),
|
|
4729
4736
|
default: ee(() => [
|
|
4730
|
-
d("div",
|
|
4731
|
-
|
|
4732
|
-
d("div",
|
|
4733
|
-
d("h3",
|
|
4734
|
-
d("div",
|
|
4735
|
-
(x(!0), C(se, null, ve(l.value, (
|
|
4736
|
-
|
|
4737
|
-
d("span",
|
|
4737
|
+
d("div", dc, [
|
|
4738
|
+
hc,
|
|
4739
|
+
d("div", fc, [
|
|
4740
|
+
d("h3", mc, $(_(a)("Archive the files")), 1),
|
|
4741
|
+
d("div", pc, [
|
|
4742
|
+
(x(!0), C(se, null, ve(l.value, (f) => (x(), C("p", gc, [
|
|
4743
|
+
f.type == "dir" ? (x(), C("svg", vc, yc)) : (x(), C("svg", wc, _c)),
|
|
4744
|
+
d("span", kc, $(f.basename), 1)
|
|
4738
4745
|
]))), 256)),
|
|
4739
4746
|
ge(d("input", {
|
|
4740
|
-
"onUpdate:modelValue":
|
|
4741
|
-
onKeyup: Ke(
|
|
4747
|
+
"onUpdate:modelValue": v[0] || (v[0] = (f) => i.value = f),
|
|
4748
|
+
onKeyup: Ke(h, ["enter"]),
|
|
4742
4749
|
class: "my-1 px-2 py-1 border rounded dark:bg-gray-500 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",
|
|
4743
4750
|
placeholder: _(a)("Archive name. (.zip file will be created)"),
|
|
4744
4751
|
type: "text"
|
|
4745
|
-
}, null, 40,
|
|
4752
|
+
}, null, 40, Sc), [
|
|
4746
4753
|
[Ye, i.value]
|
|
4747
4754
|
])
|
|
4748
4755
|
])
|
|
@@ -4752,7 +4759,7 @@ const al = { class: "flex" }, sl = {
|
|
|
4752
4759
|
_: 1
|
|
4753
4760
|
}));
|
|
4754
4761
|
}
|
|
4755
|
-
}),
|
|
4762
|
+
}), Mc = { class: "sm:flex sm:items-start" }, $c = /* @__PURE__ */ d("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
4756
4763
|
/* @__PURE__ */ d("svg", {
|
|
4757
4764
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4758
4765
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -4767,10 +4774,10 @@ const al = { class: "flex" }, sl = {
|
|
|
4767
4774
|
d: "M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5m6 4.125l2.25 2.25m0 0l2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"
|
|
4768
4775
|
})
|
|
4769
4776
|
])
|
|
4770
|
-
], -1),
|
|
4777
|
+
], -1), Ec = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Tc = {
|
|
4771
4778
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
4772
4779
|
id: "modal-title"
|
|
4773
|
-
},
|
|
4780
|
+
}, Ac = { class: "mt-2" }, Oc = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Pc = {
|
|
4774
4781
|
key: 0,
|
|
4775
4782
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4776
4783
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -4778,13 +4785,13 @@ const al = { class: "flex" }, sl = {
|
|
|
4778
4785
|
viewBox: "0 0 24 24",
|
|
4779
4786
|
stroke: "currentColor",
|
|
4780
4787
|
"stroke-width": "1"
|
|
4781
|
-
},
|
|
4788
|
+
}, Ic = /* @__PURE__ */ d("path", {
|
|
4782
4789
|
"stroke-linecap": "round",
|
|
4783
4790
|
"stroke-linejoin": "round",
|
|
4784
4791
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
4785
|
-
}, null, -1),
|
|
4786
|
-
|
|
4787
|
-
],
|
|
4792
|
+
}, null, -1), Nc = [
|
|
4793
|
+
Ic
|
|
4794
|
+
], Lc = {
|
|
4788
4795
|
key: 1,
|
|
4789
4796
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4790
4797
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -4792,15 +4799,15 @@ const al = { class: "flex" }, sl = {
|
|
|
4792
4799
|
viewBox: "0 0 24 24",
|
|
4793
4800
|
stroke: "currentColor",
|
|
4794
4801
|
"stroke-width": "1"
|
|
4795
|
-
},
|
|
4802
|
+
}, jc = /* @__PURE__ */ d("path", {
|
|
4796
4803
|
"stroke-linecap": "round",
|
|
4797
4804
|
"stroke-linejoin": "round",
|
|
4798
4805
|
d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
|
|
4799
|
-
}, null, -1),
|
|
4800
|
-
|
|
4801
|
-
],
|
|
4806
|
+
}, null, -1), Vc = [
|
|
4807
|
+
jc
|
|
4808
|
+
], zc = { class: "ml-1.5" }, Bc = { class: "my-1 text-sm text-gray-500" }, Rc = {
|
|
4802
4809
|
name: "VFModalUnarchive"
|
|
4803
|
-
},
|
|
4810
|
+
}, Hc = /* @__PURE__ */ Object.assign(Rc, {
|
|
4804
4811
|
props: {
|
|
4805
4812
|
selection: Object,
|
|
4806
4813
|
current: Object
|
|
@@ -4808,38 +4815,38 @@ const al = { class: "flex" }, sl = {
|
|
|
4808
4815
|
setup(o) {
|
|
4809
4816
|
const e = o, t = R("emitter"), { getStore: n } = R("storage"), { t: a } = R("i18n");
|
|
4810
4817
|
V("");
|
|
4811
|
-
const i = V(e.selection.items[0]), l = V([]),
|
|
4812
|
-
t.emit("vf-fetch", {
|
|
4818
|
+
const i = V(e.selection.items[0]), l = V([]), h = () => {
|
|
4819
|
+
t.emit("vf-fetch", { params: {
|
|
4813
4820
|
q: "unarchive",
|
|
4814
4821
|
adapter: n("adapter", "local"),
|
|
4815
4822
|
path: e.current.dirname,
|
|
4816
4823
|
item: i.value.path
|
|
4817
|
-
});
|
|
4824
|
+
} });
|
|
4818
4825
|
};
|
|
4819
|
-
return (m,
|
|
4826
|
+
return (m, v) => (x(), ce(Se, null, {
|
|
4820
4827
|
buttons: ee(() => [
|
|
4821
4828
|
d("button", {
|
|
4822
4829
|
type: "button",
|
|
4823
|
-
onClick:
|
|
4830
|
+
onClick: h,
|
|
4824
4831
|
class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"
|
|
4825
|
-
},
|
|
4832
|
+
}, $(_(a)("Unarchive")), 1),
|
|
4826
4833
|
d("button", {
|
|
4827
4834
|
type: "button",
|
|
4828
|
-
onClick:
|
|
4835
|
+
onClick: v[0] || (v[0] = (f) => _(t).emit("vf-modal-close")),
|
|
4829
4836
|
class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
|
4830
|
-
},
|
|
4837
|
+
}, $(_(a)("Cancel")), 1)
|
|
4831
4838
|
]),
|
|
4832
4839
|
default: ee(() => [
|
|
4833
|
-
d("div",
|
|
4834
|
-
|
|
4835
|
-
d("div",
|
|
4836
|
-
d("h3",
|
|
4837
|
-
d("div",
|
|
4838
|
-
(x(!0), C(se, null, ve(l.value, (
|
|
4839
|
-
|
|
4840
|
-
d("span",
|
|
4840
|
+
d("div", Mc, [
|
|
4841
|
+
$c,
|
|
4842
|
+
d("div", Ec, [
|
|
4843
|
+
d("h3", Tc, $(_(a)("Unarchive")), 1),
|
|
4844
|
+
d("div", Ac, [
|
|
4845
|
+
(x(!0), C(se, null, ve(l.value, (f) => (x(), C("p", Oc, [
|
|
4846
|
+
f.type == "dir" ? (x(), C("svg", Pc, Nc)) : (x(), C("svg", Lc, Vc)),
|
|
4847
|
+
d("span", zc, $(f.basename), 1)
|
|
4841
4848
|
]))), 256)),
|
|
4842
|
-
d("p",
|
|
4849
|
+
d("p", Bc, $(_(a)("The archive will be unarchived at")) + " (" + $(o.current.dirname) + ")", 1)
|
|
4843
4850
|
])
|
|
4844
4851
|
])
|
|
4845
4852
|
])
|
|
@@ -4847,7 +4854,7 @@ const al = { class: "flex" }, sl = {
|
|
|
4847
4854
|
_: 1
|
|
4848
4855
|
}));
|
|
4849
4856
|
}
|
|
4850
|
-
}),
|
|
4857
|
+
}), Uc = { class: "sm:flex sm:items-start" }, Kc = /* @__PURE__ */ d("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
4851
4858
|
/* @__PURE__ */ d("svg", {
|
|
4852
4859
|
class: "h-6 w-6 stroke-red-600 dark:stroke-red-200",
|
|
4853
4860
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4863,10 +4870,10 @@ const al = { class: "flex" }, sl = {
|
|
|
4863
4870
|
d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
|
|
4864
4871
|
})
|
|
4865
4872
|
])
|
|
4866
|
-
], -1),
|
|
4873
|
+
], -1), Yc = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left" }, Wc = {
|
|
4867
4874
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
4868
4875
|
id: "modal-title"
|
|
4869
|
-
},
|
|
4876
|
+
}, Xc = { class: "mt-2" }, Fc = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, qc = {
|
|
4870
4877
|
key: 0,
|
|
4871
4878
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4872
4879
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -4874,13 +4881,13 @@ const al = { class: "flex" }, sl = {
|
|
|
4874
4881
|
viewBox: "0 0 24 24",
|
|
4875
4882
|
stroke: "currentColor",
|
|
4876
4883
|
"stroke-width": "1"
|
|
4877
|
-
},
|
|
4884
|
+
}, Gc = /* @__PURE__ */ d("path", {
|
|
4878
4885
|
"stroke-linecap": "round",
|
|
4879
4886
|
"stroke-linejoin": "round",
|
|
4880
4887
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
4881
|
-
}, null, -1),
|
|
4882
|
-
|
|
4883
|
-
],
|
|
4888
|
+
}, null, -1), Jc = [
|
|
4889
|
+
Gc
|
|
4890
|
+
], Zc = {
|
|
4884
4891
|
key: 1,
|
|
4885
4892
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4886
4893
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -4888,13 +4895,13 @@ const al = { class: "flex" }, sl = {
|
|
|
4888
4895
|
viewBox: "0 0 24 24",
|
|
4889
4896
|
stroke: "currentColor",
|
|
4890
4897
|
"stroke-width": "1"
|
|
4891
|
-
},
|
|
4898
|
+
}, Qc = /* @__PURE__ */ d("path", {
|
|
4892
4899
|
"stroke-linecap": "round",
|
|
4893
4900
|
"stroke-linejoin": "round",
|
|
4894
4901
|
d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
|
|
4895
|
-
}, null, -1),
|
|
4896
|
-
|
|
4897
|
-
],
|
|
4902
|
+
}, null, -1), eu = [
|
|
4903
|
+
Qc
|
|
4904
|
+
], tu = { class: "ml-1.5" }, ru = /* @__PURE__ */ d("p", { class: "text-sm text-gray-500 pb-1 pt-3" }, "Bu dosyalar\u0131 ta\u015F\u0131mak istedi\u011Finizden emin misiniz?", -1), iu = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, nu = /* @__PURE__ */ d("svg", {
|
|
4898
4905
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4899
4906
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
4900
4907
|
fill: "none",
|
|
@@ -4907,50 +4914,50 @@ const al = { class: "flex" }, sl = {
|
|
|
4907
4914
|
"stroke-linejoin": "round",
|
|
4908
4915
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
4909
4916
|
})
|
|
4910
|
-
], -1),
|
|
4917
|
+
], -1), ou = { class: "ml-1.5 overflow-auto" }, au = {
|
|
4911
4918
|
name: "VFModalMove"
|
|
4912
|
-
},
|
|
4919
|
+
}, su = /* @__PURE__ */ Object.assign(au, {
|
|
4913
4920
|
props: {
|
|
4914
4921
|
selection: Object,
|
|
4915
4922
|
current: Object
|
|
4916
4923
|
},
|
|
4917
4924
|
setup(o) {
|
|
4918
4925
|
const e = o, t = R("emitter"), { t: n } = R("i18n"), { getStore: a } = R("storage"), i = V(e.selection.items.from), l = () => {
|
|
4919
|
-
i.value.length && t.emit("vf-fetch", {
|
|
4926
|
+
i.value.length && t.emit("vf-fetch", { params: {
|
|
4920
4927
|
q: "move",
|
|
4921
4928
|
adapter: a("adapter", "local"),
|
|
4922
4929
|
path: e.current.dirname,
|
|
4923
|
-
items: JSON.stringify(i.value.map(({ path:
|
|
4930
|
+
items: JSON.stringify(i.value.map(({ path: h, type: m }) => ({ path: h, type: m }))),
|
|
4924
4931
|
item: e.selection.items.to.path
|
|
4925
|
-
});
|
|
4932
|
+
} });
|
|
4926
4933
|
};
|
|
4927
|
-
return (
|
|
4934
|
+
return (h, m) => (x(), ce(Se, null, {
|
|
4928
4935
|
buttons: ee(() => [
|
|
4929
4936
|
d("button", {
|
|
4930
4937
|
type: "button",
|
|
4931
4938
|
onClick: l,
|
|
4932
4939
|
class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"
|
|
4933
|
-
},
|
|
4940
|
+
}, $(_(n)("Yes, Move!")), 1),
|
|
4934
4941
|
d("button", {
|
|
4935
4942
|
type: "button",
|
|
4936
|
-
onClick: m[0] || (m[0] = (
|
|
4943
|
+
onClick: m[0] || (m[0] = (v) => _(t).emit("vf-modal-close")),
|
|
4937
4944
|
class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
|
4938
|
-
},
|
|
4945
|
+
}, $(_(n)("Cancel")), 1)
|
|
4939
4946
|
]),
|
|
4940
4947
|
default: ee(() => [
|
|
4941
|
-
d("div",
|
|
4942
|
-
|
|
4943
|
-
d("div",
|
|
4944
|
-
d("h3",
|
|
4945
|
-
d("div",
|
|
4946
|
-
(x(!0), C(se, null, ve(i.value, (
|
|
4947
|
-
|
|
4948
|
-
d("span",
|
|
4948
|
+
d("div", Uc, [
|
|
4949
|
+
Kc,
|
|
4950
|
+
d("div", Yc, [
|
|
4951
|
+
d("h3", Wc, $(_(n)("Move files")), 1),
|
|
4952
|
+
d("div", Xc, [
|
|
4953
|
+
(x(!0), C(se, null, ve(i.value, (v) => (x(), C("p", Fc, [
|
|
4954
|
+
v.type == "dir" ? (x(), C("svg", qc, Jc)) : (x(), C("svg", Zc, eu)),
|
|
4955
|
+
d("span", tu, $(v.path), 1)
|
|
4949
4956
|
]))), 256)),
|
|
4950
|
-
|
|
4951
|
-
d("p",
|
|
4952
|
-
|
|
4953
|
-
d("span",
|
|
4957
|
+
ru,
|
|
4958
|
+
d("p", iu, [
|
|
4959
|
+
nu,
|
|
4960
|
+
d("span", ou, $(o.selection.items.to.path), 1)
|
|
4954
4961
|
])
|
|
4955
4962
|
])
|
|
4956
4963
|
])
|
|
@@ -4959,23 +4966,23 @@ const al = { class: "flex" }, sl = {
|
|
|
4959
4966
|
_: 1
|
|
4960
4967
|
}));
|
|
4961
4968
|
}
|
|
4962
|
-
}),
|
|
4969
|
+
}), lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4963
4970
|
__proto__: null,
|
|
4964
|
-
ModalDelete:
|
|
4965
|
-
ModalMessage:
|
|
4966
|
-
ModalNewFolder:
|
|
4967
|
-
ModalNewFile:
|
|
4968
|
-
ModalPreview:
|
|
4969
|
-
ModalRename:
|
|
4970
|
-
ModalUpload:
|
|
4971
|
-
ModalArchive:
|
|
4972
|
-
ModalUnarchive:
|
|
4973
|
-
ModalMove:
|
|
4971
|
+
ModalDelete: Ba,
|
|
4972
|
+
ModalMessage: Fa,
|
|
4973
|
+
ModalNewFolder: is,
|
|
4974
|
+
ModalNewFile: hs,
|
|
4975
|
+
ModalPreview: Ll,
|
|
4976
|
+
ModalRename: Ql,
|
|
4977
|
+
ModalUpload: uc,
|
|
4978
|
+
ModalArchive: Cc,
|
|
4979
|
+
ModalUnarchive: Hc,
|
|
4980
|
+
ModalMove: su
|
|
4974
4981
|
}, Symbol.toStringTag, { value: "Module" })), kt = {
|
|
4975
|
-
VueFinder:
|
|
4976
|
-
...
|
|
4982
|
+
VueFinder: ba,
|
|
4983
|
+
...lu
|
|
4977
4984
|
};
|
|
4978
|
-
const
|
|
4985
|
+
const du = {
|
|
4979
4986
|
install(o) {
|
|
4980
4987
|
for (const e in kt)
|
|
4981
4988
|
if (kt.hasOwnProperty(e)) {
|
|
@@ -4985,5 +4992,5 @@ const cu = {
|
|
|
4985
4992
|
}
|
|
4986
4993
|
};
|
|
4987
4994
|
export {
|
|
4988
|
-
|
|
4995
|
+
du as default
|
|
4989
4996
|
};
|