inertia-bootstrap-forms 2.1.7 → 2.1.9
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/dist/{index-Ppvn7wJ2.js → index-DoTxaxaI.js} +730 -639
- package/dist/{index-slnzUb0R.js → index-ibVkvWa2.js} +1 -1
- package/dist/inertia-bootstrap-forms.es.js +14 -13
- package/dist/inertia-bootstrap-forms.umd.js +6 -6
- package/dist/style.css +1 -1
- package/index.d.ts +18 -0
- package/package.json +1 -1
- package/src/AmountInput.vue +1 -1
- package/src/FileInput.vue +5 -1
- package/src/FormContainer.vue +40 -4
- package/src/FormLabel.vue +21 -10
- package/src/MobileInput.vue +1 -1
- package/src/OTPInput.vue +84 -0
- package/src/TelInput.vue +1 -1
- package/src/index.js +2 -0
|
@@ -4,18 +4,18 @@ var Mt = (t) => {
|
|
|
4
4
|
};
|
|
5
5
|
var jn = (t, e, n) => e in t ? Bn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
6
6
|
var R = (t, e, n) => jn(t, typeof e != "symbol" ? e + "" : e, n), Ze = (t, e, n) => e.has(t) || Mt("Cannot " + n);
|
|
7
|
-
var b = (t, e, n) => (Ze(t, e, "read from private field"), n ? n.call(t) : e.get(t)), x = (t, e, n) => e.has(t) ? Mt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n),
|
|
8
|
-
import { createElementBlock as g, openBlock as
|
|
9
|
-
import
|
|
10
|
-
import { useForm as
|
|
11
|
-
import { LMarker as
|
|
12
|
-
import { VueTelInput as
|
|
13
|
-
import
|
|
14
|
-
function
|
|
7
|
+
var b = (t, e, n) => (Ze(t, e, "read from private field"), n ? n.call(t) : e.get(t)), x = (t, e, n) => e.has(t) ? Mt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), Ue = (t, e, n, r) => (Ze(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), F = (t, e, n) => (Ze(t, e, "access private method"), n);
|
|
8
|
+
import { createElementBlock as g, openBlock as h, renderSlot as O, normalizeClass as L, ref as G, onMounted as ve, onBeforeUnmount as ht, createElementVNode as $, defineComponent as E, inject as T, computed as q, resolveComponent as j, createBlock as ee, withCtx as ie, withDirectives as te, createVNode as Q, vModelText as Me, createTextVNode as gt, toDisplayString as W, vModelDynamic as yt, defineAsyncComponent as Ln, createCommentVNode as B, mergeProps as en, Fragment as _e, renderList as be, normalizeStyle as vt, toRef as xn, reactive as tn, withModifiers as nn, resolveDirective as qn, vModelSelect as Hn, defineEmits as Gn, watch as he, markRaw as Wn, provide as Yn, h as rn, shallowRef as Xn, unref as Ke } from "vue";
|
|
9
|
+
import Zn from "@tinymce/tinymce-vue";
|
|
10
|
+
import { useForm as Kn } from "@inertiajs/vue3";
|
|
11
|
+
import { LMarker as Jn, LTileLayer as Qn, LMap as er } from "@vue-leaflet/vue-leaflet";
|
|
12
|
+
import { VueTelInput as tr } from "vue-tel-input";
|
|
13
|
+
import nr from "dropzone";
|
|
14
|
+
function rr(t, e, n = {}) {
|
|
15
15
|
let r = null;
|
|
16
|
-
|
|
16
|
+
ve(async () => {
|
|
17
17
|
r = (typeof e == "function" ? await e() : e).getOrCreateInstance(t.value, n), typeof document < "u" && document.addEventListener("inertia:start", o);
|
|
18
|
-
}),
|
|
18
|
+
}), ht(() => {
|
|
19
19
|
typeof document < "u" && document.removeEventListener("inertia:start", o), s();
|
|
20
20
|
});
|
|
21
21
|
const s = function() {
|
|
@@ -29,35 +29,35 @@ function nr(t, e, n = {}) {
|
|
|
29
29
|
getInstance: () => r
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
const
|
|
32
|
+
const we = (t, e) => {
|
|
33
33
|
const n = t.__vccOpts || t;
|
|
34
34
|
for (const [r, s] of e)
|
|
35
35
|
n[r] = s;
|
|
36
36
|
return n;
|
|
37
|
-
},
|
|
38
|
-
function
|
|
39
|
-
return
|
|
40
|
-
|
|
37
|
+
}, sr = {}, ir = { class: "dropdown" };
|
|
38
|
+
function or(t, e, n, r, s, o) {
|
|
39
|
+
return h(), g("div", ir, [
|
|
40
|
+
O(t.$slots, "default")
|
|
41
41
|
]);
|
|
42
42
|
}
|
|
43
|
-
const
|
|
44
|
-
function
|
|
45
|
-
return
|
|
46
|
-
|
|
43
|
+
const ar = /* @__PURE__ */ we(sr, [["render", or]]), lr = {}, ur = { class: "dropdown-menu" };
|
|
44
|
+
function dr(t, e, n, r, s, o) {
|
|
45
|
+
return h(), g("div", ur, [
|
|
46
|
+
O(t.$slots, "default")
|
|
47
47
|
]);
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const pr = /* @__PURE__ */ we(lr, [["render", dr]]), cr = {
|
|
50
50
|
__name: "DropdownToggle",
|
|
51
51
|
props: {},
|
|
52
52
|
setup(t, { expose: e }) {
|
|
53
|
-
const n =
|
|
53
|
+
const n = G(null), { getInstance: r } = rr(n, () => import("./dropdown-yh2aQrbw-XuCU1v1F.js").then((s) => s.default));
|
|
54
54
|
return e({ show: () => {
|
|
55
55
|
var s;
|
|
56
56
|
return (s = r()) == null ? void 0 : s.show();
|
|
57
57
|
}, hide: () => {
|
|
58
58
|
var s;
|
|
59
59
|
return (s = r()) == null ? void 0 : s.hide();
|
|
60
|
-
} }), (s, o) => (
|
|
60
|
+
} }), (s, o) => (h(), g("button", {
|
|
61
61
|
class: "dropdown-toggle",
|
|
62
62
|
type: "button",
|
|
63
63
|
ref_key: "el",
|
|
@@ -65,22 +65,22 @@ const dr = /* @__PURE__ */ be(ar, [["render", ur]]), pr = {
|
|
|
65
65
|
"data-bs-toggle": "dropdown",
|
|
66
66
|
"aria-expanded": "false"
|
|
67
67
|
}, [
|
|
68
|
-
|
|
68
|
+
O(s.$slots, "default")
|
|
69
69
|
], 512));
|
|
70
70
|
}
|
|
71
|
-
},
|
|
71
|
+
}, fr = {}, mr = { class: "input-group" };
|
|
72
72
|
function hr(t, e, n, r, s, o) {
|
|
73
|
-
return
|
|
74
|
-
|
|
73
|
+
return h(), g("div", mr, [
|
|
74
|
+
O(t.$slots, "default")
|
|
75
75
|
]);
|
|
76
76
|
}
|
|
77
|
-
const _t = /* @__PURE__ */
|
|
78
|
-
function
|
|
79
|
-
return
|
|
80
|
-
|
|
77
|
+
const _t = /* @__PURE__ */ we(fr, [["render", hr]]), gr = {}, yr = { class: "input-group-text" };
|
|
78
|
+
function vr(t, e, n, r, s, o) {
|
|
79
|
+
return h(), g("div", yr, [
|
|
80
|
+
O(t.$slots, "default")
|
|
81
81
|
]);
|
|
82
82
|
}
|
|
83
|
-
const bt = /* @__PURE__ */
|
|
83
|
+
const bt = /* @__PURE__ */ we(gr, [["render", vr]]), _r = {
|
|
84
84
|
props: {
|
|
85
85
|
type: {
|
|
86
86
|
type: String,
|
|
@@ -94,15 +94,15 @@ const bt = /* @__PURE__ */ be(mr, [["render", yr]]), vr = {
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
-
function
|
|
98
|
-
return
|
|
97
|
+
function br(t, e, n, r, s, o) {
|
|
98
|
+
return h(), g("i", {
|
|
99
99
|
class: L(["align-middle", "spinner-" + this.type + " spinner-" + this.type + "-" + this.size]),
|
|
100
100
|
role: "status"
|
|
101
101
|
}, e[0] || (e[0] = [
|
|
102
102
|
$("span", { class: "visually-hidden" }, "Loading...", -1)
|
|
103
103
|
]), 2);
|
|
104
104
|
}
|
|
105
|
-
const
|
|
105
|
+
const wr = /* @__PURE__ */ we(_r, [["render", br]]), $r = {
|
|
106
106
|
props: {
|
|
107
107
|
type: {
|
|
108
108
|
type: String,
|
|
@@ -110,19 +110,19 @@ const br = /* @__PURE__ */ be(vr, [["render", _r]]), wr = {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
|
-
function
|
|
114
|
-
return
|
|
113
|
+
function Sr(t, e, n, r, s, o) {
|
|
114
|
+
return h(), g("div", {
|
|
115
115
|
class: L(["alert", "alert-" + n.type])
|
|
116
116
|
}, [
|
|
117
|
-
|
|
117
|
+
O(t.$slots, "default")
|
|
118
118
|
], 2);
|
|
119
119
|
}
|
|
120
|
-
const
|
|
120
|
+
const Fr = /* @__PURE__ */ we($r, [["render", Sr]]), M = (t, e) => {
|
|
121
121
|
const n = t.__vccOpts || t;
|
|
122
122
|
for (const [r, s] of e)
|
|
123
123
|
n[r] = s;
|
|
124
124
|
return n;
|
|
125
|
-
},
|
|
125
|
+
}, Tr = E({
|
|
126
126
|
components: { InputGroup: _t, InputGroupText: bt },
|
|
127
127
|
props: {
|
|
128
128
|
name: {
|
|
@@ -142,12 +142,12 @@ const Sr = /* @__PURE__ */ be(wr, [["render", $r]]), M = (t, e) => {
|
|
|
142
142
|
}
|
|
143
143
|
},
|
|
144
144
|
setup(t) {
|
|
145
|
-
let e =
|
|
145
|
+
let e = T("form", {
|
|
146
146
|
errors: {},
|
|
147
147
|
getID(l) {
|
|
148
148
|
return l;
|
|
149
149
|
}
|
|
150
|
-
}), n =
|
|
150
|
+
}), n = T("group", {});
|
|
151
151
|
const r = q({
|
|
152
152
|
get() {
|
|
153
153
|
var l;
|
|
@@ -176,34 +176,34 @@ const Sr = /* @__PURE__ */ be(wr, [["render", $r]]), M = (t, e) => {
|
|
|
176
176
|
});
|
|
177
177
|
return { modelValue: r, displayValue: a, form: e, group: n };
|
|
178
178
|
}
|
|
179
|
-
}),
|
|
180
|
-
function
|
|
179
|
+
}), kr = ["name", "disabled", "readonly", "placeholder"];
|
|
180
|
+
function Ir(t, e, n, r, s, o) {
|
|
181
181
|
const i = j("InputGroupText"), a = j("InputGroup");
|
|
182
|
-
return
|
|
182
|
+
return h(), ee(a, null, {
|
|
183
183
|
default: ie(() => [
|
|
184
|
-
|
|
184
|
+
te($("input", {
|
|
185
185
|
name: t.name,
|
|
186
186
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.displayValue = l),
|
|
187
|
-
class: L([{ "is-invalid": t.form.errors[t.name] }, "form-control fanum
|
|
187
|
+
class: L([{ "is-invalid": t.form.errors[t.name] }, "form-control fanum"]),
|
|
188
188
|
disabled: t.disabled || t.form.processing,
|
|
189
189
|
readonly: t.readonly,
|
|
190
190
|
placeholder: t.placeholder,
|
|
191
191
|
type: "tel"
|
|
192
|
-
}, null, 10,
|
|
193
|
-
[
|
|
192
|
+
}, null, 10, kr), [
|
|
193
|
+
[Me, t.displayValue]
|
|
194
194
|
]),
|
|
195
195
|
Q(i, { class: "fanum" }, {
|
|
196
196
|
default: ie(() => [
|
|
197
|
-
gt(
|
|
197
|
+
gt(W(t.unit), 1)
|
|
198
198
|
]),
|
|
199
199
|
_: 1
|
|
200
200
|
}),
|
|
201
|
-
|
|
201
|
+
O(t.$slots, "suffix")
|
|
202
202
|
]),
|
|
203
203
|
_: 3
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
|
-
const
|
|
206
|
+
const za = /* @__PURE__ */ M(Tr, [["render", Ir]]), Er = E({
|
|
207
207
|
props: {
|
|
208
208
|
name: {
|
|
209
209
|
type: String,
|
|
@@ -216,12 +216,12 @@ const Ua = /* @__PURE__ */ M(Fr, [["render", kr]]), Er = I({
|
|
|
216
216
|
}
|
|
217
217
|
},
|
|
218
218
|
setup(t) {
|
|
219
|
-
let e =
|
|
219
|
+
let e = T("form", {
|
|
220
220
|
errors: {},
|
|
221
221
|
getID(s) {
|
|
222
222
|
return s;
|
|
223
223
|
}
|
|
224
|
-
}), n =
|
|
224
|
+
}), n = T("group", {});
|
|
225
225
|
return { modelValue: q({
|
|
226
226
|
get() {
|
|
227
227
|
var s;
|
|
@@ -233,21 +233,21 @@ const Ua = /* @__PURE__ */ M(Fr, [["render", kr]]), Er = I({
|
|
|
233
233
|
}
|
|
234
234
|
}), form: e, group: n };
|
|
235
235
|
}
|
|
236
|
-
}),
|
|
237
|
-
function
|
|
236
|
+
}), Cr = ["name", "id", "disabled"];
|
|
237
|
+
function Vr(t, e, n, r, s, o) {
|
|
238
238
|
var i, a;
|
|
239
|
-
return
|
|
239
|
+
return te((h(), g("input", {
|
|
240
240
|
name: t.name,
|
|
241
241
|
id: t.inputID,
|
|
242
242
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.modelValue = l),
|
|
243
243
|
class: L([{ "is-invalid": ((i = t.form) == null ? void 0 : i.errors[t.name]) !== void 0 }, "form-control"]),
|
|
244
244
|
disabled: (a = t.form) == null ? void 0 : a.processing,
|
|
245
245
|
type: "text"
|
|
246
|
-
}, null, 10,
|
|
247
|
-
[
|
|
246
|
+
}, null, 10, Cr)), [
|
|
247
|
+
[Me, t.modelValue]
|
|
248
248
|
]);
|
|
249
249
|
}
|
|
250
|
-
const Ge = /* @__PURE__ */ M(Er, [["render",
|
|
250
|
+
const Ge = /* @__PURE__ */ M(Er, [["render", Vr]]), Mr = E({
|
|
251
251
|
components: { TextInput: Ge },
|
|
252
252
|
props: {
|
|
253
253
|
name: {
|
|
@@ -295,27 +295,27 @@ const Ge = /* @__PURE__ */ M(Er, [["render", Cr]]), Vr = I({
|
|
|
295
295
|
src: this.url + Math.random()
|
|
296
296
|
};
|
|
297
297
|
}
|
|
298
|
-
}),
|
|
298
|
+
}), Ur = { class: "input-group captcha" }, Ar = ["src"], Nr = {
|
|
299
299
|
key: 1,
|
|
300
300
|
class: "placeholder-wave captcha-holder"
|
|
301
|
-
},
|
|
302
|
-
function
|
|
301
|
+
}, Pr = ["disabled"];
|
|
302
|
+
function Dr(t, e, n, r, s, o) {
|
|
303
303
|
const i = j("TextInput");
|
|
304
|
-
return
|
|
304
|
+
return h(), g("div", Ur, [
|
|
305
305
|
Q(i, {
|
|
306
306
|
name: t.name,
|
|
307
307
|
class: "text-start",
|
|
308
308
|
type: "tel"
|
|
309
309
|
}, null, 8, ["name"]),
|
|
310
|
-
t.loading ? (
|
|
310
|
+
t.loading ? (h(), g("div", Nr, e[2] || (e[2] = [
|
|
311
311
|
$("div", { class: "placeholder w-100 h-100" }, null, -1)
|
|
312
|
-
]))) : (
|
|
312
|
+
]))) : (h(), g("img", {
|
|
313
313
|
key: 0,
|
|
314
314
|
src: t.src,
|
|
315
315
|
alt: "captcha",
|
|
316
316
|
onClick: e[0] || (e[0] = (...a) => t.getSrc && t.getSrc(...a)),
|
|
317
317
|
class: "captcha-holder"
|
|
318
|
-
}, null, 8,
|
|
318
|
+
}, null, 8, Ar)),
|
|
319
319
|
$("button", {
|
|
320
320
|
type: "button",
|
|
321
321
|
disabled: t.form.processing || t.loading,
|
|
@@ -323,10 +323,10 @@ function Pr(t, e, n, r, s, o) {
|
|
|
323
323
|
class: "btn btn-secondary border-0"
|
|
324
324
|
}, e[3] || (e[3] = [
|
|
325
325
|
$("i", { class: "fal fa-sync-alt align-middle" }, null, -1)
|
|
326
|
-
]), 8,
|
|
326
|
+
]), 8, Pr)
|
|
327
327
|
]);
|
|
328
328
|
}
|
|
329
|
-
const
|
|
329
|
+
const Oa = /* @__PURE__ */ M(Mr, [["render", Dr]]), zr = E({
|
|
330
330
|
emits: ["change"],
|
|
331
331
|
props: {
|
|
332
332
|
name: {
|
|
@@ -355,7 +355,7 @@ const Aa = /* @__PURE__ */ M(Vr, [["render", Pr]]), Nr = I({
|
|
|
355
355
|
}
|
|
356
356
|
},
|
|
357
357
|
setup(t) {
|
|
358
|
-
let e =
|
|
358
|
+
let e = T("form");
|
|
359
359
|
return e === void 0 && (e = {
|
|
360
360
|
errors: {},
|
|
361
361
|
getID(n) {
|
|
@@ -363,14 +363,14 @@ const Aa = /* @__PURE__ */ M(Vr, [["render", Pr]]), Nr = I({
|
|
|
363
363
|
}
|
|
364
364
|
}), { form: e };
|
|
365
365
|
}
|
|
366
|
-
}), Or = ["for"],
|
|
367
|
-
function
|
|
366
|
+
}), Or = ["for"], Rr = ["name", "id", "disabled", "type", "value"];
|
|
367
|
+
function Br(t, e, n, r, s, o) {
|
|
368
368
|
var i, a;
|
|
369
|
-
return
|
|
369
|
+
return h(), g("label", {
|
|
370
370
|
class: L(["btn-label", { active: t.form[t.name] === t.value || t.form[t.name] === !0 }]),
|
|
371
371
|
for: t.form.getID(t.name) + (t.id || t.value)
|
|
372
372
|
}, [
|
|
373
|
-
|
|
373
|
+
te($("input", {
|
|
374
374
|
name: t.name,
|
|
375
375
|
id: t.form.getID(t.name) + (t.id || t.value),
|
|
376
376
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.form[t.name] = l),
|
|
@@ -380,13 +380,13 @@ function Rr(t, e, n, r, s, o) {
|
|
|
380
380
|
value: t.value,
|
|
381
381
|
onChange: e[1] || (e[1] = (...l) => t.change && t.change(...l)),
|
|
382
382
|
autocomplete: "off"
|
|
383
|
-
}, null, 42,
|
|
383
|
+
}, null, 42, Rr), [
|
|
384
384
|
[yt, t.form[t.name]]
|
|
385
385
|
]),
|
|
386
|
-
|
|
386
|
+
O(t.$slots, "default")
|
|
387
387
|
], 10, Or);
|
|
388
388
|
}
|
|
389
|
-
const
|
|
389
|
+
const Ra = /* @__PURE__ */ M(zr, [["render", Br]]), jr = E({
|
|
390
390
|
props: {
|
|
391
391
|
name: {
|
|
392
392
|
type: String,
|
|
@@ -414,12 +414,12 @@ const za = /* @__PURE__ */ M(Nr, [["render", Rr]]), Br = I({
|
|
|
414
414
|
}
|
|
415
415
|
},
|
|
416
416
|
setup(t) {
|
|
417
|
-
let e =
|
|
417
|
+
let e = T("form", {
|
|
418
418
|
errors: {},
|
|
419
419
|
getID(s) {
|
|
420
420
|
return s;
|
|
421
421
|
}
|
|
422
|
-
}), n =
|
|
422
|
+
}), n = T("group", {});
|
|
423
423
|
return { modelValue: q({
|
|
424
424
|
get() {
|
|
425
425
|
var s;
|
|
@@ -431,11 +431,11 @@ const za = /* @__PURE__ */ M(Nr, [["render", Rr]]), Br = I({
|
|
|
431
431
|
}
|
|
432
432
|
}), form: e, group: n };
|
|
433
433
|
}
|
|
434
|
-
}),
|
|
435
|
-
function
|
|
434
|
+
}), Lr = { class: "form-check" }, xr = ["name", "id", "disabled", "type", "value"], qr = ["for"];
|
|
435
|
+
function Hr(t, e, n, r, s, o) {
|
|
436
436
|
var i, a;
|
|
437
|
-
return
|
|
438
|
-
|
|
437
|
+
return h(), g("div", Lr, [
|
|
438
|
+
te($("input", {
|
|
439
439
|
name: t.name,
|
|
440
440
|
id: t.inputID,
|
|
441
441
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.modelValue = l),
|
|
@@ -451,11 +451,11 @@ function qr(t, e, n, r, s, o) {
|
|
|
451
451
|
class: "form-check-label",
|
|
452
452
|
for: t.inputID
|
|
453
453
|
}, [
|
|
454
|
-
|
|
455
|
-
], 8,
|
|
454
|
+
O(t.$slots, "default")
|
|
455
|
+
], 8, qr)
|
|
456
456
|
]);
|
|
457
457
|
}
|
|
458
|
-
const
|
|
458
|
+
const Ba = /* @__PURE__ */ M(jr, [["render", Hr]]), Gr = E({
|
|
459
459
|
props: {
|
|
460
460
|
name: {
|
|
461
461
|
type: String,
|
|
@@ -490,12 +490,12 @@ const Pa = /* @__PURE__ */ M(Br, [["render", qr]]), Hr = I({
|
|
|
490
490
|
}
|
|
491
491
|
},
|
|
492
492
|
setup(t) {
|
|
493
|
-
let e =
|
|
493
|
+
let e = T("form", {
|
|
494
494
|
errors: {},
|
|
495
495
|
getID(s) {
|
|
496
496
|
return s;
|
|
497
497
|
}
|
|
498
|
-
}), n =
|
|
498
|
+
}), n = T("group", {});
|
|
499
499
|
return { modelValue: q({
|
|
500
500
|
get() {
|
|
501
501
|
var s;
|
|
@@ -507,14 +507,14 @@ const Pa = /* @__PURE__ */ M(Br, [["render", qr]]), Hr = I({
|
|
|
507
507
|
}
|
|
508
508
|
}), form: e, group: n };
|
|
509
509
|
}
|
|
510
|
-
}),
|
|
511
|
-
function
|
|
510
|
+
}), Wr = ["for"], Yr = ["name", "id", "disabled", "type", "value"];
|
|
511
|
+
function Xr(t, e, n, r, s, o) {
|
|
512
512
|
var i, a, l, u;
|
|
513
|
-
return
|
|
513
|
+
return h(), g("label", {
|
|
514
514
|
class: L(["form-check-toggle", { "form-check-toggle--active": (t.selectedValue || []).includes(t.value) }]),
|
|
515
515
|
for: t.inputID
|
|
516
516
|
}, [
|
|
517
|
-
|
|
517
|
+
te($("input", {
|
|
518
518
|
name: t.name + (t.group ? "_" + ((i = t.group) == null ? void 0 : i.name) + "-" + ((a = t.group) == null ? void 0 : a.groupID) : ""),
|
|
519
519
|
id: t.inputID,
|
|
520
520
|
"onUpdate:modelValue": e[0] || (e[0] = (d) => t.modelValue = d),
|
|
@@ -523,18 +523,18 @@ function Yr(t, e, n, r, s, o) {
|
|
|
523
523
|
type: t.type,
|
|
524
524
|
value: t.value,
|
|
525
525
|
onChange: e[1] || (e[1] = (d) => t.$emit("change", d))
|
|
526
|
-
}, null, 42,
|
|
526
|
+
}, null, 42, Yr), [
|
|
527
527
|
[yt, t.modelValue]
|
|
528
528
|
]),
|
|
529
|
-
|
|
530
|
-
], 10,
|
|
529
|
+
O(t.$slots, "default")
|
|
530
|
+
], 10, Wr);
|
|
531
531
|
}
|
|
532
|
-
const
|
|
532
|
+
const ja = /* @__PURE__ */ M(Gr, [["render", Xr]]), Zr = Ln(
|
|
533
533
|
() => import("vue3-persian-datetime-picker")
|
|
534
534
|
);
|
|
535
|
-
let
|
|
536
|
-
const
|
|
537
|
-
components: { Vue3PersianDatetimePicker:
|
|
535
|
+
let Ae;
|
|
536
|
+
const Kr = E({
|
|
537
|
+
components: { Vue3PersianDatetimePicker: Zr },
|
|
538
538
|
emits: ["update:modelValue", "change"],
|
|
539
539
|
props: {
|
|
540
540
|
name: {
|
|
@@ -571,12 +571,12 @@ const Zr = I({
|
|
|
571
571
|
placeholder: String
|
|
572
572
|
},
|
|
573
573
|
setup(t) {
|
|
574
|
-
let e =
|
|
574
|
+
let e = T("form", {
|
|
575
575
|
errors: {},
|
|
576
576
|
getID(s) {
|
|
577
577
|
return s;
|
|
578
578
|
}
|
|
579
|
-
}), n =
|
|
579
|
+
}), n = T("group", {});
|
|
580
580
|
return { modelValue: q({
|
|
581
581
|
get() {
|
|
582
582
|
var s;
|
|
@@ -590,7 +590,7 @@ const Zr = I({
|
|
|
590
590
|
},
|
|
591
591
|
watch: {
|
|
592
592
|
modelValue: (t, e) => {
|
|
593
|
-
|
|
593
|
+
Ae == null || Ae.$emit("change", t, e);
|
|
594
594
|
}
|
|
595
595
|
},
|
|
596
596
|
methods: {
|
|
@@ -599,7 +599,7 @@ const Zr = I({
|
|
|
599
599
|
}
|
|
600
600
|
},
|
|
601
601
|
mounted() {
|
|
602
|
-
|
|
602
|
+
Ae = this;
|
|
603
603
|
},
|
|
604
604
|
computed: {
|
|
605
605
|
isSsr() {
|
|
@@ -613,10 +613,10 @@ const Zr = I({
|
|
|
613
613
|
return {};
|
|
614
614
|
}
|
|
615
615
|
});
|
|
616
|
-
function
|
|
616
|
+
function Jr(t, e, n, r, s, o) {
|
|
617
617
|
var a;
|
|
618
618
|
const i = j("Vue3PersianDatetimePicker");
|
|
619
|
-
return t.isSsr ? B("", !0) : (
|
|
619
|
+
return t.isSsr ? B("", !0) : (h(), ee(i, en({
|
|
620
620
|
key: 0,
|
|
621
621
|
modelValue: t.modelValue,
|
|
622
622
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.modelValue = l),
|
|
@@ -631,9 +631,9 @@ function Kr(t, e, n, r, s, o) {
|
|
|
631
631
|
"input-class": "form-control fanum"
|
|
632
632
|
}, t.$props), null, 16, ["modelValue", "type", "disabled", "inputFormat"]));
|
|
633
633
|
}
|
|
634
|
-
const
|
|
634
|
+
const La = /* @__PURE__ */ M(Kr, [["render", Jr]]), Qr = E({
|
|
635
635
|
emits: ["update:modelValue", "setContent"],
|
|
636
|
-
components: { Editor:
|
|
636
|
+
components: { Editor: Zn },
|
|
637
637
|
props: {
|
|
638
638
|
name: {
|
|
639
639
|
type: String,
|
|
@@ -655,18 +655,18 @@ const Oa = /* @__PURE__ */ M(Zr, [["render", Kr]]), Jr = I({
|
|
|
655
655
|
}
|
|
656
656
|
},
|
|
657
657
|
setup(t, { expose: e, emit: n }) {
|
|
658
|
-
const r =
|
|
658
|
+
const r = G(null), s = G(null), o = (u, d) => {
|
|
659
659
|
s.value = d;
|
|
660
660
|
};
|
|
661
661
|
e({
|
|
662
662
|
editor: () => s.value
|
|
663
663
|
});
|
|
664
|
-
let i =
|
|
664
|
+
let i = T("form", {
|
|
665
665
|
errors: {},
|
|
666
666
|
getID(u) {
|
|
667
667
|
return u;
|
|
668
668
|
}
|
|
669
|
-
}), a =
|
|
669
|
+
}), a = T("group", {});
|
|
670
670
|
return { modelValue: q({
|
|
671
671
|
get() {
|
|
672
672
|
var u;
|
|
@@ -679,9 +679,9 @@ const Oa = /* @__PURE__ */ M(Zr, [["render", Kr]]), Jr = I({
|
|
|
679
679
|
}), form: i, group: a, editorRef: r, handleInit: o };
|
|
680
680
|
}
|
|
681
681
|
});
|
|
682
|
-
function
|
|
682
|
+
function es(t, e, n, r, s, o) {
|
|
683
683
|
const i = j("Editor");
|
|
684
|
-
return
|
|
684
|
+
return h(), ee(i, {
|
|
685
685
|
ref: "editorRef",
|
|
686
686
|
onInit: t.handleInit,
|
|
687
687
|
modelValue: t.modelValue,
|
|
@@ -694,7 +694,7 @@ function Qr(t, e, n, r, s, o) {
|
|
|
694
694
|
}
|
|
695
695
|
}, null, 8, ["onInit", "modelValue", "init"]);
|
|
696
696
|
}
|
|
697
|
-
const
|
|
697
|
+
const xa = /* @__PURE__ */ M(Qr, [["render", es]]), ts = E({
|
|
698
698
|
props: {
|
|
699
699
|
modelValue: "",
|
|
700
700
|
name: {
|
|
@@ -711,7 +711,7 @@ const Da = /* @__PURE__ */ M(Jr, [["render", Qr]]), es = I({
|
|
|
711
711
|
}
|
|
712
712
|
},
|
|
713
713
|
setup(t) {
|
|
714
|
-
let e =
|
|
714
|
+
let e = T("form");
|
|
715
715
|
return e === void 0 && (e = {
|
|
716
716
|
errors: {},
|
|
717
717
|
getID(n) {
|
|
@@ -719,6 +719,10 @@ const Da = /* @__PURE__ */ M(Jr, [["render", Qr]]), es = I({
|
|
|
719
719
|
}), { form: e };
|
|
720
720
|
},
|
|
721
721
|
computed: {
|
|
722
|
+
inputID() {
|
|
723
|
+
var t;
|
|
724
|
+
return (t = this.form) == null ? void 0 : t.getID(this);
|
|
725
|
+
},
|
|
722
726
|
allFiles() {
|
|
723
727
|
return this.files;
|
|
724
728
|
}
|
|
@@ -773,43 +777,44 @@ const Da = /* @__PURE__ */ M(Jr, [["render", Qr]]), es = I({
|
|
|
773
777
|
files: []
|
|
774
778
|
};
|
|
775
779
|
}
|
|
776
|
-
}),
|
|
780
|
+
}), ns = { class: "file-input-uploader" }, rs = ["name", "id", "disabled", "multiple"], ss = { class: "file-input-uploader--list" }, is = ["id"], os = {
|
|
777
781
|
key: 0,
|
|
778
782
|
class: "file-input-uploader--progress"
|
|
779
|
-
},
|
|
783
|
+
}, as = {
|
|
780
784
|
key: 1,
|
|
781
785
|
class: "file-input-uploader--list-error"
|
|
782
|
-
},
|
|
786
|
+
}, ls = {
|
|
783
787
|
class: "file-input-uploader--list-item--size",
|
|
784
788
|
dir: "ltr"
|
|
785
|
-
},
|
|
786
|
-
function
|
|
789
|
+
}, us = { class: "file-input-uploader--list-item--actions" }, ds = ["onClick"], ps = ["onClick"];
|
|
790
|
+
function cs(t, e, n, r, s, o) {
|
|
787
791
|
var i, a;
|
|
788
|
-
return
|
|
792
|
+
return h(), g("div", ns, [
|
|
789
793
|
$("input", {
|
|
790
794
|
ref: "input",
|
|
791
795
|
name: t.name,
|
|
796
|
+
id: t.inputID,
|
|
792
797
|
class: L([{ "is-invalid": ((i = t.form) == null ? void 0 : i.errors[t.name]) !== void 0 }, "form-control"]),
|
|
793
798
|
disabled: (a = t.form) == null ? void 0 : a.processing,
|
|
794
799
|
type: "file",
|
|
795
800
|
multiple: t.multiple,
|
|
796
801
|
onChange: e[0] || (e[0] = (...l) => t.fileSelected && t.fileSelected(...l))
|
|
797
|
-
}, null, 42,
|
|
798
|
-
$("div",
|
|
799
|
-
(
|
|
802
|
+
}, null, 42, rs),
|
|
803
|
+
$("div", ss, [
|
|
804
|
+
(h(!0), g(_e, null, be(t.allFiles, (l) => (h(), g("div", {
|
|
800
805
|
id: "file-" + l.id,
|
|
801
806
|
class: "file-input-uploader--list-item"
|
|
802
807
|
}, [
|
|
803
|
-
l.percent && l.percent < 100 ? (
|
|
808
|
+
l.percent && l.percent < 100 ? (h(), g("div", os, [
|
|
804
809
|
$("div", {
|
|
805
810
|
style: vt({ width: l.percent + "%" })
|
|
806
811
|
}, null, 4)
|
|
807
812
|
])) : B("", !0),
|
|
808
|
-
$("div", null,
|
|
809
|
-
l.error ? (
|
|
810
|
-
$("div",
|
|
811
|
-
$("div",
|
|
812
|
-
l.error ? (
|
|
813
|
+
$("div", null, W(l.file.name), 1),
|
|
814
|
+
l.error ? (h(), g("div", as, W(l.error), 1)) : B("", !0),
|
|
815
|
+
$("div", ls, W(Math.round(l.file.size / 1024)) + "Kb", 1),
|
|
816
|
+
$("div", us, [
|
|
817
|
+
l.error ? (h(), g("button", {
|
|
813
818
|
key: 0,
|
|
814
819
|
onClick: (u) => t.uploadFile(l),
|
|
815
820
|
type: "button",
|
|
@@ -824,8 +829,8 @@ function ps(t, e, n, r, s, o) {
|
|
|
824
829
|
}, [
|
|
825
830
|
$("path", { d: "M1,12A11,11,0,0,1,17.882,2.7l1.411-1.41A1,1,0,0,1,21,2V6a1,1,0,0,1-1,1H16a1,1,0,0,1-.707-1.707l1.128-1.128A8.994,8.994,0,0,0,3,12a1,1,0,0,1-2,0Zm21-1a1,1,0,0,0-1,1,9.01,9.01,0,0,1-9,9,8.9,8.9,0,0,1-4.42-1.166l1.127-1.127A1,1,0,0,0,8,17H4a1,1,0,0,0-1,1v4a1,1,0,0,0,.617.924A.987.987,0,0,0,4,23a1,1,0,0,0,.707-.293L6.118,21.3A10.891,10.891,0,0,0,12,23,11.013,11.013,0,0,0,23,12,1,1,0,0,0,22,11Z" })
|
|
826
831
|
], -1)
|
|
827
|
-
]), 8,
|
|
828
|
-
l.path || l.error ? (
|
|
832
|
+
]), 8, ds)) : B("", !0),
|
|
833
|
+
l.path || l.error ? (h(), g("button", {
|
|
829
834
|
key: 1,
|
|
830
835
|
onClick: (u) => t.deleteFile(l),
|
|
831
836
|
type: "button",
|
|
@@ -840,13 +845,13 @@ function ps(t, e, n, r, s, o) {
|
|
|
840
845
|
}, [
|
|
841
846
|
$("path", { d: "M12,23A11,11,0,1,0,1,12,11.013,11.013,0,0,0,12,23ZM12,3a9,9,0,1,1-9,9A9.01,9.01,0,0,1,12,3ZM8.293,14.293,10.586,12,8.293,9.707A1,1,0,0,1,9.707,8.293L12,10.586l2.293-2.293a1,1,0,0,1,1.414,1.414L13.414,12l2.293,2.293a1,1,0,1,1-1.414,1.414L12,13.414,9.707,15.707a1,1,0,0,1-1.414-1.414Z" })
|
|
842
847
|
], -1)
|
|
843
|
-
]), 8,
|
|
848
|
+
]), 8, ps)) : B("", !0)
|
|
844
849
|
])
|
|
845
|
-
], 8,
|
|
850
|
+
], 8, is))), 256))
|
|
846
851
|
])
|
|
847
852
|
]);
|
|
848
853
|
}
|
|
849
|
-
const
|
|
854
|
+
const qa = /* @__PURE__ */ M(ts, [["render", cs]]), fs = E({
|
|
850
855
|
components: {
|
|
851
856
|
TextInput: Ge
|
|
852
857
|
},
|
|
@@ -858,15 +863,15 @@ const Ra = /* @__PURE__ */ M(es, [["render", ps]]), cs = I({
|
|
|
858
863
|
}
|
|
859
864
|
}
|
|
860
865
|
});
|
|
861
|
-
function
|
|
866
|
+
function ms(t, e, n, r, s, o) {
|
|
862
867
|
const i = j("TextInput");
|
|
863
|
-
return
|
|
868
|
+
return h(), ee(i, {
|
|
864
869
|
name: t.name,
|
|
865
870
|
placeholder: "ایمیل خود را وارد کنید",
|
|
866
871
|
type: "email"
|
|
867
872
|
}, null, 8, ["name"]);
|
|
868
873
|
}
|
|
869
|
-
const
|
|
874
|
+
const Ha = /* @__PURE__ */ M(fs, [["render", ms]]), hs = E({
|
|
870
875
|
props: {
|
|
871
876
|
name: {
|
|
872
877
|
type: String,
|
|
@@ -874,7 +879,7 @@ const Ba = /* @__PURE__ */ M(cs, [["render", fs]]), hs = I({
|
|
|
874
879
|
}
|
|
875
880
|
},
|
|
876
881
|
setup(t, e) {
|
|
877
|
-
return { form:
|
|
882
|
+
return { form: T("form", {
|
|
878
883
|
errors: {},
|
|
879
884
|
getID(r) {
|
|
880
885
|
return r;
|
|
@@ -907,19 +912,19 @@ const Ba = /* @__PURE__ */ M(cs, [["render", fs]]), hs = I({
|
|
|
907
912
|
groupID: "0"
|
|
908
913
|
};
|
|
909
914
|
}
|
|
910
|
-
}),
|
|
911
|
-
function
|
|
912
|
-
return
|
|
915
|
+
}), gs = ["data-name", "data-group-id"];
|
|
916
|
+
function ys(t, e, n, r, s, o) {
|
|
917
|
+
return h(), g("div", {
|
|
913
918
|
class: "form-control-group",
|
|
914
919
|
"data-name": t.name,
|
|
915
920
|
"data-group-id": t.groupID,
|
|
916
921
|
ref: "groupEl"
|
|
917
922
|
}, [
|
|
918
|
-
|
|
919
|
-
], 8,
|
|
923
|
+
O(t.$slots, "default")
|
|
924
|
+
], 8, gs);
|
|
920
925
|
}
|
|
921
|
-
const
|
|
922
|
-
components: { Alert:
|
|
926
|
+
const vs = /* @__PURE__ */ M(hs, [["render", ys]]), _s = E({
|
|
927
|
+
components: { Alert: Fr },
|
|
923
928
|
emits: ["submit", "reset", "onStart", "onFinish", "onSuccess", "onError", "change"],
|
|
924
929
|
props: {
|
|
925
930
|
url: {
|
|
@@ -960,15 +965,16 @@ const ys = /* @__PURE__ */ M(hs, [["render", gs]]), vs = I({
|
|
|
960
965
|
}
|
|
961
966
|
},
|
|
962
967
|
setup(t) {
|
|
963
|
-
const e =
|
|
968
|
+
const e = xn("formEl"), n = tn(t.modelValue), r = Kn({
|
|
964
969
|
hasMessage: !1,
|
|
965
970
|
successMessage: null,
|
|
966
971
|
...t.options,
|
|
967
972
|
...n
|
|
968
973
|
});
|
|
969
974
|
return r.getID = function(s) {
|
|
970
|
-
var
|
|
971
|
-
|
|
975
|
+
var i, a;
|
|
976
|
+
const o = [];
|
|
977
|
+
return (i = e.value) != null && i.id && o.push((a = e.value) == null ? void 0 : a.id), typeof s === String && o.push(s), s.group && (s.group.name || s.group.groupID) && (console.log(s.group), s.group.name && o.push(s.group.name), s.group.groupID && o.push(s.group.groupID)), s.name && o.push(s.name), s.value && o.push(s.value), o.join("-");
|
|
972
978
|
}, { form: r, formData: n, formEl: e };
|
|
973
979
|
},
|
|
974
980
|
provide() {
|
|
@@ -1007,6 +1013,12 @@ const ys = /* @__PURE__ */ M(hs, [["render", gs]]), vs = I({
|
|
|
1007
1013
|
const n = e.maxLength;
|
|
1008
1014
|
n > 0 && e.value.length >= n && this.focusNextField(e);
|
|
1009
1015
|
},
|
|
1016
|
+
handleAutoSubmitLength(t) {
|
|
1017
|
+
const e = t.target;
|
|
1018
|
+
if (!["INPUT", "TEXTAREA"].includes(e.tagName)) return;
|
|
1019
|
+
const n = parseInt(e.dataset.autoSubmitLength, 10);
|
|
1020
|
+
!isNaN(n) && e.value.length >= n && this.submit();
|
|
1021
|
+
},
|
|
1010
1022
|
focusNextField(t) {
|
|
1011
1023
|
const e = Array.from(
|
|
1012
1024
|
this.formEl.querySelectorAll("input, select, textarea")
|
|
@@ -1049,68 +1061,83 @@ const ys = /* @__PURE__ */ M(hs, [["render", gs]]), vs = I({
|
|
|
1049
1061
|
}
|
|
1050
1062
|
},
|
|
1051
1063
|
expose: ["submit", "reset"]
|
|
1052
|
-
}),
|
|
1053
|
-
function
|
|
1064
|
+
}), bs = ["action", "method", "data-autotab", "novalidate"], ws = { class: "list-unstyled p-0 m-0 fanum" }, $s = ["innerHTML"];
|
|
1065
|
+
function Ss(t, e, n, r, s, o) {
|
|
1054
1066
|
const i = j("Alert");
|
|
1055
|
-
return
|
|
1067
|
+
return h(), g("form", {
|
|
1056
1068
|
ref: "formEl",
|
|
1057
1069
|
action: t.url,
|
|
1058
1070
|
method: t.method,
|
|
1059
1071
|
"data-autotab": t.autoTab ? "true" : "",
|
|
1060
|
-
onInput: e[0] || (e[0] = (
|
|
1072
|
+
onInput: e[0] || (e[0] = (a) => {
|
|
1073
|
+
t.handleAutoTab(a), t.handleAutoSubmitLength(a);
|
|
1074
|
+
}),
|
|
1061
1075
|
onSubmit: e[1] || (e[1] = nn((...a) => t.submit && t.submit(...a), ["prevent"])),
|
|
1062
1076
|
onReset: e[2] || (e[2] = (a) => t.$emit("reset")),
|
|
1063
1077
|
class: L({ "form-processing": t.form.processing }),
|
|
1064
1078
|
novalidate: !!Object.values(t.form.errors).length
|
|
1065
1079
|
}, [
|
|
1066
|
-
|
|
1067
|
-
t.form.hasErrors ? (
|
|
1080
|
+
O(t.$slots, "errors", {}, () => [
|
|
1081
|
+
t.form.hasErrors ? (h(), ee(i, {
|
|
1068
1082
|
key: 0,
|
|
1069
1083
|
type: "danger"
|
|
1070
1084
|
}, {
|
|
1071
1085
|
default: ie(() => [
|
|
1072
|
-
$("ul",
|
|
1073
|
-
(
|
|
1086
|
+
$("ul", ws, [
|
|
1087
|
+
(h(!0), g(_e, null, be(t.form.errors, (a) => (h(), g("li", { innerHTML: a }, null, 8, $s))), 256))
|
|
1074
1088
|
])
|
|
1075
1089
|
]),
|
|
1076
1090
|
_: 1
|
|
1077
1091
|
})) : B("", !0)
|
|
1078
1092
|
]),
|
|
1079
|
-
|
|
1080
|
-
t.form.hasMessage && t.form.successMessage ? (
|
|
1093
|
+
O(t.$slots, "message", {}, () => [
|
|
1094
|
+
t.form.hasMessage && t.form.successMessage ? (h(), ee(i, {
|
|
1081
1095
|
key: 0,
|
|
1082
1096
|
type: "success",
|
|
1083
1097
|
innerHTML: t.form.successMessage
|
|
1084
1098
|
}, null, 8, ["innerHTML"])) : B("", !0)
|
|
1085
1099
|
]),
|
|
1086
|
-
|
|
1100
|
+
O(t.$slots, "default", {
|
|
1087
1101
|
form: t.form,
|
|
1088
1102
|
submit: t.submit
|
|
1089
1103
|
})
|
|
1090
|
-
], 42,
|
|
1104
|
+
], 42, bs);
|
|
1091
1105
|
}
|
|
1092
|
-
const
|
|
1106
|
+
const Ga = /* @__PURE__ */ M(_s, [["render", Ss]]), Fs = E({
|
|
1093
1107
|
props: {
|
|
1094
1108
|
default: !1,
|
|
1095
1109
|
required: !1
|
|
1096
1110
|
},
|
|
1097
|
-
emits: ["update:modelValue"]
|
|
1098
|
-
|
|
1111
|
+
emits: ["update:modelValue"],
|
|
1112
|
+
mounted() {
|
|
1113
|
+
var e;
|
|
1114
|
+
const t = this.$el.nextElementSibling;
|
|
1115
|
+
t && (this.forId = t.id || ((e = t.querySelector("[id]")) == null ? void 0 : e.id) || null);
|
|
1116
|
+
},
|
|
1117
|
+
data() {
|
|
1118
|
+
return {
|
|
1119
|
+
forId: null
|
|
1120
|
+
};
|
|
1121
|
+
}
|
|
1122
|
+
}), Ts = ["for"], ks = {
|
|
1099
1123
|
key: 0,
|
|
1100
1124
|
class: "text-danger"
|
|
1101
1125
|
};
|
|
1102
|
-
function
|
|
1103
|
-
return
|
|
1104
|
-
|
|
1105
|
-
t.
|
|
1106
|
-
|
|
1126
|
+
function Is(t, e, n, r, s, o) {
|
|
1127
|
+
return h(), g("label", {
|
|
1128
|
+
class: "mb-2 d-block",
|
|
1129
|
+
for: t.forId
|
|
1130
|
+
}, [
|
|
1131
|
+
O(t.$slots, "default", {}, void 0, !0),
|
|
1132
|
+
t.required ? (h(), g("span", ks, "*")) : B("", !0)
|
|
1133
|
+
], 8, Ts);
|
|
1107
1134
|
}
|
|
1108
|
-
const
|
|
1135
|
+
const Wa = /* @__PURE__ */ M(Fs, [["render", Is], ["__scopeId", "data-v-1ee6dec3"]]), Es = E({
|
|
1109
1136
|
name: "LocationInput",
|
|
1110
1137
|
components: {
|
|
1111
|
-
LMap:
|
|
1112
|
-
LTileLayer:
|
|
1113
|
-
LMarker:
|
|
1138
|
+
LMap: er,
|
|
1139
|
+
LTileLayer: Qn,
|
|
1140
|
+
LMarker: Jn
|
|
1114
1141
|
},
|
|
1115
1142
|
props: {
|
|
1116
1143
|
name: {
|
|
@@ -1129,7 +1156,7 @@ const xa = /* @__PURE__ */ M($s, [["render", Ts], ["__scopeId", "data-v-bfeb9beb
|
|
|
1129
1156
|
modelValue: Object
|
|
1130
1157
|
},
|
|
1131
1158
|
setup(t) {
|
|
1132
|
-
let e =
|
|
1159
|
+
let e = T("form");
|
|
1133
1160
|
return e === void 0 && (e = {
|
|
1134
1161
|
errors: {},
|
|
1135
1162
|
zoom: 8,
|
|
@@ -1162,10 +1189,10 @@ const xa = /* @__PURE__ */ M($s, [["render", Ts], ["__scopeId", "data-v-bfeb9beb
|
|
|
1162
1189
|
};
|
|
1163
1190
|
}
|
|
1164
1191
|
});
|
|
1165
|
-
function
|
|
1192
|
+
function Cs(t, e, n, r, s, o) {
|
|
1166
1193
|
var u;
|
|
1167
1194
|
const i = j("l-tile-layer"), a = j("LMarker"), l = j("l-map");
|
|
1168
|
-
return
|
|
1195
|
+
return h(), g("div", {
|
|
1169
1196
|
class: L(["location-map-container", { disabled: t.disabled || t.form.processing, "is-invalid": ((u = t.form) == null ? void 0 : u.errors[t.name]) !== void 0 }])
|
|
1170
1197
|
}, [
|
|
1171
1198
|
Q(l, {
|
|
@@ -1182,7 +1209,7 @@ function Es(t, e, n, r, s, o) {
|
|
|
1182
1209
|
"layer-type": "base",
|
|
1183
1210
|
name: "OpenStreetMap"
|
|
1184
1211
|
}),
|
|
1185
|
-
t.marker ? (
|
|
1212
|
+
t.marker ? (h(), ee(a, {
|
|
1186
1213
|
key: 0,
|
|
1187
1214
|
"lat-lng": t.marker,
|
|
1188
1215
|
draggable: !t.readonly && !t.disabled,
|
|
@@ -1193,7 +1220,7 @@ function Es(t, e, n, r, s, o) {
|
|
|
1193
1220
|
}, 8, ["zoom", "center", "onClick"])
|
|
1194
1221
|
], 2);
|
|
1195
1222
|
}
|
|
1196
|
-
const
|
|
1223
|
+
const Ya = /* @__PURE__ */ M(Es, [["render", Cs]]), Vs = E({
|
|
1197
1224
|
components: {
|
|
1198
1225
|
TextInput: Ge
|
|
1199
1226
|
},
|
|
@@ -1205,15 +1232,16 @@ const La = /* @__PURE__ */ M(ks, [["render", Es]]), Is = I({
|
|
|
1205
1232
|
}
|
|
1206
1233
|
}
|
|
1207
1234
|
});
|
|
1208
|
-
function
|
|
1235
|
+
function Ms(t, e, n, r, s, o) {
|
|
1209
1236
|
const i = j("TextInput");
|
|
1210
|
-
return
|
|
1237
|
+
return h(), ee(i, {
|
|
1211
1238
|
name: t.name,
|
|
1212
1239
|
placeholder: "موبایل خود را وارد کنید",
|
|
1213
|
-
type: "tel"
|
|
1240
|
+
type: "tel",
|
|
1241
|
+
class: "form-control-mobile fanum"
|
|
1214
1242
|
}, null, 8, ["name"]);
|
|
1215
1243
|
}
|
|
1216
|
-
const
|
|
1244
|
+
const Xa = /* @__PURE__ */ M(Vs, [["render", Ms]]), Us = E({
|
|
1217
1245
|
components: {
|
|
1218
1246
|
TextInput: Ge
|
|
1219
1247
|
},
|
|
@@ -1225,15 +1253,15 @@ const qa = /* @__PURE__ */ M(Is, [["render", Cs]]), Vs = I({
|
|
|
1225
1253
|
}
|
|
1226
1254
|
}
|
|
1227
1255
|
});
|
|
1228
|
-
function
|
|
1256
|
+
function As(t, e, n, r, s, o) {
|
|
1229
1257
|
const i = j("TextInput");
|
|
1230
|
-
return
|
|
1258
|
+
return h(), ee(i, {
|
|
1231
1259
|
name: t.name,
|
|
1232
1260
|
placeholder: "گذرواژه خود را وارد کنید",
|
|
1233
1261
|
type: "password"
|
|
1234
1262
|
}, null, 8, ["name"]);
|
|
1235
1263
|
}
|
|
1236
|
-
const
|
|
1264
|
+
const Za = /* @__PURE__ */ M(Us, [["render", As]]), Ns = E({
|
|
1237
1265
|
components: { InputGroup: _t, InputGroupText: bt },
|
|
1238
1266
|
props: {
|
|
1239
1267
|
name: {
|
|
@@ -1257,7 +1285,7 @@ const Ha = /* @__PURE__ */ M(Vs, [["render", Ms]]), Us = I({
|
|
|
1257
1285
|
}
|
|
1258
1286
|
},
|
|
1259
1287
|
setup(t) {
|
|
1260
|
-
let e =
|
|
1288
|
+
let e = T("form"), n = T("group", {});
|
|
1261
1289
|
e === void 0 && (e = {
|
|
1262
1290
|
errors: {},
|
|
1263
1291
|
getID(s) {
|
|
@@ -1291,10 +1319,10 @@ const Ha = /* @__PURE__ */ M(Vs, [["render", Ms]]), Us = I({
|
|
|
1291
1319
|
data() {
|
|
1292
1320
|
return {};
|
|
1293
1321
|
}
|
|
1294
|
-
}),
|
|
1295
|
-
function
|
|
1322
|
+
}), Ps = ["name", "value", "disabled", "readonly"];
|
|
1323
|
+
function Ds(t, e, n, r, s, o) {
|
|
1296
1324
|
const i = j("InputGroupText"), a = j("InputGroup"), l = qn("maska");
|
|
1297
|
-
return
|
|
1325
|
+
return h(), ee(a, { class: "input-group-quantity" }, {
|
|
1298
1326
|
default: ie(() => [
|
|
1299
1327
|
$("button", {
|
|
1300
1328
|
onClick: e[0] || (e[0] = (...u) => t.increment && t.increment(...u)),
|
|
@@ -1314,7 +1342,7 @@ function zs(t, e, n, r, s, o) {
|
|
|
1314
1342
|
})
|
|
1315
1343
|
], -1)
|
|
1316
1344
|
])),
|
|
1317
|
-
|
|
1345
|
+
te($("input", {
|
|
1318
1346
|
name: t.name,
|
|
1319
1347
|
value: this.modelValue,
|
|
1320
1348
|
"data-maska": "###,###,###,###,###,###,###",
|
|
@@ -1324,7 +1352,7 @@ function zs(t, e, n, r, s, o) {
|
|
|
1324
1352
|
disabled: t.disabled || t.form.processing,
|
|
1325
1353
|
readonly: t.readonly,
|
|
1326
1354
|
type: "tel"
|
|
1327
|
-
}, null, 42,
|
|
1355
|
+
}, null, 42, Ps), [
|
|
1328
1356
|
[l]
|
|
1329
1357
|
]),
|
|
1330
1358
|
$("button", {
|
|
@@ -1348,17 +1376,17 @@ function zs(t, e, n, r, s, o) {
|
|
|
1348
1376
|
])),
|
|
1349
1377
|
Q(i, { class: "fanum" }, {
|
|
1350
1378
|
default: ie(() => [
|
|
1351
|
-
gt(
|
|
1379
|
+
gt(W(t.unit), 1)
|
|
1352
1380
|
]),
|
|
1353
1381
|
_: 1
|
|
1354
1382
|
}),
|
|
1355
|
-
|
|
1383
|
+
O(t.$slots, "suffix")
|
|
1356
1384
|
]),
|
|
1357
1385
|
_: 3
|
|
1358
1386
|
});
|
|
1359
1387
|
}
|
|
1360
|
-
const
|
|
1361
|
-
components: { GroupControl:
|
|
1388
|
+
const zs = /* @__PURE__ */ M(Ns, [["render", Ds]]), Os = E({
|
|
1389
|
+
components: { GroupControl: vs, QuantityInput: zs, InputGroup: _t, InputGroupText: bt, Dropdown: ar, DropdownToggle: cr, DropdownMenu: pr },
|
|
1362
1390
|
props: {
|
|
1363
1391
|
name: {
|
|
1364
1392
|
type: String,
|
|
@@ -1394,7 +1422,7 @@ const Ps = /* @__PURE__ */ M(Us, [["render", zs]]), Ns = I({
|
|
|
1394
1422
|
}
|
|
1395
1423
|
},
|
|
1396
1424
|
setup(t) {
|
|
1397
|
-
let e =
|
|
1425
|
+
let e = T("form"), n = T("group", {});
|
|
1398
1426
|
return e === void 0 && (e = {
|
|
1399
1427
|
errors: {},
|
|
1400
1428
|
getID(s) {
|
|
@@ -1434,29 +1462,29 @@ const Ps = /* @__PURE__ */ M(Us, [["render", zs]]), Ns = I({
|
|
|
1434
1462
|
showDropdown: !1
|
|
1435
1463
|
};
|
|
1436
1464
|
}
|
|
1437
|
-
}),
|
|
1465
|
+
}), Rs = {
|
|
1438
1466
|
ref: "input",
|
|
1439
1467
|
class: "multi-quantity-input fanum"
|
|
1440
|
-
},
|
|
1441
|
-
function
|
|
1468
|
+
}, Bs = { class: "row align-items-center justify-content-between g-0" }, js = ["innerHTML"], Ls = { class: "col-auto" };
|
|
1469
|
+
function xs(t, e, n, r, s, o) {
|
|
1442
1470
|
const i = j("QuantityInput"), a = j("GroupControl");
|
|
1443
|
-
return
|
|
1471
|
+
return h(), g("div", Rs, [
|
|
1444
1472
|
$("button", {
|
|
1445
1473
|
type: "button",
|
|
1446
1474
|
class: "form-control fanum dropdown-toggle",
|
|
1447
1475
|
onClick: e[0] || (e[0] = nn((...l) => t.show && t.show(...l), ["prevent"]))
|
|
1448
|
-
},
|
|
1476
|
+
}, W(t.totalQuantity) + " " + W(t.unit), 1),
|
|
1449
1477
|
$("div", {
|
|
1450
1478
|
class: L(["multi-quantity-input--dropdown", { show: t.showDropdown }])
|
|
1451
1479
|
}, [
|
|
1452
1480
|
Q(a, { name: t.name }, {
|
|
1453
1481
|
default: ie(() => [
|
|
1454
|
-
(
|
|
1482
|
+
(h(!0), g(_e, null, be(t.options, (l, u) => (h(), g("div", Bs, [
|
|
1455
1483
|
$("div", {
|
|
1456
1484
|
class: "col-auto",
|
|
1457
1485
|
innerHTML: (l == null ? void 0 : l.name) || l
|
|
1458
|
-
}, null, 8,
|
|
1459
|
-
$("div",
|
|
1486
|
+
}, null, 8, js),
|
|
1487
|
+
$("div", Ls, [
|
|
1460
1488
|
Q(i, {
|
|
1461
1489
|
name: u,
|
|
1462
1490
|
min: l.min || t.min,
|
|
@@ -1470,7 +1498,7 @@ function js(t, e, n, r, s, o) {
|
|
|
1470
1498
|
], 2)
|
|
1471
1499
|
], 512);
|
|
1472
1500
|
}
|
|
1473
|
-
const
|
|
1501
|
+
const Ka = /* @__PURE__ */ M(Os, [["render", xs]]), qs = E({
|
|
1474
1502
|
emits: ["update:modelValue", "search", "searching", "change", "selected"],
|
|
1475
1503
|
props: {
|
|
1476
1504
|
name: {
|
|
@@ -1527,12 +1555,12 @@ const Ga = /* @__PURE__ */ M(Ns, [["render", js]]), xs = I({
|
|
|
1527
1555
|
}
|
|
1528
1556
|
},
|
|
1529
1557
|
setup(t) {
|
|
1530
|
-
let e =
|
|
1558
|
+
let e = T("form", {
|
|
1531
1559
|
errors: {},
|
|
1532
1560
|
getID(s) {
|
|
1533
1561
|
return s;
|
|
1534
1562
|
}
|
|
1535
|
-
}), n =
|
|
1563
|
+
}), n = T("group", {});
|
|
1536
1564
|
return { modelValue: q({
|
|
1537
1565
|
get() {
|
|
1538
1566
|
var s;
|
|
@@ -1653,15 +1681,15 @@ const Ga = /* @__PURE__ */ M(Ns, [["render", js]]), xs = I({
|
|
|
1653
1681
|
}
|
|
1654
1682
|
};
|
|
1655
1683
|
}
|
|
1656
|
-
}),
|
|
1657
|
-
function
|
|
1658
|
-
return
|
|
1684
|
+
}), Hs = ["name", "id"], Gs = ["value", "selected"];
|
|
1685
|
+
function Ws(t, e, n, r, s, o) {
|
|
1686
|
+
return h(), g("div", {
|
|
1659
1687
|
class: L(["select2-controller", {
|
|
1660
1688
|
"is-invalid": t.form.errors[t.name],
|
|
1661
1689
|
"select2-dropdown-hidden": t.hideDropdown === !0
|
|
1662
1690
|
}])
|
|
1663
1691
|
}, [
|
|
1664
|
-
|
|
1692
|
+
te($("select", en(t.$props, {
|
|
1665
1693
|
name: t.name,
|
|
1666
1694
|
id: t.name,
|
|
1667
1695
|
"onUpdate:modelValue": e[0] || (e[0] = (i) => t.modelValue = i),
|
|
@@ -1671,16 +1699,16 @@ function Hs(t, e, n, r, s, o) {
|
|
|
1671
1699
|
}],
|
|
1672
1700
|
ref: "input"
|
|
1673
1701
|
}), [
|
|
1674
|
-
(
|
|
1702
|
+
(h(!0), g(_e, null, be(t.options, (i, a) => (h(), g("option", {
|
|
1675
1703
|
value: t.getKeyFromItem(i),
|
|
1676
1704
|
selected: t.selected(i)
|
|
1677
|
-
},
|
|
1678
|
-
], 16,
|
|
1705
|
+
}, W(t.getLabelFromItem(i)), 9, Gs))), 256))
|
|
1706
|
+
], 16, Hs), [
|
|
1679
1707
|
[Hn, t.modelValue]
|
|
1680
1708
|
])
|
|
1681
1709
|
], 2);
|
|
1682
1710
|
}
|
|
1683
|
-
const
|
|
1711
|
+
const Ja = /* @__PURE__ */ M(qs, [["render", Ws]]), Ys = E({
|
|
1684
1712
|
emits: ["update:modelValue"],
|
|
1685
1713
|
props: {
|
|
1686
1714
|
name: {
|
|
@@ -1713,7 +1741,7 @@ const Wa = /* @__PURE__ */ M(xs, [["render", Hs]]), Gs = I({
|
|
|
1713
1741
|
}
|
|
1714
1742
|
},
|
|
1715
1743
|
setup(t) {
|
|
1716
|
-
let e =
|
|
1744
|
+
let e = T("form");
|
|
1717
1745
|
return e === void 0 && (e = {
|
|
1718
1746
|
errors: {},
|
|
1719
1747
|
getID(n) {
|
|
@@ -1755,12 +1783,12 @@ const Wa = /* @__PURE__ */ M(xs, [["render", Hs]]), Gs = I({
|
|
|
1755
1783
|
isRTL: !1
|
|
1756
1784
|
};
|
|
1757
1785
|
}
|
|
1758
|
-
}),
|
|
1786
|
+
}), Xs = { class: "star-rating" }, Zs = {
|
|
1759
1787
|
key: 0,
|
|
1760
1788
|
class: "rating-value fanum"
|
|
1761
1789
|
};
|
|
1762
|
-
function
|
|
1763
|
-
return
|
|
1790
|
+
function Ks(t, e, n, r, s, o) {
|
|
1791
|
+
return h(), g("div", Xs, [
|
|
1764
1792
|
$("div", {
|
|
1765
1793
|
class: "star-rating-container",
|
|
1766
1794
|
ref: "ratingContainer",
|
|
@@ -1768,7 +1796,7 @@ function Xs(t, e, n, r, s, o) {
|
|
|
1768
1796
|
onMousemove: e[1] || (e[1] = (...i) => t.setHover && t.setHover(...i)),
|
|
1769
1797
|
onClick: e[2] || (e[2] = (...i) => t.updateRating && t.updateRating(...i))
|
|
1770
1798
|
}, [
|
|
1771
|
-
(
|
|
1799
|
+
(h(!0), g(_e, null, be(t.maxStars, (i) => (h(), g("div", {
|
|
1772
1800
|
key: i,
|
|
1773
1801
|
class: "star-wrapper"
|
|
1774
1802
|
}, [
|
|
@@ -1779,12 +1807,12 @@ function Xs(t, e, n, r, s, o) {
|
|
|
1779
1807
|
}, "★", 4)
|
|
1780
1808
|
]))), 128))
|
|
1781
1809
|
], 544),
|
|
1782
|
-
t.showValue && t.displayRating > 0 ? (
|
|
1810
|
+
t.showValue && t.displayRating > 0 ? (h(), g("div", Zs, W(t.displayRating), 1)) : B("", !0)
|
|
1783
1811
|
]);
|
|
1784
1812
|
}
|
|
1785
|
-
const
|
|
1813
|
+
const Qa = /* @__PURE__ */ M(Ys, [["render", Ks]]), Js = E({
|
|
1786
1814
|
components: {
|
|
1787
|
-
Spinner:
|
|
1815
|
+
Spinner: wr
|
|
1788
1816
|
},
|
|
1789
1817
|
inject: ["form"],
|
|
1790
1818
|
props: {
|
|
@@ -1793,32 +1821,32 @@ const Ya = /* @__PURE__ */ M(Gs, [["render", Xs]]), Zs = I({
|
|
|
1793
1821
|
default: !1
|
|
1794
1822
|
}
|
|
1795
1823
|
}
|
|
1796
|
-
}),
|
|
1824
|
+
}), Qs = ["disabled"], ei = {
|
|
1797
1825
|
key: 0,
|
|
1798
1826
|
class: "submit-upload-percent"
|
|
1799
1827
|
};
|
|
1800
|
-
function
|
|
1828
|
+
function ti(t, e, n, r, s, o) {
|
|
1801
1829
|
var a, l, u, d;
|
|
1802
1830
|
const i = j("Spinner");
|
|
1803
|
-
return
|
|
1831
|
+
return h(), g("button", {
|
|
1804
1832
|
type: "submit",
|
|
1805
1833
|
disabled: t.disabled || ((a = t.form) == null ? void 0 : a.processing) || ((l = t.form) == null ? void 0 : l.uploading)
|
|
1806
1834
|
}, [
|
|
1807
|
-
(u = t.form) != null && u.processing || (d = t.form) != null && d.uploading ? (
|
|
1808
|
-
|
|
1835
|
+
(u = t.form) != null && u.processing || (d = t.form) != null && d.uploading ? (h(), ee(i, { key: 0 })) : B("", !0),
|
|
1836
|
+
O(t.$slots, "default", { form: t.form }, () => [
|
|
1809
1837
|
e[0] || (e[0] = gt(" تایید و ثبت اطلاعات "))
|
|
1810
1838
|
]),
|
|
1811
|
-
|
|
1839
|
+
O(t.$slots, "progress", {}, () => {
|
|
1812
1840
|
var p, c;
|
|
1813
1841
|
return [
|
|
1814
|
-
(p = t.form) != null && p.uploading ? (
|
|
1842
|
+
(p = t.form) != null && p.uploading ? (h(), g("span", ei, W((c = t.form) == null ? void 0 : c.uploading) + "%", 1)) : B("", !0)
|
|
1815
1843
|
];
|
|
1816
1844
|
})
|
|
1817
|
-
], 8,
|
|
1845
|
+
], 8, Qs);
|
|
1818
1846
|
}
|
|
1819
|
-
const
|
|
1847
|
+
const el = /* @__PURE__ */ M(Js, [["render", ti]]), ni = E({
|
|
1820
1848
|
components: {
|
|
1821
|
-
VueTelInput:
|
|
1849
|
+
VueTelInput: tr
|
|
1822
1850
|
},
|
|
1823
1851
|
props: {
|
|
1824
1852
|
name: {
|
|
@@ -1832,7 +1860,7 @@ const Xa = /* @__PURE__ */ M(Zs, [["render", Qs]]), ei = I({
|
|
|
1832
1860
|
}
|
|
1833
1861
|
},
|
|
1834
1862
|
setup(t) {
|
|
1835
|
-
let e =
|
|
1863
|
+
let e = T("form");
|
|
1836
1864
|
return e === void 0 && (e = {
|
|
1837
1865
|
errors: {},
|
|
1838
1866
|
getID(n) {
|
|
@@ -1850,14 +1878,14 @@ const Xa = /* @__PURE__ */ M(Zs, [["render", Qs]]), ei = I({
|
|
|
1850
1878
|
valid: null
|
|
1851
1879
|
};
|
|
1852
1880
|
}
|
|
1853
|
-
}),
|
|
1881
|
+
}), ri = {
|
|
1854
1882
|
class: "telephone-input input-group fanum",
|
|
1855
1883
|
dir: "ltr"
|
|
1856
1884
|
};
|
|
1857
|
-
function
|
|
1885
|
+
function si(t, e, n, r, s, o) {
|
|
1858
1886
|
var a;
|
|
1859
1887
|
const i = j("vue-tel-input");
|
|
1860
|
-
return
|
|
1888
|
+
return h(), g("div", ri, [
|
|
1861
1889
|
Q(i, {
|
|
1862
1890
|
mode: "national",
|
|
1863
1891
|
validCharactersOnly: !0,
|
|
@@ -1876,11 +1904,11 @@ function ni(t, e, n, r, s, o) {
|
|
|
1876
1904
|
},
|
|
1877
1905
|
modelValue: t.defaultValue,
|
|
1878
1906
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.defaultValue = l),
|
|
1879
|
-
styleClasses: "form-control" + (t.valid === !1 || ((a = t.form) == null ? void 0 : a.errors[t.name]) !== void 0 ? " is-invalid" : "")
|
|
1907
|
+
styleClasses: "form-control form-control-tel fanum " + (t.valid === !1 || ((a = t.form) == null ? void 0 : a.errors[t.name]) !== void 0 ? " is-invalid" : "")
|
|
1880
1908
|
}, null, 8, ["onOnInput", "inputOptions", "modelValue", "styleClasses"])
|
|
1881
1909
|
]);
|
|
1882
1910
|
}
|
|
1883
|
-
const
|
|
1911
|
+
const tl = /* @__PURE__ */ M(ni, [["render", si]]), ii = E({
|
|
1884
1912
|
props: {
|
|
1885
1913
|
name: {
|
|
1886
1914
|
type: String,
|
|
@@ -1888,12 +1916,12 @@ const Za = /* @__PURE__ */ M(ei, [["render", ni]]), ri = I({
|
|
|
1888
1916
|
}
|
|
1889
1917
|
},
|
|
1890
1918
|
setup(t) {
|
|
1891
|
-
let e =
|
|
1919
|
+
let e = T("form", {
|
|
1892
1920
|
errors: {},
|
|
1893
1921
|
getID(s) {
|
|
1894
1922
|
return s;
|
|
1895
1923
|
}
|
|
1896
|
-
}), n =
|
|
1924
|
+
}), n = T("group", {});
|
|
1897
1925
|
return { modelValue: q({
|
|
1898
1926
|
get() {
|
|
1899
1927
|
var s;
|
|
@@ -1905,19 +1933,81 @@ const Za = /* @__PURE__ */ M(ei, [["render", ni]]), ri = I({
|
|
|
1905
1933
|
}
|
|
1906
1934
|
}), form: e, group: n };
|
|
1907
1935
|
}
|
|
1908
|
-
}),
|
|
1909
|
-
function
|
|
1936
|
+
}), oi = ["name", "disabled"];
|
|
1937
|
+
function ai(t, e, n, r, s, o) {
|
|
1910
1938
|
var i, a;
|
|
1911
|
-
return
|
|
1939
|
+
return te((h(), g("textarea", {
|
|
1912
1940
|
name: t.name,
|
|
1913
1941
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.modelValue = l),
|
|
1914
1942
|
class: L([{ "is-invalid": ((i = t.form) == null ? void 0 : i.errors[t.name]) !== void 0 }, "form-control"]),
|
|
1915
1943
|
disabled: (a = t.form) == null ? void 0 : a.processing
|
|
1916
|
-
}, null, 10,
|
|
1917
|
-
[
|
|
1944
|
+
}, null, 10, oi)), [
|
|
1945
|
+
[Me, t.modelValue]
|
|
1946
|
+
]);
|
|
1947
|
+
}
|
|
1948
|
+
const nl = /* @__PURE__ */ M(ii, [["render", ai]]), li = E({
|
|
1949
|
+
props: {
|
|
1950
|
+
name: {
|
|
1951
|
+
type: String,
|
|
1952
|
+
required: !0
|
|
1953
|
+
},
|
|
1954
|
+
maxLength: {
|
|
1955
|
+
type: Number,
|
|
1956
|
+
default: 5
|
|
1957
|
+
},
|
|
1958
|
+
placeholder: {
|
|
1959
|
+
type: String,
|
|
1960
|
+
default: ""
|
|
1961
|
+
}
|
|
1962
|
+
},
|
|
1963
|
+
computed: {
|
|
1964
|
+
inputID() {
|
|
1965
|
+
return this.form.getID(this);
|
|
1966
|
+
},
|
|
1967
|
+
placeholderLines() {
|
|
1968
|
+
return this.placeholder ? this.placeholder : "_".repeat(this.maxLength);
|
|
1969
|
+
}
|
|
1970
|
+
},
|
|
1971
|
+
setup(t) {
|
|
1972
|
+
const e = Gn(["completed"]);
|
|
1973
|
+
let n = T("form", {
|
|
1974
|
+
errors: {},
|
|
1975
|
+
getID(o) {
|
|
1976
|
+
return o;
|
|
1977
|
+
}
|
|
1978
|
+
}), r = T("group", {});
|
|
1979
|
+
const s = q({
|
|
1980
|
+
get() {
|
|
1981
|
+
var o;
|
|
1982
|
+
return r.value && n.value[r.value.name] ? (o = r.value) == null ? void 0 : o.getData(t.name) : n.value[t.name];
|
|
1983
|
+
},
|
|
1984
|
+
set(o) {
|
|
1985
|
+
var i;
|
|
1986
|
+
(i = r == null ? void 0 : r.value) != null && i.name ? r.value.setData(t.name, o) : n.value[t.name] = o;
|
|
1987
|
+
}
|
|
1988
|
+
});
|
|
1989
|
+
return he(s, (o) => {
|
|
1990
|
+
o && o.length >= t.maxLength && e("completed", o);
|
|
1991
|
+
}), { modelValue: s, form: n, group: r };
|
|
1992
|
+
}
|
|
1993
|
+
}), ui = ["name", "id", "disabled", "placeholder", "maxlength", "data-auto-submit-length"];
|
|
1994
|
+
function di(t, e, n, r, s, o) {
|
|
1995
|
+
var i, a;
|
|
1996
|
+
return te((h(), g("input", {
|
|
1997
|
+
name: t.name,
|
|
1998
|
+
id: t.inputID,
|
|
1999
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.modelValue = l),
|
|
2000
|
+
class: L([{ "is-invalid": ((i = t.form) == null ? void 0 : i.errors[t.name]) !== void 0 }, "form-control form-control-otp fanum"]),
|
|
2001
|
+
disabled: (a = t.form) == null ? void 0 : a.processing,
|
|
2002
|
+
placeholder: t.placeholderLines,
|
|
2003
|
+
maxlength: t.maxLength,
|
|
2004
|
+
"data-auto-submit-length": t.maxLength,
|
|
2005
|
+
type: "tel"
|
|
2006
|
+
}, null, 10, ui)), [
|
|
2007
|
+
[Me, t.modelValue]
|
|
1918
2008
|
]);
|
|
1919
2009
|
}
|
|
1920
|
-
const
|
|
2010
|
+
const rl = /* @__PURE__ */ M(li, [["render", di]]), sl = {
|
|
1921
2011
|
__name: "DropzoneInput",
|
|
1922
2012
|
props: {
|
|
1923
2013
|
name: {
|
|
@@ -1934,11 +2024,11 @@ const Ka = /* @__PURE__ */ M(ri, [["render", ii]]), Ja = {
|
|
|
1934
2024
|
},
|
|
1935
2025
|
emits: ["update:modelValue"],
|
|
1936
2026
|
setup(t, { emit: e }) {
|
|
1937
|
-
const n = t, r = e, s =
|
|
2027
|
+
const n = t, r = e, s = T("form", {
|
|
1938
2028
|
value: {},
|
|
1939
2029
|
errors: {},
|
|
1940
2030
|
getID: (u) => u
|
|
1941
|
-
}), o =
|
|
2031
|
+
}), o = T("group", null), i = G(null), a = G(null), l = q({
|
|
1942
2032
|
get() {
|
|
1943
2033
|
var u;
|
|
1944
2034
|
return (u = o == null ? void 0 : o.value) != null && u.name ? o.value.getData(n.name) : s.value[n.name];
|
|
@@ -1948,8 +2038,8 @@ const Ka = /* @__PURE__ */ M(ri, [["render", ii]]), Ja = {
|
|
|
1948
2038
|
(d = o == null ? void 0 : o.value) != null && d.name ? o.value.setData(n.name, u) : s.value[n.name] = u, r("update:modelValue", u);
|
|
1949
2039
|
}
|
|
1950
2040
|
});
|
|
1951
|
-
return
|
|
1952
|
-
a.value = new
|
|
2041
|
+
return ve(() => {
|
|
2042
|
+
a.value = new nr(i.value, {
|
|
1953
2043
|
url: n.url,
|
|
1954
2044
|
addRemoveLinks: !0,
|
|
1955
2045
|
maxFiles: n.multiple ? null : 1,
|
|
@@ -1978,13 +2068,13 @@ const Ka = /* @__PURE__ */ M(ri, [["render", ii]]), Ja = {
|
|
|
1978
2068
|
console.error("حذف فایل در سرور با خطا مواجه شد", p);
|
|
1979
2069
|
}
|
|
1980
2070
|
});
|
|
1981
|
-
}), (u, d) => (
|
|
2071
|
+
}), (u, d) => (h(), g("div", {
|
|
1982
2072
|
class: "inertia-dropzone-input dropzone",
|
|
1983
2073
|
ref_key: "dz",
|
|
1984
2074
|
ref: i
|
|
1985
2075
|
}, null, 512));
|
|
1986
2076
|
}
|
|
1987
|
-
},
|
|
2077
|
+
}, pi = E({
|
|
1988
2078
|
props: {
|
|
1989
2079
|
modelValue: "",
|
|
1990
2080
|
name: {
|
|
@@ -2001,7 +2091,7 @@ const Ka = /* @__PURE__ */ M(ri, [["render", ii]]), Ja = {
|
|
|
2001
2091
|
}
|
|
2002
2092
|
},
|
|
2003
2093
|
setup(t) {
|
|
2004
|
-
let e =
|
|
2094
|
+
let e = T("form");
|
|
2005
2095
|
return e === void 0 && (e = {
|
|
2006
2096
|
errors: {},
|
|
2007
2097
|
getID(n) {
|
|
@@ -2065,19 +2155,19 @@ const Ka = /* @__PURE__ */ M(ri, [["render", ii]]), Ja = {
|
|
|
2065
2155
|
files: []
|
|
2066
2156
|
};
|
|
2067
2157
|
}
|
|
2068
|
-
}),
|
|
2158
|
+
}), ci = { class: "file-input-uploader" }, fi = ["name", "disabled", "multiple"], mi = { class: "file-input-uploader--list" }, hi = ["id"], gi = {
|
|
2069
2159
|
key: 0,
|
|
2070
2160
|
class: "file-input-uploader--progress"
|
|
2071
|
-
},
|
|
2161
|
+
}, yi = {
|
|
2072
2162
|
key: 1,
|
|
2073
2163
|
class: "file-input-uploader--list-error"
|
|
2074
|
-
},
|
|
2164
|
+
}, vi = {
|
|
2075
2165
|
class: "file-input-uploader--list-item--size",
|
|
2076
2166
|
dir: "ltr"
|
|
2077
|
-
},
|
|
2078
|
-
function
|
|
2167
|
+
}, _i = { class: "file-input-uploader--list-item--actions" }, bi = ["onClick"], wi = ["onClick"];
|
|
2168
|
+
function $i(t, e, n, r, s, o) {
|
|
2079
2169
|
var i, a;
|
|
2080
|
-
return
|
|
2170
|
+
return h(), g("div", ci, [
|
|
2081
2171
|
$("input", {
|
|
2082
2172
|
ref: "input",
|
|
2083
2173
|
name: t.name,
|
|
@@ -2086,22 +2176,22 @@ function yi(t, e, n, r, s, o) {
|
|
|
2086
2176
|
type: "file",
|
|
2087
2177
|
multiple: t.multiple,
|
|
2088
2178
|
onChange: e[0] || (e[0] = (...l) => t.fileSelected && t.fileSelected(...l))
|
|
2089
|
-
}, null, 42,
|
|
2090
|
-
$("div",
|
|
2091
|
-
(
|
|
2179
|
+
}, null, 42, fi),
|
|
2180
|
+
$("div", mi, [
|
|
2181
|
+
(h(!0), g(_e, null, be(t.allFiles, (l) => (h(), g("div", {
|
|
2092
2182
|
id: "file-" + l.id,
|
|
2093
2183
|
class: "file-input-uploader--list-item"
|
|
2094
2184
|
}, [
|
|
2095
|
-
l.percent && l.percent < 100 ? (
|
|
2185
|
+
l.percent && l.percent < 100 ? (h(), g("div", gi, [
|
|
2096
2186
|
$("div", {
|
|
2097
2187
|
style: vt({ width: l.percent + "%" })
|
|
2098
2188
|
}, null, 4)
|
|
2099
2189
|
])) : B("", !0),
|
|
2100
|
-
$("div", null,
|
|
2101
|
-
l.error ? (
|
|
2102
|
-
$("div",
|
|
2103
|
-
$("div",
|
|
2104
|
-
l.error ? (
|
|
2190
|
+
$("div", null, W(l.file.name), 1),
|
|
2191
|
+
l.error ? (h(), g("div", yi, W(l.error), 1)) : B("", !0),
|
|
2192
|
+
$("div", vi, W(Math.round(l.file.size / 1024)) + "Kb", 1),
|
|
2193
|
+
$("div", _i, [
|
|
2194
|
+
l.error ? (h(), g("button", {
|
|
2105
2195
|
key: 0,
|
|
2106
2196
|
onClick: (u) => t.uploadFile(l),
|
|
2107
2197
|
type: "button",
|
|
@@ -2116,8 +2206,8 @@ function yi(t, e, n, r, s, o) {
|
|
|
2116
2206
|
}, [
|
|
2117
2207
|
$("path", { d: "M1,12A11,11,0,0,1,17.882,2.7l1.411-1.41A1,1,0,0,1,21,2V6a1,1,0,0,1-1,1H16a1,1,0,0,1-.707-1.707l1.128-1.128A8.994,8.994,0,0,0,3,12a1,1,0,0,1-2,0Zm21-1a1,1,0,0,0-1,1,9.01,9.01,0,0,1-9,9,8.9,8.9,0,0,1-4.42-1.166l1.127-1.127A1,1,0,0,0,8,17H4a1,1,0,0,0-1,1v4a1,1,0,0,0,.617.924A.987.987,0,0,0,4,23a1,1,0,0,0,.707-.293L6.118,21.3A10.891,10.891,0,0,0,12,23,11.013,11.013,0,0,0,23,12,1,1,0,0,0,22,11Z" })
|
|
2118
2208
|
], -1)
|
|
2119
|
-
]), 8,
|
|
2120
|
-
l.path || l.error ? (
|
|
2209
|
+
]), 8, bi)) : B("", !0),
|
|
2210
|
+
l.path || l.error ? (h(), g("button", {
|
|
2121
2211
|
key: 1,
|
|
2122
2212
|
onClick: (u) => t.deleteFile(l),
|
|
2123
2213
|
type: "button",
|
|
@@ -2132,13 +2222,13 @@ function yi(t, e, n, r, s, o) {
|
|
|
2132
2222
|
}, [
|
|
2133
2223
|
$("path", { d: "M12,23A11,11,0,1,0,1,12,11.013,11.013,0,0,0,12,23ZM12,3a9,9,0,1,1-9,9A9.01,9.01,0,0,1,12,3ZM8.293,14.293,10.586,12,8.293,9.707A1,1,0,0,1,9.707,8.293L12,10.586l2.293-2.293a1,1,0,0,1,1.414,1.414L13.414,12l2.293,2.293a1,1,0,1,1-1.414,1.414L12,13.414,9.707,15.707a1,1,0,0,1-1.414-1.414Z" })
|
|
2134
2224
|
], -1)
|
|
2135
|
-
]), 8,
|
|
2225
|
+
]), 8, wi)) : B("", !0)
|
|
2136
2226
|
])
|
|
2137
|
-
], 8,
|
|
2227
|
+
], 8, hi))), 256))
|
|
2138
2228
|
])
|
|
2139
2229
|
]);
|
|
2140
2230
|
}
|
|
2141
|
-
const
|
|
2231
|
+
const il = /* @__PURE__ */ M(pi, [["render", $i]]), Si = E({
|
|
2142
2232
|
emits: ["update:modelValue", "change"],
|
|
2143
2233
|
props: {
|
|
2144
2234
|
name: {
|
|
@@ -2179,12 +2269,12 @@ const Qa = /* @__PURE__ */ M(oi, [["render", yi]]), vi = I({
|
|
|
2179
2269
|
}
|
|
2180
2270
|
},
|
|
2181
2271
|
setup(t) {
|
|
2182
|
-
let e =
|
|
2272
|
+
let e = T("form", {
|
|
2183
2273
|
errors: {},
|
|
2184
2274
|
getID(s) {
|
|
2185
2275
|
return s;
|
|
2186
2276
|
}
|
|
2187
|
-
}), n =
|
|
2277
|
+
}), n = T("group", {});
|
|
2188
2278
|
return { modelValue: q({
|
|
2189
2279
|
get() {
|
|
2190
2280
|
var s;
|
|
@@ -2225,24 +2315,24 @@ const Qa = /* @__PURE__ */ M(oi, [["render", yi]]), vi = I({
|
|
|
2225
2315
|
rangeSliderEn: null
|
|
2226
2316
|
};
|
|
2227
2317
|
}
|
|
2228
|
-
}),
|
|
2318
|
+
}), Fi = {
|
|
2229
2319
|
class: "range-input",
|
|
2230
2320
|
ref: "rangeSliderEl",
|
|
2231
2321
|
dir: "ltr"
|
|
2232
2322
|
};
|
|
2233
|
-
function
|
|
2234
|
-
return
|
|
2235
|
-
|
|
2323
|
+
function Ti(t, e, n, r, s, o) {
|
|
2324
|
+
return h(), g("div", Fi, [
|
|
2325
|
+
te($("input", {
|
|
2236
2326
|
"onUpdate:modelValue": e[0] || (e[0] = (i) => t.modelValue = i),
|
|
2237
2327
|
type: "hidden"
|
|
2238
2328
|
}, null, 512), [
|
|
2239
|
-
[
|
|
2329
|
+
[Me, t.modelValue]
|
|
2240
2330
|
])
|
|
2241
2331
|
], 512);
|
|
2242
2332
|
}
|
|
2243
|
-
const
|
|
2244
|
-
var We, C, sn, ae, Ut, on, an, ln, wt, tt, nt, Te = {}, un = [],
|
|
2245
|
-
function
|
|
2333
|
+
const ol = /* @__PURE__ */ M(Si, [["render", Ti]]);
|
|
2334
|
+
var We, C, sn, ae, Ut, on, an, ln, wt, tt, nt, Te = {}, un = [], ki = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Ye = Array.isArray;
|
|
2335
|
+
function re(t, e) {
|
|
2246
2336
|
for (var n in e) t[n] = e[n];
|
|
2247
2337
|
return t;
|
|
2248
2338
|
}
|
|
@@ -2259,16 +2349,16 @@ function Oe(t, e, n, r, s) {
|
|
|
2259
2349
|
var o = { type: t, props: e, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: s ?? ++sn, __i: -1, __u: 0 };
|
|
2260
2350
|
return s == null && C.vnode != null && C.vnode(o), o;
|
|
2261
2351
|
}
|
|
2262
|
-
function
|
|
2352
|
+
function ge(t) {
|
|
2263
2353
|
return t.children;
|
|
2264
2354
|
}
|
|
2265
|
-
function
|
|
2355
|
+
function Re(t, e) {
|
|
2266
2356
|
this.props = t, this.context = e;
|
|
2267
2357
|
}
|
|
2268
|
-
function
|
|
2269
|
-
if (e == null) return t.__ ?
|
|
2358
|
+
function ye(t, e) {
|
|
2359
|
+
if (e == null) return t.__ ? ye(t.__, t.__i + 1) : null;
|
|
2270
2360
|
for (var n; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) return n.__e;
|
|
2271
|
-
return typeof t.type == "function" ?
|
|
2361
|
+
return typeof t.type == "function" ? ye(t) : null;
|
|
2272
2362
|
}
|
|
2273
2363
|
function dn(t) {
|
|
2274
2364
|
var e, n;
|
|
@@ -2281,21 +2371,21 @@ function dn(t) {
|
|
|
2281
2371
|
}
|
|
2282
2372
|
}
|
|
2283
2373
|
function At(t) {
|
|
2284
|
-
(!t.__d && (t.__d = !0) && ae.push(t) && !
|
|
2374
|
+
(!t.__d && (t.__d = !0) && ae.push(t) && !Le.__r++ || Ut != C.debounceRendering) && ((Ut = C.debounceRendering) || on)(Le);
|
|
2285
2375
|
}
|
|
2286
|
-
function
|
|
2287
|
-
for (var t, e, n, r, s, o, i, a = 1; ae.length; ) ae.length > a && ae.sort(an), t = ae.shift(), a = ae.length, t.__d && (n = void 0, r = void 0, s = (r = (e = t).__v).__e, o = [], i = [], e.__P && ((n =
|
|
2288
|
-
|
|
2376
|
+
function Le() {
|
|
2377
|
+
for (var t, e, n, r, s, o, i, a = 1; ae.length; ) ae.length > a && ae.sort(an), t = ae.shift(), a = ae.length, t.__d && (n = void 0, r = void 0, s = (r = (e = t).__v).__e, o = [], i = [], e.__P && ((n = re({}, r)).__v = r.__v + 1, C.vnode && C.vnode(n), Ft(e.__P, n, r, e.__n, e.__P.namespaceURI, 32 & r.__u ? [s] : null, o, s ?? ye(r), !!(32 & r.__u), i), n.__v = r.__v, n.__.__k[n.__i] = n, fn(o, n, i), r.__e = r.__ = null, n.__e != s && dn(n)));
|
|
2378
|
+
Le.__r = 0;
|
|
2289
2379
|
}
|
|
2290
2380
|
function pn(t, e, n, r, s, o, i, a, l, u, d) {
|
|
2291
|
-
var p, c,
|
|
2292
|
-
for (l =
|
|
2381
|
+
var p, c, m, v, V, A, k, I = r && r.__k || un, Y = e.length;
|
|
2382
|
+
for (l = Ii(n, e, I, l, Y), p = 0; p < Y; p++) (m = n.__k[p]) != null && (c = m.__i == -1 ? Te : I[m.__i] || Te, m.__i = p, A = Ft(t, m, c, s, o, i, a, l, u, d), v = m.__e, m.ref && c.ref != m.ref && (c.ref && Tt(c.ref, null, m), d.push(m.ref, m.__c || v, m)), V == null && v != null && (V = v), (k = !!(4 & m.__u)) || c.__k === m.__k ? l = cn(m, l, t, k) : typeof m.type == "function" && A !== void 0 ? l = A : v && (l = v.nextSibling), m.__u &= -7);
|
|
2293
2383
|
return n.__e = V, l;
|
|
2294
2384
|
}
|
|
2295
|
-
function
|
|
2385
|
+
function Ii(t, e, n, r, s) {
|
|
2296
2386
|
var o, i, a, l, u, d = n.length, p = d, c = 0;
|
|
2297
|
-
for (t.__k = new Array(s), o = 0; o < s; o++) (i = e[o]) != null && typeof i != "boolean" && typeof i != "function" ? (typeof i == "string" || typeof i == "number" || typeof i == "bigint" || i.constructor == String ? i = t.__k[o] = Oe(null, i, null, null, null) : Ye(i) ? i = t.__k[o] = Oe(
|
|
2298
|
-
if (p) for (o = 0; o < d; o++) (a = n[o]) != null && !(2 & a.__u) && (a.__e == r && (r =
|
|
2387
|
+
for (t.__k = new Array(s), o = 0; o < s; o++) (i = e[o]) != null && typeof i != "boolean" && typeof i != "function" ? (typeof i == "string" || typeof i == "number" || typeof i == "bigint" || i.constructor == String ? i = t.__k[o] = Oe(null, i, null, null, null) : Ye(i) ? i = t.__k[o] = Oe(ge, { children: i }, null, null, null) : i.constructor === void 0 && i.__b > 0 ? i = t.__k[o] = Oe(i.type, i.props, i.key, i.ref ? i.ref : null, i.__v) : t.__k[o] = i, l = o + c, i.__ = t, i.__b = t.__b + 1, a = null, (u = i.__i = Ei(i, n, l, p)) != -1 && (p--, (a = n[u]) && (a.__u |= 2)), a == null || a.__v == null ? (u == -1 && (s > d ? c-- : s < d && c++), typeof i.type != "function" && (i.__u |= 4)) : u != l && (u == l - 1 ? c-- : u == l + 1 ? c++ : (u > l ? c-- : c++, i.__u |= 4))) : t.__k[o] = null;
|
|
2388
|
+
if (p) for (o = 0; o < d; o++) (a = n[o]) != null && !(2 & a.__u) && (a.__e == r && (r = ye(a)), hn(a, a));
|
|
2299
2389
|
return r;
|
|
2300
2390
|
}
|
|
2301
2391
|
function cn(t, e, n, r) {
|
|
@@ -2304,13 +2394,13 @@ function cn(t, e, n, r) {
|
|
|
2304
2394
|
for (s = t.__k, o = 0; s && o < s.length; o++) s[o] && (s[o].__ = t, e = cn(s[o], e, n, r));
|
|
2305
2395
|
return e;
|
|
2306
2396
|
}
|
|
2307
|
-
t.__e != e && (r && (e && t.type && !e.parentNode && (e =
|
|
2397
|
+
t.__e != e && (r && (e && t.type && !e.parentNode && (e = ye(t)), n.insertBefore(t.__e, e || null)), e = t.__e);
|
|
2308
2398
|
do
|
|
2309
2399
|
e = e && e.nextSibling;
|
|
2310
2400
|
while (e != null && e.nodeType == 8);
|
|
2311
2401
|
return e;
|
|
2312
2402
|
}
|
|
2313
|
-
function
|
|
2403
|
+
function Ei(t, e, n, r) {
|
|
2314
2404
|
var s, o, i, a = t.key, l = t.type, u = e[n], d = u != null && (2 & u.__u) == 0;
|
|
2315
2405
|
if (u === null && a == null || d && a == u.key && l == u.type) return n;
|
|
2316
2406
|
if (r > (d ? 1 : 0)) {
|
|
@@ -2318,15 +2408,15 @@ function Si(t, e, n, r) {
|
|
|
2318
2408
|
}
|
|
2319
2409
|
return -1;
|
|
2320
2410
|
}
|
|
2321
|
-
function
|
|
2322
|
-
e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" ||
|
|
2411
|
+
function Nt(t, e, n) {
|
|
2412
|
+
e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" || ki.test(e) ? n : n + "px";
|
|
2323
2413
|
}
|
|
2324
|
-
function
|
|
2414
|
+
function Ne(t, e, n, r, s) {
|
|
2325
2415
|
var o, i;
|
|
2326
2416
|
e: if (e == "style") if (typeof n == "string") t.style.cssText = n;
|
|
2327
2417
|
else {
|
|
2328
|
-
if (typeof r == "string" && (t.style.cssText = r = ""), r) for (e in r) n && e in n ||
|
|
2329
|
-
if (n) for (e in n) r && n[e] == r[e] ||
|
|
2418
|
+
if (typeof r == "string" && (t.style.cssText = r = ""), r) for (e in r) n && e in n || Nt(t.style, e, "");
|
|
2419
|
+
if (n) for (e in n) r && n[e] == r[e] || Nt(t.style, e, n[e]);
|
|
2330
2420
|
}
|
|
2331
2421
|
else if (e[0] == "o" && e[1] == "n") o = e != (e = e.replace(ln, "$1")), i = e.toLowerCase(), e = i in t || e == "onFocusOut" || e == "onFocusIn" ? i.slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + o] = n, n ? r ? n.u = r.u : (n.u = wt, t.addEventListener(e, o ? nt : tt, o)) : t.removeEventListener(e, o ? nt : tt, o);
|
|
2332
2422
|
else {
|
|
@@ -2350,42 +2440,42 @@ function Pt(t) {
|
|
|
2350
2440
|
};
|
|
2351
2441
|
}
|
|
2352
2442
|
function Ft(t, e, n, r, s, o, i, a, l, u) {
|
|
2353
|
-
var d, p, c,
|
|
2443
|
+
var d, p, c, m, v, V, A, k, I, Y, f, _, w, U, D, H, ne, N = e.type;
|
|
2354
2444
|
if (e.constructor !== void 0) return null;
|
|
2355
2445
|
128 & n.__u && (l = !!(32 & n.__u), o = [a = e.__e = n.__e]), (d = C.__b) && d(e);
|
|
2356
|
-
e: if (typeof
|
|
2357
|
-
if (
|
|
2446
|
+
e: if (typeof N == "function") try {
|
|
2447
|
+
if (k = e.props, I = "prototype" in N && N.prototype.render, Y = (d = N.contextType) && r[d.__c], f = d ? Y ? Y.props.value : d.__ : r, n.__c ? A = (p = e.__c = n.__c).__ = p.__E : (I ? e.__c = p = new N(k, f) : (e.__c = p = new Re(k, f), p.constructor = N, p.render = Vi), Y && Y.sub(p), p.state || (p.state = {}), p.__n = r, c = p.__d = !0, p.__h = [], p._sb = []), I && p.__s == null && (p.__s = p.state), I && N.getDerivedStateFromProps != null && (p.__s == p.state && (p.__s = re({}, p.__s)), re(p.__s, N.getDerivedStateFromProps(k, p.__s))), m = p.props, v = p.state, p.__v = e, c) I && N.getDerivedStateFromProps == null && p.componentWillMount != null && p.componentWillMount(), I && p.componentDidMount != null && p.__h.push(p.componentDidMount);
|
|
2358
2448
|
else {
|
|
2359
|
-
if (
|
|
2360
|
-
for (e.__v != n.__v && (p.props =
|
|
2449
|
+
if (I && N.getDerivedStateFromProps == null && k !== m && p.componentWillReceiveProps != null && p.componentWillReceiveProps(k, f), e.__v == n.__v || !p.__e && p.shouldComponentUpdate != null && p.shouldComponentUpdate(k, p.__s, f) === !1) {
|
|
2450
|
+
for (e.__v != n.__v && (p.props = k, p.state = p.__s, p.__d = !1), e.__e = n.__e, e.__k = n.__k, e.__k.some(function(X) {
|
|
2361
2451
|
X && (X.__ = e);
|
|
2362
2452
|
}), _ = 0; _ < p._sb.length; _++) p.__h.push(p._sb[_]);
|
|
2363
2453
|
p._sb = [], p.__h.length && i.push(p);
|
|
2364
2454
|
break e;
|
|
2365
2455
|
}
|
|
2366
|
-
p.componentWillUpdate != null && p.componentWillUpdate(
|
|
2367
|
-
p.componentDidUpdate(
|
|
2456
|
+
p.componentWillUpdate != null && p.componentWillUpdate(k, p.__s, f), I && p.componentDidUpdate != null && p.__h.push(function() {
|
|
2457
|
+
p.componentDidUpdate(m, v, V);
|
|
2368
2458
|
});
|
|
2369
2459
|
}
|
|
2370
|
-
if (p.context = f, p.props =
|
|
2371
|
-
for (p.state = p.__s, p.__d = !1, w && w(e), d = p.render(p.props, p.state, p.context),
|
|
2460
|
+
if (p.context = f, p.props = k, p.__P = t, p.__e = !1, w = C.__r, U = 0, I) {
|
|
2461
|
+
for (p.state = p.__s, p.__d = !1, w && w(e), d = p.render(p.props, p.state, p.context), D = 0; D < p._sb.length; D++) p.__h.push(p._sb[D]);
|
|
2372
2462
|
p._sb = [];
|
|
2373
2463
|
} else do
|
|
2374
2464
|
p.__d = !1, w && w(e), d = p.render(p.props, p.state, p.context), p.state = p.__s;
|
|
2375
2465
|
while (p.__d && ++U < 25);
|
|
2376
|
-
p.state = p.__s, p.getChildContext != null && (r =
|
|
2466
|
+
p.state = p.__s, p.getChildContext != null && (r = re(re({}, r), p.getChildContext())), I && !c && p.getSnapshotBeforeUpdate != null && (V = p.getSnapshotBeforeUpdate(m, v)), H = d, d != null && d.type === ge && d.key == null && (H = mn(d.props.children)), a = pn(t, Ye(H) ? H : [H], e, n, r, s, o, i, a, l, u), p.base = e.__e, e.__u &= -161, p.__h.length && i.push(p), A && (p.__E = p.__ = null);
|
|
2377
2467
|
} catch (X) {
|
|
2378
2468
|
if (e.__v = null, l || o != null) if (X.then) {
|
|
2379
2469
|
for (e.__u |= l ? 160 : 128; a && a.nodeType == 8 && a.nextSibling; ) a = a.nextSibling;
|
|
2380
2470
|
o[o.indexOf(a)] = null, e.__e = a;
|
|
2381
2471
|
} else {
|
|
2382
|
-
for (
|
|
2472
|
+
for (ne = o.length; ne--; ) $t(o[ne]);
|
|
2383
2473
|
rt(e);
|
|
2384
2474
|
}
|
|
2385
2475
|
else e.__e = n.__e, e.__k = n.__k, X.then || rt(e);
|
|
2386
2476
|
C.__e(X, e, n);
|
|
2387
2477
|
}
|
|
2388
|
-
else o == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : a = e.__e =
|
|
2478
|
+
else o == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : a = e.__e = Ci(n.__e, e, n, r, s, o, i, l, u);
|
|
2389
2479
|
return (d = C.diffed) && d(e), 128 & e.__u ? void 0 : a;
|
|
2390
2480
|
}
|
|
2391
2481
|
function rt(t) {
|
|
@@ -2403,35 +2493,35 @@ function fn(t, e, n) {
|
|
|
2403
2493
|
}
|
|
2404
2494
|
});
|
|
2405
2495
|
}
|
|
2406
|
-
function
|
|
2407
|
-
return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : Ye(t) ? t.map(
|
|
2496
|
+
function mn(t) {
|
|
2497
|
+
return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : Ye(t) ? t.map(mn) : re({}, t);
|
|
2408
2498
|
}
|
|
2409
|
-
function
|
|
2410
|
-
var u, d, p, c,
|
|
2411
|
-
if (
|
|
2412
|
-
for (u = 0; u < o.length; u++) if ((
|
|
2413
|
-
t =
|
|
2499
|
+
function Ci(t, e, n, r, s, o, i, a, l) {
|
|
2500
|
+
var u, d, p, c, m, v, V, A = n.props || Te, k = e.props, I = e.type;
|
|
2501
|
+
if (I == "svg" ? s = "http://www.w3.org/2000/svg" : I == "math" ? s = "http://www.w3.org/1998/Math/MathML" : s || (s = "http://www.w3.org/1999/xhtml"), o != null) {
|
|
2502
|
+
for (u = 0; u < o.length; u++) if ((m = o[u]) && "setAttribute" in m == !!I && (I ? m.localName == I : m.nodeType == 3)) {
|
|
2503
|
+
t = m, o[u] = null;
|
|
2414
2504
|
break;
|
|
2415
2505
|
}
|
|
2416
2506
|
}
|
|
2417
2507
|
if (t == null) {
|
|
2418
|
-
if (
|
|
2419
|
-
t = document.createElementNS(s,
|
|
2508
|
+
if (I == null) return document.createTextNode(k);
|
|
2509
|
+
t = document.createElementNS(s, I, k.is && k), a && (C.__m && C.__m(e, o), a = !1), o = null;
|
|
2420
2510
|
}
|
|
2421
|
-
if (
|
|
2511
|
+
if (I == null) A === k || a && t.data == k || (t.data = k);
|
|
2422
2512
|
else {
|
|
2423
|
-
if (o = o && We.call(t.childNodes), !a && o != null) for (A = {}, u = 0; u < t.attributes.length; u++) A[(
|
|
2424
|
-
for (u in A) if (
|
|
2425
|
-
if (u == "dangerouslySetInnerHTML") p =
|
|
2426
|
-
else if (!(u in
|
|
2427
|
-
if (u == "value" && "defaultValue" in
|
|
2428
|
-
|
|
2513
|
+
if (o = o && We.call(t.childNodes), !a && o != null) for (A = {}, u = 0; u < t.attributes.length; u++) A[(m = t.attributes[u]).name] = m.value;
|
|
2514
|
+
for (u in A) if (m = A[u], u != "children") {
|
|
2515
|
+
if (u == "dangerouslySetInnerHTML") p = m;
|
|
2516
|
+
else if (!(u in k)) {
|
|
2517
|
+
if (u == "value" && "defaultValue" in k || u == "checked" && "defaultChecked" in k) continue;
|
|
2518
|
+
Ne(t, u, null, m, s);
|
|
2429
2519
|
}
|
|
2430
2520
|
}
|
|
2431
|
-
for (u in
|
|
2521
|
+
for (u in k) m = k[u], u == "children" ? c = m : u == "dangerouslySetInnerHTML" ? d = m : u == "value" ? v = m : u == "checked" ? V = m : a && typeof m != "function" || A[u] === m || Ne(t, u, m, A[u], s);
|
|
2432
2522
|
if (d) a || p && (d.__html == p.__html || d.__html == t.innerHTML) || (t.innerHTML = d.__html), e.__k = [];
|
|
2433
|
-
else if (p && (t.innerHTML = ""), pn(e.type == "template" ? t.content : t, Ye(c) ? c : [c], e, n, r,
|
|
2434
|
-
a || (u = "value",
|
|
2523
|
+
else if (p && (t.innerHTML = ""), pn(e.type == "template" ? t.content : t, Ye(c) ? c : [c], e, n, r, I == "foreignObject" ? "http://www.w3.org/1999/xhtml" : s, o, i, o ? o[0] : n.__k && ye(n, 0), a, l), o != null) for (u = o.length; u--; ) $t(o[u]);
|
|
2524
|
+
a || (u = "value", I == "progress" && v == null ? t.removeAttribute("value") : v != null && (v !== t[u] || I == "progress" && !v || I == "option" && v != A[u]) && Ne(t, u, v, A[u], s), u = "checked", V != null && V != t[u] && Ne(t, u, V, A[u], s));
|
|
2435
2525
|
}
|
|
2436
2526
|
return t;
|
|
2437
2527
|
}
|
|
@@ -2445,7 +2535,7 @@ function Tt(t, e, n) {
|
|
|
2445
2535
|
C.__e(s, n);
|
|
2446
2536
|
}
|
|
2447
2537
|
}
|
|
2448
|
-
function
|
|
2538
|
+
function hn(t, e, n) {
|
|
2449
2539
|
var r, s;
|
|
2450
2540
|
if (C.unmount && C.unmount(t), (r = t.ref) && (r.current && r.current != t.__e || Tt(r, null, e)), (r = t.__c) != null) {
|
|
2451
2541
|
if (r.componentWillUnmount) try {
|
|
@@ -2455,15 +2545,15 @@ function mn(t, e, n) {
|
|
|
2455
2545
|
}
|
|
2456
2546
|
r.base = r.__P = null;
|
|
2457
2547
|
}
|
|
2458
|
-
if (r = t.__k) for (s = 0; s < r.length; s++) r[s] &&
|
|
2548
|
+
if (r = t.__k) for (s = 0; s < r.length; s++) r[s] && hn(r[s], e, n || typeof t.type != "function");
|
|
2459
2549
|
n || $t(t.__e), t.__c = t.__ = t.__e = void 0;
|
|
2460
2550
|
}
|
|
2461
|
-
function
|
|
2551
|
+
function Vi(t, e, n) {
|
|
2462
2552
|
return this.constructor(t, n);
|
|
2463
2553
|
}
|
|
2464
2554
|
function gn(t, e, n) {
|
|
2465
2555
|
var r, s, o, i;
|
|
2466
|
-
e == document && (e = document.documentElement), C.__ && C.__(t, e), s = (r = !1) ? null : e.__k, o = [], i = [], Ft(e, t = e.__k = St(
|
|
2556
|
+
e == document && (e = document.documentElement), C.__ && C.__(t, e), s = (r = !1) ? null : e.__k, o = [], i = [], Ft(e, t = e.__k = St(ge, null, [t]), s || Te, Te, e.namespaceURI, s ? null : e.firstChild ? We.call(e.childNodes) : null, o, s ? s.__e : e.firstChild, r, i), fn(o, t, i);
|
|
2467
2557
|
}
|
|
2468
2558
|
We = un.slice, C = { __e: function(t, e, n, r) {
|
|
2469
2559
|
for (var s, o, i; e = e.__; ) if ((s = e.__c) && !s.__) try {
|
|
@@ -2472,20 +2562,20 @@ We = un.slice, C = { __e: function(t, e, n, r) {
|
|
|
2472
2562
|
t = a;
|
|
2473
2563
|
}
|
|
2474
2564
|
throw t;
|
|
2475
|
-
} }, sn = 0,
|
|
2565
|
+
} }, sn = 0, Re.prototype.setState = function(t, e) {
|
|
2476
2566
|
var n;
|
|
2477
|
-
n = this.__s != null && this.__s != this.state ? this.__s : this.__s =
|
|
2478
|
-
},
|
|
2567
|
+
n = this.__s != null && this.__s != this.state ? this.__s : this.__s = re({}, this.state), typeof t == "function" && (t = t(re({}, n), this.props)), t && re(n, t), t != null && this.__v && (e && this._sb.push(e), At(this));
|
|
2568
|
+
}, Re.prototype.forceUpdate = function(t) {
|
|
2479
2569
|
this.__v && (this.__e = !0, t && this.__h.push(t), At(this));
|
|
2480
|
-
},
|
|
2570
|
+
}, Re.prototype.render = ge, ae = [], on = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, an = function(t, e) {
|
|
2481
2571
|
return t.__v.__b - e.__v.__b;
|
|
2482
|
-
},
|
|
2483
|
-
var
|
|
2572
|
+
}, Le.__r = 0, ln = /(PointerCapture)$|Capture$/i, wt = 0, tt = Pt(!1), nt = Pt(!0);
|
|
2573
|
+
var Mi = 0;
|
|
2484
2574
|
function S(t, e, n, r, s, o) {
|
|
2485
2575
|
e || (e = {});
|
|
2486
2576
|
var i, a, l = e;
|
|
2487
2577
|
if ("ref" in l) for (a in l = {}, e) a == "ref" ? i = e[a] : l[a] = e[a];
|
|
2488
|
-
var u = { type: t, props: l, key: n, ref: i, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --
|
|
2578
|
+
var u = { type: t, props: l, key: n, ref: i, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --Mi, __i: -1, __u: 0, __source: s, __self: o };
|
|
2489
2579
|
if (typeof t == "function" && (i = t.defaultProps)) for (a in i) l[a] === void 0 && (l[a] = i[a]);
|
|
2490
2580
|
return C.vnode && C.vnode(u), u;
|
|
2491
2581
|
}
|
|
@@ -2502,16 +2592,16 @@ function vn() {
|
|
|
2502
2592
|
for (var t, e, n = 0, r = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e = yn(t)) && (r && (r += " "), r += e);
|
|
2503
2593
|
return r;
|
|
2504
2594
|
}
|
|
2505
|
-
var ke, P, Je,
|
|
2595
|
+
var ke, P, Je, Dt, st = 0, _n = [], z = C, zt = z.__b, Ot = z.__r, Rt = z.diffed, Bt = z.__c, jt = z.unmount, Lt = z.__;
|
|
2506
2596
|
function kt(t, e) {
|
|
2507
|
-
|
|
2597
|
+
z.__h && z.__h(P, t, st || e), st = 0;
|
|
2508
2598
|
var n = P.__H || (P.__H = { __: [], __h: [] });
|
|
2509
2599
|
return t >= n.__.length && n.__.push({}), n.__[t];
|
|
2510
2600
|
}
|
|
2511
|
-
function
|
|
2512
|
-
return st = 1,
|
|
2601
|
+
function Ui(t) {
|
|
2602
|
+
return st = 1, Ai(Sn, t);
|
|
2513
2603
|
}
|
|
2514
|
-
function
|
|
2604
|
+
function Ai(t, e, n) {
|
|
2515
2605
|
var r = kt(ke++, 2);
|
|
2516
2606
|
if (r.t = t, !r.__c && (r.__ = [Sn(void 0, e), function(a) {
|
|
2517
2607
|
var l = r.__N ? r.__N[0] : r.__[0], u = r.t(l, a);
|
|
@@ -2528,8 +2618,8 @@ function Ii(t, e, n) {
|
|
|
2528
2618
|
var p = r.__c.props !== a;
|
|
2529
2619
|
return d.forEach(function(c) {
|
|
2530
2620
|
if (c.__N) {
|
|
2531
|
-
var
|
|
2532
|
-
c.__ = c.__N, c.__N = void 0,
|
|
2621
|
+
var m = c.__[0];
|
|
2622
|
+
c.__ = c.__N, c.__N = void 0, m !== c.__[0] && (p = !0);
|
|
2533
2623
|
}
|
|
2534
2624
|
}), o && o.call(this, a, l, u) || p;
|
|
2535
2625
|
};
|
|
@@ -2547,66 +2637,66 @@ function Ii(t, e, n) {
|
|
|
2547
2637
|
}
|
|
2548
2638
|
function bn(t, e) {
|
|
2549
2639
|
var n = kt(ke++, 3);
|
|
2550
|
-
!
|
|
2640
|
+
!z.__s && $n(n.__H, e) && (n.__ = t, n.u = e, P.__H.__h.push(n));
|
|
2551
2641
|
}
|
|
2552
2642
|
function wn(t, e) {
|
|
2553
2643
|
var n = kt(ke++, 7);
|
|
2554
2644
|
return $n(n.__H, e) && (n.__ = t(), n.__H = e, n.__h = t), n.__;
|
|
2555
2645
|
}
|
|
2556
|
-
function
|
|
2646
|
+
function Ni() {
|
|
2557
2647
|
for (var t; t = _n.shift(); ) if (t.__P && t.__H) try {
|
|
2558
|
-
t.__H.__h.forEach(
|
|
2648
|
+
t.__H.__h.forEach(Be), t.__H.__h.forEach(it), t.__H.__h = [];
|
|
2559
2649
|
} catch (e) {
|
|
2560
|
-
t.__H.__h = [],
|
|
2650
|
+
t.__H.__h = [], z.__e(e, t.__v);
|
|
2561
2651
|
}
|
|
2562
2652
|
}
|
|
2563
|
-
|
|
2564
|
-
P = null,
|
|
2565
|
-
},
|
|
2566
|
-
t && e.__k && e.__k.__m && (t.__m = e.__k.__m),
|
|
2567
|
-
},
|
|
2568
|
-
|
|
2653
|
+
z.__b = function(t) {
|
|
2654
|
+
P = null, zt && zt(t);
|
|
2655
|
+
}, z.__ = function(t, e) {
|
|
2656
|
+
t && e.__k && e.__k.__m && (t.__m = e.__k.__m), Lt && Lt(t, e);
|
|
2657
|
+
}, z.__r = function(t) {
|
|
2658
|
+
Ot && Ot(t), ke = 0;
|
|
2569
2659
|
var e = (P = t.__c).__H;
|
|
2570
2660
|
e && (Je === P ? (e.__h = [], P.__h = [], e.__.forEach(function(n) {
|
|
2571
2661
|
n.__N && (n.__ = n.__N), n.u = n.__N = void 0;
|
|
2572
|
-
})) : (e.__h.forEach(
|
|
2573
|
-
},
|
|
2662
|
+
})) : (e.__h.forEach(Be), e.__h.forEach(it), e.__h = [], ke = 0)), Je = P;
|
|
2663
|
+
}, z.diffed = function(t) {
|
|
2574
2664
|
Rt && Rt(t);
|
|
2575
2665
|
var e = t.__c;
|
|
2576
|
-
e && e.__H && (e.__H.__h.length && (_n.push(e) !== 1 &&
|
|
2666
|
+
e && e.__H && (e.__H.__h.length && (_n.push(e) !== 1 && Dt === z.requestAnimationFrame || ((Dt = z.requestAnimationFrame) || Pi)(Ni)), e.__H.__.forEach(function(n) {
|
|
2577
2667
|
n.u && (n.__H = n.u), n.u = void 0;
|
|
2578
2668
|
})), Je = P = null;
|
|
2579
|
-
},
|
|
2669
|
+
}, z.__c = function(t, e) {
|
|
2580
2670
|
e.some(function(n) {
|
|
2581
2671
|
try {
|
|
2582
|
-
n.__h.forEach(
|
|
2672
|
+
n.__h.forEach(Be), n.__h = n.__h.filter(function(r) {
|
|
2583
2673
|
return !r.__ || it(r);
|
|
2584
2674
|
});
|
|
2585
2675
|
} catch (r) {
|
|
2586
2676
|
e.some(function(s) {
|
|
2587
2677
|
s.__h && (s.__h = []);
|
|
2588
|
-
}), e = [],
|
|
2678
|
+
}), e = [], z.__e(r, n.__v);
|
|
2589
2679
|
}
|
|
2590
2680
|
}), Bt && Bt(t, e);
|
|
2591
|
-
},
|
|
2681
|
+
}, z.unmount = function(t) {
|
|
2592
2682
|
jt && jt(t);
|
|
2593
2683
|
var e, n = t.__c;
|
|
2594
2684
|
n && n.__H && (n.__H.__.forEach(function(r) {
|
|
2595
2685
|
try {
|
|
2596
|
-
|
|
2686
|
+
Be(r);
|
|
2597
2687
|
} catch (s) {
|
|
2598
2688
|
e = s;
|
|
2599
2689
|
}
|
|
2600
|
-
}), n.__H = void 0, e &&
|
|
2690
|
+
}), n.__H = void 0, e && z.__e(e, n.__v));
|
|
2601
2691
|
};
|
|
2602
|
-
var
|
|
2603
|
-
function
|
|
2692
|
+
var xt = typeof requestAnimationFrame == "function";
|
|
2693
|
+
function Pi(t) {
|
|
2604
2694
|
var e, n = function() {
|
|
2605
|
-
clearTimeout(r),
|
|
2695
|
+
clearTimeout(r), xt && cancelAnimationFrame(e), setTimeout(t);
|
|
2606
2696
|
}, r = setTimeout(n, 35);
|
|
2607
|
-
|
|
2697
|
+
xt && (e = requestAnimationFrame(n));
|
|
2608
2698
|
}
|
|
2609
|
-
function
|
|
2699
|
+
function Be(t) {
|
|
2610
2700
|
var e = P, n = t.__c;
|
|
2611
2701
|
typeof n == "function" && (t.__c = void 0, n()), P = e;
|
|
2612
2702
|
}
|
|
@@ -2622,12 +2712,12 @@ function $n(t, e) {
|
|
|
2622
2712
|
function Sn(t, e) {
|
|
2623
2713
|
return typeof e == "function" ? e(t) : e;
|
|
2624
2714
|
}
|
|
2625
|
-
function
|
|
2715
|
+
function Di(t, e = {}) {
|
|
2626
2716
|
const n = `uppy-dropzone-file-input-${t.uppy.getID()}`, r = (d) => {
|
|
2627
|
-
var c,
|
|
2717
|
+
var c, m;
|
|
2628
2718
|
d.preventDefault(), d.stopPropagation();
|
|
2629
2719
|
const p = Array.from(((c = d.dataTransfer) == null ? void 0 : c.files) ?? []);
|
|
2630
|
-
p.length && ((
|
|
2720
|
+
p.length && ((m = e.onDrop) == null || m.call(e, p), t.uppy.addFiles(p.map((v) => ({
|
|
2631
2721
|
name: v.name,
|
|
2632
2722
|
type: v.type,
|
|
2633
2723
|
data: v
|
|
@@ -2649,9 +2739,9 @@ function Mi(t, e = {}) {
|
|
|
2649
2739
|
}, l = (d) => {
|
|
2650
2740
|
(d.key === " " || d.key === "Enter" || d.keyCode === 32 || d.keyCode === 13) && a();
|
|
2651
2741
|
}, u = (d) => {
|
|
2652
|
-
var
|
|
2742
|
+
var m;
|
|
2653
2743
|
const p = d.target, c = Array.from(p.files ?? []);
|
|
2654
|
-
c.length && ((
|
|
2744
|
+
c.length && ((m = e.onFileInputChange) == null || m.call(e, c), t.uppy.addFiles(c.map((v) => ({
|
|
2655
2745
|
source: "drag-drop",
|
|
2656
2746
|
name: v.name,
|
|
2657
2747
|
type: v.type,
|
|
@@ -2680,11 +2770,11 @@ function Mi(t, e = {}) {
|
|
|
2680
2770
|
}
|
|
2681
2771
|
};
|
|
2682
2772
|
}
|
|
2683
|
-
function
|
|
2773
|
+
function zi(t) {
|
|
2684
2774
|
const { width: e, height: n, note: r, noClick: s, ctx: o } = t;
|
|
2685
2775
|
if (!o.uppy)
|
|
2686
2776
|
throw new Error("Dropzone must be used within a UppyContextProvider");
|
|
2687
|
-
const { getRootProps: i, getInputProps: a } = wn(() =>
|
|
2777
|
+
const { getRootProps: i, getInputProps: a } = wn(() => Di(o, { noClick: s }), [o, s]);
|
|
2688
2778
|
return S("div", { className: "uppy-reset", "data-uppy-element": "dropzone", role: "presentation", children: [S("input", { ...a(), tabIndex: -1, name: "uppy-dropzone-file-input", className: "uppy:hidden" }), S("div", {
|
|
2689
2779
|
...i(),
|
|
2690
2780
|
// biome-ignore lint/a11y/noNoninteractiveTabindex: it is also a button. getRootProps returns keyboard event handlers
|
|
@@ -2699,7 +2789,7 @@ function Ui(t) {
|
|
|
2699
2789
|
children: [S("div", { className: "uppy:flex uppy:flex-col uppy:items-center uppy:justify-center uppy:h-full uppy:space-y-3", children: S("p", { className: "uppy:text-gray-600", children: "Drop files here or click to add them" }) }), r ? S("div", { className: "uppy:text-sm uppy:text-gray-500", children: r }) : null]
|
|
2700
2790
|
})] });
|
|
2701
2791
|
}
|
|
2702
|
-
const
|
|
2792
|
+
const Oi = [
|
|
2703
2793
|
"B",
|
|
2704
2794
|
"kB",
|
|
2705
2795
|
"MB",
|
|
@@ -2709,7 +2799,7 @@ const Ai = [
|
|
|
2709
2799
|
"EB",
|
|
2710
2800
|
"ZB",
|
|
2711
2801
|
"YB"
|
|
2712
|
-
],
|
|
2802
|
+
], Ri = [
|
|
2713
2803
|
"B",
|
|
2714
2804
|
"KiB",
|
|
2715
2805
|
"MiB",
|
|
@@ -2719,7 +2809,7 @@ const Ai = [
|
|
|
2719
2809
|
"EiB",
|
|
2720
2810
|
"ZiB",
|
|
2721
2811
|
"YiB"
|
|
2722
|
-
],
|
|
2812
|
+
], Bi = [
|
|
2723
2813
|
"b",
|
|
2724
2814
|
"kbit",
|
|
2725
2815
|
"Mbit",
|
|
@@ -2729,7 +2819,7 @@ const Ai = [
|
|
|
2729
2819
|
"Ebit",
|
|
2730
2820
|
"Zbit",
|
|
2731
2821
|
"Ybit"
|
|
2732
|
-
],
|
|
2822
|
+
], ji = [
|
|
2733
2823
|
"b",
|
|
2734
2824
|
"kibit",
|
|
2735
2825
|
"Mibit",
|
|
@@ -2743,7 +2833,7 @@ const Ai = [
|
|
|
2743
2833
|
let r = t;
|
|
2744
2834
|
return typeof e == "string" || Array.isArray(e) ? r = t.toLocaleString(e, n) : (e === !0 || n !== void 0) && (r = t.toLocaleString(void 0, n)), r;
|
|
2745
2835
|
};
|
|
2746
|
-
function
|
|
2836
|
+
function Li(t, e) {
|
|
2747
2837
|
if (!Number.isFinite(t))
|
|
2748
2838
|
throw new TypeError(`Expected a finite number, got ${typeof t}: ${t}`);
|
|
2749
2839
|
e = {
|
|
@@ -2752,7 +2842,7 @@ function Oi(t, e) {
|
|
|
2752
2842
|
space: !0,
|
|
2753
2843
|
...e
|
|
2754
2844
|
};
|
|
2755
|
-
const n = e.bits ? e.binary ?
|
|
2845
|
+
const n = e.bits ? e.binary ? ji : Bi : e.binary ? Ri : Oi, r = e.space ? " " : "";
|
|
2756
2846
|
if (e.signed && t === 0)
|
|
2757
2847
|
return ` 0${r}${n[0]}`;
|
|
2758
2848
|
const s = t < 0, o = s ? "-" : e.signed ? "+" : "";
|
|
@@ -2767,8 +2857,8 @@ function Oi(t, e) {
|
|
|
2767
2857
|
const l = qt(Number(t), e.locale, i), u = n[a];
|
|
2768
2858
|
return o + l + r + u;
|
|
2769
2859
|
}
|
|
2770
|
-
function
|
|
2771
|
-
const [e, n] =
|
|
2860
|
+
function xi(t) {
|
|
2861
|
+
const [e, n] = Ui(() => []), { ctx: r, editFile: s, imageThumbnail: o } = t;
|
|
2772
2862
|
return bn(() => {
|
|
2773
2863
|
var a;
|
|
2774
2864
|
const i = (l, u, d) => {
|
|
@@ -2780,7 +2870,7 @@ function Di(t) {
|
|
|
2780
2870
|
};
|
|
2781
2871
|
}, [r.uppy]), S("ul", { "data-uppy-element": "files-list", className: "uppy-reset uppy:my-4", children: e == null ? void 0 : e.map((i) => {
|
|
2782
2872
|
var a, l, u;
|
|
2783
|
-
return S("li", { children: S(
|
|
2873
|
+
return S("li", { children: S(ge, { children: [S("div", { className: "uppy:flex uppy:items-center uppy:gap-2", children: [S("div", { className: "uppy:w-[32px] uppy:h-[32px]", children: S(qi, { width: "32px", height: "32px", file: i, images: o }) }), S("p", { className: "uppy:truncate", children: i.name }), S("p", { className: "uppy:text-gray-500 uppy:tabular-nums uppy:min-w-18 uppy:text-right uppy:ml-auto", children: Li(i.size || 0) }), S(ge, { children: [s && S("button", { type: "button", className: "uppy:flex uppy:rounded uppy:text-blue-500 uppy:hover:text-blue-700 uppy:bg-transparent uppy:transition-colors", onClick: () => {
|
|
2784
2874
|
s(i);
|
|
2785
2875
|
}, children: "edit" }), S("button", { type: "button", className: "uppy:flex uppy:rounded uppy:text-blue-500 uppy:hover:text-blue-700 uppy:bg-transparent uppy:transition-colors", onClick: () => {
|
|
2786
2876
|
var d;
|
|
@@ -2792,7 +2882,7 @@ function Di(t) {
|
|
|
2792
2882
|
}), value: ((u = i.progress) == null ? void 0 : u.percentage) || 0 })] }) }, i.id);
|
|
2793
2883
|
}) });
|
|
2794
2884
|
}
|
|
2795
|
-
function
|
|
2885
|
+
function qi(t) {
|
|
2796
2886
|
var d, p;
|
|
2797
2887
|
const e = t.width || "100%", n = t.height || "100%", r = ((d = t.file.type) == null ? void 0 : d.split("/")[0]) || "", s = ((p = t.file.type) == null ? void 0 : p.split("/")[1]) || "", o = t.file.type.startsWith("image/"), i = r === "application" && [
|
|
2798
2888
|
"zip",
|
|
@@ -2819,7 +2909,7 @@ function Ri(t) {
|
|
|
2819
2909
|
aspectRatio: "1"
|
|
2820
2910
|
}, children: [u ? S("img", { className: "uppy:w-full uppy:h-full uppy:object-cover", src: l, alt: t.file.name }) : null, u ? null : S("div", { className: "uppy:flex uppy:flex-col uppy:items-center uppy:justify-center uppy:w-full uppy:h-full", children: S("div", { className: "uppy:flex-1 uppy:flex uppy:items-center uppy:justify-center uppy:w-full", children: [t.file.type ? null : S("svg", { "aria-hidden": "true", className: "uppy:w-3/4 uppy:h-3/4", viewBox: "0 0 25 25", children: S("g", { fill: "#A7AFB7", "fill-rule": "nonzero", children: [S("path", { d: "M5.5 22a.5.5 0 0 1-.5-.5v-18a.5.5 0 0 1 .5-.5h10.719a.5.5 0 0 1 .367.16l3.281 3.556a.5.5 0 0 1 .133.339V21.5a.5.5 0 0 1-.5.5h-14zm.5-1h13V7.25L16 4H6v17z" }), S("path", { d: "M15 4v3a1 1 0 0 0 1 1h3V7h-3V4h-1z" })] }) }), r === "text" ? S("svg", { "aria-hidden": "true", className: "uppy:w-3/4 uppy:h-3/4", viewBox: "0 0 25 25", children: S("path", { d: "M4.5 7h13a.5.5 0 1 1 0 1h-13a.5.5 0 0 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h10a.5.5 0 1 1 0 1h-10a.5.5 0 1 1 0-1z", fill: "#5A5E69", "fill-rule": "nonzero" }) }) : null, r === "image" && !u ? S("svg", { "aria-hidden": "true", className: "uppy:w-3/4 uppy:h-3/4", viewBox: "0 0 25 25", children: S("g", { fill: "#686DE0", "fill-rule": "evenodd", children: [S("path", { d: "M5 7v10h15V7H5zm0-1h15a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z", "fill-rule": "nonzero" }), S("path", { d: "M6.35 17.172l4.994-5.026a.5.5 0 0 1 .707 0l2.16 2.16 3.505-3.505a.5.5 0 0 1 .707 0l2.336 2.31-.707.72-1.983-1.97-3.505 3.505a.5.5 0 0 1-.707 0l-2.16-2.159-3.938 3.939-1.409.026z", "fill-rule": "nonzero" }), S("circle", { cx: "7.5", cy: "9.5", r: "1.5" })] }) }) : null, r === "audio" ? S("svg", { "aria-hidden": "true", className: "uppy:w-3/4 uppy:h-3/4", viewBox: "0 0 25 25", children: S("path", { d: "M9.5 18.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V7.25a.5.5 0 0 1 .379-.485l9-2.25A.5.5 0 0 1 18.5 5v11.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V8.67l-8 2v7.97zm8-11v-2l-8 2v2l8-2zM7 19.64c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1zm9-2c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1z", fill: "#049BCF", "fill-rule": "nonzero" }) }) : null, r === "video" ? S("svg", { "aria-hidden": "true", className: "uppy:w-3/4 uppy:h-3/4", viewBox: "0 0 25 25", children: S("path", { d: "M16 11.834l4.486-2.691A1 1 0 0 1 22 10v6a1 1 0 0 1-1.514.857L16 14.167V17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2.834zM15 9H5v8h10V9zm1 4l5 3v-6l-5 3z", fill: "#19AF67", "fill-rule": "nonzero" }) }) : null, a ? S("svg", { "aria-hidden": "true", className: "uppy:w-3/4 uppy:h-3/4", viewBox: "0 0 25 25", children: S("path", { d: "M9.766 8.295c-.691-1.843-.539-3.401.747-3.726 1.643-.414 2.505.938 2.39 3.299-.039.79-.194 1.662-.537 3.148.324.49.66.967 1.055 1.51.17.231.382.488.629.757 1.866-.128 3.653.114 4.918.655 1.487.635 2.192 1.685 1.614 2.84-.566 1.133-1.839 1.084-3.416.249-1.141-.604-2.457-1.634-3.51-2.707a13.467 13.467 0 0 0-2.238.426c-1.392 4.051-4.534 6.453-5.707 4.572-.986-1.58 1.38-4.206 4.914-5.375.097-.322.185-.656.264-1.001.08-.353.306-1.31.407-1.737-.678-1.059-1.2-2.031-1.53-2.91zm2.098 4.87c-.033.144-.068.287-.104.427l.033-.01-.012.038a14.065 14.065 0 0 1 1.02-.197l-.032-.033.052-.004a7.902 7.902 0 0 1-.208-.271c-.197-.27-.38-.526-.555-.775l-.006.028-.002-.003c-.076.323-.148.632-.186.8zm5.77 2.978c1.143.605 1.832.632 2.054.187.26-.519-.087-1.034-1.113-1.473-.911-.39-2.175-.608-3.55-.608.845.766 1.787 1.459 2.609 1.894zM6.559 18.789c.14.223.693.16 1.425-.413.827-.648 1.61-1.747 2.208-3.206-2.563 1.064-4.102 2.867-3.633 3.62zm5.345-10.97c.088-1.793-.351-2.48-1.146-2.28-.473.119-.564 1.05-.056 2.405.213.566.52 1.188.908 1.859.18-.858.268-1.453.294-1.984z", fill: "#E2514A", "fill-rule": "nonzero" }) }) : null, i ? S("svg", { "aria-hidden": "true", className: "uppy:w-3/4 uppy:h-3/4", viewBox: "0 0 25 25", children: S("path", { d: "M10.45 2.05h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V2.55a.5.5 0 0 1 .5-.5zm2.05 1.024h1.05a.5.5 0 0 1 .5.5V3.6a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5v-.001zM10.45 0h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V.5a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 3.074h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 1.024h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm-2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm-2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-1.656 3.074l-.82 5.946c.52.302 1.174.458 1.976.458.803 0 1.455-.156 1.975-.458l-.82-5.946h-2.311zm0-1.025h2.312c.512 0 .946.378 1.015.885l.82 5.946c.056.412-.142.817-.501 1.026-.686.398-1.515.597-2.49.597-.974 0-1.804-.199-2.49-.597a1.025 1.025 0 0 1-.5-1.026l.819-5.946c.07-.507.503-.885 1.015-.885zm.545 6.6a.5.5 0 0 1-.397-.561l.143-.999a.5.5 0 0 1 .495-.429h.74a.5.5 0 0 1 .495.43l.143.998a.5.5 0 0 1-.397.561c-.404.08-.819.08-1.222 0z", fill: "#00C469", "fill-rule": "nonzero" }) }) : null, t.file.type && !r && !a && !i ? S("svg", { "aria-hidden": "true", className: "uppy:w-3/4 uppy:h-3/4", viewBox: "0 0 25 25", children: S("g", { fill: "#A7AFB7", "fill-rule": "nonzero", children: [S("path", { d: "M5.5 22a.5.5 0 0 1-.5-.5v-18a.5.5 0 0 1 .5-.5h10.719a.5.5 0 0 1 .367.16l3.281 3.556a.5.5 0 0 1 .133.339V21.5a.5.5 0 0 1-.5.5h-14zm.5-1h13V7.25L16 4H6v17z" }), S("path", { d: "M15 4v3a1 1 0 0 0 1 1h3V7h-3V4h-1z" })] }) }) : null] }) })] });
|
|
2821
2911
|
}
|
|
2822
|
-
function
|
|
2912
|
+
function Hi({ uppy: t, onStatusChange: e, onProgressChange: n }) {
|
|
2823
2913
|
const r = () => {
|
|
2824
2914
|
e("ready");
|
|
2825
2915
|
}, s = () => {
|
|
@@ -2829,8 +2919,8 @@ function Bi({ uppy: t, onStatusChange: e, onProgressChange: n }) {
|
|
|
2829
2919
|
}, i = () => {
|
|
2830
2920
|
e("uploading");
|
|
2831
2921
|
}, a = (c) => {
|
|
2832
|
-
var
|
|
2833
|
-
((
|
|
2922
|
+
var m, v;
|
|
2923
|
+
((m = c == null ? void 0 : c.failed) != null && m.length || (v = c == null ? void 0 : c.successful) != null && v.length) && (e("complete"), n(0));
|
|
2834
2924
|
}, l = () => {
|
|
2835
2925
|
e("error"), n(0);
|
|
2836
2926
|
}, u = () => {
|
|
@@ -2846,7 +2936,7 @@ function Bi({ uppy: t, onStatusChange: e, onProgressChange: n }) {
|
|
|
2846
2936
|
}
|
|
2847
2937
|
};
|
|
2848
2938
|
}
|
|
2849
|
-
const Fn = Symbol("uppy"),
|
|
2939
|
+
const Fn = Symbol("uppy"), Gi = E({
|
|
2850
2940
|
name: "UppyContextProvider",
|
|
2851
2941
|
props: {
|
|
2852
2942
|
uppy: {
|
|
@@ -2855,17 +2945,17 @@ const Fn = Symbol("uppy"), ji = I({
|
|
|
2855
2945
|
}
|
|
2856
2946
|
},
|
|
2857
2947
|
setup(t, { slots: e }) {
|
|
2858
|
-
const n =
|
|
2859
|
-
uppy:
|
|
2948
|
+
const n = G("init"), r = G(0), s = tn({
|
|
2949
|
+
uppy: Wn(t.uppy),
|
|
2860
2950
|
status: "init",
|
|
2861
2951
|
progress: 0
|
|
2862
2952
|
});
|
|
2863
|
-
|
|
2953
|
+
Yn(Fn, s);
|
|
2864
2954
|
let o;
|
|
2865
|
-
return
|
|
2955
|
+
return ve(() => {
|
|
2866
2956
|
if (!t.uppy)
|
|
2867
2957
|
throw new Error("UppyContextProvider: passing `uppy` as a prop is required");
|
|
2868
|
-
o =
|
|
2958
|
+
o = Hi({
|
|
2869
2959
|
uppy: t.uppy,
|
|
2870
2960
|
onStatusChange: (i) => {
|
|
2871
2961
|
n.value = i, s.status = i;
|
|
@@ -2874,7 +2964,7 @@ const Fn = Symbol("uppy"), ji = I({
|
|
|
2874
2964
|
r.value = i, s.progress = i;
|
|
2875
2965
|
}
|
|
2876
2966
|
});
|
|
2877
|
-
}),
|
|
2967
|
+
}), ht(() => {
|
|
2878
2968
|
o == null || o.cleanup();
|
|
2879
2969
|
}), () => {
|
|
2880
2970
|
var i;
|
|
@@ -2883,48 +2973,48 @@ const Fn = Symbol("uppy"), ji = I({
|
|
|
2883
2973
|
}
|
|
2884
2974
|
});
|
|
2885
2975
|
function Tn() {
|
|
2886
|
-
const t =
|
|
2976
|
+
const t = T(Fn);
|
|
2887
2977
|
return t || {
|
|
2888
2978
|
uppy: void 0,
|
|
2889
2979
|
status: "init",
|
|
2890
2980
|
progress: 0
|
|
2891
2981
|
};
|
|
2892
2982
|
}
|
|
2893
|
-
const
|
|
2983
|
+
const Wi = E({
|
|
2894
2984
|
name: "Dropzone",
|
|
2895
2985
|
props: ["width", "height", "note", "noClick"],
|
|
2896
2986
|
setup(t) {
|
|
2897
|
-
const e =
|
|
2987
|
+
const e = G(null), n = Tn();
|
|
2898
2988
|
function r() {
|
|
2899
|
-
e.value && gn(St(
|
|
2989
|
+
e.value && gn(St(zi, {
|
|
2900
2990
|
...t,
|
|
2901
2991
|
ctx: n
|
|
2902
2992
|
}), e.value);
|
|
2903
2993
|
}
|
|
2904
|
-
return
|
|
2994
|
+
return ve(() => {
|
|
2905
2995
|
r();
|
|
2906
|
-
}),
|
|
2996
|
+
}), he(n, () => {
|
|
2907
2997
|
r();
|
|
2908
|
-
}),
|
|
2998
|
+
}), he(() => t, () => {
|
|
2909
2999
|
r();
|
|
2910
3000
|
}, { deep: !0 }), () => rn("div", { ref: e });
|
|
2911
3001
|
}
|
|
2912
|
-
}),
|
|
3002
|
+
}), Yi = E({
|
|
2913
3003
|
name: "FilesList",
|
|
2914
3004
|
props: ["editFile", "imageThumbnail"],
|
|
2915
3005
|
setup(t) {
|
|
2916
|
-
const e =
|
|
3006
|
+
const e = G(null), n = Tn();
|
|
2917
3007
|
function r() {
|
|
2918
|
-
e.value && gn(St(
|
|
3008
|
+
e.value && gn(St(xi, {
|
|
2919
3009
|
...t,
|
|
2920
3010
|
ctx: n
|
|
2921
3011
|
}), e.value);
|
|
2922
3012
|
}
|
|
2923
|
-
return
|
|
3013
|
+
return ve(() => {
|
|
2924
3014
|
r();
|
|
2925
|
-
}),
|
|
3015
|
+
}), he(n, () => {
|
|
2926
3016
|
r();
|
|
2927
|
-
}),
|
|
3017
|
+
}), he(() => t, () => {
|
|
2928
3018
|
r();
|
|
2929
3019
|
}, { deep: !0 }), () => rn("div", { ref: e });
|
|
2930
3020
|
}
|
|
@@ -2994,26 +3084,26 @@ const Ht = {
|
|
|
2994
3084
|
gz: "application/gzip",
|
|
2995
3085
|
dmg: "application/x-apple-diskimage"
|
|
2996
3086
|
};
|
|
2997
|
-
function
|
|
3087
|
+
function In(t) {
|
|
2998
3088
|
var n;
|
|
2999
3089
|
if (t.type)
|
|
3000
3090
|
return t.type;
|
|
3001
3091
|
const e = t.name ? (n = kn(t.name).extension) == null ? void 0 : n.toLowerCase() : null;
|
|
3002
3092
|
return e && e in Ht ? Ht[e] : "application/octet-stream";
|
|
3003
3093
|
}
|
|
3004
|
-
function
|
|
3094
|
+
function Xi(t) {
|
|
3005
3095
|
return t.charCodeAt(0).toString(32);
|
|
3006
3096
|
}
|
|
3007
3097
|
function Gt(t) {
|
|
3008
3098
|
let e = "";
|
|
3009
|
-
return t.replace(/[^A-Z0-9]/gi, (n) => (e += `-${
|
|
3099
|
+
return t.replace(/[^A-Z0-9]/gi, (n) => (e += `-${Xi(n)}`, "/")) + e;
|
|
3010
3100
|
}
|
|
3011
|
-
function
|
|
3101
|
+
function Zi(t, e) {
|
|
3012
3102
|
var r;
|
|
3013
3103
|
let n = e || "uppy";
|
|
3014
3104
|
return typeof t.name == "string" && (n += `-${Gt(t.name.toLowerCase())}`), t.type !== void 0 && (n += `-${t.type}`), t.meta && typeof t.meta.relativePath == "string" && (n += `-${Gt(t.meta.relativePath.toLowerCase())}`), ((r = t.data) == null ? void 0 : r.size) !== void 0 && (n += `-${t.data.size}`), t.data.lastModified !== void 0 && (n += `-${t.data.lastModified}`), n;
|
|
3015
3105
|
}
|
|
3016
|
-
function
|
|
3106
|
+
function Ki(t) {
|
|
3017
3107
|
return !t.isRemote || !t.remote ? !1 : (/* @__PURE__ */ new Set([
|
|
3018
3108
|
"box",
|
|
3019
3109
|
"dropbox",
|
|
@@ -3022,11 +3112,11 @@ function Gi(t) {
|
|
|
3022
3112
|
"unsplash"
|
|
3023
3113
|
])).has(t.remote.provider);
|
|
3024
3114
|
}
|
|
3025
|
-
function
|
|
3026
|
-
if (
|
|
3115
|
+
function Ji(t, e) {
|
|
3116
|
+
if (Ki(t))
|
|
3027
3117
|
return t.id;
|
|
3028
|
-
const n =
|
|
3029
|
-
return
|
|
3118
|
+
const n = In(t);
|
|
3119
|
+
return Zi({
|
|
3030
3120
|
...t,
|
|
3031
3121
|
type: n
|
|
3032
3122
|
}, e);
|
|
@@ -3034,11 +3124,11 @@ function Wi(t, e) {
|
|
|
3034
3124
|
function Qe(t) {
|
|
3035
3125
|
return t < 10 ? `0${t}` : t.toString();
|
|
3036
3126
|
}
|
|
3037
|
-
function
|
|
3127
|
+
function je() {
|
|
3038
3128
|
const t = /* @__PURE__ */ new Date(), e = Qe(t.getHours()), n = Qe(t.getMinutes()), r = Qe(t.getSeconds());
|
|
3039
3129
|
return `${e}:${n}:${r}`;
|
|
3040
3130
|
}
|
|
3041
|
-
function
|
|
3131
|
+
function Qi(t, e, n) {
|
|
3042
3132
|
const r = [];
|
|
3043
3133
|
return t.forEach((s) => typeof s != "string" ? r.push(s) : e[Symbol.split](s).forEach((o, i, a) => {
|
|
3044
3134
|
o !== "" && r.push(o), i < a.length - 1 && r.push(n);
|
|
@@ -3062,25 +3152,25 @@ function Wt(t, e) {
|
|
|
3062
3152
|
for (const o of Object.keys(e))
|
|
3063
3153
|
if (o !== "_") {
|
|
3064
3154
|
let i = e[o];
|
|
3065
|
-
typeof i == "string" && (i = n[Symbol.replace](i, r)), s =
|
|
3155
|
+
typeof i == "string" && (i = n[Symbol.replace](i, r)), s = Qi(s, new RegExp(`%\\{${o}\\}`, "g"), i);
|
|
3066
3156
|
}
|
|
3067
3157
|
return s;
|
|
3068
3158
|
}
|
|
3069
|
-
const
|
|
3159
|
+
const eo = (t) => {
|
|
3070
3160
|
throw new Error(`missing string: ${t}`);
|
|
3071
3161
|
};
|
|
3072
|
-
var
|
|
3073
|
-
class
|
|
3074
|
-
constructor(e, { onMissingKey: n =
|
|
3075
|
-
x(this, Ie);
|
|
3076
|
-
R(this, "locale");
|
|
3162
|
+
var Ie, Ee, ot;
|
|
3163
|
+
class to {
|
|
3164
|
+
constructor(e, { onMissingKey: n = eo } = {}) {
|
|
3077
3165
|
x(this, Ee);
|
|
3166
|
+
R(this, "locale");
|
|
3167
|
+
x(this, Ie);
|
|
3078
3168
|
this.locale = {
|
|
3079
3169
|
strings: {},
|
|
3080
3170
|
pluralize(r) {
|
|
3081
3171
|
return r === 1 ? 0 : 1;
|
|
3082
3172
|
}
|
|
3083
|
-
}, Array.isArray(e) ? e.forEach(F(this,
|
|
3173
|
+
}, Array.isArray(e) ? e.forEach(F(this, Ee, ot), this) : F(this, Ee, ot).call(this, e), Ue(this, Ie, n);
|
|
3084
3174
|
}
|
|
3085
3175
|
/**
|
|
3086
3176
|
* Public translate method
|
|
@@ -3099,7 +3189,7 @@ class Zi {
|
|
|
3099
3189
|
*/
|
|
3100
3190
|
translateArray(e, n) {
|
|
3101
3191
|
let r = this.locale.strings[e];
|
|
3102
|
-
if (r == null && (b(this,
|
|
3192
|
+
if (r == null && (b(this, Ie).call(this, e), r = e), typeof r == "object") {
|
|
3103
3193
|
if (n && typeof n.smart_count < "u") {
|
|
3104
3194
|
const o = this.locale.pluralize(n.smart_count);
|
|
3105
3195
|
return Wt(r[o], n);
|
|
@@ -3111,7 +3201,7 @@ class Zi {
|
|
|
3111
3201
|
return Wt(r, n);
|
|
3112
3202
|
}
|
|
3113
3203
|
}
|
|
3114
|
-
|
|
3204
|
+
Ie = new WeakMap(), Ee = new WeakSet(), ot = function(e) {
|
|
3115
3205
|
if (!(e != null && e.strings))
|
|
3116
3206
|
return;
|
|
3117
3207
|
const n = this.locale;
|
|
@@ -3120,22 +3210,22 @@ Ee = new WeakMap(), Ie = new WeakSet(), ot = function(e) {
|
|
|
3120
3210
|
pluralize: e.pluralize || n.pluralize
|
|
3121
3211
|
});
|
|
3122
3212
|
};
|
|
3123
|
-
const
|
|
3213
|
+
const no = {
|
|
3124
3214
|
debug: () => {
|
|
3125
3215
|
},
|
|
3126
3216
|
warn: () => {
|
|
3127
3217
|
},
|
|
3128
|
-
error: (...t) => console.error(`[Uppy] [${
|
|
3129
|
-
},
|
|
3130
|
-
debug: (...t) => console.debug(`[Uppy] [${
|
|
3131
|
-
warn: (...t) => console.warn(`[Uppy] [${
|
|
3132
|
-
error: (...t) => console.error(`[Uppy] [${
|
|
3218
|
+
error: (...t) => console.error(`[Uppy] [${je()}]`, ...t)
|
|
3219
|
+
}, ro = {
|
|
3220
|
+
debug: (...t) => console.debug(`[Uppy] [${je()}]`, ...t),
|
|
3221
|
+
warn: (...t) => console.warn(`[Uppy] [${je()}]`, ...t),
|
|
3222
|
+
error: (...t) => console.error(`[Uppy] [${je()}]`, ...t)
|
|
3133
3223
|
};
|
|
3134
|
-
var
|
|
3224
|
+
var Pe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3135
3225
|
function Xe(t) {
|
|
3136
3226
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
3137
3227
|
}
|
|
3138
|
-
var
|
|
3228
|
+
var so = function(e) {
|
|
3139
3229
|
if (typeof e != "number" || Number.isNaN(e))
|
|
3140
3230
|
throw new TypeError(`Expected a number, got ${typeof e}`);
|
|
3141
3231
|
const n = e < 0;
|
|
@@ -3145,11 +3235,11 @@ var Qi = function(e) {
|
|
|
3145
3235
|
const s = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], o = Math.min(Math.floor(Math.log(r) / Math.log(1024)), s.length - 1), i = Number(r / 1024 ** o), a = s[o];
|
|
3146
3236
|
return `${i >= 10 || i % 1 === 0 ? Math.round(i) : i.toFixed(1)} ${a}`;
|
|
3147
3237
|
};
|
|
3148
|
-
const
|
|
3149
|
-
function
|
|
3238
|
+
const De = /* @__PURE__ */ Xe(so);
|
|
3239
|
+
function En(t, e) {
|
|
3150
3240
|
this.text = t = t || "", this.hasWild = ~t.indexOf("*"), this.separator = e, this.parts = t.split(e);
|
|
3151
3241
|
}
|
|
3152
|
-
|
|
3242
|
+
En.prototype.match = function(t) {
|
|
3153
3243
|
var e = !0, n = this.parts, r, s = n.length, o;
|
|
3154
3244
|
if (typeof t == "string" || t instanceof String)
|
|
3155
3245
|
if (!this.hasWild && this.text != t)
|
|
@@ -3169,17 +3259,17 @@ In.prototype.match = function(t) {
|
|
|
3169
3259
|
}
|
|
3170
3260
|
return e;
|
|
3171
3261
|
};
|
|
3172
|
-
var
|
|
3173
|
-
var r = new
|
|
3262
|
+
var io = function(t, e, n) {
|
|
3263
|
+
var r = new En(t, n || /[\/\.]/);
|
|
3174
3264
|
return typeof e < "u" ? r.match(e) : r;
|
|
3175
|
-
},
|
|
3265
|
+
}, oo = io, ao = /[\/\+\.]/, lo = function(t, e) {
|
|
3176
3266
|
function n(r) {
|
|
3177
|
-
var s =
|
|
3267
|
+
var s = oo(r, t, ao);
|
|
3178
3268
|
return s && s.length >= 2;
|
|
3179
3269
|
}
|
|
3180
3270
|
return e ? n(e.split(";")[0]) : n;
|
|
3181
3271
|
};
|
|
3182
|
-
const
|
|
3272
|
+
const uo = /* @__PURE__ */ Xe(lo), po = {
|
|
3183
3273
|
maxFileSize: null,
|
|
3184
3274
|
minFileSize: null,
|
|
3185
3275
|
maxTotalFileSize: null,
|
|
@@ -3197,7 +3287,7 @@ class J extends Error {
|
|
|
3197
3287
|
this.isUserFacing = (r == null ? void 0 : r.isUserFacing) ?? !0, r != null && r.file && (this.file = r.file);
|
|
3198
3288
|
}
|
|
3199
3289
|
}
|
|
3200
|
-
class
|
|
3290
|
+
class co {
|
|
3201
3291
|
constructor(e, n) {
|
|
3202
3292
|
R(this, "getI18n");
|
|
3203
3293
|
R(this, "getOpts");
|
|
@@ -3220,14 +3310,14 @@ class oo {
|
|
|
3220
3310
|
const o = [...e, ...n].reduce((i, a) => i + (a.size ?? 0), 0);
|
|
3221
3311
|
if (o > r)
|
|
3222
3312
|
throw new J(this.getI18n()("aggregateExceedsSize", {
|
|
3223
|
-
sizeAllowed:
|
|
3224
|
-
size:
|
|
3313
|
+
sizeAllowed: De(r),
|
|
3314
|
+
size: De(o)
|
|
3225
3315
|
}));
|
|
3226
3316
|
}
|
|
3227
3317
|
}
|
|
3228
3318
|
validateSingleFile(e) {
|
|
3229
3319
|
const { maxFileSize: n, minFileSize: r, allowedFileTypes: s } = this.getOpts().restrictions;
|
|
3230
|
-
if (s && !s.some((i) => i.includes("/") ? e.type ?
|
|
3320
|
+
if (s && !s.some((i) => i.includes("/") ? e.type ? uo(e.type.replace(/;.*?$/, ""), i) : !1 : i[0] === "." && e.extension ? e.extension.toLowerCase() === i.slice(1).toLowerCase() : !1)) {
|
|
3231
3321
|
const i = s.join(", ");
|
|
3232
3322
|
throw new J(this.getI18n()("youCanOnlyUploadFileTypes", {
|
|
3233
3323
|
types: i
|
|
@@ -3235,12 +3325,12 @@ class oo {
|
|
|
3235
3325
|
}
|
|
3236
3326
|
if (n && e.size != null && e.size > n)
|
|
3237
3327
|
throw new J(this.getI18n()("exceedsSize", {
|
|
3238
|
-
size:
|
|
3328
|
+
size: De(n),
|
|
3239
3329
|
file: e.name ?? this.getI18n()("unnamed")
|
|
3240
3330
|
}), { file: e });
|
|
3241
3331
|
if (r && e.size != null && e.size < r)
|
|
3242
3332
|
throw new J(this.getI18n()("inferiorSize", {
|
|
3243
|
-
size:
|
|
3333
|
+
size: De(r)
|
|
3244
3334
|
}), { file: e });
|
|
3245
3335
|
}
|
|
3246
3336
|
validate(e, n) {
|
|
@@ -3264,8 +3354,8 @@ class oo {
|
|
|
3264
3354
|
return { missingFields: s, error: n };
|
|
3265
3355
|
}
|
|
3266
3356
|
}
|
|
3267
|
-
const
|
|
3268
|
-
version:
|
|
3357
|
+
const fo = "5.0.0", mo = {
|
|
3358
|
+
version: fo
|
|
3269
3359
|
};
|
|
3270
3360
|
var ce, xe, Vn;
|
|
3271
3361
|
class Cn {
|
|
@@ -3291,55 +3381,55 @@ ce = new WeakMap(), xe = new WeakSet(), Vn = function(...e) {
|
|
|
3291
3381
|
b(this, ce).forEach((n) => {
|
|
3292
3382
|
n(...e);
|
|
3293
3383
|
});
|
|
3294
|
-
}, R(Cn, "VERSION",
|
|
3295
|
-
function
|
|
3384
|
+
}, R(Cn, "VERSION", mo.version);
|
|
3385
|
+
function ho(t) {
|
|
3296
3386
|
var e = typeof t;
|
|
3297
3387
|
return t != null && (e == "object" || e == "function");
|
|
3298
3388
|
}
|
|
3299
|
-
var
|
|
3300
|
-
return
|
|
3301
|
-
},
|
|
3302
|
-
function
|
|
3303
|
-
for (var e = t.length; e-- &&
|
|
3389
|
+
var It = ho, go = typeof Pe == "object" && Pe && Pe.Object === Object && Pe, yo = go, vo = yo, _o = typeof self == "object" && self && self.Object === Object && self, bo = vo || _o || Function("return this")(), Mn = bo, wo = Mn, $o = function() {
|
|
3390
|
+
return wo.Date.now();
|
|
3391
|
+
}, So = $o, Fo = /\s/;
|
|
3392
|
+
function To(t) {
|
|
3393
|
+
for (var e = t.length; e-- && Fo.test(t.charAt(e)); )
|
|
3304
3394
|
;
|
|
3305
3395
|
return e;
|
|
3306
3396
|
}
|
|
3307
|
-
var
|
|
3308
|
-
function
|
|
3309
|
-
return t && t.slice(0,
|
|
3397
|
+
var ko = To, Io = ko, Eo = /^\s+/;
|
|
3398
|
+
function Co(t) {
|
|
3399
|
+
return t && t.slice(0, Io(t) + 1).replace(Eo, "");
|
|
3310
3400
|
}
|
|
3311
|
-
var
|
|
3312
|
-
function
|
|
3313
|
-
var e =
|
|
3401
|
+
var Vo = Co, Mo = Mn, Uo = Mo.Symbol, Un = Uo, Yt = Un, An = Object.prototype, Ao = An.hasOwnProperty, No = An.toString, $e = Yt ? Yt.toStringTag : void 0;
|
|
3402
|
+
function Po(t) {
|
|
3403
|
+
var e = Ao.call(t, $e), n = t[$e];
|
|
3314
3404
|
try {
|
|
3315
|
-
t[
|
|
3405
|
+
t[$e] = void 0;
|
|
3316
3406
|
var r = !0;
|
|
3317
3407
|
} catch {
|
|
3318
3408
|
}
|
|
3319
|
-
var s =
|
|
3320
|
-
return r && (e ? t[
|
|
3409
|
+
var s = No.call(t);
|
|
3410
|
+
return r && (e ? t[$e] = n : delete t[$e]), s;
|
|
3321
3411
|
}
|
|
3322
|
-
var
|
|
3323
|
-
function
|
|
3324
|
-
return
|
|
3412
|
+
var Do = Po, zo = Object.prototype, Oo = zo.toString;
|
|
3413
|
+
function Ro(t) {
|
|
3414
|
+
return Oo.call(t);
|
|
3325
3415
|
}
|
|
3326
|
-
var
|
|
3327
|
-
function
|
|
3328
|
-
return t == null ? t === void 0 ?
|
|
3416
|
+
var Bo = Ro, Xt = Un, jo = Do, Lo = Bo, xo = "[object Null]", qo = "[object Undefined]", Zt = Xt ? Xt.toStringTag : void 0;
|
|
3417
|
+
function Ho(t) {
|
|
3418
|
+
return t == null ? t === void 0 ? qo : xo : Zt && Zt in Object(t) ? jo(t) : Lo(t);
|
|
3329
3419
|
}
|
|
3330
|
-
var
|
|
3331
|
-
function
|
|
3420
|
+
var Go = Ho;
|
|
3421
|
+
function Wo(t) {
|
|
3332
3422
|
return t != null && typeof t == "object";
|
|
3333
3423
|
}
|
|
3334
|
-
var
|
|
3335
|
-
function
|
|
3336
|
-
return typeof t == "symbol" ||
|
|
3424
|
+
var Yo = Wo, Xo = Go, Zo = Yo, Ko = "[object Symbol]";
|
|
3425
|
+
function Jo(t) {
|
|
3426
|
+
return typeof t == "symbol" || Zo(t) && Xo(t) == Ko;
|
|
3337
3427
|
}
|
|
3338
|
-
var
|
|
3339
|
-
function
|
|
3428
|
+
var Qo = Jo, ea = Vo, Kt = It, ta = Qo, Jt = NaN, na = /^[-+]0x[0-9a-f]+$/i, ra = /^0b[01]+$/i, sa = /^0o[0-7]+$/i, ia = parseInt;
|
|
3429
|
+
function oa(t) {
|
|
3340
3430
|
if (typeof t == "number")
|
|
3341
3431
|
return t;
|
|
3342
|
-
if (
|
|
3432
|
+
if (ta(t))
|
|
3343
3433
|
return Jt;
|
|
3344
3434
|
if (Kt(t)) {
|
|
3345
3435
|
var e = typeof t.valueOf == "function" ? t.valueOf() : t;
|
|
@@ -3347,45 +3437,45 @@ function ta(t) {
|
|
|
3347
3437
|
}
|
|
3348
3438
|
if (typeof t != "string")
|
|
3349
3439
|
return t === 0 ? t : +t;
|
|
3350
|
-
t =
|
|
3351
|
-
var n =
|
|
3352
|
-
return n ||
|
|
3440
|
+
t = ea(t);
|
|
3441
|
+
var n = ra.test(t);
|
|
3442
|
+
return n || sa.test(t) ? ia(t.slice(2), n ? 2 : 8) : na.test(t) ? Jt : +t;
|
|
3353
3443
|
}
|
|
3354
|
-
var
|
|
3355
|
-
function
|
|
3444
|
+
var aa = oa, la = It, et = So, Qt = aa, ua = "Expected a function", da = Math.max, pa = Math.min;
|
|
3445
|
+
function ca(t, e, n) {
|
|
3356
3446
|
var r, s, o, i, a, l, u = 0, d = !1, p = !1, c = !0;
|
|
3357
3447
|
if (typeof t != "function")
|
|
3358
|
-
throw new TypeError(
|
|
3359
|
-
e = Qt(e) || 0,
|
|
3360
|
-
function
|
|
3361
|
-
var U = r,
|
|
3362
|
-
return r = s = void 0, u = w, i = t.apply(
|
|
3448
|
+
throw new TypeError(ua);
|
|
3449
|
+
e = Qt(e) || 0, la(n) && (d = !!n.leading, p = "maxWait" in n, o = p ? da(Qt(n.maxWait) || 0, e) : o, c = "trailing" in n ? !!n.trailing : c);
|
|
3450
|
+
function m(w) {
|
|
3451
|
+
var U = r, D = s;
|
|
3452
|
+
return r = s = void 0, u = w, i = t.apply(D, U), i;
|
|
3363
3453
|
}
|
|
3364
3454
|
function v(w) {
|
|
3365
|
-
return u = w, a = setTimeout(
|
|
3455
|
+
return u = w, a = setTimeout(k, e), d ? m(w) : i;
|
|
3366
3456
|
}
|
|
3367
3457
|
function V(w) {
|
|
3368
|
-
var U = w - l,
|
|
3369
|
-
return p ?
|
|
3458
|
+
var U = w - l, D = w - u, H = e - U;
|
|
3459
|
+
return p ? pa(H, o - D) : H;
|
|
3370
3460
|
}
|
|
3371
3461
|
function A(w) {
|
|
3372
|
-
var U = w - l,
|
|
3373
|
-
return l === void 0 || U >= e || U < 0 || p &&
|
|
3462
|
+
var U = w - l, D = w - u;
|
|
3463
|
+
return l === void 0 || U >= e || U < 0 || p && D >= o;
|
|
3374
3464
|
}
|
|
3375
|
-
function
|
|
3465
|
+
function k() {
|
|
3376
3466
|
var w = et();
|
|
3377
3467
|
if (A(w))
|
|
3378
|
-
return
|
|
3379
|
-
a = setTimeout(
|
|
3468
|
+
return I(w);
|
|
3469
|
+
a = setTimeout(k, V(w));
|
|
3380
3470
|
}
|
|
3381
|
-
function
|
|
3382
|
-
return a = void 0, c && r ?
|
|
3471
|
+
function I(w) {
|
|
3472
|
+
return a = void 0, c && r ? m(w) : (r = s = void 0, i);
|
|
3383
3473
|
}
|
|
3384
3474
|
function Y() {
|
|
3385
3475
|
a !== void 0 && clearTimeout(a), u = 0, r = l = s = a = void 0;
|
|
3386
3476
|
}
|
|
3387
3477
|
function f() {
|
|
3388
|
-
return a === void 0 ? i :
|
|
3478
|
+
return a === void 0 ? i : I(et());
|
|
3389
3479
|
}
|
|
3390
3480
|
function _() {
|
|
3391
3481
|
var w = et(), U = A(w);
|
|
@@ -3393,30 +3483,30 @@ function aa(t, e, n) {
|
|
|
3393
3483
|
if (a === void 0)
|
|
3394
3484
|
return v(l);
|
|
3395
3485
|
if (p)
|
|
3396
|
-
return clearTimeout(a), a = setTimeout(
|
|
3486
|
+
return clearTimeout(a), a = setTimeout(k, e), m(l);
|
|
3397
3487
|
}
|
|
3398
|
-
return a === void 0 && (a = setTimeout(
|
|
3488
|
+
return a === void 0 && (a = setTimeout(k, e)), i;
|
|
3399
3489
|
}
|
|
3400
3490
|
return _.cancel = Y, _.flush = f, _;
|
|
3401
3491
|
}
|
|
3402
|
-
var
|
|
3403
|
-
function
|
|
3492
|
+
var fa = ca, ma = fa, ha = It, ga = "Expected a function";
|
|
3493
|
+
function ya(t, e, n) {
|
|
3404
3494
|
var r = !0, s = !0;
|
|
3405
3495
|
if (typeof t != "function")
|
|
3406
|
-
throw new TypeError(
|
|
3407
|
-
return
|
|
3496
|
+
throw new TypeError(ga);
|
|
3497
|
+
return ha(n) && (r = "leading" in n ? !!n.leading : r, s = "trailing" in n ? !!n.trailing : s), ma(t, e, {
|
|
3408
3498
|
leading: r,
|
|
3409
3499
|
maxWait: e,
|
|
3410
3500
|
trailing: s
|
|
3411
3501
|
});
|
|
3412
3502
|
}
|
|
3413
|
-
var
|
|
3414
|
-
const
|
|
3415
|
-
var
|
|
3503
|
+
var va = ya;
|
|
3504
|
+
const _a = /* @__PURE__ */ Xe(va);
|
|
3505
|
+
var ba = function() {
|
|
3416
3506
|
var e = {}, n = e._fns = {};
|
|
3417
3507
|
e.emit = function(i, a, l, u, d, p, c) {
|
|
3418
|
-
var
|
|
3419
|
-
|
|
3508
|
+
var m = r(i);
|
|
3509
|
+
m.length && s(i, m, [a, l, u, d, p, c]);
|
|
3420
3510
|
}, e.on = function(i, a) {
|
|
3421
3511
|
n[i] || (n[i] = []), n[i].push(a);
|
|
3422
3512
|
}, e.once = function(i, a) {
|
|
@@ -3451,20 +3541,20 @@ var ma = function() {
|
|
|
3451
3541
|
}
|
|
3452
3542
|
return e;
|
|
3453
3543
|
};
|
|
3454
|
-
const
|
|
3455
|
-
let
|
|
3544
|
+
const wa = /* @__PURE__ */ Xe(ba);
|
|
3545
|
+
let $a = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", Sa = (t = 21) => {
|
|
3456
3546
|
let e = "", n = t | 0;
|
|
3457
3547
|
for (; n--; )
|
|
3458
|
-
e +=
|
|
3548
|
+
e += $a[Math.random() * 64 | 0];
|
|
3459
3549
|
return e;
|
|
3460
3550
|
};
|
|
3461
|
-
const
|
|
3462
|
-
version:
|
|
3551
|
+
const Fa = "5.2.0", Ta = {
|
|
3552
|
+
version: Fa
|
|
3463
3553
|
};
|
|
3464
|
-
function
|
|
3554
|
+
function ka(t, e) {
|
|
3465
3555
|
return e.name ? e.name : t.split("/")[0] === "image" ? `${t.split("/")[0]}.${t.split("/")[1]}` : "noname";
|
|
3466
3556
|
}
|
|
3467
|
-
const
|
|
3557
|
+
const Ia = {
|
|
3468
3558
|
strings: {
|
|
3469
3559
|
addBulkFilesFailed: {
|
|
3470
3560
|
0: "Failed to add %{smart_count} file due to an internal error",
|
|
@@ -3529,7 +3619,7 @@ const $a = {
|
|
|
3529
3619
|
pleaseWait: "Please wait"
|
|
3530
3620
|
}
|
|
3531
3621
|
};
|
|
3532
|
-
function
|
|
3622
|
+
function Ea(t) {
|
|
3533
3623
|
if (t == null && typeof navigator < "u" && (t = navigator.userAgent), !t)
|
|
3534
3624
|
return !0;
|
|
3535
3625
|
const e = /Edge\/(\d+\.\d+)/.exec(t);
|
|
@@ -3538,14 +3628,14 @@ function Sa(t) {
|
|
|
3538
3628
|
const r = e[1].split(".", 2), s = parseInt(r[0], 10), o = parseInt(r[1], 10);
|
|
3539
3629
|
return s < 15 || s === 15 && o < 15063 || s > 18 || s === 18 && o >= 18218;
|
|
3540
3630
|
}
|
|
3541
|
-
const
|
|
3631
|
+
const ze = {
|
|
3542
3632
|
totalProgress: 0,
|
|
3543
3633
|
allowNewUpload: !0,
|
|
3544
3634
|
error: null,
|
|
3545
3635
|
recoveredState: null
|
|
3546
3636
|
};
|
|
3547
|
-
var Z, K, Ce, le, fe,
|
|
3548
|
-
const
|
|
3637
|
+
var Z, K, Ce, le, fe, me, ue, y, oe, lt, Nn, Pn, Dn, ut, dt, pt, ct, qe, ft, de, zn, On, se, Ve, Se, Rn, mt, Fe;
|
|
3638
|
+
const He = class He {
|
|
3549
3639
|
/**
|
|
3550
3640
|
* Instantiate Uppy
|
|
3551
3641
|
*/
|
|
@@ -3554,9 +3644,9 @@ const qe = class qe {
|
|
|
3554
3644
|
x(this, Z, /* @__PURE__ */ Object.create(null));
|
|
3555
3645
|
x(this, K);
|
|
3556
3646
|
x(this, Ce);
|
|
3557
|
-
x(this, le,
|
|
3647
|
+
x(this, le, wa());
|
|
3558
3648
|
x(this, fe, /* @__PURE__ */ new Set());
|
|
3559
|
-
x(this,
|
|
3649
|
+
x(this, me, /* @__PURE__ */ new Set());
|
|
3560
3650
|
x(this, ue, /* @__PURE__ */ new Set());
|
|
3561
3651
|
R(this, "defaultLocale");
|
|
3562
3652
|
R(this, "locale");
|
|
@@ -3569,7 +3659,7 @@ const qe = class qe {
|
|
|
3569
3659
|
R(this, "i18nArray");
|
|
3570
3660
|
R(this, "scheduledAutoProceed", null);
|
|
3571
3661
|
R(this, "wasOffline", !1);
|
|
3572
|
-
x(this,
|
|
3662
|
+
x(this, qe, (e, n) => {
|
|
3573
3663
|
const r = e ? this.getFile(e.id) : void 0;
|
|
3574
3664
|
if (e == null || !r) {
|
|
3575
3665
|
this.log(`Not setting progress for a file that has been removed: ${e == null ? void 0 : e.id}`);
|
|
@@ -3604,7 +3694,7 @@ const qe = class qe {
|
|
|
3604
3694
|
// and click 'ADD MORE FILES', - focus won't activate in Firefox.
|
|
3605
3695
|
// - We must throttle at around >500ms to avoid performance lags.
|
|
3606
3696
|
// [Practical Check] Firefox, try to upload a big file for a prolonged period of time. Laptop will start to heat up.
|
|
3607
|
-
x(this, de,
|
|
3697
|
+
x(this, de, _a(() => F(this, y, ft).call(this), 500, { leading: !0, trailing: !0 }));
|
|
3608
3698
|
x(this, se, this.updateOnlineStatus.bind(this));
|
|
3609
3699
|
// We need to store request clients by a unique ID, so we can share RequestClient instances across files
|
|
3610
3700
|
// this allows us to do rate limiting and synchronous operations like refreshing provider tokens
|
|
@@ -3617,18 +3707,18 @@ const qe = class qe {
|
|
|
3617
3707
|
// all 6 files would go ahead and refresh the token at the same time
|
|
3618
3708
|
// (calling /refresh-token up to 6 times), which will probably fail for some providers
|
|
3619
3709
|
x(this, Ve, /* @__PURE__ */ new Map());
|
|
3620
|
-
this.defaultLocale =
|
|
3710
|
+
this.defaultLocale = Ia;
|
|
3621
3711
|
const n = {
|
|
3622
3712
|
id: "uppy",
|
|
3623
3713
|
autoProceed: !1,
|
|
3624
3714
|
allowMultipleUploadBatches: !0,
|
|
3625
3715
|
debug: !1,
|
|
3626
|
-
restrictions:
|
|
3716
|
+
restrictions: po,
|
|
3627
3717
|
meta: {},
|
|
3628
3718
|
onBeforeFileAdded: (s, o) => !Object.hasOwn(o, s.id),
|
|
3629
3719
|
onBeforeUpload: (s) => s,
|
|
3630
3720
|
store: new Cn(),
|
|
3631
|
-
logger:
|
|
3721
|
+
logger: no,
|
|
3632
3722
|
infoTimeout: 5e3
|
|
3633
3723
|
}, r = { ...n, ...e };
|
|
3634
3724
|
this.opts = {
|
|
@@ -3637,21 +3727,21 @@ const qe = class qe {
|
|
|
3637
3727
|
...n.restrictions,
|
|
3638
3728
|
...e == null ? void 0 : e.restrictions
|
|
3639
3729
|
}
|
|
3640
|
-
}, e != null && e.logger && e.debug ? this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.", "warning") : e != null && e.debug && (this.opts.logger =
|
|
3641
|
-
...
|
|
3730
|
+
}, e != null && e.logger && e.debug ? this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.", "warning") : e != null && e.debug && (this.opts.logger = ro), this.log(`Using Core v${He.VERSION}`), this.i18nInit(), this.store = this.opts.store, this.setState({
|
|
3731
|
+
...ze,
|
|
3642
3732
|
plugins: {},
|
|
3643
3733
|
files: {},
|
|
3644
3734
|
currentUploads: {},
|
|
3645
3735
|
capabilities: {
|
|
3646
|
-
uploadProgress:
|
|
3736
|
+
uploadProgress: Ea(),
|
|
3647
3737
|
individualCancellation: !0,
|
|
3648
3738
|
resumableUploads: !1
|
|
3649
3739
|
},
|
|
3650
3740
|
meta: { ...this.opts.meta },
|
|
3651
3741
|
info: []
|
|
3652
|
-
}),
|
|
3742
|
+
}), Ue(this, K, new co(() => this.opts, () => this.i18n)), Ue(this, Ce, this.store.subscribe((s, o, i) => {
|
|
3653
3743
|
this.emit("state-update", s, o, i), this.updateAll(o);
|
|
3654
|
-
})), this.opts.debug && typeof window < "u" && (window[this.opts.id] = this), F(this, y,
|
|
3744
|
+
})), this.opts.debug && typeof window < "u" && (window[this.opts.id] = this), F(this, y, On).call(this);
|
|
3655
3745
|
}
|
|
3656
3746
|
emit(e, ...n) {
|
|
3657
3747
|
b(this, le).emit(e, ...n);
|
|
@@ -3711,7 +3801,7 @@ const qe = class qe {
|
|
|
3711
3801
|
this.patchFilesState({ [e]: n });
|
|
3712
3802
|
}
|
|
3713
3803
|
i18nInit() {
|
|
3714
|
-
const e = (r) => this.log(`Missing i18n string: ${r}`, "error"), n = new
|
|
3804
|
+
const e = (r) => this.log(`Missing i18n string: ${r}`, "error"), n = new to([this.defaultLocale, this.opts.locale], {
|
|
3715
3805
|
onMissingKey: e
|
|
3716
3806
|
});
|
|
3717
3807
|
this.i18n = n.translate.bind(n), this.i18nArray = n.translateArray.bind(n), this.locale = n.locale;
|
|
@@ -3748,13 +3838,13 @@ const qe = class qe {
|
|
|
3748
3838
|
tus: void 0,
|
|
3749
3839
|
transloadit: void 0
|
|
3750
3840
|
};
|
|
3751
|
-
}), this.setState({ files: r, ...
|
|
3841
|
+
}), this.setState({ files: r, ...ze });
|
|
3752
3842
|
}
|
|
3753
3843
|
clear() {
|
|
3754
3844
|
const { capabilities: e, currentUploads: n } = this.getState();
|
|
3755
3845
|
if (Object.keys(n).length > 0 && !e.individualCancellation)
|
|
3756
3846
|
throw new Error("The installed uploader plugin does not allow removing files during an upload.");
|
|
3757
|
-
this.setState({ ...
|
|
3847
|
+
this.setState({ ...ze, files: {} });
|
|
3758
3848
|
}
|
|
3759
3849
|
addPreProcessor(e) {
|
|
3760
3850
|
b(this, fe).add(e);
|
|
@@ -3769,10 +3859,10 @@ const qe = class qe {
|
|
|
3769
3859
|
return b(this, ue).delete(e);
|
|
3770
3860
|
}
|
|
3771
3861
|
addUploader(e) {
|
|
3772
|
-
b(this,
|
|
3862
|
+
b(this, me).add(e);
|
|
3773
3863
|
}
|
|
3774
3864
|
removeUploader(e) {
|
|
3775
|
-
return b(this,
|
|
3865
|
+
return b(this, me).delete(e);
|
|
3776
3866
|
}
|
|
3777
3867
|
setMeta(e) {
|
|
3778
3868
|
const n = { ...this.getState().meta, ...e }, r = { ...this.getState().files };
|
|
@@ -3812,10 +3902,10 @@ const qe = class qe {
|
|
|
3812
3902
|
return e.map((n) => this.getFile(n));
|
|
3813
3903
|
}
|
|
3814
3904
|
getObjectOfFilesPerState() {
|
|
3815
|
-
const { files: e, totalProgress: n, error: r } = this.getState(), s = Object.values(e), o = [], i = [], a = [], l = [], u = [], d = [], p = [], c = [],
|
|
3905
|
+
const { files: e, totalProgress: n, error: r } = this.getState(), s = Object.values(e), o = [], i = [], a = [], l = [], u = [], d = [], p = [], c = [], m = [];
|
|
3816
3906
|
for (const v of s) {
|
|
3817
3907
|
const { progress: V } = v;
|
|
3818
|
-
!V.uploadComplete && V.uploadStarted && (o.push(v), v.isPaused || c.push(v)), V.uploadStarted || i.push(v), (V.uploadStarted || V.preprocess || V.postprocess) && a.push(v), V.uploadStarted && l.push(v), v.isPaused && u.push(v), V.uploadComplete && d.push(v), v.error && p.push(v), (V.preprocess || V.postprocess) &&
|
|
3908
|
+
!V.uploadComplete && V.uploadStarted && (o.push(v), v.isPaused || c.push(v)), V.uploadStarted || i.push(v), (V.uploadStarted || V.preprocess || V.postprocess) && a.push(v), V.uploadStarted && l.push(v), v.isPaused && u.push(v), V.uploadComplete && d.push(v), v.error && p.push(v), (V.preprocess || V.postprocess) && m.push(v);
|
|
3819
3909
|
}
|
|
3820
3910
|
return {
|
|
3821
3911
|
newFiles: i,
|
|
@@ -3826,9 +3916,9 @@ const qe = class qe {
|
|
|
3826
3916
|
erroredFiles: p,
|
|
3827
3917
|
inProgressFiles: o,
|
|
3828
3918
|
inProgressNotPausedFiles: c,
|
|
3829
|
-
processingFiles:
|
|
3919
|
+
processingFiles: m,
|
|
3830
3920
|
isUploadStarted: l.length > 0,
|
|
3831
|
-
isAllComplete: n === 100 && d.length === s.length &&
|
|
3921
|
+
isAllComplete: n === 100 && d.length === s.length && m.length === 0,
|
|
3832
3922
|
isAllErrored: !!r && p.length === s.length,
|
|
3833
3923
|
isAllPaused: o.length !== 0 && u.length === o.length,
|
|
3834
3924
|
isUploadInProgress: o.length > 0,
|
|
@@ -3982,7 +4072,7 @@ const qe = class qe {
|
|
|
3982
4072
|
cancelAll() {
|
|
3983
4073
|
this.emit("cancel-all");
|
|
3984
4074
|
const { files: e } = this.getState(), n = Object.keys(e);
|
|
3985
|
-
n.length && this.removeFiles(n), this.setState(
|
|
4075
|
+
n.length && this.removeFiles(n), this.setState(ze);
|
|
3986
4076
|
}
|
|
3987
4077
|
/**
|
|
3988
4078
|
* Retry a specific file that has errored.
|
|
@@ -3992,11 +4082,11 @@ const qe = class qe {
|
|
|
3992
4082
|
error: null,
|
|
3993
4083
|
isPaused: !1
|
|
3994
4084
|
}), this.emit("upload-retry", this.getFile(e));
|
|
3995
|
-
const n = F(this, y,
|
|
4085
|
+
const n = F(this, y, Se).call(this, [e], {
|
|
3996
4086
|
forceAllowNewUpload: !0
|
|
3997
4087
|
// create new upload even if allowNewUpload: false
|
|
3998
4088
|
});
|
|
3999
|
-
return F(this, y,
|
|
4089
|
+
return F(this, y, Fe).call(this, n);
|
|
4000
4090
|
}
|
|
4001
4091
|
logout() {
|
|
4002
4092
|
this.iteratePlugins((e) => {
|
|
@@ -4132,11 +4222,11 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
4132
4222
|
*/
|
|
4133
4223
|
async restore(e) {
|
|
4134
4224
|
this.log(`Core: Running restored upload "${e}"`);
|
|
4135
|
-
const n = await F(this, y,
|
|
4225
|
+
const n = await F(this, y, Fe).call(this, e);
|
|
4136
4226
|
return this.emit("complete", n), n;
|
|
4137
4227
|
}
|
|
4138
4228
|
[Symbol.for("uppy test: createUpload")](...e) {
|
|
4139
|
-
return F(this, y,
|
|
4229
|
+
return F(this, y, Se).call(this, ...e);
|
|
4140
4230
|
}
|
|
4141
4231
|
/**
|
|
4142
4232
|
* Add data to an upload's result object.
|
|
@@ -4174,19 +4264,19 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
4174
4264
|
files: e
|
|
4175
4265
|
}));
|
|
4176
4266
|
try {
|
|
4177
|
-
if (b(this, K).validateMinNumberOfFiles(e), !F(this, y,
|
|
4267
|
+
if (b(this, K).validateMinNumberOfFiles(e), !F(this, y, Nn).call(this, e))
|
|
4178
4268
|
throw new J(this.i18n("missingRequiredMetaField"));
|
|
4179
4269
|
const { currentUploads: o } = this.getState(), i = Object.values(o).flatMap((d) => d.fileIDs), a = Object.keys(e).filter((d) => {
|
|
4180
4270
|
const p = this.getFile(d);
|
|
4181
4271
|
return p && !p.progress.uploadStarted && !i.includes(d);
|
|
4182
|
-
}), l = F(this, y,
|
|
4272
|
+
}), l = F(this, y, Se).call(this, a), u = await F(this, y, Fe).call(this, l);
|
|
4183
4273
|
return this.emit("complete", u), u;
|
|
4184
4274
|
} catch (o) {
|
|
4185
4275
|
throw F(this, y, oe).call(this, [o]), o;
|
|
4186
4276
|
}
|
|
4187
4277
|
}
|
|
4188
4278
|
};
|
|
4189
|
-
Z = new WeakMap(), K = new WeakMap(), Ce = new WeakMap(), le = new WeakMap(), fe = new WeakMap(),
|
|
4279
|
+
Z = new WeakMap(), K = new WeakMap(), Ce = new WeakMap(), le = new WeakMap(), fe = new WeakMap(), me = new WeakMap(), ue = new WeakMap(), y = new WeakSet(), oe = function(e) {
|
|
4190
4280
|
for (const i of e)
|
|
4191
4281
|
i.isRestriction ? this.emit("restriction-failed", i.file, i) : this.emit("error", i, i.file), this.log(i, "warning");
|
|
4192
4282
|
const n = e.filter((i) => i.isUserFacing), r = 4, s = n.slice(0, r), o = n.slice(r);
|
|
@@ -4205,7 +4295,7 @@ Z = new WeakMap(), K = new WeakMap(), Ce = new WeakMap(), le = new WeakMap(), fe
|
|
|
4205
4295
|
}), this.log(r.message), this.emit("restriction-failed", e, r), !1) : (n.length === 0 && e.missingRequiredMetaFields && this.setFileState(e.id, {
|
|
4206
4296
|
missingRequiredMetaFields: []
|
|
4207
4297
|
}), !0);
|
|
4208
|
-
},
|
|
4298
|
+
}, Nn = function(e) {
|
|
4209
4299
|
let n = !0;
|
|
4210
4300
|
for (const r of Object.values(e))
|
|
4211
4301
|
F(this, y, lt).call(this, r) || (n = !1);
|
|
@@ -4221,7 +4311,7 @@ Z = new WeakMap(), K = new WeakMap(), Ce = new WeakMap(), le = new WeakMap(), fe
|
|
|
4221
4311
|
}, /**
|
|
4222
4312
|
* Create a file state object based on user-provided `addFile()` options.
|
|
4223
4313
|
*/
|
|
4224
|
-
|
|
4314
|
+
Dn = function(e) {
|
|
4225
4315
|
const n = e instanceof File ? {
|
|
4226
4316
|
name: e.name,
|
|
4227
4317
|
type: e.type,
|
|
@@ -4231,7 +4321,7 @@ Nn = function(e) {
|
|
|
4231
4321
|
isRemote: !1,
|
|
4232
4322
|
source: void 0,
|
|
4233
4323
|
preview: void 0
|
|
4234
|
-
} : e, r =
|
|
4324
|
+
} : e, r = In(n), s = ka(r, n), o = kn(s).extension, i = Ji(n, this.getID()), a = {
|
|
4235
4325
|
...n.meta,
|
|
4236
4326
|
name: s,
|
|
4237
4327
|
type: r
|
|
@@ -4277,7 +4367,7 @@ ut = function() {
|
|
|
4277
4367
|
const s = [], o = [];
|
|
4278
4368
|
for (const i of e)
|
|
4279
4369
|
try {
|
|
4280
|
-
let a = F(this, y,
|
|
4370
|
+
let a = F(this, y, Dn).call(this, i);
|
|
4281
4371
|
F(this, y, Pn).call(this, a);
|
|
4282
4372
|
const l = n[a.id], u = l == null ? void 0 : l.isGhost;
|
|
4283
4373
|
if (u && !a.isRemote) {
|
|
@@ -4336,18 +4426,18 @@ ut = function() {
|
|
|
4336
4426
|
successful: [],
|
|
4337
4427
|
failed: []
|
|
4338
4428
|
};
|
|
4339
|
-
const r = F(this, y,
|
|
4429
|
+
const r = F(this, y, Se).call(this, e, {
|
|
4340
4430
|
forceAllowNewUpload: !0
|
|
4341
4431
|
// create new upload even if allowNewUpload: false
|
|
4342
4432
|
});
|
|
4343
|
-
return F(this, y,
|
|
4344
|
-
},
|
|
4345
|
-
const e = F(this, y,
|
|
4433
|
+
return F(this, y, Fe).call(this, r);
|
|
4434
|
+
}, qe = new WeakMap(), ft = function() {
|
|
4435
|
+
const e = F(this, y, zn).call(this);
|
|
4346
4436
|
let n = null;
|
|
4347
4437
|
e != null && (n = Math.round(e * 100), n > 100 ? n = 100 : n < 0 && (n = 0)), this.emit("progress", n ?? 0), this.setState({
|
|
4348
4438
|
totalProgress: n ?? 0
|
|
4349
4439
|
});
|
|
4350
|
-
}, de = new WeakMap(),
|
|
4440
|
+
}, de = new WeakMap(), zn = function() {
|
|
4351
4441
|
const n = this.getFiles().filter((l) => l.progress.uploadStarted || l.progress.preprocess || l.progress.postprocess);
|
|
4352
4442
|
if (n.length === 0)
|
|
4353
4443
|
return 0;
|
|
@@ -4362,7 +4452,7 @@ ut = function() {
|
|
|
4362
4452
|
* Registers listeners for all global actions, like:
|
|
4363
4453
|
* `error`, `file-removed`, `upload-progress`
|
|
4364
4454
|
*/
|
|
4365
|
-
|
|
4455
|
+
On = function() {
|
|
4366
4456
|
const e = (s, o, i) => {
|
|
4367
4457
|
let a = s.message || "Unknown error";
|
|
4368
4458
|
s.details && (a += ` ${s.details}`), this.setState({ error: a }), o != null && o.id in this.getState().files && this.setFileState(o.id, {
|
|
@@ -4404,7 +4494,7 @@ Dn = function() {
|
|
|
4404
4494
|
]));
|
|
4405
4495
|
this.patchFilesState(i);
|
|
4406
4496
|
};
|
|
4407
|
-
this.on("upload-start", r), this.on("upload-progress", b(this,
|
|
4497
|
+
this.on("upload-start", r), this.on("upload-progress", b(this, qe)), this.on("upload-success", (s, o) => {
|
|
4408
4498
|
if (s == null || !this.getFile(s.id)) {
|
|
4409
4499
|
this.log(`Not setting progress for a file that has been removed: ${s == null ? void 0 : s.id}`);
|
|
4410
4500
|
return;
|
|
@@ -4480,11 +4570,11 @@ Dn = function() {
|
|
|
4480
4570
|
* Create an upload for a bunch of files.
|
|
4481
4571
|
*
|
|
4482
4572
|
*/
|
|
4483
|
-
|
|
4573
|
+
Se = function(e, n = {}) {
|
|
4484
4574
|
const { forceAllowNewUpload: r = !1 } = n, { allowNewUpload: s, currentUploads: o } = this.getState();
|
|
4485
4575
|
if (!s && !r)
|
|
4486
4576
|
throw new Error("Cannot create a new upload: already uploading.");
|
|
4487
|
-
const i =
|
|
4577
|
+
const i = Sa();
|
|
4488
4578
|
return this.emit("upload", i, this.getFilesByIds(e)), this.setState({
|
|
4489
4579
|
allowNewUpload: this.opts.allowMultipleUploadBatches !== !1 && this.opts.allowMultipleUploads !== !1,
|
|
4490
4580
|
currentUploads: {
|
|
@@ -4503,12 +4593,12 @@ $e = function(e, n = {}) {
|
|
|
4503
4593
|
* Remove an upload, eg. if it has been canceled or completed.
|
|
4504
4594
|
*
|
|
4505
4595
|
*/
|
|
4506
|
-
|
|
4596
|
+
mt = function(e) {
|
|
4507
4597
|
const { [e]: n, ...r } = this.getState().currentUploads;
|
|
4508
4598
|
this.setState({
|
|
4509
4599
|
currentUploads: r
|
|
4510
4600
|
});
|
|
4511
|
-
},
|
|
4601
|
+
}, Fe = async function(e) {
|
|
4512
4602
|
const n = () => {
|
|
4513
4603
|
const { currentUploads: i } = this.getState();
|
|
4514
4604
|
return i[e];
|
|
@@ -4518,7 +4608,7 @@ ht = function(e) {
|
|
|
4518
4608
|
throw new Error("Nonexistent upload");
|
|
4519
4609
|
const s = [
|
|
4520
4610
|
...b(this, fe),
|
|
4521
|
-
...b(this,
|
|
4611
|
+
...b(this, me),
|
|
4522
4612
|
...b(this, ue)
|
|
4523
4613
|
];
|
|
4524
4614
|
try {
|
|
@@ -4538,7 +4628,7 @@ ht = function(e) {
|
|
|
4538
4628
|
break;
|
|
4539
4629
|
}
|
|
4540
4630
|
} catch (i) {
|
|
4541
|
-
throw F(this, y,
|
|
4631
|
+
throw F(this, y, mt).call(this, e), i;
|
|
4542
4632
|
}
|
|
4543
4633
|
if (r) {
|
|
4544
4634
|
r.fileIDs.forEach((u) => {
|
|
@@ -4549,17 +4639,17 @@ ht = function(e) {
|
|
|
4549
4639
|
this.addResultData(e, { successful: a, failed: l, uploadID: e }), r = n();
|
|
4550
4640
|
}
|
|
4551
4641
|
let o;
|
|
4552
|
-
return r && (o = r.result, F(this, y,
|
|
4642
|
+
return r && (o = r.result, F(this, y, mt).call(this, e)), o == null && (this.log(`Not setting result for an upload that has been removed: ${e}`), o = {
|
|
4553
4643
|
successful: [],
|
|
4554
4644
|
failed: [],
|
|
4555
4645
|
uploadID: e
|
|
4556
4646
|
}), o;
|
|
4557
|
-
}, R(
|
|
4558
|
-
let at =
|
|
4559
|
-
const
|
|
4647
|
+
}, R(He, "VERSION", Ta.version);
|
|
4648
|
+
let at = He;
|
|
4649
|
+
const Ca = {
|
|
4560
4650
|
key: 0,
|
|
4561
4651
|
class: "uppy-input-area--caption small text-body-secondary fst-italic"
|
|
4562
|
-
},
|
|
4652
|
+
}, al = {
|
|
4563
4653
|
__name: "UppyInput",
|
|
4564
4654
|
props: {
|
|
4565
4655
|
name: { type: String, required: !0 },
|
|
@@ -4592,7 +4682,7 @@ const Fa = {
|
|
|
4592
4682
|
],
|
|
4593
4683
|
setup(t, { emit: e }) {
|
|
4594
4684
|
var Y;
|
|
4595
|
-
const n = t, r = e, s =
|
|
4685
|
+
const n = t, r = e, s = G(null), o = G(null), i = Xn(null), a = G(!1), l = G(!1), u = G(0), d = T("form", { value: {}, errors: {}, getID: (f) => f }), p = T("group", null), c = q({
|
|
4596
4686
|
get() {
|
|
4597
4687
|
var f;
|
|
4598
4688
|
return (f = p == null ? void 0 : p.value) != null && f.name ? p.value.getData(n.name) : d.value[n.name];
|
|
@@ -4641,20 +4731,20 @@ const Fa = {
|
|
|
4641
4731
|
}), i.value.on("error", (f) => {
|
|
4642
4732
|
r("error", f);
|
|
4643
4733
|
}), i.value.on("upload-error", (f, _, w) => {
|
|
4644
|
-
var
|
|
4734
|
+
var D;
|
|
4645
4735
|
u.value = Math.max(0, u.value - 1);
|
|
4646
|
-
const U = ((
|
|
4736
|
+
const U = ((D = JSON.parse(w.response)) == null ? void 0 : D.message) ?? _;
|
|
4647
4737
|
v(U), r("upload-error", f, _, w, U);
|
|
4648
4738
|
}), i.value.on("restriction-failed", (f, _) => {
|
|
4649
4739
|
v(_.message), r("restriction-failed", f, _);
|
|
4650
|
-
}),
|
|
4740
|
+
}), he(() => {
|
|
4651
4741
|
var f;
|
|
4652
4742
|
return (f = d.value) == null ? void 0 : f.wasSuccessful;
|
|
4653
4743
|
}, (f, _) => {
|
|
4654
|
-
f === !0 && _ === !1 &&
|
|
4655
|
-
}),
|
|
4656
|
-
var f, _, w, U,
|
|
4657
|
-
n.useXHR && import("./index-
|
|
4744
|
+
f === !0 && _ === !1 && m();
|
|
4745
|
+
}), ve(() => {
|
|
4746
|
+
var f, _, w, U, D, H, ne, N;
|
|
4747
|
+
n.useXHR && import("./index-ibVkvWa2.js").then((X) => {
|
|
4658
4748
|
const pe = X.default;
|
|
4659
4749
|
i.value.use(pe, {
|
|
4660
4750
|
method: "POST",
|
|
@@ -4664,14 +4754,14 @@ const Fa = {
|
|
|
4664
4754
|
},
|
|
4665
4755
|
...n.XHRConfig
|
|
4666
4756
|
});
|
|
4667
|
-
}), (_ = (f = i.value) == null ? void 0 : f.opts) != null && _.restrictions && (s.value =
|
|
4668
|
-
var pe,
|
|
4669
|
-
X.innerHTML = (Vt = (Ct = (
|
|
4757
|
+
}), (_ = (f = i.value) == null ? void 0 : f.opts) != null && _.restrictions && (s.value = I(i.value.opts.restrictions)), o && ((H = (D = (U = (w = i.value) == null ? void 0 : w.opts) == null ? void 0 : U.locale) == null ? void 0 : D.strings) != null && H.dropzoneText) && ((N = (ne = o.value) == null ? void 0 : ne.querySelectorAll('[data-uppy-element="dropzone"]>div>div>p')) == null || N.forEach((X) => {
|
|
4758
|
+
var pe, Et, Ct, Vt;
|
|
4759
|
+
X.innerHTML = (Vt = (Ct = (Et = (pe = i.value) == null ? void 0 : pe.opts) == null ? void 0 : Et.locale) == null ? void 0 : Ct.strings) == null ? void 0 : Vt.dropzoneText;
|
|
4670
4760
|
}));
|
|
4671
|
-
}),
|
|
4761
|
+
}), ht(() => {
|
|
4672
4762
|
l.value = !0, i.value && i.value.destroy();
|
|
4673
4763
|
});
|
|
4674
|
-
function
|
|
4764
|
+
function m() {
|
|
4675
4765
|
i.value && (a.value = !0, i.value.cancelAll(), a.value = !1, c.value = n.multiple ? [] : null);
|
|
4676
4766
|
}
|
|
4677
4767
|
function v(f) {
|
|
@@ -4684,77 +4774,78 @@ const Fa = {
|
|
|
4684
4774
|
}
|
|
4685
4775
|
}
|
|
4686
4776
|
const A = ["bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
4687
|
-
function
|
|
4777
|
+
function k(f) {
|
|
4688
4778
|
let _ = 0, w = parseInt(f, 10) || 0;
|
|
4689
4779
|
for (; w >= 1024 && ++_; )
|
|
4690
4780
|
w = w / 1024;
|
|
4691
4781
|
return w.toFixed(w < 10 && _ > 0 ? 1 : 0) + A[_];
|
|
4692
4782
|
}
|
|
4693
|
-
function
|
|
4783
|
+
function I(f) {
|
|
4694
4784
|
if (!f) return "";
|
|
4695
4785
|
const {
|
|
4696
4786
|
allowedFileTypes: _,
|
|
4697
4787
|
maxFileSize: w,
|
|
4698
4788
|
minFileSize: U,
|
|
4699
|
-
maxNumberOfFiles:
|
|
4700
|
-
minNumberOfFiles:
|
|
4701
|
-
maxTotalFileSize:
|
|
4702
|
-
} = f,
|
|
4789
|
+
maxNumberOfFiles: D,
|
|
4790
|
+
minNumberOfFiles: H,
|
|
4791
|
+
maxTotalFileSize: ne
|
|
4792
|
+
} = f, N = [];
|
|
4703
4793
|
if (_ && _.length) {
|
|
4704
4794
|
const X = _.map((pe) => pe.replace(".", "")).join("، ");
|
|
4705
|
-
|
|
4795
|
+
N.push(`فقط فایلهای ${X}`);
|
|
4706
4796
|
}
|
|
4707
|
-
return
|
|
4797
|
+
return D && D > 1 && N.push(`امکان انتخاب حداکثر ${D} فایل`), H && N.push(`حداقل ${H} فایل نیاز است`), w && N.push(`با حداکثر حجم ${k(w)} برای هر فایل`), U && N.push(`با حداقل حجم ${k(U)} برای هر فایل`), ne && N.push(`و مجموع حجم کل حداکثر ${k(ne)}`), N.length ? N.join("، ") + " مجاز است." : "";
|
|
4708
4798
|
}
|
|
4709
|
-
return (f, _) => i.value ? (
|
|
4799
|
+
return (f, _) => i.value ? (h(), g("div", {
|
|
4710
4800
|
key: 0,
|
|
4711
4801
|
class: "uppy-input-area",
|
|
4712
4802
|
ref_key: "inputEl",
|
|
4713
4803
|
ref: o
|
|
4714
4804
|
}, [
|
|
4715
|
-
Q(Ke(
|
|
4805
|
+
Q(Ke(Gi), {
|
|
4716
4806
|
name: "uu" + t.name,
|
|
4717
4807
|
uppy: i.value
|
|
4718
4808
|
}, {
|
|
4719
4809
|
default: ie(() => [
|
|
4720
|
-
|
|
4721
|
-
Q(Ke(
|
|
4722
|
-
Q(Ke(
|
|
4810
|
+
O(f.$slots, "default", { uppy: i.value }, () => [
|
|
4811
|
+
Q(Ke(Yi), { class: "uppy-file-lists" }),
|
|
4812
|
+
Q(Ke(Wi), { class: "uppy-drop-zone" })
|
|
4723
4813
|
])
|
|
4724
4814
|
]),
|
|
4725
4815
|
_: 3
|
|
4726
4816
|
}, 8, ["name", "uppy"]),
|
|
4727
|
-
s.value ? (
|
|
4817
|
+
s.value ? (h(), g("div", Ca, W(s.value), 1)) : B("", !0)
|
|
4728
4818
|
], 512)) : B("", !0);
|
|
4729
4819
|
}
|
|
4730
4820
|
};
|
|
4731
4821
|
export {
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4822
|
+
za as A,
|
|
4823
|
+
Oa as C,
|
|
4824
|
+
Ha as E,
|
|
4825
|
+
qa as F,
|
|
4826
|
+
vs as G,
|
|
4827
|
+
Ya as L,
|
|
4828
|
+
Xa as M,
|
|
4829
|
+
rl as O,
|
|
4830
|
+
La as P,
|
|
4831
|
+
zs as Q,
|
|
4832
|
+
ol as R,
|
|
4833
|
+
il as S,
|
|
4834
|
+
to as T,
|
|
4835
|
+
sl as _,
|
|
4836
|
+
Ra as a,
|
|
4837
|
+
Ba as b,
|
|
4838
|
+
ja as c,
|
|
4839
|
+
xa as d,
|
|
4840
|
+
al as e,
|
|
4841
|
+
Ga as f,
|
|
4842
|
+
Za as g,
|
|
4843
|
+
Ka as h,
|
|
4844
|
+
el as i,
|
|
4845
|
+
Qa as j,
|
|
4846
|
+
Ja as k,
|
|
4847
|
+
Wa as l,
|
|
4848
|
+
tl as m,
|
|
4849
|
+
nl as n,
|
|
4759
4850
|
Ge as o
|
|
4760
4851
|
};
|