document-model 1.0.19 → 1.0.20
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/actions/creators.d.ts +4 -4
- package/dist/browser/document/actions/index.d.ts +4 -4
- package/dist/browser/document/object.d.ts +119 -13
- package/dist/browser/document/schema/types.d.ts +5 -4
- package/dist/browser/document/schema/zod.d.ts +14 -12
- package/dist/browser/document/types.d.ts +2 -5
- package/dist/browser/document-model/gen/schema/zod.d.ts +5 -3
- package/dist/browser/document-model/index.d.ts +3 -3
- 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-46b68530.js → index-22f88bf2.js} +361 -357
- package/dist/{node/internal/index-f235f9be.js → browser/internal/index-3607fd07.js} +1 -1
- package/dist/{node/internal/index-6477ee0a.js → browser/internal/index-79fde5f3.js} +1 -1
- package/dist/browser/internal/index-dda5d688.js +22 -0
- package/dist/browser/internal/object-32802eed.js +6 -0
- package/dist/browser/internal/{object-d50f7d2f.js → object-d03c84c9.js} +857 -819
- package/dist/node/document/actions/creators.d.ts +4 -4
- package/dist/node/document/actions/index.d.ts +4 -4
- package/dist/node/document/object.d.ts +119 -13
- package/dist/node/document/schema/types.d.ts +5 -4
- package/dist/node/document/schema/zod.d.ts +14 -12
- package/dist/node/document/types.d.ts +2 -5
- package/dist/node/document-model/gen/schema/zod.d.ts +5 -3
- package/dist/node/document-model/index.d.ts +3 -3
- 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 +2 -2
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.js +3 -3
- package/dist/node/internal/{index-8d582c48.js → index-14279b3a.js} +361 -357
- package/dist/{browser/internal/index-869c5d0d.js → node/internal/index-4b25c8a5.js} +1 -1
- package/dist/node/internal/index-bfc402ef.js +22 -0
- package/dist/{browser/internal/index-2551382e.js → node/internal/index-e02d7854.js} +1 -1
- package/dist/node/internal/object-ac706c4a.js +1 -0
- package/dist/node/internal/{object-773231ca.js → object-b97efc1b.js} +399 -361
- package/package.json +1 -1
- package/dist/browser/internal/index-1ad32a2e.js +0 -22
- package/dist/browser/internal/object-1fdba77d.js +0 -6
- package/dist/node/internal/index-631ba7bf.js +0 -22
- package/dist/node/internal/object-08bd169a.js +0 -1
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import { produce as
|
|
1
|
+
var rt = Object.defineProperty;
|
|
2
|
+
var mt = (t, e, i) => e in t ? rt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
|
|
3
|
+
var j = (t, e, i) => (mt(t, typeof e != "symbol" ? e + "" : e, i), i);
|
|
4
|
+
import ut from "json-stringify-deterministic";
|
|
5
|
+
import { produce as P, castDraft as dt, castImmutable as xt, freeze as gt } from "immer";
|
|
6
6
|
import { z as o } from "zod";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { join as
|
|
12
|
-
const
|
|
13
|
-
function
|
|
7
|
+
import M from "jszip";
|
|
8
|
+
import ft from "crypto";
|
|
9
|
+
import k from "fs";
|
|
10
|
+
import ht from "https";
|
|
11
|
+
import { join as bt } from "path";
|
|
12
|
+
const R = (t) => t != null, vt = o.any().refine((t) => R(t)), L = o.enum(["LOAD_STATE"]), U = o.enum(["PRUNE"]), J = o.enum(["REDO"]), $ = o.enum(["SET_NAME"]), C = o.enum(["UNDO"]);
|
|
13
|
+
function yt() {
|
|
14
14
|
return o.object({
|
|
15
15
|
__typename: o.literal("Action").optional(),
|
|
16
16
|
type: o.string()
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function x() {
|
|
20
|
+
return o.literal("global").or(o.literal("local"));
|
|
21
|
+
}
|
|
22
|
+
function B() {
|
|
20
23
|
return o.union([
|
|
21
|
-
$(),
|
|
22
|
-
B(),
|
|
23
24
|
Z(),
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
K(),
|
|
26
|
+
W(),
|
|
27
|
+
G(),
|
|
28
|
+
Q()
|
|
26
29
|
]);
|
|
27
30
|
}
|
|
28
|
-
function
|
|
31
|
+
function jt() {
|
|
29
32
|
return o.object({
|
|
30
33
|
__typename: o.literal("DocumentFile").optional(),
|
|
31
34
|
data: o.string(),
|
|
@@ -34,26 +37,26 @@ function bt() {
|
|
|
34
37
|
mimeType: o.string()
|
|
35
38
|
});
|
|
36
39
|
}
|
|
37
|
-
function
|
|
40
|
+
function Z() {
|
|
38
41
|
return o.object({
|
|
39
|
-
input: o.lazy(() =>
|
|
40
|
-
type:
|
|
41
|
-
scope:
|
|
42
|
+
input: o.lazy(() => E()),
|
|
43
|
+
type: L,
|
|
44
|
+
scope: x()
|
|
42
45
|
});
|
|
43
46
|
}
|
|
44
|
-
function
|
|
47
|
+
function E() {
|
|
45
48
|
return o.object({
|
|
46
49
|
operations: o.number(),
|
|
47
|
-
state: o.lazy(() =>
|
|
50
|
+
state: o.lazy(() => H())
|
|
48
51
|
});
|
|
49
52
|
}
|
|
50
|
-
function
|
|
53
|
+
function H() {
|
|
51
54
|
return o.object({
|
|
52
55
|
data: o.unknown().nullish(),
|
|
53
56
|
name: o.string()
|
|
54
57
|
});
|
|
55
58
|
}
|
|
56
|
-
function
|
|
59
|
+
function wt() {
|
|
57
60
|
return o.object({
|
|
58
61
|
__typename: o.literal("Operation").optional(),
|
|
59
62
|
hash: o.string(),
|
|
@@ -62,36 +65,36 @@ function vt() {
|
|
|
62
65
|
type: o.string()
|
|
63
66
|
});
|
|
64
67
|
}
|
|
65
|
-
function
|
|
68
|
+
function K() {
|
|
66
69
|
return o.object({
|
|
67
|
-
input: o.lazy(() =>
|
|
68
|
-
type:
|
|
69
|
-
scope:
|
|
70
|
+
input: o.lazy(() => N()),
|
|
71
|
+
type: U,
|
|
72
|
+
scope: x()
|
|
70
73
|
});
|
|
71
74
|
}
|
|
72
|
-
function
|
|
75
|
+
function N() {
|
|
73
76
|
return o.object({
|
|
74
77
|
end: o.number().nullish(),
|
|
75
78
|
start: o.number().nullish()
|
|
76
79
|
});
|
|
77
80
|
}
|
|
78
|
-
const
|
|
79
|
-
function
|
|
81
|
+
const A = o.number;
|
|
82
|
+
function W() {
|
|
80
83
|
return o.object({
|
|
81
|
-
input:
|
|
82
|
-
type:
|
|
83
|
-
scope:
|
|
84
|
+
input: A(),
|
|
85
|
+
type: J,
|
|
86
|
+
scope: x()
|
|
84
87
|
});
|
|
85
88
|
}
|
|
86
|
-
const
|
|
87
|
-
function
|
|
89
|
+
const T = o.string;
|
|
90
|
+
function G() {
|
|
88
91
|
return o.object({
|
|
89
|
-
input:
|
|
90
|
-
type:
|
|
92
|
+
input: T(),
|
|
93
|
+
type: $,
|
|
91
94
|
scope: o.literal("global")
|
|
92
95
|
});
|
|
93
96
|
}
|
|
94
|
-
function
|
|
97
|
+
function St() {
|
|
95
98
|
return o.object({
|
|
96
99
|
__typename: o.literal("SetNameOperation").optional(),
|
|
97
100
|
hash: o.string(),
|
|
@@ -101,240 +104,251 @@ function yt() {
|
|
|
101
104
|
type: o.string()
|
|
102
105
|
});
|
|
103
106
|
}
|
|
104
|
-
const
|
|
105
|
-
function
|
|
107
|
+
const z = o.number;
|
|
108
|
+
function Q() {
|
|
106
109
|
return o.object({
|
|
107
|
-
input:
|
|
108
|
-
type:
|
|
109
|
-
scope:
|
|
110
|
+
input: z(),
|
|
111
|
+
type: C,
|
|
112
|
+
scope: x()
|
|
110
113
|
});
|
|
111
114
|
}
|
|
112
|
-
const
|
|
115
|
+
const oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
113
116
|
__proto__: null,
|
|
114
|
-
ActionSchema:
|
|
115
|
-
BaseActionSchema:
|
|
116
|
-
DocumentFileSchema:
|
|
117
|
-
LoadStateActionInputSchema:
|
|
118
|
-
LoadStateActionSchema:
|
|
119
|
-
LoadStateActionStateInputSchema:
|
|
120
|
-
Load_StateSchema:
|
|
121
|
-
OperationSchema:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
117
|
+
ActionSchema: yt,
|
|
118
|
+
BaseActionSchema: B,
|
|
119
|
+
DocumentFileSchema: jt,
|
|
120
|
+
LoadStateActionInputSchema: E,
|
|
121
|
+
LoadStateActionSchema: Z,
|
|
122
|
+
LoadStateActionStateInputSchema: H,
|
|
123
|
+
Load_StateSchema: L,
|
|
124
|
+
OperationSchema: wt,
|
|
125
|
+
OperationScopeSchema: x,
|
|
126
|
+
PruneActionInputSchema: N,
|
|
127
|
+
PruneActionSchema: K,
|
|
128
|
+
PruneSchema: U,
|
|
129
|
+
RedoActionInputSchema: A,
|
|
130
|
+
RedoActionSchema: W,
|
|
131
|
+
RedoSchema: J,
|
|
132
|
+
SetNameActionInputSchema: T,
|
|
133
|
+
SetNameActionSchema: G,
|
|
134
|
+
SetNameOperationSchema: St,
|
|
135
|
+
Set_NameSchema: $,
|
|
136
|
+
UndoActionInputSchema: z,
|
|
137
|
+
UndoActionSchema: Q,
|
|
138
|
+
UndoSchema: C,
|
|
139
|
+
definedNonNullAnySchema: vt,
|
|
140
|
+
isDefinedNonNullAny: R
|
|
137
141
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
138
|
-
function
|
|
139
|
-
return { ...t, name:
|
|
142
|
+
function Ot(t, e) {
|
|
143
|
+
return { ...t, name: e };
|
|
140
144
|
}
|
|
141
|
-
function
|
|
142
|
-
const n = Math.min(
|
|
145
|
+
function _t(t, e, i) {
|
|
146
|
+
const { scope: a, input: n } = e, s = t.revision[e.scope], p = Math.min(n, s), l = t.operations[a].slice(
|
|
143
147
|
0,
|
|
144
|
-
|
|
148
|
+
s - p
|
|
145
149
|
);
|
|
146
150
|
return {
|
|
147
|
-
...
|
|
151
|
+
...S(
|
|
148
152
|
t.initialState,
|
|
149
153
|
{
|
|
150
|
-
|
|
151
|
-
|
|
154
|
+
...t.operations,
|
|
155
|
+
[a]: l
|
|
152
156
|
},
|
|
153
|
-
|
|
157
|
+
i
|
|
154
158
|
),
|
|
155
159
|
operations: t.operations,
|
|
156
|
-
revision:
|
|
160
|
+
revision: {
|
|
161
|
+
...t.revision,
|
|
162
|
+
[a]: t.revision[a] - p
|
|
163
|
+
}
|
|
157
164
|
};
|
|
158
165
|
}
|
|
159
|
-
function
|
|
160
|
-
const n = t.operations.
|
|
161
|
-
if (!
|
|
166
|
+
function Dt(t, e, i) {
|
|
167
|
+
const { scope: a, input: n } = e, s = t.operations[a].length - t.revision[a];
|
|
168
|
+
if (!s)
|
|
162
169
|
throw new Error("There is no UNDO operation to REDO");
|
|
163
|
-
const
|
|
170
|
+
const p = n < s ? n : s, l = t.operations[a].slice(
|
|
164
171
|
0,
|
|
165
|
-
t.revision +
|
|
172
|
+
t.revision[a] + p
|
|
166
173
|
);
|
|
167
174
|
return {
|
|
168
|
-
...
|
|
175
|
+
...S(
|
|
169
176
|
t.initialState,
|
|
170
177
|
{
|
|
171
|
-
|
|
172
|
-
|
|
178
|
+
...t.operations,
|
|
179
|
+
[a]: l
|
|
173
180
|
},
|
|
174
|
-
|
|
181
|
+
i
|
|
175
182
|
),
|
|
176
183
|
operations: t.operations,
|
|
177
|
-
revision:
|
|
184
|
+
revision: {
|
|
185
|
+
...t.revision,
|
|
186
|
+
[a]: t.revision[a] + p
|
|
187
|
+
}
|
|
178
188
|
};
|
|
179
189
|
}
|
|
180
|
-
function
|
|
181
|
-
|
|
182
|
-
|
|
190
|
+
function kt(t, e, i) {
|
|
191
|
+
const { scope: a } = e, n = t.operations[a];
|
|
192
|
+
let {
|
|
193
|
+
input: { start: s, end: p }
|
|
194
|
+
} = e;
|
|
195
|
+
s = s || 0, p = p || n.length;
|
|
196
|
+
const l = n.slice(s, p), r = n.slice(0, s), c = n.slice(p), u = S(
|
|
183
197
|
t.initialState,
|
|
184
198
|
{
|
|
185
|
-
|
|
186
|
-
|
|
199
|
+
...t.operations,
|
|
200
|
+
[a]: r.concat(l)
|
|
187
201
|
},
|
|
188
|
-
|
|
189
|
-
), { name:
|
|
190
|
-
return
|
|
202
|
+
i
|
|
203
|
+
), { name: m, state: v } = u, d = r.length, D = r.length ? r[r.length - 1].timestamp : c.length ? c[0].timestamp : (/* @__PURE__ */ new Date()).toISOString();
|
|
204
|
+
return S(
|
|
191
205
|
t.initialState,
|
|
192
206
|
{
|
|
193
|
-
|
|
194
|
-
|
|
207
|
+
...t.operations,
|
|
208
|
+
[a]: [
|
|
209
|
+
...r,
|
|
195
210
|
{
|
|
196
|
-
...
|
|
197
|
-
{ name:
|
|
198
|
-
|
|
211
|
+
...F(
|
|
212
|
+
{ name: m, state: v },
|
|
213
|
+
l.length
|
|
199
214
|
),
|
|
200
|
-
timestamp:
|
|
201
|
-
index:
|
|
202
|
-
hash:
|
|
215
|
+
timestamp: D,
|
|
216
|
+
index: d,
|
|
217
|
+
hash: at({ state: v }, "global")
|
|
203
218
|
},
|
|
204
|
-
...
|
|
205
|
-
...
|
|
206
|
-
index:
|
|
219
|
+
...c.map((y, ct) => ({
|
|
220
|
+
...y,
|
|
221
|
+
index: d + ct + 1
|
|
207
222
|
}))
|
|
208
|
-
]
|
|
209
|
-
local: t.operations.local
|
|
223
|
+
]
|
|
210
224
|
},
|
|
211
|
-
|
|
225
|
+
i
|
|
212
226
|
);
|
|
213
227
|
}
|
|
214
|
-
function
|
|
228
|
+
function Et(t, e) {
|
|
215
229
|
return {
|
|
216
230
|
...t,
|
|
217
|
-
name:
|
|
218
|
-
state:
|
|
231
|
+
name: e.name,
|
|
232
|
+
state: e.state ?? { global: {}, local: {} }
|
|
219
233
|
};
|
|
220
234
|
}
|
|
221
|
-
const
|
|
222
|
-
function
|
|
235
|
+
const V = "SET_NAME", g = "UNDO", f = "REDO", h = "PRUNE", X = "LOAD_STATE";
|
|
236
|
+
function Nt(t) {
|
|
223
237
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
224
238
|
}
|
|
225
|
-
function
|
|
239
|
+
function O() {
|
|
226
240
|
this._types = /* @__PURE__ */ Object.create(null), this._extensions = /* @__PURE__ */ Object.create(null);
|
|
227
241
|
for (let t = 0; t < arguments.length; t++)
|
|
228
242
|
this.define(arguments[t]);
|
|
229
243
|
this.define = this.define.bind(this), this.getType = this.getType.bind(this), this.getExtension = this.getExtension.bind(this);
|
|
230
244
|
}
|
|
231
|
-
|
|
232
|
-
for (let
|
|
233
|
-
let
|
|
234
|
-
return
|
|
245
|
+
O.prototype.define = function(t, e) {
|
|
246
|
+
for (let i in t) {
|
|
247
|
+
let a = t[i].map(function(n) {
|
|
248
|
+
return n.toLowerCase();
|
|
235
249
|
});
|
|
236
|
-
|
|
237
|
-
for (let
|
|
238
|
-
const s = n
|
|
250
|
+
i = i.toLowerCase();
|
|
251
|
+
for (let n = 0; n < a.length; n++) {
|
|
252
|
+
const s = a[n];
|
|
239
253
|
if (s[0] !== "*") {
|
|
240
|
-
if (!
|
|
254
|
+
if (!e && s in this._types)
|
|
241
255
|
throw new Error(
|
|
242
|
-
'Attempt to change mapping for "' + s + '" extension from "' + this._types[s] + '" to "' +
|
|
256
|
+
'Attempt to change mapping for "' + s + '" extension from "' + this._types[s] + '" to "' + i + '". Pass `force=true` to allow this, otherwise remove "' + s + '" from the list of extensions for "' + i + '".'
|
|
243
257
|
);
|
|
244
|
-
this._types[s] =
|
|
258
|
+
this._types[s] = i;
|
|
245
259
|
}
|
|
246
260
|
}
|
|
247
|
-
if (
|
|
248
|
-
const
|
|
249
|
-
this._extensions[
|
|
261
|
+
if (e || !this._extensions[i]) {
|
|
262
|
+
const n = a[0];
|
|
263
|
+
this._extensions[i] = n[0] !== "*" ? n : n.substr(1);
|
|
250
264
|
}
|
|
251
265
|
}
|
|
252
266
|
};
|
|
253
|
-
|
|
267
|
+
O.prototype.getType = function(t) {
|
|
254
268
|
t = String(t);
|
|
255
|
-
let
|
|
256
|
-
return (
|
|
269
|
+
let e = t.replace(/^.*[/\\]/, "").toLowerCase(), i = e.replace(/^.*\./, "").toLowerCase(), a = e.length < t.length;
|
|
270
|
+
return (i.length < e.length - 1 || !a) && this._types[i] || null;
|
|
257
271
|
};
|
|
258
|
-
|
|
272
|
+
O.prototype.getExtension = function(t) {
|
|
259
273
|
return t = /^\s*([^;\s]*)/.test(t) && RegExp.$1, t && this._extensions[t.toLowerCase()] || null;
|
|
260
274
|
};
|
|
261
|
-
var kt = y, Et = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "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/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/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "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", "mjs"], "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/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": ["mp4s", "m4p"], "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-signature": ["asc", "sig"], "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/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/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/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/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/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "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"], "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/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "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/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "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/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"] };
|
|
262
|
-
let
|
|
263
|
-
var
|
|
264
|
-
const
|
|
265
|
-
function
|
|
266
|
-
const
|
|
267
|
-
return
|
|
275
|
+
var At = O, Tt = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "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/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/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "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", "mjs"], "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/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": ["mp4s", "m4p"], "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-signature": ["asc", "sig"], "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/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/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/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/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/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "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"], "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/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "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/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "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/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"] };
|
|
276
|
+
let zt = At;
|
|
277
|
+
var Ft = new zt(Tt);
|
|
278
|
+
const Pt = /* @__PURE__ */ Nt(Ft);
|
|
279
|
+
function qt(t, e, i) {
|
|
280
|
+
const a = bt(t, e);
|
|
281
|
+
return k.mkdirSync(t, { recursive: !0 }), new Promise((n, s) => {
|
|
268
282
|
try {
|
|
269
|
-
|
|
270
|
-
p ? s(p) : a
|
|
283
|
+
k.writeFile(a, i, {}, (p) => {
|
|
284
|
+
p ? s(p) : n(a);
|
|
271
285
|
});
|
|
272
286
|
} catch (p) {
|
|
273
287
|
s(p);
|
|
274
288
|
}
|
|
275
289
|
});
|
|
276
290
|
}
|
|
277
|
-
function
|
|
278
|
-
return
|
|
279
|
-
}
|
|
280
|
-
function
|
|
281
|
-
return new Promise((
|
|
282
|
-
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}),
|
|
287
|
-
|
|
291
|
+
function Y(t) {
|
|
292
|
+
return k.readFileSync(t);
|
|
293
|
+
}
|
|
294
|
+
function It(t) {
|
|
295
|
+
return new Promise((e, i) => {
|
|
296
|
+
ht.get(t, (a) => {
|
|
297
|
+
const n = [], s = a.headers["content-type"];
|
|
298
|
+
a.on("data", (p) => {
|
|
299
|
+
n.push(p);
|
|
300
|
+
}), a.on("end", () => {
|
|
301
|
+
e({ buffer: Buffer.concat(n), mimeType: s });
|
|
288
302
|
});
|
|
289
|
-
}).on("error", (
|
|
290
|
-
|
|
303
|
+
}).on("error", (a) => {
|
|
304
|
+
i(a);
|
|
291
305
|
});
|
|
292
306
|
});
|
|
293
307
|
}
|
|
294
|
-
const
|
|
295
|
-
const
|
|
296
|
-
name:
|
|
297
|
-
revision:
|
|
298
|
-
documentType:
|
|
308
|
+
const Mt = async (t) => Y(t), _ = (t, e = "sha1") => ft.createHash(e).update(t).digest("base64"), tt = async (t) => {
|
|
309
|
+
const e = new M(), { name: i, revision: a, documentType: n, created: s, lastModified: p } = t, l = {
|
|
310
|
+
name: i,
|
|
311
|
+
revision: a,
|
|
312
|
+
documentType: n,
|
|
299
313
|
created: s,
|
|
300
314
|
lastModified: p
|
|
301
315
|
};
|
|
302
|
-
return
|
|
316
|
+
return e.file("header.json", JSON.stringify(l, null, 2)), e.file(
|
|
303
317
|
"state.json",
|
|
304
318
|
JSON.stringify(t.initialState || {}, null, 2)
|
|
305
|
-
),
|
|
306
|
-
const { data:
|
|
307
|
-
|
|
319
|
+
), e.file("operations.json", JSON.stringify(t.operations, null, 2)), Object.keys(t.attachments).forEach((c) => {
|
|
320
|
+
const { data: u, ...m } = t.attachments[c];
|
|
321
|
+
e.file(c, u, {
|
|
308
322
|
base64: !0,
|
|
309
323
|
createFolders: !0,
|
|
310
|
-
comment: JSON.stringify(
|
|
324
|
+
comment: JSON.stringify(m)
|
|
311
325
|
});
|
|
312
|
-
}),
|
|
313
|
-
},
|
|
314
|
-
const s = await (await
|
|
326
|
+
}), e;
|
|
327
|
+
}, Rt = async (t, e, i, a) => {
|
|
328
|
+
const s = await (await tt(t)).generateAsync({
|
|
315
329
|
type: "uint8array",
|
|
316
330
|
streamFiles: !0
|
|
317
|
-
}), p =
|
|
318
|
-
return
|
|
319
|
-
|
|
331
|
+
}), p = a ?? t.name, l = `.${i}.zip`;
|
|
332
|
+
return qt(
|
|
333
|
+
e,
|
|
320
334
|
p.endsWith(l) ? p : `${p}${l}`,
|
|
321
335
|
s
|
|
322
336
|
);
|
|
323
|
-
},
|
|
324
|
-
const
|
|
325
|
-
await
|
|
326
|
-
},
|
|
327
|
-
const
|
|
328
|
-
return
|
|
329
|
-
},
|
|
330
|
-
const
|
|
331
|
-
return await
|
|
337
|
+
}, se = async (t, e) => {
|
|
338
|
+
const a = await (await tt(t)).generateAsync({ type: "blob" }), n = await e.createWritable();
|
|
339
|
+
await n.write(a), await n.close();
|
|
340
|
+
}, q = async (t, e) => {
|
|
341
|
+
const i = Y(t);
|
|
342
|
+
return Lt(i, e);
|
|
343
|
+
}, Lt = async (t, e) => {
|
|
344
|
+
const i = new M();
|
|
345
|
+
return await i.loadAsync(t), Ut(i, e);
|
|
332
346
|
};
|
|
333
|
-
async function
|
|
334
|
-
const
|
|
335
|
-
if (!
|
|
347
|
+
async function Ut(t, e) {
|
|
348
|
+
const i = t.file("state.json");
|
|
349
|
+
if (!i)
|
|
336
350
|
throw new Error("Initial state not found");
|
|
337
|
-
const
|
|
351
|
+
const a = await i.async("string"), n = JSON.parse(a), s = t.file("header.json");
|
|
338
352
|
let p;
|
|
339
353
|
s && (p = JSON.parse(await s.async("string")));
|
|
340
354
|
const l = t.file("operations.json");
|
|
@@ -343,10 +357,10 @@ async function Mt(t, i) {
|
|
|
343
357
|
const r = JSON.parse(
|
|
344
358
|
await l.async("string")
|
|
345
359
|
);
|
|
346
|
-
let c =
|
|
347
|
-
|
|
360
|
+
let c = nt(
|
|
361
|
+
n,
|
|
348
362
|
r,
|
|
349
|
-
|
|
363
|
+
e,
|
|
350
364
|
void 0,
|
|
351
365
|
p
|
|
352
366
|
);
|
|
@@ -355,90 +369,89 @@ async function Mt(t, i) {
|
|
|
355
369
|
...p
|
|
356
370
|
}), c;
|
|
357
371
|
}
|
|
358
|
-
function
|
|
359
|
-
const
|
|
360
|
-
return { extension:
|
|
372
|
+
function et(t) {
|
|
373
|
+
const e = t.replace(/^.*\./, "") || void 0, i = t.replace(/^.*[/\\]/, "") || void 0;
|
|
374
|
+
return { extension: e, fileName: i };
|
|
361
375
|
}
|
|
362
|
-
async function
|
|
363
|
-
const { buffer:
|
|
376
|
+
async function pe(t) {
|
|
377
|
+
const { buffer: e, mimeType: i = "application/octet-stream" } = await It(t), a = et(t), n = e.toString("base64");
|
|
364
378
|
return {
|
|
365
|
-
data:
|
|
366
|
-
hash:
|
|
367
|
-
mimeType:
|
|
368
|
-
...
|
|
379
|
+
data: n,
|
|
380
|
+
hash: _(n),
|
|
381
|
+
mimeType: i,
|
|
382
|
+
...a
|
|
369
383
|
};
|
|
370
384
|
}
|
|
371
|
-
async function
|
|
372
|
-
const
|
|
373
|
-
return { data:
|
|
385
|
+
async function le(t) {
|
|
386
|
+
const e = await Mt(t), i = Pt.getType(t) || "application/octet-stream", a = et(t), n = e.toString("base64");
|
|
387
|
+
return { data: n, hash: _(n), mimeType: i, ...a };
|
|
374
388
|
}
|
|
375
|
-
function
|
|
376
|
-
|
|
389
|
+
function Jt(t, e) {
|
|
390
|
+
const i = t.revision[e.scope];
|
|
391
|
+
return [g, f, h].includes(e.type) ? i : i + 1;
|
|
377
392
|
}
|
|
378
|
-
function
|
|
393
|
+
function $t(t, e) {
|
|
379
394
|
return {
|
|
380
395
|
...t,
|
|
381
|
-
revision:
|
|
396
|
+
revision: {
|
|
397
|
+
...t.revision,
|
|
398
|
+
[e.scope]: Jt(t, e)
|
|
399
|
+
},
|
|
382
400
|
lastModified: (/* @__PURE__ */ new Date()).toISOString()
|
|
383
401
|
};
|
|
384
402
|
}
|
|
385
|
-
function
|
|
386
|
-
if ([
|
|
403
|
+
function Ct(t, e) {
|
|
404
|
+
if ([g, f, h].includes(e.type))
|
|
387
405
|
return t;
|
|
388
|
-
const e = t.operations.
|
|
406
|
+
const { scope: i } = e, a = t.operations[i].slice(
|
|
389
407
|
0,
|
|
390
|
-
t.revision
|
|
391
|
-
)
|
|
408
|
+
t.revision[i]
|
|
409
|
+
);
|
|
392
410
|
return a.push({
|
|
393
|
-
...
|
|
411
|
+
...e,
|
|
394
412
|
index: a.length,
|
|
395
413
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
396
414
|
hash: "",
|
|
397
|
-
scope:
|
|
415
|
+
scope: i
|
|
398
416
|
}), {
|
|
399
417
|
...t,
|
|
400
|
-
operations: { ...t.operations, [
|
|
418
|
+
operations: { ...t.operations, [i]: a }
|
|
401
419
|
};
|
|
402
420
|
}
|
|
403
|
-
function
|
|
404
|
-
let
|
|
405
|
-
return
|
|
406
|
-
}
|
|
407
|
-
function
|
|
408
|
-
switch (
|
|
409
|
-
case
|
|
410
|
-
return
|
|
411
|
-
case d:
|
|
412
|
-
return wt(t, i.input, e);
|
|
413
|
-
case x:
|
|
414
|
-
return St(t, i.input, e);
|
|
421
|
+
function Bt(t, e) {
|
|
422
|
+
let i = Ct(t, e);
|
|
423
|
+
return i = $t(i, e), i;
|
|
424
|
+
}
|
|
425
|
+
function Zt(t, e, i) {
|
|
426
|
+
switch (B().parse(e), e.type) {
|
|
427
|
+
case V:
|
|
428
|
+
return Ot(t, e.input);
|
|
415
429
|
case g:
|
|
416
|
-
return
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
return _t(t, i.input.state);
|
|
430
|
+
return _t(t, e, i);
|
|
431
|
+
case f:
|
|
432
|
+
return Dt(t, e, i);
|
|
433
|
+
case h:
|
|
434
|
+
return kt(t, e, i);
|
|
435
|
+
case X:
|
|
436
|
+
return Et(t, e.input.state);
|
|
424
437
|
default:
|
|
425
438
|
return t;
|
|
426
439
|
}
|
|
427
440
|
}
|
|
428
|
-
function
|
|
429
|
-
let
|
|
430
|
-
return
|
|
431
|
-
const p =
|
|
441
|
+
function it(t, e, i, a) {
|
|
442
|
+
let n = t;
|
|
443
|
+
return I(e) && (n = Zt(n, e, i)), n = Bt(n, e), n = P(n, (s) => {
|
|
444
|
+
const p = i(s.state, e, a);
|
|
432
445
|
if (p)
|
|
433
|
-
return
|
|
434
|
-
...
|
|
446
|
+
return dt({
|
|
447
|
+
...n,
|
|
435
448
|
state: p
|
|
436
449
|
});
|
|
437
|
-
}),
|
|
438
|
-
if ([
|
|
450
|
+
}), P(n, (s) => {
|
|
451
|
+
if ([g, f, h].includes(e.type))
|
|
439
452
|
return s;
|
|
440
|
-
const p =
|
|
441
|
-
s.operations[p][s.operations[p].length - 1].hash =
|
|
453
|
+
const p = e.scope || "global";
|
|
454
|
+
s.operations[p][s.operations[p].length - 1].hash = at(s, p), !I(e) && e.attachments && e.attachments.forEach((l) => {
|
|
442
455
|
const { hash: r, ...c } = l;
|
|
443
456
|
s.attachments[r] = {
|
|
444
457
|
...c
|
|
@@ -446,87 +459,96 @@ function Y(t, i, e, n) {
|
|
|
446
459
|
});
|
|
447
460
|
});
|
|
448
461
|
}
|
|
449
|
-
function
|
|
450
|
-
return [
|
|
462
|
+
function I(t) {
|
|
463
|
+
return [V, g, f, h, X].includes(t.type);
|
|
451
464
|
}
|
|
452
|
-
function
|
|
465
|
+
function b(t, e, i, a, n = "global") {
|
|
453
466
|
if (!t)
|
|
454
467
|
throw new Error("Empty action type");
|
|
455
468
|
if (typeof t != "string")
|
|
456
469
|
throw new Error(`Invalid action type: ${t}`);
|
|
457
|
-
const s = { type: t, input:
|
|
458
|
-
|
|
470
|
+
const s = { type: t, input: e, scope: n };
|
|
471
|
+
i && (s.attachments = i);
|
|
459
472
|
try {
|
|
460
|
-
|
|
473
|
+
a == null || a().parse(s.input);
|
|
461
474
|
} catch (p) {
|
|
462
475
|
throw new Error(`Invalid action input: ${p}`);
|
|
463
476
|
}
|
|
464
477
|
return s;
|
|
465
478
|
}
|
|
466
|
-
function
|
|
467
|
-
return (
|
|
479
|
+
function Ht(t, e = it) {
|
|
480
|
+
return (i, a, n) => e(i, a, t, n);
|
|
468
481
|
}
|
|
469
|
-
const
|
|
482
|
+
const Kt = (t, e) => ({
|
|
470
483
|
name: "",
|
|
471
484
|
documentType: "",
|
|
472
|
-
revision:
|
|
485
|
+
revision: {
|
|
486
|
+
global: 0,
|
|
487
|
+
local: 0
|
|
488
|
+
},
|
|
473
489
|
created: (/* @__PURE__ */ new Date()).toISOString(),
|
|
474
490
|
lastModified: (/* @__PURE__ */ new Date()).toISOString(),
|
|
475
491
|
attachments: {},
|
|
476
492
|
...t,
|
|
477
|
-
state: (
|
|
478
|
-
}),
|
|
479
|
-
const
|
|
493
|
+
state: (e == null ? void 0 : e(t == null ? void 0 : t.state)) ?? (t == null ? void 0 : t.state) ?? { global: {}, local: {} }
|
|
494
|
+
}), Wt = (t, e) => {
|
|
495
|
+
const i = Kt(
|
|
480
496
|
t,
|
|
481
|
-
|
|
497
|
+
e
|
|
482
498
|
);
|
|
483
499
|
return {
|
|
484
|
-
...
|
|
485
|
-
initialState:
|
|
500
|
+
...i,
|
|
501
|
+
initialState: i,
|
|
486
502
|
operations: { global: [], local: [] }
|
|
487
503
|
};
|
|
488
|
-
},
|
|
489
|
-
const
|
|
490
|
-
return
|
|
504
|
+
}, at = (t, e = "global") => _(ut(t.state[e])), ce = (t, e = 1e3) => {
|
|
505
|
+
const i = Math.random() * e;
|
|
506
|
+
return _(`${(t ?? /* @__PURE__ */ new Date()).toISOString()}${i}`);
|
|
491
507
|
};
|
|
492
|
-
function
|
|
493
|
-
return
|
|
508
|
+
function w(t) {
|
|
509
|
+
return xt(gt(t, !0));
|
|
494
510
|
}
|
|
495
|
-
function
|
|
496
|
-
return Object.values(t).flatMap((
|
|
497
|
-
(
|
|
511
|
+
function Gt(t) {
|
|
512
|
+
return Object.values(t).flatMap((e) => e).sort(
|
|
513
|
+
(e, i) => new Date(e.timestamp).getTime() - new Date(i.timestamp).getTime()
|
|
498
514
|
);
|
|
499
515
|
}
|
|
500
|
-
function
|
|
501
|
-
const p =
|
|
502
|
-
return
|
|
516
|
+
function S(t, e, i, a, n, s = it) {
|
|
517
|
+
const p = Ht(i, s);
|
|
518
|
+
return nt(
|
|
503
519
|
t,
|
|
504
|
-
|
|
520
|
+
e,
|
|
505
521
|
p,
|
|
506
|
-
|
|
507
|
-
|
|
522
|
+
a,
|
|
523
|
+
n
|
|
508
524
|
);
|
|
509
525
|
}
|
|
510
|
-
function
|
|
511
|
-
const s =
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
526
|
+
function nt(t, e, i, a, n) {
|
|
527
|
+
const s = Wt(t), p = Object.keys(e).reduce((c, u) => {
|
|
528
|
+
const m = u;
|
|
529
|
+
return {
|
|
530
|
+
...c,
|
|
531
|
+
[m]: e[m].slice(0, n == null ? void 0 : n.revision[m])
|
|
532
|
+
};
|
|
533
|
+
}, {}), l = Gt(p).reduce(
|
|
534
|
+
(c, u) => i(c, u, a),
|
|
516
535
|
s
|
|
517
536
|
), r = Object.keys(
|
|
518
537
|
l.operations
|
|
519
538
|
).reduce(
|
|
520
|
-
(c,
|
|
521
|
-
const
|
|
539
|
+
(c, u) => {
|
|
540
|
+
const m = u, v = n && n.revision[m] < e[m].length ? e[m].slice(n.revision[m]) : [];
|
|
522
541
|
return {
|
|
523
542
|
...c,
|
|
524
|
-
[
|
|
525
|
-
...l.operations[
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
543
|
+
[m]: [
|
|
544
|
+
...l.operations[m].map((d, D) => {
|
|
545
|
+
var y;
|
|
546
|
+
return {
|
|
547
|
+
...d,
|
|
548
|
+
timestamp: ((y = e[m][D]) == null ? void 0 : y.timestamp) ?? d.timestamp
|
|
549
|
+
};
|
|
550
|
+
}),
|
|
551
|
+
...v
|
|
530
552
|
]
|
|
531
553
|
};
|
|
532
554
|
},
|
|
@@ -534,50 +556,63 @@ function it(t, i, e, n, a) {
|
|
|
534
556
|
);
|
|
535
557
|
return { ...l, operations: r };
|
|
536
558
|
}
|
|
537
|
-
const
|
|
559
|
+
const ot = (t) => b(
|
|
538
560
|
"SET_NAME",
|
|
539
561
|
t,
|
|
540
562
|
void 0,
|
|
541
|
-
|
|
542
|
-
),
|
|
563
|
+
T
|
|
564
|
+
), st = (t = 1, e = "global") => b(
|
|
565
|
+
"UNDO",
|
|
566
|
+
t,
|
|
567
|
+
void 0,
|
|
568
|
+
z,
|
|
569
|
+
e
|
|
570
|
+
), pt = (t = 1, e = "global") => b(
|
|
571
|
+
"REDO",
|
|
572
|
+
t,
|
|
573
|
+
void 0,
|
|
574
|
+
A,
|
|
575
|
+
e
|
|
576
|
+
), lt = (t, e, i = "global") => b(
|
|
543
577
|
"PRUNE",
|
|
544
|
-
{ start: t, end:
|
|
578
|
+
{ start: t, end: e },
|
|
545
579
|
void 0,
|
|
546
|
-
|
|
547
|
-
|
|
580
|
+
N,
|
|
581
|
+
i
|
|
582
|
+
), F = (t, e) => b(
|
|
548
583
|
"LOAD_STATE",
|
|
549
|
-
{ state: t, operations:
|
|
584
|
+
{ state: t, operations: e },
|
|
550
585
|
void 0,
|
|
551
|
-
|
|
552
|
-
),
|
|
586
|
+
E
|
|
587
|
+
), re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
553
588
|
__proto__: null,
|
|
554
|
-
loadState:
|
|
555
|
-
prune:
|
|
556
|
-
redo:
|
|
557
|
-
setName:
|
|
558
|
-
undo:
|
|
589
|
+
loadState: F,
|
|
590
|
+
prune: lt,
|
|
591
|
+
redo: pt,
|
|
592
|
+
setName: ot,
|
|
593
|
+
undo: st
|
|
559
594
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
560
|
-
class
|
|
595
|
+
class me {
|
|
561
596
|
/**
|
|
562
597
|
* Constructs a BaseDocument instance with an initial state.
|
|
563
598
|
* @param reducer - The reducer function that updates the state.
|
|
564
599
|
* @param document - The initial state of the document.
|
|
565
600
|
*/
|
|
566
|
-
constructor(
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
this._reducer =
|
|
601
|
+
constructor(e, i, a) {
|
|
602
|
+
j(this, "_document");
|
|
603
|
+
j(this, "_reducer");
|
|
604
|
+
j(this, "_signalDispatch");
|
|
605
|
+
this._reducer = e, this._document = i, this._signalDispatch = a;
|
|
571
606
|
}
|
|
572
607
|
/**
|
|
573
608
|
* Dispatches an action to update the state of the document.
|
|
574
609
|
* @param action - The action to dispatch.
|
|
575
610
|
* @returns The Document instance.
|
|
576
611
|
*/
|
|
577
|
-
dispatch(
|
|
612
|
+
dispatch(e) {
|
|
578
613
|
return this._document = this._reducer(
|
|
579
614
|
this._document,
|
|
580
|
-
|
|
615
|
+
e,
|
|
581
616
|
this._signalDispatch
|
|
582
617
|
), this;
|
|
583
618
|
}
|
|
@@ -587,15 +622,15 @@ class li {
|
|
|
587
622
|
* @param extension - The file extension to use when saving the state.
|
|
588
623
|
* @returns The file path where the state was saved.
|
|
589
624
|
*/
|
|
590
|
-
saveToFile(
|
|
591
|
-
return
|
|
625
|
+
saveToFile(e, i, a) {
|
|
626
|
+
return Rt(this._document, e, i, a);
|
|
592
627
|
}
|
|
593
628
|
/**
|
|
594
629
|
* Loads the state of the document from a file.
|
|
595
630
|
* @param path - The file path where the state is stored.
|
|
596
631
|
*/
|
|
597
|
-
async loadFromFile(
|
|
598
|
-
this._document = await
|
|
632
|
+
async loadFromFile(e) {
|
|
633
|
+
this._document = await q(e, this._reducer);
|
|
599
634
|
}
|
|
600
635
|
/**
|
|
601
636
|
* Loads the state of the document from a file and returns it.
|
|
@@ -603,20 +638,20 @@ class li {
|
|
|
603
638
|
* @param reducer - The reducer function that updates the state.
|
|
604
639
|
* @returns The state of the document.
|
|
605
640
|
*/
|
|
606
|
-
static async stateFromFile(
|
|
607
|
-
return await
|
|
641
|
+
static async stateFromFile(e, i) {
|
|
642
|
+
return await q(e, i);
|
|
608
643
|
}
|
|
609
644
|
/**
|
|
610
645
|
* Gets the current state of the document.
|
|
611
646
|
*/
|
|
612
647
|
get state() {
|
|
613
|
-
return
|
|
648
|
+
return w(this._document.state);
|
|
614
649
|
}
|
|
615
650
|
/**
|
|
616
651
|
* Gets the list of operations performed on the document.
|
|
617
652
|
*/
|
|
618
653
|
get operations() {
|
|
619
|
-
return
|
|
654
|
+
return w(this._document.operations);
|
|
620
655
|
}
|
|
621
656
|
/**
|
|
622
657
|
* Gets the name of the document.
|
|
@@ -643,101 +678,104 @@ class li {
|
|
|
643
678
|
return this._document.lastModified;
|
|
644
679
|
}
|
|
645
680
|
/**
|
|
646
|
-
* Gets the revision number of the document.
|
|
681
|
+
* Gets the global revision number of the document.
|
|
647
682
|
*/
|
|
648
683
|
get revision() {
|
|
649
|
-
return this._document.revision;
|
|
684
|
+
return this._document.revision.global;
|
|
685
|
+
}
|
|
686
|
+
getRevision(e) {
|
|
687
|
+
return this._document.revision[e];
|
|
650
688
|
}
|
|
651
689
|
/**
|
|
652
690
|
* Gets the initial state of the document.
|
|
653
691
|
*/
|
|
654
692
|
get initialState() {
|
|
655
|
-
return
|
|
693
|
+
return w(this._document.initialState);
|
|
656
694
|
}
|
|
657
695
|
/**
|
|
658
696
|
* Returns the current document as an object
|
|
659
697
|
*/
|
|
660
698
|
toDocument() {
|
|
661
|
-
return
|
|
699
|
+
return w(this._document);
|
|
662
700
|
}
|
|
663
701
|
/**
|
|
664
702
|
* Gets the attachment associated with the given key.
|
|
665
703
|
* @param attachment - The key of the attachment to retrieve.
|
|
666
704
|
*/
|
|
667
|
-
getAttachment(
|
|
668
|
-
return this._document.attachments[
|
|
705
|
+
getAttachment(e) {
|
|
706
|
+
return this._document.attachments[e];
|
|
669
707
|
}
|
|
670
708
|
/**
|
|
671
709
|
* Sets the name of the document.
|
|
672
710
|
* @param name - The new name of the document.
|
|
673
711
|
*/
|
|
674
|
-
setName(
|
|
675
|
-
return this.dispatch(
|
|
712
|
+
setName(e) {
|
|
713
|
+
return this.dispatch(ot(e)), this;
|
|
676
714
|
}
|
|
677
715
|
/**
|
|
678
716
|
* Reverts a number of actions from the document.
|
|
679
717
|
* @param count - The number of actions to revert.
|
|
680
718
|
*/
|
|
681
|
-
undo(
|
|
682
|
-
return this.dispatch(
|
|
719
|
+
undo(e) {
|
|
720
|
+
return this.dispatch(st(e)), this;
|
|
683
721
|
}
|
|
684
722
|
/**
|
|
685
723
|
* Reapplies a number of actions to the document.
|
|
686
724
|
* @param count - The number of actions to reapply.
|
|
687
725
|
*/
|
|
688
|
-
redo(
|
|
689
|
-
return this.dispatch(
|
|
726
|
+
redo(e) {
|
|
727
|
+
return this.dispatch(pt(e)), this;
|
|
690
728
|
}
|
|
691
729
|
/**
|
|
692
730
|
* Removes a range of operations from the document.
|
|
693
731
|
* @param start - The starting index of the range to remove.
|
|
694
732
|
* @param end - The ending index of the range to remove.
|
|
695
733
|
*/
|
|
696
|
-
prune(
|
|
697
|
-
return this.dispatch(
|
|
734
|
+
prune(e, i) {
|
|
735
|
+
return this.dispatch(lt(e, i)), this;
|
|
698
736
|
}
|
|
699
737
|
/**
|
|
700
738
|
* Loads a document state and a set of operations.
|
|
701
739
|
* @param state - The state to load.
|
|
702
740
|
* @param operations - The operations to apply to the document.
|
|
703
741
|
*/
|
|
704
|
-
loadState(
|
|
705
|
-
return this.dispatch(
|
|
742
|
+
loadState(e, i) {
|
|
743
|
+
return this.dispatch(F(e, i)), this;
|
|
706
744
|
}
|
|
707
745
|
}
|
|
708
|
-
function
|
|
709
|
-
|
|
710
|
-
Object.getOwnPropertyNames(
|
|
746
|
+
function ue(t, e) {
|
|
747
|
+
e.forEach((i) => {
|
|
748
|
+
Object.getOwnPropertyNames(i.prototype).forEach((a) => {
|
|
711
749
|
Object.defineProperty(
|
|
712
750
|
t.prototype,
|
|
713
|
-
|
|
714
|
-
Object.getOwnPropertyDescriptor(
|
|
751
|
+
a,
|
|
752
|
+
Object.getOwnPropertyDescriptor(i.prototype, a) || /* @__PURE__ */ Object.create(null)
|
|
715
753
|
);
|
|
716
754
|
});
|
|
717
755
|
});
|
|
718
756
|
}
|
|
719
757
|
export {
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
f,
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
758
|
+
me as B,
|
|
759
|
+
Kt as a,
|
|
760
|
+
Wt as b,
|
|
761
|
+
Ht as c,
|
|
762
|
+
se as d,
|
|
763
|
+
Lt as e,
|
|
764
|
+
b as f,
|
|
765
|
+
ue as g,
|
|
766
|
+
re as h,
|
|
767
|
+
I as i,
|
|
768
|
+
tt as j,
|
|
769
|
+
le as k,
|
|
770
|
+
q as l,
|
|
771
|
+
pe as m,
|
|
772
|
+
at as n,
|
|
773
|
+
ce as o,
|
|
774
|
+
nt as p,
|
|
775
|
+
S as q,
|
|
776
|
+
w as r,
|
|
777
|
+
Rt as s,
|
|
778
|
+
Gt as t,
|
|
779
|
+
it as u,
|
|
780
|
+
oe as z
|
|
743
781
|
};
|