inertia-bootstrap-forms 1.2.4 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-D75YLzF9.js → index-DPnt8V-r.js} +1 -1
- package/dist/{index-CRXhNEv4.js → index-gG_QMV91.js} +287 -269
- package/dist/inertia-bootstrap-forms.es.js +1 -1
- package/dist/inertia-bootstrap-forms.umd.js +5 -5
- package/package.json +2 -2
- package/src/AmountInput.vue +74 -51
- package/src/CheckboxButtonInput.vue +69 -69
- package/src/CheckboxInput.vue +79 -79
- package/src/CheckboxToggle.vue +113 -113
- package/src/FormContainer.vue +180 -180
- package/src/TextInput.vue +51 -51
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Rn = Object.defineProperty;
|
|
2
2
|
var Mt = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var B = (t, e, n) =>
|
|
7
|
-
var w = (t, e, n) => (
|
|
8
|
-
import { createElementBlock as g, openBlock as m, renderSlot as
|
|
5
|
+
var Bn = (t, e, n) => e in t ? Rn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
6
|
+
var B = (t, e, n) => Bn(t, typeof e != "symbol" ? e + "" : e, n), Xe = (t, e, n) => e.has(t) || Mt("Cannot " + n);
|
|
7
|
+
var w = (t, e, n) => (Xe(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), Me = (t, e, n, r) => (Xe(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), F = (t, e, n) => (Xe(t, e, "access private method"), n);
|
|
8
|
+
import { createElementBlock as g, openBlock as m, renderSlot as O, normalizeClass as R, ref as W, onMounted as ve, onBeforeUnmount as mt, createElementVNode as b, defineComponent as E, inject as k, computed as q, resolveComponent as L, createBlock as ee, withCtx as ie, withDirectives as re, createVNode as Q, vModelText as He, createTextVNode as gt, toDisplayString as H, vModelDynamic as yt, defineAsyncComponent as jn, Fragment as pe, createCommentVNode as j, createStaticVNode as Ln, renderList as _e, normalizeStyle as vt, toRef as xn, reactive as en, withModifiers as tn, resolveDirective as qn, mergeProps as Hn, vModelSelect as Gn, markRaw as Wn, provide as Zn, watch as Fe, h as nn, shallowRef as Yn, unref as Ke } from "vue";
|
|
9
9
|
import Xn from "@tinymce/tinymce-vue";
|
|
10
10
|
import { useForm as Kn } from "@inertiajs/vue3";
|
|
11
11
|
import { LMarker as Jn, LTileLayer as Qn, LMap as er } from "@vue-leaflet/vue-leaflet";
|
|
@@ -15,7 +15,7 @@ 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
|
+
}), mt(() => {
|
|
19
19
|
typeof document < "u" && document.removeEventListener("inertia:start", o), s();
|
|
20
20
|
});
|
|
21
21
|
const s = function() {
|
|
@@ -37,20 +37,20 @@ const be = (t, e) => {
|
|
|
37
37
|
}, sr = {}, ir = { class: "dropdown" };
|
|
38
38
|
function or(t, e, n, r, s, o) {
|
|
39
39
|
return m(), g("div", ir, [
|
|
40
|
-
|
|
40
|
+
O(t.$slots, "default")
|
|
41
41
|
]);
|
|
42
42
|
}
|
|
43
43
|
const ar = /* @__PURE__ */ be(sr, [["render", or]]), lr = {}, ur = { class: "dropdown-menu" };
|
|
44
44
|
function dr(t, e, n, r, s, o) {
|
|
45
45
|
return m(), g("div", ur, [
|
|
46
|
-
|
|
46
|
+
O(t.$slots, "default")
|
|
47
47
|
]);
|
|
48
48
|
}
|
|
49
49
|
const pr = /* @__PURE__ */ be(lr, [["render", dr]]), cr = {
|
|
50
50
|
__name: "DropdownToggle",
|
|
51
51
|
props: {},
|
|
52
52
|
setup(t, { expose: e }) {
|
|
53
|
-
const n =
|
|
53
|
+
const n = W(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();
|
|
@@ -65,19 +65,19 @@ const pr = /* @__PURE__ */ be(lr, [["render", dr]]), cr = {
|
|
|
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 = {}, hr = { class: "input-group" };
|
|
72
72
|
function mr(t, e, n, r, s, o) {
|
|
73
73
|
return m(), g("div", hr, [
|
|
74
|
-
|
|
74
|
+
O(t.$slots, "default")
|
|
75
75
|
]);
|
|
76
76
|
}
|
|
77
77
|
const _t = /* @__PURE__ */ be(fr, [["render", mr]]), gr = {}, yr = { class: "input-group-text" };
|
|
78
78
|
function vr(t, e, n, r, s, o) {
|
|
79
79
|
return m(), g("div", yr, [
|
|
80
|
-
|
|
80
|
+
O(t.$slots, "default")
|
|
81
81
|
]);
|
|
82
82
|
}
|
|
83
83
|
const bt = /* @__PURE__ */ be(gr, [["render", vr]]), _r = {
|
|
@@ -114,7 +114,7 @@ function Sr(t, e, n, r, s, o) {
|
|
|
114
114
|
return m(), g("div", {
|
|
115
115
|
class: R(["alert", "alert-" + n.type])
|
|
116
116
|
}, [
|
|
117
|
-
|
|
117
|
+
O(t.$slots, "default")
|
|
118
118
|
], 2);
|
|
119
119
|
}
|
|
120
120
|
const Fr = /* @__PURE__ */ be($r, [["render", Sr]]), M = (t, e) => {
|
|
@@ -142,45 +142,63 @@ const Fr = /* @__PURE__ */ be($r, [["render", Sr]]), M = (t, e) => {
|
|
|
142
142
|
}
|
|
143
143
|
},
|
|
144
144
|
setup(t) {
|
|
145
|
-
let e = k("form"
|
|
146
|
-
return e === void 0 && (e = {
|
|
145
|
+
let e = k("form", {
|
|
147
146
|
errors: {},
|
|
148
|
-
getID(
|
|
147
|
+
getID(l) {
|
|
148
|
+
return l;
|
|
149
149
|
}
|
|
150
|
-
}),
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
150
|
+
}), n = k("group", {});
|
|
151
|
+
const r = q({
|
|
152
|
+
get() {
|
|
153
|
+
var l;
|
|
154
|
+
return n.value && e.value[n.value.name] ? (l = n.value) == null ? void 0 : l.getData(t.name) : e.value[t.name];
|
|
155
|
+
},
|
|
156
|
+
set(l) {
|
|
157
|
+
var u;
|
|
158
|
+
(u = n == null ? void 0 : n.value) != null && u.name ? n.value.setData(t.name, l) : e.value[t.name] = l;
|
|
159
|
+
}
|
|
160
|
+
}), s = "۰۱۲۳۴۵۶۷۸۹", o = "٠١٢٣٤٥٦٧٨٩";
|
|
161
|
+
function i(l) {
|
|
162
|
+
return String(l).replace(/[۰-۹٠-٩]/g, (u) => {
|
|
163
|
+
const d = s.indexOf(u);
|
|
164
|
+
return d !== -1 ? d : o.indexOf(u);
|
|
165
|
+
});
|
|
156
166
|
}
|
|
167
|
+
const a = q({
|
|
168
|
+
get() {
|
|
169
|
+
const l = r.value;
|
|
170
|
+
return l == null || l === "" ? "" : Number(l).toLocaleString("en-US");
|
|
171
|
+
},
|
|
172
|
+
set(l) {
|
|
173
|
+
const u = i(l).replace(/\D/g, "");
|
|
174
|
+
r.value = u === "" ? null : parseInt(u, 10);
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
return { modelValue: r, displayValue: a, form: e, group: n };
|
|
157
178
|
}
|
|
158
|
-
}), kr = ["name", "
|
|
179
|
+
}), kr = ["name", "disabled", "readonly", "placeholder"];
|
|
159
180
|
function Tr(t, e, n, r, s, o) {
|
|
160
|
-
const i = L("InputGroupText"), a = L("InputGroup")
|
|
181
|
+
const i = L("InputGroupText"), a = L("InputGroup");
|
|
161
182
|
return m(), ee(a, null, {
|
|
162
183
|
default: ie(() => [
|
|
163
184
|
re(b("input", {
|
|
164
185
|
name: t.name,
|
|
165
|
-
|
|
166
|
-
"data-maska": "###,###,###,###,###,###,###",
|
|
167
|
-
"data-maska-reversed": "",
|
|
168
|
-
onMaska: e[0] || (e[0] = (...u) => t.onChange && t.onChange(...u)),
|
|
186
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.displayValue = l),
|
|
169
187
|
class: R([{ "is-invalid": t.form.errors[t.name] }, "form-control fanum text-start"]),
|
|
170
188
|
disabled: t.disabled || t.form.processing,
|
|
171
189
|
readonly: t.readonly,
|
|
172
190
|
placeholder: t.placeholder,
|
|
173
191
|
type: "tel"
|
|
174
|
-
}, null,
|
|
175
|
-
[
|
|
192
|
+
}, null, 10, kr), [
|
|
193
|
+
[He, t.displayValue]
|
|
176
194
|
]),
|
|
177
195
|
Q(i, { class: "fanum" }, {
|
|
178
196
|
default: ie(() => [
|
|
179
|
-
|
|
197
|
+
gt(H(t.unit), 1)
|
|
180
198
|
]),
|
|
181
199
|
_: 1
|
|
182
200
|
}),
|
|
183
|
-
|
|
201
|
+
O(t.$slots, "suffix")
|
|
184
202
|
]),
|
|
185
203
|
_: 3
|
|
186
204
|
});
|
|
@@ -204,7 +222,7 @@ const Aa = /* @__PURE__ */ M(Cr, [["render", Tr]]), Er = E({
|
|
|
204
222
|
return s;
|
|
205
223
|
}
|
|
206
224
|
}), n = k("group", {});
|
|
207
|
-
return { modelValue:
|
|
225
|
+
return { modelValue: q({
|
|
208
226
|
get() {
|
|
209
227
|
var s;
|
|
210
228
|
return n.value && e.value[n.value.name] ? (s = n.value) == null ? void 0 : s.getData(t.name) : e.value[t.name];
|
|
@@ -226,11 +244,11 @@ function Vr(t, e, n, r, s, o) {
|
|
|
226
244
|
disabled: (a = t.form) == null ? void 0 : a.processing,
|
|
227
245
|
type: "text"
|
|
228
246
|
}, null, 10, Ir)), [
|
|
229
|
-
[
|
|
247
|
+
[He, t.modelValue]
|
|
230
248
|
]);
|
|
231
249
|
}
|
|
232
|
-
const
|
|
233
|
-
components: { TextInput:
|
|
250
|
+
const Ge = /* @__PURE__ */ M(Er, [["render", Vr]]), Mr = E({
|
|
251
|
+
components: { TextInput: Ge },
|
|
234
252
|
props: {
|
|
235
253
|
name: {
|
|
236
254
|
type: String,
|
|
@@ -308,7 +326,7 @@ function Nr(t, e, n, r, s, o) {
|
|
|
308
326
|
]), 8, Ar)
|
|
309
327
|
]);
|
|
310
328
|
}
|
|
311
|
-
const Na = /* @__PURE__ */ M(Mr, [["render", Nr]]),
|
|
329
|
+
const Na = /* @__PURE__ */ M(Mr, [["render", Nr]]), Dr = E({
|
|
312
330
|
emits: ["change"],
|
|
313
331
|
props: {
|
|
314
332
|
name: {
|
|
@@ -345,7 +363,7 @@ const Na = /* @__PURE__ */ M(Mr, [["render", Nr]]), Or = E({
|
|
|
345
363
|
}
|
|
346
364
|
}), { form: e };
|
|
347
365
|
}
|
|
348
|
-
}),
|
|
366
|
+
}), Or = ["for"], Rr = ["name", "id", "disabled", "type", "value"];
|
|
349
367
|
function Br(t, e, n, r, s, o) {
|
|
350
368
|
var i, a;
|
|
351
369
|
return m(), g("label", {
|
|
@@ -365,10 +383,10 @@ function Br(t, e, n, r, s, o) {
|
|
|
365
383
|
}, null, 42, Rr), [
|
|
366
384
|
[yt, t.form[t.name]]
|
|
367
385
|
]),
|
|
368
|
-
|
|
369
|
-
], 10,
|
|
386
|
+
O(t.$slots, "default")
|
|
387
|
+
], 10, Or);
|
|
370
388
|
}
|
|
371
|
-
const
|
|
389
|
+
const Da = /* @__PURE__ */ M(Dr, [["render", Br]]), jr = E({
|
|
372
390
|
props: {
|
|
373
391
|
name: {
|
|
374
392
|
type: String,
|
|
@@ -402,7 +420,7 @@ const Oa = /* @__PURE__ */ M(Or, [["render", Br]]), jr = E({
|
|
|
402
420
|
return s;
|
|
403
421
|
}
|
|
404
422
|
}), n = k("group", {});
|
|
405
|
-
return { modelValue:
|
|
423
|
+
return { modelValue: q({
|
|
406
424
|
get() {
|
|
407
425
|
var s;
|
|
408
426
|
return n.value && e.value[n.value.name] ? (s = n.value) == null ? void 0 : s.getData(t.name) : e.value[t.name];
|
|
@@ -433,11 +451,11 @@ function Hr(t, e, n, r, s, o) {
|
|
|
433
451
|
class: "form-check-label",
|
|
434
452
|
for: t.inputID
|
|
435
453
|
}, [
|
|
436
|
-
|
|
454
|
+
O(t.$slots, "default")
|
|
437
455
|
], 8, qr)
|
|
438
456
|
]);
|
|
439
457
|
}
|
|
440
|
-
const
|
|
458
|
+
const Oa = /* @__PURE__ */ M(jr, [["render", Hr]]), Gr = E({
|
|
441
459
|
props: {
|
|
442
460
|
name: {
|
|
443
461
|
type: String,
|
|
@@ -478,7 +496,7 @@ const Da = /* @__PURE__ */ M(jr, [["render", Hr]]), Gr = E({
|
|
|
478
496
|
return s;
|
|
479
497
|
}
|
|
480
498
|
}), n = k("group", {});
|
|
481
|
-
return { modelValue:
|
|
499
|
+
return { modelValue: q({
|
|
482
500
|
get() {
|
|
483
501
|
var s;
|
|
484
502
|
return n.value && e.value[n.value.name] ? (s = n.value) == null ? void 0 : s.getData(t.name) : e.value[t.name];
|
|
@@ -508,10 +526,10 @@ function Yr(t, e, n, r, s, o) {
|
|
|
508
526
|
}, null, 42, Zr), [
|
|
509
527
|
[yt, t.modelValue]
|
|
510
528
|
]),
|
|
511
|
-
|
|
529
|
+
O(t.$slots, "default")
|
|
512
530
|
], 10, Wr);
|
|
513
531
|
}
|
|
514
|
-
const Ra = /* @__PURE__ */ M(Gr, [["render", Yr]]), Xr =
|
|
532
|
+
const Ra = /* @__PURE__ */ M(Gr, [["render", Yr]]), Xr = jn(
|
|
515
533
|
() => import("vue3-persian-datetime-picker")
|
|
516
534
|
);
|
|
517
535
|
let Ue;
|
|
@@ -554,7 +572,7 @@ const Kr = E({
|
|
|
554
572
|
return s;
|
|
555
573
|
}
|
|
556
574
|
}), n = k("group", {});
|
|
557
|
-
return { modelValue:
|
|
575
|
+
return { modelValue: q({
|
|
558
576
|
get() {
|
|
559
577
|
var s;
|
|
560
578
|
return n.value && e.value[n.value.name] ? (s = n.value) == null ? void 0 : s.getData(t.name) : e.value[t.name];
|
|
@@ -609,7 +627,7 @@ function es(t, e, n, r, s, o) {
|
|
|
609
627
|
onClick: e[0] || (e[0] = (...l) => t.clear && t.clear(...l)),
|
|
610
628
|
class: R(["input-group-text input-group-datepicker-delete", { "input-group-datepicker-delete-show": t.modelValue }])
|
|
611
629
|
}, e[2] || (e[2] = [
|
|
612
|
-
|
|
630
|
+
Ln('<svg width="25px" height="25px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14 22H10C6.22876 22 4.34315 22 3.17157 20.8284C2 19.6569 2 17.7712 2 14V12C2 8.22876 2 6.34315 3.17157 5.17157C4.34315 4 6.22876 4 10 4H14C17.7712 4 19.6569 4 20.8284 5.17157C22 6.34315 22 8.22876 22 12V14C22 17.7712 22 19.6569 20.8284 20.8284C20.1752 21.4816 19.3001 21.7706 18 21.8985" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round"></path><path d="M7 4V2.5" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round"></path><path d="M17 4V2.5" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round"></path><path d="M21.5 9H16.625H10.75M2 9H5.875" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round"></path><path d="M18 17C18 17.5523 17.5523 18 17 18C16.4477 18 16 17.5523 16 17C16 16.4477 16.4477 16 17 16C17.5523 16 18 16.4477 18 17Z" fill="#1C274C"></path><path d="M18 13C18 13.5523 17.5523 14 17 14C16.4477 14 16 13.5523 16 13C16 12.4477 16.4477 12 17 12C17.5523 12 18 12.4477 18 13Z" fill="#1C274C"></path><path d="M13 17C13 17.5523 12.5523 18 12 18C11.4477 18 11 17.5523 11 17C11 16.4477 11.4477 16 12 16C12.5523 16 13 16.4477 13 17Z" fill="#1C274C"></path><path d="M13 13C13 13.5523 12.5523 14 12 14C11.4477 14 11 13.5523 11 13C11 12.4477 11.4477 12 12 12C12.5523 12 13 12.4477 13 13Z" fill="#1C274C"></path><path d="M8 17C8 17.5523 7.55228 18 7 18C6.44772 18 6 17.5523 6 17C6 16.4477 6.44772 16 7 16C7.55228 16 8 16.4477 8 17Z" fill="#1C274C"></path><path d="M8 13C8 13.5523 7.55228 14 7 14C6.44772 14 6 13.5523 6 13C6 12.4477 6.44772 12 7 12C7.55228 12 8 12.4477 8 13Z" fill="#1C274C"></path></svg>', 1)
|
|
613
631
|
]), 2)
|
|
614
632
|
]),
|
|
615
633
|
t.isSsr ? j("", !0) : (m(), ee(i, {
|
|
@@ -658,7 +676,7 @@ const Ba = /* @__PURE__ */ M(Kr, [["render", es]]), ts = E({
|
|
|
658
676
|
}
|
|
659
677
|
},
|
|
660
678
|
setup(t, { expose: e, emit: n }) {
|
|
661
|
-
const r =
|
|
679
|
+
const r = W(null), s = W(null), o = (u, d) => {
|
|
662
680
|
s.value = d;
|
|
663
681
|
};
|
|
664
682
|
e({
|
|
@@ -670,7 +688,7 @@ const Ba = /* @__PURE__ */ M(Kr, [["render", es]]), ts = E({
|
|
|
670
688
|
return u;
|
|
671
689
|
}
|
|
672
690
|
}), a = k("group", {});
|
|
673
|
-
return { modelValue:
|
|
691
|
+
return { modelValue: q({
|
|
674
692
|
get() {
|
|
675
693
|
var u;
|
|
676
694
|
return a.value && i.value[a.value.name] ? (u = a.value) == null ? void 0 : u.getData(t.name) : i.value[t.name];
|
|
@@ -808,9 +826,9 @@ function hs(t, e, n, r, s, o) {
|
|
|
808
826
|
style: vt({ width: l.percent + "%" })
|
|
809
827
|
}, null, 4)
|
|
810
828
|
])) : j("", !0),
|
|
811
|
-
b("div", null,
|
|
812
|
-
l.error ? (m(), g("div", us,
|
|
813
|
-
b("div", ds,
|
|
829
|
+
b("div", null, H(l.file.name), 1),
|
|
830
|
+
l.error ? (m(), g("div", us, H(l.error), 1)) : j("", !0),
|
|
831
|
+
b("div", ds, H(Math.round(l.file.size / 1024)) + "Kb", 1),
|
|
814
832
|
b("div", ps, [
|
|
815
833
|
l.error ? (m(), g("button", {
|
|
816
834
|
key: 0,
|
|
@@ -851,7 +869,7 @@ function hs(t, e, n, r, s, o) {
|
|
|
851
869
|
}
|
|
852
870
|
const La = /* @__PURE__ */ M(rs, [["render", hs]]), ms = E({
|
|
853
871
|
components: {
|
|
854
|
-
TextInput:
|
|
872
|
+
TextInput: Ge
|
|
855
873
|
},
|
|
856
874
|
props: {
|
|
857
875
|
FileInput: {
|
|
@@ -886,7 +904,7 @@ const xa = /* @__PURE__ */ M(ms, [["render", gs]]), ys = E({
|
|
|
886
904
|
},
|
|
887
905
|
provide() {
|
|
888
906
|
return {
|
|
889
|
-
group:
|
|
907
|
+
group: q(() => this)
|
|
890
908
|
};
|
|
891
909
|
},
|
|
892
910
|
mounted() {
|
|
@@ -917,7 +935,7 @@ function _s(t, e, n, r, s, o) {
|
|
|
917
935
|
"data-group-id": t.groupID,
|
|
918
936
|
ref: "groupEl"
|
|
919
937
|
}, [
|
|
920
|
-
|
|
938
|
+
O(t.$slots, "default")
|
|
921
939
|
], 8, vs);
|
|
922
940
|
}
|
|
923
941
|
const bs = /* @__PURE__ */ M(ys, [["render", _s]]), ws = E({
|
|
@@ -958,7 +976,7 @@ const bs = /* @__PURE__ */ M(ys, [["render", _s]]), ws = E({
|
|
|
958
976
|
}
|
|
959
977
|
},
|
|
960
978
|
setup(t) {
|
|
961
|
-
const e =
|
|
979
|
+
const e = xn("formEl"), n = en(t.modelValue), r = Kn({
|
|
962
980
|
hasMessage: !1,
|
|
963
981
|
successMessage: null,
|
|
964
982
|
...t.options,
|
|
@@ -971,7 +989,7 @@ const bs = /* @__PURE__ */ M(ys, [["render", _s]]), ws = E({
|
|
|
971
989
|
},
|
|
972
990
|
provide() {
|
|
973
991
|
return {
|
|
974
|
-
form:
|
|
992
|
+
form: q(() => this.form)
|
|
975
993
|
};
|
|
976
994
|
},
|
|
977
995
|
watch: {
|
|
@@ -1038,32 +1056,32 @@ function Fs(t, e, n, r, s, o) {
|
|
|
1038
1056
|
ref: "formEl",
|
|
1039
1057
|
action: t.url,
|
|
1040
1058
|
method: t.method,
|
|
1041
|
-
onSubmit: e[0] || (e[0] =
|
|
1059
|
+
onSubmit: e[0] || (e[0] = tn((...a) => t.submit && t.submit(...a), ["prevent"])),
|
|
1042
1060
|
onReset: e[1] || (e[1] = (a) => t.$emit("reset")),
|
|
1043
1061
|
class: R({ "form-processing": t.form.processing }),
|
|
1044
1062
|
novalidate: !!Object.values(t.form.errors).length
|
|
1045
1063
|
}, [
|
|
1046
|
-
|
|
1064
|
+
O(t.$slots, "errors", {}, () => [
|
|
1047
1065
|
t.form.hasErrors ? (m(), ee(i, {
|
|
1048
1066
|
key: 0,
|
|
1049
1067
|
type: "danger"
|
|
1050
1068
|
}, {
|
|
1051
1069
|
default: ie(() => [
|
|
1052
1070
|
b("ul", Ss, [
|
|
1053
|
-
(m(!0), g(pe, null, _e(t.form.errors, (a) => (m(), g("li", null,
|
|
1071
|
+
(m(!0), g(pe, null, _e(t.form.errors, (a) => (m(), g("li", null, H(a), 1))), 256))
|
|
1054
1072
|
])
|
|
1055
1073
|
]),
|
|
1056
1074
|
_: 1
|
|
1057
1075
|
})) : j("", !0)
|
|
1058
1076
|
]),
|
|
1059
|
-
|
|
1077
|
+
O(t.$slots, "message", {}, () => [
|
|
1060
1078
|
t.form.hasMessage && t.form.successMessage ? (m(), ee(i, {
|
|
1061
1079
|
key: 0,
|
|
1062
1080
|
type: "success",
|
|
1063
1081
|
innerHTML: t.form.successMessage
|
|
1064
1082
|
}, null, 8, ["innerHTML"])) : j("", !0)
|
|
1065
1083
|
]),
|
|
1066
|
-
|
|
1084
|
+
O(t.$slots, "default", {
|
|
1067
1085
|
form: t.form,
|
|
1068
1086
|
submit: t.submit
|
|
1069
1087
|
})
|
|
@@ -1081,7 +1099,7 @@ const qa = /* @__PURE__ */ M(ws, [["render", Fs]]), Cs = E({
|
|
|
1081
1099
|
};
|
|
1082
1100
|
function Es(t, e, n, r, s, o) {
|
|
1083
1101
|
return m(), g("label", ks, [
|
|
1084
|
-
|
|
1102
|
+
O(t.$slots, "default", {}, void 0, !0),
|
|
1085
1103
|
t.required ? (m(), g("span", Ts, "*")) : j("", !0)
|
|
1086
1104
|
]);
|
|
1087
1105
|
}
|
|
@@ -1175,7 +1193,7 @@ function Vs(t, e, n, r, s, o) {
|
|
|
1175
1193
|
}
|
|
1176
1194
|
const Ga = /* @__PURE__ */ M(Is, [["render", Vs]]), Ms = E({
|
|
1177
1195
|
components: {
|
|
1178
|
-
TextInput:
|
|
1196
|
+
TextInput: Ge
|
|
1179
1197
|
},
|
|
1180
1198
|
props: {
|
|
1181
1199
|
name: {
|
|
@@ -1195,7 +1213,7 @@ function Us(t, e, n, r, s, o) {
|
|
|
1195
1213
|
}
|
|
1196
1214
|
const Wa = /* @__PURE__ */ M(Ms, [["render", Us]]), zs = E({
|
|
1197
1215
|
components: {
|
|
1198
|
-
TextInput:
|
|
1216
|
+
TextInput: Ge
|
|
1199
1217
|
},
|
|
1200
1218
|
props: {
|
|
1201
1219
|
name: {
|
|
@@ -1243,7 +1261,7 @@ const Za = /* @__PURE__ */ M(zs, [["render", Ps]]), As = E({
|
|
|
1243
1261
|
getID(s) {
|
|
1244
1262
|
}
|
|
1245
1263
|
}), e[t.name] || (e[t.name] = t.min);
|
|
1246
|
-
const r =
|
|
1264
|
+
const r = q({
|
|
1247
1265
|
get() {
|
|
1248
1266
|
var s;
|
|
1249
1267
|
return n.value && e.value[n.value.name] ? (s = n.value) == null ? void 0 : s.getData(t.name) : e.value[t.name];
|
|
@@ -1272,8 +1290,8 @@ const Za = /* @__PURE__ */ M(zs, [["render", Ps]]), As = E({
|
|
|
1272
1290
|
return {};
|
|
1273
1291
|
}
|
|
1274
1292
|
}), Ns = ["name", "value", "disabled", "readonly"];
|
|
1275
|
-
function
|
|
1276
|
-
const i = L("InputGroupText"), a = L("InputGroup"), l =
|
|
1293
|
+
function Ds(t, e, n, r, s, o) {
|
|
1294
|
+
const i = L("InputGroupText"), a = L("InputGroup"), l = qn("maska");
|
|
1277
1295
|
return m(), ee(a, { class: "input-group-quantity" }, {
|
|
1278
1296
|
default: ie(() => [
|
|
1279
1297
|
b("button", {
|
|
@@ -1328,17 +1346,17 @@ function Os(t, e, n, r, s, o) {
|
|
|
1328
1346
|
])),
|
|
1329
1347
|
Q(i, { class: "fanum" }, {
|
|
1330
1348
|
default: ie(() => [
|
|
1331
|
-
|
|
1349
|
+
gt(H(t.unit), 1)
|
|
1332
1350
|
]),
|
|
1333
1351
|
_: 1
|
|
1334
1352
|
}),
|
|
1335
|
-
|
|
1353
|
+
O(t.$slots, "suffix")
|
|
1336
1354
|
]),
|
|
1337
1355
|
_: 3
|
|
1338
1356
|
});
|
|
1339
1357
|
}
|
|
1340
|
-
const
|
|
1341
|
-
components: { GroupControl: bs, QuantityInput:
|
|
1358
|
+
const Os = /* @__PURE__ */ M(As, [["render", Ds]]), Rs = E({
|
|
1359
|
+
components: { GroupControl: bs, QuantityInput: Os, InputGroup: _t, InputGroupText: bt, Dropdown: ar, DropdownToggle: cr, DropdownMenu: pr },
|
|
1342
1360
|
props: {
|
|
1343
1361
|
name: {
|
|
1344
1362
|
type: String,
|
|
@@ -1379,7 +1397,7 @@ const Ds = /* @__PURE__ */ M(As, [["render", Os]]), Rs = E({
|
|
|
1379
1397
|
errors: {},
|
|
1380
1398
|
getID(s) {
|
|
1381
1399
|
}
|
|
1382
|
-
}), e[t.name] || (e[t.name] = t.min), { modelValue:
|
|
1400
|
+
}), e[t.name] || (e[t.name] = t.min), { modelValue: q({
|
|
1383
1401
|
get() {
|
|
1384
1402
|
var s;
|
|
1385
1403
|
return n.value && e.value[n.value.name] ? (s = n.value) == null ? void 0 : s.getData(t.name) : e.value[t.name];
|
|
@@ -1424,8 +1442,8 @@ function qs(t, e, n, r, s, o) {
|
|
|
1424
1442
|
b("button", {
|
|
1425
1443
|
type: "button",
|
|
1426
1444
|
class: "form-control fanum dropdown-toggle",
|
|
1427
|
-
onClick: e[0] || (e[0] =
|
|
1428
|
-
},
|
|
1445
|
+
onClick: e[0] || (e[0] = tn((...l) => t.show && t.show(...l), ["prevent"]))
|
|
1446
|
+
}, H(t.totalQuantity) + " " + H(t.unit), 1),
|
|
1429
1447
|
b("div", {
|
|
1430
1448
|
class: R(["multi-quantity-input--dropdown", { show: t.showDropdown }])
|
|
1431
1449
|
}, [
|
|
@@ -1513,7 +1531,7 @@ const Ya = /* @__PURE__ */ M(Rs, [["render", qs]]), Hs = E({
|
|
|
1513
1531
|
return s;
|
|
1514
1532
|
}
|
|
1515
1533
|
}), n = k("group", {});
|
|
1516
|
-
return { modelValue:
|
|
1534
|
+
return { modelValue: q({
|
|
1517
1535
|
get() {
|
|
1518
1536
|
var s;
|
|
1519
1537
|
return n.value && e.value[n.value.name] ? (s = n.value) == null ? void 0 : s.getData(t.name) : e.value[t.name];
|
|
@@ -1654,7 +1672,7 @@ function Zs(t, e, n, r, s, o) {
|
|
|
1654
1672
|
(m(!0), g(pe, null, _e(t.options, (i, a) => (m(), g("option", {
|
|
1655
1673
|
value: t.getKeyFromItem(i),
|
|
1656
1674
|
selected: t.selected(i)
|
|
1657
|
-
},
|
|
1675
|
+
}, H(t.getLabelFromItem(i)), 9, Ws))), 256))
|
|
1658
1676
|
], 16, Gs), [
|
|
1659
1677
|
[Gn, t.modelValue]
|
|
1660
1678
|
])
|
|
@@ -1759,7 +1777,7 @@ function Js(t, e, n, r, s, o) {
|
|
|
1759
1777
|
}, "★", 4)
|
|
1760
1778
|
]))), 128))
|
|
1761
1779
|
], 544),
|
|
1762
|
-
t.showValue && t.displayRating > 0 ? (m(), g("div", Ks,
|
|
1780
|
+
t.showValue && t.displayRating > 0 ? (m(), g("div", Ks, H(t.displayRating), 1)) : j("", !0)
|
|
1763
1781
|
]);
|
|
1764
1782
|
}
|
|
1765
1783
|
const Ka = /* @__PURE__ */ M(Ys, [["render", Js]]), Qs = E({
|
|
@@ -1785,13 +1803,13 @@ function ni(t, e, n, r, s, o) {
|
|
|
1785
1803
|
disabled: t.disabled || ((a = t.form) == null ? void 0 : a.processing) || ((l = t.form) == null ? void 0 : l.uploading)
|
|
1786
1804
|
}, [
|
|
1787
1805
|
(u = t.form) != null && u.processing || (d = t.form) != null && d.uploading ? (m(), ee(i, { key: 0 })) : j("", !0),
|
|
1788
|
-
|
|
1789
|
-
e[0] || (e[0] =
|
|
1806
|
+
O(t.$slots, "default", { form: t.form }, () => [
|
|
1807
|
+
e[0] || (e[0] = gt(" تایید و ثبت اطلاعات "))
|
|
1790
1808
|
]),
|
|
1791
|
-
|
|
1809
|
+
O(t.$slots, "progress", {}, () => {
|
|
1792
1810
|
var p, c;
|
|
1793
1811
|
return [
|
|
1794
|
-
(p = t.form) != null && p.uploading ? (m(), g("span", ti,
|
|
1812
|
+
(p = t.form) != null && p.uploading ? (m(), g("span", ti, H((c = t.form) == null ? void 0 : c.uploading) + "%", 1)) : j("", !0)
|
|
1795
1813
|
];
|
|
1796
1814
|
})
|
|
1797
1815
|
], 8, ei);
|
|
@@ -1874,7 +1892,7 @@ const Qa = /* @__PURE__ */ M(ri, [["render", ii]]), oi = E({
|
|
|
1874
1892
|
return s;
|
|
1875
1893
|
}
|
|
1876
1894
|
}), n = k("group", {});
|
|
1877
|
-
return { modelValue:
|
|
1895
|
+
return { modelValue: q({
|
|
1878
1896
|
get() {
|
|
1879
1897
|
var s;
|
|
1880
1898
|
return n.value && e.value[n.value.name] ? (s = n.value) == null ? void 0 : s.getData(t.name) : e.value[t.name];
|
|
@@ -1894,7 +1912,7 @@ function li(t, e, n, r, s, o) {
|
|
|
1894
1912
|
class: R([{ "is-invalid": ((i = t.form) == null ? void 0 : i.errors[t.name]) !== void 0 }, "form-control"]),
|
|
1895
1913
|
disabled: (a = t.form) == null ? void 0 : a.processing
|
|
1896
1914
|
}, null, 10, ai)), [
|
|
1897
|
-
[
|
|
1915
|
+
[He, t.modelValue]
|
|
1898
1916
|
]);
|
|
1899
1917
|
}
|
|
1900
1918
|
const el = /* @__PURE__ */ M(oi, [["render", li]]), tl = {
|
|
@@ -1918,7 +1936,7 @@ const el = /* @__PURE__ */ M(oi, [["render", li]]), tl = {
|
|
|
1918
1936
|
value: {},
|
|
1919
1937
|
errors: {},
|
|
1920
1938
|
getID: (u) => u
|
|
1921
|
-
}), o = k("group", null), i =
|
|
1939
|
+
}), o = k("group", null), i = W(null), a = W(null), l = q({
|
|
1922
1940
|
get() {
|
|
1923
1941
|
var u;
|
|
1924
1942
|
return (u = o == null ? void 0 : o.value) != null && u.name ? o.value.getData(n.name) : s.value[n.name];
|
|
@@ -2077,9 +2095,9 @@ function bi(t, e, n, r, s, o) {
|
|
|
2077
2095
|
style: vt({ width: l.percent + "%" })
|
|
2078
2096
|
}, null, 4)
|
|
2079
2097
|
])) : j("", !0),
|
|
2080
|
-
b("div", null,
|
|
2081
|
-
l.error ? (m(), g("div", mi,
|
|
2082
|
-
b("div", gi,
|
|
2098
|
+
b("div", null, H(l.file.name), 1),
|
|
2099
|
+
l.error ? (m(), g("div", mi, H(l.error), 1)) : j("", !0),
|
|
2100
|
+
b("div", gi, H(Math.round(l.file.size / 1024)) + "Kb", 1),
|
|
2083
2101
|
b("div", yi, [
|
|
2084
2102
|
l.error ? (m(), g("button", {
|
|
2085
2103
|
key: 0,
|
|
@@ -2165,7 +2183,7 @@ const nl = /* @__PURE__ */ M(ui, [["render", bi]]), wi = E({
|
|
|
2165
2183
|
return s;
|
|
2166
2184
|
}
|
|
2167
2185
|
}), n = k("group", {});
|
|
2168
|
-
return { modelValue:
|
|
2186
|
+
return { modelValue: q({
|
|
2169
2187
|
get() {
|
|
2170
2188
|
var s;
|
|
2171
2189
|
return n.value && e.value[n.value.name] ? (s = n.value) == null ? void 0 : s.getData(t.name) : e.value[t.name];
|
|
@@ -2216,12 +2234,12 @@ function Si(t, e, n, r, s, o) {
|
|
|
2216
2234
|
"onUpdate:modelValue": e[0] || (e[0] = (i) => t.modelValue = i),
|
|
2217
2235
|
type: "hidden"
|
|
2218
2236
|
}, null, 512), [
|
|
2219
|
-
[
|
|
2237
|
+
[He, t.modelValue]
|
|
2220
2238
|
])
|
|
2221
2239
|
], 512);
|
|
2222
2240
|
}
|
|
2223
2241
|
const rl = /* @__PURE__ */ M(wi, [["render", Si]]);
|
|
2224
|
-
var
|
|
2242
|
+
var We, I, rn, ae, Ut, sn, on, an, wt, tt, nt, Ce = {}, ln = [], Fi = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Ze = Array.isArray;
|
|
2225
2243
|
function ne(t, e) {
|
|
2226
2244
|
for (var n in e) t[n] = e[n];
|
|
2227
2245
|
return t;
|
|
@@ -2232,17 +2250,17 @@ function $t(t) {
|
|
|
2232
2250
|
function St(t, e, n) {
|
|
2233
2251
|
var r, s, o, i = {};
|
|
2234
2252
|
for (o in e) o == "key" ? r = e[o] : o == "ref" ? s = e[o] : i[o] = e[o];
|
|
2235
|
-
if (arguments.length > 2 && (i.children = arguments.length > 3 ?
|
|
2236
|
-
return
|
|
2253
|
+
if (arguments.length > 2 && (i.children = arguments.length > 3 ? We.call(arguments, 2) : n), typeof t == "function" && t.defaultProps != null) for (o in t.defaultProps) i[o] === void 0 && (i[o] = t.defaultProps[o]);
|
|
2254
|
+
return De(t, i, r, s, null);
|
|
2237
2255
|
}
|
|
2238
|
-
function
|
|
2239
|
-
var o = { type: t, props: e, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: s ?? ++
|
|
2256
|
+
function De(t, e, n, r, s) {
|
|
2257
|
+
var o = { type: t, props: e, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: s ?? ++rn, __i: -1, __u: 0 };
|
|
2240
2258
|
return s == null && I.vnode != null && I.vnode(o), o;
|
|
2241
2259
|
}
|
|
2242
2260
|
function ge(t) {
|
|
2243
2261
|
return t.children;
|
|
2244
2262
|
}
|
|
2245
|
-
function
|
|
2263
|
+
function Oe(t, e) {
|
|
2246
2264
|
this.props = t, this.context = e;
|
|
2247
2265
|
}
|
|
2248
2266
|
function ye(t, e) {
|
|
@@ -2250,38 +2268,38 @@ function ye(t, e) {
|
|
|
2250
2268
|
for (var n; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) return n.__e;
|
|
2251
2269
|
return typeof t.type == "function" ? ye(t) : null;
|
|
2252
2270
|
}
|
|
2253
|
-
function
|
|
2271
|
+
function un(t) {
|
|
2254
2272
|
var e, n;
|
|
2255
2273
|
if ((t = t.__) != null && t.__c != null) {
|
|
2256
2274
|
for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) {
|
|
2257
2275
|
t.__e = t.__c.base = n.__e;
|
|
2258
2276
|
break;
|
|
2259
2277
|
}
|
|
2260
|
-
return
|
|
2278
|
+
return un(t);
|
|
2261
2279
|
}
|
|
2262
2280
|
}
|
|
2263
2281
|
function zt(t) {
|
|
2264
|
-
(!t.__d && (t.__d = !0) && ae.push(t) && !je.__r++ || Ut != I.debounceRendering) && ((Ut = I.debounceRendering) ||
|
|
2282
|
+
(!t.__d && (t.__d = !0) && ae.push(t) && !je.__r++ || Ut != I.debounceRendering) && ((Ut = I.debounceRendering) || sn)(je);
|
|
2265
2283
|
}
|
|
2266
2284
|
function je() {
|
|
2267
|
-
for (var t, e, n, r, s, o, i, a = 1; ae.length; ) ae.length > a && ae.sort(
|
|
2285
|
+
for (var t, e, n, r, s, o, i, a = 1; ae.length; ) ae.length > a && ae.sort(on), 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 = ne({}, r)).__v = r.__v + 1, I.vnode && I.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, cn(o, n, i), r.__e = r.__ = null, n.__e != s && un(n)));
|
|
2268
2286
|
je.__r = 0;
|
|
2269
2287
|
}
|
|
2270
|
-
function
|
|
2271
|
-
var p, c, h, v, V, z, C, T = r && r.__k ||
|
|
2272
|
-
for (l = Ci(n, e, T, l, Z), p = 0; p < Z; p++) (h = n.__k[p]) != null && (c = h.__i == -1 ? Ce : T[h.__i] || Ce, h.__i = p, z = Ft(t, h, c, s, o, i, a, l, u, d), v = h.__e, h.ref && c.ref != h.ref && (c.ref && Ct(c.ref, null, h), d.push(h.ref, h.__c || v, h)), V == null && v != null && (V = v), (C = !!(4 & h.__u)) || c.__k === h.__k ? l =
|
|
2288
|
+
function dn(t, e, n, r, s, o, i, a, l, u, d) {
|
|
2289
|
+
var p, c, h, v, V, z, C, T = r && r.__k || ln, Z = e.length;
|
|
2290
|
+
for (l = Ci(n, e, T, l, Z), p = 0; p < Z; p++) (h = n.__k[p]) != null && (c = h.__i == -1 ? Ce : T[h.__i] || Ce, h.__i = p, z = Ft(t, h, c, s, o, i, a, l, u, d), v = h.__e, h.ref && c.ref != h.ref && (c.ref && Ct(c.ref, null, h), d.push(h.ref, h.__c || v, h)), V == null && v != null && (V = v), (C = !!(4 & h.__u)) || c.__k === h.__k ? l = pn(h, l, t, C) : typeof h.type == "function" && z !== void 0 ? l = z : v && (l = v.nextSibling), h.__u &= -7);
|
|
2273
2291
|
return n.__e = V, l;
|
|
2274
2292
|
}
|
|
2275
2293
|
function Ci(t, e, n, r, s) {
|
|
2276
2294
|
var o, i, a, l, u, d = n.length, p = d, c = 0;
|
|
2277
|
-
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] =
|
|
2278
|
-
if (p) for (o = 0; o < d; o++) (a = n[o]) != null && !(2 & a.__u) && (a.__e == r && (r = ye(a)),
|
|
2295
|
+
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] = De(null, i, null, null, null) : Ze(i) ? i = t.__k[o] = De(ge, { children: i }, null, null, null) : i.constructor === void 0 && i.__b > 0 ? i = t.__k[o] = De(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 = ki(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;
|
|
2296
|
+
if (p) for (o = 0; o < d; o++) (a = n[o]) != null && !(2 & a.__u) && (a.__e == r && (r = ye(a)), hn(a, a));
|
|
2279
2297
|
return r;
|
|
2280
2298
|
}
|
|
2281
|
-
function
|
|
2299
|
+
function pn(t, e, n, r) {
|
|
2282
2300
|
var s, o;
|
|
2283
2301
|
if (typeof t.type == "function") {
|
|
2284
|
-
for (s = t.__k, o = 0; s && o < s.length; o++) s[o] && (s[o].__ = t, e =
|
|
2302
|
+
for (s = t.__k, o = 0; s && o < s.length; o++) s[o] && (s[o].__ = t, e = pn(s[o], e, n, r));
|
|
2285
2303
|
return e;
|
|
2286
2304
|
}
|
|
2287
2305
|
t.__e != e && (r && (e && t.type && !e.parentNode && (e = ye(t)), n.insertBefore(t.__e, e || null)), e = t.__e);
|
|
@@ -2308,7 +2326,7 @@ function ze(t, e, n, r, s) {
|
|
|
2308
2326
|
if (typeof r == "string" && (t.style.cssText = r = ""), r) for (e in r) n && e in n || Pt(t.style, e, "");
|
|
2309
2327
|
if (n) for (e in n) r && n[e] == r[e] || Pt(t.style, e, n[e]);
|
|
2310
2328
|
}
|
|
2311
|
-
else if (e[0] == "o" && e[1] == "n") o = e != (e = e.replace(
|
|
2329
|
+
else if (e[0] == "o" && e[1] == "n") o = e != (e = e.replace(an, "$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);
|
|
2312
2330
|
else {
|
|
2313
2331
|
if (s == "http://www.w3.org/2000/svg") e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
2314
2332
|
else if (e != "width" && e != "height" && e != "href" && e != "list" && e != "form" && e != "tabIndex" && e != "download" && e != "rowSpan" && e != "colSpan" && e != "role" && e != "popover" && e in t) try {
|
|
@@ -2330,11 +2348,11 @@ function At(t) {
|
|
|
2330
2348
|
};
|
|
2331
2349
|
}
|
|
2332
2350
|
function Ft(t, e, n, r, s, o, i, a, l, u) {
|
|
2333
|
-
var d, p, c, h, v, V, z, C, T, Z, f, _, $, U, N,
|
|
2351
|
+
var d, p, c, h, v, V, z, C, T, Z, f, _, $, U, N, G, te, P = e.type;
|
|
2334
2352
|
if (e.constructor !== void 0) return null;
|
|
2335
2353
|
128 & n.__u && (l = !!(32 & n.__u), o = [a = e.__e = n.__e]), (d = I.__b) && d(e);
|
|
2336
2354
|
e: if (typeof P == "function") try {
|
|
2337
|
-
if (C = e.props, T = "prototype" in P && P.prototype.render, Z = (d = P.contextType) && r[d.__c], f = d ? Z ? Z.props.value : d.__ : r, n.__c ? z = (p = e.__c = n.__c).__ = p.__E : (T ? e.__c = p = new P(C, f) : (e.__c = p = new
|
|
2355
|
+
if (C = e.props, T = "prototype" in P && P.prototype.render, Z = (d = P.contextType) && r[d.__c], f = d ? Z ? Z.props.value : d.__ : r, n.__c ? z = (p = e.__c = n.__c).__ = p.__E : (T ? e.__c = p = new P(C, f) : (e.__c = p = new Oe(C, f), p.constructor = P, p.render = Ei), Z && Z.sub(p), p.state || (p.state = {}), p.__n = r, c = p.__d = !0, p.__h = [], p._sb = []), T && p.__s == null && (p.__s = p.state), T && P.getDerivedStateFromProps != null && (p.__s == p.state && (p.__s = ne({}, p.__s)), ne(p.__s, P.getDerivedStateFromProps(C, p.__s))), h = p.props, v = p.state, p.__v = e, c) T && P.getDerivedStateFromProps == null && p.componentWillMount != null && p.componentWillMount(), T && p.componentDidMount != null && p.__h.push(p.componentDidMount);
|
|
2338
2356
|
else {
|
|
2339
2357
|
if (T && P.getDerivedStateFromProps == null && C !== h && p.componentWillReceiveProps != null && p.componentWillReceiveProps(C, f), e.__v == n.__v || !p.__e && p.shouldComponentUpdate != null && p.shouldComponentUpdate(C, p.__s, f) === !1) {
|
|
2340
2358
|
for (e.__v != n.__v && (p.props = C, p.state = p.__s, p.__d = !1), e.__e = n.__e, e.__k = n.__k, e.__k.some(function(Y) {
|
|
@@ -2353,25 +2371,25 @@ function Ft(t, e, n, r, s, o, i, a, l, u) {
|
|
|
2353
2371
|
} else do
|
|
2354
2372
|
p.__d = !1, $ && $(e), d = p.render(p.props, p.state, p.context), p.state = p.__s;
|
|
2355
2373
|
while (p.__d && ++U < 25);
|
|
2356
|
-
p.state = p.__s, p.getChildContext != null && (r = ne(ne({}, r), p.getChildContext())), T && !c && p.getSnapshotBeforeUpdate != null && (V = p.getSnapshotBeforeUpdate(h, v)),
|
|
2374
|
+
p.state = p.__s, p.getChildContext != null && (r = ne(ne({}, r), p.getChildContext())), T && !c && p.getSnapshotBeforeUpdate != null && (V = p.getSnapshotBeforeUpdate(h, v)), G = d, d != null && d.type === ge && d.key == null && (G = fn(d.props.children)), a = dn(t, Ze(G) ? G : [G], e, n, r, s, o, i, a, l, u), p.base = e.__e, e.__u &= -161, p.__h.length && i.push(p), z && (p.__E = p.__ = null);
|
|
2357
2375
|
} catch (Y) {
|
|
2358
2376
|
if (e.__v = null, l || o != null) if (Y.then) {
|
|
2359
2377
|
for (e.__u |= l ? 160 : 128; a && a.nodeType == 8 && a.nextSibling; ) a = a.nextSibling;
|
|
2360
2378
|
o[o.indexOf(a)] = null, e.__e = a;
|
|
2361
2379
|
} else {
|
|
2362
2380
|
for (te = o.length; te--; ) $t(o[te]);
|
|
2363
|
-
|
|
2381
|
+
rt(e);
|
|
2364
2382
|
}
|
|
2365
|
-
else e.__e = n.__e, e.__k = n.__k, Y.then ||
|
|
2383
|
+
else e.__e = n.__e, e.__k = n.__k, Y.then || rt(e);
|
|
2366
2384
|
I.__e(Y, e, n);
|
|
2367
2385
|
}
|
|
2368
2386
|
else o == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : a = e.__e = Ti(n.__e, e, n, r, s, o, i, l, u);
|
|
2369
2387
|
return (d = I.diffed) && d(e), 128 & e.__u ? void 0 : a;
|
|
2370
2388
|
}
|
|
2371
|
-
function
|
|
2372
|
-
t && t.__c && (t.__c.__e = !0), t && t.__k && t.__k.forEach(
|
|
2389
|
+
function rt(t) {
|
|
2390
|
+
t && t.__c && (t.__c.__e = !0), t && t.__k && t.__k.forEach(rt);
|
|
2373
2391
|
}
|
|
2374
|
-
function
|
|
2392
|
+
function cn(t, e, n) {
|
|
2375
2393
|
for (var r = 0; r < n.length; r++) Ct(n[r], n[++r], n[++r]);
|
|
2376
2394
|
I.__c && I.__c(e, t), t.some(function(s) {
|
|
2377
2395
|
try {
|
|
@@ -2383,8 +2401,8 @@ function fn(t, e, n) {
|
|
|
2383
2401
|
}
|
|
2384
2402
|
});
|
|
2385
2403
|
}
|
|
2386
|
-
function
|
|
2387
|
-
return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t :
|
|
2404
|
+
function fn(t) {
|
|
2405
|
+
return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : Ze(t) ? t.map(fn) : ne({}, t);
|
|
2388
2406
|
}
|
|
2389
2407
|
function Ti(t, e, n, r, s, o, i, a, l) {
|
|
2390
2408
|
var u, d, p, c, h, v, V, z = n.props || Ce, C = e.props, T = e.type;
|
|
@@ -2400,7 +2418,7 @@ function Ti(t, e, n, r, s, o, i, a, l) {
|
|
|
2400
2418
|
}
|
|
2401
2419
|
if (T == null) z === C || a && t.data == C || (t.data = C);
|
|
2402
2420
|
else {
|
|
2403
|
-
if (o = o &&
|
|
2421
|
+
if (o = o && We.call(t.childNodes), !a && o != null) for (z = {}, u = 0; u < t.attributes.length; u++) z[(h = t.attributes[u]).name] = h.value;
|
|
2404
2422
|
for (u in z) if (h = z[u], u != "children") {
|
|
2405
2423
|
if (u == "dangerouslySetInnerHTML") p = h;
|
|
2406
2424
|
else if (!(u in C)) {
|
|
@@ -2410,7 +2428,7 @@ function Ti(t, e, n, r, s, o, i, a, l) {
|
|
|
2410
2428
|
}
|
|
2411
2429
|
for (u in C) h = C[u], u == "children" ? c = h : u == "dangerouslySetInnerHTML" ? d = h : u == "value" ? v = h : u == "checked" ? V = h : a && typeof h != "function" || z[u] === h || ze(t, u, h, z[u], s);
|
|
2412
2430
|
if (d) a || p && (d.__html == p.__html || d.__html == t.innerHTML) || (t.innerHTML = d.__html), e.__k = [];
|
|
2413
|
-
else if (p && (t.innerHTML = ""),
|
|
2431
|
+
else if (p && (t.innerHTML = ""), dn(e.type == "template" ? t.content : t, Ze(c) ? c : [c], e, n, r, T == "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]);
|
|
2414
2432
|
a || (u = "value", T == "progress" && v == null ? t.removeAttribute("value") : v != null && (v !== t[u] || T == "progress" && !v || T == "option" && v != z[u]) && ze(t, u, v, z[u], s), u = "checked", V != null && V != t[u] && ze(t, u, V, z[u], s));
|
|
2415
2433
|
}
|
|
2416
2434
|
return t;
|
|
@@ -2425,7 +2443,7 @@ function Ct(t, e, n) {
|
|
|
2425
2443
|
I.__e(s, n);
|
|
2426
2444
|
}
|
|
2427
2445
|
}
|
|
2428
|
-
function
|
|
2446
|
+
function hn(t, e, n) {
|
|
2429
2447
|
var r, s;
|
|
2430
2448
|
if (I.unmount && I.unmount(t), (r = t.ref) && (r.current && r.current != t.__e || Ct(r, null, e)), (r = t.__c) != null) {
|
|
2431
2449
|
if (r.componentWillUnmount) try {
|
|
@@ -2435,31 +2453,31 @@ function mn(t, e, n) {
|
|
|
2435
2453
|
}
|
|
2436
2454
|
r.base = r.__P = null;
|
|
2437
2455
|
}
|
|
2438
|
-
if (r = t.__k) for (s = 0; s < r.length; s++) r[s] &&
|
|
2456
|
+
if (r = t.__k) for (s = 0; s < r.length; s++) r[s] && hn(r[s], e, n || typeof t.type != "function");
|
|
2439
2457
|
n || $t(t.__e), t.__c = t.__ = t.__e = void 0;
|
|
2440
2458
|
}
|
|
2441
2459
|
function Ei(t, e, n) {
|
|
2442
2460
|
return this.constructor(t, n);
|
|
2443
2461
|
}
|
|
2444
|
-
function
|
|
2462
|
+
function mn(t, e, n) {
|
|
2445
2463
|
var r, s, o, i;
|
|
2446
|
-
e == document && (e = document.documentElement), I.__ && I.__(t, e), s = (r = !1) ? null : e.__k, o = [], i = [], Ft(e, t = e.__k = St(ge, null, [t]), s || Ce, Ce, e.namespaceURI, s ? null : e.firstChild ?
|
|
2464
|
+
e == document && (e = document.documentElement), I.__ && I.__(t, e), s = (r = !1) ? null : e.__k, o = [], i = [], Ft(e, t = e.__k = St(ge, null, [t]), s || Ce, Ce, e.namespaceURI, s ? null : e.firstChild ? We.call(e.childNodes) : null, o, s ? s.__e : e.firstChild, r, i), cn(o, t, i);
|
|
2447
2465
|
}
|
|
2448
|
-
|
|
2466
|
+
We = ln.slice, I = { __e: function(t, e, n, r) {
|
|
2449
2467
|
for (var s, o, i; e = e.__; ) if ((s = e.__c) && !s.__) try {
|
|
2450
2468
|
if ((o = s.constructor) && o.getDerivedStateFromError != null && (s.setState(o.getDerivedStateFromError(t)), i = s.__d), s.componentDidCatch != null && (s.componentDidCatch(t, r || {}), i = s.__d), i) return s.__E = s;
|
|
2451
2469
|
} catch (a) {
|
|
2452
2470
|
t = a;
|
|
2453
2471
|
}
|
|
2454
2472
|
throw t;
|
|
2455
|
-
} },
|
|
2473
|
+
} }, rn = 0, Oe.prototype.setState = function(t, e) {
|
|
2456
2474
|
var n;
|
|
2457
2475
|
n = this.__s != null && this.__s != this.state ? this.__s : this.__s = ne({}, this.state), typeof t == "function" && (t = t(ne({}, n), this.props)), t && ne(n, t), t != null && this.__v && (e && this._sb.push(e), zt(this));
|
|
2458
|
-
},
|
|
2476
|
+
}, Oe.prototype.forceUpdate = function(t) {
|
|
2459
2477
|
this.__v && (this.__e = !0, t && this.__h.push(t), zt(this));
|
|
2460
|
-
},
|
|
2478
|
+
}, Oe.prototype.render = ge, ae = [], sn = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, on = function(t, e) {
|
|
2461
2479
|
return t.__v.__b - e.__v.__b;
|
|
2462
|
-
}, je.__r = 0,
|
|
2480
|
+
}, je.__r = 0, an = /(PointerCapture)$|Capture$/i, wt = 0, tt = At(!1), nt = At(!0);
|
|
2463
2481
|
var Ii = 0;
|
|
2464
2482
|
function S(t, e, n, r, s, o) {
|
|
2465
2483
|
e || (e = {});
|
|
@@ -2469,31 +2487,31 @@ function S(t, e, n, r, s, o) {
|
|
|
2469
2487
|
if (typeof t == "function" && (i = t.defaultProps)) for (a in i) l[a] === void 0 && (l[a] = i[a]);
|
|
2470
2488
|
return I.vnode && I.vnode(u), u;
|
|
2471
2489
|
}
|
|
2472
|
-
function
|
|
2490
|
+
function gn(t) {
|
|
2473
2491
|
var e, n, r = "";
|
|
2474
2492
|
if (typeof t == "string" || typeof t == "number") r += t;
|
|
2475
2493
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
2476
2494
|
var s = t.length;
|
|
2477
|
-
for (e = 0; e < s; e++) t[e] && (n =
|
|
2495
|
+
for (e = 0; e < s; e++) t[e] && (n = gn(t[e])) && (r && (r += " "), r += n);
|
|
2478
2496
|
} else for (n in t) t[n] && (r && (r += " "), r += n);
|
|
2479
2497
|
return r;
|
|
2480
2498
|
}
|
|
2481
|
-
function
|
|
2482
|
-
for (var t, e, n = 0, r = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e =
|
|
2499
|
+
function yn() {
|
|
2500
|
+
for (var t, e, n = 0, r = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e = gn(t)) && (r && (r += " "), r += e);
|
|
2483
2501
|
return r;
|
|
2484
2502
|
}
|
|
2485
|
-
var ke, A,
|
|
2503
|
+
var ke, A, Je, Nt, st = 0, vn = [], D = I, Dt = D.__b, Ot = D.__r, Rt = D.diffed, Bt = D.__c, jt = D.unmount, Lt = D.__;
|
|
2486
2504
|
function kt(t, e) {
|
|
2487
|
-
|
|
2505
|
+
D.__h && D.__h(A, t, st || e), st = 0;
|
|
2488
2506
|
var n = A.__H || (A.__H = { __: [], __h: [] });
|
|
2489
2507
|
return t >= n.__.length && n.__.push({}), n.__[t];
|
|
2490
2508
|
}
|
|
2491
2509
|
function Vi(t) {
|
|
2492
|
-
return
|
|
2510
|
+
return st = 1, Mi($n, t);
|
|
2493
2511
|
}
|
|
2494
2512
|
function Mi(t, e, n) {
|
|
2495
2513
|
var r = kt(ke++, 2);
|
|
2496
|
-
if (r.t = t, !r.__c && (r.__ = [
|
|
2514
|
+
if (r.t = t, !r.__c && (r.__ = [$n(void 0, e), function(a) {
|
|
2497
2515
|
var l = r.__N ? r.__N[0] : r.__[0], u = r.t(l, a);
|
|
2498
2516
|
l !== u && (r.__N = [u, r.__[1]], r.__c.setState({}));
|
|
2499
2517
|
}], r.__c = A, !A.__f)) {
|
|
@@ -2525,50 +2543,50 @@ function Mi(t, e, n) {
|
|
|
2525
2543
|
}
|
|
2526
2544
|
return r.__N || r.__;
|
|
2527
2545
|
}
|
|
2528
|
-
function
|
|
2546
|
+
function _n(t, e) {
|
|
2529
2547
|
var n = kt(ke++, 3);
|
|
2530
|
-
!
|
|
2548
|
+
!D.__s && wn(n.__H, e) && (n.__ = t, n.u = e, A.__H.__h.push(n));
|
|
2531
2549
|
}
|
|
2532
|
-
function
|
|
2550
|
+
function bn(t, e) {
|
|
2533
2551
|
var n = kt(ke++, 7);
|
|
2534
|
-
return
|
|
2552
|
+
return wn(n.__H, e) && (n.__ = t(), n.__H = e, n.__h = t), n.__;
|
|
2535
2553
|
}
|
|
2536
2554
|
function Ui() {
|
|
2537
|
-
for (var t; t =
|
|
2538
|
-
t.__H.__h.forEach(Re), t.__H.__h.forEach(
|
|
2555
|
+
for (var t; t = vn.shift(); ) if (t.__P && t.__H) try {
|
|
2556
|
+
t.__H.__h.forEach(Re), t.__H.__h.forEach(it), t.__H.__h = [];
|
|
2539
2557
|
} catch (e) {
|
|
2540
|
-
t.__H.__h = [],
|
|
2558
|
+
t.__H.__h = [], D.__e(e, t.__v);
|
|
2541
2559
|
}
|
|
2542
2560
|
}
|
|
2543
|
-
|
|
2544
|
-
A = null,
|
|
2545
|
-
},
|
|
2561
|
+
D.__b = function(t) {
|
|
2562
|
+
A = null, Dt && Dt(t);
|
|
2563
|
+
}, D.__ = function(t, e) {
|
|
2546
2564
|
t && e.__k && e.__k.__m && (t.__m = e.__k.__m), Lt && Lt(t, e);
|
|
2547
|
-
},
|
|
2548
|
-
|
|
2565
|
+
}, D.__r = function(t) {
|
|
2566
|
+
Ot && Ot(t), ke = 0;
|
|
2549
2567
|
var e = (A = t.__c).__H;
|
|
2550
|
-
e && (
|
|
2568
|
+
e && (Je === A ? (e.__h = [], A.__h = [], e.__.forEach(function(n) {
|
|
2551
2569
|
n.__N && (n.__ = n.__N), n.u = n.__N = void 0;
|
|
2552
|
-
})) : (e.__h.forEach(Re), e.__h.forEach(
|
|
2553
|
-
},
|
|
2570
|
+
})) : (e.__h.forEach(Re), e.__h.forEach(it), e.__h = [], ke = 0)), Je = A;
|
|
2571
|
+
}, D.diffed = function(t) {
|
|
2554
2572
|
Rt && Rt(t);
|
|
2555
2573
|
var e = t.__c;
|
|
2556
|
-
e && e.__H && (e.__H.__h.length && (
|
|
2574
|
+
e && e.__H && (e.__H.__h.length && (vn.push(e) !== 1 && Nt === D.requestAnimationFrame || ((Nt = D.requestAnimationFrame) || zi)(Ui)), e.__H.__.forEach(function(n) {
|
|
2557
2575
|
n.u && (n.__H = n.u), n.u = void 0;
|
|
2558
|
-
})),
|
|
2559
|
-
},
|
|
2576
|
+
})), Je = A = null;
|
|
2577
|
+
}, D.__c = function(t, e) {
|
|
2560
2578
|
e.some(function(n) {
|
|
2561
2579
|
try {
|
|
2562
2580
|
n.__h.forEach(Re), n.__h = n.__h.filter(function(r) {
|
|
2563
|
-
return !r.__ ||
|
|
2581
|
+
return !r.__ || it(r);
|
|
2564
2582
|
});
|
|
2565
2583
|
} catch (r) {
|
|
2566
2584
|
e.some(function(s) {
|
|
2567
2585
|
s.__h && (s.__h = []);
|
|
2568
|
-
}), e = [],
|
|
2586
|
+
}), e = [], D.__e(r, n.__v);
|
|
2569
2587
|
}
|
|
2570
2588
|
}), Bt && Bt(t, e);
|
|
2571
|
-
},
|
|
2589
|
+
}, D.unmount = function(t) {
|
|
2572
2590
|
jt && jt(t);
|
|
2573
2591
|
var e, n = t.__c;
|
|
2574
2592
|
n && n.__H && (n.__H.__.forEach(function(r) {
|
|
@@ -2577,7 +2595,7 @@ O.__b = function(t) {
|
|
|
2577
2595
|
} catch (s) {
|
|
2578
2596
|
e = s;
|
|
2579
2597
|
}
|
|
2580
|
-
}), n.__H = void 0, e &&
|
|
2598
|
+
}), n.__H = void 0, e && D.__e(e, n.__v));
|
|
2581
2599
|
};
|
|
2582
2600
|
var xt = typeof requestAnimationFrame == "function";
|
|
2583
2601
|
function zi(t) {
|
|
@@ -2590,16 +2608,16 @@ function Re(t) {
|
|
|
2590
2608
|
var e = A, n = t.__c;
|
|
2591
2609
|
typeof n == "function" && (t.__c = void 0, n()), A = e;
|
|
2592
2610
|
}
|
|
2593
|
-
function
|
|
2611
|
+
function it(t) {
|
|
2594
2612
|
var e = A;
|
|
2595
2613
|
t.__c = t.__(), A = e;
|
|
2596
2614
|
}
|
|
2597
|
-
function
|
|
2615
|
+
function wn(t, e) {
|
|
2598
2616
|
return !t || t.length !== e.length || e.some(function(n, r) {
|
|
2599
2617
|
return n !== t[r];
|
|
2600
2618
|
});
|
|
2601
2619
|
}
|
|
2602
|
-
function
|
|
2620
|
+
function $n(t, e) {
|
|
2603
2621
|
return typeof e == "function" ? e(t) : e;
|
|
2604
2622
|
}
|
|
2605
2623
|
function Pi(t, e = {}) {
|
|
@@ -2664,7 +2682,7 @@ function Ai(t) {
|
|
|
2664
2682
|
const { width: e, height: n, note: r, noClick: s, ctx: o } = t;
|
|
2665
2683
|
if (!o.uppy)
|
|
2666
2684
|
throw new Error("Dropzone must be used within a UppyContextProvider");
|
|
2667
|
-
const { getRootProps: i, getInputProps: a } =
|
|
2685
|
+
const { getRootProps: i, getInputProps: a } = bn(() => Pi(o, { noClick: s }), [o, s]);
|
|
2668
2686
|
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", {
|
|
2669
2687
|
...i(),
|
|
2670
2688
|
// biome-ignore lint/a11y/noNoninteractiveTabindex: it is also a button. getRootProps returns keyboard event handlers
|
|
@@ -2673,7 +2691,7 @@ function Ai(t) {
|
|
|
2673
2691
|
width: e || "100%",
|
|
2674
2692
|
height: n || "100%"
|
|
2675
2693
|
},
|
|
2676
|
-
className:
|
|
2694
|
+
className: yn("uppy:border-2 uppy:border-dashed uppy:border-gray-300", "uppy:rounded-lg uppy:p-6 uppy:bg-gray-50", "uppy:transition-colors uppy:duration-200", {
|
|
2677
2695
|
"uppy:cursor-pointer uppy:hover:bg-blue-50": !s
|
|
2678
2696
|
}),
|
|
2679
2697
|
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]
|
|
@@ -2689,7 +2707,7 @@ const Ni = [
|
|
|
2689
2707
|
"EB",
|
|
2690
2708
|
"ZB",
|
|
2691
2709
|
"YB"
|
|
2692
|
-
],
|
|
2710
|
+
], Di = [
|
|
2693
2711
|
"B",
|
|
2694
2712
|
"KiB",
|
|
2695
2713
|
"MiB",
|
|
@@ -2699,7 +2717,7 @@ const Ni = [
|
|
|
2699
2717
|
"EiB",
|
|
2700
2718
|
"ZiB",
|
|
2701
2719
|
"YiB"
|
|
2702
|
-
],
|
|
2720
|
+
], Oi = [
|
|
2703
2721
|
"b",
|
|
2704
2722
|
"kbit",
|
|
2705
2723
|
"Mbit",
|
|
@@ -2732,7 +2750,7 @@ function Bi(t, e) {
|
|
|
2732
2750
|
space: !0,
|
|
2733
2751
|
...e
|
|
2734
2752
|
};
|
|
2735
|
-
const n = e.bits ? e.binary ? Ri :
|
|
2753
|
+
const n = e.bits ? e.binary ? Ri : Oi : e.binary ? Di : Ni, r = e.space ? " " : "";
|
|
2736
2754
|
if (e.signed && t === 0)
|
|
2737
2755
|
return ` 0${r}${n[0]}`;
|
|
2738
2756
|
const s = t < 0, o = s ? "-" : e.signed ? "+" : "";
|
|
@@ -2749,7 +2767,7 @@ function Bi(t, e) {
|
|
|
2749
2767
|
}
|
|
2750
2768
|
function ji(t) {
|
|
2751
2769
|
const [e, n] = Vi(() => []), { ctx: r, editFile: s, imageThumbnail: o } = t;
|
|
2752
|
-
return
|
|
2770
|
+
return _n(() => {
|
|
2753
2771
|
var a;
|
|
2754
2772
|
const i = (l, u, d) => {
|
|
2755
2773
|
d != null && d.files && n(Object.values(d.files));
|
|
@@ -2765,7 +2783,7 @@ function ji(t) {
|
|
|
2765
2783
|
}, 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: () => {
|
|
2766
2784
|
var d;
|
|
2767
2785
|
(d = r.uppy) == null || d.removeFile(i.id);
|
|
2768
|
-
}, children: "remove" })] })] }), S("progress", { max: "100", className:
|
|
2786
|
+
}, children: "remove" })] })] }), S("progress", { max: "100", className: yn("uppy:w-full uppy:h-[2px] uppy:appearance-none uppy:bg-gray-100 uppy:rounded-full uppy:overflow-hidden uppy:[&::-webkit-progress-bar]:bg-gray-100 uppy:block uppy:my-2", {
|
|
2769
2787
|
"uppy:[&::-webkit-progress-value]:bg-green-500 uppy:[&::-moz-progress-bar]:bg-green-500": (a = i.progress) == null ? void 0 : a.uploadComplete,
|
|
2770
2788
|
"uppy:[&::-webkit-progress-value]:bg-red-500 uppy:[&::-moz-progress-bar]:bg-red-500": i.error,
|
|
2771
2789
|
"uppy:[&::-webkit-progress-value]:bg-blue-500 uppy:[&::-moz-progress-bar]:bg-blue-500": !((l = i.progress) != null && l.uploadComplete) && !i.error
|
|
@@ -2782,7 +2800,7 @@ function Li(t) {
|
|
|
2782
2800
|
"x-tar",
|
|
2783
2801
|
"x-gzip",
|
|
2784
2802
|
"x-apple-diskimage"
|
|
2785
|
-
].includes(s), a = r === "application" && s === "pdf", l =
|
|
2803
|
+
].includes(s), a = r === "application" && s === "pdf", l = bn(() => {
|
|
2786
2804
|
if (!t.images)
|
|
2787
2805
|
return "";
|
|
2788
2806
|
if (t.file.isRemote)
|
|
@@ -2791,7 +2809,7 @@ function Li(t) {
|
|
|
2791
2809
|
throw new Error("File data is empty");
|
|
2792
2810
|
return URL.createObjectURL(t.file.data);
|
|
2793
2811
|
}, [t.file.data, t.images, t.file.isRemote, t.file.preview]), u = t.images && o && l;
|
|
2794
|
-
return
|
|
2812
|
+
return _n(() => () => {
|
|
2795
2813
|
l && URL.revokeObjectURL(l);
|
|
2796
2814
|
}, [l]), S("div", { "data-uppy-element": "thumbnail", className: "uppy:relative uppy:overflow-hidden uppy:bg-gray-100 uppy:rounded-lg uppy:flex uppy:items-center uppy:justify-center", style: {
|
|
2797
2815
|
width: e,
|
|
@@ -2826,7 +2844,7 @@ function xi({ uppy: t, onStatusChange: e, onProgressChange: n }) {
|
|
|
2826
2844
|
}
|
|
2827
2845
|
};
|
|
2828
2846
|
}
|
|
2829
|
-
const
|
|
2847
|
+
const Sn = Symbol("uppy"), qi = E({
|
|
2830
2848
|
name: "UppyContextProvider",
|
|
2831
2849
|
props: {
|
|
2832
2850
|
uppy: {
|
|
@@ -2835,12 +2853,12 @@ const Fn = Symbol("uppy"), qi = E({
|
|
|
2835
2853
|
}
|
|
2836
2854
|
},
|
|
2837
2855
|
setup(t, { slots: e }) {
|
|
2838
|
-
const n =
|
|
2856
|
+
const n = W("init"), r = W(0), s = en({
|
|
2839
2857
|
uppy: Wn(t.uppy),
|
|
2840
2858
|
status: "init",
|
|
2841
2859
|
progress: 0
|
|
2842
2860
|
});
|
|
2843
|
-
Zn(
|
|
2861
|
+
Zn(Sn, s);
|
|
2844
2862
|
let o;
|
|
2845
2863
|
return ve(() => {
|
|
2846
2864
|
if (!t.uppy)
|
|
@@ -2854,7 +2872,7 @@ const Fn = Symbol("uppy"), qi = E({
|
|
|
2854
2872
|
r.value = i, s.progress = i;
|
|
2855
2873
|
}
|
|
2856
2874
|
});
|
|
2857
|
-
}),
|
|
2875
|
+
}), mt(() => {
|
|
2858
2876
|
o == null || o.cleanup();
|
|
2859
2877
|
}), () => {
|
|
2860
2878
|
var i;
|
|
@@ -2862,8 +2880,8 @@ const Fn = Symbol("uppy"), qi = E({
|
|
|
2862
2880
|
};
|
|
2863
2881
|
}
|
|
2864
2882
|
});
|
|
2865
|
-
function
|
|
2866
|
-
const t = k(
|
|
2883
|
+
function Fn() {
|
|
2884
|
+
const t = k(Sn);
|
|
2867
2885
|
return t || {
|
|
2868
2886
|
uppy: void 0,
|
|
2869
2887
|
status: "init",
|
|
@@ -2874,9 +2892,9 @@ const Hi = E({
|
|
|
2874
2892
|
name: "Dropzone",
|
|
2875
2893
|
props: ["width", "height", "note", "noClick"],
|
|
2876
2894
|
setup(t) {
|
|
2877
|
-
const e =
|
|
2895
|
+
const e = W(null), n = Fn();
|
|
2878
2896
|
function r() {
|
|
2879
|
-
e.value &&
|
|
2897
|
+
e.value && mn(St(Ai, {
|
|
2880
2898
|
...t,
|
|
2881
2899
|
ctx: n
|
|
2882
2900
|
}), e.value);
|
|
@@ -2887,15 +2905,15 @@ const Hi = E({
|
|
|
2887
2905
|
r();
|
|
2888
2906
|
}), Fe(() => t, () => {
|
|
2889
2907
|
r();
|
|
2890
|
-
}, { deep: !0 }), () =>
|
|
2908
|
+
}, { deep: !0 }), () => nn("div", { ref: e });
|
|
2891
2909
|
}
|
|
2892
2910
|
}), Gi = E({
|
|
2893
2911
|
name: "FilesList",
|
|
2894
2912
|
props: ["editFile", "imageThumbnail"],
|
|
2895
2913
|
setup(t) {
|
|
2896
|
-
const e =
|
|
2914
|
+
const e = W(null), n = Fn();
|
|
2897
2915
|
function r() {
|
|
2898
|
-
e.value &&
|
|
2916
|
+
e.value && mn(St(ji, {
|
|
2899
2917
|
...t,
|
|
2900
2918
|
ctx: n
|
|
2901
2919
|
}), e.value);
|
|
@@ -2906,10 +2924,10 @@ const Hi = E({
|
|
|
2906
2924
|
r();
|
|
2907
2925
|
}), Fe(() => t, () => {
|
|
2908
2926
|
r();
|
|
2909
|
-
}, { deep: !0 }), () =>
|
|
2927
|
+
}, { deep: !0 }), () => nn("div", { ref: e });
|
|
2910
2928
|
}
|
|
2911
2929
|
});
|
|
2912
|
-
function
|
|
2930
|
+
function Cn(t) {
|
|
2913
2931
|
const e = t.lastIndexOf(".");
|
|
2914
2932
|
return e === -1 || e === t.length - 1 ? {
|
|
2915
2933
|
name: t,
|
|
@@ -2974,11 +2992,11 @@ const Ht = {
|
|
|
2974
2992
|
gz: "application/gzip",
|
|
2975
2993
|
dmg: "application/x-apple-diskimage"
|
|
2976
2994
|
};
|
|
2977
|
-
function
|
|
2995
|
+
function kn(t) {
|
|
2978
2996
|
var n;
|
|
2979
2997
|
if (t.type)
|
|
2980
2998
|
return t.type;
|
|
2981
|
-
const e = t.name ? (n =
|
|
2999
|
+
const e = t.name ? (n = Cn(t.name).extension) == null ? void 0 : n.toLowerCase() : null;
|
|
2982
3000
|
return e && e in Ht ? Ht[e] : "application/octet-stream";
|
|
2983
3001
|
}
|
|
2984
3002
|
function Wi(t) {
|
|
@@ -3005,17 +3023,17 @@ function Yi(t) {
|
|
|
3005
3023
|
function Xi(t, e) {
|
|
3006
3024
|
if (Yi(t))
|
|
3007
3025
|
return t.id;
|
|
3008
|
-
const n =
|
|
3026
|
+
const n = kn(t);
|
|
3009
3027
|
return Zi({
|
|
3010
3028
|
...t,
|
|
3011
3029
|
type: n
|
|
3012
3030
|
}, e);
|
|
3013
3031
|
}
|
|
3014
|
-
function
|
|
3032
|
+
function Qe(t) {
|
|
3015
3033
|
return t < 10 ? `0${t}` : t.toString();
|
|
3016
3034
|
}
|
|
3017
3035
|
function Be() {
|
|
3018
|
-
const t = /* @__PURE__ */ new Date(), e =
|
|
3036
|
+
const t = /* @__PURE__ */ new Date(), e = Qe(t.getHours()), n = Qe(t.getMinutes()), r = Qe(t.getSeconds());
|
|
3019
3037
|
return `${e}:${n}:${r}`;
|
|
3020
3038
|
}
|
|
3021
3039
|
function Ki(t, e, n) {
|
|
@@ -3049,7 +3067,7 @@ function Wt(t, e) {
|
|
|
3049
3067
|
const Ji = (t) => {
|
|
3050
3068
|
throw new Error(`missing string: ${t}`);
|
|
3051
3069
|
};
|
|
3052
|
-
var Te, Ee,
|
|
3070
|
+
var Te, Ee, ot;
|
|
3053
3071
|
class Qi {
|
|
3054
3072
|
constructor(e, { onMissingKey: n = Ji } = {}) {
|
|
3055
3073
|
x(this, Ee);
|
|
@@ -3060,7 +3078,7 @@ class Qi {
|
|
|
3060
3078
|
pluralize(r) {
|
|
3061
3079
|
return r === 1 ? 0 : 1;
|
|
3062
3080
|
}
|
|
3063
|
-
}, Array.isArray(e) ? e.forEach(F(this, Ee,
|
|
3081
|
+
}, Array.isArray(e) ? e.forEach(F(this, Ee, ot), this) : F(this, Ee, ot).call(this, e), Me(this, Te, n);
|
|
3064
3082
|
}
|
|
3065
3083
|
/**
|
|
3066
3084
|
* Public translate method
|
|
@@ -3091,7 +3109,7 @@ class Qi {
|
|
|
3091
3109
|
return Wt(r, n);
|
|
3092
3110
|
}
|
|
3093
3111
|
}
|
|
3094
|
-
Te = new WeakMap(), Ee = new WeakSet(),
|
|
3112
|
+
Te = new WeakMap(), Ee = new WeakSet(), ot = function(e) {
|
|
3095
3113
|
if (!(e != null && e.strings))
|
|
3096
3114
|
return;
|
|
3097
3115
|
const n = this.locale;
|
|
@@ -3112,7 +3130,7 @@ const eo = {
|
|
|
3112
3130
|
error: (...t) => console.error(`[Uppy] [${Be()}]`, ...t)
|
|
3113
3131
|
};
|
|
3114
3132
|
var Pe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3115
|
-
function
|
|
3133
|
+
function Ye(t) {
|
|
3116
3134
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
3117
3135
|
}
|
|
3118
3136
|
var no = function(e) {
|
|
@@ -3125,11 +3143,11 @@ var no = function(e) {
|
|
|
3125
3143
|
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];
|
|
3126
3144
|
return `${i >= 10 || i % 1 === 0 ? Math.round(i) : i.toFixed(1)} ${a}`;
|
|
3127
3145
|
};
|
|
3128
|
-
const Ae = /* @__PURE__ */
|
|
3129
|
-
function
|
|
3146
|
+
const Ae = /* @__PURE__ */ Ye(no);
|
|
3147
|
+
function Tn(t, e) {
|
|
3130
3148
|
this.text = t = t || "", this.hasWild = ~t.indexOf("*"), this.separator = e, this.parts = t.split(e);
|
|
3131
3149
|
}
|
|
3132
|
-
|
|
3150
|
+
Tn.prototype.match = function(t) {
|
|
3133
3151
|
var e = !0, n = this.parts, r, s = n.length, o;
|
|
3134
3152
|
if (typeof t == "string" || t instanceof String)
|
|
3135
3153
|
if (!this.hasWild && this.text != t)
|
|
@@ -3150,7 +3168,7 @@ En.prototype.match = function(t) {
|
|
|
3150
3168
|
return e;
|
|
3151
3169
|
};
|
|
3152
3170
|
var ro = function(t, e, n) {
|
|
3153
|
-
var r = new
|
|
3171
|
+
var r = new Tn(t, n || /[\/\.]/);
|
|
3154
3172
|
return typeof e < "u" ? r.match(e) : r;
|
|
3155
3173
|
}, so = ro, io = /[\/\+\.]/, oo = function(t, e) {
|
|
3156
3174
|
function n(r) {
|
|
@@ -3159,7 +3177,7 @@ var ro = function(t, e, n) {
|
|
|
3159
3177
|
}
|
|
3160
3178
|
return e ? n(e.split(";")[0]) : n;
|
|
3161
3179
|
};
|
|
3162
|
-
const ao = /* @__PURE__ */
|
|
3180
|
+
const ao = /* @__PURE__ */ Ye(oo), lo = {
|
|
3163
3181
|
maxFileSize: null,
|
|
3164
3182
|
minFileSize: null,
|
|
3165
3183
|
maxTotalFileSize: null,
|
|
@@ -3247,8 +3265,8 @@ class uo {
|
|
|
3247
3265
|
const po = "5.0.0", co = {
|
|
3248
3266
|
version: po
|
|
3249
3267
|
};
|
|
3250
|
-
var fe, Le,
|
|
3251
|
-
class
|
|
3268
|
+
var fe, Le, In;
|
|
3269
|
+
class En {
|
|
3252
3270
|
constructor() {
|
|
3253
3271
|
x(this, Le);
|
|
3254
3272
|
B(this, "state", {});
|
|
@@ -3259,7 +3277,7 @@ class In {
|
|
|
3259
3277
|
}
|
|
3260
3278
|
setState(e) {
|
|
3261
3279
|
const n = { ...this.state }, r = { ...this.state, ...e };
|
|
3262
|
-
this.state = r, F(this, Le,
|
|
3280
|
+
this.state = r, F(this, Le, In).call(this, n, r, e);
|
|
3263
3281
|
}
|
|
3264
3282
|
subscribe(e) {
|
|
3265
3283
|
return w(this, fe).add(e), () => {
|
|
@@ -3267,16 +3285,16 @@ class In {
|
|
|
3267
3285
|
};
|
|
3268
3286
|
}
|
|
3269
3287
|
}
|
|
3270
|
-
fe = new WeakMap(), Le = new WeakSet(),
|
|
3288
|
+
fe = new WeakMap(), Le = new WeakSet(), In = function(...e) {
|
|
3271
3289
|
w(this, fe).forEach((n) => {
|
|
3272
3290
|
n(...e);
|
|
3273
3291
|
});
|
|
3274
|
-
}, B(
|
|
3292
|
+
}, B(En, "VERSION", co.version);
|
|
3275
3293
|
function fo(t) {
|
|
3276
3294
|
var e = typeof t;
|
|
3277
3295
|
return t != null && (e == "object" || e == "function");
|
|
3278
3296
|
}
|
|
3279
|
-
var Tt = fo, ho = typeof Pe == "object" && Pe && Pe.Object === Object && Pe, mo = ho, go = mo, yo = typeof self == "object" && self && self.Object === Object && self, vo = go || yo || Function("return this")(),
|
|
3297
|
+
var Tt = fo, ho = typeof Pe == "object" && Pe && Pe.Object === Object && Pe, mo = ho, go = mo, yo = typeof self == "object" && self && self.Object === Object && self, vo = go || yo || Function("return this")(), Vn = vo, _o = Vn, bo = function() {
|
|
3280
3298
|
return _o.Date.now();
|
|
3281
3299
|
}, wo = bo, $o = /\s/;
|
|
3282
3300
|
function So(t) {
|
|
@@ -3288,7 +3306,7 @@ var Fo = So, Co = Fo, ko = /^\s+/;
|
|
|
3288
3306
|
function To(t) {
|
|
3289
3307
|
return t && t.slice(0, Co(t) + 1).replace(ko, "");
|
|
3290
3308
|
}
|
|
3291
|
-
var Eo = To, Io =
|
|
3309
|
+
var Eo = To, Io = Vn, Vo = Io.Symbol, Mn = Vo, Zt = Mn, Un = Object.prototype, Mo = Un.hasOwnProperty, Uo = Un.toString, we = Zt ? Zt.toStringTag : void 0;
|
|
3292
3310
|
function zo(t) {
|
|
3293
3311
|
var e = Mo.call(t, we), n = t[we];
|
|
3294
3312
|
try {
|
|
@@ -3300,10 +3318,10 @@ function zo(t) {
|
|
|
3300
3318
|
return r && (e ? t[we] = n : delete t[we]), s;
|
|
3301
3319
|
}
|
|
3302
3320
|
var Po = zo, Ao = Object.prototype, No = Ao.toString;
|
|
3303
|
-
function
|
|
3321
|
+
function Do(t) {
|
|
3304
3322
|
return No.call(t);
|
|
3305
3323
|
}
|
|
3306
|
-
var
|
|
3324
|
+
var Oo = Do, Yt = Mn, Ro = Po, Bo = Oo, jo = "[object Null]", Lo = "[object Undefined]", Xt = Yt ? Yt.toStringTag : void 0;
|
|
3307
3325
|
function xo(t) {
|
|
3308
3326
|
return t == null ? t === void 0 ? Lo : jo : Xt && Xt in Object(t) ? Ro(t) : Bo(t);
|
|
3309
3327
|
}
|
|
@@ -3331,7 +3349,7 @@ function sa(t) {
|
|
|
3331
3349
|
var n = ta.test(t);
|
|
3332
3350
|
return n || na.test(t) ? ra(t.slice(2), n ? 2 : 8) : ea.test(t) ? Jt : +t;
|
|
3333
3351
|
}
|
|
3334
|
-
var ia = sa, oa = Tt,
|
|
3352
|
+
var ia = sa, oa = Tt, et = wo, Qt = ia, aa = "Expected a function", la = Math.max, ua = Math.min;
|
|
3335
3353
|
function da(t, e, n) {
|
|
3336
3354
|
var r, s, o, i, a, l, u = 0, d = !1, p = !1, c = !0;
|
|
3337
3355
|
if (typeof t != "function")
|
|
@@ -3345,15 +3363,15 @@ function da(t, e, n) {
|
|
|
3345
3363
|
return u = $, a = setTimeout(C, e), d ? h($) : i;
|
|
3346
3364
|
}
|
|
3347
3365
|
function V($) {
|
|
3348
|
-
var U = $ - l, N = $ - u,
|
|
3349
|
-
return p ? ua(
|
|
3366
|
+
var U = $ - l, N = $ - u, G = e - U;
|
|
3367
|
+
return p ? ua(G, o - N) : G;
|
|
3350
3368
|
}
|
|
3351
3369
|
function z($) {
|
|
3352
3370
|
var U = $ - l, N = $ - u;
|
|
3353
3371
|
return l === void 0 || U >= e || U < 0 || p && N >= o;
|
|
3354
3372
|
}
|
|
3355
3373
|
function C() {
|
|
3356
|
-
var $ =
|
|
3374
|
+
var $ = et();
|
|
3357
3375
|
if (z($))
|
|
3358
3376
|
return T($);
|
|
3359
3377
|
a = setTimeout(C, V($));
|
|
@@ -3365,10 +3383,10 @@ function da(t, e, n) {
|
|
|
3365
3383
|
a !== void 0 && clearTimeout(a), u = 0, r = l = s = a = void 0;
|
|
3366
3384
|
}
|
|
3367
3385
|
function f() {
|
|
3368
|
-
return a === void 0 ? i : T(
|
|
3386
|
+
return a === void 0 ? i : T(et());
|
|
3369
3387
|
}
|
|
3370
3388
|
function _() {
|
|
3371
|
-
var $ =
|
|
3389
|
+
var $ = et(), U = z($);
|
|
3372
3390
|
if (r = arguments, s = this, l = $, U) {
|
|
3373
3391
|
if (a === void 0)
|
|
3374
3392
|
return v(l);
|
|
@@ -3391,7 +3409,7 @@ function ma(t, e, n) {
|
|
|
3391
3409
|
});
|
|
3392
3410
|
}
|
|
3393
3411
|
var ga = ma;
|
|
3394
|
-
const ya = /* @__PURE__ */
|
|
3412
|
+
const ya = /* @__PURE__ */ Ye(ga);
|
|
3395
3413
|
var va = function() {
|
|
3396
3414
|
var e = {}, n = e._fns = {};
|
|
3397
3415
|
e.emit = function(i, a, l, u, d, p, c) {
|
|
@@ -3431,7 +3449,7 @@ var va = function() {
|
|
|
3431
3449
|
}
|
|
3432
3450
|
return e;
|
|
3433
3451
|
};
|
|
3434
|
-
const _a = /* @__PURE__ */
|
|
3452
|
+
const _a = /* @__PURE__ */ Ye(va);
|
|
3435
3453
|
let ba = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", wa = (t = 21) => {
|
|
3436
3454
|
let e = "", n = t | 0;
|
|
3437
3455
|
for (; n--; )
|
|
@@ -3524,7 +3542,7 @@ const Ne = {
|
|
|
3524
3542
|
error: null,
|
|
3525
3543
|
recoveredState: null
|
|
3526
3544
|
};
|
|
3527
|
-
var X, K, Ie, le, he, me, ue, y, oe,
|
|
3545
|
+
var X, K, Ie, le, he, me, ue, y, oe, lt, zn, Pn, An, ut, dt, pt, ct, xe, ft, de, Nn, Dn, se, Ve, $e, On, ht, Se;
|
|
3528
3546
|
const qe = class qe {
|
|
3529
3547
|
/**
|
|
3530
3548
|
* Instantiate Uppy
|
|
@@ -3584,7 +3602,7 @@ const qe = class qe {
|
|
|
3584
3602
|
// and click 'ADD MORE FILES', - focus won't activate in Firefox.
|
|
3585
3603
|
// - We must throttle at around >500ms to avoid performance lags.
|
|
3586
3604
|
// [Practical Check] Firefox, try to upload a big file for a prolonged period of time. Laptop will start to heat up.
|
|
3587
|
-
x(this, de, ya(() => F(this, y,
|
|
3605
|
+
x(this, de, ya(() => F(this, y, ft).call(this), 500, { leading: !0, trailing: !0 }));
|
|
3588
3606
|
x(this, se, this.updateOnlineStatus.bind(this));
|
|
3589
3607
|
// We need to store request clients by a unique ID, so we can share RequestClient instances across files
|
|
3590
3608
|
// this allows us to do rate limiting and synchronous operations like refreshing provider tokens
|
|
@@ -3607,7 +3625,7 @@ const qe = class qe {
|
|
|
3607
3625
|
meta: {},
|
|
3608
3626
|
onBeforeFileAdded: (s, o) => !Object.hasOwn(o, s.id),
|
|
3609
3627
|
onBeforeUpload: (s) => s,
|
|
3610
|
-
store: new
|
|
3628
|
+
store: new En(),
|
|
3611
3629
|
logger: eo,
|
|
3612
3630
|
infoTimeout: 5e3
|
|
3613
3631
|
}, r = { ...n, ...e };
|
|
@@ -3850,12 +3868,12 @@ const qe = class qe {
|
|
|
3850
3868
|
* and start an upload if `autoProceed === true`.
|
|
3851
3869
|
*/
|
|
3852
3870
|
addFile(e) {
|
|
3853
|
-
const { nextFilesState: n, validFilesToAdd: r, errors: s } = F(this, y,
|
|
3871
|
+
const { nextFilesState: n, validFilesToAdd: r, errors: s } = F(this, y, dt).call(this, [e]), o = s.filter((a) => a.isRestriction);
|
|
3854
3872
|
if (F(this, y, oe).call(this, o), s.length > 0)
|
|
3855
3873
|
throw s[0];
|
|
3856
3874
|
this.setState({ files: n });
|
|
3857
3875
|
const [i] = r;
|
|
3858
|
-
return this.emit("file-added", i), this.emit("files-added", r), this.log(`Added file: ${i.name}, ${i.id}, mime type: ${i.type}`), F(this, y,
|
|
3876
|
+
return this.emit("file-added", i), this.emit("files-added", r), this.log(`Added file: ${i.name}, ${i.id}, mime type: ${i.type}`), F(this, y, ut).call(this), i.id;
|
|
3859
3877
|
}
|
|
3860
3878
|
/**
|
|
3861
3879
|
* Add multiple files to `state.files`. See the `addFile()` documentation.
|
|
@@ -3865,7 +3883,7 @@ const qe = class qe {
|
|
|
3865
3883
|
* Programmatic users should usually still use `addFile()` on individual files.
|
|
3866
3884
|
*/
|
|
3867
3885
|
addFiles(e) {
|
|
3868
|
-
const { nextFilesState: n, validFilesToAdd: r, errors: s } = F(this, y,
|
|
3886
|
+
const { nextFilesState: n, validFilesToAdd: r, errors: s } = F(this, y, dt).call(this, e), o = s.filter((a) => a.isRestriction);
|
|
3869
3887
|
F(this, y, oe).call(this, o);
|
|
3870
3888
|
const i = s.filter((a) => !a.isRestriction);
|
|
3871
3889
|
if (i.length > 0) {
|
|
@@ -3892,7 +3910,7 @@ const qe = class qe {
|
|
|
3892
3910
|
this.log(`Added file: ${a.name}
|
|
3893
3911
|
id: ${a.id}
|
|
3894
3912
|
type: ${a.type}`);
|
|
3895
|
-
}), r.length > 0 && F(this, y,
|
|
3913
|
+
}), r.length > 0 && F(this, y, ut).call(this);
|
|
3896
3914
|
}
|
|
3897
3915
|
removeFiles(e) {
|
|
3898
3916
|
const { files: n, currentUploads: r } = this.getState(), s = { ...n }, o = { ...r }, i = /* @__PURE__ */ Object.create(null);
|
|
@@ -3956,7 +3974,7 @@ const qe = class qe {
|
|
|
3956
3974
|
}), this.setState({ files: e }), this.emit("resume-all");
|
|
3957
3975
|
}
|
|
3958
3976
|
async retryAll() {
|
|
3959
|
-
const e = await F(this, y,
|
|
3977
|
+
const e = await F(this, y, ct).call(this);
|
|
3960
3978
|
return this.emit("complete", e), e;
|
|
3961
3979
|
}
|
|
3962
3980
|
cancelAll() {
|
|
@@ -3985,7 +4003,7 @@ const qe = class qe {
|
|
|
3985
4003
|
});
|
|
3986
4004
|
}
|
|
3987
4005
|
[Symbol.for("uppy test: updateTotalProgress")]() {
|
|
3988
|
-
return F(this, y,
|
|
4006
|
+
return F(this, y, ft).call(this);
|
|
3989
4007
|
}
|
|
3990
4008
|
updateOnlineStatus() {
|
|
3991
4009
|
window.navigator.onLine ?? !0 ? (this.emit("is-online"), this.wasOffline && (this.emit("back-online"), this.info(this.i18n("connectedToInternet"), "success", 3e3), this.wasOffline = !1)) : (this.emit("is-offline"), this.info(this.i18n("noInternetConnection"), "error", 0), this.wasOffline = !0);
|
|
@@ -4122,7 +4140,7 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
4122
4140
|
* Add data to an upload's result object.
|
|
4123
4141
|
*/
|
|
4124
4142
|
addResultData(e, n) {
|
|
4125
|
-
if (!F(this, y,
|
|
4143
|
+
if (!F(this, y, On).call(this, e)) {
|
|
4126
4144
|
this.log(`Not setting result for an upload that has been removed: ${e}`);
|
|
4127
4145
|
return;
|
|
4128
4146
|
}
|
|
@@ -4141,8 +4159,8 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
4141
4159
|
var s;
|
|
4142
4160
|
(s = w(this, X).uploader) != null && s.length || this.log("No uploader type plugins are used", "warning");
|
|
4143
4161
|
let { files: e } = this.getState();
|
|
4144
|
-
if (F(this, y,
|
|
4145
|
-
const o = await F(this, y,
|
|
4162
|
+
if (F(this, y, pt).call(this).length > 0) {
|
|
4163
|
+
const o = await F(this, y, ct).call(this);
|
|
4146
4164
|
if (!(this.getFiles().filter((a) => a.progress.uploadStarted == null).length > 0))
|
|
4147
4165
|
return this.emit("complete", o), o;
|
|
4148
4166
|
({ files: e } = this.getState());
|
|
@@ -4154,7 +4172,7 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
4154
4172
|
files: e
|
|
4155
4173
|
}));
|
|
4156
4174
|
try {
|
|
4157
|
-
if (w(this, K).validateMinNumberOfFiles(e), !F(this, y,
|
|
4175
|
+
if (w(this, K).validateMinNumberOfFiles(e), !F(this, y, zn).call(this, e))
|
|
4158
4176
|
throw new J(this.i18n("missingRequiredMetaField"));
|
|
4159
4177
|
const { currentUploads: o } = this.getState(), i = Object.values(o).flatMap((d) => d.fileIDs), a = Object.keys(e).filter((d) => {
|
|
4160
4178
|
const p = this.getFile(d);
|
|
@@ -4177,7 +4195,7 @@ X = new WeakMap(), K = new WeakMap(), Ie = new WeakMap(), le = new WeakMap(), he
|
|
|
4177
4195
|
count: o.length
|
|
4178
4196
|
})
|
|
4179
4197
|
});
|
|
4180
|
-
},
|
|
4198
|
+
}, lt = function(e) {
|
|
4181
4199
|
const { missingFields: n, error: r } = w(this, K).getMissingRequiredMetaFields(e);
|
|
4182
4200
|
return n.length > 0 ? (this.setFileState(e.id, {
|
|
4183
4201
|
missingRequiredMetaFields: n,
|
|
@@ -4185,12 +4203,12 @@ X = new WeakMap(), K = new WeakMap(), Ie = new WeakMap(), le = new WeakMap(), he
|
|
|
4185
4203
|
}), this.log(r.message), this.emit("restriction-failed", e, r), !1) : (n.length === 0 && e.missingRequiredMetaFields && this.setFileState(e.id, {
|
|
4186
4204
|
missingRequiredMetaFields: []
|
|
4187
4205
|
}), !0);
|
|
4188
|
-
},
|
|
4206
|
+
}, zn = function(e) {
|
|
4189
4207
|
let n = !0;
|
|
4190
4208
|
for (const r of Object.values(e))
|
|
4191
|
-
F(this, y,
|
|
4209
|
+
F(this, y, lt).call(this, r) || (n = !1);
|
|
4192
4210
|
return n;
|
|
4193
|
-
},
|
|
4211
|
+
}, Pn = function(e) {
|
|
4194
4212
|
const { allowNewUpload: n } = this.getState();
|
|
4195
4213
|
if (n === !1) {
|
|
4196
4214
|
const r = new J(this.i18n("noMoreFilesAllowed"), {
|
|
@@ -4201,7 +4219,7 @@ X = new WeakMap(), K = new WeakMap(), Ie = new WeakMap(), le = new WeakMap(), he
|
|
|
4201
4219
|
}, /**
|
|
4202
4220
|
* Create a file state object based on user-provided `addFile()` options.
|
|
4203
4221
|
*/
|
|
4204
|
-
|
|
4222
|
+
An = function(e) {
|
|
4205
4223
|
const n = e instanceof File ? {
|
|
4206
4224
|
name: e.name,
|
|
4207
4225
|
type: e.type,
|
|
@@ -4211,7 +4229,7 @@ Nn = function(e) {
|
|
|
4211
4229
|
isRemote: !1,
|
|
4212
4230
|
source: void 0,
|
|
4213
4231
|
preview: void 0
|
|
4214
|
-
} : e, r =
|
|
4232
|
+
} : e, r = kn(n), s = Fa(r, n), o = Cn(s).extension, i = Xi(n, this.getID()), a = {
|
|
4215
4233
|
...n.meta,
|
|
4216
4234
|
name: s,
|
|
4217
4235
|
type: r
|
|
@@ -4246,19 +4264,19 @@ Nn = function(e) {
|
|
|
4246
4264
|
preview: n.preview
|
|
4247
4265
|
};
|
|
4248
4266
|
}, // Schedule an upload if `autoProceed` is enabled.
|
|
4249
|
-
|
|
4267
|
+
ut = function() {
|
|
4250
4268
|
this.opts.autoProceed && !this.scheduledAutoProceed && (this.scheduledAutoProceed = setTimeout(() => {
|
|
4251
4269
|
this.scheduledAutoProceed = null, this.upload().catch((e) => {
|
|
4252
4270
|
e.isRestriction || this.log(e.stack || e.message || e);
|
|
4253
4271
|
});
|
|
4254
4272
|
}, 4));
|
|
4255
|
-
},
|
|
4273
|
+
}, dt = function(e) {
|
|
4256
4274
|
let { files: n } = this.getState(), r = { ...n };
|
|
4257
4275
|
const s = [], o = [];
|
|
4258
4276
|
for (const i of e)
|
|
4259
4277
|
try {
|
|
4260
|
-
let a = F(this, y,
|
|
4261
|
-
F(this, y,
|
|
4278
|
+
let a = F(this, y, An).call(this, i);
|
|
4279
|
+
F(this, y, Pn).call(this, a);
|
|
4262
4280
|
const l = n[a.id], u = l == null ? void 0 : l.isGhost;
|
|
4263
4281
|
if (u && !a.isRemote) {
|
|
4264
4282
|
if (a.data == null)
|
|
@@ -4294,14 +4312,14 @@ lt = function() {
|
|
|
4294
4312
|
validFilesToAdd: s,
|
|
4295
4313
|
errors: o
|
|
4296
4314
|
};
|
|
4297
|
-
},
|
|
4315
|
+
}, pt = function() {
|
|
4298
4316
|
const { files: e } = this.getState();
|
|
4299
4317
|
return Object.keys(e).filter((n) => {
|
|
4300
4318
|
const r = e[n];
|
|
4301
4319
|
return r.error && (!r.missingRequiredMetaFields || r.missingRequiredMetaFields.length === 0);
|
|
4302
4320
|
});
|
|
4303
|
-
},
|
|
4304
|
-
const e = F(this, y,
|
|
4321
|
+
}, ct = async function() {
|
|
4322
|
+
const e = F(this, y, pt).call(this), n = { ...this.getState().files };
|
|
4305
4323
|
if (e.forEach((s) => {
|
|
4306
4324
|
n[s] = {
|
|
4307
4325
|
...n[s],
|
|
@@ -4321,13 +4339,13 @@ lt = function() {
|
|
|
4321
4339
|
// create new upload even if allowNewUpload: false
|
|
4322
4340
|
});
|
|
4323
4341
|
return F(this, y, Se).call(this, r);
|
|
4324
|
-
}, xe = new WeakMap(),
|
|
4325
|
-
const e = F(this, y,
|
|
4342
|
+
}, xe = new WeakMap(), ft = function() {
|
|
4343
|
+
const e = F(this, y, Nn).call(this);
|
|
4326
4344
|
let n = null;
|
|
4327
4345
|
e != null && (n = Math.round(e * 100), n > 100 ? n = 100 : n < 0 && (n = 0)), this.emit("progress", n ?? 0), this.setState({
|
|
4328
4346
|
totalProgress: n ?? 0
|
|
4329
4347
|
});
|
|
4330
|
-
}, de = new WeakMap(),
|
|
4348
|
+
}, de = new WeakMap(), Nn = function() {
|
|
4331
4349
|
const n = this.getFiles().filter((l) => l.progress.uploadStarted || l.progress.preprocess || l.progress.postprocess);
|
|
4332
4350
|
if (n.length === 0)
|
|
4333
4351
|
return 0;
|
|
@@ -4454,7 +4472,7 @@ Dn = function() {
|
|
|
4454
4472
|
}), this.on("restored", () => {
|
|
4455
4473
|
w(this, de).call(this);
|
|
4456
4474
|
}), this.on("dashboard:file-edit-complete", (s) => {
|
|
4457
|
-
s && F(this, y,
|
|
4475
|
+
s && F(this, y, lt).call(this, s);
|
|
4458
4476
|
}), typeof window < "u" && window.addEventListener && (window.addEventListener("online", w(this, se)), window.addEventListener("offline", w(this, se)), setTimeout(w(this, se), 3e3));
|
|
4459
4477
|
}, se = new WeakMap(), Ve = new WeakMap(), /**
|
|
4460
4478
|
* Create an upload for a bunch of files.
|
|
@@ -4476,14 +4494,14 @@ $e = function(e, n = {}) {
|
|
|
4476
4494
|
}
|
|
4477
4495
|
}
|
|
4478
4496
|
}), i;
|
|
4479
|
-
},
|
|
4497
|
+
}, On = function(e) {
|
|
4480
4498
|
const { currentUploads: n } = this.getState();
|
|
4481
4499
|
return n[e];
|
|
4482
4500
|
}, /**
|
|
4483
4501
|
* Remove an upload, eg. if it has been canceled or completed.
|
|
4484
4502
|
*
|
|
4485
4503
|
*/
|
|
4486
|
-
|
|
4504
|
+
ht = function(e) {
|
|
4487
4505
|
const { [e]: n, ...r } = this.getState().currentUploads;
|
|
4488
4506
|
this.setState({
|
|
4489
4507
|
currentUploads: r
|
|
@@ -4518,7 +4536,7 @@ ft = function(e) {
|
|
|
4518
4536
|
break;
|
|
4519
4537
|
}
|
|
4520
4538
|
} catch (i) {
|
|
4521
|
-
throw F(this, y,
|
|
4539
|
+
throw F(this, y, ht).call(this, e), i;
|
|
4522
4540
|
}
|
|
4523
4541
|
if (r) {
|
|
4524
4542
|
r.fileIDs.forEach((u) => {
|
|
@@ -4529,13 +4547,13 @@ ft = function(e) {
|
|
|
4529
4547
|
this.addResultData(e, { successful: a, failed: l, uploadID: e }), r = n();
|
|
4530
4548
|
}
|
|
4531
4549
|
let o;
|
|
4532
|
-
return r && (o = r.result, F(this, y,
|
|
4550
|
+
return r && (o = r.result, F(this, y, ht).call(this, e)), o == null && (this.log(`Not setting result for an upload that has been removed: ${e}`), o = {
|
|
4533
4551
|
successful: [],
|
|
4534
4552
|
failed: [],
|
|
4535
4553
|
uploadID: e
|
|
4536
4554
|
}), o;
|
|
4537
4555
|
}, B(qe, "VERSION", Sa.version);
|
|
4538
|
-
let
|
|
4556
|
+
let at = qe;
|
|
4539
4557
|
const Ta = {
|
|
4540
4558
|
key: 0,
|
|
4541
4559
|
class: "uppy-input-area--caption small text-body-secondary fst-italic"
|
|
@@ -4572,7 +4590,7 @@ const Ta = {
|
|
|
4572
4590
|
],
|
|
4573
4591
|
setup(t, { emit: e }) {
|
|
4574
4592
|
var Z;
|
|
4575
|
-
const n = t, r = e, s =
|
|
4593
|
+
const n = t, r = e, s = W(null), o = W(null), i = Yn(null), a = W(!1), l = W(!1), u = W(0), d = k("form", { value: {}, errors: {}, getID: (f) => f }), p = k("group", null), c = q({
|
|
4576
4594
|
get() {
|
|
4577
4595
|
var f;
|
|
4578
4596
|
return (f = p == null ? void 0 : p.value) != null && f.name ? p.value.getData(n.name) : d.value[n.name];
|
|
@@ -4582,7 +4600,7 @@ const Ta = {
|
|
|
4582
4600
|
(_ = p == null ? void 0 : p.value) != null && _.name ? p.value.setData(n.name, f) : d.value[n.name] = f, r("update:modelValue", f);
|
|
4583
4601
|
}
|
|
4584
4602
|
});
|
|
4585
|
-
i.value = new
|
|
4603
|
+
i.value = new at({
|
|
4586
4604
|
id: n.name,
|
|
4587
4605
|
autoProceed: !0,
|
|
4588
4606
|
...n.config,
|
|
@@ -4633,8 +4651,8 @@ const Ta = {
|
|
|
4633
4651
|
}, (f, _) => {
|
|
4634
4652
|
f === !0 && _ === !1 && h();
|
|
4635
4653
|
}), ve(() => {
|
|
4636
|
-
var f, _, $, U, N,
|
|
4637
|
-
n.useXHR && import("./index-
|
|
4654
|
+
var f, _, $, U, N, G, te, P;
|
|
4655
|
+
n.useXHR && import("./index-DPnt8V-r.js").then((Y) => {
|
|
4638
4656
|
const ce = Y.default;
|
|
4639
4657
|
i.value.use(ce, {
|
|
4640
4658
|
method: "POST",
|
|
@@ -4644,11 +4662,11 @@ const Ta = {
|
|
|
4644
4662
|
},
|
|
4645
4663
|
...n.XHRConfig
|
|
4646
4664
|
});
|
|
4647
|
-
}), (_ = (f = i.value) == null ? void 0 : f.opts) != null && _.restrictions && (s.value = T(i.value.opts.restrictions)), o && ((
|
|
4665
|
+
}), (_ = (f = i.value) == null ? void 0 : f.opts) != null && _.restrictions && (s.value = T(i.value.opts.restrictions)), o && ((G = (N = (U = ($ = i.value) == null ? void 0 : $.opts) == null ? void 0 : U.locale) == null ? void 0 : N.strings) != null && G.dropzoneText) && ((P = (te = o.value) == null ? void 0 : te.querySelectorAll('[data-uppy-element="dropzone"]>div>div>p')) == null || P.forEach((Y) => {
|
|
4648
4666
|
var ce, Et, It, Vt;
|
|
4649
4667
|
Y.innerHTML = (Vt = (It = (Et = (ce = i.value) == null ? void 0 : ce.opts) == null ? void 0 : Et.locale) == null ? void 0 : It.strings) == null ? void 0 : Vt.dropzoneText;
|
|
4650
4668
|
}));
|
|
4651
|
-
}),
|
|
4669
|
+
}), mt(() => {
|
|
4652
4670
|
l.value = !0, i.value && i.value.destroy();
|
|
4653
4671
|
});
|
|
4654
4672
|
function h() {
|
|
@@ -4677,14 +4695,14 @@ const Ta = {
|
|
|
4677
4695
|
maxFileSize: $,
|
|
4678
4696
|
minFileSize: U,
|
|
4679
4697
|
maxNumberOfFiles: N,
|
|
4680
|
-
minNumberOfFiles:
|
|
4698
|
+
minNumberOfFiles: G,
|
|
4681
4699
|
maxTotalFileSize: te
|
|
4682
4700
|
} = f, P = [];
|
|
4683
4701
|
if (_ && _.length) {
|
|
4684
4702
|
const Y = _.map((ce) => ce.replace(".", "")).join("، ");
|
|
4685
4703
|
P.push(`فقط فایلهای ${Y}`);
|
|
4686
4704
|
}
|
|
4687
|
-
return N && N > 1 && P.push(`امکان انتخاب حداکثر ${N} فایل`),
|
|
4705
|
+
return N && N > 1 && P.push(`امکان انتخاب حداکثر ${N} فایل`), G && P.push(`حداقل ${G} فایل نیاز است`), $ && P.push(`با حداکثر حجم ${C($)} برای هر فایل`), U && P.push(`با حداقل حجم ${C(U)} برای هر فایل`), te && P.push(`و مجموع حجم کل حداکثر ${C(te)}`), P.length ? P.join("، ") + " مجاز است." : "";
|
|
4688
4706
|
}
|
|
4689
4707
|
return (f, _) => i.value ? (m(), g("div", {
|
|
4690
4708
|
key: 0,
|
|
@@ -4692,19 +4710,19 @@ const Ta = {
|
|
|
4692
4710
|
ref_key: "inputEl",
|
|
4693
4711
|
ref: o
|
|
4694
4712
|
}, [
|
|
4695
|
-
Q(
|
|
4713
|
+
Q(Ke(qi), {
|
|
4696
4714
|
name: "uu" + t.name,
|
|
4697
4715
|
uppy: i.value
|
|
4698
4716
|
}, {
|
|
4699
4717
|
default: ie(() => [
|
|
4700
|
-
|
|
4701
|
-
Q(
|
|
4702
|
-
Q(
|
|
4718
|
+
O(f.$slots, "default", { uppy: i.value }, () => [
|
|
4719
|
+
Q(Ke(Gi), { class: "uppy-file-lists" }),
|
|
4720
|
+
Q(Ke(Hi), { class: "uppy-drop-zone" })
|
|
4703
4721
|
])
|
|
4704
4722
|
]),
|
|
4705
4723
|
_: 3
|
|
4706
4724
|
}, 8, ["name", "uppy"]),
|
|
4707
|
-
s.value ? (m(), g("div", Ta,
|
|
4725
|
+
s.value ? (m(), g("div", Ta, H(s.value), 1)) : j("", !0)
|
|
4708
4726
|
], 512)) : j("", !0);
|
|
4709
4727
|
}
|
|
4710
4728
|
};
|
|
@@ -4717,13 +4735,13 @@ export {
|
|
|
4717
4735
|
Ga as L,
|
|
4718
4736
|
Wa as M,
|
|
4719
4737
|
Ba as P,
|
|
4720
|
-
|
|
4738
|
+
Os as Q,
|
|
4721
4739
|
rl as R,
|
|
4722
4740
|
nl as S,
|
|
4723
4741
|
Qi as T,
|
|
4724
4742
|
tl as _,
|
|
4725
|
-
|
|
4726
|
-
|
|
4743
|
+
Da as a,
|
|
4744
|
+
Oa as b,
|
|
4727
4745
|
Ra as c,
|
|
4728
4746
|
ja as d,
|
|
4729
4747
|
sl as e,
|
|
@@ -4736,5 +4754,5 @@ export {
|
|
|
4736
4754
|
Ha as l,
|
|
4737
4755
|
Qa as m,
|
|
4738
4756
|
el as n,
|
|
4739
|
-
|
|
4757
|
+
Ge as o
|
|
4740
4758
|
};
|