liveroom-client-element 0.0.23 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/liveroom-client-element.cjs +6 -3
- package/dist/liveroom-client-element.js +755 -738
- package/dist/main.cjs +1 -1
- package/dist/main.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var Me = (s, n, t) => n in s ?
|
|
3
|
-
var
|
|
4
|
-
function
|
|
1
|
+
var xe = Object.defineProperty;
|
|
2
|
+
var Me = (s, n, t) => n in s ? xe(s, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[n] = t;
|
|
3
|
+
var g = (s, n, t) => (Me(s, typeof n != "symbol" ? n + "" : n, t), t);
|
|
4
|
+
function vt() {
|
|
5
5
|
}
|
|
6
6
|
function ce(s) {
|
|
7
7
|
return s();
|
|
@@ -9,7 +9,7 @@ function ce(s) {
|
|
|
9
9
|
function Zt() {
|
|
10
10
|
return /* @__PURE__ */ Object.create(null);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function wt(s) {
|
|
13
13
|
s.forEach(ce);
|
|
14
14
|
}
|
|
15
15
|
function le(s) {
|
|
@@ -25,13 +25,13 @@ function W(s, n) {
|
|
|
25
25
|
s.appendChild(n);
|
|
26
26
|
}
|
|
27
27
|
function Re(s, n, t) {
|
|
28
|
-
const e =
|
|
28
|
+
const e = Pe(s);
|
|
29
29
|
if (!e.getElementById(n)) {
|
|
30
|
-
const r =
|
|
31
|
-
r.id = n, r.textContent = t,
|
|
30
|
+
const r = st("style");
|
|
31
|
+
r.id = n, r.textContent = t, He(e, r);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function Pe(s) {
|
|
35
35
|
if (!s)
|
|
36
36
|
return document;
|
|
37
37
|
const n = s.getRootNode ? s.getRootNode() : s.ownerDocument;
|
|
@@ -41,20 +41,20 @@ function He(s) {
|
|
|
41
41
|
n
|
|
42
42
|
) : s.ownerDocument;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function He(s, n) {
|
|
45
45
|
return W(
|
|
46
46
|
/** @type {Document} */
|
|
47
47
|
s.head || s,
|
|
48
48
|
n
|
|
49
49
|
), n.sheet;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function St(s, n, t) {
|
|
52
52
|
s.insertBefore(n, t || null);
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function _t(s) {
|
|
55
55
|
s.parentNode && s.parentNode.removeChild(s);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function st(s) {
|
|
58
58
|
return document.createElement(s);
|
|
59
59
|
}
|
|
60
60
|
function Qt(s) {
|
|
@@ -63,23 +63,23 @@ function Qt(s) {
|
|
|
63
63
|
function ue(s) {
|
|
64
64
|
return document.createTextNode(s);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function Nt() {
|
|
67
67
|
return ue(" ");
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function x(s, n, t) {
|
|
70
70
|
t == null ? s.removeAttribute(n) : s.getAttribute(n) !== t && s.setAttribute(n, t);
|
|
71
71
|
}
|
|
72
72
|
function Ie(s) {
|
|
73
73
|
return Array.from(s.childNodes);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function Ue(s, n) {
|
|
76
76
|
n = "" + n, s.data !== n && (s.data = /** @type {string} */
|
|
77
77
|
n);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function ot(s, n, t, e) {
|
|
80
80
|
t == null ? s.style.removeProperty(n) : s.style.setProperty(n, t, e ? "important" : "");
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function De(s) {
|
|
83
83
|
const n = {};
|
|
84
84
|
return s.childNodes.forEach(
|
|
85
85
|
/** @param {Element} node */
|
|
@@ -88,14 +88,14 @@ function Ue(s) {
|
|
|
88
88
|
}
|
|
89
89
|
), n;
|
|
90
90
|
}
|
|
91
|
-
let
|
|
92
|
-
function
|
|
93
|
-
|
|
91
|
+
let yt;
|
|
92
|
+
function pt(s) {
|
|
93
|
+
yt = s;
|
|
94
94
|
}
|
|
95
95
|
function pe() {
|
|
96
|
-
if (!
|
|
96
|
+
if (!yt)
|
|
97
97
|
throw new Error("Function called outside component initialization");
|
|
98
|
-
return
|
|
98
|
+
return yt;
|
|
99
99
|
}
|
|
100
100
|
function Je(s) {
|
|
101
101
|
pe().$$.on_mount.push(s);
|
|
@@ -103,53 +103,53 @@ function Je(s) {
|
|
|
103
103
|
function Ve(s) {
|
|
104
104
|
pe().$$.on_destroy.push(s);
|
|
105
105
|
}
|
|
106
|
-
const
|
|
107
|
-
let
|
|
106
|
+
const ht = [], Kt = [];
|
|
107
|
+
let ct = [];
|
|
108
108
|
const te = [], Be = /* @__PURE__ */ Promise.resolve();
|
|
109
|
-
let
|
|
109
|
+
let Ht = !1;
|
|
110
110
|
function Fe() {
|
|
111
|
-
|
|
111
|
+
Ht || (Ht = !0, Be.then(ft));
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
|
|
113
|
+
function It(s) {
|
|
114
|
+
ct.push(s);
|
|
115
115
|
}
|
|
116
|
-
const
|
|
117
|
-
let
|
|
118
|
-
function
|
|
119
|
-
if (
|
|
116
|
+
const Rt = /* @__PURE__ */ new Set();
|
|
117
|
+
let at = 0;
|
|
118
|
+
function ft() {
|
|
119
|
+
if (at !== 0)
|
|
120
120
|
return;
|
|
121
|
-
const s =
|
|
121
|
+
const s = yt;
|
|
122
122
|
do {
|
|
123
123
|
try {
|
|
124
|
-
for (;
|
|
125
|
-
const n =
|
|
126
|
-
|
|
124
|
+
for (; at < ht.length; ) {
|
|
125
|
+
const n = ht[at];
|
|
126
|
+
at++, pt(n), ze(n.$$);
|
|
127
127
|
}
|
|
128
128
|
} catch (n) {
|
|
129
|
-
throw
|
|
129
|
+
throw ht.length = 0, at = 0, n;
|
|
130
130
|
}
|
|
131
|
-
for (
|
|
131
|
+
for (pt(null), ht.length = 0, at = 0; Kt.length; )
|
|
132
132
|
Kt.pop()();
|
|
133
|
-
for (let n = 0; n <
|
|
134
|
-
const t =
|
|
135
|
-
|
|
133
|
+
for (let n = 0; n < ct.length; n += 1) {
|
|
134
|
+
const t = ct[n];
|
|
135
|
+
Rt.has(t) || (Rt.add(t), t());
|
|
136
136
|
}
|
|
137
|
-
|
|
138
|
-
} while (
|
|
137
|
+
ct.length = 0;
|
|
138
|
+
} while (ht.length);
|
|
139
139
|
for (; te.length; )
|
|
140
140
|
te.pop()();
|
|
141
|
-
|
|
141
|
+
Ht = !1, Rt.clear(), pt(s);
|
|
142
142
|
}
|
|
143
143
|
function ze(s) {
|
|
144
144
|
if (s.fragment !== null) {
|
|
145
|
-
s.update(),
|
|
145
|
+
s.update(), wt(s.before_update);
|
|
146
146
|
const n = s.dirty;
|
|
147
|
-
s.dirty = [-1], s.fragment && s.fragment.p(s.ctx, n), s.after_update.forEach(
|
|
147
|
+
s.dirty = [-1], s.fragment && s.fragment.p(s.ctx, n), s.after_update.forEach(It);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
function We(s) {
|
|
151
151
|
const n = [], t = [];
|
|
152
|
-
|
|
152
|
+
ct.forEach((e) => s.indexOf(e) === -1 ? n.push(e) : t.push(e)), t.forEach((e) => e()), ct = n;
|
|
153
153
|
}
|
|
154
154
|
const Ge = /* @__PURE__ */ new Set();
|
|
155
155
|
function fe(s, n) {
|
|
@@ -161,56 +161,56 @@ function ee(s) {
|
|
|
161
161
|
function Xe(s, n) {
|
|
162
162
|
s.d(1), n.delete(s.key);
|
|
163
163
|
}
|
|
164
|
-
function qe(s, n, t, e, r, i, o, h,
|
|
165
|
-
let
|
|
164
|
+
function qe(s, n, t, e, r, i, o, h, p, f, d, _) {
|
|
165
|
+
let A = s.length, O = i.length, M = A;
|
|
166
166
|
const H = {};
|
|
167
|
-
for (;
|
|
168
|
-
H[s[
|
|
169
|
-
const
|
|
170
|
-
for (
|
|
171
|
-
const
|
|
172
|
-
let
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
const
|
|
176
|
-
function
|
|
177
|
-
fe(
|
|
178
|
-
}
|
|
179
|
-
for (;
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
for (;
|
|
184
|
-
const
|
|
185
|
-
X.has(
|
|
186
|
-
}
|
|
187
|
-
for (;
|
|
188
|
-
|
|
189
|
-
return
|
|
167
|
+
for (; M--; )
|
|
168
|
+
H[s[M].key] = M;
|
|
169
|
+
const N = [], X = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ new Map(), Q = [];
|
|
170
|
+
for (M = O; M--; ) {
|
|
171
|
+
const j = _(r, i, M), m = t(j);
|
|
172
|
+
let L = o.get(m);
|
|
173
|
+
L ? e && Q.push(() => L.p(j, n)) : (L = f(m, j), L.c()), X.set(m, N[M] = L), m in H && q.set(m, Math.abs(M - H[m]));
|
|
174
|
+
}
|
|
175
|
+
const K = /* @__PURE__ */ new Set(), tt = /* @__PURE__ */ new Set();
|
|
176
|
+
function et(j) {
|
|
177
|
+
fe(j, 1), j.m(h, d), o.set(j.key, j), d = j.first, O--;
|
|
178
|
+
}
|
|
179
|
+
for (; A && O; ) {
|
|
180
|
+
const j = N[O - 1], m = s[A - 1], L = j.key, U = m.key;
|
|
181
|
+
j === m ? (d = j.first, A--, O--) : X.has(U) ? !o.has(L) || K.has(L) ? et(j) : tt.has(U) ? A-- : q.get(L) > q.get(U) ? (tt.add(L), et(j)) : (K.add(U), A--) : (p(m, o), A--);
|
|
182
|
+
}
|
|
183
|
+
for (; A--; ) {
|
|
184
|
+
const j = s[A];
|
|
185
|
+
X.has(j.key) || p(j, o);
|
|
186
|
+
}
|
|
187
|
+
for (; O; )
|
|
188
|
+
et(N[O - 1]);
|
|
189
|
+
return wt(Q), N;
|
|
190
190
|
}
|
|
191
191
|
function Ye(s, n, t) {
|
|
192
192
|
const { fragment: e, after_update: r } = s.$$;
|
|
193
|
-
e && e.m(n, t),
|
|
193
|
+
e && e.m(n, t), It(() => {
|
|
194
194
|
const i = s.$$.on_mount.map(ce).filter(le);
|
|
195
|
-
s.$$.on_destroy ? s.$$.on_destroy.push(...i) :
|
|
196
|
-
}), r.forEach(
|
|
195
|
+
s.$$.on_destroy ? s.$$.on_destroy.push(...i) : wt(i), s.$$.on_mount = [];
|
|
196
|
+
}), r.forEach(It);
|
|
197
197
|
}
|
|
198
198
|
function Ze(s, n) {
|
|
199
199
|
const t = s.$$;
|
|
200
|
-
t.fragment !== null && (We(t.after_update),
|
|
200
|
+
t.fragment !== null && (We(t.after_update), wt(t.on_destroy), t.fragment && t.fragment.d(n), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
201
201
|
}
|
|
202
202
|
function Qe(s, n) {
|
|
203
|
-
s.$$.dirty[0] === -1 && (
|
|
203
|
+
s.$$.dirty[0] === -1 && (ht.push(s), Fe(), s.$$.dirty.fill(0)), s.$$.dirty[n / 31 | 0] |= 1 << n % 31;
|
|
204
204
|
}
|
|
205
205
|
function Ke(s, n, t, e, r, i, o, h = [-1]) {
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
const
|
|
206
|
+
const p = yt;
|
|
207
|
+
pt(s);
|
|
208
|
+
const f = s.$$ = {
|
|
209
209
|
fragment: null,
|
|
210
210
|
ctx: [],
|
|
211
211
|
// state
|
|
212
212
|
props: i,
|
|
213
|
-
update:
|
|
213
|
+
update: vt,
|
|
214
214
|
not_equal: r,
|
|
215
215
|
bound: Zt(),
|
|
216
216
|
// lifecycle
|
|
@@ -219,50 +219,50 @@ function Ke(s, n, t, e, r, i, o, h = [-1]) {
|
|
|
219
219
|
on_disconnect: [],
|
|
220
220
|
before_update: [],
|
|
221
221
|
after_update: [],
|
|
222
|
-
context: new Map(n.context || (
|
|
222
|
+
context: new Map(n.context || (p ? p.$$.context : [])),
|
|
223
223
|
// everything else
|
|
224
224
|
callbacks: Zt(),
|
|
225
225
|
dirty: h,
|
|
226
226
|
skip_bound: !1,
|
|
227
|
-
root: n.target ||
|
|
227
|
+
root: n.target || p.$$.root
|
|
228
228
|
};
|
|
229
|
-
o && o(
|
|
230
|
-
let
|
|
231
|
-
if (
|
|
232
|
-
const
|
|
233
|
-
return
|
|
234
|
-
}) : [],
|
|
229
|
+
o && o(f.root);
|
|
230
|
+
let d = !1;
|
|
231
|
+
if (f.ctx = t ? t(s, n.props || {}, (_, A, ...O) => {
|
|
232
|
+
const M = O.length ? O[0] : A;
|
|
233
|
+
return f.ctx && r(f.ctx[_], f.ctx[_] = M) && (!f.skip_bound && f.bound[_] && f.bound[_](M), d && Qe(s, _)), A;
|
|
234
|
+
}) : [], f.update(), d = !0, wt(f.before_update), f.fragment = e ? e(f.ctx) : !1, n.target) {
|
|
235
235
|
if (n.hydrate) {
|
|
236
|
-
const
|
|
237
|
-
|
|
236
|
+
const _ = Ie(n.target);
|
|
237
|
+
f.fragment && f.fragment.l(_), _.forEach(_t);
|
|
238
238
|
} else
|
|
239
|
-
|
|
240
|
-
n.intro && fe(s.$$.fragment), Ye(s, n.target, n.anchor),
|
|
239
|
+
f.fragment && f.fragment.c();
|
|
240
|
+
n.intro && fe(s.$$.fragment), Ye(s, n.target, n.anchor), ft();
|
|
241
241
|
}
|
|
242
|
-
|
|
242
|
+
pt(p);
|
|
243
243
|
}
|
|
244
244
|
let de;
|
|
245
245
|
typeof HTMLElement == "function" && (de = class extends HTMLElement {
|
|
246
246
|
constructor(n, t, e) {
|
|
247
247
|
super();
|
|
248
248
|
/** The Svelte component constructor */
|
|
249
|
-
|
|
249
|
+
g(this, "$$ctor");
|
|
250
250
|
/** Slots */
|
|
251
|
-
|
|
251
|
+
g(this, "$$s");
|
|
252
252
|
/** The Svelte component instance */
|
|
253
|
-
|
|
253
|
+
g(this, "$$c");
|
|
254
254
|
/** Whether or not the custom element is connected */
|
|
255
|
-
|
|
255
|
+
g(this, "$$cn", !1);
|
|
256
256
|
/** Component props data */
|
|
257
|
-
|
|
257
|
+
g(this, "$$d", {});
|
|
258
258
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
259
|
-
|
|
259
|
+
g(this, "$$r", !1);
|
|
260
260
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
261
|
-
|
|
261
|
+
g(this, "$$p_d", {});
|
|
262
262
|
/** @type {Record<string, Function[]>} Event listeners */
|
|
263
|
-
|
|
263
|
+
g(this, "$$l", {});
|
|
264
264
|
/** @type {Map<Function, Function>} Event listener unsubscribe functions */
|
|
265
|
-
|
|
265
|
+
g(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
266
266
|
this.$$ctor = n, this.$$s = t, e && this.attachShadow({ mode: "open" });
|
|
267
267
|
}
|
|
268
268
|
addEventListener(n, t, e) {
|
|
@@ -285,29 +285,29 @@ typeof HTMLElement == "function" && (de = class extends HTMLElement {
|
|
|
285
285
|
let o;
|
|
286
286
|
return {
|
|
287
287
|
c: function() {
|
|
288
|
-
o =
|
|
288
|
+
o = st("slot"), i !== "default" && x(o, "name", i);
|
|
289
289
|
},
|
|
290
290
|
/**
|
|
291
291
|
* @param {HTMLElement} target
|
|
292
292
|
* @param {HTMLElement} [anchor]
|
|
293
293
|
*/
|
|
294
|
-
m: function(
|
|
295
|
-
|
|
294
|
+
m: function(f, d) {
|
|
295
|
+
St(f, o, d);
|
|
296
296
|
},
|
|
297
|
-
d: function(
|
|
298
|
-
|
|
297
|
+
d: function(f) {
|
|
298
|
+
f && _t(o);
|
|
299
299
|
}
|
|
300
300
|
};
|
|
301
301
|
};
|
|
302
302
|
};
|
|
303
303
|
if (await Promise.resolve(), !this.$$cn)
|
|
304
304
|
return;
|
|
305
|
-
const t = {}, e =
|
|
305
|
+
const t = {}, e = De(this);
|
|
306
306
|
for (const i of this.$$s)
|
|
307
307
|
i in e && (t[i] = [n(i)]);
|
|
308
308
|
for (const i of this.attributes) {
|
|
309
309
|
const o = this.$$g_p(i.name);
|
|
310
|
-
o in this.$$d || (this.$$d[o] =
|
|
310
|
+
o in this.$$d || (this.$$d[o] = At(o, i.value, this.$$p_d, "toProp"));
|
|
311
311
|
}
|
|
312
312
|
this.$$c = new this.$$ctor({
|
|
313
313
|
target: this.shadowRoot || this,
|
|
@@ -323,7 +323,7 @@ typeof HTMLElement == "function" && (de = class extends HTMLElement {
|
|
|
323
323
|
this.$$r = !0;
|
|
324
324
|
for (const i in this.$$p_d)
|
|
325
325
|
if (this.$$d[i] = this.$$c.$$.ctx[this.$$c.$$.props[i]], this.$$p_d[i].reflect) {
|
|
326
|
-
const o =
|
|
326
|
+
const o = At(
|
|
327
327
|
i,
|
|
328
328
|
this.$$d[i],
|
|
329
329
|
this.$$p_d,
|
|
@@ -346,7 +346,7 @@ typeof HTMLElement == "function" && (de = class extends HTMLElement {
|
|
|
346
346
|
// and setting attributes through setAttribute etc, this is helpful
|
|
347
347
|
attributeChangedCallback(n, t, e) {
|
|
348
348
|
var r;
|
|
349
|
-
this.$$r || (n = this.$$g_p(n), this.$$d[n] =
|
|
349
|
+
this.$$r || (n = this.$$g_p(n), this.$$d[n] = At(n, e, this.$$p_d, "toProp"), (r = this.$$c) == null || r.$set({ [n]: this.$$d[n] }));
|
|
350
350
|
}
|
|
351
351
|
disconnectedCallback() {
|
|
352
352
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -359,7 +359,7 @@ typeof HTMLElement == "function" && (de = class extends HTMLElement {
|
|
|
359
359
|
) || n;
|
|
360
360
|
}
|
|
361
361
|
});
|
|
362
|
-
function
|
|
362
|
+
function At(s, n, t, e) {
|
|
363
363
|
var i;
|
|
364
364
|
const r = (i = t[s]) == null ? void 0 : i.type;
|
|
365
365
|
if (n = r === "Boolean" && typeof n != "boolean" ? n != null : n, !e || !t[s])
|
|
@@ -405,16 +405,16 @@ function ts(s, n, t, e, r, i) {
|
|
|
405
405
|
get() {
|
|
406
406
|
return this.$$c && h in this.$$c ? this.$$c[h] : this.$$d[h];
|
|
407
407
|
},
|
|
408
|
-
set(
|
|
409
|
-
var
|
|
410
|
-
|
|
408
|
+
set(p) {
|
|
409
|
+
var f;
|
|
410
|
+
p = At(h, p, n), this.$$d[h] = p, (f = this.$$c) == null || f.$set({ [h]: p });
|
|
411
411
|
}
|
|
412
412
|
});
|
|
413
413
|
}), e.forEach((h) => {
|
|
414
414
|
Object.defineProperty(o.prototype, h, {
|
|
415
415
|
get() {
|
|
416
|
-
var
|
|
417
|
-
return (
|
|
416
|
+
var p;
|
|
417
|
+
return (p = this.$$c) == null ? void 0 : p[h];
|
|
418
418
|
}
|
|
419
419
|
});
|
|
420
420
|
}), i && (o = i(o)), s.element = /** @type {any} */
|
|
@@ -429,7 +429,7 @@ class es {
|
|
|
429
429
|
*
|
|
430
430
|
* @type {any}
|
|
431
431
|
*/
|
|
432
|
-
|
|
432
|
+
g(this, "$$");
|
|
433
433
|
/**
|
|
434
434
|
* ### PRIVATE API
|
|
435
435
|
*
|
|
@@ -437,11 +437,11 @@ class es {
|
|
|
437
437
|
*
|
|
438
438
|
* @type {any}
|
|
439
439
|
*/
|
|
440
|
-
|
|
440
|
+
g(this, "$$set");
|
|
441
441
|
}
|
|
442
442
|
/** @returns {void} */
|
|
443
443
|
$destroy() {
|
|
444
|
-
Ze(this, 1), this.$destroy =
|
|
444
|
+
Ze(this, 1), this.$destroy = vt;
|
|
445
445
|
}
|
|
446
446
|
/**
|
|
447
447
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -451,7 +451,7 @@ class es {
|
|
|
451
451
|
*/
|
|
452
452
|
$on(n, t) {
|
|
453
453
|
if (!le(t))
|
|
454
|
-
return
|
|
454
|
+
return vt;
|
|
455
455
|
const e = this.$$.callbacks[n] || (this.$$.callbacks[n] = []);
|
|
456
456
|
return e.push(t), () => {
|
|
457
457
|
const r = e.indexOf(t);
|
|
@@ -468,28 +468,28 @@ class es {
|
|
|
468
468
|
}
|
|
469
469
|
const ss = "4";
|
|
470
470
|
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(ss);
|
|
471
|
-
const { isArray: ns } = Array, rs = Object.keys,
|
|
471
|
+
const { isArray: ns } = Array, rs = Object.keys, mt = (s) => {
|
|
472
472
|
if (!s)
|
|
473
473
|
return s;
|
|
474
474
|
if (ns(s)) {
|
|
475
475
|
const n = [], t = s.length;
|
|
476
476
|
for (let e = 0; e < t; e++)
|
|
477
|
-
n.push(
|
|
477
|
+
n.push(mt(s[e]));
|
|
478
478
|
return n;
|
|
479
479
|
} else if (typeof s == "object") {
|
|
480
480
|
const n = rs(s), t = n.length, e = {};
|
|
481
481
|
for (let r = 0; r < t; r++) {
|
|
482
482
|
const i = n[r];
|
|
483
|
-
e[i] =
|
|
483
|
+
e[i] = mt(s[i]);
|
|
484
484
|
}
|
|
485
485
|
return e;
|
|
486
486
|
}
|
|
487
487
|
return s;
|
|
488
488
|
};
|
|
489
|
-
class
|
|
489
|
+
class V {
|
|
490
490
|
constructor(n) {
|
|
491
|
-
|
|
492
|
-
|
|
491
|
+
g(this, "path");
|
|
492
|
+
g(this, "from");
|
|
493
493
|
this.path = n;
|
|
494
494
|
}
|
|
495
495
|
}
|
|
@@ -503,14 +503,14 @@ function ls(s) {
|
|
|
503
503
|
function us(s) {
|
|
504
504
|
return s ? s.slice(1).split("/").map(cs) : [];
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function $(s) {
|
|
507
507
|
return ps(s) ? "" : "/" + s.map((n) => ls(String(n))).join("/");
|
|
508
508
|
}
|
|
509
|
-
const
|
|
509
|
+
const E = (s) => typeof s == "string" ? us(s) : s, ps = (s) => !s.length, fs = Object.prototype.hasOwnProperty;
|
|
510
510
|
function ds(s, n) {
|
|
511
511
|
return fs.call(s, n);
|
|
512
512
|
}
|
|
513
|
-
const { isArray: ge } = Array,
|
|
513
|
+
const { isArray: ge } = Array, T = (s, n) => {
|
|
514
514
|
const t = n.length;
|
|
515
515
|
if (!t)
|
|
516
516
|
return { val: s };
|
|
@@ -521,10 +521,10 @@ const { isArray: ge } = Array, j = (s, n) => {
|
|
|
521
521
|
if (r === "-")
|
|
522
522
|
r = h;
|
|
523
523
|
else if (typeof r == "string") {
|
|
524
|
-
const
|
|
525
|
-
if ("" +
|
|
524
|
+
const p = ~~r;
|
|
525
|
+
if ("" + p !== r)
|
|
526
526
|
throw new Error("INVALID_INDEX");
|
|
527
|
-
if (r =
|
|
527
|
+
if (r = p, r < 0)
|
|
528
528
|
throw new Error("INVALID_INDEX");
|
|
529
529
|
}
|
|
530
530
|
s = e[r];
|
|
@@ -533,11 +533,11 @@ const { isArray: ge } = Array, j = (s, n) => {
|
|
|
533
533
|
else
|
|
534
534
|
throw new Error("NOT_FOUND");
|
|
535
535
|
return { val: s, obj: e, key: r };
|
|
536
|
-
},
|
|
537
|
-
class
|
|
536
|
+
}, bt = (s) => ge(s.obj) && typeof s.key == "number", xt = (s) => typeof s.obj == "object" && typeof s.key == "string";
|
|
537
|
+
class Vt extends V {
|
|
538
538
|
constructor(t, e) {
|
|
539
539
|
super(t);
|
|
540
|
-
|
|
540
|
+
g(this, "value");
|
|
541
541
|
this.value = e;
|
|
542
542
|
}
|
|
543
543
|
op() {
|
|
@@ -547,7 +547,7 @@ class Dt extends B {
|
|
|
547
547
|
return 0;
|
|
548
548
|
}
|
|
549
549
|
apply(t) {
|
|
550
|
-
const { val: e, key: r, obj: i } =
|
|
550
|
+
const { val: e, key: r, obj: i } = T(t, this.path), o = mt(this.value);
|
|
551
551
|
if (!i)
|
|
552
552
|
t = o;
|
|
553
553
|
else if (typeof r == "string")
|
|
@@ -567,7 +567,7 @@ class Dt extends B {
|
|
|
567
567
|
toJson(t) {
|
|
568
568
|
return {
|
|
569
569
|
op: "add",
|
|
570
|
-
path:
|
|
570
|
+
path: $(this.path),
|
|
571
571
|
value: this.value
|
|
572
572
|
};
|
|
573
573
|
}
|
|
@@ -578,10 +578,10 @@ class Dt extends B {
|
|
|
578
578
|
t.encodeArrayHeader(3), t.writer.u8(0), t.encodeArray(this.path), t.encodeAny(this.value);
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
class
|
|
581
|
+
class ve extends V {
|
|
582
582
|
constructor(t, e) {
|
|
583
583
|
super(t);
|
|
584
|
-
|
|
584
|
+
g(this, "oldValue");
|
|
585
585
|
this.oldValue = e;
|
|
586
586
|
}
|
|
587
587
|
op() {
|
|
@@ -591,15 +591,15 @@ class ye extends B {
|
|
|
591
591
|
return 1;
|
|
592
592
|
}
|
|
593
593
|
apply(t) {
|
|
594
|
-
const e =
|
|
594
|
+
const e = T(t, this.path);
|
|
595
595
|
if (e.val === void 0)
|
|
596
596
|
throw new Error("NOT_FOUND");
|
|
597
|
-
return
|
|
597
|
+
return xt(e) ? delete e.obj[e.key] : bt(e) ? e.val !== void 0 && e.obj.splice(e.key, 1) : t = null, { doc: t, old: e.val };
|
|
598
598
|
}
|
|
599
599
|
toJson(t) {
|
|
600
600
|
const e = {
|
|
601
601
|
op: "remove",
|
|
602
|
-
path:
|
|
602
|
+
path: $(this.path)
|
|
603
603
|
};
|
|
604
604
|
return this.oldValue !== void 0 && (e.oldValue = this.oldValue), e;
|
|
605
605
|
}
|
|
@@ -612,11 +612,11 @@ class ye extends B {
|
|
|
612
612
|
t.encodeArrayHeader(r ? 3 : 2), t.writer.u8(1), t.encodeArray(this.path), r && t.encodeAny(this.oldValue);
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
class gs extends
|
|
615
|
+
class gs extends V {
|
|
616
616
|
constructor(t, e, r) {
|
|
617
617
|
super(t);
|
|
618
|
-
|
|
619
|
-
|
|
618
|
+
g(this, "value");
|
|
619
|
+
g(this, "oldValue");
|
|
620
620
|
this.value = e, this.oldValue = r;
|
|
621
621
|
}
|
|
622
622
|
op() {
|
|
@@ -626,15 +626,15 @@ class gs extends B {
|
|
|
626
626
|
return 2;
|
|
627
627
|
}
|
|
628
628
|
apply(t) {
|
|
629
|
-
const e =
|
|
629
|
+
const e = T(t, this.path);
|
|
630
630
|
if (e.val === void 0)
|
|
631
631
|
throw new Error("NOT_FOUND");
|
|
632
|
-
return
|
|
632
|
+
return xt(e) ? e.obj[e.key] = this.value : bt(e) ? e.obj[e.key] = this.value : t = this.value, { doc: t, old: e.val };
|
|
633
633
|
}
|
|
634
634
|
toJson(t) {
|
|
635
635
|
const e = {
|
|
636
636
|
op: "replace",
|
|
637
|
-
path:
|
|
637
|
+
path: $(this.path),
|
|
638
638
|
value: this.value
|
|
639
639
|
};
|
|
640
640
|
return this.oldValue !== void 0 && (e.oldValue = this.oldValue), e;
|
|
@@ -648,10 +648,10 @@ class gs extends B {
|
|
|
648
648
|
t.encodeArrayHeader(r ? 4 : 3), t.writer.u8(2), t.encodeArray(this.path), t.encodeAny(this.value), r && t.encodeAny(this.oldValue);
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
|
-
class
|
|
651
|
+
class vs extends V {
|
|
652
652
|
constructor(t, e) {
|
|
653
653
|
super(t);
|
|
654
|
-
|
|
654
|
+
g(this, "from");
|
|
655
655
|
this.from = e;
|
|
656
656
|
}
|
|
657
657
|
op() {
|
|
@@ -661,14 +661,14 @@ class ys extends B {
|
|
|
661
661
|
return 4;
|
|
662
662
|
}
|
|
663
663
|
apply(t) {
|
|
664
|
-
const e = new
|
|
665
|
-
return new
|
|
664
|
+
const e = new ve(E(this.from), void 0).apply(t);
|
|
665
|
+
return new Vt(this.path, e.old).apply(e.doc);
|
|
666
666
|
}
|
|
667
667
|
toJson(t) {
|
|
668
668
|
return {
|
|
669
669
|
op: "move",
|
|
670
|
-
path:
|
|
671
|
-
from:
|
|
670
|
+
path: $(this.path),
|
|
671
|
+
from: $(this.from)
|
|
672
672
|
};
|
|
673
673
|
}
|
|
674
674
|
toCompact(t, e) {
|
|
@@ -678,10 +678,10 @@ class ys extends B {
|
|
|
678
678
|
t.encodeArrayHeader(3), t.writer.u8(4), t.encodeArray(this.path), t.encodeArray(this.from);
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
|
-
class
|
|
681
|
+
class ys extends V {
|
|
682
682
|
constructor(t, e) {
|
|
683
683
|
super(t);
|
|
684
|
-
|
|
684
|
+
g(this, "from");
|
|
685
685
|
this.from = e;
|
|
686
686
|
}
|
|
687
687
|
op() {
|
|
@@ -691,16 +691,16 @@ class vs extends B {
|
|
|
691
691
|
return 3;
|
|
692
692
|
}
|
|
693
693
|
apply(t) {
|
|
694
|
-
const { val: e } =
|
|
694
|
+
const { val: e } = T(t, this.from);
|
|
695
695
|
if (e === void 0)
|
|
696
696
|
throw new Error("NOT_FOUND");
|
|
697
|
-
return new
|
|
697
|
+
return new Vt(this.path, mt(e)).apply(t);
|
|
698
698
|
}
|
|
699
699
|
toJson(t) {
|
|
700
700
|
return {
|
|
701
701
|
op: "copy",
|
|
702
|
-
path:
|
|
703
|
-
from:
|
|
702
|
+
path: $(this.path),
|
|
703
|
+
from: $(this.from)
|
|
704
704
|
};
|
|
705
705
|
}
|
|
706
706
|
toCompact(t, e) {
|
|
@@ -710,14 +710,14 @@ class vs extends B {
|
|
|
710
710
|
t.encodeArrayHeader(3), t.writer.u8(3), t.encodeArray(this.path), t.encodeArray(this.from);
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
|
-
class
|
|
713
|
+
class D extends V {
|
|
714
714
|
apply(n) {
|
|
715
715
|
if (!this.test(n))
|
|
716
716
|
throw new Error("TEST");
|
|
717
717
|
return { doc: n };
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
|
-
const
|
|
720
|
+
const Ot = (s, n) => {
|
|
721
721
|
if (s === n)
|
|
722
722
|
return !0;
|
|
723
723
|
if (s && n && typeof s == "object" && typeof n == "object") {
|
|
@@ -728,7 +728,7 @@ const $t = (s, n) => {
|
|
|
728
728
|
if (t = s.length, t !== n.length)
|
|
729
729
|
return !1;
|
|
730
730
|
for (e = t; e-- !== 0; )
|
|
731
|
-
if (
|
|
731
|
+
if (!Ot(s[e], n[e]))
|
|
732
732
|
return !1;
|
|
733
733
|
return !0;
|
|
734
734
|
}
|
|
@@ -736,18 +736,18 @@ const $t = (s, n) => {
|
|
|
736
736
|
return !1;
|
|
737
737
|
for (e = t; e-- !== 0; ) {
|
|
738
738
|
const i = r[e];
|
|
739
|
-
if (
|
|
739
|
+
if (!Ot(s[i], n[i]))
|
|
740
740
|
return !1;
|
|
741
741
|
}
|
|
742
742
|
return !0;
|
|
743
743
|
}
|
|
744
744
|
return !1;
|
|
745
745
|
};
|
|
746
|
-
class ms extends
|
|
746
|
+
class ms extends D {
|
|
747
747
|
constructor(t, e, r) {
|
|
748
748
|
super(t);
|
|
749
|
-
|
|
750
|
-
|
|
749
|
+
g(this, "value");
|
|
750
|
+
g(this, "not");
|
|
751
751
|
this.value = e, this.not = r;
|
|
752
752
|
}
|
|
753
753
|
op() {
|
|
@@ -757,16 +757,16 @@ class ms extends U {
|
|
|
757
757
|
return 5;
|
|
758
758
|
}
|
|
759
759
|
test(t) {
|
|
760
|
-
const { val: e } =
|
|
760
|
+
const { val: e } = T(t, this.path);
|
|
761
761
|
if (e === void 0)
|
|
762
762
|
return !!this.not;
|
|
763
|
-
const r =
|
|
763
|
+
const r = Ot(e, this.value);
|
|
764
764
|
return this.not ? !r : r;
|
|
765
765
|
}
|
|
766
766
|
toJson(t) {
|
|
767
767
|
const e = {
|
|
768
768
|
op: "test",
|
|
769
|
-
path:
|
|
769
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
770
770
|
value: this.value
|
|
771
771
|
};
|
|
772
772
|
return this.not && (e.not = this.not), e;
|
|
@@ -779,7 +779,7 @@ class ms extends U {
|
|
|
779
779
|
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);
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
|
-
class ws extends
|
|
782
|
+
class ws extends V {
|
|
783
783
|
constructor(n) {
|
|
784
784
|
super(n);
|
|
785
785
|
}
|
|
@@ -790,13 +790,13 @@ class ws extends B {
|
|
|
790
790
|
return 8;
|
|
791
791
|
}
|
|
792
792
|
apply(n) {
|
|
793
|
-
const t =
|
|
793
|
+
const t = T(n, this.path);
|
|
794
794
|
return t.obj ? t.obj[t.key] = !t.val : n = !t.val, { doc: n, old: t.val };
|
|
795
795
|
}
|
|
796
796
|
toJson(n) {
|
|
797
797
|
return {
|
|
798
798
|
op: "flip",
|
|
799
|
-
path:
|
|
799
|
+
path: $(this.path)
|
|
800
800
|
};
|
|
801
801
|
}
|
|
802
802
|
toCompact(n, t) {
|
|
@@ -806,10 +806,10 @@ class ws extends B {
|
|
|
806
806
|
n.encodeArrayHeader(2), n.writer.u8(8), n.encodeArray(this.path);
|
|
807
807
|
}
|
|
808
808
|
}
|
|
809
|
-
class _s extends
|
|
809
|
+
class _s extends V {
|
|
810
810
|
constructor(t, e) {
|
|
811
811
|
super(t);
|
|
812
|
-
|
|
812
|
+
g(this, "inc");
|
|
813
813
|
this.inc = e;
|
|
814
814
|
}
|
|
815
815
|
op() {
|
|
@@ -819,13 +819,13 @@ class _s extends B {
|
|
|
819
819
|
return 9;
|
|
820
820
|
}
|
|
821
821
|
apply(t) {
|
|
822
|
-
const e =
|
|
822
|
+
const e = T(t, this.path), r = this.inc + Number(e.val);
|
|
823
823
|
return e.obj ? e.obj[e.key] = r : t = r, { doc: t, old: e.val };
|
|
824
824
|
}
|
|
825
825
|
toJson(t) {
|
|
826
826
|
return {
|
|
827
827
|
op: "inc",
|
|
828
|
-
path:
|
|
828
|
+
path: $(this.path),
|
|
829
829
|
inc: this.inc
|
|
830
830
|
};
|
|
831
831
|
}
|
|
@@ -836,11 +836,11 @@ class _s extends B {
|
|
|
836
836
|
t.encodeArrayHeader(3), t.writer.u8(9), t.encodeArray(this.path), t.encodeNumber(this.inc);
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
|
-
class bs extends
|
|
839
|
+
class bs extends V {
|
|
840
840
|
constructor(t, e, r) {
|
|
841
841
|
super(t);
|
|
842
|
-
|
|
843
|
-
|
|
842
|
+
g(this, "pos");
|
|
843
|
+
g(this, "str");
|
|
844
844
|
this.pos = e, this.str = r;
|
|
845
845
|
}
|
|
846
846
|
op() {
|
|
@@ -850,20 +850,20 @@ class bs extends B {
|
|
|
850
850
|
return 6;
|
|
851
851
|
}
|
|
852
852
|
apply(t) {
|
|
853
|
-
const { val: e, key: r, obj: i } =
|
|
853
|
+
const { val: e, key: r, obj: i } = T(t, this.path);
|
|
854
854
|
if (typeof e != "string") {
|
|
855
855
|
if (e !== void 0)
|
|
856
856
|
throw new Error("NOT_A_STRING");
|
|
857
857
|
if (this.pos !== 0)
|
|
858
858
|
throw new Error("POS");
|
|
859
859
|
}
|
|
860
|
-
const o = typeof e == "string" ? e : "", h = Math.min(this.pos, o.length),
|
|
861
|
-
return i ? i[r] =
|
|
860
|
+
const o = typeof e == "string" ? e : "", h = Math.min(this.pos, o.length), p = o.slice(0, h), f = o.slice(h), d = p + this.str + f;
|
|
861
|
+
return i ? i[r] = d : t = d, { doc: t, old: e };
|
|
862
862
|
}
|
|
863
863
|
toJson(t) {
|
|
864
864
|
return {
|
|
865
865
|
op: "str_ins",
|
|
866
|
-
path:
|
|
866
|
+
path: $(this.path),
|
|
867
867
|
pos: this.pos,
|
|
868
868
|
str: this.str
|
|
869
869
|
};
|
|
@@ -875,12 +875,12 @@ class bs extends B {
|
|
|
875
875
|
t.encodeArrayHeader(4), t.writer.u8(6), t.encodeArray(this.path), t.encodeNumber(this.pos), t.encodeString(this.str);
|
|
876
876
|
}
|
|
877
877
|
}
|
|
878
|
-
class Es extends
|
|
878
|
+
class Es extends V {
|
|
879
879
|
constructor(t, e, r, i) {
|
|
880
880
|
super(t);
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
881
|
+
g(this, "pos");
|
|
882
|
+
g(this, "str");
|
|
883
|
+
g(this, "len");
|
|
884
884
|
this.pos = e, this.str = r, this.len = i;
|
|
885
885
|
}
|
|
886
886
|
op() {
|
|
@@ -893,21 +893,21 @@ class Es extends B {
|
|
|
893
893
|
return typeof this.str == "string" ? this.str.length : this.len;
|
|
894
894
|
}
|
|
895
895
|
apply(t) {
|
|
896
|
-
const { val: e, key: r, obj: i } =
|
|
896
|
+
const { val: e, key: r, obj: i } = T(t, this.path);
|
|
897
897
|
if (typeof e != "string")
|
|
898
898
|
throw new Error("NOT_A_STRING");
|
|
899
|
-
const o = e.length, h = Math.min(this.pos, e.length),
|
|
900
|
-
return i ? i[r] =
|
|
899
|
+
const o = e.length, h = Math.min(this.pos, e.length), p = Math.min(h, o), f = this.str !== void 0 ? this.str.length : this.len, d = Math.min(h + f, o), _ = e.slice(0, p), A = e.substr(d), O = _ + A;
|
|
900
|
+
return i ? i[r] = O : t = O, { doc: t, old: e };
|
|
901
901
|
}
|
|
902
902
|
toJson(t) {
|
|
903
903
|
return typeof this.str == "string" ? {
|
|
904
904
|
op: "str_del",
|
|
905
|
-
path:
|
|
905
|
+
path: $(this.path),
|
|
906
906
|
pos: this.pos,
|
|
907
907
|
str: this.str
|
|
908
908
|
} : {
|
|
909
909
|
op: "str_del",
|
|
910
|
-
path:
|
|
910
|
+
path: $(this.path),
|
|
911
911
|
pos: this.pos,
|
|
912
912
|
len: this.len
|
|
913
913
|
};
|
|
@@ -921,15 +921,15 @@ class Es extends B {
|
|
|
921
921
|
t.encodeArrayHeader(r ? 4 : 5), t.writer.u8(7), t.encodeArray(this.path), t.encodeNumber(this.pos), r ? t.encodeString(this.str) : (t.writer.u8(0), t.encodeNumber(this.len));
|
|
922
922
|
}
|
|
923
923
|
}
|
|
924
|
-
const { isArray: ks } = Array,
|
|
924
|
+
const { isArray: ks } = Array, Ut = (s) => !!s && typeof s == "object" && typeof s.text == "string", Dt = (s) => !!s && typeof s == "object" && ks(s.children), Cs = (s, n) => {
|
|
925
925
|
const t = new RegExp(s, n ? "i" : void 0);
|
|
926
926
|
return (e) => t.test(e);
|
|
927
927
|
};
|
|
928
|
-
class
|
|
928
|
+
class $s extends V {
|
|
929
929
|
constructor(t, e, r) {
|
|
930
930
|
super(t);
|
|
931
|
-
|
|
932
|
-
|
|
931
|
+
g(this, "pos");
|
|
932
|
+
g(this, "props");
|
|
933
933
|
this.pos = e, this.props = r;
|
|
934
934
|
}
|
|
935
935
|
op() {
|
|
@@ -939,11 +939,11 @@ class Cs extends B {
|
|
|
939
939
|
return 10;
|
|
940
940
|
}
|
|
941
941
|
apply(t) {
|
|
942
|
-
const e =
|
|
942
|
+
const e = T(t, this.path);
|
|
943
943
|
if (e.val === void 0)
|
|
944
944
|
throw new Error("NOT_FOUND");
|
|
945
945
|
const r = this.split(e.val);
|
|
946
|
-
return
|
|
946
|
+
return xt(e) ? e.obj[e.key] = r : bt(e) ? (e.obj[e.key] = r[0], e.obj.splice(e.key + 1, 0, r[1])) : t = r, { doc: t, old: e.val };
|
|
947
947
|
}
|
|
948
948
|
split(t) {
|
|
949
949
|
if (typeof t == "string") {
|
|
@@ -958,7 +958,7 @@ class Cs extends B {
|
|
|
958
958
|
text: o
|
|
959
959
|
}
|
|
960
960
|
] : [i, o];
|
|
961
|
-
} else if (
|
|
961
|
+
} else if (Ut(t)) {
|
|
962
962
|
const { pos: e, props: r } = this, i = t.text.slice(0, e), o = t.text.slice(e);
|
|
963
963
|
return [
|
|
964
964
|
{
|
|
@@ -972,7 +972,7 @@ class Cs extends B {
|
|
|
972
972
|
text: o
|
|
973
973
|
}
|
|
974
974
|
];
|
|
975
|
-
} else if (
|
|
975
|
+
} else if (Dt(t)) {
|
|
976
976
|
const { pos: e, props: r } = this, i = t.children.slice(0, e), o = t.children.slice(e);
|
|
977
977
|
return [
|
|
978
978
|
{
|
|
@@ -995,7 +995,7 @@ class Cs extends B {
|
|
|
995
995
|
toJson(t) {
|
|
996
996
|
const e = {
|
|
997
997
|
op: "split",
|
|
998
|
-
path:
|
|
998
|
+
path: $(this.path),
|
|
999
999
|
pos: this.pos
|
|
1000
1000
|
};
|
|
1001
1001
|
return this.props && (e.props = this.props), e;
|
|
@@ -1008,11 +1008,11 @@ class Cs extends B {
|
|
|
1008
1008
|
t.encodeArrayHeader(this.props ? 4 : 3), t.writer.u8(10), t.encodeArray(this.path), t.encodeNumber(this.pos), this.props && t.encodeObject(this.props);
|
|
1009
1009
|
}
|
|
1010
1010
|
}
|
|
1011
|
-
class As extends
|
|
1011
|
+
class As extends V {
|
|
1012
1012
|
constructor(t, e, r) {
|
|
1013
1013
|
super(t);
|
|
1014
|
-
|
|
1015
|
-
|
|
1014
|
+
g(this, "pos");
|
|
1015
|
+
g(this, "props");
|
|
1016
1016
|
this.pos = e, this.props = r;
|
|
1017
1017
|
}
|
|
1018
1018
|
op() {
|
|
@@ -1022,8 +1022,8 @@ class As extends B {
|
|
|
1022
1022
|
return 11;
|
|
1023
1023
|
}
|
|
1024
1024
|
apply(t) {
|
|
1025
|
-
const e =
|
|
1026
|
-
if (!
|
|
1025
|
+
const e = T(t, this.path);
|
|
1026
|
+
if (!bt(e))
|
|
1027
1027
|
throw new Error("INVALID_TARGET");
|
|
1028
1028
|
if (e.key <= 0)
|
|
1029
1029
|
throw new Error("INVALID_KEY");
|
|
@@ -1031,12 +1031,12 @@ class As extends B {
|
|
|
1031
1031
|
return e.obj[e.key - 1] = o, e.obj.splice(e.key, 1), { doc: t, old: [r, i] };
|
|
1032
1032
|
}
|
|
1033
1033
|
merge(t, e) {
|
|
1034
|
-
return typeof t == "string" && typeof e == "string" || typeof t == "number" && typeof e == "number" ? t + e :
|
|
1034
|
+
return typeof t == "string" && typeof e == "string" || typeof t == "number" && typeof e == "number" ? t + e : Ut(t) && Ut(e) ? { ...t, ...e, text: t.text + e.text } : Dt(t) && Dt(e) ? { ...t, ...e, children: [...t.children, ...e.children] } : [t, e];
|
|
1035
1035
|
}
|
|
1036
1036
|
toJson(t) {
|
|
1037
1037
|
const e = {
|
|
1038
1038
|
op: "merge",
|
|
1039
|
-
path:
|
|
1039
|
+
path: $(this.path),
|
|
1040
1040
|
pos: this.pos
|
|
1041
1041
|
};
|
|
1042
1042
|
return this.props && (e.props = this.props), e;
|
|
@@ -1050,11 +1050,11 @@ class As extends B {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
}
|
|
1052
1052
|
const { isArray: Ts } = Array;
|
|
1053
|
-
class Os extends
|
|
1053
|
+
class Os extends V {
|
|
1054
1054
|
constructor(t, e, r) {
|
|
1055
1055
|
super(t);
|
|
1056
|
-
|
|
1057
|
-
|
|
1056
|
+
g(this, "props");
|
|
1057
|
+
g(this, "deleteNull");
|
|
1058
1058
|
this.props = e, this.deleteNull = r;
|
|
1059
1059
|
}
|
|
1060
1060
|
op() {
|
|
@@ -1064,8 +1064,8 @@ class Os extends B {
|
|
|
1064
1064
|
return 12;
|
|
1065
1065
|
}
|
|
1066
1066
|
apply(t) {
|
|
1067
|
-
const e =
|
|
1068
|
-
return
|
|
1067
|
+
const e = T(t, this.path);
|
|
1068
|
+
return bt(e) ? e.val !== void 0 && (e.obj[e.key] = this.extend(e.val)) : xt(e) ? e.obj[e.key] = this.extend(e.val) : t = this.extend(t), { doc: t };
|
|
1069
1069
|
}
|
|
1070
1070
|
extend(t) {
|
|
1071
1071
|
if (Ts(t) || typeof t != "object" || !t)
|
|
@@ -1084,7 +1084,7 @@ class Os extends B {
|
|
|
1084
1084
|
toJson(t) {
|
|
1085
1085
|
const e = {
|
|
1086
1086
|
op: "extend",
|
|
1087
|
-
path:
|
|
1087
|
+
path: $(this.path),
|
|
1088
1088
|
props: this.props
|
|
1089
1089
|
};
|
|
1090
1090
|
return this.deleteNull && (e.deleteNull = this.deleteNull), e;
|
|
@@ -1098,7 +1098,7 @@ class Os extends B {
|
|
|
1098
1098
|
t.encodeArrayHeader(r ? 4 : 3), t.writer.u8(12), t.encodeArray(this.path), t.encodeObject(this.props), r && t.writer.u8(1);
|
|
1099
1099
|
}
|
|
1100
1100
|
}
|
|
1101
|
-
class js extends
|
|
1101
|
+
class js extends D {
|
|
1102
1102
|
constructor(n) {
|
|
1103
1103
|
super(n);
|
|
1104
1104
|
}
|
|
@@ -1109,13 +1109,13 @@ class js extends U {
|
|
|
1109
1109
|
return 31;
|
|
1110
1110
|
}
|
|
1111
1111
|
test(n) {
|
|
1112
|
-
const { val: t } =
|
|
1112
|
+
const { val: t } = T(n, this.path);
|
|
1113
1113
|
return t !== void 0;
|
|
1114
1114
|
}
|
|
1115
1115
|
toJson(n) {
|
|
1116
1116
|
return {
|
|
1117
1117
|
op: "defined",
|
|
1118
|
-
path:
|
|
1118
|
+
path: $(n ? this.path.slice(n.path.length) : this.path)
|
|
1119
1119
|
};
|
|
1120
1120
|
}
|
|
1121
1121
|
toCompact(n, t) {
|
|
@@ -1125,7 +1125,7 @@ class js extends U {
|
|
|
1125
1125
|
n.encodeArrayHeader(2), n.writer.u8(31), n.encodeArray(t ? this.path.slice(t.path.length) : this.path);
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
1128
|
-
class
|
|
1128
|
+
class Ss extends D {
|
|
1129
1129
|
constructor(n) {
|
|
1130
1130
|
super(n);
|
|
1131
1131
|
}
|
|
@@ -1137,7 +1137,7 @@ class xs extends U {
|
|
|
1137
1137
|
}
|
|
1138
1138
|
test(n) {
|
|
1139
1139
|
try {
|
|
1140
|
-
const { val: t } =
|
|
1140
|
+
const { val: t } = T(n, this.path);
|
|
1141
1141
|
return t === void 0;
|
|
1142
1142
|
} catch (t) {
|
|
1143
1143
|
if (t.message === "NOT_FOUND")
|
|
@@ -1148,7 +1148,7 @@ class xs extends U {
|
|
|
1148
1148
|
toJson(n) {
|
|
1149
1149
|
return {
|
|
1150
1150
|
op: "undefined",
|
|
1151
|
-
path:
|
|
1151
|
+
path: $(n ? this.path.slice(n.path.length) : this.path)
|
|
1152
1152
|
};
|
|
1153
1153
|
}
|
|
1154
1154
|
toCompact(n, t) {
|
|
@@ -1158,11 +1158,11 @@ class xs extends U {
|
|
|
1158
1158
|
n.encodeArrayHeader(2), n.writer.u8(38), n.encodeArray(t ? this.path.slice(t.path.length) : this.path);
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
|
-
const { isArray:
|
|
1162
|
-
class Ms extends
|
|
1161
|
+
const { isArray: xs } = Array;
|
|
1162
|
+
class Ms extends D {
|
|
1163
1163
|
constructor(t, e) {
|
|
1164
1164
|
super(t);
|
|
1165
|
-
|
|
1165
|
+
g(this, "type");
|
|
1166
1166
|
this.type = e;
|
|
1167
1167
|
}
|
|
1168
1168
|
op() {
|
|
@@ -1172,13 +1172,13 @@ class Ms extends U {
|
|
|
1172
1172
|
return 39;
|
|
1173
1173
|
}
|
|
1174
1174
|
test(t) {
|
|
1175
|
-
const { val: e } =
|
|
1176
|
-
return e === null ? this.type.indexOf("null") > -1 :
|
|
1175
|
+
const { val: e } = T(t, this.path);
|
|
1176
|
+
return e === null ? this.type.indexOf("null") > -1 : xs(e) ? this.type.indexOf("array") > -1 : this.type.indexOf(typeof e) > -1 || typeof e == "number" && e === Math.round(e) && this.type.indexOf("integer") > -1;
|
|
1177
1177
|
}
|
|
1178
1178
|
toJson(t) {
|
|
1179
1179
|
return {
|
|
1180
1180
|
op: "test_type",
|
|
1181
|
-
path:
|
|
1181
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1182
1182
|
type: this.type
|
|
1183
1183
|
};
|
|
1184
1184
|
}
|
|
@@ -1189,12 +1189,12 @@ class Ms extends U {
|
|
|
1189
1189
|
t.encodeArrayHeader(3), t.writer.u8(39), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeArray(this.type);
|
|
1190
1190
|
}
|
|
1191
1191
|
}
|
|
1192
|
-
class Ls extends
|
|
1192
|
+
class Ls extends D {
|
|
1193
1193
|
constructor(t, e, r, i) {
|
|
1194
1194
|
super(t);
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1195
|
+
g(this, "pos");
|
|
1196
|
+
g(this, "str");
|
|
1197
|
+
g(this, "not");
|
|
1198
1198
|
this.pos = e, this.str = r, this.not = i;
|
|
1199
1199
|
}
|
|
1200
1200
|
op() {
|
|
@@ -1204,7 +1204,7 @@ class Ls extends U {
|
|
|
1204
1204
|
return 40;
|
|
1205
1205
|
}
|
|
1206
1206
|
test(t) {
|
|
1207
|
-
const { val: e } =
|
|
1207
|
+
const { val: e } = T(t, this.path);
|
|
1208
1208
|
if (typeof e != "string")
|
|
1209
1209
|
return !1;
|
|
1210
1210
|
const r = e.length, i = Math.min(this.pos, r), o = Math.min(this.pos + this.str.length, r), h = e.substring(i, o) === this.str;
|
|
@@ -1213,7 +1213,7 @@ class Ls extends U {
|
|
|
1213
1213
|
toJson(t) {
|
|
1214
1214
|
const e = {
|
|
1215
1215
|
op: "test_string",
|
|
1216
|
-
path:
|
|
1216
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1217
1217
|
pos: this.pos,
|
|
1218
1218
|
str: this.str
|
|
1219
1219
|
};
|
|
@@ -1227,11 +1227,11 @@ class Ls extends U {
|
|
|
1227
1227
|
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);
|
|
1228
1228
|
}
|
|
1229
1229
|
}
|
|
1230
|
-
class Ns extends
|
|
1230
|
+
class Ns extends D {
|
|
1231
1231
|
constructor(t, e, r) {
|
|
1232
1232
|
super(t);
|
|
1233
|
-
|
|
1234
|
-
|
|
1233
|
+
g(this, "len");
|
|
1234
|
+
g(this, "not");
|
|
1235
1235
|
this.len = e, this.not = r;
|
|
1236
1236
|
}
|
|
1237
1237
|
op() {
|
|
@@ -1241,7 +1241,7 @@ class Ns extends U {
|
|
|
1241
1241
|
return 41;
|
|
1242
1242
|
}
|
|
1243
1243
|
test(t) {
|
|
1244
|
-
const { val: e } =
|
|
1244
|
+
const { val: e } = T(t, this.path);
|
|
1245
1245
|
if (typeof e != "string")
|
|
1246
1246
|
return !1;
|
|
1247
1247
|
const i = e.length >= this.len;
|
|
@@ -1250,7 +1250,7 @@ class Ns extends U {
|
|
|
1250
1250
|
toJson(t) {
|
|
1251
1251
|
const e = {
|
|
1252
1252
|
op: "test_string_len",
|
|
1253
|
-
path:
|
|
1253
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1254
1254
|
len: this.len
|
|
1255
1255
|
};
|
|
1256
1256
|
return this.not && (e.not = this.not), e;
|
|
@@ -1263,11 +1263,11 @@ class Ns extends U {
|
|
|
1263
1263
|
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);
|
|
1264
1264
|
}
|
|
1265
1265
|
}
|
|
1266
|
-
class Rs extends
|
|
1266
|
+
class Rs extends D {
|
|
1267
1267
|
constructor(t, e, r) {
|
|
1268
1268
|
super(t);
|
|
1269
|
-
|
|
1270
|
-
|
|
1269
|
+
g(this, "value");
|
|
1270
|
+
g(this, "ignore_case");
|
|
1271
1271
|
this.value = e, this.ignore_case = r;
|
|
1272
1272
|
}
|
|
1273
1273
|
op() {
|
|
@@ -1277,7 +1277,7 @@ class Rs extends U {
|
|
|
1277
1277
|
return 30;
|
|
1278
1278
|
}
|
|
1279
1279
|
test(t) {
|
|
1280
|
-
const { val: e } =
|
|
1280
|
+
const { val: e } = T(t, this.path);
|
|
1281
1281
|
if (typeof e != "string")
|
|
1282
1282
|
return !1;
|
|
1283
1283
|
const r = this.ignore_case ? e.toLowerCase() : e, i = this.ignore_case ? this.value.toLowerCase() : this.value;
|
|
@@ -1286,7 +1286,7 @@ class Rs extends U {
|
|
|
1286
1286
|
toJson(t) {
|
|
1287
1287
|
const e = {
|
|
1288
1288
|
op: "contains",
|
|
1289
|
-
path:
|
|
1289
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1290
1290
|
value: this.value
|
|
1291
1291
|
};
|
|
1292
1292
|
return this.ignore_case && (e.ignore_case = this.ignore_case), e;
|
|
@@ -1300,11 +1300,11 @@ class Rs extends U {
|
|
|
1300
1300
|
t.encodeArrayHeader(r ? 4 : 3), t.writer.u8(30), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeString(this.value), r && t.writer.u8(1);
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
1303
|
-
class
|
|
1303
|
+
class Ps extends D {
|
|
1304
1304
|
constructor(t, e, r) {
|
|
1305
1305
|
super(t);
|
|
1306
|
-
|
|
1307
|
-
|
|
1306
|
+
g(this, "value");
|
|
1307
|
+
g(this, "ignore_case");
|
|
1308
1308
|
this.value = e, this.ignore_case = r;
|
|
1309
1309
|
}
|
|
1310
1310
|
op() {
|
|
@@ -1314,7 +1314,7 @@ class Hs extends U {
|
|
|
1314
1314
|
return 32;
|
|
1315
1315
|
}
|
|
1316
1316
|
test(t) {
|
|
1317
|
-
const { val: e } =
|
|
1317
|
+
const { val: e } = T(t, this.path);
|
|
1318
1318
|
if (typeof e != "string")
|
|
1319
1319
|
return !1;
|
|
1320
1320
|
const r = this.ignore_case ? e.toLowerCase() : e, i = this.ignore_case ? this.value.toLowerCase() : this.value;
|
|
@@ -1323,7 +1323,7 @@ class Hs extends U {
|
|
|
1323
1323
|
toJson(t) {
|
|
1324
1324
|
const e = {
|
|
1325
1325
|
op: "ends",
|
|
1326
|
-
path:
|
|
1326
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1327
1327
|
value: this.value
|
|
1328
1328
|
};
|
|
1329
1329
|
return this.ignore_case && (e.ignore_case = this.ignore_case), e;
|
|
@@ -1337,11 +1337,11 @@ class Hs extends U {
|
|
|
1337
1337
|
t.encodeArrayHeader(r ? 4 : 3), t.writer.u8(32), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeString(this.value), r && t.writer.u8(1);
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
|
-
class
|
|
1340
|
+
class Hs extends D {
|
|
1341
1341
|
constructor(t, e, r) {
|
|
1342
1342
|
super(t);
|
|
1343
|
-
|
|
1344
|
-
|
|
1343
|
+
g(this, "value");
|
|
1344
|
+
g(this, "ignore_case");
|
|
1345
1345
|
this.value = e, this.ignore_case = r;
|
|
1346
1346
|
}
|
|
1347
1347
|
op() {
|
|
@@ -1351,7 +1351,7 @@ class Ps extends U {
|
|
|
1351
1351
|
return 37;
|
|
1352
1352
|
}
|
|
1353
1353
|
test(t) {
|
|
1354
|
-
const { val: e } =
|
|
1354
|
+
const { val: e } = T(t, this.path);
|
|
1355
1355
|
if (typeof e != "string")
|
|
1356
1356
|
return !1;
|
|
1357
1357
|
const r = this.ignore_case ? e.toLowerCase() : e, i = this.ignore_case ? this.value.toLowerCase() : this.value;
|
|
@@ -1360,7 +1360,7 @@ class Ps extends U {
|
|
|
1360
1360
|
toJson(t) {
|
|
1361
1361
|
const e = {
|
|
1362
1362
|
op: "starts",
|
|
1363
|
-
path:
|
|
1363
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1364
1364
|
value: this.value
|
|
1365
1365
|
};
|
|
1366
1366
|
return this.ignore_case && (e.ignore_case = this.ignore_case), e;
|
|
@@ -1374,10 +1374,10 @@ class Ps extends U {
|
|
|
1374
1374
|
t.encodeArrayHeader(r ? 4 : 3), t.writer.u8(37), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeString(this.value), r && t.writer.u8(1);
|
|
1375
1375
|
}
|
|
1376
1376
|
}
|
|
1377
|
-
class Is extends
|
|
1377
|
+
class Is extends D {
|
|
1378
1378
|
constructor(t, e) {
|
|
1379
1379
|
super(t);
|
|
1380
|
-
|
|
1380
|
+
g(this, "value");
|
|
1381
1381
|
this.value = e;
|
|
1382
1382
|
}
|
|
1383
1383
|
op() {
|
|
@@ -1387,16 +1387,16 @@ class Is extends U {
|
|
|
1387
1387
|
return 33;
|
|
1388
1388
|
}
|
|
1389
1389
|
test(t) {
|
|
1390
|
-
const { val: e } =
|
|
1390
|
+
const { val: e } = T(t, this.path);
|
|
1391
1391
|
for (const r of this.value)
|
|
1392
|
-
if (
|
|
1392
|
+
if (Ot(e, r))
|
|
1393
1393
|
return !0;
|
|
1394
1394
|
return !1;
|
|
1395
1395
|
}
|
|
1396
1396
|
toJson(t) {
|
|
1397
1397
|
return {
|
|
1398
1398
|
op: "in",
|
|
1399
|
-
path:
|
|
1399
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1400
1400
|
value: this.value
|
|
1401
1401
|
};
|
|
1402
1402
|
}
|
|
@@ -1407,10 +1407,10 @@ class Is extends U {
|
|
|
1407
1407
|
t.encodeArrayHeader(3), t.writer.u8(33), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeArray(this.value);
|
|
1408
1408
|
}
|
|
1409
1409
|
}
|
|
1410
|
-
class
|
|
1410
|
+
class Us extends D {
|
|
1411
1411
|
constructor(t, e) {
|
|
1412
1412
|
super(t);
|
|
1413
|
-
|
|
1413
|
+
g(this, "value");
|
|
1414
1414
|
this.value = e;
|
|
1415
1415
|
}
|
|
1416
1416
|
op() {
|
|
@@ -1420,13 +1420,13 @@ class Ds extends U {
|
|
|
1420
1420
|
return 34;
|
|
1421
1421
|
}
|
|
1422
1422
|
test(t) {
|
|
1423
|
-
const { val: e } =
|
|
1423
|
+
const { val: e } = T(t, this.path);
|
|
1424
1424
|
return typeof e != "number" ? !1 : e < this.value;
|
|
1425
1425
|
}
|
|
1426
1426
|
toJson(t) {
|
|
1427
1427
|
return {
|
|
1428
1428
|
op: "less",
|
|
1429
|
-
path:
|
|
1429
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1430
1430
|
value: this.value
|
|
1431
1431
|
};
|
|
1432
1432
|
}
|
|
@@ -1437,10 +1437,10 @@ class Ds extends U {
|
|
|
1437
1437
|
t.encodeArrayHeader(3), t.writer.u8(34), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeNumber(this.value);
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
|
-
class
|
|
1440
|
+
class Ds extends D {
|
|
1441
1441
|
constructor(t, e) {
|
|
1442
1442
|
super(t);
|
|
1443
|
-
|
|
1443
|
+
g(this, "value");
|
|
1444
1444
|
this.value = e;
|
|
1445
1445
|
}
|
|
1446
1446
|
op() {
|
|
@@ -1450,13 +1450,13 @@ class Us extends U {
|
|
|
1450
1450
|
return 36;
|
|
1451
1451
|
}
|
|
1452
1452
|
test(t) {
|
|
1453
|
-
const { val: e } =
|
|
1453
|
+
const { val: e } = T(t, this.path);
|
|
1454
1454
|
return typeof e != "number" ? !1 : e > this.value;
|
|
1455
1455
|
}
|
|
1456
1456
|
toJson(t) {
|
|
1457
1457
|
return {
|
|
1458
1458
|
op: "more",
|
|
1459
|
-
path:
|
|
1459
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1460
1460
|
value: this.value
|
|
1461
1461
|
};
|
|
1462
1462
|
}
|
|
@@ -1467,17 +1467,17 @@ class Us extends U {
|
|
|
1467
1467
|
t.encodeArrayHeader(3), t.writer.u8(36), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeNumber(this.value);
|
|
1468
1468
|
}
|
|
1469
1469
|
}
|
|
1470
|
-
class
|
|
1470
|
+
class Bt extends D {
|
|
1471
1471
|
constructor(t, e) {
|
|
1472
1472
|
super(t);
|
|
1473
|
-
|
|
1473
|
+
g(this, "ops");
|
|
1474
1474
|
this.ops = e;
|
|
1475
1475
|
}
|
|
1476
1476
|
}
|
|
1477
|
-
class Js extends
|
|
1477
|
+
class Js extends Bt {
|
|
1478
1478
|
constructor(t, e) {
|
|
1479
1479
|
super(t, e);
|
|
1480
|
-
|
|
1480
|
+
g(this, "ops");
|
|
1481
1481
|
this.ops = e;
|
|
1482
1482
|
}
|
|
1483
1483
|
op() {
|
|
@@ -1495,7 +1495,7 @@ class Js extends Ut {
|
|
|
1495
1495
|
toJson(t) {
|
|
1496
1496
|
return {
|
|
1497
1497
|
op: "and",
|
|
1498
|
-
path:
|
|
1498
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1499
1499
|
apply: this.ops.map((r) => r.toJson(this))
|
|
1500
1500
|
};
|
|
1501
1501
|
}
|
|
@@ -1515,10 +1515,10 @@ class Js extends Ut {
|
|
|
1515
1515
|
this.ops[o].encode(t, this);
|
|
1516
1516
|
}
|
|
1517
1517
|
}
|
|
1518
|
-
class Vs extends
|
|
1518
|
+
class Vs extends Bt {
|
|
1519
1519
|
constructor(t, e) {
|
|
1520
1520
|
super(t, e);
|
|
1521
|
-
|
|
1521
|
+
g(this, "ops");
|
|
1522
1522
|
this.ops = e;
|
|
1523
1523
|
}
|
|
1524
1524
|
op() {
|
|
@@ -1536,7 +1536,7 @@ class Vs extends Ut {
|
|
|
1536
1536
|
toJson(t) {
|
|
1537
1537
|
return {
|
|
1538
1538
|
op: "or",
|
|
1539
|
-
path:
|
|
1539
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1540
1540
|
apply: this.ops.map((r) => r.toJson(this))
|
|
1541
1541
|
};
|
|
1542
1542
|
}
|
|
@@ -1555,10 +1555,10 @@ class Vs extends Ut {
|
|
|
1555
1555
|
this.ops[i].encode(t, this);
|
|
1556
1556
|
}
|
|
1557
1557
|
}
|
|
1558
|
-
class Bs extends
|
|
1558
|
+
class Bs extends Bt {
|
|
1559
1559
|
constructor(t, e) {
|
|
1560
1560
|
super(t, e);
|
|
1561
|
-
|
|
1561
|
+
g(this, "ops");
|
|
1562
1562
|
this.ops = e;
|
|
1563
1563
|
}
|
|
1564
1564
|
op() {
|
|
@@ -1576,7 +1576,7 @@ class Bs extends Ut {
|
|
|
1576
1576
|
toJson(t) {
|
|
1577
1577
|
return {
|
|
1578
1578
|
op: "not",
|
|
1579
|
-
path:
|
|
1579
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1580
1580
|
apply: this.ops.map((r) => r.toJson(this))
|
|
1581
1581
|
};
|
|
1582
1582
|
}
|
|
@@ -1595,12 +1595,12 @@ class Bs extends Ut {
|
|
|
1595
1595
|
this.ops[i].encode(t, this);
|
|
1596
1596
|
}
|
|
1597
1597
|
}
|
|
1598
|
-
class Fs extends
|
|
1598
|
+
class Fs extends D {
|
|
1599
1599
|
constructor(t, e, r, i) {
|
|
1600
1600
|
super(t);
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1601
|
+
g(this, "value");
|
|
1602
|
+
g(this, "ignore_case");
|
|
1603
|
+
g(this, "matcher");
|
|
1604
1604
|
this.value = e, this.ignore_case = r, this.matcher = i(e, r);
|
|
1605
1605
|
}
|
|
1606
1606
|
op() {
|
|
@@ -1610,13 +1610,13 @@ class Fs extends U {
|
|
|
1610
1610
|
return 35;
|
|
1611
1611
|
}
|
|
1612
1612
|
test(t) {
|
|
1613
|
-
const { val: e } =
|
|
1613
|
+
const { val: e } = T(t, this.path);
|
|
1614
1614
|
return typeof e != "string" ? !1 : this.matcher(e);
|
|
1615
1615
|
}
|
|
1616
1616
|
toJson(t) {
|
|
1617
1617
|
const e = {
|
|
1618
1618
|
op: "matches",
|
|
1619
|
-
path:
|
|
1619
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1620
1620
|
value: this.value
|
|
1621
1621
|
};
|
|
1622
1622
|
return this.ignore_case && (e.ignore_case = this.ignore_case), e;
|
|
@@ -1631,10 +1631,10 @@ class Fs extends U {
|
|
|
1631
1631
|
}
|
|
1632
1632
|
}
|
|
1633
1633
|
const { isArray: zs } = Array;
|
|
1634
|
-
class Ws extends
|
|
1634
|
+
class Ws extends D {
|
|
1635
1635
|
constructor(t, e) {
|
|
1636
1636
|
super(t);
|
|
1637
|
-
|
|
1637
|
+
g(this, "value");
|
|
1638
1638
|
this.value = e;
|
|
1639
1639
|
}
|
|
1640
1640
|
op() {
|
|
@@ -1644,13 +1644,13 @@ class Ws extends U {
|
|
|
1644
1644
|
return 42;
|
|
1645
1645
|
}
|
|
1646
1646
|
test(t) {
|
|
1647
|
-
const { val: e } =
|
|
1647
|
+
const { val: e } = T(t, this.path);
|
|
1648
1648
|
return e === null ? this.value === "null" : zs(e) ? this.value === "array" : typeof e === this.value || typeof e == "number" && e === Math.round(e) && this.value === "integer";
|
|
1649
1649
|
}
|
|
1650
1650
|
toJson(t) {
|
|
1651
1651
|
return {
|
|
1652
1652
|
op: "type",
|
|
1653
|
-
path:
|
|
1653
|
+
path: $(t ? this.path.slice(t.path.length) : this.path),
|
|
1654
1654
|
value: this.value
|
|
1655
1655
|
};
|
|
1656
1656
|
}
|
|
@@ -1664,80 +1664,80 @@ class Ws extends U {
|
|
|
1664
1664
|
const Gs = (s, n) => {
|
|
1665
1665
|
switch (s.op) {
|
|
1666
1666
|
case "add":
|
|
1667
|
-
return new
|
|
1667
|
+
return new Vt(E(s.path), s.value);
|
|
1668
1668
|
case "remove":
|
|
1669
|
-
return new
|
|
1669
|
+
return new ve(E(s.path), s.oldValue);
|
|
1670
1670
|
case "replace":
|
|
1671
|
-
return new gs(
|
|
1671
|
+
return new gs(E(s.path), s.value, s.oldValue);
|
|
1672
1672
|
case "move":
|
|
1673
|
-
return new
|
|
1673
|
+
return new vs(E(s.path), E(s.from));
|
|
1674
1674
|
case "copy":
|
|
1675
|
-
return new
|
|
1675
|
+
return new ys(E(s.path), E(s.from));
|
|
1676
1676
|
case "flip":
|
|
1677
|
-
return new ws(
|
|
1677
|
+
return new ws(E(s.path));
|
|
1678
1678
|
case "inc":
|
|
1679
|
-
return new _s(
|
|
1679
|
+
return new _s(E(s.path), s.inc);
|
|
1680
1680
|
case "str_ins":
|
|
1681
|
-
return new bs(
|
|
1681
|
+
return new bs(E(s.path), s.pos, s.str);
|
|
1682
1682
|
case "str_del":
|
|
1683
|
-
return new Es(
|
|
1683
|
+
return new Es(E(s.path), s.pos, s.str, s.len);
|
|
1684
1684
|
case "split":
|
|
1685
|
-
return new
|
|
1685
|
+
return new $s(E(s.path), s.pos, s.props || null);
|
|
1686
1686
|
case "merge":
|
|
1687
|
-
return new As(
|
|
1687
|
+
return new As(E(s.path), s.pos, s.props || null);
|
|
1688
1688
|
case "extend":
|
|
1689
|
-
return new Os(
|
|
1689
|
+
return new Os(E(s.path), s.props, !!s.deleteNull);
|
|
1690
1690
|
default:
|
|
1691
|
-
return
|
|
1691
|
+
return Tt(s, n);
|
|
1692
1692
|
}
|
|
1693
|
-
},
|
|
1693
|
+
}, Tt = (s, n) => {
|
|
1694
1694
|
switch (s.op) {
|
|
1695
1695
|
case "test":
|
|
1696
|
-
return new ms(
|
|
1696
|
+
return new ms(E(s.path), s.value, !!s.not);
|
|
1697
1697
|
case "defined":
|
|
1698
|
-
return new js(
|
|
1698
|
+
return new js(E(s.path));
|
|
1699
1699
|
case "undefined":
|
|
1700
|
-
return new
|
|
1700
|
+
return new Ss(E(s.path));
|
|
1701
1701
|
case "type":
|
|
1702
|
-
return new Ws(
|
|
1702
|
+
return new Ws(E(s.path), s.value);
|
|
1703
1703
|
case "test_type":
|
|
1704
|
-
return new Ms(
|
|
1704
|
+
return new Ms(E(s.path), s.type);
|
|
1705
1705
|
case "test_string":
|
|
1706
|
-
return new Ls(
|
|
1706
|
+
return new Ls(E(s.path), s.pos, s.str, !!s.not);
|
|
1707
1707
|
case "test_string_len":
|
|
1708
|
-
return new Ns(
|
|
1708
|
+
return new Ns(E(s.path), s.len, !!s.not);
|
|
1709
1709
|
case "contains":
|
|
1710
|
-
return new Rs(
|
|
1710
|
+
return new Rs(E(s.path), s.value, !!s.ignore_case);
|
|
1711
1711
|
case "ends":
|
|
1712
|
-
return new
|
|
1712
|
+
return new Ps(E(s.path), s.value, !!s.ignore_case);
|
|
1713
1713
|
case "starts":
|
|
1714
|
-
return new
|
|
1714
|
+
return new Hs(E(s.path), s.value, !!s.ignore_case);
|
|
1715
1715
|
case "matches":
|
|
1716
|
-
return new Fs(
|
|
1716
|
+
return new Fs(E(s.path), s.value, !!s.ignore_case, n.createMatcher || Cs);
|
|
1717
1717
|
case "in":
|
|
1718
|
-
return new Is(
|
|
1718
|
+
return new Is(E(s.path), s.value);
|
|
1719
1719
|
case "less":
|
|
1720
|
-
return new
|
|
1720
|
+
return new Us(E(s.path), s.value);
|
|
1721
1721
|
case "more":
|
|
1722
|
-
return new
|
|
1722
|
+
return new Ds(E(s.path), s.value);
|
|
1723
1723
|
case "and": {
|
|
1724
|
-
const t =
|
|
1725
|
-
return new Js(t, s.apply.map((e) =>
|
|
1724
|
+
const t = E(s.path);
|
|
1725
|
+
return new Js(t, s.apply.map((e) => Tt({ ...e, path: [...t, ...E(e.path)] }, n)));
|
|
1726
1726
|
}
|
|
1727
1727
|
case "or": {
|
|
1728
|
-
const t =
|
|
1729
|
-
return new Vs(t, s.apply.map((e) =>
|
|
1728
|
+
const t = E(s.path);
|
|
1729
|
+
return new Vs(t, s.apply.map((e) => Tt({ ...e, path: [...t, ...E(e.path)] }, n)));
|
|
1730
1730
|
}
|
|
1731
1731
|
case "not": {
|
|
1732
|
-
const t =
|
|
1733
|
-
return new Bs(t, s.apply.map((e) =>
|
|
1732
|
+
const t = E(s.path);
|
|
1733
|
+
return new Bs(t, s.apply.map((e) => Tt({ ...e, path: [...t, ...E(e.path)] }, n)));
|
|
1734
1734
|
}
|
|
1735
1735
|
default:
|
|
1736
1736
|
throw new Error("OP_UNKNOWN");
|
|
1737
1737
|
}
|
|
1738
1738
|
};
|
|
1739
1739
|
function Xs(s, n, t) {
|
|
1740
|
-
t.mutate || (s =
|
|
1740
|
+
t.mutate || (s = mt(s));
|
|
1741
1741
|
const e = [], r = n.length;
|
|
1742
1742
|
for (let i = 0; i < r; i++) {
|
|
1743
1743
|
const h = Gs(n[i], t).apply(s);
|
|
@@ -1745,9 +1745,9 @@ function Xs(s, n, t) {
|
|
|
1745
1745
|
}
|
|
1746
1746
|
return { doc: s, res: e };
|
|
1747
1747
|
}
|
|
1748
|
-
var
|
|
1748
|
+
var dt = (s) => typeof s == "function" ? s : function() {
|
|
1749
1749
|
return s;
|
|
1750
|
-
}, qs = typeof self < "u" ? self : null,
|
|
1750
|
+
}, qs = typeof self < "u" ? self : null, ut = typeof window < "u" ? window : null, gt = qs || ut || gt, Ys = "2.0.0", F = { connecting: 0, open: 1, closing: 2, closed: 3 }, Zs = 1e4, Qs = 1e3, J = {
|
|
1751
1751
|
closed: "closed",
|
|
1752
1752
|
errored: "errored",
|
|
1753
1753
|
joined: "joined",
|
|
@@ -1759,12 +1759,12 @@ var lt = (s) => typeof s == "function" ? s : function() {
|
|
|
1759
1759
|
join: "phx_join",
|
|
1760
1760
|
reply: "phx_reply",
|
|
1761
1761
|
leave: "phx_leave"
|
|
1762
|
-
},
|
|
1762
|
+
}, Jt = {
|
|
1763
1763
|
longpoll: "longpoll",
|
|
1764
1764
|
websocket: "websocket"
|
|
1765
1765
|
}, Ks = {
|
|
1766
1766
|
complete: 4
|
|
1767
|
-
},
|
|
1767
|
+
}, Ct = class {
|
|
1768
1768
|
constructor(s, n, t, e) {
|
|
1769
1769
|
this.channel = s, this.event = n, this.payload = t || function() {
|
|
1770
1770
|
return {};
|
|
@@ -1810,7 +1810,7 @@ var lt = (s) => typeof s == "function" ? s : function() {
|
|
|
1810
1810
|
trigger(s, n) {
|
|
1811
1811
|
this.channel.trigger(this.refEvent, { status: s, response: n });
|
|
1812
1812
|
}
|
|
1813
|
-
},
|
|
1813
|
+
}, ye = class {
|
|
1814
1814
|
constructor(s, n) {
|
|
1815
1815
|
this.callback = s, this.timerCalc = n, this.timer = null, this.tries = 0;
|
|
1816
1816
|
}
|
|
@@ -1824,20 +1824,20 @@ var lt = (s) => typeof s == "function" ? s : function() {
|
|
|
1824
1824
|
}
|
|
1825
1825
|
}, tn = class {
|
|
1826
1826
|
constructor(s, n, t) {
|
|
1827
|
-
this.state =
|
|
1827
|
+
this.state = J.closed, this.topic = s, this.params = dt(n || {}), this.socket = t, this.bindings = [], this.bindingRef = 0, this.timeout = this.socket.timeout, this.joinedOnce = !1, this.joinPush = new Ct(this, G.join, this.params, this.timeout), this.pushBuffer = [], this.stateChangeRefs = [], this.rejoinTimer = new ye(() => {
|
|
1828
1828
|
this.socket.isConnected() && this.rejoin();
|
|
1829
1829
|
}, this.socket.rejoinAfterMs), this.stateChangeRefs.push(this.socket.onError(() => this.rejoinTimer.reset())), this.stateChangeRefs.push(this.socket.onOpen(() => {
|
|
1830
1830
|
this.rejoinTimer.reset(), this.isErrored() && this.rejoin();
|
|
1831
1831
|
})), this.joinPush.receive("ok", () => {
|
|
1832
|
-
this.state =
|
|
1832
|
+
this.state = J.joined, this.rejoinTimer.reset(), this.pushBuffer.forEach((e) => e.send()), this.pushBuffer = [];
|
|
1833
1833
|
}), this.joinPush.receive("error", () => {
|
|
1834
|
-
this.state =
|
|
1834
|
+
this.state = J.errored, this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
|
|
1835
1835
|
}), this.onClose(() => {
|
|
1836
|
-
this.rejoinTimer.reset(), this.socket.hasLogger() && this.socket.log("channel", `close ${this.topic} ${this.joinRef()}`), this.state =
|
|
1836
|
+
this.rejoinTimer.reset(), this.socket.hasLogger() && this.socket.log("channel", `close ${this.topic} ${this.joinRef()}`), this.state = J.closed, this.socket.remove(this);
|
|
1837
1837
|
}), this.onError((e) => {
|
|
1838
|
-
this.socket.hasLogger() && this.socket.log("channel", `error ${this.topic}`, e), this.isJoining() && this.joinPush.reset(), this.state =
|
|
1838
|
+
this.socket.hasLogger() && this.socket.log("channel", `error ${this.topic}`, e), this.isJoining() && this.joinPush.reset(), this.state = J.errored, this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
|
|
1839
1839
|
}), this.joinPush.receive("timeout", () => {
|
|
1840
|
-
this.socket.hasLogger() && this.socket.log("channel", `timeout ${this.topic} (${this.joinRef()})`, this.joinPush.timeout), new
|
|
1840
|
+
this.socket.hasLogger() && this.socket.log("channel", `timeout ${this.topic} (${this.joinRef()})`, this.joinPush.timeout), new Ct(this, G.leave, dt({}), this.timeout).send(), this.state = J.errored, this.joinPush.reset(), this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
|
|
1841
1841
|
}), this.on(G.reply, (e, r) => {
|
|
1842
1842
|
this.trigger(this.replyEventName(r), e);
|
|
1843
1843
|
});
|
|
@@ -1866,16 +1866,16 @@ var lt = (s) => typeof s == "function" ? s : function() {
|
|
|
1866
1866
|
push(s, n, t = this.timeout) {
|
|
1867
1867
|
if (n = n || {}, !this.joinedOnce)
|
|
1868
1868
|
throw new Error(`tried to push '${s}' to '${this.topic}' before joining. Use channel.join() before pushing events`);
|
|
1869
|
-
let e = new
|
|
1869
|
+
let e = new Ct(this, s, function() {
|
|
1870
1870
|
return n;
|
|
1871
1871
|
}, t);
|
|
1872
1872
|
return this.canPush() ? e.send() : (e.startTimeout(), this.pushBuffer.push(e)), e;
|
|
1873
1873
|
}
|
|
1874
1874
|
leave(s = this.timeout) {
|
|
1875
|
-
this.rejoinTimer.reset(), this.joinPush.cancelTimeout(), this.state =
|
|
1875
|
+
this.rejoinTimer.reset(), this.joinPush.cancelTimeout(), this.state = J.leaving;
|
|
1876
1876
|
let n = () => {
|
|
1877
1877
|
this.socket.hasLogger() && this.socket.log("channel", `leave ${this.topic}`), this.trigger(G.close, "leave");
|
|
1878
|
-
}, t = new
|
|
1878
|
+
}, t = new Ct(this, G.leave, dt({}), s);
|
|
1879
1879
|
return t.receive("ok", () => n()).receive("timeout", () => n()), t.send(), this.canPush() || t.trigger("ok", {}), t;
|
|
1880
1880
|
}
|
|
1881
1881
|
onMessage(s, n, t) {
|
|
@@ -1888,7 +1888,7 @@ var lt = (s) => typeof s == "function" ? s : function() {
|
|
|
1888
1888
|
return this.joinPush.ref;
|
|
1889
1889
|
}
|
|
1890
1890
|
rejoin(s = this.timeout) {
|
|
1891
|
-
this.isLeaving() || (this.socket.leaveOpenTopic(this.topic), this.state =
|
|
1891
|
+
this.isLeaving() || (this.socket.leaveOpenTopic(this.topic), this.state = J.joining, this.joinPush.resend(s));
|
|
1892
1892
|
}
|
|
1893
1893
|
trigger(s, n, t, e) {
|
|
1894
1894
|
let r = this.onMessage(s, n, t, e);
|
|
@@ -1902,27 +1902,27 @@ var lt = (s) => typeof s == "function" ? s : function() {
|
|
|
1902
1902
|
return `chan_reply_${s}`;
|
|
1903
1903
|
}
|
|
1904
1904
|
isClosed() {
|
|
1905
|
-
return this.state ===
|
|
1905
|
+
return this.state === J.closed;
|
|
1906
1906
|
}
|
|
1907
1907
|
isErrored() {
|
|
1908
|
-
return this.state ===
|
|
1908
|
+
return this.state === J.errored;
|
|
1909
1909
|
}
|
|
1910
1910
|
isJoined() {
|
|
1911
|
-
return this.state ===
|
|
1911
|
+
return this.state === J.joined;
|
|
1912
1912
|
}
|
|
1913
1913
|
isJoining() {
|
|
1914
|
-
return this.state ===
|
|
1914
|
+
return this.state === J.joining;
|
|
1915
1915
|
}
|
|
1916
1916
|
isLeaving() {
|
|
1917
|
-
return this.state ===
|
|
1917
|
+
return this.state === J.leaving;
|
|
1918
1918
|
}
|
|
1919
|
-
},
|
|
1919
|
+
}, jt = class {
|
|
1920
1920
|
static request(s, n, t, e, r, i, o) {
|
|
1921
|
-
if (
|
|
1922
|
-
let h = new
|
|
1921
|
+
if (gt.XDomainRequest) {
|
|
1922
|
+
let h = new gt.XDomainRequest();
|
|
1923
1923
|
return this.xdomainRequest(h, s, n, e, r, i, o);
|
|
1924
1924
|
} else {
|
|
1925
|
-
let h = new
|
|
1925
|
+
let h = new gt.XMLHttpRequest();
|
|
1926
1926
|
return this.xhrRequest(h, s, n, t, e, r, i, o);
|
|
1927
1927
|
}
|
|
1928
1928
|
}
|
|
@@ -1936,8 +1936,8 @@ var lt = (s) => typeof s == "function" ? s : function() {
|
|
|
1936
1936
|
static xhrRequest(s, n, t, e, r, i, o, h) {
|
|
1937
1937
|
return s.open(n, t, !0), s.timeout = i, s.setRequestHeader("Content-Type", e), s.onerror = () => h && h(null), s.onreadystatechange = () => {
|
|
1938
1938
|
if (s.readyState === Ks.complete && h) {
|
|
1939
|
-
let
|
|
1940
|
-
h(
|
|
1939
|
+
let p = this.parseJSON(s.responseText);
|
|
1940
|
+
h(p);
|
|
1941
1941
|
}
|
|
1942
1942
|
}, o && (s.ontimeout = o), s.send(r), s;
|
|
1943
1943
|
}
|
|
@@ -1966,7 +1966,7 @@ var lt = (s) => typeof s == "function" ? s : function() {
|
|
|
1966
1966
|
let t = s.match(/\?/) ? "&" : "?";
|
|
1967
1967
|
return `${s}${t}${this.serialize(n)}`;
|
|
1968
1968
|
}
|
|
1969
|
-
},
|
|
1969
|
+
}, Pt = class {
|
|
1970
1970
|
constructor(s) {
|
|
1971
1971
|
this.endPoint = null, this.token = null, this.skipHeartbeat = !0, this.reqs = /* @__PURE__ */ new Set(), this.onopen = function() {
|
|
1972
1972
|
}, this.onerror = function() {
|
|
@@ -1975,10 +1975,10 @@ var lt = (s) => typeof s == "function" ? s : function() {
|
|
|
1975
1975
|
}, this.pollEndpoint = this.normalizeEndpoint(s), this.readyState = F.connecting, this.poll();
|
|
1976
1976
|
}
|
|
1977
1977
|
normalizeEndpoint(s) {
|
|
1978
|
-
return s.replace("ws://", "http://").replace("wss://", "https://").replace(new RegExp("(.*)/" +
|
|
1978
|
+
return s.replace("ws://", "http://").replace("wss://", "https://").replace(new RegExp("(.*)/" + Jt.websocket), "$1/" + Jt.longpoll);
|
|
1979
1979
|
}
|
|
1980
1980
|
endpointURL() {
|
|
1981
|
-
return
|
|
1981
|
+
return jt.appendParams(this.pollEndpoint, { token: this.token });
|
|
1982
1982
|
}
|
|
1983
1983
|
closeAndRetry(s, n, t) {
|
|
1984
1984
|
this.close(s, n, t), this.readyState = F.connecting;
|
|
@@ -2036,11 +2036,11 @@ var lt = (s) => typeof s == "function" ? s : function() {
|
|
|
2036
2036
|
let r, i = () => {
|
|
2037
2037
|
this.reqs.delete(r), t();
|
|
2038
2038
|
};
|
|
2039
|
-
r =
|
|
2039
|
+
r = jt.request(s, this.endpointURL(), "application/json", n, this.timeout, i, (o) => {
|
|
2040
2040
|
this.reqs.delete(r), this.isActive() && e(o);
|
|
2041
2041
|
}), this.reqs.add(r);
|
|
2042
2042
|
}
|
|
2043
|
-
},
|
|
2043
|
+
}, $t = {
|
|
2044
2044
|
HEADER_LENGTH: 1,
|
|
2045
2045
|
META_LENGTH: 4,
|
|
2046
2046
|
KINDS: { push: 0, reply: 1, broadcast: 2 },
|
|
@@ -2061,10 +2061,10 @@ var lt = (s) => typeof s == "function" ? s : function() {
|
|
|
2061
2061
|
}
|
|
2062
2062
|
},
|
|
2063
2063
|
binaryEncode(s) {
|
|
2064
|
-
let { join_ref: n, ref: t, event: e, topic: r, payload: i } = s, o = this.META_LENGTH + n.length + t.length + r.length + e.length, h = new ArrayBuffer(this.HEADER_LENGTH + o),
|
|
2065
|
-
|
|
2066
|
-
var
|
|
2067
|
-
return
|
|
2064
|
+
let { join_ref: n, ref: t, event: e, topic: r, payload: i } = s, o = this.META_LENGTH + n.length + t.length + r.length + e.length, h = new ArrayBuffer(this.HEADER_LENGTH + o), p = new DataView(h), f = 0;
|
|
2065
|
+
p.setUint8(f++, this.KINDS.push), p.setUint8(f++, n.length), p.setUint8(f++, t.length), p.setUint8(f++, r.length), p.setUint8(f++, e.length), Array.from(n, (_) => p.setUint8(f++, _.charCodeAt(0))), Array.from(t, (_) => p.setUint8(f++, _.charCodeAt(0))), Array.from(r, (_) => p.setUint8(f++, _.charCodeAt(0))), Array.from(e, (_) => p.setUint8(f++, _.charCodeAt(0)));
|
|
2066
|
+
var d = new Uint8Array(h.byteLength + i.byteLength);
|
|
2067
|
+
return d.set(new Uint8Array(h), 0), d.set(new Uint8Array(i), h.byteLength), d.buffer;
|
|
2068
2068
|
},
|
|
2069
2069
|
binaryDecode(s) {
|
|
2070
2070
|
let n = new DataView(s), t = n.getUint8(0), e = new TextDecoder();
|
|
@@ -2080,47 +2080,47 @@ var lt = (s) => typeof s == "function" ? s : function() {
|
|
|
2080
2080
|
decodePush(s, n, t) {
|
|
2081
2081
|
let e = n.getUint8(1), r = n.getUint8(2), i = n.getUint8(3), o = this.HEADER_LENGTH + this.META_LENGTH - 1, h = t.decode(s.slice(o, o + e));
|
|
2082
2082
|
o = o + e;
|
|
2083
|
-
let
|
|
2083
|
+
let p = t.decode(s.slice(o, o + r));
|
|
2084
2084
|
o = o + r;
|
|
2085
|
-
let
|
|
2085
|
+
let f = t.decode(s.slice(o, o + i));
|
|
2086
2086
|
o = o + i;
|
|
2087
|
-
let
|
|
2088
|
-
return { join_ref: h, ref: null, topic:
|
|
2087
|
+
let d = s.slice(o, s.byteLength);
|
|
2088
|
+
return { join_ref: h, ref: null, topic: p, event: f, payload: d };
|
|
2089
2089
|
},
|
|
2090
2090
|
decodeReply(s, n, t) {
|
|
2091
|
-
let e = n.getUint8(1), r = n.getUint8(2), i = n.getUint8(3), o = n.getUint8(4), h = this.HEADER_LENGTH + this.META_LENGTH,
|
|
2091
|
+
let e = n.getUint8(1), r = n.getUint8(2), i = n.getUint8(3), o = n.getUint8(4), h = this.HEADER_LENGTH + this.META_LENGTH, p = t.decode(s.slice(h, h + e));
|
|
2092
2092
|
h = h + e;
|
|
2093
|
-
let
|
|
2093
|
+
let f = t.decode(s.slice(h, h + r));
|
|
2094
2094
|
h = h + r;
|
|
2095
|
-
let
|
|
2095
|
+
let d = t.decode(s.slice(h, h + i));
|
|
2096
2096
|
h = h + i;
|
|
2097
|
-
let
|
|
2097
|
+
let _ = t.decode(s.slice(h, h + o));
|
|
2098
2098
|
h = h + o;
|
|
2099
|
-
let
|
|
2100
|
-
return { join_ref:
|
|
2099
|
+
let A = s.slice(h, s.byteLength), O = { status: _, response: A };
|
|
2100
|
+
return { join_ref: p, ref: f, topic: d, event: G.reply, payload: O };
|
|
2101
2101
|
},
|
|
2102
2102
|
decodeBroadcast(s, n, t) {
|
|
2103
2103
|
let e = n.getUint8(1), r = n.getUint8(2), i = this.HEADER_LENGTH + 2, o = t.decode(s.slice(i, i + e));
|
|
2104
2104
|
i = i + e;
|
|
2105
2105
|
let h = t.decode(s.slice(i, i + r));
|
|
2106
2106
|
i = i + r;
|
|
2107
|
-
let
|
|
2108
|
-
return { join_ref: null, ref: null, topic: o, event: h, payload:
|
|
2107
|
+
let p = s.slice(i, s.byteLength);
|
|
2108
|
+
return { join_ref: null, ref: null, topic: o, event: h, payload: p };
|
|
2109
2109
|
}
|
|
2110
2110
|
}, en = class {
|
|
2111
2111
|
constructor(s, n = {}) {
|
|
2112
|
-
this.stateChangeCallbacks = { open: [], close: [], error: [], message: [] }, this.channels = [], this.sendBuffer = [], this.ref = 0, this.timeout = n.timeout || Zs, this.transport = n.transport ||
|
|
2112
|
+
this.stateChangeCallbacks = { open: [], close: [], error: [], message: [] }, this.channels = [], this.sendBuffer = [], this.ref = 0, this.timeout = n.timeout || Zs, this.transport = n.transport || gt.WebSocket || Pt, this.establishedConnections = 0, this.defaultEncoder = $t.encode.bind($t), this.defaultDecoder = $t.decode.bind($t), this.closeWasClean = !1, this.binaryType = n.binaryType || "arraybuffer", this.connectClock = 1, this.transport !== Pt ? (this.encode = n.encode || this.defaultEncoder, this.decode = n.decode || this.defaultDecoder) : (this.encode = this.defaultEncoder, this.decode = this.defaultDecoder);
|
|
2113
2113
|
let t = null;
|
|
2114
|
-
|
|
2114
|
+
ut && ut.addEventListener && (ut.addEventListener("pagehide", (e) => {
|
|
2115
2115
|
this.conn && (this.disconnect(), t = this.connectClock);
|
|
2116
|
-
}),
|
|
2116
|
+
}), ut.addEventListener("pageshow", (e) => {
|
|
2117
2117
|
t === this.connectClock && (t = null, this.connect());
|
|
2118
|
-
})), this.heartbeatIntervalMs = n.heartbeatIntervalMs || 3e4, this.rejoinAfterMs = (e) => n.rejoinAfterMs ? n.rejoinAfterMs(e) : [1e3, 2e3, 5e3][e - 1] || 1e4, this.reconnectAfterMs = (e) => n.reconnectAfterMs ? n.reconnectAfterMs(e) : [10, 50, 100, 150, 200, 250, 500, 1e3, 2e3][e - 1] || 5e3, this.logger = n.logger || null, this.longpollerTimeout = n.longpollerTimeout || 2e4, this.params =
|
|
2118
|
+
})), this.heartbeatIntervalMs = n.heartbeatIntervalMs || 3e4, this.rejoinAfterMs = (e) => n.rejoinAfterMs ? n.rejoinAfterMs(e) : [1e3, 2e3, 5e3][e - 1] || 1e4, this.reconnectAfterMs = (e) => n.reconnectAfterMs ? n.reconnectAfterMs(e) : [10, 50, 100, 150, 200, 250, 500, 1e3, 2e3][e - 1] || 5e3, this.logger = n.logger || null, this.longpollerTimeout = n.longpollerTimeout || 2e4, this.params = dt(n.params || {}), this.endPoint = `${s}/${Jt.websocket}`, this.vsn = n.vsn || Ys, this.heartbeatTimeoutTimer = null, this.heartbeatTimer = null, this.pendingHeartbeatRef = null, this.reconnectTimer = new ye(() => {
|
|
2119
2119
|
this.teardown(() => this.connect());
|
|
2120
2120
|
}, this.reconnectAfterMs);
|
|
2121
2121
|
}
|
|
2122
2122
|
getLongPollTransport() {
|
|
2123
|
-
return
|
|
2123
|
+
return Pt;
|
|
2124
2124
|
}
|
|
2125
2125
|
replaceTransport(s) {
|
|
2126
2126
|
this.connectClock++, this.closeWasClean = !0, this.reconnectTimer.reset(), this.sendBuffer = [], this.conn && (this.conn.close(), this.conn = null), this.transport = s;
|
|
@@ -2129,14 +2129,14 @@ var lt = (s) => typeof s == "function" ? s : function() {
|
|
|
2129
2129
|
return location.protocol.match(/^https/) ? "wss" : "ws";
|
|
2130
2130
|
}
|
|
2131
2131
|
endPointURL() {
|
|
2132
|
-
let s =
|
|
2132
|
+
let s = jt.appendParams(jt.appendParams(this.endPoint, this.params()), { vsn: this.vsn });
|
|
2133
2133
|
return s.charAt(0) !== "/" ? s : s.charAt(1) === "/" ? `${this.protocol()}:${s}` : `${this.protocol()}://${location.host}${s}`;
|
|
2134
2134
|
}
|
|
2135
2135
|
disconnect(s, n, t) {
|
|
2136
2136
|
this.connectClock++, this.closeWasClean = !0, this.reconnectTimer.reset(), this.teardown(s, n, t);
|
|
2137
2137
|
}
|
|
2138
2138
|
connect(s) {
|
|
2139
|
-
s && (console && console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"), this.params =
|
|
2139
|
+
s && (console && console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"), this.params = dt(s)), !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 = (n) => this.onConnError(n), this.conn.onmessage = (n) => this.onConnMessage(n), this.conn.onclose = (n) => this.onConnClose(n));
|
|
2140
2140
|
}
|
|
2141
2141
|
log(s, n, t) {
|
|
2142
2142
|
this.logger(s, n, t);
|
|
@@ -2277,12 +2277,12 @@ var lt = (s) => typeof s == "function" ? s : function() {
|
|
|
2277
2277
|
let { topic: t, event: e, payload: r, ref: i, join_ref: o } = n;
|
|
2278
2278
|
i && i === this.pendingHeartbeatRef && (this.clearHeartbeats(), this.pendingHeartbeatRef = null, this.heartbeatTimer = setTimeout(() => this.sendHeartbeat(), this.heartbeatIntervalMs)), this.hasLogger() && this.log("receive", `${r.status || ""} ${t} ${e} ${i && "(" + i + ")" || ""}`, r);
|
|
2279
2279
|
for (let h = 0; h < this.channels.length; h++) {
|
|
2280
|
-
const
|
|
2281
|
-
|
|
2280
|
+
const p = this.channels[h];
|
|
2281
|
+
p.isMember(t, e, r, o) && p.trigger(e, r, i, o);
|
|
2282
2282
|
}
|
|
2283
2283
|
for (let h = 0; h < this.stateChangeCallbacks.message.length; h++) {
|
|
2284
|
-
let [,
|
|
2285
|
-
|
|
2284
|
+
let [, p] = this.stateChangeCallbacks.message[h];
|
|
2285
|
+
p(n);
|
|
2286
2286
|
}
|
|
2287
2287
|
});
|
|
2288
2288
|
}
|
|
@@ -2398,243 +2398,243 @@ var ne;
|
|
|
2398
2398
|
var t = typeof se == "object" ? se : typeof self == "object" ? self : typeof this == "object" ? this : Function("return this;")(), e = r(s);
|
|
2399
2399
|
typeof t.Reflect > "u" ? t.Reflect = s : e = r(t.Reflect, e), n(e);
|
|
2400
2400
|
function r(i, o) {
|
|
2401
|
-
return function(h,
|
|
2402
|
-
typeof i[h] != "function" && Object.defineProperty(i, h, { configurable: !0, writable: !0, value:
|
|
2401
|
+
return function(h, p) {
|
|
2402
|
+
typeof i[h] != "function" && Object.defineProperty(i, h, { configurable: !0, writable: !0, value: p }), o && o(h, p);
|
|
2403
2403
|
};
|
|
2404
2404
|
}
|
|
2405
2405
|
})(function(n) {
|
|
2406
|
-
var t = Object.prototype.hasOwnProperty, e = typeof Symbol == "function", r = e && typeof Symbol.toPrimitive < "u" ? Symbol.toPrimitive : "@@toPrimitive", i = e && typeof Symbol.iterator < "u" ? Symbol.iterator : "@@iterator", o = typeof Object.create == "function", h = { __proto__: [] } instanceof Array,
|
|
2406
|
+
var t = Object.prototype.hasOwnProperty, e = typeof Symbol == "function", r = e && typeof Symbol.toPrimitive < "u" ? Symbol.toPrimitive : "@@toPrimitive", i = e && typeof Symbol.iterator < "u" ? Symbol.iterator : "@@iterator", o = typeof Object.create == "function", h = { __proto__: [] } instanceof Array, p = !o && !h, f = {
|
|
2407
2407
|
// create an object in dictionary mode (a.k.a. "slow" mode in v8)
|
|
2408
2408
|
create: o ? function() {
|
|
2409
|
-
return
|
|
2409
|
+
return Lt(/* @__PURE__ */ Object.create(null));
|
|
2410
2410
|
} : h ? function() {
|
|
2411
|
-
return
|
|
2411
|
+
return Lt({ __proto__: null });
|
|
2412
2412
|
} : function() {
|
|
2413
|
-
return
|
|
2413
|
+
return Lt({});
|
|
2414
2414
|
},
|
|
2415
|
-
has:
|
|
2415
|
+
has: p ? function(a, c) {
|
|
2416
2416
|
return t.call(a, c);
|
|
2417
2417
|
} : function(a, c) {
|
|
2418
2418
|
return c in a;
|
|
2419
2419
|
},
|
|
2420
|
-
get:
|
|
2420
|
+
get: p ? function(a, c) {
|
|
2421
2421
|
return t.call(a, c) ? a[c] : void 0;
|
|
2422
2422
|
} : function(a, c) {
|
|
2423
2423
|
return a[c];
|
|
2424
2424
|
}
|
|
2425
|
-
},
|
|
2426
|
-
function
|
|
2427
|
-
if (
|
|
2425
|
+
}, d = Object.getPrototypeOf(Function), _ = typeof process == "object" && process.env && process.env.REFLECT_METADATA_USE_MAP_POLYFILL === "true", A = !_ && typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : Oe(), O = !_ && typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : je(), M = !_ && typeof WeakMap == "function" ? WeakMap : Se(), H = new M();
|
|
2426
|
+
function N(a, c, l, u) {
|
|
2427
|
+
if (R(l)) {
|
|
2428
2428
|
if (!Gt(a))
|
|
2429
2429
|
throw new TypeError();
|
|
2430
2430
|
if (!Xt(c))
|
|
2431
2431
|
throw new TypeError();
|
|
2432
|
-
return
|
|
2432
|
+
return U(a, c);
|
|
2433
2433
|
} else {
|
|
2434
2434
|
if (!Gt(a))
|
|
2435
2435
|
throw new TypeError();
|
|
2436
|
-
if (!
|
|
2436
|
+
if (!P(c))
|
|
2437
2437
|
throw new TypeError();
|
|
2438
|
-
if (!
|
|
2438
|
+
if (!P(u) && !R(u) && !rt(u))
|
|
2439
2439
|
throw new TypeError();
|
|
2440
|
-
return
|
|
2440
|
+
return rt(u) && (u = void 0), l = z(l), nt(a, c, l, u);
|
|
2441
2441
|
}
|
|
2442
2442
|
}
|
|
2443
|
-
n("decorate",
|
|
2443
|
+
n("decorate", N);
|
|
2444
2444
|
function X(a, c) {
|
|
2445
|
-
function l(
|
|
2446
|
-
if (!
|
|
2445
|
+
function l(u, v) {
|
|
2446
|
+
if (!P(u))
|
|
2447
2447
|
throw new TypeError();
|
|
2448
|
-
if (!
|
|
2448
|
+
if (!R(v) && !ke(v))
|
|
2449
2449
|
throw new TypeError();
|
|
2450
|
-
|
|
2450
|
+
kt(a, c, u, v);
|
|
2451
2451
|
}
|
|
2452
2452
|
return l;
|
|
2453
2453
|
}
|
|
2454
2454
|
n("metadata", X);
|
|
2455
|
-
function q(a, c, l,
|
|
2456
|
-
if (!
|
|
2455
|
+
function q(a, c, l, u) {
|
|
2456
|
+
if (!P(l))
|
|
2457
2457
|
throw new TypeError();
|
|
2458
|
-
return
|
|
2458
|
+
return R(u) || (u = z(u)), kt(a, c, l, u);
|
|
2459
2459
|
}
|
|
2460
2460
|
n("defineMetadata", q);
|
|
2461
|
-
function
|
|
2462
|
-
if (!
|
|
2461
|
+
function Q(a, c, l) {
|
|
2462
|
+
if (!P(c))
|
|
2463
2463
|
throw new TypeError();
|
|
2464
|
-
return
|
|
2464
|
+
return R(l) || (l = z(l)), Y(a, c, l);
|
|
2465
2465
|
}
|
|
2466
|
-
n("hasMetadata",
|
|
2467
|
-
function
|
|
2468
|
-
if (!
|
|
2466
|
+
n("hasMetadata", Q);
|
|
2467
|
+
function K(a, c, l) {
|
|
2468
|
+
if (!P(c))
|
|
2469
2469
|
throw new TypeError();
|
|
2470
|
-
return
|
|
2470
|
+
return R(l) || (l = z(l)), S(a, c, l);
|
|
2471
2471
|
}
|
|
2472
|
-
n("hasOwnMetadata",
|
|
2473
|
-
function
|
|
2474
|
-
if (!
|
|
2472
|
+
n("hasOwnMetadata", K);
|
|
2473
|
+
function tt(a, c, l) {
|
|
2474
|
+
if (!P(c))
|
|
2475
2475
|
throw new TypeError();
|
|
2476
|
-
return
|
|
2476
|
+
return R(l) || (l = z(l)), lt(a, c, l);
|
|
2477
2477
|
}
|
|
2478
|
-
n("getMetadata",
|
|
2479
|
-
function
|
|
2480
|
-
if (!
|
|
2478
|
+
n("getMetadata", tt);
|
|
2479
|
+
function et(a, c, l) {
|
|
2480
|
+
if (!P(c))
|
|
2481
2481
|
throw new TypeError();
|
|
2482
|
-
return
|
|
2482
|
+
return R(l) || (l = z(l)), Et(a, c, l);
|
|
2483
2483
|
}
|
|
2484
|
-
n("getOwnMetadata",
|
|
2485
|
-
function
|
|
2486
|
-
if (!
|
|
2484
|
+
n("getOwnMetadata", et);
|
|
2485
|
+
function j(a, c) {
|
|
2486
|
+
if (!P(a))
|
|
2487
2487
|
throw new TypeError();
|
|
2488
|
-
return
|
|
2488
|
+
return R(c) || (c = z(c)), Ft(a, c);
|
|
2489
2489
|
}
|
|
2490
|
-
n("getMetadataKeys",
|
|
2491
|
-
function
|
|
2492
|
-
if (!
|
|
2490
|
+
n("getMetadataKeys", j);
|
|
2491
|
+
function m(a, c) {
|
|
2492
|
+
if (!P(a))
|
|
2493
2493
|
throw new TypeError();
|
|
2494
|
-
return
|
|
2494
|
+
return R(c) || (c = z(c)), zt(a, c);
|
|
2495
2495
|
}
|
|
2496
|
-
n("getOwnMetadataKeys",
|
|
2497
|
-
function
|
|
2498
|
-
if (!
|
|
2496
|
+
n("getOwnMetadataKeys", m);
|
|
2497
|
+
function L(a, c, l) {
|
|
2498
|
+
if (!P(c))
|
|
2499
2499
|
throw new TypeError();
|
|
2500
|
-
|
|
2501
|
-
var
|
|
2500
|
+
R(l) || (l = z(l));
|
|
2501
|
+
var u = B(
|
|
2502
2502
|
c,
|
|
2503
2503
|
l,
|
|
2504
2504
|
/*Create*/
|
|
2505
2505
|
!1
|
|
2506
2506
|
);
|
|
2507
|
-
if (
|
|
2507
|
+
if (R(u) || !u.delete(a))
|
|
2508
2508
|
return !1;
|
|
2509
|
-
if (
|
|
2509
|
+
if (u.size > 0)
|
|
2510
2510
|
return !0;
|
|
2511
|
-
var
|
|
2512
|
-
return
|
|
2511
|
+
var v = H.get(c);
|
|
2512
|
+
return v.delete(l), v.size > 0 || H.delete(c), !0;
|
|
2513
2513
|
}
|
|
2514
|
-
n("deleteMetadata",
|
|
2515
|
-
function
|
|
2514
|
+
n("deleteMetadata", L);
|
|
2515
|
+
function U(a, c) {
|
|
2516
2516
|
for (var l = a.length - 1; l >= 0; --l) {
|
|
2517
|
-
var
|
|
2518
|
-
if (!
|
|
2519
|
-
if (!Xt(
|
|
2517
|
+
var u = a[l], v = u(c);
|
|
2518
|
+
if (!R(v) && !rt(v)) {
|
|
2519
|
+
if (!Xt(v))
|
|
2520
2520
|
throw new TypeError();
|
|
2521
|
-
c =
|
|
2521
|
+
c = v;
|
|
2522
2522
|
}
|
|
2523
2523
|
}
|
|
2524
2524
|
return c;
|
|
2525
2525
|
}
|
|
2526
|
-
function
|
|
2527
|
-
for (var
|
|
2528
|
-
var
|
|
2529
|
-
if (!
|
|
2530
|
-
if (!
|
|
2526
|
+
function nt(a, c, l, u) {
|
|
2527
|
+
for (var v = a.length - 1; v >= 0; --v) {
|
|
2528
|
+
var I = a[v], w = I(c, l, u);
|
|
2529
|
+
if (!R(w) && !rt(w)) {
|
|
2530
|
+
if (!P(w))
|
|
2531
2531
|
throw new TypeError();
|
|
2532
|
-
|
|
2532
|
+
u = w;
|
|
2533
2533
|
}
|
|
2534
2534
|
}
|
|
2535
|
-
return
|
|
2535
|
+
return u;
|
|
2536
2536
|
}
|
|
2537
|
-
function
|
|
2538
|
-
var
|
|
2539
|
-
if (
|
|
2537
|
+
function B(a, c, l) {
|
|
2538
|
+
var u = H.get(a);
|
|
2539
|
+
if (R(u)) {
|
|
2540
2540
|
if (!l)
|
|
2541
2541
|
return;
|
|
2542
|
-
|
|
2542
|
+
u = new A(), H.set(a, u);
|
|
2543
2543
|
}
|
|
2544
|
-
var
|
|
2545
|
-
if (
|
|
2544
|
+
var v = u.get(c);
|
|
2545
|
+
if (R(v)) {
|
|
2546
2546
|
if (!l)
|
|
2547
2547
|
return;
|
|
2548
|
-
|
|
2548
|
+
v = new A(), u.set(c, v);
|
|
2549
2549
|
}
|
|
2550
|
-
return
|
|
2550
|
+
return v;
|
|
2551
2551
|
}
|
|
2552
|
-
function
|
|
2553
|
-
var
|
|
2554
|
-
if (
|
|
2552
|
+
function Y(a, c, l) {
|
|
2553
|
+
var u = S(a, c, l);
|
|
2554
|
+
if (u)
|
|
2555
2555
|
return !0;
|
|
2556
|
-
var
|
|
2557
|
-
return
|
|
2556
|
+
var v = Mt(c);
|
|
2557
|
+
return rt(v) ? !1 : Y(a, v, l);
|
|
2558
2558
|
}
|
|
2559
|
-
function
|
|
2560
|
-
var
|
|
2559
|
+
function S(a, c, l) {
|
|
2560
|
+
var u = B(
|
|
2561
2561
|
c,
|
|
2562
2562
|
l,
|
|
2563
2563
|
/*Create*/
|
|
2564
2564
|
!1
|
|
2565
2565
|
);
|
|
2566
|
-
return
|
|
2567
|
-
}
|
|
2568
|
-
function
|
|
2569
|
-
var
|
|
2570
|
-
if (
|
|
2571
|
-
return
|
|
2572
|
-
var
|
|
2573
|
-
if (!
|
|
2574
|
-
return
|
|
2575
|
-
}
|
|
2576
|
-
function
|
|
2577
|
-
var
|
|
2566
|
+
return R(u) ? !1 : be(u.has(a));
|
|
2567
|
+
}
|
|
2568
|
+
function lt(a, c, l) {
|
|
2569
|
+
var u = S(a, c, l);
|
|
2570
|
+
if (u)
|
|
2571
|
+
return Et(a, c, l);
|
|
2572
|
+
var v = Mt(c);
|
|
2573
|
+
if (!rt(v))
|
|
2574
|
+
return lt(a, v, l);
|
|
2575
|
+
}
|
|
2576
|
+
function Et(a, c, l) {
|
|
2577
|
+
var u = B(
|
|
2578
2578
|
c,
|
|
2579
2579
|
l,
|
|
2580
2580
|
/*Create*/
|
|
2581
2581
|
!1
|
|
2582
2582
|
);
|
|
2583
|
-
if (!
|
|
2584
|
-
return
|
|
2583
|
+
if (!R(u))
|
|
2584
|
+
return u.get(a);
|
|
2585
2585
|
}
|
|
2586
|
-
function
|
|
2587
|
-
var
|
|
2586
|
+
function kt(a, c, l, u) {
|
|
2587
|
+
var v = B(
|
|
2588
2588
|
l,
|
|
2589
|
-
|
|
2589
|
+
u,
|
|
2590
2590
|
/*Create*/
|
|
2591
2591
|
!0
|
|
2592
2592
|
);
|
|
2593
|
-
|
|
2593
|
+
v.set(a, c);
|
|
2594
2594
|
}
|
|
2595
2595
|
function Ft(a, c) {
|
|
2596
|
-
var l = zt(a, c),
|
|
2597
|
-
if (
|
|
2596
|
+
var l = zt(a, c), u = Mt(a);
|
|
2597
|
+
if (u === null)
|
|
2598
2598
|
return l;
|
|
2599
|
-
var
|
|
2600
|
-
if (
|
|
2599
|
+
var v = Ft(u, c);
|
|
2600
|
+
if (v.length <= 0)
|
|
2601
2601
|
return l;
|
|
2602
2602
|
if (l.length <= 0)
|
|
2603
|
-
return
|
|
2604
|
-
for (var
|
|
2605
|
-
var k = y[
|
|
2606
|
-
|
|
2603
|
+
return v;
|
|
2604
|
+
for (var I = new O(), w = [], b = 0, y = l; b < y.length; b++) {
|
|
2605
|
+
var k = y[b], C = I.has(k);
|
|
2606
|
+
C || (I.add(k), w.push(k));
|
|
2607
2607
|
}
|
|
2608
|
-
for (var
|
|
2609
|
-
var k = Yt[
|
|
2610
|
-
|
|
2608
|
+
for (var Z = 0, Yt = v; Z < Yt.length; Z++) {
|
|
2609
|
+
var k = Yt[Z], C = I.has(k);
|
|
2610
|
+
C || (I.add(k), w.push(k));
|
|
2611
2611
|
}
|
|
2612
|
-
return
|
|
2612
|
+
return w;
|
|
2613
2613
|
}
|
|
2614
2614
|
function zt(a, c) {
|
|
2615
|
-
var l = [],
|
|
2615
|
+
var l = [], u = B(
|
|
2616
2616
|
a,
|
|
2617
2617
|
c,
|
|
2618
2618
|
/*Create*/
|
|
2619
2619
|
!1
|
|
2620
2620
|
);
|
|
2621
|
-
if (
|
|
2621
|
+
if (R(u))
|
|
2622
2622
|
return l;
|
|
2623
|
-
for (var
|
|
2624
|
-
var
|
|
2625
|
-
if (!
|
|
2626
|
-
return l.length =
|
|
2627
|
-
var y =
|
|
2623
|
+
for (var v = u.keys(), I = Ce(v), w = 0; ; ) {
|
|
2624
|
+
var b = Ae(I);
|
|
2625
|
+
if (!b)
|
|
2626
|
+
return l.length = w, l;
|
|
2627
|
+
var y = $e(b);
|
|
2628
2628
|
try {
|
|
2629
|
-
l[
|
|
2629
|
+
l[w] = y;
|
|
2630
2630
|
} catch (k) {
|
|
2631
2631
|
try {
|
|
2632
|
-
Te(
|
|
2632
|
+
Te(I);
|
|
2633
2633
|
} finally {
|
|
2634
2634
|
throw k;
|
|
2635
2635
|
}
|
|
2636
2636
|
}
|
|
2637
|
-
|
|
2637
|
+
w++;
|
|
2638
2638
|
}
|
|
2639
2639
|
}
|
|
2640
2640
|
function Wt(a) {
|
|
@@ -2657,16 +2657,16 @@ var ne;
|
|
|
2657
2657
|
return 6;
|
|
2658
2658
|
}
|
|
2659
2659
|
}
|
|
2660
|
-
function
|
|
2660
|
+
function R(a) {
|
|
2661
2661
|
return a === void 0;
|
|
2662
2662
|
}
|
|
2663
|
-
function
|
|
2663
|
+
function rt(a) {
|
|
2664
2664
|
return a === null;
|
|
2665
2665
|
}
|
|
2666
2666
|
function me(a) {
|
|
2667
2667
|
return typeof a == "symbol";
|
|
2668
2668
|
}
|
|
2669
|
-
function
|
|
2669
|
+
function P(a) {
|
|
2670
2670
|
return typeof a == "object" ? a !== null : typeof a == "function";
|
|
2671
2671
|
}
|
|
2672
2672
|
function we(a, c) {
|
|
@@ -2684,41 +2684,41 @@ var ne;
|
|
|
2684
2684
|
case 5:
|
|
2685
2685
|
return a;
|
|
2686
2686
|
}
|
|
2687
|
-
var l = c === 3 ? "string" : c === 5 ? "number" : "default",
|
|
2688
|
-
if (
|
|
2689
|
-
var
|
|
2690
|
-
if (
|
|
2687
|
+
var l = c === 3 ? "string" : c === 5 ? "number" : "default", u = qt(a, r);
|
|
2688
|
+
if (u !== void 0) {
|
|
2689
|
+
var v = u.call(a, l);
|
|
2690
|
+
if (P(v))
|
|
2691
2691
|
throw new TypeError();
|
|
2692
|
-
return
|
|
2692
|
+
return v;
|
|
2693
2693
|
}
|
|
2694
2694
|
return _e(a, l === "default" ? "number" : l);
|
|
2695
2695
|
}
|
|
2696
2696
|
function _e(a, c) {
|
|
2697
2697
|
if (c === "string") {
|
|
2698
2698
|
var l = a.toString;
|
|
2699
|
-
if (
|
|
2700
|
-
var
|
|
2701
|
-
if (!
|
|
2702
|
-
return
|
|
2699
|
+
if (it(l)) {
|
|
2700
|
+
var u = l.call(a);
|
|
2701
|
+
if (!P(u))
|
|
2702
|
+
return u;
|
|
2703
2703
|
}
|
|
2704
|
-
var
|
|
2705
|
-
if (
|
|
2706
|
-
var
|
|
2707
|
-
if (!
|
|
2708
|
-
return
|
|
2704
|
+
var v = a.valueOf;
|
|
2705
|
+
if (it(v)) {
|
|
2706
|
+
var u = v.call(a);
|
|
2707
|
+
if (!P(u))
|
|
2708
|
+
return u;
|
|
2709
2709
|
}
|
|
2710
2710
|
} else {
|
|
2711
|
-
var
|
|
2712
|
-
if (
|
|
2713
|
-
var
|
|
2714
|
-
if (!
|
|
2715
|
-
return
|
|
2711
|
+
var v = a.valueOf;
|
|
2712
|
+
if (it(v)) {
|
|
2713
|
+
var u = v.call(a);
|
|
2714
|
+
if (!P(u))
|
|
2715
|
+
return u;
|
|
2716
2716
|
}
|
|
2717
|
-
var
|
|
2718
|
-
if (
|
|
2719
|
-
var
|
|
2720
|
-
if (!
|
|
2721
|
-
return
|
|
2717
|
+
var I = a.toString;
|
|
2718
|
+
if (it(I)) {
|
|
2719
|
+
var u = I.call(a);
|
|
2720
|
+
if (!P(u))
|
|
2721
|
+
return u;
|
|
2722
2722
|
}
|
|
2723
2723
|
}
|
|
2724
2724
|
throw new TypeError();
|
|
@@ -2740,7 +2740,7 @@ var ne;
|
|
|
2740
2740
|
function Gt(a) {
|
|
2741
2741
|
return Array.isArray ? Array.isArray(a) : a instanceof Object ? a instanceof Array : Object.prototype.toString.call(a) === "[object Array]";
|
|
2742
2742
|
}
|
|
2743
|
-
function
|
|
2743
|
+
function it(a) {
|
|
2744
2744
|
return typeof a == "function";
|
|
2745
2745
|
}
|
|
2746
2746
|
function Xt(a) {
|
|
@@ -2759,21 +2759,21 @@ var ne;
|
|
|
2759
2759
|
function qt(a, c) {
|
|
2760
2760
|
var l = a[c];
|
|
2761
2761
|
if (l != null) {
|
|
2762
|
-
if (!
|
|
2762
|
+
if (!it(l))
|
|
2763
2763
|
throw new TypeError();
|
|
2764
2764
|
return l;
|
|
2765
2765
|
}
|
|
2766
2766
|
}
|
|
2767
|
-
function
|
|
2767
|
+
function Ce(a) {
|
|
2768
2768
|
var c = qt(a, i);
|
|
2769
|
-
if (!
|
|
2769
|
+
if (!it(c))
|
|
2770
2770
|
throw new TypeError();
|
|
2771
2771
|
var l = c.call(a);
|
|
2772
|
-
if (!
|
|
2772
|
+
if (!P(l))
|
|
2773
2773
|
throw new TypeError();
|
|
2774
2774
|
return l;
|
|
2775
2775
|
}
|
|
2776
|
-
function
|
|
2776
|
+
function $e(a) {
|
|
2777
2777
|
return a.value;
|
|
2778
2778
|
}
|
|
2779
2779
|
function Ae(a) {
|
|
@@ -2784,110 +2784,110 @@ var ne;
|
|
|
2784
2784
|
var c = a.return;
|
|
2785
2785
|
c && c.call(a);
|
|
2786
2786
|
}
|
|
2787
|
-
function
|
|
2787
|
+
function Mt(a) {
|
|
2788
2788
|
var c = Object.getPrototypeOf(a);
|
|
2789
|
-
if (typeof a != "function" || a ===
|
|
2789
|
+
if (typeof a != "function" || a === d || c !== d)
|
|
2790
2790
|
return c;
|
|
2791
|
-
var l = a.prototype,
|
|
2792
|
-
if (
|
|
2791
|
+
var l = a.prototype, u = l && Object.getPrototypeOf(l);
|
|
2792
|
+
if (u == null || u === Object.prototype)
|
|
2793
2793
|
return c;
|
|
2794
|
-
var
|
|
2795
|
-
return typeof
|
|
2794
|
+
var v = u.constructor;
|
|
2795
|
+
return typeof v != "function" || v === a ? c : v;
|
|
2796
2796
|
}
|
|
2797
2797
|
function Oe() {
|
|
2798
2798
|
var a = {}, c = [], l = (
|
|
2799
2799
|
/** @class */
|
|
2800
2800
|
function() {
|
|
2801
|
-
function
|
|
2802
|
-
this._index = 0, this._keys =
|
|
2801
|
+
function w(b, y, k) {
|
|
2802
|
+
this._index = 0, this._keys = b, this._values = y, this._selector = k;
|
|
2803
2803
|
}
|
|
2804
|
-
return
|
|
2804
|
+
return w.prototype["@@iterator"] = function() {
|
|
2805
2805
|
return this;
|
|
2806
|
-
},
|
|
2806
|
+
}, w.prototype[i] = function() {
|
|
2807
2807
|
return this;
|
|
2808
|
-
},
|
|
2809
|
-
var
|
|
2810
|
-
if (
|
|
2811
|
-
var y = this._selector(this._keys[
|
|
2812
|
-
return
|
|
2808
|
+
}, w.prototype.next = function() {
|
|
2809
|
+
var b = this._index;
|
|
2810
|
+
if (b >= 0 && b < this._keys.length) {
|
|
2811
|
+
var y = this._selector(this._keys[b], this._values[b]);
|
|
2812
|
+
return b + 1 >= this._keys.length ? (this._index = -1, this._keys = c, this._values = c) : this._index++, { value: y, done: !1 };
|
|
2813
2813
|
}
|
|
2814
2814
|
return { value: void 0, done: !0 };
|
|
2815
|
-
},
|
|
2816
|
-
throw this._index >= 0 && (this._index = -1, this._keys = c, this._values = c),
|
|
2817
|
-
},
|
|
2818
|
-
return this._index >= 0 && (this._index = -1, this._keys = c, this._values = c), { value:
|
|
2819
|
-
},
|
|
2815
|
+
}, w.prototype.throw = function(b) {
|
|
2816
|
+
throw this._index >= 0 && (this._index = -1, this._keys = c, this._values = c), b;
|
|
2817
|
+
}, w.prototype.return = function(b) {
|
|
2818
|
+
return this._index >= 0 && (this._index = -1, this._keys = c, this._values = c), { value: b, done: !0 };
|
|
2819
|
+
}, w;
|
|
2820
2820
|
}()
|
|
2821
2821
|
);
|
|
2822
2822
|
return (
|
|
2823
2823
|
/** @class */
|
|
2824
2824
|
function() {
|
|
2825
|
-
function
|
|
2825
|
+
function w() {
|
|
2826
2826
|
this._keys = [], this._values = [], this._cacheKey = a, this._cacheIndex = -2;
|
|
2827
2827
|
}
|
|
2828
|
-
return Object.defineProperty(
|
|
2828
|
+
return Object.defineProperty(w.prototype, "size", {
|
|
2829
2829
|
get: function() {
|
|
2830
2830
|
return this._keys.length;
|
|
2831
2831
|
},
|
|
2832
2832
|
enumerable: !0,
|
|
2833
2833
|
configurable: !0
|
|
2834
|
-
}),
|
|
2834
|
+
}), w.prototype.has = function(b) {
|
|
2835
2835
|
return this._find(
|
|
2836
|
-
|
|
2836
|
+
b,
|
|
2837
2837
|
/*insert*/
|
|
2838
2838
|
!1
|
|
2839
2839
|
) >= 0;
|
|
2840
|
-
},
|
|
2840
|
+
}, w.prototype.get = function(b) {
|
|
2841
2841
|
var y = this._find(
|
|
2842
|
-
|
|
2842
|
+
b,
|
|
2843
2843
|
/*insert*/
|
|
2844
2844
|
!1
|
|
2845
2845
|
);
|
|
2846
2846
|
return y >= 0 ? this._values[y] : void 0;
|
|
2847
|
-
},
|
|
2847
|
+
}, w.prototype.set = function(b, y) {
|
|
2848
2848
|
var k = this._find(
|
|
2849
|
-
|
|
2849
|
+
b,
|
|
2850
2850
|
/*insert*/
|
|
2851
2851
|
!0
|
|
2852
2852
|
);
|
|
2853
2853
|
return this._values[k] = y, this;
|
|
2854
|
-
},
|
|
2854
|
+
}, w.prototype.delete = function(b) {
|
|
2855
2855
|
var y = this._find(
|
|
2856
|
-
|
|
2856
|
+
b,
|
|
2857
2857
|
/*insert*/
|
|
2858
2858
|
!1
|
|
2859
2859
|
);
|
|
2860
2860
|
if (y >= 0) {
|
|
2861
|
-
for (var k = this._keys.length,
|
|
2862
|
-
this._keys[
|
|
2863
|
-
return this._keys.length--, this._values.length--,
|
|
2861
|
+
for (var k = this._keys.length, C = y + 1; C < k; C++)
|
|
2862
|
+
this._keys[C - 1] = this._keys[C], this._values[C - 1] = this._values[C];
|
|
2863
|
+
return this._keys.length--, this._values.length--, b === this._cacheKey && (this._cacheKey = a, this._cacheIndex = -2), !0;
|
|
2864
2864
|
}
|
|
2865
2865
|
return !1;
|
|
2866
|
-
},
|
|
2866
|
+
}, w.prototype.clear = function() {
|
|
2867
2867
|
this._keys.length = 0, this._values.length = 0, this._cacheKey = a, this._cacheIndex = -2;
|
|
2868
|
-
},
|
|
2869
|
-
return new l(this._keys, this._values,
|
|
2870
|
-
},
|
|
2871
|
-
return new l(this._keys, this._values,
|
|
2872
|
-
},
|
|
2873
|
-
return new l(this._keys, this._values,
|
|
2874
|
-
},
|
|
2868
|
+
}, w.prototype.keys = function() {
|
|
2869
|
+
return new l(this._keys, this._values, u);
|
|
2870
|
+
}, w.prototype.values = function() {
|
|
2871
|
+
return new l(this._keys, this._values, v);
|
|
2872
|
+
}, w.prototype.entries = function() {
|
|
2873
|
+
return new l(this._keys, this._values, I);
|
|
2874
|
+
}, w.prototype["@@iterator"] = function() {
|
|
2875
2875
|
return this.entries();
|
|
2876
|
-
},
|
|
2876
|
+
}, w.prototype[i] = function() {
|
|
2877
2877
|
return this.entries();
|
|
2878
|
-
},
|
|
2879
|
-
return this._cacheKey !==
|
|
2880
|
-
},
|
|
2878
|
+
}, w.prototype._find = function(b, y) {
|
|
2879
|
+
return this._cacheKey !== b && (this._cacheIndex = this._keys.indexOf(this._cacheKey = b)), this._cacheIndex < 0 && y && (this._cacheIndex = this._keys.length, this._keys.push(b), this._values.push(void 0)), this._cacheIndex;
|
|
2880
|
+
}, w;
|
|
2881
2881
|
}()
|
|
2882
2882
|
);
|
|
2883
|
-
function
|
|
2884
|
-
return v;
|
|
2885
|
-
}
|
|
2886
|
-
function g(v, w) {
|
|
2883
|
+
function u(w, b) {
|
|
2887
2884
|
return w;
|
|
2888
2885
|
}
|
|
2889
|
-
function
|
|
2890
|
-
return
|
|
2886
|
+
function v(w, b) {
|
|
2887
|
+
return b;
|
|
2888
|
+
}
|
|
2889
|
+
function I(w, b) {
|
|
2890
|
+
return [w, b];
|
|
2891
2891
|
}
|
|
2892
2892
|
}
|
|
2893
2893
|
function je() {
|
|
@@ -2895,7 +2895,7 @@ var ne;
|
|
|
2895
2895
|
/** @class */
|
|
2896
2896
|
function() {
|
|
2897
2897
|
function a() {
|
|
2898
|
-
this._map = new
|
|
2898
|
+
this._map = new A();
|
|
2899
2899
|
}
|
|
2900
2900
|
return Object.defineProperty(a.prototype, "size", {
|
|
2901
2901
|
get: function() {
|
|
@@ -2925,81 +2925,81 @@ var ne;
|
|
|
2925
2925
|
}()
|
|
2926
2926
|
);
|
|
2927
2927
|
}
|
|
2928
|
-
function
|
|
2929
|
-
var a = 16, c =
|
|
2928
|
+
function Se() {
|
|
2929
|
+
var a = 16, c = f.create(), l = u();
|
|
2930
2930
|
return (
|
|
2931
2931
|
/** @class */
|
|
2932
2932
|
function() {
|
|
2933
2933
|
function y() {
|
|
2934
|
-
this._key =
|
|
2934
|
+
this._key = u();
|
|
2935
2935
|
}
|
|
2936
2936
|
return y.prototype.has = function(k) {
|
|
2937
|
-
var
|
|
2937
|
+
var C = v(
|
|
2938
2938
|
k,
|
|
2939
2939
|
/*create*/
|
|
2940
2940
|
!1
|
|
2941
2941
|
);
|
|
2942
|
-
return
|
|
2942
|
+
return C !== void 0 ? f.has(C, this._key) : !1;
|
|
2943
2943
|
}, y.prototype.get = function(k) {
|
|
2944
|
-
var
|
|
2944
|
+
var C = v(
|
|
2945
2945
|
k,
|
|
2946
2946
|
/*create*/
|
|
2947
2947
|
!1
|
|
2948
2948
|
);
|
|
2949
|
-
return
|
|
2950
|
-
}, y.prototype.set = function(k,
|
|
2951
|
-
var
|
|
2949
|
+
return C !== void 0 ? f.get(C, this._key) : void 0;
|
|
2950
|
+
}, y.prototype.set = function(k, C) {
|
|
2951
|
+
var Z = v(
|
|
2952
2952
|
k,
|
|
2953
2953
|
/*create*/
|
|
2954
2954
|
!0
|
|
2955
2955
|
);
|
|
2956
|
-
return
|
|
2956
|
+
return Z[this._key] = C, this;
|
|
2957
2957
|
}, y.prototype.delete = function(k) {
|
|
2958
|
-
var
|
|
2958
|
+
var C = v(
|
|
2959
2959
|
k,
|
|
2960
2960
|
/*create*/
|
|
2961
2961
|
!1
|
|
2962
2962
|
);
|
|
2963
|
-
return
|
|
2963
|
+
return C !== void 0 ? delete C[this._key] : !1;
|
|
2964
2964
|
}, y.prototype.clear = function() {
|
|
2965
|
-
this._key =
|
|
2965
|
+
this._key = u();
|
|
2966
2966
|
}, y;
|
|
2967
2967
|
}()
|
|
2968
2968
|
);
|
|
2969
|
-
function
|
|
2969
|
+
function u() {
|
|
2970
2970
|
var y;
|
|
2971
2971
|
do
|
|
2972
|
-
y = "@@WeakMap@@" +
|
|
2973
|
-
while (
|
|
2972
|
+
y = "@@WeakMap@@" + b();
|
|
2973
|
+
while (f.has(c, y));
|
|
2974
2974
|
return c[y] = !0, y;
|
|
2975
2975
|
}
|
|
2976
|
-
function
|
|
2976
|
+
function v(y, k) {
|
|
2977
2977
|
if (!t.call(y, l)) {
|
|
2978
2978
|
if (!k)
|
|
2979
2979
|
return;
|
|
2980
|
-
Object.defineProperty(y, l, { value:
|
|
2980
|
+
Object.defineProperty(y, l, { value: f.create() });
|
|
2981
2981
|
}
|
|
2982
2982
|
return y[l];
|
|
2983
2983
|
}
|
|
2984
|
-
function
|
|
2985
|
-
for (var
|
|
2986
|
-
y[
|
|
2984
|
+
function I(y, k) {
|
|
2985
|
+
for (var C = 0; C < k; ++C)
|
|
2986
|
+
y[C] = Math.random() * 255 | 0;
|
|
2987
2987
|
return y;
|
|
2988
2988
|
}
|
|
2989
|
-
function
|
|
2990
|
-
return typeof Uint8Array == "function" ? typeof crypto < "u" ? crypto.getRandomValues(new Uint8Array(y)) : typeof msCrypto < "u" ? msCrypto.getRandomValues(new Uint8Array(y)) :
|
|
2989
|
+
function w(y) {
|
|
2990
|
+
return typeof Uint8Array == "function" ? typeof crypto < "u" ? crypto.getRandomValues(new Uint8Array(y)) : typeof msCrypto < "u" ? msCrypto.getRandomValues(new Uint8Array(y)) : I(new Uint8Array(y), y) : I(new Array(y), y);
|
|
2991
2991
|
}
|
|
2992
|
-
function
|
|
2993
|
-
var y =
|
|
2992
|
+
function b() {
|
|
2993
|
+
var y = w(a);
|
|
2994
2994
|
y[6] = y[6] & 79 | 64, y[8] = y[8] & 191 | 128;
|
|
2995
|
-
for (var k = "",
|
|
2996
|
-
var
|
|
2997
|
-
(
|
|
2995
|
+
for (var k = "", C = 0; C < a; ++C) {
|
|
2996
|
+
var Z = y[C];
|
|
2997
|
+
(C === 4 || C === 6 || C === 8) && (k += "-"), Z < 16 && (k += "0"), k += Z.toString(16).toLowerCase();
|
|
2998
2998
|
}
|
|
2999
2999
|
return k;
|
|
3000
3000
|
}
|
|
3001
3001
|
}
|
|
3002
|
-
function
|
|
3002
|
+
function Lt(a) {
|
|
3003
3003
|
return a.__ = void 0, delete a.__, a;
|
|
3004
3004
|
}
|
|
3005
3005
|
});
|
|
@@ -3009,16 +3009,23 @@ function nn() {
|
|
|
3009
3009
|
return s.textContent = `
|
|
3010
3010
|
* {
|
|
3011
3011
|
cursor: crosshair !important;
|
|
3012
|
+
}
|
|
3013
|
+
`, s;
|
|
3014
|
+
}
|
|
3015
|
+
function rn() {
|
|
3016
|
+
const s = document.createElement("style");
|
|
3017
|
+
return s.textContent = `
|
|
3018
|
+
* {
|
|
3012
3019
|
pointer-events: none !important;
|
|
3013
3020
|
}
|
|
3014
3021
|
`, s;
|
|
3015
3022
|
}
|
|
3016
|
-
function
|
|
3017
|
-
Re(s, "svelte-
|
|
3023
|
+
function on(s) {
|
|
3024
|
+
Re(s, "svelte-ur9r37", '#liveroom-client-element.svelte-ur9r37.svelte-ur9r37{font-family:Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}#users-container.svelte-ur9r37.svelte-ur9r37{z-index:99999;position:fixed;inset:0;overflow:hidden;pointer-events:none}.user.svelte-ur9r37.svelte-ur9r37{z-index:10;position:absolute;top:0;left:0;user-select:none;transform:translate(var(--x), var(--y));transition:transform 100ms linear;will-change:transform}.user.svelte-ur9r37 .cursor.svelte-ur9r37{position:absolute;top:0;left:0;color:var(--color);transform-origin:top left;transform:rotate(6deg)}.user[data-isself="true"].svelte-ur9r37 .cursor.svelte-ur9r37{display:none}.user-name.svelte-ur9r37.svelte-ur9r37{padding:0.25rem 0.7rem;font-size:0.8rem;font-weight:600;color:black;background-color:var(--color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:9999px;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-ur9r37 .user-name.svelte-ur9r37{position:absolute;top:20px;left:16px}.user[data-isself="true"].svelte-ur9r37 .user-name.svelte-ur9r37{display:none}.user.svelte-ur9r37 .halo.svelte-ur9r37{transform:scale(0);z-index:-1;position:absolute;top:-60px;left:-60px;width:120px;height:120px;border-radius:9999px;background-color:var(--color);opacity:0.25;transition:transform 100ms ease-out;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-ur9r37 .halo[data-show="true"].svelte-ur9r37{transform:scale(1)}');
|
|
3018
3025
|
}
|
|
3019
3026
|
function re(s, n, t) {
|
|
3020
3027
|
const e = s.slice();
|
|
3021
|
-
return e[
|
|
3028
|
+
return e[21] = n[t], e;
|
|
3022
3029
|
}
|
|
3023
3030
|
function ie(s) {
|
|
3024
3031
|
let n, t = [], e = /* @__PURE__ */ new Map(), r = ee(Object.values(
|
|
@@ -3027,23 +3034,23 @@ function ie(s) {
|
|
|
3027
3034
|
));
|
|
3028
3035
|
const i = (o) => (
|
|
3029
3036
|
/*user*/
|
|
3030
|
-
o[
|
|
3037
|
+
o[21].id
|
|
3031
3038
|
);
|
|
3032
3039
|
for (let o = 0; o < r.length; o += 1) {
|
|
3033
|
-
let h = re(s, r, o),
|
|
3034
|
-
e.set(
|
|
3040
|
+
let h = re(s, r, o), p = i(h);
|
|
3041
|
+
e.set(p, t[o] = oe(p, h));
|
|
3035
3042
|
}
|
|
3036
3043
|
return {
|
|
3037
3044
|
c() {
|
|
3038
|
-
n =
|
|
3045
|
+
n = st("div");
|
|
3039
3046
|
for (let o = 0; o < t.length; o += 1)
|
|
3040
3047
|
t[o].c();
|
|
3041
|
-
|
|
3048
|
+
x(n, "id", "users-container"), x(n, "class", "svelte-ur9r37");
|
|
3042
3049
|
},
|
|
3043
3050
|
m(o, h) {
|
|
3044
|
-
|
|
3045
|
-
for (let
|
|
3046
|
-
t[
|
|
3051
|
+
St(o, n, h);
|
|
3052
|
+
for (let p = 0; p < t.length; p += 1)
|
|
3053
|
+
t[p] && t[p].m(n, null);
|
|
3047
3054
|
},
|
|
3048
3055
|
p(o, h) {
|
|
3049
3056
|
h & /*Object, users, me, parseFloat, users_count*/
|
|
@@ -3053,7 +3060,7 @@ function ie(s) {
|
|
|
3053
3060
|
)), t = qe(t, h, i, 1, o, r, e, n, Xe, oe, null, re));
|
|
3054
3061
|
},
|
|
3055
3062
|
d(o) {
|
|
3056
|
-
o &&
|
|
3063
|
+
o && _t(n);
|
|
3057
3064
|
for (let h = 0; h < t.length; h += 1)
|
|
3058
3065
|
t[h].d();
|
|
3059
3066
|
}
|
|
@@ -3062,78 +3069,78 @@ function ie(s) {
|
|
|
3062
3069
|
function oe(s, n) {
|
|
3063
3070
|
let t, e, r, i, o, h = (
|
|
3064
3071
|
/*user*/
|
|
3065
|
-
n[
|
|
3066
|
-
), f,
|
|
3072
|
+
n[21].name + ""
|
|
3073
|
+
), p, f, d, _, A, O, M;
|
|
3067
3074
|
return {
|
|
3068
3075
|
key: s,
|
|
3069
3076
|
first: null,
|
|
3070
3077
|
c() {
|
|
3071
|
-
t =
|
|
3072
|
-
(n[
|
|
3078
|
+
t = st("div"), e = Qt("svg"), r = Qt("path"), i = Nt(), o = st("span"), p = ue(h), f = Nt(), d = st("div"), A = Nt(), x(r, "d", "M2.2706 0.0593359L25.4277 8.05957H25.45926C25.65896 8.13153 25.83096 8.25952 25.95221 8.42653C26.07357 8.59354 26.13851 8.79166 26.13851 8.99459C26.13851 9.19751 26.07357 9.39564 25.95221 9.56265C25.83096 9.72966 25.65896 9.85765 25.45926 9.92962L15.3543 13.7698L11.3124 23.37C11.2344 23.5561 11.0994 23.7156 10.9248 23.828C10.7503 23.9402 10.5443 24.0002 10.3335 24C10.1172 24 9.9061 23.9365 9.7291 23.8184C9.552 23.7004 9.4176 23.5332 9.344 23.34L0.9233 1.33937C0.8555 1.16076 0.8426 0.967504 0.8861 0.782189C0.9297 0.596873 1.0278 0.427163 1.1691 0.292901C1.3105 0.158639 1.4891 0.0653762 1.6841 0.0240151C1.8792 -0.0173461 2.0826 -0.00509504 2.2706 0.0593359Z"), x(e, "width", "23"), x(e, "viewBox", "0 0 27 24"), x(e, "fill", "currentColor"), x(e, "aria-hidden", "true"), x(e, "xmlns", "http://www.w3.org/2000/svg"), x(e, "class", "cursor svelte-ur9r37"), x(o, "class", "user-name svelte-ur9r37"), x(d, "class", "halo svelte-ur9r37"), x(d, "data-show", _ = /*user*/
|
|
3079
|
+
(n[21].id == /*me*/
|
|
3073
3080
|
n[1].id && /*user*/
|
|
3074
|
-
n[
|
|
3075
|
-
n[
|
|
3081
|
+
n[21].is_shift_key_down || /*user*/
|
|
3082
|
+
n[21].id != /*me*/
|
|
3076
3083
|
n[1].id && /*user*/
|
|
3077
|
-
(n[
|
|
3078
|
-
n[
|
|
3079
|
-
n[2] > 1),
|
|
3080
|
-
n[
|
|
3081
|
-
n[
|
|
3082
|
-
n[1].id),
|
|
3084
|
+
(n[21].is_shift_key_down || /*user*/
|
|
3085
|
+
n[21].is_mouse_down)) && /*users_count*/
|
|
3086
|
+
n[2] > 1), x(t, "id", O = "user-" + /*user*/
|
|
3087
|
+
n[21].id), x(t, "class", "user svelte-ur9r37"), x(t, "data-isself", M = /*user*/
|
|
3088
|
+
n[21].id == /*me*/
|
|
3089
|
+
n[1].id), ot(
|
|
3083
3090
|
t,
|
|
3084
3091
|
"--color",
|
|
3085
3092
|
/*user*/
|
|
3086
|
-
n[
|
|
3087
|
-
),
|
|
3093
|
+
n[21].color
|
|
3094
|
+
), ot(t, "--x", parseFloat(
|
|
3088
3095
|
/*user*/
|
|
3089
|
-
n[
|
|
3090
|
-
) + "vw"),
|
|
3096
|
+
n[21].x
|
|
3097
|
+
) + "vw"), ot(t, "--y", parseFloat(
|
|
3091
3098
|
/*user*/
|
|
3092
|
-
n[
|
|
3099
|
+
n[21].y
|
|
3093
3100
|
) + "vh"), this.first = t;
|
|
3094
3101
|
},
|
|
3095
|
-
m(H,
|
|
3096
|
-
|
|
3102
|
+
m(H, N) {
|
|
3103
|
+
St(H, t, N), W(t, e), W(e, r), W(t, i), W(t, o), W(o, p), W(t, f), W(t, d), W(t, A);
|
|
3097
3104
|
},
|
|
3098
|
-
p(H,
|
|
3099
|
-
n = H,
|
|
3105
|
+
p(H, N) {
|
|
3106
|
+
n = H, N & /*users*/
|
|
3100
3107
|
1 && h !== (h = /*user*/
|
|
3101
|
-
n[
|
|
3102
|
-
7 &&
|
|
3103
|
-
(n[
|
|
3108
|
+
n[21].name + "") && Ue(p, h), N & /*users, me, users_count*/
|
|
3109
|
+
7 && _ !== (_ = /*user*/
|
|
3110
|
+
(n[21].id == /*me*/
|
|
3104
3111
|
n[1].id && /*user*/
|
|
3105
|
-
n[
|
|
3106
|
-
n[
|
|
3112
|
+
n[21].is_shift_key_down || /*user*/
|
|
3113
|
+
n[21].id != /*me*/
|
|
3107
3114
|
n[1].id && /*user*/
|
|
3108
|
-
(n[
|
|
3109
|
-
n[
|
|
3110
|
-
n[2] > 1) &&
|
|
3111
|
-
1 &&
|
|
3112
|
-
n[
|
|
3113
|
-
3 &&
|
|
3114
|
-
n[
|
|
3115
|
-
n[1].id) &&
|
|
3116
|
-
1 &&
|
|
3115
|
+
(n[21].is_shift_key_down || /*user*/
|
|
3116
|
+
n[21].is_mouse_down)) && /*users_count*/
|
|
3117
|
+
n[2] > 1) && x(d, "data-show", _), N & /*users*/
|
|
3118
|
+
1 && O !== (O = "user-" + /*user*/
|
|
3119
|
+
n[21].id) && x(t, "id", O), N & /*users, me*/
|
|
3120
|
+
3 && M !== (M = /*user*/
|
|
3121
|
+
n[21].id == /*me*/
|
|
3122
|
+
n[1].id) && x(t, "data-isself", M), N & /*users*/
|
|
3123
|
+
1 && ot(
|
|
3117
3124
|
t,
|
|
3118
3125
|
"--color",
|
|
3119
3126
|
/*user*/
|
|
3120
|
-
n[
|
|
3121
|
-
),
|
|
3122
|
-
1 &&
|
|
3127
|
+
n[21].color
|
|
3128
|
+
), N & /*users*/
|
|
3129
|
+
1 && ot(t, "--x", parseFloat(
|
|
3123
3130
|
/*user*/
|
|
3124
|
-
n[
|
|
3125
|
-
) + "vw"),
|
|
3126
|
-
1 &&
|
|
3131
|
+
n[21].x
|
|
3132
|
+
) + "vw"), N & /*users*/
|
|
3133
|
+
1 && ot(t, "--y", parseFloat(
|
|
3127
3134
|
/*user*/
|
|
3128
|
-
n[
|
|
3135
|
+
n[21].y
|
|
3129
3136
|
) + "vh");
|
|
3130
3137
|
},
|
|
3131
3138
|
d(H) {
|
|
3132
|
-
H &&
|
|
3139
|
+
H && _t(t);
|
|
3133
3140
|
}
|
|
3134
3141
|
};
|
|
3135
3142
|
}
|
|
3136
|
-
function
|
|
3143
|
+
function an(s) {
|
|
3137
3144
|
let n, t = (
|
|
3138
3145
|
/*me*/
|
|
3139
3146
|
s[1] && /*users*/
|
|
@@ -3141,40 +3148,40 @@ function on(s) {
|
|
|
3141
3148
|
);
|
|
3142
3149
|
return {
|
|
3143
3150
|
c() {
|
|
3144
|
-
n =
|
|
3151
|
+
n = st("div"), t && t.c(), x(n, "id", "liveroom-client-element"), x(n, "class", "svelte-ur9r37");
|
|
3145
3152
|
},
|
|
3146
3153
|
m(e, r) {
|
|
3147
|
-
|
|
3154
|
+
St(e, n, r), t && t.m(n, null);
|
|
3148
3155
|
},
|
|
3149
3156
|
p(e, [r]) {
|
|
3150
3157
|
/*me*/
|
|
3151
3158
|
e[1] && /*users*/
|
|
3152
3159
|
e[0] ? t ? t.p(e, r) : (t = ie(e), t.c(), t.m(n, null)) : t && (t.d(1), t = null);
|
|
3153
3160
|
},
|
|
3154
|
-
i:
|
|
3155
|
-
o:
|
|
3161
|
+
i: vt,
|
|
3162
|
+
o: vt,
|
|
3156
3163
|
d(e) {
|
|
3157
|
-
e &&
|
|
3164
|
+
e && _t(n), t && t.d();
|
|
3158
3165
|
}
|
|
3159
3166
|
};
|
|
3160
3167
|
}
|
|
3161
3168
|
function ae(s) {
|
|
3162
|
-
s.stopPropagation(), s.preventDefault();
|
|
3169
|
+
s.isOtherUser || (console.log("[Liveroom] Click blocked"), s.stopPropagation(), s.preventDefault());
|
|
3163
3170
|
}
|
|
3164
3171
|
function he(s, n) {
|
|
3165
3172
|
let t = parseInt(s.slice(1, 3), 16), e = parseInt(s.slice(3, 5), 16), r = parseInt(s.slice(5, 7), 16);
|
|
3166
3173
|
return n ? "rgba(" + t + ", " + e + ", " + r + ", " + n + ")" : "rgb(" + t + ", " + e + ", " + r + ")";
|
|
3167
3174
|
}
|
|
3168
|
-
function
|
|
3169
|
-
let { url: e } = n, { room_id: r } = n, { user_name: i } = n, o, h = !1,
|
|
3175
|
+
function hn(s, n, t) {
|
|
3176
|
+
let { url: e } = n, { room_id: r } = n, { user_name: i } = n, o, h = !1, p = nn(), f = rn(), d, _, A;
|
|
3170
3177
|
Je(async () => {
|
|
3171
|
-
const
|
|
3172
|
-
let
|
|
3173
|
-
!!(
|
|
3174
|
-
const
|
|
3175
|
-
|
|
3178
|
+
const m = new URLSearchParams(window.location.search), L = m.get("_liveroom"), U = L == null ? void 0 : L.split("https://meet.google.com/");
|
|
3179
|
+
let nt = U == null ? void 0 : U[0];
|
|
3180
|
+
!!(U != null && U[1]) && (nt = U[1].split("?")[0]), t(3, r = nt || r);
|
|
3181
|
+
const Y = m.get("_liveroom_user_name");
|
|
3182
|
+
Y && t(4, i = Y), O();
|
|
3176
3183
|
}), Ve(() => {
|
|
3177
|
-
|
|
3184
|
+
M(), j();
|
|
3178
3185
|
});
|
|
3179
3186
|
function O() {
|
|
3180
3187
|
o = new sn({
|
|
@@ -3191,114 +3198,124 @@ function an(s, n, t) {
|
|
|
3191
3198
|
user_agent: window.navigator.userAgent
|
|
3192
3199
|
},
|
|
3193
3200
|
socketOptions: { logger: null }
|
|
3194
|
-
}), o.
|
|
3195
|
-
var
|
|
3196
|
-
const
|
|
3201
|
+
}), o.addEventListener("click-from-another-user", ({ detail: { from_user_id: m, from_user_color: L, x: U, y: nt } }) => {
|
|
3202
|
+
var lt;
|
|
3203
|
+
const B = new MouseEvent(
|
|
3197
3204
|
"click",
|
|
3198
3205
|
{
|
|
3199
3206
|
view: window,
|
|
3200
3207
|
bubbles: !0,
|
|
3201
3208
|
cancelable: !0,
|
|
3202
|
-
clientX: window.innerWidth * parseFloat(
|
|
3203
|
-
clientY: window.innerHeight * parseFloat(
|
|
3209
|
+
clientX: window.innerWidth * parseFloat(U) / 100,
|
|
3210
|
+
clientY: window.innerHeight * parseFloat(nt) / 100
|
|
3204
3211
|
}
|
|
3205
|
-
)
|
|
3206
|
-
|
|
3212
|
+
);
|
|
3213
|
+
B.isOtherUser = !0;
|
|
3214
|
+
const Y = document.head.contains(f);
|
|
3215
|
+
Y && document.head.removeChild(f);
|
|
3216
|
+
const S = document.elementFromPoint(B.clientX, B.clientY);
|
|
3217
|
+
if (Y && document.head.appendChild(f), S instanceof HTMLElement || S instanceof SVGElement) {
|
|
3207
3218
|
if (
|
|
3208
3219
|
// NOTE: Element is clickable if:
|
|
3209
|
-
|
|
3220
|
+
S.getAttribute("onclick") || S.getAttribute("href") || S.getAttribute("role") === "button" || S.getAttribute("type") === "button" || S.getAttribute("type") === "submit" || // clickedEl.getAttribute("type") === "checkbox" ||
|
|
3210
3221
|
// clickedEl.getAttribute("type") === "radio" ||
|
|
3211
|
-
["a", "button"].includes(
|
|
3222
|
+
["a", "button"].includes(S.tagName.toLowerCase())
|
|
3212
3223
|
) {
|
|
3213
|
-
const
|
|
3214
|
-
((
|
|
3224
|
+
const Et = S.style.color, kt = S.style.backgroundColor;
|
|
3225
|
+
((lt = S.computedStyleMap().get("background-color")) == null ? void 0 : lt.toString()) !== "rgba(0, 0, 0, 0)" ? (S.style.color = "white", S.style.backgroundColor = he(L, 0.6)) : S.style.color = he(L, 0.6), setTimeout(
|
|
3215
3226
|
() => {
|
|
3216
|
-
|
|
3227
|
+
S.style.color = Et, S.style.backgroundColor = kt;
|
|
3217
3228
|
},
|
|
3218
3229
|
500
|
|
3219
3230
|
);
|
|
3220
3231
|
}
|
|
3221
|
-
|
|
3232
|
+
S.dispatchEvent(B);
|
|
3222
3233
|
}
|
|
3223
|
-
}), o.addEventListener("livestate-change", ({ detail: { state:
|
|
3224
|
-
t(3, r =
|
|
3225
|
-
}), window.addEventListener("mousemove",
|
|
3234
|
+
}), o.addEventListener("livestate-change", ({ detail: { state: m } }) => {
|
|
3235
|
+
t(3, r = m.room_id), t(1, d = m.me), t(0, _ = m.users);
|
|
3236
|
+
}), o.connect(), window.addEventListener("mousemove", H), window.addEventListener("mousedown", N), window.addEventListener("mouseup", X), window.addEventListener("keydown", Q), window.addEventListener("keyup", K), window.addEventListener("resize", tt);
|
|
3226
3237
|
}
|
|
3227
|
-
function
|
|
3228
|
-
window.removeEventListener("resize",
|
|
3238
|
+
function M() {
|
|
3239
|
+
window.removeEventListener("resize", tt), window.removeEventListener("keyup", K), window.removeEventListener("keydown", Q), window.removeEventListener("mouseup", X), window.removeEventListener("mousedown", N), window.removeEventListener("mousemove", H), o == null || o.disconnect();
|
|
3229
3240
|
}
|
|
3230
|
-
function
|
|
3231
|
-
o && (
|
|
3241
|
+
function H(m) {
|
|
3242
|
+
o && (d != null && d.id) && o.dispatchEvent(new CustomEvent(
|
|
3232
3243
|
"mouse_move",
|
|
3233
3244
|
{
|
|
3234
3245
|
detail: {
|
|
3235
|
-
user_id:
|
|
3236
|
-
x: Number(
|
|
3246
|
+
user_id: d.id,
|
|
3247
|
+
x: Number(m.clientX / window.innerWidth * 100).toFixed(2),
|
|
3237
3248
|
// in %
|
|
3238
|
-
y: Number(
|
|
3249
|
+
y: Number(m.clientY / window.innerHeight * 100).toFixed(2)
|
|
3239
3250
|
}
|
|
3240
3251
|
// in %
|
|
3241
3252
|
}
|
|
3242
3253
|
));
|
|
3243
3254
|
}
|
|
3244
|
-
function
|
|
3245
|
-
o && (
|
|
3255
|
+
function N() {
|
|
3256
|
+
o && (d != null && d.id) && o.dispatchEvent(new CustomEvent("mouse_down", { detail: { user_id: d.id } }));
|
|
3246
3257
|
}
|
|
3247
|
-
function
|
|
3248
|
-
o && (
|
|
3258
|
+
function X() {
|
|
3259
|
+
o && (d != null && d.id) && o.dispatchEvent(new CustomEvent("mouse_up", { detail: { user_id: d.id } }));
|
|
3249
3260
|
}
|
|
3250
|
-
const
|
|
3251
|
-
function
|
|
3252
|
-
!
|
|
3261
|
+
const q = ["Shift"];
|
|
3262
|
+
function Q(m) {
|
|
3263
|
+
!m.repeat && q.includes(m.key) && o && (d != null && d.id) && o.dispatchEvent(new CustomEvent("key_down", { detail: { key: m.key, user_id: d.id } }));
|
|
3253
3264
|
}
|
|
3254
|
-
function
|
|
3255
|
-
|
|
3265
|
+
function K(m) {
|
|
3266
|
+
q.includes(m.key) && o && (d != null && d.id) && o.dispatchEvent(new CustomEvent("key_up", { detail: { key: m.key, user_id: d.id } }));
|
|
3256
3267
|
}
|
|
3257
|
-
function
|
|
3258
|
-
o && (
|
|
3268
|
+
function tt() {
|
|
3269
|
+
o && (d != null && d.id) && o.dispatchEvent(new CustomEvent(
|
|
3259
3270
|
"window_resize",
|
|
3260
3271
|
{
|
|
3261
3272
|
detail: {
|
|
3262
3273
|
inner_width: window.innerWidth,
|
|
3263
3274
|
inner_height: window.innerHeight,
|
|
3264
|
-
user_id:
|
|
3275
|
+
user_id: d.id
|
|
3265
3276
|
}
|
|
3266
3277
|
}
|
|
3267
3278
|
));
|
|
3268
3279
|
}
|
|
3269
|
-
|
|
3270
|
-
"
|
|
3280
|
+
function et() {
|
|
3281
|
+
document.addEventListener("click", ae, !0), document.head.appendChild(p), document.head.appendChild(f), t(6, h = !0);
|
|
3282
|
+
}
|
|
3283
|
+
function j() {
|
|
3284
|
+
document.removeEventListener("click", ae, !0), document.head.removeChild(p), document.head.removeChild(f), t(6, h = !1);
|
|
3285
|
+
}
|
|
3286
|
+
return s.$$set = (m) => {
|
|
3287
|
+
"url" in m && t(5, e = m.url), "room_id" in m && t(3, r = m.room_id), "user_name" in m && t(4, i = m.user_name);
|
|
3271
3288
|
}, s.$$.update = () => {
|
|
3272
3289
|
s.$$.dirty & /*users*/
|
|
3273
|
-
1 && t(2,
|
|
3274
|
-
65 && !h &&
|
|
3275
|
-
65 && h &&
|
|
3276
|
-
}, [
|
|
3290
|
+
1 && t(2, A = Object.keys(_ || {}).length), s.$$.dirty & /*isClickBlocked, users*/
|
|
3291
|
+
65 && !h && _ && Object.values(_).some((m) => m.type == "admin" && m.is_space_key_down) && et(), s.$$.dirty & /*isClickBlocked, users*/
|
|
3292
|
+
65 && h && _ && Object.values(_).filter((m) => m.type == "admin").every((m) => !m.is_space_key_down) && j();
|
|
3293
|
+
}, [_, d, A, r, i, e, h];
|
|
3277
3294
|
}
|
|
3278
|
-
class
|
|
3295
|
+
class cn extends es {
|
|
3279
3296
|
constructor(n) {
|
|
3280
|
-
super(), Ke(this, n,
|
|
3297
|
+
super(), Ke(this, n, hn, an, Le, { url: 5, room_id: 3, user_name: 4 }, on);
|
|
3281
3298
|
}
|
|
3282
3299
|
get url() {
|
|
3283
3300
|
return this.$$.ctx[5];
|
|
3284
3301
|
}
|
|
3285
3302
|
set url(n) {
|
|
3286
|
-
this.$$set({ url: n }),
|
|
3303
|
+
this.$$set({ url: n }), ft();
|
|
3287
3304
|
}
|
|
3288
3305
|
get room_id() {
|
|
3289
3306
|
return this.$$.ctx[3];
|
|
3290
3307
|
}
|
|
3291
3308
|
set room_id(n) {
|
|
3292
|
-
this.$$set({ room_id: n }),
|
|
3309
|
+
this.$$set({ room_id: n }), ft();
|
|
3293
3310
|
}
|
|
3294
3311
|
get user_name() {
|
|
3295
3312
|
return this.$$.ctx[4];
|
|
3296
3313
|
}
|
|
3297
3314
|
set user_name(n) {
|
|
3298
|
-
this.$$set({ user_name: n }),
|
|
3315
|
+
this.$$set({ user_name: n }), ft();
|
|
3299
3316
|
}
|
|
3300
3317
|
}
|
|
3301
|
-
customElements.define("liveroom-client-element", ts(
|
|
3318
|
+
customElements.define("liveroom-client-element", ts(cn, { url: {}, room_id: {}, user_name: {} }, [], [], !0));
|
|
3302
3319
|
export {
|
|
3303
|
-
|
|
3320
|
+
cn as default
|
|
3304
3321
|
};
|