@wp-playground/storage 3.0.14 → 3.0.17
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/index.cjs +19 -19
- package/index.cjs.map +1 -1
- package/index.js +536 -532
- package/index.js.map +1 -1
- package/package.json +7 -7
package/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Semaphore as
|
|
2
|
-
import { Octokit as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { Semaphore as ar, normalizePath as fe, joinPaths as Qr } from "@php-wasm/util";
|
|
2
|
+
import { Octokit as tn } from "octokit";
|
|
3
|
+
import en from "crc-32";
|
|
4
|
+
import ce from "pako";
|
|
5
5
|
import { StreamedFile as ot } from "@php-wasm/stream-compression";
|
|
6
|
-
import { ZipReader as
|
|
7
|
-
function
|
|
8
|
-
return new
|
|
6
|
+
import { ZipReader as _e, BlobReader as Fe, BlobWriter as rn } from "@zip.js/zip.js";
|
|
7
|
+
function ua(r) {
|
|
8
|
+
return new tn({
|
|
9
9
|
auth: r
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function la(r, t = "") {
|
|
13
13
|
t.length && !t.endsWith("/") && (t += "/");
|
|
14
14
|
const e = {};
|
|
15
15
|
for (const i of r)
|
|
16
16
|
i.path.startsWith(t) && (e[i.path.substring(t.length)] = i.content);
|
|
17
17
|
return e;
|
|
18
18
|
}
|
|
19
|
-
async function
|
|
19
|
+
async function nn(r, t, e, i, a, f = {}) {
|
|
20
20
|
f.progress || (f.progress = {
|
|
21
21
|
foundFiles: 0,
|
|
22
22
|
downloadedFiles: 0
|
|
@@ -33,9 +33,9 @@ async function en(r, t, e, i, a, f = {}) {
|
|
|
33
33
|
);
|
|
34
34
|
for (const m of d)
|
|
35
35
|
m.type === "file" ? (++f.progress.foundFiles, u == null || u(f.progress), s.push(
|
|
36
|
-
|
|
36
|
+
an(r, t, e, i, m).then((v) => (++f.progress.downloadedFiles, u == null || u(f.progress), v))
|
|
37
37
|
)) : m.type === "dir" && h.push(
|
|
38
|
-
|
|
38
|
+
nn(
|
|
39
39
|
r,
|
|
40
40
|
t,
|
|
41
41
|
e,
|
|
@@ -49,9 +49,9 @@ async function en(r, t, e, i, a, f = {}) {
|
|
|
49
49
|
);
|
|
50
50
|
return [...y, ...g];
|
|
51
51
|
}
|
|
52
|
-
const
|
|
53
|
-
async function
|
|
54
|
-
const f = await
|
|
52
|
+
const on = new ar({ concurrency: 15 });
|
|
53
|
+
async function an(r, t, e, i, a) {
|
|
54
|
+
const f = await on.acquire();
|
|
55
55
|
try {
|
|
56
56
|
const { data: u } = await r.rest.repos.getContent({
|
|
57
57
|
owner: t,
|
|
@@ -64,19 +64,19 @@ async function nn(r, t, e, i, a) {
|
|
|
64
64
|
return {
|
|
65
65
|
name: a.name,
|
|
66
66
|
path: a.path,
|
|
67
|
-
content:
|
|
67
|
+
content: sn(u.content)
|
|
68
68
|
};
|
|
69
69
|
} finally {
|
|
70
70
|
f();
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function sn(r) {
|
|
74
74
|
const t = window.atob(r), e = t.length, i = new Uint8Array(e);
|
|
75
75
|
for (let a = 0; a < e; a++)
|
|
76
76
|
i[a] = t.charCodeAt(a);
|
|
77
77
|
return i;
|
|
78
78
|
}
|
|
79
|
-
async function
|
|
79
|
+
async function ha(r, t, e, i, a) {
|
|
80
80
|
var y;
|
|
81
81
|
const { data: f } = await r.rest.pulls.get({
|
|
82
82
|
owner: t,
|
|
@@ -99,7 +99,7 @@ async function ua(r, t, e, i, a) {
|
|
|
99
99
|
archive_format: "zip"
|
|
100
100
|
})).data;
|
|
101
101
|
}
|
|
102
|
-
async function
|
|
102
|
+
async function pa(r, t, e) {
|
|
103
103
|
var f;
|
|
104
104
|
const { data: i, headers: a } = await r.request(
|
|
105
105
|
"GET /repos/{owner}/{repo}",
|
|
@@ -110,7 +110,7 @@ async function la(r, t, e) {
|
|
|
110
110
|
);
|
|
111
111
|
return !(!a["x-oauth-scopes"] || !((f = i.permissions) != null && f.push));
|
|
112
112
|
}
|
|
113
|
-
async function
|
|
113
|
+
async function ya(r, t, e, i, a) {
|
|
114
114
|
await r.request("GET /repos/{owner}/{repo}/branches/{branch}", {
|
|
115
115
|
owner: t,
|
|
116
116
|
repo: e,
|
|
@@ -130,7 +130,7 @@ async function ha(r, t, e, i, a) {
|
|
|
130
130
|
ref: `refs/heads/${i}`
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
-
async function
|
|
133
|
+
async function da(r, t, e) {
|
|
134
134
|
const i = await r.request("GET /user");
|
|
135
135
|
return (await r.request("GET /repos/{owner}/{repo}/forks", {
|
|
136
136
|
owner: t,
|
|
@@ -142,7 +142,7 @@ async function pa(r, t, e) {
|
|
|
142
142
|
repo: e
|
|
143
143
|
}), i.data.login;
|
|
144
144
|
}
|
|
145
|
-
async function
|
|
145
|
+
async function ga(r, t, e, i, a, f) {
|
|
146
146
|
const {
|
|
147
147
|
data: { sha: u }
|
|
148
148
|
} = await r.request("POST /repos/{owner}/{repo}/git/commits", {
|
|
@@ -154,8 +154,8 @@ async function ya(r, t, e, i, a, f) {
|
|
|
154
154
|
});
|
|
155
155
|
return u;
|
|
156
156
|
}
|
|
157
|
-
async function
|
|
158
|
-
const f = await
|
|
157
|
+
async function wa(r, t, e, i, a) {
|
|
158
|
+
const f = await fn(
|
|
159
159
|
r,
|
|
160
160
|
t,
|
|
161
161
|
e,
|
|
@@ -174,21 +174,21 @@ async function da(r, t, e, i, a) {
|
|
|
174
174
|
});
|
|
175
175
|
return u;
|
|
176
176
|
}
|
|
177
|
-
async function
|
|
177
|
+
async function fn(r, t, e, i, a) {
|
|
178
178
|
const f = [];
|
|
179
179
|
for (const [u, s] of a.create)
|
|
180
|
-
f.push(
|
|
180
|
+
f.push(Ue(r, t, e, u, s));
|
|
181
181
|
for (const [u, s] of a.update)
|
|
182
|
-
f.push(
|
|
182
|
+
f.push(Ue(r, t, e, u, s));
|
|
183
183
|
for (const u of a.delete)
|
|
184
|
-
f.push(
|
|
184
|
+
f.push(cn(r, t, e, i, u));
|
|
185
185
|
return Promise.all(f).then(
|
|
186
186
|
(u) => u.filter((s) => !!s)
|
|
187
187
|
);
|
|
188
188
|
}
|
|
189
|
-
const
|
|
190
|
-
async function
|
|
191
|
-
const f = await
|
|
189
|
+
const sr = new ar({ concurrency: 10 });
|
|
190
|
+
async function Ue(r, t, e, i, a) {
|
|
191
|
+
const f = await sr.acquire();
|
|
192
192
|
try {
|
|
193
193
|
if (ArrayBuffer.isView(a))
|
|
194
194
|
try {
|
|
@@ -207,7 +207,7 @@ async function Fe(r, t, e, i, a) {
|
|
|
207
207
|
owner: t,
|
|
208
208
|
repo: e,
|
|
209
209
|
encoding: "base64",
|
|
210
|
-
content:
|
|
210
|
+
content: un(a)
|
|
211
211
|
});
|
|
212
212
|
return {
|
|
213
213
|
path: i,
|
|
@@ -225,8 +225,8 @@ async function Fe(r, t, e, i, a) {
|
|
|
225
225
|
f();
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
async function
|
|
229
|
-
const f = await
|
|
228
|
+
async function cn(r, t, e, i, a) {
|
|
229
|
+
const f = await sr.acquire();
|
|
230
230
|
try {
|
|
231
231
|
return await r.request("HEAD /repos/{owner}/{repo}/contents/:path", {
|
|
232
232
|
owner: t,
|
|
@@ -244,14 +244,14 @@ async function sn(r, t, e, i, a) {
|
|
|
244
244
|
f();
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function un(r) {
|
|
248
248
|
const t = [], e = r.byteLength;
|
|
249
249
|
for (let i = 0; i < e; i++)
|
|
250
250
|
t.push(String.fromCharCode(r[i]));
|
|
251
251
|
return window.btoa(t.join(""));
|
|
252
252
|
}
|
|
253
|
-
async function*
|
|
254
|
-
if (t =
|
|
253
|
+
async function* ma(r, t, { exceptPaths: e = [] } = {}) {
|
|
254
|
+
if (t = fe(t), !await r.isDir(t)) {
|
|
255
255
|
await r.fileExists(t) && (yield {
|
|
256
256
|
path: t,
|
|
257
257
|
read: async () => await r.readFileAsBuffer(t)
|
|
@@ -265,7 +265,7 @@ async function* ga(r, t, { exceptPaths: e = [] } = {}) {
|
|
|
265
265
|
return;
|
|
266
266
|
const f = await r.listFiles(a);
|
|
267
267
|
for (const u of f) {
|
|
268
|
-
const s =
|
|
268
|
+
const s = Qr(a, u);
|
|
269
269
|
e.includes(s.substring(t.length + 1)) || (await r.isDir(s) ? i.push(s) : yield {
|
|
270
270
|
path: s,
|
|
271
271
|
read: async () => await r.readFileAsBuffer(s)
|
|
@@ -273,7 +273,7 @@ async function* ga(r, t, { exceptPaths: e = [] } = {}) {
|
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
async function
|
|
276
|
+
async function ba(r, t) {
|
|
277
277
|
const e = {
|
|
278
278
|
create: /* @__PURE__ */ new Map(),
|
|
279
279
|
update: /* @__PURE__ */ new Map(),
|
|
@@ -282,26 +282,26 @@ async function wa(r, t) {
|
|
|
282
282
|
for await (const a of t) {
|
|
283
283
|
i.add(a.path);
|
|
284
284
|
const f = r.get(a.path), u = await a.read();
|
|
285
|
-
f ?
|
|
285
|
+
f ? ln(f, u) || e.update.set(a.path, u) : e.create.set(a.path, u);
|
|
286
286
|
}
|
|
287
287
|
for (const a of r.keys())
|
|
288
288
|
i.has(a) || e.delete.add(a);
|
|
289
289
|
return e;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function ln(r, t) {
|
|
292
292
|
return r.length === t.length && r.every((e, i) => e === t[i]);
|
|
293
293
|
}
|
|
294
|
-
async function
|
|
295
|
-
return r.type === "local-fs" ? r.handle :
|
|
294
|
+
async function hn(r) {
|
|
295
|
+
return r.type === "local-fs" ? r.handle : pn(r.path);
|
|
296
296
|
}
|
|
297
|
-
async function
|
|
297
|
+
async function pn(r) {
|
|
298
298
|
const t = r.split("/").filter((i) => i.length > 0);
|
|
299
299
|
let e = await navigator.storage.getDirectory();
|
|
300
300
|
for (const i of t)
|
|
301
301
|
e = await e.getDirectoryHandle(i, { create: !0 });
|
|
302
302
|
return e;
|
|
303
303
|
}
|
|
304
|
-
async function
|
|
304
|
+
async function va(r) {
|
|
305
305
|
const e = await (await navigator.storage.getDirectory()).resolve(r);
|
|
306
306
|
if (e === null)
|
|
307
307
|
throw new DOMException(
|
|
@@ -310,14 +310,14 @@ async function ma(r) {
|
|
|
310
310
|
);
|
|
311
311
|
return "/" + e.join("/");
|
|
312
312
|
}
|
|
313
|
-
async function
|
|
314
|
-
const t = await
|
|
313
|
+
async function Ea(r) {
|
|
314
|
+
const t = await hn(r);
|
|
315
315
|
for await (const e of t.keys())
|
|
316
316
|
await t.removeEntry(e, {
|
|
317
317
|
recursive: !0
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function yn(r) {
|
|
321
321
|
let t = [r];
|
|
322
322
|
return {
|
|
323
323
|
next() {
|
|
@@ -331,14 +331,14 @@ function hn(r) {
|
|
|
331
331
|
}
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
function
|
|
335
|
-
return r[Symbol.asyncIterator] ? r[Symbol.asyncIterator]() : r[Symbol.iterator] ? r[Symbol.iterator]() : r.next ? r :
|
|
334
|
+
function fr(r) {
|
|
335
|
+
return r[Symbol.asyncIterator] ? r[Symbol.asyncIterator]() : r[Symbol.iterator] ? r[Symbol.iterator]() : r.next ? r : yn(r);
|
|
336
336
|
}
|
|
337
|
-
class
|
|
337
|
+
class cr {
|
|
338
338
|
constructor(t) {
|
|
339
339
|
if (typeof Buffer > "u")
|
|
340
340
|
throw new Error("Missing Buffer dependency");
|
|
341
|
-
this.stream =
|
|
341
|
+
this.stream = fr(t), this.buffer = null, this.cursor = 0, this.undoCursor = 0, this.started = !1, this._ended = !1, this._discardedBytes = 0;
|
|
342
342
|
}
|
|
343
343
|
eof() {
|
|
344
344
|
return this._ended && this.cursor === this.buffer.length;
|
|
@@ -378,7 +378,7 @@ class sr {
|
|
|
378
378
|
async _accumulate(t) {
|
|
379
379
|
if (this._ended) return;
|
|
380
380
|
const e = [this.buffer];
|
|
381
|
-
for (; this.cursor + t >
|
|
381
|
+
for (; this.cursor + t > dn(e); ) {
|
|
382
382
|
const i = await this._next();
|
|
383
383
|
if (this._ended) break;
|
|
384
384
|
e.push(i);
|
|
@@ -392,10 +392,10 @@ class sr {
|
|
|
392
392
|
this.buffer = await this._next();
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function dn(r) {
|
|
396
396
|
return r.reduce((t, e) => t + e.length, 0);
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function gn(r, t) {
|
|
399
399
|
const e = t.toString(16);
|
|
400
400
|
return "0".repeat(r - e.length) + e;
|
|
401
401
|
}
|
|
@@ -408,11 +408,11 @@ class j {
|
|
|
408
408
|
}
|
|
409
409
|
static encode(t) {
|
|
410
410
|
typeof t == "string" && (t = Buffer.from(t));
|
|
411
|
-
const e = t.length + 4, i =
|
|
411
|
+
const e = t.length + 4, i = gn(4, e);
|
|
412
412
|
return Buffer.concat([Buffer.from(i, "utf8"), t]);
|
|
413
413
|
}
|
|
414
414
|
static streamReader(t) {
|
|
415
|
-
const e = new
|
|
415
|
+
const e = new cr(t);
|
|
416
416
|
return async function() {
|
|
417
417
|
try {
|
|
418
418
|
let a = await e.read(4);
|
|
@@ -467,19 +467,19 @@ class ut extends nt {
|
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
ut.code = "UnsafeFilepathError";
|
|
470
|
-
function
|
|
470
|
+
function ur(r, t) {
|
|
471
471
|
return -(r < t) || +(r > t);
|
|
472
472
|
}
|
|
473
|
-
function
|
|
474
|
-
return
|
|
473
|
+
function lr(r, t) {
|
|
474
|
+
return ur(r.path, t.path);
|
|
475
475
|
}
|
|
476
|
-
function
|
|
477
|
-
return
|
|
476
|
+
function wn(r, t) {
|
|
477
|
+
return ur($e(r), $e(t));
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function $e(r) {
|
|
480
480
|
return r.mode === "040000" ? r.path + "/" : r.path;
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function hr(r) {
|
|
483
483
|
switch (r) {
|
|
484
484
|
case "040000":
|
|
485
485
|
return "tree";
|
|
@@ -494,7 +494,7 @@ function ur(r) {
|
|
|
494
494
|
}
|
|
495
495
|
throw new I(`Unexpected GitTree entry mode: ${r}`);
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function mn(r) {
|
|
498
498
|
const t = [];
|
|
499
499
|
let e = 0;
|
|
500
500
|
for (; e < r.length; ) {
|
|
@@ -510,7 +510,7 @@ function gn(r) {
|
|
|
510
510
|
);
|
|
511
511
|
let f = r.slice(e, i).toString("utf8");
|
|
512
512
|
f === "40000" && (f = "040000");
|
|
513
|
-
const u =
|
|
513
|
+
const u = hr(f), s = r.slice(i + 1, a).toString("utf8");
|
|
514
514
|
if (s.includes("\\") || s.includes("/"))
|
|
515
515
|
throw new ut(s);
|
|
516
516
|
const h = r.slice(a + 1, a + 21).toString("hex");
|
|
@@ -518,7 +518,7 @@ function gn(r) {
|
|
|
518
518
|
}
|
|
519
519
|
return t;
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function bn(r) {
|
|
522
522
|
if (typeof r == "number" && (r = r.toString(8)), r.match(/^0?4.*/)) return "040000";
|
|
523
523
|
if (r.match(/^1006.*/)) return "100644";
|
|
524
524
|
if (r.match(/^1007.*/)) return "100755";
|
|
@@ -526,21 +526,21 @@ function wn(r) {
|
|
|
526
526
|
if (r.match(/^160.*/)) return "160000";
|
|
527
527
|
throw new I(`Could not understand file mode: ${r}`);
|
|
528
528
|
}
|
|
529
|
-
function
|
|
530
|
-
return !r.oid && r.sha && (r.oid = r.sha), r.mode =
|
|
529
|
+
function vn(r) {
|
|
530
|
+
return !r.oid && r.sha && (r.oid = r.sha), r.mode = bn(r.mode), r.type || (r.type = hr(r.mode)), r;
|
|
531
531
|
}
|
|
532
|
-
class
|
|
532
|
+
class ue {
|
|
533
533
|
constructor(t) {
|
|
534
534
|
if (Buffer.isBuffer(t))
|
|
535
|
-
this._entries =
|
|
535
|
+
this._entries = mn(t);
|
|
536
536
|
else if (Array.isArray(t))
|
|
537
|
-
this._entries = t.map(
|
|
537
|
+
this._entries = t.map(vn);
|
|
538
538
|
else
|
|
539
539
|
throw new I("invalid type passed to GitTree constructor");
|
|
540
|
-
this._entries.sort(
|
|
540
|
+
this._entries.sort(lr);
|
|
541
541
|
}
|
|
542
542
|
static from(t) {
|
|
543
|
-
return new
|
|
543
|
+
return new ue(t);
|
|
544
544
|
}
|
|
545
545
|
render() {
|
|
546
546
|
return this._entries.map((t) => `${t.mode} ${t.type} ${t.oid} ${t.path}`).join(`
|
|
@@ -548,7 +548,7 @@ class ce {
|
|
|
548
548
|
}
|
|
549
549
|
toObject() {
|
|
550
550
|
const t = [...this._entries];
|
|
551
|
-
return t.sort(
|
|
551
|
+
return t.sort(wn), Buffer.concat(
|
|
552
552
|
t.map((e) => {
|
|
553
553
|
const i = Buffer.from(e.mode.replace(/^0/, "")), a = Buffer.from(" "), f = Buffer.from(e.path, "utf8"), u = Buffer.from([0]), s = Buffer.from(e.oid, "hex");
|
|
554
554
|
return Buffer.concat([i, a, f, u, s]);
|
|
@@ -566,21 +566,21 @@ class ce {
|
|
|
566
566
|
yield t;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
function
|
|
570
|
-
return i =
|
|
569
|
+
function ne({ name: r, email: t, timestamp: e, timezoneOffset: i }) {
|
|
570
|
+
return i = En(i), `${r} <${t}> ${e} ${i}`;
|
|
571
571
|
}
|
|
572
|
-
function
|
|
573
|
-
const t =
|
|
572
|
+
function En(r) {
|
|
573
|
+
const t = xn(An(r));
|
|
574
574
|
r = Math.abs(r);
|
|
575
575
|
const e = Math.floor(r / 60);
|
|
576
576
|
r -= e * 60;
|
|
577
577
|
let i = String(e), a = String(r);
|
|
578
578
|
return i.length < 2 && (i = "0" + i), a.length < 2 && (a = "0" + a), (t === -1 ? "-" : "+") + i + a;
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function xn(r) {
|
|
581
581
|
return Math.sign(r) || (Object.is(r, -0) ? -1 : 1);
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function An(r) {
|
|
584
584
|
return r === 0 ? r : -r;
|
|
585
585
|
}
|
|
586
586
|
function V(r) {
|
|
@@ -595,14 +595,14 @@ function Et(r) {
|
|
|
595
595
|
name: t,
|
|
596
596
|
email: e,
|
|
597
597
|
timestamp: Number(i),
|
|
598
|
-
timezoneOffset:
|
|
598
|
+
timezoneOffset: Bn(a)
|
|
599
599
|
};
|
|
600
600
|
}
|
|
601
|
-
function
|
|
601
|
+
function Bn(r) {
|
|
602
602
|
let [, t, e, i] = r.match(/(\+|-)(\d\d)(\d\d)/);
|
|
603
|
-
return i = (t === "+" ? 1 : -1) * (Number(e) * 60 + Number(i)),
|
|
603
|
+
return i = (t === "+" ? 1 : -1) * (Number(e) * 60 + Number(i)), Sn(i);
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function Sn(r) {
|
|
606
606
|
return r === 0 ? r : -r;
|
|
607
607
|
}
|
|
608
608
|
class it {
|
|
@@ -625,7 +625,7 @@ class it {
|
|
|
625
625
|
return `object ${t.object}
|
|
626
626
|
type ${t.type}
|
|
627
627
|
tag ${t.tag}
|
|
628
|
-
tagger ${
|
|
628
|
+
tagger ${ne(t.tagger)}
|
|
629
629
|
|
|
630
630
|
${t.message}
|
|
631
631
|
${t.gpgsig ? t.gpgsig : ""}`;
|
|
@@ -699,7 +699,7 @@ function Pt(r) {
|
|
|
699
699
|
`) + `
|
|
700
700
|
`;
|
|
701
701
|
}
|
|
702
|
-
function
|
|
702
|
+
function In(r) {
|
|
703
703
|
return r.split(`
|
|
704
704
|
`).map((t) => t.replace(/^ /, "")).join(`
|
|
705
705
|
`);
|
|
@@ -777,10 +777,10 @@ gpgsig` + Pt(e) + `
|
|
|
777
777
|
`;
|
|
778
778
|
}
|
|
779
779
|
const i = t.author;
|
|
780
|
-
e += `author ${
|
|
780
|
+
e += `author ${ne(i)}
|
|
781
781
|
`;
|
|
782
782
|
const a = t.committer || t.author;
|
|
783
|
-
return e += `committer ${
|
|
783
|
+
return e += `committer ${ne(a)}
|
|
784
784
|
`, t.gpgsig && (e += "gpgsig" + Pt(t.gpgsig)), e;
|
|
785
785
|
}
|
|
786
786
|
static render(t) {
|
|
@@ -807,7 +807,7 @@ gpgsig`)), i = t.slice(
|
|
|
807
807
|
this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),
|
|
808
808
|
this._commit.indexOf("-----END PGP SIGNATURE-----") + 27
|
|
809
809
|
);
|
|
810
|
-
return
|
|
810
|
+
return In(t);
|
|
811
811
|
}
|
|
812
812
|
static async sign(t, e, i) {
|
|
813
813
|
const a = t.withoutSignature(), f = M.justMessage(t._commit);
|
|
@@ -819,7 +819,7 @@ gpgsig` + Pt(u) + `
|
|
|
819
819
|
return M.from(h);
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
|
-
class
|
|
822
|
+
class _n {
|
|
823
823
|
static wrap({ type: t, object: e }) {
|
|
824
824
|
return Buffer.concat([
|
|
825
825
|
Buffer.from(`${t} ${e.byteLength.toString()}\0`),
|
|
@@ -892,22 +892,22 @@ class H {
|
|
|
892
892
|
return this._start += 4, e;
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
|
-
function
|
|
896
|
-
const e = new H(r), i =
|
|
895
|
+
function Fn(r, t) {
|
|
896
|
+
const e = new H(r), i = Pe(e);
|
|
897
897
|
if (i !== t.byteLength)
|
|
898
898
|
throw new I(
|
|
899
899
|
`applyDelta expected source buffer to be ${i} bytes but the provided buffer was ${t.length} bytes`
|
|
900
900
|
);
|
|
901
|
-
const a =
|
|
901
|
+
const a = Pe(e);
|
|
902
902
|
let f;
|
|
903
|
-
const u =
|
|
903
|
+
const u = Oe(e, t);
|
|
904
904
|
if (u.byteLength === a)
|
|
905
905
|
f = u;
|
|
906
906
|
else {
|
|
907
907
|
f = Buffer.alloc(a);
|
|
908
908
|
const s = new H(f);
|
|
909
909
|
for (s.copy(u); !e.eof(); )
|
|
910
|
-
s.copy(
|
|
910
|
+
s.copy(Oe(e, t));
|
|
911
911
|
const h = s.tell();
|
|
912
912
|
if (a !== h)
|
|
913
913
|
throw new I(
|
|
@@ -916,30 +916,30 @@ function In(r, t) {
|
|
|
916
916
|
}
|
|
917
917
|
return f;
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function Pe(r) {
|
|
920
920
|
let t = 0, e = 0, i = null;
|
|
921
921
|
do
|
|
922
922
|
i = r.readUInt8(), t |= (i & 127) << e, e += 7;
|
|
923
923
|
while (i & 128);
|
|
924
924
|
return t;
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function Te(r, t, e) {
|
|
927
927
|
let i = 0, a = 0;
|
|
928
928
|
for (; e--; )
|
|
929
929
|
t & 1 && (i |= r.readUInt8() << a), t >>= 1, a += 8;
|
|
930
930
|
return i;
|
|
931
931
|
}
|
|
932
|
-
function
|
|
932
|
+
function Oe(r, t) {
|
|
933
933
|
const e = r.readUInt8(), i = 128, a = 15, f = 112;
|
|
934
934
|
if (e & i) {
|
|
935
|
-
const u =
|
|
936
|
-
let s =
|
|
935
|
+
const u = Te(r, e & a, 4);
|
|
936
|
+
let s = Te(r, (e & f) >> 4, 3);
|
|
937
937
|
return s === 0 && (s = 65536), t.slice(u, u + s);
|
|
938
938
|
} else
|
|
939
939
|
return r.slice(e);
|
|
940
940
|
}
|
|
941
|
-
async function
|
|
942
|
-
const e = new
|
|
941
|
+
async function Un(r, t) {
|
|
942
|
+
const e = new cr(r);
|
|
943
943
|
let i = await e.read(4);
|
|
944
944
|
if (i = i.toString("utf8"), i !== "PACK")
|
|
945
945
|
throw new I(`Invalid PACK header '${i}'`);
|
|
@@ -949,7 +949,7 @@ async function _n(r, t) {
|
|
|
949
949
|
let f = await e.read(4);
|
|
950
950
|
if (f = f.readUInt32BE(0), !(f < 1))
|
|
951
951
|
for (; !e.eof() && f--; ) {
|
|
952
|
-
const u = e.tell(), { type: s, length: h, ofs: d, reference: y } = await
|
|
952
|
+
const u = e.tell(), { type: s, length: h, ofs: d, reference: y } = await $n(e), g = new ce.Inflate();
|
|
953
953
|
for (; !g.result; ) {
|
|
954
954
|
const m = await e.chunk();
|
|
955
955
|
if (!m) break;
|
|
@@ -975,7 +975,7 @@ async function _n(r, t) {
|
|
|
975
975
|
}
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
|
-
async function
|
|
978
|
+
async function $n(r) {
|
|
979
979
|
let t = await r.byte();
|
|
980
980
|
const e = t >> 4 & 7;
|
|
981
981
|
let i = t & 15;
|
|
@@ -997,15 +997,15 @@ async function Fn(r) {
|
|
|
997
997
|
}
|
|
998
998
|
return e === 7 && (f = await r.read(20)), { type: e, length: i, ofs: a, reference: f };
|
|
999
999
|
}
|
|
1000
|
-
async function
|
|
1001
|
-
return
|
|
1000
|
+
async function Pn(r) {
|
|
1001
|
+
return ce.inflate(r);
|
|
1002
1002
|
}
|
|
1003
|
-
var
|
|
1004
|
-
function
|
|
1003
|
+
var pr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1004
|
+
function Tn(r) {
|
|
1005
1005
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
1006
1006
|
}
|
|
1007
|
-
var
|
|
1008
|
-
typeof Object.create == "function" ?
|
|
1007
|
+
var ie = { exports: {} };
|
|
1008
|
+
typeof Object.create == "function" ? ie.exports = function(t, e) {
|
|
1009
1009
|
e && (t.super_ = e, t.prototype = Object.create(e.prototype, {
|
|
1010
1010
|
constructor: {
|
|
1011
1011
|
value: t,
|
|
@@ -1014,7 +1014,7 @@ typeof Object.create == "function" ? ne.exports = function(t, e) {
|
|
|
1014
1014
|
configurable: !0
|
|
1015
1015
|
}
|
|
1016
1016
|
}));
|
|
1017
|
-
} :
|
|
1017
|
+
} : ie.exports = function(t, e) {
|
|
1018
1018
|
if (e) {
|
|
1019
1019
|
t.super_ = e;
|
|
1020
1020
|
var i = function() {
|
|
@@ -1022,16 +1022,16 @@ typeof Object.create == "function" ? ne.exports = function(t, e) {
|
|
|
1022
1022
|
i.prototype = e.prototype, t.prototype = new i(), t.prototype.constructor = t;
|
|
1023
1023
|
}
|
|
1024
1024
|
};
|
|
1025
|
-
var
|
|
1026
|
-
St.byteLength =
|
|
1027
|
-
St.toByteArray =
|
|
1028
|
-
St.fromByteArray =
|
|
1029
|
-
var W = [], L = [],
|
|
1030
|
-
for (var K = 0,
|
|
1025
|
+
var On = ie.exports, oe = { exports: {} }, le = {}, St = {};
|
|
1026
|
+
St.byteLength = jn;
|
|
1027
|
+
St.toByteArray = Dn;
|
|
1028
|
+
St.fromByteArray = Ln;
|
|
1029
|
+
var W = [], L = [], kn = typeof Uint8Array < "u" ? Uint8Array : Array, Tt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
1030
|
+
for (var K = 0, Rn = Tt.length; K < Rn; ++K)
|
|
1031
1031
|
W[K] = Tt[K], L[Tt.charCodeAt(K)] = K;
|
|
1032
1032
|
L[45] = 62;
|
|
1033
1033
|
L[95] = 63;
|
|
1034
|
-
function
|
|
1034
|
+
function yr(r) {
|
|
1035
1035
|
var t = r.length;
|
|
1036
1036
|
if (t % 4 > 0)
|
|
1037
1037
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -1040,39 +1040,39 @@ function hr(r) {
|
|
|
1040
1040
|
var i = e === t ? 0 : 4 - e % 4;
|
|
1041
1041
|
return [e, i];
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1044
|
-
var t =
|
|
1043
|
+
function jn(r) {
|
|
1044
|
+
var t = yr(r), e = t[0], i = t[1];
|
|
1045
1045
|
return (e + i) * 3 / 4 - i;
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function Cn(r, t, e) {
|
|
1048
1048
|
return (t + e) * 3 / 4 - e;
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1051
|
-
var t, e =
|
|
1050
|
+
function Dn(r) {
|
|
1051
|
+
var t, e = yr(r), i = e[0], a = e[1], f = new kn(Cn(r, i, a)), u = 0, s = a > 0 ? i - 4 : i, h;
|
|
1052
1052
|
for (h = 0; h < s; h += 4)
|
|
1053
1053
|
t = L[r.charCodeAt(h)] << 18 | L[r.charCodeAt(h + 1)] << 12 | L[r.charCodeAt(h + 2)] << 6 | L[r.charCodeAt(h + 3)], f[u++] = t >> 16 & 255, f[u++] = t >> 8 & 255, f[u++] = t & 255;
|
|
1054
1054
|
return a === 2 && (t = L[r.charCodeAt(h)] << 2 | L[r.charCodeAt(h + 1)] >> 4, f[u++] = t & 255), a === 1 && (t = L[r.charCodeAt(h)] << 10 | L[r.charCodeAt(h + 1)] << 4 | L[r.charCodeAt(h + 2)] >> 2, f[u++] = t >> 8 & 255, f[u++] = t & 255), f;
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1056
|
+
function Nn(r) {
|
|
1057
1057
|
return W[r >> 18 & 63] + W[r >> 12 & 63] + W[r >> 6 & 63] + W[r & 63];
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function Mn(r, t, e) {
|
|
1060
1060
|
for (var i, a = [], f = t; f < e; f += 3)
|
|
1061
|
-
i = (r[f] << 16 & 16711680) + (r[f + 1] << 8 & 65280) + (r[f + 2] & 255), a.push(
|
|
1061
|
+
i = (r[f] << 16 & 16711680) + (r[f + 1] << 8 & 65280) + (r[f + 2] & 255), a.push(Nn(i));
|
|
1062
1062
|
return a.join("");
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function Ln(r) {
|
|
1065
1065
|
for (var t, e = r.length, i = e % 3, a = [], f = 16383, u = 0, s = e - i; u < s; u += f)
|
|
1066
|
-
a.push(
|
|
1066
|
+
a.push(Mn(r, u, u + f > s ? s : u + f));
|
|
1067
1067
|
return i === 1 ? (t = r[e - 1], a.push(
|
|
1068
1068
|
W[t >> 2] + W[t << 4 & 63] + "=="
|
|
1069
1069
|
)) : i === 2 && (t = (r[e - 2] << 8) + r[e - 1], a.push(
|
|
1070
1070
|
W[t >> 10] + W[t >> 4 & 63] + W[t << 2 & 63] + "="
|
|
1071
1071
|
)), a.join("");
|
|
1072
1072
|
}
|
|
1073
|
-
var
|
|
1073
|
+
var he = {};
|
|
1074
1074
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
1075
|
-
|
|
1075
|
+
he.read = function(r, t, e, i, a) {
|
|
1076
1076
|
var f, u, s = a * 8 - i - 1, h = (1 << s) - 1, d = h >> 1, y = -7, g = e ? a - 1 : 0, m = e ? -1 : 1, v = r[t + g];
|
|
1077
1077
|
for (g += m, f = v & (1 << -y) - 1, v >>= -y, y += s; y > 0; f = f * 256 + r[t + g], g += m, y -= 8)
|
|
1078
1078
|
;
|
|
@@ -1087,7 +1087,7 @@ le.read = function(r, t, e, i, a) {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
return (v ? -1 : 1) * u * Math.pow(2, f - i);
|
|
1089
1089
|
};
|
|
1090
|
-
|
|
1090
|
+
he.write = function(r, t, e, i, a, f) {
|
|
1091
1091
|
var u, s, h, d = f * 8 - a - 1, y = (1 << d) - 1, g = y >> 1, m = a === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, v = i ? 0 : f - 1, F = i ? 1 : -1, $ = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
|
|
1092
1092
|
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (s = isNaN(t) ? 1 : 0, u = y) : (u = Math.floor(Math.log(t) / Math.LN2), t * (h = Math.pow(2, -u)) < 1 && (u--, h *= 2), u + g >= 1 ? t += m / h : t += m * Math.pow(2, 1 - g), t * h >= 2 && (u++, h /= 2), u + g >= y ? (s = 0, u = y) : u + g >= 1 ? (s = (t * h - 1) * Math.pow(2, a), u = u + g) : (s = t * Math.pow(2, g - 1) * Math.pow(2, a), u = 0)); a >= 8; r[e + v] = s & 255, v += F, s /= 256, a -= 8)
|
|
1093
1093
|
;
|
|
@@ -1102,7 +1102,7 @@ le.write = function(r, t, e, i, a, f) {
|
|
|
1102
1102
|
* @license MIT
|
|
1103
1103
|
*/
|
|
1104
1104
|
(function(r) {
|
|
1105
|
-
var t = St, e =
|
|
1105
|
+
var t = St, e = he, i = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
1106
1106
|
r.Buffer = s, r.SlowBuffer = _, r.INSPECT_MAX_BYTES = 50;
|
|
1107
1107
|
var a = 2147483647;
|
|
1108
1108
|
r.kMaxLength = a, s.TYPED_ARRAY_SUPPORT = f(), !s.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
|
|
@@ -1330,7 +1330,7 @@ le.write = function(r, t, e, i, a, f) {
|
|
|
1330
1330
|
case "hex":
|
|
1331
1331
|
return o >>> 1;
|
|
1332
1332
|
case "base64":
|
|
1333
|
-
return
|
|
1333
|
+
return Be(c).length;
|
|
1334
1334
|
default:
|
|
1335
1335
|
if (p)
|
|
1336
1336
|
return l ? -1 : Ut(c).length;
|
|
@@ -1345,22 +1345,22 @@ le.write = function(r, t, e, i, a, f) {
|
|
|
1345
1345
|
for (c || (c = "utf8"); ; )
|
|
1346
1346
|
switch (c) {
|
|
1347
1347
|
case "hex":
|
|
1348
|
-
return
|
|
1348
|
+
return Wr(this, n, o);
|
|
1349
1349
|
case "utf8":
|
|
1350
1350
|
case "utf-8":
|
|
1351
|
-
return
|
|
1351
|
+
return be(this, n, o);
|
|
1352
1352
|
case "ascii":
|
|
1353
|
-
return
|
|
1353
|
+
return zr(this, n, o);
|
|
1354
1354
|
case "latin1":
|
|
1355
1355
|
case "binary":
|
|
1356
|
-
return
|
|
1356
|
+
return Hr(this, n, o);
|
|
1357
1357
|
case "base64":
|
|
1358
|
-
return
|
|
1358
|
+
return Gr(this, n, o);
|
|
1359
1359
|
case "ucs2":
|
|
1360
1360
|
case "ucs-2":
|
|
1361
1361
|
case "utf16le":
|
|
1362
1362
|
case "utf-16le":
|
|
1363
|
-
return
|
|
1363
|
+
return Vr(this, n, o);
|
|
1364
1364
|
default:
|
|
1365
1365
|
if (l) throw new TypeError("Unknown encoding: " + c);
|
|
1366
1366
|
c = (c + "").toLowerCase(), l = !0;
|
|
@@ -1394,7 +1394,7 @@ le.write = function(r, t, e, i, a, f) {
|
|
|
1394
1394
|
return this;
|
|
1395
1395
|
}, s.prototype.toString = function() {
|
|
1396
1396
|
var n = this.length;
|
|
1397
|
-
return n === 0 ? "" : arguments.length === 0 ?
|
|
1397
|
+
return n === 0 ? "" : arguments.length === 0 ? be(this, 0, n) : P.apply(this, arguments);
|
|
1398
1398
|
}, s.prototype.toLocaleString = s.prototype.toString, s.prototype.equals = function(n) {
|
|
1399
1399
|
if (!s.isBuffer(n)) throw new TypeError("Argument must be a Buffer");
|
|
1400
1400
|
return this === n ? !0 : s.compare(this, n) === 0;
|
|
@@ -1422,7 +1422,7 @@ le.write = function(r, t, e, i, a, f) {
|
|
|
1422
1422
|
}
|
|
1423
1423
|
return b < S ? -1 : S < b ? 1 : 0;
|
|
1424
1424
|
};
|
|
1425
|
-
function
|
|
1425
|
+
function we(c, n, o, l, p) {
|
|
1426
1426
|
if (c.length === 0) return -1;
|
|
1427
1427
|
if (typeof o == "string" ? (l = o, o = 0) : o > 2147483647 ? o = 2147483647 : o < -2147483648 && (o = -2147483648), o = +o, $t(o) && (o = p ? 0 : c.length - 1), o < 0 && (o = c.length + o), o >= c.length) {
|
|
1428
1428
|
if (p) return -1;
|
|
@@ -1431,20 +1431,20 @@ le.write = function(r, t, e, i, a, f) {
|
|
|
1431
1431
|
if (p) o = 0;
|
|
1432
1432
|
else return -1;
|
|
1433
1433
|
if (typeof n == "string" && (n = s.from(n, l)), s.isBuffer(n))
|
|
1434
|
-
return n.length === 0 ? -1 :
|
|
1434
|
+
return n.length === 0 ? -1 : me(c, n, o, l, p);
|
|
1435
1435
|
if (typeof n == "number")
|
|
1436
|
-
return n = n & 255, typeof Uint8Array.prototype.indexOf == "function" ? p ? Uint8Array.prototype.indexOf.call(c, n, o) : Uint8Array.prototype.lastIndexOf.call(c, n, o) :
|
|
1436
|
+
return n = n & 255, typeof Uint8Array.prototype.indexOf == "function" ? p ? Uint8Array.prototype.indexOf.call(c, n, o) : Uint8Array.prototype.lastIndexOf.call(c, n, o) : me(c, [n], o, l, p);
|
|
1437
1437
|
throw new TypeError("val must be string, number or Buffer");
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1439
|
+
function me(c, n, o, l, p) {
|
|
1440
1440
|
var w = 1, b = c.length, S = n.length;
|
|
1441
1441
|
if (l !== void 0 && (l = String(l).toLowerCase(), l === "ucs2" || l === "ucs-2" || l === "utf16le" || l === "utf-16le")) {
|
|
1442
1442
|
if (c.length < 2 || n.length < 2)
|
|
1443
1443
|
return -1;
|
|
1444
1444
|
w = 2, b /= 2, S /= 2, o /= 2;
|
|
1445
1445
|
}
|
|
1446
|
-
function U(
|
|
1447
|
-
return w === 1 ?
|
|
1446
|
+
function U(Se, Ie) {
|
|
1447
|
+
return w === 1 ? Se[Ie] : Se.readUInt16BE(Ie * w);
|
|
1448
1448
|
}
|
|
1449
1449
|
var T;
|
|
1450
1450
|
if (p) {
|
|
@@ -1468,11 +1468,11 @@ le.write = function(r, t, e, i, a, f) {
|
|
|
1468
1468
|
s.prototype.includes = function(n, o, l) {
|
|
1469
1469
|
return this.indexOf(n, o, l) !== -1;
|
|
1470
1470
|
}, s.prototype.indexOf = function(n, o, l) {
|
|
1471
|
-
return
|
|
1471
|
+
return we(this, n, o, l, !0);
|
|
1472
1472
|
}, s.prototype.lastIndexOf = function(n, o, l) {
|
|
1473
|
-
return
|
|
1473
|
+
return we(this, n, o, l, !1);
|
|
1474
1474
|
};
|
|
1475
|
-
function
|
|
1475
|
+
function Cr(c, n, o, l) {
|
|
1476
1476
|
o = Number(o) || 0;
|
|
1477
1477
|
var p = c.length - o;
|
|
1478
1478
|
l ? (l = Number(l), l > p && (l = p)) : l = p;
|
|
@@ -1485,17 +1485,17 @@ le.write = function(r, t, e, i, a, f) {
|
|
|
1485
1485
|
}
|
|
1486
1486
|
return b;
|
|
1487
1487
|
}
|
|
1488
|
-
function
|
|
1488
|
+
function Dr(c, n, o, l) {
|
|
1489
1489
|
return wt(Ut(n, c.length - o), c, o, l);
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1492
|
-
return wt(
|
|
1491
|
+
function Nr(c, n, o, l) {
|
|
1492
|
+
return wt(Xr(n), c, o, l);
|
|
1493
1493
|
}
|
|
1494
|
-
function
|
|
1495
|
-
return wt(
|
|
1494
|
+
function Mr(c, n, o, l) {
|
|
1495
|
+
return wt(Be(n), c, o, l);
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1498
|
-
return wt(
|
|
1497
|
+
function Lr(c, n, o, l) {
|
|
1498
|
+
return wt(Kr(n, c.length - o), c, o, l);
|
|
1499
1499
|
}
|
|
1500
1500
|
s.prototype.write = function(n, o, l, p) {
|
|
1501
1501
|
if (o === void 0)
|
|
@@ -1515,21 +1515,21 @@ le.write = function(r, t, e, i, a, f) {
|
|
|
1515
1515
|
for (var b = !1; ; )
|
|
1516
1516
|
switch (p) {
|
|
1517
1517
|
case "hex":
|
|
1518
|
-
return
|
|
1518
|
+
return Cr(this, n, o, l);
|
|
1519
1519
|
case "utf8":
|
|
1520
1520
|
case "utf-8":
|
|
1521
|
-
return
|
|
1521
|
+
return Dr(this, n, o, l);
|
|
1522
1522
|
case "ascii":
|
|
1523
1523
|
case "latin1":
|
|
1524
1524
|
case "binary":
|
|
1525
|
-
return
|
|
1525
|
+
return Nr(this, n, o, l);
|
|
1526
1526
|
case "base64":
|
|
1527
|
-
return
|
|
1527
|
+
return Mr(this, n, o, l);
|
|
1528
1528
|
case "ucs2":
|
|
1529
1529
|
case "ucs-2":
|
|
1530
1530
|
case "utf16le":
|
|
1531
1531
|
case "utf-16le":
|
|
1532
|
-
return
|
|
1532
|
+
return Lr(this, n, o, l);
|
|
1533
1533
|
default:
|
|
1534
1534
|
if (b) throw new TypeError("Unknown encoding: " + p);
|
|
1535
1535
|
p = ("" + p).toLowerCase(), b = !0;
|
|
@@ -1540,10 +1540,10 @@ le.write = function(r, t, e, i, a, f) {
|
|
|
1540
1540
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
1541
1541
|
};
|
|
1542
1542
|
};
|
|
1543
|
-
function
|
|
1543
|
+
function Gr(c, n, o) {
|
|
1544
1544
|
return n === 0 && o === c.length ? t.fromByteArray(c) : t.fromByteArray(c.slice(n, o));
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function be(c, n, o) {
|
|
1547
1547
|
o = Math.min(c.length, o);
|
|
1548
1548
|
for (var l = [], p = n; p < o; ) {
|
|
1549
1549
|
var w = c[p], b = null, S = w > 239 ? 4 : w > 223 ? 3 : w > 191 ? 2 : 1;
|
|
@@ -1565,42 +1565,42 @@ le.write = function(r, t, e, i, a, f) {
|
|
|
1565
1565
|
}
|
|
1566
1566
|
b === null ? (b = 65533, S = 1) : b > 65535 && (b -= 65536, l.push(b >>> 10 & 1023 | 55296), b = 56320 | b & 1023), l.push(b), p += S;
|
|
1567
1567
|
}
|
|
1568
|
-
return
|
|
1568
|
+
return qr(l);
|
|
1569
1569
|
}
|
|
1570
|
-
var
|
|
1571
|
-
function
|
|
1570
|
+
var ve = 4096;
|
|
1571
|
+
function qr(c) {
|
|
1572
1572
|
var n = c.length;
|
|
1573
|
-
if (n <=
|
|
1573
|
+
if (n <= ve)
|
|
1574
1574
|
return String.fromCharCode.apply(String, c);
|
|
1575
1575
|
for (var o = "", l = 0; l < n; )
|
|
1576
1576
|
o += String.fromCharCode.apply(
|
|
1577
1577
|
String,
|
|
1578
|
-
c.slice(l, l +=
|
|
1578
|
+
c.slice(l, l += ve)
|
|
1579
1579
|
);
|
|
1580
1580
|
return o;
|
|
1581
1581
|
}
|
|
1582
|
-
function
|
|
1582
|
+
function zr(c, n, o) {
|
|
1583
1583
|
var l = "";
|
|
1584
1584
|
o = Math.min(c.length, o);
|
|
1585
1585
|
for (var p = n; p < o; ++p)
|
|
1586
1586
|
l += String.fromCharCode(c[p] & 127);
|
|
1587
1587
|
return l;
|
|
1588
1588
|
}
|
|
1589
|
-
function
|
|
1589
|
+
function Hr(c, n, o) {
|
|
1590
1590
|
var l = "";
|
|
1591
1591
|
o = Math.min(c.length, o);
|
|
1592
1592
|
for (var p = n; p < o; ++p)
|
|
1593
1593
|
l += String.fromCharCode(c[p]);
|
|
1594
1594
|
return l;
|
|
1595
1595
|
}
|
|
1596
|
-
function
|
|
1596
|
+
function Wr(c, n, o) {
|
|
1597
1597
|
var l = c.length;
|
|
1598
1598
|
(!n || n < 0) && (n = 0), (!o || o < 0 || o > l) && (o = l);
|
|
1599
1599
|
for (var p = "", w = n; w < o; ++w)
|
|
1600
|
-
p +=
|
|
1600
|
+
p += Zr[c[w]];
|
|
1601
1601
|
return p;
|
|
1602
1602
|
}
|
|
1603
|
-
function
|
|
1603
|
+
function Vr(c, n, o) {
|
|
1604
1604
|
for (var l = c.slice(n, o), p = "", w = 0; w < l.length - 1; w += 2)
|
|
1605
1605
|
p += String.fromCharCode(l[w] + l[w + 1] * 256);
|
|
1606
1606
|
return p;
|
|
@@ -1730,25 +1730,25 @@ le.write = function(r, t, e, i, a, f) {
|
|
|
1730
1730
|
}, s.prototype.writeInt32BE = function(n, o, l) {
|
|
1731
1731
|
return n = +n, o = o >>> 0, l || N(this, n, o, 4, 2147483647, -2147483648), n < 0 && (n = 4294967295 + n + 1), this[o] = n >>> 24, this[o + 1] = n >>> 16, this[o + 2] = n >>> 8, this[o + 3] = n & 255, o + 4;
|
|
1732
1732
|
};
|
|
1733
|
-
function
|
|
1733
|
+
function Ee(c, n, o, l, p, w) {
|
|
1734
1734
|
if (o + l > c.length) throw new RangeError("Index out of range");
|
|
1735
1735
|
if (o < 0) throw new RangeError("Index out of range");
|
|
1736
1736
|
}
|
|
1737
|
-
function
|
|
1738
|
-
return n = +n, o = o >>> 0, p ||
|
|
1737
|
+
function xe(c, n, o, l, p) {
|
|
1738
|
+
return n = +n, o = o >>> 0, p || Ee(c, n, o, 4), e.write(c, n, o, l, 23, 4), o + 4;
|
|
1739
1739
|
}
|
|
1740
1740
|
s.prototype.writeFloatLE = function(n, o, l) {
|
|
1741
|
-
return
|
|
1741
|
+
return xe(this, n, o, !0, l);
|
|
1742
1742
|
}, s.prototype.writeFloatBE = function(n, o, l) {
|
|
1743
|
-
return
|
|
1743
|
+
return xe(this, n, o, !1, l);
|
|
1744
1744
|
};
|
|
1745
|
-
function
|
|
1746
|
-
return n = +n, o = o >>> 0, p ||
|
|
1745
|
+
function Ae(c, n, o, l, p) {
|
|
1746
|
+
return n = +n, o = o >>> 0, p || Ee(c, n, o, 8), e.write(c, n, o, l, 52, 8), o + 8;
|
|
1747
1747
|
}
|
|
1748
1748
|
s.prototype.writeDoubleLE = function(n, o, l) {
|
|
1749
|
-
return
|
|
1749
|
+
return Ae(this, n, o, !0, l);
|
|
1750
1750
|
}, s.prototype.writeDoubleBE = function(n, o, l) {
|
|
1751
|
-
return
|
|
1751
|
+
return Ae(this, n, o, !1, l);
|
|
1752
1752
|
}, s.prototype.copy = function(n, o, l, p) {
|
|
1753
1753
|
if (!s.isBuffer(n)) throw new TypeError("argument should be a Buffer");
|
|
1754
1754
|
if (l || (l = 0), !p && p !== 0 && (p = this.length), o >= n.length && (o = n.length), o || (o = 0), p > 0 && p < l && (p = l), p === l || n.length === 0 || this.length === 0) return 0;
|
|
@@ -1792,9 +1792,9 @@ le.write = function(r, t, e, i, a, f) {
|
|
|
1792
1792
|
}
|
|
1793
1793
|
return this;
|
|
1794
1794
|
};
|
|
1795
|
-
var
|
|
1796
|
-
function
|
|
1797
|
-
if (c = c.split("=")[0], c = c.trim().replace(
|
|
1795
|
+
var Jr = /[^+/0-9A-Za-z-_]/g;
|
|
1796
|
+
function Yr(c) {
|
|
1797
|
+
if (c = c.split("=")[0], c = c.trim().replace(Jr, ""), c.length < 2) return "";
|
|
1798
1798
|
for (; c.length % 4 !== 0; )
|
|
1799
1799
|
c = c + "=";
|
|
1800
1800
|
return c;
|
|
@@ -1849,18 +1849,18 @@ le.write = function(r, t, e, i, a, f) {
|
|
|
1849
1849
|
}
|
|
1850
1850
|
return w;
|
|
1851
1851
|
}
|
|
1852
|
-
function
|
|
1852
|
+
function Xr(c) {
|
|
1853
1853
|
for (var n = [], o = 0; o < c.length; ++o)
|
|
1854
1854
|
n.push(c.charCodeAt(o) & 255);
|
|
1855
1855
|
return n;
|
|
1856
1856
|
}
|
|
1857
|
-
function
|
|
1857
|
+
function Kr(c, n) {
|
|
1858
1858
|
for (var o, l, p, w = [], b = 0; b < c.length && !((n -= 2) < 0); ++b)
|
|
1859
1859
|
o = c.charCodeAt(b), l = o >> 8, p = o % 256, w.push(p), w.push(l);
|
|
1860
1860
|
return w;
|
|
1861
1861
|
}
|
|
1862
|
-
function
|
|
1863
|
-
return t.toByteArray(
|
|
1862
|
+
function Be(c) {
|
|
1863
|
+
return t.toByteArray(Yr(c));
|
|
1864
1864
|
}
|
|
1865
1865
|
function wt(c, n, o, l) {
|
|
1866
1866
|
for (var p = 0; p < l && !(p + o >= n.length || p >= c.length); ++p)
|
|
@@ -1873,16 +1873,16 @@ le.write = function(r, t, e, i, a, f) {
|
|
|
1873
1873
|
function $t(c) {
|
|
1874
1874
|
return c !== c;
|
|
1875
1875
|
}
|
|
1876
|
-
var
|
|
1876
|
+
var Zr = function() {
|
|
1877
1877
|
for (var c = "0123456789abcdef", n = new Array(256), o = 0; o < 16; ++o)
|
|
1878
1878
|
for (var l = o * 16, p = 0; p < 16; ++p)
|
|
1879
1879
|
n[l + p] = c[o] + c[p];
|
|
1880
1880
|
return n;
|
|
1881
1881
|
}();
|
|
1882
|
-
})(
|
|
1882
|
+
})(le);
|
|
1883
1883
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
1884
1884
|
(function(r, t) {
|
|
1885
|
-
var e =
|
|
1885
|
+
var e = le, i = e.Buffer;
|
|
1886
1886
|
function a(u, s) {
|
|
1887
1887
|
for (var h in u)
|
|
1888
1888
|
s[h] = u[h];
|
|
@@ -1909,14 +1909,14 @@ le.write = function(r, t, e, i, a, f) {
|
|
|
1909
1909
|
throw new TypeError("Argument must be a number");
|
|
1910
1910
|
return e.SlowBuffer(u);
|
|
1911
1911
|
};
|
|
1912
|
-
})(
|
|
1913
|
-
var
|
|
1914
|
-
return
|
|
1915
|
-
}, lt = TypeError,
|
|
1912
|
+
})(oe, oe.exports);
|
|
1913
|
+
var pe = oe.exports, Gn = {}.toString, qn = Array.isArray || function(r) {
|
|
1914
|
+
return Gn.call(r) == "[object Array]";
|
|
1915
|
+
}, lt = TypeError, dr = Object, zn = Error, Hn = EvalError, Wn = RangeError, Vn = ReferenceError, gr = SyntaxError, Jn = URIError, Yn = Math.abs, Xn = Math.floor, Kn = Math.max, Zn = Math.min, Qn = Math.pow, ti = Math.round, ei = Number.isNaN || function(t) {
|
|
1916
1916
|
return t !== t;
|
|
1917
|
-
},
|
|
1918
|
-
return
|
|
1919
|
-
},
|
|
1917
|
+
}, ri = ei, ni = function(t) {
|
|
1918
|
+
return ri(t) || t === 0 ? t : t < 0 ? -1 : 1;
|
|
1919
|
+
}, ii = Object.getOwnPropertyDescriptor, bt = ii;
|
|
1920
1920
|
if (bt)
|
|
1921
1921
|
try {
|
|
1922
1922
|
bt([], "length");
|
|
@@ -1930,9 +1930,9 @@ if (vt)
|
|
|
1930
1930
|
} catch {
|
|
1931
1931
|
vt = !1;
|
|
1932
1932
|
}
|
|
1933
|
-
var It = vt, Ot,
|
|
1934
|
-
function
|
|
1935
|
-
return
|
|
1933
|
+
var It = vt, Ot, ke;
|
|
1934
|
+
function wr() {
|
|
1935
|
+
return ke || (ke = 1, Ot = function() {
|
|
1936
1936
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
1937
1937
|
return !1;
|
|
1938
1938
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -1960,73 +1960,77 @@ function dr() {
|
|
|
1960
1960
|
return !0;
|
|
1961
1961
|
}), Ot;
|
|
1962
1962
|
}
|
|
1963
|
-
var kt,
|
|
1964
|
-
function
|
|
1965
|
-
if (
|
|
1966
|
-
|
|
1967
|
-
var r = typeof Symbol < "u" && Symbol, t =
|
|
1963
|
+
var kt, Re;
|
|
1964
|
+
function oi() {
|
|
1965
|
+
if (Re) return kt;
|
|
1966
|
+
Re = 1;
|
|
1967
|
+
var r = typeof Symbol < "u" && Symbol, t = wr();
|
|
1968
1968
|
return kt = function() {
|
|
1969
1969
|
return typeof r != "function" || typeof Symbol != "function" || typeof r("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : t();
|
|
1970
1970
|
}, kt;
|
|
1971
1971
|
}
|
|
1972
|
-
var Rt,
|
|
1973
|
-
function
|
|
1974
|
-
return
|
|
1972
|
+
var Rt, je;
|
|
1973
|
+
function mr() {
|
|
1974
|
+
return je || (je = 1, Rt = typeof Reflect < "u" && Reflect.getPrototypeOf || null), Rt;
|
|
1975
1975
|
}
|
|
1976
|
-
var jt,
|
|
1977
|
-
function
|
|
1978
|
-
if (
|
|
1979
|
-
|
|
1980
|
-
var r =
|
|
1976
|
+
var jt, Ce;
|
|
1977
|
+
function br() {
|
|
1978
|
+
if (Ce) return jt;
|
|
1979
|
+
Ce = 1;
|
|
1980
|
+
var r = dr;
|
|
1981
1981
|
return jt = r.getPrototypeOf || null, jt;
|
|
1982
1982
|
}
|
|
1983
|
-
var
|
|
1983
|
+
var ai = "Function.prototype.bind called on incompatible ", si = Object.prototype.toString, fi = Math.max, ci = "[object Function]", De = function(t, e) {
|
|
1984
1984
|
for (var i = [], a = 0; a < t.length; a += 1)
|
|
1985
1985
|
i[a] = t[a];
|
|
1986
1986
|
for (var f = 0; f < e.length; f += 1)
|
|
1987
1987
|
i[f + t.length] = e[f];
|
|
1988
1988
|
return i;
|
|
1989
|
-
},
|
|
1989
|
+
}, ui = function(t, e) {
|
|
1990
1990
|
for (var i = [], a = e, f = 0; a < t.length; a += 1, f += 1)
|
|
1991
1991
|
i[f] = t[a];
|
|
1992
1992
|
return i;
|
|
1993
|
-
},
|
|
1993
|
+
}, li = function(r, t) {
|
|
1994
1994
|
for (var e = "", i = 0; i < r.length; i += 1)
|
|
1995
1995
|
e += r[i], i + 1 < r.length && (e += t);
|
|
1996
1996
|
return e;
|
|
1997
|
-
},
|
|
1997
|
+
}, hi = function(t) {
|
|
1998
1998
|
var e = this;
|
|
1999
|
-
if (typeof e != "function" ||
|
|
2000
|
-
throw new TypeError(
|
|
2001
|
-
for (var i =
|
|
1999
|
+
if (typeof e != "function" || si.apply(e) !== ci)
|
|
2000
|
+
throw new TypeError(ai + e);
|
|
2001
|
+
for (var i = ui(arguments, 1), a, f = function() {
|
|
2002
2002
|
if (this instanceof a) {
|
|
2003
2003
|
var y = e.apply(
|
|
2004
2004
|
this,
|
|
2005
|
-
|
|
2005
|
+
De(i, arguments)
|
|
2006
2006
|
);
|
|
2007
2007
|
return Object(y) === y ? y : this;
|
|
2008
2008
|
}
|
|
2009
2009
|
return e.apply(
|
|
2010
2010
|
t,
|
|
2011
|
-
|
|
2011
|
+
De(i, arguments)
|
|
2012
2012
|
);
|
|
2013
|
-
}, u =
|
|
2013
|
+
}, u = fi(0, e.length - i.length), s = [], h = 0; h < u; h++)
|
|
2014
2014
|
s[h] = "$" + h;
|
|
2015
|
-
if (a = Function("binder", "return function (" +
|
|
2015
|
+
if (a = Function("binder", "return function (" + li(s, ",") + "){ return binder.apply(this,arguments); }")(f), e.prototype) {
|
|
2016
2016
|
var d = function() {
|
|
2017
2017
|
};
|
|
2018
2018
|
d.prototype = e.prototype, a.prototype = new d(), d.prototype = null;
|
|
2019
2019
|
}
|
|
2020
2020
|
return a;
|
|
2021
|
-
},
|
|
2021
|
+
}, pi = hi, pt = Function.prototype.bind || pi, ye = Function.prototype.call, Ct, Ne;
|
|
2022
|
+
function de() {
|
|
2023
|
+
return Ne || (Ne = 1, Ct = Function.prototype.apply), Ct;
|
|
2024
|
+
}
|
|
2025
|
+
var yi = typeof Reflect < "u" && Reflect && Reflect.apply, di = pt, gi = de(), wi = ye, mi = yi, vr = mi || di.call(wi, gi), bi = pt, vi = lt, Ei = ye, xi = vr, ge = function(t) {
|
|
2022
2026
|
if (t.length < 1 || typeof t[0] != "function")
|
|
2023
|
-
throw new
|
|
2024
|
-
return
|
|
2025
|
-
},
|
|
2026
|
-
function
|
|
2027
|
-
if (
|
|
2028
|
-
|
|
2029
|
-
var r =
|
|
2027
|
+
throw new vi("a function is required");
|
|
2028
|
+
return xi(bi, Ei, t);
|
|
2029
|
+
}, Dt, Me;
|
|
2030
|
+
function Ai() {
|
|
2031
|
+
if (Me) return Dt;
|
|
2032
|
+
Me = 1;
|
|
2033
|
+
var r = ge, t = ht, e;
|
|
2030
2034
|
try {
|
|
2031
2035
|
e = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
2032
2036
|
[].__proto__ === Array.prototype;
|
|
@@ -2039,19 +2043,19 @@ function Ei() {
|
|
|
2039
2043
|
/** @type {keyof typeof Object.prototype} */
|
|
2040
2044
|
"__proto__"
|
|
2041
2045
|
), a = Object, f = a.getPrototypeOf;
|
|
2042
|
-
return
|
|
2046
|
+
return Dt = i && typeof i.get == "function" ? r([i.get]) : typeof f == "function" ? (
|
|
2043
2047
|
/** @type {import('./get')} */
|
|
2044
2048
|
function(s) {
|
|
2045
2049
|
return f(s == null ? s : a(s));
|
|
2046
2050
|
}
|
|
2047
|
-
) : !1,
|
|
2048
|
-
}
|
|
2049
|
-
var
|
|
2050
|
-
function
|
|
2051
|
-
if (
|
|
2052
|
-
|
|
2053
|
-
var r =
|
|
2054
|
-
return
|
|
2051
|
+
) : !1, Dt;
|
|
2052
|
+
}
|
|
2053
|
+
var Nt, Le;
|
|
2054
|
+
function Er() {
|
|
2055
|
+
if (Le) return Nt;
|
|
2056
|
+
Le = 1;
|
|
2057
|
+
var r = mr(), t = br(), e = Ai();
|
|
2058
|
+
return Nt = r ? function(a) {
|
|
2055
2059
|
return r(a);
|
|
2056
2060
|
} : t ? function(a) {
|
|
2057
2061
|
if (!a || typeof a != "object" && typeof a != "function")
|
|
@@ -2059,33 +2063,33 @@ function br() {
|
|
|
2059
2063
|
return t(a);
|
|
2060
2064
|
} : e ? function(a) {
|
|
2061
2065
|
return e(a);
|
|
2062
|
-
} : null,
|
|
2066
|
+
} : null, Nt;
|
|
2063
2067
|
}
|
|
2064
|
-
var
|
|
2065
|
-
function
|
|
2066
|
-
if (
|
|
2067
|
-
|
|
2068
|
+
var Mt, Ge;
|
|
2069
|
+
function Bi() {
|
|
2070
|
+
if (Ge) return Mt;
|
|
2071
|
+
Ge = 1;
|
|
2068
2072
|
var r = Function.prototype.call, t = Object.prototype.hasOwnProperty, e = pt;
|
|
2069
|
-
return
|
|
2073
|
+
return Mt = e.call(r, t), Mt;
|
|
2070
2074
|
}
|
|
2071
|
-
var A,
|
|
2075
|
+
var A, Si = dr, Ii = zn, _i = Hn, Fi = Wn, Ui = Vn, et = gr, tt = lt, $i = Jn, Pi = Yn, Ti = Xn, Oi = Kn, ki = Zn, Ri = Qn, ji = ti, Ci = ni, xr = Function, Lt = function(r) {
|
|
2072
2076
|
try {
|
|
2073
|
-
return
|
|
2077
|
+
return xr('"use strict"; return (' + r + ").constructor;")();
|
|
2074
2078
|
} catch {
|
|
2075
2079
|
}
|
|
2076
|
-
}, at = ht,
|
|
2080
|
+
}, at = ht, Di = It, Gt = function() {
|
|
2077
2081
|
throw new tt();
|
|
2078
|
-
},
|
|
2082
|
+
}, Ni = at ? function() {
|
|
2079
2083
|
try {
|
|
2080
|
-
return arguments.callee,
|
|
2084
|
+
return arguments.callee, Gt;
|
|
2081
2085
|
} catch {
|
|
2082
2086
|
try {
|
|
2083
2087
|
return at(arguments, "callee").get;
|
|
2084
2088
|
} catch {
|
|
2085
|
-
return
|
|
2089
|
+
return Gt;
|
|
2086
2090
|
}
|
|
2087
2091
|
}
|
|
2088
|
-
}() :
|
|
2092
|
+
}() : Gt, Z = oi()(), R = Er(), Mi = br(), Li = mr(), Ar = de(), yt = ye, Q = {}, Gi = typeof Uint8Array > "u" || !R ? A : R(Uint8Array), Y = {
|
|
2089
2093
|
__proto__: null,
|
|
2090
2094
|
"%AggregateError%": typeof AggregateError > "u" ? A : AggregateError,
|
|
2091
2095
|
"%Array%": Array,
|
|
@@ -2107,15 +2111,15 @@ var A, Ai = pr, Bi = Gn, Si = qn, Ii = zn, _i = Hn, et = yr, tt = lt, Fi = Wn, U
|
|
|
2107
2111
|
"%decodeURIComponent%": decodeURIComponent,
|
|
2108
2112
|
"%encodeURI%": encodeURI,
|
|
2109
2113
|
"%encodeURIComponent%": encodeURIComponent,
|
|
2110
|
-
"%Error%":
|
|
2114
|
+
"%Error%": Ii,
|
|
2111
2115
|
"%eval%": eval,
|
|
2112
2116
|
// eslint-disable-line no-eval
|
|
2113
|
-
"%EvalError%":
|
|
2117
|
+
"%EvalError%": _i,
|
|
2114
2118
|
"%Float16Array%": typeof Float16Array > "u" ? A : Float16Array,
|
|
2115
2119
|
"%Float32Array%": typeof Float32Array > "u" ? A : Float32Array,
|
|
2116
2120
|
"%Float64Array%": typeof Float64Array > "u" ? A : Float64Array,
|
|
2117
2121
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? A : FinalizationRegistry,
|
|
2118
|
-
"%Function%":
|
|
2122
|
+
"%Function%": xr,
|
|
2119
2123
|
"%GeneratorFunction%": Q,
|
|
2120
2124
|
"%Int8Array%": typeof Int8Array > "u" ? A : Int8Array,
|
|
2121
2125
|
"%Int16Array%": typeof Int16Array > "u" ? A : Int16Array,
|
|
@@ -2128,14 +2132,14 @@ var A, Ai = pr, Bi = Gn, Si = qn, Ii = zn, _i = Hn, et = yr, tt = lt, Fi = Wn, U
|
|
|
2128
2132
|
"%MapIteratorPrototype%": typeof Map > "u" || !Z || !R ? A : R((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
2129
2133
|
"%Math%": Math,
|
|
2130
2134
|
"%Number%": Number,
|
|
2131
|
-
"%Object%":
|
|
2135
|
+
"%Object%": Si,
|
|
2132
2136
|
"%Object.getOwnPropertyDescriptor%": at,
|
|
2133
2137
|
"%parseFloat%": parseFloat,
|
|
2134
2138
|
"%parseInt%": parseInt,
|
|
2135
2139
|
"%Promise%": typeof Promise > "u" ? A : Promise,
|
|
2136
2140
|
"%Proxy%": typeof Proxy > "u" ? A : Proxy,
|
|
2137
|
-
"%RangeError%":
|
|
2138
|
-
"%ReferenceError%":
|
|
2141
|
+
"%RangeError%": Fi,
|
|
2142
|
+
"%ReferenceError%": Ui,
|
|
2139
2143
|
"%Reflect%": typeof Reflect > "u" ? A : Reflect,
|
|
2140
2144
|
"%RegExp%": RegExp,
|
|
2141
2145
|
"%Set%": typeof Set > "u" ? A : Set,
|
|
@@ -2145,45 +2149,45 @@ var A, Ai = pr, Bi = Gn, Si = qn, Ii = zn, _i = Hn, et = yr, tt = lt, Fi = Wn, U
|
|
|
2145
2149
|
"%StringIteratorPrototype%": Z && R ? R(""[Symbol.iterator]()) : A,
|
|
2146
2150
|
"%Symbol%": Z ? Symbol : A,
|
|
2147
2151
|
"%SyntaxError%": et,
|
|
2148
|
-
"%ThrowTypeError%":
|
|
2149
|
-
"%TypedArray%":
|
|
2152
|
+
"%ThrowTypeError%": Ni,
|
|
2153
|
+
"%TypedArray%": Gi,
|
|
2150
2154
|
"%TypeError%": tt,
|
|
2151
2155
|
"%Uint8Array%": typeof Uint8Array > "u" ? A : Uint8Array,
|
|
2152
2156
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? A : Uint8ClampedArray,
|
|
2153
2157
|
"%Uint16Array%": typeof Uint16Array > "u" ? A : Uint16Array,
|
|
2154
2158
|
"%Uint32Array%": typeof Uint32Array > "u" ? A : Uint32Array,
|
|
2155
|
-
"%URIError%":
|
|
2159
|
+
"%URIError%": $i,
|
|
2156
2160
|
"%WeakMap%": typeof WeakMap > "u" ? A : WeakMap,
|
|
2157
2161
|
"%WeakRef%": typeof WeakRef > "u" ? A : WeakRef,
|
|
2158
2162
|
"%WeakSet%": typeof WeakSet > "u" ? A : WeakSet,
|
|
2159
2163
|
"%Function.prototype.call%": yt,
|
|
2160
|
-
"%Function.prototype.apply%":
|
|
2161
|
-
"%Object.defineProperty%":
|
|
2162
|
-
"%Object.getPrototypeOf%":
|
|
2163
|
-
"%Math.abs%":
|
|
2164
|
-
"%Math.floor%":
|
|
2165
|
-
"%Math.max%":
|
|
2166
|
-
"%Math.min%":
|
|
2167
|
-
"%Math.pow%":
|
|
2168
|
-
"%Math.round%":
|
|
2169
|
-
"%Math.sign%":
|
|
2170
|
-
"%Reflect.getPrototypeOf%":
|
|
2164
|
+
"%Function.prototype.apply%": Ar,
|
|
2165
|
+
"%Object.defineProperty%": Di,
|
|
2166
|
+
"%Object.getPrototypeOf%": Mi,
|
|
2167
|
+
"%Math.abs%": Pi,
|
|
2168
|
+
"%Math.floor%": Ti,
|
|
2169
|
+
"%Math.max%": Oi,
|
|
2170
|
+
"%Math.min%": ki,
|
|
2171
|
+
"%Math.pow%": Ri,
|
|
2172
|
+
"%Math.round%": ji,
|
|
2173
|
+
"%Math.sign%": Ci,
|
|
2174
|
+
"%Reflect.getPrototypeOf%": Li
|
|
2171
2175
|
};
|
|
2172
2176
|
if (R)
|
|
2173
2177
|
try {
|
|
2174
2178
|
null.error;
|
|
2175
2179
|
} catch (r) {
|
|
2176
|
-
var
|
|
2177
|
-
Y["%Error.prototype%"] =
|
|
2180
|
+
var qi = R(R(r));
|
|
2181
|
+
Y["%Error.prototype%"] = qi;
|
|
2178
2182
|
}
|
|
2179
|
-
var
|
|
2183
|
+
var zi = function r(t) {
|
|
2180
2184
|
var e;
|
|
2181
2185
|
if (t === "%AsyncFunction%")
|
|
2182
|
-
e =
|
|
2186
|
+
e = Lt("async function () {}");
|
|
2183
2187
|
else if (t === "%GeneratorFunction%")
|
|
2184
|
-
e =
|
|
2188
|
+
e = Lt("function* () {}");
|
|
2185
2189
|
else if (t === "%AsyncGeneratorFunction%")
|
|
2186
|
-
e =
|
|
2190
|
+
e = Lt("async function* () {}");
|
|
2187
2191
|
else if (t === "%AsyncGenerator%") {
|
|
2188
2192
|
var i = r("%AsyncGeneratorFunction%");
|
|
2189
2193
|
i && (e = i.prototype);
|
|
@@ -2192,7 +2196,7 @@ var Gi = function r(t) {
|
|
|
2192
2196
|
a && R && (e = R(a.prototype));
|
|
2193
2197
|
}
|
|
2194
2198
|
return Y[t] = e, e;
|
|
2195
|
-
},
|
|
2199
|
+
}, qe = {
|
|
2196
2200
|
__proto__: null,
|
|
2197
2201
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
2198
2202
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
@@ -2245,21 +2249,21 @@ var Gi = function r(t) {
|
|
|
2245
2249
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2246
2250
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2247
2251
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2248
|
-
}, dt = pt, xt =
|
|
2252
|
+
}, dt = pt, xt = Bi(), Hi = dt.call(yt, Array.prototype.concat), Wi = dt.call(Ar, Array.prototype.splice), ze = dt.call(yt, String.prototype.replace), At = dt.call(yt, String.prototype.slice), Vi = dt.call(yt, RegExp.prototype.exec), Ji = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Yi = /\\(\\)?/g, Xi = function(t) {
|
|
2249
2253
|
var e = At(t, 0, 1), i = At(t, -1);
|
|
2250
2254
|
if (e === "%" && i !== "%")
|
|
2251
2255
|
throw new et("invalid intrinsic syntax, expected closing `%`");
|
|
2252
2256
|
if (i === "%" && e !== "%")
|
|
2253
2257
|
throw new et("invalid intrinsic syntax, expected opening `%`");
|
|
2254
2258
|
var a = [];
|
|
2255
|
-
return
|
|
2256
|
-
a[a.length] = s ?
|
|
2259
|
+
return ze(t, Ji, function(f, u, s, h) {
|
|
2260
|
+
a[a.length] = s ? ze(h, Yi, "$1") : u || f;
|
|
2257
2261
|
}), a;
|
|
2258
|
-
},
|
|
2262
|
+
}, Ki = function(t, e) {
|
|
2259
2263
|
var i = t, a;
|
|
2260
|
-
if (xt(
|
|
2264
|
+
if (xt(qe, i) && (a = qe[i], i = "%" + a[0] + "%"), xt(Y, i)) {
|
|
2261
2265
|
var f = Y[i];
|
|
2262
|
-
if (f === Q && (f =
|
|
2266
|
+
if (f === Q && (f = zi(i)), typeof f > "u" && !e)
|
|
2263
2267
|
throw new tt("intrinsic " + t + " exists, but is not available. Please file an issue!");
|
|
2264
2268
|
return {
|
|
2265
2269
|
alias: a,
|
|
@@ -2268,15 +2272,15 @@ var Gi = function r(t) {
|
|
|
2268
2272
|
};
|
|
2269
2273
|
}
|
|
2270
2274
|
throw new et("intrinsic " + t + " does not exist!");
|
|
2271
|
-
},
|
|
2275
|
+
}, Br = function(t, e) {
|
|
2272
2276
|
if (typeof t != "string" || t.length === 0)
|
|
2273
2277
|
throw new tt("intrinsic name must be a non-empty string");
|
|
2274
2278
|
if (arguments.length > 1 && typeof e != "boolean")
|
|
2275
2279
|
throw new tt('"allowMissing" argument must be a boolean');
|
|
2276
|
-
if (
|
|
2280
|
+
if (Vi(/^%?[^%]*%?$/, t) === null)
|
|
2277
2281
|
throw new et("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
2278
|
-
var i =
|
|
2279
|
-
d && (a = d[0],
|
|
2282
|
+
var i = Xi(t), a = i.length > 0 ? i[0] : "", f = Ki("%" + a + "%", e), u = f.name, s = f.value, h = !1, d = f.alias;
|
|
2283
|
+
d && (a = d[0], Wi(i, Hi([0, 1], d)));
|
|
2280
2284
|
for (var y = 1, g = !0; y < i.length; y += 1) {
|
|
2281
2285
|
var m = i[y], v = At(m, 0, 1), F = At(m, -1);
|
|
2282
2286
|
if ((v === '"' || v === "'" || v === "`" || F === '"' || F === "'" || F === "`") && v !== F)
|
|
@@ -2298,19 +2302,19 @@ var Gi = function r(t) {
|
|
|
2298
2302
|
}
|
|
2299
2303
|
}
|
|
2300
2304
|
return s;
|
|
2301
|
-
},
|
|
2305
|
+
}, Sr = Br, Ir = ge, Zi = Ir([Sr("%String.prototype.indexOf%")]), _r = function(t, e) {
|
|
2302
2306
|
var i = (
|
|
2303
2307
|
/** @type {(this: unknown, ...args: unknown[]) => unknown} */
|
|
2304
|
-
|
|
2308
|
+
Sr(t, !!e)
|
|
2305
2309
|
);
|
|
2306
|
-
return typeof i == "function" &&
|
|
2310
|
+
return typeof i == "function" && Zi(t, ".prototype.") > -1 ? Ir(
|
|
2307
2311
|
/** @type {const} */
|
|
2308
2312
|
[i]
|
|
2309
2313
|
) : i;
|
|
2310
|
-
},
|
|
2311
|
-
function
|
|
2312
|
-
if (
|
|
2313
|
-
|
|
2314
|
+
}, qt, He;
|
|
2315
|
+
function Qi() {
|
|
2316
|
+
if (He) return qt;
|
|
2317
|
+
He = 1;
|
|
2314
2318
|
var r = Function.prototype.toString, t = typeof Reflect == "object" && Reflect !== null && Reflect.apply, e, i;
|
|
2315
2319
|
if (typeof t == "function" && typeof Object.defineProperty == "function")
|
|
2316
2320
|
try {
|
|
@@ -2354,7 +2358,7 @@ function Ki() {
|
|
|
2354
2358
|
return !1;
|
|
2355
2359
|
});
|
|
2356
2360
|
}
|
|
2357
|
-
return
|
|
2361
|
+
return qt = t ? function(E) {
|
|
2358
2362
|
if (B(E))
|
|
2359
2363
|
return !0;
|
|
2360
2364
|
if (!E || typeof E != "function" && typeof E != "object")
|
|
@@ -2377,13 +2381,13 @@ function Ki() {
|
|
|
2377
2381
|
return !1;
|
|
2378
2382
|
var P = s.call(E);
|
|
2379
2383
|
return P !== d && P !== y && !/^\[object HTML/.test(P) ? !1 : u(E);
|
|
2380
|
-
},
|
|
2384
|
+
}, qt;
|
|
2381
2385
|
}
|
|
2382
|
-
var
|
|
2383
|
-
function
|
|
2384
|
-
if (
|
|
2385
|
-
|
|
2386
|
-
var r =
|
|
2386
|
+
var zt, We;
|
|
2387
|
+
function to() {
|
|
2388
|
+
if (We) return zt;
|
|
2389
|
+
We = 1;
|
|
2390
|
+
var r = Qi(), t = Object.prototype.toString, e = Object.prototype.hasOwnProperty, i = function(h, d, y) {
|
|
2387
2391
|
for (var g = 0, m = h.length; g < m; g++)
|
|
2388
2392
|
e.call(h, g) && (y == null ? d(h[g], g, h) : d.call(y, h[g], g, h));
|
|
2389
2393
|
}, a = function(h, d, y) {
|
|
@@ -2396,16 +2400,16 @@ function Zi() {
|
|
|
2396
2400
|
function u(s) {
|
|
2397
2401
|
return t.call(s) === "[object Array]";
|
|
2398
2402
|
}
|
|
2399
|
-
return
|
|
2403
|
+
return zt = function(h, d, y) {
|
|
2400
2404
|
if (!r(d))
|
|
2401
2405
|
throw new TypeError("iterator must be a function");
|
|
2402
2406
|
var g;
|
|
2403
2407
|
arguments.length >= 3 && (g = y), u(h) ? i(h, d, g) : typeof h == "string" ? a(h, d, g) : f(h, d, g);
|
|
2404
|
-
},
|
|
2408
|
+
}, zt;
|
|
2405
2409
|
}
|
|
2406
|
-
var
|
|
2407
|
-
function
|
|
2408
|
-
return
|
|
2410
|
+
var Ht, Ve;
|
|
2411
|
+
function eo() {
|
|
2412
|
+
return Ve || (Ve = 1, Ht = [
|
|
2409
2413
|
"Float16Array",
|
|
2410
2414
|
"Float32Array",
|
|
2411
2415
|
"Float64Array",
|
|
@@ -2418,25 +2422,25 @@ function Qi() {
|
|
|
2418
2422
|
"Uint32Array",
|
|
2419
2423
|
"BigInt64Array",
|
|
2420
2424
|
"BigUint64Array"
|
|
2421
|
-
]),
|
|
2425
|
+
]), Ht;
|
|
2422
2426
|
}
|
|
2423
|
-
var
|
|
2424
|
-
function
|
|
2425
|
-
if (
|
|
2426
|
-
|
|
2427
|
-
var r =
|
|
2428
|
-
return
|
|
2427
|
+
var Wt, Je;
|
|
2428
|
+
function ro() {
|
|
2429
|
+
if (Je) return Wt;
|
|
2430
|
+
Je = 1;
|
|
2431
|
+
var r = eo(), t = typeof globalThis > "u" ? pr : globalThis;
|
|
2432
|
+
return Wt = function() {
|
|
2429
2433
|
for (var i = [], a = 0; a < r.length; a++)
|
|
2430
2434
|
typeof t[r[a]] == "function" && (i[i.length] = r[a]);
|
|
2431
2435
|
return i;
|
|
2432
|
-
},
|
|
2436
|
+
}, Wt;
|
|
2433
2437
|
}
|
|
2434
|
-
var
|
|
2435
|
-
function
|
|
2436
|
-
if (
|
|
2437
|
-
|
|
2438
|
-
var r = It, t =
|
|
2439
|
-
return
|
|
2438
|
+
var Vt = { exports: {} }, Jt, Ye;
|
|
2439
|
+
function no() {
|
|
2440
|
+
if (Ye) return Jt;
|
|
2441
|
+
Ye = 1;
|
|
2442
|
+
var r = It, t = gr, e = lt, i = ht;
|
|
2443
|
+
return Jt = function(f, u, s) {
|
|
2440
2444
|
if (!f || typeof f != "object" && typeof f != "function")
|
|
2441
2445
|
throw new e("`obj` must be an object or a function`");
|
|
2442
2446
|
if (typeof u != "string" && typeof u != "symbol")
|
|
@@ -2461,12 +2465,12 @@ function eo() {
|
|
|
2461
2465
|
f[u] = s;
|
|
2462
2466
|
else
|
|
2463
2467
|
throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
2464
|
-
},
|
|
2468
|
+
}, Jt;
|
|
2465
2469
|
}
|
|
2466
|
-
var
|
|
2467
|
-
function
|
|
2468
|
-
if (
|
|
2469
|
-
|
|
2470
|
+
var Yt, Xe;
|
|
2471
|
+
function io() {
|
|
2472
|
+
if (Xe) return Yt;
|
|
2473
|
+
Xe = 1;
|
|
2470
2474
|
var r = It, t = function() {
|
|
2471
2475
|
return !!r;
|
|
2472
2476
|
};
|
|
@@ -2478,14 +2482,14 @@ function ro() {
|
|
|
2478
2482
|
} catch {
|
|
2479
2483
|
return !0;
|
|
2480
2484
|
}
|
|
2481
|
-
},
|
|
2485
|
+
}, Yt = t, Yt;
|
|
2482
2486
|
}
|
|
2483
|
-
var
|
|
2484
|
-
function
|
|
2485
|
-
if (
|
|
2486
|
-
|
|
2487
|
-
var r =
|
|
2488
|
-
return
|
|
2487
|
+
var Xt, Ke;
|
|
2488
|
+
function oo() {
|
|
2489
|
+
if (Ke) return Xt;
|
|
2490
|
+
Ke = 1;
|
|
2491
|
+
var r = Br, t = no(), e = io()(), i = ht, a = lt, f = r("%Math.floor%");
|
|
2492
|
+
return Xt = function(s, h) {
|
|
2489
2493
|
if (typeof s != "function")
|
|
2490
2494
|
throw new a("`fn` is not a function");
|
|
2491
2495
|
if (typeof h != "number" || h < 0 || h > 4294967295 || f(h) !== h)
|
|
@@ -2508,21 +2512,21 @@ function no() {
|
|
|
2508
2512
|
"length",
|
|
2509
2513
|
h
|
|
2510
2514
|
)), s;
|
|
2511
|
-
},
|
|
2515
|
+
}, Xt;
|
|
2512
2516
|
}
|
|
2513
|
-
var
|
|
2514
|
-
function
|
|
2515
|
-
if (
|
|
2516
|
-
|
|
2517
|
-
var r = pt, t =
|
|
2518
|
-
return
|
|
2517
|
+
var Kt, Ze;
|
|
2518
|
+
function ao() {
|
|
2519
|
+
if (Ze) return Kt;
|
|
2520
|
+
Ze = 1;
|
|
2521
|
+
var r = pt, t = de(), e = vr;
|
|
2522
|
+
return Kt = function() {
|
|
2519
2523
|
return e(r, t, arguments);
|
|
2520
|
-
},
|
|
2524
|
+
}, Kt;
|
|
2521
2525
|
}
|
|
2522
|
-
var
|
|
2523
|
-
function
|
|
2524
|
-
return
|
|
2525
|
-
var t =
|
|
2526
|
+
var Qe;
|
|
2527
|
+
function so() {
|
|
2528
|
+
return Qe || (Qe = 1, function(r) {
|
|
2529
|
+
var t = oo(), e = It, i = ge, a = ao();
|
|
2526
2530
|
r.exports = function(u) {
|
|
2527
2531
|
var s = i(arguments), h = u.length - (arguments.length - 1);
|
|
2528
2532
|
return t(
|
|
@@ -2531,22 +2535,22 @@ function oo() {
|
|
|
2531
2535
|
!0
|
|
2532
2536
|
);
|
|
2533
2537
|
}, e ? e(r.exports, "apply", { value: a }) : r.exports.apply = a;
|
|
2534
|
-
}(
|
|
2538
|
+
}(Vt)), Vt.exports;
|
|
2535
2539
|
}
|
|
2536
|
-
var
|
|
2537
|
-
function
|
|
2538
|
-
if (
|
|
2539
|
-
|
|
2540
|
-
var r =
|
|
2541
|
-
return
|
|
2540
|
+
var Zt, tr;
|
|
2541
|
+
function fo() {
|
|
2542
|
+
if (tr) return Zt;
|
|
2543
|
+
tr = 1;
|
|
2544
|
+
var r = wr();
|
|
2545
|
+
return Zt = function() {
|
|
2542
2546
|
return r() && !!Symbol.toStringTag;
|
|
2543
|
-
},
|
|
2547
|
+
}, Zt;
|
|
2544
2548
|
}
|
|
2545
|
-
var
|
|
2546
|
-
function
|
|
2547
|
-
if (
|
|
2548
|
-
|
|
2549
|
-
var r =
|
|
2549
|
+
var Qt, er;
|
|
2550
|
+
function co() {
|
|
2551
|
+
if (er) return Qt;
|
|
2552
|
+
er = 1;
|
|
2553
|
+
var r = to(), t = ro(), e = so(), i = _r, a = ht, f = Er(), u = i("Object.prototype.toString"), s = fo()(), h = typeof globalThis > "u" ? pr : globalThis, d = t(), y = i("String.prototype.slice"), g = i("Array.prototype.indexOf", !0) || function(B, x) {
|
|
2550
2554
|
for (var _ = 0; _ < B.length; _ += 1)
|
|
2551
2555
|
if (B[_] === x)
|
|
2552
2556
|
return _;
|
|
@@ -2602,7 +2606,7 @@ function so() {
|
|
|
2602
2606
|
}
|
|
2603
2607
|
), x;
|
|
2604
2608
|
};
|
|
2605
|
-
return
|
|
2609
|
+
return Qt = function(B) {
|
|
2606
2610
|
if (!B || typeof B != "object")
|
|
2607
2611
|
return !1;
|
|
2608
2612
|
if (!s) {
|
|
@@ -2610,36 +2614,36 @@ function so() {
|
|
|
2610
2614
|
return g(d, x) > -1 ? x : x !== "Object" ? !1 : F(B);
|
|
2611
2615
|
}
|
|
2612
2616
|
return a ? v(B) : null;
|
|
2613
|
-
},
|
|
2617
|
+
}, Qt;
|
|
2614
2618
|
}
|
|
2615
|
-
var
|
|
2616
|
-
function
|
|
2617
|
-
if (
|
|
2618
|
-
|
|
2619
|
-
var r =
|
|
2620
|
-
return
|
|
2619
|
+
var te, rr;
|
|
2620
|
+
function uo() {
|
|
2621
|
+
if (rr) return te;
|
|
2622
|
+
rr = 1;
|
|
2623
|
+
var r = co();
|
|
2624
|
+
return te = function(e) {
|
|
2621
2625
|
return !!r(e);
|
|
2622
|
-
},
|
|
2626
|
+
}, te;
|
|
2623
2627
|
}
|
|
2624
|
-
var
|
|
2625
|
-
if (!
|
|
2626
|
-
throw new
|
|
2628
|
+
var lo = lt, ho = _r, po = ho("TypedArray.prototype.buffer", !0), yo = uo(), go = po || function(t) {
|
|
2629
|
+
if (!yo(t))
|
|
2630
|
+
throw new lo("Not a Typed Array");
|
|
2627
2631
|
return t.buffer;
|
|
2628
|
-
}, G =
|
|
2632
|
+
}, G = pe.Buffer, wo = qn, mo = go, bo = ArrayBuffer.isView || function(t) {
|
|
2629
2633
|
try {
|
|
2630
|
-
return
|
|
2634
|
+
return mo(t), !0;
|
|
2631
2635
|
} catch {
|
|
2632
2636
|
return !1;
|
|
2633
2637
|
}
|
|
2634
|
-
},
|
|
2638
|
+
}, vo = typeof Uint8Array < "u", Fr = typeof ArrayBuffer < "u" && typeof Uint8Array < "u", Eo = Fr && (G.prototype instanceof Uint8Array || G.TYPED_ARRAY_SUPPORT), xo = function(t, e) {
|
|
2635
2639
|
if (G.isBuffer(t))
|
|
2636
2640
|
return t.constructor && !("isBuffer" in t) ? G.from(t) : t;
|
|
2637
2641
|
if (typeof t == "string")
|
|
2638
2642
|
return G.from(t, e);
|
|
2639
|
-
if (
|
|
2643
|
+
if (Fr && bo(t)) {
|
|
2640
2644
|
if (t.byteLength === 0)
|
|
2641
2645
|
return G.alloc(0);
|
|
2642
|
-
if (
|
|
2646
|
+
if (Eo) {
|
|
2643
2647
|
var i = G.from(t.buffer, t.byteOffset, t.byteLength);
|
|
2644
2648
|
if (i.byteLength === t.byteLength)
|
|
2645
2649
|
return i;
|
|
@@ -2648,9 +2652,9 @@ var co = lt, uo = Sr, lo = uo("TypedArray.prototype.buffer", !0), ho = fo(), po
|
|
|
2648
2652
|
if (f.length === t.byteLength)
|
|
2649
2653
|
return f;
|
|
2650
2654
|
}
|
|
2651
|
-
if (
|
|
2655
|
+
if (vo && t instanceof Uint8Array)
|
|
2652
2656
|
return G.from(t);
|
|
2653
|
-
var u =
|
|
2657
|
+
var u = wo(t);
|
|
2654
2658
|
if (u)
|
|
2655
2659
|
for (var s = 0; s < t.length; s += 1) {
|
|
2656
2660
|
var h = t[s];
|
|
@@ -2660,12 +2664,12 @@ var co = lt, uo = Sr, lo = uo("TypedArray.prototype.buffer", !0), ho = fo(), po
|
|
|
2660
2664
|
if (u || G.isBuffer(t) && t.constructor && typeof t.constructor.isBuffer == "function" && t.constructor.isBuffer(t))
|
|
2661
2665
|
return G.from(t);
|
|
2662
2666
|
throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.');
|
|
2663
|
-
},
|
|
2667
|
+
}, Ao = pe.Buffer, Bo = xo;
|
|
2664
2668
|
function _t(r, t) {
|
|
2665
|
-
this._block =
|
|
2669
|
+
this._block = Ao.alloc(r), this._finalSize = t, this._blockSize = r, this._len = 0;
|
|
2666
2670
|
}
|
|
2667
2671
|
_t.prototype.update = function(r, t) {
|
|
2668
|
-
r =
|
|
2672
|
+
r = Bo(r, t || "utf8");
|
|
2669
2673
|
for (var e = this._block, i = this._blockSize, a = r.length, f = this._len, u = 0; u < a; ) {
|
|
2670
2674
|
for (var s = f % i, h = Math.min(a - u, i - s), d = 0; d < h; d++)
|
|
2671
2675
|
e[s + d] = r[u + d];
|
|
@@ -2690,73 +2694,73 @@ _t.prototype.digest = function(r) {
|
|
|
2690
2694
|
_t.prototype._update = function() {
|
|
2691
2695
|
throw new Error("_update must be implemented by subclass");
|
|
2692
2696
|
};
|
|
2693
|
-
var
|
|
2697
|
+
var So = _t, Io = On, Ur = So, _o = pe.Buffer, Fo = [
|
|
2694
2698
|
1518500249,
|
|
2695
2699
|
1859775393,
|
|
2696
2700
|
-1894007588,
|
|
2697
2701
|
-899497514
|
|
2698
|
-
],
|
|
2702
|
+
], Uo = new Array(80);
|
|
2699
2703
|
function gt() {
|
|
2700
|
-
this.init(), this._w =
|
|
2704
|
+
this.init(), this._w = Uo, Ur.call(this, 64, 56);
|
|
2701
2705
|
}
|
|
2702
|
-
|
|
2706
|
+
Io(gt, Ur);
|
|
2703
2707
|
gt.prototype.init = function() {
|
|
2704
2708
|
return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
|
|
2705
2709
|
};
|
|
2706
|
-
function
|
|
2710
|
+
function $o(r) {
|
|
2707
2711
|
return r << 1 | r >>> 31;
|
|
2708
2712
|
}
|
|
2709
|
-
function
|
|
2713
|
+
function Po(r) {
|
|
2710
2714
|
return r << 5 | r >>> 27;
|
|
2711
2715
|
}
|
|
2712
|
-
function
|
|
2716
|
+
function To(r) {
|
|
2713
2717
|
return r << 30 | r >>> 2;
|
|
2714
2718
|
}
|
|
2715
|
-
function
|
|
2719
|
+
function Oo(r, t, e, i) {
|
|
2716
2720
|
return r === 0 ? t & e | ~t & i : r === 2 ? t & e | t & i | e & i : t ^ e ^ i;
|
|
2717
2721
|
}
|
|
2718
2722
|
gt.prototype._update = function(r) {
|
|
2719
2723
|
for (var t = this._w, e = this._a | 0, i = this._b | 0, a = this._c | 0, f = this._d | 0, u = this._e | 0, s = 0; s < 16; ++s)
|
|
2720
2724
|
t[s] = r.readInt32BE(s * 4);
|
|
2721
2725
|
for (; s < 80; ++s)
|
|
2722
|
-
t[s] =
|
|
2726
|
+
t[s] = $o(t[s - 3] ^ t[s - 8] ^ t[s - 14] ^ t[s - 16]);
|
|
2723
2727
|
for (var h = 0; h < 80; ++h) {
|
|
2724
|
-
var d = ~~(h / 20), y =
|
|
2725
|
-
u = f, f = a, a =
|
|
2728
|
+
var d = ~~(h / 20), y = Po(e) + Oo(d, i, a, f) + u + t[h] + Fo[d] | 0;
|
|
2729
|
+
u = f, f = a, a = To(i), i = e, e = y;
|
|
2726
2730
|
}
|
|
2727
2731
|
this._a = e + this._a | 0, this._b = i + this._b | 0, this._c = a + this._c | 0, this._d = f + this._d | 0, this._e = u + this._e | 0;
|
|
2728
2732
|
};
|
|
2729
2733
|
gt.prototype._hash = function() {
|
|
2730
|
-
var r =
|
|
2734
|
+
var r = _o.allocUnsafe(20);
|
|
2731
2735
|
return r.writeInt32BE(this._a | 0, 0), r.writeInt32BE(this._b | 0, 4), r.writeInt32BE(this._c | 0, 8), r.writeInt32BE(this._d | 0, 12), r.writeInt32BE(this._e | 0, 16), r;
|
|
2732
2736
|
};
|
|
2733
|
-
var
|
|
2734
|
-
const
|
|
2735
|
-
function
|
|
2737
|
+
var ko = gt;
|
|
2738
|
+
const Ro = /* @__PURE__ */ Tn(ko);
|
|
2739
|
+
function jo(r) {
|
|
2736
2740
|
let t = "";
|
|
2737
2741
|
for (const e of new Uint8Array(r))
|
|
2738
2742
|
e < 16 && (t += "0"), t += e.toString(16);
|
|
2739
2743
|
return t;
|
|
2740
2744
|
}
|
|
2741
|
-
let
|
|
2745
|
+
let ee = null;
|
|
2742
2746
|
async function Bt(r) {
|
|
2743
|
-
return
|
|
2747
|
+
return ee === null && (ee = await Do()), ee ? $r(r) : Co(r);
|
|
2744
2748
|
}
|
|
2745
|
-
function
|
|
2746
|
-
return new
|
|
2749
|
+
function Co(r) {
|
|
2750
|
+
return new Ro().update(r).digest("hex");
|
|
2747
2751
|
}
|
|
2748
|
-
async function
|
|
2752
|
+
async function $r(r) {
|
|
2749
2753
|
const t = await crypto.subtle.digest("SHA-1", r);
|
|
2750
|
-
return
|
|
2754
|
+
return jo(t);
|
|
2751
2755
|
}
|
|
2752
|
-
async function
|
|
2756
|
+
async function Do() {
|
|
2753
2757
|
try {
|
|
2754
|
-
if (await
|
|
2758
|
+
if (await $r(new Uint8Array([])) === "da39a3ee5e6b4b0d3255bfef95601890afd80709") return !0;
|
|
2755
2759
|
} catch {
|
|
2756
2760
|
}
|
|
2757
2761
|
return !1;
|
|
2758
2762
|
}
|
|
2759
|
-
function
|
|
2763
|
+
function No(r) {
|
|
2760
2764
|
const t = [];
|
|
2761
2765
|
let e = 0, i = 0;
|
|
2762
2766
|
do {
|
|
@@ -2766,7 +2770,7 @@ function Co(r) {
|
|
|
2766
2770
|
} while (i);
|
|
2767
2771
|
return t.reduce((a, f) => a + 1 << 7 | f, -1);
|
|
2768
2772
|
}
|
|
2769
|
-
function
|
|
2773
|
+
function Mo(r, t) {
|
|
2770
2774
|
let e = t, i = 4, a = null;
|
|
2771
2775
|
do
|
|
2772
2776
|
a = r.readUInt8(), e |= (a & 127) << i, i += 7;
|
|
@@ -2819,7 +2823,7 @@ class rt {
|
|
|
2819
2823
|
7: "ref-delta"
|
|
2820
2824
|
}, f = {}, u = t.slice(-20).toString("hex"), s = [], h = {}, d = /* @__PURE__ */ new Map();
|
|
2821
2825
|
let y = null, g = null;
|
|
2822
|
-
await
|
|
2826
|
+
await Un([t], async ({ data: B, type: x, reference: _, offset: E, num: P }) => {
|
|
2823
2827
|
y === null && (y = P);
|
|
2824
2828
|
const C = Math.floor(
|
|
2825
2829
|
(y - P) * 100 / y
|
|
@@ -2841,7 +2845,7 @@ class rt {
|
|
|
2841
2845
|
});
|
|
2842
2846
|
const m = Object.keys(f).map(Number);
|
|
2843
2847
|
for (const [B, x] of m.entries()) {
|
|
2844
|
-
const _ = B + 1 === m.length ? t.byteLength - 20 : m[B + 1], E = f[x], P =
|
|
2848
|
+
const _ = B + 1 === m.length ? t.byteLength - 20 : m[B + 1], E = f[x], P = en.buf(t.slice(x, _)) >>> 0;
|
|
2845
2849
|
E.end = _, E.crc = P;
|
|
2846
2850
|
}
|
|
2847
2851
|
const v = new rt({
|
|
@@ -2869,7 +2873,7 @@ class rt {
|
|
|
2869
2873
|
v.readDepth = 0, v.externalReadDepth = 0;
|
|
2870
2874
|
const { type: E, object: P } = await v.readSlice({ start: B });
|
|
2871
2875
|
$[v.readDepth] += 1;
|
|
2872
|
-
const C = await Bt(
|
|
2876
|
+
const C = await Bt(_n.wrap({ type: E, object: P }));
|
|
2873
2877
|
_.oid = C, s.push(C), d.set(C, B), h[C] = _.crc;
|
|
2874
2878
|
} catch {
|
|
2875
2879
|
continue;
|
|
@@ -2940,10 +2944,10 @@ class rt {
|
|
|
2940
2944
|
throw new I("Unrecognized type: 0b" + u.toString(2));
|
|
2941
2945
|
const h = f & 15;
|
|
2942
2946
|
let d = h;
|
|
2943
|
-
f & 128 && (d =
|
|
2947
|
+
f & 128 && (d = Mo(a, h));
|
|
2944
2948
|
let g = null, m = null;
|
|
2945
2949
|
if (s === "ofs_delta") {
|
|
2946
|
-
const F =
|
|
2950
|
+
const F = No(a), $ = t - F;
|
|
2947
2951
|
({ object: g, type: s } = await this.readSlice({ start: $ }));
|
|
2948
2952
|
}
|
|
2949
2953
|
if (s === "ref_delta") {
|
|
@@ -2951,11 +2955,11 @@ class rt {
|
|
|
2951
2955
|
({ object: g, type: s } = await this.read({ oid: F }));
|
|
2952
2956
|
}
|
|
2953
2957
|
const v = i.slice(a.tell());
|
|
2954
|
-
if (m = Buffer.from(await
|
|
2958
|
+
if (m = Buffer.from(await Pn(v)), m.byteLength !== d)
|
|
2955
2959
|
throw new I(
|
|
2956
2960
|
`Packfile told us object would have length ${d} but it had length ${m.byteLength}`
|
|
2957
2961
|
);
|
|
2958
|
-
return g && (m = Buffer.from(
|
|
2962
|
+
return g && (m = Buffer.from(Fn(m, g))), this.readDepth > 3 && (this.offsetCache[t] = { type: s, object: m }), { type: s, format: "content", object: m };
|
|
2959
2963
|
}
|
|
2960
2964
|
}
|
|
2961
2965
|
class st extends nt {
|
|
@@ -2981,27 +2985,27 @@ class Ft extends nt {
|
|
|
2981
2985
|
}
|
|
2982
2986
|
}
|
|
2983
2987
|
Ft.code = "ObjectTypeError";
|
|
2984
|
-
function
|
|
2988
|
+
function Lo(r) {
|
|
2985
2989
|
let t = r > 0 ? r >> 12 : 0;
|
|
2986
2990
|
t !== 4 && t !== 8 && t !== 10 && t !== 14 && (t = 8);
|
|
2987
2991
|
let e = r & 511;
|
|
2988
2992
|
return e & 73 ? e = 493 : e = 420, t !== 8 && (e = 0), (t << 12) + e;
|
|
2989
2993
|
}
|
|
2990
2994
|
const z = 2 ** 32;
|
|
2991
|
-
function
|
|
2995
|
+
function nr(r, t, e, i) {
|
|
2992
2996
|
if (r !== void 0 && t !== void 0)
|
|
2993
2997
|
return [r, t];
|
|
2994
2998
|
e === void 0 && (e = i.valueOf());
|
|
2995
2999
|
const a = Math.floor(e / 1e3), f = (e - a * 1e3) * 1e6;
|
|
2996
3000
|
return [a, f];
|
|
2997
3001
|
}
|
|
2998
|
-
function
|
|
2999
|
-
const [t, e] =
|
|
3002
|
+
function ir(r) {
|
|
3003
|
+
const [t, e] = nr(
|
|
3000
3004
|
r.ctimeSeconds,
|
|
3001
3005
|
r.ctimeNanoseconds,
|
|
3002
3006
|
r.ctimeMs,
|
|
3003
3007
|
r.ctime
|
|
3004
|
-
), [i, a] =
|
|
3008
|
+
), [i, a] = nr(
|
|
3005
3009
|
r.mtimeSeconds,
|
|
3006
3010
|
r.mtimeNanoseconds,
|
|
3007
3011
|
r.mtimeMs,
|
|
@@ -3014,7 +3018,7 @@ function rr(r) {
|
|
|
3014
3018
|
mtimeNanoseconds: a % z,
|
|
3015
3019
|
dev: r.dev % z,
|
|
3016
3020
|
ino: r.ino % z,
|
|
3017
|
-
mode:
|
|
3021
|
+
mode: Lo(r.mode % z),
|
|
3018
3022
|
uid: r.uid % z,
|
|
3019
3023
|
gid: r.gid % z,
|
|
3020
3024
|
// size of -1 happens over a BrowserFS HTTP Backend that doesn't serve Content-Length headers
|
|
@@ -3022,7 +3026,7 @@ function rr(r) {
|
|
|
3022
3026
|
size: r.size > -1 ? r.size % z : 0
|
|
3023
3027
|
};
|
|
3024
3028
|
}
|
|
3025
|
-
function
|
|
3029
|
+
function Go(r) {
|
|
3026
3030
|
return {
|
|
3027
3031
|
assumeValid: !!(r & 32768),
|
|
3028
3032
|
extended: !!(r & 16384),
|
|
@@ -3030,7 +3034,7 @@ function Mo(r) {
|
|
|
3030
3034
|
nameLength: r & 4095
|
|
3031
3035
|
};
|
|
3032
3036
|
}
|
|
3033
|
-
function
|
|
3037
|
+
function qo(r) {
|
|
3034
3038
|
const t = r.flags;
|
|
3035
3039
|
return t.extended = !1, t.nameLength = Math.min(Buffer.from(r.path).length, 4095), (t.assumeValid ? 32768 : 0) + (t.extended ? 16384 : 0) + ((t.stage & 3) << 12) + (t.nameLength & 4095);
|
|
3036
3040
|
}
|
|
@@ -3077,7 +3081,7 @@ class J {
|
|
|
3077
3081
|
const y = {};
|
|
3078
3082
|
y.ctimeSeconds = i.readUInt32BE(), y.ctimeNanoseconds = i.readUInt32BE(), y.mtimeSeconds = i.readUInt32BE(), y.mtimeNanoseconds = i.readUInt32BE(), y.dev = i.readUInt32BE(), y.ino = i.readUInt32BE(), y.mode = i.readUInt32BE(), y.uid = i.readUInt32BE(), y.gid = i.readUInt32BE(), y.size = i.readUInt32BE(), y.oid = i.slice(20).toString("hex");
|
|
3079
3083
|
const g = i.readUInt16BE();
|
|
3080
|
-
y.flags =
|
|
3084
|
+
y.flags = Go(g);
|
|
3081
3085
|
const m = t.indexOf(0, i.tell() + 1) - i.tell();
|
|
3082
3086
|
if (m < 1)
|
|
3083
3087
|
throw new I(`Got a path length of: ${m}`);
|
|
@@ -3101,7 +3105,7 @@ class J {
|
|
|
3101
3105
|
return [...this._unmergedPaths];
|
|
3102
3106
|
}
|
|
3103
3107
|
get entries() {
|
|
3104
|
-
return [...this._entries.values()].sort(
|
|
3108
|
+
return [...this._entries.values()].sort(lr);
|
|
3105
3109
|
}
|
|
3106
3110
|
get entriesMap() {
|
|
3107
3111
|
return this._entries;
|
|
@@ -3125,7 +3129,7 @@ class J {
|
|
|
3125
3129
|
uid: 0,
|
|
3126
3130
|
gid: 0,
|
|
3127
3131
|
size: 0
|
|
3128
|
-
}), e =
|
|
3132
|
+
}), e = ir(e);
|
|
3129
3133
|
const f = Buffer.from(t), u = {
|
|
3130
3134
|
ctimeSeconds: e.ctimeSeconds,
|
|
3131
3135
|
ctimeNanoseconds: e.ctimeNanoseconds,
|
|
@@ -3171,8 +3175,8 @@ class J {
|
|
|
3171
3175
|
`);
|
|
3172
3176
|
}
|
|
3173
3177
|
static async _entryToBuffer(t) {
|
|
3174
|
-
const e = Buffer.from(t.path), i = Math.ceil((62 + e.length + 1) / 8) * 8, a = Buffer.alloc(i), f = new H(a), u =
|
|
3175
|
-
return f.writeUInt32BE(u.ctimeSeconds), f.writeUInt32BE(u.ctimeNanoseconds), f.writeUInt32BE(u.mtimeSeconds), f.writeUInt32BE(u.mtimeNanoseconds), f.writeUInt32BE(u.dev), f.writeUInt32BE(u.ino), f.writeUInt32BE(u.mode), f.writeUInt32BE(u.uid), f.writeUInt32BE(u.gid), f.writeUInt32BE(u.size), f.write(t.oid, 20, "hex"), f.writeUInt16BE(
|
|
3178
|
+
const e = Buffer.from(t.path), i = Math.ceil((62 + e.length + 1) / 8) * 8, a = Buffer.alloc(i), f = new H(a), u = ir(t);
|
|
3179
|
+
return f.writeUInt32BE(u.ctimeSeconds), f.writeUInt32BE(u.ctimeNanoseconds), f.writeUInt32BE(u.mtimeSeconds), f.writeUInt32BE(u.mtimeNanoseconds), f.writeUInt32BE(u.dev), f.writeUInt32BE(u.ino), f.writeUInt32BE(u.mode), f.writeUInt32BE(u.uid), f.writeUInt32BE(u.gid), f.writeUInt32BE(u.size), f.write(t.oid, 20, "hex"), f.writeUInt16BE(qo(t)), f.write(t.path, e.length, "utf8"), a;
|
|
3176
3180
|
}
|
|
3177
3181
|
async toObject() {
|
|
3178
3182
|
const t = Buffer.alloc(12), e = new H(t);
|
|
@@ -3187,8 +3191,8 @@ class J {
|
|
|
3187
3191
|
return Buffer.concat([f, Buffer.from(u, "hex")]);
|
|
3188
3192
|
}
|
|
3189
3193
|
}
|
|
3190
|
-
async function
|
|
3191
|
-
const e =
|
|
3194
|
+
async function Pr(r, t) {
|
|
3195
|
+
const e = fr(r);
|
|
3192
3196
|
for (; ; ) {
|
|
3193
3197
|
const { value: i, done: a } = await e.next();
|
|
3194
3198
|
if (i && await t(i), a) break;
|
|
@@ -3198,7 +3202,7 @@ async function Ur(r, t) {
|
|
|
3198
3202
|
async function ft(r) {
|
|
3199
3203
|
let t = 0;
|
|
3200
3204
|
const e = [];
|
|
3201
|
-
await
|
|
3205
|
+
await Pr(r, (f) => {
|
|
3202
3206
|
e.push(f), t += f.byteLength;
|
|
3203
3207
|
});
|
|
3204
3208
|
const i = new Uint8Array(t);
|
|
@@ -3207,7 +3211,7 @@ async function ft(r) {
|
|
|
3207
3211
|
i.set(f, a), a += f.byteLength;
|
|
3208
3212
|
return i;
|
|
3209
3213
|
}
|
|
3210
|
-
class
|
|
3214
|
+
class re {
|
|
3211
3215
|
constructor() {
|
|
3212
3216
|
this._queue = [];
|
|
3213
3217
|
}
|
|
@@ -3243,9 +3247,9 @@ class ee {
|
|
|
3243
3247
|
});
|
|
3244
3248
|
}
|
|
3245
3249
|
}
|
|
3246
|
-
class
|
|
3250
|
+
class zo {
|
|
3247
3251
|
static demux(t) {
|
|
3248
|
-
const e = j.streamReader(t), i = new
|
|
3252
|
+
const e = j.streamReader(t), i = new re(), a = new re(), f = new re(), u = async function() {
|
|
3249
3253
|
const s = await e();
|
|
3250
3254
|
if (s === null) return u();
|
|
3251
3255
|
if (s === !0) {
|
|
@@ -3345,11 +3349,11 @@ class Go {
|
|
|
3345
3349
|
// return output
|
|
3346
3350
|
// }
|
|
3347
3351
|
}
|
|
3348
|
-
async function
|
|
3349
|
-
const { packetlines: t, packfile: e, progress: i } =
|
|
3352
|
+
async function Tr(r) {
|
|
3353
|
+
const { packetlines: t, packfile: e, progress: i } = zo.demux(r), a = [], f = [], u = [];
|
|
3350
3354
|
let s = !1, h = !1;
|
|
3351
3355
|
return new Promise((d, y) => {
|
|
3352
|
-
|
|
3356
|
+
Pr(t, (g) => {
|
|
3353
3357
|
const m = g.toString("utf8").trim();
|
|
3354
3358
|
if (m.startsWith("shallow")) {
|
|
3355
3359
|
const v = m.slice(-41).trim();
|
|
@@ -3367,12 +3371,12 @@ async function $r(r) {
|
|
|
3367
3371
|
});
|
|
3368
3372
|
});
|
|
3369
3373
|
}
|
|
3370
|
-
typeof globalThis.Buffer > "u" && (globalThis.Buffer =
|
|
3371
|
-
async function
|
|
3372
|
-
const a = await
|
|
3374
|
+
typeof globalThis.Buffer > "u" && (globalThis.Buffer = le.Buffer);
|
|
3375
|
+
async function xa(r, t, e, i) {
|
|
3376
|
+
const a = await kr(r, t), f = await Yo(a.idx, t, e), u = e.map((m) => f[m].oid), s = u.length > 0 ? await Xo(r, u) : null, h = {};
|
|
3373
3377
|
if (await Promise.all(
|
|
3374
3378
|
e.map(async (m) => {
|
|
3375
|
-
s && (h[m] = await
|
|
3379
|
+
s && (h[m] = await Rr(
|
|
3376
3380
|
s.idx,
|
|
3377
3381
|
f[m].oid
|
|
3378
3382
|
));
|
|
@@ -3401,27 +3405,27 @@ async function va(r, t, e, i) {
|
|
|
3401
3405
|
files: h,
|
|
3402
3406
|
packfiles: d,
|
|
3403
3407
|
objects: [
|
|
3404
|
-
...await
|
|
3405
|
-
...await
|
|
3408
|
+
...await or(a),
|
|
3409
|
+
...await or(s)
|
|
3406
3410
|
],
|
|
3407
3411
|
fileOids: g
|
|
3408
3412
|
};
|
|
3409
3413
|
}
|
|
3410
|
-
const
|
|
3411
|
-
async function
|
|
3412
|
-
const e = await
|
|
3413
|
-
return i != null && i.object ?
|
|
3414
|
+
const Ho = /^[0-9a-f]{40}$/i;
|
|
3415
|
+
async function Aa(r, t) {
|
|
3416
|
+
const e = await kr(r, t), i = await Jo(e.idx, t);
|
|
3417
|
+
return i != null && i.object ? Or(i) : [];
|
|
3414
3418
|
}
|
|
3415
|
-
async function
|
|
3416
|
-
const e = await
|
|
3419
|
+
async function Ba(r, t) {
|
|
3420
|
+
const e = await Vo(r, t);
|
|
3417
3421
|
if (e.resolvedOid)
|
|
3418
3422
|
return e.resolvedOid;
|
|
3419
|
-
const i = await
|
|
3423
|
+
const i = await ae(r, e.refname);
|
|
3420
3424
|
if (!i)
|
|
3421
3425
|
throw new Error(`Git ref "${e.refname}" not found at ${r}`);
|
|
3422
3426
|
return i;
|
|
3423
3427
|
}
|
|
3424
|
-
function
|
|
3428
|
+
function Or(r) {
|
|
3425
3429
|
return r.object.map((t) => {
|
|
3426
3430
|
if (t.type === "blob")
|
|
3427
3431
|
return {
|
|
@@ -3432,11 +3436,11 @@ function Pr(r) {
|
|
|
3432
3436
|
return {
|
|
3433
3437
|
name: t.path,
|
|
3434
3438
|
type: "folder",
|
|
3435
|
-
children:
|
|
3439
|
+
children: Or(t)
|
|
3436
3440
|
};
|
|
3437
3441
|
}).filter((t) => !!(t != null && t.name));
|
|
3438
3442
|
}
|
|
3439
|
-
async function
|
|
3443
|
+
async function Wo(r, t) {
|
|
3440
3444
|
const e = Buffer.from(
|
|
3441
3445
|
await ft([
|
|
3442
3446
|
j.encode(`command=ls-refs
|
|
@@ -3462,13 +3466,13 @@ async function zo(r, t) {
|
|
|
3462
3466
|
},
|
|
3463
3467
|
body: e
|
|
3464
3468
|
}), a = {};
|
|
3465
|
-
for await (const f of
|
|
3469
|
+
for await (const f of Ko(i)) {
|
|
3466
3470
|
const u = f.indexOf(" "), s = f.slice(0, u), d = f.slice(u + 1, f.length - 1).split(" ")[0];
|
|
3467
3471
|
a[d] = s;
|
|
3468
3472
|
}
|
|
3469
3473
|
return a;
|
|
3470
3474
|
}
|
|
3471
|
-
async function
|
|
3475
|
+
async function Vo(r, t) {
|
|
3472
3476
|
switch (t.type ?? "infer") {
|
|
3473
3477
|
case "commit":
|
|
3474
3478
|
return {
|
|
@@ -3503,20 +3507,20 @@ async function Ho(r, t) {
|
|
|
3503
3507
|
kind: "refname",
|
|
3504
3508
|
refname: i
|
|
3505
3509
|
};
|
|
3506
|
-
if (
|
|
3510
|
+
if (Ho.test(i))
|
|
3507
3511
|
return {
|
|
3508
3512
|
kind: "commit",
|
|
3509
3513
|
refname: i,
|
|
3510
3514
|
resolvedOid: i
|
|
3511
3515
|
};
|
|
3512
|
-
const a = `refs/heads/${i}`, f = await
|
|
3516
|
+
const a = `refs/heads/${i}`, f = await ae(r, a);
|
|
3513
3517
|
if (f)
|
|
3514
3518
|
return {
|
|
3515
3519
|
kind: "refname",
|
|
3516
3520
|
refname: a,
|
|
3517
3521
|
resolvedOid: f
|
|
3518
3522
|
};
|
|
3519
|
-
const u = `refs/tags/${i}`, s = await
|
|
3523
|
+
const u = `refs/tags/${i}`, s = await ae(r, u);
|
|
3520
3524
|
if (s)
|
|
3521
3525
|
return {
|
|
3522
3526
|
kind: "refname",
|
|
@@ -3529,8 +3533,8 @@ async function Ho(r, t) {
|
|
|
3529
3533
|
throw new Error(`Invalid ref type: ${t.type}`);
|
|
3530
3534
|
}
|
|
3531
3535
|
}
|
|
3532
|
-
async function
|
|
3533
|
-
const e = await
|
|
3536
|
+
async function ae(r, t) {
|
|
3537
|
+
const e = await Wo(r, t), i = [t, `${t}^{}`];
|
|
3534
3538
|
for (const a of i) {
|
|
3535
3539
|
const f = a.trim();
|
|
3536
3540
|
if (f in e)
|
|
@@ -3538,7 +3542,7 @@ async function oe(r, t) {
|
|
|
3538
3542
|
}
|
|
3539
3543
|
return null;
|
|
3540
3544
|
}
|
|
3541
|
-
async function
|
|
3545
|
+
async function kr(r, t) {
|
|
3542
3546
|
const e = Buffer.from(
|
|
3543
3547
|
await ft([
|
|
3544
3548
|
j.encode(
|
|
@@ -3565,7 +3569,7 @@ async function Tr(r, t) {
|
|
|
3565
3569
|
"Content-Length": `${e.length}`
|
|
3566
3570
|
},
|
|
3567
3571
|
body: e
|
|
3568
|
-
}), a =
|
|
3572
|
+
}), a = jr(i.body), f = await Tr(a), u = Buffer.from(await ft(f.packfile)), s = await rt.fromPack({
|
|
3569
3573
|
pack: u
|
|
3570
3574
|
}), h = s.read;
|
|
3571
3575
|
return s.read = async function({ oid: d, ...y }) {
|
|
@@ -3577,7 +3581,7 @@ async function Tr(r, t) {
|
|
|
3577
3581
|
promisor: !0
|
|
3578
3582
|
};
|
|
3579
3583
|
}
|
|
3580
|
-
async function
|
|
3584
|
+
async function Jo(r, t) {
|
|
3581
3585
|
const e = await r.read({
|
|
3582
3586
|
oid: t
|
|
3583
3587
|
});
|
|
@@ -3591,7 +3595,7 @@ async function Wo(r, t) {
|
|
|
3591
3595
|
}
|
|
3592
3596
|
return i;
|
|
3593
3597
|
}
|
|
3594
|
-
async function
|
|
3598
|
+
async function or(r) {
|
|
3595
3599
|
if (!r)
|
|
3596
3600
|
return [];
|
|
3597
3601
|
const t = [], e = /* @__PURE__ */ new Set();
|
|
@@ -3610,7 +3614,7 @@ async function nr(r) {
|
|
|
3610
3614
|
}
|
|
3611
3615
|
return t;
|
|
3612
3616
|
}
|
|
3613
|
-
async function
|
|
3617
|
+
async function Yo(r, t, e) {
|
|
3614
3618
|
const i = await r.read({
|
|
3615
3619
|
oid: t
|
|
3616
3620
|
});
|
|
@@ -3642,7 +3646,7 @@ async function Vo(r, t, e) {
|
|
|
3642
3646
|
}
|
|
3643
3647
|
return f;
|
|
3644
3648
|
}
|
|
3645
|
-
async function
|
|
3649
|
+
async function Xo(r, t) {
|
|
3646
3650
|
const e = Buffer.from(
|
|
3647
3651
|
await ft([
|
|
3648
3652
|
...t.map(
|
|
@@ -3663,7 +3667,7 @@ async function Jo(r, t) {
|
|
|
3663
3667
|
"Content-Length": `${e.length}`
|
|
3664
3668
|
},
|
|
3665
3669
|
body: e
|
|
3666
|
-
}), a =
|
|
3670
|
+
}), a = jr(i.body), f = await Tr(a), u = Buffer.from(await ft(f.packfile));
|
|
3667
3671
|
return u.byteLength === 0 ? {
|
|
3668
3672
|
idx: await rt.fromPack({
|
|
3669
3673
|
pack: u
|
|
@@ -3678,7 +3682,7 @@ async function Jo(r, t) {
|
|
|
3678
3682
|
promisor: !1
|
|
3679
3683
|
};
|
|
3680
3684
|
}
|
|
3681
|
-
async function
|
|
3685
|
+
async function Rr(r, t) {
|
|
3682
3686
|
const e = await r.read({ oid: t });
|
|
3683
3687
|
if (X(e), e.type === "blob")
|
|
3684
3688
|
return e.object;
|
|
@@ -3687,7 +3691,7 @@ async function Or(r, t) {
|
|
|
3687
3691
|
if (u === "blob") {
|
|
3688
3692
|
const s = await r.read({ oid: f });
|
|
3689
3693
|
X(s), i[a] = s.object;
|
|
3690
|
-
} else u === "tree" && (i[a] = await
|
|
3694
|
+
} else u === "tree" && (i[a] = await Rr(r, f));
|
|
3691
3695
|
return i;
|
|
3692
3696
|
}
|
|
3693
3697
|
function X(r) {
|
|
@@ -3697,7 +3701,7 @@ function X(r) {
|
|
|
3697
3701
|
r.object = M.from(r.object).parse();
|
|
3698
3702
|
break;
|
|
3699
3703
|
case "tree":
|
|
3700
|
-
r.object =
|
|
3704
|
+
r.object = ue.from(r.object).entries();
|
|
3701
3705
|
break;
|
|
3702
3706
|
case "blob":
|
|
3703
3707
|
r.object = new Uint8Array(r.object), r.format = "content";
|
|
@@ -3713,7 +3717,7 @@ function X(r) {
|
|
|
3713
3717
|
);
|
|
3714
3718
|
}
|
|
3715
3719
|
}
|
|
3716
|
-
async function*
|
|
3720
|
+
async function* Ko(r) {
|
|
3717
3721
|
const t = await r.text();
|
|
3718
3722
|
let e = 0;
|
|
3719
3723
|
for (; e <= t.length; ) {
|
|
@@ -3723,7 +3727,7 @@ async function* Yo(r) {
|
|
|
3723
3727
|
yield t.substring(e + 4, e + i), e += i;
|
|
3724
3728
|
}
|
|
3725
3729
|
}
|
|
3726
|
-
function
|
|
3730
|
+
function jr(r) {
|
|
3727
3731
|
if (r[Symbol.asyncIterator])
|
|
3728
3732
|
return r;
|
|
3729
3733
|
const t = r.getReader();
|
|
@@ -3742,8 +3746,8 @@ function kr(r) {
|
|
|
3742
3746
|
function ct(r) {
|
|
3743
3747
|
return r instanceof Uint8Array, Uint8Array.from(r);
|
|
3744
3748
|
}
|
|
3745
|
-
const
|
|
3746
|
-
async function
|
|
3749
|
+
const Zo = ce.deflate, Qo = /^[0-9a-f]{40}$/i;
|
|
3750
|
+
async function ta(r) {
|
|
3747
3751
|
const t = {}, e = new TextEncoder();
|
|
3748
3752
|
return await Promise.all(
|
|
3749
3753
|
r.map(async ({ oid: i, type: a, body: f }) => {
|
|
@@ -3751,12 +3755,12 @@ async function Zo(r) {
|
|
|
3751
3755
|
return;
|
|
3752
3756
|
const u = e.encode(`${a} ${f.length}\0`), s = new Uint8Array(u.length + f.length);
|
|
3753
3757
|
s.set(u, 0), s.set(f, u.length);
|
|
3754
|
-
const h = await
|
|
3758
|
+
const h = await Zo(s), d = i.slice(0, 2), y = i.slice(2);
|
|
3755
3759
|
t[`.git/objects/${d}/${y}`] = h;
|
|
3756
3760
|
})
|
|
3757
3761
|
), t;
|
|
3758
3762
|
}
|
|
3759
|
-
function
|
|
3763
|
+
function ea(r, t, e) {
|
|
3760
3764
|
const i = (r == null ? void 0 : r.trim()) ?? "";
|
|
3761
3765
|
let a = null;
|
|
3762
3766
|
switch (t) {
|
|
@@ -3773,7 +3777,7 @@ function Qo(r, t, e) {
|
|
|
3773
3777
|
a = null;
|
|
3774
3778
|
break;
|
|
3775
3779
|
default:
|
|
3776
|
-
i.startsWith("refs/") ? a = i :
|
|
3780
|
+
i.startsWith("refs/") ? a = i : Qo.test(i) ? a = null : i && i !== "HEAD" && (a = `refs/heads/${i}`);
|
|
3777
3781
|
break;
|
|
3778
3782
|
}
|
|
3779
3783
|
const f = a ? `ref: ${a}
|
|
@@ -3786,7 +3790,7 @@ function Qo(r, t, e) {
|
|
|
3786
3790
|
tagName: d
|
|
3787
3791
|
};
|
|
3788
3792
|
}
|
|
3789
|
-
function
|
|
3793
|
+
function ra(r, {
|
|
3790
3794
|
branchName: t,
|
|
3791
3795
|
partialCloneFilter: e
|
|
3792
3796
|
}) {
|
|
@@ -3811,7 +3815,7 @@ function ta(r, {
|
|
|
3811
3815
|
`) + `
|
|
3812
3816
|
`;
|
|
3813
3817
|
}
|
|
3814
|
-
async function
|
|
3818
|
+
async function Sa({
|
|
3815
3819
|
repoUrl: r,
|
|
3816
3820
|
commitHash: t,
|
|
3817
3821
|
ref: e,
|
|
@@ -3820,8 +3824,8 @@ async function Aa({
|
|
|
3820
3824
|
fileOids: f,
|
|
3821
3825
|
pathPrefix: u
|
|
3822
3826
|
}) {
|
|
3823
|
-
const s = {}, h =
|
|
3824
|
-
s[".git/HEAD"] = h.headContent, s[".git/config"] =
|
|
3827
|
+
const s = {}, h = ea(e, i, t);
|
|
3828
|
+
s[".git/HEAD"] = h.headContent, s[".git/config"] = ra(r, {
|
|
3825
3829
|
branchName: h.branchName
|
|
3826
3830
|
}), s[".git/description"] = `WordPress Playground clone
|
|
3827
3831
|
`, s[".git/shallow"] = `${t}
|
|
@@ -3830,7 +3834,7 @@ async function Aa({
|
|
|
3830
3834
|
`, s[`.git/refs/remotes/origin/${h.branchName}`] = `${t}
|
|
3831
3835
|
`, s[".git/refs/remotes/origin/HEAD"] = `ref: refs/remotes/origin/${h.branchName}
|
|
3832
3836
|
`), h.tagName && (s[`.git/refs/tags/${h.tagName}`] = `${t}
|
|
3833
|
-
`), Object.assign(s, await
|
|
3837
|
+
`), Object.assign(s, await ta(a));
|
|
3834
3838
|
const d = new J();
|
|
3835
3839
|
for (const [g, m] of Object.entries(f)) {
|
|
3836
3840
|
const v = g.substring(u.length).replace(/^\/+/, "");
|
|
@@ -3855,8 +3859,8 @@ async function Aa({
|
|
|
3855
3859
|
const y = await d.toObject();
|
|
3856
3860
|
return s[".git/index"] = Uint8Array.from(y), s;
|
|
3857
3861
|
}
|
|
3858
|
-
function
|
|
3859
|
-
t =
|
|
3862
|
+
function Ia(r, t) {
|
|
3863
|
+
t = fe(t);
|
|
3860
3864
|
const e = ["", ".", "/"].includes(t);
|
|
3861
3865
|
let i = r;
|
|
3862
3866
|
if (e)
|
|
@@ -3885,10 +3889,10 @@ function Ba(r, t) {
|
|
|
3885
3889
|
}
|
|
3886
3890
|
return a;
|
|
3887
3891
|
}
|
|
3888
|
-
function
|
|
3892
|
+
function _a(r, t) {
|
|
3889
3893
|
return r.startsWith(t) ? r.substring(t.length) : r;
|
|
3890
3894
|
}
|
|
3891
|
-
class
|
|
3895
|
+
class Fa {
|
|
3892
3896
|
constructor(t) {
|
|
3893
3897
|
this.fileTree = t;
|
|
3894
3898
|
}
|
|
@@ -3920,24 +3924,24 @@ class Ia {
|
|
|
3920
3924
|
throw new Error(`File not found at ${t}`);
|
|
3921
3925
|
}
|
|
3922
3926
|
}
|
|
3923
|
-
class
|
|
3927
|
+
class se {
|
|
3924
3928
|
constructor(t) {
|
|
3925
3929
|
this.entries = /* @__PURE__ */ new Map(), this.zipReader = t;
|
|
3926
3930
|
}
|
|
3927
3931
|
static fromStream(t) {
|
|
3928
|
-
const e = new
|
|
3929
|
-
new
|
|
3932
|
+
const e = new _e(
|
|
3933
|
+
new Fe(new ot(t, "archive.zip"))
|
|
3930
3934
|
);
|
|
3931
|
-
return new
|
|
3935
|
+
return new se(e);
|
|
3932
3936
|
}
|
|
3933
3937
|
static fromArrayBuffer(t) {
|
|
3934
|
-
const e = new
|
|
3935
|
-
new
|
|
3938
|
+
const e = new _e(
|
|
3939
|
+
new Fe(new Blob([t]))
|
|
3936
3940
|
);
|
|
3937
|
-
return new
|
|
3941
|
+
return new se(e);
|
|
3938
3942
|
}
|
|
3939
3943
|
async read(t) {
|
|
3940
|
-
const e = await this.getEntry(t), i = await e.getData(new
|
|
3944
|
+
const e = await this.getEntry(t), i = await e.getData(new rn());
|
|
3941
3945
|
return new ot(i.stream(), t, {
|
|
3942
3946
|
filesize: e.uncompressedSize
|
|
3943
3947
|
});
|
|
@@ -3957,7 +3961,7 @@ class ae {
|
|
|
3957
3961
|
return this.entries;
|
|
3958
3962
|
}
|
|
3959
3963
|
}
|
|
3960
|
-
class
|
|
3964
|
+
class Ua {
|
|
3961
3965
|
/**
|
|
3962
3966
|
* Creates a new OverlayFilesystem.
|
|
3963
3967
|
*
|
|
@@ -3997,7 +4001,7 @@ class _a {
|
|
|
3997
4001
|
);
|
|
3998
4002
|
}
|
|
3999
4003
|
}
|
|
4000
|
-
class
|
|
4004
|
+
class $a {
|
|
4001
4005
|
constructor(t) {
|
|
4002
4006
|
if (this.baseUrl = "", this.options = t, this.isDataUrl = t.baseUrl.startsWith("data:"), this.isDataUrl)
|
|
4003
4007
|
return;
|
|
@@ -4013,7 +4017,7 @@ class Fa {
|
|
|
4013
4017
|
throw new Error(
|
|
4014
4018
|
"FetchFilesystem cannot fetch files from data URLs"
|
|
4015
4019
|
);
|
|
4016
|
-
t =
|
|
4020
|
+
t = fe(t);
|
|
4017
4021
|
const e = t.replace(/^\//, ""), i = new URL(e, this.baseUrl).toString();
|
|
4018
4022
|
if (!i.startsWith(this.baseUrl))
|
|
4019
4023
|
throw new Error(
|
|
@@ -4028,7 +4032,7 @@ class Fa {
|
|
|
4028
4032
|
return new ot(f.body, t, { filesize: u });
|
|
4029
4033
|
}
|
|
4030
4034
|
}
|
|
4031
|
-
class
|
|
4035
|
+
class Pa {
|
|
4032
4036
|
constructor(t) {
|
|
4033
4037
|
this.root = t;
|
|
4034
4038
|
}
|
|
@@ -4065,7 +4069,7 @@ class Ua {
|
|
|
4065
4069
|
)
|
|
4066
4070
|
) : e(
|
|
4067
4071
|
new ot(
|
|
4068
|
-
|
|
4072
|
+
na(f),
|
|
4069
4073
|
t,
|
|
4070
4074
|
{
|
|
4071
4075
|
filesize: s.size
|
|
@@ -4076,7 +4080,7 @@ class Ua {
|
|
|
4076
4080
|
});
|
|
4077
4081
|
}
|
|
4078
4082
|
}
|
|
4079
|
-
function
|
|
4083
|
+
function na(r) {
|
|
4080
4084
|
return new ReadableStream({
|
|
4081
4085
|
start(e) {
|
|
4082
4086
|
r.on("data", (i) => e.enqueue(i)), r.on("end", () => e.close());
|
|
@@ -4084,35 +4088,35 @@ function ea(r) {
|
|
|
4084
4088
|
});
|
|
4085
4089
|
}
|
|
4086
4090
|
export {
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4091
|
+
$a as FetchFilesystem,
|
|
4092
|
+
Fa as InMemoryFilesystem,
|
|
4093
|
+
Pa as NodeJsFilesystem,
|
|
4094
|
+
Ua as OverlayFilesystem,
|
|
4095
|
+
se as ZipFilesystem,
|
|
4096
|
+
ba as changeset,
|
|
4097
|
+
Ea as clearContentsFromMountDevice,
|
|
4098
|
+
ua as createClient,
|
|
4099
|
+
ga as createCommit,
|
|
4100
|
+
Sa as createDotGitDirectory,
|
|
4101
|
+
ya as createOrUpdateBranch,
|
|
4102
|
+
wa as createTree,
|
|
4103
|
+
Ue as createTreeNode,
|
|
4104
|
+
fn as createTreeNodes,
|
|
4105
|
+
cn as deleteFile,
|
|
4106
|
+
hn as directoryHandleFromMountDevice,
|
|
4107
|
+
va as directoryHandleToOpfsPath,
|
|
4108
|
+
la as filesListToObject,
|
|
4109
|
+
da as fork,
|
|
4110
|
+
ha as getArtifact,
|
|
4111
|
+
nn as getFilesFromDirectory,
|
|
4112
|
+
ma as iterateFiles,
|
|
4113
|
+
Ia as listDescendantFiles,
|
|
4114
|
+
Aa as listGitFiles,
|
|
4115
|
+
Wo as listGitRefs,
|
|
4116
|
+
pa as mayPush,
|
|
4117
|
+
pn as opfsPathToDirectoryHandle,
|
|
4118
|
+
_a as removePathPrefix,
|
|
4119
|
+
Ba as resolveCommitHash,
|
|
4120
|
+
xa as sparseCheckout
|
|
4117
4121
|
};
|
|
4118
4122
|
//# sourceMappingURL=index.js.map
|