image-salon-sdk 1.0.44 → 1.0.45

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.
@@ -1,12 +1,12 @@
1
1
  import './style.css';
2
- var qr = Object.defineProperty;
3
- var Pn = (s) => {
2
+ var Kr = Object.defineProperty;
3
+ var jn = (s) => {
4
4
  throw TypeError(s);
5
5
  };
6
- var Kr = (s, e, t) => e in s ? qr(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
7
- var he = (s, e, t) => Kr(s, typeof e != "symbol" ? e + "" : e, t), jn = (s, e, t) => e.has(s) || Pn("Cannot " + t);
8
- var F = (s, e, t) => (jn(s, e, "read from private field"), t ? t.call(s) : e.get(s)), X = (s, e, t) => e.has(s) ? Pn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), $ = (s, e, t, n) => (jn(s, e, "write to private field"), n ? n.call(s, t) : e.set(s, t), t);
9
- function mr(s) {
6
+ var zr = (s, e, t) => e in s ? Kr(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
7
+ var he = (s, e, t) => zr(s, typeof e != "symbol" ? e + "" : e, t), Zn = (s, e, t) => e.has(s) || jn("Cannot " + t);
8
+ var F = (s, e, t) => (Zn(s, e, "read from private field"), t ? t.call(s) : e.get(s)), X = (s, e, t) => e.has(s) ? jn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), $ = (s, e, t, n) => (Zn(s, e, "write to private field"), n ? n.call(s, t) : e.set(s, t), t);
9
+ function gr(s) {
10
10
  let e = typeof s;
11
11
  if (e == "object") {
12
12
  if (Array.isArray(s))
@@ -16,20 +16,20 @@ function mr(s) {
16
16
  }
17
17
  return e;
18
18
  }
19
- function zr(s) {
19
+ function Xr(s) {
20
20
  return s !== null && typeof s == "object" && !Array.isArray(s);
21
21
  }
22
- let wt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), bn = [];
22
+ let wt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), Cn = [];
23
23
  for (let s = 0; s < wt.length; s++)
24
- bn[wt[s].charCodeAt(0)] = s;
25
- bn[45] = wt.indexOf("+");
26
- bn[95] = wt.indexOf("/");
27
- function gr(s) {
24
+ Cn[wt[s].charCodeAt(0)] = s;
25
+ Cn[45] = wt.indexOf("+");
26
+ Cn[95] = wt.indexOf("/");
27
+ function wr(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 = bn[s.charCodeAt(a)], i === void 0)
32
+ if (i = Cn[s.charCodeAt(a)], i === void 0)
33
33
  switch (s[a]) {
34
34
  case "=":
35
35
  r = 0;
@@ -61,7 +61,7 @@ function gr(s) {
61
61
  throw Error("invalid base64 string.");
62
62
  return t.subarray(0, n);
63
63
  }
64
- function wr(s) {
64
+ function yr(s) {
65
65
  let e = "", t = 0, n, r = 0;
66
66
  for (let i = 0; i < s.length; i++)
67
67
  switch (n = s[i], t) {
@@ -93,14 +93,14 @@ var J;
93
93
  }, s.last = (t, n) => s.list(t, n).slice(-1)[0];
94
94
  const e = (t) => t && Array.isArray(t[s.symbol]);
95
95
  })(J || (J = {}));
96
- function Xr(s, e) {
96
+ function Gr(s, e) {
97
97
  return Object.assign(Object.assign({}, s), e);
98
98
  }
99
99
  var j;
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
  })(j || (j = {}));
103
- function Gr() {
103
+ function Jr() {
104
104
  let s = 0, e = 0;
105
105
  for (let n = 0; n < 28; n += 7) {
106
106
  let r = this.buf[this.pos++];
@@ -117,7 +117,7 @@ function Gr() {
117
117
  }
118
118
  throw new Error("invalid varint");
119
119
  }
120
- function vn(s, e, t) {
120
+ function kn(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,21 +133,21 @@ function vn(s, e, t) {
133
133
  t.push(e >>> 31 & 1);
134
134
  }
135
135
  }
136
- const an = 65536 * 65536;
137
- function yr(s) {
136
+ const ln = 65536 * 65536;
137
+ function br(s) {
138
138
  let e = s[0] == "-";
139
139
  e && (s = s.slice(1));
140
140
  const t = 1e6;
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 >= an && (r = r + (n / an | 0), n = n % an);
144
+ r *= t, n = n * t + c, n >= ln && (r = r + (n / ln | 0), n = n % ln);
145
145
  }
146
146
  return i(-24, -18), i(-18, -12), i(-12, -6), i(-6), [e, n, r];
147
147
  }
148
- function Un(s, e) {
148
+ function Bn(s, e) {
149
149
  if (e >>> 0 <= 2097151)
150
- return "" + (an * e + (s >>> 0));
150
+ return "" + (ln * 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) {
@@ -170,7 +170,7 @@ function Un(s, e) {
170
170
  1
171
171
  );
172
172
  }
173
- function Zn(s, e) {
173
+ function qn(s, e) {
174
174
  if (s >= 0) {
175
175
  for (; s > 127; )
176
176
  e.push(s & 127 | 128), s = s >>> 7;
@@ -181,7 +181,7 @@ function Zn(s, e) {
181
181
  e.push(1);
182
182
  }
183
183
  }
184
- function Jr() {
184
+ function Qr() {
185
185
  let s = this.buf[this.pos++], e = s & 127;
186
186
  if (!(s & 128))
187
187
  return this.assertBounds(), e;
@@ -199,7 +199,7 @@ function Jr() {
199
199
  return this.assertBounds(), e >>> 0;
200
200
  }
201
201
  let oe;
202
- function Qr() {
202
+ function Yr() {
203
203
  const s = new DataView(new ArrayBuffer(8));
204
204
  oe = globalThis.BigInt !== void 0 && typeof s.getBigInt64 == "function" && typeof s.getBigUint64 == "function" && typeof s.setBigInt64 == "function" && typeof s.setBigUint64 == "function" ? {
205
205
  MIN: BigInt("-9223372036854775808"),
@@ -210,13 +210,13 @@ function Qr() {
210
210
  V: s
211
211
  } : void 0;
212
212
  }
213
- Qr();
214
- function br(s) {
213
+ Yr();
214
+ function Cr(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 Cr = /^-?[0-9]+$/, cn = 4294967296, tn = 2147483648;
219
- class Er {
218
+ const Er = /^-?[0-9]+$/, dn = 4294967296, nn = 2147483648;
219
+ class Ar {
220
220
  /**
221
221
  * Create a new instance with the given bits.
222
222
  */
@@ -233,13 +233,13 @@ class Er {
233
233
  * Convert to a native number.
234
234
  */
235
235
  toNumber() {
236
- let e = this.hi * cn + (this.lo >>> 0);
236
+ let e = this.hi * dn + (this.lo >>> 0);
237
237
  if (!Number.isSafeInteger(e))
238
238
  throw new Error("cannot convert to safe number");
239
239
  return e;
240
240
  }
241
241
  }
242
- class De extends Er {
242
+ class De extends Ar {
243
243
  /**
244
244
  * Create instance from a `string`, `number` or `bigint`.
245
245
  */
@@ -270,9 +270,9 @@ class De extends Er {
270
270
  case "string":
271
271
  if (e == "0")
272
272
  return this.ZERO;
273
- if (e = e.trim(), !Cr.test(e))
273
+ if (e = e.trim(), !Er.test(e))
274
274
  throw new Error("string is no integer");
275
- let [t, n, r] = yr(e);
275
+ let [t, n, r] = br(e);
276
276
  if (t)
277
277
  throw new Error("signed value for ulong");
278
278
  return new De(n, r);
@@ -283,7 +283,7 @@ class De extends Er {
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 De(e, e / cn);
286
+ return new De(e, e / dn);
287
287
  }
288
288
  throw new Error("unknown value " + typeof e);
289
289
  }
@@ -291,17 +291,17 @@ class De extends Er {
291
291
  * Convert to decimal string.
292
292
  */
293
293
  toString() {
294
- return oe ? this.toBigInt().toString() : Un(this.lo, this.hi);
294
+ return oe ? this.toBigInt().toString() : Bn(this.lo, this.hi);
295
295
  }
296
296
  /**
297
297
  * Convert to native bigint.
298
298
  */
299
299
  toBigInt() {
300
- return br(oe), oe.V.setInt32(0, this.lo, !0), oe.V.setInt32(4, this.hi, !0), oe.V.getBigUint64(0, !0);
300
+ return Cr(oe), oe.V.setInt32(0, this.lo, !0), oe.V.setInt32(4, this.hi, !0), oe.V.getBigUint64(0, !0);
301
301
  }
302
302
  }
303
303
  De.ZERO = new De(0, 0);
304
- class Ee extends Er {
304
+ class Ee extends Ar {
305
305
  /**
306
306
  * Create instance from a `string`, `number` or `bigint`.
307
307
  */
@@ -332,13 +332,13 @@ class Ee extends Er {
332
332
  case "string":
333
333
  if (e == "0")
334
334
  return this.ZERO;
335
- if (e = e.trim(), !Cr.test(e))
335
+ if (e = e.trim(), !Er.test(e))
336
336
  throw new Error("string is no integer");
337
- let [t, n, r] = yr(e);
337
+ let [t, n, r] = br(e);
338
338
  if (t) {
339
- if (r > tn || r == tn && n != 0)
339
+ if (r > nn || r == nn && n != 0)
340
340
  throw new Error("signed long too small");
341
- } else if (r >= tn)
341
+ } else if (r >= nn)
342
342
  throw new Error("signed long too large");
343
343
  let i = new Ee(n, r);
344
344
  return t ? i.negate() : i;
@@ -347,7 +347,7 @@ class Ee extends Er {
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 Ee(e, e / cn) : new Ee(-e, -e / cn).negate();
350
+ return e > 0 ? new Ee(e, e / dn) : new Ee(-e, -e / dn).negate();
351
351
  }
352
352
  throw new Error("unknown value " + typeof e);
353
353
  }
@@ -355,7 +355,7 @@ class Ee extends Er {
355
355
  * Do we have a minus sign?
356
356
  */
357
357
  isNegative() {
358
- return (this.hi & tn) !== 0;
358
+ return (this.hi & nn) !== 0;
359
359
  }
360
360
  /**
361
361
  * Negate two's complement.
@@ -373,28 +373,28 @@ class Ee extends Er {
373
373
  return this.toBigInt().toString();
374
374
  if (this.isNegative()) {
375
375
  let e = this.negate();
376
- return "-" + Un(e.lo, e.hi);
376
+ return "-" + Bn(e.lo, e.hi);
377
377
  }
378
- return Un(this.lo, this.hi);
378
+ return Bn(this.lo, this.hi);
379
379
  }
380
380
  /**
381
381
  * Convert to native bigint.
382
382
  */
383
383
  toBigInt() {
384
- return br(oe), oe.V.setInt32(0, this.lo, !0), oe.V.setInt32(4, this.hi, !0), oe.V.getBigInt64(0, !0);
384
+ return Cr(oe), oe.V.setInt32(0, this.lo, !0), oe.V.setInt32(4, this.hi, !0), oe.V.getBigInt64(0, !0);
385
385
  }
386
386
  }
387
387
  Ee.ZERO = new Ee(0, 0);
388
- const qn = {
388
+ const Kn = {
389
389
  readUnknownField: !0,
390
- readerFactory: (s) => new ei(s)
390
+ readerFactory: (s) => new ti(s)
391
391
  };
392
- function Yr(s) {
393
- return s ? Object.assign(Object.assign({}, qn), s) : qn;
392
+ function ei(s) {
393
+ return s ? Object.assign(Object.assign({}, Kn), s) : Kn;
394
394
  }
395
- class ei {
395
+ class ti {
396
396
  constructor(e, t) {
397
- this.varint64 = Gr, this.uint32 = Jr, this.buf = e, this.len = e.length, this.pos = 0, this.view = new DataView(e.buffer, e.byteOffset, e.byteLength), this.textDecoder = t ?? new TextDecoder("utf-8", {
397
+ this.varint64 = Jr, this.uint32 = Qr, this.buf = e, this.len = e.length, this.pos = 0, this.view = new DataView(e.buffer, e.byteOffset, e.byteLength), this.textDecoder = t ?? new TextDecoder("utf-8", {
398
398
  fatal: !0,
399
399
  ignoreBOM: !0
400
400
  });
@@ -538,33 +538,33 @@ function G(s, e) {
538
538
  if (!s)
539
539
  throw new Error(e);
540
540
  }
541
- const ti = 34028234663852886e22, ni = -34028234663852886e22, ri = 4294967295, ii = 2147483647, si = -2147483648;
541
+ const ni = 34028234663852886e22, ri = -34028234663852886e22, ii = 4294967295, si = 2147483647, oi = -2147483648;
542
542
  function Gt(s) {
543
543
  if (typeof s != "number")
544
544
  throw new Error("invalid int 32: " + typeof s);
545
- if (!Number.isInteger(s) || s > ii || s < si)
545
+ if (!Number.isInteger(s) || s > si || s < oi)
546
546
  throw new Error("invalid int 32: " + s);
547
547
  }
548
- function dn(s) {
548
+ function hn(s) {
549
549
  if (typeof s != "number")
550
550
  throw new Error("invalid uint 32: " + typeof s);
551
- if (!Number.isInteger(s) || s > ri || s < 0)
551
+ if (!Number.isInteger(s) || s > ii || s < 0)
552
552
  throw new Error("invalid uint 32: " + s);
553
553
  }
554
- function Mn(s) {
554
+ function Vn(s) {
555
555
  if (typeof s != "number")
556
556
  throw new Error("invalid float 32: " + typeof s);
557
- if (Number.isFinite(s) && (s > ti || s < ni))
557
+ if (Number.isFinite(s) && (s > ni || s < ri))
558
558
  throw new Error("invalid float 32: " + s);
559
559
  }
560
- const Kn = {
560
+ const zn = {
561
561
  writeUnknownFields: !0,
562
- writerFactory: () => new ai()
562
+ writerFactory: () => new li()
563
563
  };
564
- function oi(s) {
565
- return s ? Object.assign(Object.assign({}, Kn), s) : Kn;
564
+ function ai(s) {
565
+ return s ? Object.assign(Object.assign({}, zn), s) : zn;
566
566
  }
567
- class ai {
567
+ class li {
568
568
  constructor(e) {
569
569
  this.stack = [], this.textEncoder = e ?? new TextEncoder(), this.chunks = [], this.buf = [];
570
570
  }
@@ -620,7 +620,7 @@ class ai {
620
620
  * Write a `uint32` value, an unsigned 32 bit varint.
621
621
  */
622
622
  uint32(e) {
623
- for (dn(e); e > 127; )
623
+ for (hn(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 ai {
628
628
  * Write a `int32` value, a signed 32 bit varint.
629
629
  */
630
630
  int32(e) {
631
- return Gt(e), Zn(e, this.buf), this;
631
+ return Gt(e), qn(e, this.buf), this;
632
632
  }
633
633
  /**
634
634
  * Write a `bool` value, a variant.
@@ -653,7 +653,7 @@ class ai {
653
653
  * Write a `float` value, 32-bit floating point number.
654
654
  */
655
655
  float(e) {
656
- Mn(e);
656
+ Vn(e);
657
657
  let t = new Uint8Array(4);
658
658
  return new DataView(t.buffer).setFloat32(0, e, !0), this.raw(t);
659
659
  }
@@ -668,7 +668,7 @@ class ai {
668
668
  * Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
669
669
  */
670
670
  fixed32(e) {
671
- dn(e);
671
+ hn(e);
672
672
  let t = new Uint8Array(4);
673
673
  return new DataView(t.buffer).setUint32(0, e, !0), this.raw(t);
674
674
  }
@@ -684,7 +684,7 @@ class ai {
684
684
  * Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
685
685
  */
686
686
  sint32(e) {
687
- return Gt(e), e = (e << 1 ^ e >> 31) >>> 0, Zn(e, this.buf), this;
687
+ return Gt(e), e = (e << 1 ^ e >> 31) >>> 0, qn(e, this.buf), this;
688
688
  }
689
689
  /**
690
690
  * Write a `fixed64` value, a signed, fixed-length 64-bit integer.
@@ -705,44 +705,44 @@ class ai {
705
705
  */
706
706
  int64(e) {
707
707
  let t = Ee.from(e);
708
- return vn(t.lo, t.hi, this.buf), this;
708
+ return kn(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 = Ee.from(e), n = t.hi >> 31, r = t.lo << 1 ^ n, i = (t.hi << 1 | t.lo >>> 31) ^ n;
715
- return vn(r, i, this.buf), this;
715
+ return kn(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 = De.from(e);
722
- return vn(t.lo, t.hi, this.buf), this;
722
+ return kn(t.lo, t.hi, this.buf), this;
723
723
  }
724
724
  }
725
- const zn = {
725
+ const Xn = {
726
726
  emitDefaultValues: !1,
727
727
  enumAsInteger: !1,
728
728
  useProtoFieldName: !1,
729
729
  prettySpaces: 0
730
- }, Xn = {
730
+ }, Gn = {
731
731
  ignoreUnknownFields: !1
732
732
  };
733
- function li(s) {
734
- return s ? Object.assign(Object.assign({}, Xn), s) : Xn;
735
- }
736
733
  function ci(s) {
737
- return s ? Object.assign(Object.assign({}, zn), s) : zn;
734
+ return s ? Object.assign(Object.assign({}, Gn), s) : Gn;
735
+ }
736
+ function di(s) {
737
+ return s ? Object.assign(Object.assign({}, Xn), s) : Xn;
738
738
  }
739
- function di(s, e) {
739
+ function hi(s, e) {
740
740
  var t, n;
741
741
  let r = Object.assign(Object.assign({}, 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
- const Ar = Symbol.for("protobuf-ts/message-type");
745
- function Bn(s) {
744
+ const vr = Symbol.for("protobuf-ts/message-type");
745
+ function On(s) {
746
746
  let e = !1;
747
747
  const t = [];
748
748
  for (let n = 0; n < s.length; n++) {
@@ -759,15 +759,15 @@ var dt;
759
759
  (function(s) {
760
760
  s[s.BIGINT = 0] = "BIGINT", s[s.STRING = 1] = "STRING", s[s.NUMBER = 2] = "NUMBER";
761
761
  })(dt || (dt = {}));
762
- var hn;
762
+ var un;
763
763
  (function(s) {
764
764
  s[s.NO = 0] = "NO", s[s.PACKED = 1] = "PACKED", s[s.UNPACKED = 2] = "UNPACKED";
765
- })(hn || (hn = {}));
766
- function hi(s) {
765
+ })(un || (un = {}));
766
+ function ui(s) {
767
767
  var e, t, n, r;
768
- return s.localName = (e = s.localName) !== null && e !== void 0 ? e : Bn(s.name), s.jsonName = (t = s.jsonName) !== null && t !== void 0 ? t : Bn(s.name), s.repeat = (n = s.repeat) !== null && n !== void 0 ? n : hn.NO, s.opt = (r = s.opt) !== null && r !== void 0 ? r : s.repeat || s.oneof ? !1 : s.kind == "message", s;
768
+ return s.localName = (e = s.localName) !== null && e !== void 0 ? e : On(s.name), s.jsonName = (t = s.jsonName) !== null && t !== void 0 ? t : On(s.name), s.repeat = (n = s.repeat) !== null && n !== void 0 ? n : un.NO, s.opt = (r = s.opt) !== null && r !== void 0 ? r : s.repeat || s.oneof ? !1 : s.kind == "message", s;
769
769
  }
770
- function ui(s) {
770
+ function fi(s) {
771
771
  if (typeof s != "object" || s === null || !s.hasOwnProperty("oneofKind"))
772
772
  return !1;
773
773
  switch (typeof s.oneofKind) {
@@ -779,7 +779,7 @@ function ui(s) {
779
779
  return !1;
780
780
  }
781
781
  }
782
- class fi {
782
+ class pi {
783
783
  constructor(e) {
784
784
  var t;
785
785
  this.fields = (t = e.fields) !== null && t !== void 0 ? t : [];
@@ -839,7 +839,7 @@ class fi {
839
839
  return !0;
840
840
  for (const o of i.oneofs) {
841
841
  const a = e[o];
842
- if (!ui(a))
842
+ if (!fi(a))
843
843
  return !1;
844
844
  if (a.oneofKind === void 0)
845
845
  continue;
@@ -965,7 +965,7 @@ function Je(s, e) {
965
965
  return s.toString();
966
966
  }
967
967
  }
968
- class pi {
968
+ class mi {
969
969
  constructor(e) {
970
970
  this.info = e;
971
971
  }
@@ -981,7 +981,7 @@ class pi {
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 = mr(n);
984
+ let r = gr(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
  }
@@ -1019,7 +1019,7 @@ class pi {
1019
1019
  if (a.kind == "map") {
1020
1020
  if (o === null)
1021
1021
  continue;
1022
- this.assert(zr(o), a.name, o);
1022
+ this.assert(Xr(o), a.name, o);
1023
1023
  const l = h[c];
1024
1024
  for (const [u, d] of Object.entries(o)) {
1025
1025
  this.assert(d !== null, a.name + " map value", null);
@@ -1135,7 +1135,7 @@ class pi {
1135
1135
  i = "too large or small";
1136
1136
  break;
1137
1137
  }
1138
- return t == D.FLOAT && Mn(o), o;
1138
+ return t == D.FLOAT && Vn(o), o;
1139
1139
  case D.INT32:
1140
1140
  case D.FIXED32:
1141
1141
  case D.SFIXED32:
@@ -1146,7 +1146,7 @@ class pi {
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 ? dn(a) : Gt(a), a;
1149
+ return t == D.UINT32 ? hn(a) : Gt(a), a;
1150
1150
  case D.INT64:
1151
1151
  case D.SFIXED64:
1152
1152
  case D.SINT64:
@@ -1187,7 +1187,7 @@ class pi {
1187
1187
  return new Uint8Array(0);
1188
1188
  if (typeof e != "string")
1189
1189
  break;
1190
- return gr(e);
1190
+ return wr(e);
1191
1191
  }
1192
1192
  } catch (o) {
1193
1193
  i = o.message;
@@ -1195,7 +1195,7 @@ class pi {
1195
1195
  this.assert(!1, r + (i ? " - " + i : ""), e);
1196
1196
  }
1197
1197
  }
1198
- class mi {
1198
+ class gi {
1199
1199
  constructor(e) {
1200
1200
  var t;
1201
1201
  this.fields = (t = e.fields) !== null && t !== void 0 ? t : [];
@@ -1319,9 +1319,9 @@ class mi {
1319
1319
  return t === 0 ? o ? 0 : void 0 : (Gt(t), t);
1320
1320
  case D.FIXED32:
1321
1321
  case D.UINT32:
1322
- return t === 0 ? o ? 0 : void 0 : (dn(t), t);
1322
+ return t === 0 ? o ? 0 : void 0 : (hn(t), t);
1323
1323
  case D.FLOAT:
1324
- Mn(t);
1324
+ Vn(t);
1325
1325
  case D.DOUBLE:
1326
1326
  return t === 0 ? o ? 0 : void 0 : (G(typeof t == "number"), Number.isNaN(t) ? "NaN" : t === Number.POSITIVE_INFINITY ? "Infinity" : t === Number.NEGATIVE_INFINITY ? "-Infinity" : t);
1327
1327
  case D.STRING:
@@ -1340,11 +1340,11 @@ class mi {
1340
1340
  let c = Ee.from(t);
1341
1341
  return c.isZero() && !o ? void 0 : c.toString();
1342
1342
  case D.BYTES:
1343
- return G(t instanceof Uint8Array), t.byteLength ? wr(t) : o ? "" : void 0;
1343
+ return G(t instanceof Uint8Array), t.byteLength ? yr(t) : o ? "" : void 0;
1344
1344
  }
1345
1345
  }
1346
1346
  }
1347
- function On(s, e = dt.STRING) {
1347
+ function Sn(s, e = dt.STRING) {
1348
1348
  switch (s) {
1349
1349
  case D.BOOL:
1350
1350
  return !1;
@@ -1366,7 +1366,7 @@ function On(s, e = dt.STRING) {
1366
1366
  return 0;
1367
1367
  }
1368
1368
  }
1369
- class gi {
1369
+ class wi {
1370
1370
  constructor(e) {
1371
1371
  this.info = e;
1372
1372
  }
@@ -1460,13 +1460,13 @@ class gi {
1460
1460
  }
1461
1461
  }
1462
1462
  if (o === void 0) {
1463
- let c = On(e.K);
1463
+ let c = Sn(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 = On(e.V.T, e.V.L);
1469
+ a = Sn(e.V.T, e.V.L);
1470
1470
  break;
1471
1471
  case "enum":
1472
1472
  a = 0;
@@ -1512,7 +1512,7 @@ class gi {
1512
1512
  }
1513
1513
  }
1514
1514
  }
1515
- class wi {
1515
+ class yi {
1516
1516
  constructor(e) {
1517
1517
  this.info = e;
1518
1518
  }
@@ -1541,7 +1541,7 @@ class wi {
1541
1541
  case "enum":
1542
1542
  let l = i.kind == "enum" ? D.INT32 : i.T;
1543
1543
  if (c)
1544
- if (G(Array.isArray(o)), c == hn.PACKED)
1544
+ if (G(Array.isArray(o)), c == un.PACKED)
1545
1545
  this.packed(t, l, i.no, o);
1546
1546
  else
1547
1547
  for (const u of o)
@@ -1678,8 +1678,8 @@ class wi {
1678
1678
  return [n, r, i || o];
1679
1679
  }
1680
1680
  }
1681
- function yi(s) {
1682
- const e = s.messagePrototype ? Object.create(s.messagePrototype) : Object.defineProperty({}, Ar, { value: s });
1681
+ function bi(s) {
1682
+ const e = s.messagePrototype ? Object.create(s.messagePrototype) : Object.defineProperty({}, vr, { value: s });
1683
1683
  for (let t of s.fields) {
1684
1684
  let n = t.localName;
1685
1685
  if (!t.opt)
@@ -1690,7 +1690,7 @@ function yi(s) {
1690
1690
  else
1691
1691
  switch (t.kind) {
1692
1692
  case "scalar":
1693
- e[n] = On(t.T, t.L);
1693
+ e[n] = Sn(t.T, t.L);
1694
1694
  break;
1695
1695
  case "enum":
1696
1696
  e[n] = 0;
@@ -1748,7 +1748,7 @@ function ve(s, e, t) {
1748
1748
  }
1749
1749
  }
1750
1750
  }
1751
- function bi(s, e, t) {
1751
+ function Ci(s, e, t) {
1752
1752
  if (e === t)
1753
1753
  return !0;
1754
1754
  if (!e || !t)
@@ -1759,24 +1759,24 @@ function bi(s, e, t) {
1759
1759
  case "enum":
1760
1760
  case "scalar":
1761
1761
  let a = n.kind == "enum" ? D.INT32 : n.T;
1762
- if (!(n.repeat ? Gn(a, i, o) : vr(a, i, o)))
1762
+ if (!(n.repeat ? Jn(a, i, o) : kr(a, i, o)))
1763
1763
  return !1;
1764
1764
  break;
1765
1765
  case "map":
1766
- if (!(n.V.kind == "message" ? Jn(n.V.T(), nn(i), nn(o)) : Gn(n.V.kind == "enum" ? D.INT32 : n.V.T, nn(i), nn(o))))
1766
+ if (!(n.V.kind == "message" ? Qn(n.V.T(), rn(i), rn(o)) : Jn(n.V.kind == "enum" ? D.INT32 : n.V.T, rn(i), rn(o))))
1767
1767
  return !1;
1768
1768
  break;
1769
1769
  case "message":
1770
1770
  let c = n.T();
1771
- if (!(n.repeat ? Jn(c, i, o) : c.equals(i, o)))
1771
+ if (!(n.repeat ? Qn(c, i, o) : c.equals(i, o)))
1772
1772
  return !1;
1773
1773
  break;
1774
1774
  }
1775
1775
  }
1776
1776
  return !0;
1777
1777
  }
1778
- const nn = Object.values;
1779
- function vr(s, e, t) {
1778
+ const rn = Object.values;
1779
+ function kr(s, e, t) {
1780
1780
  if (e === t)
1781
1781
  return !0;
1782
1782
  if (s !== D.BYTES)
@@ -1789,15 +1789,15 @@ function vr(s, e, t) {
1789
1789
  return !1;
1790
1790
  return !0;
1791
1791
  }
1792
- function Gn(s, e, t) {
1792
+ function Jn(s, e, t) {
1793
1793
  if (e.length !== t.length)
1794
1794
  return !1;
1795
1795
  for (let n = 0; n < e.length; n++)
1796
- if (!vr(s, e[n], t[n]))
1796
+ if (!kr(s, e[n], t[n]))
1797
1797
  return !1;
1798
1798
  return !0;
1799
1799
  }
1800
- function Jn(s, e, t) {
1800
+ function Qn(s, e, t) {
1801
1801
  if (e.length !== t.length)
1802
1802
  return !1;
1803
1803
  for (let n = 0; n < e.length; n++)
@@ -1805,13 +1805,13 @@ function Jn(s, e, t) {
1805
1805
  return !1;
1806
1806
  return !0;
1807
1807
  }
1808
- const Ci = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));
1808
+ const Ei = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));
1809
1809
  class xe {
1810
1810
  constructor(e, t, n) {
1811
- this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(hi), this.options = n ?? {}, this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, Ci), { [Ar]: { value: this } })), this.refTypeCheck = new fi(this), this.refJsonReader = new pi(this), this.refJsonWriter = new mi(this), this.refBinReader = new gi(this), this.refBinWriter = new wi(this);
1811
+ this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(ui), this.options = n ?? {}, this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, Ei), { [vr]: { value: this } })), this.refTypeCheck = new pi(this), this.refJsonReader = new mi(this), this.refJsonWriter = new gi(this), this.refBinReader = new wi(this), this.refBinWriter = new yi(this);
1812
1812
  }
1813
1813
  create(e) {
1814
- let t = yi(this);
1814
+ let t = bi(this);
1815
1815
  return e !== void 0 && ve(this, t, e), t;
1816
1816
  }
1817
1817
  /**
@@ -1830,7 +1830,7 @@ class xe {
1830
1830
  * Will also return true if both messages are `undefined`.
1831
1831
  */
1832
1832
  equals(e, t) {
1833
- return bi(this, e, t);
1833
+ return Ci(this, e, t);
1834
1834
  }
1835
1835
  /**
1836
1836
  * Is the given value assignable to our message type
@@ -1856,14 +1856,14 @@ class xe {
1856
1856
  * Create a new message from binary format.
1857
1857
  */
1858
1858
  fromBinary(e, t) {
1859
- let n = Yr(t);
1859
+ let n = ei(t);
1860
1860
  return this.internalBinaryRead(n.readerFactory(e), e.byteLength, n);
1861
1861
  }
1862
1862
  /**
1863
1863
  * Read a new message from a JSON value.
1864
1864
  */
1865
1865
  fromJson(e, t) {
1866
- return this.internalJsonRead(e, li(t));
1866
+ return this.internalJsonRead(e, ci(t));
1867
1867
  }
1868
1868
  /**
1869
1869
  * Read a new message from a JSON string.
@@ -1877,7 +1877,7 @@ class xe {
1877
1877
  * Write the message to canonical JSON value.
1878
1878
  */
1879
1879
  toJson(e, t) {
1880
- return this.internalJsonWrite(e, ci(t));
1880
+ return this.internalJsonWrite(e, di(t));
1881
1881
  }
1882
1882
  /**
1883
1883
  * Convert the message to canonical JSON string.
@@ -1892,7 +1892,7 @@ class xe {
1892
1892
  * Write the message to binary format.
1893
1893
  */
1894
1894
  toBinary(e, t) {
1895
- let n = oi(t);
1895
+ let n = ai(t);
1896
1896
  return this.internalBinaryWrite(e, n.writerFactory(), n).finish();
1897
1897
  }
1898
1898
  /**
@@ -1908,7 +1908,7 @@ class xe {
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 ${mr(e)}.`);
1911
+ throw new Error(`Unable to parse message ${this.typeName} from JSON ${gr(e)}.`);
1912
1912
  }
1913
1913
  /**
1914
1914
  * This is an internal method. If you just want to write a message
@@ -1942,14 +1942,14 @@ class xe {
1942
1942
  return this.refBinReader.read(e, i, n, t), i;
1943
1943
  }
1944
1944
  }
1945
- function Ei(s, e) {
1945
+ function Ai(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 : Bn(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;
1948
+ return i.service = e, i.localName = (t = i.localName) !== null && t !== void 0 ? t : On(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
- class Vn {
1950
+ class Hn {
1951
1951
  constructor(e, t, n) {
1952
- this.typeName = e, this.methods = t.map((r) => Ei(r, this)), this.options = n ?? {};
1952
+ this.typeName = e, this.methods = t.map((r) => Ai(r, this)), this.options = n ?? {};
1953
1953
  }
1954
1954
  }
1955
1955
  class se extends Error {
@@ -1969,22 +1969,22 @@ class se extends Error {
1969
1969
  `);
1970
1970
  }
1971
1971
  }
1972
- function Ai(s, e) {
1972
+ function vi(s, e) {
1973
1973
  if (!e)
1974
1974
  return s;
1975
1975
  let t = {};
1976
- rn(s, t), rn(e, t);
1976
+ sn(s, t), sn(e, t);
1977
1977
  for (let n of Object.keys(e)) {
1978
1978
  let r = e[n];
1979
1979
  switch (n) {
1980
1980
  case "jsonOptions":
1981
- t.jsonOptions = di(s.jsonOptions, t.jsonOptions);
1981
+ t.jsonOptions = hi(s.jsonOptions, t.jsonOptions);
1982
1982
  break;
1983
1983
  case "binaryOptions":
1984
- t.binaryOptions = Xr(s.binaryOptions, t.binaryOptions);
1984
+ t.binaryOptions = Gr(s.binaryOptions, t.binaryOptions);
1985
1985
  break;
1986
1986
  case "meta":
1987
- t.meta = {}, rn(s.meta, t.meta), rn(e.meta, t.meta);
1987
+ t.meta = {}, sn(s.meta, t.meta), sn(e.meta, t.meta);
1988
1988
  break;
1989
1989
  case "interceptors":
1990
1990
  t.interceptors = s.interceptors ? s.interceptors.concat(r) : r.concat();
@@ -1993,7 +1993,7 @@ function Ai(s, e) {
1993
1993
  }
1994
1994
  return t;
1995
1995
  }
1996
- function rn(s, e) {
1996
+ function sn(s, e) {
1997
1997
  if (!s)
1998
1998
  return;
1999
1999
  let t = e;
@@ -2064,7 +2064,7 @@ class Ct {
2064
2064
  this._state === Ze.PENDING && this.reject(e);
2065
2065
  }
2066
2066
  }
2067
- class vi {
2067
+ class ki {
2068
2068
  constructor() {
2069
2069
  this._lis = {
2070
2070
  nxt: [],
@@ -2171,7 +2171,7 @@ class vi {
2171
2171
  t.q.push(e);
2172
2172
  }
2173
2173
  }
2174
- var ki = function(s, e, t, n) {
2174
+ var Fi = function(s, e, t, n) {
2175
2175
  function r(i) {
2176
2176
  return i instanceof t ? i : new t(function(o) {
2177
2177
  o(i);
@@ -2198,7 +2198,7 @@ var ki = function(s, e, t, n) {
2198
2198
  h((n = n.apply(s, e || [])).next());
2199
2199
  });
2200
2200
  };
2201
- class Fi {
2201
+ class Ni {
2202
2202
  constructor(e, t, n, r, i, o, a) {
2203
2203
  this.method = e, this.requestHeaders = t, this.request = n, this.headers = r, this.response = i, this.status = o, this.trailers = a;
2204
2204
  }
@@ -2210,7 +2210,7 @@ class Fi {
2210
2210
  return this.promiseFinished().then((n) => e ? Promise.resolve(e(n)) : n, (n) => t ? Promise.resolve(t(n)) : Promise.reject(n));
2211
2211
  }
2212
2212
  promiseFinished() {
2213
- return ki(this, void 0, void 0, function* () {
2213
+ return Fi(this, void 0, void 0, function* () {
2214
2214
  let [e, t, n, r] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);
2215
2215
  return {
2216
2216
  method: this.method,
@@ -2224,7 +2224,7 @@ class Fi {
2224
2224
  });
2225
2225
  }
2226
2226
  }
2227
- var Ni = function(s, e, t, n) {
2227
+ var Ii = function(s, e, t, n) {
2228
2228
  function r(i) {
2229
2229
  return i instanceof t ? i : new t(function(o) {
2230
2230
  o(i);
@@ -2251,7 +2251,7 @@ var Ni = function(s, e, t, n) {
2251
2251
  h((n = n.apply(s, e || [])).next());
2252
2252
  });
2253
2253
  };
2254
- class Ii {
2254
+ class Li {
2255
2255
  constructor(e, t, n, r, i, o, a) {
2256
2256
  this.method = e, this.requestHeaders = t, this.request = n, this.headers = r, this.responses = i, this.status = o, this.trailers = a;
2257
2257
  }
@@ -2265,7 +2265,7 @@ class Ii {
2265
2265
  return this.promiseFinished().then((n) => e ? Promise.resolve(e(n)) : n, (n) => t ? Promise.resolve(t(n)) : Promise.reject(n));
2266
2266
  }
2267
2267
  promiseFinished() {
2268
- return Ni(this, void 0, void 0, function* () {
2268
+ return Ii(this, void 0, void 0, function* () {
2269
2269
  let [e, t, n] = yield Promise.all([this.headers, this.status, this.trailers]);
2270
2270
  return {
2271
2271
  method: this.method,
@@ -2293,7 +2293,7 @@ var P;
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
  })(P || (P = {}));
2296
- var Li = function(s, e, t, n) {
2296
+ var Ti = function(s, e, t, n) {
2297
2297
  function r(i) {
2298
2298
  return i instanceof t ? i : new t(function(o) {
2299
2299
  o(i);
@@ -2320,7 +2320,7 @@ var Li = function(s, e, t, n) {
2320
2320
  h((n = n.apply(s, e || [])).next());
2321
2321
  });
2322
2322
  };
2323
- function Qn(s, e, t, n, r) {
2323
+ function Yn(s, e, t, n, r) {
2324
2324
  if (n)
2325
2325
  for (let [i, o] of Object.entries(n))
2326
2326
  if (typeof o == "string")
@@ -2340,14 +2340,14 @@ function Qn(s, e, t, n, r) {
2340
2340
  }
2341
2341
  return s;
2342
2342
  }
2343
- function Yn(s, e) {
2343
+ function er(s, e) {
2344
2344
  let t = new Uint8Array(5 + s.length);
2345
2345
  t[0] = Qe.DATA;
2346
2346
  for (let n = s.length, r = 4; r > 0; r--)
2347
2347
  t[r] = n % 256, n >>>= 8;
2348
- return t.set(s, 5), e === "binary" ? t : wr(t);
2348
+ return t.set(s, 5), e === "binary" ? t : yr(t);
2349
2349
  }
2350
- function Sn(s, e, t) {
2350
+ function Dn(s, e, t) {
2351
2351
  if (arguments.length === 1) {
2352
2352
  let c = s, h;
2353
2353
  try {
@@ -2360,23 +2360,23 @@ function Sn(s, e, t) {
2360
2360
  case "opaqueredirect":
2361
2361
  throw new se(`fetch response type ${c.type}`, P[P.UNKNOWN]);
2362
2362
  }
2363
- return Sn(Ui(c.headers), c.status, c.statusText);
2363
+ return Dn(Bi(c.headers), c.status, c.statusText);
2364
2364
  }
2365
- let n = s, r = e >= 200 && e < 300, i = Fr(n), [o, a] = kr(n);
2366
- return (o === void 0 || o === P.OK) && !r && (o = Bi(e), a = t), [o, a, i];
2365
+ let n = s, r = e >= 200 && e < 300, i = Nr(n), [o, a] = Fr(n);
2366
+ return (o === void 0 || o === P.OK) && !r && (o = Oi(e), a = t), [o, a, i];
2367
2367
  }
2368
- function er(s) {
2369
- let e = _i(s), [t, n] = kr(e), r = Fr(e);
2368
+ function tr(s) {
2369
+ let e = Ui(s), [t, n] = Fr(e), r = Nr(e);
2370
2370
  return [t ?? P.OK, n, r];
2371
2371
  }
2372
2372
  var Qe;
2373
2373
  (function(s) {
2374
2374
  s[s.DATA = 0] = "DATA", s[s.TRAILER = 128] = "TRAILER";
2375
2375
  })(Qe || (Qe = {}));
2376
- function tr(s, e, t) {
2377
- return Li(this, void 0, void 0, function* () {
2378
- let n, r = "", i = new Uint8Array(0), o = xi(e);
2379
- if (Ti(s)) {
2376
+ function nr(s, e, t) {
2377
+ return Ti(this, void 0, void 0, function* () {
2378
+ let n, r = "", i = new Uint8Array(0), o = _i(e);
2379
+ if (xi(s)) {
2380
2380
  let a = s.getReader();
2381
2381
  n = {
2382
2382
  next: () => a.read()
@@ -2392,9 +2392,9 @@ function tr(s, e, t) {
2392
2392
  let c = r.length - r.length % 4;
2393
2393
  if (c === 0)
2394
2394
  continue;
2395
- i = nr(i, gr(r.substring(0, c))), r = r.substring(c);
2395
+ i = rr(i, wr(r.substring(0, c))), r = r.substring(c);
2396
2396
  } else
2397
- i = nr(i, a.value);
2397
+ i = rr(i, a.value);
2398
2398
  for (; i.length >= 5 && i[0] === Qe.DATA; ) {
2399
2399
  let c = 0;
2400
2400
  for (let h = 1; h < 5; h++)
@@ -2416,12 +2416,12 @@ function tr(s, e, t) {
2416
2416
  }
2417
2417
  });
2418
2418
  }
2419
- const Ti = (s) => typeof s.getReader == "function";
2420
- function nr(s, e) {
2419
+ const xi = (s) => typeof s.getReader == "function";
2420
+ function rr(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 xi(s) {
2424
+ function _i(s) {
2425
2425
  switch (s) {
2426
2426
  case "application/grpc-web-text":
2427
2427
  case "application/grpc-web-text+proto":
@@ -2436,7 +2436,7 @@ function xi(s) {
2436
2436
  throw new se("unexpected response content type: " + s, P[P.INTERNAL]);
2437
2437
  }
2438
2438
  }
2439
- function kr(s) {
2439
+ function Fr(s) {
2440
2440
  let e, t, n = s["grpc-message"];
2441
2441
  if (n !== void 0) {
2442
2442
  if (Array.isArray(n))
@@ -2452,7 +2452,7 @@ function kr(s) {
2452
2452
  }
2453
2453
  return [e, t];
2454
2454
  }
2455
- function Fr(s) {
2455
+ function Nr(s) {
2456
2456
  let e = {};
2457
2457
  for (let [t, n] of Object.entries(s))
2458
2458
  switch (t) {
@@ -2465,7 +2465,7 @@ function Fr(s) {
2465
2465
  }
2466
2466
  return e;
2467
2467
  }
2468
- function _i(s) {
2468
+ function Ui(s) {
2469
2469
  let e = {};
2470
2470
  for (let t of String.fromCharCode.apply(String, s).trim().split(`\r
2471
2471
  `)) {
@@ -2479,14 +2479,14 @@ function _i(s) {
2479
2479
  }
2480
2480
  return e;
2481
2481
  }
2482
- function Ui(s) {
2482
+ function Bi(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 Bi(s) {
2489
+ function Oi(s) {
2490
2490
  switch (s) {
2491
2491
  case 200:
2492
2492
  return P.OK;
@@ -2518,12 +2518,12 @@ function Bi(s) {
2518
2518
  return P.UNKNOWN;
2519
2519
  }
2520
2520
  }
2521
- class Oi {
2521
+ class Si {
2522
2522
  constructor(e) {
2523
2523
  this.defaultOptions = e;
2524
2524
  }
2525
2525
  mergeOptions(e) {
2526
- return Ai(this.defaultOptions, e);
2526
+ return vi(this.defaultOptions, e);
2527
2527
  }
2528
2528
  /**
2529
2529
  * Create an URI for a gRPC web call.
@@ -2555,15 +2555,15 @@ class Oi {
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 Ct(), y = new vi(), I = !0, L, C = new Ct(), R, O = new Ct();
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 Ct(), y = new ki(), I = !0, L, C = new Ct(), R, O = new Ct();
2559
2559
  return globalThis.fetch(u, Object.assign(Object.assign({}, l), {
2560
2560
  method: "POST",
2561
- headers: Qn(new globalThis.Headers(), h, c.timeout, c.meta),
2562
- body: Yn(d, h),
2561
+ headers: Yn(new globalThis.Headers(), h, c.timeout, c.meta),
2562
+ body: er(d, h),
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 [x, b, B] = Sn(v);
2566
+ let [x, b, B] = Dn(v);
2567
2567
  if (f.resolve(B), x != null && x !== P.OK)
2568
2568
  throw new se(b ?? P[x], P[x], B);
2569
2569
  return x != null && (L = {
@@ -2573,14 +2573,14 @@ class Oi {
2573
2573
  }).then((v) => {
2574
2574
  if (!v.body)
2575
2575
  throw new se("missing response body", P[P.INTERNAL]);
2576
- return tr(v.body, v.headers.get("content-type"), (x, b) => {
2576
+ return nr(v.body, v.headers.get("content-type"), (x, b) => {
2577
2577
  switch (x) {
2578
2578
  case Qe.DATA:
2579
2579
  y.notifyMessage(e.O.fromBinary(b, c.binaryOptions)), I = !1;
2580
2580
  break;
2581
2581
  case Qe.TRAILER:
2582
2582
  let B, m;
2583
- [B, m, R] = er(b), L = {
2583
+ [B, m, R] = tr(b), L = {
2584
2584
  code: P[B],
2585
2585
  detail: m ?? P[B]
2586
2586
  };
@@ -2598,19 +2598,19 @@ class Oi {
2598
2598
  }).catch((v) => {
2599
2599
  let x;
2600
2600
  v instanceof se ? x = v : v instanceof Error && v.name === "AbortError" ? x = new se(v.message, P[P.CANCELLED]) : x = new se(v instanceof Error ? v.message : "" + v, P[P.INTERNAL]), x.methodName = e.name, x.serviceName = e.service.typeName, f.rejectPending(x), y.notifyError(x), C.rejectPending(x), O.rejectPending(x);
2601
- }), new Ii(e, (a = c.meta) !== null && a !== void 0 ? a : {}, t, f.promise, y, C.promise, O.promise);
2601
+ }), new Li(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
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 Ct(), y, I = new Ct(), L, C = new Ct(), R, O = new Ct();
2606
2606
  return globalThis.fetch(u, Object.assign(Object.assign({}, l), {
2607
2607
  method: "POST",
2608
- headers: Qn(new globalThis.Headers(), h, c.timeout, c.meta),
2609
- body: Yn(d, h),
2608
+ headers: Yn(new globalThis.Headers(), h, c.timeout, c.meta),
2609
+ body: er(d, h),
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 [x, b, B] = Sn(v);
2613
+ let [x, b, B] = Dn(v);
2614
2614
  if (f.resolve(B), x != null && x !== P.OK)
2615
2615
  throw new se(b ?? P[x], P[x], B);
2616
2616
  return x != null && (L = {
@@ -2620,7 +2620,7 @@ class Oi {
2620
2620
  }).then((v) => {
2621
2621
  if (!v.body)
2622
2622
  throw new se("missing response body", P[P.INTERNAL]);
2623
- return tr(v.body, v.headers.get("content-type"), (x, b) => {
2623
+ return nr(v.body, v.headers.get("content-type"), (x, b) => {
2624
2624
  switch (x) {
2625
2625
  case Qe.DATA:
2626
2626
  if (y)
@@ -2629,7 +2629,7 @@ class Oi {
2629
2629
  break;
2630
2630
  case Qe.TRAILER:
2631
2631
  let B, m;
2632
- [B, m, R] = er(b), L = {
2632
+ [B, m, R] = tr(b), L = {
2633
2633
  code: P[B],
2634
2634
  detail: m ?? P[B]
2635
2635
  };
@@ -2651,11 +2651,11 @@ class Oi {
2651
2651
  }).catch((v) => {
2652
2652
  let x;
2653
2653
  v instanceof se ? x = v : v instanceof Error && v.name === "AbortError" ? x = new se(v.message, P[P.CANCELLED]) : x = new se(v instanceof Error ? v.message : "" + v, P[P.INTERNAL]), x.methodName = e.name, x.serviceName = e.service.typeName, f.rejectPending(x), I.rejectPending(x), C.rejectPending(x), O.rejectPending(x);
2654
- }), new Fi(e, (a = c.meta) !== null && a !== void 0 ? a : {}, t, f.promise, I.promise, C.promise, O.promise);
2654
+ }), new Ni(e, (a = c.meta) !== null && a !== void 0 ? a : {}, t, f.promise, I.promise, C.promise, O.promise);
2655
2655
  }
2656
2656
  }
2657
- var Cn = /* @__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))(Cn || {});
2658
- class Si extends xe {
2657
+ var En = /* @__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))(En || {});
2658
+ class Di extends xe {
2659
2659
  constructor() {
2660
2660
  super("com.hamropatro.grpc.cms.SearchRequest", [
2661
2661
  {
@@ -2718,8 +2718,8 @@ class Si extends xe {
2718
2718
  return r !== !1 && (r == !0 ? J.onWrite : r)(this.typeName, e, t), t;
2719
2719
  }
2720
2720
  }
2721
- const Nr = new Si();
2722
- class Di extends xe {
2721
+ const Ir = new Di();
2722
+ class Ri extends xe {
2723
2723
  constructor() {
2724
2724
  super("com.hamropatro.grpc.cms.SearchResult", [
2725
2725
  { no: 1, name: "items", kind: "message", repeat: 1, T: () => Ye },
@@ -2767,8 +2767,8 @@ class Di extends xe {
2767
2767
  return r !== !1 && (r == !0 ? J.onWrite : r)(this.typeName, e, t), t;
2768
2768
  }
2769
2769
  }
2770
- const Ri = new Di();
2771
- class Mi extends xe {
2770
+ const Mi = new Ri();
2771
+ class Vi extends xe {
2772
2772
  constructor() {
2773
2773
  super("com.hamropatro.grpc.cms.CreateFileRequest", [
2774
2774
  {
@@ -2799,7 +2799,7 @@ class Mi extends xe {
2799
2799
  T: 9
2800
2800
  /*ScalarType.STRING*/
2801
2801
  },
2802
- { no: 5, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", Cn] },
2802
+ { no: 5, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", En] },
2803
2803
  {
2804
2804
  no: 6,
2805
2805
  name: "extension",
@@ -2858,8 +2858,8 @@ class Mi extends xe {
2858
2858
  return r !== !1 && (r == !0 ? J.onWrite : r)(this.typeName, e, t), t;
2859
2859
  }
2860
2860
  }
2861
- const Ir = new Mi();
2862
- class Vi extends xe {
2861
+ const Lr = new Vi();
2862
+ class Hi extends xe {
2863
2863
  constructor() {
2864
2864
  super("com.hamropatro.grpc.cms.CreateUserFileRequest", [
2865
2865
  {
@@ -2869,7 +2869,7 @@ class Vi extends xe {
2869
2869
  T: 9
2870
2870
  /*ScalarType.STRING*/
2871
2871
  },
2872
- { no: 2, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", Cn] },
2872
+ { no: 2, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", En] },
2873
2873
  {
2874
2874
  no: 3,
2875
2875
  name: "extension",
@@ -2916,8 +2916,8 @@ class Vi extends xe {
2916
2916
  return r !== !1 && (r == !0 ? J.onWrite : r)(this.typeName, e, t), t;
2917
2917
  }
2918
2918
  }
2919
- const Lr = new Vi();
2920
- class Hi extends xe {
2919
+ const Tr = new Hi();
2920
+ class $i extends xe {
2921
2921
  constructor() {
2922
2922
  super("com.hamropatro.grpc.cms.File", [
2923
2923
  {
@@ -2969,8 +2969,8 @@ class Hi extends xe {
2969
2969
  T: 9
2970
2970
  /*ScalarType.STRING*/
2971
2971
  },
2972
- { no: 8, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", Cn] },
2973
- { no: 9, name: "metadata", kind: "message", T: () => kn }
2972
+ { no: 8, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", En] },
2973
+ { no: 9, name: "metadata", kind: "message", T: () => Fn }
2974
2974
  ]);
2975
2975
  }
2976
2976
  create(e) {
@@ -3016,7 +3016,7 @@ class Hi extends xe {
3016
3016
  break;
3017
3017
  case /* com.hamropatro.grpc.cms.FileMetadata metadata */
3018
3018
  9:
3019
- i.metadata = kn.internalBinaryRead(e, e.uint32(), n, i.metadata);
3019
+ i.metadata = Fn.internalBinaryRead(e, e.uint32(), n, i.metadata);
3020
3020
  break;
3021
3021
  default:
3022
3022
  let h = n.readUnknownField;
@@ -3029,13 +3029,13 @@ class Hi extends xe {
3029
3029
  return i;
3030
3030
  }
3031
3031
  internalBinaryWrite(e, t, n) {
3032
- e.key !== "" && t.tag(1, j.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, j.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(3, j.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(4, j.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(5, j.LengthDelimited).string(e.url), e.thumborUrl !== "" && t.tag(6, j.LengthDelimited).string(e.thumborUrl), e.proxyUrl !== "" && t.tag(7, j.LengthDelimited).string(e.proxyUrl), e.type !== 0 && t.tag(8, j.Varint).int32(e.type), e.metadata && kn.internalBinaryWrite(e.metadata, t.tag(9, j.LengthDelimited).fork(), n).join();
3032
+ e.key !== "" && t.tag(1, j.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, j.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(3, j.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(4, j.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(5, j.LengthDelimited).string(e.url), e.thumborUrl !== "" && t.tag(6, j.LengthDelimited).string(e.thumborUrl), e.proxyUrl !== "" && t.tag(7, j.LengthDelimited).string(e.proxyUrl), e.type !== 0 && t.tag(8, j.Varint).int32(e.type), e.metadata && Fn.internalBinaryWrite(e.metadata, t.tag(9, j.LengthDelimited).fork(), n).join();
3033
3033
  let r = n.writeUnknownFields;
3034
3034
  return r !== !1 && (r == !0 ? J.onWrite : r)(this.typeName, e, t), t;
3035
3035
  }
3036
3036
  }
3037
- const Ye = new Hi();
3038
- class $i extends xe {
3037
+ const Ye = new $i();
3038
+ class Wi extends xe {
3039
3039
  constructor() {
3040
3040
  super("com.hamropatro.grpc.cms.FileMetadata", [
3041
3041
  {
@@ -3109,8 +3109,8 @@ class $i extends xe {
3109
3109
  return r !== !1 && (r == !0 ? J.onWrite : r)(this.typeName, e, t), t;
3110
3110
  }
3111
3111
  }
3112
- const kn = new $i();
3113
- class Wi extends xe {
3112
+ const Fn = new Wi();
3113
+ class Pi extends xe {
3114
3114
  constructor() {
3115
3115
  super("com.hamropatro.grpc.cms.DeleteFileRequest", [
3116
3116
  {
@@ -3151,8 +3151,8 @@ class Wi extends xe {
3151
3151
  return r !== !1 && (r == !0 ? J.onWrite : r)(this.typeName, e, t), t;
3152
3152
  }
3153
3153
  }
3154
- const Tr = new Wi();
3155
- class Pi extends xe {
3154
+ const xr = new Pi();
3155
+ class ji extends xe {
3156
3156
  constructor() {
3157
3157
  super("com.hamropatro.grpc.cms.DeleteFileResponse", [
3158
3158
  {
@@ -3193,8 +3193,8 @@ class Pi extends xe {
3193
3193
  return r !== !1 && (r == !0 ? J.onWrite : r)(this.typeName, e, t), t;
3194
3194
  }
3195
3195
  }
3196
- const ji = new Pi();
3197
- class Zi extends xe {
3196
+ const Zi = new ji();
3197
+ class qi extends xe {
3198
3198
  constructor() {
3199
3199
  super("com.hamropatro.grpc.cms.GetFilesByFolderRequest", [
3200
3200
  {
@@ -3257,8 +3257,8 @@ class Zi extends xe {
3257
3257
  return r !== !1 && (r == !0 ? J.onWrite : r)(this.typeName, e, t), t;
3258
3258
  }
3259
3259
  }
3260
- const xr = new Zi();
3261
- class qi extends xe {
3260
+ const _r = new qi();
3261
+ class Ki extends xe {
3262
3262
  constructor() {
3263
3263
  super("com.hamropatro.grpc.cms.GetFilesByFolderResponse", [
3264
3264
  { no: 1, name: "files", kind: "message", repeat: 1, T: () => Ye },
@@ -3317,19 +3317,19 @@ class qi extends xe {
3317
3317
  return r !== !1 && (r == !0 ? J.onWrite : r)(this.typeName, e, t), t;
3318
3318
  }
3319
3319
  }
3320
- const Ki = new qi(), Fn = new Vn("com.hamropatro.grpc.cms.FileService", [
3321
- { name: "createFile", options: {}, I: Ir, O: Ye },
3320
+ const zi = new Ki(), Nn = new Hn("com.hamropatro.grpc.cms.FileService", [
3321
+ { name: "createFile", options: {}, I: Lr, O: Ye },
3322
3322
  { name: "updateFile", options: {}, I: Ye, O: Ye },
3323
- { name: "deleteFile", options: {}, I: Tr, O: ji },
3324
- { name: "getFilesByFolder", options: {}, I: xr, O: Ki },
3325
- { name: "createUserFile", options: {}, I: Lr, O: Ye },
3326
- { name: "search", options: {}, I: Nr, O: Ri }
3323
+ { name: "deleteFile", options: {}, I: xr, O: Zi },
3324
+ { name: "getFilesByFolder", options: {}, I: _r, O: zi },
3325
+ { name: "createUserFile", options: {}, I: Tr, O: Ye },
3326
+ { name: "search", options: {}, I: Ir, O: Mi }
3327
3327
  ]);
3328
3328
  class Zt {
3329
3329
  constructor(e) {
3330
- he(this, "typeName", Fn.typeName);
3331
- he(this, "methods", Fn.methods);
3332
- he(this, "options", Fn.options);
3330
+ he(this, "typeName", Nn.typeName);
3331
+ he(this, "methods", Nn.methods);
3332
+ he(this, "options", Nn.options);
3333
3333
  this._transport = e;
3334
3334
  }
3335
3335
  /**
@@ -3377,10 +3377,10 @@ class Zt {
3377
3377
  return qe("unary", this._transport, n, r, e);
3378
3378
  }
3379
3379
  }
3380
- const zi = async (s, e, t, n, r, i) => {
3380
+ const Xi = 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 Zt(a), h = Ir.create();
3383
+ const a = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, c = new Zt(a), h = Lr.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
@@ -3388,10 +3388,10 @@ const zi = async (s, e, t, n, r, i) => {
3388
3388
  } catch (a) {
3389
3389
  throw a;
3390
3390
  }
3391
- }, Xi = async (s, e, t) => {
3391
+ }, Gi = async (s, e, t) => {
3392
3392
  var n;
3393
3393
  try {
3394
- const r = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, i = new Zt(r), o = Lr.create();
3394
+ const r = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, i = new Zt(r), o = Tr.create();
3395
3395
  return o.url = s, o.type = e, await i.createUserFile(
3396
3396
  o,
3397
3397
  t
@@ -3399,10 +3399,10 @@ const zi = async (s, e, t, n, r, i) => {
3399
3399
  } catch (r) {
3400
3400
  throw r;
3401
3401
  }
3402
- }, Gi = async (s, e, t, n) => {
3402
+ }, Ji = async (s, e, t, n) => {
3403
3403
  var r;
3404
3404
  try {
3405
- const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Zt(i), a = xr.create();
3405
+ const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Zt(i), a = _r.create();
3406
3406
  return a.folderName = s, a.cursor = e, a.limit = t, await o.getFilesByFolder(
3407
3407
  a,
3408
3408
  n
@@ -3410,10 +3410,10 @@ const zi = async (s, e, t, n, r, i) => {
3410
3410
  } catch (i) {
3411
3411
  throw i;
3412
3412
  }
3413
- }, Ji = async (s, e, t = 20, n) => {
3413
+ }, Qi = async (s, e, t = 20, n) => {
3414
3414
  var r;
3415
3415
  try {
3416
- const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Zt(i), a = Nr.create();
3416
+ const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Zt(i), a = Ir.create();
3417
3417
  return a.searchValue = s, a.cursor = e, a.limit = t, await o.search(
3418
3418
  a,
3419
3419
  n
@@ -3421,7 +3421,7 @@ const zi = async (s, e, t, n, r, i) => {
3421
3421
  } catch (i) {
3422
3422
  throw i;
3423
3423
  }
3424
- }, Qi = async (s, e, t, n, r, i, o, a, c) => {
3424
+ }, Yi = async (s, e, t, n, r, i, o, a, c) => {
3425
3425
  var h;
3426
3426
  try {
3427
3427
  const l = (h = window.ImageSalonSDK) == null ? void 0 : h.grpcConfig, u = new Zt(l), d = Ye.create();
@@ -3432,10 +3432,10 @@ const zi = async (s, e, t, n, r, i) => {
3432
3432
  } catch (l) {
3433
3433
  throw l;
3434
3434
  }
3435
- }, Yi = async (s, e) => {
3435
+ }, es = async (s, e) => {
3436
3436
  var t;
3437
3437
  try {
3438
- const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new Zt(n), i = Tr.create();
3438
+ const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new Zt(n), i = xr.create();
3439
3439
  return i.key = s, await r.deleteFile(
3440
3440
  i,
3441
3441
  e
@@ -3444,7 +3444,7 @@ const zi = async (s, e, t, n, r, i) => {
3444
3444
  throw n;
3445
3445
  }
3446
3446
  };
3447
- class es extends xe {
3447
+ class ts extends xe {
3448
3448
  constructor() {
3449
3449
  super("com.hamropatro.grpc.cms.DeleteFolderRequest", [
3450
3450
  {
@@ -3485,8 +3485,8 @@ class es extends xe {
3485
3485
  return r !== !1 && (r == !0 ? J.onWrite : r)(this.typeName, e, t), t;
3486
3486
  }
3487
3487
  }
3488
- const _r = new es();
3489
- class ts extends xe {
3488
+ const Ur = new ts();
3489
+ class ns extends xe {
3490
3490
  constructor() {
3491
3491
  super("com.hamropatro.grpc.cms.CreateFolderRequest", [
3492
3492
  {
@@ -3549,8 +3549,8 @@ class ts extends xe {
3549
3549
  return r !== !1 && (r == !0 ? J.onWrite : r)(this.typeName, e, t), t;
3550
3550
  }
3551
3551
  }
3552
- const Ur = new ts();
3553
- class ns extends xe {
3552
+ const Br = new ns();
3553
+ class rs extends xe {
3554
3554
  constructor() {
3555
3555
  super("com.hamropatro.grpc.cms.GetAllFoldersRequest", [
3556
3556
  {
@@ -3602,8 +3602,8 @@ class ns extends xe {
3602
3602
  return r !== !1 && (r == !0 ? J.onWrite : r)(this.typeName, e, t), t;
3603
3603
  }
3604
3604
  }
3605
- const Br = new ns();
3606
- class rs extends xe {
3605
+ const Or = new rs();
3606
+ class is extends xe {
3607
3607
  constructor() {
3608
3608
  super("com.hamropatro.grpc.cms.GetAllFoldersResponse", [
3609
3609
  { no: 1, name: "folder", kind: "message", repeat: 1, T: () => Tt },
@@ -3662,8 +3662,8 @@ class rs extends xe {
3662
3662
  return r !== !1 && (r == !0 ? J.onWrite : r)(this.typeName, e, t), t;
3663
3663
  }
3664
3664
  }
3665
- const is = new rs();
3666
- class ss extends xe {
3665
+ const ss = new is();
3666
+ class os extends xe {
3667
3667
  constructor() {
3668
3668
  super("com.hamropatro.grpc.cms.Folder", [
3669
3669
  {
@@ -3737,17 +3737,17 @@ class ss extends xe {
3737
3737
  return r !== !1 && (r == !0 ? J.onWrite : r)(this.typeName, e, t), t;
3738
3738
  }
3739
3739
  }
3740
- const Tt = new ss(), Nn = new Vn("com.hamropatro.grpc.cms.FolderService", [
3741
- { name: "createFolder", options: {}, I: Ur, O: Tt },
3742
- { name: "getFolders", options: {}, I: Br, O: is },
3740
+ const Tt = new os(), In = new Hn("com.hamropatro.grpc.cms.FolderService", [
3741
+ { name: "createFolder", options: {}, I: Br, O: Tt },
3742
+ { name: "getFolders", options: {}, I: Or, O: ss },
3743
3743
  { name: "updateFolder", options: {}, I: Tt, O: Tt },
3744
- { name: "deleteFolder", options: {}, I: _r, O: Tt }
3744
+ { name: "deleteFolder", options: {}, I: Ur, O: Tt }
3745
3745
  ]);
3746
- class En {
3746
+ class An {
3747
3747
  constructor(e) {
3748
- he(this, "typeName", Nn.typeName);
3749
- he(this, "methods", Nn.methods);
3750
- he(this, "options", Nn.options);
3748
+ he(this, "typeName", In.typeName);
3749
+ he(this, "methods", In.methods);
3750
+ he(this, "options", In.options);
3751
3751
  this._transport = e;
3752
3752
  }
3753
3753
  /**
@@ -3779,9 +3779,9 @@ class En {
3779
3779
  return qe("unary", this._transport, n, r, e);
3780
3780
  }
3781
3781
  }
3782
- const os = async (s, e = 20, t) => {
3782
+ const as = async (s, e = 20, t) => {
3783
3783
  var o;
3784
- const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new En(n), i = Br.create();
3784
+ const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new An(n), i = Or.create();
3785
3785
  try {
3786
3786
  return i.cursor = s, i.limit = e, await r.getFolders(
3787
3787
  i,
@@ -3790,10 +3790,10 @@ const os = async (s, e = 20, t) => {
3790
3790
  } catch (a) {
3791
3791
  throw a;
3792
3792
  }
3793
- }, as = async (s, e, t, n) => {
3793
+ }, ls = async (s, e, t, n) => {
3794
3794
  var r;
3795
3795
  try {
3796
- const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new En(i), a = Ur.create();
3796
+ const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new An(i), a = Br.create();
3797
3797
  return a.name = s, a.nestedFolderName = e, a.createdBy = t, await o.createFolder(
3798
3798
  a,
3799
3799
  n
@@ -3801,10 +3801,10 @@ const os = async (s, e = 20, t) => {
3801
3801
  } catch (i) {
3802
3802
  throw i;
3803
3803
  }
3804
- }, ls = async (s, e, t, n, r) => {
3804
+ }, cs = async (s, e, t, n, r) => {
3805
3805
  var i;
3806
3806
  try {
3807
- const o = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, a = new En(o), c = Tt.create();
3807
+ const o = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, a = new An(o), c = Tt.create();
3808
3808
  return c.name = e, c.key = s, c.nestedFolderName = t, c.createdBy = n, await a.updateFolder(
3809
3809
  c,
3810
3810
  r
@@ -3812,10 +3812,10 @@ const os = async (s, e = 20, t) => {
3812
3812
  } catch (o) {
3813
3813
  throw o;
3814
3814
  }
3815
- }, cs = async (s, e) => {
3815
+ }, ds = async (s, e) => {
3816
3816
  var t;
3817
3817
  try {
3818
- const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new En(n), i = _r.create();
3818
+ const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new An(n), i = Ur.create();
3819
3819
  return i.key = s, await r.deleteFolder(
3820
3820
  i,
3821
3821
  e
@@ -3823,7 +3823,7 @@ const os = async (s, e = 20, t) => {
3823
3823
  } catch (n) {
3824
3824
  throw n;
3825
3825
  }
3826
- }, In = (s, e, t) => {
3826
+ }, Ln = (s, e, t) => {
3827
3827
  const n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3828
3828
  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");
3829
3829
  const r = document.createElementNS(
@@ -3836,7 +3836,7 @@ const os = async (s, e = 20, t) => {
3836
3836
  const o = document.createElementNS("http://www.w3.org/2000/svg", "line");
3837
3837
  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;
3838
3838
  };
3839
- function rr() {
3839
+ function ir() {
3840
3840
  const s = document.createElementNS(
3841
3841
  "http://www.w3.org/2000/svg",
3842
3842
  "svg"
@@ -3848,7 +3848,7 @@ function rr() {
3848
3848
  "M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"
3849
3849
  ), s.appendChild(e), s;
3850
3850
  }
3851
- function ds() {
3851
+ function hs() {
3852
3852
  const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3853
3853
  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");
3854
3854
  const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
@@ -3866,7 +3866,7 @@ function ds() {
3866
3866
  );
3867
3867
  return r.setAttribute("cx", "18"), r.setAttribute("cy", "16"), r.setAttribute("r", "3"), s.appendChild(e), s.appendChild(t), s.appendChild(n), s.appendChild(r), document.body.appendChild(s), s;
3868
3868
  }
3869
- const ir = (s) => {
3869
+ const sr = (s) => {
3870
3870
  const e = document.createElementNS(
3871
3871
  "http://www.w3.org/2000/svg",
3872
3872
  "svg"
@@ -3877,7 +3877,7 @@ const ir = (s) => {
3877
3877
  const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
3878
3878
  return n.setAttribute("d", "m9 11 3 3L22 4"), e.appendChild(t), e.appendChild(n), e;
3879
3879
  };
3880
- function Dn(s = "#333") {
3880
+ function Rn(s = "#333") {
3881
3881
  const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3882
3882
  e.setAttribute("xmlns", "http://www.w3.org/2000/svg"), e.setAttribute("x", "0px"), e.setAttribute("y", "0px"), e.setAttribute("width", "18"), e.setAttribute("height", "18"), e.setAttribute("viewBox", "0 0 50 50"), e.setAttribute("fill", s);
3883
3883
  const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
@@ -3886,7 +3886,7 @@ function Dn(s = "#333") {
3886
3886
  "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"
3887
3887
  ), e.appendChild(t), e;
3888
3888
  }
3889
- function sr() {
3889
+ function or() {
3890
3890
  const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3891
3891
  s.setAttribute("xmlns", "http://www.w3.org/2000/svg"), s.setAttribute("width", "16"), s.setAttribute("height", "16"), s.setAttribute("viewBox", "0 0 24 24"), s.setAttribute("fill", "none"), s.setAttribute("stroke", "#2c96f8"), s.setAttribute("stroke-width", "2"), s.setAttribute("stroke-linecap", "round"), s.setAttribute("stroke-linejoin", "round"), s.classList.add("lucide", "lucide-pencil");
3892
3892
  const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
@@ -3911,7 +3911,7 @@ function Kt() {
3911
3911
  "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"
3912
3912
  ), s.appendChild(e), s.appendChild(t), s;
3913
3913
  }
3914
- function hs() {
3914
+ function us() {
3915
3915
  const s = "http://www.w3.org/2000/svg", e = document.createElementNS(s, "svg");
3916
3916
  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");
3917
3917
  const t = document.createElementNS(s, "rect");
@@ -3921,7 +3921,7 @@ function hs() {
3921
3921
  const r = document.createElementNS(s, "path");
3922
3922
  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;
3923
3923
  }
3924
- function us() {
3924
+ function fs() {
3925
3925
  const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3926
3926
  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");
3927
3927
  const e = document.createElementNS(
@@ -3933,13 +3933,13 @@ function us() {
3933
3933
  "m488-400-65 65 56 56 161-161-161-161-56 56 65 65H320v80h168ZM160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h240l80 80h320q33 0 56.5 23.5T880-640v400q0 33-23.5 56.5T800-160H160Zm0-80h640v-400H447l-80-80H160v480Zm0 0v-480 480Z"
3934
3934
  ), s.appendChild(e), s;
3935
3935
  }
3936
- function or() {
3936
+ function ar() {
3937
3937
  const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3938
3938
  s.setAttribute("xmlns", "http://www.w3.org/2000/svg"), s.setAttribute("fill", "none"), s.setAttribute("width", "20"), s.setAttribute("height", "20"), s.setAttribute("viewBox", "0 0 24 24"), s.setAttribute("stroke-width", "1.5"), s.setAttribute("stroke", "currentColor"), s.setAttribute("class", "size-2");
3939
3939
  const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
3940
3940
  return e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("d", "M12 4.5v15m7.5-7.5h-15"), s.appendChild(e), s;
3941
3941
  }
3942
- function fs() {
3942
+ function ps() {
3943
3943
  const s = "http://www.w3.org/2000/svg", e = document.createElementNS(s, "svg");
3944
3944
  e.setAttribute("width", "16"), e.setAttribute("height", "16"), e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("fill", "none"), e.setAttribute("stroke", "currentColor"), e.setAttribute("stroke-width", "2"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.classList.add("lucide", "lucide-eye");
3945
3945
  const t = document.createElementNS(s, "path");
@@ -3950,7 +3950,7 @@ function fs() {
3950
3950
  const n = document.createElementNS(s, "circle");
3951
3951
  return n.setAttribute("cx", "12"), n.setAttribute("cy", "12"), n.setAttribute("r", "3"), e.appendChild(n), document.body.appendChild(e), e;
3952
3952
  }
3953
- function ps() {
3953
+ function ms() {
3954
3954
  const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3955
3955
  s.setAttribute("xmlns", "http://www.w3.org/2000/svg"), s.setAttribute("height", "24px"), s.setAttribute("width", "24px"), s.setAttribute("viewBox", "0 0 30 30"), s.setAttribute("fill", "#999");
3956
3956
  const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
@@ -3959,7 +3959,7 @@ function ps() {
3959
3959
  "M 13 3 C 7.4889971 3 3 7.4889971 3 13 C 3 18.511003 7.4889971 23 13 23 C 15.396508 23 17.597385 22.148986 19.322266 20.736328 L 25.292969 26.707031 A 1.0001 1.0001 0 1 0 26.707031 25.292969 L 20.736328 19.322266 C 22.148986 17.597385 23 15.396508 23 13 C 23 7.4889971 18.511003 3 13 3 z M 13 5 C 17.430123 5 21 8.5698774 21 13 C 21 17.430123 17.430123 21 13 21 C 8.5698774 21 5 17.430123 5 13 C 5 8.5698774 8.5698774 5 13 5 z"
3960
3960
  ), s.appendChild(e), s;
3961
3961
  }
3962
- function ar() {
3962
+ function lr() {
3963
3963
  const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3964
3964
  s.setAttribute("xmlns", "http://www.w3.org/2000/svg"), s.setAttribute("width", "16"), s.setAttribute("height", "16"), s.setAttribute("viewBox", "0 0 24 24"), s.setAttribute("fill", "none"), s.setAttribute("stroke", "#f14b4b"), s.setAttribute("stroke-width", "2"), s.setAttribute("stroke-linecap", "round"), s.setAttribute("stroke-linejoin", "round"), s.classList.add("lucide", "lucide-trash-2");
3965
3965
  const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
@@ -3973,7 +3973,7 @@ function ar() {
3973
3973
  const i = document.createElementNS("http://www.w3.org/2000/svg", "line");
3974
3974
  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;
3975
3975
  }
3976
- function Ln() {
3976
+ function Tn() {
3977
3977
  const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3978
3978
  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");
3979
3979
  const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
@@ -3986,7 +3986,7 @@ function Ln() {
3986
3986
  const n = document.createElementNS("http://www.w3.org/2000/svg", "line");
3987
3987
  return n.setAttribute("x1", "12"), n.setAttribute("x2", "12"), n.setAttribute("y1", "3"), n.setAttribute("y2", "15"), s.appendChild(e), s.appendChild(t), s.appendChild(n), s;
3988
3988
  }
3989
- function ms() {
3989
+ function gs() {
3990
3990
  const s = "http://www.w3.org/2000/svg", e = document.createElementNS(s, "svg");
3991
3991
  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-video");
3992
3992
  const t = document.createElementNS(s, "path");
@@ -4002,7 +4002,7 @@ function ee(s, e, t, n, r) {
4002
4002
  return e && (i.className += e), t && (i.style.cssText = t), n && (i.textContent = n), r && r.appendChild(i), i;
4003
4003
  }
4004
4004
  var ut, Xe, Vt;
4005
- class gs {
4005
+ class ws {
4006
4006
  constructor() {
4007
4007
  X(this, ut);
4008
4008
  X(this, Xe);
@@ -4024,8 +4024,8 @@ class gs {
4024
4024
  }
4025
4025
  }
4026
4026
  ut = new WeakMap(), Xe = new WeakMap(), Vt = new WeakMap();
4027
- const lr = new gs(), sn = document.body;
4028
- class Or {
4027
+ const cr = new ws(), on = document.body;
4028
+ class Sr {
4029
4029
  constructor() {
4030
4030
  he(this, "main");
4031
4031
  he(this, "dialogContainer");
@@ -4047,7 +4047,7 @@ class Or {
4047
4047
  "dialog-presentation",
4048
4048
  "",
4049
4049
  "",
4050
- sn
4050
+ on
4051
4051
  ), this.main.setAttribute("role", "presentation"), this.dialogContainer = ee(
4052
4052
  "div",
4053
4053
  "dialog-container",
@@ -4088,9 +4088,9 @@ class Or {
4088
4088
  "",
4089
4089
  this.dialogContent
4090
4090
  );
4091
- n.appendChild(Dn()), n.onclick = () => this.hide();
4091
+ n.appendChild(Rn()), n.onclick = () => this.hide();
4092
4092
  }
4093
- return e.header && this._setHeader(e), this._setBody(e), this._setFooter(e), this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", sn.style.overflow = "hidden", this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", sn.classList.add("dialog-visible"), new Promise((n) => {
4093
+ return e.header && this._setHeader(e), this._setBody(e), this._setFooter(e), this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", on.style.overflow = "hidden", this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", on.classList.add("dialog-visible"), new Promise((n) => {
4094
4094
  const r = (i) => () => {
4095
4095
  this.hide(), n(i === "confirm");
4096
4096
  };
@@ -4142,16 +4142,16 @@ class Or {
4142
4142
  }, 150);
4143
4143
  }
4144
4144
  hide() {
4145
- this.main || sn.style.removeProperty("overflow"), this.dialog.style.transform = "scale(0.8)", this.dialog.style.transition = "transform 150ms ease-out", this.dialogBackdrop.style.opacity = "0", setTimeout(() => {
4145
+ this.main || on.style.removeProperty("overflow"), this.dialog.style.transform = "scale(0.8)", this.dialog.style.transition = "transform 150ms ease-out", this.dialogBackdrop.style.opacity = "0", setTimeout(() => {
4146
4146
  this.dialogContainer.style.opacity = "0", this.dialog.style.opacity = "0", this.dialogContent.style.opacity = "0", this.main.remove();
4147
4147
  }, 150);
4148
4148
  }
4149
4149
  updateUploadBtn(e) {
4150
- e ? (lr.show(this.confirmButton), this.confirmButton.disabled = !0) : (lr.hide(), this.confirmButton.disabled = !1);
4150
+ e ? (cr.show(this.confirmButton), this.confirmButton.disabled = !0) : (cr.hide(), this.confirmButton.disabled = !1);
4151
4151
  }
4152
4152
  }
4153
- const on = new Or(), ye = new Or();
4154
- class ws {
4153
+ const an = new Sr(), ye = new Sr();
4154
+ class ys {
4155
4155
  constructor() {
4156
4156
  he(this, "main");
4157
4157
  he(this, "dialogBody");
@@ -4164,7 +4164,7 @@ class ws {
4164
4164
  this.main.remove();
4165
4165
  }
4166
4166
  }
4167
- const je = new ws();
4167
+ const je = new ys();
4168
4168
  var ct = /* @__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))(ct || {});
4169
4169
  const Xt = {
4170
4170
  0: "IMAGE",
@@ -4173,7 +4173,7 @@ const Xt = {
4173
4173
  3: "ALL",
4174
4174
  4: "FOLDER"
4175
4175
  };
4176
- function cr(s) {
4176
+ function dr(s) {
4177
4177
  switch (s) {
4178
4178
  case "image":
4179
4179
  return Xt[ct.IMAGE];
@@ -4185,7 +4185,7 @@ function cr(s) {
4185
4185
  return Xt[ct.ALL];
4186
4186
  }
4187
4187
  }
4188
- function ys(s) {
4188
+ function bs(s) {
4189
4189
  const e = {};
4190
4190
  s.forEach((r) => {
4191
4191
  e[r.key] = { ...r, children: {} };
@@ -4197,7 +4197,7 @@ function ys(s) {
4197
4197
  }), r);
4198
4198
  return s.reduce((r, i) => (i.nestedFolderName || r.push(t(e[i.key])), r), []);
4199
4199
  }
4200
- function bs(s, e) {
4200
+ function Cs(s, e) {
4201
4201
  const t = (n) => {
4202
4202
  if (n.key === e.nestedFolderName)
4203
4203
  return n.children[e.key] = { ...e, children: {} }, !0;
@@ -4213,7 +4213,7 @@ function bs(s, e) {
4213
4213
  break;
4214
4214
  return s;
4215
4215
  }
4216
- const Cs = async (s, e) => {
4216
+ const Es = async (s, e) => {
4217
4217
  let t;
4218
4218
  try {
4219
4219
  s && (t = {
@@ -4239,15 +4239,15 @@ function ie(s, e) {
4239
4239
  const t = document.createElement("span");
4240
4240
  return e && (t.className = e), s && (t.textContent = s), t;
4241
4241
  }
4242
- function dr(s, e, t, n) {
4242
+ function hr(s, e, t, n) {
4243
4243
  const r = document.createElement("img");
4244
4244
  return e && (r.className = e), r.src = s, r;
4245
4245
  }
4246
- function Es(s, e, t) {
4246
+ function As(s, e, t) {
4247
4247
  const n = document.createElement("video"), r = document.createElement("source");
4248
4248
  return n.className = e, r.src = s, n.appendChild(r), n;
4249
4249
  }
4250
- function As(s, e, t) {
4250
+ function vs(s, e, t) {
4251
4251
  const n = document.createElement("audio"), r = document.createElement("source");
4252
4252
  return n.className = e, n.controls = !0, r.src = s, n.appendChild(r), n;
4253
4253
  }
@@ -4255,11 +4255,11 @@ function He(s, e, t, n, r) {
4255
4255
  const i = document.createElement("button");
4256
4256
  return e && (i.className = e), t && (i.id = t), s && (i.textContent = s), r && (i.innerHTML = r), i.disabled = n, i;
4257
4257
  }
4258
- function Tn(s, e, t) {
4258
+ function xn(s, e, t) {
4259
4259
  const n = document.createElement("input");
4260
4260
  return n.className = e, n.defaultValue = t, s && (n.type = s), n;
4261
4261
  }
4262
- class vs extends xe {
4262
+ class ks extends xe {
4263
4263
  constructor() {
4264
4264
  super("com.hamropatro.grpc.cms.ImageUploadRequest", [
4265
4265
  {
@@ -4300,8 +4300,8 @@ class vs extends xe {
4300
4300
  return r !== !1 && (r == !0 ? J.onWrite : r)(this.typeName, e, t), t;
4301
4301
  }
4302
4302
  }
4303
- const Rn = new vs();
4304
- class ks extends xe {
4303
+ const Mn = new ks();
4304
+ class Fs extends xe {
4305
4305
  constructor() {
4306
4306
  super("com.hamropatro.grpc.cms.ImageUploadResponse", [
4307
4307
  {
@@ -4353,15 +4353,15 @@ class ks extends xe {
4353
4353
  return r !== !1 && (r == !0 ? J.onWrite : r)(this.typeName, e, t), t;
4354
4354
  }
4355
4355
  }
4356
- const hr = new ks(), xn = new Vn("com.hamropatro.grpc.cms.ImageUploadService", [
4357
- { name: "Upload", options: {}, I: Rn, O: hr },
4358
- { name: "UploadUserImage", options: {}, I: Rn, O: hr }
4356
+ const ur = new Fs(), _n = new Hn("com.hamropatro.grpc.cms.ImageUploadService", [
4357
+ { name: "Upload", options: {}, I: Mn, O: ur },
4358
+ { name: "UploadUserImage", options: {}, I: Mn, O: ur }
4359
4359
  ]);
4360
- class Fs {
4360
+ class Ns {
4361
4361
  constructor(e) {
4362
- he(this, "typeName", xn.typeName);
4363
- he(this, "methods", xn.methods);
4364
- he(this, "options", xn.options);
4362
+ he(this, "typeName", _n.typeName);
4363
+ he(this, "methods", _n.methods);
4364
+ he(this, "options", _n.options);
4365
4365
  this._transport = e;
4366
4366
  }
4367
4367
  /**
@@ -4379,9 +4379,9 @@ class Fs {
4379
4379
  return qe("unary", this._transport, n, r, e);
4380
4380
  }
4381
4381
  }
4382
- const Ns = async (s, e, t = !0) => {
4382
+ const Is = async (s, e, t = !0) => {
4383
4383
  var o;
4384
- const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new Fs(n), i = Rn.create();
4384
+ const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new Ns(n), i = Mn.create();
4385
4385
  try {
4386
4386
  return i.mimeType = s, t ? await r.upload(i, e) : await r.uploadUserImage(
4387
4387
  i,
@@ -4391,7 +4391,7 @@ const Ns = async (s, e, t = !0) => {
4391
4391
  throw a;
4392
4392
  }
4393
4393
  };
4394
- function Is(s, e) {
4394
+ function Ls(s, e) {
4395
4395
  return e.forEach(function(t) {
4396
4396
  t && typeof t != "string" && !Array.isArray(t) && Object.keys(t).forEach(function(n) {
4397
4397
  if (n !== "default" && !(n in s)) {
@@ -4403,10 +4403,10 @@ function Is(s, e) {
4403
4403
  });
4404
4404
  }), Object.freeze(s);
4405
4405
  }
4406
- function Sr(s, e) {
4406
+ function Dr(s, e) {
4407
4407
  return new Promise(function(t, n) {
4408
4408
  let r;
4409
- return Ls(s).then(function(i) {
4409
+ return Ts(s).then(function(i) {
4410
4410
  try {
4411
4411
  return r = i, t(new Blob([e.slice(0, 2), r, e.slice(2)], { type: "image/jpeg" }));
4412
4412
  } catch (o) {
@@ -4415,7 +4415,7 @@ function Sr(s, e) {
4415
4415
  }, n);
4416
4416
  });
4417
4417
  }
4418
- const Ls = (s) => new Promise((e, t) => {
4418
+ const Ts = (s) => new Promise((e, t) => {
4419
4419
  const n = new FileReader();
4420
4420
  n.addEventListener("load", ({ target: { result: r } }) => {
4421
4421
  const i = new DataView(r);
@@ -4454,14 +4454,14 @@ const Ls = (s) => new Promise((e, t) => {
4454
4454
  return e(new Blob());
4455
4455
  }), n.readAsArrayBuffer(s);
4456
4456
  });
4457
- var un = {}, Ts = { get exports() {
4458
- return un;
4457
+ var fn = {}, xs = { get exports() {
4458
+ return fn;
4459
4459
  }, set exports(s) {
4460
- un = s;
4460
+ fn = s;
4461
4461
  } };
4462
4462
  (function(s) {
4463
4463
  var e, t, n = {};
4464
- Ts.exports = n, n.parse = function(r, i) {
4464
+ xs.exports = n, n.parse = function(r, i) {
4465
4465
  for (var o = n.bin.readUshort, a = n.bin.readUint, c = 0, h = {}, l = new Uint8Array(r), u = l.length - 4; a(l, u) != 101010256; ) u--;
4466
4466
  c = u, c += 4;
4467
4467
  var d = o(l, c += 4);
@@ -4872,7 +4872,7 @@ var un = {}, Ts = { get exports() {
4872
4872
  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);
4873
4873
  }();
4874
4874
  })();
4875
- var xs = Is({ __proto__: null, default: un }, [un]);
4875
+ var _s = Ls({ __proto__: null, default: fn }, [fn]);
4876
4876
  const ze = function() {
4877
4877
  var s = { nextZero(l, u) {
4878
4878
  for (; l[u] != 0; ) u++;
@@ -5388,17 +5388,17 @@ const ze = function() {
5388
5388
  var Re;
5389
5389
  let Ue = 0, Be = 0, Ke = ne, nt = pe, St = Ne ? 1 : 0;
5390
5390
  if (Y != 0) {
5391
- const en = Ie || Ne || Y == 1 || fe[Y - 2].dispose != 0 ? 1 : 2;
5391
+ const tn = Ie || Ne || Y == 1 || fe[Y - 2].dispose != 0 ? 1 : 2;
5392
5392
  let Dt = 0, ce = 1e9;
5393
- for (let Pe = 0; Pe < en; Pe++) {
5393
+ for (let Pe = 0; Pe < tn; Pe++) {
5394
5394
  var _e = new Uint8Array(le[Y - 1 - Pe]);
5395
5395
  const rt = new Uint32Array(le[Y - 1 - Pe]);
5396
5396
  let yt = ne, bt = pe, Rt = -1, qt = -1;
5397
5397
  for (let xt = 0; xt < pe; xt++) for (let _t = 0; _t < ne; _t++)
5398
5398
  Me[Ae = xt * ne + _t] != rt[Ae] && (_t < yt && (yt = _t), _t > Rt && (Rt = _t), xt < bt && (bt = xt), xt > qt && (qt = xt));
5399
5399
  Rt == -1 && (yt = bt = Rt = qt = 0), me && ((1 & yt) == 1 && yt--, (1 & bt) == 1 && bt--);
5400
- const Wn = (Rt - yt + 1) * (qt - bt + 1);
5401
- Wn < ce && (ce = Wn, Dt = Pe, Ue = yt, Be = bt, Ke = Rt - yt + 1, nt = qt - bt + 1);
5400
+ const Pn = (Rt - yt + 1) * (qt - bt + 1);
5401
+ Pn < ce && (ce = Pn, Dt = Pe, Ue = yt, Be = bt, Ke = Rt - yt + 1, nt = qt - bt + 1);
5402
5402
  }
5403
5403
  _e = new Uint8Array(le[Y - 1 - Dt]), Dt == 1 && (fe[Y - 1].dispose = 2), Re = new Uint8Array(Ke * nt * 4), s(_e, ne, pe, Re, Ke, nt, -Ue, -Be, 0), St = s(Le, ne, pe, Re, Ke, nt, -Ue, -Be, 3) ? 1 : 0, St == 1 ? d(Le, ne, pe, Re, { x: Ue, y: Be, width: Ke, height: nt }) : s(Le, ne, pe, Re, Ke, nt, -Ue, -Be, 0);
5404
5404
  } else Re = Le.slice(0);
@@ -5510,7 +5510,7 @@ const ze = function() {
5510
5510
  const U = [];
5511
5511
  let w, p = [0, 1, 2, 3, 4];
5512
5512
  T != -1 ? p = [T] : (g * N > 5e5 || A == 1) && (p = [0]), E && (w = { level: 0 });
5513
- const M = xs;
5513
+ const M = _s;
5514
5514
  for (var _ = 0; _ < p.length; _++) {
5515
5515
  for (let W = 0; W < g; W++) y(k, m, W, N, A, p[_]);
5516
5516
  U.push(M.deflate(k, w));
@@ -5637,7 +5637,7 @@ const ze = function() {
5637
5637
  return h(p, 0, !0), c(p, A, N, U, w);
5638
5638
  }, ze.encode.compress = l, ze.encode.dither = a, ze.quantize = I, ze.quantize.getKDtree = L, ze.quantize.getNearest = C;
5639
5639
  })();
5640
- const Dr = { toArrayBuffer(s, e) {
5640
+ const Rr = { toArrayBuffer(s, e) {
5641
5641
  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;
5642
5642
  let f, y, I, L, C = d, R = 0, O = 0, v = 0;
5643
5643
  function x(m) {
@@ -5654,16 +5654,16 @@ const Dr = { toArrayBuffer(s, e) {
5654
5654
  for (L = 122 + R * a, f = 0; f < r; ) C--, y = o[v++], I = y >>> 24, u.setUint32(L + f, y << 8 | I), f += 4;
5655
5655
  R++;
5656
5656
  }
5657
- v < o.length ? (C = d, setTimeout(m, Dr._dly)) : e(l);
5657
+ v < o.length ? (C = d, setTimeout(m, Rr._dly)) : e(l);
5658
5658
  }();
5659
5659
  }, toBlob(s, e) {
5660
5660
  this.toArrayBuffer(s, (t) => {
5661
5661
  e(new Blob([t], { type: "image/bmp" }));
5662
5662
  });
5663
5663
  }, _dly: 9 };
5664
- var Ve = { CHROME: "CHROME", FIREFOX: "FIREFOX", DESKTOP_SAFARI: "DESKTOP_SAFARI", IE: "IE", IOS: "IOS", ETC: "ETC" }, _s = { [Ve.CHROME]: 16384, [Ve.FIREFOX]: 11180, [Ve.DESKTOP_SAFARI]: 16384, [Ve.IE]: 8192, [Ve.IOS]: 4096, [Ve.ETC]: 8192 };
5665
- const Hn = typeof window < "u", Rr = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope, fn = Hn && window.cordova && window.cordova.require && window.cordova.require("cordova/modulemapper"), Us = (Hn || Rr) && (fn && fn.getOriginalSymbol(window, "File") || typeof File < "u" && File), Mr = (Hn || Rr) && (fn && fn.getOriginalSymbol(window, "FileReader") || typeof FileReader < "u" && FileReader);
5666
- function $n(s, e, t = Date.now()) {
5664
+ var Ve = { CHROME: "CHROME", FIREFOX: "FIREFOX", DESKTOP_SAFARI: "DESKTOP_SAFARI", IE: "IE", IOS: "IOS", ETC: "ETC" }, Us = { [Ve.CHROME]: 16384, [Ve.FIREFOX]: 11180, [Ve.DESKTOP_SAFARI]: 16384, [Ve.IE]: 8192, [Ve.IOS]: 4096, [Ve.ETC]: 8192 };
5665
+ const $n = typeof window < "u", Mr = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope, pn = $n && window.cordova && window.cordova.require && window.cordova.require("cordova/modulemapper"), Bs = ($n || Mr) && (pn && pn.getOriginalSymbol(window, "File") || typeof File < "u" && File), Vr = ($n || Mr) && (pn && pn.getOriginalSymbol(window, "FileReader") || typeof FileReader < "u" && FileReader);
5666
+ function Wn(s, e, t = Date.now()) {
5667
5667
  return new Promise((n) => {
5668
5668
  const r = s.split(","), i = r[0].match(/:(.*?);/)[1], o = globalThis.atob(r[1]);
5669
5669
  let a = o.length;
@@ -5673,13 +5673,13 @@ function $n(s, e, t = Date.now()) {
5673
5673
  h.name = e, h.lastModified = t, n(h);
5674
5674
  });
5675
5675
  }
5676
- function Vr(s) {
5676
+ function Hr(s) {
5677
5677
  return new Promise((e, t) => {
5678
- const n = new Mr();
5678
+ const n = new Vr();
5679
5679
  n.onload = () => e(n.result), n.onerror = (r) => t(r), n.readAsDataURL(s);
5680
5680
  });
5681
5681
  }
5682
- function Hr(s) {
5682
+ function $r(s) {
5683
5683
  return new Promise((e, t) => {
5684
5684
  const n = new Image();
5685
5685
  n.onload = () => e(n), n.onerror = (r) => t(r), n.src = s;
@@ -5691,8 +5691,8 @@ function Ut() {
5691
5691
  const { userAgent: e } = navigator;
5692
5692
  return /Chrom(e|ium)/i.test(e) ? s = Ve.CHROME : /iP(ad|od|hone)/i.test(e) && /WebKit/i.test(e) ? s = Ve.IOS : /Safari/i.test(e) ? s = Ve.DESKTOP_SAFARI : /Firefox/i.test(e) ? s = Ve.FIREFOX : (/MSIE/i.test(e) || document.documentMode) && (s = Ve.IE), Ut.cachedResult = s, Ut.cachedResult;
5693
5693
  }
5694
- function $r(s, e) {
5695
- const t = Ut(), n = _s[t];
5694
+ function Wr(s, e) {
5695
+ const t = Ut(), n = Us[t];
5696
5696
  let r = s, i = e, o = r * i;
5697
5697
  const a = r > i ? i / r : r / i;
5698
5698
  for (; o > n * n; ) {
@@ -5701,7 +5701,7 @@ function $r(s, e) {
5701
5701
  }
5702
5702
  return { width: r, height: i };
5703
5703
  }
5704
- function An(s, e) {
5704
+ function vn(s, e) {
5705
5705
  let t, n;
5706
5706
  try {
5707
5707
  if (t = new OffscreenCanvas(s, e), n = t.getContext("2d"), n === null) throw new Error("getContext of OffscreenCanvas returns null");
@@ -5710,19 +5710,19 @@ function An(s, e) {
5710
5710
  }
5711
5711
  return t.width = s, t.height = e, [t, n];
5712
5712
  }
5713
- function Wr(s, e) {
5714
- const { width: t, height: n } = $r(s.width, s.height), [r, i] = An(t, n);
5713
+ function Pr(s, e) {
5714
+ const { width: t, height: n } = Wr(s.width, s.height), [r, i] = vn(t, n);
5715
5715
  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;
5716
5716
  }
5717
- function ln() {
5718
- return ln.cachedResult !== void 0 || (ln.cachedResult = ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && typeof document < "u" && "ontouchend" in document), ln.cachedResult;
5717
+ function cn() {
5718
+ return cn.cachedResult !== void 0 || (cn.cachedResult = ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && typeof document < "u" && "ontouchend" in document), cn.cachedResult;
5719
5719
  }
5720
- function pn(s, e = {}) {
5720
+ function mn(s, e = {}) {
5721
5721
  return new Promise(function(t, n) {
5722
5722
  let r, i;
5723
5723
  var o = function() {
5724
5724
  try {
5725
- return i = Wr(r, e.fileType || s.type), t([r, i]);
5725
+ return i = Pr(r, e.fileType || s.type), t([r, i]);
5726
5726
  } catch (c) {
5727
5727
  return n(c);
5728
5728
  }
@@ -5737,9 +5737,9 @@ function pn(s, e = {}) {
5737
5737
  };
5738
5738
  try {
5739
5739
  let l;
5740
- return Vr(s).then(function(u) {
5740
+ return Hr(s).then(function(u) {
5741
5741
  try {
5742
- return l = u, Hr(l).then(function(d) {
5742
+ return l = u, $r(l).then(function(d) {
5743
5743
  try {
5744
5744
  return r = d, function() {
5745
5745
  try {
@@ -5764,7 +5764,7 @@ function pn(s, e = {}) {
5764
5764
  }
5765
5765
  };
5766
5766
  try {
5767
- if (ln() || [Ve.DESKTOP_SAFARI, Ve.MOBILE_SAFARI].includes(Ut())) throw new Error("Skip createImageBitmap on IOS and Safari");
5767
+ if (cn() || [Ve.DESKTOP_SAFARI, Ve.MOBILE_SAFARI].includes(Ut())) throw new Error("Skip createImageBitmap on IOS and Safari");
5768
5768
  return createImageBitmap(s).then(function(c) {
5769
5769
  try {
5770
5770
  return r = c, o();
@@ -5777,7 +5777,7 @@ function pn(s, e = {}) {
5777
5777
  }
5778
5778
  });
5779
5779
  }
5780
- function mn(s, e, t, n, r = 1) {
5780
+ function gn(s, e, t, n, r = 1) {
5781
5781
  return new Promise(function(i, o) {
5782
5782
  let a;
5783
5783
  if (e === "image/png") {
@@ -5788,7 +5788,7 @@ function mn(s, e, t, n, r = 1) {
5788
5788
  let h = function() {
5789
5789
  return c.call(this);
5790
5790
  };
5791
- if (e === "image/bmp") return new Promise((l) => Dr.toBlob(s, l)).then((function(l) {
5791
+ if (e === "image/bmp") return new Promise((l) => Rr.toBlob(s, l)).then((function(l) {
5792
5792
  try {
5793
5793
  return a = l, a.name = t, a.lastModified = n, h.call(this);
5794
5794
  } catch (u) {
@@ -5808,7 +5808,7 @@ function mn(s, e, t, n, r = 1) {
5808
5808
  }).bind(this), o);
5809
5809
  {
5810
5810
  let u;
5811
- return u = s.toDataURL(e, r), $n(u, t, n).then((function(d) {
5811
+ return u = s.toDataURL(e, r), Wn(u, t, n).then((function(d) {
5812
5812
  try {
5813
5813
  return a = d, l.call(this);
5814
5814
  } catch (f) {
@@ -5829,13 +5829,13 @@ function lt(s) {
5829
5829
  function Mt() {
5830
5830
  return new Promise(function(s, e) {
5831
5831
  let t, n, r, i;
5832
- return Mt.cachedResult !== void 0 ? s(Mt.cachedResult) : $n("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==", "test.jpg", Date.now()).then(function(o) {
5832
+ return Mt.cachedResult !== void 0 ? s(Mt.cachedResult) : Wn("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==", "test.jpg", Date.now()).then(function(o) {
5833
5833
  try {
5834
- return t = o, pn(t).then(function(a) {
5834
+ return t = o, mn(t).then(function(a) {
5835
5835
  try {
5836
- return n = a[1], mn(n, t.type, t.name, t.lastModified).then(function(c) {
5836
+ return n = a[1], gn(n, t.type, t.name, t.lastModified).then(function(c) {
5837
5837
  try {
5838
- return r = c, lt(n), pn(r).then(function(h) {
5838
+ return r = c, lt(n), mn(r).then(function(h) {
5839
5839
  try {
5840
5840
  return i = h[0], Mt.cachedResult = i.width === 1 && i.height === 2, s(Mt.cachedResult);
5841
5841
  } catch (l) {
@@ -5856,9 +5856,9 @@ function Mt() {
5856
5856
  }, e);
5857
5857
  });
5858
5858
  }
5859
- function Pr(s) {
5859
+ function jr(s) {
5860
5860
  return new Promise((e, t) => {
5861
- const n = new Mr();
5861
+ const n = new Vr();
5862
5862
  n.onload = (r) => {
5863
5863
  const i = new DataView(r.target.result);
5864
5864
  if (i.getUint16(0, !1) != 65496) return e(-2);
@@ -5883,13 +5883,13 @@ function Pr(s) {
5883
5883
  }, n.onerror = (r) => t(r), n.readAsArrayBuffer(s);
5884
5884
  });
5885
5885
  }
5886
- function jr(s, e) {
5886
+ function Zr(s, e) {
5887
5887
  const { width: t } = s, { height: n } = s, { maxWidthOrHeight: r } = e;
5888
5888
  let i, o = s;
5889
- return isFinite(r) && (t > r || n > r) && ([o, i] = An(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), lt(s)), o;
5889
+ return isFinite(r) && (t > r || n > r) && ([o, i] = vn(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), lt(s)), o;
5890
5890
  }
5891
- function Zr(s, e) {
5892
- const { width: t } = s, { height: n } = s, [r, i] = An(t, n);
5891
+ function qr(s, e) {
5892
+ const { width: t } = s, { height: n } = s, [r, i] = vn(t, n);
5893
5893
  switch (e > 4 && e < 9 ? (r.width = n, r.height = t) : (r.width = t, r.height = n), e) {
5894
5894
  case 2:
5895
5895
  i.transform(-1, 0, 0, 1, t, 0);
@@ -5914,7 +5914,7 @@ function Zr(s, e) {
5914
5914
  }
5915
5915
  return i.drawImage(s, 0, 0, t, n), lt(s), r;
5916
5916
  }
5917
- function ur(s, e, t = 0) {
5917
+ function fr(s, e, t = 0) {
5918
5918
  return new Promise(function(n, r) {
5919
5919
  let i, o, a, c, h, l, u, d, f, y, I, L, C, R, O, v, x, b, B, m;
5920
5920
  function g(N = 5) {
@@ -5925,11 +5925,11 @@ function ur(s, e, t = 0) {
5925
5925
  if (e.signal && e.signal.aborted) throw e.signal.reason;
5926
5926
  i = Math.min(Math.max(N, i), 100), e.onProgress(i);
5927
5927
  }
5928
- return i = t, o = e.maxIteration || 10, a = 1024 * e.maxSizeMB * 1024, g(), pn(s, e).then((function(N) {
5928
+ return i = t, o = e.maxIteration || 10, a = 1024 * e.maxSizeMB * 1024, g(), mn(s, e).then((function(N) {
5929
5929
  try {
5930
- return [, c] = N, g(), h = jr(c, e), g(), new Promise(function(k, T) {
5930
+ return [, c] = N, g(), h = Zr(c, e), g(), new Promise(function(k, T) {
5931
5931
  var E;
5932
- if (!(E = e.exifOrientation)) return Pr(s).then((function(w) {
5932
+ if (!(E = e.exifOrientation)) return jr(s).then((function(w) {
5933
5933
  try {
5934
5934
  return E = w, U.call(this);
5935
5935
  } catch (p) {
@@ -5944,13 +5944,13 @@ function ur(s, e, t = 0) {
5944
5944
  try {
5945
5945
  return l = k, g(), Mt().then((function(T) {
5946
5946
  try {
5947
- return u = T ? h : Zr(h, l), g(), d = e.initialQuality || 1, f = e.fileType || s.type, mn(u, f, s.name, s.lastModified, d).then((function(E) {
5947
+ return u = T ? h : qr(h, l), g(), d = e.initialQuality || 1, f = e.fileType || s.type, gn(u, f, s.name, s.lastModified, d).then((function(E) {
5948
5948
  try {
5949
5949
  {
5950
5950
  let w = function() {
5951
5951
  if (o-- && (O > a || O > C)) {
5952
5952
  let M, _;
5953
- return M = m ? 0.95 * B.width : B.width, _ = m ? 0.95 * B.height : B.height, [x, b] = An(M, _), b.drawImage(B, 0, 0, M, _), d *= f === "image/png" ? 0.85 : 0.95, mn(x, f, s.name, s.lastModified, d).then(function(V) {
5953
+ return M = m ? 0.95 * B.width : B.width, _ = m ? 0.95 * B.height : B.height, [x, b] = vn(M, _), b.drawImage(B, 0, 0, M, _), d *= f === "image/png" ? 0.85 : 0.95, gn(x, f, s.name, s.lastModified, d).then(function(V) {
5954
5954
  try {
5955
5955
  return v = V, lt(B), B = x, O = v.size, A(Math.min(99, Math.floor((R - O) / (R - a) * 100))), w;
5956
5956
  } catch (q) {
@@ -5996,7 +5996,7 @@ function ur(s, e, t = 0) {
5996
5996
  }).bind(this), r);
5997
5997
  });
5998
5998
  }
5999
- const Bs = `
5999
+ const Os = `
6000
6000
  let scriptImported = false
6001
6001
  self.addEventListener('message', async (e) => {
6002
6002
  const { file, id, imageCompressionLibUrl, options } = e.data
@@ -6016,14 +6016,14 @@ self.addEventListener('message', async (e) => {
6016
6016
  }
6017
6017
  })
6018
6018
  `;
6019
- let _n;
6020
- function Os(s, e) {
6019
+ let Un;
6020
+ function Ss(s, e) {
6021
6021
  return new Promise((t, n) => {
6022
- _n || (_n = function(o) {
6022
+ Un || (Un = function(o) {
6023
6023
  const a = [];
6024
6024
  return a.push(o), URL.createObjectURL(new Blob(a));
6025
- }(Bs));
6026
- const r = new Worker(_n);
6025
+ }(Os));
6026
+ const r = new Worker(Un);
6027
6027
  r.addEventListener("message", function(o) {
6028
6028
  if (e.signal && e.signal.aborted) r.terminate();
6029
6029
  else if (o.data.progress === void 0) {
@@ -6040,9 +6040,9 @@ function Oe(s, e) {
6040
6040
  let r, i, o, a, c, h;
6041
6041
  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) => {
6042
6042
  o = f, typeof a == "function" && a(o);
6043
- }, !(s instanceof Blob || s instanceof Us)) return n(new Error("The file given is not an instance of Blob or File"));
6043
+ }, !(s instanceof Blob || s instanceof Bs)) return n(new Error("The file given is not an instance of Blob or File"));
6044
6044
  if (!/^image/.test(s.type)) return n(new Error("The file given is not an image"));
6045
- if (h = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope, !c || typeof Worker != "function" || h) return ur(s, r).then((function(f) {
6045
+ if (h = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope, !c || typeof Worker != "function" || h) return fr(s, r).then((function(f) {
6046
6046
  try {
6047
6047
  return i = f, d.call(this);
6048
6048
  } catch (y) {
@@ -6057,7 +6057,7 @@ function Oe(s, e) {
6057
6057
  }
6058
6058
  }).bind(this), u = function(f) {
6059
6059
  try {
6060
- return ur(s, r).then(function(y) {
6060
+ return fr(s, r).then(function(y) {
6061
6061
  try {
6062
6062
  return i = y, l();
6063
6063
  } catch (I) {
@@ -6069,7 +6069,7 @@ function Oe(s, e) {
6069
6069
  }
6070
6070
  };
6071
6071
  try {
6072
- return r.libURL = r.libURL || "https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js", Os(s, r).then(function(f) {
6072
+ return r.libURL = r.libURL || "https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js", Ss(s, r).then(function(f) {
6073
6073
  try {
6074
6074
  return i = f, l();
6075
6075
  } catch {
@@ -6085,17 +6085,17 @@ function Oe(s, e) {
6085
6085
  } catch {
6086
6086
  }
6087
6087
  try {
6088
- r.preserveExif && s.type === "image/jpeg" && (!r.fileType || r.fileType && r.fileType === s.type) && (i = Sr(s, i));
6088
+ r.preserveExif && s.type === "image/jpeg" && (!r.fileType || r.fileType && r.fileType === s.type) && (i = Dr(s, i));
6089
6089
  } catch {
6090
6090
  }
6091
6091
  return t(i);
6092
6092
  }
6093
6093
  });
6094
6094
  }
6095
- Oe.getDataUrlFromFile = Vr, Oe.getFilefromDataUrl = $n, Oe.loadImage = Hr, Oe.drawImageInCanvas = Wr, Oe.drawFileInCanvas = pn, Oe.canvasToFile = mn, Oe.getExifOrientation = Pr, Oe.handleMaxWidthOrHeight = jr, Oe.followExifOrientation = Zr, Oe.cleanupCanvasMemory = lt, Oe.isAutoOrientationInBrowser = Mt, Oe.approximateBelowMaximumCanvasSizeOfBrowser = $r, Oe.copyExifWithoutOrientation = Sr, Oe.getBrowserName = Ut, Oe.version = "2.0.2";
6096
- const fr = async (s, e, t, n = !0) => {
6095
+ Oe.getDataUrlFromFile = Hr, Oe.getFilefromDataUrl = Wn, Oe.loadImage = $r, Oe.drawImageInCanvas = Pr, Oe.drawFileInCanvas = mn, Oe.canvasToFile = gn, Oe.getExifOrientation = jr, Oe.handleMaxWidthOrHeight = Zr, Oe.followExifOrientation = qr, Oe.cleanupCanvasMemory = lt, Oe.isAutoOrientationInBrowser = Mt, Oe.approximateBelowMaximumCanvasSizeOfBrowser = Wr, Oe.copyExifWithoutOrientation = Dr, Oe.getBrowserName = Ut, Oe.version = "2.0.2";
6096
+ const pr = async (s, e, t, n = !0) => {
6097
6097
  try {
6098
- const r = Ss(s, e), o = (await Ns(e == null ? void 0 : e.type, t, n)).response.url;
6098
+ const r = Ds(s, e), o = (await Is(e == null ? void 0 : e.type, t, n)).response.url;
6099
6099
  return await fetch(o, {
6100
6100
  method: "PUT",
6101
6101
  headers: {
@@ -6107,7 +6107,7 @@ const fr = async (s, e, t, n = !0) => {
6107
6107
  } catch (r) {
6108
6108
  throw r;
6109
6109
  }
6110
- }, Ss = (s, e) => {
6110
+ }, Ds = (s, e) => {
6111
6111
  const t = e.type.split("/")[0];
6112
6112
  let n = "";
6113
6113
  t === "video" ? n = s == null ? void 0 : s.replace(/^data:video\/\w+;base64,/, "") : t === "image" ? n = s == null ? void 0 : s.replace(/^data:image\/\w+;base64,/, "") : t === "audio" && (n = s == null ? void 0 : s.replace(/^data:audio\/\w+;base64,/, ""));
@@ -6116,7 +6116,7 @@ const fr = async (s, e, t, n = !0) => {
6116
6116
  i[o] = r.charCodeAt(o);
6117
6117
  return i;
6118
6118
  };
6119
- async function pr(s) {
6119
+ async function mr(s) {
6120
6120
  const e = {
6121
6121
  maxSizeMB: 2,
6122
6122
  maxWidthOrHeight: 1920,
@@ -6128,8 +6128,8 @@ async function pr(s) {
6128
6128
  throw Error(t);
6129
6129
  }
6130
6130
  }
6131
- var Et, be, Ce, ft, ge, ke, it, $e, Bt, At, st, Ge, vt, Ht, kt, Ft, pt, Ot, ot, at, Nt, It, mt, $t, Jt, Se, gt, Qt, gn, Yt, Te, Wt, Lt, Pt, wn, yn, jt;
6132
- class Rs {
6131
+ var Et, be, Ce, ft, ge, ke, it, $e, Bt, At, st, Ge, vt, Ht, Jt, kt, Ft, pt, Ot, ot, at, Nt, It, mt, $t, Qt, Se, gt, Yt, wn, en, Te, Wt, Lt, Pt, yn, bn, jt;
6132
+ class Ms {
6133
6133
  constructor(e) {
6134
6134
  X(this, Et);
6135
6135
  X(this, be);
@@ -6145,6 +6145,7 @@ class Rs {
6145
6145
  X(this, Ge);
6146
6146
  X(this, vt);
6147
6147
  X(this, Ht);
6148
+ X(this, Jt);
6148
6149
  X(this, kt);
6149
6150
  X(this, Ft);
6150
6151
  X(this, pt);
@@ -6155,21 +6156,21 @@ class Rs {
6155
6156
  X(this, It);
6156
6157
  X(this, mt);
6157
6158
  X(this, $t);
6158
- X(this, Jt);
6159
+ X(this, Qt);
6159
6160
  X(this, Se);
6160
6161
  X(this, gt);
6161
- X(this, Qt, !1);
6162
- X(this, gn);
6163
- X(this, Yt);
6162
+ X(this, Yt, !1);
6163
+ X(this, wn);
6164
+ X(this, en);
6164
6165
  X(this, Te);
6165
6166
  X(this, Wt);
6166
6167
  X(this, Lt);
6167
6168
  X(this, Pt);
6168
- X(this, wn);
6169
6169
  X(this, yn);
6170
+ X(this, bn);
6170
6171
  X(this, jt);
6171
- $(this, Yt, e.isAdmin), $(this, it, !1), $(this, Ht, e.handleUpload.bind(this)), $(this, Jt, e.accessToken), $(this, Pt, e == null ? void 0 : e.mode), this._grpcOptionInitializer(), this._init(e).then(() => {
6172
- $(this, Qt, !0), this._renderView(e), this.updateWindowObject({ initialized: !0 }), this._initializeGrpcConfig(e.mode, e.endPoint);
6172
+ $(this, en, e.isAdmin), $(this, it, !1), $(this, Ht, e.handleUpload.bind(this)), $(this, Jt, e.handleCancel.bind(this)), $(this, Qt, e.accessToken), $(this, Pt, e == null ? void 0 : e.mode), this._grpcOptionInitializer(), this._init(e).then(() => {
6173
+ $(this, Yt, !0), this._renderView(e), this.updateWindowObject({ initialized: !0 }), this._initializeGrpcConfig(e.mode, e.endPoint);
6173
6174
  });
6174
6175
  }
6175
6176
  async _init(e) {
@@ -6184,10 +6185,10 @@ class Rs {
6184
6185
  return e.isAdmin === !0;
6185
6186
  }
6186
6187
  _renderView(e) {
6187
- return this._isAdminOptions(e) ? ($(this, $e, !1), $(this, Bt, !1), $(this, kt, 0), $(this, at, ""), $(this, mt, !1), $(this, Pt, e.mode), $(this, Nt, !1), $(this, Lt, ""), $(this, gt, null), this._removeToastContainer(), this._renderAdminView(e)) : ($(this, Wt, ""), $(this, wn, e.restrictedFileSize), $(this, yn, e == null ? void 0 : e.localizedFileRestrictedMessage), $(this, jt, e == null ? void 0 : e.localizedErrorMessage), this._removeUserToast(), this._renderUserView(e));
6188
+ return this._isAdminOptions(e) ? ($(this, $e, !1), $(this, Bt, !1), $(this, kt, 0), $(this, at, ""), $(this, mt, !1), $(this, Pt, e.mode), $(this, Nt, !1), $(this, Lt, ""), $(this, gt, null), this._removeToastContainer(), this._renderAdminView(e)) : ($(this, Wt, ""), $(this, yn, e.restrictedFileSize), $(this, bn, e == null ? void 0 : e.localizedFileRestrictedMessage), $(this, jt, e == null ? void 0 : e.localizedErrorMessage), this._removeUserToast(), this._renderUserView(e));
6188
6189
  }
6189
6190
  _renderAdminView(e) {
6190
- if (!F(this, Qt)) return;
6191
+ if (!F(this, Yt)) return;
6191
6192
  const { parentContainerId: t } = e;
6192
6193
  if (e.isAdmin === !0)
6193
6194
  var { buttonProps: n } = e;
@@ -6204,8 +6205,8 @@ class Rs {
6204
6205
  }), F(this, Et).appendChild(r);
6205
6206
  }
6206
6207
  async _grpcOptionInitializer() {
6207
- $(this, Se, await Cs(
6208
- F(this, Jt),
6208
+ $(this, Se, await Es(
6209
+ F(this, Qt),
6209
6210
  F(this, Pt)
6210
6211
  ));
6211
6212
  }
@@ -6223,20 +6224,20 @@ class Rs {
6223
6224
  !1,
6224
6225
  '<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>'
6225
6226
  ).addEventListener("click", () => {
6226
- on.hide(), $(this, ge, []), $(this, ke, []);
6227
+ an.hide(), $(this, ge, []), $(this, ke, []);
6227
6228
  }), $(this, be, K("browse-container"));
6228
6229
  const n = K();
6229
6230
  n.style.display = "flex", n.style.alignItems = "center", n.style.justifyContent = "space-between", n.style.padding = "10px 20px";
6230
6231
  const r = zt("Folders", "folder-title"), i = He("", "add-folder-btn");
6231
- i.append(or()), this._createUpdateFolderDialog(i, "create"), n.append(r, i), F(this, Ft).append(n, F(this, pt));
6232
+ i.append(ar()), this._createUpdateFolderDialog(i, "create"), n.append(r, i), F(this, Ft).append(n, F(this, pt));
6232
6233
  const o = this._renderSearchField(), a = this._createBrowseMoreContainer(), c = this._createBrowseImageMain(), h = K("footer");
6233
6234
  e.onclick = () => {
6234
- on.hide(), $(this, ke, []), $(this, ge, []);
6235
+ an.hide(), $(this, ke, []), $(this, ge, []), F(this, Jt).call(this);
6235
6236
  }, F(this, vt).onclick = () => {
6236
- F(this, Ht).call(this), on.hide(), $(this, ge, []), $(this, ke, []);
6237
+ F(this, Ht).call(this), an.hide(), $(this, ge, []), $(this, ke, []);
6237
6238
  }, h.append(e, F(this, vt));
6238
6239
  const l = K("container-right-main");
6239
- l.append(o, a, c, h), F(this, be).append(F(this, Ft), l), on.show({
6240
+ l.append(o, a, c, h), F(this, be).append(F(this, Ft), l), an.show({
6240
6241
  content: F(this, be)
6241
6242
  });
6242
6243
  }
@@ -6256,9 +6257,9 @@ class Rs {
6256
6257
  "margin-block: 0px; font-size: 13px; color: #777",
6257
6258
  `Max File size: ${n}MB`
6258
6259
  );
6259
- i.append(Ln(), c, h);
6260
+ i.append(Tn(), c, h);
6260
6261
  } else
6261
- i.append(Ln(), c);
6262
+ i.append(Tn(), c);
6262
6263
  return this._setupDragAndDrop(F(this, Te)), F(this, Te).append(i), r && this._renderImagePreview(r), F(this, Et).appendChild(F(this, Te)), F(this, Et);
6263
6264
  }
6264
6265
  _setupDragAndDrop(e) {
@@ -6313,7 +6314,7 @@ class Rs {
6313
6314
  "div",
6314
6315
  "",
6315
6316
  "width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; padding: 4px; position: absolute; top: -10px; right: -10px; background: #c10007; border-radius: 50%;z-index:1"
6316
- ), a = Dn();
6317
+ ), a = Rn();
6317
6318
  a.style.fill = "#fff", o == null || o.appendChild(a), o.addEventListener("click", () => {
6318
6319
  var h;
6319
6320
  (h = F(this, Te)) == null || h.removeChild(r), this._removeUserToast();
@@ -6325,7 +6326,7 @@ class Rs {
6325
6326
  async _readFileAsBase64(e) {
6326
6327
  $(this, it, !0);
6327
6328
  try {
6328
- const t = await pr(e);
6329
+ const t = await mr(e);
6329
6330
  this._removeUserToast();
6330
6331
  const n = new FileReader();
6331
6332
  n.readAsDataURL(t), n.onload = () => {
@@ -6353,7 +6354,7 @@ class Rs {
6353
6354
  "margin-block:0px;font-size:14px;padding-top:3px"
6354
6355
  );
6355
6356
  r.textContent = e, r.style.color = t === "success" ? "#4caf50" : "#ee3f3f";
6356
- const i = t === "success" ? ir("#4caf50") : In();
6357
+ const i = t === "success" ? sr("#4caf50") : Ln();
6357
6358
  i.style.width = "15px", i.style.height = "15px", n.append(i, r), F(this, Te).firstChild.appendChild(n);
6358
6359
  }
6359
6360
  _removeUserToast() {
@@ -6361,7 +6362,7 @@ class Rs {
6361
6362
  e && e.remove();
6362
6363
  }
6363
6364
  _renderUserViewBrowseButton() {
6364
- const e = Tn("file");
6365
+ const e = xn("file");
6365
6366
  e.style.display = "none", e.setAttribute("multiple", "true"), e.setAttribute("accept", "image/*");
6366
6367
  const t = ee(
6367
6368
  "a",
@@ -6392,7 +6393,7 @@ class Rs {
6392
6393
  this._renderUserUploading();
6393
6394
  try {
6394
6395
  this._renderImagePreview(e, t.name);
6395
- const n = await fr(e, t, F(this, Se), !1);
6396
+ const n = await pr(e, t, F(this, Se), !1);
6396
6397
  await this._uploadForUser(n, t), this._renderUserToast("Successfully Uploaded.", "success");
6397
6398
  } catch {
6398
6399
  this._renderUserToast(
@@ -6406,9 +6407,9 @@ class Rs {
6406
6407
  async _uploadForUser(e, t) {
6407
6408
  var n;
6408
6409
  try {
6409
- const r = await Xi(
6410
+ const r = await Gi(
6410
6411
  e,
6411
- ct[cr((n = t.type) == null ? void 0 : n.split("/")[0])],
6412
+ ct[dr((n = t.type) == null ? void 0 : n.split("/")[0])],
6412
6413
  F(this, Se)
6413
6414
  );
6414
6415
  $(this, Wt, r == null ? void 0 : r.response), F(this, Ht).call(this);
@@ -6430,17 +6431,17 @@ class Rs {
6430
6431
  }), t.append(n, r), e.appendChild(t);
6431
6432
  }
6432
6433
  _renderUploadButton() {
6433
- const e = Tn("file");
6434
+ const e = xn("file");
6434
6435
  e.style.display = "none", e.setAttribute("multiple", "true"), e.setAttribute("accept", "image/*,video/*,audio/*,.gif"), $(this, ft, document.createElement("button")), F(this, ft).className = "browse-more-btn";
6435
6436
  const t = document.createElement("span");
6436
- return t.textContent = "Upload", F(this, ft).append(Ln(), t), F(this, ft).type = "button", F(this, ft).addEventListener(
6437
+ return t.textContent = "Upload", F(this, ft).append(Tn(), t), F(this, ft).type = "button", F(this, ft).addEventListener(
6437
6438
  "click",
6438
6439
  () => e.click()
6439
6440
  ), e.addEventListener("change", async () => {
6440
6441
  const n = e.files[0];
6441
6442
  try {
6442
6443
  $(this, it, !0);
6443
- const r = await pr(n), i = new FileReader();
6444
+ const r = await mr(n), i = new FileReader();
6444
6445
  i.readAsDataURL(r), i.onload = async () => {
6445
6446
  await this._uploadAndAddSelectedImageList(
6446
6447
  i.result,
@@ -6457,7 +6458,7 @@ class Rs {
6457
6458
  const e = document.createElement("button");
6458
6459
  e.className = "create-folder-btn";
6459
6460
  const t = document.createElement("span");
6460
- return t.textContent = "Create", e.append(or(), t), this._createUpdateFolderDialog(e, "create"), e;
6461
+ return t.textContent = "Create", e.append(ar(), t), this._createUpdateFolderDialog(e, "create"), e;
6461
6462
  }
6462
6463
  _renderSearchField() {
6463
6464
  let e;
@@ -6465,7 +6466,7 @@ class Rs {
6465
6466
  "search-input-wrapper",
6466
6467
  "search-input-wrapper"
6467
6468
  );
6468
- $(this, It, Tn("search")), F(this, It).value = "", F(this, It).addEventListener("input", (i) => {
6469
+ $(this, It, xn("search")), F(this, It).value = "", F(this, It).addEventListener("input", (i) => {
6469
6470
  $(this, ke, []);
6470
6471
  const o = i.target;
6471
6472
  e && clearTimeout(e), e = setTimeout(() => {
@@ -6476,7 +6477,7 @@ class Rs {
6476
6477
  $(this, mt, !0), $(this, $t, o.value), this._search(F(this, $t));
6477
6478
  }, 750);
6478
6479
  }), F(this, It).setAttribute("placeholder", "Search");
6479
- const r = ps();
6480
+ const r = ms();
6480
6481
  return r.style.position = "absolute", r.style.top = "50%", r.style.left = "5%", r.style.transform = "translate(-5%, -50%)", n.append(r, F(this, It)), t.append(n), t;
6481
6482
  }
6482
6483
  _createBrowseMoreContainer() {
@@ -6591,7 +6592,7 @@ class Rs {
6591
6592
  e.innerHTML = "", F(this, Ce).appendChild(e);
6592
6593
  }
6593
6594
  _fileCardBody(e) {
6594
- var nt, St, en, Dt;
6595
+ var nt, St, tn, Dt;
6595
6596
  const t = K("selected-image-content"), n = K("selected-image-top-bar"), r = He(
6596
6597
  "",
6597
6598
  "selected-image-btn",
@@ -6600,20 +6601,20 @@ class Rs {
6600
6601
  '<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>'
6601
6602
  );
6602
6603
  let i, o;
6603
- (e == null ? void 0 : e.type) === ct.IMAGE && (i = dr(e == null ? void 0 : e.url, "selected-image"), o = hs()), (e == null ? void 0 : e.type) === ct.VIDEO && (i = Es(e == null ? void 0 : e.url, "uploaded-video"), o = ms()), (e == null ? void 0 : e.type) === ct.AUDIO && (i = As(e == null ? void 0 : e.url, "uploaded-audio"), o = ds());
6604
+ (e == null ? void 0 : e.type) === ct.IMAGE && (i = hr(e == null ? void 0 : e.url, "selected-image"), o = us()), (e == null ? void 0 : e.type) === ct.VIDEO && (i = As(e == null ? void 0 : e.url, "uploaded-video"), o = gs()), (e == null ? void 0 : e.type) === ct.AUDIO && (i = vs(e == null ? void 0 : e.url, "uploaded-audio"), o = hs());
6604
6605
  const a = K("selected-image-wrapper");
6605
6606
  a.setAttribute("data-key", e == null ? void 0 : e.key);
6606
6607
  const c = zt(e == null ? void 0 : e.name, "selected-image-name"), h = ie("", "selected-image-type");
6607
6608
  h.append(o), n.append(h, r);
6608
6609
  const l = K();
6609
6610
  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);
6610
- const u = K("action-wrapper"), d = He("", "action-option preview"), f = ie("Preview", ""), y = fs();
6611
+ const u = K("action-wrapper"), d = He("", "action-option preview"), f = ie("Preview", ""), y = ps();
6611
6612
  d.append(y, f);
6612
- const I = He("", "action-option move"), L = ie("Move", ""), C = us();
6613
+ const I = He("", "action-option move"), L = ie("Move", ""), C = fs();
6613
6614
  I.append(C, L);
6614
- const R = He("", "action-option rename"), O = ie("Rename", ""), v = sr();
6615
+ const R = He("", "action-option rename"), O = ie("Rename", ""), v = or();
6615
6616
  R.append(v, O);
6616
- const x = He("", "action-option delete"), b = ie("Delete", ""), B = ar();
6617
+ const x = He("", "action-option delete"), b = ie("Delete", ""), B = lr();
6617
6618
  x.append(B, b);
6618
6619
  const m = e.name.split(".")[0], g = e.name.split(".")[1], A = Xt[e.type], N = K("edit-form-wrapper"), k = K("move-form-wrapper"), T = K("preview-details-container"), E = K("preview-details-wrapper"), U = K(
6619
6620
  "preview-option-image-wrapper"
@@ -6623,7 +6624,7 @@ class Rs {
6623
6624
  "preview-option-wrapper"
6624
6625
  ), q = K("preview-option-wrapper"), W = K(
6625
6626
  "preview-option-wrapper"
6626
- ), Z = dr(e.url, "preview-option-image");
6627
+ ), Z = hr(e.url, "preview-option-image");
6627
6628
  U.append(Z);
6628
6629
  const H = ie("File name", "preview-title"), S = K("preview-option-name");
6629
6630
  S.innerHTML = e.name, w.append(H, S);
@@ -6682,7 +6683,7 @@ class Rs {
6682
6683
  w,
6683
6684
  M,
6684
6685
  _,
6685
- ((en = e == null ? void 0 : e.metadata) == null ? void 0 : en.width) > 0 && ((Dt = e == null ? void 0 : e.metadata) == null ? void 0 : Dt.height) > 0 ? V : "",
6686
+ ((tn = e == null ? void 0 : e.metadata) == null ? void 0 : tn.width) > 0 && ((Dt = e == null ? void 0 : e.metadata) == null ? void 0 : Dt.height) > 0 ? V : "",
6686
6687
  q,
6687
6688
  e.nestedFolderName ? W : ""
6688
6689
  ), T.append(
@@ -6699,7 +6700,7 @@ class Rs {
6699
6700
  "Suggested Folder List:",
6700
6701
  "input-label"
6701
6702
  ), _e = ie();
6702
- _e.style.display = "flex", _e.style.alignItems = "center", _e.style.gap = "5px", _e.style.fontSize = "14px", _e.textContent = "Move the file in selected folder", _e.appendChild(In("14px", "14px", "#333")), Y.append(Re, _e);
6703
+ _e.style.display = "flex", _e.style.alignItems = "center", _e.style.gap = "5px", _e.style.fontSize = "14px", _e.textContent = "Move the file in selected folder", _e.appendChild(Ln("14px", "14px", "#333")), Y.append(Re, _e);
6703
6704
  const et = K();
6704
6705
  et.style.width = "100%", et.style.maxHeight = "250px", et.style.overflowY = "auto";
6705
6706
  const Ae = document.createElement("ul");
@@ -6797,7 +6798,7 @@ class Rs {
6797
6798
  if (t.classList.contains("checked"))
6798
6799
  t.classList.remove("checked"), ce !== -1 && (F(this, ge).splice(ce, 1), F(this, kt) === 1 && a.remove());
6799
6800
  else {
6800
- if (F(this, gn))
6801
+ if (F(this, wn))
6801
6802
  F(this, ge).push(e);
6802
6803
  else {
6803
6804
  const rt = document.querySelector(
@@ -6848,7 +6849,7 @@ class Rs {
6848
6849
  const r = document.createElement("span"), i = document.createElement("span");
6849
6850
  if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, r.appendChild(Kt()), n.append(r, i), t.append(n), e.children && Object.keys(e.children).length > 0) {
6850
6851
  const a = document.createElement("button");
6851
- a.classList.add("expand-icon"), a.appendChild(rr()), n.prepend(a);
6852
+ a.classList.add("expand-icon"), a.appendChild(ir()), n.prepend(a);
6852
6853
  const c = document.createElement("ul");
6853
6854
  c.className = "folders nested", t.appendChild(c), a.addEventListener("click", (h) => {
6854
6855
  h.stopPropagation(), t.classList.toggle("active"), c.classList.toggle("visible");
@@ -6866,7 +6867,7 @@ class Rs {
6866
6867
  "moveToInputField.disabled",
6867
6868
  !1,
6868
6869
  '<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>'
6869
- ), c = K("action-wrapper"), h = He("", "action-option edit"), l = ie("Edit", ""), u = sr();
6870
+ ), c = K("action-wrapper"), h = He("", "action-option edit"), l = ie("Edit", ""), u = or();
6870
6871
  h.append(u, l);
6871
6872
  const d = K("edit-form-wrapper"), f = K("name-field-wrapper"), y = ie("Name", "input-label"), I = document.createElement("input");
6872
6873
  I.classList.add("input-field"), I.value = e.name, I.onchange = (v) => {
@@ -6879,7 +6880,7 @@ class Rs {
6879
6880
  createdBy: e.createdBy
6880
6881
  };
6881
6882
  this._createUpdateFolderDialog(h, "update", L);
6882
- const C = He("", "action-option delete"), R = ie("Delete", ""), O = ar();
6883
+ const C = He("", "action-option delete"), R = ie("Delete", ""), O = lr();
6883
6884
  C.append(O, R), c.append(h, C), C.onclick = (v) => {
6884
6885
  v.stopPropagation(), je.hide(), ye.show({
6885
6886
  content: "",
@@ -6919,7 +6920,7 @@ class Rs {
6919
6920
  const r = document.createElement("span"), i = document.createElement("span");
6920
6921
  if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, r.appendChild(Kt()), n.append(r, i), t.append(n), e.children && Object.keys(e.children).length > 0) {
6921
6922
  const a = document.createElement("button");
6922
- a.classList.add("expand-icon"), a.appendChild(rr()), n.prepend(a);
6923
+ a.classList.add("expand-icon"), a.appendChild(ir()), n.prepend(a);
6923
6924
  const c = document.createElement("ul");
6924
6925
  c.className = "folders nested", t.appendChild(c), a.addEventListener("click", (h) => {
6925
6926
  h.stopPropagation(), t.classList.toggle("active"), c.classList.toggle("visible");
@@ -6952,9 +6953,9 @@ class Rs {
6952
6953
  }
6953
6954
  _renderToastContainer(e, t, n) {
6954
6955
  this._removeToastContainer(), $(this, ot, document.createElement("div")), F(this, ot).className = `message-container ${t}`;
6955
- const r = zt(e, "message"), i = t === "success" ? ir() : In(), o = He("");
6956
+ const r = zt(e, "message"), i = t === "success" ? sr() : Ln(), o = He("");
6956
6957
  o.style.cursor = "pointer", o.style.border = "0", o.style.outline = "none", o.style.background = "transparent", o.appendChild(
6957
- Dn(t === "error" ? "#ee3f3f" : "#4caf50")
6958
+ Rn(t === "error" ? "#ee3f3f" : "#4caf50")
6958
6959
  ), o.setAttribute(
6959
6960
  "fill",
6960
6961
  t === "error" ? "#ee3f3f" : "#4caf50"
@@ -6991,11 +6992,11 @@ class Rs {
6991
6992
  var n, r;
6992
6993
  this._updateSelectedImageListContainerUI();
6993
6994
  try {
6994
- const i = await fr(e, t, F(this, Se)), o = await zi(
6995
+ const i = await pr(e, t, F(this, Se)), o = await Xi(
6995
6996
  t == null ? void 0 : t.name,
6996
6997
  "",
6997
6998
  i,
6998
- ct[cr((n = t.type) == null ? void 0 : n.split("/")[0])],
6999
+ ct[dr((n = t.type) == null ? void 0 : n.split("/")[0])],
6999
7000
  (r = F(this, Ge)) == null ? void 0 : r.name,
7000
7001
  F(this, Se)
7001
7002
  );
@@ -7017,7 +7018,7 @@ class Rs {
7017
7018
  async _updateFile(e, t) {
7018
7019
  ye.updateUploadBtn(!0);
7019
7020
  try {
7020
- const n = await Qi(
7021
+ const n = await Yi(
7021
7022
  t.key,
7022
7023
  e,
7023
7024
  t.nestedFolderName,
@@ -7048,7 +7049,7 @@ class Rs {
7048
7049
  async _deleteFile(e) {
7049
7050
  ye.updateUploadBtn(!0);
7050
7051
  try {
7051
- await Yi(e, F(this, Se)), $(this, ke, F(this, ke).filter((t) => e !== t.key)), this._renderToastContainer(
7052
+ await es(e, F(this, Se)), $(this, ke, F(this, ke).filter((t) => e !== t.key)), this._renderToastContainer(
7052
7053
  "File Deleted Successfully",
7053
7054
  "success",
7054
7055
  F(this, be)
@@ -7066,14 +7067,14 @@ class Rs {
7066
7067
  async _createFolder(e, t = 2) {
7067
7068
  var n;
7068
7069
  try {
7069
- const r = await as(
7070
+ const r = await ls(
7070
7071
  e,
7071
7072
  (n = F(this, Ge)) == null ? void 0 : n.name,
7072
7073
  "",
7073
7074
  F(this, Se)
7074
7075
  );
7075
7076
  $(this, ge, []), $(this, ke, []);
7076
- const i = bs(F(this, st), r == null ? void 0 : r.response);
7077
+ const i = Cs(F(this, st), r == null ? void 0 : r.response);
7077
7078
  $(this, st, i), $(this, At, e), $(this, Ge, { ...r == null ? void 0 : r.response, children: {} }), this._fetchFilesFromFolder(e), this._renderToastContainer(
7078
7079
  `Folder ${e} created successfully`,
7079
7080
  "success",
@@ -7095,13 +7096,13 @@ class Rs {
7095
7096
  }
7096
7097
  }
7097
7098
  async _upload() {
7098
- return F(this, Yt) ? F(this, ge) : F(this, Wt);
7099
+ return F(this, en) ? F(this, ge) : F(this, Wt);
7099
7100
  }
7100
7101
  async _fetchFilesFromFolder(e) {
7101
7102
  var t, n, r;
7102
7103
  $(this, $e, !0), this._updateSelectedImageListContainerUI();
7103
7104
  try {
7104
- const i = await Gi(
7105
+ const i = await Ji(
7105
7106
  e,
7106
7107
  F(this, at),
7107
7108
  20,
@@ -7124,7 +7125,7 @@ class Rs {
7124
7125
  var e, t;
7125
7126
  $(this, $e, !0), $(this, Bt, !0), this._updateSelectedImageListContainerUI(), this._updateFolderListContainer(), this._removeToastContainer();
7126
7127
  try {
7127
- const r = (await os("", 100, F(this, Se))).response.folder, i = ys(r);
7128
+ const r = (await as("", 100, F(this, Se))).response.folder, i = bs(r);
7128
7129
  $(this, At, (e = i[0]) == null ? void 0 : e.name), this._fetchFilesFromFolder((t = i[0]) == null ? void 0 : t.name), $(this, Ge, i[0]), $(this, st, i);
7129
7130
  } catch {
7130
7131
  $(this, $e, !1), this._renderToastContainer(
@@ -7140,7 +7141,7 @@ class Rs {
7140
7141
  var t, n;
7141
7142
  $(this, $e, !0), this._updateSelectedImageListContainerUI(), this._removeToastContainer();
7142
7143
  try {
7143
- const r = await Ji(
7144
+ const r = await Qi(
7144
7145
  e,
7145
7146
  F(this, at),
7146
7147
  10,
@@ -7160,7 +7161,7 @@ class Rs {
7160
7161
  async _updateFolder(e, t) {
7161
7162
  ye.updateUploadBtn(!0);
7162
7163
  try {
7163
- const n = await ls(
7164
+ const n = await cs(
7164
7165
  t.key,
7165
7166
  e,
7166
7167
  t.nestedFolderName,
@@ -7180,7 +7181,7 @@ class Rs {
7180
7181
  async _deleteFolder(e) {
7181
7182
  ye.updateUploadBtn(!0);
7182
7183
  try {
7183
- await cs(e, F(this, Se)), $(this, st, F(this, st).filter((t) => t.key !== e)), this._renderToastContainer(
7184
+ await ds(e, F(this, Se)), $(this, st, F(this, st).filter((t) => t.key !== e)), this._renderToastContainer(
7184
7185
  "Folder Deleted Successfully",
7185
7186
  "success",
7186
7187
  F(this, be)
@@ -7231,13 +7232,13 @@ class Rs {
7231
7232
  _initializeGrpcConfig(e, t) {
7232
7233
  let n = "https://hamro-cms-backend-grpc.hamrostack.com";
7233
7234
  t && (e === "production" || e === "development") ? n = t : e === "production" && (n = "https://page-api-grpc.hamropatro.com");
7234
- const r = new Oi({
7235
+ const r = new Si({
7235
7236
  baseUrl: n
7236
7237
  });
7237
7238
  this.updateWindowObject({ grpcConfig: r });
7238
7239
  }
7239
7240
  }
7240
- Et = new WeakMap(), be = new WeakMap(), Ce = new WeakMap(), ft = new WeakMap(), ge = new WeakMap(), ke = new WeakMap(), it = new WeakMap(), $e = new WeakMap(), Bt = new WeakMap(), At = new WeakMap(), st = new WeakMap(), Ge = new WeakMap(), vt = new WeakMap(), Ht = new WeakMap(), kt = new WeakMap(), Ft = new WeakMap(), pt = new WeakMap(), Ot = new WeakMap(), ot = new WeakMap(), at = new WeakMap(), Nt = new WeakMap(), It = new WeakMap(), mt = new WeakMap(), $t = new WeakMap(), Jt = new WeakMap(), Se = new WeakMap(), gt = new WeakMap(), Qt = new WeakMap(), gn = new WeakMap(), Yt = new WeakMap(), Te = new WeakMap(), Wt = new WeakMap(), Lt = new WeakMap(), Pt = new WeakMap(), wn = new WeakMap(), yn = new WeakMap(), jt = new WeakMap();
7241
+ Et = new WeakMap(), be = new WeakMap(), Ce = new WeakMap(), ft = new WeakMap(), ge = new WeakMap(), ke = new WeakMap(), it = new WeakMap(), $e = new WeakMap(), Bt = new WeakMap(), At = new WeakMap(), st = new WeakMap(), Ge = new WeakMap(), vt = new WeakMap(), Ht = new WeakMap(), Jt = new WeakMap(), kt = new WeakMap(), Ft = new WeakMap(), pt = new WeakMap(), Ot = new WeakMap(), ot = new WeakMap(), at = new WeakMap(), Nt = new WeakMap(), It = new WeakMap(), mt = new WeakMap(), $t = new WeakMap(), Qt = new WeakMap(), Se = new WeakMap(), gt = new WeakMap(), Yt = new WeakMap(), wn = new WeakMap(), en = new WeakMap(), Te = new WeakMap(), Wt = new WeakMap(), Lt = new WeakMap(), Pt = new WeakMap(), yn = new WeakMap(), bn = new WeakMap(), jt = new WeakMap();
7241
7242
  export {
7242
- Rs as default
7243
+ Ms as default
7243
7244
  };