pptx-svelte-viewer 3.2.0 → 3.2.2
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/CHANGELOG.md +27 -0
- package/dist/{AiChatPanel-CMKWWaMG.js → AiChatPanel-Cp5trzd7.js} +1 -1
- package/dist/UTIF-VK8lD02M.js +3020 -0
- package/dist/{export-BXumpOE0.js → export-Cwm0F4Ug.js} +26652 -25420
- package/dist/index.d.ts +139 -3
- package/dist/index.js +1 -1
- package/dist/pptx-svelte-viewer.css +1 -1
- package/dist/rolldown-runtime--eTHp1Qs.js +20 -0
- package/dist/viewer/index.d.ts +139 -3
- package/dist/viewer/index.js +1 -1
- package/dist/{y-webrtc-Ctru8jg8.js → y-webrtc-4NgjXr3s.js} +884 -897
- package/package.json +1 -1
|
@@ -1,48 +1,35 @@
|
|
|
1
|
+
import { n as ke, r as ot, t as at } from "./rolldown-runtime--eTHp1Qs.js";
|
|
1
2
|
import { a as ct, c as ut, d as ht, i as Ve, l as lt, n as ft, o as Ke, r as Oe, s as dt, t as pt, u as gt } from "./awareness-CrSnuSE_.js";
|
|
2
|
-
import { A as Re, B as yt, C as re, D as $e, E as bt, F as Me, I as mt, L as _t, M as
|
|
3
|
-
var xt =
|
|
4
|
-
if (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}, jt = (v, x, j) => (j = v != null ? xt(Mt(v)) : {}, Dt(x || !v || !v.__esModule || !tt.call(v, "default") ? et(j, "default", {
|
|
12
|
-
value: v,
|
|
13
|
-
enumerable: !0
|
|
14
|
-
}) : j, v)), ke = /* @__PURE__ */ ((v) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(v, { get: (x, j) => (typeof require < "u" ? require : x)[j] }) : v)(function(v) {
|
|
15
|
-
if (typeof require < "u") return require.apply(this, arguments);
|
|
16
|
-
throw Error('Calling `require` for "' + v + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
17
|
-
}), Bt = 1200, Ut = 2500, Le = 3e4, je = (v) => {
|
|
18
|
-
if (v.shouldConnect && v.ws === null) {
|
|
19
|
-
const x = new WebSocket(v.url), j = v.binaryType;
|
|
20
|
-
let U = null;
|
|
21
|
-
j && (x.binaryType = j), v.ws = x, v.connecting = !0, v.connected = !1, x.onmessage = (M) => {
|
|
22
|
-
v.lastMessageReceived = Me();
|
|
23
|
-
const m = M.data, c = typeof m == "string" ? JSON.parse(m) : m;
|
|
24
|
-
c && c.type === "pong" && (clearTimeout(U), U = setTimeout(R, Le / 2)), v.emit("message", [c, v]);
|
|
3
|
+
import { A as Re, B as yt, C as re, D as $e, E as bt, F as Me, I as mt, L as _t, M as wt, N as vt, O as je, P as Je, R as Et, S as De, T as ie, U as Pe, V as Ct, _ as Fe, a as Xe, b as Qe, i as ue, j as Ye, k as se, l as Rt, n as qe, o as Te, r as St, s as Ze, t as Tt, u as At, v as kt, x as Ot, y as Lt } from "./yjs-DbU20bpp.js";
|
|
4
|
+
var xt = 1200, Nt = 2500, Le = 3e4, Be = (R) => {
|
|
5
|
+
if (R.shouldConnect && R.ws === null) {
|
|
6
|
+
const D = new WebSocket(R.url), U = R.binaryType;
|
|
7
|
+
let j = null;
|
|
8
|
+
U && (D.binaryType = U), R.ws = D, R.connecting = !0, R.connected = !1, D.onmessage = (I) => {
|
|
9
|
+
R.lastMessageReceived = Me();
|
|
10
|
+
const w = I.data, c = typeof w == "string" ? JSON.parse(w) : w;
|
|
11
|
+
c && c.type === "pong" && (clearTimeout(j), j = setTimeout(C, Le / 2)), R.emit("message", [c, R]);
|
|
25
12
|
};
|
|
26
|
-
const F = (
|
|
27
|
-
|
|
13
|
+
const F = (I) => {
|
|
14
|
+
R.ws !== null && (R.ws = null, R.connecting = !1, R.connected ? (R.connected = !1, R.emit("disconnect", [{
|
|
28
15
|
type: "disconnect",
|
|
29
|
-
error:
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
|
|
16
|
+
error: I
|
|
17
|
+
}, R])) : R.unsuccessfulReconnects++, setTimeout(Be, Et(_t(R.unsuccessfulReconnects + 1) * xt, Nt), R)), clearTimeout(j);
|
|
18
|
+
}, C = () => {
|
|
19
|
+
R.ws === D && R.send({ type: "ping" });
|
|
33
20
|
};
|
|
34
|
-
|
|
35
|
-
|
|
21
|
+
D.onclose = () => F(null), D.onerror = (I) => F(I), D.onopen = () => {
|
|
22
|
+
R.lastMessageReceived = Me(), R.connecting = !1, R.connected = !0, R.unsuccessfulReconnects = 0, R.emit("connect", [{ type: "connect" }, R]), j = setTimeout(C, Le / 2);
|
|
36
23
|
};
|
|
37
24
|
}
|
|
38
|
-
},
|
|
39
|
-
constructor(
|
|
40
|
-
super(), this.url =
|
|
25
|
+
}, It = class extends yt {
|
|
26
|
+
constructor(R, { binaryType: D } = {}) {
|
|
27
|
+
super(), this.url = R, this.ws = null, this.binaryType = D || null, this.connected = !1, this.connecting = !1, this.unsuccessfulReconnects = 0, this.lastMessageReceived = 0, this.shouldConnect = !0, this._checkInterval = setInterval(() => {
|
|
41
28
|
this.connected && Le < Me() - this.lastMessageReceived && this.ws.close();
|
|
42
|
-
}, Le / 2),
|
|
29
|
+
}, Le / 2), Be(this);
|
|
43
30
|
}
|
|
44
|
-
send(
|
|
45
|
-
this.ws && this.ws.send(JSON.stringify(
|
|
31
|
+
send(R) {
|
|
32
|
+
this.ws && this.ws.send(JSON.stringify(R));
|
|
46
33
|
}
|
|
47
34
|
destroy() {
|
|
48
35
|
clearInterval(this._checkInterval), this.disconnect(), super.destroy();
|
|
@@ -51,55 +38,55 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
51
38
|
this.shouldConnect = !1, this.ws !== null && this.ws.close();
|
|
52
39
|
}
|
|
53
40
|
connect() {
|
|
54
|
-
this.shouldConnect = !0, !this.connected && this.ws === null &&
|
|
41
|
+
this.shouldConnect = !0, !this.connected && this.ws === null && Be(this);
|
|
55
42
|
}
|
|
56
|
-
},
|
|
57
|
-
let
|
|
58
|
-
return (
|
|
59
|
-
if (
|
|
60
|
-
|
|
43
|
+
}, Mt = () => {
|
|
44
|
+
let R = !0;
|
|
45
|
+
return (D, U) => {
|
|
46
|
+
if (R) {
|
|
47
|
+
R = !1;
|
|
61
48
|
try {
|
|
62
|
-
|
|
49
|
+
D();
|
|
63
50
|
} finally {
|
|
64
|
-
|
|
51
|
+
R = !0;
|
|
65
52
|
}
|
|
66
|
-
} else
|
|
53
|
+
} else U !== void 0 && U();
|
|
67
54
|
};
|
|
68
|
-
},
|
|
69
|
-
(function(
|
|
70
|
-
if (typeof
|
|
71
|
-
else if (typeof define == "function" && define.amd) define([],
|
|
55
|
+
}, Dt = /* @__PURE__ */ at(((R, D) => {
|
|
56
|
+
(function(U) {
|
|
57
|
+
if (typeof R == "object" && typeof D < "u") D.exports = U();
|
|
58
|
+
else if (typeof define == "function" && define.amd) define([], U);
|
|
72
59
|
else {
|
|
73
|
-
var
|
|
74
|
-
|
|
60
|
+
var j = typeof window > "u" ? typeof global > "u" ? typeof self > "u" ? this : self : global : window;
|
|
61
|
+
j.SimplePeer = U();
|
|
75
62
|
}
|
|
76
63
|
})(function() {
|
|
77
|
-
var
|
|
64
|
+
var U = Math.floor, j = Math.abs, F = Math.pow;
|
|
78
65
|
return (/* @__PURE__ */ (function() {
|
|
79
|
-
function
|
|
66
|
+
function C(I, w, c) {
|
|
80
67
|
function S(h, d) {
|
|
81
|
-
if (!
|
|
82
|
-
if (!
|
|
68
|
+
if (!w[h]) {
|
|
69
|
+
if (!I[h]) {
|
|
83
70
|
var a = typeof ke == "function" && ke;
|
|
84
71
|
if (!d && a) return a(h, !0);
|
|
85
72
|
if (O) return O(h, !0);
|
|
86
73
|
var g = /* @__PURE__ */ new Error("Cannot find module '" + h + "'");
|
|
87
74
|
throw g.code = "MODULE_NOT_FOUND", g;
|
|
88
75
|
}
|
|
89
|
-
var L =
|
|
90
|
-
|
|
91
|
-
var b =
|
|
92
|
-
return S(b ||
|
|
93
|
-
}, L, L.exports,
|
|
76
|
+
var L = w[h] = { exports: {} };
|
|
77
|
+
I[h][0].call(L.exports, function(_) {
|
|
78
|
+
var b = I[h][1][_];
|
|
79
|
+
return S(b || _);
|
|
80
|
+
}, L, L.exports, C, I, w, c);
|
|
94
81
|
}
|
|
95
|
-
return
|
|
82
|
+
return w[h].exports;
|
|
96
83
|
}
|
|
97
84
|
for (var O = typeof ke == "function" && ke, i = 0; i < c.length; i++) S(c[i]);
|
|
98
85
|
return S;
|
|
99
86
|
}
|
|
100
|
-
return
|
|
87
|
+
return C;
|
|
101
88
|
})())({
|
|
102
|
-
1: [function(
|
|
89
|
+
1: [function(C, I, w) {
|
|
103
90
|
"use strict";
|
|
104
91
|
function c(l) {
|
|
105
92
|
var y = l.length;
|
|
@@ -113,31 +100,31 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
113
100
|
return 3 * (y + k) / 4 - k;
|
|
114
101
|
}
|
|
115
102
|
function O(l) {
|
|
116
|
-
var y, k, f = c(l), T = f[0],
|
|
117
|
-
for (k = 0; k <
|
|
118
|
-
return
|
|
103
|
+
var y, k, f = c(l), T = f[0], M = f[1], p = new L(S(l, T, M)), m = 0, N = 0 < M ? T - 4 : T;
|
|
104
|
+
for (k = 0; k < N; k += 4) y = g[l.charCodeAt(k)] << 18 | g[l.charCodeAt(k + 1)] << 12 | g[l.charCodeAt(k + 2)] << 6 | g[l.charCodeAt(k + 3)], p[m++] = 255 & y >> 16, p[m++] = 255 & y >> 8, p[m++] = 255 & y;
|
|
105
|
+
return M === 2 && (y = g[l.charCodeAt(k)] << 2 | g[l.charCodeAt(k + 1)] >> 4, p[m++] = 255 & y), M === 1 && (y = g[l.charCodeAt(k)] << 10 | g[l.charCodeAt(k + 1)] << 4 | g[l.charCodeAt(k + 2)] >> 2, p[m++] = 255 & y >> 8, p[m++] = 255 & y), p;
|
|
119
106
|
}
|
|
120
107
|
function i(l) {
|
|
121
108
|
return a[63 & l >> 18] + a[63 & l >> 12] + a[63 & l >> 6] + a[63 & l];
|
|
122
109
|
}
|
|
123
110
|
function h(l, y, k) {
|
|
124
|
-
for (var f, T = [],
|
|
111
|
+
for (var f, T = [], M = y; M < k; M += 3) f = (16711680 & l[M] << 16) + (65280 & l[M + 1] << 8) + (255 & l[M + 2]), T.push(i(f));
|
|
125
112
|
return T.join("");
|
|
126
113
|
}
|
|
127
114
|
function d(l) {
|
|
128
|
-
for (var y, k = l.length, f = k % 3, T = [],
|
|
115
|
+
for (var y, k = l.length, f = k % 3, T = [], M = 16383, p = 0, m = k - f; p < m; p += M) T.push(h(l, p, p + M > m ? m : p + M));
|
|
129
116
|
return f === 1 ? (y = l[k - 1], T.push(a[y >> 2] + a[63 & y << 4] + "==")) : f === 2 && (y = (l[k - 2] << 8) + l[k - 1], T.push(a[y >> 10] + a[63 & y >> 4] + a[63 & y << 2] + "=")), T.join("");
|
|
130
117
|
}
|
|
131
|
-
|
|
118
|
+
w.byteLength = function(l) {
|
|
132
119
|
var y = c(l), k = y[0], f = y[1];
|
|
133
120
|
return 3 * (k + f) / 4 - f;
|
|
134
|
-
},
|
|
135
|
-
for (var a = [], g = [], L = typeof Uint8Array > "u" ? Array : Uint8Array,
|
|
121
|
+
}, w.toByteArray = O, w.fromByteArray = d;
|
|
122
|
+
for (var a = [], g = [], L = typeof Uint8Array > "u" ? Array : Uint8Array, _ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", b = 0, n = _.length; b < n; ++b) a[b] = _[b], g[_.charCodeAt(b)] = b;
|
|
136
123
|
g[45] = 62, g[95] = 63;
|
|
137
124
|
}, {}],
|
|
138
125
|
2: [function() {
|
|
139
126
|
}, {}],
|
|
140
|
-
3: [function(
|
|
127
|
+
3: [function(C, I, w) {
|
|
141
128
|
(function() {
|
|
142
129
|
(function() {
|
|
143
130
|
"use strict";
|
|
@@ -156,14 +143,14 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
156
143
|
}
|
|
157
144
|
function h(e, t, r) {
|
|
158
145
|
if (typeof e == "string") return L(e, t);
|
|
159
|
-
if (ArrayBuffer.isView(e)) return
|
|
146
|
+
if (ArrayBuffer.isView(e)) return _(e);
|
|
160
147
|
if (e == null) throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
|
|
161
148
|
if (A(e, ArrayBuffer) || e && A(e.buffer, ArrayBuffer)) return b(e, t, r);
|
|
162
149
|
if (typeof e == "number") throw new TypeError('The "value" argument must not be of type number. Received type number');
|
|
163
150
|
var u = e.valueOf && e.valueOf();
|
|
164
151
|
if (u != null && u !== e) return i.from(u, t, r);
|
|
165
|
-
var
|
|
166
|
-
if (
|
|
152
|
+
var v = n(e);
|
|
153
|
+
if (v) return v;
|
|
167
154
|
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof e[Symbol.toPrimitive] == "function") return i.from(e[Symbol.toPrimitive]("string"), t, r);
|
|
168
155
|
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
|
|
169
156
|
}
|
|
@@ -179,10 +166,10 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
179
166
|
}
|
|
180
167
|
function L(e, t) {
|
|
181
168
|
if ((typeof t != "string" || t === "") && (t = "utf8"), !i.isEncoding(t)) throw new TypeError("Unknown encoding: " + t);
|
|
182
|
-
var r = 0 | y(e, t), u = O(r),
|
|
183
|
-
return
|
|
169
|
+
var r = 0 | y(e, t), u = O(r), v = u.write(e, t);
|
|
170
|
+
return v !== r && (u = u.slice(0, v)), u;
|
|
184
171
|
}
|
|
185
|
-
function
|
|
172
|
+
function _(e) {
|
|
186
173
|
for (var t = 0 > e.length ? 0 : 0 | l(e.length), r = O(t), u = 0; u < t; u += 1) r[u] = 255 & e[u];
|
|
187
174
|
return r;
|
|
188
175
|
}
|
|
@@ -197,7 +184,7 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
197
184
|
var t = 0 | l(e.length), r = O(t);
|
|
198
185
|
return r.length === 0 || e.copy(r, 0, 0, t), r;
|
|
199
186
|
}
|
|
200
|
-
return e.length === void 0 ? e.type === "Buffer" && Array.isArray(e.data) ?
|
|
187
|
+
return e.length === void 0 ? e.type === "Buffer" && Array.isArray(e.data) ? _(e.data) : void 0 : typeof e.length != "number" || P(e.length) ? O(0) : _(e);
|
|
201
188
|
}
|
|
202
189
|
function l(e) {
|
|
203
190
|
if (e >= 2147483647) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");
|
|
@@ -209,7 +196,7 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
209
196
|
if (typeof e != "string") throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e);
|
|
210
197
|
var r = e.length, u = 2 < arguments.length && arguments[2] === !0;
|
|
211
198
|
if (!u && r === 0) return 0;
|
|
212
|
-
for (var
|
|
199
|
+
for (var v = !1; ; ) switch (t) {
|
|
213
200
|
case "ascii":
|
|
214
201
|
case "latin1":
|
|
215
202
|
case "binary":
|
|
@@ -227,8 +214,8 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
227
214
|
case "base64":
|
|
228
215
|
return he(e).length;
|
|
229
216
|
default:
|
|
230
|
-
if (
|
|
231
|
-
t = ("" + t).toLowerCase(),
|
|
217
|
+
if (v) return u ? -1 : _e(e).length;
|
|
218
|
+
t = ("" + t).toLowerCase(), v = !0;
|
|
232
219
|
}
|
|
233
220
|
}
|
|
234
221
|
function k(e, t, r) {
|
|
@@ -261,19 +248,19 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
261
248
|
var u = e[t];
|
|
262
249
|
e[t] = e[r], e[r] = u;
|
|
263
250
|
}
|
|
264
|
-
function T(e, t, r, u,
|
|
251
|
+
function T(e, t, r, u, v) {
|
|
265
252
|
if (e.length === 0) return -1;
|
|
266
|
-
if (typeof r == "string" ? (u = r, r = 0) : 2147483647 < r ? r = 2147483647 : -2147483648 > r && (r = -2147483648), r = +r,
|
|
267
|
-
if (
|
|
253
|
+
if (typeof r == "string" ? (u = r, r = 0) : 2147483647 < r ? r = 2147483647 : -2147483648 > r && (r = -2147483648), r = +r, P(r) && (r = v ? 0 : e.length - 1), 0 > r && (r = e.length + r), r >= e.length) {
|
|
254
|
+
if (v) return -1;
|
|
268
255
|
r = e.length - 1;
|
|
269
|
-
} else if (0 > r) if (
|
|
256
|
+
} else if (0 > r) if (v) r = 0;
|
|
270
257
|
else return -1;
|
|
271
|
-
if (typeof t == "string" && (t = i.from(t, u)), i.isBuffer(t)) return t.length === 0 ? -1 :
|
|
272
|
-
if (typeof t == "number") return t &= 255, typeof Uint8Array.prototype.indexOf == "function" ?
|
|
258
|
+
if (typeof t == "string" && (t = i.from(t, u)), i.isBuffer(t)) return t.length === 0 ? -1 : M(e, t, r, u, v);
|
|
259
|
+
if (typeof t == "number") return t &= 255, typeof Uint8Array.prototype.indexOf == "function" ? v ? Uint8Array.prototype.indexOf.call(e, t, r) : Uint8Array.prototype.lastIndexOf.call(e, t, r) : M(e, [t], r, u, v);
|
|
273
260
|
throw new TypeError("val must be string, number or Buffer");
|
|
274
261
|
}
|
|
275
|
-
function
|
|
276
|
-
function
|
|
262
|
+
function M(e, t, r, u, v) {
|
|
263
|
+
function x(le, fe) {
|
|
277
264
|
return q === 1 ? le[fe] : le.readUInt16BE(fe * q);
|
|
278
265
|
}
|
|
279
266
|
var q = 1, G = e.length, $ = t.length;
|
|
@@ -282,12 +269,12 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
282
269
|
q = 2, G /= 2, $ /= 2, r /= 2;
|
|
283
270
|
}
|
|
284
271
|
var Y;
|
|
285
|
-
if (
|
|
272
|
+
if (v) {
|
|
286
273
|
var X = -1;
|
|
287
|
-
for (Y = r; Y < G; Y++) if (
|
|
274
|
+
for (Y = r; Y < G; Y++) if (x(e, Y) !== x(t, X === -1 ? 0 : Y - X)) X !== -1 && (Y -= Y - X), X = -1;
|
|
288
275
|
else if (X === -1 && (X = Y), Y - X + 1 === $) return X * q;
|
|
289
276
|
} else for (r + $ > G && (r = G - $), Y = r; 0 <= Y; Y--) {
|
|
290
|
-
for (var ee = !0,
|
|
277
|
+
for (var ee = !0, we = 0; we < $; we++) if (x(e, Y + we) !== x(t, we)) {
|
|
291
278
|
ee = !1;
|
|
292
279
|
break;
|
|
293
280
|
}
|
|
@@ -297,43 +284,43 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
297
284
|
}
|
|
298
285
|
function p(e, t, r, u) {
|
|
299
286
|
r = +r || 0;
|
|
300
|
-
var
|
|
301
|
-
u ? (u = +u, u >
|
|
302
|
-
var
|
|
303
|
-
u >
|
|
287
|
+
var v = e.length - r;
|
|
288
|
+
u ? (u = +u, u > v && (u = v)) : u = v;
|
|
289
|
+
var x = t.length;
|
|
290
|
+
u > x / 2 && (u = x / 2);
|
|
304
291
|
for (var q, G = 0; G < u; ++G) {
|
|
305
|
-
if (q = parseInt(t.substr(2 * G, 2), 16),
|
|
292
|
+
if (q = parseInt(t.substr(2 * G, 2), 16), P(q)) return G;
|
|
306
293
|
e[r + G] = q;
|
|
307
294
|
}
|
|
308
295
|
return G;
|
|
309
296
|
}
|
|
310
|
-
function
|
|
311
|
-
return
|
|
297
|
+
function m(e, t, r, u) {
|
|
298
|
+
return E(_e(t, e.length - r), e, r, u);
|
|
312
299
|
}
|
|
313
|
-
function
|
|
314
|
-
return
|
|
300
|
+
function N(e, t, r, u) {
|
|
301
|
+
return E(ye(t), e, r, u);
|
|
315
302
|
}
|
|
316
303
|
function B(e, t, r, u) {
|
|
317
|
-
return
|
|
304
|
+
return N(e, t, r, u);
|
|
318
305
|
}
|
|
319
306
|
function V(e, t, r, u) {
|
|
320
|
-
return
|
|
307
|
+
return E(he(t), e, r, u);
|
|
321
308
|
}
|
|
322
309
|
function z(e, t, r, u) {
|
|
323
|
-
return
|
|
310
|
+
return E(ce(t, e.length - r), e, r, u);
|
|
324
311
|
}
|
|
325
312
|
function K(e, t, r) {
|
|
326
313
|
return t === 0 && r === e.length ? W.fromByteArray(e) : W.fromByteArray(e.slice(t, r));
|
|
327
314
|
}
|
|
328
315
|
function Z(e, t, r) {
|
|
329
316
|
r = S(e.length, r);
|
|
330
|
-
for (var u = [],
|
|
331
|
-
var
|
|
332
|
-
if (
|
|
317
|
+
for (var u = [], v = t; v < r; ) {
|
|
318
|
+
var x = e[v], q = null, G = 239 < x ? 4 : 223 < x ? 3 : 191 < x ? 2 : 1;
|
|
319
|
+
if (v + G <= r) {
|
|
333
320
|
var $, Y, X, ee;
|
|
334
|
-
G === 1 ? 128 >
|
|
321
|
+
G === 1 ? 128 > x && (q = x) : G === 2 ? ($ = e[v + 1], (192 & $) == 128 && (ee = (31 & x) << 6 | 63 & $, 127 < ee && (q = ee))) : G === 3 ? ($ = e[v + 1], Y = e[v + 2], (192 & $) == 128 && (192 & Y) == 128 && (ee = (15 & x) << 12 | (63 & $) << 6 | 63 & Y, 2047 < ee && (55296 > ee || 57343 < ee) && (q = ee))) : G === 4 && ($ = e[v + 1], Y = e[v + 2], X = e[v + 3], (192 & $) == 128 && (192 & Y) == 128 && (192 & X) == 128 && (ee = (15 & x) << 18 | (63 & $) << 12 | (63 & Y) << 6 | 63 & X, 65535 < ee && 1114112 > ee && (q = ee)));
|
|
335
322
|
}
|
|
336
|
-
q === null ? (q = 65533, G = 1) : 65535 < q && (q -= 65536, u.push(55296 | 1023 & q >>> 10), q = 56320 | 1023 & q), u.push(q),
|
|
323
|
+
q === null ? (q = 65533, G = 1) : 65535 < q && (q -= 65536, u.push(55296 | 1023 & q >>> 10), q = 56320 | 1023 & q), u.push(q), v += G;
|
|
337
324
|
}
|
|
338
325
|
return te(u);
|
|
339
326
|
}
|
|
@@ -346,43 +333,43 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
346
333
|
function H(e, t, r) {
|
|
347
334
|
var u = "";
|
|
348
335
|
r = S(e.length, r);
|
|
349
|
-
for (var
|
|
336
|
+
for (var v = t; v < r; ++v) u += c(127 & e[v]);
|
|
350
337
|
return u;
|
|
351
338
|
}
|
|
352
339
|
function Ee(e, t, r) {
|
|
353
340
|
var u = "";
|
|
354
341
|
r = S(e.length, r);
|
|
355
|
-
for (var
|
|
342
|
+
for (var v = t; v < r; ++v) u += c(e[v]);
|
|
356
343
|
return u;
|
|
357
344
|
}
|
|
358
345
|
function oe(e, t, r) {
|
|
359
346
|
var u = e.length;
|
|
360
347
|
(!t || 0 > t) && (t = 0), (!r || 0 > r || r > u) && (r = u);
|
|
361
|
-
for (var
|
|
362
|
-
return
|
|
348
|
+
for (var v = "", x = t; x < r; ++x) v += me(e[x]);
|
|
349
|
+
return v;
|
|
363
350
|
}
|
|
364
351
|
function de(e, t, r) {
|
|
365
|
-
for (var u = e.slice(t, r),
|
|
366
|
-
return
|
|
352
|
+
for (var u = e.slice(t, r), v = "", x = 0; x < u.length; x += 2) v += c(u[x] + 256 * u[x + 1]);
|
|
353
|
+
return v;
|
|
367
354
|
}
|
|
368
355
|
function J(e, t, r) {
|
|
369
356
|
if (e % 1 != 0 || 0 > e) throw new RangeError("offset is not uint");
|
|
370
357
|
if (e + t > r) throw new RangeError("Trying to access beyond buffer length");
|
|
371
358
|
}
|
|
372
|
-
function Q(e, t, r, u,
|
|
359
|
+
function Q(e, t, r, u, v, x) {
|
|
373
360
|
if (!i.isBuffer(e)) throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
374
|
-
if (t >
|
|
361
|
+
if (t > v || t < x) throw new RangeError('"value" argument is out of bounds');
|
|
375
362
|
if (r + u > e.length) throw new RangeError("Index out of range");
|
|
376
363
|
}
|
|
377
364
|
function ae(e, t, r, u) {
|
|
378
365
|
if (r + u > e.length) throw new RangeError("Index out of range");
|
|
379
366
|
if (0 > r) throw new RangeError("Index out of range");
|
|
380
367
|
}
|
|
381
|
-
function pe(e, t, r, u,
|
|
382
|
-
return t = +t, r >>>= 0,
|
|
368
|
+
function pe(e, t, r, u, v) {
|
|
369
|
+
return t = +t, r >>>= 0, v || ae(e, t, r, 4, 34028234663852886e22, -34028234663852886e22), s.write(e, t, r, u, 23, 4), r + 4;
|
|
383
370
|
}
|
|
384
|
-
function ge(e, t, r, u,
|
|
385
|
-
return t = +t, r >>>= 0,
|
|
371
|
+
function ge(e, t, r, u, v) {
|
|
372
|
+
return t = +t, r >>>= 0, v || ae(e, t, r, 8, 17976931348623157e292, -17976931348623157e292), s.write(e, t, r, u, 52, 8), r + 8;
|
|
386
373
|
}
|
|
387
374
|
function Se(e) {
|
|
388
375
|
if (e = e.split("=")[0], e = e.trim().replace(o, ""), 2 > e.length) return "";
|
|
@@ -394,66 +381,66 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
394
381
|
}
|
|
395
382
|
function _e(e, t) {
|
|
396
383
|
t = t || 1 / 0;
|
|
397
|
-
for (var r, u = e.length,
|
|
384
|
+
for (var r, u = e.length, v = null, x = [], q = 0; q < u; ++q) {
|
|
398
385
|
if (r = e.charCodeAt(q), 55295 < r && 57344 > r) {
|
|
399
|
-
if (!
|
|
386
|
+
if (!v) {
|
|
400
387
|
if (56319 < r) {
|
|
401
|
-
-1 < (t -= 3) &&
|
|
388
|
+
-1 < (t -= 3) && x.push(239, 191, 189);
|
|
402
389
|
continue;
|
|
403
390
|
} else if (q + 1 === u) {
|
|
404
|
-
-1 < (t -= 3) &&
|
|
391
|
+
-1 < (t -= 3) && x.push(239, 191, 189);
|
|
405
392
|
continue;
|
|
406
393
|
}
|
|
407
|
-
|
|
394
|
+
v = r;
|
|
408
395
|
continue;
|
|
409
396
|
}
|
|
410
397
|
if (56320 > r) {
|
|
411
|
-
-1 < (t -= 3) &&
|
|
398
|
+
-1 < (t -= 3) && x.push(239, 191, 189), v = r;
|
|
412
399
|
continue;
|
|
413
400
|
}
|
|
414
|
-
r = (
|
|
415
|
-
} else
|
|
416
|
-
if (
|
|
401
|
+
r = (v - 55296 << 10 | r - 56320) + 65536;
|
|
402
|
+
} else v && -1 < (t -= 3) && x.push(239, 191, 189);
|
|
403
|
+
if (v = null, 128 > r) {
|
|
417
404
|
if (0 > (t -= 1)) break;
|
|
418
|
-
|
|
405
|
+
x.push(r);
|
|
419
406
|
} else if (2048 > r) {
|
|
420
407
|
if (0 > (t -= 2)) break;
|
|
421
|
-
|
|
408
|
+
x.push(192 | r >> 6, 128 | 63 & r);
|
|
422
409
|
} else if (65536 > r) {
|
|
423
410
|
if (0 > (t -= 3)) break;
|
|
424
|
-
|
|
411
|
+
x.push(224 | r >> 12, 128 | 63 & r >> 6, 128 | 63 & r);
|
|
425
412
|
} else if (1114112 > r) {
|
|
426
413
|
if (0 > (t -= 4)) break;
|
|
427
|
-
|
|
414
|
+
x.push(240 | r >> 18, 128 | 63 & r >> 12, 128 | 63 & r >> 6, 128 | 63 & r);
|
|
428
415
|
} else throw new Error("Invalid code point");
|
|
429
416
|
}
|
|
430
|
-
return
|
|
417
|
+
return x;
|
|
431
418
|
}
|
|
432
419
|
function ye(e) {
|
|
433
420
|
for (var t = [], r = 0; r < e.length; ++r) t.push(255 & e.charCodeAt(r));
|
|
434
421
|
return t;
|
|
435
422
|
}
|
|
436
423
|
function ce(e, t) {
|
|
437
|
-
for (var r, u,
|
|
438
|
-
return
|
|
424
|
+
for (var r, u, v, x = [], q = 0; q < e.length && !(0 > (t -= 2)); ++q) r = e.charCodeAt(q), u = r >> 8, v = r % 256, x.push(v), x.push(u);
|
|
425
|
+
return x;
|
|
439
426
|
}
|
|
440
427
|
function he(e) {
|
|
441
428
|
return W.toByteArray(Se(e));
|
|
442
429
|
}
|
|
443
|
-
function
|
|
444
|
-
for (var
|
|
445
|
-
return
|
|
430
|
+
function E(e, t, r, u) {
|
|
431
|
+
for (var v = 0; v < u && !(v + r >= t.length || v >= e.length); ++v) t[v + r] = e[v];
|
|
432
|
+
return v;
|
|
446
433
|
}
|
|
447
434
|
function A(e, t) {
|
|
448
435
|
return e instanceof t || e != null && e.constructor != null && e.constructor.name != null && e.constructor.name === t.name;
|
|
449
436
|
}
|
|
450
|
-
function
|
|
437
|
+
function P(e) {
|
|
451
438
|
return e !== e;
|
|
452
439
|
}
|
|
453
|
-
var W =
|
|
454
|
-
|
|
440
|
+
var W = C("base64-js"), s = C("ieee754");
|
|
441
|
+
w.Buffer = i, w.SlowBuffer = function(e) {
|
|
455
442
|
return +e != e && (e = 0), i.alloc(+e);
|
|
456
|
-
},
|
|
443
|
+
}, w.INSPECT_MAX_BYTES = 50, w.kMaxLength = 2147483647, i.TYPED_ARRAY_SUPPORT = (function() {
|
|
457
444
|
try {
|
|
458
445
|
var e = /* @__PURE__ */ new Uint8Array(1);
|
|
459
446
|
return e.__proto__ = {
|
|
@@ -493,8 +480,8 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
493
480
|
}, i.compare = function(e, t) {
|
|
494
481
|
if (A(e, Uint8Array) && (e = i.from(e, e.offset, e.byteLength)), A(t, Uint8Array) && (t = i.from(t, t.offset, t.byteLength)), !i.isBuffer(e) || !i.isBuffer(t)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
|
|
495
482
|
if (e === t) return 0;
|
|
496
|
-
for (var r = e.length, u = t.length,
|
|
497
|
-
r = e[
|
|
483
|
+
for (var r = e.length, u = t.length, v = 0, x = S(r, u); v < x; ++v) if (e[v] !== t[v]) {
|
|
484
|
+
r = e[v], u = t[v];
|
|
498
485
|
break;
|
|
499
486
|
}
|
|
500
487
|
return r < u ? -1 : u < r ? 1 : 0;
|
|
@@ -520,11 +507,11 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
520
507
|
if (e.length === 0) return i.alloc(0);
|
|
521
508
|
var r;
|
|
522
509
|
if (t === void 0) for (t = 0, r = 0; r < e.length; ++r) t += e[r].length;
|
|
523
|
-
var u = i.allocUnsafe(t),
|
|
510
|
+
var u = i.allocUnsafe(t), v = 0;
|
|
524
511
|
for (r = 0; r < e.length; ++r) {
|
|
525
|
-
var
|
|
526
|
-
if (A(
|
|
527
|
-
|
|
512
|
+
var x = e[r];
|
|
513
|
+
if (A(x, Uint8Array) && (x = i.from(x)), !i.isBuffer(x)) throw new TypeError('"list" argument must be an Array of Buffers');
|
|
514
|
+
x.copy(u, v), v += x.length;
|
|
528
515
|
}
|
|
529
516
|
return u;
|
|
530
517
|
}, i.byteLength = y, i.prototype._isBuffer = !0, i.prototype.swap16 = function() {
|
|
@@ -549,20 +536,20 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
549
536
|
if (!i.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
|
|
550
537
|
return this === e || i.compare(this, e) === 0;
|
|
551
538
|
}, i.prototype.inspect = function() {
|
|
552
|
-
var e = "", t =
|
|
539
|
+
var e = "", t = w.INSPECT_MAX_BYTES;
|
|
553
540
|
return e = this.toString("hex", 0, t).replace(/(.{2})/g, "$1 ").trim(), this.length > t && (e += " ... "), "<Buffer " + e + ">";
|
|
554
|
-
}, i.prototype.compare = function(e, t, r, u,
|
|
541
|
+
}, i.prototype.compare = function(e, t, r, u, v) {
|
|
555
542
|
if (A(e, Uint8Array) && (e = i.from(e, e.offset, e.byteLength)), !i.isBuffer(e)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e);
|
|
556
|
-
if (t === void 0 && (t = 0), r === void 0 && (r = e ? e.length : 0), u === void 0 && (u = 0),
|
|
557
|
-
if (u >=
|
|
558
|
-
if (u >=
|
|
543
|
+
if (t === void 0 && (t = 0), r === void 0 && (r = e ? e.length : 0), u === void 0 && (u = 0), v === void 0 && (v = this.length), 0 > t || r > e.length || 0 > u || v > this.length) throw new RangeError("out of range index");
|
|
544
|
+
if (u >= v && t >= r) return 0;
|
|
545
|
+
if (u >= v) return -1;
|
|
559
546
|
if (t >= r) return 1;
|
|
560
|
-
if (t >>>= 0, r >>>= 0, u >>>= 0,
|
|
561
|
-
for (var
|
|
562
|
-
|
|
547
|
+
if (t >>>= 0, r >>>= 0, u >>>= 0, v >>>= 0, this === e) return 0;
|
|
548
|
+
for (var x = v - u, q = r - t, G = S(x, q), $ = this.slice(u, v), Y = e.slice(t, r), X = 0; X < G; ++X) if ($[X] !== Y[X]) {
|
|
549
|
+
x = $[X], q = Y[X];
|
|
563
550
|
break;
|
|
564
551
|
}
|
|
565
|
-
return
|
|
552
|
+
return x < q ? -1 : q < x ? 1 : 0;
|
|
566
553
|
}, i.prototype.includes = function(e, t, r) {
|
|
567
554
|
return this.indexOf(e, t, r) !== -1;
|
|
568
555
|
}, i.prototype.indexOf = function(e, t, r) {
|
|
@@ -574,17 +561,17 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
574
561
|
else if (r === void 0 && typeof t == "string") u = t, r = this.length, t = 0;
|
|
575
562
|
else if (isFinite(t)) t >>>= 0, isFinite(r) ? (r >>>= 0, u === void 0 && (u = "utf8")) : (u = r, r = void 0);
|
|
576
563
|
else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
|
|
577
|
-
var
|
|
578
|
-
if ((r === void 0 || r >
|
|
564
|
+
var v = this.length - t;
|
|
565
|
+
if ((r === void 0 || r > v) && (r = v), 0 < e.length && (0 > r || 0 > t) || t > this.length) throw new RangeError("Attempt to write outside buffer bounds");
|
|
579
566
|
u || (u = "utf8");
|
|
580
|
-
for (var
|
|
567
|
+
for (var x = !1; ; ) switch (u) {
|
|
581
568
|
case "hex":
|
|
582
569
|
return p(this, e, t, r);
|
|
583
570
|
case "utf8":
|
|
584
571
|
case "utf-8":
|
|
585
|
-
return
|
|
572
|
+
return m(this, e, t, r);
|
|
586
573
|
case "ascii":
|
|
587
|
-
return
|
|
574
|
+
return N(this, e, t, r);
|
|
588
575
|
case "latin1":
|
|
589
576
|
case "binary":
|
|
590
577
|
return B(this, e, t, r);
|
|
@@ -596,8 +583,8 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
596
583
|
case "utf-16le":
|
|
597
584
|
return z(this, e, t, r);
|
|
598
585
|
default:
|
|
599
|
-
if (
|
|
600
|
-
u = ("" + u).toLowerCase(),
|
|
586
|
+
if (x) throw new TypeError("Unknown encoding: " + u);
|
|
587
|
+
u = ("" + u).toLowerCase(), x = !0;
|
|
601
588
|
}
|
|
602
589
|
}, i.prototype.toJSON = function() {
|
|
603
590
|
return {
|
|
@@ -611,11 +598,11 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
611
598
|
return u.__proto__ = i.prototype, u;
|
|
612
599
|
}, i.prototype.readUIntLE = function(e, t, r) {
|
|
613
600
|
e >>>= 0, t >>>= 0, r || J(e, t, this.length);
|
|
614
|
-
for (var u = this[e],
|
|
601
|
+
for (var u = this[e], v = 1, x = 0; ++x < t && (v *= 256); ) u += this[e + x] * v;
|
|
615
602
|
return u;
|
|
616
603
|
}, i.prototype.readUIntBE = function(e, t, r) {
|
|
617
604
|
e >>>= 0, t >>>= 0, r || J(e, t, this.length);
|
|
618
|
-
for (var u = this[e + --t],
|
|
605
|
+
for (var u = this[e + --t], v = 1; 0 < t && (v *= 256); ) u += this[e + --t] * v;
|
|
619
606
|
return u;
|
|
620
607
|
}, i.prototype.readUInt8 = function(e, t) {
|
|
621
608
|
return e >>>= 0, t || J(e, 1, this.length), this[e];
|
|
@@ -629,12 +616,12 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
629
616
|
return e >>>= 0, t || J(e, 4, this.length), 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
|
|
630
617
|
}, i.prototype.readIntLE = function(e, t, r) {
|
|
631
618
|
e >>>= 0, t >>>= 0, r || J(e, t, this.length);
|
|
632
|
-
for (var u = this[e],
|
|
633
|
-
return
|
|
619
|
+
for (var u = this[e], v = 1, x = 0; ++x < t && (v *= 256); ) u += this[e + x] * v;
|
|
620
|
+
return v *= 128, u >= v && (u -= F(2, 8 * t)), u;
|
|
634
621
|
}, i.prototype.readIntBE = function(e, t, r) {
|
|
635
622
|
e >>>= 0, t >>>= 0, r || J(e, t, this.length);
|
|
636
|
-
for (var u = t,
|
|
637
|
-
return
|
|
623
|
+
for (var u = t, v = 1, x = this[e + --u]; 0 < u && (v *= 256); ) x += this[e + --u] * v;
|
|
624
|
+
return v *= 128, x >= v && (x -= F(2, 8 * t)), x;
|
|
638
625
|
}, i.prototype.readInt8 = function(e, t) {
|
|
639
626
|
return e >>>= 0, t || J(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e];
|
|
640
627
|
}, i.prototype.readInt16LE = function(e, t) {
|
|
@@ -659,19 +646,19 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
659
646
|
return e >>>= 0, t || J(e, 8, this.length), s.read(this, e, !1, 52, 8);
|
|
660
647
|
}, i.prototype.writeUIntLE = function(e, t, r, u) {
|
|
661
648
|
if (e = +e, t >>>= 0, r >>>= 0, !u) {
|
|
662
|
-
var
|
|
663
|
-
Q(this, e, t, r,
|
|
649
|
+
var v = F(2, 8 * r) - 1;
|
|
650
|
+
Q(this, e, t, r, v, 0);
|
|
664
651
|
}
|
|
665
|
-
var
|
|
666
|
-
for (this[t] = 255 & e; ++q < r && (
|
|
652
|
+
var x = 1, q = 0;
|
|
653
|
+
for (this[t] = 255 & e; ++q < r && (x *= 256); ) this[t + q] = 255 & e / x;
|
|
667
654
|
return t + r;
|
|
668
655
|
}, i.prototype.writeUIntBE = function(e, t, r, u) {
|
|
669
656
|
if (e = +e, t >>>= 0, r >>>= 0, !u) {
|
|
670
|
-
var
|
|
671
|
-
Q(this, e, t, r,
|
|
657
|
+
var v = F(2, 8 * r) - 1;
|
|
658
|
+
Q(this, e, t, r, v, 0);
|
|
672
659
|
}
|
|
673
|
-
var
|
|
674
|
-
for (this[t +
|
|
660
|
+
var x = r - 1, q = 1;
|
|
661
|
+
for (this[t + x] = 255 & e; 0 <= --x && (q *= 256); ) this[t + x] = 255 & e / q;
|
|
675
662
|
return t + r;
|
|
676
663
|
}, i.prototype.writeUInt8 = function(e, t, r) {
|
|
677
664
|
return e = +e, t >>>= 0, r || Q(this, e, t, 1, 255, 0), this[t] = 255 & e, t + 1;
|
|
@@ -685,19 +672,19 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
685
672
|
return e = +e, t >>>= 0, r || Q(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e, t + 4;
|
|
686
673
|
}, i.prototype.writeIntLE = function(e, t, r, u) {
|
|
687
674
|
if (e = +e, t >>>= 0, !u) {
|
|
688
|
-
var
|
|
689
|
-
Q(this, e, t, r,
|
|
675
|
+
var v = F(2, 8 * r - 1);
|
|
676
|
+
Q(this, e, t, r, v - 1, -v);
|
|
690
677
|
}
|
|
691
|
-
var
|
|
692
|
-
for (this[t] = 255 & e; ++
|
|
678
|
+
var x = 0, q = 1, G = 0;
|
|
679
|
+
for (this[t] = 255 & e; ++x < r && (q *= 256); ) 0 > e && G === 0 && this[t + x - 1] !== 0 && (G = 1), this[t + x] = 255 & (e / q >> 0) - G;
|
|
693
680
|
return t + r;
|
|
694
681
|
}, i.prototype.writeIntBE = function(e, t, r, u) {
|
|
695
682
|
if (e = +e, t >>>= 0, !u) {
|
|
696
|
-
var
|
|
697
|
-
Q(this, e, t, r,
|
|
683
|
+
var v = F(2, 8 * r - 1);
|
|
684
|
+
Q(this, e, t, r, v - 1, -v);
|
|
698
685
|
}
|
|
699
|
-
var
|
|
700
|
-
for (this[t +
|
|
686
|
+
var x = r - 1, q = 1, G = 0;
|
|
687
|
+
for (this[t + x] = 255 & e; 0 <= --x && (q *= 256); ) 0 > e && G === 0 && this[t + x + 1] !== 0 && (G = 1), this[t + x] = 255 & (e / q >> 0) - G;
|
|
701
688
|
return t + r;
|
|
702
689
|
}, i.prototype.writeInt8 = function(e, t, r) {
|
|
703
690
|
return e = +e, t >>>= 0, r || Q(this, e, t, 1, 127, -128), 0 > e && (e = 255 + e + 1), this[t] = 255 & e, t + 1;
|
|
@@ -724,77 +711,77 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
724
711
|
if (0 > r || r >= this.length) throw new RangeError("Index out of range");
|
|
725
712
|
if (0 > u) throw new RangeError("sourceEnd out of bounds");
|
|
726
713
|
u > this.length && (u = this.length), e.length - t < u - r && (u = e.length - t + r);
|
|
727
|
-
var
|
|
714
|
+
var v = u - r;
|
|
728
715
|
if (this === e && typeof Uint8Array.prototype.copyWithin == "function") this.copyWithin(t, r, u);
|
|
729
|
-
else if (this === e && r < t && t < u) for (var
|
|
716
|
+
else if (this === e && r < t && t < u) for (var x = v - 1; 0 <= x; --x) e[x + t] = this[x + r];
|
|
730
717
|
else Uint8Array.prototype.set.call(e, this.subarray(r, u), t);
|
|
731
|
-
return
|
|
718
|
+
return v;
|
|
732
719
|
}, i.prototype.fill = function(e, t, r, u) {
|
|
733
720
|
if (typeof e == "string") {
|
|
734
721
|
if (typeof t == "string" ? (u = t, t = 0, r = this.length) : typeof r == "string" && (u = r, r = this.length), u !== void 0 && typeof u != "string") throw new TypeError("encoding must be a string");
|
|
735
722
|
if (typeof u == "string" && !i.isEncoding(u)) throw new TypeError("Unknown encoding: " + u);
|
|
736
723
|
if (e.length === 1) {
|
|
737
|
-
var
|
|
738
|
-
(u === "utf8" && 128 >
|
|
724
|
+
var v = e.charCodeAt(0);
|
|
725
|
+
(u === "utf8" && 128 > v || u === "latin1") && (e = v);
|
|
739
726
|
}
|
|
740
727
|
} else typeof e == "number" && (e &= 255);
|
|
741
728
|
if (0 > t || this.length < t || this.length < r) throw new RangeError("Out of range index");
|
|
742
729
|
if (r <= t) return this;
|
|
743
730
|
t >>>= 0, r = r === void 0 ? this.length : r >>> 0, e || (e = 0);
|
|
744
|
-
var
|
|
745
|
-
if (typeof e == "number") for (
|
|
731
|
+
var x;
|
|
732
|
+
if (typeof e == "number") for (x = t; x < r; ++x) this[x] = e;
|
|
746
733
|
else {
|
|
747
734
|
var q = i.isBuffer(e) ? e : i.from(e, u), G = q.length;
|
|
748
735
|
if (G === 0) throw new TypeError('The value "' + e + '" is invalid for argument "value"');
|
|
749
|
-
for (
|
|
736
|
+
for (x = 0; x < r - t; ++x) this[x + t] = q[x % G];
|
|
750
737
|
}
|
|
751
738
|
return this;
|
|
752
739
|
};
|
|
753
740
|
var o = /[^+/0-9A-Za-z-_]/g;
|
|
754
741
|
}).call(this);
|
|
755
|
-
}).call(this,
|
|
742
|
+
}).call(this, C("buffer").Buffer);
|
|
756
743
|
}, {
|
|
757
744
|
"base64-js": 1,
|
|
758
745
|
buffer: 3,
|
|
759
746
|
ieee754: 9
|
|
760
747
|
}],
|
|
761
|
-
4: [function(
|
|
748
|
+
4: [function(C, I, w) {
|
|
762
749
|
(function(c) {
|
|
763
750
|
(function() {
|
|
764
751
|
function S() {
|
|
765
752
|
let i;
|
|
766
753
|
try {
|
|
767
|
-
i =
|
|
754
|
+
i = w.storage.getItem("debug");
|
|
768
755
|
} catch {
|
|
769
756
|
}
|
|
770
757
|
return !i && typeof c < "u" && "env" in c && (i = c.env.DEBUG), i;
|
|
771
758
|
}
|
|
772
|
-
|
|
773
|
-
if (i[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + i[0] + (this.useColors ? "%c " : " ") + "+" +
|
|
759
|
+
w.formatArgs = function(i) {
|
|
760
|
+
if (i[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + i[0] + (this.useColors ? "%c " : " ") + "+" + I.exports.humanize(this.diff), !this.useColors) return;
|
|
774
761
|
const h = "color: " + this.color;
|
|
775
762
|
i.splice(1, 0, h, "color: inherit");
|
|
776
763
|
let d = 0, a = 0;
|
|
777
764
|
i[0].replace(/%[a-zA-Z%]/g, (g) => {
|
|
778
765
|
g === "%%" || (d++, g === "%c" && (a = d));
|
|
779
766
|
}), i.splice(a, 0, h);
|
|
780
|
-
},
|
|
767
|
+
}, w.save = function(i) {
|
|
781
768
|
try {
|
|
782
|
-
i ?
|
|
769
|
+
i ? w.storage.setItem("debug", i) : w.storage.removeItem("debug");
|
|
783
770
|
} catch {
|
|
784
771
|
}
|
|
785
|
-
},
|
|
772
|
+
}, w.load = S, w.useColors = function() {
|
|
786
773
|
return !!(typeof window < "u" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) || !(typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) && (typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && 31 <= parseInt(RegExp.$1, 10) || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
|
787
|
-
},
|
|
774
|
+
}, w.storage = (function() {
|
|
788
775
|
try {
|
|
789
776
|
return localStorage;
|
|
790
777
|
} catch {
|
|
791
778
|
}
|
|
792
|
-
})(),
|
|
779
|
+
})(), w.destroy = /* @__PURE__ */ (() => {
|
|
793
780
|
let i = !1;
|
|
794
781
|
return () => {
|
|
795
782
|
i || (i = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
|
|
796
783
|
};
|
|
797
|
-
})(),
|
|
784
|
+
})(), w.colors = [
|
|
798
785
|
"#0000CC",
|
|
799
786
|
"#0000FF",
|
|
800
787
|
"#0033CC",
|
|
@@ -871,9 +858,9 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
871
858
|
"#FF9933",
|
|
872
859
|
"#FFCC00",
|
|
873
860
|
"#FFCC33"
|
|
874
|
-
],
|
|
875
|
-
}),
|
|
876
|
-
const { formatters: O } =
|
|
861
|
+
], w.log = console.debug || console.log || (() => {
|
|
862
|
+
}), I.exports = C("./common")(w);
|
|
863
|
+
const { formatters: O } = I.exports;
|
|
877
864
|
O.j = function(i) {
|
|
878
865
|
try {
|
|
879
866
|
return JSON.stringify(i);
|
|
@@ -882,18 +869,18 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
882
869
|
}
|
|
883
870
|
};
|
|
884
871
|
}).call(this);
|
|
885
|
-
}).call(this,
|
|
872
|
+
}).call(this, C("_process"));
|
|
886
873
|
}, {
|
|
887
874
|
"./common": 5,
|
|
888
875
|
_process: 12
|
|
889
876
|
}],
|
|
890
|
-
5: [function(
|
|
891
|
-
|
|
877
|
+
5: [function(C, I) {
|
|
878
|
+
I.exports = function(w) {
|
|
892
879
|
function c(i) {
|
|
893
880
|
function h(...g) {
|
|
894
881
|
if (!h.enabled) return;
|
|
895
|
-
const L = h,
|
|
896
|
-
L.diff =
|
|
882
|
+
const L = h, _ = +/* @__PURE__ */ new Date();
|
|
883
|
+
L.diff = _ - (d || _), L.prev = d, L.curr = _, d = _, g[0] = c.coerce(g[0]), typeof g[0] != "string" && g.unshift("%O");
|
|
897
884
|
let b = 0;
|
|
898
885
|
g[0] = g[0].replace(/%([a-zA-Z%])/g, (n, l) => {
|
|
899
886
|
if (n === "%%") return "%";
|
|
@@ -939,20 +926,20 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
939
926
|
for (h = 0, d = c.skips.length; h < d; h++) if (c.skips[h].test(i)) return !1;
|
|
940
927
|
for (h = 0, d = c.names.length; h < d; h++) if (c.names[h].test(i)) return !0;
|
|
941
928
|
return !1;
|
|
942
|
-
}, c.humanize =
|
|
929
|
+
}, c.humanize = C("ms"), c.destroy = function() {
|
|
943
930
|
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
944
|
-
}, Object.keys(
|
|
945
|
-
c[i] =
|
|
931
|
+
}, Object.keys(w).forEach((i) => {
|
|
932
|
+
c[i] = w[i];
|
|
946
933
|
}), c.names = [], c.skips = [], c.formatters = {}, c.selectColor = function(i) {
|
|
947
934
|
let h = 0;
|
|
948
935
|
for (let d = 0; d < i.length; d++) h = (h << 5) - h + i.charCodeAt(d), h |= 0;
|
|
949
|
-
return c.colors[
|
|
936
|
+
return c.colors[j(h) % c.colors.length];
|
|
950
937
|
}, c.enable(c.load()), c;
|
|
951
938
|
};
|
|
952
939
|
}, { ms: 11 }],
|
|
953
|
-
6: [function(
|
|
940
|
+
6: [function(C, I) {
|
|
954
941
|
"use strict";
|
|
955
|
-
function
|
|
942
|
+
function w(c, S) {
|
|
956
943
|
for (const O in S) Object.defineProperty(c, O, {
|
|
957
944
|
value: S[O],
|
|
958
945
|
enumerable: !0,
|
|
@@ -960,22 +947,22 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
960
947
|
});
|
|
961
948
|
return c;
|
|
962
949
|
}
|
|
963
|
-
|
|
950
|
+
I.exports = function(c, S, O) {
|
|
964
951
|
if (!c || typeof c == "string") throw new TypeError("Please pass an Error to err-code");
|
|
965
952
|
O || (O = {}), typeof S == "object" && (O = S, S = ""), S && (O.code = S);
|
|
966
953
|
try {
|
|
967
|
-
return
|
|
954
|
+
return w(c, O);
|
|
968
955
|
} catch {
|
|
969
956
|
O.message = c.message, O.stack = c.stack;
|
|
970
957
|
const h = function() {
|
|
971
958
|
};
|
|
972
|
-
return h.prototype = Object.create(Object.getPrototypeOf(c)),
|
|
959
|
+
return h.prototype = Object.create(Object.getPrototypeOf(c)), w(new h(), O);
|
|
973
960
|
}
|
|
974
961
|
};
|
|
975
962
|
}, {}],
|
|
976
|
-
7: [function(
|
|
963
|
+
7: [function(C, I) {
|
|
977
964
|
"use strict";
|
|
978
|
-
function
|
|
965
|
+
function w(p) {
|
|
979
966
|
console && console.warn && console.warn(p);
|
|
980
967
|
}
|
|
981
968
|
function c() {
|
|
@@ -987,68 +974,68 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
987
974
|
function O(p) {
|
|
988
975
|
return p._maxListeners === void 0 ? c.defaultMaxListeners : p._maxListeners;
|
|
989
976
|
}
|
|
990
|
-
function i(p,
|
|
977
|
+
function i(p, m, N, B) {
|
|
991
978
|
var V, z, K;
|
|
992
|
-
if (S(
|
|
993
|
-
else if (typeof K == "function" ? K = z[
|
|
979
|
+
if (S(N), z = p._events, z === void 0 ? (z = p._events = /* @__PURE__ */ Object.create(null), p._eventsCount = 0) : (z.newListener !== void 0 && (p.emit("newListener", m, N.listener ? N.listener : N), z = p._events), K = z[m]), K === void 0) K = z[m] = N, ++p._eventsCount;
|
|
980
|
+
else if (typeof K == "function" ? K = z[m] = B ? [N, K] : [K, N] : B ? K.unshift(N) : K.push(N), V = O(p), 0 < V && K.length > V && !K.warned) {
|
|
994
981
|
K.warned = !0;
|
|
995
|
-
var Z = /* @__PURE__ */ new Error("Possible EventEmitter memory leak detected. " + K.length + " " + (
|
|
996
|
-
Z.name = "MaxListenersExceededWarning", Z.emitter = p, Z.type =
|
|
982
|
+
var Z = /* @__PURE__ */ new Error("Possible EventEmitter memory leak detected. " + K.length + " " + (m + " listeners added. Use emitter.setMaxListeners() to increase limit"));
|
|
983
|
+
Z.name = "MaxListenersExceededWarning", Z.emitter = p, Z.type = m, Z.count = K.length, w(Z);
|
|
997
984
|
}
|
|
998
985
|
return p;
|
|
999
986
|
}
|
|
1000
987
|
function h() {
|
|
1001
988
|
if (!this.fired) return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
1002
989
|
}
|
|
1003
|
-
function d(p,
|
|
990
|
+
function d(p, m, N) {
|
|
1004
991
|
var B = {
|
|
1005
992
|
fired: !1,
|
|
1006
993
|
wrapFn: void 0,
|
|
1007
994
|
target: p,
|
|
1008
|
-
type:
|
|
1009
|
-
listener:
|
|
995
|
+
type: m,
|
|
996
|
+
listener: N
|
|
1010
997
|
}, V = h.bind(B);
|
|
1011
|
-
return V.listener =
|
|
998
|
+
return V.listener = N, B.wrapFn = V, V;
|
|
1012
999
|
}
|
|
1013
|
-
function a(p,
|
|
1000
|
+
function a(p, m, N) {
|
|
1014
1001
|
var B = p._events;
|
|
1015
1002
|
if (B === void 0) return [];
|
|
1016
|
-
var V = B[
|
|
1017
|
-
return V === void 0 ? [] : typeof V == "function" ?
|
|
1003
|
+
var V = B[m];
|
|
1004
|
+
return V === void 0 ? [] : typeof V == "function" ? N ? [V.listener || V] : [V] : N ? b(V) : L(V, V.length);
|
|
1018
1005
|
}
|
|
1019
1006
|
function g(p) {
|
|
1020
|
-
var
|
|
1021
|
-
if (
|
|
1022
|
-
var
|
|
1023
|
-
if (typeof
|
|
1024
|
-
if (
|
|
1007
|
+
var m = this._events;
|
|
1008
|
+
if (m !== void 0) {
|
|
1009
|
+
var N = m[p];
|
|
1010
|
+
if (typeof N == "function") return 1;
|
|
1011
|
+
if (N !== void 0) return N.length;
|
|
1025
1012
|
}
|
|
1026
1013
|
return 0;
|
|
1027
1014
|
}
|
|
1028
|
-
function L(p,
|
|
1029
|
-
for (var
|
|
1030
|
-
return
|
|
1015
|
+
function L(p, m) {
|
|
1016
|
+
for (var N = Array(m), B = 0; B < m; ++B) N[B] = p[B];
|
|
1017
|
+
return N;
|
|
1031
1018
|
}
|
|
1032
|
-
function
|
|
1033
|
-
for (;
|
|
1019
|
+
function _(p, m) {
|
|
1020
|
+
for (; m + 1 < p.length; m++) p[m] = p[m + 1];
|
|
1034
1021
|
p.pop();
|
|
1035
1022
|
}
|
|
1036
1023
|
function b(p) {
|
|
1037
|
-
for (var
|
|
1038
|
-
return
|
|
1024
|
+
for (var m = Array(p.length), N = 0; N < m.length; ++N) m[N] = p[N].listener || p[N];
|
|
1025
|
+
return m;
|
|
1039
1026
|
}
|
|
1040
|
-
function n(p,
|
|
1041
|
-
typeof p.on == "function" && l(p, "error",
|
|
1027
|
+
function n(p, m, N) {
|
|
1028
|
+
typeof p.on == "function" && l(p, "error", m, N);
|
|
1042
1029
|
}
|
|
1043
|
-
function l(p,
|
|
1044
|
-
if (typeof p.on == "function") B.once ? p.once(
|
|
1045
|
-
else if (typeof p.addEventListener == "function") p.addEventListener(
|
|
1046
|
-
B.once && p.removeEventListener(
|
|
1030
|
+
function l(p, m, N, B) {
|
|
1031
|
+
if (typeof p.on == "function") B.once ? p.once(m, N) : p.on(m, N);
|
|
1032
|
+
else if (typeof p.addEventListener == "function") p.addEventListener(m, function V(z) {
|
|
1033
|
+
B.once && p.removeEventListener(m, V), N(z);
|
|
1047
1034
|
});
|
|
1048
1035
|
else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof p);
|
|
1049
1036
|
}
|
|
1050
|
-
var y, k = typeof Reflect == "object" ? Reflect : null, f = k && typeof k.apply == "function" ? k.apply : function(p,
|
|
1051
|
-
return Function.prototype.apply.call(p,
|
|
1037
|
+
var y, k = typeof Reflect == "object" ? Reflect : null, f = k && typeof k.apply == "function" ? k.apply : function(p, m, N) {
|
|
1038
|
+
return Function.prototype.apply.call(p, m, N);
|
|
1052
1039
|
};
|
|
1053
1040
|
y = k && typeof k.ownKeys == "function" ? k.ownKeys : Object.getOwnPropertySymbols ? function(p) {
|
|
1054
1041
|
return Object.getOwnPropertyNames(p).concat(Object.getOwnPropertySymbols(p));
|
|
@@ -1058,26 +1045,26 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
1058
1045
|
var T = Number.isNaN || function(p) {
|
|
1059
1046
|
return p !== p;
|
|
1060
1047
|
};
|
|
1061
|
-
|
|
1062
|
-
return new Promise(function(
|
|
1048
|
+
I.exports = c, I.exports.once = function(p, m) {
|
|
1049
|
+
return new Promise(function(N, B) {
|
|
1063
1050
|
function V(K) {
|
|
1064
|
-
p.removeListener(
|
|
1051
|
+
p.removeListener(m, z), B(K);
|
|
1065
1052
|
}
|
|
1066
1053
|
function z() {
|
|
1067
|
-
typeof p.removeListener == "function" && p.removeListener("error", V),
|
|
1054
|
+
typeof p.removeListener == "function" && p.removeListener("error", V), N([].slice.call(arguments));
|
|
1068
1055
|
}
|
|
1069
|
-
l(p,
|
|
1056
|
+
l(p, m, z, { once: !0 }), m !== "error" && n(p, V, { once: !0 });
|
|
1070
1057
|
});
|
|
1071
1058
|
}, c.EventEmitter = c, c.prototype._events = void 0, c.prototype._eventsCount = 0, c.prototype._maxListeners = void 0;
|
|
1072
|
-
var
|
|
1059
|
+
var M = 10;
|
|
1073
1060
|
Object.defineProperty(c, "defaultMaxListeners", {
|
|
1074
1061
|
enumerable: !0,
|
|
1075
1062
|
get: function() {
|
|
1076
|
-
return
|
|
1063
|
+
return M;
|
|
1077
1064
|
},
|
|
1078
1065
|
set: function(p) {
|
|
1079
1066
|
if (typeof p != "number" || 0 > p || T(p)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + p + ".");
|
|
1080
|
-
|
|
1067
|
+
M = p;
|
|
1081
1068
|
}
|
|
1082
1069
|
}), c.init = function() {
|
|
1083
1070
|
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
@@ -1087,113 +1074,113 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
1087
1074
|
}, c.prototype.getMaxListeners = function() {
|
|
1088
1075
|
return O(this);
|
|
1089
1076
|
}, c.prototype.emit = function(p) {
|
|
1090
|
-
for (var
|
|
1077
|
+
for (var m = [], N = 1; N < arguments.length; N++) m.push(arguments[N]);
|
|
1091
1078
|
var B = p === "error", V = this._events;
|
|
1092
1079
|
if (V !== void 0) B = B && V.error === void 0;
|
|
1093
1080
|
else if (!B) return !1;
|
|
1094
1081
|
if (B) {
|
|
1095
1082
|
var z;
|
|
1096
|
-
if (0 <
|
|
1083
|
+
if (0 < m.length && (z = m[0]), z instanceof Error) throw z;
|
|
1097
1084
|
var K = /* @__PURE__ */ new Error("Unhandled error." + (z ? " (" + z.message + ")" : ""));
|
|
1098
1085
|
throw K.context = z, K;
|
|
1099
1086
|
}
|
|
1100
1087
|
var Z = V[p];
|
|
1101
1088
|
if (Z === void 0) return !1;
|
|
1102
|
-
if (typeof Z == "function") f(Z, this,
|
|
1103
|
-
else for (var te = Z.length, H = L(Z, te),
|
|
1089
|
+
if (typeof Z == "function") f(Z, this, m);
|
|
1090
|
+
else for (var te = Z.length, H = L(Z, te), N = 0; N < te; ++N) f(H[N], this, m);
|
|
1104
1091
|
return !0;
|
|
1105
|
-
}, c.prototype.addListener = function(p,
|
|
1106
|
-
return i(this, p,
|
|
1107
|
-
}, c.prototype.on = c.prototype.addListener, c.prototype.prependListener = function(p,
|
|
1108
|
-
return i(this, p,
|
|
1109
|
-
}, c.prototype.once = function(p,
|
|
1110
|
-
return S(
|
|
1111
|
-
}, c.prototype.prependOnceListener = function(p,
|
|
1112
|
-
return S(
|
|
1113
|
-
}, c.prototype.removeListener = function(p,
|
|
1114
|
-
var
|
|
1115
|
-
if (S(
|
|
1116
|
-
if (
|
|
1117
|
-
if (
|
|
1118
|
-
else if (typeof
|
|
1119
|
-
for (V = -1, z =
|
|
1120
|
-
K =
|
|
1092
|
+
}, c.prototype.addListener = function(p, m) {
|
|
1093
|
+
return i(this, p, m, !1);
|
|
1094
|
+
}, c.prototype.on = c.prototype.addListener, c.prototype.prependListener = function(p, m) {
|
|
1095
|
+
return i(this, p, m, !0);
|
|
1096
|
+
}, c.prototype.once = function(p, m) {
|
|
1097
|
+
return S(m), this.on(p, d(this, p, m)), this;
|
|
1098
|
+
}, c.prototype.prependOnceListener = function(p, m) {
|
|
1099
|
+
return S(m), this.prependListener(p, d(this, p, m)), this;
|
|
1100
|
+
}, c.prototype.removeListener = function(p, m) {
|
|
1101
|
+
var N, B, V, z, K;
|
|
1102
|
+
if (S(m), B = this._events, B === void 0) return this;
|
|
1103
|
+
if (N = B[p], N === void 0) return this;
|
|
1104
|
+
if (N === m || N.listener === m) --this._eventsCount == 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete B[p], B.removeListener && this.emit("removeListener", p, N.listener || m));
|
|
1105
|
+
else if (typeof N != "function") {
|
|
1106
|
+
for (V = -1, z = N.length - 1; 0 <= z; z--) if (N[z] === m || N[z].listener === m) {
|
|
1107
|
+
K = N[z].listener, V = z;
|
|
1121
1108
|
break;
|
|
1122
1109
|
}
|
|
1123
1110
|
if (0 > V) return this;
|
|
1124
|
-
V === 0 ?
|
|
1111
|
+
V === 0 ? N.shift() : _(N, V), N.length === 1 && (B[p] = N[0]), B.removeListener !== void 0 && this.emit("removeListener", p, K || m);
|
|
1125
1112
|
}
|
|
1126
1113
|
return this;
|
|
1127
1114
|
}, c.prototype.off = c.prototype.removeListener, c.prototype.removeAllListeners = function(p) {
|
|
1128
|
-
var
|
|
1129
|
-
if (
|
|
1130
|
-
if (
|
|
1115
|
+
var m, N, B;
|
|
1116
|
+
if (N = this._events, N === void 0) return this;
|
|
1117
|
+
if (N.removeListener === void 0) return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : N[p] !== void 0 && (--this._eventsCount == 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete N[p]), this;
|
|
1131
1118
|
if (arguments.length === 0) {
|
|
1132
|
-
var V, z = Object.keys(
|
|
1119
|
+
var V, z = Object.keys(N);
|
|
1133
1120
|
for (B = 0; B < z.length; ++B) V = z[B], V !== "removeListener" && this.removeAllListeners(V);
|
|
1134
1121
|
return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
|
|
1135
1122
|
}
|
|
1136
|
-
if (
|
|
1137
|
-
else if (
|
|
1123
|
+
if (m = N[p], typeof m == "function") this.removeListener(p, m);
|
|
1124
|
+
else if (m !== void 0) for (B = m.length - 1; 0 <= B; B--) this.removeListener(p, m[B]);
|
|
1138
1125
|
return this;
|
|
1139
1126
|
}, c.prototype.listeners = function(p) {
|
|
1140
1127
|
return a(this, p, !0);
|
|
1141
1128
|
}, c.prototype.rawListeners = function(p) {
|
|
1142
1129
|
return a(this, p, !1);
|
|
1143
|
-
}, c.listenerCount = function(p,
|
|
1144
|
-
return typeof p.listenerCount == "function" ? p.listenerCount(
|
|
1130
|
+
}, c.listenerCount = function(p, m) {
|
|
1131
|
+
return typeof p.listenerCount == "function" ? p.listenerCount(m) : g.call(p, m);
|
|
1145
1132
|
}, c.prototype.listenerCount = g, c.prototype.eventNames = function() {
|
|
1146
1133
|
return 0 < this._eventsCount ? y(this._events) : [];
|
|
1147
1134
|
};
|
|
1148
1135
|
}, {}],
|
|
1149
|
-
8: [function(
|
|
1150
|
-
|
|
1136
|
+
8: [function(C, I) {
|
|
1137
|
+
I.exports = function() {
|
|
1151
1138
|
if (typeof globalThis > "u") return null;
|
|
1152
|
-
var
|
|
1139
|
+
var w = {
|
|
1153
1140
|
RTCPeerConnection: globalThis.RTCPeerConnection || globalThis.mozRTCPeerConnection || globalThis.webkitRTCPeerConnection,
|
|
1154
1141
|
RTCSessionDescription: globalThis.RTCSessionDescription || globalThis.mozRTCSessionDescription || globalThis.webkitRTCSessionDescription,
|
|
1155
1142
|
RTCIceCandidate: globalThis.RTCIceCandidate || globalThis.mozRTCIceCandidate || globalThis.webkitRTCIceCandidate
|
|
1156
1143
|
};
|
|
1157
|
-
return
|
|
1144
|
+
return w.RTCPeerConnection ? w : null;
|
|
1158
1145
|
};
|
|
1159
1146
|
}, {}],
|
|
1160
|
-
9: [function(
|
|
1161
|
-
|
|
1162
|
-
var d, a, g = 8 * h - i - 1, L = (1 << g) - 1,
|
|
1147
|
+
9: [function(C, I, w) {
|
|
1148
|
+
w.read = function(c, S, O, i, h) {
|
|
1149
|
+
var d, a, g = 8 * h - i - 1, L = (1 << g) - 1, _ = L >> 1, b = -7, n = O ? h - 1 : 0, l = O ? -1 : 1, y = c[S + n];
|
|
1163
1150
|
for (n += l, d = y & (1 << -b) - 1, y >>= -b, b += g; 0 < b; d = 256 * d + c[S + n], n += l, b -= 8) ;
|
|
1164
1151
|
for (a = d & (1 << -b) - 1, d >>= -b, b += i; 0 < b; a = 256 * a + c[S + n], n += l, b -= 8) ;
|
|
1165
|
-
if (d === 0) d = 1 -
|
|
1152
|
+
if (d === 0) d = 1 - _;
|
|
1166
1153
|
else {
|
|
1167
1154
|
if (d === L) return a ? NaN : (y ? -1 : 1) * (1 / 0);
|
|
1168
|
-
a += F(2, i), d -=
|
|
1155
|
+
a += F(2, i), d -= _;
|
|
1169
1156
|
}
|
|
1170
1157
|
return (y ? -1 : 1) * a * F(2, d - i);
|
|
1171
|
-
},
|
|
1172
|
-
var a, g, L,
|
|
1173
|
-
for (S =
|
|
1158
|
+
}, w.write = function(c, S, O, i, h, d) {
|
|
1159
|
+
var a, g, L, _ = Math.LN2, b = Math.log, n = 8 * d - h - 1, l = (1 << n) - 1, y = l >> 1, k = h === 23 ? F(2, -24) - F(2, -77) : 0, f = i ? 0 : d - 1, T = i ? 1 : -1, M = 0 > S || S === 0 && 0 > 1 / S ? 1 : 0;
|
|
1160
|
+
for (S = j(S), isNaN(S) || S === 1 / 0 ? (g = isNaN(S) ? 1 : 0, a = l) : (a = U(b(S) / _), 1 > S * (L = F(2, -a)) && (a--, L *= 2), S += 1 <= a + y ? k / L : k * F(2, 1 - y), 2 <= S * L && (a++, L /= 2), a + y >= l ? (g = 0, a = l) : 1 <= a + y ? (g = (S * L - 1) * F(2, h), a += y) : (g = S * F(2, y - 1) * F(2, h), a = 0)); 8 <= h; c[O + f] = 255 & g, f += T, g /= 256, h -= 8) ;
|
|
1174
1161
|
for (a = a << h | g, n += h; 0 < n; c[O + f] = 255 & a, f += T, a /= 256, n -= 8) ;
|
|
1175
|
-
c[O + f - T] |= 128 *
|
|
1162
|
+
c[O + f - T] |= 128 * M;
|
|
1176
1163
|
};
|
|
1177
1164
|
}, {}],
|
|
1178
|
-
10: [function(
|
|
1179
|
-
|
|
1180
|
-
c && (
|
|
1181
|
-
value:
|
|
1165
|
+
10: [function(C, I) {
|
|
1166
|
+
I.exports = typeof Object.create == "function" ? function(w, c) {
|
|
1167
|
+
c && (w.super_ = c, w.prototype = Object.create(c.prototype, { constructor: {
|
|
1168
|
+
value: w,
|
|
1182
1169
|
enumerable: !1,
|
|
1183
1170
|
writable: !0,
|
|
1184
1171
|
configurable: !0
|
|
1185
1172
|
} }));
|
|
1186
|
-
} : function(
|
|
1173
|
+
} : function(w, c) {
|
|
1187
1174
|
if (c) {
|
|
1188
|
-
|
|
1175
|
+
w.super_ = c;
|
|
1189
1176
|
var S = function() {
|
|
1190
1177
|
};
|
|
1191
|
-
S.prototype = c.prototype,
|
|
1178
|
+
S.prototype = c.prototype, w.prototype = new S(), w.prototype.constructor = w;
|
|
1192
1179
|
}
|
|
1193
1180
|
};
|
|
1194
1181
|
}, {}],
|
|
1195
|
-
11: [function(
|
|
1196
|
-
var
|
|
1182
|
+
11: [function(C, I) {
|
|
1183
|
+
var w = Math.round;
|
|
1197
1184
|
function c(h) {
|
|
1198
1185
|
if (h += "", !(100 < h.length)) {
|
|
1199
1186
|
var d = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(h);
|
|
@@ -1204,17 +1191,17 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
1204
1191
|
}
|
|
1205
1192
|
}
|
|
1206
1193
|
function S(h) {
|
|
1207
|
-
var d =
|
|
1208
|
-
return 864e5 <= d ?
|
|
1194
|
+
var d = j(h);
|
|
1195
|
+
return 864e5 <= d ? w(h / 864e5) + "d" : 36e5 <= d ? w(h / 36e5) + "h" : 6e4 <= d ? w(h / 6e4) + "m" : 1e3 <= d ? w(h / 1e3) + "s" : h + "ms";
|
|
1209
1196
|
}
|
|
1210
1197
|
function O(h) {
|
|
1211
|
-
var d =
|
|
1198
|
+
var d = j(h);
|
|
1212
1199
|
return 864e5 <= d ? i(h, d, 864e5, "day") : 36e5 <= d ? i(h, d, 36e5, "hour") : 6e4 <= d ? i(h, d, 6e4, "minute") : 1e3 <= d ? i(h, d, 1e3, "second") : h + " ms";
|
|
1213
1200
|
}
|
|
1214
1201
|
function i(h, d, a, g) {
|
|
1215
|
-
return
|
|
1202
|
+
return w(h / a) + " " + g + (d >= 1.5 * a ? "s" : "");
|
|
1216
1203
|
}
|
|
1217
|
-
|
|
1204
|
+
I.exports = function(h, d) {
|
|
1218
1205
|
d = d || {};
|
|
1219
1206
|
var a = typeof h;
|
|
1220
1207
|
if (a == "string" && 0 < h.length) return c(h);
|
|
@@ -1222,8 +1209,8 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
1222
1209
|
throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(h));
|
|
1223
1210
|
};
|
|
1224
1211
|
}, {}],
|
|
1225
|
-
12: [function(
|
|
1226
|
-
function
|
|
1212
|
+
12: [function(C, I) {
|
|
1213
|
+
function w() {
|
|
1227
1214
|
throw new Error("setTimeout has not been defined");
|
|
1228
1215
|
}
|
|
1229
1216
|
function c() {
|
|
@@ -1231,7 +1218,7 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
1231
1218
|
}
|
|
1232
1219
|
function S(k) {
|
|
1233
1220
|
if (g === setTimeout) return setTimeout(k, 0);
|
|
1234
|
-
if ((g ===
|
|
1221
|
+
if ((g === w || !g) && setTimeout) return g = setTimeout, setTimeout(k, 0);
|
|
1235
1222
|
try {
|
|
1236
1223
|
return g(k, 0);
|
|
1237
1224
|
} catch {
|
|
@@ -1274,12 +1261,12 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
1274
1261
|
}
|
|
1275
1262
|
function a() {
|
|
1276
1263
|
}
|
|
1277
|
-
var g, L,
|
|
1264
|
+
var g, L, _ = I.exports = {};
|
|
1278
1265
|
(function() {
|
|
1279
1266
|
try {
|
|
1280
|
-
g = typeof setTimeout == "function" ? setTimeout :
|
|
1267
|
+
g = typeof setTimeout == "function" ? setTimeout : w;
|
|
1281
1268
|
} catch {
|
|
1282
|
-
g =
|
|
1269
|
+
g = w;
|
|
1283
1270
|
}
|
|
1284
1271
|
try {
|
|
1285
1272
|
L = typeof clearTimeout == "function" ? clearTimeout : c;
|
|
@@ -1288,45 +1275,45 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
1288
1275
|
}
|
|
1289
1276
|
})();
|
|
1290
1277
|
var b, n = [], l = !1, y = -1;
|
|
1291
|
-
|
|
1278
|
+
_.nextTick = function(k) {
|
|
1292
1279
|
var f = Array(arguments.length - 1);
|
|
1293
1280
|
if (1 < arguments.length) for (var T = 1; T < arguments.length; T++) f[T - 1] = arguments[T];
|
|
1294
1281
|
n.push(new d(k, f)), n.length !== 1 || l || S(h);
|
|
1295
1282
|
}, d.prototype.run = function() {
|
|
1296
1283
|
this.fun.apply(null, this.array);
|
|
1297
|
-
},
|
|
1284
|
+
}, _.title = "browser", _.browser = !0, _.env = {}, _.argv = [], _.version = "", _.versions = {}, _.on = a, _.addListener = a, _.once = a, _.off = a, _.removeListener = a, _.removeAllListeners = a, _.emit = a, _.prependListener = a, _.prependOnceListener = a, _.listeners = function() {
|
|
1298
1285
|
return [];
|
|
1299
|
-
},
|
|
1286
|
+
}, _.binding = function() {
|
|
1300
1287
|
throw new Error("process.binding is not supported");
|
|
1301
|
-
},
|
|
1288
|
+
}, _.cwd = function() {
|
|
1302
1289
|
return "/";
|
|
1303
|
-
},
|
|
1290
|
+
}, _.chdir = function() {
|
|
1304
1291
|
throw new Error("process.chdir is not supported");
|
|
1305
|
-
},
|
|
1292
|
+
}, _.umask = function() {
|
|
1306
1293
|
return 0;
|
|
1307
1294
|
};
|
|
1308
1295
|
}, {}],
|
|
1309
|
-
13: [function(
|
|
1310
|
-
(function(
|
|
1296
|
+
13: [function(C, I) {
|
|
1297
|
+
(function(w) {
|
|
1311
1298
|
(function() {
|
|
1312
1299
|
let c;
|
|
1313
|
-
|
|
1300
|
+
I.exports = typeof queueMicrotask == "function" ? queueMicrotask.bind(typeof window > "u" ? w : window) : (S) => (c || (c = Promise.resolve())).then(S).catch((O) => setTimeout(() => {
|
|
1314
1301
|
throw O;
|
|
1315
1302
|
}, 0));
|
|
1316
1303
|
}).call(this);
|
|
1317
1304
|
}).call(this, typeof global > "u" ? typeof self > "u" ? typeof window > "u" ? {} : window : self : global);
|
|
1318
1305
|
}, {}],
|
|
1319
|
-
14: [function(
|
|
1320
|
-
(function(
|
|
1306
|
+
14: [function(C, I) {
|
|
1307
|
+
(function(w, c) {
|
|
1321
1308
|
(function() {
|
|
1322
1309
|
"use strict";
|
|
1323
|
-
var S =
|
|
1324
|
-
|
|
1310
|
+
var S = C("safe-buffer").Buffer, O = c.crypto || c.msCrypto;
|
|
1311
|
+
I.exports = O && O.getRandomValues ? function(i, h) {
|
|
1325
1312
|
if (i > 4294967295) throw new RangeError("requested too many random bytes");
|
|
1326
1313
|
var d = S.allocUnsafe(i);
|
|
1327
1314
|
if (0 < i) if (65536 < i) for (var a = 0; a < i; a += 65536) O.getRandomValues(d.slice(a, a + 65536));
|
|
1328
1315
|
else O.getRandomValues(d);
|
|
1329
|
-
return typeof h == "function" ?
|
|
1316
|
+
return typeof h == "function" ? w.nextTick(function() {
|
|
1330
1317
|
h(null, d);
|
|
1331
1318
|
}) : d;
|
|
1332
1319
|
} : function() {
|
|
@@ -1334,34 +1321,34 @@ var xt = Object.create, et = Object.defineProperty, Nt = Object.getOwnPropertyDe
|
|
|
1334
1321
|
Use Chrome, Firefox or Internet Explorer 11`);
|
|
1335
1322
|
};
|
|
1336
1323
|
}).call(this);
|
|
1337
|
-
}).call(this,
|
|
1324
|
+
}).call(this, C("_process"), typeof global > "u" ? typeof self > "u" ? typeof window > "u" ? {} : window : self : global);
|
|
1338
1325
|
}, {
|
|
1339
1326
|
_process: 12,
|
|
1340
1327
|
"safe-buffer": 30
|
|
1341
1328
|
}],
|
|
1342
|
-
15: [function(
|
|
1329
|
+
15: [function(C, I) {
|
|
1343
1330
|
"use strict";
|
|
1344
|
-
function
|
|
1331
|
+
function w(a, g) {
|
|
1345
1332
|
a.prototype = Object.create(g.prototype), a.prototype.constructor = a, a.__proto__ = g;
|
|
1346
1333
|
}
|
|
1347
1334
|
function c(a, g, L) {
|
|
1348
|
-
function
|
|
1335
|
+
function _(n, l, y) {
|
|
1349
1336
|
return typeof g == "string" ? g : g(n, l, y);
|
|
1350
1337
|
}
|
|
1351
1338
|
L || (L = Error);
|
|
1352
1339
|
var b = (function(n) {
|
|
1353
1340
|
function l(y, k, f) {
|
|
1354
|
-
return n.call(this,
|
|
1341
|
+
return n.call(this, _(y, k, f)) || this;
|
|
1355
1342
|
}
|
|
1356
|
-
return
|
|
1343
|
+
return w(l, n), l;
|
|
1357
1344
|
})(L);
|
|
1358
1345
|
b.prototype.name = L.name, b.prototype.code = a, d[a] = b;
|
|
1359
1346
|
}
|
|
1360
1347
|
function S(a, g) {
|
|
1361
1348
|
if (Array.isArray(a)) {
|
|
1362
1349
|
var L = a.length;
|
|
1363
|
-
return a = a.map(function(
|
|
1364
|
-
return
|
|
1350
|
+
return a = a.map(function(_) {
|
|
1351
|
+
return _ + "";
|
|
1365
1352
|
}), 2 < L ? "one of ".concat(g, " ").concat(a.slice(0, L - 1).join(", "), ", or ") + a[L - 1] : L === 2 ? "one of ".concat(g, " ").concat(a[0], " or ").concat(a[1]) : "of ".concat(g, " ").concat(a[0]);
|
|
1366
1353
|
}
|
|
1367
1354
|
return "of ".concat(g, " ").concat(a + "");
|
|
@@ -1379,13 +1366,13 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1379
1366
|
c("ERR_INVALID_OPT_VALUE", function(a, g) {
|
|
1380
1367
|
return 'The value "' + g + '" is invalid for option "' + a + '"';
|
|
1381
1368
|
}, TypeError), c("ERR_INVALID_ARG_TYPE", function(a, g, L) {
|
|
1382
|
-
var
|
|
1383
|
-
typeof g == "string" && O(g, "not ") ? (
|
|
1369
|
+
var _;
|
|
1370
|
+
typeof g == "string" && O(g, "not ") ? (_ = "must not be", g = g.replace(/^not /, "")) : _ = "must be";
|
|
1384
1371
|
var b;
|
|
1385
|
-
if (i(a, " argument")) b = "The ".concat(a, " ").concat(
|
|
1372
|
+
if (i(a, " argument")) b = "The ".concat(a, " ").concat(_, " ").concat(S(g, "type"));
|
|
1386
1373
|
else {
|
|
1387
1374
|
var n = h(a, ".") ? "property" : "argument";
|
|
1388
|
-
b = 'The "'.concat(a, '" ').concat(n, " ").concat(
|
|
1375
|
+
b = 'The "'.concat(a, '" ').concat(n, " ").concat(_, " ").concat(S(g, "type"));
|
|
1389
1376
|
}
|
|
1390
1377
|
return b += ". Received type ".concat(typeof L), b;
|
|
1391
1378
|
}, TypeError), c("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"), c("ERR_METHOD_NOT_IMPLEMENTED", function(a) {
|
|
@@ -1394,29 +1381,29 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1394
1381
|
return "Cannot call " + a + " after a stream was destroyed";
|
|
1395
1382
|
}), c("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"), c("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"), c("ERR_STREAM_WRITE_AFTER_END", "write after end"), c("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError), c("ERR_UNKNOWN_ENCODING", function(a) {
|
|
1396
1383
|
return "Unknown encoding: " + a;
|
|
1397
|
-
}, TypeError), c("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"),
|
|
1384
|
+
}, TypeError), c("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"), I.exports.codes = d;
|
|
1398
1385
|
}, {}],
|
|
1399
|
-
16: [function(
|
|
1400
|
-
(function(
|
|
1386
|
+
16: [function(C, I) {
|
|
1387
|
+
(function(w) {
|
|
1401
1388
|
(function() {
|
|
1402
1389
|
"use strict";
|
|
1403
|
-
function c(
|
|
1404
|
-
return this instanceof c ? (h.call(this,
|
|
1390
|
+
function c(_) {
|
|
1391
|
+
return this instanceof c ? (h.call(this, _), d.call(this, _), this.allowHalfOpen = !0, void (_ && (_.readable === !1 && (this.readable = !1), _.writable === !1 && (this.writable = !1), _.allowHalfOpen === !1 && (this.allowHalfOpen = !1, this.once("end", S))))) : new c(_);
|
|
1405
1392
|
}
|
|
1406
1393
|
function S() {
|
|
1407
|
-
this._writableState.ended ||
|
|
1394
|
+
this._writableState.ended || w.nextTick(O, this);
|
|
1408
1395
|
}
|
|
1409
|
-
function O(
|
|
1410
|
-
|
|
1396
|
+
function O(_) {
|
|
1397
|
+
_.end();
|
|
1411
1398
|
}
|
|
1412
|
-
var i = Object.keys || function(
|
|
1399
|
+
var i = Object.keys || function(_) {
|
|
1413
1400
|
var b = [];
|
|
1414
|
-
for (var n in
|
|
1401
|
+
for (var n in _) b.push(n);
|
|
1415
1402
|
return b;
|
|
1416
1403
|
};
|
|
1417
|
-
|
|
1418
|
-
var h =
|
|
1419
|
-
|
|
1404
|
+
I.exports = c;
|
|
1405
|
+
var h = C("./_stream_readable"), d = C("./_stream_writable");
|
|
1406
|
+
C("inherits")(c, h);
|
|
1420
1407
|
for (var a, g = i(d.prototype), L = 0; L < g.length; L++) a = g[L], c.prototype[a] || (c.prototype[a] = d.prototype[a]);
|
|
1421
1408
|
Object.defineProperty(c.prototype, "writableHighWaterMark", {
|
|
1422
1409
|
enumerable: !1,
|
|
@@ -1438,34 +1425,34 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1438
1425
|
get: function() {
|
|
1439
1426
|
return this._readableState !== void 0 && this._writableState !== void 0 && this._readableState.destroyed && this._writableState.destroyed;
|
|
1440
1427
|
},
|
|
1441
|
-
set: function(
|
|
1442
|
-
this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed =
|
|
1428
|
+
set: function(_) {
|
|
1429
|
+
this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed = _, this._writableState.destroyed = _);
|
|
1443
1430
|
}
|
|
1444
1431
|
});
|
|
1445
1432
|
}).call(this);
|
|
1446
|
-
}).call(this,
|
|
1433
|
+
}).call(this, C("_process"));
|
|
1447
1434
|
}, {
|
|
1448
1435
|
"./_stream_readable": 18,
|
|
1449
1436
|
"./_stream_writable": 20,
|
|
1450
1437
|
_process: 12,
|
|
1451
1438
|
inherits: 10
|
|
1452
1439
|
}],
|
|
1453
|
-
17: [function(
|
|
1440
|
+
17: [function(C, I) {
|
|
1454
1441
|
"use strict";
|
|
1455
|
-
function
|
|
1456
|
-
return this instanceof
|
|
1442
|
+
function w(S) {
|
|
1443
|
+
return this instanceof w ? void c.call(this, S) : new w(S);
|
|
1457
1444
|
}
|
|
1458
|
-
|
|
1459
|
-
var c =
|
|
1460
|
-
|
|
1445
|
+
I.exports = w;
|
|
1446
|
+
var c = C("./_stream_transform");
|
|
1447
|
+
C("inherits")(w, c), w.prototype._transform = function(S, O, i) {
|
|
1461
1448
|
i(null, S);
|
|
1462
1449
|
};
|
|
1463
1450
|
}, {
|
|
1464
1451
|
"./_stream_transform": 19,
|
|
1465
1452
|
inherits: 10
|
|
1466
1453
|
}],
|
|
1467
|
-
18: [function(
|
|
1468
|
-
(function(
|
|
1454
|
+
18: [function(C, I) {
|
|
1455
|
+
(function(w, c) {
|
|
1469
1456
|
(function() {
|
|
1470
1457
|
"use strict";
|
|
1471
1458
|
function S(s) {
|
|
@@ -1478,10 +1465,10 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1478
1465
|
return typeof s.prependListener == "function" ? s.prependListener(o, e) : void (s._events && s._events[o] ? Array.isArray(s._events[o]) ? s._events[o].unshift(e) : s._events[o] = [e, s._events[o]] : s.on(o, e));
|
|
1479
1466
|
}
|
|
1480
1467
|
function h(s, o, e) {
|
|
1481
|
-
te = te ||
|
|
1468
|
+
te = te || C("./_stream_duplex"), s = s || {}, typeof e != "boolean" && (e = o instanceof te), this.objectMode = !!s.objectMode, e && (this.objectMode = this.objectMode || !!s.readableObjectMode), this.highWaterMark = _e(this, s, "readableHighWaterMark", e), this.buffer = new Se(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = s.emitClose !== !1, this.autoDestroy = !!s.autoDestroy, this.destroyed = !1, this.defaultEncoding = s.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, s.encoding && (!ae && (ae = C("string_decoder/").StringDecoder), this.decoder = new ae(s.encoding), this.encoding = s.encoding);
|
|
1482
1469
|
}
|
|
1483
1470
|
function d(s) {
|
|
1484
|
-
if (te = te ||
|
|
1471
|
+
if (te = te || C("./_stream_duplex"), !(this instanceof d)) return new d(s);
|
|
1485
1472
|
var o = this instanceof te;
|
|
1486
1473
|
this._readableState = new h(s, this, o), this.readable = !0, s && (typeof s.read == "function" && (this._read = s.read), typeof s.destroy == "function" && (this._destroy = s.destroy)), oe.call(this);
|
|
1487
1474
|
}
|
|
@@ -1490,11 +1477,11 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1490
1477
|
var u = s._readableState;
|
|
1491
1478
|
if (o === null) u.reading = !1, n(s, u);
|
|
1492
1479
|
else {
|
|
1493
|
-
var
|
|
1494
|
-
if (r || (
|
|
1480
|
+
var v;
|
|
1481
|
+
if (r || (v = L(u, o)), v) P(s, v);
|
|
1495
1482
|
else if (!(u.objectMode || o && 0 < o.length)) t || (u.reading = !1, k(s, u));
|
|
1496
|
-
else if (typeof o == "string" || u.objectMode || Object.getPrototypeOf(o) === de.prototype || (o = S(o)), t) u.endEmitted ?
|
|
1497
|
-
else if (u.ended)
|
|
1483
|
+
else if (typeof o == "string" || u.objectMode || Object.getPrototypeOf(o) === de.prototype || (o = S(o)), t) u.endEmitted ? P(s, new A()) : g(s, u, o, !0);
|
|
1484
|
+
else if (u.ended) P(s, new he());
|
|
1498
1485
|
else {
|
|
1499
1486
|
if (u.destroyed) return !1;
|
|
1500
1487
|
u.reading = !1, u.decoder && !e ? (o = u.decoder.write(o), u.objectMode || o.length !== 0 ? g(s, u, o, !1) : k(s, u)) : g(s, u, o, !1);
|
|
@@ -1513,11 +1500,11 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1513
1500
|
"Uint8Array"
|
|
1514
1501
|
], o)), e;
|
|
1515
1502
|
}
|
|
1516
|
-
function
|
|
1503
|
+
function _(s) {
|
|
1517
1504
|
return 1073741824 <= s ? s = 1073741824 : (s--, s |= s >>> 1, s |= s >>> 2, s |= s >>> 4, s |= s >>> 8, s |= s >>> 16, s++), s;
|
|
1518
1505
|
}
|
|
1519
1506
|
function b(s, o) {
|
|
1520
|
-
return 0 >= s || o.length === 0 && o.ended ? 0 : o.objectMode ? 1 : s === s ? (s > o.highWaterMark && (o.highWaterMark =
|
|
1507
|
+
return 0 >= s || o.length === 0 && o.ended ? 0 : o.objectMode ? 1 : s === s ? (s > o.highWaterMark && (o.highWaterMark = _(s)), s <= o.length ? s : o.ended ? o.length : (o.needReadable = !0, 0)) : o.flowing && o.length ? o.buffer.head.data.length : o.length;
|
|
1521
1508
|
}
|
|
1522
1509
|
function n(s, o) {
|
|
1523
1510
|
if (H("onEofChunk"), !o.ended) {
|
|
@@ -1530,14 +1517,14 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1530
1517
|
}
|
|
1531
1518
|
function l(s) {
|
|
1532
1519
|
var o = s._readableState;
|
|
1533
|
-
H("emitReadable", o.needReadable, o.emittedReadable), o.needReadable = !1, o.emittedReadable || (H("emitReadable", o.flowing), o.emittedReadable = !0,
|
|
1520
|
+
H("emitReadable", o.needReadable, o.emittedReadable), o.needReadable = !1, o.emittedReadable || (H("emitReadable", o.flowing), o.emittedReadable = !0, w.nextTick(y, s));
|
|
1534
1521
|
}
|
|
1535
1522
|
function y(s) {
|
|
1536
1523
|
var o = s._readableState;
|
|
1537
1524
|
H("emitReadable_", o.destroyed, o.length, o.ended), !o.destroyed && (o.length || o.ended) && (s.emit("readable"), o.emittedReadable = !1), o.needReadable = !o.flowing && !o.ended && o.length <= o.highWaterMark, B(s);
|
|
1538
1525
|
}
|
|
1539
1526
|
function k(s, o) {
|
|
1540
|
-
o.readingMore || (o.readingMore = !0,
|
|
1527
|
+
o.readingMore || (o.readingMore = !0, w.nextTick(f, s, o));
|
|
1541
1528
|
}
|
|
1542
1529
|
function f(s, o) {
|
|
1543
1530
|
for (; !o.reading && !o.ended && (o.length < o.highWaterMark || o.flowing && o.length === 0); ) {
|
|
@@ -1552,17 +1539,17 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1552
1539
|
H("pipeOnDrain", o.awaitDrain), o.awaitDrain && o.awaitDrain--, o.awaitDrain === 0 && Ee(s, "data") && (o.flowing = !0, B(s));
|
|
1553
1540
|
};
|
|
1554
1541
|
}
|
|
1555
|
-
function
|
|
1542
|
+
function M(s) {
|
|
1556
1543
|
var o = s._readableState;
|
|
1557
1544
|
o.readableListening = 0 < s.listenerCount("readable"), o.resumeScheduled && !o.paused ? o.flowing = !0 : 0 < s.listenerCount("data") && s.resume();
|
|
1558
1545
|
}
|
|
1559
1546
|
function p(s) {
|
|
1560
1547
|
H("readable nexttick read 0"), s.read(0);
|
|
1561
1548
|
}
|
|
1562
|
-
function
|
|
1563
|
-
o.resumeScheduled || (o.resumeScheduled = !0,
|
|
1549
|
+
function m(s, o) {
|
|
1550
|
+
o.resumeScheduled || (o.resumeScheduled = !0, w.nextTick(N, s, o));
|
|
1564
1551
|
}
|
|
1565
|
-
function
|
|
1552
|
+
function N(s, o) {
|
|
1566
1553
|
H("resume", o.reading), o.reading || s.read(0), o.resumeScheduled = !1, s.emit("resume"), B(s), o.flowing && !o.reading && s.read(0);
|
|
1567
1554
|
}
|
|
1568
1555
|
function B(s) {
|
|
@@ -1576,7 +1563,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1576
1563
|
}
|
|
1577
1564
|
function z(s) {
|
|
1578
1565
|
var o = s._readableState;
|
|
1579
|
-
H("endReadable", o.endEmitted), o.endEmitted || (o.ended = !0,
|
|
1566
|
+
H("endReadable", o.endEmitted), o.endEmitted || (o.ended = !0, w.nextTick(K, o, s));
|
|
1580
1567
|
}
|
|
1581
1568
|
function K(s, o) {
|
|
1582
1569
|
if (H("endReadableNT", s.endEmitted, s.length), !s.endEmitted && s.length === 0 && (s.endEmitted = !0, o.readable = !1, o.emit("end"), s.autoDestroy)) {
|
|
@@ -1588,20 +1575,20 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1588
1575
|
for (var e = 0, t = s.length; e < t; e++) if (s[e] === o) return e;
|
|
1589
1576
|
return -1;
|
|
1590
1577
|
}
|
|
1591
|
-
|
|
1578
|
+
I.exports = d;
|
|
1592
1579
|
var te;
|
|
1593
1580
|
d.ReadableState = h;
|
|
1594
1581
|
var H;
|
|
1595
|
-
|
|
1582
|
+
C("events").EventEmitter;
|
|
1596
1583
|
var Ee = function(s, o) {
|
|
1597
1584
|
return s.listeners(o).length;
|
|
1598
|
-
}, oe =
|
|
1599
|
-
}, Q =
|
|
1585
|
+
}, oe = C("./internal/streams/stream"), de = C("buffer").Buffer, J = c.Uint8Array || function() {
|
|
1586
|
+
}, Q = C("util");
|
|
1600
1587
|
H = Q && Q.debuglog ? Q.debuglog("stream") : function() {
|
|
1601
1588
|
};
|
|
1602
|
-
var ae, pe, ge, Se =
|
|
1603
|
-
|
|
1604
|
-
var
|
|
1589
|
+
var ae, pe, ge, Se = C("./internal/streams/buffer_list"), me = C("./internal/streams/destroy"), _e = C("./internal/streams/state").getHighWaterMark, ye = C("../errors").codes, ce = ye.ERR_INVALID_ARG_TYPE, he = ye.ERR_STREAM_PUSH_AFTER_EOF, E = ye.ERR_METHOD_NOT_IMPLEMENTED, A = ye.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
|
1590
|
+
C("inherits")(d, oe);
|
|
1591
|
+
var P = me.errorOrDestroy, W = [
|
|
1605
1592
|
"error",
|
|
1606
1593
|
"close",
|
|
1607
1594
|
"destroy",
|
|
@@ -1626,7 +1613,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1626
1613
|
}, d.prototype.isPaused = function() {
|
|
1627
1614
|
return this._readableState.flowing === !1;
|
|
1628
1615
|
}, d.prototype.setEncoding = function(s) {
|
|
1629
|
-
ae || (ae =
|
|
1616
|
+
ae || (ae = C("string_decoder/").StringDecoder);
|
|
1630
1617
|
var o = new ae(s);
|
|
1631
1618
|
this._readableState.decoder = o, this._readableState.encoding = this._readableState.decoder.encoding;
|
|
1632
1619
|
for (var e = this._readableState.buffer.head, t = ""; e !== null; ) t += o.write(e.data), e = e.next;
|
|
@@ -1641,7 +1628,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1641
1628
|
var r;
|
|
1642
1629
|
return r = 0 < s ? V(s, o) : null, r === null ? (o.needReadable = o.length <= o.highWaterMark, s = 0) : (o.length -= s, o.awaitDrain = 0), o.length === 0 && (!o.ended && (o.needReadable = !0), e !== s && o.ended && z(this)), r !== null && this.emit("data", r), r;
|
|
1643
1630
|
}, d.prototype._read = function() {
|
|
1644
|
-
|
|
1631
|
+
P(this, new E("_read()"));
|
|
1645
1632
|
}, d.prototype.pipe = function(s, o) {
|
|
1646
1633
|
function e(le, fe) {
|
|
1647
1634
|
H("onunpipe"), le === $ && fe && fe.hasUnpiped === !1 && (fe.hasUnpiped = !0, r());
|
|
@@ -1650,21 +1637,21 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1650
1637
|
H("onend"), s.end();
|
|
1651
1638
|
}
|
|
1652
1639
|
function r() {
|
|
1653
|
-
H("cleanup"), s.removeListener("close",
|
|
1640
|
+
H("cleanup"), s.removeListener("close", x), s.removeListener("finish", q), s.removeListener("drain", ee), s.removeListener("error", v), s.removeListener("unpipe", e), $.removeListener("end", t), $.removeListener("end", G), $.removeListener("data", u), we = !0, Y.awaitDrain && (!s._writableState || s._writableState.needDrain) && ee();
|
|
1654
1641
|
}
|
|
1655
1642
|
function u(le) {
|
|
1656
1643
|
H("ondata");
|
|
1657
1644
|
var fe = s.write(le);
|
|
1658
|
-
H("dest.write", fe), fe === !1 && ((Y.pipesCount === 1 && Y.pipes === s || 1 < Y.pipesCount && Z(Y.pipes, s) !== -1) && !
|
|
1645
|
+
H("dest.write", fe), fe === !1 && ((Y.pipesCount === 1 && Y.pipes === s || 1 < Y.pipesCount && Z(Y.pipes, s) !== -1) && !we && (H("false write response, pause", Y.awaitDrain), Y.awaitDrain++), $.pause());
|
|
1659
1646
|
}
|
|
1660
|
-
function
|
|
1661
|
-
H("onerror", le), G(), s.removeListener("error",
|
|
1647
|
+
function v(le) {
|
|
1648
|
+
H("onerror", le), G(), s.removeListener("error", v), Ee(s, "error") === 0 && P(s, le);
|
|
1662
1649
|
}
|
|
1663
|
-
function
|
|
1650
|
+
function x() {
|
|
1664
1651
|
s.removeListener("finish", q), G();
|
|
1665
1652
|
}
|
|
1666
1653
|
function q() {
|
|
1667
|
-
H("onfinish"), s.removeListener("close",
|
|
1654
|
+
H("onfinish"), s.removeListener("close", x), G();
|
|
1668
1655
|
}
|
|
1669
1656
|
function G() {
|
|
1670
1657
|
H("unpipe"), $.unpipe(s);
|
|
@@ -1681,12 +1668,12 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1681
1668
|
Y.pipes.push(s);
|
|
1682
1669
|
}
|
|
1683
1670
|
Y.pipesCount += 1, H("pipe count=%d opts=%j", Y.pipesCount, o);
|
|
1684
|
-
var X = (!o || o.end !== !1) && s !==
|
|
1685
|
-
Y.endEmitted ?
|
|
1671
|
+
var X = (!o || o.end !== !1) && s !== w.stdout && s !== w.stderr ? t : G;
|
|
1672
|
+
Y.endEmitted ? w.nextTick(X) : $.once("end", X), s.on("unpipe", e);
|
|
1686
1673
|
var ee = T($);
|
|
1687
1674
|
s.on("drain", ee);
|
|
1688
|
-
var
|
|
1689
|
-
return $.on("data", u), i(s, "error",
|
|
1675
|
+
var we = !1;
|
|
1676
|
+
return $.on("data", u), i(s, "error", v), s.once("close", x), s.once("finish", q), s.emit("pipe", $), Y.flowing || (H("pipe resume"), $.resume()), s;
|
|
1690
1677
|
}, d.prototype.unpipe = function(s) {
|
|
1691
1678
|
var o = this._readableState, e = { hasUnpiped: !1 };
|
|
1692
1679
|
if (o.pipesCount === 0) return this;
|
|
@@ -1697,43 +1684,43 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1697
1684
|
for (var u = 0; u < r; u++) t[u].emit("unpipe", this, { hasUnpiped: !1 });
|
|
1698
1685
|
return this;
|
|
1699
1686
|
}
|
|
1700
|
-
var
|
|
1701
|
-
return
|
|
1687
|
+
var v = Z(o.pipes, s);
|
|
1688
|
+
return v === -1 ? this : (o.pipes.splice(v, 1), o.pipesCount -= 1, o.pipesCount === 1 && (o.pipes = o.pipes[0]), s.emit("unpipe", this, e), this);
|
|
1702
1689
|
}, d.prototype.on = function(s, o) {
|
|
1703
1690
|
var e = oe.prototype.on.call(this, s, o), t = this._readableState;
|
|
1704
|
-
return s === "data" ? (t.readableListening = 0 < this.listenerCount("readable"), t.flowing !== !1 && this.resume()) : s == "readable" && !t.endEmitted && !t.readableListening && (t.readableListening = t.needReadable = !0, t.flowing = !1, t.emittedReadable = !1, H("on readable", t.length, t.reading), t.length ? l(this) : !t.reading &&
|
|
1691
|
+
return s === "data" ? (t.readableListening = 0 < this.listenerCount("readable"), t.flowing !== !1 && this.resume()) : s == "readable" && !t.endEmitted && !t.readableListening && (t.readableListening = t.needReadable = !0, t.flowing = !1, t.emittedReadable = !1, H("on readable", t.length, t.reading), t.length ? l(this) : !t.reading && w.nextTick(p, this)), e;
|
|
1705
1692
|
}, d.prototype.addListener = d.prototype.on, d.prototype.removeListener = function(s, o) {
|
|
1706
1693
|
var e = oe.prototype.removeListener.call(this, s, o);
|
|
1707
|
-
return s === "readable" &&
|
|
1694
|
+
return s === "readable" && w.nextTick(M, this), e;
|
|
1708
1695
|
}, d.prototype.removeAllListeners = function(s) {
|
|
1709
1696
|
var o = oe.prototype.removeAllListeners.apply(this, arguments);
|
|
1710
|
-
return (s === "readable" || s === void 0) &&
|
|
1697
|
+
return (s === "readable" || s === void 0) && w.nextTick(M, this), o;
|
|
1711
1698
|
}, d.prototype.resume = function() {
|
|
1712
1699
|
var s = this._readableState;
|
|
1713
|
-
return s.flowing || (H("resume"), s.flowing = !s.readableListening,
|
|
1700
|
+
return s.flowing || (H("resume"), s.flowing = !s.readableListening, m(this, s)), s.paused = !1, this;
|
|
1714
1701
|
}, d.prototype.pause = function() {
|
|
1715
1702
|
return H("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (H("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this;
|
|
1716
1703
|
}, d.prototype.wrap = function(s) {
|
|
1717
1704
|
var o = this, e = this._readableState, t = !1;
|
|
1718
1705
|
for (var r in s.on("end", function() {
|
|
1719
1706
|
if (H("wrapped end"), e.decoder && !e.ended) {
|
|
1720
|
-
var
|
|
1721
|
-
|
|
1707
|
+
var v = e.decoder.end();
|
|
1708
|
+
v && v.length && o.push(v);
|
|
1722
1709
|
}
|
|
1723
1710
|
o.push(null);
|
|
1724
|
-
}), s.on("data", function(
|
|
1725
|
-
H("wrapped data"), e.decoder && (
|
|
1726
|
-
}), s) this[r] === void 0 && typeof s[r] == "function" && (this[r] = /* @__PURE__ */ (function(
|
|
1711
|
+
}), s.on("data", function(v) {
|
|
1712
|
+
H("wrapped data"), e.decoder && (v = e.decoder.write(v)), !(e.objectMode && v == null) && (e.objectMode || v && v.length) && (o.push(v) || (t = !0, s.pause()));
|
|
1713
|
+
}), s) this[r] === void 0 && typeof s[r] == "function" && (this[r] = /* @__PURE__ */ (function(v) {
|
|
1727
1714
|
return function() {
|
|
1728
|
-
return s[
|
|
1715
|
+
return s[v].apply(s, arguments);
|
|
1729
1716
|
};
|
|
1730
1717
|
})(r));
|
|
1731
1718
|
for (var u = 0; u < W.length; u++) s.on(W[u], this.emit.bind(this, W[u]));
|
|
1732
|
-
return this._read = function(
|
|
1733
|
-
H("wrapped _read",
|
|
1719
|
+
return this._read = function(v) {
|
|
1720
|
+
H("wrapped _read", v), t && (t = !1, s.resume());
|
|
1734
1721
|
}, this;
|
|
1735
1722
|
}, typeof Symbol == "function" && (d.prototype[Symbol.asyncIterator] = function() {
|
|
1736
|
-
return pe === void 0 && (pe =
|
|
1723
|
+
return pe === void 0 && (pe = C("./internal/streams/async_iterator")), pe(this);
|
|
1737
1724
|
}), Object.defineProperty(d.prototype, "readableHighWaterMark", {
|
|
1738
1725
|
enumerable: !1,
|
|
1739
1726
|
get: function() {
|
|
@@ -1758,10 +1745,10 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1758
1745
|
return this._readableState.length;
|
|
1759
1746
|
}
|
|
1760
1747
|
}), typeof Symbol == "function" && (d.from = function(s, o) {
|
|
1761
|
-
return ge === void 0 && (ge =
|
|
1748
|
+
return ge === void 0 && (ge = C("./internal/streams/from")), ge(d, s, o);
|
|
1762
1749
|
});
|
|
1763
1750
|
}).call(this);
|
|
1764
|
-
}).call(this,
|
|
1751
|
+
}).call(this, C("_process"), typeof global > "u" ? typeof self > "u" ? typeof window > "u" ? {} : window : self : global);
|
|
1765
1752
|
}, {
|
|
1766
1753
|
"../errors": 15,
|
|
1767
1754
|
"./_stream_duplex": 16,
|
|
@@ -1778,56 +1765,56 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1778
1765
|
"string_decoder/": 31,
|
|
1779
1766
|
util: 2
|
|
1780
1767
|
}],
|
|
1781
|
-
19: [function(
|
|
1768
|
+
19: [function(C, I) {
|
|
1782
1769
|
"use strict";
|
|
1783
|
-
function
|
|
1770
|
+
function w(_, b) {
|
|
1784
1771
|
var n = this._transformState;
|
|
1785
1772
|
n.transforming = !1;
|
|
1786
1773
|
var l = n.writecb;
|
|
1787
1774
|
if (l === null) return this.emit("error", new d());
|
|
1788
|
-
n.writechunk = null, n.writecb = null, b != null && this.push(b), l(
|
|
1775
|
+
n.writechunk = null, n.writecb = null, b != null && this.push(b), l(_);
|
|
1789
1776
|
var y = this._readableState;
|
|
1790
1777
|
y.reading = !1, (y.needReadable || y.length < y.highWaterMark) && this._read(y.highWaterMark);
|
|
1791
1778
|
}
|
|
1792
|
-
function c(
|
|
1793
|
-
return this instanceof c ? (L.call(this,
|
|
1794
|
-
afterTransform:
|
|
1779
|
+
function c(_) {
|
|
1780
|
+
return this instanceof c ? (L.call(this, _), this._transformState = {
|
|
1781
|
+
afterTransform: w.bind(this),
|
|
1795
1782
|
needTransform: !1,
|
|
1796
1783
|
transforming: !1,
|
|
1797
1784
|
writecb: null,
|
|
1798
1785
|
writechunk: null,
|
|
1799
1786
|
writeencoding: null
|
|
1800
|
-
}, this._readableState.needReadable = !0, this._readableState.sync = !1,
|
|
1787
|
+
}, this._readableState.needReadable = !0, this._readableState.sync = !1, _ && (typeof _.transform == "function" && (this._transform = _.transform), typeof _.flush == "function" && (this._flush = _.flush)), void this.on("prefinish", S)) : new c(_);
|
|
1801
1788
|
}
|
|
1802
1789
|
function S() {
|
|
1803
|
-
var
|
|
1790
|
+
var _ = this;
|
|
1804
1791
|
typeof this._flush != "function" || this._readableState.destroyed ? O(this, null, null) : this._flush(function(b, n) {
|
|
1805
|
-
O(
|
|
1792
|
+
O(_, b, n);
|
|
1806
1793
|
});
|
|
1807
1794
|
}
|
|
1808
|
-
function O(
|
|
1809
|
-
if (b) return
|
|
1810
|
-
if (n != null &&
|
|
1811
|
-
if (
|
|
1812
|
-
return
|
|
1813
|
-
}
|
|
1814
|
-
|
|
1815
|
-
var i =
|
|
1816
|
-
|
|
1817
|
-
return this._transformState.needTransform = !1, L.prototype.push.call(this,
|
|
1818
|
-
}, c.prototype._transform = function(
|
|
1795
|
+
function O(_, b, n) {
|
|
1796
|
+
if (b) return _.emit("error", b);
|
|
1797
|
+
if (n != null && _.push(n), _._writableState.length) throw new g();
|
|
1798
|
+
if (_._transformState.transforming) throw new a();
|
|
1799
|
+
return _.push(null);
|
|
1800
|
+
}
|
|
1801
|
+
I.exports = c;
|
|
1802
|
+
var i = C("../errors").codes, h = i.ERR_METHOD_NOT_IMPLEMENTED, d = i.ERR_MULTIPLE_CALLBACK, a = i.ERR_TRANSFORM_ALREADY_TRANSFORMING, g = i.ERR_TRANSFORM_WITH_LENGTH_0, L = C("./_stream_duplex");
|
|
1803
|
+
C("inherits")(c, L), c.prototype.push = function(_, b) {
|
|
1804
|
+
return this._transformState.needTransform = !1, L.prototype.push.call(this, _, b);
|
|
1805
|
+
}, c.prototype._transform = function(_, b, n) {
|
|
1819
1806
|
n(new h("_transform()"));
|
|
1820
|
-
}, c.prototype._write = function(
|
|
1807
|
+
}, c.prototype._write = function(_, b, n) {
|
|
1821
1808
|
var l = this._transformState;
|
|
1822
|
-
if (l.writecb = n, l.writechunk =
|
|
1809
|
+
if (l.writecb = n, l.writechunk = _, l.writeencoding = b, !l.transforming) {
|
|
1823
1810
|
var y = this._readableState;
|
|
1824
1811
|
(l.needTransform || y.needReadable || y.length < y.highWaterMark) && this._read(y.highWaterMark);
|
|
1825
1812
|
}
|
|
1826
1813
|
}, c.prototype._read = function() {
|
|
1827
|
-
var
|
|
1828
|
-
|
|
1829
|
-
}, c.prototype._destroy = function(
|
|
1830
|
-
L.prototype._destroy.call(this,
|
|
1814
|
+
var _ = this._transformState;
|
|
1815
|
+
_.writechunk === null || _.transforming ? _.needTransform = !0 : (_.transforming = !0, this._transform(_.writechunk, _.writeencoding, _.afterTransform));
|
|
1816
|
+
}, c.prototype._destroy = function(_, b) {
|
|
1817
|
+
L.prototype._destroy.call(this, _, function(n) {
|
|
1831
1818
|
b(n);
|
|
1832
1819
|
});
|
|
1833
1820
|
};
|
|
@@ -1836,51 +1823,51 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1836
1823
|
"./_stream_duplex": 16,
|
|
1837
1824
|
inherits: 10
|
|
1838
1825
|
}],
|
|
1839
|
-
20: [function(
|
|
1840
|
-
(function(
|
|
1826
|
+
20: [function(C, I) {
|
|
1827
|
+
(function(w, c) {
|
|
1841
1828
|
(function() {
|
|
1842
1829
|
"use strict";
|
|
1843
|
-
function S(
|
|
1830
|
+
function S(E) {
|
|
1844
1831
|
var A = this;
|
|
1845
1832
|
this.next = null, this.entry = null, this.finish = function() {
|
|
1846
|
-
z(A,
|
|
1833
|
+
z(A, E);
|
|
1847
1834
|
};
|
|
1848
1835
|
}
|
|
1849
|
-
function O(
|
|
1850
|
-
return H.from(
|
|
1836
|
+
function O(E) {
|
|
1837
|
+
return H.from(E);
|
|
1851
1838
|
}
|
|
1852
|
-
function i(
|
|
1853
|
-
return H.isBuffer(
|
|
1839
|
+
function i(E) {
|
|
1840
|
+
return H.isBuffer(E) || E instanceof Ee;
|
|
1854
1841
|
}
|
|
1855
1842
|
function h() {
|
|
1856
1843
|
}
|
|
1857
|
-
function d(
|
|
1858
|
-
K = K ||
|
|
1859
|
-
var W =
|
|
1860
|
-
this.decodeStrings = !W, this.defaultEncoding =
|
|
1844
|
+
function d(E, A, P) {
|
|
1845
|
+
K = K || C("./_stream_duplex"), E = E || {}, typeof P != "boolean" && (P = A instanceof K), this.objectMode = !!E.objectMode, P && (this.objectMode = this.objectMode || !!E.writableObjectMode), this.highWaterMark = de(this, E, "writableHighWaterMark", P), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
|
|
1846
|
+
var W = E.decodeStrings === !1;
|
|
1847
|
+
this.decodeStrings = !W, this.defaultEncoding = E.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(s) {
|
|
1861
1848
|
k(A, s);
|
|
1862
|
-
}, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose =
|
|
1849
|
+
}, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = E.emitClose !== !1, this.autoDestroy = !!E.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new S(this);
|
|
1863
1850
|
}
|
|
1864
|
-
function a(
|
|
1865
|
-
K = K ||
|
|
1851
|
+
function a(E) {
|
|
1852
|
+
K = K || C("./_stream_duplex");
|
|
1866
1853
|
var A = this instanceof K;
|
|
1867
|
-
return A || he.call(a, this) ? (this._writableState = new d(
|
|
1854
|
+
return A || he.call(a, this) ? (this._writableState = new d(E, this, A), this.writable = !0, E && (typeof E.write == "function" && (this._write = E.write), typeof E.writev == "function" && (this._writev = E.writev), typeof E.destroy == "function" && (this._destroy = E.destroy), typeof E.final == "function" && (this._final = E.final)), void te.call(this)) : new a(E);
|
|
1868
1855
|
}
|
|
1869
|
-
function g(
|
|
1870
|
-
var
|
|
1871
|
-
ce(
|
|
1856
|
+
function g(E, A) {
|
|
1857
|
+
var P = new _e();
|
|
1858
|
+
ce(E, P), w.nextTick(A, P);
|
|
1872
1859
|
}
|
|
1873
|
-
function L(
|
|
1860
|
+
function L(E, A, P, W) {
|
|
1874
1861
|
var s;
|
|
1875
|
-
return
|
|
1862
|
+
return P === null ? s = new me() : typeof P != "string" && !A.objectMode && (s = new Q("chunk", ["string", "Buffer"], P)), !s || (ce(E, s), w.nextTick(W, s), !1);
|
|
1876
1863
|
}
|
|
1877
|
-
function
|
|
1878
|
-
return
|
|
1864
|
+
function _(E, A, P) {
|
|
1865
|
+
return E.objectMode || E.decodeStrings === !1 || typeof A != "string" || (A = H.from(A, P)), A;
|
|
1879
1866
|
}
|
|
1880
|
-
function b(
|
|
1881
|
-
if (!
|
|
1882
|
-
var e =
|
|
1883
|
-
W !== e && (
|
|
1867
|
+
function b(E, A, P, W, s, o) {
|
|
1868
|
+
if (!P) {
|
|
1869
|
+
var e = _(A, W, s);
|
|
1870
|
+
W !== e && (P = !0, s = "buffer", W = e);
|
|
1884
1871
|
}
|
|
1885
1872
|
var t = A.objectMode ? 1 : W.length;
|
|
1886
1873
|
A.length += t;
|
|
@@ -1890,91 +1877,91 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1890
1877
|
A.lastBufferedRequest = {
|
|
1891
1878
|
chunk: W,
|
|
1892
1879
|
encoding: s,
|
|
1893
|
-
isBuf:
|
|
1880
|
+
isBuf: P,
|
|
1894
1881
|
callback: o,
|
|
1895
1882
|
next: null
|
|
1896
1883
|
}, u ? u.next = A.lastBufferedRequest : A.bufferedRequest = A.lastBufferedRequest, A.bufferedRequestCount += 1;
|
|
1897
|
-
} else n(
|
|
1884
|
+
} else n(E, A, !1, t, W, s, o);
|
|
1898
1885
|
return r;
|
|
1899
1886
|
}
|
|
1900
|
-
function n(
|
|
1901
|
-
A.writelen = W, A.writecb = e, A.writing = !0, A.sync = !0, A.destroyed ? A.onwrite(new Se("write")) :
|
|
1887
|
+
function n(E, A, P, W, s, o, e) {
|
|
1888
|
+
A.writelen = W, A.writecb = e, A.writing = !0, A.sync = !0, A.destroyed ? A.onwrite(new Se("write")) : P ? E._writev(s, A.onwrite) : E._write(s, o, A.onwrite), A.sync = !1;
|
|
1902
1889
|
}
|
|
1903
|
-
function l(
|
|
1904
|
-
--A.pendingcb,
|
|
1890
|
+
function l(E, A, P, W, s) {
|
|
1891
|
+
--A.pendingcb, P ? (w.nextTick(s, W), w.nextTick(B, E, A), E._writableState.errorEmitted = !0, ce(E, W)) : (s(W), E._writableState.errorEmitted = !0, ce(E, W), B(E, A));
|
|
1905
1892
|
}
|
|
1906
|
-
function y(
|
|
1907
|
-
|
|
1893
|
+
function y(E) {
|
|
1894
|
+
E.writing = !1, E.writecb = null, E.length -= E.writelen, E.writelen = 0;
|
|
1908
1895
|
}
|
|
1909
|
-
function k(
|
|
1910
|
-
var
|
|
1896
|
+
function k(E, A) {
|
|
1897
|
+
var P = E._writableState, W = P.sync, s = P.writecb;
|
|
1911
1898
|
if (typeof s != "function") throw new pe();
|
|
1912
|
-
if (y(
|
|
1899
|
+
if (y(P), A) l(E, P, W, A, s);
|
|
1913
1900
|
else {
|
|
1914
|
-
var o = p(
|
|
1915
|
-
o ||
|
|
1901
|
+
var o = p(P) || E.destroyed;
|
|
1902
|
+
o || P.corked || P.bufferProcessing || !P.bufferedRequest || M(E, P), W ? w.nextTick(f, E, P, o, s) : f(E, P, o, s);
|
|
1916
1903
|
}
|
|
1917
1904
|
}
|
|
1918
|
-
function f(
|
|
1919
|
-
|
|
1905
|
+
function f(E, A, P, W) {
|
|
1906
|
+
P || T(E, A), A.pendingcb--, W(), B(E, A);
|
|
1920
1907
|
}
|
|
1921
|
-
function T(
|
|
1922
|
-
A.length === 0 && A.needDrain && (A.needDrain = !1,
|
|
1908
|
+
function T(E, A) {
|
|
1909
|
+
A.length === 0 && A.needDrain && (A.needDrain = !1, E.emit("drain"));
|
|
1923
1910
|
}
|
|
1924
|
-
function
|
|
1911
|
+
function M(E, A) {
|
|
1925
1912
|
A.bufferProcessing = !0;
|
|
1926
|
-
var
|
|
1927
|
-
if (
|
|
1913
|
+
var P = A.bufferedRequest;
|
|
1914
|
+
if (E._writev && P && P.next) {
|
|
1928
1915
|
var W = A.bufferedRequestCount, s = Array(W), o = A.corkedRequestsFree;
|
|
1929
|
-
o.entry =
|
|
1930
|
-
for (var e = 0, t = !0;
|
|
1931
|
-
s.allBuffers = t, n(
|
|
1916
|
+
o.entry = P;
|
|
1917
|
+
for (var e = 0, t = !0; P; ) s[e] = P, P.isBuf || (t = !1), P = P.next, e += 1;
|
|
1918
|
+
s.allBuffers = t, n(E, A, !0, A.length, s, "", o.finish), A.pendingcb++, A.lastBufferedRequest = null, o.next ? (A.corkedRequestsFree = o.next, o.next = null) : A.corkedRequestsFree = new S(A), A.bufferedRequestCount = 0;
|
|
1932
1919
|
} else {
|
|
1933
|
-
for (;
|
|
1934
|
-
var r =
|
|
1935
|
-
if (n(
|
|
1920
|
+
for (; P; ) {
|
|
1921
|
+
var r = P.chunk, u = P.encoding, v = P.callback;
|
|
1922
|
+
if (n(E, A, !1, A.objectMode ? 1 : r.length, r, u, v), P = P.next, A.bufferedRequestCount--, A.writing) break;
|
|
1936
1923
|
}
|
|
1937
|
-
|
|
1924
|
+
P === null && (A.lastBufferedRequest = null);
|
|
1938
1925
|
}
|
|
1939
|
-
A.bufferedRequest =
|
|
1926
|
+
A.bufferedRequest = P, A.bufferProcessing = !1;
|
|
1940
1927
|
}
|
|
1941
|
-
function p(
|
|
1942
|
-
return
|
|
1928
|
+
function p(E) {
|
|
1929
|
+
return E.ending && E.length === 0 && E.bufferedRequest === null && !E.finished && !E.writing;
|
|
1943
1930
|
}
|
|
1944
|
-
function
|
|
1945
|
-
|
|
1946
|
-
A.pendingcb--,
|
|
1931
|
+
function m(E, A) {
|
|
1932
|
+
E._final(function(P) {
|
|
1933
|
+
A.pendingcb--, P && ce(E, P), A.prefinished = !0, E.emit("prefinish"), B(E, A);
|
|
1947
1934
|
});
|
|
1948
1935
|
}
|
|
1949
|
-
function
|
|
1950
|
-
A.prefinished || A.finalCalled || (typeof
|
|
1936
|
+
function N(E, A) {
|
|
1937
|
+
A.prefinished || A.finalCalled || (typeof E._final != "function" || A.destroyed ? (A.prefinished = !0, E.emit("prefinish")) : (A.pendingcb++, A.finalCalled = !0, w.nextTick(m, E, A)));
|
|
1951
1938
|
}
|
|
1952
|
-
function B(
|
|
1953
|
-
var
|
|
1954
|
-
if (
|
|
1955
|
-
var W =
|
|
1956
|
-
(!W || W.autoDestroy && W.endEmitted) &&
|
|
1939
|
+
function B(E, A) {
|
|
1940
|
+
var P = p(A);
|
|
1941
|
+
if (P && (N(E, A), A.pendingcb === 0 && (A.finished = !0, E.emit("finish"), A.autoDestroy))) {
|
|
1942
|
+
var W = E._readableState;
|
|
1943
|
+
(!W || W.autoDestroy && W.endEmitted) && E.destroy();
|
|
1957
1944
|
}
|
|
1958
|
-
return
|
|
1945
|
+
return P;
|
|
1959
1946
|
}
|
|
1960
|
-
function V(
|
|
1961
|
-
A.ending = !0, B(
|
|
1947
|
+
function V(E, A, P) {
|
|
1948
|
+
A.ending = !0, B(E, A), P && (A.finished ? w.nextTick(P) : E.once("finish", P)), A.ended = !0, E.writable = !1;
|
|
1962
1949
|
}
|
|
1963
|
-
function z(
|
|
1964
|
-
var W =
|
|
1965
|
-
for (
|
|
1950
|
+
function z(E, A, P) {
|
|
1951
|
+
var W = E.entry;
|
|
1952
|
+
for (E.entry = null; W; ) {
|
|
1966
1953
|
var s = W.callback;
|
|
1967
|
-
A.pendingcb--, s(
|
|
1954
|
+
A.pendingcb--, s(P), W = W.next;
|
|
1968
1955
|
}
|
|
1969
|
-
A.corkedRequestsFree.next =
|
|
1956
|
+
A.corkedRequestsFree.next = E;
|
|
1970
1957
|
}
|
|
1971
|
-
|
|
1958
|
+
I.exports = a;
|
|
1972
1959
|
var K;
|
|
1973
1960
|
a.WritableState = d;
|
|
1974
|
-
var Z = { deprecate:
|
|
1975
|
-
}, oe =
|
|
1976
|
-
|
|
1977
|
-
for (var
|
|
1961
|
+
var Z = { deprecate: C("util-deprecate") }, te = C("./internal/streams/stream"), H = C("buffer").Buffer, Ee = c.Uint8Array || function() {
|
|
1962
|
+
}, oe = C("./internal/streams/destroy"), de = C("./internal/streams/state").getHighWaterMark, J = C("../errors").codes, Q = J.ERR_INVALID_ARG_TYPE, ae = J.ERR_METHOD_NOT_IMPLEMENTED, pe = J.ERR_MULTIPLE_CALLBACK, ge = J.ERR_STREAM_CANNOT_PIPE, Se = J.ERR_STREAM_DESTROYED, me = J.ERR_STREAM_NULL_VALUES, _e = J.ERR_STREAM_WRITE_AFTER_END, ye = J.ERR_UNKNOWN_ENCODING, ce = oe.errorOrDestroy;
|
|
1963
|
+
C("inherits")(a, te), d.prototype.getBuffer = function() {
|
|
1964
|
+
for (var E = this.bufferedRequest, A = []; E; ) A.push(E), E = E.next;
|
|
1978
1965
|
return A;
|
|
1979
1966
|
}, (function() {
|
|
1980
1967
|
try {
|
|
@@ -1985,22 +1972,22 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1985
1972
|
}
|
|
1986
1973
|
})();
|
|
1987
1974
|
var he;
|
|
1988
|
-
typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (he = Function.prototype[Symbol.hasInstance], Object.defineProperty(a, Symbol.hasInstance, { value: function(
|
|
1989
|
-
return !!he.call(this,
|
|
1990
|
-
} })) : he = function(
|
|
1991
|
-
return
|
|
1975
|
+
typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (he = Function.prototype[Symbol.hasInstance], Object.defineProperty(a, Symbol.hasInstance, { value: function(E) {
|
|
1976
|
+
return !!he.call(this, E) || this === a && E && E._writableState instanceof d;
|
|
1977
|
+
} })) : he = function(E) {
|
|
1978
|
+
return E instanceof this;
|
|
1992
1979
|
}, a.prototype.pipe = function() {
|
|
1993
1980
|
ce(this, new ge());
|
|
1994
|
-
}, a.prototype.write = function(
|
|
1995
|
-
var W = this._writableState, s = !1, o = !W.objectMode && i(
|
|
1996
|
-
return o && !H.isBuffer(
|
|
1981
|
+
}, a.prototype.write = function(E, A, P) {
|
|
1982
|
+
var W = this._writableState, s = !1, o = !W.objectMode && i(E);
|
|
1983
|
+
return o && !H.isBuffer(E) && (E = O(E)), typeof A == "function" && (P = A, A = null), o ? A = "buffer" : !A && (A = W.defaultEncoding), typeof P != "function" && (P = h), W.ending ? g(this, P) : (o || L(this, W, E, P)) && (W.pendingcb++, s = b(this, W, o, E, A, P)), s;
|
|
1997
1984
|
}, a.prototype.cork = function() {
|
|
1998
1985
|
this._writableState.corked++;
|
|
1999
1986
|
}, a.prototype.uncork = function() {
|
|
2000
|
-
var
|
|
2001
|
-
|
|
2002
|
-
}, a.prototype.setDefaultEncoding = function(
|
|
2003
|
-
if (typeof
|
|
1987
|
+
var E = this._writableState;
|
|
1988
|
+
E.corked && (E.corked--, !E.writing && !E.corked && !E.bufferProcessing && E.bufferedRequest && M(this, E));
|
|
1989
|
+
}, a.prototype.setDefaultEncoding = function(E) {
|
|
1990
|
+
if (typeof E == "string" && (E = E.toLowerCase()), !(-1 < [
|
|
2004
1991
|
"hex",
|
|
2005
1992
|
"utf8",
|
|
2006
1993
|
"utf-8",
|
|
@@ -2012,8 +1999,8 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2012
1999
|
"utf16le",
|
|
2013
2000
|
"utf-16le",
|
|
2014
2001
|
"raw"
|
|
2015
|
-
].indexOf((
|
|
2016
|
-
return this._writableState.defaultEncoding =
|
|
2002
|
+
].indexOf((E + "").toLowerCase()))) throw new ye(E);
|
|
2003
|
+
return this._writableState.defaultEncoding = E, this;
|
|
2017
2004
|
}, Object.defineProperty(a.prototype, "writableBuffer", {
|
|
2018
2005
|
enumerable: !1,
|
|
2019
2006
|
get: function() {
|
|
@@ -2024,11 +2011,11 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2024
2011
|
get: function() {
|
|
2025
2012
|
return this._writableState.highWaterMark;
|
|
2026
2013
|
}
|
|
2027
|
-
}), a.prototype._write = function(
|
|
2028
|
-
|
|
2029
|
-
}, a.prototype._writev = null, a.prototype.end = function(
|
|
2014
|
+
}), a.prototype._write = function(E, A, P) {
|
|
2015
|
+
P(new ae("_write()"));
|
|
2016
|
+
}, a.prototype._writev = null, a.prototype.end = function(E, A, P) {
|
|
2030
2017
|
var W = this._writableState;
|
|
2031
|
-
return typeof
|
|
2018
|
+
return typeof E == "function" ? (P = E, E = null, A = null) : typeof A == "function" && (P = A, A = null), E != null && this.write(E, A), W.corked && (W.corked = 1, this.uncork()), W.ending || V(this, W, P), this;
|
|
2032
2019
|
}, Object.defineProperty(a.prototype, "writableLength", {
|
|
2033
2020
|
enumerable: !1,
|
|
2034
2021
|
get: function() {
|
|
@@ -2039,14 +2026,14 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2039
2026
|
get: function() {
|
|
2040
2027
|
return this._writableState !== void 0 && this._writableState.destroyed;
|
|
2041
2028
|
},
|
|
2042
|
-
set: function(
|
|
2043
|
-
this._writableState && (this._writableState.destroyed =
|
|
2029
|
+
set: function(E) {
|
|
2030
|
+
this._writableState && (this._writableState.destroyed = E);
|
|
2044
2031
|
}
|
|
2045
|
-
}), a.prototype.destroy = oe.destroy, a.prototype._undestroy = oe.undestroy, a.prototype._destroy = function(
|
|
2046
|
-
A(
|
|
2032
|
+
}), a.prototype.destroy = oe.destroy, a.prototype._undestroy = oe.undestroy, a.prototype._destroy = function(E, A) {
|
|
2033
|
+
A(E);
|
|
2047
2034
|
};
|
|
2048
2035
|
}).call(this);
|
|
2049
|
-
}).call(this,
|
|
2036
|
+
}).call(this, C("_process"), typeof global > "u" ? typeof self > "u" ? typeof window > "u" ? {} : window : self : global);
|
|
2050
2037
|
}, {
|
|
2051
2038
|
"../errors": 15,
|
|
2052
2039
|
"./_stream_duplex": 16,
|
|
@@ -2058,60 +2045,60 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2058
2045
|
inherits: 10,
|
|
2059
2046
|
"util-deprecate": 32
|
|
2060
2047
|
}],
|
|
2061
|
-
21: [function(
|
|
2062
|
-
(function(
|
|
2048
|
+
21: [function(C, I) {
|
|
2049
|
+
(function(w) {
|
|
2063
2050
|
(function() {
|
|
2064
2051
|
"use strict";
|
|
2065
|
-
function c(T,
|
|
2066
|
-
return
|
|
2052
|
+
function c(T, M, p) {
|
|
2053
|
+
return M in T ? Object.defineProperty(T, M, {
|
|
2067
2054
|
value: p,
|
|
2068
2055
|
enumerable: !0,
|
|
2069
2056
|
configurable: !0,
|
|
2070
2057
|
writable: !0
|
|
2071
|
-
}) : T[
|
|
2058
|
+
}) : T[M] = p, T;
|
|
2072
2059
|
}
|
|
2073
|
-
function S(T,
|
|
2060
|
+
function S(T, M) {
|
|
2074
2061
|
return {
|
|
2075
2062
|
value: T,
|
|
2076
|
-
done:
|
|
2063
|
+
done: M
|
|
2077
2064
|
};
|
|
2078
2065
|
}
|
|
2079
2066
|
function O(T) {
|
|
2080
|
-
var
|
|
2081
|
-
if (
|
|
2067
|
+
var M = T[g];
|
|
2068
|
+
if (M !== null) {
|
|
2082
2069
|
var p = T[y].read();
|
|
2083
|
-
p !== null && (T[n] = null, T[g] = null, T[L] = null,
|
|
2070
|
+
p !== null && (T[n] = null, T[g] = null, T[L] = null, M(S(p, !1)));
|
|
2084
2071
|
}
|
|
2085
2072
|
}
|
|
2086
2073
|
function i(T) {
|
|
2087
|
-
|
|
2074
|
+
w.nextTick(O, T);
|
|
2088
2075
|
}
|
|
2089
|
-
function h(T,
|
|
2090
|
-
return function(p,
|
|
2076
|
+
function h(T, M) {
|
|
2077
|
+
return function(p, m) {
|
|
2091
2078
|
T.then(function() {
|
|
2092
|
-
|
|
2093
|
-
},
|
|
2079
|
+
M[b] ? p(S(void 0, !0)) : M[l](p, m);
|
|
2080
|
+
}, m);
|
|
2094
2081
|
};
|
|
2095
2082
|
}
|
|
2096
|
-
var d, a =
|
|
2083
|
+
var d, a = C("./end-of-stream"), g = /* @__PURE__ */ Symbol("lastResolve"), L = /* @__PURE__ */ Symbol("lastReject"), _ = /* @__PURE__ */ Symbol("error"), b = /* @__PURE__ */ Symbol("ended"), n = /* @__PURE__ */ Symbol("lastPromise"), l = /* @__PURE__ */ Symbol("handlePromise"), y = /* @__PURE__ */ Symbol("stream"), k = Object.getPrototypeOf(function() {
|
|
2097
2084
|
}), f = Object.setPrototypeOf((d = {
|
|
2098
2085
|
get stream() {
|
|
2099
2086
|
return this[y];
|
|
2100
2087
|
},
|
|
2101
2088
|
next: function() {
|
|
2102
|
-
var T = this,
|
|
2103
|
-
if (
|
|
2089
|
+
var T = this, M = this[_];
|
|
2090
|
+
if (M !== null) return Promise.reject(M);
|
|
2104
2091
|
if (this[b]) return Promise.resolve(S(void 0, !0));
|
|
2105
2092
|
if (this[y].destroyed) return new Promise(function(B, V) {
|
|
2106
|
-
|
|
2107
|
-
T[
|
|
2093
|
+
w.nextTick(function() {
|
|
2094
|
+
T[_] ? V(T[_]) : B(S(void 0, !0));
|
|
2108
2095
|
});
|
|
2109
2096
|
});
|
|
2110
|
-
var p,
|
|
2111
|
-
if (
|
|
2097
|
+
var p, m = this[n];
|
|
2098
|
+
if (m) p = new Promise(h(m, this));
|
|
2112
2099
|
else {
|
|
2113
|
-
var
|
|
2114
|
-
if (
|
|
2100
|
+
var N = this[y].read();
|
|
2101
|
+
if (N !== null) return Promise.resolve(S(N, !1));
|
|
2115
2102
|
p = new Promise(this[l]);
|
|
2116
2103
|
}
|
|
2117
2104
|
return this[n] = p, p;
|
|
@@ -2120,39 +2107,39 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2120
2107
|
return this;
|
|
2121
2108
|
}), c(d, "return", function() {
|
|
2122
2109
|
var T = this;
|
|
2123
|
-
return new Promise(function(
|
|
2124
|
-
T[y].destroy(null, function(
|
|
2125
|
-
|
|
2110
|
+
return new Promise(function(M, p) {
|
|
2111
|
+
T[y].destroy(null, function(m) {
|
|
2112
|
+
m ? p(m) : M(S(void 0, !0));
|
|
2126
2113
|
});
|
|
2127
2114
|
});
|
|
2128
2115
|
}), d), k);
|
|
2129
|
-
|
|
2130
|
-
var
|
|
2116
|
+
I.exports = function(T) {
|
|
2117
|
+
var M, p = Object.create(f, (M = {}, c(M, y, {
|
|
2131
2118
|
value: T,
|
|
2132
2119
|
writable: !0
|
|
2133
|
-
}), c(
|
|
2120
|
+
}), c(M, g, {
|
|
2134
2121
|
value: null,
|
|
2135
2122
|
writable: !0
|
|
2136
|
-
}), c(
|
|
2123
|
+
}), c(M, L, {
|
|
2137
2124
|
value: null,
|
|
2138
2125
|
writable: !0
|
|
2139
|
-
}), c(
|
|
2126
|
+
}), c(M, _, {
|
|
2140
2127
|
value: null,
|
|
2141
2128
|
writable: !0
|
|
2142
|
-
}), c(
|
|
2129
|
+
}), c(M, b, {
|
|
2143
2130
|
value: T._readableState.endEmitted,
|
|
2144
2131
|
writable: !0
|
|
2145
|
-
}), c(
|
|
2146
|
-
value: function(
|
|
2132
|
+
}), c(M, l, {
|
|
2133
|
+
value: function(m, N) {
|
|
2147
2134
|
var B = p[y].read();
|
|
2148
|
-
B ? (p[n] = null, p[g] = null, p[L] = null,
|
|
2135
|
+
B ? (p[n] = null, p[g] = null, p[L] = null, m(S(B, !1))) : (p[g] = m, p[L] = N);
|
|
2149
2136
|
},
|
|
2150
2137
|
writable: !0
|
|
2151
|
-
}),
|
|
2152
|
-
return p[n] = null, a(T, function(
|
|
2153
|
-
if (
|
|
2154
|
-
var
|
|
2155
|
-
|
|
2138
|
+
}), M));
|
|
2139
|
+
return p[n] = null, a(T, function(m) {
|
|
2140
|
+
if (m && m.code !== "ERR_STREAM_PREMATURE_CLOSE") {
|
|
2141
|
+
var N = p[L];
|
|
2142
|
+
N !== null && (p[n] = null, p[g] = null, p[L] = null, N(m)), p[_] = m;
|
|
2156
2143
|
return;
|
|
2157
2144
|
}
|
|
2158
2145
|
var B = p[g];
|
|
@@ -2160,57 +2147,57 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2160
2147
|
}), T.on("readable", i.bind(null, p)), p;
|
|
2161
2148
|
};
|
|
2162
2149
|
}).call(this);
|
|
2163
|
-
}).call(this,
|
|
2150
|
+
}).call(this, C("_process"));
|
|
2164
2151
|
}, {
|
|
2165
2152
|
"./end-of-stream": 24,
|
|
2166
2153
|
_process: 12
|
|
2167
2154
|
}],
|
|
2168
|
-
22: [function(
|
|
2155
|
+
22: [function(C, I) {
|
|
2169
2156
|
"use strict";
|
|
2170
|
-
function
|
|
2171
|
-
var n = Object.keys(
|
|
2157
|
+
function w(_, b) {
|
|
2158
|
+
var n = Object.keys(_);
|
|
2172
2159
|
if (Object.getOwnPropertySymbols) {
|
|
2173
|
-
var l = Object.getOwnPropertySymbols(
|
|
2160
|
+
var l = Object.getOwnPropertySymbols(_);
|
|
2174
2161
|
b && (l = l.filter(function(y) {
|
|
2175
|
-
return Object.getOwnPropertyDescriptor(
|
|
2162
|
+
return Object.getOwnPropertyDescriptor(_, y).enumerable;
|
|
2176
2163
|
})), n.push.apply(n, l);
|
|
2177
2164
|
}
|
|
2178
2165
|
return n;
|
|
2179
2166
|
}
|
|
2180
|
-
function c(
|
|
2181
|
-
for (var b, n = 1; n < arguments.length; n++) b = arguments[n] == null ? {} : arguments[n], n % 2 ?
|
|
2182
|
-
S(
|
|
2183
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
2184
|
-
Object.defineProperty(
|
|
2167
|
+
function c(_) {
|
|
2168
|
+
for (var b, n = 1; n < arguments.length; n++) b = arguments[n] == null ? {} : arguments[n], n % 2 ? w(Object(b), !0).forEach(function(l) {
|
|
2169
|
+
S(_, l, b[l]);
|
|
2170
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(_, Object.getOwnPropertyDescriptors(b)) : w(Object(b)).forEach(function(l) {
|
|
2171
|
+
Object.defineProperty(_, l, Object.getOwnPropertyDescriptor(b, l));
|
|
2185
2172
|
});
|
|
2186
|
-
return
|
|
2173
|
+
return _;
|
|
2187
2174
|
}
|
|
2188
|
-
function S(
|
|
2189
|
-
return b in
|
|
2175
|
+
function S(_, b, n) {
|
|
2176
|
+
return b in _ ? Object.defineProperty(_, b, {
|
|
2190
2177
|
value: n,
|
|
2191
2178
|
enumerable: !0,
|
|
2192
2179
|
configurable: !0,
|
|
2193
2180
|
writable: !0
|
|
2194
|
-
}) :
|
|
2181
|
+
}) : _[b] = n, _;
|
|
2195
2182
|
}
|
|
2196
|
-
function O(
|
|
2197
|
-
if (!(
|
|
2183
|
+
function O(_, b) {
|
|
2184
|
+
if (!(_ instanceof b)) throw new TypeError("Cannot call a class as a function");
|
|
2198
2185
|
}
|
|
2199
|
-
function i(
|
|
2200
|
-
for (var n, l = 0; l < b.length; l++) n = b[l], n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(
|
|
2186
|
+
function i(_, b) {
|
|
2187
|
+
for (var n, l = 0; l < b.length; l++) n = b[l], n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(_, n.key, n);
|
|
2201
2188
|
}
|
|
2202
|
-
function h(
|
|
2203
|
-
return b && i(
|
|
2189
|
+
function h(_, b, n) {
|
|
2190
|
+
return b && i(_.prototype, b), n && i(_, n), _;
|
|
2204
2191
|
}
|
|
2205
|
-
function d(
|
|
2206
|
-
a.prototype.copy.call(
|
|
2192
|
+
function d(_, b, n) {
|
|
2193
|
+
a.prototype.copy.call(_, b, n);
|
|
2207
2194
|
}
|
|
2208
|
-
var a =
|
|
2209
|
-
|
|
2210
|
-
function
|
|
2211
|
-
O(this,
|
|
2195
|
+
var a = C("buffer").Buffer, g = C("util").inspect, L = g && g.custom || "inspect";
|
|
2196
|
+
I.exports = (function() {
|
|
2197
|
+
function _() {
|
|
2198
|
+
O(this, _), this.head = null, this.tail = null, this.length = 0;
|
|
2212
2199
|
}
|
|
2213
|
-
return h(
|
|
2200
|
+
return h(_, [
|
|
2214
2201
|
{
|
|
2215
2202
|
key: "push",
|
|
2216
2203
|
value: function(b) {
|
|
@@ -2314,14 +2301,14 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2314
2301
|
}));
|
|
2315
2302
|
}
|
|
2316
2303
|
}
|
|
2317
|
-
]),
|
|
2304
|
+
]), _;
|
|
2318
2305
|
})();
|
|
2319
2306
|
}, {
|
|
2320
2307
|
buffer: 3,
|
|
2321
2308
|
util: 2
|
|
2322
2309
|
}],
|
|
2323
|
-
23: [function(
|
|
2324
|
-
(function(
|
|
2310
|
+
23: [function(C, I) {
|
|
2311
|
+
(function(w) {
|
|
2325
2312
|
(function() {
|
|
2326
2313
|
"use strict";
|
|
2327
2314
|
function c(i, h) {
|
|
@@ -2333,11 +2320,11 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2333
2320
|
function O(i, h) {
|
|
2334
2321
|
i.emit("error", h);
|
|
2335
2322
|
}
|
|
2336
|
-
|
|
2323
|
+
I.exports = {
|
|
2337
2324
|
destroy: function(i, h) {
|
|
2338
2325
|
var d = this, a = this._readableState && this._readableState.destroyed, g = this._writableState && this._writableState.destroyed;
|
|
2339
|
-
return a || g ? (h ? h(i) : i && (this._writableState ? !this._writableState.errorEmitted && (this._writableState.errorEmitted = !0,
|
|
2340
|
-
!h && L ? d._writableState ? d._writableState.errorEmitted ?
|
|
2326
|
+
return a || g ? (h ? h(i) : i && (this._writableState ? !this._writableState.errorEmitted && (this._writableState.errorEmitted = !0, w.nextTick(O, this, i)) : w.nextTick(O, this, i)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(i || null, function(L) {
|
|
2327
|
+
!h && L ? d._writableState ? d._writableState.errorEmitted ? w.nextTick(S, d) : (d._writableState.errorEmitted = !0, w.nextTick(c, d, L)) : w.nextTick(c, d, L) : h ? (w.nextTick(S, d), h(L)) : w.nextTick(S, d);
|
|
2341
2328
|
}), this);
|
|
2342
2329
|
},
|
|
2343
2330
|
undestroy: function() {
|
|
@@ -2349,11 +2336,11 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2349
2336
|
}
|
|
2350
2337
|
};
|
|
2351
2338
|
}).call(this);
|
|
2352
|
-
}).call(this,
|
|
2339
|
+
}).call(this, C("_process"));
|
|
2353
2340
|
}, { _process: 12 }],
|
|
2354
|
-
24: [function(
|
|
2341
|
+
24: [function(C, I) {
|
|
2355
2342
|
"use strict";
|
|
2356
|
-
function
|
|
2343
|
+
function w(h) {
|
|
2357
2344
|
var d = !1;
|
|
2358
2345
|
return function() {
|
|
2359
2346
|
if (!d) {
|
|
@@ -2370,36 +2357,36 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2370
2357
|
}
|
|
2371
2358
|
function O(h, d, a) {
|
|
2372
2359
|
if (typeof d == "function") return O(h, null, d);
|
|
2373
|
-
d || (d = {}), a =
|
|
2374
|
-
var g = d.readable || d.readable !== !1 && h.readable, L = d.writable || d.writable !== !1 && h.writable,
|
|
2360
|
+
d || (d = {}), a = w(a || c);
|
|
2361
|
+
var g = d.readable || d.readable !== !1 && h.readable, L = d.writable || d.writable !== !1 && h.writable, _ = function() {
|
|
2375
2362
|
h.writable || n();
|
|
2376
2363
|
}, b = h._writableState && h._writableState.finished, n = function() {
|
|
2377
2364
|
L = !1, b = !0, g || a.call(h);
|
|
2378
2365
|
}, l = h._readableState && h._readableState.endEmitted, y = function() {
|
|
2379
2366
|
g = !1, l = !0, L || a.call(h);
|
|
2380
|
-
}, k = function(
|
|
2381
|
-
a.call(h,
|
|
2367
|
+
}, k = function(M) {
|
|
2368
|
+
a.call(h, M);
|
|
2382
2369
|
}, f = function() {
|
|
2383
|
-
var
|
|
2384
|
-
return g && !l ? (h._readableState && h._readableState.ended || (
|
|
2370
|
+
var M;
|
|
2371
|
+
return g && !l ? (h._readableState && h._readableState.ended || (M = new i()), a.call(h, M)) : L && !b ? (h._writableState && h._writableState.ended || (M = new i()), a.call(h, M)) : void 0;
|
|
2385
2372
|
}, T = function() {
|
|
2386
2373
|
h.req.on("finish", n);
|
|
2387
2374
|
};
|
|
2388
|
-
return S(h) ? (h.on("complete", n), h.on("abort", f), h.req ? T() : h.on("request", T)) : L && !h._writableState && (h.on("end",
|
|
2389
|
-
h.removeListener("complete", n), h.removeListener("abort", f), h.removeListener("request", T), h.req && h.req.removeListener("finish", n), h.removeListener("end",
|
|
2375
|
+
return S(h) ? (h.on("complete", n), h.on("abort", f), h.req ? T() : h.on("request", T)) : L && !h._writableState && (h.on("end", _), h.on("close", _)), h.on("end", y), h.on("finish", n), d.error !== !1 && h.on("error", k), h.on("close", f), function() {
|
|
2376
|
+
h.removeListener("complete", n), h.removeListener("abort", f), h.removeListener("request", T), h.req && h.req.removeListener("finish", n), h.removeListener("end", _), h.removeListener("close", _), h.removeListener("finish", n), h.removeListener("end", y), h.removeListener("error", k), h.removeListener("close", f);
|
|
2390
2377
|
};
|
|
2391
2378
|
}
|
|
2392
|
-
var i =
|
|
2393
|
-
|
|
2379
|
+
var i = C("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;
|
|
2380
|
+
I.exports = O;
|
|
2394
2381
|
}, { "../../../errors": 15 }],
|
|
2395
|
-
25: [function(
|
|
2396
|
-
|
|
2382
|
+
25: [function(C, I) {
|
|
2383
|
+
I.exports = function() {
|
|
2397
2384
|
throw new Error("Readable.from is not available in the browser");
|
|
2398
2385
|
};
|
|
2399
2386
|
}, {}],
|
|
2400
|
-
26: [function(
|
|
2387
|
+
26: [function(C, I) {
|
|
2401
2388
|
"use strict";
|
|
2402
|
-
function
|
|
2389
|
+
function w(b) {
|
|
2403
2390
|
var n = !1;
|
|
2404
2391
|
return function() {
|
|
2405
2392
|
n || (n = !0, b.apply(void 0, arguments));
|
|
@@ -2412,11 +2399,11 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2412
2399
|
return b.setHeader && typeof b.abort == "function";
|
|
2413
2400
|
}
|
|
2414
2401
|
function O(b, n, l, y) {
|
|
2415
|
-
y =
|
|
2402
|
+
y = w(y);
|
|
2416
2403
|
var k = !1;
|
|
2417
2404
|
b.on("close", function() {
|
|
2418
2405
|
k = !0;
|
|
2419
|
-
}), a === void 0 && (a =
|
|
2406
|
+
}), a === void 0 && (a = C("./end-of-stream")), a(b, {
|
|
2420
2407
|
readable: n,
|
|
2421
2408
|
writable: l
|
|
2422
2409
|
}, function(T) {
|
|
@@ -2424,7 +2411,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2424
2411
|
});
|
|
2425
2412
|
var f = !1;
|
|
2426
2413
|
return function(T) {
|
|
2427
|
-
if (!k) return f ? void 0 : (f = !0, S(b) ? b.abort() : typeof b.destroy == "function" ? b.destroy() : void y(T || new
|
|
2414
|
+
if (!k) return f ? void 0 : (f = !0, S(b) ? b.abort() : typeof b.destroy == "function" ? b.destroy() : void y(T || new _("pipe")));
|
|
2428
2415
|
};
|
|
2429
2416
|
}
|
|
2430
2417
|
function i(b) {
|
|
@@ -2436,15 +2423,15 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2436
2423
|
function d(b) {
|
|
2437
2424
|
return b.length && typeof b[b.length - 1] == "function" ? b.pop() : c;
|
|
2438
2425
|
}
|
|
2439
|
-
var a, g =
|
|
2440
|
-
|
|
2426
|
+
var a, g = C("../../../errors").codes, L = g.ERR_MISSING_ARGS, _ = g.ERR_STREAM_DESTROYED;
|
|
2427
|
+
I.exports = function() {
|
|
2441
2428
|
for (var b = arguments.length, n = Array(b), l = 0; l < b; l++) n[l] = arguments[l];
|
|
2442
2429
|
var y = d(n);
|
|
2443
2430
|
if (Array.isArray(n[0]) && (n = n[0]), 2 > n.length) throw new L("streams");
|
|
2444
|
-
var k, f = n.map(function(T,
|
|
2445
|
-
var p =
|
|
2446
|
-
return O(T, p, 0 <
|
|
2447
|
-
k || (k =
|
|
2431
|
+
var k, f = n.map(function(T, M) {
|
|
2432
|
+
var p = M < n.length - 1;
|
|
2433
|
+
return O(T, p, 0 < M, function(m) {
|
|
2434
|
+
k || (k = m), m && f.forEach(i), p || (f.forEach(i), y(k));
|
|
2448
2435
|
});
|
|
2449
2436
|
});
|
|
2450
2437
|
return n.reduce(h);
|
|
@@ -2453,26 +2440,26 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2453
2440
|
"../../../errors": 15,
|
|
2454
2441
|
"./end-of-stream": 24
|
|
2455
2442
|
}],
|
|
2456
|
-
27: [function(
|
|
2443
|
+
27: [function(C, I) {
|
|
2457
2444
|
"use strict";
|
|
2458
|
-
function
|
|
2445
|
+
function w(S, O, i) {
|
|
2459
2446
|
return S.highWaterMark == null ? O ? S[i] : null : S.highWaterMark;
|
|
2460
2447
|
}
|
|
2461
|
-
var c =
|
|
2462
|
-
|
|
2463
|
-
var d =
|
|
2448
|
+
var c = C("../../../errors").codes.ERR_INVALID_OPT_VALUE;
|
|
2449
|
+
I.exports = { getHighWaterMark: function(S, O, i, h) {
|
|
2450
|
+
var d = w(O, h, i);
|
|
2464
2451
|
if (d != null) {
|
|
2465
|
-
if (!(isFinite(d) &&
|
|
2466
|
-
return
|
|
2452
|
+
if (!(isFinite(d) && U(d) === d) || 0 > d) throw new c(h ? i : "highWaterMark", d);
|
|
2453
|
+
return U(d);
|
|
2467
2454
|
}
|
|
2468
2455
|
return S.objectMode ? 16 : 16384;
|
|
2469
2456
|
} };
|
|
2470
2457
|
}, { "../../../errors": 15 }],
|
|
2471
|
-
28: [function(
|
|
2472
|
-
|
|
2458
|
+
28: [function(C, I) {
|
|
2459
|
+
I.exports = C("events").EventEmitter;
|
|
2473
2460
|
}, { events: 7 }],
|
|
2474
|
-
29: [function(
|
|
2475
|
-
|
|
2461
|
+
29: [function(C, I, w) {
|
|
2462
|
+
w = I.exports = C("./lib/_stream_readable.js"), w.Stream = w, w.Readable = w, w.Writable = C("./lib/_stream_writable.js"), w.Duplex = C("./lib/_stream_duplex.js"), w.Transform = C("./lib/_stream_transform.js"), w.PassThrough = C("./lib/_stream_passthrough.js"), w.finished = C("./lib/internal/streams/end-of-stream.js"), w.pipeline = C("./lib/internal/streams/pipeline.js");
|
|
2476
2463
|
}, {
|
|
2477
2464
|
"./lib/_stream_duplex.js": 16,
|
|
2478
2465
|
"./lib/_stream_passthrough.js": 17,
|
|
@@ -2482,15 +2469,15 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2482
2469
|
"./lib/internal/streams/end-of-stream.js": 24,
|
|
2483
2470
|
"./lib/internal/streams/pipeline.js": 26
|
|
2484
2471
|
}],
|
|
2485
|
-
30: [function(
|
|
2472
|
+
30: [function(C, I, w) {
|
|
2486
2473
|
function c(h, d) {
|
|
2487
2474
|
for (var a in h) d[a] = h[a];
|
|
2488
2475
|
}
|
|
2489
2476
|
function S(h, d, a) {
|
|
2490
2477
|
return i(h, d, a);
|
|
2491
2478
|
}
|
|
2492
|
-
var O =
|
|
2493
|
-
i.from && i.alloc && i.allocUnsafe && i.allocUnsafeSlow ?
|
|
2479
|
+
var O = C("buffer"), i = O.Buffer;
|
|
2480
|
+
i.from && i.alloc && i.allocUnsafe && i.allocUnsafeSlow ? I.exports = O : (c(O, w), w.Buffer = S), S.prototype = Object.create(i.prototype), c(i, S), S.from = function(h, d, a) {
|
|
2494
2481
|
if (typeof h == "number") throw new TypeError("Argument must not be a number");
|
|
2495
2482
|
return i(h, d, a);
|
|
2496
2483
|
}, S.alloc = function(h, d, a) {
|
|
@@ -2505,7 +2492,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2505
2492
|
return O.SlowBuffer(h);
|
|
2506
2493
|
};
|
|
2507
2494
|
}, { buffer: 3 }],
|
|
2508
|
-
31: [function(
|
|
2495
|
+
31: [function(C, I, w) {
|
|
2509
2496
|
"use strict";
|
|
2510
2497
|
function c(f) {
|
|
2511
2498
|
if (!f) return "utf8";
|
|
@@ -2546,7 +2533,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2546
2533
|
this.fillLast = a, T = 4;
|
|
2547
2534
|
break;
|
|
2548
2535
|
case "base64":
|
|
2549
|
-
this.text =
|
|
2536
|
+
this.text = _, this.end = b, T = 3;
|
|
2550
2537
|
break;
|
|
2551
2538
|
default:
|
|
2552
2539
|
this.write = n, this.end = l;
|
|
@@ -2557,11 +2544,11 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2557
2544
|
function i(f) {
|
|
2558
2545
|
return 127 >= f ? 0 : f >> 5 == 6 ? 2 : f >> 4 == 14 ? 3 : f >> 3 == 30 ? 4 : f >> 6 == 2 ? -1 : -2;
|
|
2559
2546
|
}
|
|
2560
|
-
function h(f, T,
|
|
2547
|
+
function h(f, T, M) {
|
|
2561
2548
|
var p = T.length - 1;
|
|
2562
|
-
if (p <
|
|
2563
|
-
var
|
|
2564
|
-
return 0 <=
|
|
2549
|
+
if (p < M) return 0;
|
|
2550
|
+
var m = i(T[p]);
|
|
2551
|
+
return 0 <= m ? (0 < m && (f.lastNeed = m - 1), m) : --p < M || m === -2 ? 0 : (m = i(T[p]), 0 <= m ? (0 < m && (f.lastNeed = m - 2), m) : --p < M || m === -2 ? 0 : (m = i(T[p]), 0 <= m ? (0 < m && (m === 2 ? m = 0 : f.lastNeed = m - 3), m) : 0));
|
|
2565
2552
|
}
|
|
2566
2553
|
function d(f, T) {
|
|
2567
2554
|
if ((192 & T[0]) != 128) return f.lastNeed = 0, "�";
|
|
@@ -2571,31 +2558,31 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2571
2558
|
}
|
|
2572
2559
|
}
|
|
2573
2560
|
function a(f) {
|
|
2574
|
-
var T = this.lastTotal - this.lastNeed,
|
|
2575
|
-
return
|
|
2561
|
+
var T = this.lastTotal - this.lastNeed, M = d(this, f, T);
|
|
2562
|
+
return M === void 0 ? this.lastNeed <= f.length ? (f.copy(this.lastChar, T, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : (f.copy(this.lastChar, T, 0, f.length), void (this.lastNeed -= f.length)) : M;
|
|
2576
2563
|
}
|
|
2577
2564
|
function g(f, T) {
|
|
2578
2565
|
if ((f.length - T) % 2 == 0) {
|
|
2579
|
-
var
|
|
2580
|
-
if (
|
|
2581
|
-
var p =
|
|
2582
|
-
if (55296 <= p && 56319 >= p) return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = f[f.length - 2], this.lastChar[1] = f[f.length - 1],
|
|
2566
|
+
var M = f.toString("utf16le", T);
|
|
2567
|
+
if (M) {
|
|
2568
|
+
var p = M.charCodeAt(M.length - 1);
|
|
2569
|
+
if (55296 <= p && 56319 >= p) return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = f[f.length - 2], this.lastChar[1] = f[f.length - 1], M.slice(0, -1);
|
|
2583
2570
|
}
|
|
2584
|
-
return
|
|
2571
|
+
return M;
|
|
2585
2572
|
}
|
|
2586
2573
|
return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = f[f.length - 1], f.toString("utf16le", T, f.length - 1);
|
|
2587
2574
|
}
|
|
2588
2575
|
function L(f) {
|
|
2589
2576
|
var T = f && f.length ? this.write(f) : "";
|
|
2590
2577
|
if (this.lastNeed) {
|
|
2591
|
-
var
|
|
2592
|
-
return T + this.lastChar.toString("utf16le", 0,
|
|
2578
|
+
var M = this.lastTotal - this.lastNeed;
|
|
2579
|
+
return T + this.lastChar.toString("utf16le", 0, M);
|
|
2593
2580
|
}
|
|
2594
2581
|
return T;
|
|
2595
2582
|
}
|
|
2596
|
-
function
|
|
2597
|
-
var
|
|
2598
|
-
return
|
|
2583
|
+
function _(f, T) {
|
|
2584
|
+
var M = (f.length - T) % 3;
|
|
2585
|
+
return M == 0 ? f.toString("base64", T) : (this.lastNeed = 3 - M, this.lastTotal = 3, M == 1 ? this.lastChar[0] = f[f.length - 1] : (this.lastChar[0] = f[f.length - 2], this.lastChar[1] = f[f.length - 1]), f.toString("base64", T, f.length - M));
|
|
2599
2586
|
}
|
|
2600
2587
|
function b(f) {
|
|
2601
2588
|
var T = f && f.length ? this.write(f) : "";
|
|
@@ -2607,7 +2594,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2607
2594
|
function l(f) {
|
|
2608
2595
|
return f && f.length ? this.write(f) : "";
|
|
2609
2596
|
}
|
|
2610
|
-
var y =
|
|
2597
|
+
var y = C("safe-buffer").Buffer, k = y.isEncoding || function(f) {
|
|
2611
2598
|
switch (f = "" + f, f && f.toLowerCase()) {
|
|
2612
2599
|
case "hex":
|
|
2613
2600
|
case "utf8":
|
|
@@ -2625,40 +2612,40 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2625
2612
|
return !1;
|
|
2626
2613
|
}
|
|
2627
2614
|
};
|
|
2628
|
-
|
|
2615
|
+
w.StringDecoder = O, O.prototype.write = function(f) {
|
|
2629
2616
|
if (f.length === 0) return "";
|
|
2630
|
-
var T,
|
|
2617
|
+
var T, M;
|
|
2631
2618
|
if (this.lastNeed) {
|
|
2632
2619
|
if (T = this.fillLast(f), T === void 0) return "";
|
|
2633
|
-
|
|
2634
|
-
} else
|
|
2635
|
-
return
|
|
2620
|
+
M = this.lastNeed, this.lastNeed = 0;
|
|
2621
|
+
} else M = 0;
|
|
2622
|
+
return M < f.length ? T ? T + this.text(f, M) : this.text(f, M) : T || "";
|
|
2636
2623
|
}, O.prototype.end = function(f) {
|
|
2637
2624
|
var T = f && f.length ? this.write(f) : "";
|
|
2638
2625
|
return this.lastNeed ? T + "�" : T;
|
|
2639
2626
|
}, O.prototype.text = function(f, T) {
|
|
2640
|
-
var
|
|
2627
|
+
var M = h(this, f, T);
|
|
2641
2628
|
if (!this.lastNeed) return f.toString("utf8", T);
|
|
2642
|
-
this.lastTotal =
|
|
2643
|
-
var p = f.length - (
|
|
2629
|
+
this.lastTotal = M;
|
|
2630
|
+
var p = f.length - (M - this.lastNeed);
|
|
2644
2631
|
return f.copy(this.lastChar, 0, p), f.toString("utf8", T, p);
|
|
2645
2632
|
}, O.prototype.fillLast = function(f) {
|
|
2646
2633
|
return this.lastNeed <= f.length ? (f.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : (f.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, f.length), void (this.lastNeed -= f.length));
|
|
2647
2634
|
};
|
|
2648
2635
|
}, { "safe-buffer": 30 }],
|
|
2649
|
-
32: [function(
|
|
2650
|
-
(function(
|
|
2636
|
+
32: [function(C, I) {
|
|
2637
|
+
(function(w) {
|
|
2651
2638
|
(function() {
|
|
2652
2639
|
function c(S) {
|
|
2653
2640
|
try {
|
|
2654
|
-
if (!
|
|
2641
|
+
if (!w.localStorage) return !1;
|
|
2655
2642
|
} catch {
|
|
2656
2643
|
return !1;
|
|
2657
2644
|
}
|
|
2658
|
-
var O =
|
|
2645
|
+
var O = w.localStorage[S];
|
|
2659
2646
|
return O != null && (O + "").toLowerCase() === "true";
|
|
2660
2647
|
}
|
|
2661
|
-
|
|
2648
|
+
I.exports = function(S, O) {
|
|
2662
2649
|
function i() {
|
|
2663
2650
|
if (!h) {
|
|
2664
2651
|
if (c("throwDeprecation")) throw new Error(O);
|
|
@@ -2673,17 +2660,17 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2673
2660
|
}).call(this);
|
|
2674
2661
|
}).call(this, typeof global > "u" ? typeof self > "u" ? typeof window > "u" ? {} : window : self : global);
|
|
2675
2662
|
}, {}],
|
|
2676
|
-
"/": [function(
|
|
2677
|
-
function
|
|
2663
|
+
"/": [function(C, I) {
|
|
2664
|
+
function w(b) {
|
|
2678
2665
|
return b.replace(/a=ice-options:trickle\s\n/g, "");
|
|
2679
2666
|
}
|
|
2680
2667
|
function c(b) {
|
|
2681
2668
|
console.warn(b);
|
|
2682
2669
|
}
|
|
2683
|
-
const S =
|
|
2684
|
-
class
|
|
2670
|
+
const S = C("debug")("simple-peer"), O = C("get-browser-rtc"), i = C("randombytes"), h = C("readable-stream"), d = C("queue-microtask"), a = C("err-code"), { Buffer: g } = C("buffer"), L = 65536;
|
|
2671
|
+
class _ extends h.Duplex {
|
|
2685
2672
|
constructor(n) {
|
|
2686
|
-
if (n = Object.assign({ allowHalfOpen: !1 }, n), super(n), this._id = i(4).toString("hex").slice(0, 7), this._debug("new peer %o", n), this.channelName = n.initiator ? n.channelName || i(20).toString("hex") : null, this.initiator = n.initiator || !1, this.channelConfig = n.channelConfig ||
|
|
2673
|
+
if (n = Object.assign({ allowHalfOpen: !1 }, n), super(n), this._id = i(4).toString("hex").slice(0, 7), this._debug("new peer %o", n), this.channelName = n.initiator ? n.channelName || i(20).toString("hex") : null, this.initiator = n.initiator || !1, this.channelConfig = n.channelConfig || _.channelConfig, this.channelNegotiated = this.channelConfig.negotiated, this.config = Object.assign({}, _.config, n.config), this.offerOptions = n.offerOptions || {}, this.answerOptions = n.answerOptions || {}, this.sdpTransform = n.sdpTransform || ((l) => l), this.streams = n.streams || (n.stream ? [n.stream] : []), this.trickle = n.trickle === void 0 || n.trickle, this.allowHalfTrickle = n.allowHalfTrickle !== void 0 && n.allowHalfTrickle, this.iceCompleteTimeout = n.iceCompleteTimeout || 5e3, this.destroyed = !1, this.destroying = !1, this._connected = !1, this.remoteAddress = void 0, this.remoteFamily = void 0, this.remotePort = void 0, this.localAddress = void 0, this.localFamily = void 0, this.localPort = void 0, this._wrtc = n.wrtc && typeof n.wrtc == "object" ? n.wrtc : O(), !this._wrtc) throw a(typeof window > "u" ? /* @__PURE__ */ new Error("No WebRTC support: Specify `opts.wrtc` option in this environment") : /* @__PURE__ */ new Error("No WebRTC support: Not a supported browser"), "ERR_WEBRTC_SUPPORT");
|
|
2687
2674
|
this._pcReady = !1, this._channelReady = !1, this._iceComplete = !1, this._iceCompleteTimer = null, this._channel = null, this._pendingCandidates = [], this._isNegotiating = !1, this._firstNegotiation = !0, this._batchedNegotiation = !1, this._queuedNegotiation = !1, this._sendersAwaitingStable = [], this._senderMap = /* @__PURE__ */ new Map(), this._closingInterval = null, this._remoteTracks = [], this._remoteStreams = [], this._chunk = null, this._cb = null, this._interval = null;
|
|
2688
2675
|
try {
|
|
2689
2676
|
this._pc = new this._wrtc.RTCPeerConnection(this.config);
|
|
@@ -2905,7 +2892,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2905
2892
|
_createOffer() {
|
|
2906
2893
|
this.destroyed || this._pc.createOffer(this.offerOptions).then((n) => {
|
|
2907
2894
|
if (this.destroyed) return;
|
|
2908
|
-
this.trickle || this.allowHalfTrickle || (n.sdp =
|
|
2895
|
+
this.trickle || this.allowHalfTrickle || (n.sdp = w(n.sdp)), n.sdp = this.sdpTransform(n.sdp);
|
|
2909
2896
|
const l = () => {
|
|
2910
2897
|
if (!this.destroyed) {
|
|
2911
2898
|
const y = this._pc.localDescription || n;
|
|
@@ -2932,7 +2919,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2932
2919
|
_createAnswer() {
|
|
2933
2920
|
this.destroyed || this._pc.createAnswer(this.answerOptions).then((n) => {
|
|
2934
2921
|
if (this.destroyed) return;
|
|
2935
|
-
this.trickle || this.allowHalfTrickle || (n.sdp =
|
|
2922
|
+
this.trickle || this.allowHalfTrickle || (n.sdp = w(n.sdp)), n.sdp = this.sdpTransform(n.sdp);
|
|
2936
2923
|
const l = () => {
|
|
2937
2924
|
if (!this.destroyed) {
|
|
2938
2925
|
const y = this._pc.localDescription || n;
|
|
@@ -2973,8 +2960,8 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2973
2960
|
const k = [];
|
|
2974
2961
|
y.result().forEach((f) => {
|
|
2975
2962
|
const T = {};
|
|
2976
|
-
f.names().forEach((
|
|
2977
|
-
T[
|
|
2963
|
+
f.names().forEach((M) => {
|
|
2964
|
+
T[M] = f.stat(M);
|
|
2978
2965
|
}), T.id = f.id, T.type = f.type, T.timestamp = f.timestamp, k.push(l(T));
|
|
2979
2966
|
}), n(null, k);
|
|
2980
2967
|
}, (y) => n(y)) : n(null, []);
|
|
@@ -2987,29 +2974,29 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2987
2974
|
if (this.destroyed) return;
|
|
2988
2975
|
l && (y = []);
|
|
2989
2976
|
const k = {}, f = {}, T = {};
|
|
2990
|
-
let
|
|
2991
|
-
y.forEach((
|
|
2992
|
-
(
|
|
2977
|
+
let M = !1;
|
|
2978
|
+
y.forEach((m) => {
|
|
2979
|
+
(m.type === "remotecandidate" || m.type === "remote-candidate") && (k[m.id] = m), (m.type === "localcandidate" || m.type === "local-candidate") && (f[m.id] = m), (m.type === "candidatepair" || m.type === "candidate-pair") && (T[m.id] = m);
|
|
2993
2980
|
});
|
|
2994
|
-
const p = (
|
|
2995
|
-
|
|
2996
|
-
let
|
|
2997
|
-
|
|
2998
|
-
let B = k[
|
|
2999
|
-
B && (B.ip || B.address) ? (this.remoteAddress = B.ip || B.address, this.remotePort = +B.port) : B && B.ipAddress ? (this.remoteAddress = B.ipAddress, this.remotePort = +B.portNumber) : typeof
|
|
2981
|
+
const p = (m) => {
|
|
2982
|
+
M = !0;
|
|
2983
|
+
let N = f[m.localCandidateId];
|
|
2984
|
+
N && (N.ip || N.address) ? (this.localAddress = N.ip || N.address, this.localPort = +N.port) : N && N.ipAddress ? (this.localAddress = N.ipAddress, this.localPort = +N.portNumber) : typeof m.googLocalAddress == "string" && (N = m.googLocalAddress.split(":"), this.localAddress = N[0], this.localPort = +N[1]), this.localAddress && (this.localFamily = this.localAddress.includes(":") ? "IPv6" : "IPv4");
|
|
2985
|
+
let B = k[m.remoteCandidateId];
|
|
2986
|
+
B && (B.ip || B.address) ? (this.remoteAddress = B.ip || B.address, this.remotePort = +B.port) : B && B.ipAddress ? (this.remoteAddress = B.ipAddress, this.remotePort = +B.portNumber) : typeof m.googRemoteAddress == "string" && (B = m.googRemoteAddress.split(":"), this.remoteAddress = B[0], this.remotePort = +B[1]), this.remoteAddress && (this.remoteFamily = this.remoteAddress.includes(":") ? "IPv6" : "IPv4"), this._debug("connect local: %s:%s remote: %s:%s", this.localAddress, this.localPort, this.remoteAddress, this.remotePort);
|
|
3000
2987
|
};
|
|
3001
|
-
if (y.forEach((
|
|
3002
|
-
|
|
3003
|
-
}), !
|
|
2988
|
+
if (y.forEach((m) => {
|
|
2989
|
+
m.type === "transport" && m.selectedCandidatePairId && p(T[m.selectedCandidatePairId]), (m.type === "googCandidatePair" && m.googActiveConnection === "true" || (m.type === "candidatepair" || m.type === "candidate-pair") && m.selected) && p(m);
|
|
2990
|
+
}), !M && (!Object.keys(T).length || Object.keys(f).length)) return void setTimeout(n, 100);
|
|
3004
2991
|
if (this._connecting = !1, this._connected = !0, this._chunk) {
|
|
3005
2992
|
try {
|
|
3006
2993
|
this.send(this._chunk);
|
|
3007
|
-
} catch (
|
|
3008
|
-
return this.destroy(a(
|
|
2994
|
+
} catch (N) {
|
|
2995
|
+
return this.destroy(a(N, "ERR_DATA_CHANNEL"));
|
|
3009
2996
|
}
|
|
3010
2997
|
this._chunk = null, this._debug('sent chunk from "write before connect"');
|
|
3011
|
-
const
|
|
3012
|
-
this._cb = null,
|
|
2998
|
+
const m = this._cb;
|
|
2999
|
+
this._cb = null, m(null);
|
|
3013
3000
|
}
|
|
3014
3001
|
typeof this._channel.bufferedAmountLowThreshold != "number" && (this._interval = setInterval(() => this._onInterval(), 150), this._interval.unref && this._interval.unref()), this._debug("connect"), this.emit("connect");
|
|
3015
3002
|
});
|
|
@@ -3067,10 +3054,10 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
3067
3054
|
n[0] = "[" + this._id + "] " + n[0], S.apply(null, n);
|
|
3068
3055
|
}
|
|
3069
3056
|
}
|
|
3070
|
-
|
|
3057
|
+
_.WEBRTC_SUPPORT = !!O(), _.config = {
|
|
3071
3058
|
iceServers: [{ urls: ["stun:stun.l.google.com:19302", "stun:global.stun.twilio.com:3478"] }],
|
|
3072
3059
|
sdpSemantics: "unified-plan"
|
|
3073
|
-
},
|
|
3060
|
+
}, _.channelConfig = {}, I.exports = _;
|
|
3074
3061
|
}, {
|
|
3075
3062
|
buffer: 3,
|
|
3076
3063
|
debug: 4,
|
|
@@ -3082,72 +3069,72 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
3082
3069
|
}]
|
|
3083
3070
|
}, {}, [])("/");
|
|
3084
3071
|
});
|
|
3085
|
-
})),
|
|
3086
|
-
const
|
|
3087
|
-
return crypto.subtle.importKey("raw",
|
|
3072
|
+
})), Pt = /* @__PURE__ */ ot(Dt(), 1), Bt = (R, D) => {
|
|
3073
|
+
const U = Ye(R).buffer, j = Ye(D).buffer;
|
|
3074
|
+
return crypto.subtle.importKey("raw", U, "PBKDF2", !1, ["deriveKey"]).then((F) => crypto.subtle.deriveKey({
|
|
3088
3075
|
name: "PBKDF2",
|
|
3089
|
-
salt:
|
|
3076
|
+
salt: j,
|
|
3090
3077
|
iterations: 1e5,
|
|
3091
3078
|
hash: "SHA-256"
|
|
3092
3079
|
}, F, {
|
|
3093
3080
|
name: "AES-GCM",
|
|
3094
3081
|
length: 256
|
|
3095
3082
|
}, !0, ["encrypt", "decrypt"]));
|
|
3096
|
-
},
|
|
3097
|
-
if (!
|
|
3098
|
-
const
|
|
3083
|
+
}, et = (R, D) => {
|
|
3084
|
+
if (!D) return qe(R);
|
|
3085
|
+
const U = crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(12));
|
|
3099
3086
|
return crypto.subtle.encrypt({
|
|
3100
3087
|
name: "AES-GCM",
|
|
3101
|
-
iv:
|
|
3102
|
-
},
|
|
3088
|
+
iv: U
|
|
3089
|
+
}, D, R).then((j) => {
|
|
3103
3090
|
const F = re();
|
|
3104
|
-
return
|
|
3091
|
+
return je(F, "AES-GCM"), Re(F, U), Re(F, new Uint8Array(j)), ie(F);
|
|
3105
3092
|
});
|
|
3106
|
-
},
|
|
3107
|
-
const
|
|
3108
|
-
return bt(
|
|
3109
|
-
},
|
|
3110
|
-
if (!
|
|
3111
|
-
const
|
|
3112
|
-
Qe(
|
|
3113
|
-
const
|
|
3093
|
+
}, Ut = (R, D) => {
|
|
3094
|
+
const U = re();
|
|
3095
|
+
return bt(U, R), et(ie(U), D);
|
|
3096
|
+
}, tt = (R, D) => {
|
|
3097
|
+
if (!D) return qe(R);
|
|
3098
|
+
const U = Fe(R);
|
|
3099
|
+
Qe(U) !== "AES-GCM" && Tt(Je("Unknown encryption algorithm"));
|
|
3100
|
+
const j = De(U), F = De(U);
|
|
3114
3101
|
return crypto.subtle.decrypt({
|
|
3115
3102
|
name: "AES-GCM",
|
|
3116
|
-
iv:
|
|
3117
|
-
},
|
|
3118
|
-
},
|
|
3119
|
-
let
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
}), (!
|
|
3123
|
-
},
|
|
3124
|
-
const
|
|
3125
|
-
if (
|
|
3126
|
-
const
|
|
3103
|
+
iv: j
|
|
3104
|
+
}, D, F).then((C) => new Uint8Array(C));
|
|
3105
|
+
}, jt = (R, D) => tt(R, D).then((U) => kt(Fe(new Uint8Array(U)))), ne = St("y-webrtc"), Ce = 0, rt = 3, Ae = 1, We = 4, xe = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Map(), nt = (R) => {
|
|
3106
|
+
let D = !0;
|
|
3107
|
+
R.webrtcConns.forEach((U) => {
|
|
3108
|
+
U.synced || (D = !1);
|
|
3109
|
+
}), (!D && R.synced || D && !R.synced) && (R.synced = D, R.provider.emit("synced", [{ synced: D }]), ne("synced ", ue, R.name, Te, " with all peers"));
|
|
3110
|
+
}, it = (R, D, U) => {
|
|
3111
|
+
const j = Fe(D), F = re(), C = Ot(j);
|
|
3112
|
+
if (R === void 0) return null;
|
|
3113
|
+
const I = R.awareness, w = R.doc;
|
|
3127
3114
|
let c = !1;
|
|
3128
|
-
switch (
|
|
3115
|
+
switch (C) {
|
|
3129
3116
|
case Ce: {
|
|
3130
3117
|
se(F, Ce);
|
|
3131
|
-
const S = ct(
|
|
3132
|
-
S === 1 && !
|
|
3118
|
+
const S = ct(j, F, w, R);
|
|
3119
|
+
S === 1 && !R.synced && U(), S === 0 && (c = !0);
|
|
3133
3120
|
break;
|
|
3134
3121
|
}
|
|
3135
|
-
case
|
|
3136
|
-
se(F, Ae), Re(F, Oe(
|
|
3122
|
+
case rt:
|
|
3123
|
+
se(F, Ae), Re(F, Oe(I, Array.from(I.getStates().keys()))), c = !0;
|
|
3137
3124
|
break;
|
|
3138
3125
|
case Ae:
|
|
3139
|
-
ft(
|
|
3126
|
+
ft(I, De(j), R);
|
|
3140
3127
|
break;
|
|
3141
3128
|
case We: {
|
|
3142
|
-
const S = Lt(
|
|
3143
|
-
if (O !==
|
|
3129
|
+
const S = Lt(j) === 1, O = Qe(j);
|
|
3130
|
+
if (O !== R.peerId && (R.bcConns.has(O) && !S || !R.bcConns.has(O) && S)) {
|
|
3144
3131
|
const i = [], h = [];
|
|
3145
|
-
S ? (
|
|
3132
|
+
S ? (R.bcConns.add(O), h.push(O)) : (R.bcConns.delete(O), i.push(O)), R.provider.emit("peers", [{
|
|
3146
3133
|
added: h,
|
|
3147
3134
|
removed: i,
|
|
3148
|
-
webrtcPeers: Array.from(
|
|
3149
|
-
bcPeers: Array.from(
|
|
3150
|
-
}]),
|
|
3135
|
+
webrtcPeers: Array.from(R.webrtcConns.keys()),
|
|
3136
|
+
bcPeers: Array.from(R.bcConns)
|
|
3137
|
+
}]), st(R);
|
|
3151
3138
|
}
|
|
3152
3139
|
break;
|
|
3153
3140
|
}
|
|
@@ -3155,224 +3142,224 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
3155
3142
|
return console.error("Unable to compute message"), F;
|
|
3156
3143
|
}
|
|
3157
3144
|
return c ? F : null;
|
|
3158
|
-
},
|
|
3159
|
-
const
|
|
3160
|
-
return ne("received message from ", ue,
|
|
3161
|
-
|
|
3145
|
+
}, Ft = (R, D) => {
|
|
3146
|
+
const U = R.room;
|
|
3147
|
+
return ne("received message from ", ue, R.remotePeerId, Xe, " (", U.name, ")", Te, Ze), it(U, D, () => {
|
|
3148
|
+
R.synced = !0, ne("synced ", ue, U.name, Te, " with ", ue, R.remotePeerId), nt(U);
|
|
3162
3149
|
});
|
|
3163
|
-
}, Ne = (
|
|
3164
|
-
ne("send message to ", ue,
|
|
3150
|
+
}, Ne = (R, D) => {
|
|
3151
|
+
ne("send message to ", ue, R.remotePeerId, Te, Xe, " (", R.room.name, ")", Ze);
|
|
3165
3152
|
try {
|
|
3166
|
-
|
|
3153
|
+
R.peer.send(ie(D));
|
|
3167
3154
|
} catch {
|
|
3168
3155
|
}
|
|
3169
|
-
},
|
|
3170
|
-
ne("broadcast message in ", ue,
|
|
3156
|
+
}, qt = (R, D) => {
|
|
3157
|
+
ne("broadcast message in ", ue, R.name, Te), R.webrtcConns.forEach((U) => {
|
|
3171
3158
|
try {
|
|
3172
|
-
|
|
3159
|
+
U.peer.send(D);
|
|
3173
3160
|
} catch {
|
|
3174
3161
|
}
|
|
3175
3162
|
});
|
|
3176
3163
|
}, ze = class {
|
|
3177
|
-
constructor(
|
|
3178
|
-
ne("establishing connection to ", ue,
|
|
3179
|
-
initiator:
|
|
3180
|
-
...
|
|
3164
|
+
constructor(R, D, U, j) {
|
|
3165
|
+
ne("establishing connection to ", ue, U), this.room = j, this.remotePeerId = U, this.glareToken = void 0, this.closed = !1, this.connected = !1, this.synced = !1, this.peer = new Pt.default({
|
|
3166
|
+
initiator: D,
|
|
3167
|
+
...j.provider.peerOpts
|
|
3181
3168
|
}), this.peer.on("signal", (F) => {
|
|
3182
|
-
this.glareToken === void 0 && (this.glareToken = Date.now() + Math.random()), He(
|
|
3183
|
-
to:
|
|
3184
|
-
from:
|
|
3169
|
+
this.glareToken === void 0 && (this.glareToken = Date.now() + Math.random()), He(R, j, {
|
|
3170
|
+
to: U,
|
|
3171
|
+
from: j.peerId,
|
|
3185
3172
|
type: "signal",
|
|
3186
3173
|
token: this.glareToken,
|
|
3187
3174
|
signal: F
|
|
3188
3175
|
});
|
|
3189
3176
|
}), this.peer.on("connect", () => {
|
|
3190
|
-
ne("connected to ", ue,
|
|
3191
|
-
const F =
|
|
3192
|
-
se(
|
|
3193
|
-
const
|
|
3194
|
-
if (
|
|
3177
|
+
ne("connected to ", ue, U), this.connected = !0;
|
|
3178
|
+
const F = j.provider.doc, C = j.awareness, I = re();
|
|
3179
|
+
se(I, Ce), Ke(I, F), Ne(this, I);
|
|
3180
|
+
const w = C.getStates();
|
|
3181
|
+
if (w.size > 0) {
|
|
3195
3182
|
const c = re();
|
|
3196
|
-
se(c, Ae), Re(c, Oe(
|
|
3183
|
+
se(c, Ae), Re(c, Oe(C, Array.from(w.keys()))), Ne(this, c);
|
|
3197
3184
|
}
|
|
3198
3185
|
}), this.peer.on("close", () => {
|
|
3199
|
-
this.connected = !1, this.closed = !0,
|
|
3186
|
+
this.connected = !1, this.closed = !0, j.webrtcConns.has(this.remotePeerId) && (j.webrtcConns.delete(this.remotePeerId), j.provider.emit("peers", [{
|
|
3200
3187
|
removed: [this.remotePeerId],
|
|
3201
3188
|
added: [],
|
|
3202
|
-
webrtcPeers: Array.from(
|
|
3203
|
-
bcPeers: Array.from(
|
|
3204
|
-
}])),
|
|
3189
|
+
webrtcPeers: Array.from(j.webrtcConns.keys()),
|
|
3190
|
+
bcPeers: Array.from(j.bcConns)
|
|
3191
|
+
}])), nt(j), this.peer.destroy(), ne("closed connection to ", ue, U), Ue(j);
|
|
3205
3192
|
}), this.peer.on("error", (F) => {
|
|
3206
|
-
ne("Error in connection to ", ue,
|
|
3193
|
+
ne("Error in connection to ", ue, U, ": ", F), Ue(j);
|
|
3207
3194
|
}), this.peer.on("data", (F) => {
|
|
3208
|
-
const
|
|
3209
|
-
|
|
3195
|
+
const C = Ft(this, F);
|
|
3196
|
+
C !== null && Ne(this, C);
|
|
3210
3197
|
});
|
|
3211
3198
|
}
|
|
3212
3199
|
destroy() {
|
|
3213
3200
|
this.peer.destroy();
|
|
3214
3201
|
}
|
|
3215
|
-
}, be = (
|
|
3216
|
-
|
|
3217
|
-
},
|
|
3218
|
-
xe.forEach((
|
|
3219
|
-
|
|
3202
|
+
}, be = (R, D) => et(D, R.key).then((U) => R.mux(() => lt(R.name, U))), Ge = (R, D) => {
|
|
3203
|
+
R.bcconnected && be(R, D), qt(R, D);
|
|
3204
|
+
}, Ue = (R) => {
|
|
3205
|
+
xe.forEach((D) => {
|
|
3206
|
+
D.connected && (D.send({
|
|
3220
3207
|
type: "subscribe",
|
|
3221
|
-
topics: [
|
|
3222
|
-
}),
|
|
3208
|
+
topics: [R.name]
|
|
3209
|
+
}), R.webrtcConns.size < R.provider.maxConns && He(D, R, {
|
|
3223
3210
|
type: "announce",
|
|
3224
|
-
from:
|
|
3211
|
+
from: R.peerId
|
|
3225
3212
|
}));
|
|
3226
3213
|
});
|
|
3227
|
-
},
|
|
3228
|
-
if (
|
|
3229
|
-
const
|
|
3230
|
-
se(
|
|
3214
|
+
}, st = (R) => {
|
|
3215
|
+
if (R.provider.filterBcConns) {
|
|
3216
|
+
const D = re();
|
|
3217
|
+
se(D, We), $e(D, 1), je(D, R.peerId), be(R, ie(D));
|
|
3231
3218
|
}
|
|
3232
|
-
},
|
|
3233
|
-
constructor(
|
|
3234
|
-
this.peerId =
|
|
3235
|
-
const
|
|
3219
|
+
}, Wt = class {
|
|
3220
|
+
constructor(R, D, U, j) {
|
|
3221
|
+
this.peerId = vt(), this.doc = R, this.awareness = D.awareness, this.provider = D, this.synced = !1, this.name = U, this.key = j, this.webrtcConns = /* @__PURE__ */ new Map(), this.bcConns = /* @__PURE__ */ new Set(), this.mux = Mt(), this.bcconnected = !1, this._bcSubscriber = (F) => tt(new Uint8Array(F), j).then((C) => this.mux(() => {
|
|
3222
|
+
const I = it(this, C, () => {
|
|
3236
3223
|
});
|
|
3237
|
-
|
|
3238
|
-
})), this._docUpdateHandler = (F,
|
|
3239
|
-
const
|
|
3240
|
-
se(
|
|
3241
|
-
}, this._awarenessUpdateHandler = ({ added: F, updated:
|
|
3242
|
-
const c = F.concat(
|
|
3224
|
+
I && be(this, ie(I));
|
|
3225
|
+
})), this._docUpdateHandler = (F, C) => {
|
|
3226
|
+
const I = re();
|
|
3227
|
+
se(I, Ce), ut(I, F), Ge(this, ie(I));
|
|
3228
|
+
}, this._awarenessUpdateHandler = ({ added: F, updated: C, removed: I }, w) => {
|
|
3229
|
+
const c = F.concat(C).concat(I), S = re();
|
|
3243
3230
|
se(S, Ae), Re(S, Oe(this.awareness, c)), Ge(this, ie(S));
|
|
3244
3231
|
}, this._beforeUnloadHandler = () => {
|
|
3245
|
-
Ve(this.awareness, [
|
|
3232
|
+
Ve(this.awareness, [R.clientID], "window unload"), ve.forEach((F) => {
|
|
3246
3233
|
F.disconnect();
|
|
3247
3234
|
});
|
|
3248
3235
|
}, typeof window < "u" ? window.addEventListener("beforeunload", this._beforeUnloadHandler) : typeof process < "u" && process.on("exit", this._beforeUnloadHandler);
|
|
3249
3236
|
}
|
|
3250
3237
|
connect() {
|
|
3251
|
-
this.doc.on("update", this._docUpdateHandler), this.awareness.on("update", this._awarenessUpdateHandler),
|
|
3252
|
-
const
|
|
3253
|
-
gt(
|
|
3254
|
-
const
|
|
3255
|
-
se(
|
|
3256
|
-
const j = re();
|
|
3257
|
-
se(j, Ce), dt(j, this.doc), be(this, ie(j));
|
|
3238
|
+
this.doc.on("update", this._docUpdateHandler), this.awareness.on("update", this._awarenessUpdateHandler), Ue(this);
|
|
3239
|
+
const R = this.name;
|
|
3240
|
+
gt(R, this._bcSubscriber), this.bcconnected = !0, st(this);
|
|
3241
|
+
const D = re();
|
|
3242
|
+
se(D, Ce), Ke(D, this.doc), be(this, ie(D));
|
|
3258
3243
|
const U = re();
|
|
3259
|
-
se(U,
|
|
3244
|
+
se(U, Ce), dt(U, this.doc), be(this, ie(U));
|
|
3245
|
+
const j = re();
|
|
3246
|
+
se(j, rt), be(this, ie(j));
|
|
3260
3247
|
const F = re();
|
|
3261
3248
|
se(F, Ae), Re(F, Oe(this.awareness, [this.doc.clientID])), be(this, ie(F));
|
|
3262
3249
|
}
|
|
3263
3250
|
disconnect() {
|
|
3264
|
-
xe.forEach((
|
|
3265
|
-
|
|
3251
|
+
xe.forEach((D) => {
|
|
3252
|
+
D.connected && D.send({
|
|
3266
3253
|
type: "unsubscribe",
|
|
3267
3254
|
topics: [this.name]
|
|
3268
3255
|
});
|
|
3269
3256
|
}), Ve(this.awareness, [this.doc.clientID], "disconnect");
|
|
3270
|
-
const
|
|
3271
|
-
se(
|
|
3257
|
+
const R = re();
|
|
3258
|
+
se(R, We), $e(R, 0), je(R, this.peerId), be(this, ie(R)), ht(this.name, this._bcSubscriber), this.bcconnected = !1, this.doc.off("update", this._docUpdateHandler), this.awareness.off("update", this._awarenessUpdateHandler), this.webrtcConns.forEach((D) => D.destroy());
|
|
3272
3259
|
}
|
|
3273
3260
|
destroy() {
|
|
3274
3261
|
this.disconnect(), typeof window < "u" ? window.removeEventListener("beforeunload", this._beforeUnloadHandler) : typeof process < "u" && process.off("exit", this._beforeUnloadHandler);
|
|
3275
3262
|
}
|
|
3276
|
-
},
|
|
3277
|
-
if (
|
|
3278
|
-
const F = new
|
|
3279
|
-
return
|
|
3280
|
-
}, He = (
|
|
3281
|
-
|
|
3282
|
-
|
|
3263
|
+
}, Ht = (R, D, U, j) => {
|
|
3264
|
+
if (ve.has(U)) throw Je(`A Yjs Doc connected to room "${U}" already exists!`);
|
|
3265
|
+
const F = new Wt(R, D, U, j);
|
|
3266
|
+
return ve.set(U, F), F;
|
|
3267
|
+
}, He = (R, D, U) => {
|
|
3268
|
+
D.key ? Ut(U, D.key).then((j) => {
|
|
3269
|
+
R.send({
|
|
3283
3270
|
type: "publish",
|
|
3284
|
-
topic:
|
|
3285
|
-
data: At(
|
|
3271
|
+
topic: D.name,
|
|
3272
|
+
data: At(j)
|
|
3286
3273
|
});
|
|
3287
|
-
}) :
|
|
3274
|
+
}) : R.send({
|
|
3288
3275
|
type: "publish",
|
|
3289
|
-
topic:
|
|
3290
|
-
data:
|
|
3276
|
+
topic: D.name,
|
|
3277
|
+
data: U
|
|
3291
3278
|
});
|
|
3292
|
-
},
|
|
3293
|
-
constructor(
|
|
3294
|
-
super(
|
|
3295
|
-
ne(`connected (${
|
|
3296
|
-
const
|
|
3279
|
+
}, Vt = class extends It {
|
|
3280
|
+
constructor(R) {
|
|
3281
|
+
super(R), this.providers = /* @__PURE__ */ new Set(), this.on("connect", () => {
|
|
3282
|
+
ne(`connected (${R})`);
|
|
3283
|
+
const D = Array.from(ve.keys());
|
|
3297
3284
|
this.send({
|
|
3298
3285
|
type: "subscribe",
|
|
3299
|
-
topics:
|
|
3300
|
-
}),
|
|
3286
|
+
topics: D
|
|
3287
|
+
}), ve.forEach((U) => He(this, U, {
|
|
3301
3288
|
type: "announce",
|
|
3302
|
-
from:
|
|
3289
|
+
from: U.peerId
|
|
3303
3290
|
}));
|
|
3304
|
-
}), this.on("message", (
|
|
3305
|
-
switch (
|
|
3291
|
+
}), this.on("message", (D) => {
|
|
3292
|
+
switch (D.type) {
|
|
3306
3293
|
case "publish": {
|
|
3307
|
-
const
|
|
3308
|
-
if (
|
|
3309
|
-
const F = (
|
|
3310
|
-
const
|
|
3311
|
-
if (
|
|
3312
|
-
const c =
|
|
3313
|
-
} : () =>
|
|
3294
|
+
const U = D.topic, j = ve.get(U);
|
|
3295
|
+
if (j == null || typeof U != "string") return;
|
|
3296
|
+
const F = (C) => {
|
|
3297
|
+
const I = j.webrtcConns, w = j.peerId;
|
|
3298
|
+
if (C == null || C.from === w || C.to !== void 0 && C.to !== w || j.bcConns.has(C.from)) return;
|
|
3299
|
+
const c = I.has(C.from) ? () => {
|
|
3300
|
+
} : () => j.provider.emit("peers", [{
|
|
3314
3301
|
removed: [],
|
|
3315
|
-
added: [
|
|
3316
|
-
webrtcPeers: Array.from(
|
|
3317
|
-
bcPeers: Array.from(
|
|
3302
|
+
added: [C.from],
|
|
3303
|
+
webrtcPeers: Array.from(j.webrtcConns.keys()),
|
|
3304
|
+
bcPeers: Array.from(j.bcConns)
|
|
3318
3305
|
}]);
|
|
3319
|
-
switch (
|
|
3306
|
+
switch (C.type) {
|
|
3320
3307
|
case "announce":
|
|
3321
|
-
|
|
3308
|
+
I.size < j.provider.maxConns && (Pe(I, C.from, () => new ze(this, !0, C.from, j)), c());
|
|
3322
3309
|
break;
|
|
3323
3310
|
case "signal":
|
|
3324
|
-
if (
|
|
3325
|
-
const S =
|
|
3311
|
+
if (C.signal.type === "offer") {
|
|
3312
|
+
const S = I.get(C.from);
|
|
3326
3313
|
if (S) {
|
|
3327
|
-
const O =
|
|
3314
|
+
const O = C.token, i = S.glareToken;
|
|
3328
3315
|
if (i && i > O) {
|
|
3329
|
-
ne("offer rejected: ",
|
|
3316
|
+
ne("offer rejected: ", C.from);
|
|
3330
3317
|
return;
|
|
3331
3318
|
}
|
|
3332
3319
|
S.glareToken = void 0;
|
|
3333
3320
|
}
|
|
3334
3321
|
}
|
|
3335
|
-
if (
|
|
3336
|
-
ne("offer answered by: ",
|
|
3337
|
-
const S =
|
|
3322
|
+
if (C.signal.type === "answer") {
|
|
3323
|
+
ne("offer answered by: ", C.from);
|
|
3324
|
+
const S = I.get(C.from);
|
|
3338
3325
|
S.glareToken = void 0;
|
|
3339
3326
|
}
|
|
3340
|
-
|
|
3327
|
+
C.to === w && (Pe(I, C.from, () => new ze(this, !1, C.from, j)).peer.signal(C.signal), c());
|
|
3341
3328
|
}
|
|
3342
3329
|
};
|
|
3343
|
-
|
|
3330
|
+
j.key ? typeof D.data == "string" && jt(Rt(D.data), j.key).then(F) : F(D.data);
|
|
3344
3331
|
}
|
|
3345
3332
|
}
|
|
3346
|
-
}), this.on("disconnect", () => ne(`disconnect (${
|
|
3333
|
+
}), this.on("disconnect", () => ne(`disconnect (${R})`));
|
|
3347
3334
|
}
|
|
3348
|
-
}, Ie = (
|
|
3349
|
-
|
|
3350
|
-
},
|
|
3351
|
-
constructor(
|
|
3352
|
-
super(), this.roomName =
|
|
3353
|
-
this.room =
|
|
3354
|
-
}), this.connect(), this.destroy = this.destroy.bind(this),
|
|
3335
|
+
}, Ie = (R) => {
|
|
3336
|
+
R.emit("status", [{ connected: R.connected }]);
|
|
3337
|
+
}, Kt = class extends Ct {
|
|
3338
|
+
constructor(R, D, { signaling: U = ["wss://y-webrtc-eu.fly.dev"], password: j = null, awareness: F = new pt(D), maxConns: C = 20 + mt(wt() * 15), filterBcConns: I = !0, peerOpts: w = {} } = {}) {
|
|
3339
|
+
super(), this.roomName = R, this.doc = D, this.filterBcConns = I, this.awareness = F, this.shouldConnect = !1, this.signalingUrls = U, this.signalingConns = [], this.maxConns = C, this.peerOpts = w, this.key = j ? Bt(j, R) : qe(null), this.room = null, this.key.then((c) => {
|
|
3340
|
+
this.room = Ht(D, this, R, c), this.shouldConnect ? this.room.connect() : this.room.disconnect(), Ie(this);
|
|
3341
|
+
}), this.connect(), this.destroy = this.destroy.bind(this), D.on("destroy", this.destroy);
|
|
3355
3342
|
}
|
|
3356
3343
|
get connected() {
|
|
3357
3344
|
return this.room !== null && this.shouldConnect;
|
|
3358
3345
|
}
|
|
3359
3346
|
connect() {
|
|
3360
|
-
this.shouldConnect = !0, this.signalingUrls.forEach((
|
|
3361
|
-
const
|
|
3362
|
-
this.signalingConns.push(
|
|
3347
|
+
this.shouldConnect = !0, this.signalingUrls.forEach((R) => {
|
|
3348
|
+
const D = Pe(xe, R, () => new Vt(R));
|
|
3349
|
+
this.signalingConns.push(D), D.providers.add(this);
|
|
3363
3350
|
}), this.room && (this.room.connect(), Ie(this));
|
|
3364
3351
|
}
|
|
3365
3352
|
disconnect() {
|
|
3366
|
-
this.shouldConnect = !1, this.signalingConns.forEach((
|
|
3367
|
-
|
|
3353
|
+
this.shouldConnect = !1, this.signalingConns.forEach((R) => {
|
|
3354
|
+
R.providers.delete(this), R.providers.size === 0 && (R.destroy(), xe.delete(R.url));
|
|
3368
3355
|
}), this.room && (this.room.disconnect(), Ie(this));
|
|
3369
3356
|
}
|
|
3370
3357
|
destroy() {
|
|
3371
3358
|
this.doc.off("destroy", this.destroy), this.key.then(() => {
|
|
3372
|
-
this.room.destroy(),
|
|
3359
|
+
this.room.destroy(), ve.delete(this.roomName);
|
|
3373
3360
|
}), super.destroy();
|
|
3374
3361
|
}
|
|
3375
3362
|
};
|
|
3376
3363
|
export {
|
|
3377
|
-
|
|
3364
|
+
Kt as WebrtcProvider
|
|
3378
3365
|
};
|