image-salon-sdk 1.0.28 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/image-salon-sdk.js +1410 -1406
- package/dist/image-salon-sdk.umd.cjs +5 -5
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/image-salon-sdk.js
CHANGED
|
@@ -6,161 +6,7 @@ var Ht = (i) => {
|
|
|
6
6
|
var Jn = (i, e, t) => e in i ? Gn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
7
7
|
var B = (i, e, t) => Jn(i, typeof e != "symbol" ? e + "" : e, t), $t = (i, e, t) => e.has(i) || Ht("Cannot " + t);
|
|
8
8
|
var d = (i, e, t) => ($t(i, e, "read from private field"), t ? t.call(i) : e.get(i)), k = (i, e, t) => e.has(i) ? Ht("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), p = (i, e, t, n) => ($t(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
|
|
9
|
-
function cn(i
|
|
10
|
-
const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
11
|
-
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", i);
|
|
12
|
-
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
13
|
-
return t.setAttribute(
|
|
14
|
-
"d",
|
|
15
|
-
"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"
|
|
16
|
-
), e.appendChild(t), e;
|
|
17
|
-
}
|
|
18
|
-
function V(i, e, t) {
|
|
19
|
-
let n = document.createElement(i);
|
|
20
|
-
return n.className += e, t && t.appendChild(n), n;
|
|
21
|
-
}
|
|
22
|
-
var le;
|
|
23
|
-
class zn {
|
|
24
|
-
constructor() {
|
|
25
|
-
k(this, le);
|
|
26
|
-
p(this, le, document.createElementNS(
|
|
27
|
-
"http://www.w3.org/2000/svg",
|
|
28
|
-
"svg"
|
|
29
|
-
)), d(this, le).setAttribute("viewBox", "25 25 50 50"), d(this, le).classList.add("loader-svg");
|
|
30
|
-
const e = document.createElementNS(
|
|
31
|
-
"http://www.w3.org/2000/svg",
|
|
32
|
-
"circle"
|
|
33
|
-
);
|
|
34
|
-
e.setAttribute("r", "20"), e.setAttribute("cy", "50"), e.setAttribute("cx", "50"), e.classList.add("loader-circle"), d(this, le).appendChild(e);
|
|
35
|
-
}
|
|
36
|
-
show(e) {
|
|
37
|
-
e.appendChild(d(this, le));
|
|
38
|
-
}
|
|
39
|
-
hide() {
|
|
40
|
-
d(this, le).remove();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
le = new WeakMap();
|
|
44
|
-
const Wt = new zn(), qe = document.body;
|
|
45
|
-
class dn {
|
|
46
|
-
constructor() {
|
|
47
|
-
B(this, "main");
|
|
48
|
-
B(this, "dialogContainer");
|
|
49
|
-
B(this, "dialog");
|
|
50
|
-
B(this, "dialogBackdrop");
|
|
51
|
-
B(this, "dialogContent");
|
|
52
|
-
B(this, "dialogHeader");
|
|
53
|
-
B(this, "dialogBody");
|
|
54
|
-
B(this, "dialogFooter");
|
|
55
|
-
B(this, "confirmButton");
|
|
56
|
-
B(this, "cancelButton");
|
|
57
|
-
B(this, "confirmCallback");
|
|
58
|
-
B(this, "cancelCallback");
|
|
59
|
-
this.main = V("div"), this.dialog = V("div"), this.confirmCallback = void 0, this.cancelCallback = void 0;
|
|
60
|
-
}
|
|
61
|
-
_init(e) {
|
|
62
|
-
if (this.main = V("div", "dialog-presentation", qe), this.main.setAttribute("role", "presentation"), this.dialogContainer = V("div", "dialog-container", this.main), this.dialogBackdrop = V(
|
|
63
|
-
"div",
|
|
64
|
-
"dialog-backdrop",
|
|
65
|
-
this.dialogContainer
|
|
66
|
-
), this.dialog = V("div", "dialog", this.dialogContainer), this.dialog.className = "dialog", this.dialogContent = V("div", "dialog-content", this.dialog), e != null && e.dialogContentStyle && Object.assign(this.dialogContent.style, e.dialogContentStyle), this.confirmButton = V(
|
|
67
|
-
"button",
|
|
68
|
-
"dialog-btn confirm",
|
|
69
|
-
this.dialogFooter
|
|
70
|
-
), this.confirmButton.type = "button", this.cancelButton = V(
|
|
71
|
-
"button",
|
|
72
|
-
"dialog-btn cancel",
|
|
73
|
-
this.dialogFooter
|
|
74
|
-
), this.cancelButton.type = "button", e.showCloseBtn) {
|
|
75
|
-
const t = V(
|
|
76
|
-
"button",
|
|
77
|
-
"dialog-close-btn",
|
|
78
|
-
this.dialogContent
|
|
79
|
-
);
|
|
80
|
-
t.appendChild(cn()), t.onclick = () => this.hide();
|
|
81
|
-
}
|
|
82
|
-
return e.header && this._setHeader(e), this._setBody(e), this._setFooter(e), this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", qe.style.overflow = "hidden", this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", qe.classList.add("dialog-visible"), new Promise((t) => {
|
|
83
|
-
const n = (r) => () => {
|
|
84
|
-
this.hide(), t(r === "confirm");
|
|
85
|
-
};
|
|
86
|
-
this.confirmCallback = e.onConfirm || n("confirm"), this.confirmButton.addEventListener("click", this.confirmCallback), this.cancelCallback = e.onCancel || n("cancel"), this.cancelButton.addEventListener("click", this.cancelCallback);
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
_setHeader(e) {
|
|
90
|
-
if (this.dialogHeader = V(
|
|
91
|
-
"div",
|
|
92
|
-
"dialog-header",
|
|
93
|
-
this.dialogContent
|
|
94
|
-
), !e.header)
|
|
95
|
-
this.dialogHeader.innerHTML = "";
|
|
96
|
-
else if (typeof e.header == "string") {
|
|
97
|
-
const t = V(
|
|
98
|
-
"h4",
|
|
99
|
-
"dialog-header-text",
|
|
100
|
-
this.dialogHeader
|
|
101
|
-
);
|
|
102
|
-
t.textContent = e.header;
|
|
103
|
-
} else
|
|
104
|
-
this.dialogHeader.innerHTML = "", this.dialogHeader.appendChild(e.header);
|
|
105
|
-
}
|
|
106
|
-
_setBody(e) {
|
|
107
|
-
this.dialogBody = V("div", "dialog-body", this.dialogContent), typeof e.content == "string" ? this.dialogBody.innerHTML = e.content : (this.dialogBody.innerHTML = "", this.dialogBody.appendChild(e.content));
|
|
108
|
-
}
|
|
109
|
-
_setFooter(e) {
|
|
110
|
-
this.dialogFooter = V(
|
|
111
|
-
"div",
|
|
112
|
-
"dialog-footer",
|
|
113
|
-
this.dialogContent
|
|
114
|
-
), e.showFooter ? this.dialogFooter.append(this.cancelButton, this.confirmButton) : (this.dialogFooter.innerHTML = "", this.dialogFooter.remove());
|
|
115
|
-
}
|
|
116
|
-
show(e) {
|
|
117
|
-
this._init(e), setTimeout(() => {
|
|
118
|
-
this.dialogContainer.style.opacity = "1", this.dialog.style.transform = "scale(1)", this.dialog.style.transition = "transform 150ms ease-in", this.dialog.style.opacity = "1", this.dialogBackdrop.style.opacity = "1";
|
|
119
|
-
}, 150);
|
|
120
|
-
}
|
|
121
|
-
hide() {
|
|
122
|
-
this.main || qe.style.removeProperty("overflow"), this.dialog.style.transform = "scale(0.8)", this.dialog.style.transition = "transform 150ms ease-out", this.dialogBackdrop.style.opacity = "0", setTimeout(() => {
|
|
123
|
-
this.dialogContainer.style.opacity = "0", this.dialog.style.opacity = "0", this.dialogContent.style.opacity = "0", this.main.remove();
|
|
124
|
-
}, 150);
|
|
125
|
-
}
|
|
126
|
-
updateUploadBtn(e) {
|
|
127
|
-
e ? (Wt.show(this.confirmButton), this.confirmButton.disabled = !0) : (Wt.hide(), this.confirmButton.disabled = !1);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
const Ke = new dn(), D = new dn();
|
|
131
|
-
function b(i, e) {
|
|
132
|
-
const t = document.createElement("div");
|
|
133
|
-
return i && (t.className = i), e && (t.id = e), t;
|
|
134
|
-
}
|
|
135
|
-
function Ue(i, e, t) {
|
|
136
|
-
const n = document.createElement("p");
|
|
137
|
-
return e && (n.className = e), t && (n.id = t), i && (n.textContent = i), n;
|
|
138
|
-
}
|
|
139
|
-
function L(i, e) {
|
|
140
|
-
const t = document.createElement("span");
|
|
141
|
-
return e && (t.className = e), i && (t.textContent = i), t;
|
|
142
|
-
}
|
|
143
|
-
function Pt(i, e, t, n) {
|
|
144
|
-
const r = document.createElement("img");
|
|
145
|
-
return e && (r.className = e), r.src = i, r;
|
|
146
|
-
}
|
|
147
|
-
function Yn(i, e, t) {
|
|
148
|
-
const n = document.createElement("video"), r = document.createElement("source");
|
|
149
|
-
return n.className = e, r.src = i, n.appendChild(r), n;
|
|
150
|
-
}
|
|
151
|
-
function Qn(i, e, t) {
|
|
152
|
-
const n = document.createElement("audio"), r = document.createElement("source");
|
|
153
|
-
return n.className = e, n.controls = !0, r.src = i, n.appendChild(r), n;
|
|
154
|
-
}
|
|
155
|
-
function q(i, e, t, n, r) {
|
|
156
|
-
const s = document.createElement("button");
|
|
157
|
-
return e && (s.className = e), t && (s.id = t), i && (s.textContent = i), r && (s.innerHTML = r), s.disabled = n, s;
|
|
158
|
-
}
|
|
159
|
-
function Zt(i, e, t) {
|
|
160
|
-
const n = document.createElement("input");
|
|
161
|
-
return n.className = e, n.defaultValue = t, i && (n.type = i), n;
|
|
162
|
-
}
|
|
163
|
-
function hn(i) {
|
|
9
|
+
function cn(i) {
|
|
164
10
|
let e = typeof i;
|
|
165
11
|
if (e == "object") {
|
|
166
12
|
if (Array.isArray(i))
|
|
@@ -170,7 +16,7 @@ function hn(i) {
|
|
|
170
16
|
}
|
|
171
17
|
return e;
|
|
172
18
|
}
|
|
173
|
-
function
|
|
19
|
+
function zn(i) {
|
|
174
20
|
return i !== null && typeof i == "object" && !Array.isArray(i);
|
|
175
21
|
}
|
|
176
22
|
let pe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), tt = [];
|
|
@@ -178,7 +24,7 @@ for (let i = 0; i < pe.length; i++)
|
|
|
178
24
|
tt[pe[i].charCodeAt(0)] = i;
|
|
179
25
|
tt[45] = pe.indexOf("+");
|
|
180
26
|
tt[95] = pe.indexOf("/");
|
|
181
|
-
function
|
|
27
|
+
function dn(i) {
|
|
182
28
|
let e = i.length * 3 / 4;
|
|
183
29
|
i[i.length - 2] == "=" ? e -= 2 : i[i.length - 1] == "=" && (e -= 1);
|
|
184
30
|
let t = new Uint8Array(e), n = 0, r = 0, s, o = 0;
|
|
@@ -215,7 +61,7 @@ function un(i) {
|
|
|
215
61
|
throw Error("invalid base64 string.");
|
|
216
62
|
return t.subarray(0, n);
|
|
217
63
|
}
|
|
218
|
-
function
|
|
64
|
+
function hn(i) {
|
|
219
65
|
let e = "", t = 0, n, r = 0;
|
|
220
66
|
for (let s = 0; s < i.length; s++)
|
|
221
67
|
switch (n = i[s], t) {
|
|
@@ -247,14 +93,14 @@ var N;
|
|
|
247
93
|
}, i.last = (t, n) => i.list(t, n).slice(-1)[0];
|
|
248
94
|
const e = (t) => t && Array.isArray(t[i.symbol]);
|
|
249
95
|
})(N || (N = {}));
|
|
250
|
-
function
|
|
96
|
+
function Yn(i, e) {
|
|
251
97
|
return Object.assign(Object.assign({}, i), e);
|
|
252
98
|
}
|
|
253
99
|
var m;
|
|
254
100
|
(function(i) {
|
|
255
101
|
i[i.Varint = 0] = "Varint", i[i.Bit64 = 1] = "Bit64", i[i.LengthDelimited = 2] = "LengthDelimited", i[i.StartGroup = 3] = "StartGroup", i[i.EndGroup = 4] = "EndGroup", i[i.Bit32 = 5] = "Bit32";
|
|
256
102
|
})(m || (m = {}));
|
|
257
|
-
function
|
|
103
|
+
function Qn() {
|
|
258
104
|
let i = 0, e = 0;
|
|
259
105
|
for (let n = 0; n < 28; n += 7) {
|
|
260
106
|
let r = this.buf[this.pos++];
|
|
@@ -288,7 +134,7 @@ function ot(i, e, t) {
|
|
|
288
134
|
}
|
|
289
135
|
}
|
|
290
136
|
const ze = 65536 * 65536;
|
|
291
|
-
function
|
|
137
|
+
function un(i) {
|
|
292
138
|
let e = i[0] == "-";
|
|
293
139
|
e && (i = i.slice(1));
|
|
294
140
|
const t = 1e6;
|
|
@@ -324,7 +170,7 @@ function ht(i, e) {
|
|
|
324
170
|
1
|
|
325
171
|
);
|
|
326
172
|
}
|
|
327
|
-
function
|
|
173
|
+
function Wt(i, e) {
|
|
328
174
|
if (i >= 0) {
|
|
329
175
|
for (; i > 127; )
|
|
330
176
|
e.push(i & 127 | 128), i = i >>> 7;
|
|
@@ -335,7 +181,7 @@ function jt(i, e) {
|
|
|
335
181
|
e.push(1);
|
|
336
182
|
}
|
|
337
183
|
}
|
|
338
|
-
function
|
|
184
|
+
function ei() {
|
|
339
185
|
let i = this.buf[this.pos++], e = i & 127;
|
|
340
186
|
if (!(i & 128))
|
|
341
187
|
return this.assertBounds(), e;
|
|
@@ -353,7 +199,7 @@ function ii() {
|
|
|
353
199
|
return this.assertBounds(), e >>> 0;
|
|
354
200
|
}
|
|
355
201
|
let T;
|
|
356
|
-
function
|
|
202
|
+
function ti() {
|
|
357
203
|
const i = new DataView(new ArrayBuffer(8));
|
|
358
204
|
T = globalThis.BigInt !== void 0 && typeof i.getBigInt64 == "function" && typeof i.getBigUint64 == "function" && typeof i.setBigInt64 == "function" && typeof i.setBigUint64 == "function" ? {
|
|
359
205
|
MIN: BigInt("-9223372036854775808"),
|
|
@@ -364,13 +210,13 @@ function ri() {
|
|
|
364
210
|
V: i
|
|
365
211
|
} : void 0;
|
|
366
212
|
}
|
|
367
|
-
|
|
368
|
-
function
|
|
213
|
+
ti();
|
|
214
|
+
function pn(i) {
|
|
369
215
|
if (!i)
|
|
370
216
|
throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support");
|
|
371
217
|
}
|
|
372
|
-
const
|
|
373
|
-
class
|
|
218
|
+
const fn = /^-?[0-9]+$/, Ye = 4294967296, qe = 2147483648;
|
|
219
|
+
class mn {
|
|
374
220
|
/**
|
|
375
221
|
* Create a new instance with the given bits.
|
|
376
222
|
*/
|
|
@@ -393,7 +239,7 @@ class wn {
|
|
|
393
239
|
return e;
|
|
394
240
|
}
|
|
395
241
|
}
|
|
396
|
-
class P extends
|
|
242
|
+
class P extends mn {
|
|
397
243
|
/**
|
|
398
244
|
* Create instance from a `string`, `number` or `bigint`.
|
|
399
245
|
*/
|
|
@@ -424,9 +270,9 @@ class P extends wn {
|
|
|
424
270
|
case "string":
|
|
425
271
|
if (e == "0")
|
|
426
272
|
return this.ZERO;
|
|
427
|
-
if (e = e.trim(), !
|
|
273
|
+
if (e = e.trim(), !fn.test(e))
|
|
428
274
|
throw new Error("string is no integer");
|
|
429
|
-
let [t, n, r] =
|
|
275
|
+
let [t, n, r] = un(e);
|
|
430
276
|
if (t)
|
|
431
277
|
throw new Error("signed value for ulong");
|
|
432
278
|
return new P(n, r);
|
|
@@ -451,11 +297,11 @@ class P extends wn {
|
|
|
451
297
|
* Convert to native bigint.
|
|
452
298
|
*/
|
|
453
299
|
toBigInt() {
|
|
454
|
-
return
|
|
300
|
+
return pn(T), T.V.setInt32(0, this.lo, !0), T.V.setInt32(4, this.hi, !0), T.V.getBigUint64(0, !0);
|
|
455
301
|
}
|
|
456
302
|
}
|
|
457
303
|
P.ZERO = new P(0, 0);
|
|
458
|
-
class U extends
|
|
304
|
+
class U extends mn {
|
|
459
305
|
/**
|
|
460
306
|
* Create instance from a `string`, `number` or `bigint`.
|
|
461
307
|
*/
|
|
@@ -486,13 +332,13 @@ class U extends wn {
|
|
|
486
332
|
case "string":
|
|
487
333
|
if (e == "0")
|
|
488
334
|
return this.ZERO;
|
|
489
|
-
if (e = e.trim(), !
|
|
335
|
+
if (e = e.trim(), !fn.test(e))
|
|
490
336
|
throw new Error("string is no integer");
|
|
491
|
-
let [t, n, r] =
|
|
337
|
+
let [t, n, r] = un(e);
|
|
492
338
|
if (t) {
|
|
493
|
-
if (r >
|
|
339
|
+
if (r > qe || r == qe && n != 0)
|
|
494
340
|
throw new Error("signed long too small");
|
|
495
|
-
} else if (r >=
|
|
341
|
+
} else if (r >= qe)
|
|
496
342
|
throw new Error("signed long too large");
|
|
497
343
|
let s = new U(n, r);
|
|
498
344
|
return t ? s.negate() : s;
|
|
@@ -509,7 +355,7 @@ class U extends wn {
|
|
|
509
355
|
* Do we have a minus sign?
|
|
510
356
|
*/
|
|
511
357
|
isNegative() {
|
|
512
|
-
return (this.hi &
|
|
358
|
+
return (this.hi & qe) !== 0;
|
|
513
359
|
}
|
|
514
360
|
/**
|
|
515
361
|
* Negate two's complement.
|
|
@@ -535,20 +381,20 @@ class U extends wn {
|
|
|
535
381
|
* Convert to native bigint.
|
|
536
382
|
*/
|
|
537
383
|
toBigInt() {
|
|
538
|
-
return
|
|
384
|
+
return pn(T), T.V.setInt32(0, this.lo, !0), T.V.setInt32(4, this.hi, !0), T.V.getBigInt64(0, !0);
|
|
539
385
|
}
|
|
540
386
|
}
|
|
541
387
|
U.ZERO = new U(0, 0);
|
|
542
|
-
const
|
|
388
|
+
const Pt = {
|
|
543
389
|
readUnknownField: !0,
|
|
544
|
-
readerFactory: (i) => new
|
|
390
|
+
readerFactory: (i) => new ii(i)
|
|
545
391
|
};
|
|
546
|
-
function
|
|
547
|
-
return i ? Object.assign(Object.assign({},
|
|
392
|
+
function ni(i) {
|
|
393
|
+
return i ? Object.assign(Object.assign({}, Pt), i) : Pt;
|
|
548
394
|
}
|
|
549
|
-
class
|
|
395
|
+
class ii {
|
|
550
396
|
constructor(e, t) {
|
|
551
|
-
this.varint64 =
|
|
397
|
+
this.varint64 = Qn, this.uint32 = ei, 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", {
|
|
552
398
|
fatal: !0,
|
|
553
399
|
ignoreBOM: !0
|
|
554
400
|
});
|
|
@@ -692,33 +538,33 @@ function E(i, e) {
|
|
|
692
538
|
if (!i)
|
|
693
539
|
throw new Error(e);
|
|
694
540
|
}
|
|
695
|
-
const
|
|
541
|
+
const ri = 34028234663852886e22, si = -34028234663852886e22, oi = 4294967295, ai = 2147483647, li = -2147483648;
|
|
696
542
|
function Ve(i) {
|
|
697
543
|
if (typeof i != "number")
|
|
698
544
|
throw new Error("invalid int 32: " + typeof i);
|
|
699
|
-
if (!Number.isInteger(i) || i >
|
|
545
|
+
if (!Number.isInteger(i) || i > ai || i < li)
|
|
700
546
|
throw new Error("invalid int 32: " + i);
|
|
701
547
|
}
|
|
702
548
|
function Qe(i) {
|
|
703
549
|
if (typeof i != "number")
|
|
704
550
|
throw new Error("invalid uint 32: " + typeof i);
|
|
705
|
-
if (!Number.isInteger(i) || i >
|
|
551
|
+
if (!Number.isInteger(i) || i > oi || i < 0)
|
|
706
552
|
throw new Error("invalid uint 32: " + i);
|
|
707
553
|
}
|
|
708
554
|
function mt(i) {
|
|
709
555
|
if (typeof i != "number")
|
|
710
556
|
throw new Error("invalid float 32: " + typeof i);
|
|
711
|
-
if (Number.isFinite(i) && (i >
|
|
557
|
+
if (Number.isFinite(i) && (i > ri || i < si))
|
|
712
558
|
throw new Error("invalid float 32: " + i);
|
|
713
559
|
}
|
|
714
|
-
const
|
|
560
|
+
const Zt = {
|
|
715
561
|
writeUnknownFields: !0,
|
|
716
|
-
writerFactory: () => new
|
|
562
|
+
writerFactory: () => new di()
|
|
717
563
|
};
|
|
718
|
-
function
|
|
719
|
-
return i ? Object.assign(Object.assign({},
|
|
564
|
+
function ci(i) {
|
|
565
|
+
return i ? Object.assign(Object.assign({}, Zt), i) : Zt;
|
|
720
566
|
}
|
|
721
|
-
class
|
|
567
|
+
class di {
|
|
722
568
|
constructor(e) {
|
|
723
569
|
this.stack = [], this.textEncoder = e ?? new TextEncoder(), this.chunks = [], this.buf = [];
|
|
724
570
|
}
|
|
@@ -782,7 +628,7 @@ class pi {
|
|
|
782
628
|
* Write a `int32` value, a signed 32 bit varint.
|
|
783
629
|
*/
|
|
784
630
|
int32(e) {
|
|
785
|
-
return Ve(e),
|
|
631
|
+
return Ve(e), Wt(e, this.buf), this;
|
|
786
632
|
}
|
|
787
633
|
/**
|
|
788
634
|
* Write a `bool` value, a variant.
|
|
@@ -838,7 +684,7 @@ class pi {
|
|
|
838
684
|
* Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
|
|
839
685
|
*/
|
|
840
686
|
sint32(e) {
|
|
841
|
-
return Ve(e), e = (e << 1 ^ e >> 31) >>> 0,
|
|
687
|
+
return Ve(e), e = (e << 1 ^ e >> 31) >>> 0, Wt(e, this.buf), this;
|
|
842
688
|
}
|
|
843
689
|
/**
|
|
844
690
|
* Write a `fixed64` value, a signed, fixed-length 64-bit integer.
|
|
@@ -876,26 +722,26 @@ class pi {
|
|
|
876
722
|
return ot(t.lo, t.hi, this.buf), this;
|
|
877
723
|
}
|
|
878
724
|
}
|
|
879
|
-
const
|
|
725
|
+
const jt = {
|
|
880
726
|
emitDefaultValues: !1,
|
|
881
727
|
enumAsInteger: !1,
|
|
882
728
|
useProtoFieldName: !1,
|
|
883
729
|
prettySpaces: 0
|
|
884
|
-
},
|
|
730
|
+
}, qt = {
|
|
885
731
|
ignoreUnknownFields: !1
|
|
886
732
|
};
|
|
887
|
-
function
|
|
888
|
-
return i ? Object.assign(Object.assign({},
|
|
733
|
+
function hi(i) {
|
|
734
|
+
return i ? Object.assign(Object.assign({}, qt), i) : qt;
|
|
889
735
|
}
|
|
890
|
-
function
|
|
891
|
-
return i ? Object.assign(Object.assign({},
|
|
736
|
+
function ui(i) {
|
|
737
|
+
return i ? Object.assign(Object.assign({}, jt), i) : jt;
|
|
892
738
|
}
|
|
893
|
-
function
|
|
739
|
+
function pi(i, e) {
|
|
894
740
|
var t, n;
|
|
895
741
|
let r = Object.assign(Object.assign({}, i), e);
|
|
896
742
|
return r.typeRegistry = [...(t = i == null ? void 0 : i.typeRegistry) !== null && t !== void 0 ? t : [], ...(n = e == null ? void 0 : e.typeRegistry) !== null && n !== void 0 ? n : []], r;
|
|
897
743
|
}
|
|
898
|
-
const
|
|
744
|
+
const gn = Symbol.for("protobuf-ts/message-type");
|
|
899
745
|
function ut(i) {
|
|
900
746
|
let e = !1;
|
|
901
747
|
const t = [];
|
|
@@ -917,11 +763,11 @@ var et;
|
|
|
917
763
|
(function(i) {
|
|
918
764
|
i[i.NO = 0] = "NO", i[i.PACKED = 1] = "PACKED", i[i.UNPACKED = 2] = "UNPACKED";
|
|
919
765
|
})(et || (et = {}));
|
|
920
|
-
function
|
|
766
|
+
function fi(i) {
|
|
921
767
|
var e, t, n, r;
|
|
922
768
|
return i.localName = (e = i.localName) !== null && e !== void 0 ? e : ut(i.name), i.jsonName = (t = i.jsonName) !== null && t !== void 0 ? t : ut(i.name), i.repeat = (n = i.repeat) !== null && n !== void 0 ? n : et.NO, i.opt = (r = i.opt) !== null && r !== void 0 ? r : i.repeat || i.oneof ? !1 : i.kind == "message", i;
|
|
923
769
|
}
|
|
924
|
-
function
|
|
770
|
+
function mi(i) {
|
|
925
771
|
if (typeof i != "object" || i === null || !i.hasOwnProperty("oneofKind"))
|
|
926
772
|
return !1;
|
|
927
773
|
switch (typeof i.oneofKind) {
|
|
@@ -933,7 +779,7 @@ function bi(i) {
|
|
|
933
779
|
return !1;
|
|
934
780
|
}
|
|
935
781
|
}
|
|
936
|
-
class
|
|
782
|
+
class gi {
|
|
937
783
|
constructor(e) {
|
|
938
784
|
var t;
|
|
939
785
|
this.fields = (t = e.fields) !== null && t !== void 0 ? t : [];
|
|
@@ -993,7 +839,7 @@ class yi {
|
|
|
993
839
|
return !0;
|
|
994
840
|
for (const o of s.oneofs) {
|
|
995
841
|
const a = e[o];
|
|
996
|
-
if (!
|
|
842
|
+
if (!mi(a))
|
|
997
843
|
return !1;
|
|
998
844
|
if (a.oneofKind === void 0)
|
|
999
845
|
continue;
|
|
@@ -1119,7 +965,7 @@ function ee(i, e) {
|
|
|
1119
965
|
return i.toString();
|
|
1120
966
|
}
|
|
1121
967
|
}
|
|
1122
|
-
class
|
|
968
|
+
class wi {
|
|
1123
969
|
constructor(e) {
|
|
1124
970
|
this.info = e;
|
|
1125
971
|
}
|
|
@@ -1135,7 +981,7 @@ class Ci {
|
|
|
1135
981
|
// Cannot parse JSON <type of jsonValue> for <type name>#<fieldName>.
|
|
1136
982
|
assert(e, t, n) {
|
|
1137
983
|
if (!e) {
|
|
1138
|
-
let r =
|
|
984
|
+
let r = cn(n);
|
|
1139
985
|
throw (r == "number" || r == "boolean") && (r = n.toString()), new Error(`Cannot parse JSON ${r} for ${this.info.typeName}#${t}`);
|
|
1140
986
|
}
|
|
1141
987
|
}
|
|
@@ -1173,7 +1019,7 @@ class Ci {
|
|
|
1173
1019
|
if (a.kind == "map") {
|
|
1174
1020
|
if (o === null)
|
|
1175
1021
|
continue;
|
|
1176
|
-
this.assert(
|
|
1022
|
+
this.assert(zn(o), a.name, o);
|
|
1177
1023
|
const h = c[l];
|
|
1178
1024
|
for (const [g, w] of Object.entries(o)) {
|
|
1179
1025
|
this.assert(w !== null, a.name + " map value", null);
|
|
@@ -1341,7 +1187,7 @@ class Ci {
|
|
|
1341
1187
|
return new Uint8Array(0);
|
|
1342
1188
|
if (typeof e != "string")
|
|
1343
1189
|
break;
|
|
1344
|
-
return
|
|
1190
|
+
return dn(e);
|
|
1345
1191
|
}
|
|
1346
1192
|
} catch (o) {
|
|
1347
1193
|
s = o.message;
|
|
@@ -1349,7 +1195,7 @@ class Ci {
|
|
|
1349
1195
|
this.assert(!1, r + (s ? " - " + s : ""), e);
|
|
1350
1196
|
}
|
|
1351
1197
|
}
|
|
1352
|
-
class
|
|
1198
|
+
class bi {
|
|
1353
1199
|
constructor(e) {
|
|
1354
1200
|
var t;
|
|
1355
1201
|
this.fields = (t = e.fields) !== null && t !== void 0 ? t : [];
|
|
@@ -1494,7 +1340,7 @@ class Ei {
|
|
|
1494
1340
|
let l = U.from(t);
|
|
1495
1341
|
return l.isZero() && !o ? void 0 : l.toString();
|
|
1496
1342
|
case u.BYTES:
|
|
1497
|
-
return E(t instanceof Uint8Array), t.byteLength ?
|
|
1343
|
+
return E(t instanceof Uint8Array), t.byteLength ? hn(t) : o ? "" : void 0;
|
|
1498
1344
|
}
|
|
1499
1345
|
}
|
|
1500
1346
|
}
|
|
@@ -1520,7 +1366,7 @@ function pt(i, e = oe.STRING) {
|
|
|
1520
1366
|
return 0;
|
|
1521
1367
|
}
|
|
1522
1368
|
}
|
|
1523
|
-
class
|
|
1369
|
+
class yi {
|
|
1524
1370
|
constructor(e) {
|
|
1525
1371
|
this.info = e;
|
|
1526
1372
|
}
|
|
@@ -1666,7 +1512,7 @@ class Ni {
|
|
|
1666
1512
|
}
|
|
1667
1513
|
}
|
|
1668
1514
|
}
|
|
1669
|
-
class
|
|
1515
|
+
class Ci {
|
|
1670
1516
|
constructor(e) {
|
|
1671
1517
|
this.info = e;
|
|
1672
1518
|
}
|
|
@@ -1832,8 +1678,8 @@ class ki {
|
|
|
1832
1678
|
return [n, r, s || o];
|
|
1833
1679
|
}
|
|
1834
1680
|
}
|
|
1835
|
-
function
|
|
1836
|
-
const e = i.messagePrototype ? Object.create(i.messagePrototype) : Object.defineProperty({},
|
|
1681
|
+
function Ei(i) {
|
|
1682
|
+
const e = i.messagePrototype ? Object.create(i.messagePrototype) : Object.defineProperty({}, gn, { value: i });
|
|
1837
1683
|
for (let t of i.fields) {
|
|
1838
1684
|
let n = t.localName;
|
|
1839
1685
|
if (!t.opt)
|
|
@@ -1902,7 +1748,7 @@ function M(i, e, t) {
|
|
|
1902
1748
|
}
|
|
1903
1749
|
}
|
|
1904
1750
|
}
|
|
1905
|
-
function
|
|
1751
|
+
function Ni(i, e, t) {
|
|
1906
1752
|
if (e === t)
|
|
1907
1753
|
return !0;
|
|
1908
1754
|
if (!e || !t)
|
|
@@ -1913,24 +1759,24 @@ function Ii(i, e, t) {
|
|
|
1913
1759
|
case "enum":
|
|
1914
1760
|
case "scalar":
|
|
1915
1761
|
let a = n.kind == "enum" ? u.INT32 : n.T;
|
|
1916
|
-
if (!(n.repeat ?
|
|
1762
|
+
if (!(n.repeat ? Kt(a, s, o) : wn(a, s, o)))
|
|
1917
1763
|
return !1;
|
|
1918
1764
|
break;
|
|
1919
1765
|
case "map":
|
|
1920
|
-
if (!(n.V.kind == "message" ?
|
|
1766
|
+
if (!(n.V.kind == "message" ? Xt(n.V.T(), Ke(s), Ke(o)) : Kt(n.V.kind == "enum" ? u.INT32 : n.V.T, Ke(s), Ke(o))))
|
|
1921
1767
|
return !1;
|
|
1922
1768
|
break;
|
|
1923
1769
|
case "message":
|
|
1924
1770
|
let l = n.T();
|
|
1925
|
-
if (!(n.repeat ?
|
|
1771
|
+
if (!(n.repeat ? Xt(l, s, o) : l.equals(s, o)))
|
|
1926
1772
|
return !1;
|
|
1927
1773
|
break;
|
|
1928
1774
|
}
|
|
1929
1775
|
}
|
|
1930
1776
|
return !0;
|
|
1931
1777
|
}
|
|
1932
|
-
const
|
|
1933
|
-
function
|
|
1778
|
+
const Ke = Object.values;
|
|
1779
|
+
function wn(i, e, t) {
|
|
1934
1780
|
if (e === t)
|
|
1935
1781
|
return !0;
|
|
1936
1782
|
if (i !== u.BYTES)
|
|
@@ -1943,15 +1789,15 @@ function yn(i, e, t) {
|
|
|
1943
1789
|
return !1;
|
|
1944
1790
|
return !0;
|
|
1945
1791
|
}
|
|
1946
|
-
function
|
|
1792
|
+
function Kt(i, e, t) {
|
|
1947
1793
|
if (e.length !== t.length)
|
|
1948
1794
|
return !1;
|
|
1949
1795
|
for (let n = 0; n < e.length; n++)
|
|
1950
|
-
if (!
|
|
1796
|
+
if (!wn(i, e[n], t[n]))
|
|
1951
1797
|
return !1;
|
|
1952
1798
|
return !0;
|
|
1953
1799
|
}
|
|
1954
|
-
function
|
|
1800
|
+
function Xt(i, e, t) {
|
|
1955
1801
|
if (e.length !== t.length)
|
|
1956
1802
|
return !1;
|
|
1957
1803
|
for (let n = 0; n < e.length; n++)
|
|
@@ -1959,13 +1805,13 @@ function zt(i, e, t) {
|
|
|
1959
1805
|
return !1;
|
|
1960
1806
|
return !0;
|
|
1961
1807
|
}
|
|
1962
|
-
const
|
|
1808
|
+
const ki = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));
|
|
1963
1809
|
class Z {
|
|
1964
1810
|
constructor(e, t, n) {
|
|
1965
|
-
this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(
|
|
1811
|
+
this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(fi), this.options = n ?? {}, this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, ki), { [gn]: { value: this } })), this.refTypeCheck = new gi(this), this.refJsonReader = new wi(this), this.refJsonWriter = new bi(this), this.refBinReader = new yi(this), this.refBinWriter = new Ci(this);
|
|
1966
1812
|
}
|
|
1967
1813
|
create(e) {
|
|
1968
|
-
let t =
|
|
1814
|
+
let t = Ei(this);
|
|
1969
1815
|
return e !== void 0 && M(this, t, e), t;
|
|
1970
1816
|
}
|
|
1971
1817
|
/**
|
|
@@ -1984,7 +1830,7 @@ class Z {
|
|
|
1984
1830
|
* Will also return true if both messages are `undefined`.
|
|
1985
1831
|
*/
|
|
1986
1832
|
equals(e, t) {
|
|
1987
|
-
return
|
|
1833
|
+
return Ni(this, e, t);
|
|
1988
1834
|
}
|
|
1989
1835
|
/**
|
|
1990
1836
|
* Is the given value assignable to our message type
|
|
@@ -2010,14 +1856,14 @@ class Z {
|
|
|
2010
1856
|
* Create a new message from binary format.
|
|
2011
1857
|
*/
|
|
2012
1858
|
fromBinary(e, t) {
|
|
2013
|
-
let n =
|
|
1859
|
+
let n = ni(t);
|
|
2014
1860
|
return this.internalBinaryRead(n.readerFactory(e), e.byteLength, n);
|
|
2015
1861
|
}
|
|
2016
1862
|
/**
|
|
2017
1863
|
* Read a new message from a JSON value.
|
|
2018
1864
|
*/
|
|
2019
1865
|
fromJson(e, t) {
|
|
2020
|
-
return this.internalJsonRead(e,
|
|
1866
|
+
return this.internalJsonRead(e, hi(t));
|
|
2021
1867
|
}
|
|
2022
1868
|
/**
|
|
2023
1869
|
* Read a new message from a JSON string.
|
|
@@ -2031,7 +1877,7 @@ class Z {
|
|
|
2031
1877
|
* Write the message to canonical JSON value.
|
|
2032
1878
|
*/
|
|
2033
1879
|
toJson(e, t) {
|
|
2034
|
-
return this.internalJsonWrite(e,
|
|
1880
|
+
return this.internalJsonWrite(e, ui(t));
|
|
2035
1881
|
}
|
|
2036
1882
|
/**
|
|
2037
1883
|
* Convert the message to canonical JSON string.
|
|
@@ -2046,7 +1892,7 @@ class Z {
|
|
|
2046
1892
|
* Write the message to binary format.
|
|
2047
1893
|
*/
|
|
2048
1894
|
toBinary(e, t) {
|
|
2049
|
-
let n =
|
|
1895
|
+
let n = ci(t);
|
|
2050
1896
|
return this.internalBinaryWrite(e, n.writerFactory(), n).finish();
|
|
2051
1897
|
}
|
|
2052
1898
|
/**
|
|
@@ -2062,7 +1908,7 @@ class Z {
|
|
|
2062
1908
|
let r = n ?? this.create();
|
|
2063
1909
|
return this.refJsonReader.read(e, r, t), r;
|
|
2064
1910
|
}
|
|
2065
|
-
throw new Error(`Unable to parse message ${this.typeName} from JSON ${
|
|
1911
|
+
throw new Error(`Unable to parse message ${this.typeName} from JSON ${cn(e)}.`);
|
|
2066
1912
|
}
|
|
2067
1913
|
/**
|
|
2068
1914
|
* This is an internal method. If you just want to write a message
|
|
@@ -2096,14 +1942,14 @@ class Z {
|
|
|
2096
1942
|
return this.refBinReader.read(e, s, n, t), s;
|
|
2097
1943
|
}
|
|
2098
1944
|
}
|
|
2099
|
-
function
|
|
1945
|
+
function Fi(i, e) {
|
|
2100
1946
|
var t, n, r;
|
|
2101
1947
|
let s = i;
|
|
2102
1948
|
return s.service = e, s.localName = (t = s.localName) !== null && t !== void 0 ? t : ut(s.name), s.serverStreaming = !!s.serverStreaming, s.clientStreaming = !!s.clientStreaming, s.options = (n = s.options) !== null && n !== void 0 ? n : {}, s.idempotency = (r = s.idempotency) !== null && r !== void 0 ? r : void 0, s;
|
|
2103
1949
|
}
|
|
2104
1950
|
class gt {
|
|
2105
1951
|
constructor(e, t, n) {
|
|
2106
|
-
this.typeName = e, this.methods = t.map((r) =>
|
|
1952
|
+
this.typeName = e, this.methods = t.map((r) => Fi(r, this)), this.options = n ?? {};
|
|
2107
1953
|
}
|
|
2108
1954
|
}
|
|
2109
1955
|
class A extends Error {
|
|
@@ -2123,22 +1969,22 @@ class A extends Error {
|
|
|
2123
1969
|
`);
|
|
2124
1970
|
}
|
|
2125
1971
|
}
|
|
2126
|
-
function
|
|
1972
|
+
function Ii(i, e) {
|
|
2127
1973
|
if (!e)
|
|
2128
1974
|
return i;
|
|
2129
1975
|
let t = {};
|
|
2130
|
-
|
|
1976
|
+
Xe(i, t), Xe(e, t);
|
|
2131
1977
|
for (let n of Object.keys(e)) {
|
|
2132
1978
|
let r = e[n];
|
|
2133
1979
|
switch (n) {
|
|
2134
1980
|
case "jsonOptions":
|
|
2135
|
-
t.jsonOptions =
|
|
1981
|
+
t.jsonOptions = pi(i.jsonOptions, t.jsonOptions);
|
|
2136
1982
|
break;
|
|
2137
1983
|
case "binaryOptions":
|
|
2138
|
-
t.binaryOptions =
|
|
1984
|
+
t.binaryOptions = Yn(i.binaryOptions, t.binaryOptions);
|
|
2139
1985
|
break;
|
|
2140
1986
|
case "meta":
|
|
2141
|
-
t.meta = {},
|
|
1987
|
+
t.meta = {}, Xe(i.meta, t.meta), Xe(e.meta, t.meta);
|
|
2142
1988
|
break;
|
|
2143
1989
|
case "interceptors":
|
|
2144
1990
|
t.interceptors = i.interceptors ? i.interceptors.concat(r) : r.concat();
|
|
@@ -2147,7 +1993,7 @@ function Ti(i, e) {
|
|
|
2147
1993
|
}
|
|
2148
1994
|
return t;
|
|
2149
1995
|
}
|
|
2150
|
-
function
|
|
1996
|
+
function Xe(i, e) {
|
|
2151
1997
|
if (!i)
|
|
2152
1998
|
return;
|
|
2153
1999
|
let t = e;
|
|
@@ -2218,7 +2064,7 @@ class ge {
|
|
|
2218
2064
|
this._state === J.PENDING && this.reject(e);
|
|
2219
2065
|
}
|
|
2220
2066
|
}
|
|
2221
|
-
class
|
|
2067
|
+
class Li {
|
|
2222
2068
|
constructor() {
|
|
2223
2069
|
this._lis = {
|
|
2224
2070
|
nxt: [],
|
|
@@ -2325,7 +2171,7 @@ class vi {
|
|
|
2325
2171
|
t.q.push(e);
|
|
2326
2172
|
}
|
|
2327
2173
|
}
|
|
2328
|
-
var
|
|
2174
|
+
var Ai = function(i, e, t, n) {
|
|
2329
2175
|
function r(s) {
|
|
2330
2176
|
return s instanceof t ? s : new t(function(o) {
|
|
2331
2177
|
o(s);
|
|
@@ -2352,7 +2198,7 @@ var Bi = function(i, e, t, n) {
|
|
|
2352
2198
|
c((n = n.apply(i, e || [])).next());
|
|
2353
2199
|
});
|
|
2354
2200
|
};
|
|
2355
|
-
class
|
|
2201
|
+
class Ti {
|
|
2356
2202
|
constructor(e, t, n, r, s, o, a) {
|
|
2357
2203
|
this.method = e, this.requestHeaders = t, this.request = n, this.headers = r, this.response = s, this.status = o, this.trailers = a;
|
|
2358
2204
|
}
|
|
@@ -2364,7 +2210,7 @@ class xi {
|
|
|
2364
2210
|
return this.promiseFinished().then((n) => e ? Promise.resolve(e(n)) : n, (n) => t ? Promise.resolve(t(n)) : Promise.reject(n));
|
|
2365
2211
|
}
|
|
2366
2212
|
promiseFinished() {
|
|
2367
|
-
return
|
|
2213
|
+
return Ai(this, void 0, void 0, function* () {
|
|
2368
2214
|
let [e, t, n, r] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);
|
|
2369
2215
|
return {
|
|
2370
2216
|
method: this.method,
|
|
@@ -2378,7 +2224,7 @@ class xi {
|
|
|
2378
2224
|
});
|
|
2379
2225
|
}
|
|
2380
2226
|
}
|
|
2381
|
-
var
|
|
2227
|
+
var vi = function(i, e, t, n) {
|
|
2382
2228
|
function r(s) {
|
|
2383
2229
|
return s instanceof t ? s : new t(function(o) {
|
|
2384
2230
|
o(s);
|
|
@@ -2405,7 +2251,7 @@ var Oi = function(i, e, t, n) {
|
|
|
2405
2251
|
c((n = n.apply(i, e || [])).next());
|
|
2406
2252
|
});
|
|
2407
2253
|
};
|
|
2408
|
-
class
|
|
2254
|
+
class Bi {
|
|
2409
2255
|
constructor(e, t, n, r, s, o, a) {
|
|
2410
2256
|
this.method = e, this.requestHeaders = t, this.request = n, this.headers = r, this.responses = s, this.status = o, this.trailers = a;
|
|
2411
2257
|
}
|
|
@@ -2419,7 +2265,7 @@ class _i {
|
|
|
2419
2265
|
return this.promiseFinished().then((n) => e ? Promise.resolve(e(n)) : n, (n) => t ? Promise.resolve(t(n)) : Promise.reject(n));
|
|
2420
2266
|
}
|
|
2421
2267
|
promiseFinished() {
|
|
2422
|
-
return
|
|
2268
|
+
return vi(this, void 0, void 0, function* () {
|
|
2423
2269
|
let [e, t, n] = yield Promise.all([this.headers, this.status, this.trailers]);
|
|
2424
2270
|
return {
|
|
2425
2271
|
method: this.method,
|
|
@@ -2443,152 +2289,418 @@ function se(i, e, t, n, r) {
|
|
|
2443
2289
|
return o(t, r, n);
|
|
2444
2290
|
}
|
|
2445
2291
|
}
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
return
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
return r ?? this.create();
|
|
2456
|
-
}
|
|
2457
|
-
internalBinaryWrite(e, t, n) {
|
|
2458
|
-
let r = n.writeUnknownFields;
|
|
2459
|
-
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
2292
|
+
var f;
|
|
2293
|
+
(function(i) {
|
|
2294
|
+
i[i.OK = 0] = "OK", i[i.CANCELLED = 1] = "CANCELLED", i[i.UNKNOWN = 2] = "UNKNOWN", i[i.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT", i[i.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", i[i.NOT_FOUND = 5] = "NOT_FOUND", i[i.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", i[i.PERMISSION_DENIED = 7] = "PERMISSION_DENIED", i[i.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", i[i.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED", i[i.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", i[i.ABORTED = 10] = "ABORTED", i[i.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", i[i.UNIMPLEMENTED = 12] = "UNIMPLEMENTED", i[i.INTERNAL = 13] = "INTERNAL", i[i.UNAVAILABLE = 14] = "UNAVAILABLE", i[i.DATA_LOSS = 15] = "DATA_LOSS";
|
|
2295
|
+
})(f || (f = {}));
|
|
2296
|
+
var xi = function(i, e, t, n) {
|
|
2297
|
+
function r(s) {
|
|
2298
|
+
return s instanceof t ? s : new t(function(o) {
|
|
2299
|
+
o(s);
|
|
2300
|
+
});
|
|
2460
2301
|
}
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
no: 1,
|
|
2468
|
-
name: "key",
|
|
2469
|
-
kind: "scalar",
|
|
2470
|
-
T: 9
|
|
2471
|
-
/*ScalarType.STRING*/
|
|
2472
|
-
},
|
|
2473
|
-
{
|
|
2474
|
-
no: 2,
|
|
2475
|
-
name: "url",
|
|
2476
|
-
kind: "scalar",
|
|
2477
|
-
T: 9
|
|
2478
|
-
/*ScalarType.STRING*/
|
|
2302
|
+
return new (t || (t = Promise))(function(s, o) {
|
|
2303
|
+
function a(h) {
|
|
2304
|
+
try {
|
|
2305
|
+
c(n.next(h));
|
|
2306
|
+
} catch (g) {
|
|
2307
|
+
o(g);
|
|
2479
2308
|
}
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
internalBinaryRead(e, t, n, r) {
|
|
2487
|
-
let s = r ?? this.create(), o = e.pos + t;
|
|
2488
|
-
for (; e.pos < o; ) {
|
|
2489
|
-
let [a, l] = e.tag();
|
|
2490
|
-
switch (a) {
|
|
2491
|
-
case /* string key */
|
|
2492
|
-
1:
|
|
2493
|
-
s.key = e.string();
|
|
2494
|
-
break;
|
|
2495
|
-
case /* string url */
|
|
2496
|
-
2:
|
|
2497
|
-
s.url = e.string();
|
|
2498
|
-
break;
|
|
2499
|
-
default:
|
|
2500
|
-
let c = n.readUnknownField;
|
|
2501
|
-
if (c === "throw")
|
|
2502
|
-
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
2503
|
-
let h = e.skip(l);
|
|
2504
|
-
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
2309
|
+
}
|
|
2310
|
+
function l(h) {
|
|
2311
|
+
try {
|
|
2312
|
+
c(n.throw(h));
|
|
2313
|
+
} catch (g) {
|
|
2314
|
+
o(g);
|
|
2505
2315
|
}
|
|
2506
2316
|
}
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2317
|
+
function c(h) {
|
|
2318
|
+
h.done ? s(h.value) : r(h.value).then(a, l);
|
|
2319
|
+
}
|
|
2320
|
+
c((n = n.apply(i, e || [])).next());
|
|
2321
|
+
});
|
|
2322
|
+
};
|
|
2323
|
+
function Gt(i, e, t, n, r) {
|
|
2324
|
+
if (n)
|
|
2325
|
+
for (let [s, o] of Object.entries(n))
|
|
2326
|
+
if (typeof o == "string")
|
|
2327
|
+
i.append(s, o);
|
|
2328
|
+
else
|
|
2329
|
+
for (let a of o)
|
|
2330
|
+
i.append(s, a);
|
|
2331
|
+
if (i.set("Content-Type", e === "text" ? "application/grpc-web-text" : "application/grpc-web+proto"), e == "text" && i.set("Accept", "application/grpc-web-text"), i.set("X-Grpc-Web", "1"), typeof t == "number") {
|
|
2332
|
+
if (t <= 0)
|
|
2333
|
+
throw new A(`timeout ${t} ms exceeded`, f[f.DEADLINE_EXCEEDED]);
|
|
2334
|
+
i.set("grpc-timeout", `${t}m`);
|
|
2335
|
+
} else if (t) {
|
|
2336
|
+
const s = t.getTime(), o = Date.now();
|
|
2337
|
+
if (s <= o)
|
|
2338
|
+
throw new A(`deadline ${t} exceeded`, f[f.DEADLINE_EXCEEDED]);
|
|
2339
|
+
i.set("grpc-timeout", `${s - o}m`);
|
|
2340
|
+
}
|
|
2341
|
+
return i;
|
|
2342
|
+
}
|
|
2343
|
+
function Jt(i, e) {
|
|
2344
|
+
let t = new Uint8Array(5 + i.length);
|
|
2345
|
+
t[0] = te.DATA;
|
|
2346
|
+
for (let n = i.length, r = 4; r > 0; r--)
|
|
2347
|
+
t[r] = n % 256, n >>>= 8;
|
|
2348
|
+
return t.set(i, 5), e === "binary" ? t : hn(t);
|
|
2349
|
+
}
|
|
2350
|
+
function ft(i, e, t) {
|
|
2351
|
+
if (arguments.length === 1) {
|
|
2352
|
+
let l = i, c;
|
|
2353
|
+
try {
|
|
2354
|
+
c = l.type;
|
|
2355
|
+
} catch {
|
|
2356
|
+
}
|
|
2357
|
+
switch (c) {
|
|
2358
|
+
case "error":
|
|
2359
|
+
case "opaque":
|
|
2360
|
+
case "opaqueredirect":
|
|
2361
|
+
throw new A(`fetch response type ${l.type}`, f[f.UNKNOWN]);
|
|
2362
|
+
}
|
|
2363
|
+
return ft(Si(l.headers), l.status, l.statusText);
|
|
2364
|
+
}
|
|
2365
|
+
let n = i, r = e >= 200 && e < 300, s = yn(n), [o, a] = bn(n);
|
|
2366
|
+
return (o === void 0 || o === f.OK) && !r && (o = Ui(e), a = t), [o, a, s];
|
|
2367
|
+
}
|
|
2368
|
+
function zt(i) {
|
|
2369
|
+
let e = Di(i), [t, n] = bn(e), r = yn(e);
|
|
2370
|
+
return [t ?? f.OK, n, r];
|
|
2371
|
+
}
|
|
2372
|
+
var te;
|
|
2373
|
+
(function(i) {
|
|
2374
|
+
i[i.DATA = 0] = "DATA", i[i.TRAILER = 128] = "TRAILER";
|
|
2375
|
+
})(te || (te = {}));
|
|
2376
|
+
function Yt(i, e, t) {
|
|
2377
|
+
return xi(this, void 0, void 0, function* () {
|
|
2378
|
+
let n, r = "", s = new Uint8Array(0), o = _i(e);
|
|
2379
|
+
if (Oi(i)) {
|
|
2380
|
+
let a = i.getReader();
|
|
2381
|
+
n = {
|
|
2382
|
+
next: () => a.read()
|
|
2383
|
+
};
|
|
2384
|
+
} else
|
|
2385
|
+
n = i[Symbol.asyncIterator]();
|
|
2386
|
+
for (; ; ) {
|
|
2387
|
+
let a = yield n.next();
|
|
2388
|
+
if (a.value !== void 0) {
|
|
2389
|
+
if (o === "text") {
|
|
2390
|
+
for (let c = 0; c < a.value.length; c++)
|
|
2391
|
+
r += String.fromCharCode(a.value[c]);
|
|
2392
|
+
let l = r.length - r.length % 4;
|
|
2393
|
+
if (l === 0)
|
|
2394
|
+
continue;
|
|
2395
|
+
s = Qt(s, dn(r.substring(0, l))), r = r.substring(l);
|
|
2396
|
+
} else
|
|
2397
|
+
s = Qt(s, a.value);
|
|
2398
|
+
for (; s.length >= 5 && s[0] === te.DATA; ) {
|
|
2399
|
+
let l = 0;
|
|
2400
|
+
for (let c = 1; c < 5; c++)
|
|
2401
|
+
l = (l << 8) + s[c];
|
|
2402
|
+
if (s.length - 5 >= l)
|
|
2403
|
+
t(te.DATA, s.subarray(5, 5 + l)), s = s.subarray(5 + l);
|
|
2404
|
+
else
|
|
2405
|
+
break;
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
if (a.done) {
|
|
2409
|
+
if (s.length === 0)
|
|
2410
|
+
break;
|
|
2411
|
+
if (s[0] !== te.TRAILER || s.length < 5)
|
|
2412
|
+
throw new A("premature EOF", f[f.DATA_LOSS]);
|
|
2413
|
+
t(te.TRAILER, s.subarray(5));
|
|
2414
|
+
break;
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
});
|
|
2418
|
+
}
|
|
2419
|
+
const Oi = (i) => typeof i.getReader == "function";
|
|
2420
|
+
function Qt(i, e) {
|
|
2421
|
+
let t = new Uint8Array(i.length + e.length);
|
|
2422
|
+
return t.set(i), t.set(e, i.length), t;
|
|
2423
|
+
}
|
|
2424
|
+
function _i(i) {
|
|
2425
|
+
switch (i) {
|
|
2426
|
+
case "application/grpc-web-text":
|
|
2427
|
+
case "application/grpc-web-text+proto":
|
|
2428
|
+
return "text";
|
|
2429
|
+
case "application/grpc-web":
|
|
2430
|
+
case "application/grpc-web+proto":
|
|
2431
|
+
return "binary";
|
|
2432
|
+
case void 0:
|
|
2433
|
+
case null:
|
|
2434
|
+
throw new A("missing response content type", f[f.INTERNAL]);
|
|
2435
|
+
default:
|
|
2436
|
+
throw new A("unexpected response content type: " + i, f[f.INTERNAL]);
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
2439
|
+
function bn(i) {
|
|
2440
|
+
let e, t, n = i["grpc-message"];
|
|
2441
|
+
if (n !== void 0) {
|
|
2442
|
+
if (Array.isArray(n))
|
|
2443
|
+
return [f.INTERNAL, "invalid grpc-web message"];
|
|
2444
|
+
t = n;
|
|
2445
|
+
}
|
|
2446
|
+
let r = i["grpc-status"];
|
|
2447
|
+
if (r !== void 0) {
|
|
2448
|
+
if (Array.isArray(r))
|
|
2449
|
+
return [f.INTERNAL, "invalid grpc-web status"];
|
|
2450
|
+
if (e = parseInt(r, 10), f[e] === void 0)
|
|
2451
|
+
return [f.INTERNAL, "invalid grpc-web status"];
|
|
2452
|
+
}
|
|
2453
|
+
return [e, t];
|
|
2454
|
+
}
|
|
2455
|
+
function yn(i) {
|
|
2456
|
+
let e = {};
|
|
2457
|
+
for (let [t, n] of Object.entries(i))
|
|
2458
|
+
switch (t) {
|
|
2459
|
+
case "grpc-message":
|
|
2460
|
+
case "grpc-status":
|
|
2461
|
+
case "content-type":
|
|
2462
|
+
break;
|
|
2463
|
+
default:
|
|
2464
|
+
e[t] = n;
|
|
2465
|
+
}
|
|
2466
|
+
return e;
|
|
2467
|
+
}
|
|
2468
|
+
function Di(i) {
|
|
2469
|
+
let e = {};
|
|
2470
|
+
for (let t of String.fromCharCode.apply(String, i).trim().split(`\r
|
|
2471
|
+
`)) {
|
|
2472
|
+
if (t == "")
|
|
2473
|
+
continue;
|
|
2474
|
+
let [n, ...r] = t.split(":");
|
|
2475
|
+
const s = r.join(":").trim();
|
|
2476
|
+
n = n.trim();
|
|
2477
|
+
let o = e[n];
|
|
2478
|
+
typeof o == "string" ? e[n] = [o, s] : Array.isArray(o) ? o.push(s) : e[n] = s;
|
|
2479
|
+
}
|
|
2480
|
+
return e;
|
|
2481
|
+
}
|
|
2482
|
+
function Si(i) {
|
|
2483
|
+
let e = {};
|
|
2484
|
+
return i.forEach((t, n) => {
|
|
2485
|
+
let r = e[n];
|
|
2486
|
+
typeof r == "string" ? e[n] = [r, t] : Array.isArray(r) ? r.push(t) : e[n] = t;
|
|
2487
|
+
}), e;
|
|
2488
|
+
}
|
|
2489
|
+
function Ui(i) {
|
|
2490
|
+
switch (i) {
|
|
2491
|
+
case 200:
|
|
2492
|
+
return f.OK;
|
|
2493
|
+
case 400:
|
|
2494
|
+
return f.INVALID_ARGUMENT;
|
|
2495
|
+
case 401:
|
|
2496
|
+
return f.UNAUTHENTICATED;
|
|
2497
|
+
case 403:
|
|
2498
|
+
return f.PERMISSION_DENIED;
|
|
2499
|
+
case 404:
|
|
2500
|
+
return f.NOT_FOUND;
|
|
2501
|
+
case 409:
|
|
2502
|
+
return f.ABORTED;
|
|
2503
|
+
case 412:
|
|
2504
|
+
return f.FAILED_PRECONDITION;
|
|
2505
|
+
case 429:
|
|
2506
|
+
return f.RESOURCE_EXHAUSTED;
|
|
2507
|
+
case 499:
|
|
2508
|
+
return f.CANCELLED;
|
|
2509
|
+
case 500:
|
|
2510
|
+
return f.UNKNOWN;
|
|
2511
|
+
case 501:
|
|
2512
|
+
return f.UNIMPLEMENTED;
|
|
2513
|
+
case 503:
|
|
2514
|
+
return f.UNAVAILABLE;
|
|
2515
|
+
case 504:
|
|
2516
|
+
return f.DEADLINE_EXCEEDED;
|
|
2517
|
+
default:
|
|
2518
|
+
return f.UNKNOWN;
|
|
2513
2519
|
}
|
|
2514
2520
|
}
|
|
2515
|
-
const Ui = new Si(), at = new gt("com.hamropatro.grpc.cms.ImageUploadService", [
|
|
2516
|
-
{ name: "Upload", options: {}, I: Cn, O: Ui }
|
|
2517
|
-
]);
|
|
2518
2521
|
class Ri {
|
|
2519
2522
|
constructor(e) {
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
this.
|
|
2523
|
+
this.defaultOptions = e;
|
|
2524
|
+
}
|
|
2525
|
+
mergeOptions(e) {
|
|
2526
|
+
return Ii(this.defaultOptions, e);
|
|
2524
2527
|
}
|
|
2525
2528
|
/**
|
|
2526
|
-
*
|
|
2529
|
+
* Create an URI for a gRPC web call.
|
|
2530
|
+
*
|
|
2531
|
+
* Takes the `baseUrl` option and appends:
|
|
2532
|
+
* - slash "/"
|
|
2533
|
+
* - package name
|
|
2534
|
+
* - dot "."
|
|
2535
|
+
* - service name
|
|
2536
|
+
* - slash "/"
|
|
2537
|
+
* - method name
|
|
2538
|
+
*
|
|
2539
|
+
* If the service was declared without a package, the package name and dot
|
|
2540
|
+
* are omitted.
|
|
2541
|
+
*
|
|
2542
|
+
* All names are used exactly like declared in .proto.
|
|
2527
2543
|
*/
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
return
|
|
2544
|
+
makeUrl(e, t) {
|
|
2545
|
+
let n = t.baseUrl;
|
|
2546
|
+
return n.endsWith("/") && (n = n.substring(0, n.length - 1)), `${n}/${e.service.typeName}/${e.name}`;
|
|
2531
2547
|
}
|
|
2532
|
-
|
|
2533
|
-
const
|
|
2534
|
-
|
|
2535
|
-
try {
|
|
2536
|
-
const e = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, t = new Ri(
|
|
2537
|
-
e
|
|
2538
|
-
), n = Cn.create();
|
|
2539
|
-
return await t.upload(
|
|
2540
|
-
n
|
|
2541
|
-
);
|
|
2542
|
-
} catch (e) {
|
|
2543
|
-
throw e;
|
|
2548
|
+
clientStreaming(e) {
|
|
2549
|
+
const t = new A("Client streaming is not supported by grpc-web", f[f.UNIMPLEMENTED]);
|
|
2550
|
+
throw t.methodName = e.name, t.serviceName = e.service.typeName, t;
|
|
2544
2551
|
}
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
return await fetch(r, {
|
|
2549
|
-
method: "PUT",
|
|
2550
|
-
headers: {
|
|
2551
|
-
"Content-Type": "image/*",
|
|
2552
|
-
"x-amz-acl": "public-read"
|
|
2553
|
-
},
|
|
2554
|
-
body: t
|
|
2555
|
-
}), r == null ? void 0 : r.split("?")[0];
|
|
2556
|
-
} catch (t) {
|
|
2557
|
-
throw t;
|
|
2552
|
+
duplex(e) {
|
|
2553
|
+
const t = new A("Duplex streaming is not supported by grpc-web", f[f.UNIMPLEMENTED]);
|
|
2554
|
+
throw t.methodName = e.name, t.serviceName = e.service.typeName, t;
|
|
2558
2555
|
}
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2556
|
+
serverStreaming(e, t, n) {
|
|
2557
|
+
var r, s, o, a;
|
|
2558
|
+
let l = n, c = (r = l.format) !== null && r !== void 0 ? r : "text", h = (s = l.fetchInit) !== null && s !== void 0 ? s : {}, g = this.makeUrl(e, l), w = e.I.toBinary(t, l.binaryOptions), F = new ge(), v = new Li(), H = !0, I, $ = new ge(), W, z = new ge();
|
|
2559
|
+
return globalThis.fetch(g, Object.assign(Object.assign({}, h), {
|
|
2560
|
+
method: "POST",
|
|
2561
|
+
headers: Gt(new globalThis.Headers(), c, l.timeout, l.meta),
|
|
2562
|
+
body: Jt(w, c),
|
|
2563
|
+
signal: (o = n.abort) !== null && o !== void 0 ? o : null
|
|
2564
|
+
// node-fetch@3.0.0-beta.9 rejects `undefined`
|
|
2565
|
+
})).then((C) => {
|
|
2566
|
+
let [y, _, j] = ft(C);
|
|
2567
|
+
if (F.resolve(j), y != null && y !== f.OK)
|
|
2568
|
+
throw new A(_ ?? f[y], f[y], j);
|
|
2569
|
+
return y != null && (I = {
|
|
2570
|
+
code: f[y],
|
|
2571
|
+
detail: _ ?? f[y]
|
|
2572
|
+
}), C;
|
|
2573
|
+
}).then((C) => {
|
|
2574
|
+
if (!C.body)
|
|
2575
|
+
throw new A("missing response body", f[f.INTERNAL]);
|
|
2576
|
+
return Yt(C.body, C.headers.get("content-type"), (y, _) => {
|
|
2577
|
+
switch (y) {
|
|
2578
|
+
case te.DATA:
|
|
2579
|
+
v.notifyMessage(e.O.fromBinary(_, l.binaryOptions)), H = !1;
|
|
2580
|
+
break;
|
|
2581
|
+
case te.TRAILER:
|
|
2582
|
+
let j, Y;
|
|
2583
|
+
[j, Y, W] = zt(_), I = {
|
|
2584
|
+
code: f[j],
|
|
2585
|
+
detail: Y ?? f[j]
|
|
2586
|
+
};
|
|
2587
|
+
break;
|
|
2588
|
+
}
|
|
2589
|
+
});
|
|
2590
|
+
}).then(() => {
|
|
2591
|
+
if (!W && !H)
|
|
2592
|
+
throw new A("missing trailers", f[f.DATA_LOSS]);
|
|
2593
|
+
if (!I)
|
|
2594
|
+
throw new A("missing status", f[f.INTERNAL]);
|
|
2595
|
+
if (I.code !== "OK")
|
|
2596
|
+
throw new A(I.detail, I.code, W);
|
|
2597
|
+
v.notifyComplete(), $.resolve(I), z.resolve(W || {});
|
|
2598
|
+
}).catch((C) => {
|
|
2599
|
+
let y;
|
|
2600
|
+
C instanceof A ? y = C : C instanceof Error && C.name === "AbortError" ? y = new A(C.message, f[f.CANCELLED]) : y = new A(C instanceof Error ? C.message : "" + C, f[f.INTERNAL]), y.methodName = e.name, y.serviceName = e.service.typeName, F.rejectPending(y), v.notifyError(y), $.rejectPending(y), z.rejectPending(y);
|
|
2601
|
+
}), new Bi(e, (a = l.meta) !== null && a !== void 0 ? a : {}, t, F.promise, v, $.promise, z.promise);
|
|
2602
|
+
}
|
|
2603
|
+
unary(e, t, n) {
|
|
2604
|
+
var r, s, o, a;
|
|
2605
|
+
let l = n, c = (r = l.format) !== null && r !== void 0 ? r : "text", h = (s = l.fetchInit) !== null && s !== void 0 ? s : {}, g = this.makeUrl(e, l), w = e.I.toBinary(t, l.binaryOptions), F = new ge(), v, H = new ge(), I, $ = new ge(), W, z = new ge();
|
|
2606
|
+
return globalThis.fetch(g, Object.assign(Object.assign({}, h), {
|
|
2607
|
+
method: "POST",
|
|
2608
|
+
headers: Gt(new globalThis.Headers(), c, l.timeout, l.meta),
|
|
2609
|
+
body: Jt(w, c),
|
|
2610
|
+
signal: (o = n.abort) !== null && o !== void 0 ? o : null
|
|
2611
|
+
// node-fetch@3.0.0-beta.9 rejects `undefined`
|
|
2612
|
+
})).then((C) => {
|
|
2613
|
+
let [y, _, j] = ft(C);
|
|
2614
|
+
if (F.resolve(j), y != null && y !== f.OK)
|
|
2615
|
+
throw new A(_ ?? f[y], f[y], j);
|
|
2616
|
+
return y != null && (I = {
|
|
2617
|
+
code: f[y],
|
|
2618
|
+
detail: _ ?? f[y]
|
|
2619
|
+
}), C;
|
|
2620
|
+
}).then((C) => {
|
|
2621
|
+
if (!C.body)
|
|
2622
|
+
throw new A("missing response body", f[f.INTERNAL]);
|
|
2623
|
+
return Yt(C.body, C.headers.get("content-type"), (y, _) => {
|
|
2624
|
+
switch (y) {
|
|
2625
|
+
case te.DATA:
|
|
2626
|
+
if (v)
|
|
2627
|
+
throw new A("unary call received 2nd message", f[f.DATA_LOSS]);
|
|
2628
|
+
v = e.O.fromBinary(_, l.binaryOptions);
|
|
2629
|
+
break;
|
|
2630
|
+
case te.TRAILER:
|
|
2631
|
+
let j, Y;
|
|
2632
|
+
[j, Y, W] = zt(_), I = {
|
|
2633
|
+
code: f[j],
|
|
2634
|
+
detail: Y ?? f[j]
|
|
2635
|
+
};
|
|
2636
|
+
break;
|
|
2637
|
+
}
|
|
2638
|
+
});
|
|
2639
|
+
}).then(() => {
|
|
2640
|
+
if (!W && v)
|
|
2641
|
+
throw new A("missing trailers", f[f.DATA_LOSS]);
|
|
2642
|
+
if (!I)
|
|
2643
|
+
throw new A("missing status", f[f.INTERNAL]);
|
|
2644
|
+
if (!v && I.code === "OK")
|
|
2645
|
+
throw new A("expected error status", f[f.DATA_LOSS]);
|
|
2646
|
+
if (!v)
|
|
2647
|
+
throw new A(I.detail, I.code, W);
|
|
2648
|
+
if (H.resolve(v), I.code !== "OK")
|
|
2649
|
+
throw new A(I.detail, I.code, W);
|
|
2650
|
+
$.resolve(I), z.resolve(W || {});
|
|
2651
|
+
}).catch((C) => {
|
|
2652
|
+
let y;
|
|
2653
|
+
C instanceof A ? y = C : C instanceof Error && C.name === "AbortError" ? y = new A(C.message, f[f.CANCELLED]) : y = new A(C instanceof Error ? C.message : "" + C, f[f.INTERNAL]), y.methodName = e.name, y.serviceName = e.service.typeName, F.rejectPending(y), H.rejectPending(y), $.rejectPending(y), z.rejectPending(y);
|
|
2654
|
+
}), new Ti(e, (a = l.meta) !== null && a !== void 0 ? a : {}, t, F.promise, H.promise, $.promise, z.promise);
|
|
2655
|
+
}
|
|
2656
|
+
}
|
|
2657
|
+
var wt = /* @__PURE__ */ ((i) => (i[i.IMAGE = 0] = "IMAGE", i[i.AUDIO = 1] = "AUDIO", i[i.VIDEO = 2] = "VIDEO", i[i.ALL = 3] = "ALL", i[i.FOLDER = 4] = "FOLDER", i))(wt || {});
|
|
2658
|
+
class Mi extends Z {
|
|
2569
2659
|
constructor() {
|
|
2570
|
-
super("com.hamropatro.grpc.cms.
|
|
2660
|
+
super("com.hamropatro.grpc.cms.SearchRequest", [
|
|
2571
2661
|
{
|
|
2572
2662
|
no: 1,
|
|
2573
|
-
name: "
|
|
2663
|
+
name: "search_value",
|
|
2664
|
+
kind: "scalar",
|
|
2665
|
+
T: 9
|
|
2666
|
+
/*ScalarType.STRING*/
|
|
2667
|
+
},
|
|
2668
|
+
{
|
|
2669
|
+
no: 2,
|
|
2670
|
+
name: "cursor",
|
|
2574
2671
|
kind: "scalar",
|
|
2575
2672
|
T: 9
|
|
2576
2673
|
/*ScalarType.STRING*/
|
|
2674
|
+
},
|
|
2675
|
+
{
|
|
2676
|
+
no: 3,
|
|
2677
|
+
name: "limit",
|
|
2678
|
+
kind: "scalar",
|
|
2679
|
+
T: 5
|
|
2680
|
+
/*ScalarType.INT32*/
|
|
2577
2681
|
}
|
|
2578
2682
|
]);
|
|
2579
2683
|
}
|
|
2580
2684
|
create(e) {
|
|
2581
2685
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
2582
|
-
return t.
|
|
2686
|
+
return t.searchValue = "", t.cursor = "", t.limit = 0, e !== void 0 && M(this, t, e), t;
|
|
2583
2687
|
}
|
|
2584
2688
|
internalBinaryRead(e, t, n, r) {
|
|
2585
2689
|
let s = r ?? this.create(), o = e.pos + t;
|
|
2586
2690
|
for (; e.pos < o; ) {
|
|
2587
2691
|
let [a, l] = e.tag();
|
|
2588
2692
|
switch (a) {
|
|
2589
|
-
case /* string
|
|
2693
|
+
case /* string search_value */
|
|
2590
2694
|
1:
|
|
2591
|
-
s.
|
|
2695
|
+
s.searchValue = e.string();
|
|
2696
|
+
break;
|
|
2697
|
+
case /* string cursor */
|
|
2698
|
+
2:
|
|
2699
|
+
s.cursor = e.string();
|
|
2700
|
+
break;
|
|
2701
|
+
case /* int32 limit */
|
|
2702
|
+
3:
|
|
2703
|
+
s.limit = e.int32();
|
|
2592
2704
|
break;
|
|
2593
2705
|
default:
|
|
2594
2706
|
let c = n.readUnknownField;
|
|
@@ -2601,32 +2713,19 @@ class $i extends Z {
|
|
|
2601
2713
|
return s;
|
|
2602
2714
|
}
|
|
2603
2715
|
internalBinaryWrite(e, t, n) {
|
|
2604
|
-
e.
|
|
2716
|
+
e.searchValue !== "" && t.tag(1, m.LengthDelimited).string(e.searchValue), e.cursor !== "" && t.tag(2, m.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(3, m.Varint).int32(e.limit);
|
|
2605
2717
|
let r = n.writeUnknownFields;
|
|
2606
2718
|
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
2607
2719
|
}
|
|
2608
2720
|
}
|
|
2609
|
-
const
|
|
2610
|
-
class
|
|
2721
|
+
const Cn = new Mi();
|
|
2722
|
+
class Vi extends Z {
|
|
2611
2723
|
constructor() {
|
|
2612
|
-
super("com.hamropatro.grpc.cms.
|
|
2613
|
-
{
|
|
2614
|
-
no: 1,
|
|
2615
|
-
name: "name",
|
|
2616
|
-
kind: "scalar",
|
|
2617
|
-
T: 9
|
|
2618
|
-
/*ScalarType.STRING*/
|
|
2619
|
-
},
|
|
2724
|
+
super("com.hamropatro.grpc.cms.SearchResult", [
|
|
2725
|
+
{ no: 1, name: "items", kind: "message", repeat: 1, T: () => ae },
|
|
2620
2726
|
{
|
|
2621
2727
|
no: 2,
|
|
2622
|
-
name: "
|
|
2623
|
-
kind: "scalar",
|
|
2624
|
-
T: 9
|
|
2625
|
-
/*ScalarType.STRING*/
|
|
2626
|
-
},
|
|
2627
|
-
{
|
|
2628
|
-
no: 3,
|
|
2629
|
-
name: "created_by",
|
|
2728
|
+
name: "next_page_cursor",
|
|
2630
2729
|
kind: "scalar",
|
|
2631
2730
|
T: 9
|
|
2632
2731
|
/*ScalarType.STRING*/
|
|
@@ -2635,24 +2734,20 @@ class Wi extends Z {
|
|
|
2635
2734
|
}
|
|
2636
2735
|
create(e) {
|
|
2637
2736
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
2638
|
-
return t.
|
|
2737
|
+
return t.items = [], t.nextPageCursor = "", e !== void 0 && M(this, t, e), t;
|
|
2639
2738
|
}
|
|
2640
2739
|
internalBinaryRead(e, t, n, r) {
|
|
2641
2740
|
let s = r ?? this.create(), o = e.pos + t;
|
|
2642
2741
|
for (; e.pos < o; ) {
|
|
2643
2742
|
let [a, l] = e.tag();
|
|
2644
2743
|
switch (a) {
|
|
2645
|
-
case /*
|
|
2744
|
+
case /* repeated com.hamropatro.grpc.cms.File items */
|
|
2646
2745
|
1:
|
|
2647
|
-
s.
|
|
2746
|
+
s.items.push(ae.internalBinaryRead(e, e.uint32(), n));
|
|
2648
2747
|
break;
|
|
2649
|
-
case /* string
|
|
2748
|
+
case /* string next_page_cursor */
|
|
2650
2749
|
2:
|
|
2651
|
-
s.
|
|
2652
|
-
break;
|
|
2653
|
-
case /* string created_by */
|
|
2654
|
-
3:
|
|
2655
|
-
s.createdBy = e.string();
|
|
2750
|
+
s.nextPageCursor = e.string();
|
|
2656
2751
|
break;
|
|
2657
2752
|
default:
|
|
2658
2753
|
let c = n.readUnknownField;
|
|
@@ -2665,47 +2760,76 @@ class Wi extends Z {
|
|
|
2665
2760
|
return s;
|
|
2666
2761
|
}
|
|
2667
2762
|
internalBinaryWrite(e, t, n) {
|
|
2668
|
-
|
|
2763
|
+
for (let s = 0; s < e.items.length; s++)
|
|
2764
|
+
ae.internalBinaryWrite(e.items[s], t.tag(1, m.LengthDelimited).fork(), n).join();
|
|
2765
|
+
e.nextPageCursor !== "" && t.tag(2, m.LengthDelimited).string(e.nextPageCursor);
|
|
2669
2766
|
let r = n.writeUnknownFields;
|
|
2670
2767
|
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
2671
2768
|
}
|
|
2672
2769
|
}
|
|
2673
|
-
const
|
|
2674
|
-
class
|
|
2770
|
+
const Hi = new Vi();
|
|
2771
|
+
class $i extends Z {
|
|
2675
2772
|
constructor() {
|
|
2676
|
-
super("com.hamropatro.grpc.cms.
|
|
2773
|
+
super("com.hamropatro.grpc.cms.CreateFileRequest", [
|
|
2677
2774
|
{
|
|
2678
2775
|
no: 1,
|
|
2679
|
-
name: "
|
|
2776
|
+
name: "name",
|
|
2680
2777
|
kind: "scalar",
|
|
2681
2778
|
T: 9
|
|
2682
2779
|
/*ScalarType.STRING*/
|
|
2683
2780
|
},
|
|
2684
2781
|
{
|
|
2685
2782
|
no: 2,
|
|
2686
|
-
name: "
|
|
2783
|
+
name: "folder_name",
|
|
2687
2784
|
kind: "scalar",
|
|
2688
|
-
T:
|
|
2689
|
-
/*ScalarType.
|
|
2690
|
-
}
|
|
2785
|
+
T: 9
|
|
2786
|
+
/*ScalarType.STRING*/
|
|
2787
|
+
},
|
|
2788
|
+
{
|
|
2789
|
+
no: 3,
|
|
2790
|
+
name: "nested_folder_name",
|
|
2791
|
+
kind: "scalar",
|
|
2792
|
+
T: 9
|
|
2793
|
+
/*ScalarType.STRING*/
|
|
2794
|
+
},
|
|
2795
|
+
{
|
|
2796
|
+
no: 4,
|
|
2797
|
+
name: "url",
|
|
2798
|
+
kind: "scalar",
|
|
2799
|
+
T: 9
|
|
2800
|
+
/*ScalarType.STRING*/
|
|
2801
|
+
},
|
|
2802
|
+
{ no: 5, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", wt] }
|
|
2691
2803
|
]);
|
|
2692
2804
|
}
|
|
2693
2805
|
create(e) {
|
|
2694
2806
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
2695
|
-
return t.
|
|
2807
|
+
return t.name = "", t.folderName = "", t.nestedFolderName = "", t.url = "", t.type = 0, e !== void 0 && M(this, t, e), t;
|
|
2696
2808
|
}
|
|
2697
2809
|
internalBinaryRead(e, t, n, r) {
|
|
2698
2810
|
let s = r ?? this.create(), o = e.pos + t;
|
|
2699
2811
|
for (; e.pos < o; ) {
|
|
2700
2812
|
let [a, l] = e.tag();
|
|
2701
2813
|
switch (a) {
|
|
2702
|
-
case /* string
|
|
2814
|
+
case /* string name */
|
|
2703
2815
|
1:
|
|
2704
|
-
s.
|
|
2816
|
+
s.name = e.string();
|
|
2705
2817
|
break;
|
|
2706
|
-
case /*
|
|
2818
|
+
case /* string folder_name */
|
|
2707
2819
|
2:
|
|
2708
|
-
s.
|
|
2820
|
+
s.folderName = e.string();
|
|
2821
|
+
break;
|
|
2822
|
+
case /* string nested_folder_name */
|
|
2823
|
+
3:
|
|
2824
|
+
s.nestedFolderName = e.string();
|
|
2825
|
+
break;
|
|
2826
|
+
case /* string url */
|
|
2827
|
+
4:
|
|
2828
|
+
s.url = e.string();
|
|
2829
|
+
break;
|
|
2830
|
+
case /* com.hamropatro.grpc.cms.FileType type */
|
|
2831
|
+
5:
|
|
2832
|
+
s.type = e.int32();
|
|
2709
2833
|
break;
|
|
2710
2834
|
default:
|
|
2711
2835
|
let c = n.readUnknownField;
|
|
@@ -2718,52 +2842,112 @@ class Pi extends Z {
|
|
|
2718
2842
|
return s;
|
|
2719
2843
|
}
|
|
2720
2844
|
internalBinaryWrite(e, t, n) {
|
|
2721
|
-
e.
|
|
2845
|
+
e.name !== "" && t.tag(1, m.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(2, m.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(3, m.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(4, m.LengthDelimited).string(e.url), e.type !== 0 && t.tag(5, m.Varint).int32(e.type);
|
|
2722
2846
|
let r = n.writeUnknownFields;
|
|
2723
2847
|
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
2724
2848
|
}
|
|
2725
2849
|
}
|
|
2726
|
-
const
|
|
2727
|
-
class
|
|
2850
|
+
const En = new $i();
|
|
2851
|
+
class Wi extends Z {
|
|
2728
2852
|
constructor() {
|
|
2729
|
-
super("com.hamropatro.grpc.cms.
|
|
2730
|
-
{
|
|
2853
|
+
super("com.hamropatro.grpc.cms.File", [
|
|
2854
|
+
{
|
|
2855
|
+
no: 1,
|
|
2856
|
+
name: "key",
|
|
2857
|
+
kind: "scalar",
|
|
2858
|
+
T: 9
|
|
2859
|
+
/*ScalarType.STRING*/
|
|
2860
|
+
},
|
|
2731
2861
|
{
|
|
2732
2862
|
no: 2,
|
|
2733
|
-
name: "
|
|
2863
|
+
name: "name",
|
|
2734
2864
|
kind: "scalar",
|
|
2735
2865
|
T: 9
|
|
2736
2866
|
/*ScalarType.STRING*/
|
|
2737
2867
|
},
|
|
2738
2868
|
{
|
|
2739
2869
|
no: 3,
|
|
2740
|
-
name: "
|
|
2870
|
+
name: "folder_name",
|
|
2741
2871
|
kind: "scalar",
|
|
2742
|
-
T:
|
|
2743
|
-
/*ScalarType.
|
|
2744
|
-
}
|
|
2872
|
+
T: 9
|
|
2873
|
+
/*ScalarType.STRING*/
|
|
2874
|
+
},
|
|
2875
|
+
{
|
|
2876
|
+
no: 4,
|
|
2877
|
+
name: "nested_folder_name",
|
|
2878
|
+
kind: "scalar",
|
|
2879
|
+
T: 9
|
|
2880
|
+
/*ScalarType.STRING*/
|
|
2881
|
+
},
|
|
2882
|
+
{
|
|
2883
|
+
no: 5,
|
|
2884
|
+
name: "url",
|
|
2885
|
+
kind: "scalar",
|
|
2886
|
+
T: 9
|
|
2887
|
+
/*ScalarType.STRING*/
|
|
2888
|
+
},
|
|
2889
|
+
{
|
|
2890
|
+
no: 6,
|
|
2891
|
+
name: "thumbor_url",
|
|
2892
|
+
kind: "scalar",
|
|
2893
|
+
T: 9
|
|
2894
|
+
/*ScalarType.STRING*/
|
|
2895
|
+
},
|
|
2896
|
+
{
|
|
2897
|
+
no: 7,
|
|
2898
|
+
name: "proxy_url",
|
|
2899
|
+
kind: "scalar",
|
|
2900
|
+
T: 9
|
|
2901
|
+
/*ScalarType.STRING*/
|
|
2902
|
+
},
|
|
2903
|
+
{ no: 8, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", wt] },
|
|
2904
|
+
{ no: 9, name: "metadata", kind: "message", T: () => at }
|
|
2745
2905
|
]);
|
|
2746
2906
|
}
|
|
2747
2907
|
create(e) {
|
|
2748
2908
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
2749
|
-
return t.
|
|
2909
|
+
return t.key = "", t.name = "", t.folderName = "", t.nestedFolderName = "", t.url = "", t.thumborUrl = "", t.proxyUrl = "", t.type = 0, e !== void 0 && M(this, t, e), t;
|
|
2750
2910
|
}
|
|
2751
2911
|
internalBinaryRead(e, t, n, r) {
|
|
2752
2912
|
let s = r ?? this.create(), o = e.pos + t;
|
|
2753
2913
|
for (; e.pos < o; ) {
|
|
2754
2914
|
let [a, l] = e.tag();
|
|
2755
2915
|
switch (a) {
|
|
2756
|
-
case /*
|
|
2916
|
+
case /* string key */
|
|
2757
2917
|
1:
|
|
2758
|
-
s.
|
|
2918
|
+
s.key = e.string();
|
|
2759
2919
|
break;
|
|
2760
|
-
case /* string
|
|
2920
|
+
case /* string name */
|
|
2761
2921
|
2:
|
|
2762
|
-
s.
|
|
2922
|
+
s.name = e.string();
|
|
2763
2923
|
break;
|
|
2764
|
-
case /*
|
|
2924
|
+
case /* string folder_name */
|
|
2765
2925
|
3:
|
|
2766
|
-
s.
|
|
2926
|
+
s.folderName = e.string();
|
|
2927
|
+
break;
|
|
2928
|
+
case /* string nested_folder_name */
|
|
2929
|
+
4:
|
|
2930
|
+
s.nestedFolderName = e.string();
|
|
2931
|
+
break;
|
|
2932
|
+
case /* string url */
|
|
2933
|
+
5:
|
|
2934
|
+
s.url = e.string();
|
|
2935
|
+
break;
|
|
2936
|
+
case /* string thumbor_url */
|
|
2937
|
+
6:
|
|
2938
|
+
s.thumborUrl = e.string();
|
|
2939
|
+
break;
|
|
2940
|
+
case /* string proxy_url */
|
|
2941
|
+
7:
|
|
2942
|
+
s.proxyUrl = e.string();
|
|
2943
|
+
break;
|
|
2944
|
+
case /* com.hamropatro.grpc.cms.FileType type */
|
|
2945
|
+
8:
|
|
2946
|
+
s.type = e.int32();
|
|
2947
|
+
break;
|
|
2948
|
+
case /* com.hamropatro.grpc.cms.FileMetadata metadata */
|
|
2949
|
+
9:
|
|
2950
|
+
s.metadata = at.internalBinaryRead(e, e.uint32(), n, s.metadata);
|
|
2767
2951
|
break;
|
|
2768
2952
|
default:
|
|
2769
2953
|
let c = n.readUnknownField;
|
|
@@ -2776,71 +2960,69 @@ class Zi extends Z {
|
|
|
2776
2960
|
return s;
|
|
2777
2961
|
}
|
|
2778
2962
|
internalBinaryWrite(e, t, n) {
|
|
2779
|
-
|
|
2780
|
-
Ie.internalBinaryWrite(e.folder[s], t.tag(1, m.LengthDelimited).fork(), n).join();
|
|
2781
|
-
e.nextCursor !== "" && t.tag(2, m.LengthDelimited).string(e.nextCursor), e.hasMore !== !1 && t.tag(3, m.Varint).bool(e.hasMore);
|
|
2963
|
+
e.key !== "" && t.tag(1, m.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, m.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(3, m.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(4, m.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(5, m.LengthDelimited).string(e.url), e.thumborUrl !== "" && t.tag(6, m.LengthDelimited).string(e.thumborUrl), e.proxyUrl !== "" && t.tag(7, m.LengthDelimited).string(e.proxyUrl), e.type !== 0 && t.tag(8, m.Varint).int32(e.type), e.metadata && at.internalBinaryWrite(e.metadata, t.tag(9, m.LengthDelimited).fork(), n).join();
|
|
2782
2964
|
let r = n.writeUnknownFields;
|
|
2783
2965
|
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
2784
2966
|
}
|
|
2785
2967
|
}
|
|
2786
|
-
const
|
|
2787
|
-
class
|
|
2968
|
+
const ae = new Wi();
|
|
2969
|
+
class Pi extends Z {
|
|
2788
2970
|
constructor() {
|
|
2789
|
-
super("com.hamropatro.grpc.cms.
|
|
2971
|
+
super("com.hamropatro.grpc.cms.FileMetadata", [
|
|
2790
2972
|
{
|
|
2791
2973
|
no: 1,
|
|
2792
|
-
name: "
|
|
2974
|
+
name: "height",
|
|
2793
2975
|
kind: "scalar",
|
|
2794
|
-
T:
|
|
2795
|
-
/*ScalarType.
|
|
2976
|
+
T: 5
|
|
2977
|
+
/*ScalarType.INT32*/
|
|
2796
2978
|
},
|
|
2797
2979
|
{
|
|
2798
2980
|
no: 2,
|
|
2799
|
-
name: "
|
|
2981
|
+
name: "width",
|
|
2800
2982
|
kind: "scalar",
|
|
2801
|
-
T:
|
|
2802
|
-
/*ScalarType.
|
|
2983
|
+
T: 5
|
|
2984
|
+
/*ScalarType.INT32*/
|
|
2803
2985
|
},
|
|
2804
2986
|
{
|
|
2805
2987
|
no: 3,
|
|
2806
|
-
name: "
|
|
2988
|
+
name: "background_color",
|
|
2807
2989
|
kind: "scalar",
|
|
2808
2990
|
T: 9
|
|
2809
2991
|
/*ScalarType.STRING*/
|
|
2810
2992
|
},
|
|
2811
2993
|
{
|
|
2812
2994
|
no: 4,
|
|
2813
|
-
name: "
|
|
2995
|
+
name: "aspect_ratio",
|
|
2814
2996
|
kind: "scalar",
|
|
2815
|
-
T:
|
|
2816
|
-
/*ScalarType.
|
|
2997
|
+
T: 1
|
|
2998
|
+
/*ScalarType.DOUBLE*/
|
|
2817
2999
|
}
|
|
2818
3000
|
]);
|
|
2819
3001
|
}
|
|
2820
3002
|
create(e) {
|
|
2821
3003
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
2822
|
-
return t.
|
|
3004
|
+
return t.height = 0, t.width = 0, t.backgroundColor = "", t.aspectRatio = 0, e !== void 0 && M(this, t, e), t;
|
|
2823
3005
|
}
|
|
2824
3006
|
internalBinaryRead(e, t, n, r) {
|
|
2825
3007
|
let s = r ?? this.create(), o = e.pos + t;
|
|
2826
3008
|
for (; e.pos < o; ) {
|
|
2827
3009
|
let [a, l] = e.tag();
|
|
2828
3010
|
switch (a) {
|
|
2829
|
-
case /*
|
|
3011
|
+
case /* int32 height */
|
|
2830
3012
|
1:
|
|
2831
|
-
s.
|
|
3013
|
+
s.height = e.int32();
|
|
2832
3014
|
break;
|
|
2833
|
-
case /*
|
|
3015
|
+
case /* int32 width */
|
|
2834
3016
|
2:
|
|
2835
|
-
s.
|
|
3017
|
+
s.width = e.int32();
|
|
2836
3018
|
break;
|
|
2837
|
-
case /* string
|
|
3019
|
+
case /* string background_color */
|
|
2838
3020
|
3:
|
|
2839
|
-
s.
|
|
3021
|
+
s.backgroundColor = e.string();
|
|
2840
3022
|
break;
|
|
2841
|
-
case /*
|
|
3023
|
+
case /* double aspect_ratio */
|
|
2842
3024
|
4:
|
|
2843
|
-
s.
|
|
3025
|
+
s.aspectRatio = e.double();
|
|
2844
3026
|
break;
|
|
2845
3027
|
default:
|
|
2846
3028
|
let c = n.readUnknownField;
|
|
@@ -2853,145 +3035,36 @@ class qi extends Z {
|
|
|
2853
3035
|
return s;
|
|
2854
3036
|
}
|
|
2855
3037
|
internalBinaryWrite(e, t, n) {
|
|
2856
|
-
e.
|
|
3038
|
+
e.height !== 0 && t.tag(1, m.Varint).int32(e.height), e.width !== 0 && t.tag(2, m.Varint).int32(e.width), e.backgroundColor !== "" && t.tag(3, m.LengthDelimited).string(e.backgroundColor), e.aspectRatio !== 0 && t.tag(4, m.Bit64).double(e.aspectRatio);
|
|
2857
3039
|
let r = n.writeUnknownFields;
|
|
2858
3040
|
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
2859
3041
|
}
|
|
2860
3042
|
}
|
|
2861
|
-
const
|
|
2862
|
-
|
|
2863
|
-
{ name: "getFolders", options: {}, I: kn, O: ji },
|
|
2864
|
-
{ name: "updateFolder", options: {}, I: Ie, O: Ie },
|
|
2865
|
-
{ name: "deleteFolder", options: {}, I: En, O: Ie }
|
|
2866
|
-
]);
|
|
2867
|
-
class nt {
|
|
2868
|
-
constructor(e) {
|
|
2869
|
-
B(this, "typeName", lt.typeName);
|
|
2870
|
-
B(this, "methods", lt.methods);
|
|
2871
|
-
B(this, "options", lt.options);
|
|
2872
|
-
this._transport = e;
|
|
2873
|
-
}
|
|
2874
|
-
/**
|
|
2875
|
-
* @generated from protobuf rpc: createFolder(com.hamropatro.grpc.cms.CreateFolderRequest) returns (com.hamropatro.grpc.cms.Folder);
|
|
2876
|
-
*/
|
|
2877
|
-
createFolder(e, t) {
|
|
2878
|
-
const n = this.methods[0], r = this._transport.mergeOptions(t);
|
|
2879
|
-
return se("unary", this._transport, n, r, e);
|
|
2880
|
-
}
|
|
2881
|
-
/**
|
|
2882
|
-
* @generated from protobuf rpc: getFolders(com.hamropatro.grpc.cms.GetAllFoldersRequest) returns (com.hamropatro.grpc.cms.GetAllFoldersResponse);
|
|
2883
|
-
*/
|
|
2884
|
-
getFolders(e, t) {
|
|
2885
|
-
const n = this.methods[1], r = this._transport.mergeOptions(t);
|
|
2886
|
-
return se("unary", this._transport, n, r, e);
|
|
2887
|
-
}
|
|
2888
|
-
/**
|
|
2889
|
-
* @generated from protobuf rpc: updateFolder(com.hamropatro.grpc.cms.Folder) returns (com.hamropatro.grpc.cms.Folder);
|
|
2890
|
-
*/
|
|
2891
|
-
updateFolder(e, t) {
|
|
2892
|
-
const n = this.methods[2], r = this._transport.mergeOptions(t);
|
|
2893
|
-
return se("unary", this._transport, n, r, e);
|
|
2894
|
-
}
|
|
2895
|
-
/**
|
|
2896
|
-
* @generated from protobuf rpc: deleteFolder(com.hamropatro.grpc.cms.DeleteFolderRequest) returns (com.hamropatro.grpc.cms.Folder);
|
|
2897
|
-
*/
|
|
2898
|
-
deleteFolder(e, t) {
|
|
2899
|
-
const n = this.methods[3], r = this._transport.mergeOptions(t);
|
|
2900
|
-
return se("unary", this._transport, n, r, e);
|
|
2901
|
-
}
|
|
2902
|
-
}
|
|
2903
|
-
const Ki = async (i, e = 20, t) => {
|
|
2904
|
-
var o;
|
|
2905
|
-
const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new nt(n), s = kn.create();
|
|
2906
|
-
try {
|
|
2907
|
-
return s.cursor = i, s.limit = e, await r.getFolders(
|
|
2908
|
-
s,
|
|
2909
|
-
t
|
|
2910
|
-
);
|
|
2911
|
-
} catch (a) {
|
|
2912
|
-
throw a;
|
|
2913
|
-
}
|
|
2914
|
-
}, Xi = async (i, e, t, n) => {
|
|
2915
|
-
var r;
|
|
2916
|
-
try {
|
|
2917
|
-
const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new nt(s), a = Nn.create();
|
|
2918
|
-
return a.name = i, a.nestedFolderName = e, a.createdBy = t, await o.createFolder(
|
|
2919
|
-
a,
|
|
2920
|
-
n
|
|
2921
|
-
);
|
|
2922
|
-
} catch (s) {
|
|
2923
|
-
throw s;
|
|
2924
|
-
}
|
|
2925
|
-
}, Gi = async (i, e, t, n, r) => {
|
|
2926
|
-
var s;
|
|
2927
|
-
try {
|
|
2928
|
-
const o = (s = window.ImageSalonSDK) == null ? void 0 : s.grpcConfig, a = new nt(o), l = Ie.create();
|
|
2929
|
-
return l.name = e, l.key = i, l.nestedFolderName = t, l.createdBy = n, await a.updateFolder(
|
|
2930
|
-
l,
|
|
2931
|
-
r
|
|
2932
|
-
);
|
|
2933
|
-
} catch (o) {
|
|
2934
|
-
throw o;
|
|
2935
|
-
}
|
|
2936
|
-
}, Ji = async (i, e) => {
|
|
2937
|
-
var t;
|
|
2938
|
-
try {
|
|
2939
|
-
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new nt(n), s = En.create();
|
|
2940
|
-
return s.key = i, await r.deleteFolder(
|
|
2941
|
-
s,
|
|
2942
|
-
e
|
|
2943
|
-
);
|
|
2944
|
-
} catch (n) {
|
|
2945
|
-
throw n;
|
|
2946
|
-
}
|
|
2947
|
-
};
|
|
2948
|
-
var wt = /* @__PURE__ */ ((i) => (i[i.IMAGE = 0] = "IMAGE", i[i.AUDIO = 1] = "AUDIO", i[i.VIDEO = 2] = "VIDEO", i[i.ALL = 3] = "ALL", i[i.FOLDER = 4] = "FOLDER", i))(wt || {});
|
|
2949
|
-
class zi extends Z {
|
|
3043
|
+
const at = new Pi();
|
|
3044
|
+
class Zi extends Z {
|
|
2950
3045
|
constructor() {
|
|
2951
|
-
super("com.hamropatro.grpc.cms.
|
|
3046
|
+
super("com.hamropatro.grpc.cms.DeleteFileRequest", [
|
|
2952
3047
|
{
|
|
2953
3048
|
no: 1,
|
|
2954
|
-
name: "
|
|
2955
|
-
kind: "scalar",
|
|
2956
|
-
T: 9
|
|
2957
|
-
/*ScalarType.STRING*/
|
|
2958
|
-
},
|
|
2959
|
-
{
|
|
2960
|
-
no: 2,
|
|
2961
|
-
name: "cursor",
|
|
3049
|
+
name: "key",
|
|
2962
3050
|
kind: "scalar",
|
|
2963
3051
|
T: 9
|
|
2964
3052
|
/*ScalarType.STRING*/
|
|
2965
|
-
},
|
|
2966
|
-
{
|
|
2967
|
-
no: 3,
|
|
2968
|
-
name: "limit",
|
|
2969
|
-
kind: "scalar",
|
|
2970
|
-
T: 5
|
|
2971
|
-
/*ScalarType.INT32*/
|
|
2972
3053
|
}
|
|
2973
3054
|
]);
|
|
2974
3055
|
}
|
|
2975
3056
|
create(e) {
|
|
2976
3057
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
2977
|
-
return t.
|
|
3058
|
+
return t.key = "", e !== void 0 && M(this, t, e), t;
|
|
2978
3059
|
}
|
|
2979
3060
|
internalBinaryRead(e, t, n, r) {
|
|
2980
3061
|
let s = r ?? this.create(), o = e.pos + t;
|
|
2981
3062
|
for (; e.pos < o; ) {
|
|
2982
3063
|
let [a, l] = e.tag();
|
|
2983
3064
|
switch (a) {
|
|
2984
|
-
case /* string
|
|
3065
|
+
case /* string key */
|
|
2985
3066
|
1:
|
|
2986
|
-
s.
|
|
2987
|
-
break;
|
|
2988
|
-
case /* string cursor */
|
|
2989
|
-
2:
|
|
2990
|
-
s.cursor = e.string();
|
|
2991
|
-
break;
|
|
2992
|
-
case /* int32 limit */
|
|
2993
|
-
3:
|
|
2994
|
-
s.limit = e.int32();
|
|
3067
|
+
s.key = e.string();
|
|
2995
3068
|
break;
|
|
2996
3069
|
default:
|
|
2997
3070
|
let c = n.readUnknownField;
|
|
@@ -3004,41 +3077,36 @@ class zi extends Z {
|
|
|
3004
3077
|
return s;
|
|
3005
3078
|
}
|
|
3006
3079
|
internalBinaryWrite(e, t, n) {
|
|
3007
|
-
e.
|
|
3080
|
+
e.key !== "" && t.tag(1, m.LengthDelimited).string(e.key);
|
|
3008
3081
|
let r = n.writeUnknownFields;
|
|
3009
3082
|
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3010
3083
|
}
|
|
3011
3084
|
}
|
|
3012
|
-
const
|
|
3013
|
-
class
|
|
3085
|
+
const Nn = new Zi();
|
|
3086
|
+
class ji extends Z {
|
|
3014
3087
|
constructor() {
|
|
3015
|
-
super("com.hamropatro.grpc.cms.
|
|
3016
|
-
{ no: 1, name: "items", kind: "message", repeat: 1, T: () => ae },
|
|
3088
|
+
super("com.hamropatro.grpc.cms.DeleteFileResponse", [
|
|
3017
3089
|
{
|
|
3018
|
-
no:
|
|
3019
|
-
name: "
|
|
3090
|
+
no: 1,
|
|
3091
|
+
name: "is_deleted",
|
|
3020
3092
|
kind: "scalar",
|
|
3021
|
-
T:
|
|
3022
|
-
/*ScalarType.
|
|
3093
|
+
T: 8
|
|
3094
|
+
/*ScalarType.BOOL*/
|
|
3023
3095
|
}
|
|
3024
3096
|
]);
|
|
3025
3097
|
}
|
|
3026
3098
|
create(e) {
|
|
3027
3099
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3028
|
-
return t.
|
|
3100
|
+
return t.isDeleted = !1, e !== void 0 && M(this, t, e), t;
|
|
3029
3101
|
}
|
|
3030
3102
|
internalBinaryRead(e, t, n, r) {
|
|
3031
3103
|
let s = r ?? this.create(), o = e.pos + t;
|
|
3032
3104
|
for (; e.pos < o; ) {
|
|
3033
3105
|
let [a, l] = e.tag();
|
|
3034
3106
|
switch (a) {
|
|
3035
|
-
case /*
|
|
3107
|
+
case /* bool is_deleted */
|
|
3036
3108
|
1:
|
|
3037
|
-
s.
|
|
3038
|
-
break;
|
|
3039
|
-
case /* string next_page_cursor */
|
|
3040
|
-
2:
|
|
3041
|
-
s.nextPageCursor = e.string();
|
|
3109
|
+
s.isDeleted = e.bool();
|
|
3042
3110
|
break;
|
|
3043
3111
|
default:
|
|
3044
3112
|
let c = n.readUnknownField;
|
|
@@ -3051,76 +3119,58 @@ class Yi extends Z {
|
|
|
3051
3119
|
return s;
|
|
3052
3120
|
}
|
|
3053
3121
|
internalBinaryWrite(e, t, n) {
|
|
3054
|
-
|
|
3055
|
-
ae.internalBinaryWrite(e.items[s], t.tag(1, m.LengthDelimited).fork(), n).join();
|
|
3056
|
-
e.nextPageCursor !== "" && t.tag(2, m.LengthDelimited).string(e.nextPageCursor);
|
|
3122
|
+
e.isDeleted !== !1 && t.tag(1, m.Varint).bool(e.isDeleted);
|
|
3057
3123
|
let r = n.writeUnknownFields;
|
|
3058
3124
|
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3059
3125
|
}
|
|
3060
3126
|
}
|
|
3061
|
-
const
|
|
3062
|
-
class
|
|
3127
|
+
const qi = new ji();
|
|
3128
|
+
class Ki extends Z {
|
|
3063
3129
|
constructor() {
|
|
3064
|
-
super("com.hamropatro.grpc.cms.
|
|
3130
|
+
super("com.hamropatro.grpc.cms.GetFilesByFolderRequest", [
|
|
3065
3131
|
{
|
|
3066
3132
|
no: 1,
|
|
3067
|
-
name: "
|
|
3133
|
+
name: "folder_name",
|
|
3068
3134
|
kind: "scalar",
|
|
3069
3135
|
T: 9
|
|
3070
3136
|
/*ScalarType.STRING*/
|
|
3071
3137
|
},
|
|
3072
3138
|
{
|
|
3073
3139
|
no: 2,
|
|
3074
|
-
name: "
|
|
3140
|
+
name: "cursor",
|
|
3075
3141
|
kind: "scalar",
|
|
3076
3142
|
T: 9
|
|
3077
3143
|
/*ScalarType.STRING*/
|
|
3078
3144
|
},
|
|
3079
3145
|
{
|
|
3080
3146
|
no: 3,
|
|
3081
|
-
name: "
|
|
3082
|
-
kind: "scalar",
|
|
3083
|
-
T: 9
|
|
3084
|
-
/*ScalarType.STRING*/
|
|
3085
|
-
},
|
|
3086
|
-
{
|
|
3087
|
-
no: 4,
|
|
3088
|
-
name: "url",
|
|
3147
|
+
name: "limit",
|
|
3089
3148
|
kind: "scalar",
|
|
3090
|
-
T:
|
|
3091
|
-
/*ScalarType.
|
|
3092
|
-
}
|
|
3093
|
-
{ no: 5, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", wt] }
|
|
3149
|
+
T: 5
|
|
3150
|
+
/*ScalarType.INT32*/
|
|
3151
|
+
}
|
|
3094
3152
|
]);
|
|
3095
3153
|
}
|
|
3096
3154
|
create(e) {
|
|
3097
3155
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3098
|
-
return t.
|
|
3156
|
+
return t.folderName = "", t.cursor = "", t.limit = 0, e !== void 0 && M(this, t, e), t;
|
|
3099
3157
|
}
|
|
3100
3158
|
internalBinaryRead(e, t, n, r) {
|
|
3101
3159
|
let s = r ?? this.create(), o = e.pos + t;
|
|
3102
3160
|
for (; e.pos < o; ) {
|
|
3103
3161
|
let [a, l] = e.tag();
|
|
3104
3162
|
switch (a) {
|
|
3105
|
-
case /* string
|
|
3163
|
+
case /* string folder_name */
|
|
3106
3164
|
1:
|
|
3107
|
-
s.
|
|
3165
|
+
s.folderName = e.string();
|
|
3108
3166
|
break;
|
|
3109
|
-
case /* string
|
|
3167
|
+
case /* string cursor */
|
|
3110
3168
|
2:
|
|
3111
|
-
s.
|
|
3169
|
+
s.cursor = e.string();
|
|
3112
3170
|
break;
|
|
3113
|
-
case /*
|
|
3171
|
+
case /* int32 limit */
|
|
3114
3172
|
3:
|
|
3115
|
-
s.
|
|
3116
|
-
break;
|
|
3117
|
-
case /* string url */
|
|
3118
|
-
4:
|
|
3119
|
-
s.url = e.string();
|
|
3120
|
-
break;
|
|
3121
|
-
case /* com.hamropatro.grpc.cms.FileType type */
|
|
3122
|
-
5:
|
|
3123
|
-
s.type = e.int32();
|
|
3173
|
+
s.limit = e.int32();
|
|
3124
3174
|
break;
|
|
3125
3175
|
default:
|
|
3126
3176
|
let c = n.readUnknownField;
|
|
@@ -3133,112 +3183,52 @@ class er extends Z {
|
|
|
3133
3183
|
return s;
|
|
3134
3184
|
}
|
|
3135
3185
|
internalBinaryWrite(e, t, n) {
|
|
3136
|
-
e.
|
|
3186
|
+
e.folderName !== "" && t.tag(1, m.LengthDelimited).string(e.folderName), e.cursor !== "" && t.tag(2, m.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(3, m.Varint).int32(e.limit);
|
|
3137
3187
|
let r = n.writeUnknownFields;
|
|
3138
3188
|
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3139
3189
|
}
|
|
3140
3190
|
}
|
|
3141
|
-
const
|
|
3142
|
-
class
|
|
3191
|
+
const kn = new Ki();
|
|
3192
|
+
class Xi extends Z {
|
|
3143
3193
|
constructor() {
|
|
3144
|
-
super("com.hamropatro.grpc.cms.
|
|
3145
|
-
{
|
|
3146
|
-
no: 1,
|
|
3147
|
-
name: "key",
|
|
3148
|
-
kind: "scalar",
|
|
3149
|
-
T: 9
|
|
3150
|
-
/*ScalarType.STRING*/
|
|
3151
|
-
},
|
|
3194
|
+
super("com.hamropatro.grpc.cms.GetFilesByFolderResponse", [
|
|
3195
|
+
{ no: 1, name: "files", kind: "message", repeat: 1, T: () => ae },
|
|
3152
3196
|
{
|
|
3153
3197
|
no: 2,
|
|
3154
|
-
name: "
|
|
3198
|
+
name: "next_cursor",
|
|
3155
3199
|
kind: "scalar",
|
|
3156
3200
|
T: 9
|
|
3157
3201
|
/*ScalarType.STRING*/
|
|
3158
3202
|
},
|
|
3159
3203
|
{
|
|
3160
3204
|
no: 3,
|
|
3161
|
-
name: "
|
|
3162
|
-
kind: "scalar",
|
|
3163
|
-
T: 9
|
|
3164
|
-
/*ScalarType.STRING*/
|
|
3165
|
-
},
|
|
3166
|
-
{
|
|
3167
|
-
no: 4,
|
|
3168
|
-
name: "nested_folder_name",
|
|
3169
|
-
kind: "scalar",
|
|
3170
|
-
T: 9
|
|
3171
|
-
/*ScalarType.STRING*/
|
|
3172
|
-
},
|
|
3173
|
-
{
|
|
3174
|
-
no: 5,
|
|
3175
|
-
name: "url",
|
|
3176
|
-
kind: "scalar",
|
|
3177
|
-
T: 9
|
|
3178
|
-
/*ScalarType.STRING*/
|
|
3179
|
-
},
|
|
3180
|
-
{
|
|
3181
|
-
no: 6,
|
|
3182
|
-
name: "thumbor_url",
|
|
3183
|
-
kind: "scalar",
|
|
3184
|
-
T: 9
|
|
3185
|
-
/*ScalarType.STRING*/
|
|
3186
|
-
},
|
|
3187
|
-
{
|
|
3188
|
-
no: 7,
|
|
3189
|
-
name: "proxy_url",
|
|
3205
|
+
name: "has_more",
|
|
3190
3206
|
kind: "scalar",
|
|
3191
|
-
T:
|
|
3192
|
-
/*ScalarType.
|
|
3193
|
-
}
|
|
3194
|
-
{ no: 8, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", wt] },
|
|
3195
|
-
{ no: 9, name: "metadata", kind: "message", T: () => ct }
|
|
3207
|
+
T: 8
|
|
3208
|
+
/*ScalarType.BOOL*/
|
|
3209
|
+
}
|
|
3196
3210
|
]);
|
|
3197
3211
|
}
|
|
3198
3212
|
create(e) {
|
|
3199
3213
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3200
|
-
return t.
|
|
3214
|
+
return t.files = [], t.nextCursor = "", t.hasMore = !1, e !== void 0 && M(this, t, e), t;
|
|
3201
3215
|
}
|
|
3202
3216
|
internalBinaryRead(e, t, n, r) {
|
|
3203
3217
|
let s = r ?? this.create(), o = e.pos + t;
|
|
3204
3218
|
for (; e.pos < o; ) {
|
|
3205
3219
|
let [a, l] = e.tag();
|
|
3206
3220
|
switch (a) {
|
|
3207
|
-
case /*
|
|
3221
|
+
case /* repeated com.hamropatro.grpc.cms.File files */
|
|
3208
3222
|
1:
|
|
3209
|
-
s.
|
|
3223
|
+
s.files.push(ae.internalBinaryRead(e, e.uint32(), n));
|
|
3210
3224
|
break;
|
|
3211
|
-
case /* string
|
|
3225
|
+
case /* string next_cursor */
|
|
3212
3226
|
2:
|
|
3213
|
-
s.
|
|
3227
|
+
s.nextCursor = e.string();
|
|
3214
3228
|
break;
|
|
3215
|
-
case /*
|
|
3229
|
+
case /* bool has_more */
|
|
3216
3230
|
3:
|
|
3217
|
-
s.
|
|
3218
|
-
break;
|
|
3219
|
-
case /* string nested_folder_name */
|
|
3220
|
-
4:
|
|
3221
|
-
s.nestedFolderName = e.string();
|
|
3222
|
-
break;
|
|
3223
|
-
case /* string url */
|
|
3224
|
-
5:
|
|
3225
|
-
s.url = e.string();
|
|
3226
|
-
break;
|
|
3227
|
-
case /* string thumbor_url */
|
|
3228
|
-
6:
|
|
3229
|
-
s.thumborUrl = e.string();
|
|
3230
|
-
break;
|
|
3231
|
-
case /* string proxy_url */
|
|
3232
|
-
7:
|
|
3233
|
-
s.proxyUrl = e.string();
|
|
3234
|
-
break;
|
|
3235
|
-
case /* com.hamropatro.grpc.cms.FileType type */
|
|
3236
|
-
8:
|
|
3237
|
-
s.type = e.int32();
|
|
3238
|
-
break;
|
|
3239
|
-
case /* com.hamropatro.grpc.cms.FileMetadata metadata */
|
|
3240
|
-
9:
|
|
3241
|
-
s.metadata = ct.internalBinaryRead(e, e.uint32(), n, s.metadata);
|
|
3231
|
+
s.hasMore = e.bool();
|
|
3242
3232
|
break;
|
|
3243
3233
|
default:
|
|
3244
3234
|
let c = n.readUnknownField;
|
|
@@ -3251,69 +3241,143 @@ class tr extends Z {
|
|
|
3251
3241
|
return s;
|
|
3252
3242
|
}
|
|
3253
3243
|
internalBinaryWrite(e, t, n) {
|
|
3254
|
-
|
|
3244
|
+
for (let s = 0; s < e.files.length; s++)
|
|
3245
|
+
ae.internalBinaryWrite(e.files[s], t.tag(1, m.LengthDelimited).fork(), n).join();
|
|
3246
|
+
e.nextCursor !== "" && t.tag(2, m.LengthDelimited).string(e.nextCursor), e.hasMore !== !1 && t.tag(3, m.Varint).bool(e.hasMore);
|
|
3255
3247
|
let r = n.writeUnknownFields;
|
|
3256
3248
|
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3257
3249
|
}
|
|
3258
3250
|
}
|
|
3259
|
-
const
|
|
3260
|
-
|
|
3251
|
+
const Gi = new Xi(), lt = new gt("com.hamropatro.grpc.cms.FileService", [
|
|
3252
|
+
{ name: "createFile", options: {}, I: En, O: ae },
|
|
3253
|
+
{ name: "updateFile", options: {}, I: ae, O: ae },
|
|
3254
|
+
{ name: "deleteFile", options: {}, I: Nn, O: qi },
|
|
3255
|
+
{ name: "getFilesByFolder", options: {}, I: kn, O: Gi },
|
|
3256
|
+
{ name: "search", options: {}, I: Cn, O: Hi }
|
|
3257
|
+
]);
|
|
3258
|
+
class Ze {
|
|
3259
|
+
constructor(e) {
|
|
3260
|
+
B(this, "typeName", lt.typeName);
|
|
3261
|
+
B(this, "methods", lt.methods);
|
|
3262
|
+
B(this, "options", lt.options);
|
|
3263
|
+
this._transport = e;
|
|
3264
|
+
}
|
|
3265
|
+
/**
|
|
3266
|
+
* @generated from protobuf rpc: createFile(com.hamropatro.grpc.cms.CreateFileRequest) returns (com.hamropatro.grpc.cms.File);
|
|
3267
|
+
*/
|
|
3268
|
+
createFile(e, t) {
|
|
3269
|
+
const n = this.methods[0], r = this._transport.mergeOptions(t);
|
|
3270
|
+
return se("unary", this._transport, n, r, e);
|
|
3271
|
+
}
|
|
3272
|
+
/**
|
|
3273
|
+
* @generated from protobuf rpc: updateFile(com.hamropatro.grpc.cms.File) returns (com.hamropatro.grpc.cms.File);
|
|
3274
|
+
*/
|
|
3275
|
+
updateFile(e, t) {
|
|
3276
|
+
const n = this.methods[1], r = this._transport.mergeOptions(t);
|
|
3277
|
+
return se("unary", this._transport, n, r, e);
|
|
3278
|
+
}
|
|
3279
|
+
/**
|
|
3280
|
+
* @generated from protobuf rpc: deleteFile(com.hamropatro.grpc.cms.DeleteFileRequest) returns (com.hamropatro.grpc.cms.DeleteFileResponse);
|
|
3281
|
+
*/
|
|
3282
|
+
deleteFile(e, t) {
|
|
3283
|
+
const n = this.methods[2], r = this._transport.mergeOptions(t);
|
|
3284
|
+
return se("unary", this._transport, n, r, e);
|
|
3285
|
+
}
|
|
3286
|
+
/**
|
|
3287
|
+
* @generated from protobuf rpc: getFilesByFolder(com.hamropatro.grpc.cms.GetFilesByFolderRequest) returns (com.hamropatro.grpc.cms.GetFilesByFolderResponse);
|
|
3288
|
+
*/
|
|
3289
|
+
getFilesByFolder(e, t) {
|
|
3290
|
+
const n = this.methods[3], r = this._transport.mergeOptions(t);
|
|
3291
|
+
return se("unary", this._transport, n, r, e);
|
|
3292
|
+
}
|
|
3293
|
+
/**
|
|
3294
|
+
* @generated from protobuf rpc: search(com.hamropatro.grpc.cms.SearchRequest) returns (com.hamropatro.grpc.cms.SearchResult);
|
|
3295
|
+
*/
|
|
3296
|
+
search(e, t) {
|
|
3297
|
+
const n = this.methods[4], r = this._transport.mergeOptions(t);
|
|
3298
|
+
return se("unary", this._transport, n, r, e);
|
|
3299
|
+
}
|
|
3300
|
+
}
|
|
3301
|
+
const Ji = async (i, e, t, n, r, s) => {
|
|
3302
|
+
var o;
|
|
3303
|
+
try {
|
|
3304
|
+
const a = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, l = new Ze(a), c = En.create();
|
|
3305
|
+
return c.name = i, c.nestedFolderName = e, c.url = t, c.type = n, c.folderName = r, await l.createFile(
|
|
3306
|
+
c,
|
|
3307
|
+
s
|
|
3308
|
+
);
|
|
3309
|
+
} catch (a) {
|
|
3310
|
+
throw a;
|
|
3311
|
+
}
|
|
3312
|
+
}, zi = async (i, e, t, n) => {
|
|
3313
|
+
var r;
|
|
3314
|
+
try {
|
|
3315
|
+
const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Ze(s), a = kn.create();
|
|
3316
|
+
return a.folderName = i, a.cursor = e, a.limit = t, await o.getFilesByFolder(
|
|
3317
|
+
a,
|
|
3318
|
+
n
|
|
3319
|
+
);
|
|
3320
|
+
} catch (s) {
|
|
3321
|
+
throw s;
|
|
3322
|
+
}
|
|
3323
|
+
}, Yi = async (i, e, t = 20, n) => {
|
|
3324
|
+
var r;
|
|
3325
|
+
try {
|
|
3326
|
+
const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Ze(s), a = Cn.create();
|
|
3327
|
+
return a.searchValue = i, a.cursor = e, a.limit = t, await o.search(
|
|
3328
|
+
a,
|
|
3329
|
+
n
|
|
3330
|
+
);
|
|
3331
|
+
} catch (s) {
|
|
3332
|
+
throw s;
|
|
3333
|
+
}
|
|
3334
|
+
}, Qi = async (i, e, t, n, r, s, o, a, l) => {
|
|
3335
|
+
var c;
|
|
3336
|
+
try {
|
|
3337
|
+
const h = (c = window.ImageSalonSDK) == null ? void 0 : c.grpcConfig, g = new Ze(h), w = ae.create();
|
|
3338
|
+
return w.key = i, w.name = e, w.nestedFolderName = t, w.url = n, w.thumborUrl = r, w.proxyUrl = s, w.type = o, w.folderName = a, await g.updateFile(
|
|
3339
|
+
w,
|
|
3340
|
+
l
|
|
3341
|
+
);
|
|
3342
|
+
} catch (h) {
|
|
3343
|
+
throw h;
|
|
3344
|
+
}
|
|
3345
|
+
}, er = async (i, e) => {
|
|
3346
|
+
var t;
|
|
3347
|
+
try {
|
|
3348
|
+
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new Ze(n), s = Nn.create();
|
|
3349
|
+
return s.key = i, await r.deleteFile(
|
|
3350
|
+
s,
|
|
3351
|
+
e
|
|
3352
|
+
);
|
|
3353
|
+
} catch (n) {
|
|
3354
|
+
throw n;
|
|
3355
|
+
}
|
|
3356
|
+
};
|
|
3357
|
+
class tr extends Z {
|
|
3261
3358
|
constructor() {
|
|
3262
|
-
super("com.hamropatro.grpc.cms.
|
|
3359
|
+
super("com.hamropatro.grpc.cms.DeleteFolderRequest", [
|
|
3263
3360
|
{
|
|
3264
3361
|
no: 1,
|
|
3265
|
-
name: "
|
|
3266
|
-
kind: "scalar",
|
|
3267
|
-
T: 5
|
|
3268
|
-
/*ScalarType.INT32*/
|
|
3269
|
-
},
|
|
3270
|
-
{
|
|
3271
|
-
no: 2,
|
|
3272
|
-
name: "width",
|
|
3273
|
-
kind: "scalar",
|
|
3274
|
-
T: 5
|
|
3275
|
-
/*ScalarType.INT32*/
|
|
3276
|
-
},
|
|
3277
|
-
{
|
|
3278
|
-
no: 3,
|
|
3279
|
-
name: "background_color",
|
|
3362
|
+
name: "key",
|
|
3280
3363
|
kind: "scalar",
|
|
3281
3364
|
T: 9
|
|
3282
3365
|
/*ScalarType.STRING*/
|
|
3283
|
-
},
|
|
3284
|
-
{
|
|
3285
|
-
no: 4,
|
|
3286
|
-
name: "aspect_ratio",
|
|
3287
|
-
kind: "scalar",
|
|
3288
|
-
T: 1
|
|
3289
|
-
/*ScalarType.DOUBLE*/
|
|
3290
3366
|
}
|
|
3291
3367
|
]);
|
|
3292
3368
|
}
|
|
3293
3369
|
create(e) {
|
|
3294
3370
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3295
|
-
return t.
|
|
3371
|
+
return t.key = "", e !== void 0 && M(this, t, e), t;
|
|
3296
3372
|
}
|
|
3297
3373
|
internalBinaryRead(e, t, n, r) {
|
|
3298
3374
|
let s = r ?? this.create(), o = e.pos + t;
|
|
3299
3375
|
for (; e.pos < o; ) {
|
|
3300
3376
|
let [a, l] = e.tag();
|
|
3301
3377
|
switch (a) {
|
|
3302
|
-
case /*
|
|
3378
|
+
case /* string key */
|
|
3303
3379
|
1:
|
|
3304
|
-
s.
|
|
3305
|
-
break;
|
|
3306
|
-
case /* int32 width */
|
|
3307
|
-
2:
|
|
3308
|
-
s.width = e.int32();
|
|
3309
|
-
break;
|
|
3310
|
-
case /* string background_color */
|
|
3311
|
-
3:
|
|
3312
|
-
s.backgroundColor = e.string();
|
|
3313
|
-
break;
|
|
3314
|
-
case /* double aspect_ratio */
|
|
3315
|
-
4:
|
|
3316
|
-
s.aspectRatio = e.double();
|
|
3380
|
+
s.key = e.string();
|
|
3317
3381
|
break;
|
|
3318
3382
|
default:
|
|
3319
3383
|
let c = n.readUnknownField;
|
|
@@ -3326,18 +3390,32 @@ class nr extends Z {
|
|
|
3326
3390
|
return s;
|
|
3327
3391
|
}
|
|
3328
3392
|
internalBinaryWrite(e, t, n) {
|
|
3329
|
-
e.
|
|
3393
|
+
e.key !== "" && t.tag(1, m.LengthDelimited).string(e.key);
|
|
3330
3394
|
let r = n.writeUnknownFields;
|
|
3331
3395
|
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3332
3396
|
}
|
|
3333
3397
|
}
|
|
3334
|
-
const
|
|
3335
|
-
class
|
|
3398
|
+
const Fn = new tr();
|
|
3399
|
+
class nr extends Z {
|
|
3336
3400
|
constructor() {
|
|
3337
|
-
super("com.hamropatro.grpc.cms.
|
|
3401
|
+
super("com.hamropatro.grpc.cms.CreateFolderRequest", [
|
|
3338
3402
|
{
|
|
3339
3403
|
no: 1,
|
|
3340
|
-
name: "
|
|
3404
|
+
name: "name",
|
|
3405
|
+
kind: "scalar",
|
|
3406
|
+
T: 9
|
|
3407
|
+
/*ScalarType.STRING*/
|
|
3408
|
+
},
|
|
3409
|
+
{
|
|
3410
|
+
no: 2,
|
|
3411
|
+
name: "nested_folder_name",
|
|
3412
|
+
kind: "scalar",
|
|
3413
|
+
T: 9
|
|
3414
|
+
/*ScalarType.STRING*/
|
|
3415
|
+
},
|
|
3416
|
+
{
|
|
3417
|
+
no: 3,
|
|
3418
|
+
name: "created_by",
|
|
3341
3419
|
kind: "scalar",
|
|
3342
3420
|
T: 9
|
|
3343
3421
|
/*ScalarType.STRING*/
|
|
@@ -3346,16 +3424,24 @@ class ir extends Z {
|
|
|
3346
3424
|
}
|
|
3347
3425
|
create(e) {
|
|
3348
3426
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3349
|
-
return t.
|
|
3427
|
+
return t.name = "", t.nestedFolderName = "", t.createdBy = "", e !== void 0 && M(this, t, e), t;
|
|
3350
3428
|
}
|
|
3351
3429
|
internalBinaryRead(e, t, n, r) {
|
|
3352
3430
|
let s = r ?? this.create(), o = e.pos + t;
|
|
3353
3431
|
for (; e.pos < o; ) {
|
|
3354
3432
|
let [a, l] = e.tag();
|
|
3355
3433
|
switch (a) {
|
|
3356
|
-
case /* string
|
|
3434
|
+
case /* string name */
|
|
3357
3435
|
1:
|
|
3358
|
-
s.
|
|
3436
|
+
s.name = e.string();
|
|
3437
|
+
break;
|
|
3438
|
+
case /* string nested_folder_name */
|
|
3439
|
+
2:
|
|
3440
|
+
s.nestedFolderName = e.string();
|
|
3441
|
+
break;
|
|
3442
|
+
case /* string created_by */
|
|
3443
|
+
3:
|
|
3444
|
+
s.createdBy = e.string();
|
|
3359
3445
|
break;
|
|
3360
3446
|
default:
|
|
3361
3447
|
let c = n.readUnknownField;
|
|
@@ -3368,36 +3454,47 @@ class ir extends Z {
|
|
|
3368
3454
|
return s;
|
|
3369
3455
|
}
|
|
3370
3456
|
internalBinaryWrite(e, t, n) {
|
|
3371
|
-
e.
|
|
3457
|
+
e.name !== "" && t.tag(1, m.LengthDelimited).string(e.name), e.nestedFolderName !== "" && t.tag(2, m.LengthDelimited).string(e.nestedFolderName), e.createdBy !== "" && t.tag(3, m.LengthDelimited).string(e.createdBy);
|
|
3372
3458
|
let r = n.writeUnknownFields;
|
|
3373
3459
|
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3374
3460
|
}
|
|
3375
3461
|
}
|
|
3376
|
-
const
|
|
3377
|
-
class
|
|
3462
|
+
const In = new nr();
|
|
3463
|
+
class ir extends Z {
|
|
3378
3464
|
constructor() {
|
|
3379
|
-
super("com.hamropatro.grpc.cms.
|
|
3465
|
+
super("com.hamropatro.grpc.cms.GetAllFoldersRequest", [
|
|
3380
3466
|
{
|
|
3381
3467
|
no: 1,
|
|
3382
|
-
name: "
|
|
3468
|
+
name: "cursor",
|
|
3383
3469
|
kind: "scalar",
|
|
3384
|
-
T:
|
|
3385
|
-
/*ScalarType.
|
|
3470
|
+
T: 9
|
|
3471
|
+
/*ScalarType.STRING*/
|
|
3472
|
+
},
|
|
3473
|
+
{
|
|
3474
|
+
no: 2,
|
|
3475
|
+
name: "limit",
|
|
3476
|
+
kind: "scalar",
|
|
3477
|
+
T: 5
|
|
3478
|
+
/*ScalarType.INT32*/
|
|
3386
3479
|
}
|
|
3387
3480
|
]);
|
|
3388
3481
|
}
|
|
3389
3482
|
create(e) {
|
|
3390
3483
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3391
|
-
return t.
|
|
3484
|
+
return t.cursor = "", t.limit = 0, e !== void 0 && M(this, t, e), t;
|
|
3392
3485
|
}
|
|
3393
3486
|
internalBinaryRead(e, t, n, r) {
|
|
3394
3487
|
let s = r ?? this.create(), o = e.pos + t;
|
|
3395
3488
|
for (; e.pos < o; ) {
|
|
3396
3489
|
let [a, l] = e.tag();
|
|
3397
3490
|
switch (a) {
|
|
3398
|
-
case /*
|
|
3491
|
+
case /* string cursor */
|
|
3399
3492
|
1:
|
|
3400
|
-
s.
|
|
3493
|
+
s.cursor = e.string();
|
|
3494
|
+
break;
|
|
3495
|
+
case /* int32 limit */
|
|
3496
|
+
2:
|
|
3497
|
+
s.limit = e.int32();
|
|
3401
3498
|
break;
|
|
3402
3499
|
default:
|
|
3403
3500
|
let c = n.readUnknownField;
|
|
@@ -3410,58 +3507,52 @@ class rr extends Z {
|
|
|
3410
3507
|
return s;
|
|
3411
3508
|
}
|
|
3412
3509
|
internalBinaryWrite(e, t, n) {
|
|
3413
|
-
e.
|
|
3510
|
+
e.cursor !== "" && t.tag(1, m.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(2, m.Varint).int32(e.limit);
|
|
3414
3511
|
let r = n.writeUnknownFields;
|
|
3415
3512
|
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3416
3513
|
}
|
|
3417
3514
|
}
|
|
3418
|
-
const
|
|
3419
|
-
class
|
|
3515
|
+
const Ln = new ir();
|
|
3516
|
+
class rr extends Z {
|
|
3420
3517
|
constructor() {
|
|
3421
|
-
super("com.hamropatro.grpc.cms.
|
|
3422
|
-
{
|
|
3423
|
-
no: 1,
|
|
3424
|
-
name: "folder_name",
|
|
3425
|
-
kind: "scalar",
|
|
3426
|
-
T: 9
|
|
3427
|
-
/*ScalarType.STRING*/
|
|
3428
|
-
},
|
|
3518
|
+
super("com.hamropatro.grpc.cms.GetAllFoldersResponse", [
|
|
3519
|
+
{ no: 1, name: "folder", kind: "message", repeat: 1, T: () => Ie },
|
|
3429
3520
|
{
|
|
3430
3521
|
no: 2,
|
|
3431
|
-
name: "
|
|
3522
|
+
name: "next_cursor",
|
|
3432
3523
|
kind: "scalar",
|
|
3433
3524
|
T: 9
|
|
3434
3525
|
/*ScalarType.STRING*/
|
|
3435
3526
|
},
|
|
3436
3527
|
{
|
|
3437
3528
|
no: 3,
|
|
3438
|
-
name: "
|
|
3529
|
+
name: "has_more",
|
|
3439
3530
|
kind: "scalar",
|
|
3440
|
-
T:
|
|
3441
|
-
/*ScalarType.
|
|
3531
|
+
T: 8
|
|
3532
|
+
/*ScalarType.BOOL*/
|
|
3442
3533
|
}
|
|
3443
3534
|
]);
|
|
3444
3535
|
}
|
|
3445
3536
|
create(e) {
|
|
3446
3537
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3447
|
-
return t.
|
|
3538
|
+
return t.folder = [], t.nextCursor = "", t.hasMore = !1, e !== void 0 && M(this, t, e), t;
|
|
3448
3539
|
}
|
|
3449
3540
|
internalBinaryRead(e, t, n, r) {
|
|
3450
3541
|
let s = r ?? this.create(), o = e.pos + t;
|
|
3451
3542
|
for (; e.pos < o; ) {
|
|
3452
3543
|
let [a, l] = e.tag();
|
|
3453
3544
|
switch (a) {
|
|
3454
|
-
case /*
|
|
3545
|
+
case /* repeated com.hamropatro.grpc.cms.Folder folder */
|
|
3455
3546
|
1:
|
|
3456
|
-
s.
|
|
3547
|
+
s.folder.push(Ie.internalBinaryRead(e, e.uint32(), n));
|
|
3457
3548
|
break;
|
|
3458
|
-
case /* string
|
|
3549
|
+
case /* string next_cursor */
|
|
3459
3550
|
2:
|
|
3460
|
-
s.
|
|
3551
|
+
s.nextCursor = e.string();
|
|
3461
3552
|
break;
|
|
3462
|
-
case /*
|
|
3553
|
+
case /* bool has_more */
|
|
3463
3554
|
3:
|
|
3464
|
-
s.
|
|
3555
|
+
s.hasMore = e.bool();
|
|
3465
3556
|
break;
|
|
3466
3557
|
default:
|
|
3467
3558
|
let c = n.readUnknownField;
|
|
@@ -3474,52 +3565,71 @@ class or extends Z {
|
|
|
3474
3565
|
return s;
|
|
3475
3566
|
}
|
|
3476
3567
|
internalBinaryWrite(e, t, n) {
|
|
3477
|
-
|
|
3568
|
+
for (let s = 0; s < e.folder.length; s++)
|
|
3569
|
+
Ie.internalBinaryWrite(e.folder[s], t.tag(1, m.LengthDelimited).fork(), n).join();
|
|
3570
|
+
e.nextCursor !== "" && t.tag(2, m.LengthDelimited).string(e.nextCursor), e.hasMore !== !1 && t.tag(3, m.Varint).bool(e.hasMore);
|
|
3478
3571
|
let r = n.writeUnknownFields;
|
|
3479
3572
|
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3480
3573
|
}
|
|
3481
3574
|
}
|
|
3482
|
-
const
|
|
3483
|
-
class
|
|
3575
|
+
const sr = new rr();
|
|
3576
|
+
class or extends Z {
|
|
3484
3577
|
constructor() {
|
|
3485
|
-
super("com.hamropatro.grpc.cms.
|
|
3486
|
-
{
|
|
3578
|
+
super("com.hamropatro.grpc.cms.Folder", [
|
|
3579
|
+
{
|
|
3580
|
+
no: 1,
|
|
3581
|
+
name: "key",
|
|
3582
|
+
kind: "scalar",
|
|
3583
|
+
T: 9
|
|
3584
|
+
/*ScalarType.STRING*/
|
|
3585
|
+
},
|
|
3487
3586
|
{
|
|
3488
3587
|
no: 2,
|
|
3489
|
-
name: "
|
|
3588
|
+
name: "name",
|
|
3490
3589
|
kind: "scalar",
|
|
3491
3590
|
T: 9
|
|
3492
3591
|
/*ScalarType.STRING*/
|
|
3493
3592
|
},
|
|
3494
3593
|
{
|
|
3495
3594
|
no: 3,
|
|
3496
|
-
name: "
|
|
3595
|
+
name: "nested_folder_name",
|
|
3497
3596
|
kind: "scalar",
|
|
3498
|
-
T:
|
|
3499
|
-
/*ScalarType.
|
|
3597
|
+
T: 9
|
|
3598
|
+
/*ScalarType.STRING*/
|
|
3599
|
+
},
|
|
3600
|
+
{
|
|
3601
|
+
no: 4,
|
|
3602
|
+
name: "created_by",
|
|
3603
|
+
kind: "scalar",
|
|
3604
|
+
T: 9
|
|
3605
|
+
/*ScalarType.STRING*/
|
|
3500
3606
|
}
|
|
3501
3607
|
]);
|
|
3502
3608
|
}
|
|
3503
3609
|
create(e) {
|
|
3504
3610
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3505
|
-
return t.
|
|
3611
|
+
return t.key = "", t.name = "", t.nestedFolderName = "", t.createdBy = "", e !== void 0 && M(this, t, e), t;
|
|
3506
3612
|
}
|
|
3507
3613
|
internalBinaryRead(e, t, n, r) {
|
|
3508
3614
|
let s = r ?? this.create(), o = e.pos + t;
|
|
3509
3615
|
for (; e.pos < o; ) {
|
|
3510
3616
|
let [a, l] = e.tag();
|
|
3511
3617
|
switch (a) {
|
|
3512
|
-
case /*
|
|
3618
|
+
case /* string key */
|
|
3513
3619
|
1:
|
|
3514
|
-
s.
|
|
3620
|
+
s.key = e.string();
|
|
3515
3621
|
break;
|
|
3516
|
-
case /* string
|
|
3622
|
+
case /* string name */
|
|
3517
3623
|
2:
|
|
3518
|
-
s.
|
|
3624
|
+
s.name = e.string();
|
|
3519
3625
|
break;
|
|
3520
|
-
case /*
|
|
3626
|
+
case /* string nested_folder_name */
|
|
3521
3627
|
3:
|
|
3522
|
-
s.
|
|
3628
|
+
s.nestedFolderName = e.string();
|
|
3629
|
+
break;
|
|
3630
|
+
case /* string created_by */
|
|
3631
|
+
4:
|
|
3632
|
+
s.createdBy = e.string();
|
|
3523
3633
|
break;
|
|
3524
3634
|
default:
|
|
3525
3635
|
let c = n.readUnknownField;
|
|
@@ -3532,140 +3642,172 @@ class ar extends Z {
|
|
|
3532
3642
|
return s;
|
|
3533
3643
|
}
|
|
3534
3644
|
internalBinaryWrite(e, t, n) {
|
|
3535
|
-
|
|
3536
|
-
ae.internalBinaryWrite(e.files[s], t.tag(1, m.LengthDelimited).fork(), n).join();
|
|
3537
|
-
e.nextCursor !== "" && t.tag(2, m.LengthDelimited).string(e.nextCursor), e.hasMore !== !1 && t.tag(3, m.Varint).bool(e.hasMore);
|
|
3645
|
+
e.key !== "" && t.tag(1, m.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, m.LengthDelimited).string(e.name), e.nestedFolderName !== "" && t.tag(3, m.LengthDelimited).string(e.nestedFolderName), e.createdBy !== "" && t.tag(4, m.LengthDelimited).string(e.createdBy);
|
|
3538
3646
|
let r = n.writeUnknownFields;
|
|
3539
3647
|
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3540
3648
|
}
|
|
3541
3649
|
}
|
|
3542
|
-
const
|
|
3543
|
-
{ name: "
|
|
3544
|
-
{ name: "
|
|
3545
|
-
{ name: "
|
|
3546
|
-
{ name: "
|
|
3547
|
-
{ name: "search", options: {}, I: Fn, O: Qi }
|
|
3650
|
+
const Ie = new or(), ct = new gt("com.hamropatro.grpc.cms.FolderService", [
|
|
3651
|
+
{ name: "createFolder", options: {}, I: In, O: Ie },
|
|
3652
|
+
{ name: "getFolders", options: {}, I: Ln, O: sr },
|
|
3653
|
+
{ name: "updateFolder", options: {}, I: Ie, O: Ie },
|
|
3654
|
+
{ name: "deleteFolder", options: {}, I: Fn, O: Ie }
|
|
3548
3655
|
]);
|
|
3549
|
-
class
|
|
3656
|
+
class nt {
|
|
3550
3657
|
constructor(e) {
|
|
3551
|
-
B(this, "typeName",
|
|
3552
|
-
B(this, "methods",
|
|
3553
|
-
B(this, "options",
|
|
3658
|
+
B(this, "typeName", ct.typeName);
|
|
3659
|
+
B(this, "methods", ct.methods);
|
|
3660
|
+
B(this, "options", ct.options);
|
|
3554
3661
|
this._transport = e;
|
|
3555
3662
|
}
|
|
3556
3663
|
/**
|
|
3557
|
-
* @generated from protobuf rpc:
|
|
3664
|
+
* @generated from protobuf rpc: createFolder(com.hamropatro.grpc.cms.CreateFolderRequest) returns (com.hamropatro.grpc.cms.Folder);
|
|
3558
3665
|
*/
|
|
3559
|
-
|
|
3666
|
+
createFolder(e, t) {
|
|
3560
3667
|
const n = this.methods[0], r = this._transport.mergeOptions(t);
|
|
3561
3668
|
return se("unary", this._transport, n, r, e);
|
|
3562
3669
|
}
|
|
3563
3670
|
/**
|
|
3564
|
-
* @generated from protobuf rpc:
|
|
3671
|
+
* @generated from protobuf rpc: getFolders(com.hamropatro.grpc.cms.GetAllFoldersRequest) returns (com.hamropatro.grpc.cms.GetAllFoldersResponse);
|
|
3565
3672
|
*/
|
|
3566
|
-
|
|
3673
|
+
getFolders(e, t) {
|
|
3567
3674
|
const n = this.methods[1], r = this._transport.mergeOptions(t);
|
|
3568
3675
|
return se("unary", this._transport, n, r, e);
|
|
3569
3676
|
}
|
|
3570
3677
|
/**
|
|
3571
|
-
* @generated from protobuf rpc:
|
|
3678
|
+
* @generated from protobuf rpc: updateFolder(com.hamropatro.grpc.cms.Folder) returns (com.hamropatro.grpc.cms.Folder);
|
|
3572
3679
|
*/
|
|
3573
|
-
|
|
3680
|
+
updateFolder(e, t) {
|
|
3574
3681
|
const n = this.methods[2], r = this._transport.mergeOptions(t);
|
|
3575
3682
|
return se("unary", this._transport, n, r, e);
|
|
3576
3683
|
}
|
|
3577
3684
|
/**
|
|
3578
|
-
* @generated from protobuf rpc:
|
|
3685
|
+
* @generated from protobuf rpc: deleteFolder(com.hamropatro.grpc.cms.DeleteFolderRequest) returns (com.hamropatro.grpc.cms.Folder);
|
|
3579
3686
|
*/
|
|
3580
|
-
|
|
3687
|
+
deleteFolder(e, t) {
|
|
3581
3688
|
const n = this.methods[3], r = this._transport.mergeOptions(t);
|
|
3582
3689
|
return se("unary", this._transport, n, r, e);
|
|
3583
3690
|
}
|
|
3584
|
-
/**
|
|
3585
|
-
* @generated from protobuf rpc: search(com.hamropatro.grpc.cms.SearchRequest) returns (com.hamropatro.grpc.cms.SearchResult);
|
|
3586
|
-
*/
|
|
3587
|
-
search(e, t) {
|
|
3588
|
-
const n = this.methods[4], r = this._transport.mergeOptions(t);
|
|
3589
|
-
return se("unary", this._transport, n, r, e);
|
|
3590
|
-
}
|
|
3591
3691
|
}
|
|
3592
|
-
const
|
|
3692
|
+
const ar = async (i, e = 20, t) => {
|
|
3593
3693
|
var o;
|
|
3694
|
+
const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new nt(n), s = Ln.create();
|
|
3594
3695
|
try {
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
s
|
|
3696
|
+
return s.cursor = i, s.limit = e, await r.getFolders(
|
|
3697
|
+
s,
|
|
3698
|
+
t
|
|
3599
3699
|
);
|
|
3600
3700
|
} catch (a) {
|
|
3601
3701
|
throw a;
|
|
3602
3702
|
}
|
|
3603
|
-
},
|
|
3604
|
-
var r;
|
|
3605
|
-
try {
|
|
3606
|
-
const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Ze(s), a = An.create();
|
|
3607
|
-
return a.folderName = i, a.cursor = e, a.limit = t, await o.getFilesByFolder(
|
|
3608
|
-
a,
|
|
3609
|
-
n
|
|
3610
|
-
);
|
|
3611
|
-
} catch (s) {
|
|
3612
|
-
throw s;
|
|
3613
|
-
}
|
|
3614
|
-
}, hr = async (i, e, t = 20, n) => {
|
|
3703
|
+
}, lr = async (i, e, t, n) => {
|
|
3615
3704
|
var r;
|
|
3616
3705
|
try {
|
|
3617
|
-
const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new
|
|
3618
|
-
return a.
|
|
3706
|
+
const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new nt(s), a = In.create();
|
|
3707
|
+
return a.name = i, a.nestedFolderName = e, a.createdBy = t, await o.createFolder(
|
|
3619
3708
|
a,
|
|
3620
3709
|
n
|
|
3621
3710
|
);
|
|
3622
3711
|
} catch (s) {
|
|
3623
3712
|
throw s;
|
|
3624
3713
|
}
|
|
3625
|
-
},
|
|
3626
|
-
var
|
|
3714
|
+
}, cr = async (i, e, t, n, r) => {
|
|
3715
|
+
var s;
|
|
3627
3716
|
try {
|
|
3628
|
-
const
|
|
3629
|
-
return
|
|
3630
|
-
|
|
3631
|
-
|
|
3717
|
+
const o = (s = window.ImageSalonSDK) == null ? void 0 : s.grpcConfig, a = new nt(o), l = Ie.create();
|
|
3718
|
+
return l.name = e, l.key = i, l.nestedFolderName = t, l.createdBy = n, await a.updateFolder(
|
|
3719
|
+
l,
|
|
3720
|
+
r
|
|
3632
3721
|
);
|
|
3633
|
-
} catch (
|
|
3634
|
-
throw
|
|
3722
|
+
} catch (o) {
|
|
3723
|
+
throw o;
|
|
3635
3724
|
}
|
|
3636
|
-
},
|
|
3725
|
+
}, dr = async (i, e) => {
|
|
3637
3726
|
var t;
|
|
3638
3727
|
try {
|
|
3639
|
-
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new
|
|
3640
|
-
return s.key = i, await r.
|
|
3728
|
+
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new nt(n), s = Fn.create();
|
|
3729
|
+
return s.key = i, await r.deleteFolder(
|
|
3641
3730
|
s,
|
|
3642
3731
|
e
|
|
3643
3732
|
);
|
|
3644
3733
|
} catch (n) {
|
|
3645
3734
|
throw n;
|
|
3646
3735
|
}
|
|
3736
|
+
}, en = (i, e, t) => {
|
|
3737
|
+
const n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3738
|
+
n.setAttribute("xmlns", "http://www.w3.org/2000/svg"), n.setAttribute("width", i || "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");
|
|
3739
|
+
const r = document.createElementNS(
|
|
3740
|
+
"http://www.w3.org/2000/svg",
|
|
3741
|
+
"circle"
|
|
3742
|
+
);
|
|
3743
|
+
r.setAttribute("cx", "12"), r.setAttribute("cy", "12"), r.setAttribute("r", "10");
|
|
3744
|
+
const s = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
3745
|
+
s.setAttribute("x1", "12"), s.setAttribute("x2", "12"), s.setAttribute("y1", "8"), s.setAttribute("y2", "12");
|
|
3746
|
+
const o = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
3747
|
+
return o.setAttribute("x1", "12"), o.setAttribute("x2", "12.01"), o.setAttribute("y1", "16"), o.setAttribute("y2", "16"), n.appendChild(r), n.appendChild(s), n.appendChild(o), n;
|
|
3647
3748
|
};
|
|
3648
|
-
|
|
3649
|
-
const
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3749
|
+
function tn() {
|
|
3750
|
+
const i = document.createElementNS(
|
|
3751
|
+
"http://www.w3.org/2000/svg",
|
|
3752
|
+
"svg"
|
|
3753
|
+
);
|
|
3754
|
+
i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("height", "24px"), i.setAttribute("width", "24px"), i.setAttribute("viewBox", "0 -960 960 960"), i.setAttribute("fill", "#333");
|
|
3755
|
+
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3756
|
+
return e.setAttribute(
|
|
3757
|
+
"d",
|
|
3758
|
+
"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"
|
|
3759
|
+
), i.appendChild(e), i;
|
|
3760
|
+
}
|
|
3761
|
+
function hr() {
|
|
3762
|
+
const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3763
|
+
i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("width", "12"), i.setAttribute("height", "12"), i.setAttribute("viewBox", "0 0 24 24"), i.setAttribute("fill", "none"), i.setAttribute("stroke", "currentColor"), i.setAttribute("stroke-width", "2"), i.setAttribute("stroke-linecap", "round"), i.setAttribute("stroke-linejoin", "round"), i.classList.add("lucide", "lucide-music-4");
|
|
3764
|
+
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3765
|
+
e.setAttribute("d", "M9 18V5l12-2v13");
|
|
3766
|
+
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3767
|
+
t.setAttribute("d", "m9 9 12-2");
|
|
3768
|
+
const n = document.createElementNS(
|
|
3769
|
+
"http://www.w3.org/2000/svg",
|
|
3770
|
+
"circle"
|
|
3771
|
+
);
|
|
3772
|
+
n.setAttribute("cx", "6"), n.setAttribute("cy", "18"), n.setAttribute("r", "3");
|
|
3773
|
+
const r = document.createElementNS(
|
|
3774
|
+
"http://www.w3.org/2000/svg",
|
|
3775
|
+
"circle"
|
|
3776
|
+
);
|
|
3777
|
+
return r.setAttribute("cx", "18"), r.setAttribute("cy", "16"), r.setAttribute("r", "3"), i.appendChild(e), i.appendChild(t), i.appendChild(n), i.appendChild(r), document.body.appendChild(i), i;
|
|
3778
|
+
}
|
|
3779
|
+
const ur = () => {
|
|
3780
|
+
const i = document.createElementNS(
|
|
3781
|
+
"http://www.w3.org/2000/svg",
|
|
3782
|
+
"svg"
|
|
3783
|
+
);
|
|
3784
|
+
i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("width", "20"), i.setAttribute("height", "20"), i.setAttribute("viewBox", "0 0 24 24"), i.setAttribute("fill", "none"), i.setAttribute("stroke", "currentColor"), i.setAttribute("stroke-width", "2"), i.setAttribute("stroke-linecap", "round"), i.setAttribute("stroke-linejoin", "round"), i.classList.add("lucide", "lucide-circle-check-big");
|
|
3785
|
+
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3786
|
+
e.setAttribute("d", "M21.801 10A10 10 0 1 1 17 3.335");
|
|
3787
|
+
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3788
|
+
return t.setAttribute("d", "m9 11 3 3L22 4"), i.appendChild(e), i.appendChild(t), i;
|
|
3789
|
+
};
|
|
3790
|
+
function An(i = "#333") {
|
|
3791
|
+
const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3792
|
+
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", i);
|
|
3793
|
+
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3794
|
+
return t.setAttribute(
|
|
3795
|
+
"d",
|
|
3796
|
+
"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"
|
|
3797
|
+
), e.appendChild(t), e;
|
|
3798
|
+
}
|
|
3799
|
+
function nn() {
|
|
3800
|
+
const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3801
|
+
i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("width", "16"), i.setAttribute("height", "16"), i.setAttribute("viewBox", "0 0 24 24"), i.setAttribute("fill", "none"), i.setAttribute("stroke", "#2c96f8"), i.setAttribute("stroke-width", "2"), i.setAttribute("stroke-linecap", "round"), i.setAttribute("stroke-linejoin", "round"), i.classList.add("lucide", "lucide-pencil");
|
|
3802
|
+
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3803
|
+
e.setAttribute(
|
|
3804
|
+
"d",
|
|
3805
|
+
"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"
|
|
3806
|
+
);
|
|
3807
|
+
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3808
|
+
return t.setAttribute("d", "m15 5 4 4"), i.appendChild(e), i.appendChild(t), document.body.appendChild(i), i;
|
|
3667
3809
|
}
|
|
3668
|
-
function
|
|
3810
|
+
function Ue() {
|
|
3669
3811
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3670
3812
|
i.setAttribute("xmlns", "http://www.w3.org/2000/folder"), i.setAttribute("x", "0px"), i.setAttribute("y", "0px"), i.setAttribute("width", "24"), i.setAttribute("height", "24"), i.setAttribute("viewBox", "0 0 48 48");
|
|
3671
3813
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -3679,76 +3821,46 @@ function Re() {
|
|
|
3679
3821
|
"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"
|
|
3680
3822
|
), i.appendChild(e), i.appendChild(t), i;
|
|
3681
3823
|
}
|
|
3682
|
-
|
|
3683
|
-
const i = document.createElementNS(
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
);
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
const
|
|
3694
|
-
|
|
3695
|
-
const
|
|
3696
|
-
"http://www.w3.org/2000/svg",
|
|
3697
|
-
"circle"
|
|
3698
|
-
);
|
|
3699
|
-
r.setAttribute("cx", "12"), r.setAttribute("cy", "12"), r.setAttribute("r", "10");
|
|
3700
|
-
const s = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
3701
|
-
s.setAttribute("x1", "12"), s.setAttribute("x2", "12"), s.setAttribute("y1", "8"), s.setAttribute("y2", "12");
|
|
3702
|
-
const o = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
3703
|
-
return o.setAttribute("x1", "12"), o.setAttribute("x2", "12.01"), o.setAttribute("y1", "16"), o.setAttribute("y2", "16"), n.appendChild(r), n.appendChild(s), n.appendChild(o), n;
|
|
3704
|
-
};
|
|
3705
|
-
function Qt() {
|
|
3706
|
-
const i = document.createElementNS(
|
|
3824
|
+
function pr() {
|
|
3825
|
+
const i = "http://www.w3.org/2000/svg", e = document.createElementNS(i, "svg");
|
|
3826
|
+
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");
|
|
3827
|
+
const t = document.createElementNS(i, "rect");
|
|
3828
|
+
t.setAttribute("width", "18"), t.setAttribute("height", "18"), t.setAttribute("x", "3"), t.setAttribute("y", "3"), t.setAttribute("rx", "2"), t.setAttribute("ry", "2");
|
|
3829
|
+
const n = document.createElementNS(i, "circle");
|
|
3830
|
+
n.setAttribute("cx", "9"), n.setAttribute("cy", "9"), n.setAttribute("r", "2");
|
|
3831
|
+
const r = document.createElementNS(i, "path");
|
|
3832
|
+
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;
|
|
3833
|
+
}
|
|
3834
|
+
function fr() {
|
|
3835
|
+
const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3836
|
+
i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("height", "24px"), i.setAttribute("viewBox", "0 -960 960 960"), i.setAttribute("width", "24px"), i.setAttribute("fill", "currentColor");
|
|
3837
|
+
const e = document.createElementNS(
|
|
3707
3838
|
"http://www.w3.org/2000/svg",
|
|
3708
|
-
"
|
|
3839
|
+
"path"
|
|
3709
3840
|
);
|
|
3710
|
-
i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("height", "24px"), i.setAttribute("width", "24px"), i.setAttribute("viewBox", "0 -960 960 960"), i.setAttribute("fill", "#333");
|
|
3711
|
-
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3712
3841
|
return e.setAttribute(
|
|
3713
3842
|
"d",
|
|
3714
|
-
"
|
|
3843
|
+
"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"
|
|
3715
3844
|
), i.appendChild(e), i;
|
|
3716
3845
|
}
|
|
3717
|
-
function
|
|
3846
|
+
function rn() {
|
|
3718
3847
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3719
3848
|
i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("fill", "none"), i.setAttribute("width", "20"), i.setAttribute("height", "20"), i.setAttribute("viewBox", "0 0 24 24"), i.setAttribute("stroke-width", "1.5"), i.setAttribute("stroke", "currentColor"), i.setAttribute("class", "size-2");
|
|
3720
3849
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3721
3850
|
return e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("d", "M12 4.5v15m7.5-7.5h-15"), i.appendChild(e), i;
|
|
3722
3851
|
}
|
|
3723
|
-
function
|
|
3724
|
-
const e =
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
).
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
return i.reduce((r, s) => (s.nestedFolderName || r.push(t(e[s.key])), r), []);
|
|
3734
|
-
}
|
|
3735
|
-
function wr(i, e) {
|
|
3736
|
-
const t = (n) => {
|
|
3737
|
-
if (n.key === e.nestedFolderName)
|
|
3738
|
-
return n.children[e.key] = { ...e, children: {} }, !0;
|
|
3739
|
-
for (const r in n.children) {
|
|
3740
|
-
const s = n.children[r];
|
|
3741
|
-
if (t(s))
|
|
3742
|
-
return !0;
|
|
3743
|
-
}
|
|
3744
|
-
return !1;
|
|
3745
|
-
};
|
|
3746
|
-
for (const n of i)
|
|
3747
|
-
if (t(n))
|
|
3748
|
-
break;
|
|
3749
|
-
return i;
|
|
3852
|
+
function mr() {
|
|
3853
|
+
const i = "http://www.w3.org/2000/svg", e = document.createElementNS(i, "svg");
|
|
3854
|
+
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");
|
|
3855
|
+
const t = document.createElementNS(i, "path");
|
|
3856
|
+
t.setAttribute(
|
|
3857
|
+
"d",
|
|
3858
|
+
"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"
|
|
3859
|
+
), e.appendChild(t);
|
|
3860
|
+
const n = document.createElementNS(i, "circle");
|
|
3861
|
+
return n.setAttribute("cx", "12"), n.setAttribute("cy", "12"), n.setAttribute("r", "3"), e.appendChild(n), document.body.appendChild(e), e;
|
|
3750
3862
|
}
|
|
3751
|
-
function
|
|
3863
|
+
function gr() {
|
|
3752
3864
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3753
3865
|
i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("height", "24px"), i.setAttribute("width", "24px"), i.setAttribute("viewBox", "0 0 30 30"), i.setAttribute("fill", "#999");
|
|
3754
3866
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -3757,7 +3869,21 @@ function br() {
|
|
|
3757
3869
|
"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"
|
|
3758
3870
|
), i.appendChild(e), i;
|
|
3759
3871
|
}
|
|
3760
|
-
function
|
|
3872
|
+
function sn() {
|
|
3873
|
+
const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3874
|
+
i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("width", "16"), i.setAttribute("height", "16"), i.setAttribute("viewBox", "0 0 24 24"), i.setAttribute("fill", "none"), i.setAttribute("stroke", "#f14b4b"), i.setAttribute("stroke-width", "2"), i.setAttribute("stroke-linecap", "round"), i.setAttribute("stroke-linejoin", "round"), i.classList.add("lucide", "lucide-trash-2");
|
|
3875
|
+
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3876
|
+
e.setAttribute("d", "M3 6h18");
|
|
3877
|
+
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3878
|
+
t.setAttribute("d", "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6");
|
|
3879
|
+
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3880
|
+
n.setAttribute("d", "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2");
|
|
3881
|
+
const r = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
3882
|
+
r.setAttribute("x1", "10"), r.setAttribute("x2", "10"), r.setAttribute("y1", "11"), r.setAttribute("y2", "17");
|
|
3883
|
+
const s = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
3884
|
+
return s.setAttribute("x1", "14"), s.setAttribute("x2", "14"), s.setAttribute("y1", "11"), s.setAttribute("y2", "17"), i.appendChild(e), i.appendChild(t), i.appendChild(n), i.appendChild(r), i.appendChild(s), document.body.appendChild(i), i;
|
|
3885
|
+
}
|
|
3886
|
+
function wr() {
|
|
3761
3887
|
const i = "http://www.w3.org/2000/svg", e = document.createElementNS(i, "svg");
|
|
3762
3888
|
e.setAttribute("xmlns", i), e.setAttribute("height", "20px"), e.setAttribute("viewBox", "0 -960 960 960"), e.setAttribute("width", "20px"), e.setAttribute("fill", "#fff");
|
|
3763
3889
|
const t = document.createElementNS(i, "path");
|
|
@@ -3766,7 +3892,7 @@ function yr() {
|
|
|
3766
3892
|
"M440-320v-326L336-542l-56-58 200-200 200 200-56 58-104-104v326h-80ZM240-160q-33 0-56.5-23.5T160-240v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-160H240Z"
|
|
3767
3893
|
), e.appendChild(t), e;
|
|
3768
3894
|
}
|
|
3769
|
-
function
|
|
3895
|
+
function br() {
|
|
3770
3896
|
const i = "http://www.w3.org/2000/svg", e = document.createElementNS(i, "svg");
|
|
3771
3897
|
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");
|
|
3772
3898
|
const t = document.createElementNS(i, "path");
|
|
@@ -3777,17 +3903,184 @@ function Cr() {
|
|
|
3777
3903
|
const n = document.createElementNS(i, "rect");
|
|
3778
3904
|
return n.setAttribute("x", "2"), n.setAttribute("y", "6"), n.setAttribute("width", "14"), n.setAttribute("height", "12"), n.setAttribute("rx", "2"), e.appendChild(t), e.appendChild(n), document.body.appendChild(e), e;
|
|
3779
3905
|
}
|
|
3780
|
-
function
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3906
|
+
function V(i, e, t) {
|
|
3907
|
+
let n = document.createElement(i);
|
|
3908
|
+
return n.className += e, t && t.appendChild(n), n;
|
|
3909
|
+
}
|
|
3910
|
+
var le;
|
|
3911
|
+
class yr {
|
|
3912
|
+
constructor() {
|
|
3913
|
+
k(this, le);
|
|
3914
|
+
p(this, le, document.createElementNS(
|
|
3915
|
+
"http://www.w3.org/2000/svg",
|
|
3916
|
+
"svg"
|
|
3917
|
+
)), d(this, le).setAttribute("viewBox", "25 25 50 50"), d(this, le).classList.add("loader-svg");
|
|
3918
|
+
const e = document.createElementNS(
|
|
3919
|
+
"http://www.w3.org/2000/svg",
|
|
3920
|
+
"circle"
|
|
3921
|
+
);
|
|
3922
|
+
e.setAttribute("r", "20"), e.setAttribute("cy", "50"), e.setAttribute("cx", "50"), e.classList.add("loader-circle"), d(this, le).appendChild(e);
|
|
3923
|
+
}
|
|
3924
|
+
show(e) {
|
|
3925
|
+
e.appendChild(d(this, le));
|
|
3926
|
+
}
|
|
3927
|
+
hide() {
|
|
3928
|
+
d(this, le).remove();
|
|
3929
|
+
}
|
|
3930
|
+
}
|
|
3931
|
+
le = new WeakMap();
|
|
3932
|
+
const on = new yr(), Ge = document.body;
|
|
3933
|
+
class Tn {
|
|
3934
|
+
constructor() {
|
|
3935
|
+
B(this, "main");
|
|
3936
|
+
B(this, "dialogContainer");
|
|
3937
|
+
B(this, "dialog");
|
|
3938
|
+
B(this, "dialogBackdrop");
|
|
3939
|
+
B(this, "dialogContent");
|
|
3940
|
+
B(this, "dialogHeader");
|
|
3941
|
+
B(this, "dialogBody");
|
|
3942
|
+
B(this, "dialogFooter");
|
|
3943
|
+
B(this, "confirmButton");
|
|
3944
|
+
B(this, "cancelButton");
|
|
3945
|
+
B(this, "confirmCallback");
|
|
3946
|
+
B(this, "cancelCallback");
|
|
3947
|
+
this.main = V("div"), this.dialog = V("div"), this.confirmCallback = void 0, this.cancelCallback = void 0;
|
|
3948
|
+
}
|
|
3949
|
+
_init(e) {
|
|
3950
|
+
this.main = V("div", "dialog-presentation", Ge), this.main.setAttribute("role", "presentation"), this.dialogContainer = V("div", "dialog-container", this.main), this.dialogBackdrop = V(
|
|
3951
|
+
"div",
|
|
3952
|
+
"dialog-backdrop",
|
|
3953
|
+
this.dialogContainer
|
|
3954
|
+
), this.dialog = V("div", "dialog", this.dialogContainer), this.dialog.setAttribute("tabIndex", "-1");
|
|
3955
|
+
const t = document.activeElement;
|
|
3956
|
+
if (t && t !== document.body && (t.blur(), this.dialog.focus()), this.dialog.className = "dialog", this.dialogContent = V("div", "dialog-content", this.dialog), e != null && e.dialogContentStyle && Object.assign(this.dialogContent.style, e.dialogContentStyle), this.confirmButton = V(
|
|
3957
|
+
"button",
|
|
3958
|
+
"dialog-btn confirm",
|
|
3959
|
+
this.dialogFooter
|
|
3960
|
+
), this.confirmButton.type = "button", this.cancelButton = V(
|
|
3961
|
+
"button",
|
|
3962
|
+
"dialog-btn cancel",
|
|
3963
|
+
this.dialogFooter
|
|
3964
|
+
), this.cancelButton.type = "button", e.showCloseBtn) {
|
|
3965
|
+
const n = V(
|
|
3966
|
+
"button",
|
|
3967
|
+
"dialog-close-btn",
|
|
3968
|
+
this.dialogContent
|
|
3969
|
+
);
|
|
3970
|
+
n.appendChild(An()), n.onclick = () => this.hide();
|
|
3971
|
+
}
|
|
3972
|
+
return e.header && this._setHeader(e), this._setBody(e), this._setFooter(e), this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", Ge.style.overflow = "hidden", this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", Ge.classList.add("dialog-visible"), new Promise((n) => {
|
|
3973
|
+
const r = (s) => () => {
|
|
3974
|
+
this.hide(), n(s === "confirm");
|
|
3975
|
+
};
|
|
3976
|
+
this.confirmCallback = e.onConfirm || r("confirm"), this.confirmButton.addEventListener("click", this.confirmCallback), this.cancelCallback = e.onCancel || r("cancel"), this.cancelButton.addEventListener("click", this.cancelCallback);
|
|
3977
|
+
});
|
|
3978
|
+
}
|
|
3979
|
+
_setHeader(e) {
|
|
3980
|
+
if (this.dialogHeader = V(
|
|
3981
|
+
"div",
|
|
3982
|
+
"dialog-header",
|
|
3983
|
+
this.dialogContent
|
|
3984
|
+
), !e.header)
|
|
3985
|
+
this.dialogHeader.innerHTML = "";
|
|
3986
|
+
else if (typeof e.header == "string") {
|
|
3987
|
+
const t = V(
|
|
3988
|
+
"h4",
|
|
3989
|
+
"dialog-header-text",
|
|
3990
|
+
this.dialogHeader
|
|
3991
|
+
);
|
|
3992
|
+
t.textContent = e.header;
|
|
3993
|
+
} else
|
|
3994
|
+
this.dialogHeader.innerHTML = "", this.dialogHeader.appendChild(e.header);
|
|
3995
|
+
}
|
|
3996
|
+
_setBody(e) {
|
|
3997
|
+
this.dialogBody = V("div", "dialog-body", this.dialogContent), typeof e.content == "string" ? this.dialogBody.innerHTML = e.content : (this.dialogBody.innerHTML = "", this.dialogBody.appendChild(e.content));
|
|
3998
|
+
}
|
|
3999
|
+
_setFooter(e) {
|
|
4000
|
+
this.dialogFooter = V(
|
|
4001
|
+
"div",
|
|
4002
|
+
"dialog-footer",
|
|
4003
|
+
this.dialogContent
|
|
4004
|
+
), e.showFooter ? this.dialogFooter.append(this.cancelButton, this.confirmButton) : (this.dialogFooter.innerHTML = "", this.dialogFooter.remove());
|
|
4005
|
+
}
|
|
4006
|
+
show(e) {
|
|
4007
|
+
this._init(e), setTimeout(() => {
|
|
4008
|
+
this.dialogContainer.style.opacity = "1", this.dialog.style.transform = "scale(1)", this.dialog.style.transition = "transform 150ms ease-in", this.dialog.style.opacity = "1", this.dialogBackdrop.style.opacity = "1";
|
|
4009
|
+
}, 150);
|
|
4010
|
+
}
|
|
4011
|
+
hide() {
|
|
4012
|
+
this.main || Ge.style.removeProperty("overflow"), this.dialog.style.transform = "scale(0.8)", this.dialog.style.transition = "transform 150ms ease-out", this.dialogBackdrop.style.opacity = "0", setTimeout(() => {
|
|
4013
|
+
this.dialogContainer.style.opacity = "0", this.dialog.style.opacity = "0", this.dialogContent.style.opacity = "0", this.main.remove();
|
|
4014
|
+
}, 150);
|
|
4015
|
+
}
|
|
4016
|
+
updateUploadBtn(e) {
|
|
4017
|
+
e ? (on.show(this.confirmButton), this.confirmButton.disabled = !0) : (on.hide(), this.confirmButton.disabled = !1);
|
|
4018
|
+
}
|
|
4019
|
+
}
|
|
4020
|
+
const Je = new Tn(), D = new Tn();
|
|
4021
|
+
class Cr {
|
|
4022
|
+
constructor() {
|
|
4023
|
+
B(this, "main");
|
|
4024
|
+
B(this, "dialogBody");
|
|
4025
|
+
this.main = V("div"), this.dialogBody = V("div"), this.hide();
|
|
4026
|
+
}
|
|
4027
|
+
show(e) {
|
|
4028
|
+
this.main = V("div", "popover", e.mainContainer), this.dialogBody = V("div", "popover-body", this.main), this.main.id = e.divId, this.dialogBody.append(e.content);
|
|
4029
|
+
}
|
|
4030
|
+
hide() {
|
|
4031
|
+
this.main.remove();
|
|
4032
|
+
}
|
|
4033
|
+
}
|
|
4034
|
+
const G = new Cr();
|
|
4035
|
+
var fe = /* @__PURE__ */ ((i) => (i[i.IMAGE = 0] = "IMAGE", i[i.AUDIO = 1] = "AUDIO", i[i.VIDEO = 2] = "VIDEO", i[i.ALL = 3] = "ALL", i[i.FOLDER = 4] = "FOLDER", i))(fe || {});
|
|
4036
|
+
const Me = {
|
|
4037
|
+
0: "IMAGE",
|
|
4038
|
+
1: "AUDIO",
|
|
4039
|
+
2: "VIDEO",
|
|
4040
|
+
3: "ALL",
|
|
4041
|
+
4: "FOLDER"
|
|
4042
|
+
};
|
|
4043
|
+
function Er(i) {
|
|
4044
|
+
switch (i) {
|
|
4045
|
+
case "image":
|
|
4046
|
+
return Me[fe.IMAGE];
|
|
4047
|
+
case "video":
|
|
4048
|
+
return Me[fe.VIDEO];
|
|
4049
|
+
case "audio":
|
|
4050
|
+
return Me[fe.AUDIO];
|
|
4051
|
+
default:
|
|
4052
|
+
return Me[fe.ALL];
|
|
4053
|
+
}
|
|
4054
|
+
}
|
|
4055
|
+
function Nr(i) {
|
|
4056
|
+
const e = {};
|
|
4057
|
+
i.forEach((r) => {
|
|
4058
|
+
e[r.key] = { ...r, children: {} };
|
|
4059
|
+
});
|
|
4060
|
+
const t = (r) => (Object.values(e).filter(
|
|
4061
|
+
(o) => o.nestedFolderName == r.key
|
|
4062
|
+
).forEach((o) => {
|
|
4063
|
+
r.children[o.key] = t(o);
|
|
4064
|
+
}), r);
|
|
4065
|
+
return i.reduce((r, s) => (s.nestedFolderName || r.push(t(e[s.key])), r), []);
|
|
4066
|
+
}
|
|
4067
|
+
function kr(i, e) {
|
|
4068
|
+
const t = (n) => {
|
|
4069
|
+
if (n.key === e.nestedFolderName)
|
|
4070
|
+
return n.children[e.key] = { ...e, children: {} }, !0;
|
|
4071
|
+
for (const r in n.children) {
|
|
4072
|
+
const s = n.children[r];
|
|
4073
|
+
if (t(s))
|
|
4074
|
+
return !0;
|
|
4075
|
+
}
|
|
4076
|
+
return !1;
|
|
4077
|
+
};
|
|
4078
|
+
for (const n of i)
|
|
4079
|
+
if (t(n))
|
|
4080
|
+
break;
|
|
4081
|
+
return i;
|
|
3789
4082
|
}
|
|
3790
|
-
const
|
|
4083
|
+
const Fr = async (i) => {
|
|
3791
4084
|
let e;
|
|
3792
4085
|
try {
|
|
3793
4086
|
i && (e = {
|
|
@@ -3800,451 +4093,160 @@ const Nr = async (i) => {
|
|
|
3800
4093
|
meta: e
|
|
3801
4094
|
};
|
|
3802
4095
|
};
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
B(this, "dialogBody");
|
|
3807
|
-
this.main = V("div"), this.dialogBody = V("div"), this.hide();
|
|
3808
|
-
}
|
|
3809
|
-
show(e) {
|
|
3810
|
-
this.main = V("div", "popover", e.mainContainer), this.dialogBody = V("div", "popover-body", this.main), this.main.id = e.divId, this.dialogBody.append(e.content);
|
|
3811
|
-
}
|
|
3812
|
-
hide() {
|
|
3813
|
-
this.main.remove();
|
|
3814
|
-
}
|
|
4096
|
+
function b(i, e) {
|
|
4097
|
+
const t = document.createElement("div");
|
|
4098
|
+
return i && (t.className = i), e && (t.id = e), t;
|
|
3815
4099
|
}
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("width", "12"), i.setAttribute("height", "12"), i.setAttribute("viewBox", "0 0 24 24"), i.setAttribute("fill", "none"), i.setAttribute("stroke", "currentColor"), i.setAttribute("stroke-width", "2"), i.setAttribute("stroke-linecap", "round"), i.setAttribute("stroke-linejoin", "round"), i.classList.add("lucide", "lucide-music-4");
|
|
3820
|
-
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3821
|
-
e.setAttribute("d", "M9 18V5l12-2v13");
|
|
3822
|
-
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3823
|
-
t.setAttribute("d", "m9 9 12-2");
|
|
3824
|
-
const n = document.createElementNS(
|
|
3825
|
-
"http://www.w3.org/2000/svg",
|
|
3826
|
-
"circle"
|
|
3827
|
-
);
|
|
3828
|
-
n.setAttribute("cx", "6"), n.setAttribute("cy", "18"), n.setAttribute("r", "3");
|
|
3829
|
-
const r = document.createElementNS(
|
|
3830
|
-
"http://www.w3.org/2000/svg",
|
|
3831
|
-
"circle"
|
|
3832
|
-
);
|
|
3833
|
-
return r.setAttribute("cx", "18"), r.setAttribute("cy", "16"), r.setAttribute("r", "3"), i.appendChild(e), i.appendChild(t), i.appendChild(n), i.appendChild(r), document.body.appendChild(i), i;
|
|
4100
|
+
function Re(i, e, t) {
|
|
4101
|
+
const n = document.createElement("p");
|
|
4102
|
+
return e && (n.className = e), t && (n.id = t), i && (n.textContent = i), n;
|
|
3834
4103
|
}
|
|
3835
|
-
|
|
3836
|
-
(
|
|
3837
|
-
|
|
3838
|
-
})(f || (f = {}));
|
|
3839
|
-
var Ir = function(i, e, t, n) {
|
|
3840
|
-
function r(s) {
|
|
3841
|
-
return s instanceof t ? s : new t(function(o) {
|
|
3842
|
-
o(s);
|
|
3843
|
-
});
|
|
3844
|
-
}
|
|
3845
|
-
return new (t || (t = Promise))(function(s, o) {
|
|
3846
|
-
function a(h) {
|
|
3847
|
-
try {
|
|
3848
|
-
c(n.next(h));
|
|
3849
|
-
} catch (g) {
|
|
3850
|
-
o(g);
|
|
3851
|
-
}
|
|
3852
|
-
}
|
|
3853
|
-
function l(h) {
|
|
3854
|
-
try {
|
|
3855
|
-
c(n.throw(h));
|
|
3856
|
-
} catch (g) {
|
|
3857
|
-
o(g);
|
|
3858
|
-
}
|
|
3859
|
-
}
|
|
3860
|
-
function c(h) {
|
|
3861
|
-
h.done ? s(h.value) : r(h.value).then(a, l);
|
|
3862
|
-
}
|
|
3863
|
-
c((n = n.apply(i, e || [])).next());
|
|
3864
|
-
});
|
|
3865
|
-
};
|
|
3866
|
-
function tn(i, e, t, n, r) {
|
|
3867
|
-
if (n)
|
|
3868
|
-
for (let [s, o] of Object.entries(n))
|
|
3869
|
-
if (typeof o == "string")
|
|
3870
|
-
i.append(s, o);
|
|
3871
|
-
else
|
|
3872
|
-
for (let a of o)
|
|
3873
|
-
i.append(s, a);
|
|
3874
|
-
if (i.set("Content-Type", e === "text" ? "application/grpc-web-text" : "application/grpc-web+proto"), e == "text" && i.set("Accept", "application/grpc-web-text"), i.set("X-Grpc-Web", "1"), typeof t == "number") {
|
|
3875
|
-
if (t <= 0)
|
|
3876
|
-
throw new A(`timeout ${t} ms exceeded`, f[f.DEADLINE_EXCEEDED]);
|
|
3877
|
-
i.set("grpc-timeout", `${t}m`);
|
|
3878
|
-
} else if (t) {
|
|
3879
|
-
const s = t.getTime(), o = Date.now();
|
|
3880
|
-
if (s <= o)
|
|
3881
|
-
throw new A(`deadline ${t} exceeded`, f[f.DEADLINE_EXCEEDED]);
|
|
3882
|
-
i.set("grpc-timeout", `${s - o}m`);
|
|
3883
|
-
}
|
|
3884
|
-
return i;
|
|
4104
|
+
function L(i, e) {
|
|
4105
|
+
const t = document.createElement("span");
|
|
4106
|
+
return e && (t.className = e), i && (t.textContent = i), t;
|
|
3885
4107
|
}
|
|
3886
|
-
function
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
for (let n = i.length, r = 4; r > 0; r--)
|
|
3890
|
-
t[r] = n % 256, n >>>= 8;
|
|
3891
|
-
return t.set(i, 5), e === "binary" ? t : pn(t);
|
|
4108
|
+
function an(i, e, t, n) {
|
|
4109
|
+
const r = document.createElement("img");
|
|
4110
|
+
return e && (r.className = e), r.src = i, r;
|
|
3892
4111
|
}
|
|
3893
|
-
function
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
try {
|
|
3897
|
-
c = l.type;
|
|
3898
|
-
} catch {
|
|
3899
|
-
}
|
|
3900
|
-
switch (c) {
|
|
3901
|
-
case "error":
|
|
3902
|
-
case "opaque":
|
|
3903
|
-
case "opaqueredirect":
|
|
3904
|
-
throw new A(`fetch response type ${l.type}`, f[f.UNKNOWN]);
|
|
3905
|
-
}
|
|
3906
|
-
return ft(vr(l.headers), l.status, l.statusText);
|
|
3907
|
-
}
|
|
3908
|
-
let n = i, r = e >= 200 && e < 300, s = vn(n), [o, a] = Tn(n);
|
|
3909
|
-
return (o === void 0 || o === f.OK) && !r && (o = Br(e), a = t), [o, a, s];
|
|
4112
|
+
function Ir(i, e, t) {
|
|
4113
|
+
const n = document.createElement("video"), r = document.createElement("source");
|
|
4114
|
+
return n.className = e, r.src = i, n.appendChild(r), n;
|
|
3910
4115
|
}
|
|
3911
|
-
function
|
|
3912
|
-
|
|
3913
|
-
return
|
|
4116
|
+
function Lr(i, e, t) {
|
|
4117
|
+
const n = document.createElement("audio"), r = document.createElement("source");
|
|
4118
|
+
return n.className = e, n.controls = !0, r.src = i, n.appendChild(r), n;
|
|
3914
4119
|
}
|
|
3915
|
-
|
|
3916
|
-
(
|
|
3917
|
-
|
|
3918
|
-
})(te || (te = {}));
|
|
3919
|
-
function sn(i, e, t) {
|
|
3920
|
-
return Ir(this, void 0, void 0, function* () {
|
|
3921
|
-
let n, r = "", s = new Uint8Array(0), o = Ar(e);
|
|
3922
|
-
if (Lr(i)) {
|
|
3923
|
-
let a = i.getReader();
|
|
3924
|
-
n = {
|
|
3925
|
-
next: () => a.read()
|
|
3926
|
-
};
|
|
3927
|
-
} else
|
|
3928
|
-
n = i[Symbol.asyncIterator]();
|
|
3929
|
-
for (; ; ) {
|
|
3930
|
-
let a = yield n.next();
|
|
3931
|
-
if (a.value !== void 0) {
|
|
3932
|
-
if (o === "text") {
|
|
3933
|
-
for (let c = 0; c < a.value.length; c++)
|
|
3934
|
-
r += String.fromCharCode(a.value[c]);
|
|
3935
|
-
let l = r.length - r.length % 4;
|
|
3936
|
-
if (l === 0)
|
|
3937
|
-
continue;
|
|
3938
|
-
s = on(s, un(r.substring(0, l))), r = r.substring(l);
|
|
3939
|
-
} else
|
|
3940
|
-
s = on(s, a.value);
|
|
3941
|
-
for (; s.length >= 5 && s[0] === te.DATA; ) {
|
|
3942
|
-
let l = 0;
|
|
3943
|
-
for (let c = 1; c < 5; c++)
|
|
3944
|
-
l = (l << 8) + s[c];
|
|
3945
|
-
if (s.length - 5 >= l)
|
|
3946
|
-
t(te.DATA, s.subarray(5, 5 + l)), s = s.subarray(5 + l);
|
|
3947
|
-
else
|
|
3948
|
-
break;
|
|
3949
|
-
}
|
|
3950
|
-
}
|
|
3951
|
-
if (a.done) {
|
|
3952
|
-
if (s.length === 0)
|
|
3953
|
-
break;
|
|
3954
|
-
if (s[0] !== te.TRAILER || s.length < 5)
|
|
3955
|
-
throw new A("premature EOF", f[f.DATA_LOSS]);
|
|
3956
|
-
t(te.TRAILER, s.subarray(5));
|
|
3957
|
-
break;
|
|
3958
|
-
}
|
|
3959
|
-
}
|
|
3960
|
-
});
|
|
4120
|
+
function q(i, e, t, n, r) {
|
|
4121
|
+
const s = document.createElement("button");
|
|
4122
|
+
return e && (s.className = e), t && (s.id = t), i && (s.textContent = i), r && (s.innerHTML = r), s.disabled = n, s;
|
|
3961
4123
|
}
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
return t.set(i), t.set(e, i.length), t;
|
|
4124
|
+
function ln(i, e, t) {
|
|
4125
|
+
const n = document.createElement("input");
|
|
4126
|
+
return n.className = e, n.defaultValue = t, i && (n.type = i), n;
|
|
3966
4127
|
}
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
case "application/grpc-web-text+proto":
|
|
3971
|
-
return "text";
|
|
3972
|
-
case "application/grpc-web":
|
|
3973
|
-
case "application/grpc-web+proto":
|
|
3974
|
-
return "binary";
|
|
3975
|
-
case void 0:
|
|
3976
|
-
case null:
|
|
3977
|
-
throw new A("missing response content type", f[f.INTERNAL]);
|
|
3978
|
-
default:
|
|
3979
|
-
throw new A("unexpected response content type: " + i, f[f.INTERNAL]);
|
|
4128
|
+
class Ar extends Z {
|
|
4129
|
+
constructor() {
|
|
4130
|
+
super("com.hamropatro.grpc.cms.ImageUploadRequest", []);
|
|
3980
4131
|
}
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
if (n !== void 0) {
|
|
3985
|
-
if (Array.isArray(n))
|
|
3986
|
-
return [f.INTERNAL, "invalid grpc-web message"];
|
|
3987
|
-
t = n;
|
|
4132
|
+
create(e) {
|
|
4133
|
+
const t = globalThis.Object.create(this.messagePrototype);
|
|
4134
|
+
return e !== void 0 && M(this, t, e), t;
|
|
3988
4135
|
}
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
4136
|
+
internalBinaryRead(e, t, n, r) {
|
|
4137
|
+
return r ?? this.create();
|
|
4138
|
+
}
|
|
4139
|
+
internalBinaryWrite(e, t, n) {
|
|
4140
|
+
let r = n.writeUnknownFields;
|
|
4141
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3995
4142
|
}
|
|
3996
|
-
return [e, t];
|
|
3997
4143
|
}
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4144
|
+
const vn = new Ar();
|
|
4145
|
+
class Tr extends Z {
|
|
4146
|
+
constructor() {
|
|
4147
|
+
super("com.hamropatro.grpc.cms.ImageUploadResponse", [
|
|
4148
|
+
{
|
|
4149
|
+
no: 1,
|
|
4150
|
+
name: "key",
|
|
4151
|
+
kind: "scalar",
|
|
4152
|
+
T: 9
|
|
4153
|
+
/*ScalarType.STRING*/
|
|
4154
|
+
},
|
|
4155
|
+
{
|
|
4156
|
+
no: 2,
|
|
4157
|
+
name: "url",
|
|
4158
|
+
kind: "scalar",
|
|
4159
|
+
T: 9
|
|
4160
|
+
/*ScalarType.STRING*/
|
|
4161
|
+
}
|
|
4162
|
+
]);
|
|
4163
|
+
}
|
|
4164
|
+
create(e) {
|
|
4165
|
+
const t = globalThis.Object.create(this.messagePrototype);
|
|
4166
|
+
return t.key = "", t.url = "", e !== void 0 && M(this, t, e), t;
|
|
4167
|
+
}
|
|
4168
|
+
internalBinaryRead(e, t, n, r) {
|
|
4169
|
+
let s = r ?? this.create(), o = e.pos + t;
|
|
4170
|
+
for (; e.pos < o; ) {
|
|
4171
|
+
let [a, l] = e.tag();
|
|
4172
|
+
switch (a) {
|
|
4173
|
+
case /* string key */
|
|
4174
|
+
1:
|
|
4175
|
+
s.key = e.string();
|
|
4176
|
+
break;
|
|
4177
|
+
case /* string url */
|
|
4178
|
+
2:
|
|
4179
|
+
s.url = e.string();
|
|
4180
|
+
break;
|
|
4181
|
+
default:
|
|
4182
|
+
let c = n.readUnknownField;
|
|
4183
|
+
if (c === "throw")
|
|
4184
|
+
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
4185
|
+
let h = e.skip(l);
|
|
4186
|
+
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
4187
|
+
}
|
|
4008
4188
|
}
|
|
4009
|
-
|
|
4010
|
-
}
|
|
4011
|
-
function Tr(i) {
|
|
4012
|
-
let e = {};
|
|
4013
|
-
for (let t of String.fromCharCode.apply(String, i).trim().split(`\r
|
|
4014
|
-
`)) {
|
|
4015
|
-
if (t == "")
|
|
4016
|
-
continue;
|
|
4017
|
-
let [n, ...r] = t.split(":");
|
|
4018
|
-
const s = r.join(":").trim();
|
|
4019
|
-
n = n.trim();
|
|
4020
|
-
let o = e[n];
|
|
4021
|
-
typeof o == "string" ? e[n] = [o, s] : Array.isArray(o) ? o.push(s) : e[n] = s;
|
|
4189
|
+
return s;
|
|
4022
4190
|
}
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
return i.forEach((t, n) => {
|
|
4028
|
-
let r = e[n];
|
|
4029
|
-
typeof r == "string" ? e[n] = [r, t] : Array.isArray(r) ? r.push(t) : e[n] = t;
|
|
4030
|
-
}), e;
|
|
4031
|
-
}
|
|
4032
|
-
function Br(i) {
|
|
4033
|
-
switch (i) {
|
|
4034
|
-
case 200:
|
|
4035
|
-
return f.OK;
|
|
4036
|
-
case 400:
|
|
4037
|
-
return f.INVALID_ARGUMENT;
|
|
4038
|
-
case 401:
|
|
4039
|
-
return f.UNAUTHENTICATED;
|
|
4040
|
-
case 403:
|
|
4041
|
-
return f.PERMISSION_DENIED;
|
|
4042
|
-
case 404:
|
|
4043
|
-
return f.NOT_FOUND;
|
|
4044
|
-
case 409:
|
|
4045
|
-
return f.ABORTED;
|
|
4046
|
-
case 412:
|
|
4047
|
-
return f.FAILED_PRECONDITION;
|
|
4048
|
-
case 429:
|
|
4049
|
-
return f.RESOURCE_EXHAUSTED;
|
|
4050
|
-
case 499:
|
|
4051
|
-
return f.CANCELLED;
|
|
4052
|
-
case 500:
|
|
4053
|
-
return f.UNKNOWN;
|
|
4054
|
-
case 501:
|
|
4055
|
-
return f.UNIMPLEMENTED;
|
|
4056
|
-
case 503:
|
|
4057
|
-
return f.UNAVAILABLE;
|
|
4058
|
-
case 504:
|
|
4059
|
-
return f.DEADLINE_EXCEEDED;
|
|
4060
|
-
default:
|
|
4061
|
-
return f.UNKNOWN;
|
|
4191
|
+
internalBinaryWrite(e, t, n) {
|
|
4192
|
+
e.key !== "" && t.tag(1, m.LengthDelimited).string(e.key), e.url !== "" && t.tag(2, m.LengthDelimited).string(e.url);
|
|
4193
|
+
let r = n.writeUnknownFields;
|
|
4194
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
4062
4195
|
}
|
|
4063
4196
|
}
|
|
4064
|
-
|
|
4197
|
+
const vr = new Tr(), dt = new gt("com.hamropatro.grpc.cms.ImageUploadService", [
|
|
4198
|
+
{ name: "Upload", options: {}, I: vn, O: vr }
|
|
4199
|
+
]);
|
|
4200
|
+
class Br {
|
|
4065
4201
|
constructor(e) {
|
|
4066
|
-
this
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4202
|
+
B(this, "typeName", dt.typeName);
|
|
4203
|
+
B(this, "methods", dt.methods);
|
|
4204
|
+
B(this, "options", dt.options);
|
|
4205
|
+
this._transport = e;
|
|
4070
4206
|
}
|
|
4071
4207
|
/**
|
|
4072
|
-
*
|
|
4073
|
-
*
|
|
4074
|
-
* Takes the `baseUrl` option and appends:
|
|
4075
|
-
* - slash "/"
|
|
4076
|
-
* - package name
|
|
4077
|
-
* - dot "."
|
|
4078
|
-
* - service name
|
|
4079
|
-
* - slash "/"
|
|
4080
|
-
* - method name
|
|
4081
|
-
*
|
|
4082
|
-
* If the service was declared without a package, the package name and dot
|
|
4083
|
-
* are omitted.
|
|
4084
|
-
*
|
|
4085
|
-
* All names are used exactly like declared in .proto.
|
|
4208
|
+
* @generated from protobuf rpc: Upload(com.hamropatro.grpc.cms.ImageUploadRequest) returns (com.hamropatro.grpc.cms.ImageUploadResponse);
|
|
4086
4209
|
*/
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
return
|
|
4090
|
-
}
|
|
4091
|
-
clientStreaming(e) {
|
|
4092
|
-
const t = new A("Client streaming is not supported by grpc-web", f[f.UNIMPLEMENTED]);
|
|
4093
|
-
throw t.methodName = e.name, t.serviceName = e.service.typeName, t;
|
|
4094
|
-
}
|
|
4095
|
-
duplex(e) {
|
|
4096
|
-
const t = new A("Duplex streaming is not supported by grpc-web", f[f.UNIMPLEMENTED]);
|
|
4097
|
-
throw t.methodName = e.name, t.serviceName = e.service.typeName, t;
|
|
4210
|
+
upload(e, t) {
|
|
4211
|
+
const n = this.methods[0], r = this._transport.mergeOptions(t);
|
|
4212
|
+
return se("unary", this._transport, n, r, e);
|
|
4098
4213
|
}
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
throw new A(_ ?? f[y], f[y], j);
|
|
4112
|
-
return y != null && (I = {
|
|
4113
|
-
code: f[y],
|
|
4114
|
-
detail: _ ?? f[y]
|
|
4115
|
-
}), C;
|
|
4116
|
-
}).then((C) => {
|
|
4117
|
-
if (!C.body)
|
|
4118
|
-
throw new A("missing response body", f[f.INTERNAL]);
|
|
4119
|
-
return sn(C.body, C.headers.get("content-type"), (y, _) => {
|
|
4120
|
-
switch (y) {
|
|
4121
|
-
case te.DATA:
|
|
4122
|
-
v.notifyMessage(e.O.fromBinary(_, l.binaryOptions)), H = !1;
|
|
4123
|
-
break;
|
|
4124
|
-
case te.TRAILER:
|
|
4125
|
-
let j, Y;
|
|
4126
|
-
[j, Y, W] = rn(_), I = {
|
|
4127
|
-
code: f[j],
|
|
4128
|
-
detail: Y ?? f[j]
|
|
4129
|
-
};
|
|
4130
|
-
break;
|
|
4131
|
-
}
|
|
4132
|
-
});
|
|
4133
|
-
}).then(() => {
|
|
4134
|
-
if (!W && !H)
|
|
4135
|
-
throw new A("missing trailers", f[f.DATA_LOSS]);
|
|
4136
|
-
if (!I)
|
|
4137
|
-
throw new A("missing status", f[f.INTERNAL]);
|
|
4138
|
-
if (I.code !== "OK")
|
|
4139
|
-
throw new A(I.detail, I.code, W);
|
|
4140
|
-
v.notifyComplete(), $.resolve(I), z.resolve(W || {});
|
|
4141
|
-
}).catch((C) => {
|
|
4142
|
-
let y;
|
|
4143
|
-
C instanceof A ? y = C : C instanceof Error && C.name === "AbortError" ? y = new A(C.message, f[f.CANCELLED]) : y = new A(C instanceof Error ? C.message : "" + C, f[f.INTERNAL]), y.methodName = e.name, y.serviceName = e.service.typeName, F.rejectPending(y), v.notifyError(y), $.rejectPending(y), z.rejectPending(y);
|
|
4144
|
-
}), new _i(e, (a = l.meta) !== null && a !== void 0 ? a : {}, t, F.promise, v, $.promise, z.promise);
|
|
4214
|
+
}
|
|
4215
|
+
const xr = async () => {
|
|
4216
|
+
var i;
|
|
4217
|
+
try {
|
|
4218
|
+
const e = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, t = new Br(
|
|
4219
|
+
e
|
|
4220
|
+
), n = vn.create();
|
|
4221
|
+
return await t.upload(
|
|
4222
|
+
n
|
|
4223
|
+
);
|
|
4224
|
+
} catch (e) {
|
|
4225
|
+
throw e;
|
|
4145
4226
|
}
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
return
|
|
4150
|
-
method: "
|
|
4151
|
-
headers:
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
return y != null && (I = {
|
|
4160
|
-
code: f[y],
|
|
4161
|
-
detail: _ ?? f[y]
|
|
4162
|
-
}), C;
|
|
4163
|
-
}).then((C) => {
|
|
4164
|
-
if (!C.body)
|
|
4165
|
-
throw new A("missing response body", f[f.INTERNAL]);
|
|
4166
|
-
return sn(C.body, C.headers.get("content-type"), (y, _) => {
|
|
4167
|
-
switch (y) {
|
|
4168
|
-
case te.DATA:
|
|
4169
|
-
if (v)
|
|
4170
|
-
throw new A("unary call received 2nd message", f[f.DATA_LOSS]);
|
|
4171
|
-
v = e.O.fromBinary(_, l.binaryOptions);
|
|
4172
|
-
break;
|
|
4173
|
-
case te.TRAILER:
|
|
4174
|
-
let j, Y;
|
|
4175
|
-
[j, Y, W] = rn(_), I = {
|
|
4176
|
-
code: f[j],
|
|
4177
|
-
detail: Y ?? f[j]
|
|
4178
|
-
};
|
|
4179
|
-
break;
|
|
4180
|
-
}
|
|
4181
|
-
});
|
|
4182
|
-
}).then(() => {
|
|
4183
|
-
if (!W && v)
|
|
4184
|
-
throw new A("missing trailers", f[f.DATA_LOSS]);
|
|
4185
|
-
if (!I)
|
|
4186
|
-
throw new A("missing status", f[f.INTERNAL]);
|
|
4187
|
-
if (!v && I.code === "OK")
|
|
4188
|
-
throw new A("expected error status", f[f.DATA_LOSS]);
|
|
4189
|
-
if (!v)
|
|
4190
|
-
throw new A(I.detail, I.code, W);
|
|
4191
|
-
if (H.resolve(v), I.code !== "OK")
|
|
4192
|
-
throw new A(I.detail, I.code, W);
|
|
4193
|
-
$.resolve(I), z.resolve(W || {});
|
|
4194
|
-
}).catch((C) => {
|
|
4195
|
-
let y;
|
|
4196
|
-
C instanceof A ? y = C : C instanceof Error && C.name === "AbortError" ? y = new A(C.message, f[f.CANCELLED]) : y = new A(C instanceof Error ? C.message : "" + C, f[f.INTERNAL]), y.methodName = e.name, y.serviceName = e.service.typeName, F.rejectPending(y), H.rejectPending(y), $.rejectPending(y), z.rejectPending(y);
|
|
4197
|
-
}), new xi(e, (a = l.meta) !== null && a !== void 0 ? a : {}, t, F.promise, H.promise, $.promise, z.promise);
|
|
4227
|
+
}, Or = async (i, e) => {
|
|
4228
|
+
try {
|
|
4229
|
+
const t = _r(i, e), r = (await xr()).response.url;
|
|
4230
|
+
return await fetch(r, {
|
|
4231
|
+
method: "PUT",
|
|
4232
|
+
headers: {
|
|
4233
|
+
"Content-Type": "image/*",
|
|
4234
|
+
"x-amz-acl": "public-read"
|
|
4235
|
+
},
|
|
4236
|
+
body: t
|
|
4237
|
+
}), r == null ? void 0 : r.split("?")[0];
|
|
4238
|
+
} catch (t) {
|
|
4239
|
+
throw t;
|
|
4198
4240
|
}
|
|
4199
|
-
}
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
const
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
4209
|
-
return t.setAttribute("d", "m15 5 4 4"), i.appendChild(e), i.appendChild(t), document.body.appendChild(i), i;
|
|
4210
|
-
}
|
|
4211
|
-
function ln() {
|
|
4212
|
-
const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4213
|
-
i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("width", "16"), i.setAttribute("height", "16"), i.setAttribute("viewBox", "0 0 24 24"), i.setAttribute("fill", "none"), i.setAttribute("stroke", "#f14b4b"), i.setAttribute("stroke-width", "2"), i.setAttribute("stroke-linecap", "round"), i.setAttribute("stroke-linejoin", "round"), i.classList.add("lucide", "lucide-trash-2");
|
|
4214
|
-
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
4215
|
-
e.setAttribute("d", "M3 6h18");
|
|
4216
|
-
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
4217
|
-
t.setAttribute("d", "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6");
|
|
4218
|
-
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
4219
|
-
n.setAttribute("d", "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2");
|
|
4220
|
-
const r = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
4221
|
-
r.setAttribute("x1", "10"), r.setAttribute("x2", "10"), r.setAttribute("y1", "11"), r.setAttribute("y2", "17");
|
|
4222
|
-
const s = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
4223
|
-
return s.setAttribute("x1", "14"), s.setAttribute("x2", "14"), s.setAttribute("y1", "11"), s.setAttribute("y2", "17"), i.appendChild(e), i.appendChild(t), i.appendChild(n), i.appendChild(r), i.appendChild(s), document.body.appendChild(i), i;
|
|
4224
|
-
}
|
|
4225
|
-
function Or() {
|
|
4226
|
-
const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4227
|
-
i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("height", "24px"), i.setAttribute("viewBox", "0 -960 960 960"), i.setAttribute("width", "24px"), i.setAttribute("fill", "currentColor");
|
|
4228
|
-
const e = document.createElementNS(
|
|
4229
|
-
"http://www.w3.org/2000/svg",
|
|
4230
|
-
"path"
|
|
4231
|
-
);
|
|
4232
|
-
return e.setAttribute(
|
|
4233
|
-
"d",
|
|
4234
|
-
"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"
|
|
4235
|
-
), i.appendChild(e), i;
|
|
4236
|
-
}
|
|
4237
|
-
function _r() {
|
|
4238
|
-
const i = "http://www.w3.org/2000/svg", e = document.createElementNS(i, "svg");
|
|
4239
|
-
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");
|
|
4240
|
-
const t = document.createElementNS(i, "path");
|
|
4241
|
-
t.setAttribute(
|
|
4242
|
-
"d",
|
|
4243
|
-
"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"
|
|
4244
|
-
), e.appendChild(t);
|
|
4245
|
-
const n = document.createElementNS(i, "circle");
|
|
4246
|
-
return n.setAttribute("cx", "12"), n.setAttribute("cy", "12"), n.setAttribute("r", "3"), e.appendChild(n), document.body.appendChild(e), e;
|
|
4247
|
-
}
|
|
4241
|
+
}, _r = (i, e) => {
|
|
4242
|
+
const t = e.type.split("/")[0];
|
|
4243
|
+
let n = "";
|
|
4244
|
+
t === "video" ? n = i == null ? void 0 : i.replace(/^data:video\/\w+;base64,/, "") : t === "image" && (n = i == null ? void 0 : i.replace(/^data:image\/\w+;base64,/, ""));
|
|
4245
|
+
const r = atob(n), s = new Uint8Array(r.length);
|
|
4246
|
+
for (let o = 0; o < r.length; o++)
|
|
4247
|
+
s[o] = r.charCodeAt(o);
|
|
4248
|
+
return s;
|
|
4249
|
+
};
|
|
4248
4250
|
var Ae, Te, S, ce, O, R, we, K, ve, be, ne, Q, ye, He, Ce, Ee, de, Be, ie, re, Ne, ke, he, De, $e, X, ue, We, Pe, Fe;
|
|
4249
4251
|
class Ur {
|
|
4250
4252
|
constructor(e) {
|
|
@@ -4295,7 +4297,9 @@ class Ur {
|
|
|
4295
4297
|
const { parentContainerId: t, buttonProps: n } = e;
|
|
4296
4298
|
p(this, Ae, document.getElementById(t));
|
|
4297
4299
|
const r = document.createElement("button");
|
|
4298
|
-
r.className = n != null && n.buttonClass ? n == null ? void 0 : n.buttonClass : "browse-image-button"
|
|
4300
|
+
r.className = n != null && n.buttonClass ? n == null ? void 0 : n.buttonClass : "browse-image-button", r.addEventListener("focus", () => {
|
|
4301
|
+
r.blur();
|
|
4302
|
+
});
|
|
4299
4303
|
const s = document.createElement("span");
|
|
4300
4304
|
s.textContent = n != null && n.buttonText ? n == null ? void 0 : n.buttonText : "Browse Files";
|
|
4301
4305
|
const o = document.createElement("span");
|
|
@@ -4304,7 +4308,7 @@ class Ur {
|
|
|
4304
4308
|
}), d(this, Ae) && d(this, Ae).appendChild(r), d(this, Ae);
|
|
4305
4309
|
}
|
|
4306
4310
|
async _grpcOptionInitializer() {
|
|
4307
|
-
p(this, X, await
|
|
4311
|
+
p(this, X, await Fr(d(this, $e)));
|
|
4308
4312
|
}
|
|
4309
4313
|
_selectedImageContainer() {
|
|
4310
4314
|
var g;
|
|
@@ -4320,25 +4324,25 @@ class Ur {
|
|
|
4320
4324
|
!1,
|
|
4321
4325
|
'<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>'
|
|
4322
4326
|
).addEventListener("click", () => {
|
|
4323
|
-
|
|
4327
|
+
Je.hide(), p(this, O, []), p(this, R, []);
|
|
4324
4328
|
}), p(this, Te, b("browse-container"));
|
|
4325
4329
|
const n = b();
|
|
4326
4330
|
n.style.display = "flex", n.style.alignItems = "center", n.style.justifyContent = "space-between", n.style.padding = "10px 20px";
|
|
4327
|
-
const r =
|
|
4328
|
-
s.append(
|
|
4331
|
+
const r = Re("Folders", "folder-title"), s = q("", "add-folder-btn");
|
|
4332
|
+
s.append(rn()), this._createUpdateFolderDialog(s, "create"), n.append(r, s), d(this, Ee).append(n, d(this, de));
|
|
4329
4333
|
const o = this._renderSearchField(), a = this._createBrowseMoreContainer(), l = this._createBrowseImageMain(), c = b("footer");
|
|
4330
4334
|
e.onclick = () => {
|
|
4331
|
-
|
|
4335
|
+
Je.hide(), p(this, R, []), p(this, O, []);
|
|
4332
4336
|
}, d(this, ye).onclick = () => {
|
|
4333
|
-
d(this, He).call(this),
|
|
4337
|
+
d(this, He).call(this), Je.hide(), p(this, O, []), p(this, R, []);
|
|
4334
4338
|
}, c.append(e, d(this, ye));
|
|
4335
4339
|
const h = b("container-right-main");
|
|
4336
|
-
h.append(o, a, l, c), d(this, Te).append(d(this, Ee), h),
|
|
4340
|
+
h.append(o, a, l, c), d(this, Te).append(d(this, Ee), h), Je.show({
|
|
4337
4341
|
content: d(this, Te)
|
|
4338
4342
|
});
|
|
4339
4343
|
}
|
|
4340
4344
|
_createAllAndSelectedTab(e) {
|
|
4341
|
-
const t = b("select-options"), n =
|
|
4345
|
+
const t = b("select-options"), n = Re("Browse", "select"), r = Re(
|
|
4342
4346
|
"Selected",
|
|
4343
4347
|
"select",
|
|
4344
4348
|
"selected-images-tab"
|
|
@@ -4351,10 +4355,10 @@ class Ur {
|
|
|
4351
4355
|
}), t.append(n, r), e.appendChild(t);
|
|
4352
4356
|
}
|
|
4353
4357
|
_renderUploadButton() {
|
|
4354
|
-
const e =
|
|
4358
|
+
const e = ln("file");
|
|
4355
4359
|
e.style.display = "none", e.setAttribute("multiple", "true"), e.setAttribute("accept", "image/*,video/*,audio/*,.gif"), p(this, ce, document.createElement("button")), d(this, ce).className = "browse-more-btn";
|
|
4356
4360
|
const t = document.createElement("span");
|
|
4357
|
-
return t.textContent = "Upload", d(this, ce).append(
|
|
4361
|
+
return t.textContent = "Upload", d(this, ce).append(wr(), t), d(this, ce).type = "button", d(this, ce).addEventListener(
|
|
4358
4362
|
"click",
|
|
4359
4363
|
() => e.click()
|
|
4360
4364
|
), e.addEventListener("change", () => {
|
|
@@ -4374,7 +4378,7 @@ class Ur {
|
|
|
4374
4378
|
const e = document.createElement("button");
|
|
4375
4379
|
e.className = "create-folder-btn";
|
|
4376
4380
|
const t = document.createElement("span");
|
|
4377
|
-
return t.textContent = "Create", e.append(
|
|
4381
|
+
return t.textContent = "Create", e.append(rn(), t), this._createUpdateFolderDialog(e, "create"), e;
|
|
4378
4382
|
}
|
|
4379
4383
|
_renderSearchField() {
|
|
4380
4384
|
let e;
|
|
@@ -4382,7 +4386,7 @@ class Ur {
|
|
|
4382
4386
|
"search-input-wrapper",
|
|
4383
4387
|
"search-input-wrapper"
|
|
4384
4388
|
);
|
|
4385
|
-
p(this, ke,
|
|
4389
|
+
p(this, ke, ln("search")), d(this, ke).value = "", d(this, ke).addEventListener("input", (s) => {
|
|
4386
4390
|
p(this, R, []);
|
|
4387
4391
|
const o = s.target;
|
|
4388
4392
|
e && clearTimeout(e), e = setTimeout(() => {
|
|
@@ -4393,7 +4397,7 @@ class Ur {
|
|
|
4393
4397
|
p(this, he, !0), p(this, De, o.value), this._search(d(this, De));
|
|
4394
4398
|
}, 750);
|
|
4395
4399
|
}), d(this, ke).setAttribute("placeholder", "Search");
|
|
4396
|
-
const r =
|
|
4400
|
+
const r = gr();
|
|
4397
4401
|
return r.style.position = "absolute", r.style.top = "50%", r.style.left = "5%", r.style.transform = "translate(-5%, -50%)", n.append(r, d(this, ke)), t.append(n), t;
|
|
4398
4402
|
}
|
|
4399
4403
|
_createBrowseMoreContainer() {
|
|
@@ -4517,20 +4521,20 @@ class Ur {
|
|
|
4517
4521
|
'<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>'
|
|
4518
4522
|
);
|
|
4519
4523
|
let s, o;
|
|
4520
|
-
(e == null ? void 0 : e.type) === fe.IMAGE && (s =
|
|
4524
|
+
(e == null ? void 0 : e.type) === fe.IMAGE && (s = an(e == null ? void 0 : e.url, "selected-image"), o = pr()), (e == null ? void 0 : e.type) === fe.VIDEO && (s = Ir(e == null ? void 0 : e.url, "uploaded-video"), o = br()), (e == null ? void 0 : e.type) === fe.AUDIO && (s = Lr(e == null ? void 0 : e.url, "uploaded-audio"), o = hr());
|
|
4521
4525
|
const a = b("selected-image-wrapper");
|
|
4522
4526
|
a.setAttribute("data-key", e == null ? void 0 : e.key);
|
|
4523
|
-
const l =
|
|
4527
|
+
const l = Re(e == null ? void 0 : e.name, "selected-image-name"), c = L("", "selected-image-type");
|
|
4524
4528
|
c.append(o), n.append(c, r);
|
|
4525
4529
|
const h = b();
|
|
4526
4530
|
h.style.marginTop = "10px", h.style.display = "flex", h.style.justifyContent = "space-between", h.style.alignItems = "center", h.append(l), t.append(n, s), a.append(t, h);
|
|
4527
|
-
const g = b("action-wrapper"), w = q("", "action-option preview"), F = L("Preview", ""), v =
|
|
4531
|
+
const g = b("action-wrapper"), w = q("", "action-option preview"), F = L("Preview", ""), v = mr();
|
|
4528
4532
|
w.append(v, F);
|
|
4529
|
-
const H = q("", "action-option move"), I = L("Move", ""), $ =
|
|
4533
|
+
const H = q("", "action-option move"), I = L("Move", ""), $ = fr();
|
|
4530
4534
|
H.append($, I);
|
|
4531
|
-
const W = q("", "action-option rename"), z = L("Rename", ""), C =
|
|
4535
|
+
const W = q("", "action-option rename"), z = L("Rename", ""), C = nn();
|
|
4532
4536
|
W.append(C, z);
|
|
4533
|
-
const y = q("", "action-option delete"), _ = L("Delete", ""), j =
|
|
4537
|
+
const y = q("", "action-option delete"), _ = L("Delete", ""), j = sn();
|
|
4534
4538
|
y.append(j, _);
|
|
4535
4539
|
const Y = e.name.split(".")[0], Bn = e.name.split(".")[1], xn = Me[e.type], bt = b("edit-form-wrapper"), yt = b("move-form-wrapper"), Ct = b("preview-details-container"), Et = b("preview-details-wrapper"), Nt = b(
|
|
4536
4540
|
"preview-option-image-wrapper"
|
|
@@ -4540,7 +4544,7 @@ class Ur {
|
|
|
4540
4544
|
"preview-option-wrapper"
|
|
4541
4545
|
), Tt = b("preview-option-wrapper"), vt = b(
|
|
4542
4546
|
"preview-option-wrapper"
|
|
4543
|
-
), On =
|
|
4547
|
+
), On = an(e.url, "preview-option-image");
|
|
4544
4548
|
Nt.append(On);
|
|
4545
4549
|
const _n = L("File name", "preview-title"), Bt = b("preview-option-name");
|
|
4546
4550
|
Bt.innerHTML = e.name, kt.append(_n, Bt);
|
|
@@ -4609,14 +4613,14 @@ class Ur {
|
|
|
4609
4613
|
const xt = b("form-control"), je = document.createElement("input");
|
|
4610
4614
|
xt.appendChild(je), je.classList.add("input-field"), je.value = e.name;
|
|
4611
4615
|
const Ot = b("form-control"), qn = L("Current Folder:", "input-label"), it = b("folder-field current");
|
|
4612
|
-
it.textContent = e.folderName, it.prepend(
|
|
4616
|
+
it.textContent = e.folderName, it.prepend(Ue()), Ot.append(qn, it);
|
|
4613
4617
|
const _t = b("form-control"), xe = b();
|
|
4614
4618
|
xe.style.width = "100%", xe.style.display = "flex", xe.style.alignItems = "center", xe.style.justifyContent = "space-between";
|
|
4615
4619
|
const Kn = L(
|
|
4616
4620
|
"Suggested Folder List:",
|
|
4617
4621
|
"input-label"
|
|
4618
4622
|
), Le = L();
|
|
4619
|
-
Le.style.display = "flex", Le.style.alignItems = "center", Le.style.gap = "5px", Le.style.fontSize = "14px", Le.textContent = "Move the file in selected folder", Le.appendChild(
|
|
4623
|
+
Le.style.display = "flex", Le.style.alignItems = "center", Le.style.gap = "5px", Le.style.fontSize = "14px", Le.textContent = "Move the file in selected folder", Le.appendChild(en("14px", "14px", "#333")), xe.append(Kn, Le);
|
|
4620
4624
|
const Se = b();
|
|
4621
4625
|
Se.style.width = "100%", Se.style.maxHeight = "250px", Se.style.overflowY = "auto";
|
|
4622
4626
|
const rt = document.createElement("ul");
|
|
@@ -4628,7 +4632,7 @@ class Ur {
|
|
|
4628
4632
|
"folder-field source",
|
|
4629
4633
|
"source-folder-wrapper"
|
|
4630
4634
|
), st = document.createElement("span");
|
|
4631
|
-
st.id = "source-folder-name", st.textContent = d(this, Fe) ? d(this, Fe) : e.folderName, St.append(
|
|
4635
|
+
st.id = "source-folder-name", st.textContent = d(this, Fe) ? d(this, Fe) : e.folderName, St.append(Ue(), st);
|
|
4632
4636
|
let Oe = "";
|
|
4633
4637
|
Dt.append(Xn, St), je.onchange = (x) => {
|
|
4634
4638
|
Oe = x.target.value;
|
|
@@ -4763,9 +4767,9 @@ class Ur {
|
|
|
4763
4767
|
const n = document.createElement("div");
|
|
4764
4768
|
n.style.position = "relative", n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "2px";
|
|
4765
4769
|
const r = document.createElement("span"), s = document.createElement("span");
|
|
4766
|
-
if (s.className = "folder-name", s.textContent = e == null ? void 0 : e.name, r.appendChild(
|
|
4770
|
+
if (s.className = "folder-name", s.textContent = e == null ? void 0 : e.name, r.appendChild(Ue()), n.append(r, s), t.append(n), e.children && Object.keys(e.children).length > 0) {
|
|
4767
4771
|
const a = document.createElement("button");
|
|
4768
|
-
a.classList.add("expand-icon"), a.appendChild(
|
|
4772
|
+
a.classList.add("expand-icon"), a.appendChild(tn()), n.prepend(a);
|
|
4769
4773
|
const l = document.createElement("ul");
|
|
4770
4774
|
l.className = "folders nested", t.appendChild(l), a.addEventListener("click", (c) => {
|
|
4771
4775
|
c.stopPropagation(), t.classList.toggle("active"), l.classList.toggle("visible");
|
|
@@ -4783,7 +4787,7 @@ class Ur {
|
|
|
4783
4787
|
"moveToInputField.disabled",
|
|
4784
4788
|
!1,
|
|
4785
4789
|
'<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>'
|
|
4786
|
-
), l = b("action-wrapper"), c = q("", "action-option edit"), h = L("Edit", ""), g =
|
|
4790
|
+
), l = b("action-wrapper"), c = q("", "action-option edit"), h = L("Edit", ""), g = nn();
|
|
4787
4791
|
c.append(g, h);
|
|
4788
4792
|
const w = b("edit-form-wrapper"), F = b("name-field-wrapper"), v = L("Name", "input-label"), H = document.createElement("input");
|
|
4789
4793
|
H.classList.add("input-field"), H.value = e.name, H.onchange = (C) => {
|
|
@@ -4796,7 +4800,7 @@ class Ur {
|
|
|
4796
4800
|
createdBy: e.createdBy
|
|
4797
4801
|
};
|
|
4798
4802
|
this._createUpdateFolderDialog(c, "update", I);
|
|
4799
|
-
const $ = q("", "action-option delete"), W = L("Delete", ""), z =
|
|
4803
|
+
const $ = q("", "action-option delete"), W = L("Delete", ""), z = sn();
|
|
4800
4804
|
$.append(z, W), l.append(c, $), $.onclick = (C) => {
|
|
4801
4805
|
C.stopPropagation(), G.hide(), D.show({
|
|
4802
4806
|
content: "",
|
|
@@ -4834,9 +4838,9 @@ class Ur {
|
|
|
4834
4838
|
const n = document.createElement("div");
|
|
4835
4839
|
n.style.position = "relative", n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "2px";
|
|
4836
4840
|
const r = document.createElement("span"), s = document.createElement("span");
|
|
4837
|
-
if (s.className = "folder-name", s.textContent = e == null ? void 0 : e.name, r.appendChild(
|
|
4841
|
+
if (s.className = "folder-name", s.textContent = e == null ? void 0 : e.name, r.appendChild(Ue()), n.append(r, s), t.append(n), e.children && Object.keys(e.children).length > 0) {
|
|
4838
4842
|
const a = document.createElement("button");
|
|
4839
|
-
a.classList.add("expand-icon"), a.appendChild(
|
|
4843
|
+
a.classList.add("expand-icon"), a.appendChild(tn()), n.prepend(a);
|
|
4840
4844
|
const l = document.createElement("ul");
|
|
4841
4845
|
l.className = "folders nested", t.appendChild(l), a.addEventListener("click", (c) => {
|
|
4842
4846
|
c.stopPropagation(), t.classList.toggle("active"), l.classList.toggle("visible");
|
|
@@ -4869,9 +4873,9 @@ class Ur {
|
|
|
4869
4873
|
}
|
|
4870
4874
|
_renderToastContainer(e, t) {
|
|
4871
4875
|
this._removeToastContainer(), p(this, ie, document.createElement("div")), d(this, ie).className = `message-container ${t}`;
|
|
4872
|
-
const n =
|
|
4876
|
+
const n = Re(e, "message"), r = t === "success" ? ur() : en(), s = q("");
|
|
4873
4877
|
s.style.cursor = "pointer", s.style.border = "0", s.style.outline = "none", s.style.background = "transparent", s.appendChild(
|
|
4874
|
-
|
|
4878
|
+
An(t === "error" ? "#ee3f3f" : "#4caf50")
|
|
4875
4879
|
), s.setAttribute(
|
|
4876
4880
|
"fill",
|
|
4877
4881
|
t === "error" ? "#ee3f3f" : "#4caf50"
|
|
@@ -4908,11 +4912,11 @@ class Ur {
|
|
|
4908
4912
|
var n, r;
|
|
4909
4913
|
p(this, we, !0), this._updateSelectedImageListContainerUI();
|
|
4910
4914
|
try {
|
|
4911
|
-
const s = await
|
|
4915
|
+
const s = await Or(e, t), o = await Ji(
|
|
4912
4916
|
t == null ? void 0 : t.name,
|
|
4913
4917
|
"",
|
|
4914
4918
|
s,
|
|
4915
|
-
fe[
|
|
4919
|
+
fe[Er((n = t.type) == null ? void 0 : n.split("/")[0])],
|
|
4916
4920
|
(r = d(this, Q)) == null ? void 0 : r.name,
|
|
4917
4921
|
d(this, X)
|
|
4918
4922
|
);
|
|
@@ -4929,7 +4933,7 @@ class Ur {
|
|
|
4929
4933
|
async _updateFile(e, t) {
|
|
4930
4934
|
D.updateUploadBtn(!0);
|
|
4931
4935
|
try {
|
|
4932
|
-
const n = await
|
|
4936
|
+
const n = await Qi(
|
|
4933
4937
|
t.key,
|
|
4934
4938
|
e,
|
|
4935
4939
|
t.nestedFolderName,
|
|
@@ -4955,7 +4959,7 @@ class Ur {
|
|
|
4955
4959
|
async _deleteFile(e) {
|
|
4956
4960
|
D.updateUploadBtn(!0);
|
|
4957
4961
|
try {
|
|
4958
|
-
await
|
|
4962
|
+
await er(e, d(this, X)), p(this, R, d(this, R).filter((t) => e !== t.key)), this._renderToastContainer("File Deleted Successfully", "success");
|
|
4959
4963
|
} catch {
|
|
4960
4964
|
this._renderToastContainer(
|
|
4961
4965
|
"Something went wrong while deleting the file. Please try again later.",
|
|
@@ -4968,14 +4972,14 @@ class Ur {
|
|
|
4968
4972
|
async _createFolder(e, t = 2) {
|
|
4969
4973
|
var n;
|
|
4970
4974
|
try {
|
|
4971
|
-
const r = await
|
|
4975
|
+
const r = await lr(
|
|
4972
4976
|
e,
|
|
4973
4977
|
(n = d(this, Q)) == null ? void 0 : n.name,
|
|
4974
4978
|
"",
|
|
4975
4979
|
d(this, X)
|
|
4976
4980
|
);
|
|
4977
4981
|
p(this, O, []), p(this, R, []);
|
|
4978
|
-
const s =
|
|
4982
|
+
const s = kr(d(this, ne), r == null ? void 0 : r.response);
|
|
4979
4983
|
p(this, ne, s), p(this, be, e), p(this, Q, { ...r == null ? void 0 : r.response, children: {} }), this._fetchFilesFromFolder(e), this._renderToastContainer(
|
|
4980
4984
|
`Folder ${e} created successfully`,
|
|
4981
4985
|
"success"
|
|
@@ -5001,7 +5005,7 @@ class Ur {
|
|
|
5001
5005
|
var t, n, r;
|
|
5002
5006
|
p(this, K, !0), this._updateSelectedImageListContainerUI();
|
|
5003
5007
|
try {
|
|
5004
|
-
const s = await
|
|
5008
|
+
const s = await zi(
|
|
5005
5009
|
e,
|
|
5006
5010
|
d(this, re),
|
|
5007
5011
|
20,
|
|
@@ -5023,7 +5027,7 @@ class Ur {
|
|
|
5023
5027
|
var e, t;
|
|
5024
5028
|
p(this, K, !0), p(this, ve, !0), this._updateSelectedImageListContainerUI(), this._updateFolderListContainer(), this._removeToastContainer();
|
|
5025
5029
|
try {
|
|
5026
|
-
const r = (await
|
|
5030
|
+
const r = (await ar("", 100, d(this, X))).response.folder, s = Nr(r);
|
|
5027
5031
|
p(this, be, (e = s[0]) == null ? void 0 : e.name), this._fetchFilesFromFolder((t = s[0]) == null ? void 0 : t.name), p(this, Q, s[0]), p(this, ne, s);
|
|
5028
5032
|
} catch {
|
|
5029
5033
|
p(this, K, !1), this._renderToastContainer(
|
|
@@ -5038,7 +5042,7 @@ class Ur {
|
|
|
5038
5042
|
var t, n;
|
|
5039
5043
|
p(this, K, !0), this._updateSelectedImageListContainerUI(), this._removeToastContainer();
|
|
5040
5044
|
try {
|
|
5041
|
-
const r = await
|
|
5045
|
+
const r = await Yi(
|
|
5042
5046
|
e,
|
|
5043
5047
|
d(this, re),
|
|
5044
5048
|
10,
|
|
@@ -5054,7 +5058,7 @@ class Ur {
|
|
|
5054
5058
|
async _updateFolder(e, t) {
|
|
5055
5059
|
D.updateUploadBtn(!0);
|
|
5056
5060
|
try {
|
|
5057
|
-
const n = await
|
|
5061
|
+
const n = await cr(
|
|
5058
5062
|
t.key,
|
|
5059
5063
|
e,
|
|
5060
5064
|
t.nestedFolderName,
|
|
@@ -5073,7 +5077,7 @@ class Ur {
|
|
|
5073
5077
|
async _deleteFolder(e) {
|
|
5074
5078
|
D.updateUploadBtn(!0);
|
|
5075
5079
|
try {
|
|
5076
|
-
await
|
|
5080
|
+
await dr(e, d(this, X)), p(this, ne, d(this, ne).filter((t) => t.key !== e)), this._renderToastContainer("Folder Deleted Successfully", "success");
|
|
5077
5081
|
} catch {
|
|
5078
5082
|
throw this._renderToastContainer(
|
|
5079
5083
|
"Something went wrong while deleting the folder. Please try again later.",
|
|
@@ -5092,7 +5096,7 @@ class Ur {
|
|
|
5092
5096
|
const h = document.createElement("input");
|
|
5093
5097
|
h.style.paddingLeft = "40px";
|
|
5094
5098
|
const g = L();
|
|
5095
|
-
g.appendChild(
|
|
5099
|
+
g.appendChild(Ue()), g.style.position = "absolute", g.style.top = "50%", g.style.left = "5%", g.style.transform = "translate(-40%, -40%)", h.classList.add("input-field"), c.append(h, g), t === "update" && (h.value = n.name), h.onchange = (w) => {
|
|
5096
5100
|
s = w.target.value;
|
|
5097
5101
|
}, a.append(l, c), o.append(a), D.show({
|
|
5098
5102
|
content: o,
|
|
@@ -5119,7 +5123,7 @@ class Ur {
|
|
|
5119
5123
|
_initializeGrpcConfig(e, t) {
|
|
5120
5124
|
let n = "https://hamro-cms-backend-grpc.hamrostack.com";
|
|
5121
5125
|
t && (e === "production" || e === "development") ? n = t : e === "production" && (n = "https://page-api-grpc.hamropatro.com");
|
|
5122
|
-
const r = new
|
|
5126
|
+
const r = new Ri({
|
|
5123
5127
|
baseUrl: n
|
|
5124
5128
|
});
|
|
5125
5129
|
this.updateWindowObject({ grpcConfig: r });
|