wcz-layout 7.6.2 → 7.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DialogsContext-BIhId-r8.js.map +1 -1
- package/dist/components/core/navigation/NavigationList.d.ts +1 -6
- package/dist/components.js +16 -15
- package/dist/components.js.map +1 -1
- package/dist/contexts/DialogsContext.d.ts +1 -1
- package/dist/exports/hooks.d.ts +3 -3
- package/dist/exports/utils.d.ts +1 -1
- package/dist/hooks/useTheme.d.ts +1 -0
- package/dist/hooks.js +5 -5
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +338 -340
- package/dist/index.js.map +1 -1
- package/dist/models/Navigation.d.ts +7 -8
- package/dist/{queries-D-DV5lCw.js → queries-D8Ys1kLs.js} +370 -375
- package/dist/{queries-D-DV5lCw.js.map → queries-D8Ys1kLs.js.map} +1 -1
- package/dist/query.js +1 -1
- package/dist/{DialogsHooks-CZVdKmPv.js → useDialogs-CX8kuAuA.js} +3 -2
- package/dist/useDialogs-CX8kuAuA.js.map +1 -0
- package/dist/utils.js +14 -14
- package/package.json +9 -9
- package/skills/template-init.md +146 -0
- package/dist/DialogsHooks-CZVdKmPv.js.map +0 -1
- package/dist/lib/theme.d.ts +0 -1
- /package/dist/hooks/{DialogsHooks.d.ts → useDialogs.d.ts} +0 -0
- /package/dist/hooks/{FormHooks.d.ts → useForm.d.ts} +0 -0
|
@@ -102,7 +102,7 @@ var ee = {
|
|
|
102
102
|
exact: !1
|
|
103
103
|
})
|
|
104
104
|
})
|
|
105
|
-
}, E = /* @__PURE__ */ b(((e, t) => {
|
|
105
|
+
}, E = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
|
|
106
106
|
(function(t, n) {
|
|
107
107
|
typeof define == "function" && define.amd ? define([], n) : e === void 0 ? (n(), t.FileSaver = { exports: {} }.exports) : n();
|
|
108
108
|
})(e, function() {
|
|
@@ -167,9 +167,7 @@ var ee = {
|
|
|
167
167
|
});
|
|
168
168
|
a.saveAs = s.saveAs = s, t !== void 0 && (t.exports = s);
|
|
169
169
|
});
|
|
170
|
-
}));
|
|
171
|
-
//#endregion
|
|
172
|
-
//#region node_modules/tus-js-client/lib.esm/error.js
|
|
170
|
+
})))(), 1);
|
|
173
171
|
function D(e) {
|
|
174
172
|
"@babel/helpers - typeof";
|
|
175
173
|
return D = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
@@ -205,7 +203,7 @@ function ne(e, t) {
|
|
|
205
203
|
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
206
204
|
}
|
|
207
205
|
function re(e, t, n) {
|
|
208
|
-
return t =
|
|
206
|
+
return t = M(t), ie(e, le() ? Reflect.construct(t, n || [], M(e).constructor) : t.apply(e, n));
|
|
209
207
|
}
|
|
210
208
|
function ie(e, t) {
|
|
211
209
|
if (t && (D(t) === "object" || typeof t == "function")) return t;
|
|
@@ -222,7 +220,7 @@ function oe(e, t) {
|
|
|
222
220
|
value: e,
|
|
223
221
|
writable: !0,
|
|
224
222
|
configurable: !0
|
|
225
|
-
} }), Object.defineProperty(e, "prototype", { writable: !1 }), t &&
|
|
223
|
+
} }), Object.defineProperty(e, "prototype", { writable: !1 }), t && j(e, t);
|
|
226
224
|
}
|
|
227
225
|
function se(e) {
|
|
228
226
|
var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
@@ -234,14 +232,14 @@ function se(e) {
|
|
|
234
232
|
t.set(e, n);
|
|
235
233
|
}
|
|
236
234
|
function n() {
|
|
237
|
-
return ce(e, arguments,
|
|
235
|
+
return ce(e, arguments, M(this).constructor);
|
|
238
236
|
}
|
|
239
237
|
return n.prototype = Object.create(e.prototype, { constructor: {
|
|
240
238
|
value: n,
|
|
241
239
|
enumerable: !1,
|
|
242
240
|
writable: !0,
|
|
243
241
|
configurable: !0
|
|
244
|
-
} }),
|
|
242
|
+
} }), j(n, e);
|
|
245
243
|
}, se(e);
|
|
246
244
|
}
|
|
247
245
|
function ce(e, t, n) {
|
|
@@ -249,7 +247,7 @@ function ce(e, t, n) {
|
|
|
249
247
|
var r = [null];
|
|
250
248
|
r.push.apply(r, t);
|
|
251
249
|
var i = new (e.bind.apply(e, r))();
|
|
252
|
-
return n &&
|
|
250
|
+
return n && j(i, n.prototype), i;
|
|
253
251
|
}
|
|
254
252
|
function le() {
|
|
255
253
|
try {
|
|
@@ -266,17 +264,17 @@ function ue(e) {
|
|
|
266
264
|
return typeof e == "function";
|
|
267
265
|
}
|
|
268
266
|
}
|
|
269
|
-
function
|
|
270
|
-
return
|
|
267
|
+
function j(e, t) {
|
|
268
|
+
return j = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
271
269
|
return e.__proto__ = t, e;
|
|
272
|
-
},
|
|
270
|
+
}, j(e, t);
|
|
273
271
|
}
|
|
274
|
-
function
|
|
275
|
-
return
|
|
272
|
+
function M(e) {
|
|
273
|
+
return M = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
276
274
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
277
|
-
},
|
|
275
|
+
}, M(e);
|
|
278
276
|
}
|
|
279
|
-
var
|
|
277
|
+
var de = /* @__PURE__ */ function(e) {
|
|
280
278
|
function t(e) {
|
|
281
279
|
var n, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
|
|
282
280
|
if (ne(this, t), n = re(this, t, [e]), n.originalRequest = i, n.originalResponse = a, n.causingError = r, r != null && (e += `, caused by ${r.toString()}`), i != null) {
|
|
@@ -286,51 +284,51 @@ var fe = /* @__PURE__ */ function(e) {
|
|
|
286
284
|
return n.message = e, n;
|
|
287
285
|
}
|
|
288
286
|
return oe(t, e), k(t);
|
|
289
|
-
}(/* @__PURE__ */ se(Error)),
|
|
290
|
-
function
|
|
291
|
-
|
|
287
|
+
}(/* @__PURE__ */ se(Error)), fe = !1;
|
|
288
|
+
function N(e) {
|
|
289
|
+
fe && console.log(e);
|
|
292
290
|
}
|
|
293
291
|
//#endregion
|
|
294
292
|
//#region node_modules/tus-js-client/lib.esm/noopUrlStorage.js
|
|
295
|
-
function
|
|
293
|
+
function P(e) {
|
|
296
294
|
"@babel/helpers - typeof";
|
|
297
|
-
return
|
|
295
|
+
return P = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
298
296
|
return typeof e;
|
|
299
297
|
} : function(e) {
|
|
300
298
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
301
|
-
},
|
|
299
|
+
}, P(e);
|
|
302
300
|
}
|
|
303
|
-
function
|
|
301
|
+
function pe(e, t) {
|
|
304
302
|
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
305
303
|
}
|
|
306
|
-
function
|
|
304
|
+
function me(e, t) {
|
|
307
305
|
for (var n = 0; n < t.length; n++) {
|
|
308
306
|
var r = t[n];
|
|
309
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e,
|
|
307
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, ge(r.key), r);
|
|
310
308
|
}
|
|
311
309
|
}
|
|
312
|
-
function
|
|
313
|
-
return t &&
|
|
310
|
+
function he(e, t, n) {
|
|
311
|
+
return t && me(e.prototype, t), n && me(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
314
312
|
}
|
|
315
|
-
function
|
|
316
|
-
var t =
|
|
317
|
-
return
|
|
313
|
+
function ge(e) {
|
|
314
|
+
var t = _e(e, "string");
|
|
315
|
+
return P(t) == "symbol" ? t : t + "";
|
|
318
316
|
}
|
|
319
|
-
function
|
|
320
|
-
if (
|
|
317
|
+
function _e(e, t) {
|
|
318
|
+
if (P(e) != "object" || !e) return e;
|
|
321
319
|
var n = e[Symbol.toPrimitive];
|
|
322
320
|
if (n !== void 0) {
|
|
323
321
|
var r = n.call(e, t || "default");
|
|
324
|
-
if (
|
|
322
|
+
if (P(r) != "object") return r;
|
|
325
323
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
326
324
|
}
|
|
327
325
|
return (t === "string" ? String : Number)(e);
|
|
328
326
|
}
|
|
329
|
-
var
|
|
327
|
+
var ve = /* @__PURE__ */ function() {
|
|
330
328
|
function e() {
|
|
331
|
-
|
|
329
|
+
pe(this, e);
|
|
332
330
|
}
|
|
333
|
-
return
|
|
331
|
+
return he(e, [
|
|
334
332
|
{
|
|
335
333
|
key: "listAllUploads",
|
|
336
334
|
value: function() {
|
|
@@ -356,97 +354,97 @@ var be = /* @__PURE__ */ function() {
|
|
|
356
354
|
}
|
|
357
355
|
}
|
|
358
356
|
]);
|
|
359
|
-
}(),
|
|
357
|
+
}(), ye = "3.7.8", be = ye, F = typeof Buffer == "function", xe = typeof TextDecoder == "function" ? new TextDecoder() : void 0, Se = typeof TextEncoder == "function" ? new TextEncoder() : void 0, I = Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="), Ce = ((e) => {
|
|
360
358
|
let t = {};
|
|
361
359
|
return e.forEach((e, n) => t[e] = n), t;
|
|
362
|
-
})(
|
|
360
|
+
})(I), we = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, L = String.fromCharCode.bind(String), Te = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (e) => new Uint8Array(Array.prototype.slice.call(e, 0)), Ee = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "_"), De = (e) => e.replace(/[^A-Za-z0-9\+\/]/g, ""), Oe = (e) => {
|
|
363
361
|
let t, n, r, i, a = "", o = e.length % 3;
|
|
364
362
|
for (let o = 0; o < e.length;) {
|
|
365
363
|
if ((n = e.charCodeAt(o++)) > 255 || (r = e.charCodeAt(o++)) > 255 || (i = e.charCodeAt(o++)) > 255) throw TypeError("invalid character found");
|
|
366
|
-
t = n << 16 | r << 8 | i, a +=
|
|
364
|
+
t = n << 16 | r << 8 | i, a += I[t >> 18 & 63] + I[t >> 12 & 63] + I[t >> 6 & 63] + I[t & 63];
|
|
367
365
|
}
|
|
368
366
|
return o ? a.slice(0, o - 3) + "===".substring(o) : a;
|
|
369
|
-
},
|
|
367
|
+
}, ke = typeof btoa == "function" ? (e) => btoa(e) : F ? (e) => Buffer.from(e, "binary").toString("base64") : Oe, Ae = F ? (e) => Buffer.from(e).toString("base64") : (e) => {
|
|
370
368
|
let t = 4096, n = [];
|
|
371
|
-
for (let r = 0, i = e.length; r < i; r += t) n.push(
|
|
372
|
-
return
|
|
373
|
-
},
|
|
369
|
+
for (let r = 0, i = e.length; r < i; r += t) n.push(L.apply(null, e.subarray(r, r + t)));
|
|
370
|
+
return ke(n.join(""));
|
|
371
|
+
}, je = (e, t = !1) => t ? Ee(Ae(e)) : Ae(e), Me = (e) => {
|
|
374
372
|
if (e.length < 2) {
|
|
375
373
|
var t = e.charCodeAt(0);
|
|
376
|
-
return t < 128 ? e : t < 2048 ?
|
|
374
|
+
return t < 128 ? e : t < 2048 ? L(192 | t >>> 6) + L(128 | t & 63) : L(224 | t >>> 12 & 15) + L(128 | t >>> 6 & 63) + L(128 | t & 63);
|
|
377
375
|
} else {
|
|
378
376
|
var t = 65536 + (e.charCodeAt(0) - 55296) * 1024 + (e.charCodeAt(1) - 56320);
|
|
379
|
-
return
|
|
377
|
+
return L(240 | t >>> 18 & 7) + L(128 | t >>> 12 & 63) + L(128 | t >>> 6 & 63) + L(128 | t & 63);
|
|
380
378
|
}
|
|
381
|
-
},
|
|
379
|
+
}, Ne = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, Pe = (e) => e.replace(Ne, Me), Fe = F ? (e) => Buffer.from(e, "utf8").toString("base64") : Se ? (e) => Ae(Se.encode(e)) : (e) => ke(Pe(e)), R = (e, t = !1) => t ? Ee(Fe(e)) : Fe(e), Ie = (e) => R(e, !0), Le = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g, Re = (e) => {
|
|
382
380
|
switch (e.length) {
|
|
383
381
|
case 4:
|
|
384
382
|
var t = ((7 & e.charCodeAt(0)) << 18 | (63 & e.charCodeAt(1)) << 12 | (63 & e.charCodeAt(2)) << 6 | 63 & e.charCodeAt(3)) - 65536;
|
|
385
|
-
return
|
|
386
|
-
case 3: return
|
|
387
|
-
default: return
|
|
383
|
+
return L((t >>> 10) + 55296) + L((t & 1023) + 56320);
|
|
384
|
+
case 3: return L((15 & e.charCodeAt(0)) << 12 | (63 & e.charCodeAt(1)) << 6 | 63 & e.charCodeAt(2));
|
|
385
|
+
default: return L((31 & e.charCodeAt(0)) << 6 | 63 & e.charCodeAt(1));
|
|
388
386
|
}
|
|
389
|
-
},
|
|
390
|
-
if (e = e.replace(/\s+/g, ""), !
|
|
387
|
+
}, ze = (e) => e.replace(Le, Re), Be = (e) => {
|
|
388
|
+
if (e = e.replace(/\s+/g, ""), !we.test(e)) throw TypeError("malformed base64.");
|
|
391
389
|
e += "==".slice(2 - (e.length & 3));
|
|
392
390
|
let t, n, r, i = [];
|
|
393
|
-
for (let a = 0; a < e.length;) t =
|
|
391
|
+
for (let a = 0; a < e.length;) t = Ce[e.charAt(a++)] << 18 | Ce[e.charAt(a++)] << 12 | (n = Ce[e.charAt(a++)]) << 6 | (r = Ce[e.charAt(a++)]), n === 64 ? i.push(L(t >> 16 & 255)) : r === 64 ? i.push(L(t >> 16 & 255, t >> 8 & 255)) : i.push(L(t >> 16 & 255, t >> 8 & 255, t & 255));
|
|
394
392
|
return i.join("");
|
|
395
|
-
},
|
|
393
|
+
}, Ve = typeof atob == "function" ? (e) => atob(De(e)) : F ? (e) => Buffer.from(e, "base64").toString("binary") : Be, He = F ? (e) => Te(Buffer.from(e, "base64")) : (e) => Te(Ve(e).split("").map((e) => e.charCodeAt(0))), Ue = (e) => He(Ge(e)), We = F ? (e) => Buffer.from(e, "base64").toString("utf8") : xe ? (e) => xe.decode(He(e)) : (e) => ze(Ve(e)), Ge = (e) => De(e.replace(/[-_]/g, (e) => e == "-" ? "+" : "/")), Ke = (e) => We(Ge(e)), qe = (e) => {
|
|
396
394
|
if (typeof e != "string") return !1;
|
|
397
395
|
let t = e.replace(/\s+/g, "").replace(/={0,2}$/, "");
|
|
398
396
|
return !/[^\s0-9a-zA-Z\+/]/.test(t) || !/[^\s0-9a-zA-Z\-_]/.test(t);
|
|
399
|
-
},
|
|
397
|
+
}, Je = (e) => ({
|
|
400
398
|
value: e,
|
|
401
399
|
enumerable: !1,
|
|
402
400
|
writable: !0,
|
|
403
401
|
configurable: !0
|
|
404
|
-
}),
|
|
405
|
-
let e = (e, t) => Object.defineProperty(String.prototype, e,
|
|
402
|
+
}), Ye = function() {
|
|
403
|
+
let e = (e, t) => Object.defineProperty(String.prototype, e, Je(t));
|
|
406
404
|
e("fromBase64", function() {
|
|
407
|
-
return
|
|
405
|
+
return Ke(this);
|
|
408
406
|
}), e("toBase64", function(e) {
|
|
409
|
-
return
|
|
407
|
+
return R(this, e);
|
|
410
408
|
}), e("toBase64URI", function() {
|
|
411
|
-
return
|
|
409
|
+
return R(this, !0);
|
|
412
410
|
}), e("toBase64URL", function() {
|
|
413
|
-
return
|
|
411
|
+
return R(this, !0);
|
|
414
412
|
}), e("toUint8Array", function() {
|
|
415
|
-
return
|
|
413
|
+
return Ue(this);
|
|
416
414
|
});
|
|
417
|
-
},
|
|
418
|
-
let e = (e, t) => Object.defineProperty(Uint8Array.prototype, e,
|
|
415
|
+
}, Xe = function() {
|
|
416
|
+
let e = (e, t) => Object.defineProperty(Uint8Array.prototype, e, Je(t));
|
|
419
417
|
e("toBase64", function(e) {
|
|
420
|
-
return
|
|
418
|
+
return je(this, e);
|
|
421
419
|
}), e("toBase64URI", function() {
|
|
422
|
-
return
|
|
420
|
+
return je(this, !0);
|
|
423
421
|
}), e("toBase64URL", function() {
|
|
424
|
-
return
|
|
422
|
+
return je(this, !0);
|
|
425
423
|
});
|
|
426
|
-
},
|
|
427
|
-
version:
|
|
428
|
-
VERSION:
|
|
429
|
-
atob:
|
|
430
|
-
atobPolyfill:
|
|
431
|
-
btoa:
|
|
432
|
-
btoaPolyfill:
|
|
433
|
-
fromBase64:
|
|
434
|
-
toBase64:
|
|
435
|
-
encode:
|
|
436
|
-
encodeURI:
|
|
437
|
-
encodeURL:
|
|
438
|
-
utob:
|
|
439
|
-
btou:
|
|
440
|
-
decode:
|
|
441
|
-
isValid:
|
|
442
|
-
fromUint8Array:
|
|
443
|
-
toUint8Array:
|
|
444
|
-
extendString:
|
|
445
|
-
extendUint8Array:
|
|
424
|
+
}, Ze = {
|
|
425
|
+
version: ye,
|
|
426
|
+
VERSION: be,
|
|
427
|
+
atob: Ve,
|
|
428
|
+
atobPolyfill: Be,
|
|
429
|
+
btoa: ke,
|
|
430
|
+
btoaPolyfill: Oe,
|
|
431
|
+
fromBase64: Ke,
|
|
432
|
+
toBase64: R,
|
|
433
|
+
encode: R,
|
|
434
|
+
encodeURI: Ie,
|
|
435
|
+
encodeURL: Ie,
|
|
436
|
+
utob: Pe,
|
|
437
|
+
btou: ze,
|
|
438
|
+
decode: Ke,
|
|
439
|
+
isValid: qe,
|
|
440
|
+
fromUint8Array: je,
|
|
441
|
+
toUint8Array: Ue,
|
|
442
|
+
extendString: Ye,
|
|
443
|
+
extendUint8Array: Xe,
|
|
446
444
|
extendBuiltins: () => {
|
|
447
|
-
|
|
445
|
+
Ye(), Xe();
|
|
448
446
|
}
|
|
449
|
-
},
|
|
447
|
+
}, Qe = /* @__PURE__ */ b(((e, t) => {
|
|
450
448
|
t.exports = function(e, t) {
|
|
451
449
|
if (t = t.split(":")[0], e = +e, !e) return !1;
|
|
452
450
|
switch (t) {
|
|
@@ -460,7 +458,7 @@ var be = /* @__PURE__ */ function() {
|
|
|
460
458
|
}
|
|
461
459
|
return e !== 0;
|
|
462
460
|
};
|
|
463
|
-
})),
|
|
461
|
+
})), $e = /* @__PURE__ */ b(((e) => {
|
|
464
462
|
var t = Object.prototype.hasOwnProperty, n;
|
|
465
463
|
function r(e) {
|
|
466
464
|
try {
|
|
@@ -493,8 +491,8 @@ var be = /* @__PURE__ */ function() {
|
|
|
493
491
|
return a.length ? r + a.join("&") : "";
|
|
494
492
|
}
|
|
495
493
|
e.stringify = o, e.parse = a;
|
|
496
|
-
})),
|
|
497
|
-
var n =
|
|
494
|
+
})), et = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
|
|
495
|
+
var n = Qe(), r = $e(), i = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/, a = /[\n\r\t]/g, o = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//, s = /:\d+$/, c = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i, l = /^[a-zA-Z]:/;
|
|
498
496
|
function u(e) {
|
|
499
497
|
return (e || "").toString().replace(i, "");
|
|
500
498
|
}
|
|
@@ -626,10 +624,8 @@ var be = /* @__PURE__ */ function() {
|
|
|
626
624
|
set: v,
|
|
627
625
|
toString: y
|
|
628
626
|
}, _.extractProtocol = h, _.location = p, _.trimLeft = u, _.qs = r, t.exports = _;
|
|
629
|
-
}));
|
|
630
|
-
|
|
631
|
-
//#region node_modules/tus-js-client/lib.esm/uuid.js
|
|
632
|
-
function it() {
|
|
627
|
+
})))());
|
|
628
|
+
function tt() {
|
|
633
629
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
634
630
|
var t = Math.random() * 16 | 0;
|
|
635
631
|
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
@@ -637,9 +633,8 @@ function it() {
|
|
|
637
633
|
}
|
|
638
634
|
//#endregion
|
|
639
635
|
//#region node_modules/tus-js-client/lib.esm/upload.js
|
|
640
|
-
|
|
641
|
-
function
|
|
642
|
-
ot = function() {
|
|
636
|
+
function nt() {
|
|
637
|
+
nt = function() {
|
|
643
638
|
return t;
|
|
644
639
|
};
|
|
645
640
|
var e, t = {}, n = Object.prototype, r = n.hasOwnProperty, i = Object.defineProperty || function(e, t, n) {
|
|
@@ -705,7 +700,7 @@ function ot() {
|
|
|
705
700
|
var c = d(e[i], e, a);
|
|
706
701
|
if (c.type !== "throw") {
|
|
707
702
|
var l = c.arg, u = l.value;
|
|
708
|
-
return u &&
|
|
703
|
+
return u && z(u) == "object" && r.call(u, "__await") ? t.resolve(u.__await).then(function(e) {
|
|
709
704
|
n("next", e, o, s);
|
|
710
705
|
}, function(e) {
|
|
711
706
|
n("throw", e, o, s);
|
|
@@ -797,7 +792,7 @@ function ot() {
|
|
|
797
792
|
return a.next = a;
|
|
798
793
|
}
|
|
799
794
|
}
|
|
800
|
-
throw TypeError(
|
|
795
|
+
throw TypeError(z(t) + " is not iterable");
|
|
801
796
|
}
|
|
802
797
|
return v.prototype = y, i(C, "constructor", {
|
|
803
798
|
value: y,
|
|
@@ -913,7 +908,7 @@ function ot() {
|
|
|
913
908
|
}
|
|
914
909
|
}, t;
|
|
915
910
|
}
|
|
916
|
-
function
|
|
911
|
+
function rt(e, t, n, r, i, a, o) {
|
|
917
912
|
try {
|
|
918
913
|
var s = e[a](o), c = s.value;
|
|
919
914
|
} catch (e) {
|
|
@@ -922,28 +917,28 @@ function st(e, t, n, r, i, a, o) {
|
|
|
922
917
|
}
|
|
923
918
|
s.done ? t(c) : Promise.resolve(c).then(r, i);
|
|
924
919
|
}
|
|
925
|
-
function
|
|
920
|
+
function it(e) {
|
|
926
921
|
return function() {
|
|
927
922
|
var t = this, n = arguments;
|
|
928
923
|
return new Promise(function(r, i) {
|
|
929
924
|
var a = e.apply(t, n);
|
|
930
925
|
function o(e) {
|
|
931
|
-
|
|
926
|
+
rt(a, r, i, o, s, "next", e);
|
|
932
927
|
}
|
|
933
928
|
function s(e) {
|
|
934
|
-
|
|
929
|
+
rt(a, r, i, o, s, "throw", e);
|
|
935
930
|
}
|
|
936
931
|
o(void 0);
|
|
937
932
|
});
|
|
938
933
|
};
|
|
939
934
|
}
|
|
940
|
-
function
|
|
941
|
-
return
|
|
935
|
+
function at(e, t) {
|
|
936
|
+
return ct(e) || st(e, t) || ut(e, t) || ot();
|
|
942
937
|
}
|
|
943
|
-
function
|
|
938
|
+
function ot() {
|
|
944
939
|
throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
945
940
|
}
|
|
946
|
-
function
|
|
941
|
+
function st(e, t) {
|
|
947
942
|
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
948
943
|
if (n != null) {
|
|
949
944
|
var r, i, a, o, s = [], c = !0, l = !1;
|
|
@@ -964,21 +959,21 @@ function dt(e, t) {
|
|
|
964
959
|
return s;
|
|
965
960
|
}
|
|
966
961
|
}
|
|
967
|
-
function
|
|
962
|
+
function ct(e) {
|
|
968
963
|
if (Array.isArray(e)) return e;
|
|
969
964
|
}
|
|
970
|
-
function
|
|
965
|
+
function z(e) {
|
|
971
966
|
"@babel/helpers - typeof";
|
|
972
|
-
return
|
|
967
|
+
return z = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
973
968
|
return typeof e;
|
|
974
969
|
} : function(e) {
|
|
975
970
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
976
|
-
},
|
|
971
|
+
}, z(e);
|
|
977
972
|
}
|
|
978
|
-
function
|
|
973
|
+
function lt(e, t) {
|
|
979
974
|
var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
980
975
|
if (!n) {
|
|
981
|
-
if (Array.isArray(e) || (n =
|
|
976
|
+
if (Array.isArray(e) || (n = ut(e)) || t && e && typeof e.length == "number") {
|
|
982
977
|
n && (e = n);
|
|
983
978
|
var r = 0, i = function() {};
|
|
984
979
|
return {
|
|
@@ -1018,20 +1013,20 @@ function pt(e, t) {
|
|
|
1018
1013
|
}
|
|
1019
1014
|
};
|
|
1020
1015
|
}
|
|
1021
|
-
function
|
|
1016
|
+
function ut(e, t) {
|
|
1022
1017
|
if (e) {
|
|
1023
|
-
if (typeof e == "string") return
|
|
1018
|
+
if (typeof e == "string") return dt(e, t);
|
|
1024
1019
|
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
1025
1020
|
if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
|
|
1026
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
1021
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return dt(e, t);
|
|
1027
1022
|
}
|
|
1028
1023
|
}
|
|
1029
|
-
function
|
|
1024
|
+
function dt(e, t) {
|
|
1030
1025
|
(t == null || t > e.length) && (t = e.length);
|
|
1031
1026
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
1032
1027
|
return r;
|
|
1033
1028
|
}
|
|
1034
|
-
function
|
|
1029
|
+
function ft(e, t) {
|
|
1035
1030
|
var n = Object.keys(e);
|
|
1036
1031
|
if (Object.getOwnPropertySymbols) {
|
|
1037
1032
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -1041,52 +1036,52 @@ function gt(e, t) {
|
|
|
1041
1036
|
}
|
|
1042
1037
|
return n;
|
|
1043
1038
|
}
|
|
1044
|
-
function
|
|
1039
|
+
function B(e) {
|
|
1045
1040
|
for (var t = 1; t < arguments.length; t++) {
|
|
1046
1041
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
1047
|
-
t % 2 ?
|
|
1048
|
-
|
|
1049
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
1042
|
+
t % 2 ? ft(Object(n), !0).forEach(function(t) {
|
|
1043
|
+
pt(e, t, n[t]);
|
|
1044
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ft(Object(n)).forEach(function(t) {
|
|
1050
1045
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
1051
1046
|
});
|
|
1052
1047
|
}
|
|
1053
1048
|
return e;
|
|
1054
1049
|
}
|
|
1055
|
-
function
|
|
1056
|
-
return t =
|
|
1050
|
+
function pt(e, t, n) {
|
|
1051
|
+
return t = _t(t), t in e ? Object.defineProperty(e, t, {
|
|
1057
1052
|
value: n,
|
|
1058
1053
|
enumerable: !0,
|
|
1059
1054
|
configurable: !0,
|
|
1060
1055
|
writable: !0
|
|
1061
1056
|
}) : e[t] = n, e;
|
|
1062
1057
|
}
|
|
1063
|
-
function
|
|
1058
|
+
function mt(e, t) {
|
|
1064
1059
|
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
1065
1060
|
}
|
|
1066
|
-
function
|
|
1061
|
+
function ht(e, t) {
|
|
1067
1062
|
for (var n = 0; n < t.length; n++) {
|
|
1068
1063
|
var r = t[n];
|
|
1069
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e,
|
|
1064
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, _t(r.key), r);
|
|
1070
1065
|
}
|
|
1071
1066
|
}
|
|
1072
|
-
function
|
|
1073
|
-
return t &&
|
|
1067
|
+
function gt(e, t, n) {
|
|
1068
|
+
return t && ht(e.prototype, t), n && ht(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
1074
1069
|
}
|
|
1075
|
-
function
|
|
1076
|
-
var t =
|
|
1077
|
-
return
|
|
1070
|
+
function _t(e) {
|
|
1071
|
+
var t = vt(e, "string");
|
|
1072
|
+
return z(t) == "symbol" ? t : t + "";
|
|
1078
1073
|
}
|
|
1079
|
-
function
|
|
1080
|
-
if (
|
|
1074
|
+
function vt(e, t) {
|
|
1075
|
+
if (z(e) != "object" || !e) return e;
|
|
1081
1076
|
var n = e[Symbol.toPrimitive];
|
|
1082
1077
|
if (n !== void 0) {
|
|
1083
1078
|
var r = n.call(e, t || "default");
|
|
1084
|
-
if (
|
|
1079
|
+
if (z(r) != "object") return r;
|
|
1085
1080
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
1086
1081
|
}
|
|
1087
1082
|
return (t === "string" ? String : Number)(e);
|
|
1088
1083
|
}
|
|
1089
|
-
var
|
|
1084
|
+
var yt = "tus-v1", bt = "ietf-draft-03", V = "ietf-draft-05", xt = {
|
|
1090
1085
|
endpoint: null,
|
|
1091
1086
|
uploadUrl: null,
|
|
1092
1087
|
metadata: {},
|
|
@@ -1103,7 +1098,7 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1103
1098
|
addRequestId: !1,
|
|
1104
1099
|
onBeforeRequest: null,
|
|
1105
1100
|
onAfterResponse: null,
|
|
1106
|
-
onShouldRetry:
|
|
1101
|
+
onShouldRetry: kt,
|
|
1107
1102
|
chunkSize: Infinity,
|
|
1108
1103
|
retryDelays: [
|
|
1109
1104
|
0,
|
|
@@ -1120,12 +1115,12 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1120
1115
|
urlStorage: null,
|
|
1121
1116
|
fileReader: null,
|
|
1122
1117
|
httpStack: null,
|
|
1123
|
-
protocol:
|
|
1124
|
-
},
|
|
1118
|
+
protocol: yt
|
|
1119
|
+
}, St = /* @__PURE__ */ function() {
|
|
1125
1120
|
function e(t, n) {
|
|
1126
|
-
|
|
1121
|
+
mt(this, e), "resume" in n && console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."), this.options = n, this.options.chunkSize = Number(this.options.chunkSize), this._urlStorage = this.options.urlStorage, this.file = t, this.url = null, this._req = null, this._fingerprint = null, this._urlStorageKey = null, this._offset = null, this._aborted = !1, this._size = null, this._source = null, this._retryAttempt = 0, this._retryTimeout = null, this._offsetBeforeRetry = 0, this._parallelUploads = null, this._parallelUploadUrls = null;
|
|
1127
1122
|
}
|
|
1128
|
-
return
|
|
1123
|
+
return gt(e, [
|
|
1129
1124
|
{
|
|
1130
1125
|
key: "findPreviousUploads",
|
|
1131
1126
|
value: function() {
|
|
@@ -1150,9 +1145,9 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1150
1145
|
return;
|
|
1151
1146
|
}
|
|
1152
1147
|
if (![
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1148
|
+
yt,
|
|
1149
|
+
bt,
|
|
1150
|
+
V
|
|
1156
1151
|
].includes(this.options.protocol)) {
|
|
1157
1152
|
this._emitError(Error(`tus: unsupported protocol ${this.options.protocol}`));
|
|
1158
1153
|
return;
|
|
@@ -1188,7 +1183,7 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1188
1183
|
}
|
|
1189
1184
|
}
|
|
1190
1185
|
this.options.fingerprint(t, this.options).then(function(n) {
|
|
1191
|
-
return
|
|
1186
|
+
return N(n == null ? "No fingerprint was calculated meaning that the upload cannot be stored in the URL storage." : `Calculated fingerprint: ${n}`), e._fingerprint = n, e._source ? e._source : e.options.fileReader.openFile(t, e.options.chunkSize);
|
|
1192
1187
|
}).then(function(t) {
|
|
1193
1188
|
if (e._source = t, e.options.uploadLengthDeferred) e._size = null;
|
|
1194
1189
|
else if (e.options.uploadSize != null) {
|
|
@@ -1211,7 +1206,7 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1211
1206
|
value: function() {
|
|
1212
1207
|
var t = this, n = this._size, r = 0;
|
|
1213
1208
|
this._parallelUploads = [];
|
|
1214
|
-
var i = this._parallelUploadUrls == null ? this.options.parallelUploads : this._parallelUploadUrls.length, a = this.options.parallelUploadBoundaries ??
|
|
1209
|
+
var i = this._parallelUploadUrls == null ? this.options.parallelUploads : this._parallelUploadUrls.length, a = this.options.parallelUploadBoundaries ?? jt(this._source.size, i);
|
|
1215
1210
|
this._parallelUploadUrls && a.forEach(function(e, n) {
|
|
1216
1211
|
e.uploadUrl = t._parallelUploadUrls[n] || null;
|
|
1217
1212
|
}), this._parallelUploadUrls = Array(a.length);
|
|
@@ -1220,14 +1215,14 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1220
1215
|
return t._source.slice(i.start, i.end).then(function(c) {
|
|
1221
1216
|
var l = c.value;
|
|
1222
1217
|
return new Promise(function(c, u) {
|
|
1223
|
-
var d = new e(l,
|
|
1218
|
+
var d = new e(l, B(B({}, t.options), {}, {
|
|
1224
1219
|
uploadUrl: i.uploadUrl || null,
|
|
1225
1220
|
storeFingerprintForResuming: !1,
|
|
1226
1221
|
removeFingerprintOnSuccess: !1,
|
|
1227
1222
|
parallelUploads: 1,
|
|
1228
1223
|
parallelUploadBoundaries: null,
|
|
1229
1224
|
metadata: t.options.metadataForPartialUploads,
|
|
1230
|
-
headers:
|
|
1225
|
+
headers: B(B({}, t.options.headers), {}, { "Upload-Concat": "partial" }),
|
|
1231
1226
|
onSuccess: c,
|
|
1232
1227
|
onError: u,
|
|
1233
1228
|
onProgress: function(e) {
|
|
@@ -1245,10 +1240,10 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1245
1240
|
}), s;
|
|
1246
1241
|
Promise.all(o).then(function() {
|
|
1247
1242
|
s = t._openRequest("POST", t.options.endpoint), s.setHeader("Upload-Concat", `final;${t._parallelUploadUrls.join(" ")}`);
|
|
1248
|
-
var e =
|
|
1243
|
+
var e = Ct(t.options.metadata);
|
|
1249
1244
|
return e !== "" && s.setHeader("Upload-Metadata", e), t._sendRequest(s, null);
|
|
1250
1245
|
}).then(function(e) {
|
|
1251
|
-
if (!
|
|
1246
|
+
if (!H(e.getStatus(), 200)) {
|
|
1252
1247
|
t._emitHttpError(s, e, "tus: unexpected response while creating upload");
|
|
1253
1248
|
return;
|
|
1254
1249
|
}
|
|
@@ -1257,7 +1252,7 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1257
1252
|
t._emitHttpError(s, e, "tus: invalid or missing Location header");
|
|
1258
1253
|
return;
|
|
1259
1254
|
}
|
|
1260
|
-
t.url =
|
|
1255
|
+
t.url = At(t.options.endpoint, n), N(`Created upload at ${t.url}`), t._emitSuccess(e);
|
|
1261
1256
|
}).catch(function(e) {
|
|
1262
1257
|
t._emitError(e);
|
|
1263
1258
|
});
|
|
@@ -1267,14 +1262,14 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1267
1262
|
key: "_startSingleUpload",
|
|
1268
1263
|
value: function() {
|
|
1269
1264
|
if (this._aborted = !1, this.url != null) {
|
|
1270
|
-
|
|
1265
|
+
N(`Resuming upload from previous URL: ${this.url}`), this._resumeUpload();
|
|
1271
1266
|
return;
|
|
1272
1267
|
}
|
|
1273
1268
|
if (this.options.uploadUrl != null) {
|
|
1274
|
-
|
|
1269
|
+
N(`Resuming upload from provided URL: ${this.options.uploadUrl}`), this.url = this.options.uploadUrl, this._resumeUpload();
|
|
1275
1270
|
return;
|
|
1276
1271
|
}
|
|
1277
|
-
|
|
1272
|
+
N("Creating a new upload"), this._createUpload();
|
|
1278
1273
|
}
|
|
1279
1274
|
},
|
|
1280
1275
|
{
|
|
@@ -1282,7 +1277,7 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1282
1277
|
value: function(t) {
|
|
1283
1278
|
var n = this;
|
|
1284
1279
|
if (this._parallelUploads != null) {
|
|
1285
|
-
var r =
|
|
1280
|
+
var r = lt(this._parallelUploads), i;
|
|
1286
1281
|
try {
|
|
1287
1282
|
for (r.s(); !(i = r.n()).done;) i.value.abort(t);
|
|
1288
1283
|
} catch (e) {
|
|
@@ -1299,7 +1294,7 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1299
1294
|
{
|
|
1300
1295
|
key: "_emitHttpError",
|
|
1301
1296
|
value: function(e, t, n, r) {
|
|
1302
|
-
this._emitError(new
|
|
1297
|
+
this._emitError(new de(n, r, e, t));
|
|
1303
1298
|
}
|
|
1304
1299
|
},
|
|
1305
1300
|
{
|
|
@@ -1307,7 +1302,7 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1307
1302
|
value: function(e) {
|
|
1308
1303
|
var t = this;
|
|
1309
1304
|
if (!this._aborted) {
|
|
1310
|
-
if (this.options.retryDelays != null && (this._offset != null && this._offset > this._offsetBeforeRetry && (this._retryAttempt = 0),
|
|
1305
|
+
if (this.options.retryDelays != null && (this._offset != null && this._offset > this._offsetBeforeRetry && (this._retryAttempt = 0), Ot(e, this._retryAttempt, this.options))) {
|
|
1311
1306
|
var n = this.options.retryDelays[this._retryAttempt++];
|
|
1312
1307
|
this._offsetBeforeRetry = this._offset, this._retryTimeout = setTimeout(function() {
|
|
1313
1308
|
t.start();
|
|
@@ -1347,11 +1342,11 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1347
1342
|
}
|
|
1348
1343
|
var t = this._openRequest("POST", this.options.endpoint);
|
|
1349
1344
|
this.options.uploadLengthDeferred ? t.setHeader("Upload-Defer-Length", "1") : t.setHeader("Upload-Length", `${this._size}`);
|
|
1350
|
-
var n =
|
|
1345
|
+
var n = Ct(this.options.metadata);
|
|
1351
1346
|
n !== "" && t.setHeader("Upload-Metadata", n);
|
|
1352
1347
|
var r;
|
|
1353
|
-
this.options.uploadDataDuringCreation && !this.options.uploadLengthDeferred ? (this._offset = 0, r = this._addChunkToRequest(t)) : ((this.options.protocol ===
|
|
1354
|
-
if (!
|
|
1348
|
+
this.options.uploadDataDuringCreation && !this.options.uploadLengthDeferred ? (this._offset = 0, r = this._addChunkToRequest(t)) : ((this.options.protocol === bt || this.options.protocol === V) && t.setHeader("Upload-Complete", "?0"), r = this._sendRequest(t, null)), r.then(function(n) {
|
|
1349
|
+
if (!H(n.getStatus(), 200)) {
|
|
1355
1350
|
e._emitHttpError(t, n, "tus: unexpected response while creating upload");
|
|
1356
1351
|
return;
|
|
1357
1352
|
}
|
|
@@ -1360,7 +1355,7 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1360
1355
|
e._emitHttpError(t, n, "tus: invalid or missing Location header");
|
|
1361
1356
|
return;
|
|
1362
1357
|
}
|
|
1363
|
-
if (e.url =
|
|
1358
|
+
if (e.url = At(e.options.endpoint, r), N(`Created upload at ${e.url}`), typeof e.options.onUploadUrlAvailable == "function" && e.options.onUploadUrlAvailable(), e._size === 0) {
|
|
1364
1359
|
e._emitSuccess(n), e._source.close();
|
|
1365
1360
|
return;
|
|
1366
1361
|
}
|
|
@@ -1378,12 +1373,12 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1378
1373
|
var e = this, t = this._openRequest("HEAD", this.url);
|
|
1379
1374
|
this._sendRequest(t, null).then(function(n) {
|
|
1380
1375
|
var r = n.getStatus();
|
|
1381
|
-
if (!
|
|
1376
|
+
if (!H(r, 200)) {
|
|
1382
1377
|
if (r === 423) {
|
|
1383
1378
|
e._emitHttpError(t, n, "tus: upload is currently locked; retry later");
|
|
1384
1379
|
return;
|
|
1385
1380
|
}
|
|
1386
|
-
if (
|
|
1381
|
+
if (H(r, 400) && e._removeFromUrlStorage(), !e.options.endpoint) {
|
|
1387
1382
|
e._emitHttpError(t, n, "tus: unable to resume upload (new upload cannot be created without an endpoint)");
|
|
1388
1383
|
return;
|
|
1389
1384
|
}
|
|
@@ -1396,7 +1391,7 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1396
1391
|
return;
|
|
1397
1392
|
}
|
|
1398
1393
|
var a = Number.parseInt(n.getHeader("Upload-Length"), 10);
|
|
1399
|
-
if (Number.isNaN(a) && !e.options.uploadLengthDeferred && e.options.protocol ===
|
|
1394
|
+
if (Number.isNaN(a) && !e.options.uploadLengthDeferred && e.options.protocol === yt) {
|
|
1400
1395
|
e._emitHttpError(t, n, "tus: invalid or missing length value");
|
|
1401
1396
|
return;
|
|
1402
1397
|
}
|
|
@@ -1419,7 +1414,7 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1419
1414
|
if (!this._aborted) {
|
|
1420
1415
|
var t;
|
|
1421
1416
|
this.options.overridePatchMethod ? (t = this._openRequest("POST", this.url), t.setHeader("X-HTTP-Method-Override", "PATCH")) : t = this._openRequest("PATCH", this.url), t.setHeader("Upload-Offset", `${this._offset}`), this._addChunkToRequest(t).then(function(n) {
|
|
1422
|
-
if (!
|
|
1417
|
+
if (!H(n.getStatus(), 200)) {
|
|
1423
1418
|
e._emitHttpError(t, n, "tus: unexpected response while uploading chunk");
|
|
1424
1419
|
return;
|
|
1425
1420
|
}
|
|
@@ -1436,11 +1431,11 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1436
1431
|
var t = this, n = this._offset, r = this._offset + this.options.chunkSize;
|
|
1437
1432
|
return e.setProgressHandler(function(e) {
|
|
1438
1433
|
t._emitProgress(n + e, t._size);
|
|
1439
|
-
}), this.options.protocol ===
|
|
1434
|
+
}), this.options.protocol === yt ? e.setHeader("Content-Type", "application/offset+octet-stream") : this.options.protocol === V && e.setHeader("Content-Type", "application/partial-upload"), (r === Infinity || r > this._size) && !this.options.uploadLengthDeferred && (r = this._size), this._source.slice(n, r).then(function(n) {
|
|
1440
1435
|
var r = n.value, i = n.done, a = r != null && r.size ? r.size : 0;
|
|
1441
1436
|
t.options.uploadLengthDeferred && i && (t._size = t._offset + a, e.setHeader("Upload-Length", `${t._size}`));
|
|
1442
1437
|
var o = t._offset + a;
|
|
1443
|
-
return !t.options.uploadLengthDeferred && i && o !== t._size ? Promise.reject(Error(`upload was configured with a size of ${t._size} bytes, but the source is done after ${o} bytes`)) : r === null ? t._sendRequest(e) : ((t.options.protocol ===
|
|
1438
|
+
return !t.options.uploadLengthDeferred && i && o !== t._size ? Promise.reject(Error(`upload was configured with a size of ${t._size} bytes, but the source is done after ${o} bytes`)) : r === null ? t._sendRequest(e) : ((t.options.protocol === bt || t.options.protocol === V) && e.setHeader("Upload-Complete", i ? "?1" : "?0"), t._emitProgress(t._offset, t._size), t._sendRequest(e, r));
|
|
1444
1439
|
});
|
|
1445
1440
|
}
|
|
1446
1441
|
},
|
|
@@ -1462,7 +1457,7 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1462
1457
|
{
|
|
1463
1458
|
key: "_openRequest",
|
|
1464
1459
|
value: function(e, t) {
|
|
1465
|
-
var n =
|
|
1460
|
+
var n = wt(e, t, this.options);
|
|
1466
1461
|
return this._req = n, n;
|
|
1467
1462
|
}
|
|
1468
1463
|
},
|
|
@@ -1493,18 +1488,18 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1493
1488
|
{
|
|
1494
1489
|
key: "_sendRequest",
|
|
1495
1490
|
value: function(e) {
|
|
1496
|
-
return
|
|
1491
|
+
return Tt(e, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, this.options);
|
|
1497
1492
|
}
|
|
1498
1493
|
}
|
|
1499
1494
|
], [{
|
|
1500
1495
|
key: "terminate",
|
|
1501
1496
|
value: function(t) {
|
|
1502
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r =
|
|
1503
|
-
return
|
|
1504
|
-
if (e.getStatus() !== 204) throw new
|
|
1497
|
+
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = wt("DELETE", t, n);
|
|
1498
|
+
return Tt(r, null, n).then(function(e) {
|
|
1499
|
+
if (e.getStatus() !== 204) throw new de("tus: unexpected response while terminating upload", null, r, e);
|
|
1505
1500
|
}).catch(function(i) {
|
|
1506
|
-
if (i instanceof
|
|
1507
|
-
var a = n.retryDelays[0], o = n.retryDelays.slice(1), s =
|
|
1501
|
+
if (i instanceof de || (i = new de("tus: failed to terminate upload", i, r, null)), !Ot(i, 0, n)) throw i;
|
|
1502
|
+
var a = n.retryDelays[0], o = n.retryDelays.slice(1), s = B(B({}, n), {}, { retryDelays: o });
|
|
1508
1503
|
return new Promise(function(e) {
|
|
1509
1504
|
return setTimeout(e, a);
|
|
1510
1505
|
}).then(function() {
|
|
@@ -1514,35 +1509,35 @@ var Ct = "tus-v1", wt = "ietf-draft-03", R = "ietf-draft-05", Tt = {
|
|
|
1514
1509
|
}
|
|
1515
1510
|
}]);
|
|
1516
1511
|
}();
|
|
1517
|
-
function
|
|
1512
|
+
function Ct(e) {
|
|
1518
1513
|
return Object.entries(e).map(function(e) {
|
|
1519
|
-
var t =
|
|
1520
|
-
return `${n} ${
|
|
1514
|
+
var t = at(e, 2), n = t[0], r = t[1];
|
|
1515
|
+
return `${n} ${Ze.encode(String(r))}`;
|
|
1521
1516
|
}).join(",");
|
|
1522
1517
|
}
|
|
1523
|
-
function
|
|
1518
|
+
function H(e, t) {
|
|
1524
1519
|
return e >= t && e < t + 100;
|
|
1525
1520
|
}
|
|
1526
|
-
function
|
|
1521
|
+
function wt(e, t, n) {
|
|
1527
1522
|
var r = n.httpStack.createRequest(e, t);
|
|
1528
|
-
n.protocol ===
|
|
1523
|
+
n.protocol === bt ? r.setHeader("Upload-Draft-Interop-Version", "5") : n.protocol === V ? r.setHeader("Upload-Draft-Interop-Version", "6") : r.setHeader("Tus-Resumable", "1.0.0");
|
|
1529
1524
|
for (var i = n.headers || {}, a = 0, o = Object.entries(i); a < o.length; a++) {
|
|
1530
|
-
var s =
|
|
1525
|
+
var s = at(o[a], 2), c = s[0], l = s[1];
|
|
1531
1526
|
r.setHeader(c, l);
|
|
1532
1527
|
}
|
|
1533
1528
|
if (n.addRequestId) {
|
|
1534
|
-
var u =
|
|
1529
|
+
var u = tt();
|
|
1535
1530
|
r.setHeader("X-Request-ID", u);
|
|
1536
1531
|
}
|
|
1537
1532
|
return r;
|
|
1538
1533
|
}
|
|
1539
|
-
function
|
|
1540
|
-
return
|
|
1534
|
+
function Tt(e, t, n) {
|
|
1535
|
+
return Et.apply(this, arguments);
|
|
1541
1536
|
}
|
|
1542
|
-
function
|
|
1543
|
-
return
|
|
1537
|
+
function Et() {
|
|
1538
|
+
return Et = it(/* @__PURE__ */ nt().mark(function e(t, n, r) {
|
|
1544
1539
|
var i;
|
|
1545
|
-
return
|
|
1540
|
+
return nt().wrap(function(e) {
|
|
1546
1541
|
for (;;) switch (e.prev = e.next) {
|
|
1547
1542
|
case 0:
|
|
1548
1543
|
if (typeof r.onBeforeRequest != "function") {
|
|
@@ -1562,38 +1557,38 @@ function At() {
|
|
|
1562
1557
|
case "end": return e.stop();
|
|
1563
1558
|
}
|
|
1564
1559
|
}, e);
|
|
1565
|
-
})),
|
|
1560
|
+
})), Et.apply(this, arguments);
|
|
1566
1561
|
}
|
|
1567
|
-
function
|
|
1562
|
+
function Dt() {
|
|
1568
1563
|
var e = !0;
|
|
1569
1564
|
return typeof navigator < "u" && navigator.onLine === !1 && (e = !1), e;
|
|
1570
1565
|
}
|
|
1571
|
-
function
|
|
1572
|
-
return n.retryDelays == null || t >= n.retryDelays.length || e.originalRequest == null ? !1 : n && typeof n.onShouldRetry == "function" ? n.onShouldRetry(e, t, n) :
|
|
1566
|
+
function Ot(e, t, n) {
|
|
1567
|
+
return n.retryDelays == null || t >= n.retryDelays.length || e.originalRequest == null ? !1 : n && typeof n.onShouldRetry == "function" ? n.onShouldRetry(e, t, n) : kt(e);
|
|
1573
1568
|
}
|
|
1574
|
-
function
|
|
1569
|
+
function kt(e) {
|
|
1575
1570
|
var t = e.originalResponse ? e.originalResponse.getStatus() : 0;
|
|
1576
|
-
return (!
|
|
1571
|
+
return (!H(t, 400) || t === 409 || t === 423) && Dt();
|
|
1577
1572
|
}
|
|
1578
|
-
function
|
|
1579
|
-
return new
|
|
1573
|
+
function At(e, t) {
|
|
1574
|
+
return new et.default(t, e).toString();
|
|
1580
1575
|
}
|
|
1581
|
-
function
|
|
1576
|
+
function jt(e, t) {
|
|
1582
1577
|
for (var n = Math.floor(e / t), r = [], i = 0; i < t; i++) r.push({
|
|
1583
1578
|
start: n * i,
|
|
1584
1579
|
end: n * (i + 1)
|
|
1585
1580
|
});
|
|
1586
1581
|
return r[t - 1].end = e, r;
|
|
1587
1582
|
}
|
|
1588
|
-
|
|
1583
|
+
St.defaultOptions = xt;
|
|
1589
1584
|
//#endregion
|
|
1590
1585
|
//#region node_modules/tus-js-client/lib.esm/browser/isReactNative.js
|
|
1591
|
-
var
|
|
1586
|
+
var Mt = function() {
|
|
1592
1587
|
return typeof navigator < "u" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative";
|
|
1593
1588
|
};
|
|
1594
1589
|
//#endregion
|
|
1595
1590
|
//#region node_modules/tus-js-client/lib.esm/browser/uriToBlob.js
|
|
1596
|
-
function
|
|
1591
|
+
function Nt(e) {
|
|
1597
1592
|
return new Promise(function(t, n) {
|
|
1598
1593
|
var r = new XMLHttpRequest();
|
|
1599
1594
|
r.responseType = "blob", r.onload = function() {
|
|
@@ -1606,12 +1601,12 @@ function Lt(e) {
|
|
|
1606
1601
|
}
|
|
1607
1602
|
//#endregion
|
|
1608
1603
|
//#region node_modules/tus-js-client/lib.esm/browser/sources/isCordova.js
|
|
1609
|
-
var
|
|
1604
|
+
var Pt = function() {
|
|
1610
1605
|
return typeof window < "u" && (window.PhoneGap !== void 0 || window.Cordova !== void 0 || window.cordova !== void 0);
|
|
1611
1606
|
};
|
|
1612
1607
|
//#endregion
|
|
1613
1608
|
//#region node_modules/tus-js-client/lib.esm/browser/sources/readAsByteArray.js
|
|
1614
|
-
function
|
|
1609
|
+
function Ft(e) {
|
|
1615
1610
|
return new Promise(function(t, n) {
|
|
1616
1611
|
var r = new FileReader();
|
|
1617
1612
|
r.onload = function() {
|
|
@@ -1623,48 +1618,48 @@ function zt(e) {
|
|
|
1623
1618
|
}
|
|
1624
1619
|
//#endregion
|
|
1625
1620
|
//#region node_modules/tus-js-client/lib.esm/browser/sources/FileSource.js
|
|
1626
|
-
function
|
|
1621
|
+
function U(e) {
|
|
1627
1622
|
"@babel/helpers - typeof";
|
|
1628
|
-
return
|
|
1623
|
+
return U = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1629
1624
|
return typeof e;
|
|
1630
1625
|
} : function(e) {
|
|
1631
1626
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1632
|
-
},
|
|
1627
|
+
}, U(e);
|
|
1633
1628
|
}
|
|
1634
|
-
function
|
|
1629
|
+
function It(e, t) {
|
|
1635
1630
|
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
1636
1631
|
}
|
|
1637
|
-
function
|
|
1632
|
+
function Lt(e, t) {
|
|
1638
1633
|
for (var n = 0; n < t.length; n++) {
|
|
1639
1634
|
var r = t[n];
|
|
1640
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e,
|
|
1635
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, zt(r.key), r);
|
|
1641
1636
|
}
|
|
1642
1637
|
}
|
|
1643
|
-
function
|
|
1644
|
-
return t &&
|
|
1638
|
+
function Rt(e, t, n) {
|
|
1639
|
+
return t && Lt(e.prototype, t), n && Lt(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
1645
1640
|
}
|
|
1646
|
-
function
|
|
1647
|
-
var t =
|
|
1648
|
-
return
|
|
1641
|
+
function zt(e) {
|
|
1642
|
+
var t = Bt(e, "string");
|
|
1643
|
+
return U(t) == "symbol" ? t : t + "";
|
|
1649
1644
|
}
|
|
1650
|
-
function
|
|
1651
|
-
if (
|
|
1645
|
+
function Bt(e, t) {
|
|
1646
|
+
if (U(e) != "object" || !e) return e;
|
|
1652
1647
|
var n = e[Symbol.toPrimitive];
|
|
1653
1648
|
if (n !== void 0) {
|
|
1654
1649
|
var r = n.call(e, t || "default");
|
|
1655
|
-
if (
|
|
1650
|
+
if (U(r) != "object") return r;
|
|
1656
1651
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
1657
1652
|
}
|
|
1658
1653
|
return (t === "string" ? String : Number)(e);
|
|
1659
1654
|
}
|
|
1660
|
-
var
|
|
1655
|
+
var Vt = /* @__PURE__ */ function() {
|
|
1661
1656
|
function e(t) {
|
|
1662
|
-
|
|
1657
|
+
It(this, e), this._file = t, this.size = t.size;
|
|
1663
1658
|
}
|
|
1664
|
-
return
|
|
1659
|
+
return Rt(e, [{
|
|
1665
1660
|
key: "slice",
|
|
1666
1661
|
value: function(e, t) {
|
|
1667
|
-
if (
|
|
1662
|
+
if (Pt()) return Ft(this._file.slice(e, t));
|
|
1668
1663
|
var n = this._file.slice(e, t), r = t >= this.size;
|
|
1669
1664
|
return Promise.resolve({
|
|
1670
1665
|
value: n,
|
|
@@ -1678,44 +1673,44 @@ var Gt = /* @__PURE__ */ function() {
|
|
|
1678
1673
|
}();
|
|
1679
1674
|
//#endregion
|
|
1680
1675
|
//#region node_modules/tus-js-client/lib.esm/browser/sources/StreamSource.js
|
|
1681
|
-
function
|
|
1676
|
+
function Ht(e) {
|
|
1682
1677
|
"@babel/helpers - typeof";
|
|
1683
|
-
return
|
|
1678
|
+
return Ht = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1684
1679
|
return typeof e;
|
|
1685
1680
|
} : function(e) {
|
|
1686
1681
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1687
|
-
},
|
|
1682
|
+
}, Ht(e);
|
|
1688
1683
|
}
|
|
1689
|
-
function
|
|
1684
|
+
function Ut(e, t) {
|
|
1690
1685
|
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
1691
1686
|
}
|
|
1692
|
-
function
|
|
1687
|
+
function Wt(e, t) {
|
|
1693
1688
|
for (var n = 0; n < t.length; n++) {
|
|
1694
1689
|
var r = t[n];
|
|
1695
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e,
|
|
1690
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, Kt(r.key), r);
|
|
1696
1691
|
}
|
|
1697
1692
|
}
|
|
1698
|
-
function
|
|
1699
|
-
return t &&
|
|
1693
|
+
function Gt(e, t, n) {
|
|
1694
|
+
return t && Wt(e.prototype, t), n && Wt(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
1700
1695
|
}
|
|
1701
|
-
function
|
|
1702
|
-
var t =
|
|
1703
|
-
return
|
|
1696
|
+
function Kt(e) {
|
|
1697
|
+
var t = qt(e, "string");
|
|
1698
|
+
return Ht(t) == "symbol" ? t : t + "";
|
|
1704
1699
|
}
|
|
1705
|
-
function
|
|
1706
|
-
if (
|
|
1700
|
+
function qt(e, t) {
|
|
1701
|
+
if (Ht(e) != "object" || !e) return e;
|
|
1707
1702
|
var n = e[Symbol.toPrimitive];
|
|
1708
1703
|
if (n !== void 0) {
|
|
1709
1704
|
var r = n.call(e, t || "default");
|
|
1710
|
-
if (
|
|
1705
|
+
if (Ht(r) != "object") return r;
|
|
1711
1706
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
1712
1707
|
}
|
|
1713
1708
|
return (t === "string" ? String : Number)(e);
|
|
1714
1709
|
}
|
|
1715
|
-
function
|
|
1710
|
+
function Jt(e) {
|
|
1716
1711
|
return e === void 0 ? 0 : e.size === void 0 ? e.length : e.size;
|
|
1717
1712
|
}
|
|
1718
|
-
function
|
|
1713
|
+
function Yt(e, t) {
|
|
1719
1714
|
if (e.concat) return e.concat(t);
|
|
1720
1715
|
if (e instanceof Blob) return new Blob([e, t], { type: e.type });
|
|
1721
1716
|
if (e.set) {
|
|
@@ -1724,11 +1719,11 @@ function Qt(e, t) {
|
|
|
1724
1719
|
}
|
|
1725
1720
|
throw Error("Unknown data type");
|
|
1726
1721
|
}
|
|
1727
|
-
var
|
|
1722
|
+
var Xt = /* @__PURE__ */ function() {
|
|
1728
1723
|
function e(t) {
|
|
1729
|
-
|
|
1724
|
+
Ut(this, e), this._buffer = void 0, this._bufferOffset = 0, this._reader = t, this._done = !1;
|
|
1730
1725
|
}
|
|
1731
|
-
return
|
|
1726
|
+
return Gt(e, [
|
|
1732
1727
|
{
|
|
1733
1728
|
key: "slice",
|
|
1734
1729
|
value: function(e, t) {
|
|
@@ -1738,7 +1733,7 @@ var $t = /* @__PURE__ */ function() {
|
|
|
1738
1733
|
{
|
|
1739
1734
|
key: "_readUntilEnoughDataOrDone",
|
|
1740
1735
|
value: function(e, t) {
|
|
1741
|
-
var n = this, r = t <= this._bufferOffset +
|
|
1736
|
+
var n = this, r = t <= this._bufferOffset + Jt(this._buffer);
|
|
1742
1737
|
if (this._done || r) {
|
|
1743
1738
|
var i = this._getDataFromBuffer(e, t), a = i == null ? this._done : !1;
|
|
1744
1739
|
return Promise.resolve({
|
|
@@ -1748,7 +1743,7 @@ var $t = /* @__PURE__ */ function() {
|
|
|
1748
1743
|
}
|
|
1749
1744
|
return this._reader.read().then(function(r) {
|
|
1750
1745
|
var i = r.value;
|
|
1751
|
-
return r.done ? n._done = !0 : n._buffer === void 0 ? n._buffer = i : n._buffer =
|
|
1746
|
+
return r.done ? n._done = !0 : n._buffer === void 0 ? n._buffer = i : n._buffer = Yt(n._buffer, i), n._readUntilEnoughDataOrDone(e, t);
|
|
1752
1747
|
});
|
|
1753
1748
|
}
|
|
1754
1749
|
},
|
|
@@ -1756,7 +1751,7 @@ var $t = /* @__PURE__ */ function() {
|
|
|
1756
1751
|
key: "_getDataFromBuffer",
|
|
1757
1752
|
value: function(e, t) {
|
|
1758
1753
|
e > this._bufferOffset && (this._buffer = this._buffer.slice(e - this._bufferOffset), this._bufferOffset = e);
|
|
1759
|
-
var n =
|
|
1754
|
+
var n = Jt(this._buffer) === 0;
|
|
1760
1755
|
return this._done && n ? null : this._buffer.slice(0, t - e);
|
|
1761
1756
|
}
|
|
1762
1757
|
},
|
|
@@ -1770,16 +1765,16 @@ var $t = /* @__PURE__ */ function() {
|
|
|
1770
1765
|
}();
|
|
1771
1766
|
//#endregion
|
|
1772
1767
|
//#region node_modules/tus-js-client/lib.esm/browser/fileReader.js
|
|
1773
|
-
function
|
|
1768
|
+
function W(e) {
|
|
1774
1769
|
"@babel/helpers - typeof";
|
|
1775
|
-
return
|
|
1770
|
+
return W = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1776
1771
|
return typeof e;
|
|
1777
1772
|
} : function(e) {
|
|
1778
1773
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1779
|
-
},
|
|
1774
|
+
}, W(e);
|
|
1780
1775
|
}
|
|
1781
|
-
function
|
|
1782
|
-
|
|
1776
|
+
function Zt() {
|
|
1777
|
+
Zt = function() {
|
|
1783
1778
|
return t;
|
|
1784
1779
|
};
|
|
1785
1780
|
var e, t = {}, n = Object.prototype, r = n.hasOwnProperty, i = Object.defineProperty || function(e, t, n) {
|
|
@@ -1845,7 +1840,7 @@ function en() {
|
|
|
1845
1840
|
var c = d(e[i], e, a);
|
|
1846
1841
|
if (c.type !== "throw") {
|
|
1847
1842
|
var l = c.arg, u = l.value;
|
|
1848
|
-
return u &&
|
|
1843
|
+
return u && W(u) == "object" && r.call(u, "__await") ? t.resolve(u.__await).then(function(e) {
|
|
1849
1844
|
n("next", e, o, s);
|
|
1850
1845
|
}, function(e) {
|
|
1851
1846
|
n("throw", e, o, s);
|
|
@@ -1937,7 +1932,7 @@ function en() {
|
|
|
1937
1932
|
return a.next = a;
|
|
1938
1933
|
}
|
|
1939
1934
|
}
|
|
1940
|
-
throw TypeError(
|
|
1935
|
+
throw TypeError(W(t) + " is not iterable");
|
|
1941
1936
|
}
|
|
1942
1937
|
return v.prototype = y, i(C, "constructor", {
|
|
1943
1938
|
value: y,
|
|
@@ -2053,7 +2048,7 @@ function en() {
|
|
|
2053
2048
|
}
|
|
2054
2049
|
}, t;
|
|
2055
2050
|
}
|
|
2056
|
-
function
|
|
2051
|
+
function Qt(e, t, n, r, i, a, o) {
|
|
2057
2052
|
try {
|
|
2058
2053
|
var s = e[a](o), c = s.value;
|
|
2059
2054
|
} catch (e) {
|
|
@@ -2062,72 +2057,72 @@ function tn(e, t, n, r, i, a, o) {
|
|
|
2062
2057
|
}
|
|
2063
2058
|
s.done ? t(c) : Promise.resolve(c).then(r, i);
|
|
2064
2059
|
}
|
|
2065
|
-
function
|
|
2060
|
+
function $t(e) {
|
|
2066
2061
|
return function() {
|
|
2067
2062
|
var t = this, n = arguments;
|
|
2068
2063
|
return new Promise(function(r, i) {
|
|
2069
2064
|
var a = e.apply(t, n);
|
|
2070
2065
|
function o(e) {
|
|
2071
|
-
|
|
2066
|
+
Qt(a, r, i, o, s, "next", e);
|
|
2072
2067
|
}
|
|
2073
2068
|
function s(e) {
|
|
2074
|
-
|
|
2069
|
+
Qt(a, r, i, o, s, "throw", e);
|
|
2075
2070
|
}
|
|
2076
2071
|
o(void 0);
|
|
2077
2072
|
});
|
|
2078
2073
|
};
|
|
2079
2074
|
}
|
|
2080
|
-
function
|
|
2075
|
+
function en(e, t) {
|
|
2081
2076
|
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
2082
2077
|
}
|
|
2083
|
-
function
|
|
2078
|
+
function tn(e, t) {
|
|
2084
2079
|
for (var n = 0; n < t.length; n++) {
|
|
2085
2080
|
var r = t[n];
|
|
2086
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e,
|
|
2081
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, rn(r.key), r);
|
|
2087
2082
|
}
|
|
2088
2083
|
}
|
|
2089
|
-
function
|
|
2090
|
-
return t &&
|
|
2084
|
+
function nn(e, t, n) {
|
|
2085
|
+
return t && tn(e.prototype, t), n && tn(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
2091
2086
|
}
|
|
2092
|
-
function
|
|
2093
|
-
var t =
|
|
2094
|
-
return
|
|
2087
|
+
function rn(e) {
|
|
2088
|
+
var t = an(e, "string");
|
|
2089
|
+
return W(t) == "symbol" ? t : t + "";
|
|
2095
2090
|
}
|
|
2096
|
-
function
|
|
2097
|
-
if (
|
|
2091
|
+
function an(e, t) {
|
|
2092
|
+
if (W(e) != "object" || !e) return e;
|
|
2098
2093
|
var n = e[Symbol.toPrimitive];
|
|
2099
2094
|
if (n !== void 0) {
|
|
2100
2095
|
var r = n.call(e, t || "default");
|
|
2101
|
-
if (
|
|
2096
|
+
if (W(r) != "object") return r;
|
|
2102
2097
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
2103
2098
|
}
|
|
2104
2099
|
return (t === "string" ? String : Number)(e);
|
|
2105
2100
|
}
|
|
2106
|
-
var
|
|
2101
|
+
var on = /* @__PURE__ */ function() {
|
|
2107
2102
|
function e() {
|
|
2108
|
-
|
|
2103
|
+
en(this, e);
|
|
2109
2104
|
}
|
|
2110
|
-
return
|
|
2105
|
+
return nn(e, [{
|
|
2111
2106
|
key: "openFile",
|
|
2112
2107
|
value: function() {
|
|
2113
|
-
var e =
|
|
2108
|
+
var e = $t(/* @__PURE__ */ Zt().mark(function e(t, n) {
|
|
2114
2109
|
var r;
|
|
2115
|
-
return
|
|
2110
|
+
return Zt().wrap(function(e) {
|
|
2116
2111
|
for (;;) switch (e.prev = e.next) {
|
|
2117
2112
|
case 0:
|
|
2118
|
-
if (!(
|
|
2113
|
+
if (!(Mt() && t && t.uri !== void 0)) {
|
|
2119
2114
|
e.next = 11;
|
|
2120
2115
|
break;
|
|
2121
2116
|
}
|
|
2122
|
-
return e.prev = 1, e.next = 4,
|
|
2123
|
-
case 4: return r = e.sent, e.abrupt("return", new
|
|
2117
|
+
return e.prev = 1, e.next = 4, Nt(t.uri);
|
|
2118
|
+
case 4: return r = e.sent, e.abrupt("return", new Vt(r));
|
|
2124
2119
|
case 8: throw e.prev = 8, e.t0 = e.catch(1), Error(`tus: cannot fetch \`file.uri\` as Blob, make sure the uri is correct and accessible. ${e.t0}`);
|
|
2125
2120
|
case 11:
|
|
2126
2121
|
if (!(typeof t.slice == "function" && t.size !== void 0)) {
|
|
2127
2122
|
e.next = 13;
|
|
2128
2123
|
break;
|
|
2129
2124
|
}
|
|
2130
|
-
return e.abrupt("return", Promise.resolve(new
|
|
2125
|
+
return e.abrupt("return", Promise.resolve(new Vt(t)));
|
|
2131
2126
|
case 13:
|
|
2132
2127
|
if (typeof t.read != "function") {
|
|
2133
2128
|
e.next = 18;
|
|
@@ -2138,7 +2133,7 @@ var ln = /* @__PURE__ */ function() {
|
|
|
2138
2133
|
break;
|
|
2139
2134
|
}
|
|
2140
2135
|
return e.abrupt("return", Promise.reject(/* @__PURE__ */ Error("cannot create source for stream without a finite value for the `chunkSize` option")));
|
|
2141
|
-
case 17: return e.abrupt("return", Promise.resolve(new
|
|
2136
|
+
case 17: return e.abrupt("return", Promise.resolve(new Xt(t, n)));
|
|
2142
2137
|
case 18: return e.abrupt("return", Promise.reject(/* @__PURE__ */ Error("source object may only be an instance of File, Blob, or Reader in this environment")));
|
|
2143
2138
|
case 19:
|
|
2144
2139
|
case "end": return e.stop();
|
|
@@ -2154,8 +2149,8 @@ var ln = /* @__PURE__ */ function() {
|
|
|
2154
2149
|
}();
|
|
2155
2150
|
//#endregion
|
|
2156
2151
|
//#region node_modules/tus-js-client/lib.esm/browser/fileSignature.js
|
|
2157
|
-
function
|
|
2158
|
-
return
|
|
2152
|
+
function sn(e, t) {
|
|
2153
|
+
return Mt() ? Promise.resolve(cn(e, t)) : Promise.resolve([
|
|
2159
2154
|
"tus-br",
|
|
2160
2155
|
e.name,
|
|
2161
2156
|
e.type,
|
|
@@ -2164,8 +2159,8 @@ function un(e, t) {
|
|
|
2164
2159
|
t.endpoint
|
|
2165
2160
|
].join("-"));
|
|
2166
2161
|
}
|
|
2167
|
-
function
|
|
2168
|
-
var n = e.exif ?
|
|
2162
|
+
function cn(e, t) {
|
|
2163
|
+
var n = e.exif ? ln(JSON.stringify(e.exif)) : "noexif";
|
|
2169
2164
|
return [
|
|
2170
2165
|
"tus-rn",
|
|
2171
2166
|
e.name || "noname",
|
|
@@ -2174,7 +2169,7 @@ function dn(e, t) {
|
|
|
2174
2169
|
t.endpoint
|
|
2175
2170
|
].join("/");
|
|
2176
2171
|
}
|
|
2177
|
-
function
|
|
2172
|
+
function ln(e) {
|
|
2178
2173
|
var t = 0;
|
|
2179
2174
|
if (e.length === 0) return t;
|
|
2180
2175
|
for (var n = 0; n < e.length; n++) {
|
|
@@ -2185,48 +2180,48 @@ function fn(e) {
|
|
|
2185
2180
|
}
|
|
2186
2181
|
//#endregion
|
|
2187
2182
|
//#region node_modules/tus-js-client/lib.esm/browser/httpStack.js
|
|
2188
|
-
function
|
|
2183
|
+
function un(e) {
|
|
2189
2184
|
"@babel/helpers - typeof";
|
|
2190
|
-
return
|
|
2185
|
+
return un = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2191
2186
|
return typeof e;
|
|
2192
2187
|
} : function(e) {
|
|
2193
2188
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2194
|
-
},
|
|
2189
|
+
}, un(e);
|
|
2195
2190
|
}
|
|
2196
|
-
function
|
|
2191
|
+
function dn(e, t) {
|
|
2197
2192
|
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
2198
2193
|
}
|
|
2199
|
-
function
|
|
2194
|
+
function fn(e, t) {
|
|
2200
2195
|
for (var n = 0; n < t.length; n++) {
|
|
2201
2196
|
var r = t[n];
|
|
2202
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e,
|
|
2197
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, mn(r.key), r);
|
|
2203
2198
|
}
|
|
2204
2199
|
}
|
|
2205
|
-
function
|
|
2206
|
-
return t &&
|
|
2200
|
+
function pn(e, t, n) {
|
|
2201
|
+
return t && fn(e.prototype, t), n && fn(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
2207
2202
|
}
|
|
2208
|
-
function
|
|
2209
|
-
var t =
|
|
2210
|
-
return
|
|
2203
|
+
function mn(e) {
|
|
2204
|
+
var t = hn(e, "string");
|
|
2205
|
+
return un(t) == "symbol" ? t : t + "";
|
|
2211
2206
|
}
|
|
2212
|
-
function
|
|
2213
|
-
if (
|
|
2207
|
+
function hn(e, t) {
|
|
2208
|
+
if (un(e) != "object" || !e) return e;
|
|
2214
2209
|
var n = e[Symbol.toPrimitive];
|
|
2215
2210
|
if (n !== void 0) {
|
|
2216
2211
|
var r = n.call(e, t || "default");
|
|
2217
|
-
if (
|
|
2212
|
+
if (un(r) != "object") return r;
|
|
2218
2213
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
2219
2214
|
}
|
|
2220
2215
|
return (t === "string" ? String : Number)(e);
|
|
2221
2216
|
}
|
|
2222
|
-
var
|
|
2217
|
+
var gn = /* @__PURE__ */ function() {
|
|
2223
2218
|
function e() {
|
|
2224
|
-
|
|
2219
|
+
dn(this, e);
|
|
2225
2220
|
}
|
|
2226
|
-
return
|
|
2221
|
+
return pn(e, [{
|
|
2227
2222
|
key: "createRequest",
|
|
2228
2223
|
value: function(e, t) {
|
|
2229
|
-
return new
|
|
2224
|
+
return new _n(e, t);
|
|
2230
2225
|
}
|
|
2231
2226
|
}, {
|
|
2232
2227
|
key: "getName",
|
|
@@ -2234,11 +2229,11 @@ var vn = /* @__PURE__ */ function() {
|
|
|
2234
2229
|
return "XHRHttpStack";
|
|
2235
2230
|
}
|
|
2236
2231
|
}]);
|
|
2237
|
-
}(),
|
|
2232
|
+
}(), _n = /* @__PURE__ */ function() {
|
|
2238
2233
|
function e(t, n) {
|
|
2239
|
-
|
|
2234
|
+
dn(this, e), this._xhr = new XMLHttpRequest(), this._xhr.open(t, n, !0), this._method = t, this._url = n, this._headers = {};
|
|
2240
2235
|
}
|
|
2241
|
-
return
|
|
2236
|
+
return pn(e, [
|
|
2242
2237
|
{
|
|
2243
2238
|
key: "getMethod",
|
|
2244
2239
|
value: function() {
|
|
@@ -2277,7 +2272,7 @@ var vn = /* @__PURE__ */ function() {
|
|
|
2277
2272
|
var e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
2278
2273
|
return new Promise(function(n, r) {
|
|
2279
2274
|
e._xhr.onload = function() {
|
|
2280
|
-
n(new
|
|
2275
|
+
n(new vn(e._xhr));
|
|
2281
2276
|
}, e._xhr.onerror = function(e) {
|
|
2282
2277
|
r(e);
|
|
2283
2278
|
}, e._xhr.send(t);
|
|
@@ -2297,11 +2292,11 @@ var vn = /* @__PURE__ */ function() {
|
|
|
2297
2292
|
}
|
|
2298
2293
|
}
|
|
2299
2294
|
]);
|
|
2300
|
-
}(),
|
|
2295
|
+
}(), vn = /* @__PURE__ */ function() {
|
|
2301
2296
|
function e(t) {
|
|
2302
|
-
|
|
2297
|
+
dn(this, e), this._xhr = t;
|
|
2303
2298
|
}
|
|
2304
|
-
return
|
|
2299
|
+
return pn(e, [
|
|
2305
2300
|
{
|
|
2306
2301
|
key: "getStatus",
|
|
2307
2302
|
value: function() {
|
|
@@ -2330,54 +2325,54 @@ var vn = /* @__PURE__ */ function() {
|
|
|
2330
2325
|
}();
|
|
2331
2326
|
//#endregion
|
|
2332
2327
|
//#region node_modules/tus-js-client/lib.esm/browser/urlStorage.js
|
|
2333
|
-
function
|
|
2328
|
+
function yn(e) {
|
|
2334
2329
|
"@babel/helpers - typeof";
|
|
2335
|
-
return
|
|
2330
|
+
return yn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2336
2331
|
return typeof e;
|
|
2337
2332
|
} : function(e) {
|
|
2338
2333
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2339
|
-
},
|
|
2334
|
+
}, yn(e);
|
|
2340
2335
|
}
|
|
2341
|
-
function
|
|
2336
|
+
function bn(e, t) {
|
|
2342
2337
|
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
2343
2338
|
}
|
|
2344
|
-
function
|
|
2339
|
+
function xn(e, t) {
|
|
2345
2340
|
for (var n = 0; n < t.length; n++) {
|
|
2346
2341
|
var r = t[n];
|
|
2347
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e,
|
|
2342
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, Cn(r.key), r);
|
|
2348
2343
|
}
|
|
2349
2344
|
}
|
|
2350
|
-
function
|
|
2351
|
-
return t &&
|
|
2345
|
+
function Sn(e, t, n) {
|
|
2346
|
+
return t && xn(e.prototype, t), n && xn(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
2352
2347
|
}
|
|
2353
|
-
function
|
|
2354
|
-
var t =
|
|
2355
|
-
return
|
|
2348
|
+
function Cn(e) {
|
|
2349
|
+
var t = wn(e, "string");
|
|
2350
|
+
return yn(t) == "symbol" ? t : t + "";
|
|
2356
2351
|
}
|
|
2357
|
-
function
|
|
2358
|
-
if (
|
|
2352
|
+
function wn(e, t) {
|
|
2353
|
+
if (yn(e) != "object" || !e) return e;
|
|
2359
2354
|
var n = e[Symbol.toPrimitive];
|
|
2360
2355
|
if (n !== void 0) {
|
|
2361
2356
|
var r = n.call(e, t || "default");
|
|
2362
|
-
if (
|
|
2357
|
+
if (yn(r) != "object") return r;
|
|
2363
2358
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
2364
2359
|
}
|
|
2365
2360
|
return (t === "string" ? String : Number)(e);
|
|
2366
2361
|
}
|
|
2367
|
-
var
|
|
2362
|
+
var Tn = !1;
|
|
2368
2363
|
try {
|
|
2369
|
-
|
|
2370
|
-
var
|
|
2371
|
-
localStorage.setItem(
|
|
2364
|
+
Tn = "localStorage" in window;
|
|
2365
|
+
var En = "tusSupport", Dn = localStorage.getItem(En);
|
|
2366
|
+
localStorage.setItem(En, Dn), Dn === null && localStorage.removeItem(En);
|
|
2372
2367
|
} catch (e) {
|
|
2373
|
-
if (e.code === e.SECURITY_ERR || e.code === e.QUOTA_EXCEEDED_ERR)
|
|
2368
|
+
if (e.code === e.SECURITY_ERR || e.code === e.QUOTA_EXCEEDED_ERR) Tn = !1;
|
|
2374
2369
|
else throw e;
|
|
2375
2370
|
}
|
|
2376
|
-
var
|
|
2371
|
+
var On = Tn, kn = /* @__PURE__ */ function() {
|
|
2377
2372
|
function e() {
|
|
2378
|
-
|
|
2373
|
+
bn(this, e);
|
|
2379
2374
|
}
|
|
2380
|
-
return
|
|
2375
|
+
return Sn(e, [
|
|
2381
2376
|
{
|
|
2382
2377
|
key: "findAllUploads",
|
|
2383
2378
|
value: function() {
|
|
@@ -2430,57 +2425,57 @@ function G(e) {
|
|
|
2430
2425
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2431
2426
|
}, G(e);
|
|
2432
2427
|
}
|
|
2433
|
-
function
|
|
2428
|
+
function An(e, t) {
|
|
2434
2429
|
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
2435
2430
|
}
|
|
2436
|
-
function
|
|
2431
|
+
function jn(e, t) {
|
|
2437
2432
|
for (var n = 0; n < t.length; n++) {
|
|
2438
2433
|
var r = t[n];
|
|
2439
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e,
|
|
2434
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, Hn(r.key), r);
|
|
2440
2435
|
}
|
|
2441
2436
|
}
|
|
2442
|
-
function
|
|
2443
|
-
return t &&
|
|
2437
|
+
function Mn(e, t, n) {
|
|
2438
|
+
return t && jn(e.prototype, t), n && jn(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
2444
2439
|
}
|
|
2445
|
-
function
|
|
2446
|
-
return t =
|
|
2440
|
+
function Nn(e, t, n) {
|
|
2441
|
+
return t = Ln(t), Pn(e, In() ? Reflect.construct(t, n || [], Ln(e).constructor) : t.apply(e, n));
|
|
2447
2442
|
}
|
|
2448
|
-
function
|
|
2443
|
+
function Pn(e, t) {
|
|
2449
2444
|
if (t && (G(t) === "object" || typeof t == "function")) return t;
|
|
2450
2445
|
if (t !== void 0) throw TypeError("Derived constructors may only return object or undefined");
|
|
2451
|
-
return
|
|
2446
|
+
return Fn(e);
|
|
2452
2447
|
}
|
|
2453
|
-
function
|
|
2448
|
+
function Fn(e) {
|
|
2454
2449
|
if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2455
2450
|
return e;
|
|
2456
2451
|
}
|
|
2457
|
-
function
|
|
2452
|
+
function In() {
|
|
2458
2453
|
try {
|
|
2459
2454
|
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
2460
2455
|
} catch {}
|
|
2461
|
-
return (
|
|
2456
|
+
return (In = function() {
|
|
2462
2457
|
return !!e;
|
|
2463
2458
|
})();
|
|
2464
2459
|
}
|
|
2465
|
-
function
|
|
2466
|
-
return
|
|
2460
|
+
function Ln(e) {
|
|
2461
|
+
return Ln = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
2467
2462
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
2468
|
-
},
|
|
2463
|
+
}, Ln(e);
|
|
2469
2464
|
}
|
|
2470
|
-
function
|
|
2465
|
+
function Rn(e, t) {
|
|
2471
2466
|
if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function");
|
|
2472
2467
|
e.prototype = Object.create(t && t.prototype, { constructor: {
|
|
2473
2468
|
value: e,
|
|
2474
2469
|
writable: !0,
|
|
2475
2470
|
configurable: !0
|
|
2476
|
-
} }), Object.defineProperty(e, "prototype", { writable: !1 }), t &&
|
|
2471
|
+
} }), Object.defineProperty(e, "prototype", { writable: !1 }), t && zn(e, t);
|
|
2477
2472
|
}
|
|
2478
|
-
function
|
|
2479
|
-
return
|
|
2473
|
+
function zn(e, t) {
|
|
2474
|
+
return zn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
2480
2475
|
return e.__proto__ = t, e;
|
|
2481
|
-
},
|
|
2476
|
+
}, zn(e, t);
|
|
2482
2477
|
}
|
|
2483
|
-
function
|
|
2478
|
+
function Bn(e, t) {
|
|
2484
2479
|
var n = Object.keys(e);
|
|
2485
2480
|
if (Object.getOwnPropertySymbols) {
|
|
2486
2481
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2493,27 +2488,27 @@ function Vn(e, t) {
|
|
|
2493
2488
|
function K(e) {
|
|
2494
2489
|
for (var t = 1; t < arguments.length; t++) {
|
|
2495
2490
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2496
|
-
t % 2 ?
|
|
2497
|
-
|
|
2498
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2491
|
+
t % 2 ? Bn(Object(n), !0).forEach(function(t) {
|
|
2492
|
+
Vn(e, t, n[t]);
|
|
2493
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Bn(Object(n)).forEach(function(t) {
|
|
2499
2494
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2500
2495
|
});
|
|
2501
2496
|
}
|
|
2502
2497
|
return e;
|
|
2503
2498
|
}
|
|
2504
|
-
function
|
|
2505
|
-
return t =
|
|
2499
|
+
function Vn(e, t, n) {
|
|
2500
|
+
return t = Hn(t), t in e ? Object.defineProperty(e, t, {
|
|
2506
2501
|
value: n,
|
|
2507
2502
|
enumerable: !0,
|
|
2508
2503
|
configurable: !0,
|
|
2509
2504
|
writable: !0
|
|
2510
2505
|
}) : e[t] = n, e;
|
|
2511
2506
|
}
|
|
2512
|
-
function
|
|
2513
|
-
var t =
|
|
2507
|
+
function Hn(e) {
|
|
2508
|
+
var t = Un(e, "string");
|
|
2514
2509
|
return G(t) == "symbol" ? t : t + "";
|
|
2515
2510
|
}
|
|
2516
|
-
function
|
|
2511
|
+
function Un(e, t) {
|
|
2517
2512
|
if (G(e) != "object" || !e) return e;
|
|
2518
2513
|
var n = e[Symbol.toPrimitive];
|
|
2519
2514
|
if (n !== void 0) {
|
|
@@ -2523,28 +2518,28 @@ function Wn(e, t) {
|
|
|
2523
2518
|
}
|
|
2524
2519
|
return (t === "string" ? String : Number)(e);
|
|
2525
2520
|
}
|
|
2526
|
-
var
|
|
2527
|
-
httpStack: new
|
|
2528
|
-
fileReader: new
|
|
2529
|
-
urlStorage:
|
|
2530
|
-
fingerprint:
|
|
2531
|
-
}),
|
|
2521
|
+
var Wn = K(K({}, St.defaultOptions), {}, {
|
|
2522
|
+
httpStack: new gn(),
|
|
2523
|
+
fileReader: new on(),
|
|
2524
|
+
urlStorage: On ? new kn() : new ve(),
|
|
2525
|
+
fingerprint: sn
|
|
2526
|
+
}), Gn = /* @__PURE__ */ function(e) {
|
|
2532
2527
|
function t() {
|
|
2533
2528
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2534
|
-
return
|
|
2529
|
+
return An(this, t), n = K(K({}, Wn), n), Nn(this, t, [e, n]);
|
|
2535
2530
|
}
|
|
2536
|
-
return
|
|
2531
|
+
return Rn(t, e), Mn(t, null, [{
|
|
2537
2532
|
key: "terminate",
|
|
2538
2533
|
value: function(e) {
|
|
2539
2534
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2540
|
-
return t = K(K({},
|
|
2535
|
+
return t = K(K({}, Wn), t), St.terminate(e, t);
|
|
2541
2536
|
}
|
|
2542
2537
|
}]);
|
|
2543
|
-
}(
|
|
2538
|
+
}(St);
|
|
2544
2539
|
typeof XMLHttpRequest == "function" && typeof Blob == "function" && Blob.prototype.slice;
|
|
2545
2540
|
//#endregion
|
|
2546
2541
|
//#region src/queries/FileQueries.ts
|
|
2547
|
-
var
|
|
2542
|
+
var q = "file", J = 1e3 * 60 * 60, Y = e(t.VITE_APP_TITLE), Kn = "later", X = d.create({ baseURL: "https://graph.microsoft.com/v1.0" });
|
|
2548
2543
|
X.interceptors.request.use(async (e) => {
|
|
2549
2544
|
let t = await n("graph");
|
|
2550
2545
|
return e.headers.set("Authorization", `Bearer ${t}`), e;
|
|
@@ -2558,7 +2553,7 @@ X.interceptors.request.use(async (e) => {
|
|
|
2558
2553
|
appName: l.string().min(1).max(255).default(Y).optional(),
|
|
2559
2554
|
meta: s.nullish()
|
|
2560
2555
|
});
|
|
2561
|
-
var
|
|
2556
|
+
var qn = {
|
|
2562
2557
|
metas: (e) => {
|
|
2563
2558
|
let t = new URLSearchParams();
|
|
2564
2559
|
return t.append("appName", e.appName ?? Y), t.append("subId", e.subId), p({
|
|
@@ -2625,7 +2620,7 @@ var Yn = {
|
|
|
2625
2620
|
method: "GET",
|
|
2626
2621
|
responseType: "blob"
|
|
2627
2622
|
}).then((e) => e.data),
|
|
2628
|
-
onSuccess: (e, t) => (0,
|
|
2623
|
+
onSuccess: (e, t) => (0, E.default)(e, `${t.fileName}.${t.fileExtension}`)
|
|
2629
2624
|
}),
|
|
2630
2625
|
open: () => f({
|
|
2631
2626
|
mutationFn: (e) => X.request({
|
|
@@ -2668,7 +2663,7 @@ var Yn = {
|
|
|
2668
2663
|
exact: !1
|
|
2669
2664
|
})
|
|
2670
2665
|
})
|
|
2671
|
-
},
|
|
2666
|
+
}, Jn = (e) => {
|
|
2672
2667
|
let t = c(7), { subId: a, onSuccess: o, onError: s } = e, [l, d] = u(0), f;
|
|
2673
2668
|
t[0] !== s || t[1] !== o || t[2] !== a ? (f = async (e) => {
|
|
2674
2669
|
if (!a) throw Error("subId is required for file upload");
|
|
@@ -2677,8 +2672,8 @@ var Yn = {
|
|
|
2677
2672
|
appName: Y,
|
|
2678
2673
|
subId: a,
|
|
2679
2674
|
fileName: e.name
|
|
2680
|
-
}, c = await n("graph"), l = new
|
|
2681
|
-
endpoint: `${
|
|
2675
|
+
}, c = await n("graph"), l = new Gn(e, {
|
|
2676
|
+
endpoint: `${Kn}/${q}/v1/upload`,
|
|
2682
2677
|
chunkSize: 1048576,
|
|
2683
2678
|
metadata: {
|
|
2684
2679
|
id: t.id,
|
|
@@ -2719,7 +2714,7 @@ $.interceptors.request.use(async (e) => {
|
|
|
2719
2714
|
});
|
|
2720
2715
|
//#endregion
|
|
2721
2716
|
//#region src/queries/index.ts
|
|
2722
|
-
var
|
|
2717
|
+
var Yn = {
|
|
2723
2718
|
peopleSoft: {
|
|
2724
2719
|
employeesSearch: (e) => p({
|
|
2725
2720
|
queryKey: [
|
|
@@ -2933,9 +2928,9 @@ var Zn = {
|
|
|
2933
2928
|
})
|
|
2934
2929
|
},
|
|
2935
2930
|
approval: ee,
|
|
2936
|
-
file:
|
|
2931
|
+
file: qn
|
|
2937
2932
|
};
|
|
2938
2933
|
//#endregion
|
|
2939
|
-
export { S as i,
|
|
2934
|
+
export { S as i, Jn as n, b as r, Yn as t };
|
|
2940
2935
|
|
|
2941
|
-
//# sourceMappingURL=queries-
|
|
2936
|
+
//# sourceMappingURL=queries-D8Ys1kLs.js.map
|