image-salon-sdk 1.0.77 → 1.0.79
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/image-salon-sdk.js +974 -977
- package/dist/image-salon-sdk.umd.cjs +9 -9
- package/dist/image-salon.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/types/image-salon-types.d.ts +1 -0
- package/package.json +1 -1
package/dist/image-salon-sdk.js
CHANGED
|
@@ -5,8 +5,8 @@ var tr = (s) => {
|
|
|
5
5
|
};
|
|
6
6
|
var si = (s, e, t) => e in s ? ii(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
7
7
|
var he = (s, e, t) => si(s, typeof e != "symbol" ? e + "" : e, t), nr = (s, e, t) => e.has(s) || tr("Cannot " + t);
|
|
8
|
-
var E = (s, e, t) => (nr(s, e, "read from private field"), t ? t.call(s) : e.get(s)),
|
|
9
|
-
function
|
|
8
|
+
var E = (s, e, t) => (nr(s, e, "read from private field"), t ? t.call(s) : e.get(s)), z = (s, e, t) => e.has(s) ? tr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), H = (s, e, t, n) => (nr(s, e, "write to private field"), n ? n.call(s, t) : e.set(s, t), t);
|
|
9
|
+
function Ir(s) {
|
|
10
10
|
let e = typeof s;
|
|
11
11
|
if (e == "object") {
|
|
12
12
|
if (Array.isArray(s))
|
|
@@ -19,17 +19,17 @@ function Nr(s) {
|
|
|
19
19
|
function oi(s) {
|
|
20
20
|
return s !== null && typeof s == "object" && !Array.isArray(s);
|
|
21
21
|
}
|
|
22
|
-
let bt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),
|
|
22
|
+
let bt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), Ln = [];
|
|
23
23
|
for (let s = 0; s < bt.length; s++)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
Ln[bt[s].charCodeAt(0)] = s;
|
|
25
|
+
Ln[45] = bt.indexOf("+");
|
|
26
|
+
Ln[95] = bt.indexOf("/");
|
|
27
27
|
function Tr(s) {
|
|
28
28
|
let e = s.length * 3 / 4;
|
|
29
29
|
s[s.length - 2] == "=" ? e -= 2 : s[s.length - 1] == "=" && (e -= 1);
|
|
30
30
|
let t = new Uint8Array(e), n = 0, r = 0, i, o = 0;
|
|
31
31
|
for (let a = 0; a < s.length; a++) {
|
|
32
|
-
if (i =
|
|
32
|
+
if (i = Ln[s.charCodeAt(a)], i === void 0)
|
|
33
33
|
switch (s[a]) {
|
|
34
34
|
case "=":
|
|
35
35
|
r = 0;
|
|
@@ -96,10 +96,10 @@ var G;
|
|
|
96
96
|
function ai(s, e) {
|
|
97
97
|
return Object.assign(Object.assign({}, s), e);
|
|
98
98
|
}
|
|
99
|
-
var
|
|
99
|
+
var W;
|
|
100
100
|
(function(s) {
|
|
101
101
|
s[s.Varint = 0] = "Varint", s[s.Bit64 = 1] = "Bit64", s[s.LengthDelimited = 2] = "LengthDelimited", s[s.StartGroup = 3] = "StartGroup", s[s.EndGroup = 4] = "EndGroup", s[s.Bit32 = 5] = "Bit32";
|
|
102
|
-
})(
|
|
102
|
+
})(W || (W = {}));
|
|
103
103
|
function li() {
|
|
104
104
|
let s = 0, e = 0;
|
|
105
105
|
for (let n = 0; n < 28; n += 7) {
|
|
@@ -117,7 +117,7 @@ function li() {
|
|
|
117
117
|
}
|
|
118
118
|
throw new Error("invalid varint");
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Bn(s, e, t) {
|
|
121
121
|
for (let i = 0; i < 28; i = i + 7) {
|
|
122
122
|
const o = s >>> i, a = !(!(o >>> 7) && e == 0), c = (a ? o | 128 : o) & 255;
|
|
123
123
|
if (t.push(c), !a)
|
|
@@ -133,7 +133,7 @@ function _n(s, e, t) {
|
|
|
133
133
|
t.push(e >>> 31 & 1);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const yn = 65536 * 65536;
|
|
137
137
|
function Ur(s) {
|
|
138
138
|
let e = s[0] == "-";
|
|
139
139
|
e && (s = s.slice(1));
|
|
@@ -141,13 +141,13 @@ function Ur(s) {
|
|
|
141
141
|
let n = 0, r = 0;
|
|
142
142
|
function i(o, a) {
|
|
143
143
|
const c = Number(s.slice(o, a));
|
|
144
|
-
r *= t, n = n * t + c, n >=
|
|
144
|
+
r *= t, n = n * t + c, n >= yn && (r = r + (n / yn | 0), n = n % yn);
|
|
145
145
|
}
|
|
146
146
|
return i(-24, -18), i(-18, -12), i(-12, -6), i(-6), [e, n, r];
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function Wn(s, e) {
|
|
149
149
|
if (e >>> 0 <= 2097151)
|
|
150
|
-
return "" + (
|
|
150
|
+
return "" + (yn * e + (s >>> 0));
|
|
151
151
|
let t = s & 16777215, n = (s >>> 24 | e << 8) >>> 0 & 16777215, r = e >> 16 & 65535, i = t + n * 6777216 + r * 6710656, o = n + r * 8147497, a = r * 2, c = 1e7;
|
|
152
152
|
i >= c && (o += Math.floor(i / c), i %= c), o >= c && (a += Math.floor(o / c), o %= c);
|
|
153
153
|
function h(l, u) {
|
|
@@ -215,7 +215,7 @@ function xr(s) {
|
|
|
215
215
|
if (!s)
|
|
216
216
|
throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support");
|
|
217
217
|
}
|
|
218
|
-
const _r = /^-?[0-9]+$/,
|
|
218
|
+
const _r = /^-?[0-9]+$/, Cn = 4294967296, un = 2147483648;
|
|
219
219
|
class Br {
|
|
220
220
|
/**
|
|
221
221
|
* Create a new instance with the given bits.
|
|
@@ -233,7 +233,7 @@ class Br {
|
|
|
233
233
|
* Convert to a native number.
|
|
234
234
|
*/
|
|
235
235
|
toNumber() {
|
|
236
|
-
let e = this.hi *
|
|
236
|
+
let e = this.hi * Cn + (this.lo >>> 0);
|
|
237
237
|
if (!Number.isSafeInteger(e))
|
|
238
238
|
throw new Error("cannot convert to safe number");
|
|
239
239
|
return e;
|
|
@@ -283,7 +283,7 @@ class Se extends Br {
|
|
|
283
283
|
throw new Error("number is no integer");
|
|
284
284
|
if (e < 0)
|
|
285
285
|
throw new Error("signed value for ulong");
|
|
286
|
-
return new Se(e, e /
|
|
286
|
+
return new Se(e, e / Cn);
|
|
287
287
|
}
|
|
288
288
|
throw new Error("unknown value " + typeof e);
|
|
289
289
|
}
|
|
@@ -291,7 +291,7 @@ class Se extends Br {
|
|
|
291
291
|
* Convert to decimal string.
|
|
292
292
|
*/
|
|
293
293
|
toString() {
|
|
294
|
-
return se ? this.toBigInt().toString() :
|
|
294
|
+
return se ? this.toBigInt().toString() : Wn(this.lo, this.hi);
|
|
295
295
|
}
|
|
296
296
|
/**
|
|
297
297
|
* Convert to native bigint.
|
|
@@ -336,9 +336,9 @@ class ve extends Br {
|
|
|
336
336
|
throw new Error("string is no integer");
|
|
337
337
|
let [t, n, r] = Ur(e);
|
|
338
338
|
if (t) {
|
|
339
|
-
if (r >
|
|
339
|
+
if (r > un || r == un && n != 0)
|
|
340
340
|
throw new Error("signed long too small");
|
|
341
|
-
} else if (r >=
|
|
341
|
+
} else if (r >= un)
|
|
342
342
|
throw new Error("signed long too large");
|
|
343
343
|
let i = new ve(n, r);
|
|
344
344
|
return t ? i.negate() : i;
|
|
@@ -347,7 +347,7 @@ class ve extends Br {
|
|
|
347
347
|
return this.ZERO;
|
|
348
348
|
if (!Number.isSafeInteger(e))
|
|
349
349
|
throw new Error("number is no integer");
|
|
350
|
-
return e > 0 ? new ve(e, e /
|
|
350
|
+
return e > 0 ? new ve(e, e / Cn) : new ve(-e, -e / Cn).negate();
|
|
351
351
|
}
|
|
352
352
|
throw new Error("unknown value " + typeof e);
|
|
353
353
|
}
|
|
@@ -355,7 +355,7 @@ class ve extends Br {
|
|
|
355
355
|
* Do we have a minus sign?
|
|
356
356
|
*/
|
|
357
357
|
isNegative() {
|
|
358
|
-
return (this.hi &
|
|
358
|
+
return (this.hi & un) !== 0;
|
|
359
359
|
}
|
|
360
360
|
/**
|
|
361
361
|
* Negate two's complement.
|
|
@@ -373,9 +373,9 @@ class ve extends Br {
|
|
|
373
373
|
return this.toBigInt().toString();
|
|
374
374
|
if (this.isNegative()) {
|
|
375
375
|
let e = this.negate();
|
|
376
|
-
return "-" +
|
|
376
|
+
return "-" + Wn(e.lo, e.hi);
|
|
377
377
|
}
|
|
378
|
-
return
|
|
378
|
+
return Wn(this.lo, this.hi);
|
|
379
379
|
}
|
|
380
380
|
/**
|
|
381
381
|
* Convert to native bigint.
|
|
@@ -415,22 +415,22 @@ class ui {
|
|
|
415
415
|
skip(e) {
|
|
416
416
|
let t = this.pos;
|
|
417
417
|
switch (e) {
|
|
418
|
-
case
|
|
418
|
+
case W.Varint:
|
|
419
419
|
for (; this.buf[this.pos++] & 128; )
|
|
420
420
|
;
|
|
421
421
|
break;
|
|
422
|
-
case
|
|
422
|
+
case W.Bit64:
|
|
423
423
|
this.pos += 4;
|
|
424
|
-
case
|
|
424
|
+
case W.Bit32:
|
|
425
425
|
this.pos += 4;
|
|
426
426
|
break;
|
|
427
|
-
case
|
|
427
|
+
case W.LengthDelimited:
|
|
428
428
|
let n = this.uint32();
|
|
429
429
|
this.pos += n;
|
|
430
430
|
break;
|
|
431
|
-
case
|
|
431
|
+
case W.StartGroup:
|
|
432
432
|
let r;
|
|
433
|
-
for (; (r = this.tag()[1]) !==
|
|
433
|
+
for (; (r = this.tag()[1]) !== W.EndGroup; )
|
|
434
434
|
this.skip(r);
|
|
435
435
|
break;
|
|
436
436
|
default:
|
|
@@ -539,13 +539,13 @@ function J(s, e) {
|
|
|
539
539
|
throw new Error(e);
|
|
540
540
|
}
|
|
541
541
|
const fi = 34028234663852886e22, pi = -34028234663852886e22, mi = 4294967295, gi = 2147483647, wi = -2147483648;
|
|
542
|
-
function
|
|
542
|
+
function rn(s) {
|
|
543
543
|
if (typeof s != "number")
|
|
544
544
|
throw new Error("invalid int 32: " + typeof s);
|
|
545
545
|
if (!Number.isInteger(s) || s > gi || s < wi)
|
|
546
546
|
throw new Error("invalid int 32: " + s);
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function En(s) {
|
|
549
549
|
if (typeof s != "number")
|
|
550
550
|
throw new Error("invalid uint 32: " + typeof s);
|
|
551
551
|
if (!Number.isInteger(s) || s > mi || s < 0)
|
|
@@ -620,7 +620,7 @@ class bi {
|
|
|
620
620
|
* Write a `uint32` value, an unsigned 32 bit varint.
|
|
621
621
|
*/
|
|
622
622
|
uint32(e) {
|
|
623
|
-
for (
|
|
623
|
+
for (En(e); e > 127; )
|
|
624
624
|
this.buf.push(e & 127 | 128), e = e >>> 7;
|
|
625
625
|
return this.buf.push(e), this;
|
|
626
626
|
}
|
|
@@ -628,7 +628,7 @@ class bi {
|
|
|
628
628
|
* Write a `int32` value, a signed 32 bit varint.
|
|
629
629
|
*/
|
|
630
630
|
int32(e) {
|
|
631
|
-
return
|
|
631
|
+
return rn(e), rr(e, this.buf), this;
|
|
632
632
|
}
|
|
633
633
|
/**
|
|
634
634
|
* Write a `bool` value, a variant.
|
|
@@ -668,7 +668,7 @@ class bi {
|
|
|
668
668
|
* Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
|
|
669
669
|
*/
|
|
670
670
|
fixed32(e) {
|
|
671
|
-
|
|
671
|
+
En(e);
|
|
672
672
|
let t = new Uint8Array(4);
|
|
673
673
|
return new DataView(t.buffer).setUint32(0, e, !0), this.raw(t);
|
|
674
674
|
}
|
|
@@ -676,7 +676,7 @@ class bi {
|
|
|
676
676
|
* Write a `sfixed32` value, a signed, fixed-length 32-bit integer.
|
|
677
677
|
*/
|
|
678
678
|
sfixed32(e) {
|
|
679
|
-
|
|
679
|
+
rn(e);
|
|
680
680
|
let t = new Uint8Array(4);
|
|
681
681
|
return new DataView(t.buffer).setInt32(0, e, !0), this.raw(t);
|
|
682
682
|
}
|
|
@@ -684,7 +684,7 @@ class bi {
|
|
|
684
684
|
* Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
|
|
685
685
|
*/
|
|
686
686
|
sint32(e) {
|
|
687
|
-
return
|
|
687
|
+
return rn(e), e = (e << 1 ^ e >> 31) >>> 0, rr(e, this.buf), this;
|
|
688
688
|
}
|
|
689
689
|
/**
|
|
690
690
|
* Write a `fixed64` value, a signed, fixed-length 64-bit integer.
|
|
@@ -705,21 +705,21 @@ class bi {
|
|
|
705
705
|
*/
|
|
706
706
|
int64(e) {
|
|
707
707
|
let t = ve.from(e);
|
|
708
|
-
return
|
|
708
|
+
return Bn(t.lo, t.hi, this.buf), this;
|
|
709
709
|
}
|
|
710
710
|
/**
|
|
711
711
|
* Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
|
|
712
712
|
*/
|
|
713
713
|
sint64(e) {
|
|
714
714
|
let t = ve.from(e), n = t.hi >> 31, r = t.lo << 1 ^ n, i = (t.hi << 1 | t.lo >>> 31) ^ n;
|
|
715
|
-
return
|
|
715
|
+
return Bn(r, i, this.buf), this;
|
|
716
716
|
}
|
|
717
717
|
/**
|
|
718
718
|
* Write a `uint64` value, an unsigned 64-bit varint.
|
|
719
719
|
*/
|
|
720
720
|
uint64(e) {
|
|
721
721
|
let t = Se.from(e);
|
|
722
|
-
return
|
|
722
|
+
return Bn(t.lo, t.hi, this.buf), this;
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
725
|
const or = {
|
|
@@ -742,7 +742,7 @@ function vi(s, e) {
|
|
|
742
742
|
return r.typeRegistry = [...(t = s == null ? void 0 : s.typeRegistry) !== null && t !== void 0 ? t : [], ...(n = e == null ? void 0 : e.typeRegistry) !== null && n !== void 0 ? n : []], r;
|
|
743
743
|
}
|
|
744
744
|
const Or = Symbol.for("protobuf-ts/message-type");
|
|
745
|
-
function
|
|
745
|
+
function jn(s) {
|
|
746
746
|
let e = !1;
|
|
747
747
|
const t = [];
|
|
748
748
|
for (let n = 0; n < s.length; n++) {
|
|
@@ -759,13 +759,13 @@ var ut;
|
|
|
759
759
|
(function(s) {
|
|
760
760
|
s[s.BIGINT = 0] = "BIGINT", s[s.STRING = 1] = "STRING", s[s.NUMBER = 2] = "NUMBER";
|
|
761
761
|
})(ut || (ut = {}));
|
|
762
|
-
var
|
|
762
|
+
var vn;
|
|
763
763
|
(function(s) {
|
|
764
764
|
s[s.NO = 0] = "NO", s[s.PACKED = 1] = "PACKED", s[s.UNPACKED = 2] = "UNPACKED";
|
|
765
|
-
})(
|
|
765
|
+
})(vn || (vn = {}));
|
|
766
766
|
function Ai(s) {
|
|
767
767
|
var e, t, n, r;
|
|
768
|
-
return s.localName = (e = s.localName) !== null && e !== void 0 ? e :
|
|
768
|
+
return s.localName = (e = s.localName) !== null && e !== void 0 ? e : jn(s.name), s.jsonName = (t = s.jsonName) !== null && t !== void 0 ? t : jn(s.name), s.repeat = (n = s.repeat) !== null && n !== void 0 ? n : vn.NO, s.opt = (r = s.opt) !== null && r !== void 0 ? r : s.repeat || s.oneof ? !1 : s.kind == "message", s;
|
|
769
769
|
}
|
|
770
770
|
function ki(s) {
|
|
771
771
|
if (typeof s != "object" || s === null || !s.hasOwnProperty("oneofKind"))
|
|
@@ -779,7 +779,7 @@ function ki(s) {
|
|
|
779
779
|
return !1;
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
|
-
class
|
|
782
|
+
class Fi {
|
|
783
783
|
constructor(e) {
|
|
784
784
|
var t;
|
|
785
785
|
this.fields = (t = e.fields) !== null && t !== void 0 ? t : [];
|
|
@@ -965,7 +965,7 @@ function et(s, e) {
|
|
|
965
965
|
return s.toString();
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
class
|
|
968
|
+
class Ni {
|
|
969
969
|
constructor(e) {
|
|
970
970
|
this.info = e;
|
|
971
971
|
}
|
|
@@ -981,7 +981,7 @@ class Fi {
|
|
|
981
981
|
// Cannot parse JSON <type of jsonValue> for <type name>#<fieldName>.
|
|
982
982
|
assert(e, t, n) {
|
|
983
983
|
if (!e) {
|
|
984
|
-
let r =
|
|
984
|
+
let r = Ir(n);
|
|
985
985
|
throw (r == "number" || r == "boolean") && (r = n.toString()), new Error(`Cannot parse JSON ${r} for ${this.info.typeName}#${t}`);
|
|
986
986
|
}
|
|
987
987
|
}
|
|
@@ -1146,7 +1146,7 @@ class Fi {
|
|
|
1146
1146
|
let a;
|
|
1147
1147
|
if (typeof e == "number" ? a = e : e === "" ? i = "empty string" : typeof e == "string" && (e.trim().length !== e.length ? i = "extra whitespace" : a = Number(e)), a === void 0)
|
|
1148
1148
|
break;
|
|
1149
|
-
return t == D.UINT32 ?
|
|
1149
|
+
return t == D.UINT32 ? En(a) : rn(a), a;
|
|
1150
1150
|
case D.INT64:
|
|
1151
1151
|
case D.SFIXED64:
|
|
1152
1152
|
case D.SINT64:
|
|
@@ -1195,7 +1195,7 @@ class Fi {
|
|
|
1195
1195
|
this.assert(!1, r + (i ? " - " + i : ""), e);
|
|
1196
1196
|
}
|
|
1197
1197
|
}
|
|
1198
|
-
class
|
|
1198
|
+
class Ii {
|
|
1199
1199
|
constructor(e) {
|
|
1200
1200
|
var t;
|
|
1201
1201
|
this.fields = (t = e.fields) !== null && t !== void 0 ? t : [];
|
|
@@ -1316,10 +1316,10 @@ class Ni {
|
|
|
1316
1316
|
case D.INT32:
|
|
1317
1317
|
case D.SFIXED32:
|
|
1318
1318
|
case D.SINT32:
|
|
1319
|
-
return t === 0 ? o ? 0 : void 0 : (
|
|
1319
|
+
return t === 0 ? o ? 0 : void 0 : (rn(t), t);
|
|
1320
1320
|
case D.FIXED32:
|
|
1321
1321
|
case D.UINT32:
|
|
1322
|
-
return t === 0 ? o ? 0 : void 0 : (
|
|
1322
|
+
return t === 0 ? o ? 0 : void 0 : (En(t), t);
|
|
1323
1323
|
case D.FLOAT:
|
|
1324
1324
|
Xn(t);
|
|
1325
1325
|
case D.DOUBLE:
|
|
@@ -1344,7 +1344,7 @@ class Ni {
|
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function qn(s, e = ut.STRING) {
|
|
1348
1348
|
switch (s) {
|
|
1349
1349
|
case D.BOOL:
|
|
1350
1350
|
return !1;
|
|
@@ -1407,26 +1407,26 @@ class Ti {
|
|
|
1407
1407
|
case "enum":
|
|
1408
1408
|
let d = c.kind == "enum" ? D.INT32 : c.T, f = c.kind == "scalar" ? c.L : void 0;
|
|
1409
1409
|
if (l) {
|
|
1410
|
-
let
|
|
1411
|
-
if (a ==
|
|
1410
|
+
let I = h[u];
|
|
1411
|
+
if (a == W.LengthDelimited && d != D.STRING && d != D.BYTES) {
|
|
1412
1412
|
let C = e.uint32() + e.pos;
|
|
1413
1413
|
for (; e.pos < C; )
|
|
1414
|
-
|
|
1414
|
+
I.push(this.scalar(e, d, f));
|
|
1415
1415
|
} else
|
|
1416
|
-
|
|
1416
|
+
I.push(this.scalar(e, d, f));
|
|
1417
1417
|
} else
|
|
1418
1418
|
h[u] = this.scalar(e, d, f);
|
|
1419
1419
|
break;
|
|
1420
1420
|
case "message":
|
|
1421
1421
|
if (l) {
|
|
1422
|
-
let
|
|
1423
|
-
|
|
1422
|
+
let I = h[u], C = c.T().internalBinaryRead(e, e.uint32(), n);
|
|
1423
|
+
I.push(C);
|
|
1424
1424
|
} else
|
|
1425
1425
|
h[u] = c.T().internalBinaryRead(e, e.uint32(), n, h[u]);
|
|
1426
1426
|
break;
|
|
1427
1427
|
case "map":
|
|
1428
|
-
let [y,
|
|
1429
|
-
h[u][y] =
|
|
1428
|
+
let [y, F] = this.mapEntry(c, e, n);
|
|
1429
|
+
h[u][y] = F;
|
|
1430
1430
|
break;
|
|
1431
1431
|
}
|
|
1432
1432
|
}
|
|
@@ -1460,13 +1460,13 @@ class Ti {
|
|
|
1460
1460
|
}
|
|
1461
1461
|
}
|
|
1462
1462
|
if (o === void 0) {
|
|
1463
|
-
let c =
|
|
1463
|
+
let c = qn(e.K);
|
|
1464
1464
|
o = e.K == D.BOOL ? c.toString() : c;
|
|
1465
1465
|
}
|
|
1466
1466
|
if (a === void 0)
|
|
1467
1467
|
switch (e.V.kind) {
|
|
1468
1468
|
case "scalar":
|
|
1469
|
-
a =
|
|
1469
|
+
a = qn(e.V.T, e.V.L);
|
|
1470
1470
|
break;
|
|
1471
1471
|
case "enum":
|
|
1472
1472
|
a = 0;
|
|
@@ -1541,7 +1541,7 @@ class Li {
|
|
|
1541
1541
|
case "enum":
|
|
1542
1542
|
let l = i.kind == "enum" ? D.INT32 : i.T;
|
|
1543
1543
|
if (c)
|
|
1544
|
-
if (J(Array.isArray(o)), c ==
|
|
1544
|
+
if (J(Array.isArray(o)), c == vn.PACKED)
|
|
1545
1545
|
this.packed(t, l, i.no, o);
|
|
1546
1546
|
else
|
|
1547
1547
|
for (const u of o)
|
|
@@ -1567,7 +1567,7 @@ class Li {
|
|
|
1567
1567
|
r !== !1 && (r === !0 ? G.onWrite : r)(this.info.typeName, e, t);
|
|
1568
1568
|
}
|
|
1569
1569
|
mapEntry(e, t, n, r, i) {
|
|
1570
|
-
e.tag(n.no,
|
|
1570
|
+
e.tag(n.no, W.LengthDelimited), e.fork();
|
|
1571
1571
|
let o = r;
|
|
1572
1572
|
switch (n.K) {
|
|
1573
1573
|
case D.INT32:
|
|
@@ -1595,7 +1595,7 @@ class Li {
|
|
|
1595
1595
|
e.join();
|
|
1596
1596
|
}
|
|
1597
1597
|
message(e, t, n, r, i) {
|
|
1598
|
-
i !== void 0 && (n.internalBinaryWrite(i, e.tag(r,
|
|
1598
|
+
i !== void 0 && (n.internalBinaryWrite(i, e.tag(r, W.LengthDelimited).fork(), t), e.join());
|
|
1599
1599
|
}
|
|
1600
1600
|
/**
|
|
1601
1601
|
* Write a single scalar value.
|
|
@@ -1610,7 +1610,7 @@ class Li {
|
|
|
1610
1610
|
packed(e, t, n, r) {
|
|
1611
1611
|
if (!r.length)
|
|
1612
1612
|
return;
|
|
1613
|
-
J(t !== D.BYTES && t !== D.STRING), e.tag(n,
|
|
1613
|
+
J(t !== D.BYTES && t !== D.STRING), e.tag(n, W.LengthDelimited), e.fork();
|
|
1614
1614
|
let [, i] = this.scalarInfo(t);
|
|
1615
1615
|
for (let o = 0; o < r.length; o++)
|
|
1616
1616
|
e[i](r[o]);
|
|
@@ -1627,13 +1627,13 @@ class Li {
|
|
|
1627
1627
|
* If argument `value` is omitted, [2] is always false.
|
|
1628
1628
|
*/
|
|
1629
1629
|
scalarInfo(e, t) {
|
|
1630
|
-
let n =
|
|
1630
|
+
let n = W.Varint, r, i = t === void 0, o = t === 0;
|
|
1631
1631
|
switch (e) {
|
|
1632
1632
|
case D.INT32:
|
|
1633
1633
|
r = "int32";
|
|
1634
1634
|
break;
|
|
1635
1635
|
case D.STRING:
|
|
1636
|
-
o = i || !t.length, n =
|
|
1636
|
+
o = i || !t.length, n = W.LengthDelimited, r = "string";
|
|
1637
1637
|
break;
|
|
1638
1638
|
case D.BOOL:
|
|
1639
1639
|
o = t === !1, r = "bool";
|
|
@@ -1642,10 +1642,10 @@ class Li {
|
|
|
1642
1642
|
r = "uint32";
|
|
1643
1643
|
break;
|
|
1644
1644
|
case D.DOUBLE:
|
|
1645
|
-
n =
|
|
1645
|
+
n = W.Bit64, r = "double";
|
|
1646
1646
|
break;
|
|
1647
1647
|
case D.FLOAT:
|
|
1648
|
-
n =
|
|
1648
|
+
n = W.Bit32, r = "float";
|
|
1649
1649
|
break;
|
|
1650
1650
|
case D.INT64:
|
|
1651
1651
|
o = i || ve.from(t).isZero(), r = "int64";
|
|
@@ -1654,19 +1654,19 @@ class Li {
|
|
|
1654
1654
|
o = i || Se.from(t).isZero(), r = "uint64";
|
|
1655
1655
|
break;
|
|
1656
1656
|
case D.FIXED64:
|
|
1657
|
-
o = i || Se.from(t).isZero(), n =
|
|
1657
|
+
o = i || Se.from(t).isZero(), n = W.Bit64, r = "fixed64";
|
|
1658
1658
|
break;
|
|
1659
1659
|
case D.BYTES:
|
|
1660
|
-
o = i || !t.byteLength, n =
|
|
1660
|
+
o = i || !t.byteLength, n = W.LengthDelimited, r = "bytes";
|
|
1661
1661
|
break;
|
|
1662
1662
|
case D.FIXED32:
|
|
1663
|
-
n =
|
|
1663
|
+
n = W.Bit32, r = "fixed32";
|
|
1664
1664
|
break;
|
|
1665
1665
|
case D.SFIXED32:
|
|
1666
|
-
n =
|
|
1666
|
+
n = W.Bit32, r = "sfixed32";
|
|
1667
1667
|
break;
|
|
1668
1668
|
case D.SFIXED64:
|
|
1669
|
-
o = i || ve.from(t).isZero(), n =
|
|
1669
|
+
o = i || ve.from(t).isZero(), n = W.Bit64, r = "sfixed64";
|
|
1670
1670
|
break;
|
|
1671
1671
|
case D.SINT32:
|
|
1672
1672
|
r = "sint32";
|
|
@@ -1690,7 +1690,7 @@ function Ui(s) {
|
|
|
1690
1690
|
else
|
|
1691
1691
|
switch (t.kind) {
|
|
1692
1692
|
case "scalar":
|
|
1693
|
-
e[n] =
|
|
1693
|
+
e[n] = qn(t.T, t.L);
|
|
1694
1694
|
break;
|
|
1695
1695
|
case "enum":
|
|
1696
1696
|
e[n] = 0;
|
|
@@ -1763,7 +1763,7 @@ function xi(s, e, t) {
|
|
|
1763
1763
|
return !1;
|
|
1764
1764
|
break;
|
|
1765
1765
|
case "map":
|
|
1766
|
-
if (!(n.V.kind == "message" ? cr(n.V.T(),
|
|
1766
|
+
if (!(n.V.kind == "message" ? cr(n.V.T(), fn(i), fn(o)) : lr(n.V.kind == "enum" ? D.INT32 : n.V.T, fn(i), fn(o))))
|
|
1767
1767
|
return !1;
|
|
1768
1768
|
break;
|
|
1769
1769
|
case "message":
|
|
@@ -1775,7 +1775,7 @@ function xi(s, e, t) {
|
|
|
1775
1775
|
}
|
|
1776
1776
|
return !0;
|
|
1777
1777
|
}
|
|
1778
|
-
const
|
|
1778
|
+
const fn = Object.values;
|
|
1779
1779
|
function Sr(s, e, t) {
|
|
1780
1780
|
if (e === t)
|
|
1781
1781
|
return !0;
|
|
@@ -1806,9 +1806,9 @@ function cr(s, e, t) {
|
|
|
1806
1806
|
return !0;
|
|
1807
1807
|
}
|
|
1808
1808
|
const _i = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));
|
|
1809
|
-
class
|
|
1809
|
+
class Fe {
|
|
1810
1810
|
constructor(e, t, n) {
|
|
1811
|
-
this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(Ai), this.options = n ?? {}, this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, _i), { [Or]: { value: this } })), this.refTypeCheck = new
|
|
1811
|
+
this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(Ai), this.options = n ?? {}, this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, _i), { [Or]: { value: this } })), this.refTypeCheck = new Fi(this), this.refJsonReader = new Ni(this), this.refJsonWriter = new Ii(this), this.refBinReader = new Ti(this), this.refBinWriter = new Li(this);
|
|
1812
1812
|
}
|
|
1813
1813
|
create(e) {
|
|
1814
1814
|
let t = Ui(this);
|
|
@@ -1908,7 +1908,7 @@ class Ie {
|
|
|
1908
1908
|
let r = n ?? this.create();
|
|
1909
1909
|
return this.refJsonReader.read(e, r, t), r;
|
|
1910
1910
|
}
|
|
1911
|
-
throw new Error(`Unable to parse message ${this.typeName} from JSON ${
|
|
1911
|
+
throw new Error(`Unable to parse message ${this.typeName} from JSON ${Ir(e)}.`);
|
|
1912
1912
|
}
|
|
1913
1913
|
/**
|
|
1914
1914
|
* This is an internal method. If you just want to write a message
|
|
@@ -1945,7 +1945,7 @@ class Ie {
|
|
|
1945
1945
|
function Bi(s, e) {
|
|
1946
1946
|
var t, n, r;
|
|
1947
1947
|
let i = s;
|
|
1948
|
-
return i.service = e, i.localName = (t = i.localName) !== null && t !== void 0 ? t :
|
|
1948
|
+
return i.service = e, i.localName = (t = i.localName) !== null && t !== void 0 ? t : jn(i.name), i.serverStreaming = !!i.serverStreaming, i.clientStreaming = !!i.clientStreaming, i.options = (n = i.options) !== null && n !== void 0 ? n : {}, i.idempotency = (r = i.idempotency) !== null && r !== void 0 ? r : void 0, i;
|
|
1949
1949
|
}
|
|
1950
1950
|
class Gn {
|
|
1951
1951
|
constructor(e, t, n) {
|
|
@@ -1973,7 +1973,7 @@ function Oi(s, e) {
|
|
|
1973
1973
|
if (!e)
|
|
1974
1974
|
return s;
|
|
1975
1975
|
let t = {};
|
|
1976
|
-
|
|
1976
|
+
pn(s, t), pn(e, t);
|
|
1977
1977
|
for (let n of Object.keys(e)) {
|
|
1978
1978
|
let r = e[n];
|
|
1979
1979
|
switch (n) {
|
|
@@ -1984,7 +1984,7 @@ function Oi(s, e) {
|
|
|
1984
1984
|
t.binaryOptions = ai(s.binaryOptions, t.binaryOptions);
|
|
1985
1985
|
break;
|
|
1986
1986
|
case "meta":
|
|
1987
|
-
t.meta = {},
|
|
1987
|
+
t.meta = {}, pn(s.meta, t.meta), pn(e.meta, t.meta);
|
|
1988
1988
|
break;
|
|
1989
1989
|
case "interceptors":
|
|
1990
1990
|
t.interceptors = s.interceptors ? s.interceptors.concat(r) : r.concat();
|
|
@@ -1993,17 +1993,17 @@ function Oi(s, e) {
|
|
|
1993
1993
|
}
|
|
1994
1994
|
return t;
|
|
1995
1995
|
}
|
|
1996
|
-
function
|
|
1996
|
+
function pn(s, e) {
|
|
1997
1997
|
if (!s)
|
|
1998
1998
|
return;
|
|
1999
1999
|
let t = e;
|
|
2000
2000
|
for (let [n, r] of Object.entries(s))
|
|
2001
2001
|
r instanceof Date ? t[n] = new Date(r.getTime()) : Array.isArray(r) ? t[n] = r.concat() : t[n] = r;
|
|
2002
2002
|
}
|
|
2003
|
-
var
|
|
2003
|
+
var qe;
|
|
2004
2004
|
(function(s) {
|
|
2005
2005
|
s[s.PENDING = 0] = "PENDING", s[s.REJECTED = 1] = "REJECTED", s[s.RESOLVED = 2] = "RESOLVED";
|
|
2006
|
-
})(
|
|
2006
|
+
})(qe || (qe = {}));
|
|
2007
2007
|
class At {
|
|
2008
2008
|
/**
|
|
2009
2009
|
* @param preventUnhandledRejectionWarning - prevents the warning
|
|
@@ -2018,7 +2018,7 @@ class At {
|
|
|
2018
2018
|
* others.
|
|
2019
2019
|
*/
|
|
2020
2020
|
constructor(e = !0) {
|
|
2021
|
-
this._state =
|
|
2021
|
+
this._state = qe.PENDING, this._promise = new Promise((t, n) => {
|
|
2022
2022
|
this._resolve = t, this._reject = n;
|
|
2023
2023
|
}), e && this._promise.catch((t) => {
|
|
2024
2024
|
});
|
|
@@ -2039,29 +2039,29 @@ class At {
|
|
|
2039
2039
|
* Resolve the promise. Throws if the promise is already resolved or rejected.
|
|
2040
2040
|
*/
|
|
2041
2041
|
resolve(e) {
|
|
2042
|
-
if (this.state !==
|
|
2043
|
-
throw new Error(`cannot resolve ${
|
|
2044
|
-
this._resolve(e), this._state =
|
|
2042
|
+
if (this.state !== qe.PENDING)
|
|
2043
|
+
throw new Error(`cannot resolve ${qe[this.state].toLowerCase()}`);
|
|
2044
|
+
this._resolve(e), this._state = qe.RESOLVED;
|
|
2045
2045
|
}
|
|
2046
2046
|
/**
|
|
2047
2047
|
* Reject the promise. Throws if the promise is already resolved or rejected.
|
|
2048
2048
|
*/
|
|
2049
2049
|
reject(e) {
|
|
2050
|
-
if (this.state !==
|
|
2051
|
-
throw new Error(`cannot reject ${
|
|
2052
|
-
this._reject(e), this._state =
|
|
2050
|
+
if (this.state !== qe.PENDING)
|
|
2051
|
+
throw new Error(`cannot reject ${qe[this.state].toLowerCase()}`);
|
|
2052
|
+
this._reject(e), this._state = qe.REJECTED;
|
|
2053
2053
|
}
|
|
2054
2054
|
/**
|
|
2055
2055
|
* Resolve the promise. Ignore if not pending.
|
|
2056
2056
|
*/
|
|
2057
2057
|
resolvePending(e) {
|
|
2058
|
-
this._state ===
|
|
2058
|
+
this._state === qe.PENDING && this.resolve(e);
|
|
2059
2059
|
}
|
|
2060
2060
|
/**
|
|
2061
2061
|
* Reject the promise. Ignore if not pending.
|
|
2062
2062
|
*/
|
|
2063
2063
|
rejectPending(e) {
|
|
2064
|
-
this._state ===
|
|
2064
|
+
this._state === qe.PENDING && this.reject(e);
|
|
2065
2065
|
}
|
|
2066
2066
|
}
|
|
2067
2067
|
class Si {
|
|
@@ -2166,7 +2166,7 @@ class Si {
|
|
|
2166
2166
|
if (t)
|
|
2167
2167
|
if (t.p) {
|
|
2168
2168
|
const n = t.p;
|
|
2169
|
-
J(n.state ==
|
|
2169
|
+
J(n.state == qe.PENDING, "iterator contract broken"), "value" in e ? n.resolve(e) : n.reject(e), delete t.p;
|
|
2170
2170
|
} else
|
|
2171
2171
|
t.q.push(e);
|
|
2172
2172
|
}
|
|
@@ -2289,10 +2289,10 @@ function Me(s, e, t, n, r) {
|
|
|
2289
2289
|
return o(t, r, n);
|
|
2290
2290
|
}
|
|
2291
2291
|
}
|
|
2292
|
-
var
|
|
2292
|
+
var j;
|
|
2293
2293
|
(function(s) {
|
|
2294
2294
|
s[s.OK = 0] = "OK", s[s.CANCELLED = 1] = "CANCELLED", s[s.UNKNOWN = 2] = "UNKNOWN", s[s.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT", s[s.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", s[s.NOT_FOUND = 5] = "NOT_FOUND", s[s.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", s[s.PERMISSION_DENIED = 7] = "PERMISSION_DENIED", s[s.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", s[s.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED", s[s.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", s[s.ABORTED = 10] = "ABORTED", s[s.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", s[s.UNIMPLEMENTED = 12] = "UNIMPLEMENTED", s[s.INTERNAL = 13] = "INTERNAL", s[s.UNAVAILABLE = 14] = "UNAVAILABLE", s[s.DATA_LOSS = 15] = "DATA_LOSS";
|
|
2295
|
-
})(
|
|
2295
|
+
})(j || (j = {}));
|
|
2296
2296
|
var Hi = function(s, e, t, n) {
|
|
2297
2297
|
function r(i) {
|
|
2298
2298
|
return i instanceof t ? i : new t(function(o) {
|
|
@@ -2330,12 +2330,12 @@ function dr(s, e, t, n, r) {
|
|
|
2330
2330
|
s.append(i, a);
|
|
2331
2331
|
if (s.set("Content-Type", e === "text" ? "application/grpc-web-text" : "application/grpc-web+proto"), e == "text" && s.set("Accept", "application/grpc-web-text"), s.set("X-Grpc-Web", "1"), typeof t == "number") {
|
|
2332
2332
|
if (t <= 0)
|
|
2333
|
-
throw new ie(`timeout ${t} ms exceeded`,
|
|
2333
|
+
throw new ie(`timeout ${t} ms exceeded`, j[j.DEADLINE_EXCEEDED]);
|
|
2334
2334
|
s.set("grpc-timeout", `${t}m`);
|
|
2335
2335
|
} else if (t) {
|
|
2336
2336
|
const i = t.getTime(), o = Date.now();
|
|
2337
2337
|
if (i <= o)
|
|
2338
|
-
throw new ie(`deadline ${t} exceeded`,
|
|
2338
|
+
throw new ie(`deadline ${t} exceeded`, j[j.DEADLINE_EXCEEDED]);
|
|
2339
2339
|
s.set("grpc-timeout", `${i - o}m`);
|
|
2340
2340
|
}
|
|
2341
2341
|
return s;
|
|
@@ -2347,7 +2347,7 @@ function hr(s, e) {
|
|
|
2347
2347
|
t[r] = n % 256, n >>>= 8;
|
|
2348
2348
|
return t.set(s, 5), e === "binary" ? t : Lr(t);
|
|
2349
2349
|
}
|
|
2350
|
-
function
|
|
2350
|
+
function Zn(s, e, t) {
|
|
2351
2351
|
if (arguments.length === 1) {
|
|
2352
2352
|
let c = s, h;
|
|
2353
2353
|
try {
|
|
@@ -2358,16 +2358,16 @@ function jn(s, e, t) {
|
|
|
2358
2358
|
case "error":
|
|
2359
2359
|
case "opaque":
|
|
2360
2360
|
case "opaqueredirect":
|
|
2361
|
-
throw new ie(`fetch response type ${c.type}`,
|
|
2361
|
+
throw new ie(`fetch response type ${c.type}`, j[j.UNKNOWN]);
|
|
2362
2362
|
}
|
|
2363
|
-
return
|
|
2363
|
+
return Zn(ji(c.headers), c.status, c.statusText);
|
|
2364
2364
|
}
|
|
2365
2365
|
let n = s, r = e >= 200 && e < 300, i = Dr(n), [o, a] = Rr(n);
|
|
2366
|
-
return (o === void 0 || o ===
|
|
2366
|
+
return (o === void 0 || o === j.OK) && !r && (o = qi(e), a = t), [o, a, i];
|
|
2367
2367
|
}
|
|
2368
2368
|
function ur(s) {
|
|
2369
|
-
let e =
|
|
2370
|
-
return [t ??
|
|
2369
|
+
let e = Wi(s), [t, n] = Rr(e), r = Dr(e);
|
|
2370
|
+
return [t ?? j.OK, n, r];
|
|
2371
2371
|
}
|
|
2372
2372
|
var tt;
|
|
2373
2373
|
(function(s) {
|
|
@@ -2375,8 +2375,8 @@ var tt;
|
|
|
2375
2375
|
})(tt || (tt = {}));
|
|
2376
2376
|
function fr(s, e, t) {
|
|
2377
2377
|
return Hi(this, void 0, void 0, function* () {
|
|
2378
|
-
let n, r = "", i = new Uint8Array(0), o =
|
|
2379
|
-
if (
|
|
2378
|
+
let n, r = "", i = new Uint8Array(0), o = $i(e);
|
|
2379
|
+
if (Pi(s)) {
|
|
2380
2380
|
let a = s.getReader();
|
|
2381
2381
|
n = {
|
|
2382
2382
|
next: () => a.read()
|
|
@@ -2409,19 +2409,19 @@ function fr(s, e, t) {
|
|
|
2409
2409
|
if (i.length === 0)
|
|
2410
2410
|
break;
|
|
2411
2411
|
if (i[0] !== tt.TRAILER || i.length < 5)
|
|
2412
|
-
throw new ie("premature EOF",
|
|
2412
|
+
throw new ie("premature EOF", j[j.DATA_LOSS]);
|
|
2413
2413
|
t(tt.TRAILER, i.subarray(5));
|
|
2414
2414
|
break;
|
|
2415
2415
|
}
|
|
2416
2416
|
}
|
|
2417
2417
|
});
|
|
2418
2418
|
}
|
|
2419
|
-
const
|
|
2419
|
+
const Pi = (s) => typeof s.getReader == "function";
|
|
2420
2420
|
function pr(s, e) {
|
|
2421
2421
|
let t = new Uint8Array(s.length + e.length);
|
|
2422
2422
|
return t.set(s), t.set(e, s.length), t;
|
|
2423
2423
|
}
|
|
2424
|
-
function
|
|
2424
|
+
function $i(s) {
|
|
2425
2425
|
switch (s) {
|
|
2426
2426
|
case "application/grpc-web-text":
|
|
2427
2427
|
case "application/grpc-web-text+proto":
|
|
@@ -2431,24 +2431,24 @@ function Pi(s) {
|
|
|
2431
2431
|
return "binary";
|
|
2432
2432
|
case void 0:
|
|
2433
2433
|
case null:
|
|
2434
|
-
throw new ie("missing response content type",
|
|
2434
|
+
throw new ie("missing response content type", j[j.INTERNAL]);
|
|
2435
2435
|
default:
|
|
2436
|
-
throw new ie("unexpected response content type: " + s,
|
|
2436
|
+
throw new ie("unexpected response content type: " + s, j[j.INTERNAL]);
|
|
2437
2437
|
}
|
|
2438
2438
|
}
|
|
2439
2439
|
function Rr(s) {
|
|
2440
2440
|
let e, t, n = s["grpc-message"];
|
|
2441
2441
|
if (n !== void 0) {
|
|
2442
2442
|
if (Array.isArray(n))
|
|
2443
|
-
return [
|
|
2443
|
+
return [j.INTERNAL, "invalid grpc-web message"];
|
|
2444
2444
|
t = n;
|
|
2445
2445
|
}
|
|
2446
2446
|
let r = s["grpc-status"];
|
|
2447
2447
|
if (r !== void 0) {
|
|
2448
2448
|
if (Array.isArray(r))
|
|
2449
|
-
return [
|
|
2450
|
-
if (e = parseInt(r, 10),
|
|
2451
|
-
return [
|
|
2449
|
+
return [j.INTERNAL, "invalid grpc-web status"];
|
|
2450
|
+
if (e = parseInt(r, 10), j[e] === void 0)
|
|
2451
|
+
return [j.INTERNAL, "invalid grpc-web status"];
|
|
2452
2452
|
}
|
|
2453
2453
|
return [e, t];
|
|
2454
2454
|
}
|
|
@@ -2465,7 +2465,7 @@ function Dr(s) {
|
|
|
2465
2465
|
}
|
|
2466
2466
|
return e;
|
|
2467
2467
|
}
|
|
2468
|
-
function
|
|
2468
|
+
function Wi(s) {
|
|
2469
2469
|
let e = {};
|
|
2470
2470
|
for (let t of String.fromCharCode.apply(String, s).trim().split(`\r
|
|
2471
2471
|
`)) {
|
|
@@ -2479,46 +2479,46 @@ function $i(s) {
|
|
|
2479
2479
|
}
|
|
2480
2480
|
return e;
|
|
2481
2481
|
}
|
|
2482
|
-
function
|
|
2482
|
+
function ji(s) {
|
|
2483
2483
|
let e = {};
|
|
2484
2484
|
return s.forEach((t, n) => {
|
|
2485
2485
|
let r = e[n];
|
|
2486
2486
|
typeof r == "string" ? e[n] = [r, t] : Array.isArray(r) ? r.push(t) : e[n] = t;
|
|
2487
2487
|
}), e;
|
|
2488
2488
|
}
|
|
2489
|
-
function
|
|
2489
|
+
function qi(s) {
|
|
2490
2490
|
switch (s) {
|
|
2491
2491
|
case 200:
|
|
2492
|
-
return
|
|
2492
|
+
return j.OK;
|
|
2493
2493
|
case 400:
|
|
2494
|
-
return
|
|
2494
|
+
return j.INVALID_ARGUMENT;
|
|
2495
2495
|
case 401:
|
|
2496
|
-
return
|
|
2496
|
+
return j.UNAUTHENTICATED;
|
|
2497
2497
|
case 403:
|
|
2498
|
-
return
|
|
2498
|
+
return j.PERMISSION_DENIED;
|
|
2499
2499
|
case 404:
|
|
2500
|
-
return
|
|
2500
|
+
return j.NOT_FOUND;
|
|
2501
2501
|
case 409:
|
|
2502
|
-
return
|
|
2502
|
+
return j.ABORTED;
|
|
2503
2503
|
case 412:
|
|
2504
|
-
return
|
|
2504
|
+
return j.FAILED_PRECONDITION;
|
|
2505
2505
|
case 429:
|
|
2506
|
-
return
|
|
2506
|
+
return j.RESOURCE_EXHAUSTED;
|
|
2507
2507
|
case 499:
|
|
2508
|
-
return
|
|
2508
|
+
return j.CANCELLED;
|
|
2509
2509
|
case 500:
|
|
2510
|
-
return
|
|
2510
|
+
return j.UNKNOWN;
|
|
2511
2511
|
case 501:
|
|
2512
|
-
return
|
|
2512
|
+
return j.UNIMPLEMENTED;
|
|
2513
2513
|
case 503:
|
|
2514
|
-
return
|
|
2514
|
+
return j.UNAVAILABLE;
|
|
2515
2515
|
case 504:
|
|
2516
|
-
return
|
|
2516
|
+
return j.DEADLINE_EXCEEDED;
|
|
2517
2517
|
default:
|
|
2518
|
-
return
|
|
2518
|
+
return j.UNKNOWN;
|
|
2519
2519
|
}
|
|
2520
2520
|
}
|
|
2521
|
-
class
|
|
2521
|
+
class Zi {
|
|
2522
2522
|
constructor(e) {
|
|
2523
2523
|
this.defaultOptions = e;
|
|
2524
2524
|
}
|
|
@@ -2546,16 +2546,16 @@ class qi {
|
|
|
2546
2546
|
return n.endsWith("/") && (n = n.substring(0, n.length - 1)), `${n}/${e.service.typeName}/${e.name}`;
|
|
2547
2547
|
}
|
|
2548
2548
|
clientStreaming(e) {
|
|
2549
|
-
const t = new ie("Client streaming is not supported by grpc-web",
|
|
2549
|
+
const t = new ie("Client streaming is not supported by grpc-web", j[j.UNIMPLEMENTED]);
|
|
2550
2550
|
throw t.methodName = e.name, t.serviceName = e.service.typeName, t;
|
|
2551
2551
|
}
|
|
2552
2552
|
duplex(e) {
|
|
2553
|
-
const t = new ie("Duplex streaming is not supported by grpc-web",
|
|
2553
|
+
const t = new ie("Duplex streaming is not supported by grpc-web", j[j.UNIMPLEMENTED]);
|
|
2554
2554
|
throw t.methodName = e.name, t.serviceName = e.service.typeName, t;
|
|
2555
2555
|
}
|
|
2556
2556
|
serverStreaming(e, t, n) {
|
|
2557
2557
|
var r, i, o, a;
|
|
2558
|
-
let c = n, h = (r = c.format) !== null && r !== void 0 ? r : "text", l = (i = c.fetchInit) !== null && i !== void 0 ? i : {}, u = this.makeUrl(e, c), d = e.I.toBinary(t, c.binaryOptions), f = new At(), y = new Si(),
|
|
2558
|
+
let c = n, h = (r = c.format) !== null && r !== void 0 ? r : "text", l = (i = c.fetchInit) !== null && i !== void 0 ? i : {}, u = this.makeUrl(e, c), d = e.I.toBinary(t, c.binaryOptions), f = new At(), y = new Si(), F = !0, I, C = new At(), R, O = new At();
|
|
2559
2559
|
return globalThis.fetch(u, Object.assign(Object.assign({}, l), {
|
|
2560
2560
|
method: "POST",
|
|
2561
2561
|
headers: dr(new globalThis.Headers(), h, c.timeout, c.meta),
|
|
@@ -2563,46 +2563,46 @@ class qi {
|
|
|
2563
2563
|
signal: (o = n.abort) !== null && o !== void 0 ? o : null
|
|
2564
2564
|
// node-fetch@3.0.0-beta.9 rejects `undefined`
|
|
2565
2565
|
})).then((v) => {
|
|
2566
|
-
let [L, b, B] =
|
|
2567
|
-
if (f.resolve(B), L != null && L !==
|
|
2568
|
-
throw new ie(b ??
|
|
2569
|
-
return L != null && (
|
|
2570
|
-
code:
|
|
2571
|
-
detail: b ??
|
|
2566
|
+
let [L, b, B] = Zn(v);
|
|
2567
|
+
if (f.resolve(B), L != null && L !== j.OK)
|
|
2568
|
+
throw new ie(b ?? j[L], j[L], B);
|
|
2569
|
+
return L != null && (I = {
|
|
2570
|
+
code: j[L],
|
|
2571
|
+
detail: b ?? j[L]
|
|
2572
2572
|
}), v;
|
|
2573
2573
|
}).then((v) => {
|
|
2574
2574
|
if (!v.body)
|
|
2575
|
-
throw new ie("missing response body",
|
|
2575
|
+
throw new ie("missing response body", j[j.INTERNAL]);
|
|
2576
2576
|
return fr(v.body, v.headers.get("content-type"), (L, b) => {
|
|
2577
2577
|
switch (L) {
|
|
2578
2578
|
case tt.DATA:
|
|
2579
|
-
y.notifyMessage(e.O.fromBinary(b, c.binaryOptions)),
|
|
2579
|
+
y.notifyMessage(e.O.fromBinary(b, c.binaryOptions)), F = !1;
|
|
2580
2580
|
break;
|
|
2581
2581
|
case tt.TRAILER:
|
|
2582
2582
|
let B, m;
|
|
2583
|
-
[B, m, R] = ur(b),
|
|
2584
|
-
code:
|
|
2585
|
-
detail: m ??
|
|
2583
|
+
[B, m, R] = ur(b), I = {
|
|
2584
|
+
code: j[B],
|
|
2585
|
+
detail: m ?? j[B]
|
|
2586
2586
|
};
|
|
2587
2587
|
break;
|
|
2588
2588
|
}
|
|
2589
2589
|
});
|
|
2590
2590
|
}).then(() => {
|
|
2591
|
-
if (!R && !
|
|
2592
|
-
throw new ie("missing trailers",
|
|
2593
|
-
if (!
|
|
2594
|
-
throw new ie("missing status",
|
|
2595
|
-
if (
|
|
2596
|
-
throw new ie(
|
|
2597
|
-
y.notifyComplete(), C.resolve(
|
|
2591
|
+
if (!R && !F)
|
|
2592
|
+
throw new ie("missing trailers", j[j.DATA_LOSS]);
|
|
2593
|
+
if (!I)
|
|
2594
|
+
throw new ie("missing status", j[j.INTERNAL]);
|
|
2595
|
+
if (I.code !== "OK")
|
|
2596
|
+
throw new ie(I.detail, I.code, R);
|
|
2597
|
+
y.notifyComplete(), C.resolve(I), O.resolve(R || {});
|
|
2598
2598
|
}).catch((v) => {
|
|
2599
2599
|
let L;
|
|
2600
|
-
v instanceof ie ? L = v : v instanceof Error && v.name === "AbortError" ? L = new ie(v.message,
|
|
2600
|
+
v instanceof ie ? L = v : v instanceof Error && v.name === "AbortError" ? L = new ie(v.message, j[j.CANCELLED]) : L = new ie(v instanceof Error ? v.message : "" + v, j[j.INTERNAL]), L.methodName = e.name, L.serviceName = e.service.typeName, f.rejectPending(L), y.notifyError(L), C.rejectPending(L), O.rejectPending(L);
|
|
2601
2601
|
}), new Vi(e, (a = c.meta) !== null && a !== void 0 ? a : {}, t, f.promise, y, C.promise, O.promise);
|
|
2602
2602
|
}
|
|
2603
2603
|
unary(e, t, n) {
|
|
2604
2604
|
var r, i, o, a;
|
|
2605
|
-
let c = n, h = (r = c.format) !== null && r !== void 0 ? r : "text", l = (i = c.fetchInit) !== null && i !== void 0 ? i : {}, u = this.makeUrl(e, c), d = e.I.toBinary(t, c.binaryOptions), f = new At(), y,
|
|
2605
|
+
let c = n, h = (r = c.format) !== null && r !== void 0 ? r : "text", l = (i = c.fetchInit) !== null && i !== void 0 ? i : {}, u = this.makeUrl(e, c), d = e.I.toBinary(t, c.binaryOptions), f = new At(), y, F = new At(), I, C = new At(), R, O = new At();
|
|
2606
2606
|
return globalThis.fetch(u, Object.assign(Object.assign({}, l), {
|
|
2607
2607
|
method: "POST",
|
|
2608
2608
|
headers: dr(new globalThis.Headers(), h, c.timeout, c.meta),
|
|
@@ -2610,52 +2610,52 @@ class qi {
|
|
|
2610
2610
|
signal: (o = n.abort) !== null && o !== void 0 ? o : null
|
|
2611
2611
|
// node-fetch@3.0.0-beta.9 rejects `undefined`
|
|
2612
2612
|
})).then((v) => {
|
|
2613
|
-
let [L, b, B] =
|
|
2614
|
-
if (f.resolve(B), L != null && L !==
|
|
2615
|
-
throw new ie(b ??
|
|
2616
|
-
return L != null && (
|
|
2617
|
-
code:
|
|
2618
|
-
detail: b ??
|
|
2613
|
+
let [L, b, B] = Zn(v);
|
|
2614
|
+
if (f.resolve(B), L != null && L !== j.OK)
|
|
2615
|
+
throw new ie(b ?? j[L], j[L], B);
|
|
2616
|
+
return L != null && (I = {
|
|
2617
|
+
code: j[L],
|
|
2618
|
+
detail: b ?? j[L]
|
|
2619
2619
|
}), v;
|
|
2620
2620
|
}).then((v) => {
|
|
2621
2621
|
if (!v.body)
|
|
2622
|
-
throw new ie("missing response body",
|
|
2622
|
+
throw new ie("missing response body", j[j.INTERNAL]);
|
|
2623
2623
|
return fr(v.body, v.headers.get("content-type"), (L, b) => {
|
|
2624
2624
|
switch (L) {
|
|
2625
2625
|
case tt.DATA:
|
|
2626
2626
|
if (y)
|
|
2627
|
-
throw new ie("unary call received 2nd message",
|
|
2627
|
+
throw new ie("unary call received 2nd message", j[j.DATA_LOSS]);
|
|
2628
2628
|
y = e.O.fromBinary(b, c.binaryOptions);
|
|
2629
2629
|
break;
|
|
2630
2630
|
case tt.TRAILER:
|
|
2631
2631
|
let B, m;
|
|
2632
|
-
[B, m, R] = ur(b),
|
|
2633
|
-
code:
|
|
2634
|
-
detail: m ??
|
|
2632
|
+
[B, m, R] = ur(b), I = {
|
|
2633
|
+
code: j[B],
|
|
2634
|
+
detail: m ?? j[B]
|
|
2635
2635
|
};
|
|
2636
2636
|
break;
|
|
2637
2637
|
}
|
|
2638
2638
|
});
|
|
2639
2639
|
}).then(() => {
|
|
2640
2640
|
if (!R && y)
|
|
2641
|
-
throw new ie("missing trailers",
|
|
2642
|
-
if (!
|
|
2643
|
-
throw new ie("missing status",
|
|
2644
|
-
if (!y &&
|
|
2645
|
-
throw new ie("expected error status",
|
|
2641
|
+
throw new ie("missing trailers", j[j.DATA_LOSS]);
|
|
2642
|
+
if (!I)
|
|
2643
|
+
throw new ie("missing status", j[j.INTERNAL]);
|
|
2644
|
+
if (!y && I.code === "OK")
|
|
2645
|
+
throw new ie("expected error status", j[j.DATA_LOSS]);
|
|
2646
2646
|
if (!y)
|
|
2647
|
-
throw new ie(
|
|
2648
|
-
if (
|
|
2649
|
-
throw new ie(
|
|
2650
|
-
C.resolve(
|
|
2647
|
+
throw new ie(I.detail, I.code, R);
|
|
2648
|
+
if (F.resolve(y), I.code !== "OK")
|
|
2649
|
+
throw new ie(I.detail, I.code, R);
|
|
2650
|
+
C.resolve(I), O.resolve(R || {});
|
|
2651
2651
|
}).catch((v) => {
|
|
2652
2652
|
let L;
|
|
2653
|
-
v instanceof ie ? L = v : v instanceof Error && v.name === "AbortError" ? L = new ie(v.message,
|
|
2654
|
-
}), new Di(e, (a = c.meta) !== null && a !== void 0 ? a : {}, t, f.promise,
|
|
2653
|
+
v instanceof ie ? L = v : v instanceof Error && v.name === "AbortError" ? L = new ie(v.message, j[j.CANCELLED]) : L = new ie(v instanceof Error ? v.message : "" + v, j[j.INTERNAL]), L.methodName = e.name, L.serviceName = e.service.typeName, f.rejectPending(L), F.rejectPending(L), C.rejectPending(L), O.rejectPending(L);
|
|
2654
|
+
}), new Di(e, (a = c.meta) !== null && a !== void 0 ? a : {}, t, f.promise, F.promise, C.promise, O.promise);
|
|
2655
2655
|
}
|
|
2656
2656
|
}
|
|
2657
|
-
var
|
|
2658
|
-
class
|
|
2657
|
+
var Un = /* @__PURE__ */ ((s) => (s[s.IMAGE = 0] = "IMAGE", s[s.AUDIO = 1] = "AUDIO", s[s.VIDEO = 2] = "VIDEO", s[s.ALL = 3] = "ALL", s[s.FOLDER = 4] = "FOLDER", s))(Un || {});
|
|
2658
|
+
class Ki extends Fe {
|
|
2659
2659
|
constructor() {
|
|
2660
2660
|
super("com.hamropatro.grpc.common.SearchRequest", [
|
|
2661
2661
|
{
|
|
@@ -2713,13 +2713,13 @@ class zi extends Ie {
|
|
|
2713
2713
|
return i;
|
|
2714
2714
|
}
|
|
2715
2715
|
internalBinaryWrite(e, t, n) {
|
|
2716
|
-
e.searchValue !== "" && t.tag(1,
|
|
2716
|
+
e.searchValue !== "" && t.tag(1, W.LengthDelimited).string(e.searchValue), e.cursor !== "" && t.tag(2, W.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(3, W.Varint).int32(e.limit);
|
|
2717
2717
|
let r = n.writeUnknownFields;
|
|
2718
2718
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
2719
2719
|
}
|
|
2720
2720
|
}
|
|
2721
|
-
const Mr = new
|
|
2722
|
-
class
|
|
2721
|
+
const Mr = new Ki();
|
|
2722
|
+
class zi extends Fe {
|
|
2723
2723
|
constructor() {
|
|
2724
2724
|
super("com.hamropatro.grpc.common.SearchResult", [
|
|
2725
2725
|
{ no: 1, name: "items", kind: "message", repeat: 1, T: () => nt },
|
|
@@ -2761,14 +2761,14 @@ class Ki extends Ie {
|
|
|
2761
2761
|
}
|
|
2762
2762
|
internalBinaryWrite(e, t, n) {
|
|
2763
2763
|
for (let i = 0; i < e.items.length; i++)
|
|
2764
|
-
nt.internalBinaryWrite(e.items[i], t.tag(1,
|
|
2765
|
-
e.nextPageCursor !== "" && t.tag(2,
|
|
2764
|
+
nt.internalBinaryWrite(e.items[i], t.tag(1, W.LengthDelimited).fork(), n).join();
|
|
2765
|
+
e.nextPageCursor !== "" && t.tag(2, W.LengthDelimited).string(e.nextPageCursor);
|
|
2766
2766
|
let r = n.writeUnknownFields;
|
|
2767
2767
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
2768
2768
|
}
|
|
2769
2769
|
}
|
|
2770
|
-
const Xi = new
|
|
2771
|
-
class Gi extends
|
|
2770
|
+
const Xi = new zi();
|
|
2771
|
+
class Gi extends Fe {
|
|
2772
2772
|
constructor() {
|
|
2773
2773
|
super("com.hamropatro.grpc.common.CreateFileRequest", [
|
|
2774
2774
|
{
|
|
@@ -2799,7 +2799,7 @@ class Gi extends Ie {
|
|
|
2799
2799
|
T: 9
|
|
2800
2800
|
/*ScalarType.STRING*/
|
|
2801
2801
|
},
|
|
2802
|
-
{ no: 5, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType",
|
|
2802
|
+
{ no: 5, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType", Un] },
|
|
2803
2803
|
{
|
|
2804
2804
|
no: 6,
|
|
2805
2805
|
name: "extension",
|
|
@@ -2853,13 +2853,13 @@ class Gi extends Ie {
|
|
|
2853
2853
|
return i;
|
|
2854
2854
|
}
|
|
2855
2855
|
internalBinaryWrite(e, t, n) {
|
|
2856
|
-
e.name !== "" && t.tag(1,
|
|
2856
|
+
e.name !== "" && t.tag(1, W.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(2, W.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(3, W.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(4, W.LengthDelimited).string(e.url), e.type !== 0 && t.tag(5, W.Varint).int32(e.type), e.extension !== "" && t.tag(6, W.LengthDelimited).string(e.extension);
|
|
2857
2857
|
let r = n.writeUnknownFields;
|
|
2858
2858
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
2859
2859
|
}
|
|
2860
2860
|
}
|
|
2861
2861
|
const Vr = new Gi();
|
|
2862
|
-
class Ji extends
|
|
2862
|
+
class Ji extends Fe {
|
|
2863
2863
|
constructor() {
|
|
2864
2864
|
super("com.hamropatro.grpc.common.CreateUserFileRequest", [
|
|
2865
2865
|
{
|
|
@@ -2869,7 +2869,7 @@ class Ji extends Ie {
|
|
|
2869
2869
|
T: 9
|
|
2870
2870
|
/*ScalarType.STRING*/
|
|
2871
2871
|
},
|
|
2872
|
-
{ no: 2, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType",
|
|
2872
|
+
{ no: 2, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType", Un] },
|
|
2873
2873
|
{
|
|
2874
2874
|
no: 3,
|
|
2875
2875
|
name: "extension",
|
|
@@ -2911,13 +2911,13 @@ class Ji extends Ie {
|
|
|
2911
2911
|
return i;
|
|
2912
2912
|
}
|
|
2913
2913
|
internalBinaryWrite(e, t, n) {
|
|
2914
|
-
e.url !== "" && t.tag(1,
|
|
2914
|
+
e.url !== "" && t.tag(1, W.LengthDelimited).string(e.url), e.type !== 0 && t.tag(2, W.Varint).int32(e.type), e.extension !== "" && t.tag(3, W.LengthDelimited).string(e.extension);
|
|
2915
2915
|
let r = n.writeUnknownFields;
|
|
2916
2916
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
2917
2917
|
}
|
|
2918
2918
|
}
|
|
2919
2919
|
const Jn = new Ji();
|
|
2920
|
-
class
|
|
2920
|
+
class Qi extends Fe {
|
|
2921
2921
|
constructor() {
|
|
2922
2922
|
super("com.hamropatro.grpc.common.File", [
|
|
2923
2923
|
{
|
|
@@ -2969,8 +2969,8 @@ class Yi extends Ie {
|
|
|
2969
2969
|
T: 9
|
|
2970
2970
|
/*ScalarType.STRING*/
|
|
2971
2971
|
},
|
|
2972
|
-
{ no: 8, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType",
|
|
2973
|
-
{ no: 9, name: "metadata", kind: "message", T: () =>
|
|
2972
|
+
{ no: 8, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType", Un] },
|
|
2973
|
+
{ no: 9, name: "metadata", kind: "message", T: () => On }
|
|
2974
2974
|
]);
|
|
2975
2975
|
}
|
|
2976
2976
|
create(e) {
|
|
@@ -3016,7 +3016,7 @@ class Yi extends Ie {
|
|
|
3016
3016
|
break;
|
|
3017
3017
|
case /* com.hamropatro.grpc.common.FileMetadata metadata */
|
|
3018
3018
|
9:
|
|
3019
|
-
i.metadata =
|
|
3019
|
+
i.metadata = On.internalBinaryRead(e, e.uint32(), n, i.metadata);
|
|
3020
3020
|
break;
|
|
3021
3021
|
default:
|
|
3022
3022
|
let h = n.readUnknownField;
|
|
@@ -3029,13 +3029,13 @@ class Yi extends Ie {
|
|
|
3029
3029
|
return i;
|
|
3030
3030
|
}
|
|
3031
3031
|
internalBinaryWrite(e, t, n) {
|
|
3032
|
-
e.key !== "" && t.tag(1,
|
|
3032
|
+
e.key !== "" && t.tag(1, W.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, W.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(3, W.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(4, W.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(5, W.LengthDelimited).string(e.url), e.thumborUrl !== "" && t.tag(6, W.LengthDelimited).string(e.thumborUrl), e.proxyUrl !== "" && t.tag(7, W.LengthDelimited).string(e.proxyUrl), e.type !== 0 && t.tag(8, W.Varint).int32(e.type), e.metadata && On.internalBinaryWrite(e.metadata, t.tag(9, W.LengthDelimited).fork(), n).join();
|
|
3033
3033
|
let r = n.writeUnknownFields;
|
|
3034
3034
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3035
3035
|
}
|
|
3036
3036
|
}
|
|
3037
|
-
const nt = new
|
|
3038
|
-
class
|
|
3037
|
+
const nt = new Qi();
|
|
3038
|
+
class Yi extends Fe {
|
|
3039
3039
|
constructor() {
|
|
3040
3040
|
super("com.hamropatro.grpc.common.FileMetadata", [
|
|
3041
3041
|
{
|
|
@@ -3104,13 +3104,13 @@ class Qi extends Ie {
|
|
|
3104
3104
|
return i;
|
|
3105
3105
|
}
|
|
3106
3106
|
internalBinaryWrite(e, t, n) {
|
|
3107
|
-
e.height !== 0 && t.tag(1,
|
|
3107
|
+
e.height !== 0 && t.tag(1, W.Varint).int32(e.height), e.width !== 0 && t.tag(2, W.Varint).int32(e.width), e.backgroundColor !== "" && t.tag(3, W.LengthDelimited).string(e.backgroundColor), e.aspectRatio !== 0 && t.tag(4, W.Bit64).double(e.aspectRatio);
|
|
3108
3108
|
let r = n.writeUnknownFields;
|
|
3109
3109
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3110
3110
|
}
|
|
3111
3111
|
}
|
|
3112
|
-
const
|
|
3113
|
-
class es extends
|
|
3112
|
+
const On = new Yi();
|
|
3113
|
+
class es extends Fe {
|
|
3114
3114
|
constructor() {
|
|
3115
3115
|
super("com.hamropatro.grpc.common.DeleteFileRequest", [
|
|
3116
3116
|
{
|
|
@@ -3146,13 +3146,13 @@ class es extends Ie {
|
|
|
3146
3146
|
return i;
|
|
3147
3147
|
}
|
|
3148
3148
|
internalBinaryWrite(e, t, n) {
|
|
3149
|
-
e.key !== "" && t.tag(1,
|
|
3149
|
+
e.key !== "" && t.tag(1, W.LengthDelimited).string(e.key);
|
|
3150
3150
|
let r = n.writeUnknownFields;
|
|
3151
3151
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3152
3152
|
}
|
|
3153
3153
|
}
|
|
3154
3154
|
const Hr = new es();
|
|
3155
|
-
class ts extends
|
|
3155
|
+
class ts extends Fe {
|
|
3156
3156
|
constructor() {
|
|
3157
3157
|
super("com.hamropatro.grpc.common.DeleteFileResponse", [
|
|
3158
3158
|
{
|
|
@@ -3188,13 +3188,13 @@ class ts extends Ie {
|
|
|
3188
3188
|
return i;
|
|
3189
3189
|
}
|
|
3190
3190
|
internalBinaryWrite(e, t, n) {
|
|
3191
|
-
e.isDeleted !== !1 && t.tag(1,
|
|
3191
|
+
e.isDeleted !== !1 && t.tag(1, W.Varint).bool(e.isDeleted);
|
|
3192
3192
|
let r = n.writeUnknownFields;
|
|
3193
3193
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3194
3194
|
}
|
|
3195
3195
|
}
|
|
3196
3196
|
const ns = new ts();
|
|
3197
|
-
class rs extends
|
|
3197
|
+
class rs extends Fe {
|
|
3198
3198
|
constructor() {
|
|
3199
3199
|
super("com.hamropatro.grpc.common.GetFilesByFolderRequest", [
|
|
3200
3200
|
{
|
|
@@ -3252,13 +3252,13 @@ class rs extends Ie {
|
|
|
3252
3252
|
return i;
|
|
3253
3253
|
}
|
|
3254
3254
|
internalBinaryWrite(e, t, n) {
|
|
3255
|
-
e.folderName !== "" && t.tag(1,
|
|
3255
|
+
e.folderName !== "" && t.tag(1, W.LengthDelimited).string(e.folderName), e.cursor !== "" && t.tag(2, W.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(3, W.Varint).int32(e.limit);
|
|
3256
3256
|
let r = n.writeUnknownFields;
|
|
3257
3257
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3258
3258
|
}
|
|
3259
3259
|
}
|
|
3260
|
-
const
|
|
3261
|
-
class is extends
|
|
3260
|
+
const Pr = new rs();
|
|
3261
|
+
class is extends Fe {
|
|
3262
3262
|
constructor() {
|
|
3263
3263
|
super("com.hamropatro.grpc.common.GetFilesByFolderResponse", [
|
|
3264
3264
|
{ no: 1, name: "files", kind: "message", repeat: 1, T: () => nt },
|
|
@@ -3311,25 +3311,25 @@ class is extends Ie {
|
|
|
3311
3311
|
}
|
|
3312
3312
|
internalBinaryWrite(e, t, n) {
|
|
3313
3313
|
for (let i = 0; i < e.files.length; i++)
|
|
3314
|
-
nt.internalBinaryWrite(e.files[i], t.tag(1,
|
|
3315
|
-
e.nextCursor !== "" && t.tag(2,
|
|
3314
|
+
nt.internalBinaryWrite(e.files[i], t.tag(1, W.LengthDelimited).fork(), n).join();
|
|
3315
|
+
e.nextCursor !== "" && t.tag(2, W.LengthDelimited).string(e.nextCursor), e.hasMore !== !1 && t.tag(3, W.Varint).bool(e.hasMore);
|
|
3316
3316
|
let r = n.writeUnknownFields;
|
|
3317
3317
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3318
3318
|
}
|
|
3319
3319
|
}
|
|
3320
|
-
const ss = new is(),
|
|
3320
|
+
const ss = new is(), Sn = new Gn("com.hamropatro.grpc.common.FileService", [
|
|
3321
3321
|
{ name: "createFile", options: {}, I: Vr, O: nt },
|
|
3322
3322
|
{ name: "updateFile", options: {}, I: nt, O: nt },
|
|
3323
3323
|
{ name: "deleteFile", options: {}, I: Hr, O: ns },
|
|
3324
|
-
{ name: "getFilesByFolder", options: {}, I:
|
|
3324
|
+
{ name: "getFilesByFolder", options: {}, I: Pr, O: ss },
|
|
3325
3325
|
{ name: "createUserFile", options: {}, I: Jn, O: nt },
|
|
3326
3326
|
{ name: "search", options: {}, I: Mr, O: Xi }
|
|
3327
3327
|
]);
|
|
3328
|
-
class
|
|
3328
|
+
class Mt {
|
|
3329
3329
|
constructor(e) {
|
|
3330
|
-
he(this, "typeName",
|
|
3331
|
-
he(this, "methods",
|
|
3332
|
-
he(this, "options",
|
|
3330
|
+
he(this, "typeName", Sn.typeName);
|
|
3331
|
+
he(this, "methods", Sn.methods);
|
|
3332
|
+
he(this, "options", Sn.options);
|
|
3333
3333
|
this._transport = e;
|
|
3334
3334
|
}
|
|
3335
3335
|
/**
|
|
@@ -3380,7 +3380,7 @@ class Dt {
|
|
|
3380
3380
|
const os = async (s, e, t, n, r, i) => {
|
|
3381
3381
|
var o;
|
|
3382
3382
|
try {
|
|
3383
|
-
const a = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, c = new
|
|
3383
|
+
const a = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, c = new Mt(a), h = Vr.create();
|
|
3384
3384
|
return h.name = s, h.nestedFolderName = e, h.url = t, h.type = n, h.folderName = r, await c.createFile(
|
|
3385
3385
|
h,
|
|
3386
3386
|
i
|
|
@@ -3391,7 +3391,7 @@ const os = async (s, e, t, n, r, i) => {
|
|
|
3391
3391
|
}, as = async (s, e, t) => {
|
|
3392
3392
|
var n;
|
|
3393
3393
|
try {
|
|
3394
|
-
const r = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, i = new
|
|
3394
|
+
const r = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, i = new Mt(r), o = Jn.create();
|
|
3395
3395
|
return o.url = s, o.type = e, await i.createUserFile(
|
|
3396
3396
|
o,
|
|
3397
3397
|
t
|
|
@@ -3402,7 +3402,7 @@ const os = async (s, e, t, n, r, i) => {
|
|
|
3402
3402
|
}, ls = async (s, e, t) => {
|
|
3403
3403
|
var n, r;
|
|
3404
3404
|
try {
|
|
3405
|
-
const i = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, o = (r = window.ImageSalonSDK) == null ? void 0 : r.mode, a = new
|
|
3405
|
+
const i = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, o = (r = window.ImageSalonSDK) == null ? void 0 : r.mode, a = new Mt(i), c = Jn.create();
|
|
3406
3406
|
return c.url = s, c.type = e, await a.createUserFile(
|
|
3407
3407
|
c,
|
|
3408
3408
|
{
|
|
@@ -3418,7 +3418,7 @@ const os = async (s, e, t, n, r, i) => {
|
|
|
3418
3418
|
}, cs = async (s, e, t, n) => {
|
|
3419
3419
|
var r;
|
|
3420
3420
|
try {
|
|
3421
|
-
const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new
|
|
3421
|
+
const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Mt(i), a = Pr.create();
|
|
3422
3422
|
return a.folderName = s, a.cursor = e, a.limit = t, await o.getFilesByFolder(
|
|
3423
3423
|
a,
|
|
3424
3424
|
n
|
|
@@ -3429,7 +3429,7 @@ const os = async (s, e, t, n, r, i) => {
|
|
|
3429
3429
|
}, ds = async (s, e, t = 20, n) => {
|
|
3430
3430
|
var r;
|
|
3431
3431
|
try {
|
|
3432
|
-
const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new
|
|
3432
|
+
const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Mt(i), a = Mr.create();
|
|
3433
3433
|
return a.searchValue = s, a.cursor = e, a.limit = t, await o.search(
|
|
3434
3434
|
a,
|
|
3435
3435
|
n
|
|
@@ -3440,7 +3440,7 @@ const os = async (s, e, t, n, r, i) => {
|
|
|
3440
3440
|
}, hs = async (s, e, t, n, r, i, o, a, c) => {
|
|
3441
3441
|
var h;
|
|
3442
3442
|
try {
|
|
3443
|
-
const l = (h = window.ImageSalonSDK) == null ? void 0 : h.grpcConfig, u = new
|
|
3443
|
+
const l = (h = window.ImageSalonSDK) == null ? void 0 : h.grpcConfig, u = new Mt(l), d = nt.create();
|
|
3444
3444
|
return d.key = s, d.name = e, d.nestedFolderName = t, d.url = n, d.thumborUrl = r, d.proxyUrl = i, d.type = o, d.folderName = a, await u.updateFile(
|
|
3445
3445
|
d,
|
|
3446
3446
|
c
|
|
@@ -3451,7 +3451,7 @@ const os = async (s, e, t, n, r, i) => {
|
|
|
3451
3451
|
}, us = async (s, e) => {
|
|
3452
3452
|
var t;
|
|
3453
3453
|
try {
|
|
3454
|
-
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new
|
|
3454
|
+
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new Mt(n), i = Hr.create();
|
|
3455
3455
|
return i.key = s, await r.deleteFile(
|
|
3456
3456
|
i,
|
|
3457
3457
|
e
|
|
@@ -3460,7 +3460,7 @@ const os = async (s, e, t, n, r, i) => {
|
|
|
3460
3460
|
throw n;
|
|
3461
3461
|
}
|
|
3462
3462
|
};
|
|
3463
|
-
class fs extends
|
|
3463
|
+
class fs extends Fe {
|
|
3464
3464
|
constructor() {
|
|
3465
3465
|
super("com.hamropatro.grpc.common.DeleteFolderRequest", [
|
|
3466
3466
|
{
|
|
@@ -3496,13 +3496,13 @@ class fs extends Ie {
|
|
|
3496
3496
|
return i;
|
|
3497
3497
|
}
|
|
3498
3498
|
internalBinaryWrite(e, t, n) {
|
|
3499
|
-
e.key !== "" && t.tag(1,
|
|
3499
|
+
e.key !== "" && t.tag(1, W.LengthDelimited).string(e.key);
|
|
3500
3500
|
let r = n.writeUnknownFields;
|
|
3501
3501
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3502
3502
|
}
|
|
3503
3503
|
}
|
|
3504
|
-
const
|
|
3505
|
-
class ps extends
|
|
3504
|
+
const $r = new fs();
|
|
3505
|
+
class ps extends Fe {
|
|
3506
3506
|
constructor() {
|
|
3507
3507
|
super("com.hamropatro.grpc.common.CreateFolderRequest", [
|
|
3508
3508
|
{
|
|
@@ -3571,13 +3571,13 @@ class ps extends Ie {
|
|
|
3571
3571
|
return i;
|
|
3572
3572
|
}
|
|
3573
3573
|
internalBinaryWrite(e, t, n) {
|
|
3574
|
-
e.name !== "" && t.tag(1,
|
|
3574
|
+
e.name !== "" && t.tag(1, W.LengthDelimited).string(e.name), e.nestedFolderName !== "" && t.tag(2, W.LengthDelimited).string(e.nestedFolderName), e.createdBy !== "" && t.tag(3, W.LengthDelimited).string(e.createdBy), e.forUser !== !1 && t.tag(4, W.Varint).bool(e.forUser);
|
|
3575
3575
|
let r = n.writeUnknownFields;
|
|
3576
3576
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3577
3577
|
}
|
|
3578
3578
|
}
|
|
3579
|
-
const
|
|
3580
|
-
class ms extends
|
|
3579
|
+
const Wr = new ps();
|
|
3580
|
+
class ms extends Fe {
|
|
3581
3581
|
constructor() {
|
|
3582
3582
|
super("com.hamropatro.grpc.common.GetAllFoldersRequest", [
|
|
3583
3583
|
{
|
|
@@ -3624,13 +3624,13 @@ class ms extends Ie {
|
|
|
3624
3624
|
return i;
|
|
3625
3625
|
}
|
|
3626
3626
|
internalBinaryWrite(e, t, n) {
|
|
3627
|
-
e.cursor !== "" && t.tag(1,
|
|
3627
|
+
e.cursor !== "" && t.tag(1, W.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(2, W.Varint).int32(e.limit);
|
|
3628
3628
|
let r = n.writeUnknownFields;
|
|
3629
3629
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3630
3630
|
}
|
|
3631
3631
|
}
|
|
3632
|
-
const
|
|
3633
|
-
class gs extends
|
|
3632
|
+
const Kn = new ms();
|
|
3633
|
+
class gs extends Fe {
|
|
3634
3634
|
constructor() {
|
|
3635
3635
|
super("com.hamropatro.grpc.common.GetAllFoldersResponse", [
|
|
3636
3636
|
{ no: 1, name: "folder", kind: "message", repeat: 1, T: () => Ct },
|
|
@@ -3683,14 +3683,14 @@ class gs extends Ie {
|
|
|
3683
3683
|
}
|
|
3684
3684
|
internalBinaryWrite(e, t, n) {
|
|
3685
3685
|
for (let i = 0; i < e.folder.length; i++)
|
|
3686
|
-
Ct.internalBinaryWrite(e.folder[i], t.tag(1,
|
|
3687
|
-
e.nextCursor !== "" && t.tag(2,
|
|
3686
|
+
Ct.internalBinaryWrite(e.folder[i], t.tag(1, W.LengthDelimited).fork(), n).join();
|
|
3687
|
+
e.nextCursor !== "" && t.tag(2, W.LengthDelimited).string(e.nextCursor), e.hasMore !== !1 && t.tag(3, W.Varint).bool(e.hasMore);
|
|
3688
3688
|
let r = n.writeUnknownFields;
|
|
3689
3689
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3690
3690
|
}
|
|
3691
3691
|
}
|
|
3692
3692
|
const mr = new gs();
|
|
3693
|
-
class ws extends
|
|
3693
|
+
class ws extends Fe {
|
|
3694
3694
|
constructor() {
|
|
3695
3695
|
super("com.hamropatro.grpc.common.Empty", []);
|
|
3696
3696
|
}
|
|
@@ -3707,7 +3707,7 @@ class ws extends Ie {
|
|
|
3707
3707
|
}
|
|
3708
3708
|
}
|
|
3709
3709
|
const gr = new ws();
|
|
3710
|
-
class ys extends
|
|
3710
|
+
class ys extends Fe {
|
|
3711
3711
|
constructor() {
|
|
3712
3712
|
super("com.hamropatro.grpc.common.Folder", [
|
|
3713
3713
|
{
|
|
@@ -3787,13 +3787,13 @@ class ys extends Ie {
|
|
|
3787
3787
|
return i;
|
|
3788
3788
|
}
|
|
3789
3789
|
internalBinaryWrite(e, t, n) {
|
|
3790
|
-
e.key !== "" && t.tag(1,
|
|
3790
|
+
e.key !== "" && t.tag(1, W.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, W.LengthDelimited).string(e.name), e.nestedFolderName !== "" && t.tag(3, W.LengthDelimited).string(e.nestedFolderName), e.createdBy !== "" && t.tag(4, W.LengthDelimited).string(e.createdBy), e.forUser !== !1 && t.tag(5, W.Varint).bool(e.forUser);
|
|
3791
3791
|
let r = n.writeUnknownFields;
|
|
3792
3792
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3793
3793
|
}
|
|
3794
3794
|
}
|
|
3795
3795
|
const Ct = new ys();
|
|
3796
|
-
class bs extends
|
|
3796
|
+
class bs extends Fe {
|
|
3797
3797
|
constructor() {
|
|
3798
3798
|
super("com.hamropatro.grpc.common.ChangeNestedFolderRequest", [
|
|
3799
3799
|
{
|
|
@@ -3840,25 +3840,25 @@ class bs extends Ie {
|
|
|
3840
3840
|
return i;
|
|
3841
3841
|
}
|
|
3842
3842
|
internalBinaryWrite(e, t, n) {
|
|
3843
|
-
e.folderKey !== "" && t.tag(1,
|
|
3843
|
+
e.folderKey !== "" && t.tag(1, W.LengthDelimited).string(e.folderKey), e.nestedFolderName !== "" && t.tag(2, W.LengthDelimited).string(e.nestedFolderName);
|
|
3844
3844
|
let r = n.writeUnknownFields;
|
|
3845
3845
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3846
3846
|
}
|
|
3847
3847
|
}
|
|
3848
|
-
const Cs = new bs(),
|
|
3849
|
-
{ name: "createFolder", options: {}, I:
|
|
3850
|
-
{ name: "getFolders", options: {}, I:
|
|
3851
|
-
{ name: "getUserFolders", options: {}, I:
|
|
3848
|
+
const Cs = new bs(), Rn = new Gn("com.hamropatro.grpc.common.FolderService", [
|
|
3849
|
+
{ name: "createFolder", options: {}, I: Wr, O: Ct },
|
|
3850
|
+
{ name: "getFolders", options: {}, I: Kn, O: mr },
|
|
3851
|
+
{ name: "getUserFolders", options: {}, I: Kn, O: mr },
|
|
3852
3852
|
{ name: "updateFolder", options: {}, I: Ct, O: Ct },
|
|
3853
|
-
{ name: "deleteFolder", options: {}, I:
|
|
3853
|
+
{ name: "deleteFolder", options: {}, I: $r, O: Ct },
|
|
3854
3854
|
{ name: "ChangeNestedFolderName", options: {}, I: Cs, O: Ct },
|
|
3855
3855
|
{ name: "setBooleanForUserFolder", options: {}, I: gr, O: gr }
|
|
3856
3856
|
]);
|
|
3857
|
-
class
|
|
3857
|
+
class xn {
|
|
3858
3858
|
constructor(e) {
|
|
3859
|
-
he(this, "typeName",
|
|
3860
|
-
he(this, "methods",
|
|
3861
|
-
he(this, "options",
|
|
3859
|
+
he(this, "typeName", Rn.typeName);
|
|
3860
|
+
he(this, "methods", Rn.methods);
|
|
3861
|
+
he(this, "options", Rn.options);
|
|
3862
3862
|
this._transport = e;
|
|
3863
3863
|
}
|
|
3864
3864
|
/**
|
|
@@ -3915,7 +3915,7 @@ class Un {
|
|
|
3915
3915
|
}
|
|
3916
3916
|
const Es = async (s, e = 20, t) => {
|
|
3917
3917
|
var o;
|
|
3918
|
-
const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new
|
|
3918
|
+
const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new xn(n), i = Kn.create();
|
|
3919
3919
|
try {
|
|
3920
3920
|
return i.cursor = s, i.limit = e, await r.getFolders(
|
|
3921
3921
|
i,
|
|
@@ -3927,7 +3927,7 @@ const Es = async (s, e = 20, t) => {
|
|
|
3927
3927
|
}, vs = async (s, e, t, n, r) => {
|
|
3928
3928
|
var i;
|
|
3929
3929
|
try {
|
|
3930
|
-
const o = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, a = new
|
|
3930
|
+
const o = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, a = new xn(o), c = Wr.create();
|
|
3931
3931
|
return c.name = s, c.nestedFolderName = e, c.createdBy = t, c.forUser = n, await a.createFolder(
|
|
3932
3932
|
c,
|
|
3933
3933
|
r
|
|
@@ -3938,7 +3938,7 @@ const Es = async (s, e = 20, t) => {
|
|
|
3938
3938
|
}, As = async (s, e, t, n, r) => {
|
|
3939
3939
|
var i;
|
|
3940
3940
|
try {
|
|
3941
|
-
const o = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, a = new
|
|
3941
|
+
const o = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, a = new xn(o), c = Ct.create();
|
|
3942
3942
|
return c.name = e, c.key = s, c.nestedFolderName = t, c.createdBy = n, await a.updateFolder(
|
|
3943
3943
|
c,
|
|
3944
3944
|
r
|
|
@@ -3949,7 +3949,7 @@ const Es = async (s, e = 20, t) => {
|
|
|
3949
3949
|
}, ks = async (s, e) => {
|
|
3950
3950
|
var t;
|
|
3951
3951
|
try {
|
|
3952
|
-
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new
|
|
3952
|
+
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new xn(n), i = $r.create();
|
|
3953
3953
|
return i.key = s, await r.deleteFolder(
|
|
3954
3954
|
i,
|
|
3955
3955
|
e
|
|
@@ -3957,7 +3957,7 @@ const Es = async (s, e = 20, t) => {
|
|
|
3957
3957
|
} catch (n) {
|
|
3958
3958
|
throw n;
|
|
3959
3959
|
}
|
|
3960
|
-
},
|
|
3960
|
+
}, Dn = (s, e, t) => {
|
|
3961
3961
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3962
3962
|
n.setAttribute("xmlns", "http://www.w3.org/2000/svg"), n.setAttribute("width", s || "20"), n.setAttribute("height", e || "20"), n.setAttribute("viewBox", "0 0 24 24"), n.setAttribute("fill", "none"), n.setAttribute("stroke", t || "#ee3f3f"), n.setAttribute("stroke-width", "2"), n.setAttribute("stroke-linecap", "round"), n.setAttribute("stroke-linejoin", "round"), n.classList.add("lucide", "lucide-circle-alert");
|
|
3963
3963
|
const r = document.createElementNS(
|
|
@@ -3970,7 +3970,7 @@ const Es = async (s, e = 20, t) => {
|
|
|
3970
3970
|
const o = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
3971
3971
|
return o.setAttribute("x1", "12"), o.setAttribute("x2", "12.01"), o.setAttribute("y1", "16"), o.setAttribute("y2", "16"), n.appendChild(r), n.appendChild(i), n.appendChild(o), n;
|
|
3972
3972
|
};
|
|
3973
|
-
function
|
|
3973
|
+
function mn(s = "24px", e = "24px", t = "#333") {
|
|
3974
3974
|
const n = document.createElementNS(
|
|
3975
3975
|
"http://www.w3.org/2000/svg",
|
|
3976
3976
|
"svg"
|
|
@@ -3982,7 +3982,7 @@ function pn(s = "24px", e = "24px", t = "#333") {
|
|
|
3982
3982
|
"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"
|
|
3983
3983
|
), n.appendChild(r), n;
|
|
3984
3984
|
}
|
|
3985
|
-
function
|
|
3985
|
+
function Fs() {
|
|
3986
3986
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3987
3987
|
s.setAttribute("xmlns", "http://www.w3.org/2000/svg"), s.setAttribute("width", "12"), s.setAttribute("height", "12"), s.setAttribute("viewBox", "0 0 24 24"), s.setAttribute("fill", "none"), s.setAttribute("stroke", "currentColor"), s.setAttribute("stroke-width", "2"), s.setAttribute("stroke-linecap", "round"), s.setAttribute("stroke-linejoin", "round"), s.classList.add("lucide", "lucide-music-4");
|
|
3988
3988
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -4031,7 +4031,7 @@ function yr() {
|
|
|
4031
4031
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
4032
4032
|
return t.setAttribute("d", "m15 5 4 4"), s.appendChild(e), s.appendChild(t), document.body.appendChild(s), s;
|
|
4033
4033
|
}
|
|
4034
|
-
function
|
|
4034
|
+
function en() {
|
|
4035
4035
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4036
4036
|
s.setAttribute("xmlns", "http://www.w3.org/2000/folder"), s.setAttribute("x", "0px"), s.setAttribute("y", "0px"), s.setAttribute("width", "24"), s.setAttribute("height", "24"), s.setAttribute("viewBox", "0 0 48 48");
|
|
4037
4037
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -4045,7 +4045,7 @@ function Qt() {
|
|
|
4045
4045
|
"M40,12H8c-2.2,0-4,1.8-4,4v20c0,2.2,1.8,4,4,4h32c2.2,0,4-1.8,4-4V16C44,13.8,42.2,12,40,12z"
|
|
4046
4046
|
), s.appendChild(e), s.appendChild(t), s;
|
|
4047
4047
|
}
|
|
4048
|
-
function
|
|
4048
|
+
function Ns() {
|
|
4049
4049
|
const s = "http://www.w3.org/2000/svg", e = document.createElementNS(s, "svg");
|
|
4050
4050
|
e.setAttribute("width", "12"), e.setAttribute("height", "12"), e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("fill", "none"), e.setAttribute("stroke", "currentColor"), e.setAttribute("stroke-width", "3"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.classList.add("lucide", "lucide-image");
|
|
4051
4051
|
const t = document.createElementNS(s, "rect");
|
|
@@ -4055,7 +4055,7 @@ function Fs() {
|
|
|
4055
4055
|
const r = document.createElementNS(s, "path");
|
|
4056
4056
|
return r.setAttribute("d", "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"), e.appendChild(t), e.appendChild(n), e.appendChild(r), document.body.appendChild(e), e;
|
|
4057
4057
|
}
|
|
4058
|
-
function
|
|
4058
|
+
function Is() {
|
|
4059
4059
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4060
4060
|
s.setAttribute("xmlns", "http://www.w3.org/2000/svg"), s.setAttribute("height", "24px"), s.setAttribute("viewBox", "0 -960 960 960"), s.setAttribute("width", "24px"), s.setAttribute("fill", "currentColor");
|
|
4061
4061
|
const e = document.createElementNS(
|
|
@@ -4107,7 +4107,7 @@ function Cr() {
|
|
|
4107
4107
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
4108
4108
|
return i.setAttribute("x1", "14"), i.setAttribute("x2", "14"), i.setAttribute("y1", "11"), i.setAttribute("y2", "17"), s.appendChild(e), s.appendChild(t), s.appendChild(n), s.appendChild(r), s.appendChild(i), document.body.appendChild(s), s;
|
|
4109
4109
|
}
|
|
4110
|
-
function
|
|
4110
|
+
function Mn() {
|
|
4111
4111
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4112
4112
|
s.setAttribute("xmlns", "http://www.w3.org/2000/svg"), s.setAttribute("width", "24"), s.setAttribute("height", "24"), s.setAttribute("viewBox", "0 0 24 24"), s.setAttribute("fill", "none"), s.setAttribute("stroke", "currentColor"), s.setAttribute("stroke-width", "2"), s.setAttribute("stroke-linecap", "round"), s.setAttribute("stroke-linejoin", "round"), s.classList.add("lucide", "lucide-upload");
|
|
4113
4113
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -4131,35 +4131,35 @@ function Us() {
|
|
|
4131
4131
|
const n = document.createElementNS(s, "rect");
|
|
4132
4132
|
return n.setAttribute("x", "2"), n.setAttribute("y", "6"), n.setAttribute("width", "14"), n.setAttribute("height", "12"), n.setAttribute("rx", "2"), e.appendChild(t), e.appendChild(n), document.body.appendChild(e), e;
|
|
4133
4133
|
}
|
|
4134
|
-
function
|
|
4134
|
+
function Q(s, e, t, n, r) {
|
|
4135
4135
|
let i = document.createElement(s);
|
|
4136
4136
|
return e && (i.className += e), t && (i.style.cssText = t), n && (i.textContent = n), r && r.appendChild(i), i;
|
|
4137
4137
|
}
|
|
4138
|
-
var pt, Ge,
|
|
4138
|
+
var pt, Ge, Wt;
|
|
4139
4139
|
class xs {
|
|
4140
4140
|
constructor() {
|
|
4141
|
-
|
|
4142
|
-
|
|
4141
|
+
z(this, pt);
|
|
4142
|
+
z(this, Ge);
|
|
4143
4143
|
// Store the circle element as a private property
|
|
4144
|
-
|
|
4144
|
+
z(this, Wt, "#fff");
|
|
4145
4145
|
H(this, pt, document.createElementNS(
|
|
4146
4146
|
"http://www.w3.org/2000/svg",
|
|
4147
4147
|
"svg"
|
|
4148
4148
|
)), E(this, pt).setAttribute("viewBox", "25 25 50 50"), E(this, pt).classList.add("loader-svg"), H(this, Ge, document.createElementNS(
|
|
4149
4149
|
"http://www.w3.org/2000/svg",
|
|
4150
4150
|
"circle"
|
|
4151
|
-
)), E(this, Ge).setAttribute("r", "20"), E(this, Ge).setAttribute("cy", "50"), E(this, Ge).setAttribute("cx", "50"), E(this, Ge).setAttribute("stroke", E(this,
|
|
4151
|
+
)), E(this, Ge).setAttribute("r", "20"), E(this, Ge).setAttribute("cy", "50"), E(this, Ge).setAttribute("cx", "50"), E(this, Ge).setAttribute("stroke", E(this, Wt)), E(this, Ge).classList.add("loader-circle"), E(this, pt).appendChild(E(this, Ge));
|
|
4152
4152
|
}
|
|
4153
4153
|
show(e, t) {
|
|
4154
|
-
t && (H(this,
|
|
4154
|
+
t && (H(this, Wt, t), E(this, Ge).setAttribute("stroke", E(this, Wt))), e.appendChild(E(this, pt));
|
|
4155
4155
|
}
|
|
4156
4156
|
hide() {
|
|
4157
4157
|
E(this, pt).remove();
|
|
4158
4158
|
}
|
|
4159
4159
|
}
|
|
4160
|
-
pt = new WeakMap(), Ge = new WeakMap(),
|
|
4161
|
-
const Er = new xs(),
|
|
4162
|
-
class
|
|
4160
|
+
pt = new WeakMap(), Ge = new WeakMap(), Wt = new WeakMap();
|
|
4161
|
+
const Er = new xs(), gn = document.body;
|
|
4162
|
+
class jr {
|
|
4163
4163
|
constructor() {
|
|
4164
4164
|
he(this, "main");
|
|
4165
4165
|
he(this, "dialogContainer");
|
|
@@ -4173,49 +4173,49 @@ class Zr {
|
|
|
4173
4173
|
he(this, "cancelButton");
|
|
4174
4174
|
he(this, "confirmCallback");
|
|
4175
4175
|
he(this, "cancelCallback");
|
|
4176
|
-
this.main =
|
|
4176
|
+
this.main = Q("div"), this.dialog = Q("div"), this.confirmCallback = void 0, this.cancelCallback = void 0;
|
|
4177
4177
|
}
|
|
4178
4178
|
_init(e) {
|
|
4179
|
-
this.main =
|
|
4179
|
+
this.main = Q(
|
|
4180
4180
|
"div",
|
|
4181
4181
|
"dialog-presentation",
|
|
4182
4182
|
"",
|
|
4183
4183
|
"",
|
|
4184
|
-
|
|
4185
|
-
), this.main.setAttribute("role", "presentation"), this.dialogContainer =
|
|
4184
|
+
gn
|
|
4185
|
+
), this.main.setAttribute("role", "presentation"), this.dialogContainer = Q(
|
|
4186
4186
|
"div",
|
|
4187
4187
|
"dialog-container",
|
|
4188
4188
|
"",
|
|
4189
4189
|
"",
|
|
4190
4190
|
this.main
|
|
4191
|
-
), this.dialogBackdrop =
|
|
4191
|
+
), this.dialogBackdrop = Q(
|
|
4192
4192
|
"div",
|
|
4193
4193
|
"dialog-backdrop",
|
|
4194
4194
|
"",
|
|
4195
4195
|
"",
|
|
4196
4196
|
this.dialogContainer
|
|
4197
|
-
), this.dialog =
|
|
4197
|
+
), this.dialog = Q("div", "dialog", "", "", this.dialogContainer), this.dialog.setAttribute("tabIndex", "-1");
|
|
4198
4198
|
const t = document.activeElement;
|
|
4199
|
-
if (t && t !== document.body && (t.blur(), this.dialog.focus()), this.dialog.className = "dialog", this.dialogContent =
|
|
4199
|
+
if (t && t !== document.body && (t.blur(), this.dialog.focus()), this.dialog.className = "dialog", this.dialogContent = Q(
|
|
4200
4200
|
"div",
|
|
4201
4201
|
"dialog-content",
|
|
4202
4202
|
"",
|
|
4203
4203
|
"",
|
|
4204
4204
|
this.dialog
|
|
4205
|
-
), e != null && e.dialogContentStyle && Object.assign(this.dialogContent.style, e.dialogContentStyle), this.confirmButton =
|
|
4205
|
+
), e != null && e.dialogContentStyle && Object.assign(this.dialogContent.style, e.dialogContentStyle), this.confirmButton = Q(
|
|
4206
4206
|
"button",
|
|
4207
4207
|
"dialog-btn confirm",
|
|
4208
4208
|
"",
|
|
4209
4209
|
"",
|
|
4210
4210
|
this.dialogFooter
|
|
4211
|
-
), this.confirmButton.type = "button", this.cancelButton =
|
|
4211
|
+
), this.confirmButton.type = "button", this.cancelButton = Q(
|
|
4212
4212
|
"button",
|
|
4213
4213
|
"dialog-btn cancel",
|
|
4214
4214
|
"",
|
|
4215
4215
|
"",
|
|
4216
4216
|
this.dialogFooter
|
|
4217
4217
|
), this.cancelButton.type = "button", e.showCloseBtn) {
|
|
4218
|
-
const n =
|
|
4218
|
+
const n = Q(
|
|
4219
4219
|
"button",
|
|
4220
4220
|
"dialog-close-btn",
|
|
4221
4221
|
"",
|
|
@@ -4224,7 +4224,7 @@ class Zr {
|
|
|
4224
4224
|
);
|
|
4225
4225
|
n.appendChild(zn()), n.onclick = () => this.hide();
|
|
4226
4226
|
}
|
|
4227
|
-
return e.header && this._setHeader(e), this._setBody(e), this._setFooter(e), this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel",
|
|
4227
|
+
return e.header && this._setHeader(e), this._setBody(e), this._setFooter(e), this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", gn.style.overflow = "hidden", this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", gn.classList.add("dialog-visible"), new Promise((n) => {
|
|
4228
4228
|
const r = (i) => () => {
|
|
4229
4229
|
this.hide(), n(i === "confirm");
|
|
4230
4230
|
};
|
|
@@ -4232,7 +4232,7 @@ class Zr {
|
|
|
4232
4232
|
});
|
|
4233
4233
|
}
|
|
4234
4234
|
_setHeader(e) {
|
|
4235
|
-
if (this.dialogHeader =
|
|
4235
|
+
if (this.dialogHeader = Q(
|
|
4236
4236
|
"div",
|
|
4237
4237
|
"dialog-header",
|
|
4238
4238
|
"",
|
|
@@ -4241,7 +4241,7 @@ class Zr {
|
|
|
4241
4241
|
), !e.header)
|
|
4242
4242
|
this.dialogHeader.innerHTML = "";
|
|
4243
4243
|
else if (typeof e.header == "string") {
|
|
4244
|
-
const t =
|
|
4244
|
+
const t = Q(
|
|
4245
4245
|
"h4",
|
|
4246
4246
|
"dialog-header-text",
|
|
4247
4247
|
"",
|
|
@@ -4253,7 +4253,7 @@ class Zr {
|
|
|
4253
4253
|
this.dialogHeader.innerHTML = "", this.dialogHeader.appendChild(e.header);
|
|
4254
4254
|
}
|
|
4255
4255
|
_setBody(e) {
|
|
4256
|
-
this.dialogBody =
|
|
4256
|
+
this.dialogBody = Q(
|
|
4257
4257
|
"div",
|
|
4258
4258
|
"dialog-body",
|
|
4259
4259
|
"",
|
|
@@ -4262,7 +4262,7 @@ class Zr {
|
|
|
4262
4262
|
), typeof e.content == "string" ? this.dialogBody.innerHTML = e.content : (this.dialogBody.innerHTML = "", this.dialogBody.appendChild(e.content));
|
|
4263
4263
|
}
|
|
4264
4264
|
_setFooter(e) {
|
|
4265
|
-
this.dialogFooter =
|
|
4265
|
+
this.dialogFooter = Q(
|
|
4266
4266
|
"div",
|
|
4267
4267
|
"dialog-footer",
|
|
4268
4268
|
"",
|
|
@@ -4276,7 +4276,7 @@ class Zr {
|
|
|
4276
4276
|
}, 150);
|
|
4277
4277
|
}
|
|
4278
4278
|
hide() {
|
|
4279
|
-
this.main ||
|
|
4279
|
+
this.main || gn.style.removeProperty("overflow"), this.dialog.style.transform = "scale(0.8)", this.dialog.style.transition = "transform 150ms ease-out", this.dialogBackdrop.style.opacity = "0", setTimeout(() => {
|
|
4280
4280
|
this.dialogContainer.style.opacity = "0", this.dialog.style.opacity = "0", this.dialogContent.style.opacity = "0", this.main.remove();
|
|
4281
4281
|
}, 150);
|
|
4282
4282
|
}
|
|
@@ -4284,39 +4284,39 @@ class Zr {
|
|
|
4284
4284
|
e ? (Er.show(this.confirmButton), this.confirmButton.disabled = !0) : (Er.hide(), this.confirmButton.disabled = !1);
|
|
4285
4285
|
}
|
|
4286
4286
|
}
|
|
4287
|
-
const
|
|
4287
|
+
const wn = new jr(), Ce = new jr();
|
|
4288
4288
|
class _s {
|
|
4289
4289
|
constructor() {
|
|
4290
4290
|
he(this, "main");
|
|
4291
4291
|
he(this, "dialogBody");
|
|
4292
|
-
this.main =
|
|
4292
|
+
this.main = Q("div"), this.dialogBody = Q("div"), this.hide();
|
|
4293
4293
|
}
|
|
4294
4294
|
show(e) {
|
|
4295
|
-
this.main =
|
|
4295
|
+
this.main = Q("div", "popover", "", "", e.mainContainer), this.dialogBody = Q("div", "popover-body", "", "", this.main), this.main.id = e.divId, this.dialogBody.append(e.content);
|
|
4296
4296
|
}
|
|
4297
4297
|
hide() {
|
|
4298
4298
|
this.main.remove();
|
|
4299
4299
|
}
|
|
4300
4300
|
}
|
|
4301
|
-
const
|
|
4302
|
-
var
|
|
4303
|
-
const
|
|
4301
|
+
const ze = new _s();
|
|
4302
|
+
var Ye = /* @__PURE__ */ ((s) => (s[s.IMAGE = 0] = "IMAGE", s[s.AUDIO = 1] = "AUDIO", s[s.VIDEO = 2] = "VIDEO", s[s.ALL = 3] = "ALL", s[s.FOLDER = 4] = "FOLDER", s))(Ye || {});
|
|
4303
|
+
const nn = {
|
|
4304
4304
|
0: "IMAGE",
|
|
4305
4305
|
1: "AUDIO",
|
|
4306
4306
|
2: "VIDEO",
|
|
4307
4307
|
3: "ALL",
|
|
4308
4308
|
4: "FOLDER"
|
|
4309
4309
|
};
|
|
4310
|
-
function
|
|
4310
|
+
function Vn(s) {
|
|
4311
4311
|
switch (s) {
|
|
4312
4312
|
case "image":
|
|
4313
|
-
return
|
|
4313
|
+
return nn[Ye.IMAGE];
|
|
4314
4314
|
case "video":
|
|
4315
|
-
return
|
|
4315
|
+
return nn[Ye.VIDEO];
|
|
4316
4316
|
case "audio":
|
|
4317
|
-
return
|
|
4317
|
+
return nn[Ye.AUDIO];
|
|
4318
4318
|
default:
|
|
4319
|
-
return
|
|
4319
|
+
return nn[Ye.ALL];
|
|
4320
4320
|
}
|
|
4321
4321
|
}
|
|
4322
4322
|
function Bs(s) {
|
|
@@ -4361,11 +4361,11 @@ const Ss = async (s, e) => {
|
|
|
4361
4361
|
meta: t
|
|
4362
4362
|
};
|
|
4363
4363
|
};
|
|
4364
|
-
function
|
|
4364
|
+
function K(s, e) {
|
|
4365
4365
|
const t = document.createElement("div");
|
|
4366
4366
|
return s && (t.className = s), e && (t.id = e), t;
|
|
4367
4367
|
}
|
|
4368
|
-
function
|
|
4368
|
+
function tn(s, e, t) {
|
|
4369
4369
|
const n = document.createElement("p");
|
|
4370
4370
|
return e && (n.className = e), t && (n.id = t), s && (n.textContent = s), n;
|
|
4371
4371
|
}
|
|
@@ -4389,7 +4389,7 @@ function He(s, e, t, n, r) {
|
|
|
4389
4389
|
const i = document.createElement("button");
|
|
4390
4390
|
return e && (i.className = e), t && (i.id = t), s && (i.textContent = s), r && (i.innerHTML = r), i.disabled = n, i;
|
|
4391
4391
|
}
|
|
4392
|
-
function
|
|
4392
|
+
function Hn(s, e, t) {
|
|
4393
4393
|
const n = document.createElement("input");
|
|
4394
4394
|
return n.className = e, n.defaultValue = t, s && (n.type = s), n;
|
|
4395
4395
|
}
|
|
@@ -4405,7 +4405,7 @@ function Ms(s, e) {
|
|
|
4405
4405
|
});
|
|
4406
4406
|
}), Object.freeze(s);
|
|
4407
4407
|
}
|
|
4408
|
-
function
|
|
4408
|
+
function qr(s, e) {
|
|
4409
4409
|
return new Promise(function(t, n) {
|
|
4410
4410
|
let r;
|
|
4411
4411
|
return Vs(s).then(function(i) {
|
|
@@ -4456,10 +4456,10 @@ const Vs = (s) => new Promise((e, t) => {
|
|
|
4456
4456
|
return e(new Blob());
|
|
4457
4457
|
}), n.readAsArrayBuffer(s);
|
|
4458
4458
|
});
|
|
4459
|
-
var
|
|
4460
|
-
return
|
|
4459
|
+
var An = {}, Hs = { get exports() {
|
|
4460
|
+
return An;
|
|
4461
4461
|
}, set exports(s) {
|
|
4462
|
-
|
|
4462
|
+
An = s;
|
|
4463
4463
|
} };
|
|
4464
4464
|
(function(s) {
|
|
4465
4465
|
var e, t, n = {};
|
|
@@ -4470,12 +4470,12 @@ var vn = {}, Hs = { get exports() {
|
|
|
4470
4470
|
o(l, c += 2);
|
|
4471
4471
|
var f = a(l, c += 2), y = a(l, c += 4);
|
|
4472
4472
|
c += 4, c = y;
|
|
4473
|
-
for (var
|
|
4473
|
+
for (var F = 0; F < d; F++) {
|
|
4474
4474
|
a(l, c), c += 4, c += 4, c += 4, a(l, c += 4), f = a(l, c += 4);
|
|
4475
|
-
var
|
|
4475
|
+
var I = a(l, c += 4), C = o(l, c += 4), R = o(l, c + 2), O = o(l, c + 4);
|
|
4476
4476
|
c += 6;
|
|
4477
4477
|
var v = a(l, c += 8);
|
|
4478
|
-
c += 4, c += C + R + O, n._readLocal(l, v, h, f,
|
|
4478
|
+
c += 4, c += C + R + O, n._readLocal(l, v, h, f, I, i);
|
|
4479
4479
|
}
|
|
4480
4480
|
return h;
|
|
4481
4481
|
}, n._readLocal = function(r, i, o, a, c, h) {
|
|
@@ -4485,15 +4485,15 @@ var vn = {}, Hs = { get exports() {
|
|
|
4485
4485
|
u(r, i += 2), u(r, i += 4), i += 4;
|
|
4486
4486
|
var f = l(r, i += 8), y = l(r, i += 2);
|
|
4487
4487
|
i += 2;
|
|
4488
|
-
var
|
|
4489
|
-
if (i += f, i += y, h) o[
|
|
4488
|
+
var F = n.bin.readUTF8(r, i, f);
|
|
4489
|
+
if (i += f, i += y, h) o[F] = { size: c, csize: a };
|
|
4490
4490
|
else {
|
|
4491
|
-
var
|
|
4492
|
-
if (d == 0) o[
|
|
4491
|
+
var I = new Uint8Array(r.buffer, i);
|
|
4492
|
+
if (d == 0) o[F] = new Uint8Array(I.buffer.slice(i, i + a));
|
|
4493
4493
|
else {
|
|
4494
4494
|
if (d != 8) throw "unknown compression method: " + d;
|
|
4495
4495
|
var C = new Uint8Array(c);
|
|
4496
|
-
n.inflateRaw(
|
|
4496
|
+
n.inflateRaw(I, C), o[F] = C;
|
|
4497
4497
|
}
|
|
4498
4498
|
}
|
|
4499
4499
|
}, n.inflateRaw = function(r, i) {
|
|
@@ -4519,16 +4519,16 @@ var vn = {}, Hs = { get exports() {
|
|
|
4519
4519
|
}
|
|
4520
4520
|
for (var l in h) o += h[l].file.length + 30 + 46 + 2 * n.bin.sizeUTF8(l);
|
|
4521
4521
|
o += 22;
|
|
4522
|
-
var y = new Uint8Array(o),
|
|
4522
|
+
var y = new Uint8Array(o), F = 0, I = [];
|
|
4523
4523
|
for (var l in h) {
|
|
4524
4524
|
var C = h[l];
|
|
4525
|
-
|
|
4525
|
+
I.push(F), F = n._writeHeader(y, F, l, C, 0);
|
|
4526
4526
|
}
|
|
4527
|
-
var R = 0, O =
|
|
4527
|
+
var R = 0, O = F;
|
|
4528
4528
|
for (var l in h)
|
|
4529
|
-
C = h[l],
|
|
4530
|
-
var v =
|
|
4531
|
-
return a(y,
|
|
4529
|
+
C = h[l], I.push(F), F = n._writeHeader(y, F, l, C, 1, I[R++]);
|
|
4530
|
+
var v = F - O;
|
|
4531
|
+
return a(y, F, 101010256), F += 4, c(y, F += 4, R), c(y, F += 2, R), a(y, F += 2, v), a(y, F += 4, O), F += 4, F += 2, y.buffer;
|
|
4532
4532
|
}, n._noNeed = function(r) {
|
|
4533
4533
|
var i = r.split(".").pop().toLowerCase();
|
|
4534
4534
|
return "png,jpg,jpeg,zip".indexOf(i) != -1;
|
|
@@ -4602,46 +4602,46 @@ var vn = {}, Hs = { get exports() {
|
|
|
4602
4602
|
} }, n.F = {}, n.F.deflateRaw = function(r, i, o, a) {
|
|
4603
4603
|
var c = [[0, 0, 0, 0, 0], [4, 4, 8, 4, 0], [4, 5, 16, 8, 0], [4, 6, 16, 16, 0], [4, 10, 16, 32, 0], [8, 16, 32, 32, 0], [8, 16, 128, 128, 0], [8, 32, 128, 256, 0], [32, 128, 258, 1024, 1], [32, 258, 258, 4096, 1]][a], h = n.F.U, l = n.F._goodIndex;
|
|
4604
4604
|
n.F._hash;
|
|
4605
|
-
var u = n.F._putsE, d = 0, f = o << 3, y = 0,
|
|
4605
|
+
var u = n.F._putsE, d = 0, f = o << 3, y = 0, F = r.length;
|
|
4606
4606
|
if (a == 0) {
|
|
4607
|
-
for (; d <
|
|
4608
|
-
u(i, f, d + (T = Math.min(65535,
|
|
4607
|
+
for (; d < F; )
|
|
4608
|
+
u(i, f, d + (T = Math.min(65535, F - d)) == F ? 1 : 0), f = n.F._copyExact(r, d, T, i, f + 8), d += T;
|
|
4609
4609
|
return f >>> 3;
|
|
4610
4610
|
}
|
|
4611
|
-
var
|
|
4612
|
-
for (
|
|
4613
|
-
if (B = m, d + 1 <
|
|
4611
|
+
var I = h.lits, C = h.strt, R = h.prev, O = 0, v = 0, L = 0, b = 0, B = 0, m = 0;
|
|
4612
|
+
for (F > 2 && (C[m = n.F._hash(r, 0)] = 0), d = 0; d < F; d++) {
|
|
4613
|
+
if (B = m, d + 1 < F - 2) {
|
|
4614
4614
|
m = n.F._hash(r, d + 1);
|
|
4615
4615
|
var g = d + 1 & 32767;
|
|
4616
4616
|
R[g] = C[m], C[m] = g;
|
|
4617
4617
|
}
|
|
4618
4618
|
if (y <= d) {
|
|
4619
|
-
(O > 14e3 || v > 26697) &&
|
|
4619
|
+
(O > 14e3 || v > 26697) && F - d > 100 && (y < d && (I[O] = d - y, O += 2, y = d), f = n.F._writeBlock(d == F - 1 || y == F ? 1 : 0, I, O, b, r, L, d - L, i, f), O = v = b = 0, L = d);
|
|
4620
4620
|
var k = 0;
|
|
4621
|
-
d <
|
|
4622
|
-
var T = k >>> 16,
|
|
4621
|
+
d < F - 2 && (k = n.F._bestMatch(r, d, R, B, Math.min(c[2], F - d), c[3]));
|
|
4622
|
+
var T = k >>> 16, N = 65535 & k;
|
|
4623
4623
|
if (k != 0) {
|
|
4624
|
-
|
|
4624
|
+
N = 65535 & k;
|
|
4625
4625
|
var U = l(T = k >>> 16, h.of0);
|
|
4626
4626
|
h.lhst[257 + U]++;
|
|
4627
|
-
var A = l(
|
|
4628
|
-
h.dhst[A]++, b += h.exb[U] + h.dxb[A],
|
|
4627
|
+
var A = l(N, h.df0);
|
|
4628
|
+
h.dhst[A]++, b += h.exb[U] + h.dxb[A], I[O] = T << 23 | d - y, I[O + 1] = N << 16 | U << 8 | A, O += 2, y = d + T;
|
|
4629
4629
|
} else h.lhst[r[d]]++;
|
|
4630
4630
|
v++;
|
|
4631
4631
|
}
|
|
4632
4632
|
}
|
|
4633
|
-
for (L == d && r.length != 0 || (y < d && (
|
|
4633
|
+
for (L == d && r.length != 0 || (y < d && (I[O] = d - y, O += 2, y = d), f = n.F._writeBlock(1, I, O, b, r, L, d - L, i, f), O = 0, v = 0, O = v = b = 0, L = d); 7 & f; ) f++;
|
|
4634
4634
|
return f >>> 3;
|
|
4635
4635
|
}, n.F._bestMatch = function(r, i, o, a, c, h) {
|
|
4636
4636
|
var l = 32767 & i, u = o[l], d = l - u + 32768 & 32767;
|
|
4637
4637
|
if (u == l || a != n.F._hash(r, i - d)) return 0;
|
|
4638
|
-
for (var f = 0, y = 0,
|
|
4638
|
+
for (var f = 0, y = 0, F = Math.min(32767, i); d <= F && --h != 0 && u != l; ) {
|
|
4639
4639
|
if (f == 0 || r[i + f] == r[i + f - d]) {
|
|
4640
|
-
var
|
|
4641
|
-
if (
|
|
4642
|
-
if (y = d, (f =
|
|
4643
|
-
d + 2 <
|
|
4644
|
-
for (var C = 0, R = 0; R <
|
|
4640
|
+
var I = n.F._howLong(r, i, d);
|
|
4641
|
+
if (I > f) {
|
|
4642
|
+
if (y = d, (f = I) >= c) break;
|
|
4643
|
+
d + 2 < I && (I = d + 2);
|
|
4644
|
+
for (var C = 0, R = 0; R < I - 2; R++) {
|
|
4645
4645
|
var O = i - d + R + 32768 & 32767, v = O - o[O] + 32768 & 32767;
|
|
4646
4646
|
v > C && (C = v, u = O);
|
|
4647
4647
|
}
|
|
@@ -4658,13 +4658,13 @@ var vn = {}, Hs = { get exports() {
|
|
|
4658
4658
|
}, n.F._hash = function(r, i) {
|
|
4659
4659
|
return (r[i] << 8 | r[i + 1]) + (r[i + 2] << 4) & 65535;
|
|
4660
4660
|
}, n.saved = 0, n.F._writeBlock = function(r, i, o, a, c, h, l, u, d) {
|
|
4661
|
-
var f, y,
|
|
4662
|
-
b.lhst[256]++, y = (f = n.F.getTrees())[0],
|
|
4661
|
+
var f, y, F, I, C, R, O, v, L, b = n.F.U, B = n.F._putsF, m = n.F._putsE;
|
|
4662
|
+
b.lhst[256]++, y = (f = n.F.getTrees())[0], F = f[1], I = f[2], C = f[3], R = f[4], O = f[5], v = f[6], L = f[7];
|
|
4663
4663
|
var g = 32 + (d + 3 & 7 ? 8 - (d + 3 & 7) : 0) + (l << 3), k = a + n.F.contSize(b.fltree, b.lhst) + n.F.contSize(b.fdtree, b.dhst), T = a + n.F.contSize(b.ltree, b.lhst) + n.F.contSize(b.dtree, b.dhst);
|
|
4664
4664
|
T += 14 + 3 * O + n.F.contSize(b.itree, b.ihst) + (2 * b.ihst[16] + 3 * b.ihst[17] + 7 * b.ihst[18]);
|
|
4665
|
-
for (var
|
|
4666
|
-
for (
|
|
4667
|
-
for (
|
|
4665
|
+
for (var N = 0; N < 286; N++) b.lhst[N] = 0;
|
|
4666
|
+
for (N = 0; N < 30; N++) b.dhst[N] = 0;
|
|
4667
|
+
for (N = 0; N < 19; N++) b.ihst[N] = 0;
|
|
4668
4668
|
var U = g < k && g < T ? 0 : k < T ? 1 : 2;
|
|
4669
4669
|
if (B(u, d, r), B(u, d + 1, U), d += 3, U == 0) {
|
|
4670
4670
|
for (; 7 & d; ) d++;
|
|
@@ -4672,15 +4672,15 @@ var vn = {}, Hs = { get exports() {
|
|
|
4672
4672
|
} else {
|
|
4673
4673
|
var A, _;
|
|
4674
4674
|
if (U == 1 && (A = b.fltree, _ = b.fdtree), U == 2) {
|
|
4675
|
-
n.F.makeCodes(b.ltree, y), n.F.revCodes(b.ltree, y), n.F.makeCodes(b.dtree,
|
|
4675
|
+
n.F.makeCodes(b.ltree, y), n.F.revCodes(b.ltree, y), n.F.makeCodes(b.dtree, F), n.F.revCodes(b.dtree, F), n.F.makeCodes(b.itree, I), n.F.revCodes(b.itree, I), A = b.ltree, _ = b.dtree, m(u, d, C - 257), m(u, d += 5, R - 1), m(u, d += 5, O - 4), d += 4;
|
|
4676
4676
|
for (var w = 0; w < O; w++) m(u, d + 3 * w, b.itree[1 + (b.ordr[w] << 1)]);
|
|
4677
4677
|
d += 3 * O, d = n.F._codeTiny(v, b.itree, u, d), d = n.F._codeTiny(L, b.itree, u, d);
|
|
4678
4678
|
}
|
|
4679
4679
|
for (var p = h, M = 0; M < o; M += 2) {
|
|
4680
|
-
for (var x = i[M], V = x >>> 23,
|
|
4680
|
+
for (var x = i[M], V = x >>> 23, Z = p + (8388607 & x); p < Z; ) d = n.F._writeLit(c[p++], A, u, d);
|
|
4681
4681
|
if (V != 0) {
|
|
4682
|
-
var
|
|
4683
|
-
m(u, d = n.F._writeLit(257 +
|
|
4682
|
+
var $ = i[M + 1], q = $ >> 16, P = $ >> 8 & 255, S = 255 & $;
|
|
4683
|
+
m(u, d = n.F._writeLit(257 + P, A, u, d), V - b.of0[P]), d += b.exb[P], B(u, d = n.F._writeLit(S, _, u, d), q - b.df0[S]), d += b.dxb[S], p += V;
|
|
4684
4684
|
}
|
|
4685
4685
|
}
|
|
4686
4686
|
d = n.F._writeLit(256, A, u, d);
|
|
@@ -4738,8 +4738,8 @@ var vn = {}, Hs = { get exports() {
|
|
|
4738
4738
|
a.sort(function(v, L) {
|
|
4739
4739
|
return v.f - L.f;
|
|
4740
4740
|
});
|
|
4741
|
-
var y = a[0],
|
|
4742
|
-
for (a[0] = { lit: -1, f: y.f +
|
|
4741
|
+
var y = a[0], F = a[1], I = 0, C = 1, R = 2;
|
|
4742
|
+
for (a[0] = { lit: -1, f: y.f + F.f, l: y, r: F, d: 0 }; C != u - 1; ) y = I != C && (R == u || a[I].f < a[R].f) ? a[I++] : a[R++], F = I != C && (R == u || a[I].f < a[R].f) ? a[I++] : a[R++], a[C++] = { lit: -1, f: y.f + F.f, l: y, r: F };
|
|
4743
4743
|
var O = n.F.setDepth(a[C - 1], 0);
|
|
4744
4744
|
for (O > o && (n.F.restrictDepth(d, o, O), O = o), l = 0; l < u; l++) i[1 + (d[l].lit << 1)] = d[l].d;
|
|
4745
4745
|
return O;
|
|
@@ -4765,25 +4765,25 @@ var vn = {}, Hs = { get exports() {
|
|
|
4765
4765
|
}, n.F.inflate = function(r, i) {
|
|
4766
4766
|
var o = Uint8Array;
|
|
4767
4767
|
if (r[0] == 3 && r[1] == 0) return i || new o(0);
|
|
4768
|
-
var a = n.F, c = a._bitsF, h = a._bitsE, l = a._decodeTiny, u = a.makeCodes, d = a.codes2map, f = a._get17, y = a.U,
|
|
4769
|
-
|
|
4770
|
-
for (var
|
|
4771
|
-
if (
|
|
4768
|
+
var a = n.F, c = a._bitsF, h = a._bitsE, l = a._decodeTiny, u = a.makeCodes, d = a.codes2map, f = a._get17, y = a.U, F = i == null;
|
|
4769
|
+
F && (i = new o(r.length >>> 2 << 3));
|
|
4770
|
+
for (var I, C, R = 0, O = 0, v = 0, L = 0, b = 0, B = 0, m = 0, g = 0, k = 0; R == 0; ) if (R = c(r, k, 1), O = c(r, k + 1, 2), k += 3, O != 0) {
|
|
4771
|
+
if (F && (i = n.F._check(i, g + (1 << 17))), O == 1 && (I = y.flmap, C = y.fdmap, B = 511, m = 31), O == 2) {
|
|
4772
4772
|
v = h(r, k, 5) + 257, L = h(r, k + 5, 5) + 1, b = h(r, k + 10, 4) + 4, k += 14;
|
|
4773
4773
|
for (var T = 0; T < 38; T += 2) y.itree[T] = 0, y.itree[T + 1] = 0;
|
|
4774
|
-
var
|
|
4774
|
+
var N = 1;
|
|
4775
4775
|
for (T = 0; T < b; T++) {
|
|
4776
4776
|
var U = h(r, k + 3 * T, 3);
|
|
4777
|
-
y.itree[1 + (y.ordr[T] << 1)] = U, U >
|
|
4777
|
+
y.itree[1 + (y.ordr[T] << 1)] = U, U > N && (N = U);
|
|
4778
4778
|
}
|
|
4779
|
-
k += 3 * b, u(y.itree,
|
|
4779
|
+
k += 3 * b, u(y.itree, N), d(y.itree, N, y.imap), I = y.lmap, C = y.dmap, k = l(y.imap, (1 << N) - 1, v + L, r, k, y.ttree);
|
|
4780
4780
|
var A = a._copyOut(y.ttree, 0, v, y.ltree);
|
|
4781
4781
|
B = (1 << A) - 1;
|
|
4782
4782
|
var _ = a._copyOut(y.ttree, v, L, y.dtree);
|
|
4783
|
-
m = (1 << _) - 1, u(y.ltree, A), d(y.ltree, A,
|
|
4783
|
+
m = (1 << _) - 1, u(y.ltree, A), d(y.ltree, A, I), u(y.dtree, _), d(y.dtree, _, C);
|
|
4784
4784
|
}
|
|
4785
4785
|
for (; ; ) {
|
|
4786
|
-
var w =
|
|
4786
|
+
var w = I[f(r, k) & B];
|
|
4787
4787
|
k += 15 & w;
|
|
4788
4788
|
var p = w >>> 4;
|
|
4789
4789
|
if (!(p >>> 8)) i[g++] = p;
|
|
@@ -4796,15 +4796,15 @@ var vn = {}, Hs = { get exports() {
|
|
|
4796
4796
|
}
|
|
4797
4797
|
var V = C[f(r, k) & m];
|
|
4798
4798
|
k += 15 & V;
|
|
4799
|
-
var
|
|
4800
|
-
for (k += 15 &
|
|
4799
|
+
var Z = V >>> 4, $ = y.ddef[Z], q = ($ >>> 4) + c(r, k, 15 & $);
|
|
4800
|
+
for (k += 15 & $, F && (i = n.F._check(i, g + (1 << 17))); g < M; ) i[g] = i[g++ - q], i[g] = i[g++ - q], i[g] = i[g++ - q], i[g] = i[g++ - q];
|
|
4801
4801
|
g = M;
|
|
4802
4802
|
}
|
|
4803
4803
|
}
|
|
4804
4804
|
} else {
|
|
4805
4805
|
7 & k && (k += 8 - (7 & k));
|
|
4806
|
-
var
|
|
4807
|
-
|
|
4806
|
+
var P = 4 + (k >>> 3), S = r[P - 4] | r[P - 3] << 8;
|
|
4807
|
+
F && (i = n.F._check(i, g + S)), i.set(new o(r.buffer, r.byteOffset + P, S), g), k = P + S << 3, g += S;
|
|
4808
4808
|
}
|
|
4809
4809
|
return i.length == g ? i : i.slice(0, g);
|
|
4810
4810
|
}, n.F._check = function(r, i) {
|
|
@@ -4819,9 +4819,9 @@ var vn = {}, Hs = { get exports() {
|
|
|
4819
4819
|
var y = f >>> 4;
|
|
4820
4820
|
if (y <= 15) h[d] = y, d++;
|
|
4821
4821
|
else {
|
|
4822
|
-
var
|
|
4823
|
-
y == 16 ? (
|
|
4824
|
-
for (var C = d +
|
|
4822
|
+
var F = 0, I = 0;
|
|
4823
|
+
y == 16 ? (I = 3 + l(a, c, 2), c += 2, F = h[d - 1]) : y == 17 ? (I = 3 + l(a, c, 3), c += 3) : y == 18 && (I = 11 + l(a, c, 7), c += 7);
|
|
4824
|
+
for (var C = d + I; d < C; ) h[d] = F, d++;
|
|
4825
4825
|
}
|
|
4826
4826
|
}
|
|
4827
4827
|
return c;
|
|
@@ -4839,7 +4839,7 @@ var vn = {}, Hs = { get exports() {
|
|
|
4839
4839
|
for (o = 0, d[0] = 0, a = 1; a <= i; a++) o = o + d[a - 1] << 1, y[a] = o;
|
|
4840
4840
|
for (c = 0; c < u; c += 2) (h = r[c + 1]) != 0 && (r[c] = y[h], y[h]++);
|
|
4841
4841
|
}, n.F.codes2map = function(r, i, o) {
|
|
4842
|
-
for (var a = r.length, c = n.F.U.rev15, h = 0; h < a; h += 2) if (r[h + 1] != 0) for (var l = h >> 1, u = r[h + 1], d = l << 4 | u, f = i - u, y = r[h] << f,
|
|
4842
|
+
for (var a = r.length, c = n.F.U.rev15, h = 0; h < a; h += 2) if (r[h + 1] != 0) for (var l = h >> 1, u = r[h + 1], d = l << 4 | u, f = i - u, y = r[h] << f, F = y + (1 << f); y != F; )
|
|
4843
4843
|
o[c[y] >>> 15 - i] = d, y++;
|
|
4844
4844
|
}, n.F.revCodes = function(r, i) {
|
|
4845
4845
|
for (var o = n.F.U.rev15, a = 15 - i, c = 0; c < r.length; c += 2) {
|
|
@@ -4874,7 +4874,7 @@ var vn = {}, Hs = { get exports() {
|
|
|
4874
4874
|
a(r.fltree, 144, 8), a(r.fltree, 112, 9), a(r.fltree, 24, 7), a(r.fltree, 8, 8), n.F.makeCodes(r.fltree, 9), n.F.codes2map(r.fltree, 9, r.flmap), n.F.revCodes(r.fltree, 9), a(r.fdtree, 32, 5), n.F.makeCodes(r.fdtree, 5), n.F.codes2map(r.fdtree, 5, r.fdmap), n.F.revCodes(r.fdtree, 5), a(r.itree, 19, 0), a(r.ltree, 286, 0), a(r.dtree, 30, 0), a(r.ttree, 320, 0);
|
|
4875
4875
|
}();
|
|
4876
4876
|
})();
|
|
4877
|
-
var
|
|
4877
|
+
var Ps = Ms({ __proto__: null, default: An }, [An]);
|
|
4878
4878
|
const Xe = function() {
|
|
4879
4879
|
var s = { nextZero(l, u) {
|
|
4880
4880
|
for (; l[u] != 0; ) u++;
|
|
@@ -4895,7 +4895,7 @@ const Xe = function() {
|
|
|
4895
4895
|
return f;
|
|
4896
4896
|
}, pad: (l) => l.length < 2 ? `0${l}` : l, readUTF8(l, u, d) {
|
|
4897
4897
|
let f, y = "";
|
|
4898
|
-
for (let
|
|
4898
|
+
for (let F = 0; F < d; F++) y += `%${s.pad(l[u + F].toString(16))}`;
|
|
4899
4899
|
try {
|
|
4900
4900
|
f = decodeURIComponent(y);
|
|
4901
4901
|
} catch {
|
|
@@ -4904,7 +4904,7 @@ const Xe = function() {
|
|
|
4904
4904
|
return f;
|
|
4905
4905
|
} };
|
|
4906
4906
|
function e(l, u, d, f) {
|
|
4907
|
-
const y = u * d,
|
|
4907
|
+
const y = u * d, F = i(f), I = Math.ceil(u * F / 8), C = new Uint8Array(4 * y), R = new Uint32Array(C.buffer), { ctype: O } = f, { depth: v } = f, L = s.readUshort;
|
|
4908
4908
|
if (O == 6) {
|
|
4909
4909
|
const x = y << 2;
|
|
4910
4910
|
if (v == 8) for (var b = 0; b < x; b += 4) C[b] = l[b], C[b + 1] = l[b + 1], C[b + 2] = l[b + 2], C[b + 3] = l[b + 3];
|
|
@@ -4920,31 +4920,31 @@ const Xe = function() {
|
|
|
4920
4920
|
B = 6 * b, R[b] = 255 << 24 | l[B + 4] << 16 | l[B + 2] << 8 | l[B];
|
|
4921
4921
|
} else {
|
|
4922
4922
|
var m = x[0];
|
|
4923
|
-
const V = x[1],
|
|
4923
|
+
const V = x[1], Z = x[2];
|
|
4924
4924
|
if (v == 8) for (b = 0; b < y; b++) {
|
|
4925
4925
|
var g = b << 2;
|
|
4926
|
-
B = 3 * b, R[b] = 255 << 24 | l[B + 2] << 16 | l[B + 1] << 8 | l[B], l[B] == m && l[B + 1] == V && l[B + 2] ==
|
|
4926
|
+
B = 3 * b, R[b] = 255 << 24 | l[B + 2] << 16 | l[B + 1] << 8 | l[B], l[B] == m && l[B + 1] == V && l[B + 2] == Z && (C[g + 3] = 0);
|
|
4927
4927
|
}
|
|
4928
4928
|
if (v == 16) for (b = 0; b < y; b++)
|
|
4929
|
-
g = b << 2, B = 6 * b, R[b] = 255 << 24 | l[B + 4] << 16 | l[B + 2] << 8 | l[B], L(l, B) == m && L(l, B + 2) == V && L(l, B + 4) ==
|
|
4929
|
+
g = b << 2, B = 6 * b, R[b] = 255 << 24 | l[B + 4] << 16 | l[B + 2] << 8 | l[B], L(l, B) == m && L(l, B + 2) == V && L(l, B + 4) == Z && (C[g + 3] = 0);
|
|
4930
4930
|
}
|
|
4931
4931
|
} else if (O == 3) {
|
|
4932
|
-
const x = f.tabs.PLTE, V = f.tabs.tRNS,
|
|
4932
|
+
const x = f.tabs.PLTE, V = f.tabs.tRNS, Z = V ? V.length : 0;
|
|
4933
4933
|
if (v == 1) for (var k = 0; k < d; k++) {
|
|
4934
|
-
var T = k *
|
|
4934
|
+
var T = k * I, N = k * u;
|
|
4935
4935
|
for (b = 0; b < u; b++) {
|
|
4936
|
-
g =
|
|
4936
|
+
g = N + b << 2;
|
|
4937
4937
|
var U = 3 * (A = l[T + (b >> 3)] >> 7 - ((7 & b) << 0) & 1);
|
|
4938
|
-
C[g] = x[U], C[g + 1] = x[U + 1], C[g + 2] = x[U + 2], C[g + 3] = A <
|
|
4938
|
+
C[g] = x[U], C[g + 1] = x[U + 1], C[g + 2] = x[U + 2], C[g + 3] = A < Z ? V[A] : 255;
|
|
4939
4939
|
}
|
|
4940
4940
|
}
|
|
4941
|
-
if (v == 2) for (k = 0; k < d; k++) for (T = k *
|
|
4942
|
-
g =
|
|
4943
|
-
if (v == 4) for (k = 0; k < d; k++) for (T = k *
|
|
4944
|
-
g =
|
|
4941
|
+
if (v == 2) for (k = 0; k < d; k++) for (T = k * I, N = k * u, b = 0; b < u; b++)
|
|
4942
|
+
g = N + b << 2, U = 3 * (A = l[T + (b >> 2)] >> 6 - ((3 & b) << 1) & 3), C[g] = x[U], C[g + 1] = x[U + 1], C[g + 2] = x[U + 2], C[g + 3] = A < Z ? V[A] : 255;
|
|
4943
|
+
if (v == 4) for (k = 0; k < d; k++) for (T = k * I, N = k * u, b = 0; b < u; b++)
|
|
4944
|
+
g = N + b << 2, U = 3 * (A = l[T + (b >> 1)] >> 4 - ((1 & b) << 2) & 15), C[g] = x[U], C[g + 1] = x[U + 1], C[g + 2] = x[U + 2], C[g + 3] = A < Z ? V[A] : 255;
|
|
4945
4945
|
if (v == 8) for (b = 0; b < y; b++) {
|
|
4946
4946
|
var A;
|
|
4947
|
-
g = b << 2, U = 3 * (A = l[b]), C[g] = x[U], C[g + 1] = x[U + 1], C[g + 2] = x[U + 2], C[g + 3] = A <
|
|
4947
|
+
g = b << 2, U = 3 * (A = l[b]), C[g] = x[U], C[g + 1] = x[U + 1], C[g + 2] = x[U + 2], C[g + 3] = A < Z ? V[A] : 255;
|
|
4948
4948
|
}
|
|
4949
4949
|
} else if (O == 4) {
|
|
4950
4950
|
if (v == 8) for (b = 0; b < y; b++) {
|
|
@@ -4957,7 +4957,7 @@ const Xe = function() {
|
|
|
4957
4957
|
g = b << 2, _ = l[w = b << 2], C[g] = _, C[g + 1] = _, C[g + 2] = _, C[g + 3] = l[w + 2];
|
|
4958
4958
|
}
|
|
4959
4959
|
} else if (O == 0) for (m = f.tabs.tRNS ? f.tabs.tRNS : -1, k = 0; k < d; k++) {
|
|
4960
|
-
const x = k *
|
|
4960
|
+
const x = k * I, V = k * u;
|
|
4961
4961
|
if (v == 1) for (var p = 0; p < u; p++) {
|
|
4962
4962
|
var M = (_ = 255 * (l[x + (p >>> 3)] >>> 7 - (7 & p) & 1)) == 255 * m ? 0 : 255;
|
|
4963
4963
|
R[V + p] = M << 24 | _ << 16 | _ << 8 | _;
|
|
@@ -4974,34 +4974,34 @@ const Xe = function() {
|
|
|
4974
4974
|
return C;
|
|
4975
4975
|
}
|
|
4976
4976
|
function t(l, u, d, f) {
|
|
4977
|
-
const y = i(l),
|
|
4978
|
-
return u = l.tabs.CgBI ? r(u,
|
|
4977
|
+
const y = i(l), F = Math.ceil(d * y / 8), I = new Uint8Array((F + 1 + l.interlace) * f);
|
|
4978
|
+
return u = l.tabs.CgBI ? r(u, I) : n(u, I), l.interlace == 0 ? u = o(u, l, 0, d, f) : l.interlace == 1 && (u = function(R, O) {
|
|
4979
4979
|
const v = O.width, L = O.height, b = i(O), B = b >> 3, m = Math.ceil(v * b / 8), g = new Uint8Array(L * m);
|
|
4980
4980
|
let k = 0;
|
|
4981
|
-
const T = [0, 0, 4, 0, 2, 0, 1],
|
|
4981
|
+
const T = [0, 0, 4, 0, 2, 0, 1], N = [0, 4, 0, 2, 0, 1, 0], U = [8, 8, 8, 4, 4, 2, 2], A = [8, 8, 4, 4, 2, 2, 1];
|
|
4982
4982
|
let _ = 0;
|
|
4983
4983
|
for (; _ < 7; ) {
|
|
4984
4984
|
const p = U[_], M = A[_];
|
|
4985
|
-
let x = 0, V = 0,
|
|
4986
|
-
for (;
|
|
4987
|
-
let
|
|
4988
|
-
for (;
|
|
4989
|
-
const
|
|
4985
|
+
let x = 0, V = 0, Z = T[_];
|
|
4986
|
+
for (; Z < L; ) Z += p, V++;
|
|
4987
|
+
let $ = N[_];
|
|
4988
|
+
for (; $ < v; ) $ += M, x++;
|
|
4989
|
+
const q = Math.ceil(x * b / 8);
|
|
4990
4990
|
o(R, O, k, x, V);
|
|
4991
|
-
let
|
|
4991
|
+
let P = 0, S = T[_];
|
|
4992
4992
|
for (; S < L; ) {
|
|
4993
|
-
let X =
|
|
4993
|
+
let X = N[_], oe = k + P * q << 3;
|
|
4994
4994
|
for (; X < v; ) {
|
|
4995
4995
|
var w;
|
|
4996
4996
|
if (b == 1 && (w = (w = R[oe >> 3]) >> 7 - (7 & oe) & 1, g[S * m + (X >> 3)] |= w << 7 - ((7 & X) << 0)), b == 2 && (w = (w = R[oe >> 3]) >> 6 - (7 & oe) & 3, g[S * m + (X >> 2)] |= w << 6 - ((3 & X) << 1)), b == 4 && (w = (w = R[oe >> 3]) >> 4 - (7 & oe) & 15, g[S * m + (X >> 1)] |= w << 4 - ((1 & X) << 2)), b >= 8) {
|
|
4997
4997
|
const te = S * m + X * B;
|
|
4998
|
-
for (let
|
|
4998
|
+
for (let Y = 0; Y < B; Y++) g[te + Y] = R[(oe >> 3) + Y];
|
|
4999
4999
|
}
|
|
5000
5000
|
oe += b, X += M;
|
|
5001
5001
|
}
|
|
5002
|
-
|
|
5002
|
+
P++, S += p;
|
|
5003
5003
|
}
|
|
5004
|
-
x * V != 0 && (k += V * (1 +
|
|
5004
|
+
x * V != 0 && (k += V * (1 + q)), _ += 1;
|
|
5005
5005
|
}
|
|
5006
5006
|
return g;
|
|
5007
5007
|
}(u, l)), u;
|
|
@@ -5013,23 +5013,23 @@ const Xe = function() {
|
|
|
5013
5013
|
const l = { H: {} };
|
|
5014
5014
|
return l.H.N = function(u, d) {
|
|
5015
5015
|
const f = Uint8Array;
|
|
5016
|
-
let y,
|
|
5016
|
+
let y, F, I = 0, C = 0, R = 0, O = 0, v = 0, L = 0, b = 0, B = 0, m = 0;
|
|
5017
5017
|
if (u[0] == 3 && u[1] == 0) return d || new f(0);
|
|
5018
|
-
const g = l.H, k = g.b, T = g.e,
|
|
5019
|
-
for (p && (d = new f(u.length >>> 2 << 5));
|
|
5020
|
-
if (p && (d = l.H.W(d, B + (1 << 17))), C == 1 && (y = w.J,
|
|
5018
|
+
const g = l.H, k = g.b, T = g.e, N = g.R, U = g.n, A = g.A, _ = g.Z, w = g.m, p = d == null;
|
|
5019
|
+
for (p && (d = new f(u.length >>> 2 << 5)); I == 0; ) if (I = k(u, m, 1), C = k(u, m + 1, 2), m += 3, C != 0) {
|
|
5020
|
+
if (p && (d = l.H.W(d, B + (1 << 17))), C == 1 && (y = w.J, F = w.h, L = 511, b = 31), C == 2) {
|
|
5021
5021
|
R = T(u, m, 5) + 257, O = T(u, m + 5, 5) + 1, v = T(u, m + 10, 4) + 4, m += 14;
|
|
5022
5022
|
let x = 1;
|
|
5023
5023
|
for (var M = 0; M < 38; M += 2) w.Q[M] = 0, w.Q[M + 1] = 0;
|
|
5024
5024
|
for (M = 0; M < v; M++) {
|
|
5025
|
-
const
|
|
5026
|
-
w.Q[1 + (w.X[M] << 1)] =
|
|
5025
|
+
const $ = T(u, m + 3 * M, 3);
|
|
5026
|
+
w.Q[1 + (w.X[M] << 1)] = $, $ > x && (x = $);
|
|
5027
5027
|
}
|
|
5028
|
-
m += 3 * v, U(w.Q, x), A(w.Q, x, w.u), y = w.w,
|
|
5028
|
+
m += 3 * v, U(w.Q, x), A(w.Q, x, w.u), y = w.w, F = w.d, m = N(w.u, (1 << x) - 1, R + O, u, m, w.v);
|
|
5029
5029
|
const V = g.V(w.v, 0, R, w.C);
|
|
5030
5030
|
L = (1 << V) - 1;
|
|
5031
|
-
const
|
|
5032
|
-
b = (1 <<
|
|
5031
|
+
const Z = g.V(w.v, R, O, w.D);
|
|
5032
|
+
b = (1 << Z) - 1, U(w.C, V), A(w.C, V, y), U(w.D, Z), A(w.D, Z, F);
|
|
5033
5033
|
}
|
|
5034
5034
|
for (; ; ) {
|
|
5035
5035
|
const x = y[_(u, m) & L];
|
|
@@ -5039,16 +5039,16 @@ const Xe = function() {
|
|
|
5039
5039
|
else {
|
|
5040
5040
|
if (V == 256) break;
|
|
5041
5041
|
{
|
|
5042
|
-
let
|
|
5042
|
+
let Z = B + V - 254;
|
|
5043
5043
|
if (V > 264) {
|
|
5044
5044
|
const X = w.q[V - 257];
|
|
5045
|
-
|
|
5045
|
+
Z = B + (X >>> 3) + T(u, m, 7 & X), m += 7 & X;
|
|
5046
5046
|
}
|
|
5047
|
-
const
|
|
5048
|
-
m += 15 &
|
|
5049
|
-
const
|
|
5050
|
-
for (m += 15 &
|
|
5051
|
-
B =
|
|
5047
|
+
const $ = F[_(u, m) & b];
|
|
5048
|
+
m += 15 & $;
|
|
5049
|
+
const q = $ >>> 4, P = w.c[q], S = (P >>> 4) + k(u, m, 15 & P);
|
|
5050
|
+
for (m += 15 & P; B < Z; ) d[B] = d[B++ - S], d[B] = d[B++ - S], d[B] = d[B++ - S], d[B] = d[B++ - S];
|
|
5051
|
+
B = Z;
|
|
5052
5052
|
}
|
|
5053
5053
|
}
|
|
5054
5054
|
}
|
|
@@ -5063,54 +5063,54 @@ const Xe = function() {
|
|
|
5063
5063
|
if (d <= f) return u;
|
|
5064
5064
|
const y = new Uint8Array(f << 1);
|
|
5065
5065
|
return y.set(u, 0), y;
|
|
5066
|
-
}, l.H.R = function(u, d, f, y,
|
|
5066
|
+
}, l.H.R = function(u, d, f, y, F, I) {
|
|
5067
5067
|
const C = l.H.e, R = l.H.Z;
|
|
5068
5068
|
let O = 0;
|
|
5069
5069
|
for (; O < f; ) {
|
|
5070
|
-
const v = u[R(y,
|
|
5071
|
-
|
|
5070
|
+
const v = u[R(y, F) & d];
|
|
5071
|
+
F += 15 & v;
|
|
5072
5072
|
const L = v >>> 4;
|
|
5073
|
-
if (L <= 15)
|
|
5073
|
+
if (L <= 15) I[O] = L, O++;
|
|
5074
5074
|
else {
|
|
5075
5075
|
let b = 0, B = 0;
|
|
5076
|
-
L == 16 ? (B = 3 + C(y,
|
|
5076
|
+
L == 16 ? (B = 3 + C(y, F, 2), F += 2, b = I[O - 1]) : L == 17 ? (B = 3 + C(y, F, 3), F += 3) : L == 18 && (B = 11 + C(y, F, 7), F += 7);
|
|
5077
5077
|
const m = O + B;
|
|
5078
|
-
for (; O < m; )
|
|
5078
|
+
for (; O < m; ) I[O] = b, O++;
|
|
5079
5079
|
}
|
|
5080
5080
|
}
|
|
5081
|
-
return
|
|
5081
|
+
return F;
|
|
5082
5082
|
}, l.H.V = function(u, d, f, y) {
|
|
5083
|
-
let
|
|
5083
|
+
let F = 0, I = 0;
|
|
5084
5084
|
const C = y.length >>> 1;
|
|
5085
|
-
for (;
|
|
5086
|
-
const R = u[
|
|
5087
|
-
y[
|
|
5085
|
+
for (; I < f; ) {
|
|
5086
|
+
const R = u[I + d];
|
|
5087
|
+
y[I << 1] = 0, y[1 + (I << 1)] = R, R > F && (F = R), I++;
|
|
5088
5088
|
}
|
|
5089
|
-
for (;
|
|
5090
|
-
return
|
|
5089
|
+
for (; I < C; ) y[I << 1] = 0, y[1 + (I << 1)] = 0, I++;
|
|
5090
|
+
return F;
|
|
5091
5091
|
}, l.H.n = function(u, d) {
|
|
5092
5092
|
const f = l.H.m, y = u.length;
|
|
5093
|
-
let
|
|
5093
|
+
let F, I, C, R;
|
|
5094
5094
|
const O = f.j;
|
|
5095
5095
|
for (var v = 0; v <= d; v++) O[v] = 0;
|
|
5096
5096
|
for (v = 1; v < y; v += 2) O[u[v]]++;
|
|
5097
5097
|
const L = f.K;
|
|
5098
|
-
for (
|
|
5098
|
+
for (F = 0, O[0] = 0, I = 1; I <= d; I++) F = F + O[I - 1] << 1, L[I] = F;
|
|
5099
5099
|
for (C = 0; C < y; C += 2) R = u[C + 1], R != 0 && (u[C] = L[R], L[R]++);
|
|
5100
5100
|
}, l.H.A = function(u, d, f) {
|
|
5101
|
-
const y = u.length,
|
|
5102
|
-
for (let
|
|
5103
|
-
const C =
|
|
5104
|
-
let L = u[
|
|
5101
|
+
const y = u.length, F = l.H.m.r;
|
|
5102
|
+
for (let I = 0; I < y; I += 2) if (u[I + 1] != 0) {
|
|
5103
|
+
const C = I >> 1, R = u[I + 1], O = C << 4 | R, v = d - R;
|
|
5104
|
+
let L = u[I] << v;
|
|
5105
5105
|
const b = L + (1 << v);
|
|
5106
5106
|
for (; L != b; )
|
|
5107
|
-
f[
|
|
5107
|
+
f[F[L] >>> 15 - d] = O, L++;
|
|
5108
5108
|
}
|
|
5109
5109
|
}, l.H.l = function(u, d) {
|
|
5110
5110
|
const f = l.H.m.r, y = 15 - d;
|
|
5111
|
-
for (let
|
|
5112
|
-
const
|
|
5113
|
-
u[
|
|
5111
|
+
for (let F = 0; F < u.length; F += 2) {
|
|
5112
|
+
const I = u[F] << d - u[F + 1];
|
|
5113
|
+
u[F] = f[I] >>> y;
|
|
5114
5114
|
}
|
|
5115
5115
|
}, l.H.M = function(u, d, f) {
|
|
5116
5116
|
f <<= 7 & d;
|
|
@@ -5137,8 +5137,8 @@ const Xe = function() {
|
|
|
5137
5137
|
let y = d;
|
|
5138
5138
|
y = (2863311530 & y) >>> 1 | (1431655765 & y) << 1, y = (3435973836 & y) >>> 2 | (858993459 & y) << 2, y = (4042322160 & y) >>> 4 | (252645135 & y) << 4, y = (4278255360 & y) >>> 8 | (16711935 & y) << 8, u.r[d] = (y >>> 16 | y << 16) >>> 17;
|
|
5139
5139
|
}
|
|
5140
|
-
function f(y,
|
|
5141
|
-
for (;
|
|
5140
|
+
function f(y, F, I) {
|
|
5141
|
+
for (; F-- != 0; ) y.push(0, I);
|
|
5142
5142
|
}
|
|
5143
5143
|
for (d = 0; d < 32; d++) u.q[d] = u.S[d] << 3 | u.T[d], u.c[d] = u.p[d] << 4 | u.z[d];
|
|
5144
5144
|
f(u._, 144, 8), f(u._, 112, 9), f(u._, 24, 7), f(u._, 8, 8), l.H.n(u._, 9), l.H.A(u._, 9, u.J), l.H.l(u._, 9), f(u.$, 32, 5), l.H.n(u.$, 5), l.H.A(u.$, 5, u.h), l.H.l(u.$, 5), f(u.Q, 19, 0), f(u.C, 286, 0), f(u.D, 30, 0), f(u.v, 320, 0);
|
|
@@ -5148,45 +5148,45 @@ const Xe = function() {
|
|
|
5148
5148
|
return [1, null, 3, 1, 2, null, 4][l.ctype] * l.depth;
|
|
5149
5149
|
}
|
|
5150
5150
|
function o(l, u, d, f, y) {
|
|
5151
|
-
let
|
|
5152
|
-
const
|
|
5151
|
+
let F = i(u);
|
|
5152
|
+
const I = Math.ceil(f * F / 8);
|
|
5153
5153
|
let C, R;
|
|
5154
|
-
|
|
5154
|
+
F = Math.ceil(F / 8);
|
|
5155
5155
|
let O = l[d], v = 0;
|
|
5156
|
-
if (O > 1 && (l[d] = [0, 0, 1][O - 2]), O == 3) for (v =
|
|
5157
|
-
for (let L = 0; L < y; L++) if (C = d + L *
|
|
5156
|
+
if (O > 1 && (l[d] = [0, 0, 1][O - 2]), O == 3) for (v = F; v < I; v++) l[v + 1] = l[v + 1] + (l[v + 1 - F] >>> 1) & 255;
|
|
5157
|
+
for (let L = 0; L < y; L++) if (C = d + L * I, R = C + L + 1, O = l[R - 1], v = 0, O == 0) for (; v < I; v++) l[C + v] = l[R + v];
|
|
5158
5158
|
else if (O == 1) {
|
|
5159
|
-
for (; v <
|
|
5160
|
-
for (; v <
|
|
5161
|
-
} else if (O == 2) for (; v <
|
|
5159
|
+
for (; v < F; v++) l[C + v] = l[R + v];
|
|
5160
|
+
for (; v < I; v++) l[C + v] = l[R + v] + l[C + v - F];
|
|
5161
|
+
} else if (O == 2) for (; v < I; v++) l[C + v] = l[R + v] + l[C + v - I];
|
|
5162
5162
|
else if (O == 3) {
|
|
5163
|
-
for (; v <
|
|
5164
|
-
for (; v <
|
|
5163
|
+
for (; v < F; v++) l[C + v] = l[R + v] + (l[C + v - I] >>> 1);
|
|
5164
|
+
for (; v < I; v++) l[C + v] = l[R + v] + (l[C + v - I] + l[C + v - F] >>> 1);
|
|
5165
5165
|
} else {
|
|
5166
|
-
for (; v <
|
|
5167
|
-
for (; v <
|
|
5166
|
+
for (; v < F; v++) l[C + v] = l[R + v] + a(0, l[C + v - I], 0);
|
|
5167
|
+
for (; v < I; v++) l[C + v] = l[R + v] + a(l[C + v - F], l[C + v - I], l[C + v - F - I]);
|
|
5168
5168
|
}
|
|
5169
5169
|
return l;
|
|
5170
5170
|
}
|
|
5171
5171
|
function a(l, u, d) {
|
|
5172
|
-
const f = l + u - d, y = f - l,
|
|
5173
|
-
return y * y <=
|
|
5172
|
+
const f = l + u - d, y = f - l, F = f - u, I = f - d;
|
|
5173
|
+
return y * y <= F * F && y * y <= I * I ? l : F * F <= I * I ? u : d;
|
|
5174
5174
|
}
|
|
5175
5175
|
function c(l, u, d) {
|
|
5176
5176
|
d.width = s.readUint(l, u), u += 4, d.height = s.readUint(l, u), u += 4, d.depth = l[u], u++, d.ctype = l[u], u++, d.compress = l[u], u++, d.filter = l[u], u++, d.interlace = l[u], u++;
|
|
5177
5177
|
}
|
|
5178
|
-
function h(l, u, d, f, y,
|
|
5179
|
-
const O = Math.min(u, y), v = Math.min(d,
|
|
5178
|
+
function h(l, u, d, f, y, F, I, C, R) {
|
|
5179
|
+
const O = Math.min(u, y), v = Math.min(d, F);
|
|
5180
5180
|
let L = 0, b = 0;
|
|
5181
|
-
for (let _ = 0; _ < v; _++) for (let w = 0; w < O; w++) if (
|
|
5181
|
+
for (let _ = 0; _ < v; _++) for (let w = 0; w < O; w++) if (I >= 0 && C >= 0 ? (L = _ * u + w << 2, b = (C + _) * y + I + w << 2) : (L = (-C + _) * u - I + w << 2, b = _ * y + w << 2), R == 0) f[b] = l[L], f[b + 1] = l[L + 1], f[b + 2] = l[L + 2], f[b + 3] = l[L + 3];
|
|
5182
5182
|
else if (R == 1) {
|
|
5183
|
-
var B = l[L + 3] * 0.00392156862745098, m = l[L] * B, g = l[L + 1] * B, k = l[L + 2] * B, T = f[b + 3] * (1 / 255),
|
|
5183
|
+
var B = l[L + 3] * 0.00392156862745098, m = l[L] * B, g = l[L + 1] * B, k = l[L + 2] * B, T = f[b + 3] * (1 / 255), N = f[b] * T, U = f[b + 1] * T, A = f[b + 2] * T;
|
|
5184
5184
|
const p = 1 - B, M = B + T * p, x = M == 0 ? 0 : 1 / M;
|
|
5185
|
-
f[b + 3] = 255 * M, f[b + 0] = (m +
|
|
5185
|
+
f[b + 3] = 255 * M, f[b + 0] = (m + N * p) * x, f[b + 1] = (g + U * p) * x, f[b + 2] = (k + A * p) * x;
|
|
5186
5186
|
} else if (R == 2)
|
|
5187
|
-
B = l[L + 3], m = l[L], g = l[L + 1], k = l[L + 2], T = f[b + 3],
|
|
5187
|
+
B = l[L + 3], m = l[L], g = l[L + 1], k = l[L + 2], T = f[b + 3], N = f[b], U = f[b + 1], A = f[b + 2], B == T && m == N && g == U && k == A ? (f[b] = 0, f[b + 1] = 0, f[b + 2] = 0, f[b + 3] = 0) : (f[b] = m, f[b + 1] = g, f[b + 2] = k, f[b + 3] = B);
|
|
5188
5188
|
else if (R == 3) {
|
|
5189
|
-
if (B = l[L + 3], m = l[L], g = l[L + 1], k = l[L + 2], T = f[b + 3],
|
|
5189
|
+
if (B = l[L + 3], m = l[L], g = l[L + 1], k = l[L + 2], T = f[b + 3], N = f[b], U = f[b + 1], A = f[b + 2], B == T && m == N && g == U && k == A) continue;
|
|
5190
5190
|
if (B < 220 && T > 20) return !1;
|
|
5191
5191
|
}
|
|
5192
5192
|
return !0;
|
|
@@ -5194,7 +5194,7 @@ const Xe = function() {
|
|
|
5194
5194
|
return { decode: function(u) {
|
|
5195
5195
|
const d = new Uint8Array(u);
|
|
5196
5196
|
let f = 8;
|
|
5197
|
-
const y = s,
|
|
5197
|
+
const y = s, F = y.readUshort, I = y.readUint, C = { tabs: {}, frames: [] }, R = new Uint8Array(d.length);
|
|
5198
5198
|
let O, v = 0, L = 0;
|
|
5199
5199
|
const b = [137, 80, 78, 71, 13, 10, 26, 10];
|
|
5200
5200
|
for (var B = 0; B < 8; B++) if (d[B] != b[B]) throw "The input is not a PNG file!";
|
|
@@ -5218,12 +5218,12 @@ const Xe = function() {
|
|
|
5218
5218
|
else if (w == "IDAT") {
|
|
5219
5219
|
for (B = 0; B < _; B++) R[v + B] = d[f + B];
|
|
5220
5220
|
v += _;
|
|
5221
|
-
} else if (w == "acTL") C.tabs[w] = { num_frames:
|
|
5221
|
+
} else if (w == "acTL") C.tabs[w] = { num_frames: I(d, f), num_plays: I(d, f + 4) }, O = new Uint8Array(d.length);
|
|
5222
5222
|
else if (w == "fcTL") {
|
|
5223
5223
|
L != 0 && ((A = C.frames[C.frames.length - 1]).data = t(C, O.slice(0, L), A.rect.width, A.rect.height), L = 0);
|
|
5224
|
-
const p = { x:
|
|
5225
|
-
let M =
|
|
5226
|
-
M =
|
|
5224
|
+
const p = { x: I(d, f + 12), y: I(d, f + 16), width: I(d, f + 4), height: I(d, f + 8) };
|
|
5225
|
+
let M = F(d, f + 22);
|
|
5226
|
+
M = F(d, f + 20) / (M == 0 ? 100 : M);
|
|
5227
5227
|
const x = { rect: p, delay: Math.round(1e3 * M), dispose: d[f + 24], blend: d[f + 25] };
|
|
5228
5228
|
C.frames.push(x);
|
|
5229
5229
|
} else if (w == "fdAT") {
|
|
@@ -5237,23 +5237,23 @@ const Xe = function() {
|
|
|
5237
5237
|
var g = y.nextZero(d, f), k = y.readASCII(d, f, g - f), T = f + _ - g - 1;
|
|
5238
5238
|
if (w == "tEXt") U = y.readASCII(d, g + 1, T);
|
|
5239
5239
|
else {
|
|
5240
|
-
var
|
|
5241
|
-
U = y.readUTF8(
|
|
5240
|
+
var N = n(d.slice(g + 2, g + 2 + T));
|
|
5241
|
+
U = y.readUTF8(N, 0, N.length);
|
|
5242
5242
|
}
|
|
5243
5243
|
C.tabs[w][k] = U;
|
|
5244
5244
|
} else if (w == "iTXt") {
|
|
5245
5245
|
C.tabs[w] == null && (C.tabs[w] = {}), g = 0, m = f, g = y.nextZero(d, m), k = y.readASCII(d, m, g - m);
|
|
5246
5246
|
const p = d[m = g + 1];
|
|
5247
5247
|
var U;
|
|
5248
|
-
d[m + 1], m += 2, g = y.nextZero(d, m), y.readASCII(d, m, g - m), m = g + 1, g = y.nextZero(d, m), y.readUTF8(d, m, g - m), T = _ - ((m = g + 1) - f), p == 0 ? U = y.readUTF8(d, m, T) : (
|
|
5248
|
+
d[m + 1], m += 2, g = y.nextZero(d, m), y.readASCII(d, m, g - m), m = g + 1, g = y.nextZero(d, m), y.readUTF8(d, m, g - m), T = _ - ((m = g + 1) - f), p == 0 ? U = y.readUTF8(d, m, T) : (N = n(d.slice(m, m + T)), U = y.readUTF8(N, 0, N.length)), C.tabs[w][k] = U;
|
|
5249
5249
|
} else if (w == "PLTE") C.tabs[w] = y.readBytes(d, f, _);
|
|
5250
5250
|
else if (w == "hIST") {
|
|
5251
5251
|
const p = C.tabs.PLTE.length / 3;
|
|
5252
|
-
for (C.tabs[w] = [], B = 0; B < p; B++) C.tabs[w].push(
|
|
5253
|
-
} else if (w == "tRNS") C.ctype == 3 ? C.tabs[w] = y.readBytes(d, f, _) : C.ctype == 0 ? C.tabs[w] =
|
|
5252
|
+
for (C.tabs[w] = [], B = 0; B < p; B++) C.tabs[w].push(F(d, f + 2 * B));
|
|
5253
|
+
} else if (w == "tRNS") C.ctype == 3 ? C.tabs[w] = y.readBytes(d, f, _) : C.ctype == 0 ? C.tabs[w] = F(d, f) : C.ctype == 2 && (C.tabs[w] = [F(d, f), F(d, f + 2), F(d, f + 4)]);
|
|
5254
5254
|
else if (w == "gAMA") C.tabs[w] = y.readUint(d, f) / 1e5;
|
|
5255
5255
|
else if (w == "sRGB") C.tabs[w] = d[f];
|
|
5256
|
-
else if (w == "bKGD") C.ctype == 0 || C.ctype == 4 ? C.tabs[w] = [
|
|
5256
|
+
else if (w == "bKGD") C.ctype == 0 || C.ctype == 4 ? C.tabs[w] = [F(d, f)] : C.ctype == 2 || C.ctype == 6 ? C.tabs[w] = [F(d, f), F(d, f + 2), F(d, f + 4)] : C.ctype == 3 && (C.tabs[w] = d[f]);
|
|
5257
5257
|
else if (w == "IEND") break;
|
|
5258
5258
|
f += _, y.readUint(d, f), f += 4;
|
|
5259
5259
|
}
|
|
@@ -5264,13 +5264,13 @@ const Xe = function() {
|
|
|
5264
5264
|
if (u.tabs.acTL == null) return [e(u.data, d, f, u).buffer];
|
|
5265
5265
|
const y = [];
|
|
5266
5266
|
u.frames[0].data == null && (u.frames[0].data = u.data);
|
|
5267
|
-
const
|
|
5267
|
+
const F = d * f * 4, I = new Uint8Array(F), C = new Uint8Array(F), R = new Uint8Array(F);
|
|
5268
5268
|
for (let v = 0; v < u.frames.length; v++) {
|
|
5269
5269
|
const L = u.frames[v], b = L.rect.x, B = L.rect.y, m = L.rect.width, g = L.rect.height, k = e(L.data, m, g, u);
|
|
5270
|
-
if (v != 0) for (var O = 0; O <
|
|
5271
|
-
if (L.blend == 0 ? h(k, m, g,
|
|
5272
|
-
if (L.dispose == 1) h(C, m, g,
|
|
5273
|
-
else if (L.dispose == 2) for (O = 0; O <
|
|
5270
|
+
if (v != 0) for (var O = 0; O < F; O++) R[O] = I[O];
|
|
5271
|
+
if (L.blend == 0 ? h(k, m, g, I, d, f, b, B, 0) : L.blend == 1 && h(k, m, g, I, d, f, b, B, 1), y.push(I.buffer.slice(0)), L.dispose != 0) {
|
|
5272
|
+
if (L.dispose == 1) h(C, m, g, I, d, f, b, B, 0);
|
|
5273
|
+
else if (L.dispose == 2) for (O = 0; O < F; O++) I[O] = R[O];
|
|
5274
5274
|
}
|
|
5275
5275
|
}
|
|
5276
5276
|
return y;
|
|
@@ -5287,7 +5287,7 @@ const Xe = function() {
|
|
|
5287
5287
|
}
|
|
5288
5288
|
return m;
|
|
5289
5289
|
}(), update(m, g, k, T) {
|
|
5290
|
-
for (let
|
|
5290
|
+
for (let N = 0; N < T; N++) m = n.table[255 & (m ^ g[k + N])] ^ m >>> 8;
|
|
5291
5291
|
return m;
|
|
5292
5292
|
}, crc: (m, g, k) => 4294967295 ^ n.update(4294967295, m, g, k) };
|
|
5293
5293
|
function r(m, g, k, T) {
|
|
@@ -5297,10 +5297,10 @@ const Xe = function() {
|
|
|
5297
5297
|
return Math.max(0, Math.min(255, m));
|
|
5298
5298
|
}
|
|
5299
5299
|
function o(m, g) {
|
|
5300
|
-
const k = m[0] - g[0], T = m[1] - g[1],
|
|
5301
|
-
return k * k + T * T +
|
|
5300
|
+
const k = m[0] - g[0], T = m[1] - g[1], N = m[2] - g[2], U = m[3] - g[3];
|
|
5301
|
+
return k * k + T * T + N * N + U * U;
|
|
5302
5302
|
}
|
|
5303
|
-
function a(m, g, k, T,
|
|
5303
|
+
function a(m, g, k, T, N, U, A) {
|
|
5304
5304
|
A == null && (A = 1);
|
|
5305
5305
|
const _ = T.length, w = [];
|
|
5306
5306
|
for (var p = 0; p < _; p++) {
|
|
@@ -5314,102 +5314,102 @@ const Xe = function() {
|
|
|
5314
5314
|
x != p && V < S && (S = V, M = x);
|
|
5315
5315
|
}
|
|
5316
5316
|
}
|
|
5317
|
-
const
|
|
5318
|
-
for (p = 0; p <
|
|
5317
|
+
const Z = new Uint32Array(N.buffer), $ = new Int16Array(g * k * 4), q = [0, 8, 2, 10, 12, 4, 14, 6, 3, 11, 1, 9, 15, 7, 13, 5];
|
|
5318
|
+
for (p = 0; p < q.length; p++) q[p] = 255 * ((q[p] + 0.5) / 16 - 0.5);
|
|
5319
5319
|
for (let S = 0; S < k; S++) for (let X = 0; X < g; X++) {
|
|
5320
|
-
var
|
|
5321
|
-
p = 4 * (S * g + X), A != 2 ?
|
|
5320
|
+
var P;
|
|
5321
|
+
p = 4 * (S * g + X), A != 2 ? P = [i(m[p] + $[p]), i(m[p + 1] + $[p + 1]), i(m[p + 2] + $[p + 2]), i(m[p + 3] + $[p + 3])] : (V = q[4 * (3 & S) + (3 & X)], P = [i(m[p] + V), i(m[p + 1] + V), i(m[p + 2] + V), i(m[p + 3] + V)]), M = 0;
|
|
5322
5322
|
let oe = 16777215;
|
|
5323
5323
|
for (x = 0; x < _; x++) {
|
|
5324
|
-
const re = o(
|
|
5324
|
+
const re = o(P, w[x]);
|
|
5325
5325
|
re < oe && (oe = re, M = x);
|
|
5326
5326
|
}
|
|
5327
|
-
const te = w[M],
|
|
5328
|
-
A == 1 && (X != g - 1 && r(
|
|
5327
|
+
const te = w[M], Y = [P[0] - te[0], P[1] - te[1], P[2] - te[2], P[3] - te[3]];
|
|
5328
|
+
A == 1 && (X != g - 1 && r(Y, $, p + 4, 7), S != k - 1 && (X != 0 && r(Y, $, p + 4 * g - 4, 3), r(Y, $, p + 4 * g, 5), X != g - 1 && r(Y, $, p + 4 * g + 4, 1))), U[p >> 2] = M, Z[p >> 2] = T[M];
|
|
5329
5329
|
}
|
|
5330
5330
|
}
|
|
5331
|
-
function c(m, g, k, T,
|
|
5332
|
-
|
|
5331
|
+
function c(m, g, k, T, N) {
|
|
5332
|
+
N == null && (N = {});
|
|
5333
5333
|
const { crc: U } = n, A = e.writeUint, _ = e.writeUshort, w = e.writeASCII;
|
|
5334
5334
|
let p = 8;
|
|
5335
5335
|
const M = m.frames.length > 1;
|
|
5336
|
-
let x, V = !1,
|
|
5337
|
-
if (
|
|
5338
|
-
for (var
|
|
5339
|
-
|
|
5340
|
-
}
|
|
5341
|
-
for (var
|
|
5342
|
-
M && (
|
|
5343
|
-
|
|
5344
|
-
const S = new Uint8Array(
|
|
5345
|
-
for (
|
|
5346
|
-
if (A(S, p, 13), p += 4, w(S, p, "IHDR"), p += 4, A(S, p, g), p += 4, A(S, p, k), p += 4, S[p] = m.depth, p++, S[p] = m.ctype, p++, S[p] = 0, p++, S[p] = 0, p++, S[p] = 0, p++, A(S, p, U(S, p - 17, 17)), p += 4,
|
|
5347
|
-
const
|
|
5348
|
-
A(S, p,
|
|
5349
|
-
}
|
|
5350
|
-
if (
|
|
5351
|
-
for (A(S, p, 3 * (
|
|
5352
|
-
const
|
|
5353
|
-
S[p +
|
|
5336
|
+
let x, V = !1, Z = 33 + (M ? 20 : 0);
|
|
5337
|
+
if (N.sRGB != null && (Z += 13), N.pHYs != null && (Z += 21), N.iCCP != null && (x = pako.deflate(N.iCCP), Z += 21 + x.length + 4), m.ctype == 3) {
|
|
5338
|
+
for (var $ = m.plte.length, q = 0; q < $; q++) m.plte[q] >>> 24 != 255 && (V = !0);
|
|
5339
|
+
Z += 8 + 3 * $ + 4 + (V ? 8 + 1 * $ + 4 : 0);
|
|
5340
|
+
}
|
|
5341
|
+
for (var P = 0; P < m.frames.length; P++)
|
|
5342
|
+
M && (Z += 38), Z += (te = m.frames[P]).cimg.length + 12, P != 0 && (Z += 4);
|
|
5343
|
+
Z += 12;
|
|
5344
|
+
const S = new Uint8Array(Z), X = [137, 80, 78, 71, 13, 10, 26, 10];
|
|
5345
|
+
for (q = 0; q < 8; q++) S[q] = X[q];
|
|
5346
|
+
if (A(S, p, 13), p += 4, w(S, p, "IHDR"), p += 4, A(S, p, g), p += 4, A(S, p, k), p += 4, S[p] = m.depth, p++, S[p] = m.ctype, p++, S[p] = 0, p++, S[p] = 0, p++, S[p] = 0, p++, A(S, p, U(S, p - 17, 17)), p += 4, N.sRGB != null && (A(S, p, 1), p += 4, w(S, p, "sRGB"), p += 4, S[p] = N.sRGB, p++, A(S, p, U(S, p - 5, 5)), p += 4), N.iCCP != null) {
|
|
5347
|
+
const Y = 13 + x.length;
|
|
5348
|
+
A(S, p, Y), p += 4, w(S, p, "iCCP"), p += 4, w(S, p, "ICC profile"), p += 11, p += 2, S.set(x, p), p += x.length, A(S, p, U(S, p - (Y + 4), Y + 4)), p += 4;
|
|
5349
|
+
}
|
|
5350
|
+
if (N.pHYs != null && (A(S, p, 9), p += 4, w(S, p, "pHYs"), p += 4, A(S, p, N.pHYs[0]), p += 4, A(S, p, N.pHYs[1]), p += 4, S[p] = N.pHYs[2], p++, A(S, p, U(S, p - 13, 13)), p += 4), M && (A(S, p, 8), p += 4, w(S, p, "acTL"), p += 4, A(S, p, m.frames.length), p += 4, A(S, p, N.loop != null ? N.loop : 0), p += 4, A(S, p, U(S, p - 12, 12)), p += 4), m.ctype == 3) {
|
|
5351
|
+
for (A(S, p, 3 * ($ = m.plte.length)), p += 4, w(S, p, "PLTE"), p += 4, q = 0; q < $; q++) {
|
|
5352
|
+
const Y = 3 * q, re = m.plte[q], fe = 255 & re, be = re >>> 8 & 255, ft = re >>> 16 & 255;
|
|
5353
|
+
S[p + Y + 0] = fe, S[p + Y + 1] = be, S[p + Y + 2] = ft;
|
|
5354
5354
|
}
|
|
5355
|
-
if (p += 3 *
|
|
5356
|
-
for (A(S, p,
|
|
5357
|
-
p +=
|
|
5355
|
+
if (p += 3 * $, A(S, p, U(S, p - 3 * $ - 4, 3 * $ + 4)), p += 4, V) {
|
|
5356
|
+
for (A(S, p, $), p += 4, w(S, p, "tRNS"), p += 4, q = 0; q < $; q++) S[p + q] = m.plte[q] >>> 24 & 255;
|
|
5357
|
+
p += $, A(S, p, U(S, p - $ - 4, $ + 4)), p += 4;
|
|
5358
5358
|
}
|
|
5359
5359
|
}
|
|
5360
5360
|
let oe = 0;
|
|
5361
|
-
for (
|
|
5362
|
-
var te = m.frames[
|
|
5363
|
-
M && (A(S, p, 26), p += 4, w(S, p, "fcTL"), p += 4, A(S, p, oe++), p += 4, A(S, p, te.rect.width), p += 4, A(S, p, te.rect.height), p += 4, A(S, p, te.rect.x), p += 4, A(S, p, te.rect.y), p += 4, _(S, p, T[
|
|
5364
|
-
const
|
|
5365
|
-
A(S, p, (
|
|
5361
|
+
for (P = 0; P < m.frames.length; P++) {
|
|
5362
|
+
var te = m.frames[P];
|
|
5363
|
+
M && (A(S, p, 26), p += 4, w(S, p, "fcTL"), p += 4, A(S, p, oe++), p += 4, A(S, p, te.rect.width), p += 4, A(S, p, te.rect.height), p += 4, A(S, p, te.rect.x), p += 4, A(S, p, te.rect.y), p += 4, _(S, p, T[P]), p += 2, _(S, p, 1e3), p += 2, S[p] = te.dispose, p++, S[p] = te.blend, p++, A(S, p, U(S, p - 30, 30)), p += 4);
|
|
5364
|
+
const Y = te.cimg;
|
|
5365
|
+
A(S, p, ($ = Y.length) + (P == 0 ? 0 : 4)), p += 4;
|
|
5366
5366
|
const re = p;
|
|
5367
|
-
w(S, p,
|
|
5367
|
+
w(S, p, P == 0 ? "IDAT" : "fdAT"), p += 4, P != 0 && (A(S, p, oe++), p += 4), S.set(Y, p), p += $, A(S, p, U(S, re, p - re)), p += 4;
|
|
5368
5368
|
}
|
|
5369
5369
|
return A(S, p, 0), p += 4, w(S, p, "IEND"), p += 4, A(S, p, U(S, p - 4, 4)), p += 4, S.buffer;
|
|
5370
5370
|
}
|
|
5371
5371
|
function h(m, g, k) {
|
|
5372
5372
|
for (let T = 0; T < m.frames.length; T++) {
|
|
5373
|
-
const
|
|
5374
|
-
|
|
5375
|
-
const U =
|
|
5376
|
-
|
|
5373
|
+
const N = m.frames[T];
|
|
5374
|
+
N.rect.width;
|
|
5375
|
+
const U = N.rect.height, A = new Uint8Array(U * N.bpl + U);
|
|
5376
|
+
N.cimg = f(N.img, U, N.bpp, N.bpl, A, g, k);
|
|
5377
5377
|
}
|
|
5378
5378
|
}
|
|
5379
|
-
function l(m, g, k, T,
|
|
5380
|
-
const U =
|
|
5381
|
-
let x = 6, V = 8,
|
|
5382
|
-
for (var
|
|
5383
|
-
const
|
|
5384
|
-
for (var
|
|
5379
|
+
function l(m, g, k, T, N) {
|
|
5380
|
+
const U = N[0], A = N[1], _ = N[2], w = N[3], p = N[4], M = N[5];
|
|
5381
|
+
let x = 6, V = 8, Z = 255;
|
|
5382
|
+
for (var $ = 0; $ < m.length; $++) {
|
|
5383
|
+
const Ne = new Uint8Array(m[$]);
|
|
5384
|
+
for (var q = Ne.length, P = 0; P < q; P += 4) Z &= Ne[P + 3];
|
|
5385
5385
|
}
|
|
5386
|
-
const S =
|
|
5386
|
+
const S = Z != 255, X = function(ae, ne, me, Ie, ge, Te) {
|
|
5387
5387
|
const pe = [];
|
|
5388
5388
|
for (var ee = 0; ee < ae.length; ee++) {
|
|
5389
5389
|
const Le = new Uint8Array(ae[ee]), Ve = new Uint32Array(Le.buffer);
|
|
5390
5390
|
var Re;
|
|
5391
|
-
let xe = 0, _e = 0,
|
|
5391
|
+
let xe = 0, _e = 0, Ke = ne, st = me, Vt = Ie ? 1 : 0;
|
|
5392
5392
|
if (ee != 0) {
|
|
5393
|
-
const
|
|
5394
|
-
let
|
|
5395
|
-
for (let
|
|
5396
|
-
var Ue = new Uint8Array(ae[ee - 1 -
|
|
5397
|
-
const ot = new Uint32Array(ae[ee - 1 -
|
|
5398
|
-
let Et = ne, vt = me,
|
|
5393
|
+
const hn = Te || Ie || ee == 1 || pe[ee - 2].dispose != 0 ? 1 : 2;
|
|
5394
|
+
let Ht = 0, ce = 1e9;
|
|
5395
|
+
for (let je = 0; je < hn; je++) {
|
|
5396
|
+
var Ue = new Uint8Array(ae[ee - 1 - je]);
|
|
5397
|
+
const ot = new Uint32Array(ae[ee - 1 - je]);
|
|
5398
|
+
let Et = ne, vt = me, Pt = -1, Yt = -1;
|
|
5399
5399
|
for (let Ut = 0; Ut < me; Ut++) for (let xt = 0; xt < ne; xt++)
|
|
5400
|
-
Ve[Ae = Ut * ne + xt] != ot[Ae] && (xt < Et && (Et = xt), xt >
|
|
5401
|
-
|
|
5402
|
-
const er = (
|
|
5403
|
-
er < ce && (ce = er,
|
|
5400
|
+
Ve[Ae = Ut * ne + xt] != ot[Ae] && (xt < Et && (Et = xt), xt > Pt && (Pt = xt), Ut < vt && (vt = Ut), Ut > Yt && (Yt = Ut));
|
|
5401
|
+
Pt == -1 && (Et = vt = Pt = Yt = 0), ge && ((1 & Et) == 1 && Et--, (1 & vt) == 1 && vt--);
|
|
5402
|
+
const er = (Pt - Et + 1) * (Yt - vt + 1);
|
|
5403
|
+
er < ce && (ce = er, Ht = je, xe = Et, _e = vt, Ke = Pt - Et + 1, st = Yt - vt + 1);
|
|
5404
5404
|
}
|
|
5405
|
-
Ue = new Uint8Array(ae[ee - 1 -
|
|
5405
|
+
Ue = new Uint8Array(ae[ee - 1 - Ht]), Ht == 1 && (pe[ee - 1].dispose = 2), Re = new Uint8Array(Ke * st * 4), s(Ue, ne, me, Re, Ke, st, -xe, -_e, 0), Vt = s(Le, ne, me, Re, Ke, st, -xe, -_e, 3) ? 1 : 0, Vt == 1 ? d(Le, ne, me, Re, { x: xe, y: _e, width: Ke, height: st }) : s(Le, ne, me, Re, Ke, st, -xe, -_e, 0);
|
|
5406
5406
|
} else Re = Le.slice(0);
|
|
5407
|
-
pe.push({ rect: { x: xe, y: _e, width:
|
|
5407
|
+
pe.push({ rect: { x: xe, y: _e, width: Ke, height: st }, img: Re, blend: Vt, dispose: 0 });
|
|
5408
5408
|
}
|
|
5409
|
-
if (
|
|
5409
|
+
if (Ie) for (ee = 0; ee < pe.length; ee++) {
|
|
5410
5410
|
if ((it = pe[ee]).blend == 1) continue;
|
|
5411
|
-
const Le = it.rect, Ve = pe[ee - 1].rect, xe = Math.min(Le.x, Ve.x), _e = Math.min(Le.y, Ve.y),
|
|
5412
|
-
pe[ee - 1].dispose = 1, ee - 1 != 0 && u(ae, ne, me, pe, ee - 1,
|
|
5411
|
+
const Le = it.rect, Ve = pe[ee - 1].rect, xe = Math.min(Le.x, Ve.x), _e = Math.min(Le.y, Ve.y), Ke = { x: xe, y: _e, width: Math.max(Le.x + Le.width, Ve.x + Ve.width) - xe, height: Math.max(Le.y + Le.height, Ve.y + Ve.height) - _e };
|
|
5412
|
+
pe[ee - 1].dispose = 1, ee - 1 != 0 && u(ae, ne, me, pe, ee - 1, Ke, ge), u(ae, ne, me, pe, ee, Ke, ge);
|
|
5413
5413
|
}
|
|
5414
5414
|
let rt = 0;
|
|
5415
5415
|
if (ae.length != 1) for (var Ae = 0; Ae < pe.length; Ae++) {
|
|
@@ -5417,10 +5417,10 @@ const Xe = function() {
|
|
|
5417
5417
|
rt += (it = pe[Ae]).rect.width * it.rect.height;
|
|
5418
5418
|
}
|
|
5419
5419
|
return pe;
|
|
5420
|
-
}(m, g, k, U, A, _), oe = {}, te = [],
|
|
5420
|
+
}(m, g, k, U, A, _), oe = {}, te = [], Y = [];
|
|
5421
5421
|
if (T != 0) {
|
|
5422
|
-
const
|
|
5423
|
-
for (
|
|
5422
|
+
const Ne = [];
|
|
5423
|
+
for (P = 0; P < X.length; P++) Ne.push(X[P].img.buffer);
|
|
5424
5424
|
const ae = function(ge) {
|
|
5425
5425
|
let Te = 0;
|
|
5426
5426
|
for (var pe = 0; pe < ge.length; pe++) Te += ge[pe].byteLength;
|
|
@@ -5436,133 +5436,133 @@ const Xe = function() {
|
|
|
5436
5436
|
Re += rt;
|
|
5437
5437
|
}
|
|
5438
5438
|
return ee.buffer;
|
|
5439
|
-
}(
|
|
5440
|
-
for (
|
|
5439
|
+
}(Ne), ne = F(ae, T);
|
|
5440
|
+
for (P = 0; P < ne.plte.length; P++) te.push(ne.plte[P].est.rgba);
|
|
5441
5441
|
let me = 0;
|
|
5442
|
-
for (
|
|
5443
|
-
const
|
|
5444
|
-
var re = new Uint8Array(ne.inds.buffer, me >> 2,
|
|
5445
|
-
|
|
5446
|
-
const ge = new Uint8Array(ne.abuf, me,
|
|
5447
|
-
M && a(fe.img, fe.rect.width, fe.rect.height, te, ge, re), fe.img.set(ge), me +=
|
|
5442
|
+
for (P = 0; P < X.length; P++) {
|
|
5443
|
+
const Ie = (fe = X[P]).img.length;
|
|
5444
|
+
var re = new Uint8Array(ne.inds.buffer, me >> 2, Ie >> 2);
|
|
5445
|
+
Y.push(re);
|
|
5446
|
+
const ge = new Uint8Array(ne.abuf, me, Ie);
|
|
5447
|
+
M && a(fe.img, fe.rect.width, fe.rect.height, te, ge, re), fe.img.set(ge), me += Ie;
|
|
5448
5448
|
}
|
|
5449
|
-
} else for (
|
|
5450
|
-
var fe = X[
|
|
5451
|
-
const
|
|
5449
|
+
} else for ($ = 0; $ < X.length; $++) {
|
|
5450
|
+
var fe = X[$];
|
|
5451
|
+
const Ne = new Uint32Array(fe.img.buffer);
|
|
5452
5452
|
var be = fe.rect.width;
|
|
5453
|
-
for (
|
|
5454
|
-
const ae =
|
|
5455
|
-
if (
|
|
5456
|
-
else if (
|
|
5453
|
+
for (q = Ne.length, re = new Uint8Array(q), Y.push(re), P = 0; P < q; P++) {
|
|
5454
|
+
const ae = Ne[P];
|
|
5455
|
+
if (P != 0 && ae == Ne[P - 1]) re[P] = re[P - 1];
|
|
5456
|
+
else if (P > be && ae == Ne[P - be]) re[P] = re[P - be];
|
|
5457
5457
|
else {
|
|
5458
5458
|
let ne = oe[ae];
|
|
5459
5459
|
if (ne == null && (oe[ae] = ne = te.length, te.push(ae), te.length >= 300)) break;
|
|
5460
|
-
re[
|
|
5460
|
+
re[P] = ne;
|
|
5461
5461
|
}
|
|
5462
5462
|
}
|
|
5463
5463
|
}
|
|
5464
5464
|
const ft = te.length;
|
|
5465
|
-
for (ft <= 256 && p == 0 && (V = ft <= 2 ? 1 : ft <= 4 ? 2 : ft <= 16 ? 4 : 8, V = Math.max(V, w)),
|
|
5466
|
-
(fe = X[
|
|
5467
|
-
const
|
|
5465
|
+
for (ft <= 256 && p == 0 && (V = ft <= 2 ? 1 : ft <= 4 ? 2 : ft <= 16 ? 4 : 8, V = Math.max(V, w)), $ = 0; $ < X.length; $++) {
|
|
5466
|
+
(fe = X[$]).rect.x, fe.rect.y, be = fe.rect.width;
|
|
5467
|
+
const Ne = fe.rect.height;
|
|
5468
5468
|
let ae = fe.img;
|
|
5469
5469
|
new Uint32Array(ae.buffer);
|
|
5470
5470
|
let ne = 4 * be, me = 4;
|
|
5471
5471
|
if (ft <= 256 && p == 0) {
|
|
5472
5472
|
ne = Math.ceil(V * be / 8);
|
|
5473
|
-
var
|
|
5474
|
-
const
|
|
5475
|
-
for (let ge = 0; ge <
|
|
5476
|
-
|
|
5473
|
+
var We = new Uint8Array(ne * Ne);
|
|
5474
|
+
const Ie = Y[$];
|
|
5475
|
+
for (let ge = 0; ge < Ne; ge++) {
|
|
5476
|
+
P = ge * ne;
|
|
5477
5477
|
const Te = ge * be;
|
|
5478
|
-
if (V == 8) for (var de = 0; de < be; de++)
|
|
5479
|
-
else if (V == 4) for (de = 0; de < be; de++)
|
|
5480
|
-
else if (V == 2) for (de = 0; de < be; de++)
|
|
5481
|
-
else if (V == 1) for (de = 0; de < be; de++)
|
|
5478
|
+
if (V == 8) for (var de = 0; de < be; de++) We[P + de] = Ie[Te + de];
|
|
5479
|
+
else if (V == 4) for (de = 0; de < be; de++) We[P + (de >> 1)] |= Ie[Te + de] << 4 - 4 * (1 & de);
|
|
5480
|
+
else if (V == 2) for (de = 0; de < be; de++) We[P + (de >> 2)] |= Ie[Te + de] << 6 - 2 * (3 & de);
|
|
5481
|
+
else if (V == 1) for (de = 0; de < be; de++) We[P + (de >> 3)] |= Ie[Te + de] << 7 - 1 * (7 & de);
|
|
5482
5482
|
}
|
|
5483
|
-
ae =
|
|
5483
|
+
ae = We, x = 3, me = 1;
|
|
5484
5484
|
} else if (S == 0 && X.length == 1) {
|
|
5485
|
-
|
|
5486
|
-
const
|
|
5487
|
-
for (
|
|
5488
|
-
const ge = 3 *
|
|
5489
|
-
|
|
5485
|
+
We = new Uint8Array(be * Ne * 3);
|
|
5486
|
+
const Ie = be * Ne;
|
|
5487
|
+
for (P = 0; P < Ie; P++) {
|
|
5488
|
+
const ge = 3 * P, Te = 4 * P;
|
|
5489
|
+
We[ge] = ae[Te], We[ge + 1] = ae[Te + 1], We[ge + 2] = ae[Te + 2];
|
|
5490
5490
|
}
|
|
5491
|
-
ae =
|
|
5491
|
+
ae = We, x = 2, me = 3, ne = 3 * be;
|
|
5492
5492
|
}
|
|
5493
5493
|
fe.img = ae, fe.bpl = ne, fe.bpp = me;
|
|
5494
5494
|
}
|
|
5495
5495
|
return { ctype: x, depth: V, plte: te, frames: X };
|
|
5496
5496
|
}
|
|
5497
|
-
function u(m, g, k, T,
|
|
5498
|
-
const _ = Uint8Array, w = Uint32Array, p = new _(m[
|
|
5499
|
-
let
|
|
5497
|
+
function u(m, g, k, T, N, U, A) {
|
|
5498
|
+
const _ = Uint8Array, w = Uint32Array, p = new _(m[N - 1]), M = new w(m[N - 1]), x = N + 1 < m.length ? new _(m[N + 1]) : null, V = new _(m[N]), Z = new w(V.buffer);
|
|
5499
|
+
let $ = g, q = k, P = -1, S = -1;
|
|
5500
5500
|
for (let oe = 0; oe < U.height; oe++) for (let te = 0; te < U.width; te++) {
|
|
5501
|
-
const
|
|
5502
|
-
be == 0 || T[
|
|
5501
|
+
const Y = U.x + te, re = U.y + oe, fe = re * g + Y, be = Z[fe];
|
|
5502
|
+
be == 0 || T[N - 1].dispose == 0 && M[fe] == be && (x == null || x[4 * fe + 3] != 0) || (Y < $ && ($ = Y), Y > P && (P = Y), re < q && (q = re), re > S && (S = re));
|
|
5503
5503
|
}
|
|
5504
|
-
|
|
5505
|
-
const X = T[
|
|
5506
|
-
X.rect = U, X.blend = 1, X.img = new Uint8Array(U.width * U.height * 4), T[
|
|
5504
|
+
P == -1 && ($ = q = P = S = 0), A && ((1 & $) == 1 && $--, (1 & q) == 1 && q--), U = { x: $, y: q, width: P - $ + 1, height: S - q + 1 };
|
|
5505
|
+
const X = T[N];
|
|
5506
|
+
X.rect = U, X.blend = 1, X.img = new Uint8Array(U.width * U.height * 4), T[N - 1].dispose == 0 ? (s(p, g, k, X.img, U.width, U.height, -U.x, -U.y, 0), d(V, g, k, X.img, U)) : s(V, g, k, X.img, U.width, U.height, -U.x, -U.y, 0);
|
|
5507
5507
|
}
|
|
5508
|
-
function d(m, g, k, T,
|
|
5509
|
-
s(m, g, k, T,
|
|
5508
|
+
function d(m, g, k, T, N) {
|
|
5509
|
+
s(m, g, k, T, N.width, N.height, -N.x, -N.y, 2);
|
|
5510
5510
|
}
|
|
5511
|
-
function f(m, g, k, T,
|
|
5511
|
+
function f(m, g, k, T, N, U, A) {
|
|
5512
5512
|
const _ = [];
|
|
5513
5513
|
let w, p = [0, 1, 2, 3, 4];
|
|
5514
5514
|
U != -1 ? p = [U] : (g * T > 5e5 || k == 1) && (p = [0]), A && (w = { level: 0 });
|
|
5515
|
-
const M =
|
|
5515
|
+
const M = Ps;
|
|
5516
5516
|
for (var x = 0; x < p.length; x++) {
|
|
5517
|
-
for (let
|
|
5518
|
-
_.push(M.deflate(
|
|
5517
|
+
for (let $ = 0; $ < g; $++) y(N, m, $, T, k, p[x]);
|
|
5518
|
+
_.push(M.deflate(N, w));
|
|
5519
5519
|
}
|
|
5520
|
-
let V,
|
|
5521
|
-
for (x = 0; x < _.length; x++) _[x].length <
|
|
5520
|
+
let V, Z = 1e9;
|
|
5521
|
+
for (x = 0; x < _.length; x++) _[x].length < Z && (V = x, Z = _[x].length);
|
|
5522
5522
|
return _[V];
|
|
5523
5523
|
}
|
|
5524
|
-
function y(m, g, k, T,
|
|
5524
|
+
function y(m, g, k, T, N, U) {
|
|
5525
5525
|
const A = k * T;
|
|
5526
5526
|
let _ = A + k;
|
|
5527
5527
|
if (m[_] = U, _++, U == 0) if (T < 500) for (var w = 0; w < T; w++) m[_ + w] = g[A + w];
|
|
5528
5528
|
else m.set(new Uint8Array(g.buffer, A, T), _);
|
|
5529
5529
|
else if (U == 1) {
|
|
5530
|
-
for (w = 0; w <
|
|
5531
|
-
for (w =
|
|
5530
|
+
for (w = 0; w < N; w++) m[_ + w] = g[A + w];
|
|
5531
|
+
for (w = N; w < T; w++) m[_ + w] = g[A + w] - g[A + w - N] + 256 & 255;
|
|
5532
5532
|
} else if (k == 0) {
|
|
5533
|
-
for (w = 0; w <
|
|
5534
|
-
if (U == 2) for (w =
|
|
5535
|
-
if (U == 3) for (w =
|
|
5536
|
-
if (U == 4) for (w =
|
|
5533
|
+
for (w = 0; w < N; w++) m[_ + w] = g[A + w];
|
|
5534
|
+
if (U == 2) for (w = N; w < T; w++) m[_ + w] = g[A + w];
|
|
5535
|
+
if (U == 3) for (w = N; w < T; w++) m[_ + w] = g[A + w] - (g[A + w - N] >> 1) + 256 & 255;
|
|
5536
|
+
if (U == 4) for (w = N; w < T; w++) m[_ + w] = g[A + w] - t(g[A + w - N], 0, 0) + 256 & 255;
|
|
5537
5537
|
} else {
|
|
5538
5538
|
if (U == 2) for (w = 0; w < T; w++) m[_ + w] = g[A + w] + 256 - g[A + w - T] & 255;
|
|
5539
5539
|
if (U == 3) {
|
|
5540
|
-
for (w = 0; w <
|
|
5541
|
-
for (w =
|
|
5540
|
+
for (w = 0; w < N; w++) m[_ + w] = g[A + w] + 256 - (g[A + w - T] >> 1) & 255;
|
|
5541
|
+
for (w = N; w < T; w++) m[_ + w] = g[A + w] + 256 - (g[A + w - T] + g[A + w - N] >> 1) & 255;
|
|
5542
5542
|
}
|
|
5543
5543
|
if (U == 4) {
|
|
5544
|
-
for (w = 0; w <
|
|
5545
|
-
for (w =
|
|
5544
|
+
for (w = 0; w < N; w++) m[_ + w] = g[A + w] + 256 - t(0, g[A + w - T], 0) & 255;
|
|
5545
|
+
for (w = N; w < T; w++) m[_ + w] = g[A + w] + 256 - t(g[A + w - N], g[A + w - T], g[A + w - N - T]) & 255;
|
|
5546
5546
|
}
|
|
5547
5547
|
}
|
|
5548
5548
|
}
|
|
5549
|
-
function
|
|
5550
|
-
const k = new Uint8Array(m), T = k.slice(0),
|
|
5549
|
+
function F(m, g) {
|
|
5550
|
+
const k = new Uint8Array(m), T = k.slice(0), N = new Uint32Array(T.buffer), U = I(T, g), A = U[0], _ = U[1], w = k.length, p = new Uint8Array(w >> 2);
|
|
5551
5551
|
let M;
|
|
5552
5552
|
if (k.length < 2e7) for (var x = 0; x < w; x += 4)
|
|
5553
|
-
M = C(A, V = k[x] * (1 / 255),
|
|
5553
|
+
M = C(A, V = k[x] * (1 / 255), Z = k[x + 1] * (1 / 255), $ = k[x + 2] * (1 / 255), q = k[x + 3] * (1 / 255)), p[x >> 2] = M.ind, N[x >> 2] = M.est.rgba;
|
|
5554
5554
|
else for (x = 0; x < w; x += 4) {
|
|
5555
|
-
var V = k[x] * 0.00392156862745098,
|
|
5556
|
-
for (M = A; M.left; ) M = R(M.est, V,
|
|
5557
|
-
p[x >> 2] = M.ind,
|
|
5555
|
+
var V = k[x] * 0.00392156862745098, Z = k[x + 1] * (1 / 255), $ = k[x + 2] * (1 / 255), q = k[x + 3] * (1 / 255);
|
|
5556
|
+
for (M = A; M.left; ) M = R(M.est, V, Z, $, q) <= 0 ? M.left : M.right;
|
|
5557
|
+
p[x >> 2] = M.ind, N[x >> 2] = M.est.rgba;
|
|
5558
5558
|
}
|
|
5559
5559
|
return { abuf: T.buffer, inds: p, plte: _ };
|
|
5560
5560
|
}
|
|
5561
|
-
function
|
|
5561
|
+
function I(m, g, k) {
|
|
5562
5562
|
k == null && (k = 1e-4);
|
|
5563
|
-
const T = new Uint32Array(m.buffer),
|
|
5564
|
-
|
|
5565
|
-
const U = [
|
|
5563
|
+
const T = new Uint32Array(m.buffer), N = { i0: 0, i1: m.length, bst: null, est: null, tdst: 0, left: null, right: null };
|
|
5564
|
+
N.bst = L(m, N.i0, N.i1), N.est = b(N.bst);
|
|
5565
|
+
const U = [N];
|
|
5566
5566
|
for (; U.length < g; ) {
|
|
5567
5567
|
let _ = 0, w = 0;
|
|
5568
5568
|
for (var A = 0; A < U.length; A++) U[A].est.L > _ && (_ = U[A].est.L, w = A);
|
|
@@ -5580,68 +5580,68 @@ const Xe = function() {
|
|
|
5580
5580
|
V.est = b(V.bst), p.left = x, p.right = V, U[w] = x, U.push(V);
|
|
5581
5581
|
}
|
|
5582
5582
|
for (U.sort((_, w) => w.bst.N - _.bst.N), A = 0; A < U.length; A++) U[A].ind = A;
|
|
5583
|
-
return [
|
|
5584
|
-
}
|
|
5585
|
-
function C(m, g, k, T,
|
|
5586
|
-
if (m.left == null) return m.tdst = function(x, V,
|
|
5587
|
-
const
|
|
5588
|
-
return
|
|
5589
|
-
}(m.est.q, g, k, T,
|
|
5590
|
-
const U = R(m.est, g, k, T,
|
|
5583
|
+
return [N, U];
|
|
5584
|
+
}
|
|
5585
|
+
function C(m, g, k, T, N) {
|
|
5586
|
+
if (m.left == null) return m.tdst = function(x, V, Z, $, q) {
|
|
5587
|
+
const P = V - x[0], S = Z - x[1], X = $ - x[2], oe = q - x[3];
|
|
5588
|
+
return P * P + S * S + X * X + oe * oe;
|
|
5589
|
+
}(m.est.q, g, k, T, N), m;
|
|
5590
|
+
const U = R(m.est, g, k, T, N);
|
|
5591
5591
|
let A = m.left, _ = m.right;
|
|
5592
5592
|
U > 0 && (A = m.right, _ = m.left);
|
|
5593
|
-
const w = C(A, g, k, T,
|
|
5593
|
+
const w = C(A, g, k, T, N);
|
|
5594
5594
|
if (w.tdst <= U * U) return w;
|
|
5595
|
-
const p = C(_, g, k, T,
|
|
5595
|
+
const p = C(_, g, k, T, N);
|
|
5596
5596
|
return p.tdst < w.tdst ? p : w;
|
|
5597
5597
|
}
|
|
5598
|
-
function R(m, g, k, T,
|
|
5598
|
+
function R(m, g, k, T, N) {
|
|
5599
5599
|
const { e: U } = m;
|
|
5600
|
-
return U[0] * g + U[1] * k + U[2] * T + U[3] *
|
|
5600
|
+
return U[0] * g + U[1] * k + U[2] * T + U[3] * N - m.eMq;
|
|
5601
5601
|
}
|
|
5602
|
-
function O(m, g, k, T,
|
|
5602
|
+
function O(m, g, k, T, N, U) {
|
|
5603
5603
|
for (T -= 4; k < T; ) {
|
|
5604
|
-
for (; v(m, k,
|
|
5605
|
-
for (; v(m, T,
|
|
5604
|
+
for (; v(m, k, N) <= U; ) k += 4;
|
|
5605
|
+
for (; v(m, T, N) > U; ) T -= 4;
|
|
5606
5606
|
if (k >= T) break;
|
|
5607
5607
|
const A = g[k >> 2];
|
|
5608
5608
|
g[k >> 2] = g[T >> 2], g[T >> 2] = A, k += 4, T -= 4;
|
|
5609
5609
|
}
|
|
5610
|
-
for (; v(m, k,
|
|
5610
|
+
for (; v(m, k, N) > U; ) k -= 4;
|
|
5611
5611
|
return k + 4;
|
|
5612
5612
|
}
|
|
5613
5613
|
function v(m, g, k) {
|
|
5614
5614
|
return m[g] * k[0] + m[g + 1] * k[1] + m[g + 2] * k[2] + m[g + 3] * k[3];
|
|
5615
5615
|
}
|
|
5616
5616
|
function L(m, g, k) {
|
|
5617
|
-
const T = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
5617
|
+
const T = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], N = [0, 0, 0, 0], U = k - g >> 2;
|
|
5618
5618
|
for (let A = g; A < k; A += 4) {
|
|
5619
5619
|
const _ = m[A] * 0.00392156862745098, w = m[A + 1] * (1 / 255), p = m[A + 2] * (1 / 255), M = m[A + 3] * (1 / 255);
|
|
5620
|
-
|
|
5620
|
+
N[0] += _, N[1] += w, N[2] += p, N[3] += M, T[0] += _ * _, T[1] += _ * w, T[2] += _ * p, T[3] += _ * M, T[5] += w * w, T[6] += w * p, T[7] += w * M, T[10] += p * p, T[11] += p * M, T[15] += M * M;
|
|
5621
5621
|
}
|
|
5622
|
-
return T[4] = T[1], T[8] = T[2], T[9] = T[6], T[12] = T[3], T[13] = T[7], T[14] = T[11], { R: T, m:
|
|
5622
|
+
return T[4] = T[1], T[8] = T[2], T[9] = T[6], T[12] = T[3], T[13] = T[7], T[14] = T[11], { R: T, m: N, N: U };
|
|
5623
5623
|
}
|
|
5624
5624
|
function b(m) {
|
|
5625
|
-
const { R: g } = m, { m: k } = m, { N: T } = m,
|
|
5626
|
-
let V = [Math.random(), Math.random(), Math.random(), Math.random()],
|
|
5627
|
-
if (T != 0) for (let
|
|
5628
|
-
const
|
|
5629
|
-
return { Cov: p, q
|
|
5625
|
+
const { R: g } = m, { m: k } = m, { N: T } = m, N = k[0], U = k[1], A = k[2], _ = k[3], w = T == 0 ? 0 : 1 / T, p = [g[0] - N * N * w, g[1] - N * U * w, g[2] - N * A * w, g[3] - N * _ * w, g[4] - U * N * w, g[5] - U * U * w, g[6] - U * A * w, g[7] - U * _ * w, g[8] - A * N * w, g[9] - A * U * w, g[10] - A * A * w, g[11] - A * _ * w, g[12] - _ * N * w, g[13] - _ * U * w, g[14] - _ * A * w, g[15] - _ * _ * w], M = p, x = B;
|
|
5626
|
+
let V = [Math.random(), Math.random(), Math.random(), Math.random()], Z = 0, $ = 0;
|
|
5627
|
+
if (T != 0) for (let P = 0; P < 16 && (V = x.multVec(M, V), $ = Math.sqrt(x.dot(V, V)), V = x.sml(1 / $, V), !(P != 0 && Math.abs($ - Z) < 1e-9)); P++) Z = $;
|
|
5628
|
+
const q = [N * w, U * w, A * w, _ * w];
|
|
5629
|
+
return { Cov: p, q, e: V, L: Z, eMq255: x.dot(x.sml(255, q), V), eMq: x.dot(V, q), rgba: (Math.round(255 * q[3]) << 24 | Math.round(255 * q[2]) << 16 | Math.round(255 * q[1]) << 8 | Math.round(255 * q[0]) << 0) >>> 0 };
|
|
5630
5630
|
}
|
|
5631
5631
|
var B = { multVec: (m, g) => [m[0] * g[0] + m[1] * g[1] + m[2] * g[2] + m[3] * g[3], m[4] * g[0] + m[5] * g[1] + m[6] * g[2] + m[7] * g[3], m[8] * g[0] + m[9] * g[1] + m[10] * g[2] + m[11] * g[3], m[12] * g[0] + m[13] * g[1] + m[14] * g[2] + m[15] * g[3]], dot: (m, g) => m[0] * g[0] + m[1] * g[1] + m[2] * g[2] + m[3] * g[3], sml: (m, g) => [m * g[0], m * g[1], m * g[2], m * g[3]] };
|
|
5632
|
-
Xe.encode = function(g, k, T,
|
|
5633
|
-
|
|
5634
|
-
const w = l(g, k, T,
|
|
5632
|
+
Xe.encode = function(g, k, T, N, U, A, _) {
|
|
5633
|
+
N == null && (N = 0), _ == null && (_ = !1);
|
|
5634
|
+
const w = l(g, k, T, N, [!1, !1, !1, 0, _, !1]);
|
|
5635
5635
|
return h(w, -1), c(w, k, T, U, A);
|
|
5636
|
-
}, Xe.encodeLL = function(g, k, T,
|
|
5637
|
-
const p = { ctype: 0 + (
|
|
5636
|
+
}, Xe.encodeLL = function(g, k, T, N, U, A, _, w) {
|
|
5637
|
+
const p = { ctype: 0 + (N == 1 ? 0 : 2) + (U == 0 ? 0 : 4), depth: A, frames: [] }, M = (N + U) * A, x = M * k;
|
|
5638
5638
|
for (let V = 0; V < g.length; V++) p.frames.push({ rect: { x: 0, y: 0, width: k, height: T }, img: new Uint8Array(g[V]), blend: 0, dispose: 1, bpp: Math.ceil(M / 8), bpl: Math.ceil(x / 8) });
|
|
5639
5639
|
return h(p, 0, !0), c(p, k, T, _, w);
|
|
5640
|
-
}, Xe.encode.compress = l, Xe.encode.dither = a, Xe.quantize =
|
|
5640
|
+
}, Xe.encode.compress = l, Xe.encode.dither = a, Xe.quantize = F, Xe.quantize.getKDtree = I, Xe.quantize.getNearest = C;
|
|
5641
5641
|
})();
|
|
5642
|
-
const
|
|
5642
|
+
const Zr = { toArrayBuffer(s, e) {
|
|
5643
5643
|
const t = s.width, n = s.height, r = t << 2, i = s.getContext("2d").getImageData(0, 0, t, n), o = new Uint32Array(i.data.buffer), a = (32 * t + 31) / 32 << 2, c = a * n, h = 122 + c, l = new ArrayBuffer(h), u = new DataView(l), d = 1 << 20;
|
|
5644
|
-
let f, y,
|
|
5644
|
+
let f, y, F, I, C = d, R = 0, O = 0, v = 0;
|
|
5645
5645
|
function L(m) {
|
|
5646
5646
|
u.setUint16(O, m, !0), O += 2;
|
|
5647
5647
|
}
|
|
@@ -5653,19 +5653,19 @@ const qr = { toArrayBuffer(s, e) {
|
|
|
5653
5653
|
}
|
|
5654
5654
|
L(19778), b(h), B(4), b(122), b(108), b(t), b(-n >>> 0), L(1), L(32), b(3), b(c), b(2835), b(2835), B(8), b(16711680), b(65280), b(255), b(4278190080), b(1466527264), function m() {
|
|
5655
5655
|
for (; R < n && C > 0; ) {
|
|
5656
|
-
for (
|
|
5656
|
+
for (I = 122 + R * a, f = 0; f < r; ) C--, y = o[v++], F = y >>> 24, u.setUint32(I + f, y << 8 | F), f += 4;
|
|
5657
5657
|
R++;
|
|
5658
5658
|
}
|
|
5659
|
-
v < o.length ? (C = d, setTimeout(m,
|
|
5659
|
+
v < o.length ? (C = d, setTimeout(m, Zr._dly)) : e(l);
|
|
5660
5660
|
}();
|
|
5661
5661
|
}, toBlob(s, e) {
|
|
5662
5662
|
this.toArrayBuffer(s, (t) => {
|
|
5663
5663
|
e(new Blob([t], { type: "image/bmp" }));
|
|
5664
5664
|
});
|
|
5665
5665
|
}, _dly: 9 };
|
|
5666
|
-
var
|
|
5667
|
-
const
|
|
5668
|
-
function
|
|
5666
|
+
var Pe = { CHROME: "CHROME", FIREFOX: "FIREFOX", DESKTOP_SAFARI: "DESKTOP_SAFARI", IE: "IE", IOS: "IOS", ETC: "ETC" }, $s = { [Pe.CHROME]: 16384, [Pe.FIREFOX]: 11180, [Pe.DESKTOP_SAFARI]: 16384, [Pe.IE]: 8192, [Pe.IOS]: 4096, [Pe.ETC]: 8192 };
|
|
5667
|
+
const Qn = typeof window < "u", Kr = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope, kn = Qn && window.cordova && window.cordova.require && window.cordova.require("cordova/modulemapper"), Ws = (Qn || Kr) && (kn && kn.getOriginalSymbol(window, "File") || typeof File < "u" && File), zr = (Qn || Kr) && (kn && kn.getOriginalSymbol(window, "FileReader") || typeof FileReader < "u" && FileReader);
|
|
5668
|
+
function Yn(s, e, t = Date.now()) {
|
|
5669
5669
|
return new Promise((n) => {
|
|
5670
5670
|
const r = s.split(","), i = r[0].match(/:(.*?);/)[1], o = globalThis.atob(r[1]);
|
|
5671
5671
|
let a = o.length;
|
|
@@ -5677,7 +5677,7 @@ function Qn(s, e, t = Date.now()) {
|
|
|
5677
5677
|
}
|
|
5678
5678
|
function Xr(s) {
|
|
5679
5679
|
return new Promise((e, t) => {
|
|
5680
|
-
const n = new
|
|
5680
|
+
const n = new zr();
|
|
5681
5681
|
n.onload = () => e(n.result), n.onerror = (r) => t(r), n.readAsDataURL(s);
|
|
5682
5682
|
});
|
|
5683
5683
|
}
|
|
@@ -5689,12 +5689,12 @@ function Gr(s) {
|
|
|
5689
5689
|
}
|
|
5690
5690
|
function _t() {
|
|
5691
5691
|
if (_t.cachedResult !== void 0) return _t.cachedResult;
|
|
5692
|
-
let s =
|
|
5692
|
+
let s = Pe.ETC;
|
|
5693
5693
|
const { userAgent: e } = navigator;
|
|
5694
|
-
return /Chrom(e|ium)/i.test(e) ? s =
|
|
5694
|
+
return /Chrom(e|ium)/i.test(e) ? s = Pe.CHROME : /iP(ad|od|hone)/i.test(e) && /WebKit/i.test(e) ? s = Pe.IOS : /Safari/i.test(e) ? s = Pe.DESKTOP_SAFARI : /Firefox/i.test(e) ? s = Pe.FIREFOX : (/MSIE/i.test(e) || document.documentMode) && (s = Pe.IE), _t.cachedResult = s, _t.cachedResult;
|
|
5695
5695
|
}
|
|
5696
5696
|
function Jr(s, e) {
|
|
5697
|
-
const t = _t(), n =
|
|
5697
|
+
const t = _t(), n = $s[t];
|
|
5698
5698
|
let r = s, i = e, o = r * i;
|
|
5699
5699
|
const a = r > i ? i / r : r / i;
|
|
5700
5700
|
for (; o > n * n; ) {
|
|
@@ -5703,7 +5703,7 @@ function Jr(s, e) {
|
|
|
5703
5703
|
}
|
|
5704
5704
|
return { width: r, height: i };
|
|
5705
5705
|
}
|
|
5706
|
-
function
|
|
5706
|
+
function _n(s, e) {
|
|
5707
5707
|
let t, n;
|
|
5708
5708
|
try {
|
|
5709
5709
|
if (t = new OffscreenCanvas(s, e), n = t.getContext("2d"), n === null) throw new Error("getContext of OffscreenCanvas returns null");
|
|
@@ -5712,19 +5712,19 @@ function xn(s, e) {
|
|
|
5712
5712
|
}
|
|
5713
5713
|
return t.width = s, t.height = e, [t, n];
|
|
5714
5714
|
}
|
|
5715
|
-
function
|
|
5716
|
-
const { width: t, height: n } = Jr(s.width, s.height), [r, i] =
|
|
5715
|
+
function Qr(s, e) {
|
|
5716
|
+
const { width: t, height: n } = Jr(s.width, s.height), [r, i] = _n(t, n);
|
|
5717
5717
|
return e && /jpe?g/.test(e) && (i.fillStyle = "white", i.fillRect(0, 0, r.width, r.height)), i.drawImage(s, 0, 0, r.width, r.height), r;
|
|
5718
5718
|
}
|
|
5719
|
-
function
|
|
5720
|
-
return
|
|
5719
|
+
function bn() {
|
|
5720
|
+
return bn.cachedResult !== void 0 || (bn.cachedResult = ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && typeof document < "u" && "ontouchend" in document), bn.cachedResult;
|
|
5721
5721
|
}
|
|
5722
|
-
function
|
|
5722
|
+
function Fn(s, e = {}) {
|
|
5723
5723
|
return new Promise(function(t, n) {
|
|
5724
5724
|
let r, i;
|
|
5725
5725
|
var o = function() {
|
|
5726
5726
|
try {
|
|
5727
|
-
return i =
|
|
5727
|
+
return i = Qr(r, e.fileType || s.type), t([r, i]);
|
|
5728
5728
|
} catch (c) {
|
|
5729
5729
|
return n(c);
|
|
5730
5730
|
}
|
|
@@ -5766,7 +5766,7 @@ function kn(s, e = {}) {
|
|
|
5766
5766
|
}
|
|
5767
5767
|
};
|
|
5768
5768
|
try {
|
|
5769
|
-
if (
|
|
5769
|
+
if (bn() || [Pe.DESKTOP_SAFARI, Pe.MOBILE_SAFARI].includes(_t())) throw new Error("Skip createImageBitmap on IOS and Safari");
|
|
5770
5770
|
return createImageBitmap(s).then(function(c) {
|
|
5771
5771
|
try {
|
|
5772
5772
|
return r = c, o();
|
|
@@ -5779,7 +5779,7 @@ function kn(s, e = {}) {
|
|
|
5779
5779
|
}
|
|
5780
5780
|
});
|
|
5781
5781
|
}
|
|
5782
|
-
function
|
|
5782
|
+
function Nn(s, e, t, n, r = 1) {
|
|
5783
5783
|
return new Promise(function(i, o) {
|
|
5784
5784
|
let a;
|
|
5785
5785
|
if (e === "image/png") {
|
|
@@ -5790,7 +5790,7 @@ function In(s, e, t, n, r = 1) {
|
|
|
5790
5790
|
let h = function() {
|
|
5791
5791
|
return c.call(this);
|
|
5792
5792
|
};
|
|
5793
|
-
if (e === "image/bmp") return new Promise((l) =>
|
|
5793
|
+
if (e === "image/bmp") return new Promise((l) => Zr.toBlob(s, l)).then((function(l) {
|
|
5794
5794
|
try {
|
|
5795
5795
|
return a = l, a.name = t, a.lastModified = n, h.call(this);
|
|
5796
5796
|
} catch (u) {
|
|
@@ -5810,7 +5810,7 @@ function In(s, e, t, n, r = 1) {
|
|
|
5810
5810
|
}).bind(this), o);
|
|
5811
5811
|
{
|
|
5812
5812
|
let u;
|
|
5813
|
-
return u = s.toDataURL(e, r),
|
|
5813
|
+
return u = s.toDataURL(e, r), Yn(u, t, n).then((function(d) {
|
|
5814
5814
|
try {
|
|
5815
5815
|
return a = d, l.call(this);
|
|
5816
5816
|
} catch (f) {
|
|
@@ -5828,18 +5828,18 @@ function In(s, e, t, n, r = 1) {
|
|
|
5828
5828
|
function ht(s) {
|
|
5829
5829
|
s.width = 0, s.height = 0;
|
|
5830
5830
|
}
|
|
5831
|
-
function
|
|
5831
|
+
function $t() {
|
|
5832
5832
|
return new Promise(function(s, e) {
|
|
5833
5833
|
let t, n, r, i;
|
|
5834
|
-
return
|
|
5834
|
+
return $t.cachedResult !== void 0 ? s($t.cachedResult) : Yn("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==", "test.jpg", Date.now()).then(function(o) {
|
|
5835
5835
|
try {
|
|
5836
|
-
return t = o,
|
|
5836
|
+
return t = o, Fn(t).then(function(a) {
|
|
5837
5837
|
try {
|
|
5838
|
-
return n = a[1],
|
|
5838
|
+
return n = a[1], Nn(n, t.type, t.name, t.lastModified).then(function(c) {
|
|
5839
5839
|
try {
|
|
5840
|
-
return r = c, ht(n),
|
|
5840
|
+
return r = c, ht(n), Fn(r).then(function(h) {
|
|
5841
5841
|
try {
|
|
5842
|
-
return i = h[0],
|
|
5842
|
+
return i = h[0], $t.cachedResult = i.width === 1 && i.height === 2, s($t.cachedResult);
|
|
5843
5843
|
} catch (l) {
|
|
5844
5844
|
return e(l);
|
|
5845
5845
|
}
|
|
@@ -5858,9 +5858,9 @@ function Wt() {
|
|
|
5858
5858
|
}, e);
|
|
5859
5859
|
});
|
|
5860
5860
|
}
|
|
5861
|
-
function
|
|
5861
|
+
function Yr(s) {
|
|
5862
5862
|
return new Promise((e, t) => {
|
|
5863
|
-
const n = new
|
|
5863
|
+
const n = new zr();
|
|
5864
5864
|
n.onload = (r) => {
|
|
5865
5865
|
const i = new DataView(r.target.result);
|
|
5866
5866
|
if (i.getUint16(0, !1) != 65496) return e(-2);
|
|
@@ -5888,10 +5888,10 @@ function Qr(s) {
|
|
|
5888
5888
|
function ei(s, e) {
|
|
5889
5889
|
const { width: t } = s, { height: n } = s, { maxWidthOrHeight: r } = e;
|
|
5890
5890
|
let i, o = s;
|
|
5891
|
-
return isFinite(r) && (t > r || n > r) && ([o, i] =
|
|
5891
|
+
return isFinite(r) && (t > r || n > r) && ([o, i] = _n(t, n), t > n ? (o.width = r, o.height = n / t * r) : (o.width = t / n * r, o.height = r), i.drawImage(s, 0, 0, o.width, o.height), ht(s)), o;
|
|
5892
5892
|
}
|
|
5893
5893
|
function ti(s, e) {
|
|
5894
|
-
const { width: t } = s, { height: n } = s, [r, i] =
|
|
5894
|
+
const { width: t } = s, { height: n } = s, [r, i] = _n(t, n);
|
|
5895
5895
|
switch (e > 4 && e < 9 ? (r.width = n, r.height = t) : (r.width = t, r.height = n), e) {
|
|
5896
5896
|
case 2:
|
|
5897
5897
|
i.transform(-1, 0, 0, 1, t, 0);
|
|
@@ -5918,7 +5918,7 @@ function ti(s, e) {
|
|
|
5918
5918
|
}
|
|
5919
5919
|
function Ar(s, e, t = 0) {
|
|
5920
5920
|
return new Promise(function(n, r) {
|
|
5921
|
-
let i, o, a, c, h, l, u, d, f, y,
|
|
5921
|
+
let i, o, a, c, h, l, u, d, f, y, F, I, C, R, O, v, L, b, B, m;
|
|
5922
5922
|
function g(T = 5) {
|
|
5923
5923
|
if (e.signal && e.signal.aborted) throw e.signal.reason;
|
|
5924
5924
|
i += T, e.onProgress(Math.min(i, 100));
|
|
@@ -5927,11 +5927,11 @@ function Ar(s, e, t = 0) {
|
|
|
5927
5927
|
if (e.signal && e.signal.aborted) throw e.signal.reason;
|
|
5928
5928
|
i = Math.min(Math.max(T, i), 100), e.onProgress(i);
|
|
5929
5929
|
}
|
|
5930
|
-
return i = t, o = e.maxIteration || 10, a = 1024 * e.maxSizeMB * 1024, g(),
|
|
5930
|
+
return i = t, o = e.maxIteration || 10, a = 1024 * e.maxSizeMB * 1024, g(), Fn(s, e).then((function(T) {
|
|
5931
5931
|
try {
|
|
5932
|
-
return [, c] = T, g(), h = ei(c, e), g(), new Promise(function(
|
|
5932
|
+
return [, c] = T, g(), h = ei(c, e), g(), new Promise(function(N, U) {
|
|
5933
5933
|
var A;
|
|
5934
|
-
if (!(A = e.exifOrientation)) return
|
|
5934
|
+
if (!(A = e.exifOrientation)) return Yr(s).then((function(w) {
|
|
5935
5935
|
try {
|
|
5936
5936
|
return A = w, _.call(this);
|
|
5937
5937
|
} catch (p) {
|
|
@@ -5939,24 +5939,24 @@ function Ar(s, e, t = 0) {
|
|
|
5939
5939
|
}
|
|
5940
5940
|
}).bind(this), U);
|
|
5941
5941
|
function _() {
|
|
5942
|
-
return
|
|
5942
|
+
return N(A);
|
|
5943
5943
|
}
|
|
5944
5944
|
return _.call(this);
|
|
5945
|
-
}).then((function(
|
|
5945
|
+
}).then((function(N) {
|
|
5946
5946
|
try {
|
|
5947
|
-
return l =
|
|
5947
|
+
return l = N, g(), $t().then((function(U) {
|
|
5948
5948
|
try {
|
|
5949
|
-
return u = U ? h : ti(h, l), g(), d = e.initialQuality || 1, f = e.fileType || s.type,
|
|
5949
|
+
return u = U ? h : ti(h, l), g(), d = e.initialQuality || 1, f = e.fileType || s.type, Nn(u, f, s.name, s.lastModified, d).then((function(A) {
|
|
5950
5950
|
try {
|
|
5951
5951
|
{
|
|
5952
5952
|
let w = function() {
|
|
5953
5953
|
if (o-- && (O > a || O > C)) {
|
|
5954
5954
|
let M, x;
|
|
5955
|
-
return M = m ? 0.95 * B.width : B.width, x = m ? 0.95 * B.height : B.height, [L, b] =
|
|
5955
|
+
return M = m ? 0.95 * B.width : B.width, x = m ? 0.95 * B.height : B.height, [L, b] = _n(M, x), b.drawImage(B, 0, 0, M, x), d *= f === "image/png" ? 0.85 : 0.95, Nn(L, f, s.name, s.lastModified, d).then(function(V) {
|
|
5956
5956
|
try {
|
|
5957
5957
|
return v = V, ht(B), B = L, O = v.size, k(Math.min(99, Math.floor((R - O) / (R - a) * 100))), w;
|
|
5958
|
-
} catch (
|
|
5959
|
-
return r(
|
|
5958
|
+
} catch (Z) {
|
|
5959
|
+
return r(Z);
|
|
5960
5960
|
}
|
|
5961
5961
|
}, r);
|
|
5962
5962
|
}
|
|
@@ -5964,9 +5964,9 @@ function Ar(s, e, t = 0) {
|
|
|
5964
5964
|
}, p = function() {
|
|
5965
5965
|
return ht(B), ht(L), ht(h), ht(u), ht(c), k(100), n(v);
|
|
5966
5966
|
};
|
|
5967
|
-
if (y = A, g(),
|
|
5967
|
+
if (y = A, g(), F = y.size > a, I = y.size > s.size, !F && !I) return k(100), n(y);
|
|
5968
5968
|
var _;
|
|
5969
|
-
return C = s.size, R = y.size, O = R, B = u, m = !e.alwaysKeepResolution &&
|
|
5969
|
+
return C = s.size, R = y.size, O = R, B = u, m = !e.alwaysKeepResolution && F, (_ = (function(M) {
|
|
5970
5970
|
for (; M; ) {
|
|
5971
5971
|
if (M.then) return void M.then(_, r);
|
|
5972
5972
|
try {
|
|
@@ -5992,13 +5992,13 @@ function Ar(s, e, t = 0) {
|
|
|
5992
5992
|
return r(U);
|
|
5993
5993
|
}
|
|
5994
5994
|
}).bind(this), r);
|
|
5995
|
-
} catch (
|
|
5996
|
-
return r(
|
|
5995
|
+
} catch (N) {
|
|
5996
|
+
return r(N);
|
|
5997
5997
|
}
|
|
5998
5998
|
}).bind(this), r);
|
|
5999
5999
|
});
|
|
6000
6000
|
}
|
|
6001
|
-
const
|
|
6001
|
+
const js = `
|
|
6002
6002
|
let scriptImported = false
|
|
6003
6003
|
self.addEventListener('message', async (e) => {
|
|
6004
6004
|
const { file, id, imageCompressionLibUrl, options } = e.data
|
|
@@ -6018,14 +6018,14 @@ self.addEventListener('message', async (e) => {
|
|
|
6018
6018
|
}
|
|
6019
6019
|
})
|
|
6020
6020
|
`;
|
|
6021
|
-
let
|
|
6022
|
-
function
|
|
6021
|
+
let Pn;
|
|
6022
|
+
function qs(s, e) {
|
|
6023
6023
|
return new Promise((t, n) => {
|
|
6024
|
-
|
|
6024
|
+
Pn || (Pn = function(o) {
|
|
6025
6025
|
const a = [];
|
|
6026
6026
|
return a.push(o), URL.createObjectURL(new Blob(a));
|
|
6027
|
-
}(
|
|
6028
|
-
const r = new Worker(
|
|
6027
|
+
}(js));
|
|
6028
|
+
const r = new Worker(Pn);
|
|
6029
6029
|
r.addEventListener("message", function(o) {
|
|
6030
6030
|
if (e.signal && e.signal.aborted) r.terminate();
|
|
6031
6031
|
else if (o.data.progress === void 0) {
|
|
@@ -6042,7 +6042,7 @@ function Be(s, e) {
|
|
|
6042
6042
|
let r, i, o, a, c, h;
|
|
6043
6043
|
if (r = { ...e }, o = 0, { onProgress: a } = r, r.maxSizeMB = r.maxSizeMB || Number.POSITIVE_INFINITY, c = typeof r.useWebWorker != "boolean" || r.useWebWorker, delete r.useWebWorker, r.onProgress = (f) => {
|
|
6044
6044
|
o = f, typeof a == "function" && a(o);
|
|
6045
|
-
}, !(s instanceof Blob || s instanceof
|
|
6045
|
+
}, !(s instanceof Blob || s instanceof Ws)) return n(new Error("The file given is not an instance of Blob or File"));
|
|
6046
6046
|
if (!/^image/.test(s.type)) return n(new Error("The file given is not an image"));
|
|
6047
6047
|
if (h = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope, !c || typeof Worker != "function" || h) return Ar(s, r).then((function(f) {
|
|
6048
6048
|
try {
|
|
@@ -6062,8 +6062,8 @@ function Be(s, e) {
|
|
|
6062
6062
|
return Ar(s, r).then(function(y) {
|
|
6063
6063
|
try {
|
|
6064
6064
|
return i = y, l();
|
|
6065
|
-
} catch (
|
|
6066
|
-
return n(
|
|
6065
|
+
} catch (F) {
|
|
6066
|
+
return n(F);
|
|
6067
6067
|
}
|
|
6068
6068
|
}, n);
|
|
6069
6069
|
} catch (y) {
|
|
@@ -6071,7 +6071,7 @@ function Be(s, e) {
|
|
|
6071
6071
|
}
|
|
6072
6072
|
};
|
|
6073
6073
|
try {
|
|
6074
|
-
return r.libURL = r.libURL || "https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",
|
|
6074
|
+
return r.libURL = r.libURL || "https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js", qs(s, r).then(function(f) {
|
|
6075
6075
|
try {
|
|
6076
6076
|
return i = f, l();
|
|
6077
6077
|
} catch {
|
|
@@ -6087,15 +6087,15 @@ function Be(s, e) {
|
|
|
6087
6087
|
} catch {
|
|
6088
6088
|
}
|
|
6089
6089
|
try {
|
|
6090
|
-
r.preserveExif && s.type === "image/jpeg" && (!r.fileType || r.fileType && r.fileType === s.type) && (i =
|
|
6090
|
+
r.preserveExif && s.type === "image/jpeg" && (!r.fileType || r.fileType && r.fileType === s.type) && (i = qr(s, i));
|
|
6091
6091
|
} catch {
|
|
6092
6092
|
}
|
|
6093
6093
|
return t(i);
|
|
6094
6094
|
}
|
|
6095
6095
|
});
|
|
6096
6096
|
}
|
|
6097
|
-
Be.getDataUrlFromFile = Xr, Be.getFilefromDataUrl =
|
|
6098
|
-
class
|
|
6097
|
+
Be.getDataUrlFromFile = Xr, Be.getFilefromDataUrl = Yn, Be.loadImage = Gr, Be.drawImageInCanvas = Qr, Be.drawFileInCanvas = Fn, Be.canvasToFile = Nn, Be.getExifOrientation = Yr, Be.handleMaxWidthOrHeight = ei, Be.followExifOrientation = ti, Be.cleanupCanvasMemory = ht, Be.isAutoOrientationInBrowser = $t, Be.approximateBelowMaximumCanvasSizeOfBrowser = Jr, Be.copyExifWithoutOrientation = qr, Be.getBrowserName = _t, Be.version = "2.0.2";
|
|
6098
|
+
class Zs extends Fe {
|
|
6099
6099
|
constructor() {
|
|
6100
6100
|
super("com.hamropatro.grpc.common.ImageUploadRequest", [
|
|
6101
6101
|
{
|
|
@@ -6131,13 +6131,13 @@ class qs extends Ie {
|
|
|
6131
6131
|
return i;
|
|
6132
6132
|
}
|
|
6133
6133
|
internalBinaryWrite(e, t, n) {
|
|
6134
|
-
e.mimeType !== "" && t.tag(1,
|
|
6134
|
+
e.mimeType !== "" && t.tag(1, W.LengthDelimited).string(e.mimeType);
|
|
6135
6135
|
let r = n.writeUnknownFields;
|
|
6136
6136
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
6137
6137
|
}
|
|
6138
6138
|
}
|
|
6139
|
-
const
|
|
6140
|
-
class
|
|
6139
|
+
const In = new Zs();
|
|
6140
|
+
class Ks extends Fe {
|
|
6141
6141
|
constructor() {
|
|
6142
6142
|
super("com.hamropatro.grpc.common.ImageUploadResponse", [
|
|
6143
6143
|
{
|
|
@@ -6195,20 +6195,20 @@ class zs extends Ie {
|
|
|
6195
6195
|
return i;
|
|
6196
6196
|
}
|
|
6197
6197
|
internalBinaryWrite(e, t, n) {
|
|
6198
|
-
e.key !== "" && t.tag(1,
|
|
6198
|
+
e.key !== "" && t.tag(1, W.LengthDelimited).string(e.key), e.uploadUrl !== "" && t.tag(2, W.LengthDelimited).string(e.uploadUrl), e.accessUrl !== "" && t.tag(3, W.LengthDelimited).string(e.accessUrl);
|
|
6199
6199
|
let r = n.writeUnknownFields;
|
|
6200
6200
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
6201
6201
|
}
|
|
6202
6202
|
}
|
|
6203
|
-
const kr = new
|
|
6204
|
-
{ name: "Upload", options: {}, I:
|
|
6205
|
-
{ name: "UploadUserImage", options: {}, I:
|
|
6203
|
+
const kr = new Ks(), $n = new Gn("com.hamropatro.grpc.common.ImageUploadService", [
|
|
6204
|
+
{ name: "Upload", options: {}, I: In, O: kr },
|
|
6205
|
+
{ name: "UploadUserImage", options: {}, I: In, O: kr }
|
|
6206
6206
|
]);
|
|
6207
6207
|
class ni {
|
|
6208
6208
|
constructor(e) {
|
|
6209
|
-
he(this, "typeName",
|
|
6210
|
-
he(this, "methods",
|
|
6211
|
-
he(this, "options",
|
|
6209
|
+
he(this, "typeName", $n.typeName);
|
|
6210
|
+
he(this, "methods", $n.methods);
|
|
6211
|
+
he(this, "options", $n.options);
|
|
6212
6212
|
this._transport = e;
|
|
6213
6213
|
}
|
|
6214
6214
|
/**
|
|
@@ -6226,9 +6226,9 @@ class ni {
|
|
|
6226
6226
|
return Me("unary", this._transport, n, r, e);
|
|
6227
6227
|
}
|
|
6228
6228
|
}
|
|
6229
|
-
const
|
|
6229
|
+
const zs = async (s, e, t = !0) => {
|
|
6230
6230
|
var o;
|
|
6231
|
-
const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new ni(n), i =
|
|
6231
|
+
const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new ni(n), i = In.create();
|
|
6232
6232
|
try {
|
|
6233
6233
|
return i.mimeType = s, t ? await r.upload(i, e) : await r.uploadUserImage(
|
|
6234
6234
|
i,
|
|
@@ -6239,7 +6239,7 @@ const Ks = async (s, e, t = !0) => {
|
|
|
6239
6239
|
}
|
|
6240
6240
|
}, Xs = async (s, e) => {
|
|
6241
6241
|
var o, a;
|
|
6242
|
-
const t = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, n = (a = window.ImageSalonSDK) == null ? void 0 : a.mode, r = new ni(t), i =
|
|
6242
|
+
const t = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, n = (a = window.ImageSalonSDK) == null ? void 0 : a.mode, r = new ni(t), i = In.create();
|
|
6243
6243
|
try {
|
|
6244
6244
|
return i.mimeType = s, await r.uploadUserImage(
|
|
6245
6245
|
i,
|
|
@@ -6253,10 +6253,10 @@ const Ks = async (s, e, t = !0) => {
|
|
|
6253
6253
|
} catch (c) {
|
|
6254
6254
|
throw c;
|
|
6255
6255
|
}
|
|
6256
|
-
},
|
|
6256
|
+
}, Fr = async (s, e, t, n = !0) => {
|
|
6257
6257
|
var r, i;
|
|
6258
6258
|
try {
|
|
6259
|
-
const o = await
|
|
6259
|
+
const o = await zs(e == null ? void 0 : e.type, t, n), a = (r = o.response) == null ? void 0 : r.uploadUrl, c = (i = o == null ? void 0 : o.response) == null ? void 0 : i.accessUrl;
|
|
6260
6260
|
return await ri(s, a, e), c;
|
|
6261
6261
|
} catch (o) {
|
|
6262
6262
|
throw o;
|
|
@@ -6291,7 +6291,7 @@ const Ks = async (s, e, t = !0) => {
|
|
|
6291
6291
|
i[o] = r.charCodeAt(o);
|
|
6292
6292
|
return i;
|
|
6293
6293
|
};
|
|
6294
|
-
async function
|
|
6294
|
+
async function Nr(s) {
|
|
6295
6295
|
const e = {
|
|
6296
6296
|
maxSizeMB: 2,
|
|
6297
6297
|
useWebWorker: !1,
|
|
@@ -6303,7 +6303,7 @@ async function Fr(s) {
|
|
|
6303
6303
|
throw t;
|
|
6304
6304
|
}
|
|
6305
6305
|
}
|
|
6306
|
-
function
|
|
6306
|
+
function Qs(s = "24px", e = "24px", t = "#000") {
|
|
6307
6307
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
6308
6308
|
n.setAttribute("xmlns", "http://www.w3.org/2000/svg"), n.setAttribute("height", e), n.setAttribute("viewBox", "0 -960 960 960"), n.setAttribute("width", s), n.setAttribute("fill", t);
|
|
6309
6309
|
const r = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -6312,56 +6312,56 @@ function Ys(s = "24px", e = "24px", t = "#000") {
|
|
|
6312
6312
|
"M240-200h120v-240h240v240h120v-360L480-740 240-560v360Zm-80 80v-480l320-240 320 240v480H520v-240h-80v240H160Zm320-350Z"
|
|
6313
6313
|
), n.appendChild(r), n;
|
|
6314
6314
|
}
|
|
6315
|
-
var mt, we, Ee, gt, ue, ke, Je,
|
|
6316
|
-
class
|
|
6315
|
+
var mt, we, Ee, gt, ue, ke, Je, $e, Bt, kt, at, De, Qe, Ot, Ft, Nt, wt, St, lt, Ze, It, Tt, yt, jt, sn, Oe, Rt, on, Tn, an, ct, qt, Lt, Zt, Dt, Kt, zt, Xt, ln, cn, Gt, dt, Jt, dn, Qt;
|
|
6316
|
+
class eo {
|
|
6317
6317
|
constructor(e) {
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
H(this,
|
|
6364
|
-
H(this,
|
|
6318
|
+
z(this, mt);
|
|
6319
|
+
z(this, we);
|
|
6320
|
+
z(this, Ee);
|
|
6321
|
+
z(this, gt);
|
|
6322
|
+
z(this, ue, []);
|
|
6323
|
+
z(this, ke, []);
|
|
6324
|
+
z(this, Je);
|
|
6325
|
+
z(this, $e);
|
|
6326
|
+
z(this, Bt);
|
|
6327
|
+
z(this, kt);
|
|
6328
|
+
z(this, at, []);
|
|
6329
|
+
z(this, De);
|
|
6330
|
+
z(this, Qe);
|
|
6331
|
+
z(this, Ot);
|
|
6332
|
+
z(this, Ft);
|
|
6333
|
+
z(this, Nt);
|
|
6334
|
+
z(this, wt);
|
|
6335
|
+
z(this, St);
|
|
6336
|
+
z(this, lt);
|
|
6337
|
+
z(this, Ze);
|
|
6338
|
+
z(this, It);
|
|
6339
|
+
z(this, Tt);
|
|
6340
|
+
z(this, yt);
|
|
6341
|
+
z(this, jt);
|
|
6342
|
+
z(this, sn);
|
|
6343
|
+
z(this, Oe);
|
|
6344
|
+
z(this, Rt);
|
|
6345
|
+
z(this, on, !1);
|
|
6346
|
+
z(this, Tn);
|
|
6347
|
+
z(this, an);
|
|
6348
|
+
z(this, ct);
|
|
6349
|
+
z(this, qt);
|
|
6350
|
+
z(this, Lt);
|
|
6351
|
+
z(this, Zt);
|
|
6352
|
+
z(this, Dt);
|
|
6353
|
+
z(this, Kt);
|
|
6354
|
+
z(this, zt);
|
|
6355
|
+
z(this, Xt);
|
|
6356
|
+
z(this, ln);
|
|
6357
|
+
z(this, cn);
|
|
6358
|
+
z(this, Gt);
|
|
6359
|
+
z(this, dt);
|
|
6360
|
+
z(this, Jt);
|
|
6361
|
+
z(this, dn);
|
|
6362
|
+
z(this, Qt);
|
|
6363
|
+
H(this, an, e.isAdmin), H(this, Je, !1), H(this, Zt, e == null ? void 0 : e.mode), e.handleUpload && H(this, Ot, e.handleUpload.bind(this)), e != null && e.accessToken && (H(this, sn, e.accessToken), this._grpcOptionInitializer()), this._init(e).then(() => {
|
|
6364
|
+
H(this, on, !0), e != null && e.parentContainerId && this._renderView(e), this.updateWindowObject({ initialized: !0 }), this._initializeGrpcConfig(e.mode, e.endPoint);
|
|
6365
6365
|
});
|
|
6366
6366
|
}
|
|
6367
6367
|
async _init(e) {
|
|
@@ -6377,14 +6377,14 @@ class Qs {
|
|
|
6377
6377
|
}
|
|
6378
6378
|
_renderView(e) {
|
|
6379
6379
|
var t, n, r;
|
|
6380
|
-
return this._isAdminOptions(e) ? (H(this,
|
|
6380
|
+
return this._isAdminOptions(e) ? (H(this, $e, !1), H(this, Bt, !1), H(this, Ft, 0), H(this, Ze, ""), H(this, yt, !1), H(this, Zt, e.mode), H(this, It, !1), H(this, Lt, ""), H(this, Rt, null), H(this, dn, e.enableDialog), this._removeToastContainer(), this._renderAdminView(e)) : (H(this, qt, ""), H(this, Dt, e == null ? void 0 : e.restrictedFileSize), H(this, Kt, e == null ? void 0 : e.localizedFileRestrictedMessage), H(this, Xt, e == null ? void 0 : e.localizedSuccessMessage), H(this, zt, e == null ? void 0 : e.localizedErrorMessage), H(this, dt, e == null ? void 0 : e.imagePreviewWidth), H(this, Jt, e == null ? void 0 : e.imagePreviewHeight), H(this, ln, (t = e == null ? void 0 : e.removeImageConfirm) == null ? void 0 : t.bind(this)), H(this, cn, (n = e == null ? void 0 : e.removeImagePreviewCB) == null ? void 0 : n.bind(this)), H(this, Gt, (r = e == null ? void 0 : e.getUploadingState) == null ? void 0 : r.bind(this)), H(this, Qt, e == null ? void 0 : e.uploadText), this._removeUserToast(), this._renderUserView(e));
|
|
6381
6381
|
}
|
|
6382
6382
|
_renderAdminView(e) {
|
|
6383
|
-
if (!E(this,
|
|
6383
|
+
if (!E(this, on)) return;
|
|
6384
6384
|
const { parentContainerId: t } = e;
|
|
6385
6385
|
if (e.isAdmin === !0)
|
|
6386
6386
|
var { buttonProps: n } = e;
|
|
6387
|
-
if (H(this, mt, document.getElementById(t)), !E(this,
|
|
6387
|
+
if (H(this, mt, document.getElementById(t)), !E(this, dn))
|
|
6388
6388
|
setTimeout(() => {
|
|
6389
6389
|
const r = this._selectedImageContainer();
|
|
6390
6390
|
E(this, mt).appendChild(r);
|
|
@@ -6404,35 +6404,35 @@ class Qs {
|
|
|
6404
6404
|
}
|
|
6405
6405
|
async _grpcOptionInitializer() {
|
|
6406
6406
|
H(this, Oe, await Ss(
|
|
6407
|
-
E(this,
|
|
6408
|
-
E(this,
|
|
6407
|
+
E(this, sn),
|
|
6408
|
+
E(this, Zt)
|
|
6409
6409
|
));
|
|
6410
6410
|
}
|
|
6411
6411
|
_commonImageContainer() {
|
|
6412
6412
|
var h;
|
|
6413
|
-
H(this,
|
|
6414
|
-
const e =
|
|
6413
|
+
H(this, Nt, K("folder-container")), H(this, wt, K("folder-list-wrapper")), this._fetchAllFolders(), H(this, we, K("browse-container"));
|
|
6414
|
+
const e = K();
|
|
6415
6415
|
e.style.display = "flex", e.style.alignItems = "center", e.style.justifyContent = "space-between", e.style.padding = "10px 20px";
|
|
6416
|
-
const t =
|
|
6417
|
-
n.append(br()), this._createUpdateFolderDialog(n, "create"), e.append(t, n), E(this,
|
|
6418
|
-
const r = this._renderSearchField(), i = this._createBrowseMoreContainer(), o = this._createBrowseImageMain(), a =
|
|
6419
|
-
H(this,
|
|
6416
|
+
const t = tn("Folders", "folder-title"), n = He("", "add-folder-btn");
|
|
6417
|
+
n.append(br()), this._createUpdateFolderDialog(n, "create"), e.append(t, n), E(this, Nt).append(e, E(this, wt));
|
|
6418
|
+
const r = this._renderSearchField(), i = this._createBrowseMoreContainer(), o = this._createBrowseImageMain(), a = K("footer");
|
|
6419
|
+
H(this, Qe, He(
|
|
6420
6420
|
`Save (${(h = E(this, ue)) == null ? void 0 : h.length})`,
|
|
6421
6421
|
"dialog-btn confirm"
|
|
6422
6422
|
));
|
|
6423
|
-
const c =
|
|
6424
|
-
return c.append(r, i, o, a), E(this, we).append(E(this,
|
|
6423
|
+
const c = K("container-right-main");
|
|
6424
|
+
return c.append(r, i, o, a), E(this, we).append(E(this, Nt), c), { footer: a, wrapper: c };
|
|
6425
6425
|
}
|
|
6426
6426
|
_selectedImageContainer() {
|
|
6427
6427
|
const { footer: e } = this._commonImageContainer();
|
|
6428
|
-
return E(this,
|
|
6428
|
+
return E(this, Qe).onclick = () => {
|
|
6429
6429
|
E(this, Ot).call(this), H(this, ue, []), H(this, ke, []);
|
|
6430
|
-
}, e.appendChild(E(this,
|
|
6430
|
+
}, e.appendChild(E(this, Qe)), E(this, we);
|
|
6431
6431
|
}
|
|
6432
6432
|
_selectedImageContainerDialog() {
|
|
6433
6433
|
var r;
|
|
6434
6434
|
const { footer: e } = this._commonImageContainer();
|
|
6435
|
-
H(this,
|
|
6435
|
+
H(this, Qe, He(
|
|
6436
6436
|
`Save (${(r = E(this, ue)) == null ? void 0 : r.length})`,
|
|
6437
6437
|
"dialog-btn confirm"
|
|
6438
6438
|
));
|
|
@@ -6444,47 +6444,47 @@ class Qs {
|
|
|
6444
6444
|
!1,
|
|
6445
6445
|
'<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="24" height="24" viewBox="0 0 50 50"> <path d="M 9.15625 6.3125 L 6.3125 9.15625 L 22.15625 25 L 6.21875 40.96875 L 9.03125 43.78125 L 25 27.84375 L 40.9375 43.78125 L 43.78125 40.9375 L 27.84375 25 L 43.6875 9.15625 L 40.84375 6.3125 L 25 22.15625 Z"></path> </svg>'
|
|
6446
6446
|
).addEventListener("click", () => {
|
|
6447
|
-
|
|
6447
|
+
wn.hide(), H(this, ue, []), H(this, ke, []);
|
|
6448
6448
|
}), t.onclick = () => {
|
|
6449
|
-
|
|
6450
|
-
}, E(this,
|
|
6451
|
-
E(this, Ot).call(this),
|
|
6452
|
-
}, e.append(t, E(this,
|
|
6449
|
+
wn.hide(), H(this, Ze, ""), H(this, ke, []), H(this, ue, []);
|
|
6450
|
+
}, E(this, Qe).onclick = () => {
|
|
6451
|
+
E(this, Ot).call(this), wn.hide(), H(this, Ze, ""), H(this, ue, []), H(this, ke, []);
|
|
6452
|
+
}, e.append(t, E(this, Qe)), wn.show({
|
|
6453
6453
|
content: E(this, we)
|
|
6454
6454
|
});
|
|
6455
6455
|
}
|
|
6456
6456
|
_renderUserView(e) {
|
|
6457
6457
|
const { parentContainerId: t, restrictedFileSize: n, imagePreview: r } = e;
|
|
6458
|
-
H(this, mt, document.getElementById(t)), H(this, ct,
|
|
6459
|
-
const i =
|
|
6458
|
+
H(this, mt, document.getElementById(t)), H(this, ct, Q("div", "user-view-container"));
|
|
6459
|
+
const i = K(
|
|
6460
6460
|
"user-view-browse-wrapper",
|
|
6461
6461
|
"user-view-browse-wrapper"
|
|
6462
|
-
), o =
|
|
6462
|
+
), o = Q("span", "", "", ""), a = this._renderUserViewBrowseButton(), c = Q("p", "", "margin-block: 0px; font-size:14px");
|
|
6463
6463
|
if (c.append(o, a), n) {
|
|
6464
|
-
const h =
|
|
6464
|
+
const h = Q(
|
|
6465
6465
|
"p",
|
|
6466
6466
|
"",
|
|
6467
6467
|
"margin-block: 0px; font-size: 13px; color: #777",
|
|
6468
6468
|
`Max File size: ${n}MB`
|
|
6469
6469
|
);
|
|
6470
|
-
i.append(
|
|
6470
|
+
i.append(Mn(), c, h);
|
|
6471
6471
|
} else
|
|
6472
|
-
i.append(
|
|
6472
|
+
i.append(Mn(), c);
|
|
6473
6473
|
return E(this, ct).append(i), r && this._renderImagePreview(r, "", i, !0), E(this, mt).appendChild(E(this, ct)), E(this, mt);
|
|
6474
6474
|
}
|
|
6475
6475
|
_renderImagePreview(e, t, n, r = !1) {
|
|
6476
|
-
var
|
|
6476
|
+
var I;
|
|
6477
6477
|
const i = document.getElementById(
|
|
6478
6478
|
"user-view-browse-wrapper"
|
|
6479
6479
|
), o = i || n;
|
|
6480
6480
|
o && (o.style.display = "none");
|
|
6481
6481
|
const a = document.getElementById("user-image-preview");
|
|
6482
6482
|
a && a.remove();
|
|
6483
|
-
const c =
|
|
6483
|
+
const c = Q("div", "user-image-preview");
|
|
6484
6484
|
c.id = "user-image-preview";
|
|
6485
6485
|
const h = this._renderImageLoadingContainer();
|
|
6486
6486
|
c.appendChild(h);
|
|
6487
|
-
const l =
|
|
6487
|
+
const l = Q(
|
|
6488
6488
|
"img",
|
|
6489
6489
|
"",
|
|
6490
6490
|
`max-width: ${E(this, dt) ? E(this, dt) : 230}px;max-height:${E(this, Jt) ? E(this, Jt) : 250}px;object-fit:cover;`
|
|
@@ -6500,7 +6500,7 @@ class Qs {
|
|
|
6500
6500
|
d == null || d.addEventListener("click", () => {
|
|
6501
6501
|
h.style.display = "flex", u.style.display = "none", f.style.display = "none", l.src = e;
|
|
6502
6502
|
});
|
|
6503
|
-
const f =
|
|
6503
|
+
const f = Q(
|
|
6504
6504
|
"div",
|
|
6505
6505
|
"",
|
|
6506
6506
|
"width: 18px; height: 18px; display:none; cursor:pointer; align-items: center; justify-content: center; padding: 4px; position: absolute; top: -5px; right: -5px; background: #c10007; border-radius: 50%;z-index:1"
|
|
@@ -6508,16 +6508,16 @@ class Qs {
|
|
|
6508
6508
|
f.id = "remove-preview-btn";
|
|
6509
6509
|
const y = zn();
|
|
6510
6510
|
y.style.fill = "#fff", f == null || f.appendChild(y), f.addEventListener("click", () => {
|
|
6511
|
-
E(this,
|
|
6511
|
+
E(this, ln).call(this);
|
|
6512
6512
|
});
|
|
6513
|
-
const
|
|
6514
|
-
|
|
6513
|
+
const F = Q("button", "", "display:none");
|
|
6514
|
+
F.id = "image-preview-hidden-btn", F.addEventListener("click", (C) => {
|
|
6515
6515
|
var R;
|
|
6516
|
-
C.preventDefault(), C.stopPropagation(), (R = E(this, ct)) == null || R.removeChild(c), E(this,
|
|
6517
|
-
}), c == null || c.append(l, f,
|
|
6516
|
+
C.preventDefault(), C.stopPropagation(), (R = E(this, ct)) == null || R.removeChild(c), E(this, cn).call(this), this._removeUserToast(), o && (o.style.display = "flex");
|
|
6517
|
+
}), c == null || c.append(l, f, F), (I = E(this, ct)) == null || I.append(c);
|
|
6518
6518
|
}
|
|
6519
6519
|
_renderImageErrorContainer() {
|
|
6520
|
-
const e =
|
|
6520
|
+
const e = Q(
|
|
6521
6521
|
"div",
|
|
6522
6522
|
"",
|
|
6523
6523
|
"display: none; text-align: center;"
|
|
@@ -6532,7 +6532,7 @@ class Qs {
|
|
|
6532
6532
|
`, e;
|
|
6533
6533
|
}
|
|
6534
6534
|
_renderImageLoadingContainer() {
|
|
6535
|
-
const e =
|
|
6535
|
+
const e = Q("div", "image-loader");
|
|
6536
6536
|
return e.innerHTML = `
|
|
6537
6537
|
<div style="display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%;">
|
|
6538
6538
|
<div style="width: 20px; height: 20px; border: 3px solid #f3f3f3; border-top: 3px solid #3498db; border-radius: 50%; animation: spin 1s linear infinite;"></div>
|
|
@@ -6544,46 +6544,57 @@ class Qs {
|
|
|
6544
6544
|
const e = document.getElementById("remove-preview-btn");
|
|
6545
6545
|
e && (e.style.display = "flex");
|
|
6546
6546
|
}
|
|
6547
|
+
_showInitialPreview(e) {
|
|
6548
|
+
const t = new FileReader();
|
|
6549
|
+
t.readAsDataURL(e), t.onload = () => {
|
|
6550
|
+
this._renderUserUploading(), this._renderImagePreview(t.result, "");
|
|
6551
|
+
}, t.onerror = () => {
|
|
6552
|
+
console.error("Error reading file:", t.error);
|
|
6553
|
+
};
|
|
6554
|
+
}
|
|
6547
6555
|
async _readFileAsBase64(e) {
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
return;
|
|
6555
|
-
}
|
|
6556
|
-
H(this, Je, !0), E(this, Gt).call(this, !0);
|
|
6557
|
-
try {
|
|
6558
|
-
const n = await Fr(e);
|
|
6559
|
-
this._removeUserToast();
|
|
6560
|
-
const r = new FileReader();
|
|
6561
|
-
r.readAsDataURL(n), r.onload = () => {
|
|
6562
|
-
this._userViewUploadAndAddSelectedImageList(
|
|
6563
|
-
r.result,
|
|
6564
|
-
e
|
|
6556
|
+
if (E(this, Dt)) {
|
|
6557
|
+
const t = E(this, Dt) * 1024 * 1024;
|
|
6558
|
+
if (e.size > t) {
|
|
6559
|
+
this._renderUserToast(
|
|
6560
|
+
E(this, Kt) ? E(this, Kt) : `File size must be less than ${E(this, Dt)}MB.`,
|
|
6561
|
+
"error"
|
|
6565
6562
|
);
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6563
|
+
return;
|
|
6564
|
+
}
|
|
6565
|
+
} else {
|
|
6566
|
+
H(this, Je, !0), E(this, Gt).call(this, !0), this._showInitialPreview(e);
|
|
6567
|
+
try {
|
|
6568
|
+
const t = await Nr(e);
|
|
6569
|
+
this._removeUserToast();
|
|
6570
|
+
const n = new FileReader();
|
|
6571
|
+
n.readAsDataURL(t), n.onload = () => {
|
|
6572
|
+
this._userViewUploadAndAddSelectedImageList(
|
|
6573
|
+
n.result,
|
|
6574
|
+
e
|
|
6575
|
+
);
|
|
6576
|
+
}, n.onerror = () => {
|
|
6577
|
+
console.error("Error reading file:", n.error);
|
|
6578
|
+
};
|
|
6579
|
+
} catch (t) {
|
|
6580
|
+
this._renderUserToast(t == null ? void 0 : t.message, "error");
|
|
6581
|
+
}
|
|
6571
6582
|
}
|
|
6572
6583
|
}
|
|
6573
6584
|
_renderUserToast(e, t = "success") {
|
|
6574
|
-
const n =
|
|
6585
|
+
const n = Q(
|
|
6575
6586
|
"div",
|
|
6576
6587
|
"",
|
|
6577
6588
|
"display:flex;align-items:center;gap:5px;margin-top:5px;"
|
|
6578
6589
|
);
|
|
6579
6590
|
n.id = "user-toast-container";
|
|
6580
|
-
const r =
|
|
6591
|
+
const r = Q(
|
|
6581
6592
|
"p",
|
|
6582
6593
|
"",
|
|
6583
6594
|
"margin-block:0px;font-size:14px;padding-top:3px"
|
|
6584
6595
|
);
|
|
6585
6596
|
r.textContent = e, r.style.color = t === "success" ? "#4caf50" : "#ee3f3f";
|
|
6586
|
-
const i = t === "success" ? wr("#4caf50") :
|
|
6597
|
+
const i = t === "success" ? wr("#4caf50") : Dn();
|
|
6587
6598
|
i.style.width = "15px", i.style.height = "15px", n.append(i, r), E(this, ct).appendChild(n);
|
|
6588
6599
|
}
|
|
6589
6600
|
_removeUserToast() {
|
|
@@ -6591,13 +6602,13 @@ class Qs {
|
|
|
6591
6602
|
e && e.remove();
|
|
6592
6603
|
}
|
|
6593
6604
|
_renderUserViewBrowseButton() {
|
|
6594
|
-
const e =
|
|
6605
|
+
const e = Hn("file");
|
|
6595
6606
|
e.style.display = "none", e.setAttribute("multiple", "true"), e.setAttribute("accept", "image/*");
|
|
6596
|
-
const t =
|
|
6607
|
+
const t = Q(
|
|
6597
6608
|
"a",
|
|
6598
6609
|
"user-upload-btn",
|
|
6599
6610
|
"",
|
|
6600
|
-
"Click to upload"
|
|
6611
|
+
E(this, Qt) ? E(this, Qt) : "Click to upload"
|
|
6601
6612
|
);
|
|
6602
6613
|
return t.classList.add("user-upload-btn"), t.role = "button", t.addEventListener("click", () => {
|
|
6603
6614
|
this._removeUserToast(), e.click();
|
|
@@ -6607,13 +6618,13 @@ class Qs {
|
|
|
6607
6618
|
}), t;
|
|
6608
6619
|
}
|
|
6609
6620
|
_renderUserUploading() {
|
|
6610
|
-
const e =
|
|
6621
|
+
const e = Q(
|
|
6611
6622
|
"div",
|
|
6612
6623
|
"",
|
|
6613
6624
|
"margin-top:5px;margin-bottom:8px;display:flex;flex-direction:column;align-items:center;gap:5px;font-weight:600;font-size:14px"
|
|
6614
6625
|
);
|
|
6615
6626
|
e.id = "user-uploading", e.innerHTML = "Uploading...";
|
|
6616
|
-
const t =
|
|
6627
|
+
const t = Q(
|
|
6617
6628
|
"div",
|
|
6618
6629
|
"linear-loader",
|
|
6619
6630
|
`width:${E(this, dt) ? E(this, dt) : 230}px;max-width:${E(this, dt) ? E(this, dt) : 230}px`
|
|
@@ -6625,14 +6636,12 @@ class Qs {
|
|
|
6625
6636
|
e && e.remove();
|
|
6626
6637
|
}
|
|
6627
6638
|
async _userViewUploadAndAddSelectedImageList(e, t) {
|
|
6628
|
-
this._renderUserUploading();
|
|
6629
6639
|
try {
|
|
6630
|
-
|
|
6631
|
-
const n = await Ir(e, t, E(this, Oe), !1);
|
|
6640
|
+
const n = await Fr(e, t, E(this, Oe), !1);
|
|
6632
6641
|
await this._uploadForUser(n, t), E(this, Xt) && this._renderUserToast(E(this, Xt), "success");
|
|
6633
6642
|
} catch {
|
|
6634
6643
|
this._renderUserToast(
|
|
6635
|
-
E(this,
|
|
6644
|
+
E(this, zt) ? E(this, zt) : "Error uploading. Please try again later.",
|
|
6636
6645
|
"error"
|
|
6637
6646
|
);
|
|
6638
6647
|
} finally {
|
|
@@ -6644,16 +6653,16 @@ class Qs {
|
|
|
6644
6653
|
try {
|
|
6645
6654
|
const r = await as(
|
|
6646
6655
|
e,
|
|
6647
|
-
|
|
6656
|
+
Ye[Vn((n = t.type) == null ? void 0 : n.split("/")[0])],
|
|
6648
6657
|
E(this, Oe)
|
|
6649
6658
|
);
|
|
6650
|
-
H(this,
|
|
6659
|
+
H(this, qt, r == null ? void 0 : r.response), E(this, Ot).call(this);
|
|
6651
6660
|
} catch (r) {
|
|
6652
6661
|
throw Error(r);
|
|
6653
6662
|
}
|
|
6654
6663
|
}
|
|
6655
6664
|
_createAllAndSelectedTab(e) {
|
|
6656
|
-
const t =
|
|
6665
|
+
const t = K("select-options"), n = tn("Browse", "select"), r = tn(
|
|
6657
6666
|
"Selected",
|
|
6658
6667
|
"select",
|
|
6659
6668
|
"selected-images-tab"
|
|
@@ -6661,15 +6670,15 @@ class Qs {
|
|
|
6661
6670
|
n.classList.add("selected"), [n, r].forEach((o, a) => {
|
|
6662
6671
|
o.addEventListener("click", () => {
|
|
6663
6672
|
var c;
|
|
6664
|
-
H(this,
|
|
6673
|
+
H(this, Ft, a), (c = document.querySelector(".select.selected")) == null || c.classList.remove("selected"), o.classList.add("selected"), this._updateSelectedImageListContainerUI();
|
|
6665
6674
|
});
|
|
6666
6675
|
}), t.append(n, r), e.appendChild(t);
|
|
6667
6676
|
}
|
|
6668
6677
|
_renderUploadButton() {
|
|
6669
|
-
const e =
|
|
6678
|
+
const e = Hn("file");
|
|
6670
6679
|
e.style.display = "none", e.setAttribute("multiple", "true"), e.setAttribute("accept", "image/*,video/*,audio/*,.gif"), H(this, gt, document.createElement("button")), E(this, gt).className = "browse-more-btn";
|
|
6671
6680
|
const t = document.createElement("span");
|
|
6672
|
-
return t.textContent = "Upload", E(this, gt).append(
|
|
6681
|
+
return t.textContent = "Upload", E(this, gt).append(Mn(), t), E(this, gt).type = "button", E(this, gt).addEventListener(
|
|
6673
6682
|
"click",
|
|
6674
6683
|
() => e.click()
|
|
6675
6684
|
), e.addEventListener("change", async () => {
|
|
@@ -6697,46 +6706,46 @@ class Qs {
|
|
|
6697
6706
|
}
|
|
6698
6707
|
_renderSearchField() {
|
|
6699
6708
|
let e;
|
|
6700
|
-
const t =
|
|
6709
|
+
const t = K("search-browse-container"), n = K(
|
|
6701
6710
|
"search-input-wrapper",
|
|
6702
6711
|
"search-input-wrapper"
|
|
6703
6712
|
);
|
|
6704
|
-
H(this, Tt,
|
|
6713
|
+
H(this, Tt, Hn("search")), E(this, Tt).value = "", E(this, Tt).addEventListener("input", (i) => {
|
|
6705
6714
|
H(this, ke, []);
|
|
6706
6715
|
const o = i.target;
|
|
6707
6716
|
e && clearTimeout(e), e = setTimeout(() => {
|
|
6708
6717
|
if (!o.value) {
|
|
6709
|
-
H(this,
|
|
6718
|
+
H(this, Ze, ""), H(this, It, !1), H(this, yt, !1), this._fetchFilesFromFolder(E(this, kt));
|
|
6710
6719
|
return;
|
|
6711
6720
|
}
|
|
6712
|
-
H(this, yt, !0), H(this,
|
|
6721
|
+
H(this, yt, !0), H(this, jt, o.value), this._search(E(this, jt));
|
|
6713
6722
|
}, 750);
|
|
6714
6723
|
}), E(this, Tt).setAttribute("placeholder", "Search");
|
|
6715
6724
|
const r = Ls();
|
|
6716
6725
|
return r.style.position = "absolute", r.style.top = "50%", r.style.left = "5%", r.style.transform = "translate(-5%, -50%)", n.append(r, E(this, Tt)), t.append(n), t;
|
|
6717
6726
|
}
|
|
6718
6727
|
_createBrowseMoreContainer() {
|
|
6719
|
-
H(this, St,
|
|
6728
|
+
H(this, St, K("browse-more-btn-container")), this._createAllAndSelectedTab(E(this, St));
|
|
6720
6729
|
const e = this._renderUploadButton(), t = this._renderCreateFolderBtn(), n = document.createElement("div");
|
|
6721
6730
|
return n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "10px", n.append(e, t), E(this, St).appendChild(n), E(this, St);
|
|
6722
6731
|
}
|
|
6723
6732
|
_createBrowseImageMain() {
|
|
6724
|
-
const e =
|
|
6725
|
-
return H(this, Ee,
|
|
6733
|
+
const e = K("browse-image-main");
|
|
6734
|
+
return H(this, Ee, K("selected-image-container")), E(this, Ee).addEventListener("scroll", () => {
|
|
6726
6735
|
const t = E(this, Ee).clientHeight, n = E(this, Ee).scrollTop, r = E(this, Ee).scrollHeight;
|
|
6727
|
-
t + n >= r - 5 && E(this,
|
|
6736
|
+
t + n >= r - 5 && E(this, It) && (E(this, yt) ? this._search(E(this, jt)) : this._fetchFilesFromFolder(E(this, kt)));
|
|
6728
6737
|
}), e.appendChild(E(this, Ee)), e;
|
|
6729
6738
|
}
|
|
6730
6739
|
_renderFetchingSkeletonUI() {
|
|
6731
6740
|
for (let e = 0; e < 20; e++) {
|
|
6732
|
-
const t =
|
|
6741
|
+
const t = K("skeleton");
|
|
6733
6742
|
t.innerHTML = "", E(this, Ee).append(t);
|
|
6734
6743
|
}
|
|
6735
6744
|
}
|
|
6736
6745
|
_renderEmptyImageContainer() {
|
|
6737
|
-
if (E(this,
|
|
6738
|
-
const e =
|
|
6739
|
-
E(this, yt) && E(this,
|
|
6746
|
+
if (E(this, $e) || E(this, Je)) return;
|
|
6747
|
+
const e = K(), t = K(), n = document.createElement("p");
|
|
6748
|
+
E(this, yt) && E(this, Ft) === 0 ? (t.innerHTML = `
|
|
6740
6749
|
<svg width="300" height="300" viewBox="0 0 1000 1000" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6741
6750
|
<g clip-path="url(#clip0_2304_257)">
|
|
6742
6751
|
<path d="M564.829 772.4H336.658V948.386H564.829V772.4Z" fill="#EBEBEB"/>
|
|
@@ -6823,12 +6832,12 @@ class Qs {
|
|
|
6823
6832
|
`, n.textContent = "Looks Empty!"), e.append(t, n), E(this, Ee).appendChild(e);
|
|
6824
6833
|
}
|
|
6825
6834
|
_renderLoadingUI() {
|
|
6826
|
-
const e =
|
|
6835
|
+
const e = K("skeleton");
|
|
6827
6836
|
e.innerHTML = "", E(this, Ee).appendChild(e);
|
|
6828
6837
|
}
|
|
6829
6838
|
_fileCardBody(e) {
|
|
6830
|
-
var st,
|
|
6831
|
-
const t =
|
|
6839
|
+
var st, Vt, hn, Ht;
|
|
6840
|
+
const t = K("selected-image-content"), n = K("selected-image-top-bar"), r = He(
|
|
6832
6841
|
"",
|
|
6833
6842
|
"selected-image-btn",
|
|
6834
6843
|
"",
|
|
@@ -6836,33 +6845,33 @@ class Qs {
|
|
|
6836
6845
|
'<svg width="20px" height="20px" viewBox="0 0 20 20" focusable="false" fill="currentColor"><path fill="none" d="M0 0h20v20H0V0z"></path><path d="M10 6c.82 0 1.5-.68 1.5-1.5S10.82 3 10 3s-1.5.67-1.5 1.5S9.18 6 10 6zm0 5.5c.82 0 1.5-.68 1.5-1.5s-.68-1.5-1.5-1.5-1.5.68-1.5 1.5.68 1.5 1.5 1.5zm0 5.5c.82 0 1.5-.67 1.5-1.5 0-.82-.68-1.5-1.5-1.5s-1.5.68-1.5 1.5c0 .83.68 1.5 1.5 1.5z"></path></svg>'
|
|
6837
6846
|
);
|
|
6838
6847
|
let i, o;
|
|
6839
|
-
(e == null ? void 0 : e.type) ===
|
|
6840
|
-
const a =
|
|
6848
|
+
(e == null ? void 0 : e.type) === Ye.IMAGE && (i = vr(e == null ? void 0 : e.url, "selected-image"), o = Ns()), (e == null ? void 0 : e.type) === Ye.VIDEO && (i = Rs(e == null ? void 0 : e.url, "uploaded-video"), o = Us()), (e == null ? void 0 : e.type) === Ye.AUDIO && (i = Ds(e == null ? void 0 : e.url, "uploaded-audio"), o = Fs());
|
|
6849
|
+
const a = K("selected-image-wrapper");
|
|
6841
6850
|
a.setAttribute("data-key", e == null ? void 0 : e.key);
|
|
6842
|
-
const c =
|
|
6851
|
+
const c = tn(e == null ? void 0 : e.name, "selected-image-name"), h = le("", "selected-image-type");
|
|
6843
6852
|
h.append(o), n.append(h, r);
|
|
6844
|
-
const l =
|
|
6853
|
+
const l = K();
|
|
6845
6854
|
l.style.marginTop = "10px", l.style.display = "flex", l.style.justifyContent = "space-between", l.style.alignItems = "center", l.append(c), t.append(n, i), a.append(t, l);
|
|
6846
|
-
const u =
|
|
6855
|
+
const u = K("action-wrapper"), d = He("", "action-option preview"), f = le("Preview", ""), y = Ts();
|
|
6847
6856
|
d.append(y, f);
|
|
6848
|
-
const
|
|
6849
|
-
|
|
6857
|
+
const F = He("", "action-option move"), I = le("Move", ""), C = Is();
|
|
6858
|
+
F.append(C, I);
|
|
6850
6859
|
const R = He("", "action-option rename"), O = le("Rename", ""), v = yr();
|
|
6851
6860
|
R.append(v, O);
|
|
6852
6861
|
const L = He("", "action-option delete"), b = le("Delete", ""), B = Cr();
|
|
6853
6862
|
L.append(B, b);
|
|
6854
|
-
const m = e.name.split(".")[0], g = e.name.split(".")[1], k =
|
|
6863
|
+
const m = e.name.split(".")[0], g = e.name.split(".")[1], k = nn[e.type], T = K("edit-form-wrapper"), N = K("move-form-wrapper"), U = K("preview-details-container"), A = K("preview-details-wrapper"), _ = K(
|
|
6855
6864
|
"preview-option-image-wrapper"
|
|
6856
|
-
), w =
|
|
6865
|
+
), w = K("preview-option-wrapper"), p = K("preview-option-wrapper"), M = K(
|
|
6857
6866
|
"preview-option-wrapper"
|
|
6858
|
-
), x =
|
|
6867
|
+
), x = K("preview-option-wrapper"), V = K(
|
|
6859
6868
|
"preview-option-wrapper"
|
|
6860
|
-
),
|
|
6869
|
+
), Z = K("preview-option-wrapper"), $ = K(
|
|
6861
6870
|
"preview-option-wrapper"
|
|
6862
|
-
),
|
|
6863
|
-
_.append(
|
|
6864
|
-
const
|
|
6865
|
-
S.innerHTML = e.name, w.append(
|
|
6871
|
+
), q = vr(e.url, "preview-option-image");
|
|
6872
|
+
_.append(q);
|
|
6873
|
+
const P = le("File name", "preview-title"), S = K("preview-option-name");
|
|
6874
|
+
S.innerHTML = e.name, w.append(P, S);
|
|
6866
6875
|
const X = le("Folder name", "preview-title"), oe = le(
|
|
6867
6876
|
e.folderName,
|
|
6868
6877
|
"preview-option-name"
|
|
@@ -6874,13 +6883,13 @@ class Qs {
|
|
|
6874
6883
|
const te = le(
|
|
6875
6884
|
"File Extension",
|
|
6876
6885
|
"preview-title"
|
|
6877
|
-
),
|
|
6886
|
+
), Y = le(
|
|
6878
6887
|
g,
|
|
6879
6888
|
"preview-option-name extension"
|
|
6880
6889
|
);
|
|
6881
6890
|
M.append(
|
|
6882
6891
|
te,
|
|
6883
|
-
|
|
6892
|
+
Y
|
|
6884
6893
|
);
|
|
6885
6894
|
const re = le("File type", "preview-title"), fe = le(k, "preview-option-name");
|
|
6886
6895
|
x.append(
|
|
@@ -6888,80 +6897,80 @@ class Qs {
|
|
|
6888
6897
|
fe
|
|
6889
6898
|
);
|
|
6890
6899
|
const be = le("Dimension", "preview-title"), ft = le(
|
|
6891
|
-
`${(st = e == null ? void 0 : e.metadata) == null ? void 0 : st.width} * ${(
|
|
6900
|
+
`${(st = e == null ? void 0 : e.metadata) == null ? void 0 : st.width} * ${(Vt = e == null ? void 0 : e.metadata) == null ? void 0 : Vt.height}`,
|
|
6892
6901
|
"preview-option-name"
|
|
6893
6902
|
);
|
|
6894
6903
|
V.append(
|
|
6895
6904
|
be,
|
|
6896
6905
|
ft
|
|
6897
6906
|
);
|
|
6898
|
-
const
|
|
6907
|
+
const We = le("URL", "preview-title"), de = le(
|
|
6899
6908
|
e.url,
|
|
6900
6909
|
"preview-option-name url"
|
|
6901
6910
|
);
|
|
6902
|
-
|
|
6903
|
-
|
|
6911
|
+
Z.append(
|
|
6912
|
+
We,
|
|
6904
6913
|
de
|
|
6905
6914
|
);
|
|
6906
|
-
const
|
|
6915
|
+
const Ne = le(
|
|
6907
6916
|
"Parent folder",
|
|
6908
6917
|
"preview-title"
|
|
6909
6918
|
), ae = le(
|
|
6910
6919
|
e.nestedFolderName,
|
|
6911
6920
|
"preview-option-name"
|
|
6912
6921
|
);
|
|
6913
|
-
|
|
6914
|
-
|
|
6922
|
+
$.append(
|
|
6923
|
+
Ne,
|
|
6915
6924
|
ae
|
|
6916
6925
|
), A.append(
|
|
6917
6926
|
p,
|
|
6918
6927
|
w,
|
|
6919
6928
|
M,
|
|
6920
6929
|
x,
|
|
6921
|
-
((
|
|
6922
|
-
|
|
6923
|
-
e.nestedFolderName ?
|
|
6930
|
+
((hn = e == null ? void 0 : e.metadata) == null ? void 0 : hn.width) > 0 && ((Ht = e == null ? void 0 : e.metadata) == null ? void 0 : Ht.height) > 0 ? V : "",
|
|
6931
|
+
Z,
|
|
6932
|
+
e.nestedFolderName ? $ : ""
|
|
6924
6933
|
), U.append(
|
|
6925
6934
|
_,
|
|
6926
6935
|
A
|
|
6927
6936
|
);
|
|
6928
|
-
const ne =
|
|
6937
|
+
const ne = K("form-control"), me = document.createElement("input");
|
|
6929
6938
|
ne.appendChild(me), me.classList.add("input-field"), me.value = e.name;
|
|
6930
|
-
const
|
|
6931
|
-
Te.textContent = e.folderName, Te.prepend(
|
|
6932
|
-
const pe =
|
|
6939
|
+
const Ie = K("form-control"), ge = le("Current Folder:", "input-label"), Te = K("folder-field current");
|
|
6940
|
+
Te.textContent = e.folderName, Te.prepend(en()), Ie.append(ge, Te);
|
|
6941
|
+
const pe = K("form-control"), ee = K();
|
|
6933
6942
|
ee.style.width = "100%", ee.style.display = "flex", ee.style.alignItems = "center", ee.style.justifyContent = "space-between";
|
|
6934
6943
|
const Re = le(
|
|
6935
6944
|
"Suggested Folder List:",
|
|
6936
6945
|
"input-label"
|
|
6937
6946
|
), Ue = le();
|
|
6938
|
-
Ue.style.display = "flex", Ue.style.alignItems = "center", Ue.style.gap = "5px", Ue.style.fontSize = "14px", Ue.textContent = "Move the file in selected folder", Ue.appendChild(
|
|
6939
|
-
const rt =
|
|
6947
|
+
Ue.style.display = "flex", Ue.style.alignItems = "center", Ue.style.gap = "5px", Ue.style.fontSize = "14px", Ue.textContent = "Move the file in selected folder", Ue.appendChild(Dn("14px", "14px", "#333")), ee.append(Re, Ue);
|
|
6948
|
+
const rt = K();
|
|
6940
6949
|
rt.style.width = "100%", rt.style.maxHeight = "250px", rt.style.overflowY = "auto";
|
|
6941
6950
|
const Ae = document.createElement("ul");
|
|
6942
6951
|
Ae.className = "folders", rt.append(Ae), pe.append(ee, rt), E(this, at).forEach((ce) => {
|
|
6943
|
-
const
|
|
6944
|
-
Ae.appendChild(
|
|
6952
|
+
const je = this._renderEditFolderListContainer(ce);
|
|
6953
|
+
Ae.appendChild(je);
|
|
6945
6954
|
});
|
|
6946
|
-
const it =
|
|
6955
|
+
const it = K("form-control"), Le = le("Destination Folder:", "input-label"), Ve = K(
|
|
6947
6956
|
"folder-field source",
|
|
6948
6957
|
"source-folder-wrapper"
|
|
6949
6958
|
), xe = document.createElement("span");
|
|
6950
|
-
xe.id = "source-folder-name", xe.textContent = E(this, Lt) ? E(this, Lt) : e.folderName, Ve.append(
|
|
6959
|
+
xe.id = "source-folder-name", xe.textContent = E(this, Lt) ? E(this, Lt) : e.folderName, Ve.append(en(), xe);
|
|
6951
6960
|
let _e = "";
|
|
6952
6961
|
it.append(Le, Ve), me.onchange = (ce) => {
|
|
6953
6962
|
_e = ce.target.value;
|
|
6954
|
-
}, _e = _e !== "" ? _e : e.name, T.append(ne),
|
|
6955
|
-
|
|
6963
|
+
}, _e = _e !== "" ? _e : e.name, T.append(ne), N.append(
|
|
6964
|
+
Ie,
|
|
6956
6965
|
pe,
|
|
6957
6966
|
it
|
|
6958
6967
|
), u.append(
|
|
6959
6968
|
d,
|
|
6960
|
-
|
|
6969
|
+
F,
|
|
6961
6970
|
R,
|
|
6962
6971
|
L
|
|
6963
6972
|
), d.onclick = (ce) => {
|
|
6964
|
-
ce.stopPropagation(),
|
|
6973
|
+
ce.stopPropagation(), ze.hide(), Ce.show({
|
|
6965
6974
|
content: U,
|
|
6966
6975
|
header: m,
|
|
6967
6976
|
dialogContentStyle: {
|
|
@@ -6970,9 +6979,9 @@ class Qs {
|
|
|
6970
6979
|
},
|
|
6971
6980
|
showCloseBtn: !0
|
|
6972
6981
|
});
|
|
6973
|
-
},
|
|
6974
|
-
ce.stopPropagation(),
|
|
6975
|
-
content:
|
|
6982
|
+
}, F.onclick = (ce) => {
|
|
6983
|
+
ce.stopPropagation(), ze.hide(), Ce.show({
|
|
6984
|
+
content: N,
|
|
6976
6985
|
header: `Move "${e.name}"`,
|
|
6977
6986
|
confirmButtonText: "Move",
|
|
6978
6987
|
dialogContentStyle: {
|
|
@@ -6989,7 +6998,7 @@ class Qs {
|
|
|
6989
6998
|
}
|
|
6990
6999
|
});
|
|
6991
7000
|
}, R.onclick = (ce) => {
|
|
6992
|
-
ce.stopPropagation(),
|
|
7001
|
+
ce.stopPropagation(), ze.hide(), Ce.show({
|
|
6993
7002
|
content: T,
|
|
6994
7003
|
header: "Rename",
|
|
6995
7004
|
confirmButtonText: "Update",
|
|
@@ -7006,7 +7015,7 @@ class Qs {
|
|
|
7006
7015
|
}
|
|
7007
7016
|
});
|
|
7008
7017
|
}, L.onclick = (ce) => {
|
|
7009
|
-
ce.stopPropagation(),
|
|
7018
|
+
ce.stopPropagation(), ze.hide(), Ce.show({
|
|
7010
7019
|
content: "",
|
|
7011
7020
|
dialogContentStyle: {
|
|
7012
7021
|
minWidth: "32rem",
|
|
@@ -7021,7 +7030,7 @@ class Qs {
|
|
|
7021
7030
|
}
|
|
7022
7031
|
});
|
|
7023
7032
|
}, r.addEventListener("click", (ce) => {
|
|
7024
|
-
ce.stopPropagation(),
|
|
7033
|
+
ce.stopPropagation(), ze.hide(), ze.show({
|
|
7025
7034
|
content: u,
|
|
7026
7035
|
mainContainer: n,
|
|
7027
7036
|
divId: e.key
|
|
@@ -7031,9 +7040,9 @@ class Qs {
|
|
|
7031
7040
|
(ot) => (ot == null ? void 0 : ot.key) === (e == null ? void 0 : e.key)
|
|
7032
7041
|
);
|
|
7033
7042
|
if (t.classList.contains("checked"))
|
|
7034
|
-
t.classList.remove("checked"), ce !== -1 && (E(this, ue).splice(ce, 1), E(this,
|
|
7043
|
+
t.classList.remove("checked"), ce !== -1 && (E(this, ue).splice(ce, 1), E(this, Ft) === 1 && a.remove());
|
|
7035
7044
|
else {
|
|
7036
|
-
if (E(this,
|
|
7045
|
+
if (E(this, Tn))
|
|
7037
7046
|
E(this, ue).push(e);
|
|
7038
7047
|
else {
|
|
7039
7048
|
const ot = document.querySelector(
|
|
@@ -7045,8 +7054,8 @@ class Qs {
|
|
|
7045
7054
|
}
|
|
7046
7055
|
this._updateContent();
|
|
7047
7056
|
}), document.addEventListener("click", (ce) => {
|
|
7048
|
-
const
|
|
7049
|
-
|
|
7057
|
+
const je = document.querySelector(`#${E(this, Rt)}`);
|
|
7058
|
+
je && (ce.composedPath().includes(je) || ze.hide());
|
|
7050
7059
|
}), E(this, ue).findIndex(
|
|
7051
7060
|
(ce) => (ce == null ? void 0 : ce.key) === (e == null ? void 0 : e.key)
|
|
7052
7061
|
) !== -1 ? (t.classList.add("checked"), E(this, yt) ? E(this, Ee).prepend(a) : E(this, Ee).appendChild(a)) : E(this, Ee).appendChild(a);
|
|
@@ -7070,7 +7079,7 @@ class Qs {
|
|
|
7070
7079
|
const e = document.createElement("div");
|
|
7071
7080
|
e.style.paddingInline = "20px";
|
|
7072
7081
|
for (let t = 0; t < 4; t++) {
|
|
7073
|
-
const n =
|
|
7082
|
+
const n = K("skeleton");
|
|
7074
7083
|
n.className = "skeleton folder", n.innerHTML = "", e.appendChild(n);
|
|
7075
7084
|
}
|
|
7076
7085
|
return e;
|
|
@@ -7082,9 +7091,9 @@ class Qs {
|
|
|
7082
7091
|
const n = document.createElement("div");
|
|
7083
7092
|
n.style.position = "relative", n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "2px";
|
|
7084
7093
|
const r = document.createElement("span"), i = document.createElement("span");
|
|
7085
|
-
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, r.appendChild(
|
|
7094
|
+
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, r.appendChild(en()), n.append(r, i), t.append(n), e.children && Object.keys(e.children).length > 0) {
|
|
7086
7095
|
const v = document.createElement("button");
|
|
7087
|
-
v.classList.add("expand-icon"), v.appendChild(
|
|
7096
|
+
v.classList.add("expand-icon"), v.appendChild(mn()), n.prepend(v);
|
|
7088
7097
|
const L = document.createElement("ul");
|
|
7089
7098
|
L.className = "folders nested", t.appendChild(L), v.addEventListener("click", (b) => {
|
|
7090
7099
|
b.stopPropagation(), t.classList.toggle("active"), L.classList.toggle("visible");
|
|
@@ -7101,23 +7110,23 @@ class Qs {
|
|
|
7101
7110
|
"moveToInputField.disabled",
|
|
7102
7111
|
!1,
|
|
7103
7112
|
'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-ellipsis"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>'
|
|
7104
|
-
), a =
|
|
7113
|
+
), a = K("action-wrapper"), c = He("", "action-option edit"), h = le("Edit", ""), l = yr();
|
|
7105
7114
|
c.append(l, h);
|
|
7106
|
-
const u =
|
|
7115
|
+
const u = K("edit-form-wrapper"), d = K("name-field-wrapper"), f = le("Name", "input-label"), y = document.createElement("input");
|
|
7107
7116
|
y.classList.add("input-field"), y.value = e.name, y.onchange = (v) => {
|
|
7108
7117
|
v.target.value;
|
|
7109
7118
|
}, d.append(f, y), u.append(d);
|
|
7110
|
-
const
|
|
7119
|
+
const F = {
|
|
7111
7120
|
key: e.key,
|
|
7112
7121
|
name: e.name,
|
|
7113
7122
|
nestedFolderName: e.nestedFolderName,
|
|
7114
7123
|
createdBy: e.createdBy,
|
|
7115
7124
|
forUser: !0
|
|
7116
7125
|
};
|
|
7117
|
-
this._createUpdateFolderDialog(c, "update",
|
|
7118
|
-
const
|
|
7119
|
-
return
|
|
7120
|
-
v.stopPropagation(),
|
|
7126
|
+
this._createUpdateFolderDialog(c, "update", F);
|
|
7127
|
+
const I = He("", "action-option delete"), C = le("Delete", ""), R = Cr();
|
|
7128
|
+
return I.append(R, C), a.append(c, I), I.onclick = (v) => {
|
|
7129
|
+
v.stopPropagation(), ze.hide(), Ce.show({
|
|
7121
7130
|
content: "",
|
|
7122
7131
|
dialogContentStyle: {
|
|
7123
7132
|
minWidth: "32rem",
|
|
@@ -7132,14 +7141,14 @@ class Qs {
|
|
|
7132
7141
|
}
|
|
7133
7142
|
});
|
|
7134
7143
|
}, o.addEventListener("click", (v) => {
|
|
7135
|
-
v.stopPropagation(),
|
|
7144
|
+
v.stopPropagation(), ze.hide(), ze.show({
|
|
7136
7145
|
content: a,
|
|
7137
7146
|
mainContainer: n,
|
|
7138
7147
|
divId: e.key
|
|
7139
7148
|
}), H(this, Rt, e.key);
|
|
7140
7149
|
}), n.appendChild(o), t.addEventListener("click", (v) => {
|
|
7141
7150
|
var L;
|
|
7142
|
-
v.stopPropagation(), H(this, De, e), H(this, kt, e == null ? void 0 : e.name), H(this, ue, []), H(this, ke, []), H(this,
|
|
7151
|
+
v.stopPropagation(), H(this, De, e), H(this, kt, e == null ? void 0 : e.name), H(this, ue, []), H(this, ke, []), H(this, Ze, ""), H(this, It, !1), (L = document.querySelector(".folder.selected")) == null || L.classList.remove("selected"), t.classList.add("selected"), this._fetchFilesFromFolder(e.name);
|
|
7143
7152
|
}), ((O = E(this, De)) == null ? void 0 : O.key) === (e == null ? void 0 : e.key) && t.classList.add("selected"), t;
|
|
7144
7153
|
}
|
|
7145
7154
|
_renderEditFolderListContainer(e) {
|
|
@@ -7149,9 +7158,9 @@ class Qs {
|
|
|
7149
7158
|
const n = document.createElement("div");
|
|
7150
7159
|
n.style.position = "relative", n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "2px";
|
|
7151
7160
|
const r = document.createElement("span"), i = document.createElement("span");
|
|
7152
|
-
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, r.appendChild(
|
|
7161
|
+
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, r.appendChild(en()), n.append(r, i), t.append(n), e.children && Object.keys(e.children).length > 0) {
|
|
7153
7162
|
const a = document.createElement("button");
|
|
7154
|
-
a.classList.add("expand-icon"), a.appendChild(
|
|
7163
|
+
a.classList.add("expand-icon"), a.appendChild(mn()), n.prepend(a);
|
|
7155
7164
|
const c = document.createElement("ul");
|
|
7156
7165
|
c.className = "folders nested", t.appendChild(c), a.addEventListener("click", (h) => {
|
|
7157
7166
|
h.stopPropagation(), t.classList.toggle("active"), c.classList.toggle("visible");
|
|
@@ -7170,7 +7179,7 @@ class Qs {
|
|
|
7170
7179
|
}), ((o = E(this, De)) == null ? void 0 : o.key) === (e == null ? void 0 : e.key) && t.classList.add("selected"), t;
|
|
7171
7180
|
}
|
|
7172
7181
|
_updateFolderListContainer() {
|
|
7173
|
-
if (E(this,
|
|
7182
|
+
if (E(this, Nt))
|
|
7174
7183
|
if (E(this, wt).innerHTML = "", E(this, Bt)) {
|
|
7175
7184
|
const e = this._renderFolderListLoadingUI();
|
|
7176
7185
|
E(this, wt).appendChild(e);
|
|
@@ -7179,12 +7188,12 @@ class Qs {
|
|
|
7179
7188
|
e.className = "folders", E(this, wt).appendChild(e), E(this, at).forEach((t) => {
|
|
7180
7189
|
const n = this._renderFolderListContainer(t);
|
|
7181
7190
|
e.appendChild(n);
|
|
7182
|
-
}), E(this,
|
|
7191
|
+
}), E(this, Nt).appendChild(E(this, wt));
|
|
7183
7192
|
}
|
|
7184
7193
|
}
|
|
7185
7194
|
_renderToastContainer(e, t, n) {
|
|
7186
7195
|
this._removeToastContainer(), H(this, lt, document.createElement("div")), E(this, lt).className = `message-container ${t}`;
|
|
7187
|
-
const r =
|
|
7196
|
+
const r = tn(e, "message"), i = t === "success" ? wr() : Dn(), o = He("");
|
|
7188
7197
|
o.style.cursor = "pointer", o.style.border = "0", o.style.outline = "none", o.style.background = "transparent", o.appendChild(
|
|
7189
7198
|
zn(t === "error" ? "#ee3f3f" : "#4caf50")
|
|
7190
7199
|
), o.setAttribute(
|
|
@@ -7200,11 +7209,11 @@ class Qs {
|
|
|
7200
7209
|
_updateSelectedImageListContainerUI() {
|
|
7201
7210
|
var t, n;
|
|
7202
7211
|
if (!E(this, Ee)) return;
|
|
7203
|
-
E(this, Ee).innerHTML = "", E(this, Je) && this._renderLoadingUI(), E(this,
|
|
7212
|
+
E(this, Ee).innerHTML = "", E(this, Je) && this._renderLoadingUI(), E(this, $e) && this._renderFetchingSkeletonUI();
|
|
7204
7213
|
const e = document.getElementById(
|
|
7205
7214
|
"search-input-wrapper"
|
|
7206
7215
|
);
|
|
7207
|
-
E(this,
|
|
7216
|
+
E(this, Ft) === 0 ? (e && (e.style.visibility = "visible"), ((t = E(this, ke)) == null ? void 0 : t.length) === 0 && !E(this, $e) ? (E(this, Ee).classList.add(
|
|
7208
7217
|
"no-selected-image-container"
|
|
7209
7218
|
), this._renderEmptyImageContainer()) : (E(this, Ee).classList.remove(
|
|
7210
7219
|
"no-selected-image-container"
|
|
@@ -7217,17 +7226,17 @@ class Qs {
|
|
|
7217
7226
|
_updateContent() {
|
|
7218
7227
|
var t, n, r;
|
|
7219
7228
|
const e = document.getElementById("selected-images-tab");
|
|
7220
|
-
e && (e.textContent = `Selected (${(t = E(this, ue)) == null ? void 0 : t.length})`), E(this,
|
|
7229
|
+
e && (e.textContent = `Selected (${(t = E(this, ue)) == null ? void 0 : t.length})`), E(this, Qe).textContent = `Save (${(n = E(this, ue)) == null ? void 0 : n.length})`, E(this, Qe).disabled = ((r = E(this, ue)) == null ? void 0 : r.length) === 0;
|
|
7221
7230
|
}
|
|
7222
7231
|
async _uploadAndAddSelectedImageList(e, t) {
|
|
7223
7232
|
var n, r;
|
|
7224
7233
|
this._updateSelectedImageListContainerUI();
|
|
7225
7234
|
try {
|
|
7226
|
-
const i = await
|
|
7235
|
+
const i = await Fr(e, t, E(this, Oe)), o = await os(
|
|
7227
7236
|
t == null ? void 0 : t.name,
|
|
7228
7237
|
"",
|
|
7229
7238
|
i,
|
|
7230
|
-
|
|
7239
|
+
Ye[Vn((n = t.type) == null ? void 0 : n.split("/")[0])],
|
|
7231
7240
|
(r = E(this, De)) == null ? void 0 : r.name,
|
|
7232
7241
|
E(this, Oe)
|
|
7233
7242
|
);
|
|
@@ -7328,13 +7337,13 @@ class Qs {
|
|
|
7328
7337
|
}
|
|
7329
7338
|
}
|
|
7330
7339
|
async _upload() {
|
|
7331
|
-
return E(this,
|
|
7340
|
+
return E(this, an) ? E(this, ue) : E(this, qt);
|
|
7332
7341
|
}
|
|
7333
7342
|
async _uploadFromSource(e, t) {
|
|
7334
7343
|
this._removeUserToast();
|
|
7335
7344
|
const n = 200 * 1024;
|
|
7336
7345
|
try {
|
|
7337
|
-
const r = e.size > n ? await
|
|
7346
|
+
const r = e.size > n ? await Nr(e) : e;
|
|
7338
7347
|
return await new Promise((o, a) => {
|
|
7339
7348
|
const c = new FileReader();
|
|
7340
7349
|
c.readAsDataURL(r), c.onerror = () => {
|
|
@@ -7348,7 +7357,7 @@ class Qs {
|
|
|
7348
7357
|
t
|
|
7349
7358
|
), u = await ls(
|
|
7350
7359
|
l,
|
|
7351
|
-
|
|
7360
|
+
Ye[Vn((h = r.type) == null ? void 0 : h.split("/")[0])],
|
|
7352
7361
|
t
|
|
7353
7362
|
);
|
|
7354
7363
|
o(u);
|
|
@@ -7366,15 +7375,15 @@ class Qs {
|
|
|
7366
7375
|
}
|
|
7367
7376
|
async _fetchFilesFromFolder(e) {
|
|
7368
7377
|
var t, n, r;
|
|
7369
|
-
H(this,
|
|
7378
|
+
H(this, $e, !0), this._updateSelectedImageListContainerUI();
|
|
7370
7379
|
try {
|
|
7371
7380
|
const i = await cs(
|
|
7372
7381
|
e,
|
|
7373
|
-
E(this,
|
|
7382
|
+
E(this, Ze),
|
|
7374
7383
|
20,
|
|
7375
7384
|
E(this, Oe)
|
|
7376
7385
|
), o = (t = i.response) == null ? void 0 : t.files;
|
|
7377
|
-
E(this, ke).push(...o), H(this,
|
|
7386
|
+
E(this, ke).push(...o), H(this, Ze, (n = i.response) == null ? void 0 : n.nextCursor), H(this, It, (r = i.response) == null ? void 0 : r.hasMore);
|
|
7378
7387
|
} catch {
|
|
7379
7388
|
throw this._renderToastContainer(
|
|
7380
7389
|
"Error while fetching files from folder" + e,
|
|
@@ -7384,17 +7393,17 @@ class Qs {
|
|
|
7384
7393
|
"Something went wrong. Error while fetching files from folder" + e
|
|
7385
7394
|
);
|
|
7386
7395
|
} finally {
|
|
7387
|
-
H(this,
|
|
7396
|
+
H(this, $e, !1), this._updateSelectedImageListContainerUI();
|
|
7388
7397
|
}
|
|
7389
7398
|
}
|
|
7390
7399
|
async _fetchAllFolders() {
|
|
7391
7400
|
var e, t;
|
|
7392
|
-
H(this,
|
|
7401
|
+
H(this, $e, !0), H(this, Bt, !0), this._updateSelectedImageListContainerUI(), this._updateFolderListContainer(), this._removeToastContainer();
|
|
7393
7402
|
try {
|
|
7394
7403
|
const r = (await Es("", 1e3, E(this, Oe))).response.folder, i = Bs(r);
|
|
7395
7404
|
H(this, kt, (e = i[0]) == null ? void 0 : e.name), this._fetchFilesFromFolder((t = i[0]) == null ? void 0 : t.name), H(this, De, i[0]), H(this, at, i);
|
|
7396
7405
|
} catch {
|
|
7397
|
-
H(this,
|
|
7406
|
+
H(this, $e, !1), this._renderToastContainer(
|
|
7398
7407
|
"Folder not found. Please create a folder or try again later",
|
|
7399
7408
|
"error",
|
|
7400
7409
|
E(this, we)
|
|
@@ -7405,15 +7414,15 @@ class Qs {
|
|
|
7405
7414
|
}
|
|
7406
7415
|
async _search(e) {
|
|
7407
7416
|
var t, n;
|
|
7408
|
-
H(this,
|
|
7417
|
+
H(this, $e, !0), this._updateSelectedImageListContainerUI(), this._removeToastContainer();
|
|
7409
7418
|
try {
|
|
7410
7419
|
const r = await ds(
|
|
7411
7420
|
e,
|
|
7412
|
-
E(this,
|
|
7421
|
+
E(this, Ze),
|
|
7413
7422
|
10,
|
|
7414
7423
|
E(this, Oe)
|
|
7415
7424
|
), i = (t = r.response) == null ? void 0 : t.items;
|
|
7416
|
-
E(this, ke).push(...i), H(this,
|
|
7425
|
+
E(this, ke).push(...i), H(this, Ze, (n = r.response) == null ? void 0 : n.nextPageCursor);
|
|
7417
7426
|
} catch {
|
|
7418
7427
|
this._renderToastContainer(
|
|
7419
7428
|
"Error while searching files",
|
|
@@ -7421,7 +7430,7 @@ class Qs {
|
|
|
7421
7430
|
E(this, we)
|
|
7422
7431
|
);
|
|
7423
7432
|
} finally {
|
|
7424
|
-
H(this,
|
|
7433
|
+
H(this, $e, !1), this._updateSelectedImageListContainerUI();
|
|
7425
7434
|
}
|
|
7426
7435
|
}
|
|
7427
7436
|
async _updateFolder(e, t) {
|
|
@@ -7465,13 +7474,13 @@ class Qs {
|
|
|
7465
7474
|
_createUpdateFolderDialog(e, t, n) {
|
|
7466
7475
|
e.addEventListener("click", (r) => {
|
|
7467
7476
|
var R, O, v, L;
|
|
7468
|
-
r.stopPropagation(),
|
|
7477
|
+
r.stopPropagation(), ze.hide();
|
|
7469
7478
|
let i;
|
|
7470
|
-
const o =
|
|
7479
|
+
const o = K("edit-form-wrapper"), a = K("form-control"), c = Q(
|
|
7471
7480
|
"div",
|
|
7472
7481
|
"",
|
|
7473
7482
|
"display:flex;align-items:center;gap:5px;"
|
|
7474
|
-
), h =
|
|
7483
|
+
), h = Qs("20px", "20px"), l = mn("20px", "20px"), u = mn("20px", "20px"), d = (R = E(this, De)) != null && R.nestedFolderName ? (O = E(this, De)) == null ? void 0 : O.nestedFolderName : "", f = (v = E(this, De)) != null && v.name ? (L = E(this, De)) == null ? void 0 : L.name : "";
|
|
7475
7484
|
d ? c.append(
|
|
7476
7485
|
h,
|
|
7477
7486
|
l,
|
|
@@ -7479,21 +7488,21 @@ class Qs {
|
|
|
7479
7488
|
u,
|
|
7480
7489
|
f
|
|
7481
7490
|
) : c.append(h, l, f);
|
|
7482
|
-
const y = le("Folder Name", "input-label"),
|
|
7483
|
-
|
|
7484
|
-
const
|
|
7485
|
-
|
|
7486
|
-
const C =
|
|
7491
|
+
const y = le("Folder Name", "input-label"), F = K();
|
|
7492
|
+
F.style.position = "relative";
|
|
7493
|
+
const I = document.createElement("input");
|
|
7494
|
+
I.style.paddingLeft = "40px";
|
|
7495
|
+
const C = Q(
|
|
7487
7496
|
"span",
|
|
7488
7497
|
"",
|
|
7489
7498
|
"position:absolute;top:50%;left:5%;transform:translate(-40%,-40%)"
|
|
7490
7499
|
);
|
|
7491
|
-
C.appendChild(
|
|
7500
|
+
C.appendChild(en()), I.classList.add("input-field"), F.append(I, C), t === "update" && (I.value = n.name), I.onchange = (b) => {
|
|
7492
7501
|
i = b.target.value;
|
|
7493
7502
|
}, a.append(
|
|
7494
7503
|
c,
|
|
7495
7504
|
y,
|
|
7496
|
-
|
|
7505
|
+
F
|
|
7497
7506
|
), o.append(a), Ce.show({
|
|
7498
7507
|
content: o,
|
|
7499
7508
|
header: t === "update" ? "Update Folder" : "Create Folder",
|
|
@@ -7519,25 +7528,13 @@ class Qs {
|
|
|
7519
7528
|
_initializeGrpcConfig(e, t) {
|
|
7520
7529
|
let n = "https://hamro-cms-backend-grpc.hamrostack.com";
|
|
7521
7530
|
t && (e === "production" || e === "development") ? n = t : e === "production" && (n = "https://page-api-grpc.hamropatro.com");
|
|
7522
|
-
const r = new
|
|
7531
|
+
const r = new Zi({
|
|
7523
7532
|
baseUrl: n
|
|
7524
7533
|
});
|
|
7525
7534
|
this.updateWindowObject({ grpcConfig: r });
|
|
7526
7535
|
}
|
|
7527
7536
|
}
|
|
7528
|
-
mt = new WeakMap(), we = new WeakMap(), Ee = new WeakMap(), gt = new WeakMap(), ue = new WeakMap(), ke = new WeakMap(), Je = new WeakMap(),
|
|
7529
|
-
const eo = new Qs({
|
|
7530
|
-
parentContainerId: "app",
|
|
7531
|
-
accessToken: "mBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJtaW5pLWFwcC1zZXJ2aWNlIiwic3ViIjoiZW5ma0JmQ0tqQ2U4S2t1VGRmZXZoMVV6QW1MMiIsImlhdCI6MTc0NDc3NjU5OSwiZXhwIjoxNzQ0OTQ5Mzk5LCJhcHBJZCI6ImhhbXJvcGF0cm8tYW5kcm9pZCIsIm1pbmlBcHBJZCI6IjNhM2NhYWIwLTJmYzItMTFlZi1iNDQ4LWU2OGRhNmVmOWU4MCIsInByb2ZpbGVJbWFnZSI6Imh0dHBzOi8vbGgzLmdvb2dsZXVzZXJjb250ZW50LmNvbS9hL0FMbTV3dTNuZFpxZEVTcVZiajNmd1FHbV80bkFDTDlubzJJT19tTFA1eFY3PXM5Ni1jIiwiZGlzcGxheU5hbWUiOiJOaXJhaiBMYW1hIiwiZW1haWwiOiJubGFtYUBoYW1yb3BhdHJvLmNvbSIsInBob25lTnVtYmVyIjoiIiwiYWRtaW4iOnRydWUsImJ1c2luZXNzIjpbIjIxNzBlMjEwLTJjOTUtMTFlZi1iNDQ4LWU2OGRhNmVmOWU4MDowIiwiM2EzY2FhYjAtMmZjMi0xMWVmLWI0NDgtZTY4ZGE2ZWY5ZTgwOjEiLCIxYTM1NGY4MC03NDAzLTExZWYtOGU5Ni1iNjk4ZjZiMWJlNzU6MSIsIjg0ZDUzYWU4LTgyYTQtNDJjZi05MzkwLWExYTJiZmY4Yjk5YzoxIl0sInN1c3BlbmRlZCI6ZmFsc2UsInZlcmlmaWVkIjpmYWxzZX0.KZhHP5xUERZg3O3swoQLsdofiJ8P-574_rzLv222-KM",
|
|
7532
|
-
mode: "development",
|
|
7533
|
-
isAdmin: !0,
|
|
7534
|
-
handleUpload: () => {
|
|
7535
|
-
to();
|
|
7536
|
-
},
|
|
7537
|
-
enableDialog: !0
|
|
7538
|
-
}), to = () => {
|
|
7539
|
-
eo._upload().then((s) => console.log("res", s));
|
|
7540
|
-
};
|
|
7537
|
+
mt = new WeakMap(), we = new WeakMap(), Ee = new WeakMap(), gt = new WeakMap(), ue = new WeakMap(), ke = new WeakMap(), Je = new WeakMap(), $e = new WeakMap(), Bt = new WeakMap(), kt = new WeakMap(), at = new WeakMap(), De = new WeakMap(), Qe = new WeakMap(), Ot = new WeakMap(), Ft = new WeakMap(), Nt = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), lt = new WeakMap(), Ze = new WeakMap(), It = new WeakMap(), Tt = new WeakMap(), yt = new WeakMap(), jt = new WeakMap(), sn = new WeakMap(), Oe = new WeakMap(), Rt = new WeakMap(), on = new WeakMap(), Tn = new WeakMap(), an = new WeakMap(), ct = new WeakMap(), qt = new WeakMap(), Lt = new WeakMap(), Zt = new WeakMap(), Dt = new WeakMap(), Kt = new WeakMap(), zt = new WeakMap(), Xt = new WeakMap(), ln = new WeakMap(), cn = new WeakMap(), Gt = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), dn = new WeakMap(), Qt = new WeakMap();
|
|
7541
7538
|
export {
|
|
7542
|
-
|
|
7539
|
+
eo as default
|
|
7543
7540
|
};
|