document-model 1.0.32 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/document-model.cjs +1 -1
- package/dist/browser/document-model.js +2 -2
- package/dist/browser/document.cjs +1 -1
- package/dist/browser/document.js +2 -2
- package/dist/browser/index.cjs +1 -1
- package/dist/browser/index.js +3 -3
- package/dist/browser/internal/{index-B7qIPXoz.js → index-368Qgjhp.js} +1 -1
- package/dist/browser/internal/index-A_QX9cy_.js +41 -0
- package/dist/browser/internal/{index-BFOiHt6I.js → index-CDGYwLIP.js} +1 -1
- package/dist/browser/internal/index-CZWjb-hc.js +1 -0
- package/dist/browser/internal/{object-Diya-yJS.js → object-B-Aw8ilC.js} +743 -735
- package/dist/browser/internal/object-C8B-mq5Y.js +7 -0
- package/dist/browser/src/document/utils/base.d.ts +1 -0
- package/dist/node/document-model.cjs +1 -1
- package/dist/node/document-model.js +2 -2
- package/dist/node/document.cjs +1 -1
- package/dist/node/document.js +3 -3
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.js +3 -3
- package/dist/node/internal/{index-C-NbJIDm.js → index-CEkeEja8.js} +1 -1
- package/dist/node/internal/index-D_eCXEyL.js +41 -0
- package/dist/node/internal/index-DjP2tO7C.js +1 -0
- package/dist/node/internal/{index-CsNA2GBY.js → index-qa67kbhM.js} +1 -1
- package/dist/node/internal/object-B5Lf9AWl.js +2 -0
- package/dist/node/internal/{object-usT57J9v.js → object-CvntAblp.js} +327 -319
- package/dist/node/src/document/utils/base.d.ts +1 -0
- package/package.json +1 -1
- package/dist/browser/internal/index-BVR8cGlp.js +0 -1
- package/dist/browser/internal/index-DtMGoFXU.js +0 -40
- package/dist/browser/internal/object-O_qdzVL-.js +0 -7
- package/dist/node/internal/index-Bxw-tgFs.js +0 -1
- package/dist/node/internal/index-Ly6V0vGQ.js +0 -40
- package/dist/node/internal/object-DyU92wWO.js +0 -2
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { produce as J, castDraft as
|
|
5
|
-
import
|
|
6
|
-
import { z as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
1
|
+
var je = Object.defineProperty;
|
|
2
|
+
var Ie = (n, r, p) => r in n ? je(n, r, { enumerable: !0, configurable: !0, writable: !0, value: p }) : n[r] = p;
|
|
3
|
+
var X = (n, r, p) => (Ie(n, typeof r != "symbol" ? r + "" : r, p), p);
|
|
4
|
+
import { produce as J, castDraft as at, castImmutable as Oe, freeze as Ue } from "immer";
|
|
5
|
+
import pt from "json-stringify-deterministic";
|
|
6
|
+
import { z as w } from "zod";
|
|
7
|
+
import Dt from "jszip";
|
|
8
|
+
const Mt = (n) => n != null, Te = w.any().refine((n) => Mt(n)), Nt = w.enum(["LOAD_STATE"]), Rt = w.enum(["PRUNE"]), Ct = w.enum(["REDO"]), Lt = w.enum(["SET_NAME"]), zt = w.enum(["UNDO"]);
|
|
9
9
|
function De() {
|
|
10
|
-
return
|
|
11
|
-
__typename:
|
|
12
|
-
type:
|
|
10
|
+
return w.object({
|
|
11
|
+
__typename: w.literal("Action").optional(),
|
|
12
|
+
type: w.string()
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
function H() {
|
|
16
|
-
return
|
|
16
|
+
return w.literal("global").or(w.literal("local"));
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return
|
|
20
|
-
zt(),
|
|
18
|
+
function Pt() {
|
|
19
|
+
return w.union([
|
|
21
20
|
qt(),
|
|
22
|
-
$t(),
|
|
23
21
|
Wt(),
|
|
24
|
-
Jt()
|
|
22
|
+
Jt(),
|
|
23
|
+
Ht(),
|
|
24
|
+
Zt()
|
|
25
25
|
]);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return
|
|
29
|
-
__typename:
|
|
30
|
-
data:
|
|
31
|
-
extension:
|
|
32
|
-
fileName:
|
|
33
|
-
mimeType:
|
|
27
|
+
function Me() {
|
|
28
|
+
return w.object({
|
|
29
|
+
__typename: w.literal("DocumentFile").optional(),
|
|
30
|
+
data: w.string(),
|
|
31
|
+
extension: w.string().nullable(),
|
|
32
|
+
fileName: w.string().nullable(),
|
|
33
|
+
mimeType: w.string()
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
return
|
|
38
|
-
input:
|
|
39
|
-
type:
|
|
36
|
+
function qt() {
|
|
37
|
+
return w.object({
|
|
38
|
+
input: w.lazy(() => ut()),
|
|
39
|
+
type: Nt,
|
|
40
40
|
scope: H()
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
return
|
|
45
|
-
operations:
|
|
46
|
-
state:
|
|
43
|
+
function ut() {
|
|
44
|
+
return w.object({
|
|
45
|
+
operations: w.number(),
|
|
46
|
+
state: w.lazy(() => $t())
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
return
|
|
51
|
-
data:
|
|
52
|
-
name:
|
|
49
|
+
function $t() {
|
|
50
|
+
return w.object({
|
|
51
|
+
data: w.unknown().nullish(),
|
|
52
|
+
name: w.string()
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
return
|
|
57
|
-
__typename:
|
|
58
|
-
hash:
|
|
59
|
-
index:
|
|
60
|
-
timestamp:
|
|
61
|
-
type:
|
|
55
|
+
function Ne() {
|
|
56
|
+
return w.object({
|
|
57
|
+
__typename: w.literal("Operation").optional(),
|
|
58
|
+
hash: w.string(),
|
|
59
|
+
index: w.number(),
|
|
60
|
+
timestamp: w.string().datetime(),
|
|
61
|
+
type: w.string()
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
return
|
|
66
|
-
input:
|
|
67
|
-
type:
|
|
64
|
+
function Wt() {
|
|
65
|
+
return w.object({
|
|
66
|
+
input: w.lazy(() => ft()),
|
|
67
|
+
type: Rt,
|
|
68
68
|
scope: H()
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
return
|
|
73
|
-
end:
|
|
74
|
-
start:
|
|
71
|
+
function ft() {
|
|
72
|
+
return w.object({
|
|
73
|
+
end: w.number().nullish(),
|
|
74
|
+
start: w.number().nullish()
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
-
const
|
|
78
|
-
function
|
|
79
|
-
return
|
|
80
|
-
input:
|
|
81
|
-
type:
|
|
77
|
+
const mt = w.number;
|
|
78
|
+
function Jt() {
|
|
79
|
+
return w.object({
|
|
80
|
+
input: mt(),
|
|
81
|
+
type: Ct,
|
|
82
82
|
scope: H()
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
const
|
|
86
|
-
function
|
|
87
|
-
return
|
|
88
|
-
input:
|
|
89
|
-
type:
|
|
90
|
-
scope:
|
|
85
|
+
const ht = w.string;
|
|
86
|
+
function Ht() {
|
|
87
|
+
return w.object({
|
|
88
|
+
input: ht(),
|
|
89
|
+
type: Lt,
|
|
90
|
+
scope: w.literal("global")
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
function Re() {
|
|
94
|
-
return
|
|
95
|
-
__typename:
|
|
96
|
-
hash:
|
|
97
|
-
index:
|
|
98
|
-
input:
|
|
99
|
-
timestamp:
|
|
100
|
-
type:
|
|
94
|
+
return w.object({
|
|
95
|
+
__typename: w.literal("SetNameOperation").optional(),
|
|
96
|
+
hash: w.string(),
|
|
97
|
+
index: w.number(),
|
|
98
|
+
input: w.string(),
|
|
99
|
+
timestamp: w.string().datetime(),
|
|
100
|
+
type: w.string()
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
|
-
const
|
|
104
|
-
function
|
|
105
|
-
return
|
|
106
|
-
input:
|
|
107
|
-
type:
|
|
103
|
+
const xt = w.number;
|
|
104
|
+
function Zt() {
|
|
105
|
+
return w.object({
|
|
106
|
+
input: xt(),
|
|
107
|
+
type: zt,
|
|
108
108
|
scope: H()
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
const Li = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
112
112
|
__proto__: null,
|
|
113
113
|
ActionSchema: De,
|
|
114
|
-
BaseActionSchema:
|
|
115
|
-
DocumentFileSchema:
|
|
116
|
-
LoadStateActionInputSchema:
|
|
117
|
-
LoadStateActionSchema:
|
|
118
|
-
LoadStateActionStateInputSchema:
|
|
119
|
-
Load_StateSchema:
|
|
120
|
-
OperationSchema:
|
|
114
|
+
BaseActionSchema: Pt,
|
|
115
|
+
DocumentFileSchema: Me,
|
|
116
|
+
LoadStateActionInputSchema: ut,
|
|
117
|
+
LoadStateActionSchema: qt,
|
|
118
|
+
LoadStateActionStateInputSchema: $t,
|
|
119
|
+
Load_StateSchema: Nt,
|
|
120
|
+
OperationSchema: Ne,
|
|
121
121
|
OperationScopeSchema: H,
|
|
122
|
-
PruneActionInputSchema:
|
|
123
|
-
PruneActionSchema:
|
|
124
|
-
PruneSchema:
|
|
125
|
-
RedoActionInputSchema:
|
|
126
|
-
RedoActionSchema:
|
|
127
|
-
RedoSchema:
|
|
128
|
-
SetNameActionInputSchema:
|
|
129
|
-
SetNameActionSchema:
|
|
122
|
+
PruneActionInputSchema: ft,
|
|
123
|
+
PruneActionSchema: Wt,
|
|
124
|
+
PruneSchema: Rt,
|
|
125
|
+
RedoActionInputSchema: mt,
|
|
126
|
+
RedoActionSchema: Jt,
|
|
127
|
+
RedoSchema: Ct,
|
|
128
|
+
SetNameActionInputSchema: ht,
|
|
129
|
+
SetNameActionSchema: Ht,
|
|
130
130
|
SetNameOperationSchema: Re,
|
|
131
|
-
Set_NameSchema:
|
|
132
|
-
UndoActionInputSchema:
|
|
133
|
-
UndoActionSchema:
|
|
134
|
-
UndoSchema:
|
|
131
|
+
Set_NameSchema: Lt,
|
|
132
|
+
UndoActionInputSchema: xt,
|
|
133
|
+
UndoActionSchema: Zt,
|
|
134
|
+
UndoSchema: zt,
|
|
135
135
|
definedNonNullAnySchema: Te,
|
|
136
|
-
isDefinedNonNullAny:
|
|
136
|
+
isDefinedNonNullAny: Mt
|
|
137
137
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
138
|
-
function Ce(
|
|
139
|
-
return { ...
|
|
138
|
+
function Ce(n, r) {
|
|
139
|
+
return { ...n, name: r };
|
|
140
140
|
}
|
|
141
|
-
function Le(
|
|
141
|
+
function Le(n, r, p) {
|
|
142
142
|
const c = {
|
|
143
143
|
skip: p,
|
|
144
|
-
document:
|
|
144
|
+
document: n
|
|
145
145
|
}, { scope: u } = r;
|
|
146
146
|
return !u || r.skip === void 0 ? c : J(c, (f) => {
|
|
147
147
|
const [l] = f.document.operations[u].slice(-1);
|
|
148
148
|
r.skip && r.skip > 0 && (f.skip = r.skip), l.type === "NOOP" && r.index === l.index && f.skip > l.skip && f.document.operations[u].pop();
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
|
-
function ze(
|
|
151
|
+
function ze(n, r, p) {
|
|
152
152
|
const { scope: c, input: u } = r;
|
|
153
153
|
return J({
|
|
154
|
-
document:
|
|
154
|
+
document: n,
|
|
155
155
|
action: r,
|
|
156
156
|
skip: p
|
|
157
157
|
}, (l) => {
|
|
@@ -173,18 +173,18 @@ function ze(o, r, p) {
|
|
|
173
173
|
"Cannot undo: you can't undo more operations than the ones in the scope history"
|
|
174
174
|
);
|
|
175
175
|
const d = l.document.operations[c].length - 1;
|
|
176
|
-
let
|
|
177
|
-
for (;
|
|
178
|
-
const
|
|
179
|
-
|
|
176
|
+
let v = u, g = x ? d - a.skip : d;
|
|
177
|
+
for (; v > 0 && g >= 0; ) {
|
|
178
|
+
const y = l.document.operations[c][g];
|
|
179
|
+
y.type === "NOOP" && y.skip > 0 ? (g = g - (y.skip + 1), l.skip += y.skip + 1) : (l.document.clipboard.push({ ...y }), v--, g--);
|
|
180
180
|
}
|
|
181
|
-
l.action =
|
|
181
|
+
l.action = yt(c);
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
|
-
function Pe(
|
|
184
|
+
function Pe(n, r, p) {
|
|
185
185
|
const { scope: c, input: u } = r;
|
|
186
186
|
return J({
|
|
187
|
-
document:
|
|
187
|
+
document: n,
|
|
188
188
|
action: r,
|
|
189
189
|
skip: p
|
|
190
190
|
}, (l) => {
|
|
@@ -208,79 +208,79 @@ function Pe(o, r, p) {
|
|
|
208
208
|
`Cannot redo: no operations in clipboard for scope "${c}"`
|
|
209
209
|
);
|
|
210
210
|
const x = l.document.clipboard.splice(a, 1)[0];
|
|
211
|
-
l.action =
|
|
211
|
+
l.action = at({
|
|
212
212
|
type: x.type,
|
|
213
213
|
scope: x.scope,
|
|
214
214
|
input: x.input
|
|
215
215
|
});
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
|
-
function qe(
|
|
219
|
-
const { scope: c } = r, u =
|
|
218
|
+
function qe(n, r, p) {
|
|
219
|
+
const { scope: c } = r, u = n.operations[c];
|
|
220
220
|
let {
|
|
221
221
|
input: { start: f, end: l }
|
|
222
222
|
} = r;
|
|
223
223
|
f = f || 0, l = l || u.length;
|
|
224
|
-
const a = u.slice(f, l), x = u.slice(0, f), d = u.slice(l),
|
|
225
|
-
|
|
224
|
+
const a = u.slice(f, l), x = u.slice(0, f), d = u.slice(l), v = lt(
|
|
225
|
+
n.initialState,
|
|
226
226
|
{
|
|
227
|
-
...
|
|
227
|
+
...n.operations,
|
|
228
228
|
[c]: x.concat(a)
|
|
229
229
|
},
|
|
230
230
|
p
|
|
231
|
-
), { name:
|
|
232
|
-
return
|
|
233
|
-
|
|
231
|
+
), { name: g, state: y } = v, b = x.length, E = x.length ? x[x.length - 1].timestamp : d.length ? d[0].timestamp : (/* @__PURE__ */ new Date()).toISOString();
|
|
232
|
+
return lt(
|
|
233
|
+
n.initialState,
|
|
234
234
|
{
|
|
235
|
-
...
|
|
235
|
+
...n.operations,
|
|
236
236
|
[c]: [
|
|
237
237
|
...x,
|
|
238
238
|
{
|
|
239
|
-
...
|
|
240
|
-
{ name:
|
|
239
|
+
...gt(
|
|
240
|
+
{ name: g, state: y },
|
|
241
241
|
a.length
|
|
242
242
|
),
|
|
243
|
-
timestamp:
|
|
244
|
-
index:
|
|
245
|
-
hash:
|
|
243
|
+
timestamp: E,
|
|
244
|
+
index: b,
|
|
245
|
+
hash: re({ state: y }, "global")
|
|
246
246
|
},
|
|
247
|
-
...d.map((
|
|
248
|
-
...
|
|
249
|
-
index:
|
|
247
|
+
...d.map((U, R) => ({
|
|
248
|
+
...U,
|
|
249
|
+
index: b + R + 1
|
|
250
250
|
}))
|
|
251
251
|
]
|
|
252
252
|
},
|
|
253
253
|
p
|
|
254
254
|
);
|
|
255
255
|
}
|
|
256
|
-
function $e(
|
|
256
|
+
function $e(n, r) {
|
|
257
257
|
return {
|
|
258
|
-
...
|
|
258
|
+
...n,
|
|
259
259
|
name: r.name,
|
|
260
260
|
state: r.state ?? { global: {}, local: {} }
|
|
261
261
|
};
|
|
262
262
|
}
|
|
263
|
-
const
|
|
264
|
-
function Je(
|
|
265
|
-
const p =
|
|
263
|
+
const Yt = "SET_NAME", z = "UNDO", P = "REDO", Z = "PRUNE", Gt = "LOAD_STATE", We = "NOOP";
|
|
264
|
+
function Je(n, r) {
|
|
265
|
+
const p = n.revision[r.scope];
|
|
266
266
|
return [z, P, Z].includes(r.type) ? p : p + 1;
|
|
267
267
|
}
|
|
268
|
-
function He(
|
|
268
|
+
function He(n, r) {
|
|
269
269
|
return {
|
|
270
|
-
...
|
|
270
|
+
...n,
|
|
271
271
|
revision: {
|
|
272
|
-
...
|
|
273
|
-
[r.scope]: Je(
|
|
272
|
+
...n.revision,
|
|
273
|
+
[r.scope]: Je(n, r)
|
|
274
274
|
},
|
|
275
275
|
lastModified: (/* @__PURE__ */ new Date()).toISOString()
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
|
-
function Ze(
|
|
278
|
+
function Ze(n, r, p = 0) {
|
|
279
279
|
if ([z, P, Z].includes(r.type))
|
|
280
|
-
return
|
|
281
|
-
const { scope: c } = r, u =
|
|
280
|
+
return n;
|
|
281
|
+
const { scope: c } = r, u = n.operations[c].slice(
|
|
282
282
|
0,
|
|
283
|
-
|
|
283
|
+
n.revision[c]
|
|
284
284
|
);
|
|
285
285
|
return u.push({
|
|
286
286
|
...r,
|
|
@@ -290,52 +290,52 @@ function Ze(o, r, p = 0) {
|
|
|
290
290
|
scope: c,
|
|
291
291
|
skip: p
|
|
292
292
|
}), {
|
|
293
|
-
...
|
|
294
|
-
operations: { ...
|
|
293
|
+
...n,
|
|
294
|
+
operations: { ...n.operations, [c]: u }
|
|
295
295
|
};
|
|
296
296
|
}
|
|
297
|
-
function Ye(
|
|
298
|
-
let c = Ze(
|
|
297
|
+
function Ye(n, r, p = 0) {
|
|
298
|
+
let c = Ze(n, r, p);
|
|
299
299
|
return c = He(c, r), c;
|
|
300
300
|
}
|
|
301
|
-
function Ge(
|
|
302
|
-
switch (
|
|
303
|
-
case
|
|
304
|
-
return Ce(
|
|
301
|
+
function Ge(n, r, p) {
|
|
302
|
+
switch (Pt().parse(r), r.type) {
|
|
303
|
+
case Yt:
|
|
304
|
+
return Ce(n, r.input);
|
|
305
305
|
case Z:
|
|
306
|
-
return qe(
|
|
307
|
-
case
|
|
308
|
-
return $e(
|
|
306
|
+
return qe(n, r, p);
|
|
307
|
+
case Gt:
|
|
308
|
+
return $e(n, r.input.state);
|
|
309
309
|
default:
|
|
310
|
-
return
|
|
310
|
+
return n;
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
-
function Ke(
|
|
313
|
+
function Ke(n, r, p) {
|
|
314
314
|
switch (r.type) {
|
|
315
315
|
case z:
|
|
316
|
-
return ze(
|
|
316
|
+
return ze(n, r, p);
|
|
317
317
|
case P:
|
|
318
|
-
return Pe(
|
|
318
|
+
return Pe(n, r, p);
|
|
319
319
|
default:
|
|
320
|
-
return { document:
|
|
320
|
+
return { document: n, action: r, skip: p };
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function Kt(n, r, p, c, u = {}) {
|
|
324
324
|
const { skip: f, ignoreSkipOperations: l = !1 } = u;
|
|
325
|
-
let a = { ...r }, x = f || 0, d =
|
|
325
|
+
let a = { ...r }, x = f || 0, d = n, v = [...n.clipboard];
|
|
326
326
|
if (Ei(a)) {
|
|
327
|
-
const { document:
|
|
328
|
-
x =
|
|
327
|
+
const { document: g, skip: y } = Le(d, a, x);
|
|
328
|
+
x = y, d = g;
|
|
329
329
|
}
|
|
330
|
-
if (
|
|
330
|
+
if (Ot(a)) {
|
|
331
331
|
const {
|
|
332
|
-
skip:
|
|
333
|
-
action:
|
|
334
|
-
document:
|
|
335
|
-
} = Ke(
|
|
336
|
-
a =
|
|
332
|
+
skip: g,
|
|
333
|
+
action: y,
|
|
334
|
+
document: b
|
|
335
|
+
} = Ke(n, a, x);
|
|
336
|
+
a = y, x = g, d = b, v = [...d.clipboard];
|
|
337
337
|
}
|
|
338
|
-
return
|
|
338
|
+
return Ut(a) && (d = Ge(d, a, p)), x > 0 && !l && (d = lt(
|
|
339
339
|
d.initialState,
|
|
340
340
|
d.operations,
|
|
341
341
|
p,
|
|
@@ -343,36 +343,36 @@ function Yt(o, r, p, c, u = {}) {
|
|
|
343
343
|
void 0,
|
|
344
344
|
void 0,
|
|
345
345
|
{ [a.scope]: x }
|
|
346
|
-
)), d = Ye(d, a, x), d = J(d, (
|
|
347
|
-
const
|
|
348
|
-
|
|
346
|
+
)), d = Ye(d, a, x), d = J(d, (g) => {
|
|
347
|
+
const y = p(
|
|
348
|
+
g.state,
|
|
349
349
|
a,
|
|
350
350
|
c
|
|
351
|
-
),
|
|
352
|
-
if (
|
|
353
|
-
return
|
|
351
|
+
), b = Ot(r) ? [...v] : [];
|
|
352
|
+
if (y)
|
|
353
|
+
return at({
|
|
354
354
|
...d,
|
|
355
|
-
clipboard: [...
|
|
356
|
-
state:
|
|
355
|
+
clipboard: [...b],
|
|
356
|
+
state: y
|
|
357
357
|
});
|
|
358
|
-
|
|
359
|
-
}), J(d, (
|
|
358
|
+
g.clipboard = at([...b]);
|
|
359
|
+
}), J(d, (g) => {
|
|
360
360
|
if ([z, P, Z].includes(a.type))
|
|
361
|
-
return
|
|
362
|
-
const
|
|
363
|
-
|
|
364
|
-
const { hash:
|
|
365
|
-
|
|
366
|
-
...
|
|
361
|
+
return g;
|
|
362
|
+
const y = a.scope || "global";
|
|
363
|
+
g.operations[y][g.operations[y].length - 1].hash = re(g, y), !Ut(a) && a.attachments && a.attachments.forEach((b) => {
|
|
364
|
+
const { hash: E, ...U } = b;
|
|
365
|
+
g.attachments[E] = {
|
|
366
|
+
...U
|
|
367
367
|
};
|
|
368
368
|
});
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
|
-
function Ve(
|
|
372
|
-
return
|
|
371
|
+
function Ve(n) {
|
|
372
|
+
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
373
373
|
}
|
|
374
|
-
var
|
|
375
|
-
typeof Object.create == "function" ?
|
|
374
|
+
var st = { exports: {} };
|
|
375
|
+
typeof Object.create == "function" ? st.exports = function(r, p) {
|
|
376
376
|
p && (r.super_ = p, r.prototype = Object.create(p.prototype, {
|
|
377
377
|
constructor: {
|
|
378
378
|
value: r,
|
|
@@ -381,7 +381,7 @@ typeof Object.create == "function" ? at.exports = function(r, p) {
|
|
|
381
381
|
configurable: !0
|
|
382
382
|
}
|
|
383
383
|
}));
|
|
384
|
-
} :
|
|
384
|
+
} : st.exports = function(r, p) {
|
|
385
385
|
if (p) {
|
|
386
386
|
r.super_ = p;
|
|
387
387
|
var c = function() {
|
|
@@ -389,78 +389,78 @@ typeof Object.create == "function" ? at.exports = function(r, p) {
|
|
|
389
389
|
c.prototype = p.prototype, r.prototype = new c(), r.prototype.constructor = r;
|
|
390
390
|
}
|
|
391
391
|
};
|
|
392
|
-
var Xe =
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
var D = [], O = [], Qe = typeof Uint8Array < "u" ? Uint8Array : Array,
|
|
397
|
-
for (var C = 0, ti =
|
|
398
|
-
D[C] =
|
|
392
|
+
var Xe = st.exports, ct = { exports: {} }, Vt = {}, tt = {};
|
|
393
|
+
tt.byteLength = ei;
|
|
394
|
+
tt.toByteArray = ri;
|
|
395
|
+
tt.fromByteArray = ai;
|
|
396
|
+
var D = [], O = [], Qe = typeof Uint8Array < "u" ? Uint8Array : Array, ot = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
397
|
+
for (var C = 0, ti = ot.length; C < ti; ++C)
|
|
398
|
+
D[C] = ot[C], O[ot.charCodeAt(C)] = C;
|
|
399
399
|
O[45] = 62;
|
|
400
400
|
O[95] = 63;
|
|
401
|
-
function
|
|
402
|
-
var r =
|
|
401
|
+
function Xt(n) {
|
|
402
|
+
var r = n.length;
|
|
403
403
|
if (r % 4 > 0)
|
|
404
404
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
405
|
-
var p =
|
|
405
|
+
var p = n.indexOf("=");
|
|
406
406
|
p === -1 && (p = r);
|
|
407
407
|
var c = p === r ? 0 : 4 - p % 4;
|
|
408
408
|
return [p, c];
|
|
409
409
|
}
|
|
410
|
-
function ei(
|
|
411
|
-
var r =
|
|
410
|
+
function ei(n) {
|
|
411
|
+
var r = Xt(n), p = r[0], c = r[1];
|
|
412
412
|
return (p + c) * 3 / 4 - c;
|
|
413
413
|
}
|
|
414
|
-
function ii(
|
|
414
|
+
function ii(n, r, p) {
|
|
415
415
|
return (r + p) * 3 / 4 - p;
|
|
416
416
|
}
|
|
417
|
-
function ri(
|
|
418
|
-
var r, p =
|
|
417
|
+
function ri(n) {
|
|
418
|
+
var r, p = Xt(n), c = p[0], u = p[1], f = new Qe(ii(n, c, u)), l = 0, a = u > 0 ? c - 4 : c, x;
|
|
419
419
|
for (x = 0; x < a; x += 4)
|
|
420
|
-
r = O[
|
|
421
|
-
return u === 2 && (r = O[
|
|
420
|
+
r = O[n.charCodeAt(x)] << 18 | O[n.charCodeAt(x + 1)] << 12 | O[n.charCodeAt(x + 2)] << 6 | O[n.charCodeAt(x + 3)], f[l++] = r >> 16 & 255, f[l++] = r >> 8 & 255, f[l++] = r & 255;
|
|
421
|
+
return u === 2 && (r = O[n.charCodeAt(x)] << 2 | O[n.charCodeAt(x + 1)] >> 4, f[l++] = r & 255), u === 1 && (r = O[n.charCodeAt(x)] << 10 | O[n.charCodeAt(x + 1)] << 4 | O[n.charCodeAt(x + 2)] >> 2, f[l++] = r >> 8 & 255, f[l++] = r & 255), f;
|
|
422
422
|
}
|
|
423
|
-
function ni(
|
|
424
|
-
return D[
|
|
423
|
+
function ni(n) {
|
|
424
|
+
return D[n >> 18 & 63] + D[n >> 12 & 63] + D[n >> 6 & 63] + D[n & 63];
|
|
425
425
|
}
|
|
426
|
-
function oi(
|
|
426
|
+
function oi(n, r, p) {
|
|
427
427
|
for (var c, u = [], f = r; f < p; f += 3)
|
|
428
|
-
c = (
|
|
428
|
+
c = (n[f] << 16 & 16711680) + (n[f + 1] << 8 & 65280) + (n[f + 2] & 255), u.push(ni(c));
|
|
429
429
|
return u.join("");
|
|
430
430
|
}
|
|
431
|
-
function ai(
|
|
432
|
-
for (var r, p =
|
|
433
|
-
u.push(oi(
|
|
434
|
-
return c === 1 ? (r =
|
|
431
|
+
function ai(n) {
|
|
432
|
+
for (var r, p = n.length, c = p % 3, u = [], f = 16383, l = 0, a = p - c; l < a; l += f)
|
|
433
|
+
u.push(oi(n, l, l + f > a ? a : l + f));
|
|
434
|
+
return c === 1 ? (r = n[p - 1], u.push(
|
|
435
435
|
D[r >> 2] + D[r << 4 & 63] + "=="
|
|
436
|
-
)) : c === 2 && (r = (
|
|
436
|
+
)) : c === 2 && (r = (n[p - 2] << 8) + n[p - 1], u.push(
|
|
437
437
|
D[r >> 10] + D[r >> 4 & 63] + D[r << 2 & 63] + "="
|
|
438
438
|
)), u.join("");
|
|
439
439
|
}
|
|
440
|
-
var
|
|
440
|
+
var dt = {};
|
|
441
441
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
442
|
-
|
|
443
|
-
var f, l, a = u * 8 - c - 1, x = (1 << a) - 1, d = x >> 1,
|
|
444
|
-
for (
|
|
442
|
+
dt.read = function(n, r, p, c, u) {
|
|
443
|
+
var f, l, a = u * 8 - c - 1, x = (1 << a) - 1, d = x >> 1, v = -7, g = p ? u - 1 : 0, y = p ? -1 : 1, b = n[r + g];
|
|
444
|
+
for (g += y, f = b & (1 << -v) - 1, b >>= -v, v += a; v > 0; f = f * 256 + n[r + g], g += y, v -= 8)
|
|
445
445
|
;
|
|
446
|
-
for (l = f & (1 << -
|
|
446
|
+
for (l = f & (1 << -v) - 1, f >>= -v, v += c; v > 0; l = l * 256 + n[r + g], g += y, v -= 8)
|
|
447
447
|
;
|
|
448
448
|
if (f === 0)
|
|
449
449
|
f = 1 - d;
|
|
450
450
|
else {
|
|
451
451
|
if (f === x)
|
|
452
|
-
return l ? NaN : (
|
|
452
|
+
return l ? NaN : (b ? -1 : 1) * (1 / 0);
|
|
453
453
|
l = l + Math.pow(2, c), f = f - d;
|
|
454
454
|
}
|
|
455
|
-
return (
|
|
455
|
+
return (b ? -1 : 1) * l * Math.pow(2, f - c);
|
|
456
456
|
};
|
|
457
|
-
|
|
458
|
-
var l, a, x, d = f * 8 - u - 1,
|
|
459
|
-
for (r = Math.abs(r), isNaN(r) || r === 1 / 0 ? (a = isNaN(r) ? 1 : 0, l =
|
|
457
|
+
dt.write = function(n, r, p, c, u, f) {
|
|
458
|
+
var l, a, x, d = f * 8 - u - 1, v = (1 << d) - 1, g = v >> 1, y = u === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, b = c ? 0 : f - 1, E = c ? 1 : -1, U = r < 0 || r === 0 && 1 / r < 0 ? 1 : 0;
|
|
459
|
+
for (r = Math.abs(r), isNaN(r) || r === 1 / 0 ? (a = isNaN(r) ? 1 : 0, l = v) : (l = Math.floor(Math.log(r) / Math.LN2), r * (x = Math.pow(2, -l)) < 1 && (l--, x *= 2), l + g >= 1 ? r += y / x : r += y * Math.pow(2, 1 - g), r * x >= 2 && (l++, x /= 2), l + g >= v ? (a = 0, l = v) : l + g >= 1 ? (a = (r * x - 1) * Math.pow(2, u), l = l + g) : (a = r * Math.pow(2, g - 1) * Math.pow(2, u), l = 0)); u >= 8; n[p + b] = a & 255, b += E, a /= 256, u -= 8)
|
|
460
460
|
;
|
|
461
|
-
for (l = l << u | a, d += u; d > 0;
|
|
461
|
+
for (l = l << u | a, d += u; d > 0; n[p + b] = l & 255, b += E, l /= 256, d -= 8)
|
|
462
462
|
;
|
|
463
|
-
|
|
463
|
+
n[p + b - E] |= U * 128;
|
|
464
464
|
};
|
|
465
465
|
/*!
|
|
466
466
|
* The buffer module from node.js, for the browser.
|
|
@@ -468,11 +468,11 @@ ht.write = function(o, r, p, c, u, f) {
|
|
|
468
468
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
469
469
|
* @license MIT
|
|
470
470
|
*/
|
|
471
|
-
(function(
|
|
472
|
-
var r =
|
|
473
|
-
|
|
471
|
+
(function(n) {
|
|
472
|
+
var r = tt, p = dt, c = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
473
|
+
n.Buffer = a, n.SlowBuffer = G, n.INSPECT_MAX_BYTES = 50;
|
|
474
474
|
var u = 2147483647;
|
|
475
|
-
|
|
475
|
+
n.kMaxLength = u, a.TYPED_ARRAY_SUPPORT = f(), !a.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
|
|
476
476
|
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
477
477
|
);
|
|
478
478
|
function f() {
|
|
@@ -510,30 +510,30 @@ ht.write = function(o, r, p, c, u, f) {
|
|
|
510
510
|
throw new TypeError(
|
|
511
511
|
'The "string" argument must be of type string. Received type number'
|
|
512
512
|
);
|
|
513
|
-
return
|
|
513
|
+
return g(i);
|
|
514
514
|
}
|
|
515
515
|
return x(i, t, e);
|
|
516
516
|
}
|
|
517
517
|
a.poolSize = 8192;
|
|
518
518
|
function x(i, t, e) {
|
|
519
519
|
if (typeof i == "string")
|
|
520
|
-
return
|
|
520
|
+
return y(i, t);
|
|
521
521
|
if (ArrayBuffer.isView(i))
|
|
522
|
-
return
|
|
522
|
+
return E(i);
|
|
523
523
|
if (i == null)
|
|
524
524
|
throw new TypeError(
|
|
525
525
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof i
|
|
526
526
|
);
|
|
527
527
|
if (T(i, ArrayBuffer) || i && T(i.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (T(i, SharedArrayBuffer) || i && T(i.buffer, SharedArrayBuffer)))
|
|
528
|
-
return
|
|
528
|
+
return U(i, t, e);
|
|
529
529
|
if (typeof i == "number")
|
|
530
530
|
throw new TypeError(
|
|
531
531
|
'The "value" argument must not be of type number. Received type number'
|
|
532
532
|
);
|
|
533
|
-
var
|
|
534
|
-
if (
|
|
535
|
-
return a.from(
|
|
536
|
-
var s =
|
|
533
|
+
var o = i.valueOf && i.valueOf();
|
|
534
|
+
if (o != null && o !== i)
|
|
535
|
+
return a.from(o, t, e);
|
|
536
|
+
var s = R(i);
|
|
537
537
|
if (s)
|
|
538
538
|
return s;
|
|
539
539
|
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof i[Symbol.toPrimitive] == "function")
|
|
@@ -555,62 +555,62 @@ ht.write = function(o, r, p, c, u, f) {
|
|
|
555
555
|
if (i < 0)
|
|
556
556
|
throw new RangeError('The value "' + i + '" is invalid for option "size"');
|
|
557
557
|
}
|
|
558
|
-
function
|
|
558
|
+
function v(i, t, e) {
|
|
559
559
|
return d(i), i <= 0 ? l(i) : t !== void 0 ? typeof e == "string" ? l(i).fill(t, e) : l(i).fill(t) : l(i);
|
|
560
560
|
}
|
|
561
561
|
a.alloc = function(i, t, e) {
|
|
562
|
-
return
|
|
562
|
+
return v(i, t, e);
|
|
563
563
|
};
|
|
564
|
-
function
|
|
565
|
-
return d(i), l(i < 0 ? 0 :
|
|
564
|
+
function g(i) {
|
|
565
|
+
return d(i), l(i < 0 ? 0 : $(i) | 0);
|
|
566
566
|
}
|
|
567
567
|
a.allocUnsafe = function(i) {
|
|
568
|
-
return
|
|
568
|
+
return g(i);
|
|
569
569
|
}, a.allocUnsafeSlow = function(i) {
|
|
570
|
-
return
|
|
570
|
+
return g(i);
|
|
571
571
|
};
|
|
572
|
-
function
|
|
572
|
+
function y(i, t) {
|
|
573
573
|
if ((typeof t != "string" || t === "") && (t = "utf8"), !a.isEncoding(t))
|
|
574
574
|
throw new TypeError("Unknown encoding: " + t);
|
|
575
|
-
var e =
|
|
576
|
-
return s !== e && (
|
|
575
|
+
var e = vt(i, t) | 0, o = l(e), s = o.write(i, t);
|
|
576
|
+
return s !== e && (o = o.slice(0, s)), o;
|
|
577
577
|
}
|
|
578
|
-
function
|
|
579
|
-
for (var t = i.length < 0 ? 0 :
|
|
580
|
-
e[
|
|
578
|
+
function b(i) {
|
|
579
|
+
for (var t = i.length < 0 ? 0 : $(i.length) | 0, e = l(t), o = 0; o < t; o += 1)
|
|
580
|
+
e[o] = i[o] & 255;
|
|
581
581
|
return e;
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function E(i) {
|
|
584
584
|
if (T(i, Uint8Array)) {
|
|
585
585
|
var t = new Uint8Array(i);
|
|
586
|
-
return
|
|
586
|
+
return U(t.buffer, t.byteOffset, t.byteLength);
|
|
587
587
|
}
|
|
588
|
-
return
|
|
588
|
+
return b(i);
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function U(i, t, e) {
|
|
591
591
|
if (t < 0 || i.byteLength < t)
|
|
592
592
|
throw new RangeError('"offset" is outside of buffer bounds');
|
|
593
593
|
if (i.byteLength < t + (e || 0))
|
|
594
594
|
throw new RangeError('"length" is outside of buffer bounds');
|
|
595
|
-
var
|
|
596
|
-
return t === void 0 && e === void 0 ?
|
|
595
|
+
var o;
|
|
596
|
+
return t === void 0 && e === void 0 ? o = new Uint8Array(i) : e === void 0 ? o = new Uint8Array(i, t) : o = new Uint8Array(i, t, e), Object.setPrototypeOf(o, a.prototype), o;
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function R(i) {
|
|
599
599
|
if (a.isBuffer(i)) {
|
|
600
|
-
var t =
|
|
600
|
+
var t = $(i.length) | 0, e = l(t);
|
|
601
601
|
return e.length === 0 || i.copy(e, 0, 0, t), e;
|
|
602
602
|
}
|
|
603
603
|
if (i.length !== void 0)
|
|
604
|
-
return typeof i.length != "number" ||
|
|
604
|
+
return typeof i.length != "number" || nt(i.length) ? l(0) : b(i);
|
|
605
605
|
if (i.type === "Buffer" && Array.isArray(i.data))
|
|
606
|
-
return
|
|
606
|
+
return b(i.data);
|
|
607
607
|
}
|
|
608
|
-
function
|
|
608
|
+
function $(i) {
|
|
609
609
|
if (i >= u)
|
|
610
610
|
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + u.toString(16) + " bytes");
|
|
611
611
|
return i | 0;
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function G(i) {
|
|
614
614
|
return +i != i && (i = 0), a.alloc(+i);
|
|
615
615
|
}
|
|
616
616
|
a.isBuffer = function(t) {
|
|
@@ -622,12 +622,12 @@ ht.write = function(o, r, p, c, u, f) {
|
|
|
622
622
|
);
|
|
623
623
|
if (t === e)
|
|
624
624
|
return 0;
|
|
625
|
-
for (var
|
|
625
|
+
for (var o = t.length, s = e.length, m = 0, h = Math.min(o, s); m < h; ++m)
|
|
626
626
|
if (t[m] !== e[m]) {
|
|
627
|
-
|
|
627
|
+
o = t[m], s = e[m];
|
|
628
628
|
break;
|
|
629
629
|
}
|
|
630
|
-
return
|
|
630
|
+
return o < s ? -1 : s < o ? 1 : 0;
|
|
631
631
|
}, a.isEncoding = function(t) {
|
|
632
632
|
switch (String(t).toLowerCase()) {
|
|
633
633
|
case "hex":
|
|
@@ -650,13 +650,13 @@ ht.write = function(o, r, p, c, u, f) {
|
|
|
650
650
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
651
651
|
if (t.length === 0)
|
|
652
652
|
return a.alloc(0);
|
|
653
|
-
var
|
|
653
|
+
var o;
|
|
654
654
|
if (e === void 0)
|
|
655
|
-
for (e = 0,
|
|
656
|
-
e += t[
|
|
655
|
+
for (e = 0, o = 0; o < t.length; ++o)
|
|
656
|
+
e += t[o].length;
|
|
657
657
|
var s = a.allocUnsafe(e), m = 0;
|
|
658
|
-
for (
|
|
659
|
-
var h = t[
|
|
658
|
+
for (o = 0; o < t.length; ++o) {
|
|
659
|
+
var h = t[o];
|
|
660
660
|
if (T(h, Uint8Array))
|
|
661
661
|
m + h.length > s.length ? a.from(h).copy(s, m) : Uint8Array.prototype.set.call(
|
|
662
662
|
s,
|
|
@@ -671,7 +671,7 @@ ht.write = function(o, r, p, c, u, f) {
|
|
|
671
671
|
}
|
|
672
672
|
return s;
|
|
673
673
|
};
|
|
674
|
-
function
|
|
674
|
+
function vt(i, t) {
|
|
675
675
|
if (a.isBuffer(i))
|
|
676
676
|
return i.length;
|
|
677
677
|
if (ArrayBuffer.isView(i) || T(i, ArrayBuffer))
|
|
@@ -680,8 +680,8 @@ ht.write = function(o, r, p, c, u, f) {
|
|
|
680
680
|
throw new TypeError(
|
|
681
681
|
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof i
|
|
682
682
|
);
|
|
683
|
-
var e = i.length,
|
|
684
|
-
if (!
|
|
683
|
+
var e = i.length, o = arguments.length > 2 && arguments[2] === !0;
|
|
684
|
+
if (!o && e === 0)
|
|
685
685
|
return 0;
|
|
686
686
|
for (var s = !1; ; )
|
|
687
687
|
switch (t) {
|
|
@@ -691,7 +691,7 @@ ht.write = function(o, r, p, c, u, f) {
|
|
|
691
691
|
return e;
|
|
692
692
|
case "utf8":
|
|
693
693
|
case "utf-8":
|
|
694
|
-
return
|
|
694
|
+
return rt(i).length;
|
|
695
695
|
case "ucs2":
|
|
696
696
|
case "ucs-2":
|
|
697
697
|
case "utf16le":
|
|
@@ -700,105 +700,105 @@ ht.write = function(o, r, p, c, u, f) {
|
|
|
700
700
|
case "hex":
|
|
701
701
|
return e >>> 1;
|
|
702
702
|
case "base64":
|
|
703
|
-
return
|
|
703
|
+
return Bt(i).length;
|
|
704
704
|
default:
|
|
705
705
|
if (s)
|
|
706
|
-
return
|
|
706
|
+
return o ? -1 : rt(i).length;
|
|
707
707
|
t = ("" + t).toLowerCase(), s = !0;
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
|
-
a.byteLength =
|
|
711
|
-
function
|
|
712
|
-
var
|
|
710
|
+
a.byteLength = vt;
|
|
711
|
+
function fe(i, t, e) {
|
|
712
|
+
var o = !1;
|
|
713
713
|
if ((t === void 0 || t < 0) && (t = 0), t > this.length || ((e === void 0 || e > this.length) && (e = this.length), e <= 0) || (e >>>= 0, t >>>= 0, e <= t))
|
|
714
714
|
return "";
|
|
715
715
|
for (i || (i = "utf8"); ; )
|
|
716
716
|
switch (i) {
|
|
717
717
|
case "hex":
|
|
718
|
-
return
|
|
718
|
+
return Ee(this, t, e);
|
|
719
719
|
case "utf8":
|
|
720
720
|
case "utf-8":
|
|
721
|
-
return
|
|
721
|
+
return _t(this, t, e);
|
|
722
722
|
case "ascii":
|
|
723
|
-
return
|
|
723
|
+
return ve(this, t, e);
|
|
724
724
|
case "latin1":
|
|
725
725
|
case "binary":
|
|
726
|
-
return
|
|
726
|
+
return be(this, t, e);
|
|
727
727
|
case "base64":
|
|
728
|
-
return
|
|
728
|
+
return ge(this, t, e);
|
|
729
729
|
case "ucs2":
|
|
730
730
|
case "ucs-2":
|
|
731
731
|
case "utf16le":
|
|
732
732
|
case "utf-16le":
|
|
733
|
-
return
|
|
733
|
+
return _e(this, t, e);
|
|
734
734
|
default:
|
|
735
|
-
if (
|
|
735
|
+
if (o)
|
|
736
736
|
throw new TypeError("Unknown encoding: " + i);
|
|
737
|
-
i = (i + "").toLowerCase(),
|
|
737
|
+
i = (i + "").toLowerCase(), o = !0;
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
740
|
a.prototype._isBuffer = !0;
|
|
741
|
-
function
|
|
742
|
-
var
|
|
743
|
-
i[t] = i[e], i[e] =
|
|
741
|
+
function M(i, t, e) {
|
|
742
|
+
var o = i[t];
|
|
743
|
+
i[t] = i[e], i[e] = o;
|
|
744
744
|
}
|
|
745
745
|
a.prototype.swap16 = function() {
|
|
746
746
|
var t = this.length;
|
|
747
747
|
if (t % 2 !== 0)
|
|
748
748
|
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
749
749
|
for (var e = 0; e < t; e += 2)
|
|
750
|
-
|
|
750
|
+
M(this, e, e + 1);
|
|
751
751
|
return this;
|
|
752
752
|
}, a.prototype.swap32 = function() {
|
|
753
753
|
var t = this.length;
|
|
754
754
|
if (t % 4 !== 0)
|
|
755
755
|
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
756
756
|
for (var e = 0; e < t; e += 4)
|
|
757
|
-
|
|
757
|
+
M(this, e, e + 3), M(this, e + 1, e + 2);
|
|
758
758
|
return this;
|
|
759
759
|
}, a.prototype.swap64 = function() {
|
|
760
760
|
var t = this.length;
|
|
761
761
|
if (t % 8 !== 0)
|
|
762
762
|
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
763
763
|
for (var e = 0; e < t; e += 8)
|
|
764
|
-
|
|
764
|
+
M(this, e, e + 7), M(this, e + 1, e + 6), M(this, e + 2, e + 5), M(this, e + 3, e + 4);
|
|
765
765
|
return this;
|
|
766
766
|
}, a.prototype.toString = function() {
|
|
767
767
|
var t = this.length;
|
|
768
|
-
return t === 0 ? "" : arguments.length === 0 ?
|
|
768
|
+
return t === 0 ? "" : arguments.length === 0 ? _t(this, 0, t) : fe.apply(this, arguments);
|
|
769
769
|
}, a.prototype.toLocaleString = a.prototype.toString, a.prototype.equals = function(t) {
|
|
770
770
|
if (!a.isBuffer(t))
|
|
771
771
|
throw new TypeError("Argument must be a Buffer");
|
|
772
772
|
return this === t ? !0 : a.compare(this, t) === 0;
|
|
773
773
|
}, a.prototype.inspect = function() {
|
|
774
|
-
var t = "", e =
|
|
774
|
+
var t = "", e = n.INSPECT_MAX_BYTES;
|
|
775
775
|
return t = this.toString("hex", 0, e).replace(/(.{2})/g, "$1 ").trim(), this.length > e && (t += " ... "), "<Buffer " + t + ">";
|
|
776
|
-
}, c && (a.prototype[c] = a.prototype.inspect), a.prototype.compare = function(t, e,
|
|
776
|
+
}, c && (a.prototype[c] = a.prototype.inspect), a.prototype.compare = function(t, e, o, s, m) {
|
|
777
777
|
if (T(t, Uint8Array) && (t = a.from(t, t.offset, t.byteLength)), !a.isBuffer(t))
|
|
778
778
|
throw new TypeError(
|
|
779
779
|
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof t
|
|
780
780
|
);
|
|
781
|
-
if (e === void 0 && (e = 0),
|
|
781
|
+
if (e === void 0 && (e = 0), o === void 0 && (o = t ? t.length : 0), s === void 0 && (s = 0), m === void 0 && (m = this.length), e < 0 || o > t.length || s < 0 || m > this.length)
|
|
782
782
|
throw new RangeError("out of range index");
|
|
783
|
-
if (s >= m && e >=
|
|
783
|
+
if (s >= m && e >= o)
|
|
784
784
|
return 0;
|
|
785
785
|
if (s >= m)
|
|
786
786
|
return -1;
|
|
787
|
-
if (e >=
|
|
787
|
+
if (e >= o)
|
|
788
788
|
return 1;
|
|
789
|
-
if (e >>>= 0,
|
|
789
|
+
if (e >>>= 0, o >>>= 0, s >>>= 0, m >>>= 0, this === t)
|
|
790
790
|
return 0;
|
|
791
|
-
for (var h = m - s,
|
|
792
|
-
if (
|
|
793
|
-
h =
|
|
791
|
+
for (var h = m - s, _ = o - e, F = Math.min(h, _), A = this.slice(s, m), B = t.slice(e, o), S = 0; S < F; ++S)
|
|
792
|
+
if (A[S] !== B[S]) {
|
|
793
|
+
h = A[S], _ = B[S];
|
|
794
794
|
break;
|
|
795
795
|
}
|
|
796
|
-
return h <
|
|
796
|
+
return h < _ ? -1 : _ < h ? 1 : 0;
|
|
797
797
|
};
|
|
798
|
-
function
|
|
798
|
+
function bt(i, t, e, o, s) {
|
|
799
799
|
if (i.length === 0)
|
|
800
800
|
return -1;
|
|
801
|
-
if (typeof e == "string" ? (
|
|
801
|
+
if (typeof e == "string" ? (o = e, e = 0) : e > 2147483647 ? e = 2147483647 : e < -2147483648 && (e = -2147483648), e = +e, nt(e) && (e = s ? 0 : i.length - 1), e < 0 && (e = i.length + e), e >= i.length) {
|
|
802
802
|
if (s)
|
|
803
803
|
return -1;
|
|
804
804
|
e = i.length - 1;
|
|
@@ -807,109 +807,109 @@ ht.write = function(o, r, p, c, u, f) {
|
|
|
807
807
|
e = 0;
|
|
808
808
|
else
|
|
809
809
|
return -1;
|
|
810
|
-
if (typeof t == "string" && (t = a.from(t,
|
|
811
|
-
return t.length === 0 ? -1 :
|
|
810
|
+
if (typeof t == "string" && (t = a.from(t, o)), a.isBuffer(t))
|
|
811
|
+
return t.length === 0 ? -1 : Et(i, t, e, o, s);
|
|
812
812
|
if (typeof t == "number")
|
|
813
|
-
return t = t & 255, typeof Uint8Array.prototype.indexOf == "function" ? s ? Uint8Array.prototype.indexOf.call(i, t, e) : Uint8Array.prototype.lastIndexOf.call(i, t, e) :
|
|
813
|
+
return t = t & 255, typeof Uint8Array.prototype.indexOf == "function" ? s ? Uint8Array.prototype.indexOf.call(i, t, e) : Uint8Array.prototype.lastIndexOf.call(i, t, e) : Et(i, [t], e, o, s);
|
|
814
814
|
throw new TypeError("val must be string, number or Buffer");
|
|
815
815
|
}
|
|
816
|
-
function
|
|
817
|
-
var m = 1, h = i.length,
|
|
818
|
-
if (
|
|
816
|
+
function Et(i, t, e, o, s) {
|
|
817
|
+
var m = 1, h = i.length, _ = t.length;
|
|
818
|
+
if (o !== void 0 && (o = String(o).toLowerCase(), o === "ucs2" || o === "ucs-2" || o === "utf16le" || o === "utf-16le")) {
|
|
819
819
|
if (i.length < 2 || t.length < 2)
|
|
820
820
|
return -1;
|
|
821
|
-
m = 2, h /= 2,
|
|
821
|
+
m = 2, h /= 2, _ /= 2, e /= 2;
|
|
822
822
|
}
|
|
823
|
-
function
|
|
824
|
-
return m === 1 ?
|
|
823
|
+
function F(jt, It) {
|
|
824
|
+
return m === 1 ? jt[It] : jt.readUInt16BE(It * m);
|
|
825
825
|
}
|
|
826
|
-
var
|
|
826
|
+
var A;
|
|
827
827
|
if (s) {
|
|
828
|
-
var
|
|
829
|
-
for (
|
|
830
|
-
if (
|
|
831
|
-
if (
|
|
832
|
-
return
|
|
828
|
+
var B = -1;
|
|
829
|
+
for (A = e; A < h; A++)
|
|
830
|
+
if (F(i, A) === F(t, B === -1 ? 0 : A - B)) {
|
|
831
|
+
if (B === -1 && (B = A), A - B + 1 === _)
|
|
832
|
+
return B * m;
|
|
833
833
|
} else
|
|
834
|
-
|
|
834
|
+
B !== -1 && (A -= A - B), B = -1;
|
|
835
835
|
} else
|
|
836
|
-
for (e +
|
|
837
|
-
for (var
|
|
838
|
-
if (
|
|
839
|
-
|
|
836
|
+
for (e + _ > h && (e = h - _), A = e; A >= 0; A--) {
|
|
837
|
+
for (var S = !0, V = 0; V < _; V++)
|
|
838
|
+
if (F(i, A + V) !== F(t, V)) {
|
|
839
|
+
S = !1;
|
|
840
840
|
break;
|
|
841
841
|
}
|
|
842
|
-
if (
|
|
843
|
-
return
|
|
842
|
+
if (S)
|
|
843
|
+
return A;
|
|
844
844
|
}
|
|
845
845
|
return -1;
|
|
846
846
|
}
|
|
847
|
-
a.prototype.includes = function(t, e,
|
|
848
|
-
return this.indexOf(t, e,
|
|
849
|
-
}, a.prototype.indexOf = function(t, e,
|
|
850
|
-
return
|
|
851
|
-
}, a.prototype.lastIndexOf = function(t, e,
|
|
852
|
-
return
|
|
847
|
+
a.prototype.includes = function(t, e, o) {
|
|
848
|
+
return this.indexOf(t, e, o) !== -1;
|
|
849
|
+
}, a.prototype.indexOf = function(t, e, o) {
|
|
850
|
+
return bt(this, t, e, o, !0);
|
|
851
|
+
}, a.prototype.lastIndexOf = function(t, e, o) {
|
|
852
|
+
return bt(this, t, e, o, !1);
|
|
853
853
|
};
|
|
854
|
-
function
|
|
854
|
+
function me(i, t, e, o) {
|
|
855
855
|
e = Number(e) || 0;
|
|
856
856
|
var s = i.length - e;
|
|
857
|
-
|
|
857
|
+
o ? (o = Number(o), o > s && (o = s)) : o = s;
|
|
858
858
|
var m = t.length;
|
|
859
|
-
|
|
860
|
-
for (var h = 0; h <
|
|
861
|
-
var
|
|
862
|
-
if (
|
|
859
|
+
o > m / 2 && (o = m / 2);
|
|
860
|
+
for (var h = 0; h < o; ++h) {
|
|
861
|
+
var _ = parseInt(t.substr(h * 2, 2), 16);
|
|
862
|
+
if (nt(_))
|
|
863
863
|
return h;
|
|
864
|
-
i[e + h] =
|
|
864
|
+
i[e + h] = _;
|
|
865
865
|
}
|
|
866
866
|
return h;
|
|
867
867
|
}
|
|
868
|
-
function
|
|
869
|
-
return
|
|
868
|
+
function he(i, t, e, o) {
|
|
869
|
+
return K(rt(t, i.length - e), i, e, o);
|
|
870
870
|
}
|
|
871
|
-
function
|
|
872
|
-
return
|
|
871
|
+
function xe(i, t, e, o) {
|
|
872
|
+
return K(Se(t), i, e, o);
|
|
873
873
|
}
|
|
874
|
-
function
|
|
875
|
-
return
|
|
874
|
+
function de(i, t, e, o) {
|
|
875
|
+
return K(Bt(t), i, e, o);
|
|
876
876
|
}
|
|
877
|
-
function
|
|
878
|
-
return
|
|
877
|
+
function we(i, t, e, o) {
|
|
878
|
+
return K(ke(t, i.length - e), i, e, o);
|
|
879
879
|
}
|
|
880
|
-
a.prototype.write = function(t, e,
|
|
880
|
+
a.prototype.write = function(t, e, o, s) {
|
|
881
881
|
if (e === void 0)
|
|
882
|
-
s = "utf8",
|
|
883
|
-
else if (
|
|
884
|
-
s = e,
|
|
882
|
+
s = "utf8", o = this.length, e = 0;
|
|
883
|
+
else if (o === void 0 && typeof e == "string")
|
|
884
|
+
s = e, o = this.length, e = 0;
|
|
885
885
|
else if (isFinite(e))
|
|
886
|
-
e = e >>> 0, isFinite(
|
|
886
|
+
e = e >>> 0, isFinite(o) ? (o = o >>> 0, s === void 0 && (s = "utf8")) : (s = o, o = void 0);
|
|
887
887
|
else
|
|
888
888
|
throw new Error(
|
|
889
889
|
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
890
890
|
);
|
|
891
891
|
var m = this.length - e;
|
|
892
|
-
if ((
|
|
892
|
+
if ((o === void 0 || o > m) && (o = m), t.length > 0 && (o < 0 || e < 0) || e > this.length)
|
|
893
893
|
throw new RangeError("Attempt to write outside buffer bounds");
|
|
894
894
|
s || (s = "utf8");
|
|
895
895
|
for (var h = !1; ; )
|
|
896
896
|
switch (s) {
|
|
897
897
|
case "hex":
|
|
898
|
-
return
|
|
898
|
+
return me(this, t, e, o);
|
|
899
899
|
case "utf8":
|
|
900
900
|
case "utf-8":
|
|
901
|
-
return
|
|
901
|
+
return he(this, t, e, o);
|
|
902
902
|
case "ascii":
|
|
903
903
|
case "latin1":
|
|
904
904
|
case "binary":
|
|
905
|
-
return
|
|
905
|
+
return xe(this, t, e, o);
|
|
906
906
|
case "base64":
|
|
907
|
-
return
|
|
907
|
+
return de(this, t, e, o);
|
|
908
908
|
case "ucs2":
|
|
909
909
|
case "ucs-2":
|
|
910
910
|
case "utf16le":
|
|
911
911
|
case "utf-16le":
|
|
912
|
-
return
|
|
912
|
+
return we(this, t, e, o);
|
|
913
913
|
default:
|
|
914
914
|
if (h)
|
|
915
915
|
throw new TypeError("Unknown encoding: " + s);
|
|
@@ -921,243 +921,243 @@ ht.write = function(o, r, p, c, u, f) {
|
|
|
921
921
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
922
922
|
};
|
|
923
923
|
};
|
|
924
|
-
function
|
|
924
|
+
function ge(i, t, e) {
|
|
925
925
|
return t === 0 && e === i.length ? r.fromByteArray(i) : r.fromByteArray(i.slice(t, e));
|
|
926
926
|
}
|
|
927
|
-
function
|
|
927
|
+
function _t(i, t, e) {
|
|
928
928
|
e = Math.min(i.length, e);
|
|
929
|
-
for (var
|
|
930
|
-
var m = i[s], h = null,
|
|
931
|
-
if (s +
|
|
932
|
-
var
|
|
933
|
-
switch (
|
|
929
|
+
for (var o = [], s = t; s < e; ) {
|
|
930
|
+
var m = i[s], h = null, _ = m > 239 ? 4 : m > 223 ? 3 : m > 191 ? 2 : 1;
|
|
931
|
+
if (s + _ <= e) {
|
|
932
|
+
var F, A, B, S;
|
|
933
|
+
switch (_) {
|
|
934
934
|
case 1:
|
|
935
935
|
m < 128 && (h = m);
|
|
936
936
|
break;
|
|
937
937
|
case 2:
|
|
938
|
-
|
|
938
|
+
F = i[s + 1], (F & 192) === 128 && (S = (m & 31) << 6 | F & 63, S > 127 && (h = S));
|
|
939
939
|
break;
|
|
940
940
|
case 3:
|
|
941
|
-
|
|
941
|
+
F = i[s + 1], A = i[s + 2], (F & 192) === 128 && (A & 192) === 128 && (S = (m & 15) << 12 | (F & 63) << 6 | A & 63, S > 2047 && (S < 55296 || S > 57343) && (h = S));
|
|
942
942
|
break;
|
|
943
943
|
case 4:
|
|
944
|
-
|
|
944
|
+
F = i[s + 1], A = i[s + 2], B = i[s + 3], (F & 192) === 128 && (A & 192) === 128 && (B & 192) === 128 && (S = (m & 15) << 18 | (F & 63) << 12 | (A & 63) << 6 | B & 63, S > 65535 && S < 1114112 && (h = S));
|
|
945
945
|
}
|
|
946
946
|
}
|
|
947
|
-
h === null ? (h = 65533,
|
|
947
|
+
h === null ? (h = 65533, _ = 1) : h > 65535 && (h -= 65536, o.push(h >>> 10 & 1023 | 55296), h = 56320 | h & 1023), o.push(h), s += _;
|
|
948
948
|
}
|
|
949
|
-
return
|
|
949
|
+
return ye(o);
|
|
950
950
|
}
|
|
951
|
-
var
|
|
952
|
-
function
|
|
951
|
+
var Ft = 4096;
|
|
952
|
+
function ye(i) {
|
|
953
953
|
var t = i.length;
|
|
954
|
-
if (t <=
|
|
954
|
+
if (t <= Ft)
|
|
955
955
|
return String.fromCharCode.apply(String, i);
|
|
956
|
-
for (var e = "",
|
|
956
|
+
for (var e = "", o = 0; o < t; )
|
|
957
957
|
e += String.fromCharCode.apply(
|
|
958
958
|
String,
|
|
959
|
-
i.slice(
|
|
959
|
+
i.slice(o, o += Ft)
|
|
960
960
|
);
|
|
961
961
|
return e;
|
|
962
962
|
}
|
|
963
|
-
function
|
|
964
|
-
var
|
|
963
|
+
function ve(i, t, e) {
|
|
964
|
+
var o = "";
|
|
965
965
|
e = Math.min(i.length, e);
|
|
966
966
|
for (var s = t; s < e; ++s)
|
|
967
|
-
|
|
968
|
-
return
|
|
967
|
+
o += String.fromCharCode(i[s] & 127);
|
|
968
|
+
return o;
|
|
969
969
|
}
|
|
970
|
-
function
|
|
971
|
-
var
|
|
970
|
+
function be(i, t, e) {
|
|
971
|
+
var o = "";
|
|
972
972
|
e = Math.min(i.length, e);
|
|
973
973
|
for (var s = t; s < e; ++s)
|
|
974
|
-
|
|
975
|
-
return
|
|
974
|
+
o += String.fromCharCode(i[s]);
|
|
975
|
+
return o;
|
|
976
976
|
}
|
|
977
|
-
function
|
|
978
|
-
var
|
|
979
|
-
(!t || t < 0) && (t = 0), (!e || e < 0 || e >
|
|
977
|
+
function Ee(i, t, e) {
|
|
978
|
+
var o = i.length;
|
|
979
|
+
(!t || t < 0) && (t = 0), (!e || e < 0 || e > o) && (e = o);
|
|
980
980
|
for (var s = "", m = t; m < e; ++m)
|
|
981
|
-
s +=
|
|
981
|
+
s += Be[i[m]];
|
|
982
982
|
return s;
|
|
983
983
|
}
|
|
984
|
-
function
|
|
985
|
-
for (var
|
|
986
|
-
s += String.fromCharCode(
|
|
984
|
+
function _e(i, t, e) {
|
|
985
|
+
for (var o = i.slice(t, e), s = "", m = 0; m < o.length - 1; m += 2)
|
|
986
|
+
s += String.fromCharCode(o[m] + o[m + 1] * 256);
|
|
987
987
|
return s;
|
|
988
988
|
}
|
|
989
989
|
a.prototype.slice = function(t, e) {
|
|
990
|
-
var
|
|
991
|
-
t = ~~t, e = e === void 0 ?
|
|
990
|
+
var o = this.length;
|
|
991
|
+
t = ~~t, e = e === void 0 ? o : ~~e, t < 0 ? (t += o, t < 0 && (t = 0)) : t > o && (t = o), e < 0 ? (e += o, e < 0 && (e = 0)) : e > o && (e = o), e < t && (e = t);
|
|
992
992
|
var s = this.subarray(t, e);
|
|
993
993
|
return Object.setPrototypeOf(s, a.prototype), s;
|
|
994
994
|
};
|
|
995
|
-
function
|
|
995
|
+
function k(i, t, e) {
|
|
996
996
|
if (i % 1 !== 0 || i < 0)
|
|
997
997
|
throw new RangeError("offset is not uint");
|
|
998
998
|
if (i + t > e)
|
|
999
999
|
throw new RangeError("Trying to access beyond buffer length");
|
|
1000
1000
|
}
|
|
1001
|
-
a.prototype.readUintLE = a.prototype.readUIntLE = function(t, e,
|
|
1002
|
-
t = t >>> 0, e = e >>> 0,
|
|
1001
|
+
a.prototype.readUintLE = a.prototype.readUIntLE = function(t, e, o) {
|
|
1002
|
+
t = t >>> 0, e = e >>> 0, o || k(t, e, this.length);
|
|
1003
1003
|
for (var s = this[t], m = 1, h = 0; ++h < e && (m *= 256); )
|
|
1004
1004
|
s += this[t + h] * m;
|
|
1005
1005
|
return s;
|
|
1006
|
-
}, a.prototype.readUintBE = a.prototype.readUIntBE = function(t, e,
|
|
1007
|
-
t = t >>> 0, e = e >>> 0,
|
|
1006
|
+
}, a.prototype.readUintBE = a.prototype.readUIntBE = function(t, e, o) {
|
|
1007
|
+
t = t >>> 0, e = e >>> 0, o || k(t, e, this.length);
|
|
1008
1008
|
for (var s = this[t + --e], m = 1; e > 0 && (m *= 256); )
|
|
1009
1009
|
s += this[t + --e] * m;
|
|
1010
1010
|
return s;
|
|
1011
1011
|
}, a.prototype.readUint8 = a.prototype.readUInt8 = function(t, e) {
|
|
1012
|
-
return t = t >>> 0, e ||
|
|
1012
|
+
return t = t >>> 0, e || k(t, 1, this.length), this[t];
|
|
1013
1013
|
}, a.prototype.readUint16LE = a.prototype.readUInt16LE = function(t, e) {
|
|
1014
|
-
return t = t >>> 0, e ||
|
|
1014
|
+
return t = t >>> 0, e || k(t, 2, this.length), this[t] | this[t + 1] << 8;
|
|
1015
1015
|
}, a.prototype.readUint16BE = a.prototype.readUInt16BE = function(t, e) {
|
|
1016
|
-
return t = t >>> 0, e ||
|
|
1016
|
+
return t = t >>> 0, e || k(t, 2, this.length), this[t] << 8 | this[t + 1];
|
|
1017
1017
|
}, a.prototype.readUint32LE = a.prototype.readUInt32LE = function(t, e) {
|
|
1018
|
-
return t = t >>> 0, e ||
|
|
1018
|
+
return t = t >>> 0, e || k(t, 4, this.length), (this[t] | this[t + 1] << 8 | this[t + 2] << 16) + this[t + 3] * 16777216;
|
|
1019
1019
|
}, a.prototype.readUint32BE = a.prototype.readUInt32BE = function(t, e) {
|
|
1020
|
-
return t = t >>> 0, e ||
|
|
1021
|
-
}, a.prototype.readIntLE = function(t, e,
|
|
1022
|
-
t = t >>> 0, e = e >>> 0,
|
|
1020
|
+
return t = t >>> 0, e || k(t, 4, this.length), this[t] * 16777216 + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]);
|
|
1021
|
+
}, a.prototype.readIntLE = function(t, e, o) {
|
|
1022
|
+
t = t >>> 0, e = e >>> 0, o || k(t, e, this.length);
|
|
1023
1023
|
for (var s = this[t], m = 1, h = 0; ++h < e && (m *= 256); )
|
|
1024
1024
|
s += this[t + h] * m;
|
|
1025
1025
|
return m *= 128, s >= m && (s -= Math.pow(2, 8 * e)), s;
|
|
1026
|
-
}, a.prototype.readIntBE = function(t, e,
|
|
1027
|
-
t = t >>> 0, e = e >>> 0,
|
|
1026
|
+
}, a.prototype.readIntBE = function(t, e, o) {
|
|
1027
|
+
t = t >>> 0, e = e >>> 0, o || k(t, e, this.length);
|
|
1028
1028
|
for (var s = e, m = 1, h = this[t + --s]; s > 0 && (m *= 256); )
|
|
1029
1029
|
h += this[t + --s] * m;
|
|
1030
1030
|
return m *= 128, h >= m && (h -= Math.pow(2, 8 * e)), h;
|
|
1031
1031
|
}, a.prototype.readInt8 = function(t, e) {
|
|
1032
|
-
return t = t >>> 0, e ||
|
|
1032
|
+
return t = t >>> 0, e || k(t, 1, this.length), this[t] & 128 ? (255 - this[t] + 1) * -1 : this[t];
|
|
1033
1033
|
}, a.prototype.readInt16LE = function(t, e) {
|
|
1034
|
-
t = t >>> 0, e ||
|
|
1035
|
-
var
|
|
1036
|
-
return
|
|
1034
|
+
t = t >>> 0, e || k(t, 2, this.length);
|
|
1035
|
+
var o = this[t] | this[t + 1] << 8;
|
|
1036
|
+
return o & 32768 ? o | 4294901760 : o;
|
|
1037
1037
|
}, a.prototype.readInt16BE = function(t, e) {
|
|
1038
|
-
t = t >>> 0, e ||
|
|
1039
|
-
var
|
|
1040
|
-
return
|
|
1038
|
+
t = t >>> 0, e || k(t, 2, this.length);
|
|
1039
|
+
var o = this[t + 1] | this[t] << 8;
|
|
1040
|
+
return o & 32768 ? o | 4294901760 : o;
|
|
1041
1041
|
}, a.prototype.readInt32LE = function(t, e) {
|
|
1042
|
-
return t = t >>> 0, e ||
|
|
1042
|
+
return t = t >>> 0, e || k(t, 4, this.length), this[t] | this[t + 1] << 8 | this[t + 2] << 16 | this[t + 3] << 24;
|
|
1043
1043
|
}, a.prototype.readInt32BE = function(t, e) {
|
|
1044
|
-
return t = t >>> 0, e ||
|
|
1044
|
+
return t = t >>> 0, e || k(t, 4, this.length), this[t] << 24 | this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3];
|
|
1045
1045
|
}, a.prototype.readFloatLE = function(t, e) {
|
|
1046
|
-
return t = t >>> 0, e ||
|
|
1046
|
+
return t = t >>> 0, e || k(t, 4, this.length), p.read(this, t, !0, 23, 4);
|
|
1047
1047
|
}, a.prototype.readFloatBE = function(t, e) {
|
|
1048
|
-
return t = t >>> 0, e ||
|
|
1048
|
+
return t = t >>> 0, e || k(t, 4, this.length), p.read(this, t, !1, 23, 4);
|
|
1049
1049
|
}, a.prototype.readDoubleLE = function(t, e) {
|
|
1050
|
-
return t = t >>> 0, e ||
|
|
1050
|
+
return t = t >>> 0, e || k(t, 8, this.length), p.read(this, t, !0, 52, 8);
|
|
1051
1051
|
}, a.prototype.readDoubleBE = function(t, e) {
|
|
1052
|
-
return t = t >>> 0, e ||
|
|
1052
|
+
return t = t >>> 0, e || k(t, 8, this.length), p.read(this, t, !1, 52, 8);
|
|
1053
1053
|
};
|
|
1054
|
-
function
|
|
1054
|
+
function j(i, t, e, o, s, m) {
|
|
1055
1055
|
if (!a.isBuffer(i))
|
|
1056
1056
|
throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
1057
1057
|
if (t > s || t < m)
|
|
1058
1058
|
throw new RangeError('"value" argument is out of bounds');
|
|
1059
|
-
if (e +
|
|
1059
|
+
if (e + o > i.length)
|
|
1060
1060
|
throw new RangeError("Index out of range");
|
|
1061
1061
|
}
|
|
1062
|
-
a.prototype.writeUintLE = a.prototype.writeUIntLE = function(t, e,
|
|
1063
|
-
if (t = +t, e = e >>> 0,
|
|
1064
|
-
var m = Math.pow(2, 8 *
|
|
1065
|
-
|
|
1062
|
+
a.prototype.writeUintLE = a.prototype.writeUIntLE = function(t, e, o, s) {
|
|
1063
|
+
if (t = +t, e = e >>> 0, o = o >>> 0, !s) {
|
|
1064
|
+
var m = Math.pow(2, 8 * o) - 1;
|
|
1065
|
+
j(this, t, e, o, m, 0);
|
|
1066
1066
|
}
|
|
1067
|
-
var h = 1,
|
|
1068
|
-
for (this[e] = t & 255; ++
|
|
1069
|
-
this[e +
|
|
1070
|
-
return e +
|
|
1071
|
-
}, a.prototype.writeUintBE = a.prototype.writeUIntBE = function(t, e,
|
|
1072
|
-
if (t = +t, e = e >>> 0,
|
|
1073
|
-
var m = Math.pow(2, 8 *
|
|
1074
|
-
|
|
1067
|
+
var h = 1, _ = 0;
|
|
1068
|
+
for (this[e] = t & 255; ++_ < o && (h *= 256); )
|
|
1069
|
+
this[e + _] = t / h & 255;
|
|
1070
|
+
return e + o;
|
|
1071
|
+
}, a.prototype.writeUintBE = a.prototype.writeUIntBE = function(t, e, o, s) {
|
|
1072
|
+
if (t = +t, e = e >>> 0, o = o >>> 0, !s) {
|
|
1073
|
+
var m = Math.pow(2, 8 * o) - 1;
|
|
1074
|
+
j(this, t, e, o, m, 0);
|
|
1075
1075
|
}
|
|
1076
|
-
var h =
|
|
1077
|
-
for (this[e + h] = t & 255; --h >= 0 && (
|
|
1078
|
-
this[e + h] = t /
|
|
1079
|
-
return e +
|
|
1080
|
-
}, a.prototype.writeUint8 = a.prototype.writeUInt8 = function(t, e,
|
|
1081
|
-
return t = +t, e = e >>> 0,
|
|
1082
|
-
}, a.prototype.writeUint16LE = a.prototype.writeUInt16LE = function(t, e,
|
|
1083
|
-
return t = +t, e = e >>> 0,
|
|
1084
|
-
}, a.prototype.writeUint16BE = a.prototype.writeUInt16BE = function(t, e,
|
|
1085
|
-
return t = +t, e = e >>> 0,
|
|
1086
|
-
}, a.prototype.writeUint32LE = a.prototype.writeUInt32LE = function(t, e,
|
|
1087
|
-
return t = +t, e = e >>> 0,
|
|
1088
|
-
}, a.prototype.writeUint32BE = a.prototype.writeUInt32BE = function(t, e,
|
|
1089
|
-
return t = +t, e = e >>> 0,
|
|
1090
|
-
}, a.prototype.writeIntLE = function(t, e,
|
|
1076
|
+
var h = o - 1, _ = 1;
|
|
1077
|
+
for (this[e + h] = t & 255; --h >= 0 && (_ *= 256); )
|
|
1078
|
+
this[e + h] = t / _ & 255;
|
|
1079
|
+
return e + o;
|
|
1080
|
+
}, a.prototype.writeUint8 = a.prototype.writeUInt8 = function(t, e, o) {
|
|
1081
|
+
return t = +t, e = e >>> 0, o || j(this, t, e, 1, 255, 0), this[e] = t & 255, e + 1;
|
|
1082
|
+
}, a.prototype.writeUint16LE = a.prototype.writeUInt16LE = function(t, e, o) {
|
|
1083
|
+
return t = +t, e = e >>> 0, o || j(this, t, e, 2, 65535, 0), this[e] = t & 255, this[e + 1] = t >>> 8, e + 2;
|
|
1084
|
+
}, a.prototype.writeUint16BE = a.prototype.writeUInt16BE = function(t, e, o) {
|
|
1085
|
+
return t = +t, e = e >>> 0, o || j(this, t, e, 2, 65535, 0), this[e] = t >>> 8, this[e + 1] = t & 255, e + 2;
|
|
1086
|
+
}, a.prototype.writeUint32LE = a.prototype.writeUInt32LE = function(t, e, o) {
|
|
1087
|
+
return t = +t, e = e >>> 0, o || j(this, t, e, 4, 4294967295, 0), this[e + 3] = t >>> 24, this[e + 2] = t >>> 16, this[e + 1] = t >>> 8, this[e] = t & 255, e + 4;
|
|
1088
|
+
}, a.prototype.writeUint32BE = a.prototype.writeUInt32BE = function(t, e, o) {
|
|
1089
|
+
return t = +t, e = e >>> 0, o || j(this, t, e, 4, 4294967295, 0), this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = t & 255, e + 4;
|
|
1090
|
+
}, a.prototype.writeIntLE = function(t, e, o, s) {
|
|
1091
1091
|
if (t = +t, e = e >>> 0, !s) {
|
|
1092
|
-
var m = Math.pow(2, 8 *
|
|
1093
|
-
|
|
1092
|
+
var m = Math.pow(2, 8 * o - 1);
|
|
1093
|
+
j(this, t, e, o, m - 1, -m);
|
|
1094
1094
|
}
|
|
1095
|
-
var h = 0,
|
|
1096
|
-
for (this[e] = t & 255; ++h <
|
|
1097
|
-
t < 0 &&
|
|
1098
|
-
return e +
|
|
1099
|
-
}, a.prototype.writeIntBE = function(t, e,
|
|
1095
|
+
var h = 0, _ = 1, F = 0;
|
|
1096
|
+
for (this[e] = t & 255; ++h < o && (_ *= 256); )
|
|
1097
|
+
t < 0 && F === 0 && this[e + h - 1] !== 0 && (F = 1), this[e + h] = (t / _ >> 0) - F & 255;
|
|
1098
|
+
return e + o;
|
|
1099
|
+
}, a.prototype.writeIntBE = function(t, e, o, s) {
|
|
1100
1100
|
if (t = +t, e = e >>> 0, !s) {
|
|
1101
|
-
var m = Math.pow(2, 8 *
|
|
1102
|
-
|
|
1101
|
+
var m = Math.pow(2, 8 * o - 1);
|
|
1102
|
+
j(this, t, e, o, m - 1, -m);
|
|
1103
1103
|
}
|
|
1104
|
-
var h =
|
|
1105
|
-
for (this[e + h] = t & 255; --h >= 0 && (
|
|
1106
|
-
t < 0 &&
|
|
1107
|
-
return e +
|
|
1108
|
-
}, a.prototype.writeInt8 = function(t, e,
|
|
1109
|
-
return t = +t, e = e >>> 0,
|
|
1110
|
-
}, a.prototype.writeInt16LE = function(t, e,
|
|
1111
|
-
return t = +t, e = e >>> 0,
|
|
1112
|
-
}, a.prototype.writeInt16BE = function(t, e,
|
|
1113
|
-
return t = +t, e = e >>> 0,
|
|
1114
|
-
}, a.prototype.writeInt32LE = function(t, e,
|
|
1115
|
-
return t = +t, e = e >>> 0,
|
|
1116
|
-
}, a.prototype.writeInt32BE = function(t, e,
|
|
1117
|
-
return t = +t, e = e >>> 0,
|
|
1104
|
+
var h = o - 1, _ = 1, F = 0;
|
|
1105
|
+
for (this[e + h] = t & 255; --h >= 0 && (_ *= 256); )
|
|
1106
|
+
t < 0 && F === 0 && this[e + h + 1] !== 0 && (F = 1), this[e + h] = (t / _ >> 0) - F & 255;
|
|
1107
|
+
return e + o;
|
|
1108
|
+
}, a.prototype.writeInt8 = function(t, e, o) {
|
|
1109
|
+
return t = +t, e = e >>> 0, o || j(this, t, e, 1, 127, -128), t < 0 && (t = 255 + t + 1), this[e] = t & 255, e + 1;
|
|
1110
|
+
}, a.prototype.writeInt16LE = function(t, e, o) {
|
|
1111
|
+
return t = +t, e = e >>> 0, o || j(this, t, e, 2, 32767, -32768), this[e] = t & 255, this[e + 1] = t >>> 8, e + 2;
|
|
1112
|
+
}, a.prototype.writeInt16BE = function(t, e, o) {
|
|
1113
|
+
return t = +t, e = e >>> 0, o || j(this, t, e, 2, 32767, -32768), this[e] = t >>> 8, this[e + 1] = t & 255, e + 2;
|
|
1114
|
+
}, a.prototype.writeInt32LE = function(t, e, o) {
|
|
1115
|
+
return t = +t, e = e >>> 0, o || j(this, t, e, 4, 2147483647, -2147483648), this[e] = t & 255, this[e + 1] = t >>> 8, this[e + 2] = t >>> 16, this[e + 3] = t >>> 24, e + 4;
|
|
1116
|
+
}, a.prototype.writeInt32BE = function(t, e, o) {
|
|
1117
|
+
return t = +t, e = e >>> 0, o || j(this, t, e, 4, 2147483647, -2147483648), t < 0 && (t = 4294967295 + t + 1), this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = t & 255, e + 4;
|
|
1118
1118
|
};
|
|
1119
|
-
function
|
|
1120
|
-
if (e +
|
|
1119
|
+
function At(i, t, e, o, s, m) {
|
|
1120
|
+
if (e + o > i.length)
|
|
1121
1121
|
throw new RangeError("Index out of range");
|
|
1122
1122
|
if (e < 0)
|
|
1123
1123
|
throw new RangeError("Index out of range");
|
|
1124
1124
|
}
|
|
1125
|
-
function
|
|
1126
|
-
return t = +t, e = e >>> 0, s ||
|
|
1125
|
+
function St(i, t, e, o, s) {
|
|
1126
|
+
return t = +t, e = e >>> 0, s || At(i, t, e, 4), p.write(i, t, e, o, 23, 4), e + 4;
|
|
1127
1127
|
}
|
|
1128
|
-
a.prototype.writeFloatLE = function(t, e,
|
|
1129
|
-
return
|
|
1130
|
-
}, a.prototype.writeFloatBE = function(t, e,
|
|
1131
|
-
return
|
|
1128
|
+
a.prototype.writeFloatLE = function(t, e, o) {
|
|
1129
|
+
return St(this, t, e, !0, o);
|
|
1130
|
+
}, a.prototype.writeFloatBE = function(t, e, o) {
|
|
1131
|
+
return St(this, t, e, !1, o);
|
|
1132
1132
|
};
|
|
1133
|
-
function
|
|
1134
|
-
return t = +t, e = e >>> 0, s ||
|
|
1135
|
-
}
|
|
1136
|
-
a.prototype.writeDoubleLE = function(t, e,
|
|
1137
|
-
return
|
|
1138
|
-
}, a.prototype.writeDoubleBE = function(t, e,
|
|
1139
|
-
return
|
|
1140
|
-
}, a.prototype.copy = function(t, e,
|
|
1133
|
+
function kt(i, t, e, o, s) {
|
|
1134
|
+
return t = +t, e = e >>> 0, s || At(i, t, e, 8), p.write(i, t, e, o, 52, 8), e + 8;
|
|
1135
|
+
}
|
|
1136
|
+
a.prototype.writeDoubleLE = function(t, e, o) {
|
|
1137
|
+
return kt(this, t, e, !0, o);
|
|
1138
|
+
}, a.prototype.writeDoubleBE = function(t, e, o) {
|
|
1139
|
+
return kt(this, t, e, !1, o);
|
|
1140
|
+
}, a.prototype.copy = function(t, e, o, s) {
|
|
1141
1141
|
if (!a.isBuffer(t))
|
|
1142
1142
|
throw new TypeError("argument should be a Buffer");
|
|
1143
|
-
if (
|
|
1143
|
+
if (o || (o = 0), !s && s !== 0 && (s = this.length), e >= t.length && (e = t.length), e || (e = 0), s > 0 && s < o && (s = o), s === o || t.length === 0 || this.length === 0)
|
|
1144
1144
|
return 0;
|
|
1145
1145
|
if (e < 0)
|
|
1146
1146
|
throw new RangeError("targetStart out of bounds");
|
|
1147
|
-
if (
|
|
1147
|
+
if (o < 0 || o >= this.length)
|
|
1148
1148
|
throw new RangeError("Index out of range");
|
|
1149
1149
|
if (s < 0)
|
|
1150
1150
|
throw new RangeError("sourceEnd out of bounds");
|
|
1151
|
-
s > this.length && (s = this.length), t.length - e < s -
|
|
1152
|
-
var m = s -
|
|
1153
|
-
return this === t && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(e,
|
|
1151
|
+
s > this.length && (s = this.length), t.length - e < s - o && (s = t.length - e + o);
|
|
1152
|
+
var m = s - o;
|
|
1153
|
+
return this === t && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(e, o, s) : Uint8Array.prototype.set.call(
|
|
1154
1154
|
t,
|
|
1155
|
-
this.subarray(
|
|
1155
|
+
this.subarray(o, s),
|
|
1156
1156
|
e
|
|
1157
1157
|
), m;
|
|
1158
|
-
}, a.prototype.fill = function(t, e,
|
|
1158
|
+
}, a.prototype.fill = function(t, e, o, s) {
|
|
1159
1159
|
if (typeof t == "string") {
|
|
1160
|
-
if (typeof e == "string" ? (s = e, e = 0,
|
|
1160
|
+
if (typeof e == "string" ? (s = e, e = 0, o = this.length) : typeof o == "string" && (s = o, o = this.length), s !== void 0 && typeof s != "string")
|
|
1161
1161
|
throw new TypeError("encoding must be a string");
|
|
1162
1162
|
if (typeof s == "string" && !a.isEncoding(s))
|
|
1163
1163
|
throw new TypeError("Unknown encoding: " + s);
|
|
@@ -1167,41 +1167,41 @@ ht.write = function(o, r, p, c, u, f) {
|
|
|
1167
1167
|
}
|
|
1168
1168
|
} else
|
|
1169
1169
|
typeof t == "number" ? t = t & 255 : typeof t == "boolean" && (t = Number(t));
|
|
1170
|
-
if (e < 0 || this.length < e || this.length <
|
|
1170
|
+
if (e < 0 || this.length < e || this.length < o)
|
|
1171
1171
|
throw new RangeError("Out of range index");
|
|
1172
|
-
if (
|
|
1172
|
+
if (o <= e)
|
|
1173
1173
|
return this;
|
|
1174
|
-
e = e >>> 0,
|
|
1174
|
+
e = e >>> 0, o = o === void 0 ? this.length : o >>> 0, t || (t = 0);
|
|
1175
1175
|
var h;
|
|
1176
1176
|
if (typeof t == "number")
|
|
1177
|
-
for (h = e; h <
|
|
1177
|
+
for (h = e; h < o; ++h)
|
|
1178
1178
|
this[h] = t;
|
|
1179
1179
|
else {
|
|
1180
|
-
var
|
|
1181
|
-
if (
|
|
1180
|
+
var _ = a.isBuffer(t) ? t : a.from(t, s), F = _.length;
|
|
1181
|
+
if (F === 0)
|
|
1182
1182
|
throw new TypeError('The value "' + t + '" is invalid for argument "value"');
|
|
1183
|
-
for (h = 0; h <
|
|
1184
|
-
this[h + e] =
|
|
1183
|
+
for (h = 0; h < o - e; ++h)
|
|
1184
|
+
this[h + e] = _[h % F];
|
|
1185
1185
|
}
|
|
1186
1186
|
return this;
|
|
1187
1187
|
};
|
|
1188
|
-
var
|
|
1189
|
-
function
|
|
1190
|
-
if (i = i.split("=")[0], i = i.trim().replace(
|
|
1188
|
+
var Fe = /[^+/0-9A-Za-z-_]/g;
|
|
1189
|
+
function Ae(i) {
|
|
1190
|
+
if (i = i.split("=")[0], i = i.trim().replace(Fe, ""), i.length < 2)
|
|
1191
1191
|
return "";
|
|
1192
1192
|
for (; i.length % 4 !== 0; )
|
|
1193
1193
|
i = i + "=";
|
|
1194
1194
|
return i;
|
|
1195
1195
|
}
|
|
1196
|
-
function
|
|
1196
|
+
function rt(i, t) {
|
|
1197
1197
|
t = t || 1 / 0;
|
|
1198
|
-
for (var e,
|
|
1198
|
+
for (var e, o = i.length, s = null, m = [], h = 0; h < o; ++h) {
|
|
1199
1199
|
if (e = i.charCodeAt(h), e > 55295 && e < 57344) {
|
|
1200
1200
|
if (!s) {
|
|
1201
1201
|
if (e > 56319) {
|
|
1202
1202
|
(t -= 3) > -1 && m.push(239, 191, 189);
|
|
1203
1203
|
continue;
|
|
1204
|
-
} else if (h + 1 ===
|
|
1204
|
+
} else if (h + 1 === o) {
|
|
1205
1205
|
(t -= 3) > -1 && m.push(239, 191, 189);
|
|
1206
1206
|
continue;
|
|
1207
1207
|
}
|
|
@@ -1248,45 +1248,45 @@ ht.write = function(o, r, p, c, u, f) {
|
|
|
1248
1248
|
}
|
|
1249
1249
|
return m;
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1251
|
+
function Se(i) {
|
|
1252
1252
|
for (var t = [], e = 0; e < i.length; ++e)
|
|
1253
1253
|
t.push(i.charCodeAt(e) & 255);
|
|
1254
1254
|
return t;
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1257
|
-
for (var e,
|
|
1258
|
-
e = i.charCodeAt(h),
|
|
1256
|
+
function ke(i, t) {
|
|
1257
|
+
for (var e, o, s, m = [], h = 0; h < i.length && !((t -= 2) < 0); ++h)
|
|
1258
|
+
e = i.charCodeAt(h), o = e >> 8, s = e % 256, m.push(s), m.push(o);
|
|
1259
1259
|
return m;
|
|
1260
1260
|
}
|
|
1261
|
-
function
|
|
1262
|
-
return r.toByteArray(
|
|
1261
|
+
function Bt(i) {
|
|
1262
|
+
return r.toByteArray(Ae(i));
|
|
1263
1263
|
}
|
|
1264
|
-
function
|
|
1265
|
-
for (var s = 0; s <
|
|
1264
|
+
function K(i, t, e, o) {
|
|
1265
|
+
for (var s = 0; s < o && !(s + e >= t.length || s >= i.length); ++s)
|
|
1266
1266
|
t[s + e] = i[s];
|
|
1267
1267
|
return s;
|
|
1268
1268
|
}
|
|
1269
1269
|
function T(i, t) {
|
|
1270
1270
|
return i instanceof t || i != null && i.constructor != null && i.constructor.name != null && i.constructor.name === t.name;
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1272
|
+
function nt(i) {
|
|
1273
1273
|
return i !== i;
|
|
1274
1274
|
}
|
|
1275
|
-
var
|
|
1275
|
+
var Be = function() {
|
|
1276
1276
|
for (var i = "0123456789abcdef", t = new Array(256), e = 0; e < 16; ++e)
|
|
1277
|
-
for (var
|
|
1278
|
-
t[
|
|
1277
|
+
for (var o = e * 16, s = 0; s < 16; ++s)
|
|
1278
|
+
t[o + s] = i[e] + i[s];
|
|
1279
1279
|
return t;
|
|
1280
1280
|
}();
|
|
1281
|
-
})(
|
|
1281
|
+
})(Vt);
|
|
1282
1282
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
1283
|
-
(function(
|
|
1284
|
-
var p =
|
|
1283
|
+
(function(n, r) {
|
|
1284
|
+
var p = Vt, c = p.Buffer;
|
|
1285
1285
|
function u(l, a) {
|
|
1286
1286
|
for (var x in l)
|
|
1287
1287
|
a[x] = l[x];
|
|
1288
1288
|
}
|
|
1289
|
-
c.from && c.alloc && c.allocUnsafe && c.allocUnsafeSlow ?
|
|
1289
|
+
c.from && c.alloc && c.allocUnsafe && c.allocUnsafeSlow ? n.exports = p : (u(p, r), r.Buffer = f);
|
|
1290
1290
|
function f(l, a, x) {
|
|
1291
1291
|
return c(l, a, x);
|
|
1292
1292
|
}
|
|
@@ -1308,21 +1308,21 @@ ht.write = function(o, r, p, c, u, f) {
|
|
|
1308
1308
|
throw new TypeError("Argument must be a number");
|
|
1309
1309
|
return p.SlowBuffer(l);
|
|
1310
1310
|
};
|
|
1311
|
-
})(
|
|
1312
|
-
var
|
|
1313
|
-
function
|
|
1314
|
-
this._block =
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
typeof
|
|
1318
|
-
for (var p = this._block, c = this._blockSize, u =
|
|
1311
|
+
})(ct, ct.exports);
|
|
1312
|
+
var Qt = ct.exports, te = Qt.Buffer;
|
|
1313
|
+
function et(n, r) {
|
|
1314
|
+
this._block = te.alloc(n), this._finalSize = r, this._blockSize = n, this._len = 0;
|
|
1315
|
+
}
|
|
1316
|
+
et.prototype.update = function(n, r) {
|
|
1317
|
+
typeof n == "string" && (r = r || "utf8", n = te.from(n, r));
|
|
1318
|
+
for (var p = this._block, c = this._blockSize, u = n.length, f = this._len, l = 0; l < u; ) {
|
|
1319
1319
|
for (var a = f % c, x = Math.min(u - l, c - a), d = 0; d < x; d++)
|
|
1320
|
-
p[a + d] =
|
|
1320
|
+
p[a + d] = n[l + d];
|
|
1321
1321
|
f += x, l += x, f % c === 0 && this._update(p);
|
|
1322
1322
|
}
|
|
1323
1323
|
return this._len += u, this;
|
|
1324
1324
|
};
|
|
1325
|
-
|
|
1325
|
+
et.prototype.digest = function(n) {
|
|
1326
1326
|
var r = this._len % this._blockSize;
|
|
1327
1327
|
this._block[r] = 128, this._block.fill(0, r + 1), r >= this._finalSize && (this._update(this._block), this._block.fill(0));
|
|
1328
1328
|
var p = this._len * 8;
|
|
@@ -1334,90 +1334,90 @@ tt.prototype.digest = function(o) {
|
|
|
1334
1334
|
}
|
|
1335
1335
|
this._update(this._block);
|
|
1336
1336
|
var f = this._hash();
|
|
1337
|
-
return
|
|
1337
|
+
return n ? f.toString(n) : f;
|
|
1338
1338
|
};
|
|
1339
|
-
|
|
1339
|
+
et.prototype._update = function() {
|
|
1340
1340
|
throw new Error("_update must be implemented by subclass");
|
|
1341
1341
|
};
|
|
1342
|
-
var pi =
|
|
1342
|
+
var pi = et, si = Xe, ee = pi, ci = Qt.Buffer, li = [
|
|
1343
1343
|
1518500249,
|
|
1344
1344
|
1859775393,
|
|
1345
1345
|
-1894007588,
|
|
1346
1346
|
-899497514
|
|
1347
1347
|
], ui = new Array(80);
|
|
1348
1348
|
function Y() {
|
|
1349
|
-
this.init(), this._w = ui,
|
|
1349
|
+
this.init(), this._w = ui, ee.call(this, 64, 56);
|
|
1350
1350
|
}
|
|
1351
|
-
si(Y,
|
|
1351
|
+
si(Y, ee);
|
|
1352
1352
|
Y.prototype.init = function() {
|
|
1353
1353
|
return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
|
|
1354
1354
|
};
|
|
1355
|
-
function fi(
|
|
1356
|
-
return
|
|
1355
|
+
function fi(n) {
|
|
1356
|
+
return n << 1 | n >>> 31;
|
|
1357
1357
|
}
|
|
1358
|
-
function mi(
|
|
1359
|
-
return
|
|
1358
|
+
function mi(n) {
|
|
1359
|
+
return n << 5 | n >>> 27;
|
|
1360
1360
|
}
|
|
1361
|
-
function hi(
|
|
1362
|
-
return
|
|
1361
|
+
function hi(n) {
|
|
1362
|
+
return n << 30 | n >>> 2;
|
|
1363
1363
|
}
|
|
1364
|
-
function xi(
|
|
1365
|
-
return
|
|
1364
|
+
function xi(n, r, p, c) {
|
|
1365
|
+
return n === 0 ? r & p | ~r & c : n === 2 ? r & p | r & c | p & c : r ^ p ^ c;
|
|
1366
1366
|
}
|
|
1367
|
-
Y.prototype._update = function(
|
|
1367
|
+
Y.prototype._update = function(n) {
|
|
1368
1368
|
for (var r = this._w, p = this._a | 0, c = this._b | 0, u = this._c | 0, f = this._d | 0, l = this._e | 0, a = 0; a < 16; ++a)
|
|
1369
|
-
r[a] =
|
|
1369
|
+
r[a] = n.readInt32BE(a * 4);
|
|
1370
1370
|
for (; a < 80; ++a)
|
|
1371
1371
|
r[a] = fi(r[a - 3] ^ r[a - 8] ^ r[a - 14] ^ r[a - 16]);
|
|
1372
1372
|
for (var x = 0; x < 80; ++x) {
|
|
1373
|
-
var d = ~~(x / 20),
|
|
1374
|
-
l = f, f = u, u = hi(c), c = p, p =
|
|
1373
|
+
var d = ~~(x / 20), v = mi(p) + xi(d, c, u, f) + l + r[x] + li[d] | 0;
|
|
1374
|
+
l = f, f = u, u = hi(c), c = p, p = v;
|
|
1375
1375
|
}
|
|
1376
1376
|
this._a = p + this._a | 0, this._b = c + this._b | 0, this._c = u + this._c | 0, this._d = f + this._d | 0, this._e = l + this._e | 0;
|
|
1377
1377
|
};
|
|
1378
1378
|
Y.prototype._hash = function() {
|
|
1379
|
-
var
|
|
1380
|
-
return
|
|
1379
|
+
var n = ci.allocUnsafe(20);
|
|
1380
|
+
return n.writeInt32BE(this._a | 0, 0), n.writeInt32BE(this._b | 0, 4), n.writeInt32BE(this._c | 0, 8), n.writeInt32BE(this._d | 0, 12), n.writeInt32BE(this._e | 0, 16), n;
|
|
1381
1381
|
};
|
|
1382
1382
|
var di = Y;
|
|
1383
|
-
const wi = /* @__PURE__ */ Ve(di),
|
|
1384
|
-
function gi(
|
|
1385
|
-
throw
|
|
1383
|
+
const wi = /* @__PURE__ */ Ve(di), wt = new Error("File system not available.");
|
|
1384
|
+
function gi(n, r, p) {
|
|
1385
|
+
throw wt;
|
|
1386
1386
|
}
|
|
1387
|
-
function
|
|
1388
|
-
throw
|
|
1387
|
+
function ie(n) {
|
|
1388
|
+
throw wt;
|
|
1389
1389
|
}
|
|
1390
|
-
function yi(
|
|
1391
|
-
throw
|
|
1390
|
+
function yi(n) {
|
|
1391
|
+
throw wt;
|
|
1392
1392
|
}
|
|
1393
|
-
const vi = async (
|
|
1394
|
-
function bi(
|
|
1393
|
+
const vi = async (n) => ie();
|
|
1394
|
+
function bi(n) {
|
|
1395
1395
|
let r = "";
|
|
1396
|
-
for (let p = 0; p <
|
|
1397
|
-
r += String.fromCharCode(parseInt(
|
|
1396
|
+
for (let p = 0; p < n.length; p += 2)
|
|
1397
|
+
r += String.fromCharCode(parseInt(n.substr(p, 2), 16));
|
|
1398
1398
|
return btoa(r);
|
|
1399
1399
|
}
|
|
1400
|
-
const
|
|
1400
|
+
const it = (n, r = "sha1") => {
|
|
1401
1401
|
if (r !== "sha1")
|
|
1402
1402
|
throw new Error("Only sha1 algorithm is available.");
|
|
1403
1403
|
const p = new wi();
|
|
1404
|
-
return bi(p.update(
|
|
1404
|
+
return bi(p.update(n).digest("hex"));
|
|
1405
1405
|
};
|
|
1406
|
-
function Ei(
|
|
1407
|
-
return
|
|
1406
|
+
function Ei(n) {
|
|
1407
|
+
return n.type === We && n.skip !== void 0 && n.skip > 0 && n.hash !== void 0;
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1410
|
-
return [z, P].includes(
|
|
1409
|
+
function Ot(n) {
|
|
1410
|
+
return [z, P].includes(n.type);
|
|
1411
1411
|
}
|
|
1412
|
-
function
|
|
1413
|
-
return [
|
|
1412
|
+
function Ut(n) {
|
|
1413
|
+
return [Yt, z, P, Z, Gt].includes(n.type);
|
|
1414
1414
|
}
|
|
1415
|
-
function q(
|
|
1416
|
-
if (!
|
|
1415
|
+
function q(n, r, p, c, u = "global") {
|
|
1416
|
+
if (!n)
|
|
1417
1417
|
throw new Error("Empty action type");
|
|
1418
|
-
if (typeof
|
|
1419
|
-
throw new Error(`Invalid action type: ${
|
|
1420
|
-
const f = { type:
|
|
1418
|
+
if (typeof n != "string")
|
|
1419
|
+
throw new Error(`Invalid action type: ${n}`);
|
|
1420
|
+
const f = { type: n, input: r, scope: u };
|
|
1421
1421
|
p && (f.attachments = p);
|
|
1422
1422
|
try {
|
|
1423
1423
|
c == null || c().parse(f.input);
|
|
@@ -1426,10 +1426,10 @@ function q(o, r, p, c, u = "global") {
|
|
|
1426
1426
|
}
|
|
1427
1427
|
return f;
|
|
1428
1428
|
}
|
|
1429
|
-
function _i(
|
|
1430
|
-
return (p, c, u, f) => r(p, c,
|
|
1429
|
+
function _i(n, r = Kt) {
|
|
1430
|
+
return (p, c, u, f) => r(p, c, n, u, f);
|
|
1431
1431
|
}
|
|
1432
|
-
const Fi = (
|
|
1432
|
+
const Fi = (n, r) => ({
|
|
1433
1433
|
name: "",
|
|
1434
1434
|
documentType: "",
|
|
1435
1435
|
revision: {
|
|
@@ -1439,11 +1439,11 @@ const Fi = (o, r) => ({
|
|
|
1439
1439
|
created: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1440
1440
|
lastModified: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1441
1441
|
attachments: {},
|
|
1442
|
-
...
|
|
1443
|
-
state: (r == null ? void 0 : r(
|
|
1444
|
-
}), Ai = (
|
|
1442
|
+
...n,
|
|
1443
|
+
state: (r == null ? void 0 : r(n == null ? void 0 : n.state)) ?? (n == null ? void 0 : n.state) ?? { global: {}, local: {} }
|
|
1444
|
+
}), Ai = (n, r) => {
|
|
1445
1445
|
const p = Fi(
|
|
1446
|
-
|
|
1446
|
+
n,
|
|
1447
1447
|
r
|
|
1448
1448
|
);
|
|
1449
1449
|
return {
|
|
@@ -1452,15 +1452,15 @@ const Fi = (o, r) => ({
|
|
|
1452
1452
|
operations: { global: [], local: [] },
|
|
1453
1453
|
clipboard: []
|
|
1454
1454
|
};
|
|
1455
|
-
},
|
|
1455
|
+
}, re = (n, r = "global") => it(pt(n.state[r])), zi = (n, r = 1e3) => {
|
|
1456
1456
|
const p = Math.random() * r;
|
|
1457
|
-
return
|
|
1457
|
+
return it(`${(n ?? /* @__PURE__ */ new Date()).toISOString()}${p}`);
|
|
1458
1458
|
};
|
|
1459
|
-
function
|
|
1460
|
-
return
|
|
1459
|
+
function Q(n) {
|
|
1460
|
+
return Oe(Ue(n, !0));
|
|
1461
1461
|
}
|
|
1462
|
-
function Si(
|
|
1463
|
-
const p = [...
|
|
1462
|
+
function Si(n, r) {
|
|
1463
|
+
const p = [...n];
|
|
1464
1464
|
let c = r || 0, u = p.length > 0 ? p[p.length - 1].index : 0;
|
|
1465
1465
|
const f = [];
|
|
1466
1466
|
for (const l of p.reverse()) {
|
|
@@ -1482,20 +1482,20 @@ function Si(o, r) {
|
|
|
1482
1482
|
}
|
|
1483
1483
|
return f.reverse();
|
|
1484
1484
|
}
|
|
1485
|
-
function Pi(
|
|
1486
|
-
return Object.values(
|
|
1485
|
+
function Pi(n) {
|
|
1486
|
+
return Object.values(n).flatMap((r) => r).sort(
|
|
1487
1487
|
(r, p) => new Date(r.timestamp).getTime() - new Date(p.timestamp).getTime()
|
|
1488
1488
|
);
|
|
1489
1489
|
}
|
|
1490
|
-
function ki(
|
|
1491
|
-
return Object.values(
|
|
1490
|
+
function ki(n) {
|
|
1491
|
+
return Object.values(n).flatMap((r) => r).sort(
|
|
1492
1492
|
(r, p) => new Date(r.operation.timestamp).getTime() - new Date(p.operation.timestamp).getTime()
|
|
1493
1493
|
);
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function lt(n, r, p, c, u, f = Kt, l = {}) {
|
|
1496
1496
|
const a = _i(p, f);
|
|
1497
|
-
return
|
|
1498
|
-
|
|
1497
|
+
return ne(
|
|
1498
|
+
n,
|
|
1499
1499
|
r,
|
|
1500
1500
|
a,
|
|
1501
1501
|
c,
|
|
@@ -1503,47 +1503,47 @@ function st(o, r, p, c, u, f = Yt, l = {}) {
|
|
|
1503
1503
|
l
|
|
1504
1504
|
);
|
|
1505
1505
|
}
|
|
1506
|
-
function
|
|
1507
|
-
const l = Ai(
|
|
1508
|
-
const
|
|
1506
|
+
function ne(n, r, p, c, u, f = {}) {
|
|
1507
|
+
const l = Ai(n), a = Object.keys(r).reduce((y, b) => {
|
|
1508
|
+
const E = b;
|
|
1509
1509
|
return {
|
|
1510
|
-
...
|
|
1511
|
-
[
|
|
1510
|
+
...y,
|
|
1511
|
+
[E]: r[E].slice(0, u == null ? void 0 : u.revision[E])
|
|
1512
1512
|
};
|
|
1513
1513
|
}, {}), x = Object.keys(a).reduce(
|
|
1514
|
-
(
|
|
1515
|
-
const
|
|
1514
|
+
(y, b) => {
|
|
1515
|
+
const E = b;
|
|
1516
1516
|
return {
|
|
1517
|
-
...
|
|
1518
|
-
[
|
|
1519
|
-
a[
|
|
1520
|
-
f[
|
|
1517
|
+
...y,
|
|
1518
|
+
[E]: Si(
|
|
1519
|
+
a[E],
|
|
1520
|
+
f[E]
|
|
1521
1521
|
)
|
|
1522
1522
|
};
|
|
1523
1523
|
},
|
|
1524
1524
|
{}
|
|
1525
1525
|
), d = ki(x).reduce(
|
|
1526
|
-
(
|
|
1527
|
-
skip:
|
|
1526
|
+
(y, { ignore: b, operation: E }) => b ? p(y, yt(E.scope), c, {
|
|
1527
|
+
skip: E.skip,
|
|
1528
1528
|
ignoreSkipOperations: !0
|
|
1529
|
-
}) : p(
|
|
1530
|
-
skip:
|
|
1529
|
+
}) : p(y, E, c, {
|
|
1530
|
+
skip: E.skip,
|
|
1531
1531
|
ignoreSkipOperations: !0
|
|
1532
1532
|
}),
|
|
1533
1533
|
l
|
|
1534
|
-
),
|
|
1534
|
+
), v = Object.keys(
|
|
1535
1535
|
d.operations
|
|
1536
1536
|
).reduce(
|
|
1537
|
-
(
|
|
1538
|
-
const
|
|
1537
|
+
(y, b) => {
|
|
1538
|
+
const E = b, U = u && u.revision[E] < r[E].length ? r[E].slice(u.revision[E]) : [];
|
|
1539
1539
|
return {
|
|
1540
|
-
...
|
|
1541
|
-
[
|
|
1542
|
-
...d.operations[
|
|
1543
|
-
var
|
|
1540
|
+
...y,
|
|
1541
|
+
[E]: [
|
|
1542
|
+
...d.operations[E].map((R, $) => {
|
|
1543
|
+
var G;
|
|
1544
1544
|
return {
|
|
1545
|
-
...
|
|
1546
|
-
timestamp: ((
|
|
1545
|
+
...R,
|
|
1546
|
+
timestamp: ((G = r[E][$]) == null ? void 0 : G.timestamp) ?? R.timestamp
|
|
1547
1547
|
};
|
|
1548
1548
|
}),
|
|
1549
1549
|
...U
|
|
@@ -1551,65 +1551,72 @@ function ie(o, r, p, c, u, f = {}) {
|
|
|
1551
1551
|
};
|
|
1552
1552
|
},
|
|
1553
1553
|
{ global: [], local: [] }
|
|
1554
|
-
)
|
|
1555
|
-
|
|
1554
|
+
), g = Object.values(v).reduce((y, b) => {
|
|
1555
|
+
for (const E of b)
|
|
1556
|
+
E.timestamp > y && (y = E.timestamp);
|
|
1557
|
+
return y;
|
|
1558
|
+
}, n.lastModified);
|
|
1559
|
+
return { ...d, operations: v, lastModified: g };
|
|
1560
|
+
}
|
|
1561
|
+
function qi(n, r) {
|
|
1562
|
+
return pt(n) === pt(r);
|
|
1556
1563
|
}
|
|
1557
|
-
const
|
|
1564
|
+
const oe = (n) => q(
|
|
1558
1565
|
"SET_NAME",
|
|
1559
|
-
|
|
1566
|
+
n,
|
|
1560
1567
|
void 0,
|
|
1561
|
-
|
|
1568
|
+
ht,
|
|
1562
1569
|
void 0
|
|
1563
|
-
),
|
|
1570
|
+
), ae = (n = 1, r = "global") => q(
|
|
1564
1571
|
"UNDO",
|
|
1565
|
-
|
|
1572
|
+
n,
|
|
1566
1573
|
void 0,
|
|
1567
|
-
|
|
1574
|
+
xt,
|
|
1568
1575
|
r
|
|
1569
|
-
),
|
|
1576
|
+
), pe = (n = 1, r = "global") => q(
|
|
1570
1577
|
"REDO",
|
|
1571
|
-
|
|
1578
|
+
n,
|
|
1572
1579
|
void 0,
|
|
1573
|
-
|
|
1580
|
+
mt,
|
|
1574
1581
|
r
|
|
1575
|
-
),
|
|
1582
|
+
), se = (n, r, p = "global") => q(
|
|
1576
1583
|
"PRUNE",
|
|
1577
|
-
{ start:
|
|
1584
|
+
{ start: n, end: r },
|
|
1578
1585
|
void 0,
|
|
1579
|
-
|
|
1586
|
+
ft,
|
|
1580
1587
|
p
|
|
1581
|
-
),
|
|
1588
|
+
), gt = (n, r) => q(
|
|
1582
1589
|
"LOAD_STATE",
|
|
1583
|
-
{ state:
|
|
1590
|
+
{ state: n, operations: r },
|
|
1584
1591
|
void 0,
|
|
1585
|
-
|
|
1586
|
-
),
|
|
1592
|
+
ut
|
|
1593
|
+
), yt = (n = "global") => q("NOOP", {}, void 0, void 0, n), $i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1587
1594
|
__proto__: null,
|
|
1588
|
-
loadState:
|
|
1589
|
-
noop:
|
|
1590
|
-
prune:
|
|
1591
|
-
redo:
|
|
1592
|
-
setName:
|
|
1593
|
-
undo:
|
|
1594
|
-
}, Symbol.toStringTag, { value: "Module" })), pe = { "application/andrew-inset": ["ez"], "application/appinstaller": ["appinstaller"], "application/applixware": ["aw"], "application/appx": ["appx"], "application/appxbundle": ["appxbundle"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/automationml-aml+xml": ["aml"], "application/automationml-amlx+zip": ["amlx"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cpl+xml": ["cpl"], "application/cu-seeme": ["cu"], "application/cwl": ["cwl"], "application/dash+xml": ["mpd"], "application/dash-patch+xml": ["mpp"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdf": ["fdf"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["*js"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/media-policy-dataset+xml": ["mpf"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["*mp4", "*mpg4", "mp4s", "m4p"], "application/msix": ["msix"], "application/msixbundle": ["msixbundle"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-keys": ["asc"], "application/pgp-signature": ["sig", "*asc"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/sql": ["sql"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/watcherinfo+xml": ["wif"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xfdf": ["xfdf"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/aac": ["adts", "aac"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avci": ["avci"], "image/avcs": ["avcs"], "image/avif": ["avif"], "image/bmp": ["bmp", "dib"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/dpx": ["dpx"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm", "jpgm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/jt": ["jt"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/prc": ["prc"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/u3d": ["u3d"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/javascript": ["js", "mjs"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["md", "markdown"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/wgsl": ["wgsl"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "*jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
|
|
1595
|
-
Object.freeze(
|
|
1596
|
-
var I = function(
|
|
1595
|
+
loadState: gt,
|
|
1596
|
+
noop: yt,
|
|
1597
|
+
prune: se,
|
|
1598
|
+
redo: pe,
|
|
1599
|
+
setName: oe,
|
|
1600
|
+
undo: ae
|
|
1601
|
+
}, Symbol.toStringTag, { value: "Module" })), ce = { "application/andrew-inset": ["ez"], "application/appinstaller": ["appinstaller"], "application/applixware": ["aw"], "application/appx": ["appx"], "application/appxbundle": ["appxbundle"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/automationml-aml+xml": ["aml"], "application/automationml-amlx+zip": ["amlx"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cpl+xml": ["cpl"], "application/cu-seeme": ["cu"], "application/cwl": ["cwl"], "application/dash+xml": ["mpd"], "application/dash-patch+xml": ["mpp"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdf": ["fdf"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["*js"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/media-policy-dataset+xml": ["mpf"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["*mp4", "*mpg4", "mp4s", "m4p"], "application/msix": ["msix"], "application/msixbundle": ["msixbundle"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-keys": ["asc"], "application/pgp-signature": ["sig", "*asc"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/sql": ["sql"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/watcherinfo+xml": ["wif"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xfdf": ["xfdf"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/aac": ["adts", "aac"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avci": ["avci"], "image/avcs": ["avcs"], "image/avif": ["avif"], "image/bmp": ["bmp", "dib"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/dpx": ["dpx"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm", "jpgm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/jt": ["jt"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/prc": ["prc"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/u3d": ["u3d"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/javascript": ["js", "mjs"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["md", "markdown"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/wgsl": ["wgsl"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "*jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
|
|
1602
|
+
Object.freeze(ce);
|
|
1603
|
+
var I = function(n, r, p, c) {
|
|
1597
1604
|
if (p === "a" && !c)
|
|
1598
1605
|
throw new TypeError("Private accessor was defined without a getter");
|
|
1599
|
-
if (typeof r == "function" ?
|
|
1606
|
+
if (typeof r == "function" ? n !== r || !c : !r.has(n))
|
|
1600
1607
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
1601
|
-
return p === "m" ? c : p === "a" ? c.call(
|
|
1602
|
-
}, L, W,
|
|
1608
|
+
return p === "m" ? c : p === "a" ? c.call(n) : c ? c.value : r.get(n);
|
|
1609
|
+
}, L, W, N;
|
|
1603
1610
|
class Bi {
|
|
1604
1611
|
constructor(...r) {
|
|
1605
|
-
L.set(this, /* @__PURE__ */ new Map()), W.set(this, /* @__PURE__ */ new Map()),
|
|
1612
|
+
L.set(this, /* @__PURE__ */ new Map()), W.set(this, /* @__PURE__ */ new Map()), N.set(this, /* @__PURE__ */ new Map());
|
|
1606
1613
|
for (const p of r)
|
|
1607
1614
|
this.define(p);
|
|
1608
1615
|
}
|
|
1609
1616
|
define(r, p = !1) {
|
|
1610
1617
|
for (let [c, u] of Object.entries(r)) {
|
|
1611
|
-
c = c.toLowerCase(), u = u.map((a) => a.toLowerCase()), I(this,
|
|
1612
|
-
const f = I(this,
|
|
1618
|
+
c = c.toLowerCase(), u = u.map((a) => a.toLowerCase()), I(this, N, "f").has(c) || I(this, N, "f").set(c, /* @__PURE__ */ new Set());
|
|
1619
|
+
const f = I(this, N, "f").get(c);
|
|
1613
1620
|
let l = !0;
|
|
1614
1621
|
for (let a of u) {
|
|
1615
1622
|
const x = a.startsWith("*");
|
|
@@ -1634,13 +1641,13 @@ class Bi {
|
|
|
1634
1641
|
return typeof r != "string" ? null : (r = (p = r == null ? void 0 : r.split) == null ? void 0 : p.call(r, ";")[0], (r && I(this, W, "f").get(r.trim().toLowerCase())) ?? null);
|
|
1635
1642
|
}
|
|
1636
1643
|
getAllExtensions(r) {
|
|
1637
|
-
return typeof r != "string" ? null : I(this,
|
|
1644
|
+
return typeof r != "string" ? null : I(this, N, "f").get(r.toLowerCase()) ?? null;
|
|
1638
1645
|
}
|
|
1639
1646
|
_freeze() {
|
|
1640
1647
|
this.define = () => {
|
|
1641
1648
|
throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances");
|
|
1642
1649
|
}, Object.freeze(this);
|
|
1643
|
-
for (const r of I(this,
|
|
1650
|
+
for (const r of I(this, N, "f").values())
|
|
1644
1651
|
Object.freeze(r);
|
|
1645
1652
|
return this;
|
|
1646
1653
|
}
|
|
@@ -1651,12 +1658,12 @@ class Bi {
|
|
|
1651
1658
|
};
|
|
1652
1659
|
}
|
|
1653
1660
|
}
|
|
1654
|
-
L = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(),
|
|
1655
|
-
const ji = new Bi(
|
|
1656
|
-
function Ii(
|
|
1657
|
-
const r = [], p = Object.keys(
|
|
1661
|
+
L = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap();
|
|
1662
|
+
const ji = new Bi(ce)._freeze();
|
|
1663
|
+
function Ii(n) {
|
|
1664
|
+
const r = [], p = Object.keys(n);
|
|
1658
1665
|
for (const c of p) {
|
|
1659
|
-
const u =
|
|
1666
|
+
const u = n[c].sort((f, l) => f.index - l.index);
|
|
1660
1667
|
for (let f = 0; f < u.length; f++)
|
|
1661
1668
|
u[f].index !== f && r.push({
|
|
1662
1669
|
message: `Invalid operation index ${u[f].index} at position ${f}`,
|
|
@@ -1669,8 +1676,8 @@ function Ii(o) {
|
|
|
1669
1676
|
}
|
|
1670
1677
|
return r;
|
|
1671
1678
|
}
|
|
1672
|
-
const
|
|
1673
|
-
const r = new
|
|
1679
|
+
const le = async (n) => {
|
|
1680
|
+
const r = new Dt(), { name: p, revision: c, documentType: u, created: f, lastModified: l } = n, a = {
|
|
1674
1681
|
name: p,
|
|
1675
1682
|
revision: c,
|
|
1676
1683
|
documentType: u,
|
|
@@ -1679,92 +1686,92 @@ const se = async (o) => {
|
|
|
1679
1686
|
};
|
|
1680
1687
|
return r.file("header.json", JSON.stringify(a, null, 2)), r.file(
|
|
1681
1688
|
"state.json",
|
|
1682
|
-
JSON.stringify(
|
|
1683
|
-
), r.file("operations.json", JSON.stringify(
|
|
1684
|
-
const { data:
|
|
1685
|
-
r.file(d,
|
|
1689
|
+
JSON.stringify(n.initialState || {}, null, 2)
|
|
1690
|
+
), r.file("operations.json", JSON.stringify(n.operations, null, 2)), Object.keys(n.attachments).forEach((d) => {
|
|
1691
|
+
const { data: v, ...g } = n.attachments[d];
|
|
1692
|
+
r.file(d, v, {
|
|
1686
1693
|
base64: !0,
|
|
1687
1694
|
createFolders: !0,
|
|
1688
|
-
comment: JSON.stringify(
|
|
1695
|
+
comment: JSON.stringify(g)
|
|
1689
1696
|
});
|
|
1690
1697
|
}), r;
|
|
1691
|
-
}, Oi = async (
|
|
1692
|
-
await (await
|
|
1698
|
+
}, Oi = async (n, r, p, c) => {
|
|
1699
|
+
await (await le(n)).generateAsync({
|
|
1693
1700
|
type: "uint8array",
|
|
1694
1701
|
streamFiles: !0
|
|
1695
1702
|
});
|
|
1696
|
-
const f = c ??
|
|
1703
|
+
const f = c ?? n.name, l = `.${p}.zip`;
|
|
1697
1704
|
return gi(
|
|
1698
1705
|
r,
|
|
1699
1706
|
f.endsWith(l) ? f : `${f}${l}`
|
|
1700
1707
|
);
|
|
1701
|
-
},
|
|
1702
|
-
const c = await (await
|
|
1708
|
+
}, Wi = async (n, r) => {
|
|
1709
|
+
const c = await (await le(n)).generateAsync({ type: "blob" }), u = await r.createWritable();
|
|
1703
1710
|
await u.write(c), await u.close();
|
|
1704
|
-
},
|
|
1705
|
-
const p =
|
|
1711
|
+
}, Tt = async (n, r) => {
|
|
1712
|
+
const p = ie();
|
|
1706
1713
|
return Ui(p, r);
|
|
1707
|
-
}, Ui = async (
|
|
1708
|
-
const p = new
|
|
1709
|
-
return await p.loadAsync(
|
|
1714
|
+
}, Ui = async (n, r) => {
|
|
1715
|
+
const p = new Dt();
|
|
1716
|
+
return await p.loadAsync(n), Ti(p, r);
|
|
1710
1717
|
};
|
|
1711
|
-
async function Ti(
|
|
1712
|
-
const p =
|
|
1718
|
+
async function Ti(n, r) {
|
|
1719
|
+
const p = n.file("state.json");
|
|
1713
1720
|
if (!p)
|
|
1714
1721
|
throw new Error("Initial state not found");
|
|
1715
|
-
const c = await p.async("string"), u = JSON.parse(c), f =
|
|
1722
|
+
const c = await p.async("string"), u = JSON.parse(c), f = n.file("header.json");
|
|
1716
1723
|
let l;
|
|
1717
1724
|
f && (l = JSON.parse(await f.async("string")));
|
|
1718
|
-
const a =
|
|
1725
|
+
const a = n.file("operations.json");
|
|
1719
1726
|
if (!a)
|
|
1720
1727
|
throw new Error("Operations history not found");
|
|
1721
1728
|
const x = JSON.parse(
|
|
1722
1729
|
await a.async("string")
|
|
1723
1730
|
), d = Ii(x);
|
|
1724
1731
|
if (d.length) {
|
|
1725
|
-
const
|
|
1726
|
-
throw new Error(
|
|
1732
|
+
const g = d.map((y) => y.message);
|
|
1733
|
+
throw new Error(g.join(`
|
|
1727
1734
|
`));
|
|
1728
1735
|
}
|
|
1729
|
-
let
|
|
1736
|
+
let v = ne(
|
|
1730
1737
|
u,
|
|
1731
1738
|
x,
|
|
1732
1739
|
r,
|
|
1733
1740
|
void 0,
|
|
1734
1741
|
l
|
|
1735
1742
|
);
|
|
1736
|
-
return l && (
|
|
1737
|
-
...
|
|
1743
|
+
return l && (v = {
|
|
1744
|
+
...v,
|
|
1738
1745
|
...l
|
|
1739
|
-
}),
|
|
1746
|
+
}), v;
|
|
1740
1747
|
}
|
|
1741
|
-
function
|
|
1742
|
-
const r =
|
|
1748
|
+
function ue(n) {
|
|
1749
|
+
const r = n.replace(/^.*\./, "") || void 0, p = n.replace(/^.*[/\\]/, "") || void 0;
|
|
1743
1750
|
return { extension: r, fileName: p };
|
|
1744
1751
|
}
|
|
1745
|
-
async function
|
|
1746
|
-
const { buffer: r, mimeType: p = "application/octet-stream" } = await yi(), c =
|
|
1752
|
+
async function Ji(n) {
|
|
1753
|
+
const { buffer: r, mimeType: p = "application/octet-stream" } = await yi(), c = ue(n), u = r.toString("base64");
|
|
1747
1754
|
return {
|
|
1748
1755
|
data: u,
|
|
1749
|
-
hash:
|
|
1756
|
+
hash: it(u),
|
|
1750
1757
|
mimeType: p,
|
|
1751
1758
|
...c
|
|
1752
1759
|
};
|
|
1753
1760
|
}
|
|
1754
|
-
async function
|
|
1755
|
-
const r = await vi(), p = ji.getType(
|
|
1756
|
-
return { data: u, hash:
|
|
1761
|
+
async function Hi(n) {
|
|
1762
|
+
const r = await vi(), p = ji.getType(n) || "application/octet-stream", c = ue(n), u = r.toString("base64");
|
|
1763
|
+
return { data: u, hash: it(u), mimeType: p, ...c };
|
|
1757
1764
|
}
|
|
1758
|
-
class
|
|
1765
|
+
class Zi {
|
|
1759
1766
|
/**
|
|
1760
1767
|
* Constructs a BaseDocument instance with an initial state.
|
|
1761
1768
|
* @param reducer - The reducer function that updates the state.
|
|
1762
1769
|
* @param document - The initial state of the document.
|
|
1763
1770
|
*/
|
|
1764
1771
|
constructor(r, p, c) {
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1772
|
+
X(this, "_document");
|
|
1773
|
+
X(this, "_reducer");
|
|
1774
|
+
X(this, "_signalDispatch");
|
|
1768
1775
|
this._reducer = r, this._document = p, this._signalDispatch = c;
|
|
1769
1776
|
}
|
|
1770
1777
|
/**
|
|
@@ -1794,7 +1801,7 @@ class Hi {
|
|
|
1794
1801
|
* @param path - The file path where the state is stored.
|
|
1795
1802
|
*/
|
|
1796
1803
|
async loadFromFile(r) {
|
|
1797
|
-
this._document = await
|
|
1804
|
+
this._document = await Tt(r, this._reducer);
|
|
1798
1805
|
}
|
|
1799
1806
|
/**
|
|
1800
1807
|
* Loads the state of the document from a file and returns it.
|
|
@@ -1803,19 +1810,19 @@ class Hi {
|
|
|
1803
1810
|
* @returns The state of the document.
|
|
1804
1811
|
*/
|
|
1805
1812
|
static async stateFromFile(r, p) {
|
|
1806
|
-
return await
|
|
1813
|
+
return await Tt(r, p);
|
|
1807
1814
|
}
|
|
1808
1815
|
/**
|
|
1809
1816
|
* Gets the current state of the document.
|
|
1810
1817
|
*/
|
|
1811
1818
|
get state() {
|
|
1812
|
-
return
|
|
1819
|
+
return Q(this._document.state);
|
|
1813
1820
|
}
|
|
1814
1821
|
/**
|
|
1815
1822
|
* Gets the list of operations performed on the document.
|
|
1816
1823
|
*/
|
|
1817
1824
|
get operations() {
|
|
1818
|
-
return
|
|
1825
|
+
return Q(this._document.operations);
|
|
1819
1826
|
}
|
|
1820
1827
|
/**
|
|
1821
1828
|
* Gets the name of the document.
|
|
@@ -1854,13 +1861,13 @@ class Hi {
|
|
|
1854
1861
|
* Gets the initial state of the document.
|
|
1855
1862
|
*/
|
|
1856
1863
|
get initialState() {
|
|
1857
|
-
return
|
|
1864
|
+
return Q(this._document.initialState);
|
|
1858
1865
|
}
|
|
1859
1866
|
/**
|
|
1860
1867
|
* Returns the current document as an object
|
|
1861
1868
|
*/
|
|
1862
1869
|
toDocument() {
|
|
1863
|
-
return
|
|
1870
|
+
return Q(this._document);
|
|
1864
1871
|
}
|
|
1865
1872
|
/**
|
|
1866
1873
|
* Gets the attachment associated with the given key.
|
|
@@ -1874,21 +1881,21 @@ class Hi {
|
|
|
1874
1881
|
* @param name - The new name of the document.
|
|
1875
1882
|
*/
|
|
1876
1883
|
setName(r) {
|
|
1877
|
-
return this.dispatch(
|
|
1884
|
+
return this.dispatch(oe(r)), this;
|
|
1878
1885
|
}
|
|
1879
1886
|
/**
|
|
1880
1887
|
* Reverts a number of actions from the document.
|
|
1881
1888
|
* @param count - The number of actions to revert.
|
|
1882
1889
|
*/
|
|
1883
1890
|
undo(r) {
|
|
1884
|
-
return this.dispatch(
|
|
1891
|
+
return this.dispatch(ae(r)), this;
|
|
1885
1892
|
}
|
|
1886
1893
|
/**
|
|
1887
1894
|
* Reapplies a number of actions to the document.
|
|
1888
1895
|
* @param count - The number of actions to reapply.
|
|
1889
1896
|
*/
|
|
1890
1897
|
redo(r) {
|
|
1891
|
-
return this.dispatch(
|
|
1898
|
+
return this.dispatch(pe(r)), this;
|
|
1892
1899
|
}
|
|
1893
1900
|
/**
|
|
1894
1901
|
* Removes a range of operations from the document.
|
|
@@ -1896,7 +1903,7 @@ class Hi {
|
|
|
1896
1903
|
* @param end - The ending index of the range to remove.
|
|
1897
1904
|
*/
|
|
1898
1905
|
prune(r, p) {
|
|
1899
|
-
return this.dispatch(
|
|
1906
|
+
return this.dispatch(se(r, p)), this;
|
|
1900
1907
|
}
|
|
1901
1908
|
/**
|
|
1902
1909
|
* Loads a document state and a set of operations.
|
|
@@ -1904,15 +1911,15 @@ class Hi {
|
|
|
1904
1911
|
* @param operations - The operations to apply to the document.
|
|
1905
1912
|
*/
|
|
1906
1913
|
loadState(r, p) {
|
|
1907
|
-
return this.dispatch(
|
|
1914
|
+
return this.dispatch(gt(r, p)), this;
|
|
1908
1915
|
}
|
|
1909
1916
|
}
|
|
1910
|
-
function
|
|
1917
|
+
function Yi(n, r) {
|
|
1911
1918
|
r.forEach((p) => {
|
|
1912
1919
|
Object.getOwnPropertyNames(p.prototype).forEach((c) => {
|
|
1913
1920
|
Object.defineProperty(
|
|
1914
1921
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1915
|
-
|
|
1922
|
+
n.prototype,
|
|
1916
1923
|
c,
|
|
1917
1924
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
1918
1925
|
Object.getOwnPropertyDescriptor(p.prototype, c) || /* @__PURE__ */ Object.create(null)
|
|
@@ -1921,33 +1928,34 @@ function Zi(o, r) {
|
|
|
1921
1928
|
});
|
|
1922
1929
|
}
|
|
1923
1930
|
export {
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1931
|
+
Kt as A,
|
|
1932
|
+
Zi as B,
|
|
1933
|
+
Ke as C,
|
|
1934
|
+
Li as D,
|
|
1927
1935
|
Fi as a,
|
|
1928
1936
|
Ai as b,
|
|
1929
1937
|
_i as c,
|
|
1930
|
-
|
|
1938
|
+
Wi as d,
|
|
1931
1939
|
Ui as e,
|
|
1932
1940
|
q as f,
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
+
Yi as g,
|
|
1942
|
+
$i as h,
|
|
1943
|
+
Ut as i,
|
|
1944
|
+
le as j,
|
|
1945
|
+
Hi as k,
|
|
1946
|
+
Tt as l,
|
|
1947
|
+
Ji as m,
|
|
1948
|
+
re as n,
|
|
1941
1949
|
zi as o,
|
|
1942
1950
|
Ei as p,
|
|
1943
|
-
|
|
1944
|
-
|
|
1951
|
+
qi as q,
|
|
1952
|
+
Ot as r,
|
|
1945
1953
|
Oi as s,
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1954
|
+
Si as t,
|
|
1955
|
+
Q as u,
|
|
1956
|
+
ne as v,
|
|
1957
|
+
lt as w,
|
|
1958
|
+
ki as x,
|
|
1959
|
+
Pi as y,
|
|
1960
|
+
Ii as z
|
|
1953
1961
|
};
|