liveroom-client-element 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var g = (n, s, t) => (
|
|
1
|
+
var Ze = Object.defineProperty;
|
|
2
|
+
var Ye = (n, s, t) => s in n ? Ze(n, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[s] = t;
|
|
3
|
+
var g = (n, s, t) => (Ye(n, typeof s != "symbol" ? s + "" : s, t), t);
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
* Copyright 2019 Google LLC
|
|
7
7
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
8
8
|
*/
|
|
9
|
-
const
|
|
10
|
-
let
|
|
9
|
+
const pt = window, Ut = pt.ShadowRoot && (pt.ShadyCSS === void 0 || pt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Dt = Symbol(), te = /* @__PURE__ */ new WeakMap();
|
|
10
|
+
let ge = class {
|
|
11
11
|
constructor(s, t, e) {
|
|
12
|
-
if (this._$cssResult$ = !0, e !==
|
|
12
|
+
if (this._$cssResult$ = !0, e !== Dt)
|
|
13
13
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
14
14
|
this.cssText = s, this.t = t;
|
|
15
15
|
}
|
|
16
16
|
get styleSheet() {
|
|
17
17
|
let s = this.o;
|
|
18
18
|
const t = this.t;
|
|
19
|
-
if (
|
|
19
|
+
if (Ut && s === void 0) {
|
|
20
20
|
const e = t !== void 0 && t.length === 1;
|
|
21
|
-
e && (s =
|
|
21
|
+
e && (s = te.get(t)), s === void 0 && ((this.o = s = new CSSStyleSheet()).replaceSync(this.cssText), e && te.set(t, s));
|
|
22
22
|
}
|
|
23
23
|
return s;
|
|
24
24
|
}
|
|
@@ -26,7 +26,7 @@ let ve = class {
|
|
|
26
26
|
return this.cssText;
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
const
|
|
29
|
+
const Qe = (n) => new ge(typeof n == "string" ? n : n + "", void 0, Dt), ts = (n, ...s) => {
|
|
30
30
|
const t = n.length === 1 ? n[0] : s.reduce((e, i, r) => e + ((o) => {
|
|
31
31
|
if (o._$cssResult$ === !0)
|
|
32
32
|
return o.cssText;
|
|
@@ -34,17 +34,17 @@ const Ye = (n) => new ve(typeof n == "string" ? n : n + "", void 0, Ut), Ze = (n
|
|
|
34
34
|
return o;
|
|
35
35
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
36
36
|
})(i) + n[r + 1], n[0]);
|
|
37
|
-
return new
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
const e = document.createElement("style"), i =
|
|
37
|
+
return new ge(t, n, Dt);
|
|
38
|
+
}, es = (n, s) => {
|
|
39
|
+
Ut ? n.adoptedStyleSheets = s.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet) : s.forEach((t) => {
|
|
40
|
+
const e = document.createElement("style"), i = pt.litNonce;
|
|
41
41
|
i !== void 0 && e.setAttribute("nonce", i), e.textContent = t.cssText, n.appendChild(e);
|
|
42
42
|
});
|
|
43
|
-
},
|
|
43
|
+
}, ee = Ut ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((s) => {
|
|
44
44
|
let t = "";
|
|
45
45
|
for (const e of s.cssRules)
|
|
46
46
|
t += e.cssText;
|
|
47
|
-
return
|
|
47
|
+
return Qe(t);
|
|
48
48
|
})(n) : n;
|
|
49
49
|
/**
|
|
50
50
|
* @license
|
|
@@ -52,10 +52,10 @@ const Ye = (n) => new ve(typeof n == "string" ? n : n + "", void 0, Ut), Ze = (n
|
|
|
52
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
53
|
*/
|
|
54
54
|
var $t;
|
|
55
|
-
const
|
|
55
|
+
const ft = window, se = ft.trustedTypes, ss = se ? se.emptyScript : "", ne = ft.reactiveElementPolyfillSupport, Mt = { toAttribute(n, s) {
|
|
56
56
|
switch (s) {
|
|
57
57
|
case Boolean:
|
|
58
|
-
n = n ?
|
|
58
|
+
n = n ? ss : null;
|
|
59
59
|
break;
|
|
60
60
|
case Object:
|
|
61
61
|
case Array:
|
|
@@ -80,8 +80,8 @@ const vt = window, ee = vt.trustedTypes, ts = ee ? ee.emptyScript : "", se = vt.
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
return t;
|
|
83
|
-
} },
|
|
84
|
-
let
|
|
83
|
+
} }, ye = (n, s) => s !== n && (s == s || n == n), Ct = { attribute: !0, type: String, converter: Mt, reflect: !1, hasChanged: ye }, Rt = "finalized";
|
|
84
|
+
let F = class extends HTMLElement {
|
|
85
85
|
constructor() {
|
|
86
86
|
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
|
|
87
87
|
}
|
|
@@ -115,9 +115,9 @@ let q = class extends HTMLElement {
|
|
|
115
115
|
return this.elementProperties.get(s) || Ct;
|
|
116
116
|
}
|
|
117
117
|
static finalize() {
|
|
118
|
-
if (this.hasOwnProperty(
|
|
118
|
+
if (this.hasOwnProperty(Rt))
|
|
119
119
|
return !1;
|
|
120
|
-
this
|
|
120
|
+
this[Rt] = !0;
|
|
121
121
|
const s = Object.getPrototypeOf(this);
|
|
122
122
|
if (s.finalize(), s.h !== void 0 && (this.h = [...s.h]), this.elementProperties = new Map(s.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
123
123
|
const t = this.properties, e = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
|
|
@@ -131,9 +131,9 @@ let q = class extends HTMLElement {
|
|
|
131
131
|
if (Array.isArray(s)) {
|
|
132
132
|
const e = new Set(s.flat(1 / 0).reverse());
|
|
133
133
|
for (const i of e)
|
|
134
|
-
t.unshift(
|
|
134
|
+
t.unshift(ee(i));
|
|
135
135
|
} else
|
|
136
|
-
s !== void 0 && t.push(
|
|
136
|
+
s !== void 0 && t.push(ee(s));
|
|
137
137
|
return t;
|
|
138
138
|
}
|
|
139
139
|
static _$Ep(s, t) {
|
|
@@ -160,7 +160,7 @@ let q = class extends HTMLElement {
|
|
|
160
160
|
createRenderRoot() {
|
|
161
161
|
var s;
|
|
162
162
|
const t = (s = this.shadowRoot) !== null && s !== void 0 ? s : this.attachShadow(this.constructor.shadowRootOptions);
|
|
163
|
-
return
|
|
163
|
+
return es(t, this.constructor.elementStyles), t;
|
|
164
164
|
}
|
|
165
165
|
connectedCallback() {
|
|
166
166
|
var s;
|
|
@@ -199,7 +199,7 @@ let q = class extends HTMLElement {
|
|
|
199
199
|
}
|
|
200
200
|
requestUpdate(s, t, e) {
|
|
201
201
|
let i = !0;
|
|
202
|
-
s !== void 0 && (((e = e || this.constructor.getPropertyOptions(s)).hasChanged ||
|
|
202
|
+
s !== void 0 && (((e = e || this.constructor.getPropertyOptions(s)).hasChanged || ye)(this[s], t) ? (this._$AL.has(s) || this._$AL.set(s, t), e.reflect === !0 && this._$El !== s && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(s, e))) : i = !1), !this.isUpdatePending && i && (this._$E_ = this._$Ej());
|
|
203
203
|
}
|
|
204
204
|
async _$Ej() {
|
|
205
205
|
this.isUpdatePending = !0;
|
|
@@ -260,73 +260,76 @@ let q = class extends HTMLElement {
|
|
|
260
260
|
firstUpdated(s) {
|
|
261
261
|
}
|
|
262
262
|
};
|
|
263
|
-
|
|
263
|
+
F[Rt] = !0, F.elementProperties = /* @__PURE__ */ new Map(), F.elementStyles = [], F.shadowRootOptions = { mode: "open" }, ne == null || ne({ ReactiveElement: F }), (($t = ft.reactiveElementVersions) !== null && $t !== void 0 ? $t : ft.reactiveElementVersions = []).push("1.6.2");
|
|
264
264
|
/**
|
|
265
265
|
* @license
|
|
266
266
|
* Copyright 2017 Google LLC
|
|
267
267
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
268
268
|
*/
|
|
269
269
|
var Tt;
|
|
270
|
-
const
|
|
271
|
-
\f\r]`,
|
|
272
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
273
|
-
|
|
274
|
-
let i, r = s === 2 ? "<svg>" : "", o = Q;
|
|
275
|
-
for (let u = 0; u < t; u++) {
|
|
276
|
-
const d = n[u];
|
|
277
|
-
let C, y, $ = -1, x = 0;
|
|
278
|
-
for (; x < d.length && (o.lastIndex = x, y = o.exec(d), y !== null); )
|
|
279
|
-
x = o.lastIndex, o === Q ? y[1] === "!--" ? o = ie : y[1] !== void 0 ? o = re : y[2] !== void 0 ? (_e.test(y[2]) && (i = RegExp("</" + y[2], "g")), o = V) : y[3] !== void 0 && (o = V) : o === V ? y[0] === ">" ? (o = i ?? Q, $ = -1) : y[1] === void 0 ? $ = -2 : ($ = o.lastIndex - y[2].length, C = y[1], o = y[3] === void 0 ? V : y[3] === '"' ? ae : oe) : o === ae || o === oe ? o = V : o === ie || o === re ? o = Q : (o = V, i = void 0);
|
|
280
|
-
const W = o === V && n[u + 1].startsWith("/>") ? " " : "";
|
|
281
|
-
r += o === Q ? d + es : $ >= 0 ? (e.push(C), d.slice(0, $) + Rt + d.slice($) + I + W) : d + I + ($ === -2 ? (e.push(void 0), u) : W);
|
|
282
|
-
}
|
|
283
|
-
const l = r + (n[t] || "<?>") + (s === 2 ? "</svg>" : "");
|
|
270
|
+
const vt = window, q = vt.trustedTypes, ie = q ? q.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Nt = "$lit$", I = `lit$${(Math.random() + "").slice(9)}$`, me = "?" + I, ns = `<${me}>`, z = document, nt = () => z.createComment(""), it = (n) => n === null || typeof n != "object" && typeof n != "function", _e = Array.isArray, is = (n) => _e(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", kt = `[
|
|
271
|
+
\f\r]`, Y = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, re = /-->/g, oe = />/g, V = RegExp(`>|${kt}(?:([^\\s"'>=/]+)(${kt}*=${kt}*(?:[^
|
|
272
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), ae = /'/g, he = /"/g, we = /^(?:script|style|textarea|title)$/i, rs = (n) => (s, ...t) => ({ _$litType$: n, strings: s, values: t }), le = rs(1), X = Symbol.for("lit-noChange"), S = Symbol.for("lit-nothing"), ce = /* @__PURE__ */ new WeakMap(), J = z.createTreeWalker(z, 129, null, !1);
|
|
273
|
+
function be(n, s) {
|
|
284
274
|
if (!Array.isArray(n) || !n.hasOwnProperty("raw"))
|
|
285
275
|
throw Error("invalid template strings array");
|
|
286
|
-
return
|
|
276
|
+
return ie !== void 0 ? ie.createHTML(s) : s;
|
|
277
|
+
}
|
|
278
|
+
const os = (n, s) => {
|
|
279
|
+
const t = n.length - 1, e = [];
|
|
280
|
+
let i, r = s === 2 ? "<svg>" : "", o = Y;
|
|
281
|
+
for (let l = 0; l < t; l++) {
|
|
282
|
+
const u = n[l];
|
|
283
|
+
let d, _, w = -1, T = 0;
|
|
284
|
+
for (; T < u.length && (o.lastIndex = T, _ = o.exec(u), _ !== null); )
|
|
285
|
+
T = o.lastIndex, o === Y ? _[1] === "!--" ? o = re : _[1] !== void 0 ? o = oe : _[2] !== void 0 ? (we.test(_[2]) && (i = RegExp("</" + _[2], "g")), o = V) : _[3] !== void 0 && (o = V) : o === V ? _[0] === ">" ? (o = i ?? Y, w = -1) : _[1] === void 0 ? w = -2 : (w = o.lastIndex - _[2].length, d = _[1], o = _[3] === void 0 ? V : _[3] === '"' ? he : ae) : o === he || o === ae ? o = V : o === re || o === oe ? o = Y : (o = V, i = void 0);
|
|
286
|
+
const O = o === V && n[l + 1].startsWith("/>") ? " " : "";
|
|
287
|
+
r += o === Y ? u + ns : w >= 0 ? (e.push(d), u.slice(0, w) + Nt + u.slice(w) + I + O) : u + I + (w === -2 ? (e.push(void 0), l) : O);
|
|
288
|
+
}
|
|
289
|
+
return [be(n, r + (n[t] || "<?>") + (s === 2 ? "</svg>" : "")), e];
|
|
287
290
|
};
|
|
288
|
-
class
|
|
291
|
+
class rt {
|
|
289
292
|
constructor({ strings: s, _$litType$: t }, e) {
|
|
290
293
|
let i;
|
|
291
294
|
this.parts = [];
|
|
292
295
|
let r = 0, o = 0;
|
|
293
|
-
const l = s.length - 1, u = this.parts, [d,
|
|
294
|
-
if (this.el =
|
|
295
|
-
const
|
|
296
|
-
|
|
296
|
+
const l = s.length - 1, u = this.parts, [d, _] = os(s, t);
|
|
297
|
+
if (this.el = rt.createElement(d, e), J.currentNode = this.el.content, t === 2) {
|
|
298
|
+
const w = this.el.content, T = w.firstChild;
|
|
299
|
+
T.remove(), w.append(...T.childNodes);
|
|
297
300
|
}
|
|
298
301
|
for (; (i = J.nextNode()) !== null && u.length < l; ) {
|
|
299
302
|
if (i.nodeType === 1) {
|
|
300
303
|
if (i.hasAttributes()) {
|
|
301
|
-
const
|
|
302
|
-
for (const
|
|
303
|
-
if (
|
|
304
|
-
const
|
|
305
|
-
if (
|
|
306
|
-
const
|
|
307
|
-
u.push({ type: 1, index: r, name: H[2], strings:
|
|
304
|
+
const w = [];
|
|
305
|
+
for (const T of i.getAttributeNames())
|
|
306
|
+
if (T.endsWith(Nt) || T.startsWith(I)) {
|
|
307
|
+
const O = _[o++];
|
|
308
|
+
if (w.push(T), O !== void 0) {
|
|
309
|
+
const wt = i.getAttribute(O.toLowerCase() + Nt).split(I), H = /([.?@])?(.*)/.exec(O);
|
|
310
|
+
u.push({ type: 1, index: r, name: H[2], strings: wt, ctor: H[1] === "." ? hs : H[1] === "?" ? cs : H[1] === "@" ? us : mt });
|
|
308
311
|
} else
|
|
309
312
|
u.push({ type: 6, index: r });
|
|
310
313
|
}
|
|
311
|
-
for (const
|
|
312
|
-
i.removeAttribute(
|
|
314
|
+
for (const T of w)
|
|
315
|
+
i.removeAttribute(T);
|
|
313
316
|
}
|
|
314
|
-
if (
|
|
315
|
-
const
|
|
316
|
-
if (
|
|
317
|
-
i.textContent =
|
|
318
|
-
for (let
|
|
319
|
-
i.append(
|
|
320
|
-
i.append(
|
|
317
|
+
if (we.test(i.tagName)) {
|
|
318
|
+
const w = i.textContent.split(I), T = w.length - 1;
|
|
319
|
+
if (T > 0) {
|
|
320
|
+
i.textContent = q ? q.emptyScript : "";
|
|
321
|
+
for (let O = 0; O < T; O++)
|
|
322
|
+
i.append(w[O], nt()), J.nextNode(), u.push({ type: 2, index: ++r });
|
|
323
|
+
i.append(w[T], nt());
|
|
321
324
|
}
|
|
322
325
|
}
|
|
323
326
|
} else if (i.nodeType === 8)
|
|
324
|
-
if (i.data ===
|
|
327
|
+
if (i.data === me)
|
|
325
328
|
u.push({ type: 2, index: r });
|
|
326
329
|
else {
|
|
327
|
-
let
|
|
328
|
-
for (; (
|
|
329
|
-
u.push({ type: 7, index: r }),
|
|
330
|
+
let w = -1;
|
|
331
|
+
for (; (w = i.data.indexOf(I, w + 1)) !== -1; )
|
|
332
|
+
u.push({ type: 7, index: r }), w += I.length - 1;
|
|
330
333
|
}
|
|
331
334
|
r++;
|
|
332
335
|
}
|
|
@@ -336,15 +339,15 @@ class ot {
|
|
|
336
339
|
return e.innerHTML = s, e;
|
|
337
340
|
}
|
|
338
341
|
}
|
|
339
|
-
function
|
|
342
|
+
function K(n, s, t = n, e) {
|
|
340
343
|
var i, r, o, l;
|
|
341
|
-
if (s ===
|
|
344
|
+
if (s === X)
|
|
342
345
|
return s;
|
|
343
346
|
let u = e !== void 0 ? (i = t._$Co) === null || i === void 0 ? void 0 : i[e] : t._$Cl;
|
|
344
|
-
const d =
|
|
345
|
-
return (u == null ? void 0 : u.constructor) !== d && ((r = u == null ? void 0 : u._$AO) === null || r === void 0 || r.call(u, !1), d === void 0 ? u = void 0 : (u = new d(n), u._$AT(n, t, e)), e !== void 0 ? ((o = (l = t)._$Co) !== null && o !== void 0 ? o : l._$Co = [])[e] = u : t._$Cl = u), u !== void 0 && (s =
|
|
347
|
+
const d = it(s) ? void 0 : s._$litDirective$;
|
|
348
|
+
return (u == null ? void 0 : u.constructor) !== d && ((r = u == null ? void 0 : u._$AO) === null || r === void 0 || r.call(u, !1), d === void 0 ? u = void 0 : (u = new d(n), u._$AT(n, t, e)), e !== void 0 ? ((o = (l = t)._$Co) !== null && o !== void 0 ? o : l._$Co = [])[e] = u : t._$Cl = u), u !== void 0 && (s = K(n, u._$AS(n, s.values), u, e)), s;
|
|
346
349
|
}
|
|
347
|
-
class
|
|
350
|
+
class as {
|
|
348
351
|
constructor(s, t) {
|
|
349
352
|
this._$AV = [], this._$AN = void 0, this._$AD = s, this._$AM = t;
|
|
350
353
|
}
|
|
@@ -361,8 +364,8 @@ class rs {
|
|
|
361
364
|
let o = J.nextNode(), l = 0, u = 0, d = i[0];
|
|
362
365
|
for (; d !== void 0; ) {
|
|
363
366
|
if (l === d.index) {
|
|
364
|
-
let
|
|
365
|
-
d.type === 2 ?
|
|
367
|
+
let _;
|
|
368
|
+
d.type === 2 ? _ = new at(o, o.nextSibling, this, s) : d.type === 1 ? _ = new d.ctor(o, d.name, d.strings, this, s) : d.type === 6 && (_ = new ps(o, this, s)), this._$AV.push(_), d = i[++u];
|
|
366
369
|
}
|
|
367
370
|
l !== (d == null ? void 0 : d.index) && (o = J.nextNode(), l++);
|
|
368
371
|
}
|
|
@@ -374,10 +377,10 @@ class rs {
|
|
|
374
377
|
e !== void 0 && (e.strings !== void 0 ? (e._$AI(s, e, t), t += e.strings.length - 2) : e._$AI(s[t])), t++;
|
|
375
378
|
}
|
|
376
379
|
}
|
|
377
|
-
class
|
|
380
|
+
class at {
|
|
378
381
|
constructor(s, t, e, i) {
|
|
379
382
|
var r;
|
|
380
|
-
this.type = 2, this._$AH =
|
|
383
|
+
this.type = 2, this._$AH = S, this._$AN = void 0, this._$AA = s, this._$AB = t, this._$AM = e, this.options = i, this._$Cp = (r = i == null ? void 0 : i.isConnected) === null || r === void 0 || r;
|
|
381
384
|
}
|
|
382
385
|
get _$AU() {
|
|
383
386
|
var s, t;
|
|
@@ -395,7 +398,7 @@ class ht {
|
|
|
395
398
|
return this._$AB;
|
|
396
399
|
}
|
|
397
400
|
_$AI(s, t = this) {
|
|
398
|
-
s =
|
|
401
|
+
s = K(this, s, t), it(s) ? s === S || s == null || s === "" ? (this._$AH !== S && this._$AR(), this._$AH = S) : s !== this._$AH && s !== X && this._(s) : s._$litType$ !== void 0 ? this.g(s) : s.nodeType !== void 0 ? this.$(s) : is(s) ? this.T(s) : this._(s);
|
|
399
402
|
}
|
|
400
403
|
k(s) {
|
|
401
404
|
return this._$AA.parentNode.insertBefore(s, this._$AB);
|
|
@@ -404,28 +407,28 @@ class ht {
|
|
|
404
407
|
this._$AH !== s && (this._$AR(), this._$AH = this.k(s));
|
|
405
408
|
}
|
|
406
409
|
_(s) {
|
|
407
|
-
this._$AH !==
|
|
410
|
+
this._$AH !== S && it(this._$AH) ? this._$AA.nextSibling.data = s : this.$(z.createTextNode(s)), this._$AH = s;
|
|
408
411
|
}
|
|
409
412
|
g(s) {
|
|
410
413
|
var t;
|
|
411
|
-
const { values: e, _$litType$: i } = s, r = typeof i == "number" ? this._$AC(s) : (i.el === void 0 && (i.el =
|
|
414
|
+
const { values: e, _$litType$: i } = s, r = typeof i == "number" ? this._$AC(s) : (i.el === void 0 && (i.el = rt.createElement(be(i.h, i.h[0]), this.options)), i);
|
|
412
415
|
if (((t = this._$AH) === null || t === void 0 ? void 0 : t._$AD) === r)
|
|
413
416
|
this._$AH.v(e);
|
|
414
417
|
else {
|
|
415
|
-
const o = new
|
|
418
|
+
const o = new as(r, this), l = o.u(this.options);
|
|
416
419
|
o.v(e), this.$(l), this._$AH = o;
|
|
417
420
|
}
|
|
418
421
|
}
|
|
419
422
|
_$AC(s) {
|
|
420
|
-
let t =
|
|
421
|
-
return t === void 0 &&
|
|
423
|
+
let t = ce.get(s.strings);
|
|
424
|
+
return t === void 0 && ce.set(s.strings, t = new rt(s)), t;
|
|
422
425
|
}
|
|
423
426
|
T(s) {
|
|
424
|
-
|
|
427
|
+
_e(this._$AH) || (this._$AH = [], this._$AR());
|
|
425
428
|
const t = this._$AH;
|
|
426
429
|
let e, i = 0;
|
|
427
430
|
for (const r of s)
|
|
428
|
-
i === t.length ? t.push(e = new
|
|
431
|
+
i === t.length ? t.push(e = new at(this.k(nt()), this.k(nt()), this, this.options)) : e = t[i], e._$AI(r), i++;
|
|
429
432
|
i < t.length && (this._$AR(e && e._$AB.nextSibling, i), t.length = i);
|
|
430
433
|
}
|
|
431
434
|
_$AR(s = this._$AA.nextSibling, t) {
|
|
@@ -440,9 +443,9 @@ class ht {
|
|
|
440
443
|
this._$AM === void 0 && (this._$Cp = s, (t = this._$AP) === null || t === void 0 || t.call(this, s));
|
|
441
444
|
}
|
|
442
445
|
}
|
|
443
|
-
class
|
|
446
|
+
class mt {
|
|
444
447
|
constructor(s, t, e, i, r) {
|
|
445
|
-
this.type = 1, this._$AH =
|
|
448
|
+
this.type = 1, this._$AH = S, this._$AN = void 0, this.element = s, this.name = t, this._$AM = i, this.options = r, e.length > 2 || e[0] !== "" || e[1] !== "" ? (this._$AH = Array(e.length - 1).fill(new String()), this.strings = e) : this._$AH = S;
|
|
446
449
|
}
|
|
447
450
|
get tagName() {
|
|
448
451
|
return this.element.tagName;
|
|
@@ -454,45 +457,45 @@ class _t {
|
|
|
454
457
|
const r = this.strings;
|
|
455
458
|
let o = !1;
|
|
456
459
|
if (r === void 0)
|
|
457
|
-
s =
|
|
460
|
+
s = K(this, s, t, 0), o = !it(s) || s !== this._$AH && s !== X, o && (this._$AH = s);
|
|
458
461
|
else {
|
|
459
462
|
const l = s;
|
|
460
463
|
let u, d;
|
|
461
464
|
for (s = r[0], u = 0; u < r.length - 1; u++)
|
|
462
|
-
d =
|
|
465
|
+
d = K(this, l[e + u], t, u), d === X && (d = this._$AH[u]), o || (o = !it(d) || d !== this._$AH[u]), d === S ? s = S : s !== S && (s += (d ?? "") + r[u + 1]), this._$AH[u] = d;
|
|
463
466
|
}
|
|
464
467
|
o && !i && this.j(s);
|
|
465
468
|
}
|
|
466
469
|
j(s) {
|
|
467
|
-
s ===
|
|
470
|
+
s === S ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, s ?? "");
|
|
468
471
|
}
|
|
469
472
|
}
|
|
470
|
-
class
|
|
473
|
+
class hs extends mt {
|
|
471
474
|
constructor() {
|
|
472
475
|
super(...arguments), this.type = 3;
|
|
473
476
|
}
|
|
474
477
|
j(s) {
|
|
475
|
-
this.element[this.name] = s ===
|
|
478
|
+
this.element[this.name] = s === S ? void 0 : s;
|
|
476
479
|
}
|
|
477
480
|
}
|
|
478
|
-
const
|
|
479
|
-
class
|
|
481
|
+
const ls = q ? q.emptyScript : "";
|
|
482
|
+
class cs extends mt {
|
|
480
483
|
constructor() {
|
|
481
484
|
super(...arguments), this.type = 4;
|
|
482
485
|
}
|
|
483
486
|
j(s) {
|
|
484
|
-
s && s !==
|
|
487
|
+
s && s !== S ? this.element.setAttribute(this.name, ls) : this.element.removeAttribute(this.name);
|
|
485
488
|
}
|
|
486
489
|
}
|
|
487
|
-
class
|
|
490
|
+
class us extends mt {
|
|
488
491
|
constructor(s, t, e, i, r) {
|
|
489
492
|
super(s, t, e, i, r), this.type = 5;
|
|
490
493
|
}
|
|
491
494
|
_$AI(s, t = this) {
|
|
492
495
|
var e;
|
|
493
|
-
if ((s = (e =
|
|
496
|
+
if ((s = (e = K(this, s, t, 0)) !== null && e !== void 0 ? e : S) === X)
|
|
494
497
|
return;
|
|
495
|
-
const i = this._$AH, r = s ===
|
|
498
|
+
const i = this._$AH, r = s === S && i !== S || s.capture !== i.capture || s.once !== i.once || s.passive !== i.passive, o = s !== S && (i === S || r);
|
|
496
499
|
r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, s), this._$AH = s;
|
|
497
500
|
}
|
|
498
501
|
handleEvent(s) {
|
|
@@ -500,7 +503,7 @@ class ls extends _t {
|
|
|
500
503
|
typeof this._$AH == "function" ? this._$AH.call((e = (t = this.options) === null || t === void 0 ? void 0 : t.host) !== null && e !== void 0 ? e : this.element, s) : this._$AH.handleEvent(s);
|
|
501
504
|
}
|
|
502
505
|
}
|
|
503
|
-
class
|
|
506
|
+
class ps {
|
|
504
507
|
constructor(s, t, e) {
|
|
505
508
|
this.element = s, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = e;
|
|
506
509
|
}
|
|
@@ -508,18 +511,18 @@ class cs {
|
|
|
508
511
|
return this._$AM._$AU;
|
|
509
512
|
}
|
|
510
513
|
_$AI(s) {
|
|
511
|
-
|
|
514
|
+
K(this, s);
|
|
512
515
|
}
|
|
513
516
|
}
|
|
514
|
-
const
|
|
515
|
-
|
|
516
|
-
const
|
|
517
|
+
const ue = vt.litHtmlPolyfillSupport;
|
|
518
|
+
ue == null || ue(rt, at), ((Tt = vt.litHtmlVersions) !== null && Tt !== void 0 ? Tt : vt.litHtmlVersions = []).push("2.7.5");
|
|
519
|
+
const ds = (n, s, t) => {
|
|
517
520
|
var e, i;
|
|
518
521
|
const r = (e = t == null ? void 0 : t.renderBefore) !== null && e !== void 0 ? e : s;
|
|
519
522
|
let o = r._$litPart$;
|
|
520
523
|
if (o === void 0) {
|
|
521
524
|
const l = (i = t == null ? void 0 : t.renderBefore) !== null && i !== void 0 ? i : null;
|
|
522
|
-
r._$litPart$ = o = new
|
|
525
|
+
r._$litPart$ = o = new at(s.insertBefore(nt(), l), l, void 0, t ?? {});
|
|
523
526
|
}
|
|
524
527
|
return o._$AI(n), o;
|
|
525
528
|
};
|
|
@@ -529,7 +532,7 @@ const us = (n, s, t) => {
|
|
|
529
532
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
530
533
|
*/
|
|
531
534
|
var xt, St;
|
|
532
|
-
class
|
|
535
|
+
class tt extends F {
|
|
533
536
|
constructor() {
|
|
534
537
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
535
538
|
}
|
|
@@ -540,7 +543,7 @@ class et extends q {
|
|
|
540
543
|
}
|
|
541
544
|
update(s) {
|
|
542
545
|
const t = this.render();
|
|
543
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(s), this._$Do =
|
|
546
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(s), this._$Do = ds(t, this.renderRoot, this.renderOptions);
|
|
544
547
|
}
|
|
545
548
|
connectedCallback() {
|
|
546
549
|
var s;
|
|
@@ -551,19 +554,19 @@ class et extends q {
|
|
|
551
554
|
super.disconnectedCallback(), (s = this._$Do) === null || s === void 0 || s.setConnected(!1);
|
|
552
555
|
}
|
|
553
556
|
render() {
|
|
554
|
-
return
|
|
557
|
+
return X;
|
|
555
558
|
}
|
|
556
559
|
}
|
|
557
|
-
|
|
558
|
-
const
|
|
559
|
-
|
|
560
|
+
tt.finalized = !0, tt._$litElement$ = !0, (xt = globalThis.litElementHydrateSupport) === null || xt === void 0 || xt.call(globalThis, { LitElement: tt });
|
|
561
|
+
const pe = globalThis.litElementPolyfillSupport;
|
|
562
|
+
pe == null || pe({ LitElement: tt });
|
|
560
563
|
((St = globalThis.litElementVersions) !== null && St !== void 0 ? St : globalThis.litElementVersions = []).push("3.3.2");
|
|
561
564
|
/**
|
|
562
565
|
* @license
|
|
563
566
|
* Copyright 2017 Google LLC
|
|
564
567
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
565
568
|
*/
|
|
566
|
-
const
|
|
569
|
+
const fs = (n) => (s) => typeof s == "function" ? ((t, e) => (customElements.define(t, e), e))(n, s) : ((t, e) => {
|
|
567
570
|
const { kind: i, elements: r } = e;
|
|
568
571
|
return { kind: i, elements: r, finisher(o) {
|
|
569
572
|
customElements.define(t, o);
|
|
@@ -574,25 +577,25 @@ const ps = (n) => (s) => typeof s == "function" ? ((t, e) => (customElements.def
|
|
|
574
577
|
* Copyright 2017 Google LLC
|
|
575
578
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
576
579
|
*/
|
|
577
|
-
const
|
|
580
|
+
const vs = (n, s) => s.kind === "method" && s.descriptor && !("value" in s.descriptor) ? { ...s, finisher(t) {
|
|
578
581
|
t.createProperty(s.key, n);
|
|
579
582
|
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: s.key, initializer() {
|
|
580
583
|
typeof s.initializer == "function" && (this[s.key] = s.initializer.call(this));
|
|
581
584
|
}, finisher(t) {
|
|
582
585
|
t.createProperty(s.key, n);
|
|
583
|
-
} }
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
586
|
+
} }, gs = (n, s, t) => {
|
|
587
|
+
s.constructor.createProperty(t, n);
|
|
588
|
+
};
|
|
589
|
+
function It(n) {
|
|
590
|
+
return (s, t) => t !== void 0 ? gs(n, s, t) : vs(n, s);
|
|
588
591
|
}
|
|
589
592
|
/**
|
|
590
593
|
* @license
|
|
591
594
|
* Copyright 2017 Google LLC
|
|
592
595
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
593
596
|
*/
|
|
594
|
-
function
|
|
595
|
-
return
|
|
597
|
+
function Ae(n) {
|
|
598
|
+
return It({ ...n, state: !0 });
|
|
596
599
|
}
|
|
597
600
|
/**
|
|
598
601
|
* @license
|
|
@@ -601,19 +604,19 @@ function we(n) {
|
|
|
601
604
|
*/
|
|
602
605
|
var Ot;
|
|
603
606
|
((Ot = window.HTMLSlotElement) === null || Ot === void 0 ? void 0 : Ot.prototype.assignedElements) != null;
|
|
604
|
-
const { isArray:
|
|
607
|
+
const { isArray: ys } = Array, ms = Object.keys, ot = (n) => {
|
|
605
608
|
if (!n)
|
|
606
609
|
return n;
|
|
607
|
-
if (
|
|
610
|
+
if (ys(n)) {
|
|
608
611
|
const s = [], t = n.length;
|
|
609
612
|
for (let e = 0; e < t; e++)
|
|
610
|
-
s.push(
|
|
613
|
+
s.push(ot(n[e]));
|
|
611
614
|
return s;
|
|
612
615
|
} else if (typeof n == "object") {
|
|
613
|
-
const s =
|
|
616
|
+
const s = ms(n), t = s.length, e = {};
|
|
614
617
|
for (let i = 0; i < t; i++) {
|
|
615
618
|
const r = s[i];
|
|
616
|
-
e[r] =
|
|
619
|
+
e[r] = ot(n[r]);
|
|
617
620
|
}
|
|
618
621
|
return e;
|
|
619
622
|
}
|
|
@@ -626,30 +629,30 @@ class N {
|
|
|
626
629
|
this.path = s;
|
|
627
630
|
}
|
|
628
631
|
}
|
|
629
|
-
const
|
|
630
|
-
function
|
|
631
|
-
return n.indexOf("~") === -1 ? n : n.replace(
|
|
632
|
+
const _s = /~1/g, ws = /~0/g, bs = /~/g, As = /\//g;
|
|
633
|
+
function Es(n) {
|
|
634
|
+
return n.indexOf("~") === -1 ? n : n.replace(_s, "/").replace(ws, "~");
|
|
632
635
|
}
|
|
633
|
-
function
|
|
634
|
-
return n.indexOf("/") === -1 && n.indexOf("~") === -1 ? n : n.replace(
|
|
636
|
+
function $s(n) {
|
|
637
|
+
return n.indexOf("/") === -1 && n.indexOf("~") === -1 ? n : n.replace(bs, "~0").replace(As, "~1");
|
|
635
638
|
}
|
|
636
|
-
function
|
|
637
|
-
return n ? n.slice(1).split("/").map(
|
|
639
|
+
function Cs(n) {
|
|
640
|
+
return n ? n.slice(1).split("/").map(Es) : [];
|
|
638
641
|
}
|
|
639
|
-
function
|
|
640
|
-
return
|
|
642
|
+
function $(n) {
|
|
643
|
+
return Ts(n) ? "" : "/" + n.map((s) => $s(String(s))).join("/");
|
|
641
644
|
}
|
|
642
|
-
const
|
|
643
|
-
function
|
|
644
|
-
return
|
|
645
|
+
const b = (n) => typeof n == "string" ? Cs(n) : n, Ts = (n) => !n.length, ks = Object.prototype.hasOwnProperty;
|
|
646
|
+
function xs(n, s) {
|
|
647
|
+
return ks.call(n, s);
|
|
645
648
|
}
|
|
646
|
-
const { isArray:
|
|
649
|
+
const { isArray: Ee } = Array, C = (n, s) => {
|
|
647
650
|
const t = s.length;
|
|
648
651
|
if (!t)
|
|
649
652
|
return { val: n };
|
|
650
653
|
let e, i;
|
|
651
654
|
for (let o = 0; o < t; o++)
|
|
652
|
-
if (e = n, i = s[o],
|
|
655
|
+
if (e = n, i = s[o], Ee(e)) {
|
|
653
656
|
const l = e.length;
|
|
654
657
|
if (i === "-")
|
|
655
658
|
i = l;
|
|
@@ -662,12 +665,12 @@ const { isArray: Ae } = Array, T = (n, s) => {
|
|
|
662
665
|
}
|
|
663
666
|
n = e[i];
|
|
664
667
|
} else if (typeof e == "object" && e)
|
|
665
|
-
n =
|
|
668
|
+
n = xs(e, i) ? e[i] : void 0;
|
|
666
669
|
else
|
|
667
670
|
throw new Error("NOT_FOUND");
|
|
668
671
|
return { val: n, obj: e, key: i };
|
|
669
|
-
},
|
|
670
|
-
class
|
|
672
|
+
}, ht = (n) => Ee(n.obj) && typeof n.key == "number", _t = (n) => typeof n.obj == "object" && typeof n.key == "string";
|
|
673
|
+
class Vt extends N {
|
|
671
674
|
constructor(t, e) {
|
|
672
675
|
super(t);
|
|
673
676
|
g(this, "value");
|
|
@@ -680,7 +683,7 @@ class It extends N {
|
|
|
680
683
|
return 0;
|
|
681
684
|
}
|
|
682
685
|
apply(t) {
|
|
683
|
-
const { val: e, key: i, obj: r } =
|
|
686
|
+
const { val: e, key: i, obj: r } = C(t, this.path), o = ot(this.value);
|
|
684
687
|
if (!r)
|
|
685
688
|
t = o;
|
|
686
689
|
else if (typeof i == "string")
|
|
@@ -700,7 +703,7 @@ class It extends N {
|
|
|
700
703
|
toJson(t) {
|
|
701
704
|
return {
|
|
702
705
|
op: "add",
|
|
703
|
-
path:
|
|
706
|
+
path: $(this.path),
|
|
704
707
|
value: this.value
|
|
705
708
|
};
|
|
706
709
|
}
|
|
@@ -711,7 +714,7 @@ class It extends N {
|
|
|
711
714
|
t.encodeArrayHeader(3), t.writer.u8(0), t.encodeArray(this.path), t.encodeAny(this.value);
|
|
712
715
|
}
|
|
713
716
|
}
|
|
714
|
-
class
|
|
717
|
+
class $e extends N {
|
|
715
718
|
constructor(t, e) {
|
|
716
719
|
super(t);
|
|
717
720
|
g(this, "oldValue");
|
|
@@ -724,15 +727,15 @@ class Ee extends N {
|
|
|
724
727
|
return 1;
|
|
725
728
|
}
|
|
726
729
|
apply(t) {
|
|
727
|
-
const e =
|
|
730
|
+
const e = C(t, this.path);
|
|
728
731
|
if (e.val === void 0)
|
|
729
732
|
throw new Error("NOT_FOUND");
|
|
730
|
-
return
|
|
733
|
+
return _t(e) ? delete e.obj[e.key] : ht(e) ? e.val !== void 0 && e.obj.splice(e.key, 1) : t = null, { doc: t, old: e.val };
|
|
731
734
|
}
|
|
732
735
|
toJson(t) {
|
|
733
736
|
const e = {
|
|
734
737
|
op: "remove",
|
|
735
|
-
path:
|
|
738
|
+
path: $(this.path)
|
|
736
739
|
};
|
|
737
740
|
return this.oldValue !== void 0 && (e.oldValue = this.oldValue), e;
|
|
738
741
|
}
|
|
@@ -745,7 +748,7 @@ class Ee extends N {
|
|
|
745
748
|
t.encodeArrayHeader(i ? 3 : 2), t.writer.u8(1), t.encodeArray(this.path), i && t.encodeAny(this.oldValue);
|
|
746
749
|
}
|
|
747
750
|
}
|
|
748
|
-
class
|
|
751
|
+
class Ss extends N {
|
|
749
752
|
constructor(t, e, i) {
|
|
750
753
|
super(t);
|
|
751
754
|
g(this, "value");
|
|
@@ -759,15 +762,15 @@ class Ts extends N {
|
|
|
759
762
|
return 2;
|
|
760
763
|
}
|
|
761
764
|
apply(t) {
|
|
762
|
-
const e =
|
|
765
|
+
const e = C(t, this.path);
|
|
763
766
|
if (e.val === void 0)
|
|
764
767
|
throw new Error("NOT_FOUND");
|
|
765
|
-
return
|
|
768
|
+
return _t(e) ? e.obj[e.key] = this.value : ht(e) ? e.obj[e.key] = this.value : t = this.value, { doc: t, old: e.val };
|
|
766
769
|
}
|
|
767
770
|
toJson(t) {
|
|
768
771
|
const e = {
|
|
769
772
|
op: "replace",
|
|
770
|
-
path:
|
|
773
|
+
path: $(this.path),
|
|
771
774
|
value: this.value
|
|
772
775
|
};
|
|
773
776
|
return this.oldValue !== void 0 && (e.oldValue = this.oldValue), e;
|
|
@@ -781,7 +784,7 @@ class Ts extends N {
|
|
|
781
784
|
t.encodeArrayHeader(i ? 4 : 3), t.writer.u8(2), t.encodeArray(this.path), t.encodeAny(this.value), i && t.encodeAny(this.oldValue);
|
|
782
785
|
}
|
|
783
786
|
}
|
|
784
|
-
class
|
|
787
|
+
class Os extends N {
|
|
785
788
|
constructor(t, e) {
|
|
786
789
|
super(t);
|
|
787
790
|
g(this, "from");
|
|
@@ -794,14 +797,14 @@ class ks extends N {
|
|
|
794
797
|
return 4;
|
|
795
798
|
}
|
|
796
799
|
apply(t) {
|
|
797
|
-
const e = new
|
|
798
|
-
return new
|
|
800
|
+
const e = new $e(b(this.from), void 0).apply(t);
|
|
801
|
+
return new Vt(this.path, e.old).apply(e.doc);
|
|
799
802
|
}
|
|
800
803
|
toJson(t) {
|
|
801
804
|
return {
|
|
802
805
|
op: "move",
|
|
803
|
-
path:
|
|
804
|
-
from:
|
|
806
|
+
path: $(this.path),
|
|
807
|
+
from: $(this.from)
|
|
805
808
|
};
|
|
806
809
|
}
|
|
807
810
|
toCompact(t, e) {
|
|
@@ -811,7 +814,7 @@ class ks extends N {
|
|
|
811
814
|
t.encodeArrayHeader(3), t.writer.u8(4), t.encodeArray(this.path), t.encodeArray(this.from);
|
|
812
815
|
}
|
|
813
816
|
}
|
|
814
|
-
class
|
|
817
|
+
class js extends N {
|
|
815
818
|
constructor(t, e) {
|
|
816
819
|
super(t);
|
|
817
820
|
g(this, "from");
|
|
@@ -824,16 +827,16 @@ class xs extends N {
|
|
|
824
827
|
return 3;
|
|
825
828
|
}
|
|
826
829
|
apply(t) {
|
|
827
|
-
const { val: e } =
|
|
830
|
+
const { val: e } = C(t, this.from);
|
|
828
831
|
if (e === void 0)
|
|
829
832
|
throw new Error("NOT_FOUND");
|
|
830
|
-
return new
|
|
833
|
+
return new Vt(this.path, ot(e)).apply(t);
|
|
831
834
|
}
|
|
832
835
|
toJson(t) {
|
|
833
836
|
return {
|
|
834
837
|
op: "copy",
|
|
835
|
-
path:
|
|
836
|
-
from:
|
|
838
|
+
path: $(this.path),
|
|
839
|
+
from: $(this.from)
|
|
837
840
|
};
|
|
838
841
|
}
|
|
839
842
|
toCompact(t, e) {
|
|
@@ -850,7 +853,7 @@ class M extends N {
|
|
|
850
853
|
return { doc: s };
|
|
851
854
|
}
|
|
852
855
|
}
|
|
853
|
-
const
|
|
856
|
+
const gt = (n, s) => {
|
|
854
857
|
if (n === s)
|
|
855
858
|
return !0;
|
|
856
859
|
if (n && s && typeof n == "object" && typeof s == "object") {
|
|
@@ -861,7 +864,7 @@ const yt = (n, s) => {
|
|
|
861
864
|
if (t = n.length, t !== s.length)
|
|
862
865
|
return !1;
|
|
863
866
|
for (e = t; e-- !== 0; )
|
|
864
|
-
if (!
|
|
867
|
+
if (!gt(n[e], s[e]))
|
|
865
868
|
return !1;
|
|
866
869
|
return !0;
|
|
867
870
|
}
|
|
@@ -869,14 +872,14 @@ const yt = (n, s) => {
|
|
|
869
872
|
return !1;
|
|
870
873
|
for (e = t; e-- !== 0; ) {
|
|
871
874
|
const r = i[e];
|
|
872
|
-
if (!
|
|
875
|
+
if (!gt(n[r], s[r]))
|
|
873
876
|
return !1;
|
|
874
877
|
}
|
|
875
878
|
return !0;
|
|
876
879
|
}
|
|
877
880
|
return !1;
|
|
878
881
|
};
|
|
879
|
-
class
|
|
882
|
+
class Ms extends M {
|
|
880
883
|
constructor(t, e, i) {
|
|
881
884
|
super(t);
|
|
882
885
|
g(this, "value");
|
|
@@ -890,16 +893,16 @@ class Ss extends M {
|
|
|
890
893
|
return 5;
|
|
891
894
|
}
|
|
892
895
|
test(t) {
|
|
893
|
-
const { val: e } =
|
|
896
|
+
const { val: e } = C(t, this.path);
|
|
894
897
|
if (e === void 0)
|
|
895
898
|
return !!this.not;
|
|
896
|
-
const i =
|
|
899
|
+
const i = gt(e, this.value);
|
|
897
900
|
return this.not ? !i : i;
|
|
898
901
|
}
|
|
899
902
|
toJson(t) {
|
|
900
903
|
const e = {
|
|
901
904
|
op: "test",
|
|
902
|
-
path:
|
|
905
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
903
906
|
value: this.value
|
|
904
907
|
};
|
|
905
908
|
return this.not && (e.not = this.not), e;
|
|
@@ -912,7 +915,7 @@ class Ss extends M {
|
|
|
912
915
|
t.encodeArrayHeader(this.not ? 4 : 3), t.writer.u8(5), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeAny(this.value), this.not && t.writer.u8(1);
|
|
913
916
|
}
|
|
914
917
|
}
|
|
915
|
-
class
|
|
918
|
+
class Rs extends N {
|
|
916
919
|
constructor(s) {
|
|
917
920
|
super(s);
|
|
918
921
|
}
|
|
@@ -923,13 +926,13 @@ class Os extends N {
|
|
|
923
926
|
return 8;
|
|
924
927
|
}
|
|
925
928
|
apply(s) {
|
|
926
|
-
const t =
|
|
929
|
+
const t = C(s, this.path);
|
|
927
930
|
return t.obj ? t.obj[t.key] = !t.val : s = !t.val, { doc: s, old: t.val };
|
|
928
931
|
}
|
|
929
932
|
toJson(s) {
|
|
930
933
|
return {
|
|
931
934
|
op: "flip",
|
|
932
|
-
path:
|
|
935
|
+
path: $(this.path)
|
|
933
936
|
};
|
|
934
937
|
}
|
|
935
938
|
toCompact(s, t) {
|
|
@@ -939,7 +942,7 @@ class Os extends N {
|
|
|
939
942
|
s.encodeArrayHeader(2), s.writer.u8(8), s.encodeArray(this.path);
|
|
940
943
|
}
|
|
941
944
|
}
|
|
942
|
-
class
|
|
945
|
+
class Ns extends N {
|
|
943
946
|
constructor(t, e) {
|
|
944
947
|
super(t);
|
|
945
948
|
g(this, "inc");
|
|
@@ -952,13 +955,13 @@ class js extends N {
|
|
|
952
955
|
return 9;
|
|
953
956
|
}
|
|
954
957
|
apply(t) {
|
|
955
|
-
const e =
|
|
958
|
+
const e = C(t, this.path), i = this.inc + Number(e.val);
|
|
956
959
|
return e.obj ? e.obj[e.key] = i : t = i, { doc: t, old: e.val };
|
|
957
960
|
}
|
|
958
961
|
toJson(t) {
|
|
959
962
|
return {
|
|
960
963
|
op: "inc",
|
|
961
|
-
path:
|
|
964
|
+
path: $(this.path),
|
|
962
965
|
inc: this.inc
|
|
963
966
|
};
|
|
964
967
|
}
|
|
@@ -969,7 +972,7 @@ class js extends N {
|
|
|
969
972
|
t.encodeArrayHeader(3), t.writer.u8(9), t.encodeArray(this.path), t.encodeNumber(this.inc);
|
|
970
973
|
}
|
|
971
974
|
}
|
|
972
|
-
class
|
|
975
|
+
class Ps extends N {
|
|
973
976
|
constructor(t, e, i) {
|
|
974
977
|
super(t);
|
|
975
978
|
g(this, "pos");
|
|
@@ -983,20 +986,20 @@ class Ms extends N {
|
|
|
983
986
|
return 6;
|
|
984
987
|
}
|
|
985
988
|
apply(t) {
|
|
986
|
-
const { val: e, key: i, obj: r } =
|
|
989
|
+
const { val: e, key: i, obj: r } = C(t, this.path);
|
|
987
990
|
if (typeof e != "string") {
|
|
988
991
|
if (e !== void 0)
|
|
989
992
|
throw new Error("NOT_A_STRING");
|
|
990
993
|
if (this.pos !== 0)
|
|
991
994
|
throw new Error("POS");
|
|
992
995
|
}
|
|
993
|
-
const o = typeof e == "string" ? e : "", l = Math.min(this.pos, o.length), u = o.slice(0, l), d = o.slice(l),
|
|
994
|
-
return r ? r[i] =
|
|
996
|
+
const o = typeof e == "string" ? e : "", l = Math.min(this.pos, o.length), u = o.slice(0, l), d = o.slice(l), _ = u + this.str + d;
|
|
997
|
+
return r ? r[i] = _ : t = _, { doc: t, old: e };
|
|
995
998
|
}
|
|
996
999
|
toJson(t) {
|
|
997
1000
|
return {
|
|
998
1001
|
op: "str_ins",
|
|
999
|
-
path:
|
|
1002
|
+
path: $(this.path),
|
|
1000
1003
|
pos: this.pos,
|
|
1001
1004
|
str: this.str
|
|
1002
1005
|
};
|
|
@@ -1008,7 +1011,7 @@ class Ms extends N {
|
|
|
1008
1011
|
t.encodeArrayHeader(4), t.writer.u8(6), t.encodeArray(this.path), t.encodeNumber(this.pos), t.encodeString(this.str);
|
|
1009
1012
|
}
|
|
1010
1013
|
}
|
|
1011
|
-
class
|
|
1014
|
+
class Hs extends N {
|
|
1012
1015
|
constructor(t, e, i, r) {
|
|
1013
1016
|
super(t);
|
|
1014
1017
|
g(this, "pos");
|
|
@@ -1026,21 +1029,21 @@ class Rs extends N {
|
|
|
1026
1029
|
return typeof this.str == "string" ? this.str.length : this.len;
|
|
1027
1030
|
}
|
|
1028
1031
|
apply(t) {
|
|
1029
|
-
const { val: e, key: i, obj: r } =
|
|
1032
|
+
const { val: e, key: i, obj: r } = C(t, this.path);
|
|
1030
1033
|
if (typeof e != "string")
|
|
1031
1034
|
throw new Error("NOT_A_STRING");
|
|
1032
|
-
const o = e.length, l = Math.min(this.pos, e.length), u = Math.min(l, o), d = this.str !== void 0 ? this.str.length : this.len,
|
|
1033
|
-
return r ? r[i] =
|
|
1035
|
+
const o = e.length, l = Math.min(this.pos, e.length), u = Math.min(l, o), d = this.str !== void 0 ? this.str.length : this.len, _ = Math.min(l + d, o), w = e.slice(0, u), T = e.substr(_), O = w + T;
|
|
1036
|
+
return r ? r[i] = O : t = O, { doc: t, old: e };
|
|
1034
1037
|
}
|
|
1035
1038
|
toJson(t) {
|
|
1036
1039
|
return typeof this.str == "string" ? {
|
|
1037
1040
|
op: "str_del",
|
|
1038
|
-
path:
|
|
1041
|
+
path: $(this.path),
|
|
1039
1042
|
pos: this.pos,
|
|
1040
1043
|
str: this.str
|
|
1041
1044
|
} : {
|
|
1042
1045
|
op: "str_del",
|
|
1043
|
-
path:
|
|
1046
|
+
path: $(this.path),
|
|
1044
1047
|
pos: this.pos,
|
|
1045
1048
|
len: this.len
|
|
1046
1049
|
};
|
|
@@ -1054,11 +1057,11 @@ class Rs extends N {
|
|
|
1054
1057
|
t.encodeArrayHeader(i ? 4 : 5), t.writer.u8(7), t.encodeArray(this.path), t.encodeNumber(this.pos), i ? t.encodeString(this.str) : (t.writer.u8(0), t.encodeNumber(this.len));
|
|
1055
1058
|
}
|
|
1056
1059
|
}
|
|
1057
|
-
const { isArray:
|
|
1060
|
+
const { isArray: Ls } = Array, Pt = (n) => !!n && typeof n == "object" && typeof n.text == "string", Ht = (n) => !!n && typeof n == "object" && Ls(n.children), Us = (n, s) => {
|
|
1058
1061
|
const t = new RegExp(n, s ? "i" : void 0);
|
|
1059
1062
|
return (e) => t.test(e);
|
|
1060
1063
|
};
|
|
1061
|
-
class
|
|
1064
|
+
class Ds extends N {
|
|
1062
1065
|
constructor(t, e, i) {
|
|
1063
1066
|
super(t);
|
|
1064
1067
|
g(this, "pos");
|
|
@@ -1072,11 +1075,11 @@ class Hs extends N {
|
|
|
1072
1075
|
return 10;
|
|
1073
1076
|
}
|
|
1074
1077
|
apply(t) {
|
|
1075
|
-
const e =
|
|
1078
|
+
const e = C(t, this.path);
|
|
1076
1079
|
if (e.val === void 0)
|
|
1077
1080
|
throw new Error("NOT_FOUND");
|
|
1078
1081
|
const i = this.split(e.val);
|
|
1079
|
-
return
|
|
1082
|
+
return _t(e) ? e.obj[e.key] = i : ht(e) ? (e.obj[e.key] = i[0], e.obj.splice(e.key + 1, 0, i[1])) : t = i, { doc: t, old: e.val };
|
|
1080
1083
|
}
|
|
1081
1084
|
split(t) {
|
|
1082
1085
|
if (typeof t == "string") {
|
|
@@ -1091,7 +1094,7 @@ class Hs extends N {
|
|
|
1091
1094
|
text: o
|
|
1092
1095
|
}
|
|
1093
1096
|
] : [r, o];
|
|
1094
|
-
} else if (
|
|
1097
|
+
} else if (Pt(t)) {
|
|
1095
1098
|
const { pos: e, props: i } = this, r = t.text.slice(0, e), o = t.text.slice(e);
|
|
1096
1099
|
return [
|
|
1097
1100
|
{
|
|
@@ -1105,7 +1108,7 @@ class Hs extends N {
|
|
|
1105
1108
|
text: o
|
|
1106
1109
|
}
|
|
1107
1110
|
];
|
|
1108
|
-
} else if (
|
|
1111
|
+
} else if (Ht(t)) {
|
|
1109
1112
|
const { pos: e, props: i } = this, r = t.children.slice(0, e), o = t.children.slice(e);
|
|
1110
1113
|
return [
|
|
1111
1114
|
{
|
|
@@ -1128,7 +1131,7 @@ class Hs extends N {
|
|
|
1128
1131
|
toJson(t) {
|
|
1129
1132
|
const e = {
|
|
1130
1133
|
op: "split",
|
|
1131
|
-
path:
|
|
1134
|
+
path: $(this.path),
|
|
1132
1135
|
pos: this.pos
|
|
1133
1136
|
};
|
|
1134
1137
|
return this.props && (e.props = this.props), e;
|
|
@@ -1141,7 +1144,7 @@ class Hs extends N {
|
|
|
1141
1144
|
t.encodeArrayHeader(this.props ? 4 : 3), t.writer.u8(10), t.encodeArray(this.path), t.encodeNumber(this.pos), this.props && t.encodeObject(this.props);
|
|
1142
1145
|
}
|
|
1143
1146
|
}
|
|
1144
|
-
class
|
|
1147
|
+
class Is extends N {
|
|
1145
1148
|
constructor(t, e, i) {
|
|
1146
1149
|
super(t);
|
|
1147
1150
|
g(this, "pos");
|
|
@@ -1155,8 +1158,8 @@ class Ls extends N {
|
|
|
1155
1158
|
return 11;
|
|
1156
1159
|
}
|
|
1157
1160
|
apply(t) {
|
|
1158
|
-
const e =
|
|
1159
|
-
if (!
|
|
1161
|
+
const e = C(t, this.path);
|
|
1162
|
+
if (!ht(e))
|
|
1160
1163
|
throw new Error("INVALID_TARGET");
|
|
1161
1164
|
if (e.key <= 0)
|
|
1162
1165
|
throw new Error("INVALID_KEY");
|
|
@@ -1164,12 +1167,12 @@ class Ls extends N {
|
|
|
1164
1167
|
return e.obj[e.key - 1] = o, e.obj.splice(e.key, 1), { doc: t, old: [i, r] };
|
|
1165
1168
|
}
|
|
1166
1169
|
merge(t, e) {
|
|
1167
|
-
return typeof t == "string" && typeof e == "string" || typeof t == "number" && typeof e == "number" ? t + e :
|
|
1170
|
+
return typeof t == "string" && typeof e == "string" || typeof t == "number" && typeof e == "number" ? t + e : Pt(t) && Pt(e) ? { ...t, ...e, text: t.text + e.text } : Ht(t) && Ht(e) ? { ...t, ...e, children: [...t.children, ...e.children] } : [t, e];
|
|
1168
1171
|
}
|
|
1169
1172
|
toJson(t) {
|
|
1170
1173
|
const e = {
|
|
1171
1174
|
op: "merge",
|
|
1172
|
-
path:
|
|
1175
|
+
path: $(this.path),
|
|
1173
1176
|
pos: this.pos
|
|
1174
1177
|
};
|
|
1175
1178
|
return this.props && (e.props = this.props), e;
|
|
@@ -1182,8 +1185,8 @@ class Ls extends N {
|
|
|
1182
1185
|
t.encodeArrayHeader(this.props ? 4 : 3), t.writer.u8(11), t.encodeArray(this.path), t.encodeNumber(this.pos), this.props && t.encodeAny(this.props);
|
|
1183
1186
|
}
|
|
1184
1187
|
}
|
|
1185
|
-
const { isArray:
|
|
1186
|
-
class
|
|
1188
|
+
const { isArray: Vs } = Array;
|
|
1189
|
+
class Js extends N {
|
|
1187
1190
|
constructor(t, e, i) {
|
|
1188
1191
|
super(t);
|
|
1189
1192
|
g(this, "props");
|
|
@@ -1197,11 +1200,11 @@ class Ds extends N {
|
|
|
1197
1200
|
return 12;
|
|
1198
1201
|
}
|
|
1199
1202
|
apply(t) {
|
|
1200
|
-
const e =
|
|
1201
|
-
return
|
|
1203
|
+
const e = C(t, this.path);
|
|
1204
|
+
return ht(e) ? e.val !== void 0 && (e.obj[e.key] = this.extend(e.val)) : _t(e) ? e.obj[e.key] = this.extend(e.val) : t = this.extend(t), { doc: t };
|
|
1202
1205
|
}
|
|
1203
1206
|
extend(t) {
|
|
1204
|
-
if (
|
|
1207
|
+
if (Vs(t) || typeof t != "object" || !t)
|
|
1205
1208
|
return t;
|
|
1206
1209
|
for (const [e, i] of Object.entries(this.props)) {
|
|
1207
1210
|
if (e === "__proto__")
|
|
@@ -1217,7 +1220,7 @@ class Ds extends N {
|
|
|
1217
1220
|
toJson(t) {
|
|
1218
1221
|
const e = {
|
|
1219
1222
|
op: "extend",
|
|
1220
|
-
path:
|
|
1223
|
+
path: $(this.path),
|
|
1221
1224
|
props: this.props
|
|
1222
1225
|
};
|
|
1223
1226
|
return this.deleteNull && (e.deleteNull = this.deleteNull), e;
|
|
@@ -1231,7 +1234,7 @@ class Ds extends N {
|
|
|
1231
1234
|
t.encodeArrayHeader(i ? 4 : 3), t.writer.u8(12), t.encodeArray(this.path), t.encodeObject(this.props), i && t.writer.u8(1);
|
|
1232
1235
|
}
|
|
1233
1236
|
}
|
|
1234
|
-
class
|
|
1237
|
+
class zs extends M {
|
|
1235
1238
|
constructor(s) {
|
|
1236
1239
|
super(s);
|
|
1237
1240
|
}
|
|
@@ -1242,13 +1245,13 @@ class Is extends M {
|
|
|
1242
1245
|
return 31;
|
|
1243
1246
|
}
|
|
1244
1247
|
test(s) {
|
|
1245
|
-
const { val: t } =
|
|
1248
|
+
const { val: t } = C(s, this.path);
|
|
1246
1249
|
return t !== void 0;
|
|
1247
1250
|
}
|
|
1248
1251
|
toJson(s) {
|
|
1249
1252
|
return {
|
|
1250
1253
|
op: "defined",
|
|
1251
|
-
path:
|
|
1254
|
+
path: $(s ? this.path.slice(s.path.length) : this.path)
|
|
1252
1255
|
};
|
|
1253
1256
|
}
|
|
1254
1257
|
toCompact(s, t) {
|
|
@@ -1258,7 +1261,7 @@ class Is extends M {
|
|
|
1258
1261
|
s.encodeArrayHeader(2), s.writer.u8(31), s.encodeArray(t ? this.path.slice(t.path.length) : this.path);
|
|
1259
1262
|
}
|
|
1260
1263
|
}
|
|
1261
|
-
class
|
|
1264
|
+
class Bs extends M {
|
|
1262
1265
|
constructor(s) {
|
|
1263
1266
|
super(s);
|
|
1264
1267
|
}
|
|
@@ -1270,7 +1273,7 @@ class Vs extends M {
|
|
|
1270
1273
|
}
|
|
1271
1274
|
test(s) {
|
|
1272
1275
|
try {
|
|
1273
|
-
const { val: t } =
|
|
1276
|
+
const { val: t } = C(s, this.path);
|
|
1274
1277
|
return t === void 0;
|
|
1275
1278
|
} catch (t) {
|
|
1276
1279
|
if (t.message === "NOT_FOUND")
|
|
@@ -1281,7 +1284,7 @@ class Vs extends M {
|
|
|
1281
1284
|
toJson(s) {
|
|
1282
1285
|
return {
|
|
1283
1286
|
op: "undefined",
|
|
1284
|
-
path:
|
|
1287
|
+
path: $(s ? this.path.slice(s.path.length) : this.path)
|
|
1285
1288
|
};
|
|
1286
1289
|
}
|
|
1287
1290
|
toCompact(s, t) {
|
|
@@ -1291,8 +1294,8 @@ class Vs extends M {
|
|
|
1291
1294
|
s.encodeArrayHeader(2), s.writer.u8(38), s.encodeArray(t ? this.path.slice(t.path.length) : this.path);
|
|
1292
1295
|
}
|
|
1293
1296
|
}
|
|
1294
|
-
const { isArray:
|
|
1295
|
-
class
|
|
1297
|
+
const { isArray: Ws } = Array;
|
|
1298
|
+
class Gs extends M {
|
|
1296
1299
|
constructor(t, e) {
|
|
1297
1300
|
super(t);
|
|
1298
1301
|
g(this, "type");
|
|
@@ -1305,13 +1308,13 @@ class zs extends M {
|
|
|
1305
1308
|
return 39;
|
|
1306
1309
|
}
|
|
1307
1310
|
test(t) {
|
|
1308
|
-
const { val: e } =
|
|
1309
|
-
return e === null ? this.type.indexOf("null") > -1 :
|
|
1311
|
+
const { val: e } = C(t, this.path);
|
|
1312
|
+
return e === null ? this.type.indexOf("null") > -1 : Ws(e) ? this.type.indexOf("array") > -1 : this.type.indexOf(typeof e) > -1 || typeof e == "number" && e === Math.round(e) && this.type.indexOf("integer") > -1;
|
|
1310
1313
|
}
|
|
1311
1314
|
toJson(t) {
|
|
1312
1315
|
return {
|
|
1313
1316
|
op: "test_type",
|
|
1314
|
-
path:
|
|
1317
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1315
1318
|
type: this.type
|
|
1316
1319
|
};
|
|
1317
1320
|
}
|
|
@@ -1322,7 +1325,7 @@ class zs extends M {
|
|
|
1322
1325
|
t.encodeArrayHeader(3), t.writer.u8(39), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeArray(this.type);
|
|
1323
1326
|
}
|
|
1324
1327
|
}
|
|
1325
|
-
class
|
|
1328
|
+
class Fs extends M {
|
|
1326
1329
|
constructor(t, e, i, r) {
|
|
1327
1330
|
super(t);
|
|
1328
1331
|
g(this, "pos");
|
|
@@ -1337,7 +1340,7 @@ class Bs extends M {
|
|
|
1337
1340
|
return 40;
|
|
1338
1341
|
}
|
|
1339
1342
|
test(t) {
|
|
1340
|
-
const { val: e } =
|
|
1343
|
+
const { val: e } = C(t, this.path);
|
|
1341
1344
|
if (typeof e != "string")
|
|
1342
1345
|
return !1;
|
|
1343
1346
|
const i = e.length, r = Math.min(this.pos, i), o = Math.min(this.pos + this.str.length, i), l = e.substring(r, o) === this.str;
|
|
@@ -1346,7 +1349,7 @@ class Bs extends M {
|
|
|
1346
1349
|
toJson(t) {
|
|
1347
1350
|
const e = {
|
|
1348
1351
|
op: "test_string",
|
|
1349
|
-
path:
|
|
1352
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1350
1353
|
pos: this.pos,
|
|
1351
1354
|
str: this.str
|
|
1352
1355
|
};
|
|
@@ -1360,7 +1363,7 @@ class Bs extends M {
|
|
|
1360
1363
|
t.encodeArrayHeader(this.not ? 5 : 4), t.writer.u8(40), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeNumber(this.pos), t.encodeString(this.str), this.not && t.writer.u8(1);
|
|
1361
1364
|
}
|
|
1362
1365
|
}
|
|
1363
|
-
class
|
|
1366
|
+
class qs extends M {
|
|
1364
1367
|
constructor(t, e, i) {
|
|
1365
1368
|
super(t);
|
|
1366
1369
|
g(this, "len");
|
|
@@ -1374,7 +1377,7 @@ class Ws extends M {
|
|
|
1374
1377
|
return 41;
|
|
1375
1378
|
}
|
|
1376
1379
|
test(t) {
|
|
1377
|
-
const { val: e } =
|
|
1380
|
+
const { val: e } = C(t, this.path);
|
|
1378
1381
|
if (typeof e != "string")
|
|
1379
1382
|
return !1;
|
|
1380
1383
|
const r = e.length >= this.len;
|
|
@@ -1383,7 +1386,7 @@ class Ws extends M {
|
|
|
1383
1386
|
toJson(t) {
|
|
1384
1387
|
const e = {
|
|
1385
1388
|
op: "test_string_len",
|
|
1386
|
-
path:
|
|
1389
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1387
1390
|
len: this.len
|
|
1388
1391
|
};
|
|
1389
1392
|
return this.not && (e.not = this.not), e;
|
|
@@ -1396,7 +1399,7 @@ class Ws extends M {
|
|
|
1396
1399
|
t.encodeArrayHeader(this.not ? 4 : 3), t.writer.u8(41), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeNumber(this.len), this.not && t.writer.u8(1);
|
|
1397
1400
|
}
|
|
1398
1401
|
}
|
|
1399
|
-
class
|
|
1402
|
+
class Xs extends M {
|
|
1400
1403
|
constructor(t, e, i) {
|
|
1401
1404
|
super(t);
|
|
1402
1405
|
g(this, "value");
|
|
@@ -1410,7 +1413,7 @@ class Gs extends M {
|
|
|
1410
1413
|
return 30;
|
|
1411
1414
|
}
|
|
1412
1415
|
test(t) {
|
|
1413
|
-
const { val: e } =
|
|
1416
|
+
const { val: e } = C(t, this.path);
|
|
1414
1417
|
if (typeof e != "string")
|
|
1415
1418
|
return !1;
|
|
1416
1419
|
const i = this.ignore_case ? e.toLowerCase() : e, r = this.ignore_case ? this.value.toLowerCase() : this.value;
|
|
@@ -1419,7 +1422,7 @@ class Gs extends M {
|
|
|
1419
1422
|
toJson(t) {
|
|
1420
1423
|
const e = {
|
|
1421
1424
|
op: "contains",
|
|
1422
|
-
path:
|
|
1425
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1423
1426
|
value: this.value
|
|
1424
1427
|
};
|
|
1425
1428
|
return this.ignore_case && (e.ignore_case = this.ignore_case), e;
|
|
@@ -1433,7 +1436,7 @@ class Gs extends M {
|
|
|
1433
1436
|
t.encodeArrayHeader(i ? 4 : 3), t.writer.u8(30), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeString(this.value), i && t.writer.u8(1);
|
|
1434
1437
|
}
|
|
1435
1438
|
}
|
|
1436
|
-
class
|
|
1439
|
+
class Ks extends M {
|
|
1437
1440
|
constructor(t, e, i) {
|
|
1438
1441
|
super(t);
|
|
1439
1442
|
g(this, "value");
|
|
@@ -1447,7 +1450,7 @@ class Fs extends M {
|
|
|
1447
1450
|
return 32;
|
|
1448
1451
|
}
|
|
1449
1452
|
test(t) {
|
|
1450
|
-
const { val: e } =
|
|
1453
|
+
const { val: e } = C(t, this.path);
|
|
1451
1454
|
if (typeof e != "string")
|
|
1452
1455
|
return !1;
|
|
1453
1456
|
const i = this.ignore_case ? e.toLowerCase() : e, r = this.ignore_case ? this.value.toLowerCase() : this.value;
|
|
@@ -1456,7 +1459,7 @@ class Fs extends M {
|
|
|
1456
1459
|
toJson(t) {
|
|
1457
1460
|
const e = {
|
|
1458
1461
|
op: "ends",
|
|
1459
|
-
path:
|
|
1462
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1460
1463
|
value: this.value
|
|
1461
1464
|
};
|
|
1462
1465
|
return this.ignore_case && (e.ignore_case = this.ignore_case), e;
|
|
@@ -1470,7 +1473,7 @@ class Fs extends M {
|
|
|
1470
1473
|
t.encodeArrayHeader(i ? 4 : 3), t.writer.u8(32), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeString(this.value), i && t.writer.u8(1);
|
|
1471
1474
|
}
|
|
1472
1475
|
}
|
|
1473
|
-
class
|
|
1476
|
+
class Zs extends M {
|
|
1474
1477
|
constructor(t, e, i) {
|
|
1475
1478
|
super(t);
|
|
1476
1479
|
g(this, "value");
|
|
@@ -1484,7 +1487,7 @@ class qs extends M {
|
|
|
1484
1487
|
return 37;
|
|
1485
1488
|
}
|
|
1486
1489
|
test(t) {
|
|
1487
|
-
const { val: e } =
|
|
1490
|
+
const { val: e } = C(t, this.path);
|
|
1488
1491
|
if (typeof e != "string")
|
|
1489
1492
|
return !1;
|
|
1490
1493
|
const i = this.ignore_case ? e.toLowerCase() : e, r = this.ignore_case ? this.value.toLowerCase() : this.value;
|
|
@@ -1493,7 +1496,7 @@ class qs extends M {
|
|
|
1493
1496
|
toJson(t) {
|
|
1494
1497
|
const e = {
|
|
1495
1498
|
op: "starts",
|
|
1496
|
-
path:
|
|
1499
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1497
1500
|
value: this.value
|
|
1498
1501
|
};
|
|
1499
1502
|
return this.ignore_case && (e.ignore_case = this.ignore_case), e;
|
|
@@ -1507,7 +1510,7 @@ class qs extends M {
|
|
|
1507
1510
|
t.encodeArrayHeader(i ? 4 : 3), t.writer.u8(37), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeString(this.value), i && t.writer.u8(1);
|
|
1508
1511
|
}
|
|
1509
1512
|
}
|
|
1510
|
-
class
|
|
1513
|
+
class Ys extends M {
|
|
1511
1514
|
constructor(t, e) {
|
|
1512
1515
|
super(t);
|
|
1513
1516
|
g(this, "value");
|
|
@@ -1520,16 +1523,16 @@ class Xs extends M {
|
|
|
1520
1523
|
return 33;
|
|
1521
1524
|
}
|
|
1522
1525
|
test(t) {
|
|
1523
|
-
const { val: e } =
|
|
1526
|
+
const { val: e } = C(t, this.path);
|
|
1524
1527
|
for (const i of this.value)
|
|
1525
|
-
if (
|
|
1528
|
+
if (gt(e, i))
|
|
1526
1529
|
return !0;
|
|
1527
1530
|
return !1;
|
|
1528
1531
|
}
|
|
1529
1532
|
toJson(t) {
|
|
1530
1533
|
return {
|
|
1531
1534
|
op: "in",
|
|
1532
|
-
path:
|
|
1535
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1533
1536
|
value: this.value
|
|
1534
1537
|
};
|
|
1535
1538
|
}
|
|
@@ -1540,7 +1543,7 @@ class Xs extends M {
|
|
|
1540
1543
|
t.encodeArrayHeader(3), t.writer.u8(33), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeArray(this.value);
|
|
1541
1544
|
}
|
|
1542
1545
|
}
|
|
1543
|
-
class
|
|
1546
|
+
class Qs extends M {
|
|
1544
1547
|
constructor(t, e) {
|
|
1545
1548
|
super(t);
|
|
1546
1549
|
g(this, "value");
|
|
@@ -1553,13 +1556,13 @@ class Ks extends M {
|
|
|
1553
1556
|
return 34;
|
|
1554
1557
|
}
|
|
1555
1558
|
test(t) {
|
|
1556
|
-
const { val: e } =
|
|
1559
|
+
const { val: e } = C(t, this.path);
|
|
1557
1560
|
return typeof e != "number" ? !1 : e < this.value;
|
|
1558
1561
|
}
|
|
1559
1562
|
toJson(t) {
|
|
1560
1563
|
return {
|
|
1561
1564
|
op: "less",
|
|
1562
|
-
path:
|
|
1565
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1563
1566
|
value: this.value
|
|
1564
1567
|
};
|
|
1565
1568
|
}
|
|
@@ -1570,7 +1573,7 @@ class Ks extends M {
|
|
|
1570
1573
|
t.encodeArrayHeader(3), t.writer.u8(34), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeNumber(this.value);
|
|
1571
1574
|
}
|
|
1572
1575
|
}
|
|
1573
|
-
class
|
|
1576
|
+
class tn extends M {
|
|
1574
1577
|
constructor(t, e) {
|
|
1575
1578
|
super(t);
|
|
1576
1579
|
g(this, "value");
|
|
@@ -1583,13 +1586,13 @@ class Ys extends M {
|
|
|
1583
1586
|
return 36;
|
|
1584
1587
|
}
|
|
1585
1588
|
test(t) {
|
|
1586
|
-
const { val: e } =
|
|
1589
|
+
const { val: e } = C(t, this.path);
|
|
1587
1590
|
return typeof e != "number" ? !1 : e > this.value;
|
|
1588
1591
|
}
|
|
1589
1592
|
toJson(t) {
|
|
1590
1593
|
return {
|
|
1591
1594
|
op: "more",
|
|
1592
|
-
path:
|
|
1595
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1593
1596
|
value: this.value
|
|
1594
1597
|
};
|
|
1595
1598
|
}
|
|
@@ -1600,14 +1603,14 @@ class Ys extends M {
|
|
|
1600
1603
|
t.encodeArrayHeader(3), t.writer.u8(36), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeNumber(this.value);
|
|
1601
1604
|
}
|
|
1602
1605
|
}
|
|
1603
|
-
class
|
|
1606
|
+
class Jt extends M {
|
|
1604
1607
|
constructor(t, e) {
|
|
1605
1608
|
super(t);
|
|
1606
1609
|
g(this, "ops");
|
|
1607
1610
|
this.ops = e;
|
|
1608
1611
|
}
|
|
1609
1612
|
}
|
|
1610
|
-
class
|
|
1613
|
+
class en extends Jt {
|
|
1611
1614
|
constructor(t, e) {
|
|
1612
1615
|
super(t, e);
|
|
1613
1616
|
g(this, "ops");
|
|
@@ -1628,7 +1631,7 @@ class Zs extends Vt {
|
|
|
1628
1631
|
toJson(t) {
|
|
1629
1632
|
return {
|
|
1630
1633
|
op: "and",
|
|
1631
|
-
path:
|
|
1634
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1632
1635
|
apply: this.ops.map((i) => i.toJson(this))
|
|
1633
1636
|
};
|
|
1634
1637
|
}
|
|
@@ -1648,7 +1651,7 @@ class Zs extends Vt {
|
|
|
1648
1651
|
this.ops[o].encode(t, this);
|
|
1649
1652
|
}
|
|
1650
1653
|
}
|
|
1651
|
-
class
|
|
1654
|
+
class sn extends Jt {
|
|
1652
1655
|
constructor(t, e) {
|
|
1653
1656
|
super(t, e);
|
|
1654
1657
|
g(this, "ops");
|
|
@@ -1669,7 +1672,7 @@ class Qs extends Vt {
|
|
|
1669
1672
|
toJson(t) {
|
|
1670
1673
|
return {
|
|
1671
1674
|
op: "or",
|
|
1672
|
-
path:
|
|
1675
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1673
1676
|
apply: this.ops.map((i) => i.toJson(this))
|
|
1674
1677
|
};
|
|
1675
1678
|
}
|
|
@@ -1688,7 +1691,7 @@ class Qs extends Vt {
|
|
|
1688
1691
|
this.ops[r].encode(t, this);
|
|
1689
1692
|
}
|
|
1690
1693
|
}
|
|
1691
|
-
class
|
|
1694
|
+
class nn extends Jt {
|
|
1692
1695
|
constructor(t, e) {
|
|
1693
1696
|
super(t, e);
|
|
1694
1697
|
g(this, "ops");
|
|
@@ -1709,7 +1712,7 @@ class tn extends Vt {
|
|
|
1709
1712
|
toJson(t) {
|
|
1710
1713
|
return {
|
|
1711
1714
|
op: "not",
|
|
1712
|
-
path:
|
|
1715
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1713
1716
|
apply: this.ops.map((i) => i.toJson(this))
|
|
1714
1717
|
};
|
|
1715
1718
|
}
|
|
@@ -1728,7 +1731,7 @@ class tn extends Vt {
|
|
|
1728
1731
|
this.ops[r].encode(t, this);
|
|
1729
1732
|
}
|
|
1730
1733
|
}
|
|
1731
|
-
class
|
|
1734
|
+
class rn extends M {
|
|
1732
1735
|
constructor(t, e, i, r) {
|
|
1733
1736
|
super(t);
|
|
1734
1737
|
g(this, "value");
|
|
@@ -1743,13 +1746,13 @@ class en extends M {
|
|
|
1743
1746
|
return 35;
|
|
1744
1747
|
}
|
|
1745
1748
|
test(t) {
|
|
1746
|
-
const { val: e } =
|
|
1749
|
+
const { val: e } = C(t, this.path);
|
|
1747
1750
|
return typeof e != "string" ? !1 : this.matcher(e);
|
|
1748
1751
|
}
|
|
1749
1752
|
toJson(t) {
|
|
1750
1753
|
const e = {
|
|
1751
1754
|
op: "matches",
|
|
1752
|
-
path:
|
|
1755
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1753
1756
|
value: this.value
|
|
1754
1757
|
};
|
|
1755
1758
|
return this.ignore_case && (e.ignore_case = this.ignore_case), e;
|
|
@@ -1763,8 +1766,8 @@ class en extends M {
|
|
|
1763
1766
|
t.encodeArrayHeader(i ? 4 : 3), t.writer.u8(35), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeString(this.value), i && t.writer.u8(1);
|
|
1764
1767
|
}
|
|
1765
1768
|
}
|
|
1766
|
-
const { isArray:
|
|
1767
|
-
class
|
|
1769
|
+
const { isArray: on } = Array;
|
|
1770
|
+
class an extends M {
|
|
1768
1771
|
constructor(t, e) {
|
|
1769
1772
|
super(t);
|
|
1770
1773
|
g(this, "value");
|
|
@@ -1777,13 +1780,13 @@ class nn extends M {
|
|
|
1777
1780
|
return 42;
|
|
1778
1781
|
}
|
|
1779
1782
|
test(t) {
|
|
1780
|
-
const { val: e } =
|
|
1781
|
-
return e === null ? this.value === "null" :
|
|
1783
|
+
const { val: e } = C(t, this.path);
|
|
1784
|
+
return e === null ? this.value === "null" : on(e) ? this.value === "array" : typeof e === this.value || typeof e == "number" && e === Math.round(e) && this.value === "integer";
|
|
1782
1785
|
}
|
|
1783
1786
|
toJson(t) {
|
|
1784
1787
|
return {
|
|
1785
1788
|
op: "type",
|
|
1786
|
-
path:
|
|
1789
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1787
1790
|
value: this.value
|
|
1788
1791
|
};
|
|
1789
1792
|
}
|
|
@@ -1794,93 +1797,93 @@ class nn extends M {
|
|
|
1794
1797
|
t.encodeArrayHeader(3), t.writer.u8(42), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeString(this.value);
|
|
1795
1798
|
}
|
|
1796
1799
|
}
|
|
1797
|
-
const
|
|
1800
|
+
const hn = (n, s) => {
|
|
1798
1801
|
switch (n.op) {
|
|
1799
1802
|
case "add":
|
|
1800
|
-
return new
|
|
1803
|
+
return new Vt(b(n.path), n.value);
|
|
1801
1804
|
case "remove":
|
|
1802
|
-
return new
|
|
1805
|
+
return new $e(b(n.path), n.oldValue);
|
|
1803
1806
|
case "replace":
|
|
1804
|
-
return new
|
|
1807
|
+
return new Ss(b(n.path), n.value, n.oldValue);
|
|
1805
1808
|
case "move":
|
|
1806
|
-
return new
|
|
1809
|
+
return new Os(b(n.path), b(n.from));
|
|
1807
1810
|
case "copy":
|
|
1808
|
-
return new
|
|
1811
|
+
return new js(b(n.path), b(n.from));
|
|
1809
1812
|
case "flip":
|
|
1810
|
-
return new
|
|
1813
|
+
return new Rs(b(n.path));
|
|
1811
1814
|
case "inc":
|
|
1812
|
-
return new
|
|
1815
|
+
return new Ns(b(n.path), n.inc);
|
|
1813
1816
|
case "str_ins":
|
|
1814
|
-
return new
|
|
1817
|
+
return new Ps(b(n.path), n.pos, n.str);
|
|
1815
1818
|
case "str_del":
|
|
1816
|
-
return new
|
|
1819
|
+
return new Hs(b(n.path), n.pos, n.str, n.len);
|
|
1817
1820
|
case "split":
|
|
1818
|
-
return new
|
|
1821
|
+
return new Ds(b(n.path), n.pos, n.props || null);
|
|
1819
1822
|
case "merge":
|
|
1820
|
-
return new
|
|
1823
|
+
return new Is(b(n.path), n.pos, n.props || null);
|
|
1821
1824
|
case "extend":
|
|
1822
|
-
return new
|
|
1825
|
+
return new Js(b(n.path), n.props, !!n.deleteNull);
|
|
1823
1826
|
default:
|
|
1824
|
-
return
|
|
1827
|
+
return dt(n, s);
|
|
1825
1828
|
}
|
|
1826
|
-
},
|
|
1829
|
+
}, dt = (n, s) => {
|
|
1827
1830
|
switch (n.op) {
|
|
1828
1831
|
case "test":
|
|
1829
|
-
return new
|
|
1832
|
+
return new Ms(b(n.path), n.value, !!n.not);
|
|
1830
1833
|
case "defined":
|
|
1831
|
-
return new
|
|
1834
|
+
return new zs(b(n.path));
|
|
1832
1835
|
case "undefined":
|
|
1833
|
-
return new
|
|
1836
|
+
return new Bs(b(n.path));
|
|
1834
1837
|
case "type":
|
|
1835
|
-
return new
|
|
1838
|
+
return new an(b(n.path), n.value);
|
|
1836
1839
|
case "test_type":
|
|
1837
|
-
return new
|
|
1840
|
+
return new Gs(b(n.path), n.type);
|
|
1838
1841
|
case "test_string":
|
|
1839
|
-
return new
|
|
1842
|
+
return new Fs(b(n.path), n.pos, n.str, !!n.not);
|
|
1840
1843
|
case "test_string_len":
|
|
1841
|
-
return new
|
|
1844
|
+
return new qs(b(n.path), n.len, !!n.not);
|
|
1842
1845
|
case "contains":
|
|
1843
|
-
return new
|
|
1846
|
+
return new Xs(b(n.path), n.value, !!n.ignore_case);
|
|
1844
1847
|
case "ends":
|
|
1845
|
-
return new
|
|
1848
|
+
return new Ks(b(n.path), n.value, !!n.ignore_case);
|
|
1846
1849
|
case "starts":
|
|
1847
|
-
return new
|
|
1850
|
+
return new Zs(b(n.path), n.value, !!n.ignore_case);
|
|
1848
1851
|
case "matches":
|
|
1849
|
-
return new
|
|
1852
|
+
return new rn(b(n.path), n.value, !!n.ignore_case, s.createMatcher || Us);
|
|
1850
1853
|
case "in":
|
|
1851
|
-
return new
|
|
1854
|
+
return new Ys(b(n.path), n.value);
|
|
1852
1855
|
case "less":
|
|
1853
|
-
return new
|
|
1856
|
+
return new Qs(b(n.path), n.value);
|
|
1854
1857
|
case "more":
|
|
1855
|
-
return new
|
|
1858
|
+
return new tn(b(n.path), n.value);
|
|
1856
1859
|
case "and": {
|
|
1857
|
-
const t =
|
|
1858
|
-
return new
|
|
1860
|
+
const t = b(n.path);
|
|
1861
|
+
return new en(t, n.apply.map((e) => dt({ ...e, path: [...t, ...b(e.path)] }, s)));
|
|
1859
1862
|
}
|
|
1860
1863
|
case "or": {
|
|
1861
|
-
const t =
|
|
1862
|
-
return new
|
|
1864
|
+
const t = b(n.path);
|
|
1865
|
+
return new sn(t, n.apply.map((e) => dt({ ...e, path: [...t, ...b(e.path)] }, s)));
|
|
1863
1866
|
}
|
|
1864
1867
|
case "not": {
|
|
1865
|
-
const t =
|
|
1866
|
-
return new
|
|
1868
|
+
const t = b(n.path);
|
|
1869
|
+
return new nn(t, n.apply.map((e) => dt({ ...e, path: [...t, ...b(e.path)] }, s)));
|
|
1867
1870
|
}
|
|
1868
1871
|
default:
|
|
1869
1872
|
throw new Error("OP_UNKNOWN");
|
|
1870
1873
|
}
|
|
1871
1874
|
};
|
|
1872
|
-
function
|
|
1873
|
-
t.mutate || (n =
|
|
1875
|
+
function ln(n, s, t) {
|
|
1876
|
+
t.mutate || (n = ot(n));
|
|
1874
1877
|
const e = [], i = s.length;
|
|
1875
1878
|
for (let r = 0; r < i; r++) {
|
|
1876
|
-
const l =
|
|
1879
|
+
const l = hn(s[r], t).apply(n);
|
|
1877
1880
|
n = l.doc, e.push(l);
|
|
1878
1881
|
}
|
|
1879
1882
|
return { doc: n, res: e };
|
|
1880
1883
|
}
|
|
1881
|
-
var
|
|
1884
|
+
var et = (n) => typeof n == "function" ? n : function() {
|
|
1882
1885
|
return n;
|
|
1883
|
-
},
|
|
1886
|
+
}, cn = typeof self < "u" ? self : null, Q = typeof window < "u" ? window : null, st = cn || Q || st, un = "2.0.0", P = { connecting: 0, open: 1, closing: 2, closed: 3 }, pn = 1e4, dn = 1e3, R = {
|
|
1884
1887
|
closed: "closed",
|
|
1885
1888
|
errored: "errored",
|
|
1886
1889
|
joined: "joined",
|
|
@@ -1892,12 +1895,12 @@ var st = (n) => typeof n == "function" ? n : function() {
|
|
|
1892
1895
|
join: "phx_join",
|
|
1893
1896
|
reply: "phx_reply",
|
|
1894
1897
|
leave: "phx_leave"
|
|
1895
|
-
},
|
|
1898
|
+
}, Lt = {
|
|
1896
1899
|
longpoll: "longpoll",
|
|
1897
1900
|
websocket: "websocket"
|
|
1898
|
-
},
|
|
1901
|
+
}, fn = {
|
|
1899
1902
|
complete: 4
|
|
1900
|
-
},
|
|
1903
|
+
}, ct = class {
|
|
1901
1904
|
constructor(n, s, t, e) {
|
|
1902
1905
|
this.channel = n, this.event = s, this.payload = t || function() {
|
|
1903
1906
|
return {};
|
|
@@ -1943,7 +1946,7 @@ var st = (n) => typeof n == "function" ? n : function() {
|
|
|
1943
1946
|
trigger(n, s) {
|
|
1944
1947
|
this.channel.trigger(this.refEvent, { status: n, response: s });
|
|
1945
1948
|
}
|
|
1946
|
-
},
|
|
1949
|
+
}, Ce = class {
|
|
1947
1950
|
constructor(n, s) {
|
|
1948
1951
|
this.callback = n, this.timerCalc = s, this.timer = null, this.tries = 0;
|
|
1949
1952
|
}
|
|
@@ -1955,9 +1958,9 @@ var st = (n) => typeof n == "function" ? n : function() {
|
|
|
1955
1958
|
this.tries = this.tries + 1, this.callback();
|
|
1956
1959
|
}, this.timerCalc(this.tries + 1));
|
|
1957
1960
|
}
|
|
1958
|
-
},
|
|
1961
|
+
}, vn = class {
|
|
1959
1962
|
constructor(n, s, t) {
|
|
1960
|
-
this.state = R.closed, this.topic = n, this.params =
|
|
1963
|
+
this.state = R.closed, this.topic = n, this.params = et(s || {}), this.socket = t, this.bindings = [], this.bindingRef = 0, this.timeout = this.socket.timeout, this.joinedOnce = !1, this.joinPush = new ct(this, U.join, this.params, this.timeout), this.pushBuffer = [], this.stateChangeRefs = [], this.rejoinTimer = new Ce(() => {
|
|
1961
1964
|
this.socket.isConnected() && this.rejoin();
|
|
1962
1965
|
}, this.socket.rejoinAfterMs), this.stateChangeRefs.push(this.socket.onError(() => this.rejoinTimer.reset())), this.stateChangeRefs.push(this.socket.onOpen(() => {
|
|
1963
1966
|
this.rejoinTimer.reset(), this.isErrored() && this.rejoin();
|
|
@@ -1970,7 +1973,7 @@ var st = (n) => typeof n == "function" ? n : function() {
|
|
|
1970
1973
|
}), this.onError((e) => {
|
|
1971
1974
|
this.socket.hasLogger() && this.socket.log("channel", `error ${this.topic}`, e), this.isJoining() && this.joinPush.reset(), this.state = R.errored, this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
|
|
1972
1975
|
}), this.joinPush.receive("timeout", () => {
|
|
1973
|
-
this.socket.hasLogger() && this.socket.log("channel", `timeout ${this.topic} (${this.joinRef()})`, this.joinPush.timeout), new
|
|
1976
|
+
this.socket.hasLogger() && this.socket.log("channel", `timeout ${this.topic} (${this.joinRef()})`, this.joinPush.timeout), new ct(this, U.leave, et({}), this.timeout).send(), this.state = R.errored, this.joinPush.reset(), this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
|
|
1974
1977
|
}), this.on(U.reply, (e, i) => {
|
|
1975
1978
|
this.trigger(this.replyEventName(i), e);
|
|
1976
1979
|
});
|
|
@@ -1999,7 +2002,7 @@ var st = (n) => typeof n == "function" ? n : function() {
|
|
|
1999
2002
|
push(n, s, t = this.timeout) {
|
|
2000
2003
|
if (s = s || {}, !this.joinedOnce)
|
|
2001
2004
|
throw new Error(`tried to push '${n}' to '${this.topic}' before joining. Use channel.join() before pushing events`);
|
|
2002
|
-
let e = new
|
|
2005
|
+
let e = new ct(this, n, function() {
|
|
2003
2006
|
return s;
|
|
2004
2007
|
}, t);
|
|
2005
2008
|
return this.canPush() ? e.send() : (e.startTimeout(), this.pushBuffer.push(e)), e;
|
|
@@ -2008,7 +2011,7 @@ var st = (n) => typeof n == "function" ? n : function() {
|
|
|
2008
2011
|
this.rejoinTimer.reset(), this.joinPush.cancelTimeout(), this.state = R.leaving;
|
|
2009
2012
|
let s = () => {
|
|
2010
2013
|
this.socket.hasLogger() && this.socket.log("channel", `leave ${this.topic}`), this.trigger(U.close, "leave");
|
|
2011
|
-
}, t = new
|
|
2014
|
+
}, t = new ct(this, U.leave, et({}), n);
|
|
2012
2015
|
return t.receive("ok", () => s()).receive("timeout", () => s()), t.send(), this.canPush() || t.trigger("ok", {}), t;
|
|
2013
2016
|
}
|
|
2014
2017
|
onMessage(n, s, t) {
|
|
@@ -2049,13 +2052,13 @@ var st = (n) => typeof n == "function" ? n : function() {
|
|
|
2049
2052
|
isLeaving() {
|
|
2050
2053
|
return this.state === R.leaving;
|
|
2051
2054
|
}
|
|
2052
|
-
},
|
|
2055
|
+
}, yt = class {
|
|
2053
2056
|
static request(n, s, t, e, i, r, o) {
|
|
2054
|
-
if (
|
|
2055
|
-
let l = new
|
|
2057
|
+
if (st.XDomainRequest) {
|
|
2058
|
+
let l = new st.XDomainRequest();
|
|
2056
2059
|
return this.xdomainRequest(l, n, s, e, i, r, o);
|
|
2057
2060
|
} else {
|
|
2058
|
-
let l = new
|
|
2061
|
+
let l = new st.XMLHttpRequest();
|
|
2059
2062
|
return this.xhrRequest(l, n, s, t, e, i, r, o);
|
|
2060
2063
|
}
|
|
2061
2064
|
}
|
|
@@ -2068,7 +2071,7 @@ var st = (n) => typeof n == "function" ? n : function() {
|
|
|
2068
2071
|
}
|
|
2069
2072
|
static xhrRequest(n, s, t, e, i, r, o, l) {
|
|
2070
2073
|
return n.open(s, t, !0), n.timeout = r, n.setRequestHeader("Content-Type", e), n.onerror = () => l && l(null), n.onreadystatechange = () => {
|
|
2071
|
-
if (n.readyState ===
|
|
2074
|
+
if (n.readyState === fn.complete && l) {
|
|
2072
2075
|
let u = this.parseJSON(n.responseText);
|
|
2073
2076
|
l(u);
|
|
2074
2077
|
}
|
|
@@ -2108,10 +2111,10 @@ var st = (n) => typeof n == "function" ? n : function() {
|
|
|
2108
2111
|
}, this.pollEndpoint = this.normalizeEndpoint(n), this.readyState = P.connecting, this.poll();
|
|
2109
2112
|
}
|
|
2110
2113
|
normalizeEndpoint(n) {
|
|
2111
|
-
return n.replace("ws://", "http://").replace("wss://", "https://").replace(new RegExp("(.*)/" +
|
|
2114
|
+
return n.replace("ws://", "http://").replace("wss://", "https://").replace(new RegExp("(.*)/" + Lt.websocket), "$1/" + Lt.longpoll);
|
|
2112
2115
|
}
|
|
2113
2116
|
endpointURL() {
|
|
2114
|
-
return
|
|
2117
|
+
return yt.appendParams(this.pollEndpoint, { token: this.token });
|
|
2115
2118
|
}
|
|
2116
2119
|
closeAndRetry(n, s, t) {
|
|
2117
2120
|
this.close(n, s, t), this.readyState = P.connecting;
|
|
@@ -2169,11 +2172,11 @@ var st = (n) => typeof n == "function" ? n : function() {
|
|
|
2169
2172
|
let i, r = () => {
|
|
2170
2173
|
this.reqs.delete(i), t();
|
|
2171
2174
|
};
|
|
2172
|
-
i =
|
|
2175
|
+
i = yt.request(n, this.endpointURL(), "application/json", s, this.timeout, r, (o) => {
|
|
2173
2176
|
this.reqs.delete(i), this.isActive() && e(o);
|
|
2174
2177
|
}), this.reqs.add(i);
|
|
2175
2178
|
}
|
|
2176
|
-
},
|
|
2179
|
+
}, ut = {
|
|
2177
2180
|
HEADER_LENGTH: 1,
|
|
2178
2181
|
META_LENGTH: 4,
|
|
2179
2182
|
KINDS: { push: 0, reply: 1, broadcast: 2 },
|
|
@@ -2195,9 +2198,9 @@ var st = (n) => typeof n == "function" ? n : function() {
|
|
|
2195
2198
|
},
|
|
2196
2199
|
binaryEncode(n) {
|
|
2197
2200
|
let { join_ref: s, ref: t, event: e, topic: i, payload: r } = n, o = this.META_LENGTH + s.length + t.length + i.length + e.length, l = new ArrayBuffer(this.HEADER_LENGTH + o), u = new DataView(l), d = 0;
|
|
2198
|
-
u.setUint8(d++, this.KINDS.push), u.setUint8(d++, s.length), u.setUint8(d++, t.length), u.setUint8(d++, i.length), u.setUint8(d++, e.length), Array.from(s, (
|
|
2199
|
-
var
|
|
2200
|
-
return
|
|
2201
|
+
u.setUint8(d++, this.KINDS.push), u.setUint8(d++, s.length), u.setUint8(d++, t.length), u.setUint8(d++, i.length), u.setUint8(d++, e.length), Array.from(s, (w) => u.setUint8(d++, w.charCodeAt(0))), Array.from(t, (w) => u.setUint8(d++, w.charCodeAt(0))), Array.from(i, (w) => u.setUint8(d++, w.charCodeAt(0))), Array.from(e, (w) => u.setUint8(d++, w.charCodeAt(0)));
|
|
2202
|
+
var _ = new Uint8Array(l.byteLength + r.byteLength);
|
|
2203
|
+
return _.set(new Uint8Array(l), 0), _.set(new Uint8Array(r), l.byteLength), _.buffer;
|
|
2201
2204
|
},
|
|
2202
2205
|
binaryDecode(n) {
|
|
2203
2206
|
let s = new DataView(n), t = s.getUint8(0), e = new TextDecoder();
|
|
@@ -2217,20 +2220,20 @@ var st = (n) => typeof n == "function" ? n : function() {
|
|
|
2217
2220
|
o = o + i;
|
|
2218
2221
|
let d = t.decode(n.slice(o, o + r));
|
|
2219
2222
|
o = o + r;
|
|
2220
|
-
let
|
|
2221
|
-
return { join_ref: l, ref: null, topic: u, event: d, payload:
|
|
2223
|
+
let _ = n.slice(o, n.byteLength);
|
|
2224
|
+
return { join_ref: l, ref: null, topic: u, event: d, payload: _ };
|
|
2222
2225
|
},
|
|
2223
2226
|
decodeReply(n, s, t) {
|
|
2224
2227
|
let e = s.getUint8(1), i = s.getUint8(2), r = s.getUint8(3), o = s.getUint8(4), l = this.HEADER_LENGTH + this.META_LENGTH, u = t.decode(n.slice(l, l + e));
|
|
2225
2228
|
l = l + e;
|
|
2226
2229
|
let d = t.decode(n.slice(l, l + i));
|
|
2227
2230
|
l = l + i;
|
|
2228
|
-
let
|
|
2231
|
+
let _ = t.decode(n.slice(l, l + r));
|
|
2229
2232
|
l = l + r;
|
|
2230
|
-
let
|
|
2233
|
+
let w = t.decode(n.slice(l, l + o));
|
|
2231
2234
|
l = l + o;
|
|
2232
|
-
let
|
|
2233
|
-
return { join_ref: u, ref: d, topic:
|
|
2235
|
+
let T = n.slice(l, n.byteLength), O = { status: w, response: T };
|
|
2236
|
+
return { join_ref: u, ref: d, topic: _, event: U.reply, payload: O };
|
|
2234
2237
|
},
|
|
2235
2238
|
decodeBroadcast(n, s, t) {
|
|
2236
2239
|
let e = s.getUint8(1), i = s.getUint8(2), r = this.HEADER_LENGTH + 2, o = t.decode(n.slice(r, r + e));
|
|
@@ -2240,15 +2243,15 @@ var st = (n) => typeof n == "function" ? n : function() {
|
|
|
2240
2243
|
let u = n.slice(r, n.byteLength);
|
|
2241
2244
|
return { join_ref: null, ref: null, topic: o, event: l, payload: u };
|
|
2242
2245
|
}
|
|
2243
|
-
},
|
|
2246
|
+
}, gn = class {
|
|
2244
2247
|
constructor(n, s = {}) {
|
|
2245
|
-
this.stateChangeCallbacks = { open: [], close: [], error: [], message: [] }, this.channels = [], this.sendBuffer = [], this.ref = 0, this.timeout = s.timeout ||
|
|
2248
|
+
this.stateChangeCallbacks = { open: [], close: [], error: [], message: [] }, this.channels = [], this.sendBuffer = [], this.ref = 0, this.timeout = s.timeout || pn, this.transport = s.transport || st.WebSocket || jt, this.establishedConnections = 0, this.defaultEncoder = ut.encode.bind(ut), this.defaultDecoder = ut.decode.bind(ut), this.closeWasClean = !1, this.binaryType = s.binaryType || "arraybuffer", this.connectClock = 1, this.transport !== jt ? (this.encode = s.encode || this.defaultEncoder, this.decode = s.decode || this.defaultDecoder) : (this.encode = this.defaultEncoder, this.decode = this.defaultDecoder);
|
|
2246
2249
|
let t = null;
|
|
2247
|
-
|
|
2250
|
+
Q && Q.addEventListener && (Q.addEventListener("pagehide", (e) => {
|
|
2248
2251
|
this.conn && (this.disconnect(), t = this.connectClock);
|
|
2249
|
-
}),
|
|
2252
|
+
}), Q.addEventListener("pageshow", (e) => {
|
|
2250
2253
|
t === this.connectClock && (t = null, this.connect());
|
|
2251
|
-
})), this.heartbeatIntervalMs = s.heartbeatIntervalMs || 3e4, this.rejoinAfterMs = (e) => s.rejoinAfterMs ? s.rejoinAfterMs(e) : [1e3, 2e3, 5e3][e - 1] || 1e4, this.reconnectAfterMs = (e) => s.reconnectAfterMs ? s.reconnectAfterMs(e) : [10, 50, 100, 150, 200, 250, 500, 1e3, 2e3][e - 1] || 5e3, this.logger = s.logger || null, this.longpollerTimeout = s.longpollerTimeout || 2e4, this.params =
|
|
2254
|
+
})), this.heartbeatIntervalMs = s.heartbeatIntervalMs || 3e4, this.rejoinAfterMs = (e) => s.rejoinAfterMs ? s.rejoinAfterMs(e) : [1e3, 2e3, 5e3][e - 1] || 1e4, this.reconnectAfterMs = (e) => s.reconnectAfterMs ? s.reconnectAfterMs(e) : [10, 50, 100, 150, 200, 250, 500, 1e3, 2e3][e - 1] || 5e3, this.logger = s.logger || null, this.longpollerTimeout = s.longpollerTimeout || 2e4, this.params = et(s.params || {}), this.endPoint = `${n}/${Lt.websocket}`, this.vsn = s.vsn || un, this.heartbeatTimeoutTimer = null, this.heartbeatTimer = null, this.pendingHeartbeatRef = null, this.reconnectTimer = new Ce(() => {
|
|
2252
2255
|
this.teardown(() => this.connect());
|
|
2253
2256
|
}, this.reconnectAfterMs);
|
|
2254
2257
|
}
|
|
@@ -2262,14 +2265,14 @@ var st = (n) => typeof n == "function" ? n : function() {
|
|
|
2262
2265
|
return location.protocol.match(/^https/) ? "wss" : "ws";
|
|
2263
2266
|
}
|
|
2264
2267
|
endPointURL() {
|
|
2265
|
-
let n =
|
|
2268
|
+
let n = yt.appendParams(yt.appendParams(this.endPoint, this.params()), { vsn: this.vsn });
|
|
2266
2269
|
return n.charAt(0) !== "/" ? n : n.charAt(1) === "/" ? `${this.protocol()}:${n}` : `${this.protocol()}://${location.host}${n}`;
|
|
2267
2270
|
}
|
|
2268
2271
|
disconnect(n, s, t) {
|
|
2269
2272
|
this.connectClock++, this.closeWasClean = !0, this.reconnectTimer.reset(), this.teardown(n, s, t);
|
|
2270
2273
|
}
|
|
2271
2274
|
connect(n) {
|
|
2272
|
-
n && (console && console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"), this.params =
|
|
2275
|
+
n && (console && console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"), this.params = et(n)), !this.conn && (this.connectClock++, this.closeWasClean = !1, this.conn = new this.transport(this.endPointURL()), this.conn.binaryType = this.binaryType, this.conn.timeout = this.longpollerTimeout, this.conn.onopen = () => this.onConnOpen(), this.conn.onerror = (s) => this.onConnError(s), this.conn.onmessage = (s) => this.onConnMessage(s), this.conn.onclose = (s) => this.onConnClose(s));
|
|
2273
2276
|
}
|
|
2274
2277
|
log(n, s, t) {
|
|
2275
2278
|
this.logger(n, s, t);
|
|
@@ -2310,7 +2313,7 @@ var st = (n) => typeof n == "function" ? n : function() {
|
|
|
2310
2313
|
this.hasLogger() && this.log("transport", `connected to ${this.endPointURL()}`), this.closeWasClean = !1, this.establishedConnections++, this.flushSendBuffer(), this.reconnectTimer.reset(), this.resetHeartbeat(), this.stateChangeCallbacks.open.forEach(([, n]) => n());
|
|
2311
2314
|
}
|
|
2312
2315
|
heartbeatTimeout() {
|
|
2313
|
-
this.pendingHeartbeatRef && (this.pendingHeartbeatRef = null, this.hasLogger() && this.log("transport", "heartbeat timeout. Attempting to re-establish connection"), this.triggerChanError(), this.closeWasClean = !1, this.teardown(() => this.reconnectTimer.scheduleTimeout(),
|
|
2316
|
+
this.pendingHeartbeatRef && (this.pendingHeartbeatRef = null, this.hasLogger() && this.log("transport", "heartbeat timeout. Attempting to re-establish connection"), this.triggerChanError(), this.closeWasClean = !1, this.teardown(() => this.reconnectTimer.scheduleTimeout(), dn, "heartbeat timeout"));
|
|
2314
2317
|
}
|
|
2315
2318
|
resetHeartbeat() {
|
|
2316
2319
|
this.conn && this.conn.skipHeartbeat || (this.pendingHeartbeatRef = null, this.clearHeartbeats(), this.heartbeatTimer = setTimeout(() => this.sendHeartbeat(), this.heartbeatIntervalMs));
|
|
@@ -2385,7 +2388,7 @@ var st = (n) => typeof n == "function" ? n : function() {
|
|
|
2385
2388
|
this.stateChangeCallbacks[s] = this.stateChangeCallbacks[s].filter(([t]) => n.indexOf(t) === -1);
|
|
2386
2389
|
}
|
|
2387
2390
|
channel(n, s = {}) {
|
|
2388
|
-
let t = new
|
|
2391
|
+
let t = new vn(n, s, this);
|
|
2389
2392
|
return this.channels.push(t), t;
|
|
2390
2393
|
}
|
|
2391
2394
|
push(n) {
|
|
@@ -2424,9 +2427,9 @@ var st = (n) => typeof n == "function" ? n : function() {
|
|
|
2424
2427
|
s && (this.hasLogger() && this.log("transport", `leaving duplicate topic "${n}"`), s.leave());
|
|
2425
2428
|
}
|
|
2426
2429
|
};
|
|
2427
|
-
class
|
|
2430
|
+
class yn {
|
|
2428
2431
|
constructor(s) {
|
|
2429
|
-
this.connected = !1, this.config = s, this.socket = new
|
|
2432
|
+
this.connected = !1, this.config = s, this.socket = new gn(this.config.url, { logger: (t, e, i) => {
|
|
2430
2433
|
console.log(`${t}: ${e}`, i);
|
|
2431
2434
|
} }), this.channel = this.socket.channel(this.config.topic, this.config.params), this.eventTarget = new EventTarget();
|
|
2432
2435
|
}
|
|
@@ -2483,7 +2486,7 @@ class fn {
|
|
|
2483
2486
|
if (this.eventTarget.dispatchEvent(new CustomEvent("livestate-patch", {
|
|
2484
2487
|
detail: { patch: s, version: t }
|
|
2485
2488
|
})), t === this.stateVersion + 1) {
|
|
2486
|
-
const { doc: e, res: i } =
|
|
2489
|
+
const { doc: e, res: i } = ln(this.state, s, { mutate: !1 });
|
|
2487
2490
|
this.state = e, this.stateVersion = t, this.eventTarget.dispatchEvent(new CustomEvent("livestate-change", {
|
|
2488
2491
|
detail: {
|
|
2489
2492
|
state: this.state,
|
|
@@ -2506,29 +2509,29 @@ class fn {
|
|
|
2506
2509
|
this.dispatchEvent(s);
|
|
2507
2510
|
}
|
|
2508
2511
|
}
|
|
2509
|
-
const
|
|
2512
|
+
const mn = (n, s, { properties: t, attributes: e, events: i }) => {
|
|
2510
2513
|
var r, o;
|
|
2511
|
-
s.liveState !== n && (n.connect(), t == null || t.forEach((l) =>
|
|
2512
|
-
},
|
|
2514
|
+
s.liveState !== n && (n.connect(), t == null || t.forEach((l) => _n(n, s, l)), e == null || e.forEach((l) => wn(n, s, l)), (r = i == null ? void 0 : i.send) == null || r.forEach((l) => An(n, s, l)), (o = i == null ? void 0 : i.receive) == null || o.forEach((l) => bn(n, s, l)), s.liveState = n);
|
|
2515
|
+
}, _n = (n, s, t) => {
|
|
2513
2516
|
n.addEventListener("livestate-change", ({ detail: { state: e } }) => {
|
|
2514
2517
|
s[t] = e[t];
|
|
2515
2518
|
});
|
|
2516
|
-
},
|
|
2519
|
+
}, wn = (n, s, t) => {
|
|
2517
2520
|
n.addEventListener("livestate-change", ({ detail: { state: e } }) => {
|
|
2518
2521
|
s.setAttribute(t, e[t]);
|
|
2519
2522
|
});
|
|
2520
|
-
},
|
|
2523
|
+
}, bn = (n, s, t) => {
|
|
2521
2524
|
n.addEventListener(t, ({ detail: e }) => {
|
|
2522
2525
|
s.dispatchEvent(new CustomEvent(t, { detail: e }));
|
|
2523
2526
|
});
|
|
2524
|
-
},
|
|
2527
|
+
}, An = (n, s, t) => {
|
|
2525
2528
|
s.addEventListener(t, (e) => {
|
|
2526
2529
|
const { detail: i } = e;
|
|
2527
2530
|
n.dispatchEvent(new CustomEvent(t, { detail: i }));
|
|
2528
2531
|
});
|
|
2529
2532
|
};
|
|
2530
2533
|
Promise.resolve();
|
|
2531
|
-
var
|
|
2534
|
+
var de = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2532
2535
|
/*! *****************************************************************************
|
|
2533
2536
|
Copyright (C) Microsoft. All rights reserved.
|
|
2534
2537
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -2543,10 +2546,10 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
2543
2546
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
2544
2547
|
and limitations under the License.
|
|
2545
2548
|
***************************************************************************** */
|
|
2546
|
-
var
|
|
2549
|
+
var fe;
|
|
2547
2550
|
(function(n) {
|
|
2548
2551
|
(function(s) {
|
|
2549
|
-
var t = typeof
|
|
2552
|
+
var t = typeof de == "object" ? de : typeof self == "object" ? self : typeof this == "object" ? this : Function("return this;")(), e = i(n);
|
|
2550
2553
|
typeof t.Reflect > "u" ? t.Reflect = n : e = i(t.Reflect, e), s(e);
|
|
2551
2554
|
function i(r, o) {
|
|
2552
2555
|
return function(l, u) {
|
|
@@ -2557,11 +2560,11 @@ var de;
|
|
|
2557
2560
|
var t = Object.prototype.hasOwnProperty, e = typeof Symbol == "function", i = e && typeof Symbol.toPrimitive < "u" ? Symbol.toPrimitive : "@@toPrimitive", r = e && typeof Symbol.iterator < "u" ? Symbol.iterator : "@@iterator", o = typeof Object.create == "function", l = { __proto__: [] } instanceof Array, u = !o && !l, d = {
|
|
2558
2561
|
// create an object in dictionary mode (a.k.a. "slow" mode in v8)
|
|
2559
2562
|
create: o ? function() {
|
|
2560
|
-
return
|
|
2563
|
+
return Et(/* @__PURE__ */ Object.create(null));
|
|
2561
2564
|
} : l ? function() {
|
|
2562
|
-
return
|
|
2565
|
+
return Et({ __proto__: null });
|
|
2563
2566
|
} : function() {
|
|
2564
|
-
return
|
|
2567
|
+
return Et({});
|
|
2565
2568
|
},
|
|
2566
2569
|
has: u ? function(a, h) {
|
|
2567
2570
|
return t.call(a, h);
|
|
@@ -2573,80 +2576,80 @@ var de;
|
|
|
2573
2576
|
} : function(a, h) {
|
|
2574
2577
|
return a[h];
|
|
2575
2578
|
}
|
|
2576
|
-
},
|
|
2577
|
-
function
|
|
2579
|
+
}, _ = Object.getPrototypeOf(Function), w = typeof process == "object" && process.env && process.env.REFLECT_METADATA_USE_MAP_POLYFILL === "true", T = !w && typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : qe(), O = !w && typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : Xe(), wt = !w && typeof WeakMap == "function" ? WeakMap : Ke(), H = new wt();
|
|
2580
|
+
function Te(a, h, c, p) {
|
|
2578
2581
|
if (k(c)) {
|
|
2579
|
-
if (!
|
|
2582
|
+
if (!Kt(a))
|
|
2580
2583
|
throw new TypeError();
|
|
2581
|
-
if (!
|
|
2584
|
+
if (!Zt(h))
|
|
2582
2585
|
throw new TypeError();
|
|
2583
|
-
return
|
|
2586
|
+
return He(a, h);
|
|
2584
2587
|
} else {
|
|
2585
|
-
if (!
|
|
2588
|
+
if (!Kt(a))
|
|
2586
2589
|
throw new TypeError();
|
|
2587
|
-
if (!
|
|
2590
|
+
if (!x(h))
|
|
2588
2591
|
throw new TypeError();
|
|
2589
|
-
if (!
|
|
2592
|
+
if (!x(p) && !k(p) && !W(p))
|
|
2590
2593
|
throw new TypeError();
|
|
2591
|
-
return
|
|
2594
|
+
return W(p) && (p = void 0), c = L(c), Le(a, h, c, p);
|
|
2592
2595
|
}
|
|
2593
2596
|
}
|
|
2594
|
-
s("decorate",
|
|
2595
|
-
function
|
|
2597
|
+
s("decorate", Te);
|
|
2598
|
+
function ke(a, h) {
|
|
2596
2599
|
function c(p, f) {
|
|
2597
|
-
if (!
|
|
2600
|
+
if (!x(p))
|
|
2598
2601
|
throw new TypeError();
|
|
2599
|
-
if (!k(f) && !
|
|
2602
|
+
if (!k(f) && !ze(f))
|
|
2600
2603
|
throw new TypeError();
|
|
2601
|
-
|
|
2604
|
+
Gt(a, h, p, f);
|
|
2602
2605
|
}
|
|
2603
2606
|
return c;
|
|
2604
2607
|
}
|
|
2605
|
-
s("metadata",
|
|
2606
|
-
function
|
|
2607
|
-
if (!
|
|
2608
|
-
throw new TypeError();
|
|
2609
|
-
return k(p) || (p = L(p)), Wt(a, h, c, p);
|
|
2610
|
-
}
|
|
2611
|
-
s("defineMetadata", Te);
|
|
2612
|
-
function ke(a, h, c) {
|
|
2613
|
-
if (!S(h))
|
|
2614
|
-
throw new TypeError();
|
|
2615
|
-
return k(c) || (c = L(c)), Jt(a, h, c);
|
|
2616
|
-
}
|
|
2617
|
-
s("hasMetadata", ke);
|
|
2618
|
-
function xe(a, h, c) {
|
|
2619
|
-
if (!S(h))
|
|
2608
|
+
s("metadata", ke);
|
|
2609
|
+
function xe(a, h, c, p) {
|
|
2610
|
+
if (!x(c))
|
|
2620
2611
|
throw new TypeError();
|
|
2621
|
-
return k(
|
|
2612
|
+
return k(p) || (p = L(p)), Gt(a, h, c, p);
|
|
2622
2613
|
}
|
|
2623
|
-
s("
|
|
2614
|
+
s("defineMetadata", xe);
|
|
2624
2615
|
function Se(a, h, c) {
|
|
2625
|
-
if (!
|
|
2616
|
+
if (!x(h))
|
|
2626
2617
|
throw new TypeError();
|
|
2627
2618
|
return k(c) || (c = L(c)), zt(a, h, c);
|
|
2628
2619
|
}
|
|
2629
|
-
s("
|
|
2620
|
+
s("hasMetadata", Se);
|
|
2630
2621
|
function Oe(a, h, c) {
|
|
2631
|
-
if (!
|
|
2622
|
+
if (!x(h))
|
|
2623
|
+
throw new TypeError();
|
|
2624
|
+
return k(c) || (c = L(c)), bt(a, h, c);
|
|
2625
|
+
}
|
|
2626
|
+
s("hasOwnMetadata", Oe);
|
|
2627
|
+
function je(a, h, c) {
|
|
2628
|
+
if (!x(h))
|
|
2632
2629
|
throw new TypeError();
|
|
2633
2630
|
return k(c) || (c = L(c)), Bt(a, h, c);
|
|
2634
2631
|
}
|
|
2635
|
-
s("
|
|
2636
|
-
function
|
|
2637
|
-
if (!
|
|
2632
|
+
s("getMetadata", je);
|
|
2633
|
+
function Me(a, h, c) {
|
|
2634
|
+
if (!x(h))
|
|
2638
2635
|
throw new TypeError();
|
|
2639
|
-
return k(
|
|
2636
|
+
return k(c) || (c = L(c)), Wt(a, h, c);
|
|
2640
2637
|
}
|
|
2641
|
-
s("
|
|
2642
|
-
function
|
|
2643
|
-
if (!
|
|
2638
|
+
s("getOwnMetadata", Me);
|
|
2639
|
+
function Re(a, h) {
|
|
2640
|
+
if (!x(a))
|
|
2644
2641
|
throw new TypeError();
|
|
2645
2642
|
return k(h) || (h = L(h)), Ft(a, h);
|
|
2646
2643
|
}
|
|
2647
|
-
s("
|
|
2648
|
-
function
|
|
2649
|
-
if (!
|
|
2644
|
+
s("getMetadataKeys", Re);
|
|
2645
|
+
function Ne(a, h) {
|
|
2646
|
+
if (!x(a))
|
|
2647
|
+
throw new TypeError();
|
|
2648
|
+
return k(h) || (h = L(h)), qt(a, h);
|
|
2649
|
+
}
|
|
2650
|
+
s("getOwnMetadataKeys", Ne);
|
|
2651
|
+
function Pe(a, h, c) {
|
|
2652
|
+
if (!x(h))
|
|
2650
2653
|
throw new TypeError();
|
|
2651
2654
|
k(c) || (c = L(c));
|
|
2652
2655
|
var p = Z(
|
|
@@ -2662,25 +2665,25 @@ var de;
|
|
|
2662
2665
|
var f = H.get(h);
|
|
2663
2666
|
return f.delete(c), f.size > 0 || H.delete(h), !0;
|
|
2664
2667
|
}
|
|
2665
|
-
s("deleteMetadata",
|
|
2666
|
-
function
|
|
2668
|
+
s("deleteMetadata", Pe);
|
|
2669
|
+
function He(a, h) {
|
|
2667
2670
|
for (var c = a.length - 1; c >= 0; --c) {
|
|
2668
2671
|
var p = a[c], f = p(h);
|
|
2669
|
-
if (!k(f) && !
|
|
2670
|
-
if (!
|
|
2672
|
+
if (!k(f) && !W(f)) {
|
|
2673
|
+
if (!Zt(f))
|
|
2671
2674
|
throw new TypeError();
|
|
2672
2675
|
h = f;
|
|
2673
2676
|
}
|
|
2674
2677
|
}
|
|
2675
2678
|
return h;
|
|
2676
2679
|
}
|
|
2677
|
-
function
|
|
2680
|
+
function Le(a, h, c, p) {
|
|
2678
2681
|
for (var f = a.length - 1; f >= 0; --f) {
|
|
2679
|
-
var j = a[f],
|
|
2680
|
-
if (!k(
|
|
2681
|
-
if (!
|
|
2682
|
+
var j = a[f], y = j(h, c, p);
|
|
2683
|
+
if (!k(y) && !W(y)) {
|
|
2684
|
+
if (!x(y))
|
|
2682
2685
|
throw new TypeError();
|
|
2683
|
-
p =
|
|
2686
|
+
p = y;
|
|
2684
2687
|
}
|
|
2685
2688
|
}
|
|
2686
2689
|
return p;
|
|
@@ -2690,41 +2693,41 @@ var de;
|
|
|
2690
2693
|
if (k(p)) {
|
|
2691
2694
|
if (!c)
|
|
2692
2695
|
return;
|
|
2693
|
-
p = new
|
|
2696
|
+
p = new T(), H.set(a, p);
|
|
2694
2697
|
}
|
|
2695
2698
|
var f = p.get(h);
|
|
2696
2699
|
if (k(f)) {
|
|
2697
2700
|
if (!c)
|
|
2698
2701
|
return;
|
|
2699
|
-
f = new
|
|
2702
|
+
f = new T(), p.set(h, f);
|
|
2700
2703
|
}
|
|
2701
2704
|
return f;
|
|
2702
2705
|
}
|
|
2703
|
-
function
|
|
2704
|
-
var p =
|
|
2706
|
+
function zt(a, h, c) {
|
|
2707
|
+
var p = bt(a, h, c);
|
|
2705
2708
|
if (p)
|
|
2706
2709
|
return !0;
|
|
2707
|
-
var f =
|
|
2708
|
-
return
|
|
2710
|
+
var f = At(h);
|
|
2711
|
+
return W(f) ? !1 : zt(a, f, c);
|
|
2709
2712
|
}
|
|
2710
|
-
function
|
|
2713
|
+
function bt(a, h, c) {
|
|
2711
2714
|
var p = Z(
|
|
2712
2715
|
h,
|
|
2713
2716
|
c,
|
|
2714
2717
|
/*Create*/
|
|
2715
2718
|
!1
|
|
2716
2719
|
);
|
|
2717
|
-
return k(p) ? !1 :
|
|
2720
|
+
return k(p) ? !1 : Ve(p.has(a));
|
|
2718
2721
|
}
|
|
2719
|
-
function
|
|
2720
|
-
var p =
|
|
2722
|
+
function Bt(a, h, c) {
|
|
2723
|
+
var p = bt(a, h, c);
|
|
2721
2724
|
if (p)
|
|
2722
|
-
return
|
|
2723
|
-
var f =
|
|
2724
|
-
if (!
|
|
2725
|
-
return
|
|
2725
|
+
return Wt(a, h, c);
|
|
2726
|
+
var f = At(h);
|
|
2727
|
+
if (!W(f))
|
|
2728
|
+
return Bt(a, f, c);
|
|
2726
2729
|
}
|
|
2727
|
-
function
|
|
2730
|
+
function Wt(a, h, c) {
|
|
2728
2731
|
var p = Z(
|
|
2729
2732
|
h,
|
|
2730
2733
|
c,
|
|
@@ -2734,7 +2737,7 @@ var de;
|
|
|
2734
2737
|
if (!k(p))
|
|
2735
2738
|
return p.get(a);
|
|
2736
2739
|
}
|
|
2737
|
-
function
|
|
2740
|
+
function Gt(a, h, c, p) {
|
|
2738
2741
|
var f = Z(
|
|
2739
2742
|
c,
|
|
2740
2743
|
p,
|
|
@@ -2743,26 +2746,26 @@ var de;
|
|
|
2743
2746
|
);
|
|
2744
2747
|
f.set(a, h);
|
|
2745
2748
|
}
|
|
2746
|
-
function
|
|
2747
|
-
var c =
|
|
2749
|
+
function Ft(a, h) {
|
|
2750
|
+
var c = qt(a, h), p = At(a);
|
|
2748
2751
|
if (p === null)
|
|
2749
2752
|
return c;
|
|
2750
|
-
var f =
|
|
2753
|
+
var f = Ft(p, h);
|
|
2751
2754
|
if (f.length <= 0)
|
|
2752
2755
|
return c;
|
|
2753
2756
|
if (c.length <= 0)
|
|
2754
2757
|
return f;
|
|
2755
|
-
for (var j = new
|
|
2756
|
-
var A = v[
|
|
2757
|
-
E || (j.add(A),
|
|
2758
|
+
for (var j = new O(), y = [], m = 0, v = c; m < v.length; m++) {
|
|
2759
|
+
var A = v[m], E = j.has(A);
|
|
2760
|
+
E || (j.add(A), y.push(A));
|
|
2758
2761
|
}
|
|
2759
|
-
for (var D = 0,
|
|
2760
|
-
var A =
|
|
2761
|
-
E || (j.add(A),
|
|
2762
|
+
for (var D = 0, Qt = f; D < Qt.length; D++) {
|
|
2763
|
+
var A = Qt[D], E = j.has(A);
|
|
2764
|
+
E || (j.add(A), y.push(A));
|
|
2762
2765
|
}
|
|
2763
|
-
return
|
|
2766
|
+
return y;
|
|
2764
2767
|
}
|
|
2765
|
-
function
|
|
2768
|
+
function qt(a, h) {
|
|
2766
2769
|
var c = [], p = Z(
|
|
2767
2770
|
a,
|
|
2768
2771
|
h,
|
|
@@ -2771,24 +2774,24 @@ var de;
|
|
|
2771
2774
|
);
|
|
2772
2775
|
if (k(p))
|
|
2773
2776
|
return c;
|
|
2774
|
-
for (var f = p.keys(), j =
|
|
2775
|
-
var
|
|
2776
|
-
if (!
|
|
2777
|
-
return c.length =
|
|
2778
|
-
var v =
|
|
2777
|
+
for (var f = p.keys(), j = Be(f), y = 0; ; ) {
|
|
2778
|
+
var m = Ge(j);
|
|
2779
|
+
if (!m)
|
|
2780
|
+
return c.length = y, c;
|
|
2781
|
+
var v = We(m);
|
|
2779
2782
|
try {
|
|
2780
|
-
c[
|
|
2783
|
+
c[y] = v;
|
|
2781
2784
|
} catch (A) {
|
|
2782
2785
|
try {
|
|
2783
|
-
|
|
2786
|
+
Fe(j);
|
|
2784
2787
|
} finally {
|
|
2785
2788
|
throw A;
|
|
2786
2789
|
}
|
|
2787
2790
|
}
|
|
2788
|
-
|
|
2791
|
+
y++;
|
|
2789
2792
|
}
|
|
2790
2793
|
}
|
|
2791
|
-
function
|
|
2794
|
+
function Xt(a) {
|
|
2792
2795
|
if (a === null)
|
|
2793
2796
|
return 1;
|
|
2794
2797
|
switch (typeof a) {
|
|
@@ -2811,17 +2814,17 @@ var de;
|
|
|
2811
2814
|
function k(a) {
|
|
2812
2815
|
return a === void 0;
|
|
2813
2816
|
}
|
|
2814
|
-
function
|
|
2817
|
+
function W(a) {
|
|
2815
2818
|
return a === null;
|
|
2816
2819
|
}
|
|
2817
|
-
function
|
|
2820
|
+
function Ue(a) {
|
|
2818
2821
|
return typeof a == "symbol";
|
|
2819
2822
|
}
|
|
2820
|
-
function
|
|
2823
|
+
function x(a) {
|
|
2821
2824
|
return typeof a == "object" ? a !== null : typeof a == "function";
|
|
2822
2825
|
}
|
|
2823
|
-
function
|
|
2824
|
-
switch (
|
|
2826
|
+
function De(a, h) {
|
|
2827
|
+
switch (Xt(a)) {
|
|
2825
2828
|
case 0:
|
|
2826
2829
|
return a;
|
|
2827
2830
|
case 1:
|
|
@@ -2838,67 +2841,67 @@ var de;
|
|
|
2838
2841
|
var c = h === 3 ? "string" : h === 5 ? "number" : "default", p = Yt(a, i);
|
|
2839
2842
|
if (p !== void 0) {
|
|
2840
2843
|
var f = p.call(a, c);
|
|
2841
|
-
if (
|
|
2844
|
+
if (x(f))
|
|
2842
2845
|
throw new TypeError();
|
|
2843
2846
|
return f;
|
|
2844
2847
|
}
|
|
2845
|
-
return
|
|
2848
|
+
return Ie(a, c === "default" ? "number" : c);
|
|
2846
2849
|
}
|
|
2847
|
-
function
|
|
2850
|
+
function Ie(a, h) {
|
|
2848
2851
|
if (h === "string") {
|
|
2849
2852
|
var c = a.toString;
|
|
2850
|
-
if (
|
|
2853
|
+
if (G(c)) {
|
|
2851
2854
|
var p = c.call(a);
|
|
2852
|
-
if (!
|
|
2855
|
+
if (!x(p))
|
|
2853
2856
|
return p;
|
|
2854
2857
|
}
|
|
2855
2858
|
var f = a.valueOf;
|
|
2856
|
-
if (
|
|
2859
|
+
if (G(f)) {
|
|
2857
2860
|
var p = f.call(a);
|
|
2858
|
-
if (!
|
|
2861
|
+
if (!x(p))
|
|
2859
2862
|
return p;
|
|
2860
2863
|
}
|
|
2861
2864
|
} else {
|
|
2862
2865
|
var f = a.valueOf;
|
|
2863
|
-
if (
|
|
2866
|
+
if (G(f)) {
|
|
2864
2867
|
var p = f.call(a);
|
|
2865
|
-
if (!
|
|
2868
|
+
if (!x(p))
|
|
2866
2869
|
return p;
|
|
2867
2870
|
}
|
|
2868
2871
|
var j = a.toString;
|
|
2869
|
-
if (
|
|
2872
|
+
if (G(j)) {
|
|
2870
2873
|
var p = j.call(a);
|
|
2871
|
-
if (!
|
|
2874
|
+
if (!x(p))
|
|
2872
2875
|
return p;
|
|
2873
2876
|
}
|
|
2874
2877
|
}
|
|
2875
2878
|
throw new TypeError();
|
|
2876
2879
|
}
|
|
2877
|
-
function
|
|
2880
|
+
function Ve(a) {
|
|
2878
2881
|
return !!a;
|
|
2879
2882
|
}
|
|
2880
|
-
function
|
|
2883
|
+
function Je(a) {
|
|
2881
2884
|
return "" + a;
|
|
2882
2885
|
}
|
|
2883
2886
|
function L(a) {
|
|
2884
|
-
var h =
|
|
2887
|
+
var h = De(
|
|
2885
2888
|
a,
|
|
2886
2889
|
3
|
|
2887
2890
|
/* String */
|
|
2888
2891
|
);
|
|
2889
|
-
return
|
|
2892
|
+
return Ue(h) ? h : Je(h);
|
|
2890
2893
|
}
|
|
2891
|
-
function
|
|
2894
|
+
function Kt(a) {
|
|
2892
2895
|
return Array.isArray ? Array.isArray(a) : a instanceof Object ? a instanceof Array : Object.prototype.toString.call(a) === "[object Array]";
|
|
2893
2896
|
}
|
|
2894
|
-
function
|
|
2897
|
+
function G(a) {
|
|
2895
2898
|
return typeof a == "function";
|
|
2896
2899
|
}
|
|
2897
|
-
function
|
|
2900
|
+
function Zt(a) {
|
|
2898
2901
|
return typeof a == "function";
|
|
2899
2902
|
}
|
|
2900
|
-
function
|
|
2901
|
-
switch (
|
|
2903
|
+
function ze(a) {
|
|
2904
|
+
switch (Xt(a)) {
|
|
2902
2905
|
case 3:
|
|
2903
2906
|
return !0;
|
|
2904
2907
|
case 4:
|
|
@@ -2910,34 +2913,34 @@ var de;
|
|
|
2910
2913
|
function Yt(a, h) {
|
|
2911
2914
|
var c = a[h];
|
|
2912
2915
|
if (c != null) {
|
|
2913
|
-
if (!
|
|
2916
|
+
if (!G(c))
|
|
2914
2917
|
throw new TypeError();
|
|
2915
2918
|
return c;
|
|
2916
2919
|
}
|
|
2917
2920
|
}
|
|
2918
|
-
function
|
|
2921
|
+
function Be(a) {
|
|
2919
2922
|
var h = Yt(a, r);
|
|
2920
|
-
if (!
|
|
2923
|
+
if (!G(h))
|
|
2921
2924
|
throw new TypeError();
|
|
2922
2925
|
var c = h.call(a);
|
|
2923
|
-
if (!
|
|
2926
|
+
if (!x(c))
|
|
2924
2927
|
throw new TypeError();
|
|
2925
2928
|
return c;
|
|
2926
2929
|
}
|
|
2927
|
-
function
|
|
2930
|
+
function We(a) {
|
|
2928
2931
|
return a.value;
|
|
2929
2932
|
}
|
|
2930
|
-
function
|
|
2933
|
+
function Ge(a) {
|
|
2931
2934
|
var h = a.next();
|
|
2932
2935
|
return h.done ? !1 : h;
|
|
2933
2936
|
}
|
|
2934
|
-
function
|
|
2937
|
+
function Fe(a) {
|
|
2935
2938
|
var h = a.return;
|
|
2936
2939
|
h && h.call(a);
|
|
2937
2940
|
}
|
|
2938
|
-
function
|
|
2941
|
+
function At(a) {
|
|
2939
2942
|
var h = Object.getPrototypeOf(a);
|
|
2940
|
-
if (typeof a != "function" || a ===
|
|
2943
|
+
if (typeof a != "function" || a === _ || h !== _)
|
|
2941
2944
|
return h;
|
|
2942
2945
|
var c = a.prototype, p = c && Object.getPrototypeOf(c);
|
|
2943
2946
|
if (p == null || p === Object.prototype)
|
|
@@ -2945,108 +2948,108 @@ var de;
|
|
|
2945
2948
|
var f = p.constructor;
|
|
2946
2949
|
return typeof f != "function" || f === a ? h : f;
|
|
2947
2950
|
}
|
|
2948
|
-
function
|
|
2951
|
+
function qe() {
|
|
2949
2952
|
var a = {}, h = [], c = (
|
|
2950
2953
|
/** @class */
|
|
2951
2954
|
function() {
|
|
2952
|
-
function m
|
|
2953
|
-
this._index = 0, this._keys =
|
|
2955
|
+
function y(m, v, A) {
|
|
2956
|
+
this._index = 0, this._keys = m, this._values = v, this._selector = A;
|
|
2954
2957
|
}
|
|
2955
|
-
return
|
|
2958
|
+
return y.prototype["@@iterator"] = function() {
|
|
2956
2959
|
return this;
|
|
2957
|
-
},
|
|
2960
|
+
}, y.prototype[r] = function() {
|
|
2958
2961
|
return this;
|
|
2959
|
-
},
|
|
2960
|
-
var
|
|
2961
|
-
if (
|
|
2962
|
-
var v = this._selector(this._keys[
|
|
2963
|
-
return
|
|
2962
|
+
}, y.prototype.next = function() {
|
|
2963
|
+
var m = this._index;
|
|
2964
|
+
if (m >= 0 && m < this._keys.length) {
|
|
2965
|
+
var v = this._selector(this._keys[m], this._values[m]);
|
|
2966
|
+
return m + 1 >= this._keys.length ? (this._index = -1, this._keys = h, this._values = h) : this._index++, { value: v, done: !1 };
|
|
2964
2967
|
}
|
|
2965
2968
|
return { value: void 0, done: !0 };
|
|
2966
|
-
},
|
|
2967
|
-
throw this._index >= 0 && (this._index = -1, this._keys = h, this._values = h),
|
|
2968
|
-
},
|
|
2969
|
-
return this._index >= 0 && (this._index = -1, this._keys = h, this._values = h), { value:
|
|
2970
|
-
},
|
|
2969
|
+
}, y.prototype.throw = function(m) {
|
|
2970
|
+
throw this._index >= 0 && (this._index = -1, this._keys = h, this._values = h), m;
|
|
2971
|
+
}, y.prototype.return = function(m) {
|
|
2972
|
+
return this._index >= 0 && (this._index = -1, this._keys = h, this._values = h), { value: m, done: !0 };
|
|
2973
|
+
}, y;
|
|
2971
2974
|
}()
|
|
2972
2975
|
);
|
|
2973
2976
|
return (
|
|
2974
2977
|
/** @class */
|
|
2975
2978
|
function() {
|
|
2976
|
-
function
|
|
2979
|
+
function y() {
|
|
2977
2980
|
this._keys = [], this._values = [], this._cacheKey = a, this._cacheIndex = -2;
|
|
2978
2981
|
}
|
|
2979
|
-
return Object.defineProperty(
|
|
2982
|
+
return Object.defineProperty(y.prototype, "size", {
|
|
2980
2983
|
get: function() {
|
|
2981
2984
|
return this._keys.length;
|
|
2982
2985
|
},
|
|
2983
2986
|
enumerable: !0,
|
|
2984
2987
|
configurable: !0
|
|
2985
|
-
}),
|
|
2988
|
+
}), y.prototype.has = function(m) {
|
|
2986
2989
|
return this._find(
|
|
2987
|
-
|
|
2990
|
+
m,
|
|
2988
2991
|
/*insert*/
|
|
2989
2992
|
!1
|
|
2990
2993
|
) >= 0;
|
|
2991
|
-
},
|
|
2994
|
+
}, y.prototype.get = function(m) {
|
|
2992
2995
|
var v = this._find(
|
|
2993
|
-
|
|
2996
|
+
m,
|
|
2994
2997
|
/*insert*/
|
|
2995
2998
|
!1
|
|
2996
2999
|
);
|
|
2997
3000
|
return v >= 0 ? this._values[v] : void 0;
|
|
2998
|
-
},
|
|
3001
|
+
}, y.prototype.set = function(m, v) {
|
|
2999
3002
|
var A = this._find(
|
|
3000
|
-
|
|
3003
|
+
m,
|
|
3001
3004
|
/*insert*/
|
|
3002
3005
|
!0
|
|
3003
3006
|
);
|
|
3004
3007
|
return this._values[A] = v, this;
|
|
3005
|
-
},
|
|
3008
|
+
}, y.prototype.delete = function(m) {
|
|
3006
3009
|
var v = this._find(
|
|
3007
|
-
|
|
3010
|
+
m,
|
|
3008
3011
|
/*insert*/
|
|
3009
3012
|
!1
|
|
3010
3013
|
);
|
|
3011
3014
|
if (v >= 0) {
|
|
3012
3015
|
for (var A = this._keys.length, E = v + 1; E < A; E++)
|
|
3013
3016
|
this._keys[E - 1] = this._keys[E], this._values[E - 1] = this._values[E];
|
|
3014
|
-
return this._keys.length--, this._values.length--,
|
|
3017
|
+
return this._keys.length--, this._values.length--, m === this._cacheKey && (this._cacheKey = a, this._cacheIndex = -2), !0;
|
|
3015
3018
|
}
|
|
3016
3019
|
return !1;
|
|
3017
|
-
},
|
|
3020
|
+
}, y.prototype.clear = function() {
|
|
3018
3021
|
this._keys.length = 0, this._values.length = 0, this._cacheKey = a, this._cacheIndex = -2;
|
|
3019
|
-
},
|
|
3022
|
+
}, y.prototype.keys = function() {
|
|
3020
3023
|
return new c(this._keys, this._values, p);
|
|
3021
|
-
},
|
|
3024
|
+
}, y.prototype.values = function() {
|
|
3022
3025
|
return new c(this._keys, this._values, f);
|
|
3023
|
-
},
|
|
3026
|
+
}, y.prototype.entries = function() {
|
|
3024
3027
|
return new c(this._keys, this._values, j);
|
|
3025
|
-
},
|
|
3028
|
+
}, y.prototype["@@iterator"] = function() {
|
|
3026
3029
|
return this.entries();
|
|
3027
|
-
},
|
|
3030
|
+
}, y.prototype[r] = function() {
|
|
3028
3031
|
return this.entries();
|
|
3029
|
-
},
|
|
3030
|
-
return this._cacheKey !==
|
|
3031
|
-
},
|
|
3032
|
+
}, y.prototype._find = function(m, v) {
|
|
3033
|
+
return this._cacheKey !== m && (this._cacheIndex = this._keys.indexOf(this._cacheKey = m)), this._cacheIndex < 0 && v && (this._cacheIndex = this._keys.length, this._keys.push(m), this._values.push(void 0)), this._cacheIndex;
|
|
3034
|
+
}, y;
|
|
3032
3035
|
}()
|
|
3033
3036
|
);
|
|
3034
|
-
function p(
|
|
3035
|
-
return
|
|
3037
|
+
function p(y, m) {
|
|
3038
|
+
return y;
|
|
3036
3039
|
}
|
|
3037
|
-
function f(
|
|
3038
|
-
return
|
|
3040
|
+
function f(y, m) {
|
|
3041
|
+
return m;
|
|
3039
3042
|
}
|
|
3040
|
-
function j(
|
|
3041
|
-
return [
|
|
3043
|
+
function j(y, m) {
|
|
3044
|
+
return [y, m];
|
|
3042
3045
|
}
|
|
3043
3046
|
}
|
|
3044
|
-
function
|
|
3047
|
+
function Xe() {
|
|
3045
3048
|
return (
|
|
3046
3049
|
/** @class */
|
|
3047
3050
|
function() {
|
|
3048
3051
|
function a() {
|
|
3049
|
-
this._map = new
|
|
3052
|
+
this._map = new T();
|
|
3050
3053
|
}
|
|
3051
3054
|
return Object.defineProperty(a.prototype, "size", {
|
|
3052
3055
|
get: function() {
|
|
@@ -3076,7 +3079,7 @@ var de;
|
|
|
3076
3079
|
}()
|
|
3077
3080
|
);
|
|
3078
3081
|
}
|
|
3079
|
-
function
|
|
3082
|
+
function Ke() {
|
|
3080
3083
|
var a = 16, h = d.create(), c = p();
|
|
3081
3084
|
return (
|
|
3082
3085
|
/** @class */
|
|
@@ -3120,7 +3123,7 @@ var de;
|
|
|
3120
3123
|
function p() {
|
|
3121
3124
|
var v;
|
|
3122
3125
|
do
|
|
3123
|
-
v = "@@WeakMap@@" +
|
|
3126
|
+
v = "@@WeakMap@@" + m();
|
|
3124
3127
|
while (d.has(h, v));
|
|
3125
3128
|
return h[v] = !0, v;
|
|
3126
3129
|
}
|
|
@@ -3137,11 +3140,11 @@ var de;
|
|
|
3137
3140
|
v[E] = Math.random() * 255 | 0;
|
|
3138
3141
|
return v;
|
|
3139
3142
|
}
|
|
3140
|
-
function
|
|
3143
|
+
function y(v) {
|
|
3141
3144
|
return typeof Uint8Array == "function" ? typeof crypto < "u" ? crypto.getRandomValues(new Uint8Array(v)) : typeof msCrypto < "u" ? msCrypto.getRandomValues(new Uint8Array(v)) : j(new Uint8Array(v), v) : j(new Array(v), v);
|
|
3142
3145
|
}
|
|
3143
|
-
function
|
|
3144
|
-
var v =
|
|
3146
|
+
function m() {
|
|
3147
|
+
var v = y(a);
|
|
3145
3148
|
v[6] = v[6] & 79 | 64, v[8] = v[8] & 191 | 128;
|
|
3146
3149
|
for (var A = "", E = 0; E < a; ++E) {
|
|
3147
3150
|
var D = v[E];
|
|
@@ -3150,19 +3153,19 @@ var de;
|
|
|
3150
3153
|
return A;
|
|
3151
3154
|
}
|
|
3152
3155
|
}
|
|
3153
|
-
function
|
|
3156
|
+
function Et(a) {
|
|
3154
3157
|
return a.__ = void 0, delete a.__, a;
|
|
3155
3158
|
}
|
|
3156
3159
|
});
|
|
3157
|
-
})(
|
|
3158
|
-
var
|
|
3159
|
-
for (var i = e > 1 ? void 0 : e ?
|
|
3160
|
+
})(fe || (fe = {}));
|
|
3161
|
+
var En = Object.defineProperty, $n = Object.getOwnPropertyDescriptor, lt = (n, s, t, e) => {
|
|
3162
|
+
for (var i = e > 1 ? void 0 : e ? $n(s, t) : s, r = n.length - 1, o; r >= 0; r--)
|
|
3160
3163
|
(o = n[r]) && (i = (e ? o(s, t, i) : o(i)) || i);
|
|
3161
|
-
return e && i &&
|
|
3164
|
+
return e && i && En(s, t, i), i;
|
|
3162
3165
|
};
|
|
3163
|
-
let B = class extends
|
|
3166
|
+
let B = class extends tt {
|
|
3164
3167
|
constructor() {
|
|
3165
|
-
super(...arguments), this.users = {}, this._throttledDispatchMouseMove =
|
|
3168
|
+
super(...arguments), this.users = {}, this._throttledDispatchMouseMove = Cn(
|
|
3166
3169
|
this._dispatchMouseMove.bind(this),
|
|
3167
3170
|
// 15 // 15ms throttle interval = ~66.6 fps
|
|
3168
3171
|
// 10 // 10ms throttle interval = 100 fps
|
|
@@ -3172,12 +3175,12 @@ let B = class extends et {
|
|
|
3172
3175
|
}
|
|
3173
3176
|
render() {
|
|
3174
3177
|
var n, s;
|
|
3175
|
-
return
|
|
3178
|
+
return le`
|
|
3176
3179
|
<div id="users-container">
|
|
3177
3180
|
${Object.values(this.users).map(
|
|
3178
3181
|
(t) => {
|
|
3179
3182
|
var e;
|
|
3180
|
-
return
|
|
3183
|
+
return le`
|
|
3181
3184
|
<div
|
|
3182
3185
|
id="user-${t.id}"
|
|
3183
3186
|
class="user"
|
|
@@ -3235,7 +3238,7 @@ let B = class extends et {
|
|
|
3235
3238
|
}
|
|
3236
3239
|
connectedCallback() {
|
|
3237
3240
|
super.connectedCallback();
|
|
3238
|
-
const n = new
|
|
3241
|
+
const n = new yn({
|
|
3239
3242
|
url: this.url,
|
|
3240
3243
|
topic: `liveroom-livestate:${this.room_id}`,
|
|
3241
3244
|
params: {
|
|
@@ -3245,7 +3248,7 @@ let B = class extends et {
|
|
|
3245
3248
|
inner_height: window.innerHeight
|
|
3246
3249
|
}
|
|
3247
3250
|
});
|
|
3248
|
-
|
|
3251
|
+
mn(n, this, {
|
|
3249
3252
|
properties: ["room_id", "me", "users"],
|
|
3250
3253
|
events: {
|
|
3251
3254
|
send: [
|
|
@@ -3295,7 +3298,7 @@ let B = class extends et {
|
|
|
3295
3298
|
);
|
|
3296
3299
|
}
|
|
3297
3300
|
_dispatchKeyDown(n) {
|
|
3298
|
-
!n.repeat &&
|
|
3301
|
+
!n.repeat && ve.includes(n.key) && this.me && this.dispatchEvent(
|
|
3299
3302
|
new CustomEvent("key_down", {
|
|
3300
3303
|
detail: {
|
|
3301
3304
|
key: n.key,
|
|
@@ -3305,7 +3308,7 @@ let B = class extends et {
|
|
|
3305
3308
|
);
|
|
3306
3309
|
}
|
|
3307
3310
|
_dispatchKeyUp(n) {
|
|
3308
|
-
|
|
3311
|
+
ve.includes(n.key) && this.me && this.dispatchEvent(
|
|
3309
3312
|
new CustomEvent("key_up", {
|
|
3310
3313
|
detail: {
|
|
3311
3314
|
key: n.key,
|
|
@@ -3326,7 +3329,14 @@ let B = class extends et {
|
|
|
3326
3329
|
);
|
|
3327
3330
|
}
|
|
3328
3331
|
};
|
|
3329
|
-
B.styles =
|
|
3332
|
+
B.styles = ts`
|
|
3333
|
+
#users-container {
|
|
3334
|
+
position: absolute;
|
|
3335
|
+
inset: 0;
|
|
3336
|
+
overflow: hidden;
|
|
3337
|
+
pointer-events: none;
|
|
3338
|
+
}
|
|
3339
|
+
|
|
3330
3340
|
.user {
|
|
3331
3341
|
z-index: 1000;
|
|
3332
3342
|
position: absolute;
|
|
@@ -3389,6 +3399,7 @@ B.styles = Ze`
|
|
|
3389
3399
|
}
|
|
3390
3400
|
|
|
3391
3401
|
.banner {
|
|
3402
|
+
z-index: 1000;
|
|
3392
3403
|
position: fixed;
|
|
3393
3404
|
bottom: 12px;
|
|
3394
3405
|
inset-inline: 0;
|
|
@@ -3405,6 +3416,9 @@ B.styles = Ze`
|
|
|
3405
3416
|
padding: 3px 8px;
|
|
3406
3417
|
background-color: white;
|
|
3407
3418
|
border-radius: 9999px;
|
|
3419
|
+
-webkit-user-select: none;
|
|
3420
|
+
-moz-user-select: none;
|
|
3421
|
+
user-select: none;
|
|
3408
3422
|
}
|
|
3409
3423
|
|
|
3410
3424
|
.banner .pills .current_user {
|
|
@@ -3443,23 +3457,23 @@ B.styles = Ze`
|
|
|
3443
3457
|
opacity: 0.8;
|
|
3444
3458
|
}
|
|
3445
3459
|
`;
|
|
3446
|
-
|
|
3447
|
-
|
|
3460
|
+
lt([
|
|
3461
|
+
It({ attribute: "url" })
|
|
3448
3462
|
], B.prototype, "url", 2);
|
|
3449
|
-
|
|
3450
|
-
|
|
3463
|
+
lt([
|
|
3464
|
+
It({ attribute: "room_id" })
|
|
3451
3465
|
], B.prototype, "room_id", 2);
|
|
3452
|
-
|
|
3453
|
-
|
|
3466
|
+
lt([
|
|
3467
|
+
Ae()
|
|
3454
3468
|
], B.prototype, "me", 2);
|
|
3455
|
-
|
|
3456
|
-
|
|
3469
|
+
lt([
|
|
3470
|
+
Ae()
|
|
3457
3471
|
], B.prototype, "users", 2);
|
|
3458
|
-
B =
|
|
3459
|
-
|
|
3472
|
+
B = lt([
|
|
3473
|
+
fs("liveroom-client-element")
|
|
3460
3474
|
], B);
|
|
3461
|
-
const
|
|
3462
|
-
function
|
|
3475
|
+
const ve = ["Escape"];
|
|
3476
|
+
function Cn(n, s) {
|
|
3463
3477
|
let t = 0;
|
|
3464
3478
|
return function(...e) {
|
|
3465
3479
|
let i = Date.now();
|