storybook 9.0.0-alpha.13 → 9.0.0-alpha.15
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/actions/decorator.js +46 -47
- package/dist/actions/index.cjs +28 -29
- package/dist/actions/index.d.ts +0 -3
- package/dist/actions/index.js +27 -28
- package/dist/actions/preview.cjs +22 -23
- package/dist/actions/preview.js +18 -19
- package/dist/bin/index.cjs +67 -71
- package/dist/bin/index.js +56 -60
- package/dist/channels/index.cjs +1018 -948
- package/dist/channels/index.js +1194 -1161
- package/dist/cli/bin/index.cjs +1 -1
- package/dist/cli/bin/index.js +1 -1
- package/dist/cli/index.cjs +1860 -1871
- package/dist/cli/index.js +308 -319
- package/dist/common/index.cjs +43 -49
- package/dist/common/index.d.ts +0 -4
- package/dist/common/index.js +43 -49
- package/dist/components/index.cjs +6375 -12708
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.js +4647 -10782
- package/dist/core-server/index.cjs +13626 -13550
- package/dist/core-server/index.js +11863 -11787
- package/dist/core-server/presets/common-manager.js +3221 -3138
- package/dist/manager/globals-runtime.js +29817 -33554
- package/dist/manager-api/index.cjs +2518 -2330
- package/dist/manager-api/index.js +2432 -2234
- package/dist/preview/runtime.js +18415 -16011
- package/dist/preview-api/index.cjs +619 -603
- package/dist/preview-api/index.d.ts +386 -118
- package/dist/preview-api/index.js +542 -526
- package/dist/server-errors.cjs +132 -118
- package/dist/server-errors.d.ts +4 -2
- package/dist/server-errors.js +127 -113
- package/dist/test/preview.d.ts +6 -0
- package/dist/types/index.d.ts +1 -4
- package/package.json +2 -2
package/dist/channels/index.js
CHANGED
|
@@ -1,243 +1,85 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var le = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var ce = Object.getOwnPropertyNames;
|
|
5
|
-
var pe = Object.getPrototypeOf, ue = Object.prototype.hasOwnProperty;
|
|
6
|
-
var a = (r, t) => ut(r, "name", { value: t, configurable: !0 }), H = /* @__PURE__ */ ((r) => typeof require < "u" ? require : typeof Proxy <
|
|
7
|
-
"u" ? new Proxy(r, {
|
|
8
|
-
get: (t, e) => (typeof require < "u" ? require : t)[e]
|
|
9
|
-
}) : r)(function(r) {
|
|
10
|
-
if (typeof require < "u") return require.apply(this, arguments);
|
|
11
|
-
throw Error('Dynamic require of "' + r + '" is not supported');
|
|
12
|
-
});
|
|
13
|
-
var fe = (r, t) => () => (t || r((t = { exports: {} }).exports, t), t.exports);
|
|
14
|
-
var he = (r, t, e, n) => {
|
|
15
|
-
if (t && typeof t == "object" || typeof t == "function")
|
|
16
|
-
for (let o of ce(t))
|
|
17
|
-
!ue.call(r, o) && o !== e && ut(r, o, { get: () => t[o], enumerable: !(n = le(t, o)) || n.enumerable });
|
|
18
|
-
return r;
|
|
19
|
-
};
|
|
20
|
-
var ye = (r, t, e) => (e = r != null ? se(pe(r)) : {}, he(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
t || !r || !r.__esModule ? ut(e, "default", { value: r, enumerable: !0 }) : e,
|
|
26
|
-
r
|
|
27
|
-
));
|
|
28
|
-
|
|
29
|
-
// ../node_modules/memoizerific/memoizerific.js
|
|
30
|
-
var xt = fe((It, yt) => {
|
|
31
|
-
(function(r) {
|
|
32
|
-
if (typeof It == "object" && typeof yt < "u")
|
|
33
|
-
yt.exports = r();
|
|
34
|
-
else if (typeof define == "function" && define.amd)
|
|
35
|
-
define([], r);
|
|
36
|
-
else {
|
|
37
|
-
var t;
|
|
38
|
-
typeof window < "u" ? t = window : typeof global < "u" ? t = global : typeof self < "u" ? t = self : t = this, t.memoizerific = r();
|
|
39
|
-
}
|
|
40
|
-
})(function() {
|
|
41
|
-
var r, t, e;
|
|
42
|
-
return (/* @__PURE__ */ a(function n(o, s, l) {
|
|
43
|
-
function c(p, u) {
|
|
44
|
-
if (!s[p]) {
|
|
45
|
-
if (!o[p]) {
|
|
46
|
-
var y = typeof H == "function" && H;
|
|
47
|
-
if (!u && y) return y(p, !0);
|
|
48
|
-
if (i) return i(p, !0);
|
|
49
|
-
var v = new Error("Cannot find module '" + p + "'");
|
|
50
|
-
throw v.code = "MODULE_NOT_FOUND", v;
|
|
51
|
-
}
|
|
52
|
-
var d = s[p] = { exports: {} };
|
|
53
|
-
o[p][0].call(d.exports, function(m) {
|
|
54
|
-
var E = o[p][1][m];
|
|
55
|
-
return c(E || m);
|
|
56
|
-
}, d, d.exports, n, o, s, l);
|
|
57
|
-
}
|
|
58
|
-
return s[p].exports;
|
|
59
|
-
}
|
|
60
|
-
a(c, "s");
|
|
61
|
-
for (var i = typeof H == "function" && H, g = 0; g < l.length; g++) c(l[g]);
|
|
62
|
-
return c;
|
|
63
|
-
}, "e"))({ 1: [function(n, o, s) {
|
|
64
|
-
o.exports = function(l) {
|
|
65
|
-
if (typeof Map != "function" || l) {
|
|
66
|
-
var c = n("./similar");
|
|
67
|
-
return new c();
|
|
68
|
-
} else
|
|
69
|
-
return /* @__PURE__ */ new Map();
|
|
70
|
-
};
|
|
71
|
-
}, { "./similar": 2 }], 2: [function(n, o, s) {
|
|
72
|
-
function l() {
|
|
73
|
-
return this.list = [], this.lastItem = void 0, this.size = 0, this;
|
|
74
|
-
}
|
|
75
|
-
a(l, "Similar"), l.prototype.get = function(c) {
|
|
76
|
-
var i;
|
|
77
|
-
if (this.lastItem && this.isEqual(this.lastItem.key, c))
|
|
78
|
-
return this.lastItem.val;
|
|
79
|
-
if (i = this.indexOf(c), i >= 0)
|
|
80
|
-
return this.lastItem = this.list[i], this.list[i].val;
|
|
81
|
-
}, l.prototype.set = function(c, i) {
|
|
82
|
-
var g;
|
|
83
|
-
return this.lastItem && this.isEqual(this.lastItem.key, c) ? (this.lastItem.val = i, this) : (g = this.indexOf(c), g >= 0 ? (this.lastItem =
|
|
84
|
-
this.list[g], this.list[g].val = i, this) : (this.lastItem = { key: c, val: i }, this.list.push(this.lastItem), this.size++, this));
|
|
85
|
-
}, l.prototype.delete = function(c) {
|
|
86
|
-
var i;
|
|
87
|
-
if (this.lastItem && this.isEqual(this.lastItem.key, c) && (this.lastItem = void 0), i = this.indexOf(c), i >= 0)
|
|
88
|
-
return this.size--, this.list.splice(i, 1)[0];
|
|
89
|
-
}, l.prototype.has = function(c) {
|
|
90
|
-
var i;
|
|
91
|
-
return this.lastItem && this.isEqual(this.lastItem.key, c) ? !0 : (i = this.indexOf(c), i >= 0 ? (this.lastItem = this.list[i], !0) :
|
|
92
|
-
!1);
|
|
93
|
-
}, l.prototype.forEach = function(c, i) {
|
|
94
|
-
var g;
|
|
95
|
-
for (g = 0; g < this.size; g++)
|
|
96
|
-
c.call(i || this, this.list[g].val, this.list[g].key, this);
|
|
97
|
-
}, l.prototype.indexOf = function(c) {
|
|
98
|
-
var i;
|
|
99
|
-
for (i = 0; i < this.size; i++)
|
|
100
|
-
if (this.isEqual(this.list[i].key, c))
|
|
101
|
-
return i;
|
|
102
|
-
return -1;
|
|
103
|
-
}, l.prototype.isEqual = function(c, i) {
|
|
104
|
-
return c === i || c !== c && i !== i;
|
|
105
|
-
}, o.exports = l;
|
|
106
|
-
}, {}], 3: [function(n, o, s) {
|
|
107
|
-
var l = n("map-or-similar");
|
|
108
|
-
o.exports = function(p) {
|
|
109
|
-
var u = new l(!1), y = [];
|
|
110
|
-
return function(v) {
|
|
111
|
-
var d = /* @__PURE__ */ a(function() {
|
|
112
|
-
var m = u, E, I, _ = arguments.length - 1, R = Array(_ + 1), C = !0, N;
|
|
113
|
-
if ((d.numArgs || d.numArgs === 0) && d.numArgs !== _ + 1)
|
|
114
|
-
throw new Error("Memoizerific functions should always be called with the same number of arguments");
|
|
115
|
-
for (N = 0; N < _; N++) {
|
|
116
|
-
if (R[N] = {
|
|
117
|
-
cacheItem: m,
|
|
118
|
-
arg: arguments[N]
|
|
119
|
-
}, m.has(arguments[N])) {
|
|
120
|
-
m = m.get(arguments[N]);
|
|
121
|
-
continue;
|
|
122
|
-
}
|
|
123
|
-
C = !1, E = new l(!1), m.set(arguments[N], E), m = E;
|
|
124
|
-
}
|
|
125
|
-
return C && (m.has(arguments[_]) ? I = m.get(arguments[_]) : C = !1), C || (I = v.apply(null, arguments), m.set(arguments[_], I)),
|
|
126
|
-
p > 0 && (R[_] = {
|
|
127
|
-
cacheItem: m,
|
|
128
|
-
arg: arguments[_]
|
|
129
|
-
}, C ? c(y, R) : y.push(R), y.length > p && i(y.shift())), d.wasMemoized = C, d.numArgs = _ + 1, I;
|
|
130
|
-
}, "memoizerific");
|
|
131
|
-
return d.limit = p, d.wasMemoized = !1, d.cache = u, d.lru = y, d;
|
|
132
|
-
};
|
|
133
|
-
};
|
|
134
|
-
function c(p, u) {
|
|
135
|
-
var y = p.length, v = u.length, d, m, E;
|
|
136
|
-
for (m = 0; m < y; m++) {
|
|
137
|
-
for (d = !0, E = 0; E < v; E++)
|
|
138
|
-
if (!g(p[m][E].arg, u[E].arg)) {
|
|
139
|
-
d = !1;
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
if (d)
|
|
143
|
-
break;
|
|
144
|
-
}
|
|
145
|
-
p.push(p.splice(m, 1)[0]);
|
|
146
|
-
}
|
|
147
|
-
a(c, "moveToMostRecentLru");
|
|
148
|
-
function i(p) {
|
|
149
|
-
var u = p.length, y = p[u - 1], v, d;
|
|
150
|
-
for (y.cacheItem.delete(y.arg), d = u - 2; d >= 0 && (y = p[d], v = y.cacheItem.get(y.arg), !v || !v.size); d--)
|
|
151
|
-
y.cacheItem.delete(y.arg);
|
|
152
|
-
}
|
|
153
|
-
a(i, "removeCachedResult");
|
|
154
|
-
function g(p, u) {
|
|
155
|
-
return p === u || p !== p && u !== u;
|
|
156
|
-
}
|
|
157
|
-
a(g, "isEqual");
|
|
158
|
-
}, { "map-or-similar": 1 }] }, {}, [3])(3);
|
|
159
|
-
});
|
|
160
|
-
});
|
|
1
|
+
var Ct = Object.defineProperty;
|
|
2
|
+
var s = (r, e) => Ct(r, "name", { value: e, configurable: !0 });
|
|
161
3
|
|
|
162
4
|
// src/channels/index.ts
|
|
163
|
-
import { global as
|
|
5
|
+
import { global as Wo } from "@storybook/global";
|
|
164
6
|
|
|
165
7
|
// ../node_modules/ts-dedent/esm/index.js
|
|
166
|
-
function
|
|
167
|
-
for (var
|
|
168
|
-
t
|
|
8
|
+
function L(r) {
|
|
9
|
+
for (var e = [], t = 1; t < arguments.length; t++)
|
|
10
|
+
e[t - 1] = arguments[t];
|
|
169
11
|
var n = Array.from(typeof r == "string" ? [r] : r);
|
|
170
12
|
n[n.length - 1] = n[n.length - 1].replace(/\r?\n([\t ]*)$/, "");
|
|
171
13
|
var o = n.reduce(function(c, i) {
|
|
172
|
-
var
|
|
173
|
-
return
|
|
174
|
-
var
|
|
175
|
-
return (
|
|
14
|
+
var u = i.match(/\n([\t ]+|(?!\s).)/g);
|
|
15
|
+
return u ? c.concat(u.map(function(y) {
|
|
16
|
+
var f, h;
|
|
17
|
+
return (h = (f = y.match(/[\t ]/g)) === null || f === void 0 ? void 0 : f.length) !== null && h !== void 0 ? h : 0;
|
|
176
18
|
})) : c;
|
|
177
19
|
}, []);
|
|
178
20
|
if (o.length) {
|
|
179
|
-
var
|
|
21
|
+
var p = new RegExp(`
|
|
180
22
|
[ ]{` + Math.min.apply(Math, o) + "}", "g");
|
|
181
23
|
n = n.map(function(c) {
|
|
182
|
-
return c.replace(
|
|
24
|
+
return c.replace(p, `
|
|
183
25
|
`);
|
|
184
26
|
});
|
|
185
27
|
}
|
|
186
28
|
n[0] = n[0].replace(/^\r?\n/, "");
|
|
187
|
-
var
|
|
188
|
-
return
|
|
189
|
-
var
|
|
29
|
+
var a = n[0];
|
|
30
|
+
return e.forEach(function(c, i) {
|
|
31
|
+
var u = a.match(/(?:^|\n)( *)$/), y = u ? u[1] : "", f = c;
|
|
190
32
|
typeof c == "string" && c.includes(`
|
|
191
|
-
`) && (
|
|
192
|
-
`).map(function(
|
|
193
|
-
return
|
|
33
|
+
`) && (f = String(c).split(`
|
|
34
|
+
`).map(function(h, m) {
|
|
35
|
+
return m === 0 ? h : "" + y + h;
|
|
194
36
|
}).join(`
|
|
195
|
-
`)),
|
|
196
|
-
}),
|
|
37
|
+
`)), a += f + n[i + 1];
|
|
38
|
+
}), a;
|
|
197
39
|
}
|
|
198
|
-
|
|
40
|
+
s(L, "dedent");
|
|
199
41
|
|
|
200
42
|
// src/shared/universal-store/instances.ts
|
|
201
|
-
var
|
|
43
|
+
var ge = /* @__PURE__ */ new Map();
|
|
202
44
|
|
|
203
45
|
// src/shared/universal-store/index.ts
|
|
204
|
-
var
|
|
46
|
+
var Nt = "UNIVERSAL_STORE:", w = {
|
|
205
47
|
PENDING: "PENDING",
|
|
206
48
|
RESOLVED: "RESOLVED",
|
|
207
49
|
REJECTED: "REJECTED"
|
|
208
|
-
},
|
|
209
|
-
constructor(
|
|
50
|
+
}, l = class l {
|
|
51
|
+
constructor(e, t) {
|
|
210
52
|
/** Enable debug logs for this store */
|
|
211
53
|
this.debugging = !1;
|
|
212
54
|
// TODO: narrow type of listeners based on event type
|
|
213
55
|
this.listeners = /* @__PURE__ */ new Map([["*", /* @__PURE__ */ new Set()]]);
|
|
214
56
|
/** Gets the current state */
|
|
215
|
-
this.getState = /* @__PURE__ */
|
|
57
|
+
this.getState = /* @__PURE__ */ s(() => (this.debug("getState", { state: this.state }), this.state), "getState");
|
|
216
58
|
/**
|
|
217
59
|
* Subscribes to store events
|
|
218
60
|
*
|
|
219
61
|
* @returns A function to unsubscribe
|
|
220
62
|
*/
|
|
221
|
-
this.subscribe = /* @__PURE__ */
|
|
222
|
-
let n = typeof
|
|
223
|
-
if (this.debug("subscribe", { eventType: o, listener:
|
|
63
|
+
this.subscribe = /* @__PURE__ */ s((e, t) => {
|
|
64
|
+
let n = typeof e == "function", o = n ? "*" : e, p = n ? e : t;
|
|
65
|
+
if (this.debug("subscribe", { eventType: o, listener: p }), !p)
|
|
224
66
|
throw new TypeError(
|
|
225
67
|
`Missing first subscribe argument, or second if first is the event type, when subscribing to a UniversalStore with id '${this.id}'`
|
|
226
68
|
);
|
|
227
|
-
return this.listeners.has(o) || this.listeners.set(o, /* @__PURE__ */ new Set()), this.listeners.get(o).add(
|
|
228
|
-
this.debug("unsubscribe", { eventType: o, listener:
|
|
69
|
+
return this.listeners.has(o) || this.listeners.set(o, /* @__PURE__ */ new Set()), this.listeners.get(o).add(p), () => {
|
|
70
|
+
this.debug("unsubscribe", { eventType: o, listener: p }), this.listeners.has(o) && (this.listeners.get(o).delete(p), this.listeners.
|
|
229
71
|
get(o)?.size === 0 && this.listeners.delete(o));
|
|
230
72
|
};
|
|
231
73
|
}, "subscribe");
|
|
232
74
|
/** Sends a custom event to the other stores */
|
|
233
|
-
this.send = /* @__PURE__ */
|
|
234
|
-
if (this.debug("send", { event:
|
|
75
|
+
this.send = /* @__PURE__ */ s((e) => {
|
|
76
|
+
if (this.debug("send", { event: e }), this.status !== l.Status.READY)
|
|
235
77
|
throw new TypeError(
|
|
236
|
-
|
|
78
|
+
L`Cannot send event before store is ready. You can get the current status with store.status,
|
|
237
79
|
or await store.readyPromise to wait for the store to be ready before sending events.
|
|
238
80
|
${JSON.stringify(
|
|
239
81
|
{
|
|
240
|
-
event:
|
|
82
|
+
event: e,
|
|
241
83
|
id: this.id,
|
|
242
84
|
actor: this.actor,
|
|
243
85
|
environment: this.environment
|
|
@@ -246,34 +88,34 @@ var de = "UNIVERSAL_STORE:", x = {
|
|
|
246
88
|
2
|
|
247
89
|
)}`
|
|
248
90
|
);
|
|
249
|
-
this.emitToListeners(
|
|
91
|
+
this.emitToListeners(e, { actor: this.actor }), this.emitToChannel(e, { actor: this.actor });
|
|
250
92
|
}, "send");
|
|
251
|
-
if (this.debugging =
|
|
93
|
+
if (this.debugging = e.debug ?? !1, !l.isInternalConstructing)
|
|
252
94
|
throw new TypeError(
|
|
253
95
|
"UniversalStore is not constructable - use UniversalStore.create() instead"
|
|
254
96
|
);
|
|
255
|
-
if (
|
|
256
|
-
actorType =
|
|
97
|
+
if (l.isInternalConstructing = !1, this.id = e.id, this.actorId = Date.now().toString(36) + Math.random().toString(36).substring(2), this.
|
|
98
|
+
actorType = e.leader ? l.ActorType.LEADER : l.ActorType.FOLLOWER, this.state = e.initialState, this.channelEventName = `${Nt}${this.id}`,
|
|
257
99
|
this.debug("constructor", {
|
|
258
|
-
options:
|
|
259
|
-
environmentOverrides:
|
|
100
|
+
options: e,
|
|
101
|
+
environmentOverrides: t,
|
|
260
102
|
channelEventName: this.channelEventName
|
|
261
|
-
}), this.actor.type ===
|
|
103
|
+
}), this.actor.type === l.ActorType.LEADER)
|
|
262
104
|
this.syncing = {
|
|
263
|
-
state:
|
|
105
|
+
state: w.RESOLVED,
|
|
264
106
|
promise: Promise.resolve()
|
|
265
107
|
};
|
|
266
108
|
else {
|
|
267
|
-
let n, o,
|
|
268
|
-
n = /* @__PURE__ */
|
|
269
|
-
this.syncing.state ===
|
|
270
|
-
}, "syncingResolve"), o = /* @__PURE__ */
|
|
271
|
-
this.syncing.state ===
|
|
109
|
+
let n, o, p = new Promise((a, c) => {
|
|
110
|
+
n = /* @__PURE__ */ s(() => {
|
|
111
|
+
this.syncing.state === w.PENDING && (this.syncing.state = w.RESOLVED, a());
|
|
112
|
+
}, "syncingResolve"), o = /* @__PURE__ */ s((i) => {
|
|
113
|
+
this.syncing.state === w.PENDING && (this.syncing.state = w.REJECTED, c(i));
|
|
272
114
|
}, "syncingReject");
|
|
273
115
|
});
|
|
274
116
|
this.syncing = {
|
|
275
|
-
state:
|
|
276
|
-
promise:
|
|
117
|
+
state: w.PENDING,
|
|
118
|
+
promise: p,
|
|
277
119
|
resolve: n,
|
|
278
120
|
reject: o
|
|
279
121
|
};
|
|
@@ -281,23 +123,23 @@ var de = "UNIVERSAL_STORE:", x = {
|
|
|
281
123
|
this.getState = this.getState.bind(this), this.setState = this.setState.bind(this), this.subscribe = this.subscribe.bind(this), this.onStateChange =
|
|
282
124
|
this.onStateChange.bind(this), this.send = this.send.bind(this), this.emitToChannel = this.emitToChannel.bind(this), this.prepareThis = this.
|
|
283
125
|
prepareThis.bind(this), this.emitToListeners = this.emitToListeners.bind(this), this.handleChannelEvents = this.handleChannelEvents.bind(
|
|
284
|
-
this), this.debug = this.debug.bind(this), this.channel =
|
|
285
|
-
environment, this.channel && this.environment ? (
|
|
286
|
-
{ channel: this.channel, environment: this.environment })) :
|
|
126
|
+
this), this.debug = this.debug.bind(this), this.channel = t?.channel ?? l.preparation.channel, this.environment = t?.environment ?? l.preparation.
|
|
127
|
+
environment, this.channel && this.environment ? (l.preparation.resolve({ channel: this.channel, environment: this.environment }), this.prepareThis(
|
|
128
|
+
{ channel: this.channel, environment: this.environment })) : l.preparation.promise.then(this.prepareThis);
|
|
287
129
|
}
|
|
288
130
|
static setupPreparationPromise() {
|
|
289
|
-
let
|
|
290
|
-
(o,
|
|
291
|
-
|
|
292
|
-
o(
|
|
293
|
-
}, "resolveRef"),
|
|
294
|
-
|
|
131
|
+
let e, t, n = new Promise(
|
|
132
|
+
(o, p) => {
|
|
133
|
+
e = /* @__PURE__ */ s((a) => {
|
|
134
|
+
o(a);
|
|
135
|
+
}, "resolveRef"), t = /* @__PURE__ */ s((...a) => {
|
|
136
|
+
p(a);
|
|
295
137
|
}, "rejectRef");
|
|
296
138
|
}
|
|
297
139
|
);
|
|
298
|
-
|
|
299
|
-
resolve:
|
|
300
|
-
reject:
|
|
140
|
+
l.preparation = {
|
|
141
|
+
resolve: e,
|
|
142
|
+
reject: t,
|
|
301
143
|
promise: n
|
|
302
144
|
};
|
|
303
145
|
}
|
|
@@ -306,7 +148,7 @@ var de = "UNIVERSAL_STORE:", x = {
|
|
|
306
148
|
return Object.freeze({
|
|
307
149
|
id: this.actorId,
|
|
308
150
|
type: this.actorType,
|
|
309
|
-
environment: this.environment ??
|
|
151
|
+
environment: this.environment ?? l.Environment.UNKNOWN
|
|
310
152
|
});
|
|
311
153
|
}
|
|
312
154
|
/**
|
|
@@ -315,16 +157,16 @@ var de = "UNIVERSAL_STORE:", x = {
|
|
|
315
157
|
*/
|
|
316
158
|
get status() {
|
|
317
159
|
if (!this.channel || !this.environment)
|
|
318
|
-
return
|
|
160
|
+
return l.Status.UNPREPARED;
|
|
319
161
|
switch (this.syncing?.state) {
|
|
320
|
-
case
|
|
162
|
+
case w.PENDING:
|
|
321
163
|
case void 0:
|
|
322
|
-
return
|
|
323
|
-
case
|
|
324
|
-
return
|
|
325
|
-
case
|
|
164
|
+
return l.Status.SYNCING;
|
|
165
|
+
case w.REJECTED:
|
|
166
|
+
return l.Status.ERROR;
|
|
167
|
+
case w.RESOLVED:
|
|
326
168
|
default:
|
|
327
|
-
return
|
|
169
|
+
return l.Status.READY;
|
|
328
170
|
}
|
|
329
171
|
}
|
|
330
172
|
/**
|
|
@@ -335,24 +177,24 @@ var de = "UNIVERSAL_STORE:", x = {
|
|
|
335
177
|
* hundred milliseconds.
|
|
336
178
|
*/
|
|
337
179
|
untilReady() {
|
|
338
|
-
return Promise.all([
|
|
180
|
+
return Promise.all([l.preparation.promise, this.syncing?.promise]);
|
|
339
181
|
}
|
|
340
182
|
/** Creates a new instance of UniversalStore */
|
|
341
|
-
static create(
|
|
342
|
-
if (!
|
|
183
|
+
static create(e) {
|
|
184
|
+
if (!e || typeof e?.id != "string")
|
|
343
185
|
throw new TypeError("id is required and must be a string, when creating a UniversalStore");
|
|
344
|
-
|
|
345
|
-
|
|
186
|
+
e.debug && console.debug(
|
|
187
|
+
L`[UniversalStore]
|
|
346
188
|
create`,
|
|
347
|
-
{ options:
|
|
189
|
+
{ options: e }
|
|
348
190
|
);
|
|
349
|
-
let
|
|
350
|
-
if (
|
|
351
|
-
return console.warn(
|
|
352
|
-
You should reuse the existing instance instead of trying to create a new one.`),
|
|
353
|
-
|
|
354
|
-
let n = new
|
|
355
|
-
return
|
|
191
|
+
let t = ge.get(e.id);
|
|
192
|
+
if (t)
|
|
193
|
+
return console.warn(L`UniversalStore with id "${e.id}" already exists in this environment, re-using existing.
|
|
194
|
+
You should reuse the existing instance instead of trying to create a new one.`), t;
|
|
195
|
+
l.isInternalConstructing = !0;
|
|
196
|
+
let n = new l(e);
|
|
197
|
+
return ge.set(e.id, n), n;
|
|
356
198
|
}
|
|
357
199
|
/**
|
|
358
200
|
* Used by Storybook to set the channel for all instances of UniversalStore in the given
|
|
@@ -360,19 +202,19 @@ var de = "UNIVERSAL_STORE:", x = {
|
|
|
360
202
|
*
|
|
361
203
|
* @internal
|
|
362
204
|
*/
|
|
363
|
-
static __prepare(
|
|
364
|
-
|
|
205
|
+
static __prepare(e, t) {
|
|
206
|
+
l.preparation.channel = e, l.preparation.environment = t, l.preparation.resolve({ channel: e, environment: t });
|
|
365
207
|
}
|
|
366
208
|
/**
|
|
367
209
|
* Updates the store's state
|
|
368
210
|
*
|
|
369
211
|
* Either a new state or a state updater function can be passed to the method.
|
|
370
212
|
*/
|
|
371
|
-
setState(
|
|
372
|
-
let
|
|
373
|
-
if (this.debug("setState", { newState: n, previousState:
|
|
213
|
+
setState(e) {
|
|
214
|
+
let t = this.state, n = typeof e == "function" ? e(t) : e;
|
|
215
|
+
if (this.debug("setState", { newState: n, previousState: t, updater: e }), this.status !== l.Status.READY)
|
|
374
216
|
throw new TypeError(
|
|
375
|
-
|
|
217
|
+
L`Cannot set state before store is ready. You can get the current status with store.status,
|
|
376
218
|
or await store.readyPromise to wait for the store to be ready before sending events.
|
|
377
219
|
${JSON.stringify(
|
|
378
220
|
{
|
|
@@ -387,10 +229,10 @@ var de = "UNIVERSAL_STORE:", x = {
|
|
|
387
229
|
);
|
|
388
230
|
this.state = n;
|
|
389
231
|
let o = {
|
|
390
|
-
type:
|
|
232
|
+
type: l.InternalEventType.SET_STATE,
|
|
391
233
|
payload: {
|
|
392
234
|
state: n,
|
|
393
|
-
previousState:
|
|
235
|
+
previousState: t
|
|
394
236
|
}
|
|
395
237
|
};
|
|
396
238
|
this.emitToChannel(o, { actor: this.actor }), this.emitToListeners(o, { actor: this.actor });
|
|
@@ -400,33 +242,33 @@ var de = "UNIVERSAL_STORE:", x = {
|
|
|
400
242
|
*
|
|
401
243
|
* @returns Unsubscribe function
|
|
402
244
|
*/
|
|
403
|
-
onStateChange(
|
|
404
|
-
return this.debug("onStateChange", { listener:
|
|
405
|
-
|
|
406
|
-
({ payload:
|
|
407
|
-
t
|
|
245
|
+
onStateChange(e) {
|
|
246
|
+
return this.debug("onStateChange", { listener: e }), this.subscribe(
|
|
247
|
+
l.InternalEventType.SET_STATE,
|
|
248
|
+
({ payload: t }, n) => {
|
|
249
|
+
e(t.state, t.previousState, n);
|
|
408
250
|
}
|
|
409
251
|
);
|
|
410
252
|
}
|
|
411
|
-
emitToChannel(
|
|
412
|
-
this.debug("emitToChannel", { event:
|
|
413
|
-
event:
|
|
414
|
-
eventInfo:
|
|
253
|
+
emitToChannel(e, t) {
|
|
254
|
+
this.debug("emitToChannel", { event: e, eventInfo: t, channel: !!this.channel }), this.channel?.emit(this.channelEventName, {
|
|
255
|
+
event: e,
|
|
256
|
+
eventInfo: t
|
|
415
257
|
});
|
|
416
258
|
}
|
|
417
259
|
prepareThis({
|
|
418
|
-
channel:
|
|
419
|
-
environment:
|
|
260
|
+
channel: e,
|
|
261
|
+
environment: t
|
|
420
262
|
}) {
|
|
421
|
-
this.channel =
|
|
422
|
-
this.handleChannelEvents), this.actor.type ===
|
|
423
|
-
{ type:
|
|
263
|
+
this.channel = e, this.environment = t, this.debug("prepared", { channel: !!e, environment: t }), this.channel.on(this.channelEventName,
|
|
264
|
+
this.handleChannelEvents), this.actor.type === l.ActorType.LEADER ? this.emitToChannel(
|
|
265
|
+
{ type: l.InternalEventType.LEADER_CREATED },
|
|
424
266
|
{ actor: this.actor }
|
|
425
267
|
) : (this.emitToChannel(
|
|
426
|
-
{ type:
|
|
268
|
+
{ type: l.InternalEventType.FOLLOWER_CREATED },
|
|
427
269
|
{ actor: this.actor }
|
|
428
270
|
), this.emitToChannel(
|
|
429
|
-
{ type:
|
|
271
|
+
{ type: l.InternalEventType.EXISTING_STATE_REQUEST },
|
|
430
272
|
{ actor: this.actor }
|
|
431
273
|
), setTimeout(() => {
|
|
432
274
|
this.syncing.reject(
|
|
@@ -437,44 +279,44 @@ var de = "UNIVERSAL_STORE:", x = {
|
|
|
437
279
|
);
|
|
438
280
|
}, 1e3));
|
|
439
281
|
}
|
|
440
|
-
emitToListeners(
|
|
441
|
-
let n = this.listeners.get(
|
|
282
|
+
emitToListeners(e, t) {
|
|
283
|
+
let n = this.listeners.get(e.type), o = this.listeners.get("*");
|
|
442
284
|
this.debug("emitToListeners", {
|
|
443
|
-
event:
|
|
444
|
-
eventInfo:
|
|
285
|
+
event: e,
|
|
286
|
+
eventInfo: t,
|
|
445
287
|
eventTypeListeners: n,
|
|
446
288
|
everythingListeners: o
|
|
447
289
|
}), [...n ?? [], ...o ?? []].forEach(
|
|
448
|
-
(
|
|
290
|
+
(p) => p(e, t)
|
|
449
291
|
);
|
|
450
292
|
}
|
|
451
|
-
handleChannelEvents(
|
|
452
|
-
let { event:
|
|
293
|
+
handleChannelEvents(e) {
|
|
294
|
+
let { event: t, eventInfo: n } = e;
|
|
453
295
|
if ([n.actor.id, n.forwardingActor?.id].includes(this.actor.id)) {
|
|
454
|
-
this.debug("handleChannelEvents: Ignoring event from self", { channelEvent:
|
|
296
|
+
this.debug("handleChannelEvents: Ignoring event from self", { channelEvent: e });
|
|
455
297
|
return;
|
|
456
|
-
} else if (this.syncing?.state ===
|
|
457
|
-
this.debug("handleChannelEvents: Ignoring event while syncing", { channelEvent:
|
|
298
|
+
} else if (this.syncing?.state === w.PENDING && t.type !== l.InternalEventType.EXISTING_STATE_RESPONSE) {
|
|
299
|
+
this.debug("handleChannelEvents: Ignoring event while syncing", { channelEvent: e });
|
|
458
300
|
return;
|
|
459
301
|
}
|
|
460
|
-
if (this.debug("handleChannelEvents", { channelEvent:
|
|
302
|
+
if (this.debug("handleChannelEvents", { channelEvent: e }), this.actor.type === l.ActorType.LEADER) {
|
|
461
303
|
let o = !0;
|
|
462
|
-
switch (
|
|
463
|
-
case
|
|
304
|
+
switch (t.type) {
|
|
305
|
+
case l.InternalEventType.EXISTING_STATE_REQUEST:
|
|
464
306
|
o = !1;
|
|
465
|
-
let
|
|
466
|
-
type:
|
|
307
|
+
let p = {
|
|
308
|
+
type: l.InternalEventType.EXISTING_STATE_RESPONSE,
|
|
467
309
|
payload: this.state
|
|
468
310
|
};
|
|
469
311
|
this.debug("handleChannelEvents: responding to existing state request", {
|
|
470
|
-
responseEvent:
|
|
471
|
-
}), this.emitToChannel(
|
|
312
|
+
responseEvent: p
|
|
313
|
+
}), this.emitToChannel(p, { actor: this.actor }), this.emitToListeners(p, { actor: this.actor });
|
|
472
314
|
break;
|
|
473
|
-
case
|
|
474
|
-
o = !1, this.syncing.state =
|
|
475
|
-
event:
|
|
315
|
+
case l.InternalEventType.LEADER_CREATED:
|
|
316
|
+
o = !1, this.syncing.state = w.REJECTED, this.debug("handleChannelEvents: erroring due to second leader being created", {
|
|
317
|
+
event: t
|
|
476
318
|
}), console.error(
|
|
477
|
-
|
|
319
|
+
L`Detected multiple UniversalStore leaders created with the same id "${this.id}".
|
|
478
320
|
Only one leader can exists at a time, your stores are now in an invalid state.
|
|
479
321
|
Leaders detected:
|
|
480
322
|
this: ${JSON.stringify(this.actor, null, 2)}
|
|
@@ -482,41 +324,41 @@ var de = "UNIVERSAL_STORE:", x = {
|
|
|
482
324
|
);
|
|
483
325
|
break;
|
|
484
326
|
}
|
|
485
|
-
o && (this.debug("handleChannelEvents: forwarding event", { channelEvent:
|
|
327
|
+
o && (this.debug("handleChannelEvents: forwarding event", { channelEvent: e }), this.emitToChannel(t, { actor: n.actor, forwardingActor: this.
|
|
486
328
|
actor }));
|
|
487
329
|
}
|
|
488
|
-
if (this.actor.type ===
|
|
489
|
-
switch (
|
|
490
|
-
case
|
|
330
|
+
if (this.actor.type === l.ActorType.FOLLOWER)
|
|
331
|
+
switch (t.type) {
|
|
332
|
+
case l.InternalEventType.EXISTING_STATE_RESPONSE:
|
|
491
333
|
if (this.debug("handleChannelEvents: Setting state from leader's existing state response", {
|
|
492
|
-
event:
|
|
493
|
-
}), this.syncing?.state !==
|
|
334
|
+
event: t
|
|
335
|
+
}), this.syncing?.state !== w.PENDING)
|
|
494
336
|
break;
|
|
495
337
|
this.syncing.resolve?.();
|
|
496
338
|
let o = {
|
|
497
|
-
type:
|
|
339
|
+
type: l.InternalEventType.SET_STATE,
|
|
498
340
|
payload: {
|
|
499
|
-
state:
|
|
341
|
+
state: t.payload,
|
|
500
342
|
previousState: this.state
|
|
501
343
|
}
|
|
502
344
|
};
|
|
503
|
-
this.state =
|
|
345
|
+
this.state = t.payload, this.emitToListeners(o, n);
|
|
504
346
|
break;
|
|
505
347
|
}
|
|
506
|
-
switch (
|
|
507
|
-
case
|
|
508
|
-
this.debug("handleChannelEvents: Setting state", { event:
|
|
348
|
+
switch (t.type) {
|
|
349
|
+
case l.InternalEventType.SET_STATE:
|
|
350
|
+
this.debug("handleChannelEvents: Setting state", { event: t }), this.state = t.payload.state;
|
|
509
351
|
break;
|
|
510
352
|
}
|
|
511
|
-
this.emitToListeners(
|
|
353
|
+
this.emitToListeners(t, { actor: n.actor });
|
|
512
354
|
}
|
|
513
|
-
debug(
|
|
355
|
+
debug(e, t) {
|
|
514
356
|
this.debugging && console.debug(
|
|
515
|
-
|
|
516
|
-
${
|
|
357
|
+
L`[UniversalStore::${this.id}::${this.environment ?? l.Environment.UNKNOWN}]
|
|
358
|
+
${e}`,
|
|
517
359
|
JSON.stringify(
|
|
518
360
|
{
|
|
519
|
-
data:
|
|
361
|
+
data: t,
|
|
520
362
|
actor: this.actor,
|
|
521
363
|
state: this.state,
|
|
522
364
|
status: this.status
|
|
@@ -532,15 +374,15 @@ var de = "UNIVERSAL_STORE:", x = {
|
|
|
532
374
|
* @internal
|
|
533
375
|
*/
|
|
534
376
|
static __reset() {
|
|
535
|
-
|
|
377
|
+
l.preparation.reject(new Error("reset")), l.setupPreparationPromise(), l.isInternalConstructing = !1;
|
|
536
378
|
}
|
|
537
379
|
};
|
|
538
|
-
|
|
380
|
+
s(l, "UniversalStore"), /**
|
|
539
381
|
* Defines the possible actor types in the store system
|
|
540
382
|
*
|
|
541
383
|
* @readonly
|
|
542
384
|
*/
|
|
543
|
-
|
|
385
|
+
l.ActorType = {
|
|
544
386
|
LEADER: "LEADER",
|
|
545
387
|
FOLLOWER: "FOLLOWER"
|
|
546
388
|
}, /**
|
|
@@ -548,7 +390,7 @@ h.ActorType = {
|
|
|
548
390
|
*
|
|
549
391
|
* @readonly
|
|
550
392
|
*/
|
|
551
|
-
|
|
393
|
+
l.Environment = {
|
|
552
394
|
SERVER: "SERVER",
|
|
553
395
|
MANAGER: "MANAGER",
|
|
554
396
|
PREVIEW: "PREVIEW",
|
|
@@ -559,113 +401,117 @@ h.Environment = {
|
|
|
559
401
|
*
|
|
560
402
|
* @readonly
|
|
561
403
|
*/
|
|
562
|
-
|
|
404
|
+
l.InternalEventType = {
|
|
563
405
|
EXISTING_STATE_REQUEST: "__EXISTING_STATE_REQUEST",
|
|
564
406
|
EXISTING_STATE_RESPONSE: "__EXISTING_STATE_RESPONSE",
|
|
565
407
|
SET_STATE: "__SET_STATE",
|
|
566
408
|
LEADER_CREATED: "__LEADER_CREATED",
|
|
567
409
|
FOLLOWER_CREATED: "__FOLLOWER_CREATED"
|
|
568
|
-
},
|
|
410
|
+
}, l.Status = {
|
|
569
411
|
UNPREPARED: "UNPREPARED",
|
|
570
412
|
SYNCING: "SYNCING",
|
|
571
413
|
READY: "READY",
|
|
572
414
|
ERROR: "ERROR"
|
|
573
415
|
}, // This is used to check if constructor was called from the static factory create()
|
|
574
|
-
|
|
575
|
-
var
|
|
416
|
+
l.isInternalConstructing = !1, l.setupPreparationPromise();
|
|
417
|
+
var U = l;
|
|
576
418
|
|
|
577
419
|
// src/channels/main.ts
|
|
578
|
-
var
|
|
579
|
-
nerateRandomId"),
|
|
580
|
-
constructor(
|
|
581
|
-
this.sender =
|
|
420
|
+
var It = /* @__PURE__ */ s((r) => r.transports !== void 0, "isMulti"), Rt = /* @__PURE__ */ s(() => Math.random().toString(16).slice(2), "ge\
|
|
421
|
+
nerateRandomId"), me = class me {
|
|
422
|
+
constructor(e = {}) {
|
|
423
|
+
this.sender = Rt();
|
|
582
424
|
this.events = {};
|
|
583
425
|
this.data = {};
|
|
584
426
|
this.transports = [];
|
|
585
|
-
this.isAsync =
|
|
586
|
-
|
|
587
|
-
})) : this.transports =
|
|
588
|
-
|
|
427
|
+
this.isAsync = e.async || !1, It(e) ? (this.transports = e.transports || [], this.transports.forEach((t) => {
|
|
428
|
+
t.setHandler((n) => this.handleEvent(n));
|
|
429
|
+
})) : this.transports = e.transport ? [e.transport] : [], this.transports.forEach((t) => {
|
|
430
|
+
t.setHandler((n) => this.handleEvent(n));
|
|
589
431
|
});
|
|
590
432
|
}
|
|
591
433
|
get hasTransport() {
|
|
592
434
|
return this.transports.length > 0;
|
|
593
435
|
}
|
|
594
|
-
addListener(
|
|
595
|
-
this.events[
|
|
436
|
+
addListener(e, t) {
|
|
437
|
+
this.events[e] = this.events[e] || [], this.events[e].push(t);
|
|
596
438
|
}
|
|
597
|
-
emit(
|
|
598
|
-
let n = { type:
|
|
599
|
-
|
|
600
|
-
let
|
|
601
|
-
this.transports.forEach((
|
|
602
|
-
|
|
439
|
+
emit(e, ...t) {
|
|
440
|
+
let n = { type: e, args: t, from: this.sender }, o = {};
|
|
441
|
+
t.length >= 1 && t[0] && t[0].options && (o = t[0].options);
|
|
442
|
+
let p = /* @__PURE__ */ s(() => {
|
|
443
|
+
this.transports.forEach((a) => {
|
|
444
|
+
a.send(n, o);
|
|
603
445
|
}), this.handleEvent(n);
|
|
604
446
|
}, "handler");
|
|
605
|
-
this.isAsync ? setImmediate(
|
|
447
|
+
this.isAsync ? setImmediate(p) : p();
|
|
606
448
|
}
|
|
607
|
-
last(
|
|
608
|
-
return this.data[
|
|
449
|
+
last(e) {
|
|
450
|
+
return this.data[e];
|
|
609
451
|
}
|
|
610
452
|
eventNames() {
|
|
611
453
|
return Object.keys(this.events);
|
|
612
454
|
}
|
|
613
|
-
listenerCount(
|
|
614
|
-
let
|
|
615
|
-
return
|
|
455
|
+
listenerCount(e) {
|
|
456
|
+
let t = this.listeners(e);
|
|
457
|
+
return t ? t.length : 0;
|
|
616
458
|
}
|
|
617
|
-
listeners(
|
|
618
|
-
return this.events[
|
|
459
|
+
listeners(e) {
|
|
460
|
+
return this.events[e] || void 0;
|
|
619
461
|
}
|
|
620
|
-
once(
|
|
621
|
-
let n = this.onceListener(
|
|
622
|
-
this.addListener(
|
|
462
|
+
once(e, t) {
|
|
463
|
+
let n = this.onceListener(e, t);
|
|
464
|
+
this.addListener(e, n);
|
|
623
465
|
}
|
|
624
|
-
removeAllListeners(
|
|
625
|
-
|
|
466
|
+
removeAllListeners(e) {
|
|
467
|
+
e ? this.events[e] && delete this.events[e] : this.events = {};
|
|
626
468
|
}
|
|
627
|
-
removeListener(
|
|
628
|
-
let n = this.listeners(
|
|
629
|
-
n && (this.events[
|
|
469
|
+
removeListener(e, t) {
|
|
470
|
+
let n = this.listeners(e);
|
|
471
|
+
n && (this.events[e] = n.filter((o) => o !== t));
|
|
630
472
|
}
|
|
631
|
-
on(
|
|
632
|
-
this.addListener(
|
|
473
|
+
on(e, t) {
|
|
474
|
+
this.addListener(e, t);
|
|
633
475
|
}
|
|
634
|
-
off(
|
|
635
|
-
this.removeListener(
|
|
476
|
+
off(e, t) {
|
|
477
|
+
this.removeListener(e, t);
|
|
636
478
|
}
|
|
637
|
-
handleEvent(
|
|
638
|
-
let
|
|
639
|
-
|
|
640
|
-
n.apply(
|
|
641
|
-
}), this.data[
|
|
479
|
+
handleEvent(e) {
|
|
480
|
+
let t = this.listeners(e.type);
|
|
481
|
+
t && t.length && t.forEach((n) => {
|
|
482
|
+
n.apply(e, e.args);
|
|
483
|
+
}), this.data[e.type] = e.args;
|
|
642
484
|
}
|
|
643
|
-
onceListener(
|
|
644
|
-
let n = /* @__PURE__ */
|
|
485
|
+
onceListener(e, t) {
|
|
486
|
+
let n = /* @__PURE__ */ s((...o) => (this.removeListener(e, n), t(...o)), "onceListener");
|
|
645
487
|
return n;
|
|
646
488
|
}
|
|
647
489
|
};
|
|
648
|
-
|
|
649
|
-
var
|
|
490
|
+
s(me, "Channel");
|
|
491
|
+
var z = me;
|
|
650
492
|
|
|
651
493
|
// src/channels/postmessage/index.ts
|
|
652
|
-
import { logger as
|
|
653
|
-
import * as
|
|
654
|
-
import { global as
|
|
494
|
+
import { logger as ct, pretty as lt } from "storybook/internal/client-logger";
|
|
495
|
+
import * as Uo from "storybook/internal/core-events";
|
|
496
|
+
import { global as S } from "@storybook/global";
|
|
655
497
|
|
|
656
|
-
// ../node_modules/telejson/dist/chunk-
|
|
657
|
-
var
|
|
658
|
-
|
|
659
|
-
return
|
|
660
|
-
}, "__require"), "__commonJS"),
|
|
661
|
-
if (
|
|
662
|
-
for (let o of
|
|
663
|
-
|
|
498
|
+
// ../node_modules/telejson/dist/chunk-EAFQLD22.mjs
|
|
499
|
+
var jt = Object.create, Fe = Object.defineProperty, Lt = Object.getOwnPropertyDescriptor, Me = Object.getOwnPropertyNames, Dt = Object.getPrototypeOf,
|
|
500
|
+
$t = Object.prototype.hasOwnProperty, d = /* @__PURE__ */ s((r, e) => /* @__PURE__ */ s(function() {
|
|
501
|
+
return e || (0, r[Me(r)[0]])((e = { exports: {} }).exports, e), e.exports;
|
|
502
|
+
}, "__require"), "__commonJS"), Ft = /* @__PURE__ */ s((r, e, t, n) => {
|
|
503
|
+
if (e && typeof e == "object" || typeof e == "function")
|
|
504
|
+
for (let o of Me(e))
|
|
505
|
+
!$t.call(r, o) && o !== t && Fe(r, o, { get: /* @__PURE__ */ s(() => e[o], "get"), enumerable: !(n = Lt(e, o)) || n.enumerable });
|
|
664
506
|
return r;
|
|
665
|
-
}, "__copyProps"),
|
|
666
|
-
|
|
507
|
+
}, "__copyProps"), pe = /* @__PURE__ */ s((r, e, t) => (t = r != null ? jt(Dt(r)) : {}, Ft(
|
|
508
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
509
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
510
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
511
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
512
|
+
e || !r || !r.__esModule ? Fe(t, "default", { value: r, enumerable: !0 }) : t,
|
|
667
513
|
r
|
|
668
|
-
)), "__toESM"),
|
|
514
|
+
)), "__toESM"), Mt = [
|
|
669
515
|
"bubbles",
|
|
670
516
|
"cancelBubble",
|
|
671
517
|
"cancelable",
|
|
@@ -679,210 +525,441 @@ Se = Object.prototype.hasOwnProperty, P = /* @__PURE__ */ a((r, t) => /* @__PURE
|
|
|
679
525
|
"target",
|
|
680
526
|
"timeStamp",
|
|
681
527
|
"type"
|
|
682
|
-
],
|
|
683
|
-
function
|
|
684
|
-
let
|
|
685
|
-
|
|
686
|
-
t
|
|
687
|
-
|
|
528
|
+
], Ut = ["detail"];
|
|
529
|
+
function Ue(r) {
|
|
530
|
+
let e = Mt.filter((t) => r[t] !== void 0).reduce((t, n) => (t[n] = r[n], t), {});
|
|
531
|
+
if (r instanceof CustomEvent)
|
|
532
|
+
for (let t of Ut.filter(
|
|
533
|
+
(n) => r[n] !== void 0
|
|
534
|
+
))
|
|
535
|
+
e[t] = r[t];
|
|
536
|
+
return e;
|
|
688
537
|
}
|
|
689
|
-
|
|
538
|
+
s(Ue, "extractEventHiddenProperties");
|
|
690
539
|
|
|
691
540
|
// ../node_modules/telejson/dist/index.mjs
|
|
692
|
-
var
|
|
693
|
-
|
|
694
|
-
|
|
541
|
+
var He = d({
|
|
542
|
+
"node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js"(r, e) {
|
|
543
|
+
"use strict";
|
|
544
|
+
e.exports = Object;
|
|
545
|
+
}
|
|
546
|
+
}), Gt = d({
|
|
547
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(r, e) {
|
|
548
|
+
"use strict";
|
|
549
|
+
e.exports = Error;
|
|
550
|
+
}
|
|
551
|
+
}), kt = d({
|
|
552
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(r, e) {
|
|
553
|
+
"use strict";
|
|
554
|
+
e.exports = EvalError;
|
|
555
|
+
}
|
|
556
|
+
}), Wt = d({
|
|
557
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(r, e) {
|
|
558
|
+
"use strict";
|
|
559
|
+
e.exports = RangeError;
|
|
560
|
+
}
|
|
561
|
+
}), qt = d({
|
|
562
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(r, e) {
|
|
563
|
+
"use strict";
|
|
564
|
+
e.exports = ReferenceError;
|
|
565
|
+
}
|
|
566
|
+
}), Bt = d({
|
|
567
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(r, e) {
|
|
695
568
|
"use strict";
|
|
696
|
-
|
|
569
|
+
e.exports = SyntaxError;
|
|
570
|
+
}
|
|
571
|
+
}), Ee = d({
|
|
572
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(r, e) {
|
|
573
|
+
"use strict";
|
|
574
|
+
e.exports = TypeError;
|
|
575
|
+
}
|
|
576
|
+
}), Ht = d({
|
|
577
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(r, e) {
|
|
578
|
+
"use strict";
|
|
579
|
+
e.exports = URIError;
|
|
580
|
+
}
|
|
581
|
+
}), Vt = d({
|
|
582
|
+
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js"(r, e) {
|
|
583
|
+
"use strict";
|
|
584
|
+
e.exports = Math.abs;
|
|
585
|
+
}
|
|
586
|
+
}), Jt = d({
|
|
587
|
+
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js"(r, e) {
|
|
588
|
+
"use strict";
|
|
589
|
+
e.exports = Math.floor;
|
|
590
|
+
}
|
|
591
|
+
}), zt = d({
|
|
592
|
+
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js"(r, e) {
|
|
593
|
+
"use strict";
|
|
594
|
+
e.exports = Math.max;
|
|
595
|
+
}
|
|
596
|
+
}), Yt = d({
|
|
597
|
+
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js"(r, e) {
|
|
598
|
+
"use strict";
|
|
599
|
+
e.exports = Math.min;
|
|
600
|
+
}
|
|
601
|
+
}), Kt = d({
|
|
602
|
+
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js"(r, e) {
|
|
603
|
+
"use strict";
|
|
604
|
+
e.exports = Math.pow;
|
|
605
|
+
}
|
|
606
|
+
}), Xt = d({
|
|
607
|
+
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js"(r, e) {
|
|
608
|
+
"use strict";
|
|
609
|
+
e.exports = Math.round;
|
|
610
|
+
}
|
|
611
|
+
}), Qt = d({
|
|
612
|
+
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js"(r, e) {
|
|
613
|
+
"use strict";
|
|
614
|
+
e.exports = Number.isNaN || /* @__PURE__ */ s(function(n) {
|
|
615
|
+
return n !== n;
|
|
616
|
+
}, "isNaN2");
|
|
617
|
+
}
|
|
618
|
+
}), Zt = d({
|
|
619
|
+
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js"(r, e) {
|
|
620
|
+
"use strict";
|
|
621
|
+
var t = Qt();
|
|
622
|
+
e.exports = /* @__PURE__ */ s(function(o) {
|
|
623
|
+
return t(o) || o === 0 ? o : o < 0 ? -1 : 1;
|
|
624
|
+
}, "sign");
|
|
625
|
+
}
|
|
626
|
+
}), er = d({
|
|
627
|
+
"node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js"(r, e) {
|
|
628
|
+
"use strict";
|
|
629
|
+
e.exports = Object.getOwnPropertyDescriptor;
|
|
630
|
+
}
|
|
631
|
+
}), _e = d({
|
|
632
|
+
"node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js"(r, e) {
|
|
633
|
+
"use strict";
|
|
634
|
+
var t = er();
|
|
635
|
+
if (t)
|
|
636
|
+
try {
|
|
637
|
+
t([], "length");
|
|
638
|
+
} catch {
|
|
639
|
+
t = null;
|
|
640
|
+
}
|
|
641
|
+
e.exports = t;
|
|
642
|
+
}
|
|
643
|
+
}), tr = d({
|
|
644
|
+
"node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js"(r, e) {
|
|
645
|
+
"use strict";
|
|
646
|
+
var t = Object.defineProperty || !1;
|
|
647
|
+
if (t)
|
|
648
|
+
try {
|
|
649
|
+
t({}, "a", { value: 1 });
|
|
650
|
+
} catch {
|
|
651
|
+
t = !1;
|
|
652
|
+
}
|
|
653
|
+
e.exports = t;
|
|
654
|
+
}
|
|
655
|
+
}), Ve = d({
|
|
656
|
+
"node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js"(r, e) {
|
|
657
|
+
"use strict";
|
|
658
|
+
e.exports = /* @__PURE__ */ s(function() {
|
|
697
659
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
698
660
|
return !1;
|
|
699
661
|
if (typeof Symbol.iterator == "symbol")
|
|
700
662
|
return !0;
|
|
701
|
-
var n = {}, o = Symbol("test"),
|
|
702
|
-
if (typeof o == "string" || Object.prototype.toString.call(o) !== "[object Symbol]" || Object.prototype.toString.call(
|
|
663
|
+
var n = {}, o = Symbol("test"), p = Object(o);
|
|
664
|
+
if (typeof o == "string" || Object.prototype.toString.call(o) !== "[object Symbol]" || Object.prototype.toString.call(p) !== "[object \
|
|
703
665
|
Symbol]")
|
|
704
666
|
return !1;
|
|
705
|
-
var
|
|
706
|
-
n[o] =
|
|
707
|
-
for (
|
|
667
|
+
var a = 42;
|
|
668
|
+
n[o] = a;
|
|
669
|
+
for (var c in n)
|
|
708
670
|
return !1;
|
|
709
671
|
if (typeof Object.keys == "function" && Object.keys(n).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(
|
|
710
672
|
n).length !== 0)
|
|
711
673
|
return !1;
|
|
712
|
-
var
|
|
713
|
-
if (
|
|
674
|
+
var i = Object.getOwnPropertySymbols(n);
|
|
675
|
+
if (i.length !== 1 || i[0] !== o || !Object.prototype.propertyIsEnumerable.call(n, o))
|
|
714
676
|
return !1;
|
|
715
677
|
if (typeof Object.getOwnPropertyDescriptor == "function") {
|
|
716
|
-
var
|
|
717
|
-
|
|
678
|
+
var u = (
|
|
679
|
+
/** @type {PropertyDescriptor} */
|
|
680
|
+
Object.getOwnPropertyDescriptor(n, o)
|
|
681
|
+
);
|
|
682
|
+
if (u.value !== a || u.enumerable !== !0)
|
|
718
683
|
return !1;
|
|
719
684
|
}
|
|
720
685
|
return !0;
|
|
721
686
|
}, "hasSymbols");
|
|
722
687
|
}
|
|
723
|
-
}),
|
|
724
|
-
"node_modules/has-symbols/index.js"(r,
|
|
688
|
+
}), Je = d({
|
|
689
|
+
"node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js"(r, e) {
|
|
725
690
|
"use strict";
|
|
726
|
-
var
|
|
727
|
-
|
|
728
|
-
return typeof
|
|
691
|
+
var t = typeof Symbol < "u" && Symbol, n = Ve();
|
|
692
|
+
e.exports = /* @__PURE__ */ s(function() {
|
|
693
|
+
return typeof t != "function" || typeof Symbol != "function" || typeof t("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
|
|
729
694
|
n();
|
|
730
695
|
}, "hasNativeSymbols");
|
|
731
696
|
}
|
|
732
|
-
}),
|
|
733
|
-
"node_modules/
|
|
697
|
+
}), ze = d({
|
|
698
|
+
"node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js"(r, e) {
|
|
699
|
+
"use strict";
|
|
700
|
+
e.exports = typeof Reflect < "u" && Reflect.getPrototypeOf || null;
|
|
701
|
+
}
|
|
702
|
+
}), Ye = d({
|
|
703
|
+
"node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js"(r, e) {
|
|
704
|
+
"use strict";
|
|
705
|
+
var t = He();
|
|
706
|
+
e.exports = t.getPrototypeOf || null;
|
|
707
|
+
}
|
|
708
|
+
}), rr = d({
|
|
709
|
+
"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(r, e) {
|
|
734
710
|
"use strict";
|
|
735
|
-
var
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
711
|
+
var t = "Function.prototype.bind called on incompatible ", n = Object.prototype.toString, o = Math.max, p = "[object Function]", a = /* @__PURE__ */ s(
|
|
712
|
+
function(y, f) {
|
|
713
|
+
for (var h = [], m = 0; m < y.length; m += 1)
|
|
714
|
+
h[m] = y[m];
|
|
715
|
+
for (var g = 0; g < f.length; g += 1)
|
|
716
|
+
h[g + y.length] = f[g];
|
|
717
|
+
return h;
|
|
718
|
+
}, "concatty2"), c = /* @__PURE__ */ s(function(y, f) {
|
|
719
|
+
for (var h = [], m = f || 0, g = 0; m < y.length; m += 1, g += 1)
|
|
720
|
+
h[g] = y[m];
|
|
721
|
+
return h;
|
|
722
|
+
}, "slicy2"), i = /* @__PURE__ */ s(function(u, y) {
|
|
723
|
+
for (var f = "", h = 0; h < u.length; h += 1)
|
|
724
|
+
f += u[h], h + 1 < u.length && (f += y);
|
|
725
|
+
return f;
|
|
726
|
+
}, "joiny");
|
|
727
|
+
e.exports = /* @__PURE__ */ s(function(y) {
|
|
728
|
+
var f = this;
|
|
729
|
+
if (typeof f != "function" || n.apply(f) !== p)
|
|
730
|
+
throw new TypeError(t + f);
|
|
731
|
+
for (var h = c(arguments, 1), m, g = /* @__PURE__ */ s(function() {
|
|
732
|
+
if (this instanceof m) {
|
|
733
|
+
var R = f.apply(
|
|
744
734
|
this,
|
|
745
|
-
|
|
746
|
-
);
|
|
747
|
-
return Object(E) === E ? E : this;
|
|
748
|
-
} else
|
|
749
|
-
return i.apply(
|
|
750
|
-
c,
|
|
751
|
-
g.concat(n.call(arguments))
|
|
735
|
+
a(h, arguments)
|
|
752
736
|
);
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
737
|
+
return Object(R) === R ? R : this;
|
|
738
|
+
}
|
|
739
|
+
return f.apply(
|
|
740
|
+
y,
|
|
741
|
+
a(h, arguments)
|
|
742
|
+
);
|
|
743
|
+
}, "binder"), N = o(0, f.length - h.length), P = [], x = 0; x < N; x++)
|
|
744
|
+
P[x] = "$" + x;
|
|
745
|
+
if (m = Function("binder", "return function (" + i(P, ",") + "){ return binder.apply(this,arguments); }")(g), f.prototype) {
|
|
746
|
+
var D = /* @__PURE__ */ s(function() {
|
|
757
747
|
}, "Empty2");
|
|
758
|
-
|
|
748
|
+
D.prototype = f.prototype, m.prototype = new D(), D.prototype = null;
|
|
759
749
|
}
|
|
760
|
-
return
|
|
750
|
+
return m;
|
|
761
751
|
}, "bind");
|
|
762
752
|
}
|
|
763
|
-
}),
|
|
764
|
-
"node_modules/function-bind/index.js"(r,
|
|
753
|
+
}), ce = d({
|
|
754
|
+
"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(r, e) {
|
|
765
755
|
"use strict";
|
|
766
|
-
var
|
|
767
|
-
|
|
756
|
+
var t = rr();
|
|
757
|
+
e.exports = Function.prototype.bind || t;
|
|
768
758
|
}
|
|
769
|
-
}),
|
|
770
|
-
"node_modules/
|
|
759
|
+
}), be = d({
|
|
760
|
+
"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js"(r, e) {
|
|
771
761
|
"use strict";
|
|
772
|
-
|
|
773
|
-
t.exports = e.call(Function.call, Object.prototype.hasOwnProperty);
|
|
762
|
+
e.exports = Function.prototype.call;
|
|
774
763
|
}
|
|
775
|
-
}),
|
|
776
|
-
"node_modules/
|
|
764
|
+
}), Ke = d({
|
|
765
|
+
"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js"(r, e) {
|
|
777
766
|
"use strict";
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
767
|
+
e.exports = Function.prototype.apply;
|
|
768
|
+
}
|
|
769
|
+
}), nr = d({
|
|
770
|
+
"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js"(r, e) {
|
|
771
|
+
"use strict";
|
|
772
|
+
e.exports = typeof Reflect < "u" && Reflect && Reflect.apply;
|
|
773
|
+
}
|
|
774
|
+
}), or = d({
|
|
775
|
+
"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js"(r, e) {
|
|
776
|
+
"use strict";
|
|
777
|
+
var t = ce(), n = Ke(), o = be(), p = nr();
|
|
778
|
+
e.exports = p || t.call(o, n);
|
|
779
|
+
}
|
|
780
|
+
}), Xe = d({
|
|
781
|
+
"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js"(r, e) {
|
|
782
|
+
"use strict";
|
|
783
|
+
var t = ce(), n = Ee(), o = be(), p = or();
|
|
784
|
+
e.exports = /* @__PURE__ */ s(function(c) {
|
|
785
|
+
if (c.length < 1 || typeof c[0] != "function")
|
|
786
|
+
throw new n("a function is required");
|
|
787
|
+
return p(t, o, c);
|
|
788
|
+
}, "callBindBasic");
|
|
789
|
+
}
|
|
790
|
+
}), sr = d({
|
|
791
|
+
"node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js"(r, e) {
|
|
792
|
+
"use strict";
|
|
793
|
+
var t = Xe(), n = _e(), o;
|
|
794
|
+
try {
|
|
795
|
+
o = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
796
|
+
[].__proto__ === Array.prototype;
|
|
797
|
+
} catch (i) {
|
|
798
|
+
if (!i || typeof i != "object" || !("code" in i) || i.code !== "ERR_PROTO_ACCESS")
|
|
799
|
+
throw i;
|
|
800
|
+
}
|
|
801
|
+
var p = !!o && n && n(
|
|
802
|
+
Object.prototype,
|
|
803
|
+
/** @type {keyof typeof Object.prototype} */
|
|
804
|
+
"__proto__"
|
|
805
|
+
), a = Object, c = a.getPrototypeOf;
|
|
806
|
+
e.exports = p && typeof p.get == "function" ? t([p.get]) : typeof c == "function" ? (
|
|
807
|
+
/** @type {import('./get')} */
|
|
808
|
+
/* @__PURE__ */ s(function(u) {
|
|
809
|
+
return c(u == null ? u : a(u));
|
|
810
|
+
}, "getDunder")
|
|
811
|
+
) : !1;
|
|
812
|
+
}
|
|
813
|
+
}), ir = d({
|
|
814
|
+
"node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js"(r, e) {
|
|
815
|
+
"use strict";
|
|
816
|
+
var t = ze(), n = Ye(), o = sr();
|
|
817
|
+
e.exports = t ? /* @__PURE__ */ s(function(a) {
|
|
818
|
+
return t(a);
|
|
819
|
+
}, "getProto") : n ? /* @__PURE__ */ s(function(a) {
|
|
820
|
+
if (!a || typeof a != "object" && typeof a != "function")
|
|
821
|
+
throw new TypeError("getProto: not an object");
|
|
822
|
+
return n(a);
|
|
823
|
+
}, "getProto") : o ? /* @__PURE__ */ s(function(a) {
|
|
824
|
+
return o(a);
|
|
825
|
+
}, "getProto") : null;
|
|
826
|
+
}
|
|
827
|
+
}), Qe = d({
|
|
828
|
+
"node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(r, e) {
|
|
829
|
+
"use strict";
|
|
830
|
+
var t = Function.prototype.call, n = Object.prototype.hasOwnProperty, o = ce();
|
|
831
|
+
e.exports = o.call(t, n);
|
|
832
|
+
}
|
|
833
|
+
}), ar = d({
|
|
834
|
+
"node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js"(r, e) {
|
|
835
|
+
"use strict";
|
|
836
|
+
var t, n = He(), o = Gt(), p = kt(), a = Wt(), c = qt(), i = Bt(), u = Ee(), y = Ht(), f = Vt(), h = Jt(), m = zt(), g = Yt(), N = Kt(),
|
|
837
|
+
P = Xt(), x = Zt(), D = Function, R = /* @__PURE__ */ s(function(O) {
|
|
785
838
|
try {
|
|
786
|
-
|
|
839
|
+
return D('"use strict"; return (' + O + ").constructor;")();
|
|
787
840
|
} catch {
|
|
788
|
-
c = null;
|
|
789
841
|
}
|
|
790
|
-
|
|
791
|
-
throw new
|
|
792
|
-
}, "throwTypeError"),
|
|
842
|
+
}, "getEvalledConstructor"), B = _e(), gt = tr(), ye = /* @__PURE__ */ s(function() {
|
|
843
|
+
throw new u();
|
|
844
|
+
}, "throwTypeError"), mt = B ? function() {
|
|
793
845
|
try {
|
|
794
|
-
return arguments.callee,
|
|
846
|
+
return arguments.callee, ye;
|
|
795
847
|
} catch {
|
|
796
848
|
try {
|
|
797
|
-
return
|
|
849
|
+
return B(arguments, "callee").get;
|
|
798
850
|
} catch {
|
|
799
|
-
return
|
|
851
|
+
return ye;
|
|
800
852
|
}
|
|
801
853
|
}
|
|
802
|
-
}() :
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
"%AggregateError%": typeof AggregateError > "u" ?
|
|
854
|
+
}() : ye, $ = Je()(), _ = ir(), vt = Ye(), Et = ze(), je = Ke(), H = be(), F = {}, _t = typeof Uint8Array > "u" || !_ ? t : _(Uint8Array),
|
|
855
|
+
j = {
|
|
856
|
+
__proto__: null,
|
|
857
|
+
"%AggregateError%": typeof AggregateError > "u" ? t : AggregateError,
|
|
806
858
|
"%Array%": Array,
|
|
807
|
-
"%ArrayBuffer%": typeof ArrayBuffer > "u" ?
|
|
808
|
-
"%ArrayIteratorPrototype%":
|
|
809
|
-
"%AsyncFromSyncIteratorPrototype%":
|
|
810
|
-
"%AsyncFunction%":
|
|
811
|
-
"%AsyncGenerator%":
|
|
812
|
-
"%AsyncGeneratorFunction%":
|
|
813
|
-
"%AsyncIteratorPrototype%":
|
|
814
|
-
"%Atomics%": typeof Atomics > "u" ?
|
|
815
|
-
"%BigInt%": typeof BigInt > "u" ?
|
|
859
|
+
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? t : ArrayBuffer,
|
|
860
|
+
"%ArrayIteratorPrototype%": $ && _ ? _([][Symbol.iterator]()) : t,
|
|
861
|
+
"%AsyncFromSyncIteratorPrototype%": t,
|
|
862
|
+
"%AsyncFunction%": F,
|
|
863
|
+
"%AsyncGenerator%": F,
|
|
864
|
+
"%AsyncGeneratorFunction%": F,
|
|
865
|
+
"%AsyncIteratorPrototype%": F,
|
|
866
|
+
"%Atomics%": typeof Atomics > "u" ? t : Atomics,
|
|
867
|
+
"%BigInt%": typeof BigInt > "u" ? t : BigInt,
|
|
868
|
+
"%BigInt64Array%": typeof BigInt64Array > "u" ? t : BigInt64Array,
|
|
869
|
+
"%BigUint64Array%": typeof BigUint64Array > "u" ? t : BigUint64Array,
|
|
816
870
|
"%Boolean%": Boolean,
|
|
817
|
-
"%DataView%": typeof DataView > "u" ?
|
|
871
|
+
"%DataView%": typeof DataView > "u" ? t : DataView,
|
|
818
872
|
"%Date%": Date,
|
|
819
873
|
"%decodeURI%": decodeURI,
|
|
820
874
|
"%decodeURIComponent%": decodeURIComponent,
|
|
821
875
|
"%encodeURI%": encodeURI,
|
|
822
876
|
"%encodeURIComponent%": encodeURIComponent,
|
|
823
|
-
"%Error%":
|
|
877
|
+
"%Error%": o,
|
|
824
878
|
"%eval%": eval,
|
|
825
|
-
|
|
826
|
-
"%
|
|
827
|
-
"%
|
|
828
|
-
"%
|
|
829
|
-
"%
|
|
830
|
-
"%
|
|
831
|
-
"%
|
|
832
|
-
"%
|
|
833
|
-
"%
|
|
879
|
+
// eslint-disable-line no-eval
|
|
880
|
+
"%EvalError%": p,
|
|
881
|
+
"%Float16Array%": typeof Float16Array > "u" ? t : Float16Array,
|
|
882
|
+
"%Float32Array%": typeof Float32Array > "u" ? t : Float32Array,
|
|
883
|
+
"%Float64Array%": typeof Float64Array > "u" ? t : Float64Array,
|
|
884
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? t : FinalizationRegistry,
|
|
885
|
+
"%Function%": D,
|
|
886
|
+
"%GeneratorFunction%": F,
|
|
887
|
+
"%Int8Array%": typeof Int8Array > "u" ? t : Int8Array,
|
|
888
|
+
"%Int16Array%": typeof Int16Array > "u" ? t : Int16Array,
|
|
889
|
+
"%Int32Array%": typeof Int32Array > "u" ? t : Int32Array,
|
|
834
890
|
"%isFinite%": isFinite,
|
|
835
891
|
"%isNaN%": isNaN,
|
|
836
|
-
"%IteratorPrototype%":
|
|
837
|
-
"%JSON%": typeof JSON == "object" ? JSON :
|
|
838
|
-
"%Map%": typeof Map > "u" ?
|
|
839
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !
|
|
892
|
+
"%IteratorPrototype%": $ && _ ? _(_([][Symbol.iterator]())) : t,
|
|
893
|
+
"%JSON%": typeof JSON == "object" ? JSON : t,
|
|
894
|
+
"%Map%": typeof Map > "u" ? t : Map,
|
|
895
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !$ || !_ ? t : _((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
840
896
|
"%Math%": Math,
|
|
841
897
|
"%Number%": Number,
|
|
842
|
-
"%Object%":
|
|
898
|
+
"%Object%": n,
|
|
899
|
+
"%Object.getOwnPropertyDescriptor%": B,
|
|
843
900
|
"%parseFloat%": parseFloat,
|
|
844
901
|
"%parseInt%": parseInt,
|
|
845
|
-
"%Promise%": typeof Promise > "u" ?
|
|
846
|
-
"%Proxy%": typeof Proxy > "u" ?
|
|
847
|
-
"%RangeError%":
|
|
848
|
-
"%ReferenceError%":
|
|
849
|
-
"%Reflect%": typeof Reflect > "u" ?
|
|
902
|
+
"%Promise%": typeof Promise > "u" ? t : Promise,
|
|
903
|
+
"%Proxy%": typeof Proxy > "u" ? t : Proxy,
|
|
904
|
+
"%RangeError%": a,
|
|
905
|
+
"%ReferenceError%": c,
|
|
906
|
+
"%Reflect%": typeof Reflect > "u" ? t : Reflect,
|
|
850
907
|
"%RegExp%": RegExp,
|
|
851
|
-
"%Set%": typeof Set > "u" ?
|
|
852
|
-
"%SetIteratorPrototype%": typeof Set > "u" || !
|
|
853
|
-
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ?
|
|
908
|
+
"%Set%": typeof Set > "u" ? t : Set,
|
|
909
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !$ || !_ ? t : _((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
910
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? t : SharedArrayBuffer,
|
|
854
911
|
"%String%": String,
|
|
855
|
-
"%StringIteratorPrototype%":
|
|
856
|
-
"%Symbol%":
|
|
857
|
-
"%SyntaxError%":
|
|
858
|
-
"%ThrowTypeError%":
|
|
859
|
-
"%TypedArray%":
|
|
860
|
-
"%TypeError%":
|
|
861
|
-
"%Uint8Array%": typeof Uint8Array > "u" ?
|
|
862
|
-
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ?
|
|
863
|
-
"%Uint16Array%": typeof Uint16Array > "u" ?
|
|
864
|
-
"%Uint32Array%": typeof Uint32Array > "u" ?
|
|
865
|
-
"%URIError%":
|
|
866
|
-
"%WeakMap%": typeof WeakMap > "u" ?
|
|
867
|
-
"%WeakRef%": typeof WeakRef > "u" ?
|
|
868
|
-
"%WeakSet%": typeof WeakSet > "u" ?
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
912
|
+
"%StringIteratorPrototype%": $ && _ ? _(""[Symbol.iterator]()) : t,
|
|
913
|
+
"%Symbol%": $ ? Symbol : t,
|
|
914
|
+
"%SyntaxError%": i,
|
|
915
|
+
"%ThrowTypeError%": mt,
|
|
916
|
+
"%TypedArray%": _t,
|
|
917
|
+
"%TypeError%": u,
|
|
918
|
+
"%Uint8Array%": typeof Uint8Array > "u" ? t : Uint8Array,
|
|
919
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? t : Uint8ClampedArray,
|
|
920
|
+
"%Uint16Array%": typeof Uint16Array > "u" ? t : Uint16Array,
|
|
921
|
+
"%Uint32Array%": typeof Uint32Array > "u" ? t : Uint32Array,
|
|
922
|
+
"%URIError%": y,
|
|
923
|
+
"%WeakMap%": typeof WeakMap > "u" ? t : WeakMap,
|
|
924
|
+
"%WeakRef%": typeof WeakRef > "u" ? t : WeakRef,
|
|
925
|
+
"%WeakSet%": typeof WeakSet > "u" ? t : WeakSet,
|
|
926
|
+
"%Function.prototype.call%": H,
|
|
927
|
+
"%Function.prototype.apply%": je,
|
|
928
|
+
"%Object.defineProperty%": gt,
|
|
929
|
+
"%Object.getPrototypeOf%": vt,
|
|
930
|
+
"%Math.abs%": f,
|
|
931
|
+
"%Math.floor%": h,
|
|
932
|
+
"%Math.max%": m,
|
|
933
|
+
"%Math.min%": g,
|
|
934
|
+
"%Math.pow%": N,
|
|
935
|
+
"%Math.round%": P,
|
|
936
|
+
"%Math.sign%": x,
|
|
937
|
+
"%Reflect.getPrototypeOf%": Et
|
|
938
|
+
};
|
|
939
|
+
if (_)
|
|
940
|
+
try {
|
|
941
|
+
null.error;
|
|
942
|
+
} catch (O) {
|
|
943
|
+
Le = _(_(O)), j["%Error.prototype%"] = Le;
|
|
883
944
|
}
|
|
884
|
-
|
|
885
|
-
|
|
945
|
+
var Le, bt = /* @__PURE__ */ s(function O(v) {
|
|
946
|
+
var b;
|
|
947
|
+
if (v === "%AsyncFunction%")
|
|
948
|
+
b = R("async function () {}");
|
|
949
|
+
else if (v === "%GeneratorFunction%")
|
|
950
|
+
b = R("function* () {}");
|
|
951
|
+
else if (v === "%AsyncGeneratorFunction%")
|
|
952
|
+
b = R("async function* () {}");
|
|
953
|
+
else if (v === "%AsyncGenerator%") {
|
|
954
|
+
var E = O("%AsyncGeneratorFunction%");
|
|
955
|
+
E && (b = E.prototype);
|
|
956
|
+
} else if (v === "%AsyncIteratorPrototype%") {
|
|
957
|
+
var T = O("%AsyncGenerator%");
|
|
958
|
+
T && _ && (b = _(T.prototype));
|
|
959
|
+
}
|
|
960
|
+
return j[v] = b, b;
|
|
961
|
+
}, "doEval2"), De = {
|
|
962
|
+
__proto__: null,
|
|
886
963
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
887
964
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
888
965
|
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
@@ -934,255 +1011,256 @@ on]";
|
|
|
934
1011
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
935
1012
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
936
1013
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
937
|
-
},
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
throw new s("intrinsic " + b + " exists, but is not available. Please file an issue!");
|
|
1014
|
+
}, V = ce(), te = Qe(), St = V.call(H, Array.prototype.concat), Tt = V.call(je, Array.prototype.splice), $e = V.call(H, String.prototype.
|
|
1015
|
+
replace), re = V.call(H, String.prototype.slice), At = V.call(H, RegExp.prototype.exec), xt = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,
|
|
1016
|
+
wt = /\\(\\)?/g, Pt = /* @__PURE__ */ s(function(v) {
|
|
1017
|
+
var b = re(v, 0, 1), E = re(v, -1);
|
|
1018
|
+
if (b === "%" && E !== "%")
|
|
1019
|
+
throw new i("invalid intrinsic syntax, expected closing `%`");
|
|
1020
|
+
if (E === "%" && b !== "%")
|
|
1021
|
+
throw new i("invalid intrinsic syntax, expected opening `%`");
|
|
1022
|
+
var T = [];
|
|
1023
|
+
return $e(v, xt, function(C, M, A, ne) {
|
|
1024
|
+
T[T.length] = A ? $e(ne, wt, "$1") : M || C;
|
|
1025
|
+
}), T;
|
|
1026
|
+
}, "stringToPath3"), Ot = /* @__PURE__ */ s(function(v, b) {
|
|
1027
|
+
var E = v, T;
|
|
1028
|
+
if (te(De, E) && (T = De[E], E = "%" + T[0] + "%"), te(j, E)) {
|
|
1029
|
+
var C = j[E];
|
|
1030
|
+
if (C === F && (C = bt(E)), typeof C > "u" && !b)
|
|
1031
|
+
throw new u("intrinsic " + v + " exists, but is not available. Please file an issue!");
|
|
956
1032
|
return {
|
|
957
|
-
alias:
|
|
958
|
-
name:
|
|
959
|
-
value:
|
|
1033
|
+
alias: T,
|
|
1034
|
+
name: E,
|
|
1035
|
+
value: C
|
|
960
1036
|
};
|
|
961
1037
|
}
|
|
962
|
-
throw new
|
|
1038
|
+
throw new i("intrinsic " + v + " does not exist!");
|
|
963
1039
|
}, "getBaseIntrinsic2");
|
|
964
|
-
|
|
965
|
-
if (typeof
|
|
966
|
-
throw new
|
|
967
|
-
if (arguments.length > 1 && typeof
|
|
968
|
-
throw new
|
|
969
|
-
if (
|
|
970
|
-
throw new
|
|
971
|
-
var
|
|
972
|
-
|
|
973
|
-
for (var
|
|
974
|
-
var
|
|
975
|
-
if ((
|
|
976
|
-
throw new
|
|
977
|
-
if ((
|
|
978
|
-
|
|
979
|
-
else if (
|
|
980
|
-
if (!(
|
|
981
|
-
if (!
|
|
982
|
-
throw new
|
|
1040
|
+
e.exports = /* @__PURE__ */ s(function(v, b) {
|
|
1041
|
+
if (typeof v != "string" || v.length === 0)
|
|
1042
|
+
throw new u("intrinsic name must be a non-empty string");
|
|
1043
|
+
if (arguments.length > 1 && typeof b != "boolean")
|
|
1044
|
+
throw new u('"allowMissing" argument must be a boolean');
|
|
1045
|
+
if (At(/^%?[^%]*%?$/, v) === null)
|
|
1046
|
+
throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
1047
|
+
var E = Pt(v), T = E.length > 0 ? E[0] : "", C = Ot("%" + T + "%", b), M = C.name, A = C.value, ne = !1, he = C.alias;
|
|
1048
|
+
he && (T = he[0], Tt(E, St([0, 1], he)));
|
|
1049
|
+
for (var oe = 1, J = !0; oe < E.length; oe += 1) {
|
|
1050
|
+
var I = E[oe], se = re(I, 0, 1), ie = re(I, -1);
|
|
1051
|
+
if ((se === '"' || se === "'" || se === "`" || ie === '"' || ie === "'" || ie === "`") && se !== ie)
|
|
1052
|
+
throw new i("property names with quotes must have matching quotes");
|
|
1053
|
+
if ((I === "constructor" || !J) && (ne = !0), T += "." + I, M = "%" + T + "%", te(j, M))
|
|
1054
|
+
A = j[M];
|
|
1055
|
+
else if (A != null) {
|
|
1056
|
+
if (!(I in A)) {
|
|
1057
|
+
if (!b)
|
|
1058
|
+
throw new u("base intrinsic for " + v + " exists, but the property is not available.");
|
|
983
1059
|
return;
|
|
984
1060
|
}
|
|
985
|
-
if (
|
|
986
|
-
var
|
|
987
|
-
|
|
1061
|
+
if (B && oe + 1 >= E.length) {
|
|
1062
|
+
var ae = B(A, I);
|
|
1063
|
+
J = !!ae, J && "get" in ae && !("originalValue" in ae.get) ? A = ae.get : A = A[I];
|
|
988
1064
|
} else
|
|
989
|
-
|
|
990
|
-
|
|
1065
|
+
J = te(A, I), A = A[I];
|
|
1066
|
+
J && !ne && (j[M] = A);
|
|
991
1067
|
}
|
|
992
1068
|
}
|
|
993
|
-
return
|
|
1069
|
+
return A;
|
|
994
1070
|
}, "GetIntrinsic");
|
|
995
1071
|
}
|
|
996
|
-
}),
|
|
997
|
-
"node_modules/call-
|
|
998
|
-
"use strict";
|
|
999
|
-
var e = gt(), n = $t(), o = n("%Function.prototype.apply%"), s = n("%Function.prototype.call%"), l = n("%Reflect.apply%", !0) || e.call(
|
|
1000
|
-
s, o), c = n("%Object.getOwnPropertyDescriptor%", !0), i = n("%Object.defineProperty%", !0), g = n("%Math.max%");
|
|
1001
|
-
if (i)
|
|
1002
|
-
try {
|
|
1003
|
-
i({}, "a", { value: 1 });
|
|
1004
|
-
} catch {
|
|
1005
|
-
i = null;
|
|
1006
|
-
}
|
|
1007
|
-
t.exports = /* @__PURE__ */ a(function(y) {
|
|
1008
|
-
var v = l(e, s, arguments);
|
|
1009
|
-
if (c && i) {
|
|
1010
|
-
var d = c(v, "length");
|
|
1011
|
-
d.configurable && i(
|
|
1012
|
-
v,
|
|
1013
|
-
"length",
|
|
1014
|
-
{ value: 1 + g(0, y.length - (arguments.length - 1)) }
|
|
1015
|
-
);
|
|
1016
|
-
}
|
|
1017
|
-
return v;
|
|
1018
|
-
}, "callBind");
|
|
1019
|
-
var p = /* @__PURE__ */ a(function() {
|
|
1020
|
-
return l(e, o, arguments);
|
|
1021
|
-
}, "applyBind2");
|
|
1022
|
-
i ? i(t.exports, "apply", { value: p }) : t.exports.apply = p;
|
|
1023
|
-
}
|
|
1024
|
-
}), Pe = P({
|
|
1025
|
-
"node_modules/call-bind/callBound.js"(r, t) {
|
|
1072
|
+
}), Se = d({
|
|
1073
|
+
"node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js"(r, e) {
|
|
1026
1074
|
"use strict";
|
|
1027
|
-
var
|
|
1028
|
-
|
|
1029
|
-
var i =
|
|
1030
|
-
|
|
1075
|
+
var t = ar(), n = Xe(), o = n([t("%String.prototype.indexOf%")]);
|
|
1076
|
+
e.exports = /* @__PURE__ */ s(function(a, c) {
|
|
1077
|
+
var i = (
|
|
1078
|
+
/** @type {(this: unknown, ...args: unknown[]) => unknown} */
|
|
1079
|
+
t(a, !!c)
|
|
1080
|
+
);
|
|
1081
|
+
return typeof i == "function" && o(a, ".prototype.") > -1 ? n(
|
|
1082
|
+
/** @type {const} */
|
|
1083
|
+
[i]
|
|
1084
|
+
) : i;
|
|
1031
1085
|
}, "callBoundIntrinsic");
|
|
1032
1086
|
}
|
|
1033
|
-
}),
|
|
1034
|
-
"node_modules/has-tostringtag/shams.js"(r,
|
|
1087
|
+
}), pr = d({
|
|
1088
|
+
"node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js"(r, e) {
|
|
1035
1089
|
"use strict";
|
|
1036
|
-
var
|
|
1037
|
-
|
|
1038
|
-
return
|
|
1090
|
+
var t = Ve();
|
|
1091
|
+
e.exports = /* @__PURE__ */ s(function() {
|
|
1092
|
+
return t() && !!Symbol.toStringTag;
|
|
1039
1093
|
}, "hasToStringTagShams");
|
|
1040
1094
|
}
|
|
1041
|
-
}),
|
|
1042
|
-
"node_modules/is-regex/index.js"(r,
|
|
1095
|
+
}), Ze = d({
|
|
1096
|
+
"node_modules/.pnpm/is-regex@1.2.1/node_modules/is-regex/index.js"(r, e) {
|
|
1043
1097
|
"use strict";
|
|
1044
|
-
var
|
|
1045
|
-
n
|
|
1046
|
-
throw
|
|
1047
|
-
}, "throwRegexMarker"),
|
|
1048
|
-
toString:
|
|
1049
|
-
valueOf:
|
|
1050
|
-
}, typeof Symbol.toPrimitive == "symbol" && (
|
|
1051
|
-
|
|
1052
|
-
t.exports = /* @__PURE__ */ a(n ? function(v) {
|
|
1053
|
-
if (!v || typeof v != "object")
|
|
1098
|
+
var t = Se(), n = pr()(), o = Qe(), p = _e(), a;
|
|
1099
|
+
n ? (c = t("RegExp.prototype.exec"), i = {}, u = /* @__PURE__ */ s(function() {
|
|
1100
|
+
throw i;
|
|
1101
|
+
}, "throwRegexMarker"), y = {
|
|
1102
|
+
toString: u,
|
|
1103
|
+
valueOf: u
|
|
1104
|
+
}, typeof Symbol.toPrimitive == "symbol" && (y[Symbol.toPrimitive] = u), a = /* @__PURE__ */ s(function(g) {
|
|
1105
|
+
if (!g || typeof g != "object")
|
|
1054
1106
|
return !1;
|
|
1055
|
-
var
|
|
1056
|
-
|
|
1107
|
+
var N = (
|
|
1108
|
+
/** @type {NonNullable<typeof gOPD>} */
|
|
1109
|
+
p(
|
|
1110
|
+
/** @type {{ lastIndex?: unknown }} */
|
|
1111
|
+
g,
|
|
1112
|
+
"lastIndex"
|
|
1113
|
+
)
|
|
1114
|
+
), P = N && o(N, "value");
|
|
1115
|
+
if (!P)
|
|
1057
1116
|
return !1;
|
|
1058
1117
|
try {
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1118
|
+
c(
|
|
1119
|
+
g,
|
|
1120
|
+
/** @type {string} */
|
|
1121
|
+
/** @type {unknown} */
|
|
1122
|
+
y
|
|
1123
|
+
);
|
|
1124
|
+
} catch (x) {
|
|
1125
|
+
return x === i;
|
|
1062
1126
|
}
|
|
1063
|
-
} : function(
|
|
1064
|
-
return !
|
|
1065
|
-
}, "isRegex");
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1127
|
+
}, "isRegex")) : (f = t("Object.prototype.toString"), h = "[object RegExp]", a = /* @__PURE__ */ s(function(g) {
|
|
1128
|
+
return !g || typeof g != "object" && typeof g != "function" ? !1 : f(g) === h;
|
|
1129
|
+
}, "isRegex"));
|
|
1130
|
+
var c, i, u, y, f, h;
|
|
1131
|
+
e.exports = a;
|
|
1132
|
+
}
|
|
1133
|
+
}), cr = d({
|
|
1134
|
+
"node_modules/.pnpm/is-function@1.0.2/node_modules/is-function/index.js"(r, e) {
|
|
1135
|
+
e.exports = n;
|
|
1136
|
+
var t = Object.prototype.toString;
|
|
1071
1137
|
function n(o) {
|
|
1072
1138
|
if (!o)
|
|
1073
1139
|
return !1;
|
|
1074
|
-
var
|
|
1075
|
-
return
|
|
1076
|
-
o === window.alert || o === window.confirm || o === window.prompt);
|
|
1140
|
+
var p = t.call(o);
|
|
1141
|
+
return p === "[object Function]" || typeof o == "function" && p !== "[object RegExp]" || typeof window < "u" && // IE8 and below
|
|
1142
|
+
(o === window.setTimeout || o === window.alert || o === window.confirm || o === window.prompt);
|
|
1077
1143
|
}
|
|
1078
|
-
|
|
1144
|
+
s(n, "isFunction3");
|
|
1079
1145
|
}
|
|
1080
|
-
}),
|
|
1081
|
-
"node_modules/
|
|
1146
|
+
}), lr = d({
|
|
1147
|
+
"node_modules/.pnpm/safe-regex-test@1.1.0/node_modules/safe-regex-test/index.js"(r, e) {
|
|
1082
1148
|
"use strict";
|
|
1083
|
-
var
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1149
|
+
var t = Se(), n = Ze(), o = t("RegExp.prototype.exec"), p = Ee();
|
|
1150
|
+
e.exports = /* @__PURE__ */ s(function(c) {
|
|
1151
|
+
if (!n(c))
|
|
1152
|
+
throw new p("`regex` must be a RegExp");
|
|
1153
|
+
return /* @__PURE__ */ s(function(u) {
|
|
1154
|
+
return o(c, u) !== null;
|
|
1155
|
+
}, "test");
|
|
1156
|
+
}, "regexTester");
|
|
1157
|
+
}
|
|
1158
|
+
}), ur = d({
|
|
1159
|
+
"node_modules/.pnpm/is-symbol@1.1.1/node_modules/is-symbol/index.js"(r, e) {
|
|
1160
|
+
"use strict";
|
|
1161
|
+
var t = Se(), n = t("Object.prototype.toString"), o = Je()(), p = lr();
|
|
1162
|
+
o ? (a = t("Symbol.prototype.toString"), c = p(/^Symbol\(.*\)$/), i = /* @__PURE__ */ s(function(y) {
|
|
1163
|
+
return typeof y.valueOf() != "symbol" ? !1 : c(a(y));
|
|
1164
|
+
}, "isRealSymbolObject"), e.exports = /* @__PURE__ */ s(function(y) {
|
|
1165
|
+
if (typeof y == "symbol")
|
|
1088
1166
|
return !0;
|
|
1089
|
-
if (
|
|
1167
|
+
if (!y || typeof y != "object" || n(y) !== "[object Symbol]")
|
|
1090
1168
|
return !1;
|
|
1091
1169
|
try {
|
|
1092
|
-
return
|
|
1170
|
+
return i(y);
|
|
1093
1171
|
} catch {
|
|
1094
1172
|
return !1;
|
|
1095
1173
|
}
|
|
1096
|
-
}, "isSymbol3")) :
|
|
1174
|
+
}, "isSymbol3")) : e.exports = /* @__PURE__ */ s(function(y) {
|
|
1097
1175
|
return !1;
|
|
1098
1176
|
}, "isSymbol3");
|
|
1099
|
-
var
|
|
1177
|
+
var a, c, i;
|
|
1100
1178
|
}
|
|
1101
|
-
}),
|
|
1102
|
-
function
|
|
1179
|
+
}), fr = pe(Ze()), dr = pe(cr()), yr = pe(ur());
|
|
1180
|
+
function hr(r) {
|
|
1103
1181
|
return r != null && typeof r == "object" && Array.isArray(r) === !1;
|
|
1104
1182
|
}
|
|
1105
|
-
|
|
1106
|
-
var
|
|
1107
|
-
Object && self,
|
|
1108
|
-
toString,
|
|
1109
|
-
function
|
|
1110
|
-
var
|
|
1183
|
+
s(hr, "isObject");
|
|
1184
|
+
var gr = typeof global == "object" && global && global.Object === Object && global, mr = gr, vr = typeof self == "object" && self && self.Object ===
|
|
1185
|
+
Object && self, Er = mr || vr || Function("return this")(), Te = Er, _r = Te.Symbol, G = _r, et = Object.prototype, br = et.hasOwnProperty, Sr = et.
|
|
1186
|
+
toString, Y = G ? G.toStringTag : void 0;
|
|
1187
|
+
function Tr(r) {
|
|
1188
|
+
var e = br.call(r, Y), t = r[Y];
|
|
1111
1189
|
try {
|
|
1112
|
-
r[
|
|
1190
|
+
r[Y] = void 0;
|
|
1113
1191
|
var n = !0;
|
|
1114
1192
|
} catch {
|
|
1115
1193
|
}
|
|
1116
|
-
var o =
|
|
1117
|
-
return n && (
|
|
1194
|
+
var o = Sr.call(r);
|
|
1195
|
+
return n && (e ? r[Y] = t : delete r[Y]), o;
|
|
1118
1196
|
}
|
|
1119
|
-
|
|
1120
|
-
var
|
|
1121
|
-
function
|
|
1122
|
-
return
|
|
1197
|
+
s(Tr, "getRawTag");
|
|
1198
|
+
var Ar = Tr, xr = Object.prototype, wr = xr.toString;
|
|
1199
|
+
function Pr(r) {
|
|
1200
|
+
return wr.call(r);
|
|
1123
1201
|
}
|
|
1124
|
-
|
|
1125
|
-
var
|
|
1126
|
-
function
|
|
1127
|
-
return r == null ? r === void 0 ?
|
|
1202
|
+
s(Pr, "objectToString");
|
|
1203
|
+
var Or = Pr, Cr = "[object Null]", Nr = "[object Undefined]", Ge = G ? G.toStringTag : void 0;
|
|
1204
|
+
function Ir(r) {
|
|
1205
|
+
return r == null ? r === void 0 ? Nr : Cr : Ge && Ge in Object(r) ? Ar(r) : Or(r);
|
|
1128
1206
|
}
|
|
1129
|
-
|
|
1130
|
-
var
|
|
1131
|
-
function
|
|
1207
|
+
s(Ir, "baseGetTag");
|
|
1208
|
+
var tt = Ir;
|
|
1209
|
+
function Rr(r) {
|
|
1132
1210
|
return r != null && typeof r == "object";
|
|
1133
1211
|
}
|
|
1134
|
-
|
|
1135
|
-
var
|
|
1136
|
-
function
|
|
1137
|
-
return typeof r == "symbol" ||
|
|
1212
|
+
s(Rr, "isObjectLike");
|
|
1213
|
+
var jr = Rr, Lr = "[object Symbol]";
|
|
1214
|
+
function Dr(r) {
|
|
1215
|
+
return typeof r == "symbol" || jr(r) && tt(r) == Lr;
|
|
1138
1216
|
}
|
|
1139
|
-
|
|
1140
|
-
var
|
|
1141
|
-
function
|
|
1142
|
-
for (var
|
|
1143
|
-
o[
|
|
1217
|
+
s(Dr, "isSymbol");
|
|
1218
|
+
var Ae = Dr;
|
|
1219
|
+
function $r(r, e) {
|
|
1220
|
+
for (var t = -1, n = r == null ? 0 : r.length, o = Array(n); ++t < n; )
|
|
1221
|
+
o[t] = e(r[t], t, r);
|
|
1144
1222
|
return o;
|
|
1145
1223
|
}
|
|
1146
|
-
|
|
1147
|
-
var
|
|
1148
|
-
function
|
|
1224
|
+
s($r, "arrayMap");
|
|
1225
|
+
var Fr = $r, Mr = Array.isArray, xe = Mr, Ur = 1 / 0, ke = G ? G.prototype : void 0, We = ke ? ke.toString : void 0;
|
|
1226
|
+
function rt(r) {
|
|
1149
1227
|
if (typeof r == "string")
|
|
1150
1228
|
return r;
|
|
1151
|
-
if (
|
|
1152
|
-
return
|
|
1153
|
-
if (
|
|
1154
|
-
return
|
|
1155
|
-
var
|
|
1156
|
-
return
|
|
1229
|
+
if (xe(r))
|
|
1230
|
+
return Fr(r, rt) + "";
|
|
1231
|
+
if (Ae(r))
|
|
1232
|
+
return We ? We.call(r) : "";
|
|
1233
|
+
var e = r + "";
|
|
1234
|
+
return e == "0" && 1 / r == -Ur ? "-0" : e;
|
|
1157
1235
|
}
|
|
1158
|
-
|
|
1159
|
-
var
|
|
1160
|
-
function
|
|
1161
|
-
var
|
|
1162
|
-
return r != null && (
|
|
1236
|
+
s(rt, "baseToString");
|
|
1237
|
+
var Gr = rt;
|
|
1238
|
+
function kr(r) {
|
|
1239
|
+
var e = typeof r;
|
|
1240
|
+
return r != null && (e == "object" || e == "function");
|
|
1163
1241
|
}
|
|
1164
|
-
|
|
1165
|
-
var
|
|
1166
|
-
function
|
|
1167
|
-
if (!
|
|
1242
|
+
s(kr, "isObject2");
|
|
1243
|
+
var nt = kr, Wr = "[object AsyncFunction]", qr = "[object Function]", Br = "[object GeneratorFunction]", Hr = "[object Proxy]";
|
|
1244
|
+
function Vr(r) {
|
|
1245
|
+
if (!nt(r))
|
|
1168
1246
|
return !1;
|
|
1169
|
-
var
|
|
1170
|
-
return
|
|
1247
|
+
var e = tt(r);
|
|
1248
|
+
return e == qr || e == Br || e == Wr || e == Hr;
|
|
1171
1249
|
}
|
|
1172
|
-
|
|
1173
|
-
var
|
|
1174
|
-
var r = /[^.]+$/.exec(
|
|
1250
|
+
s(Vr, "isFunction");
|
|
1251
|
+
var Jr = Vr, zr = Te["__core-js_shared__"], ve = zr, qe = function() {
|
|
1252
|
+
var r = /[^.]+$/.exec(ve && ve.keys && ve.keys.IE_PROTO || "");
|
|
1175
1253
|
return r ? "Symbol(src)_1." + r : "";
|
|
1176
1254
|
}();
|
|
1177
|
-
function
|
|
1178
|
-
return !!
|
|
1255
|
+
function Yr(r) {
|
|
1256
|
+
return !!qe && qe in r;
|
|
1179
1257
|
}
|
|
1180
|
-
|
|
1181
|
-
var
|
|
1182
|
-
function
|
|
1258
|
+
s(Yr, "isMasked");
|
|
1259
|
+
var Kr = Yr, Xr = Function.prototype, Qr = Xr.toString;
|
|
1260
|
+
function Zr(r) {
|
|
1183
1261
|
if (r != null) {
|
|
1184
1262
|
try {
|
|
1185
|
-
return
|
|
1263
|
+
return Qr.call(r);
|
|
1186
1264
|
} catch {
|
|
1187
1265
|
}
|
|
1188
1266
|
try {
|
|
@@ -1192,343 +1270,317 @@ function br(r) {
|
|
|
1192
1270
|
}
|
|
1193
1271
|
return "";
|
|
1194
1272
|
}
|
|
1195
|
-
|
|
1196
|
-
var
|
|
1197
|
-
|
|
1198
|
-
"^" +
|
|
1273
|
+
s(Zr, "toSource");
|
|
1274
|
+
var en = Zr, tn = /[\\^$.*+?()[\]{}|]/g, rn = /^\[object .+?Constructor\]$/, nn = Function.prototype, on = Object.prototype, sn = nn.toString,
|
|
1275
|
+
an = on.hasOwnProperty, pn = RegExp(
|
|
1276
|
+
"^" + sn.call(an).replace(tn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1199
1277
|
);
|
|
1200
|
-
function
|
|
1201
|
-
if (!
|
|
1278
|
+
function cn(r) {
|
|
1279
|
+
if (!nt(r) || Kr(r))
|
|
1202
1280
|
return !1;
|
|
1203
|
-
var
|
|
1204
|
-
return
|
|
1281
|
+
var e = Jr(r) ? pn : rn;
|
|
1282
|
+
return e.test(en(r));
|
|
1205
1283
|
}
|
|
1206
|
-
|
|
1207
|
-
var
|
|
1208
|
-
function
|
|
1209
|
-
return r?.[
|
|
1284
|
+
s(cn, "baseIsNative");
|
|
1285
|
+
var ln = cn;
|
|
1286
|
+
function un(r, e) {
|
|
1287
|
+
return r?.[e];
|
|
1210
1288
|
}
|
|
1211
|
-
|
|
1212
|
-
var
|
|
1213
|
-
function
|
|
1214
|
-
var
|
|
1215
|
-
return
|
|
1289
|
+
s(un, "getValue");
|
|
1290
|
+
var fn = un;
|
|
1291
|
+
function dn(r, e) {
|
|
1292
|
+
var t = fn(r, e);
|
|
1293
|
+
return ln(t) ? t : void 0;
|
|
1216
1294
|
}
|
|
1217
|
-
|
|
1218
|
-
var
|
|
1219
|
-
function
|
|
1220
|
-
return r ===
|
|
1295
|
+
s(dn, "getNative");
|
|
1296
|
+
var ot = dn;
|
|
1297
|
+
function yn(r, e) {
|
|
1298
|
+
return r === e || r !== r && e !== e;
|
|
1221
1299
|
}
|
|
1222
|
-
|
|
1223
|
-
var
|
|
1224
|
-
function
|
|
1225
|
-
if (
|
|
1300
|
+
s(yn, "eq");
|
|
1301
|
+
var hn = yn, gn = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, mn = /^\w*$/;
|
|
1302
|
+
function vn(r, e) {
|
|
1303
|
+
if (xe(r))
|
|
1226
1304
|
return !1;
|
|
1227
|
-
var
|
|
1228
|
-
return
|
|
1229
|
-
|
|
1305
|
+
var t = typeof r;
|
|
1306
|
+
return t == "number" || t == "symbol" || t == "boolean" || r == null || Ae(r) ? !0 : mn.test(r) || !gn.test(r) || e != null && r in Object(
|
|
1307
|
+
e);
|
|
1230
1308
|
}
|
|
1231
|
-
|
|
1232
|
-
var
|
|
1233
|
-
function
|
|
1234
|
-
this.__data__ =
|
|
1309
|
+
s(vn, "isKey");
|
|
1310
|
+
var En = vn, _n = ot(Object, "create"), K = _n;
|
|
1311
|
+
function bn() {
|
|
1312
|
+
this.__data__ = K ? K(null) : {}, this.size = 0;
|
|
1235
1313
|
}
|
|
1236
|
-
|
|
1237
|
-
var
|
|
1238
|
-
function
|
|
1239
|
-
var
|
|
1240
|
-
return this.size -=
|
|
1314
|
+
s(bn, "hashClear");
|
|
1315
|
+
var Sn = bn;
|
|
1316
|
+
function Tn(r) {
|
|
1317
|
+
var e = this.has(r) && delete this.__data__[r];
|
|
1318
|
+
return this.size -= e ? 1 : 0, e;
|
|
1241
1319
|
}
|
|
1242
|
-
|
|
1243
|
-
var
|
|
1244
|
-
function
|
|
1245
|
-
var
|
|
1246
|
-
if (
|
|
1247
|
-
var
|
|
1248
|
-
return
|
|
1320
|
+
s(Tn, "hashDelete");
|
|
1321
|
+
var An = Tn, xn = "__lodash_hash_undefined__", wn = Object.prototype, Pn = wn.hasOwnProperty;
|
|
1322
|
+
function On(r) {
|
|
1323
|
+
var e = this.__data__;
|
|
1324
|
+
if (K) {
|
|
1325
|
+
var t = e[r];
|
|
1326
|
+
return t === xn ? void 0 : t;
|
|
1249
1327
|
}
|
|
1250
|
-
return
|
|
1328
|
+
return Pn.call(e, r) ? e[r] : void 0;
|
|
1251
1329
|
}
|
|
1252
|
-
|
|
1253
|
-
var
|
|
1254
|
-
function
|
|
1255
|
-
var t = this.__data__;
|
|
1256
|
-
return V ? t[r] !== void 0 : Xr.call(t, r);
|
|
1257
|
-
}
|
|
1258
|
-
a(Qr, "hashHas");
|
|
1259
|
-
var Zr = Qr, tn = "__lodash_hash_undefined__";
|
|
1260
|
-
function en(r, t) {
|
|
1330
|
+
s(On, "hashGet");
|
|
1331
|
+
var Cn = On, Nn = Object.prototype, In = Nn.hasOwnProperty;
|
|
1332
|
+
function Rn(r) {
|
|
1261
1333
|
var e = this.__data__;
|
|
1262
|
-
return
|
|
1334
|
+
return K ? e[r] !== void 0 : In.call(e, r);
|
|
1335
|
+
}
|
|
1336
|
+
s(Rn, "hashHas");
|
|
1337
|
+
var jn = Rn, Ln = "__lodash_hash_undefined__";
|
|
1338
|
+
function Dn(r, e) {
|
|
1339
|
+
var t = this.__data__;
|
|
1340
|
+
return this.size += this.has(r) ? 0 : 1, t[r] = K && e === void 0 ? Ln : e, this;
|
|
1263
1341
|
}
|
|
1264
|
-
|
|
1265
|
-
var
|
|
1342
|
+
s(Dn, "hashSet");
|
|
1343
|
+
var $n = Dn;
|
|
1266
1344
|
function k(r) {
|
|
1267
|
-
var
|
|
1268
|
-
for (this.clear(); ++
|
|
1269
|
-
var n = r[
|
|
1345
|
+
var e = -1, t = r == null ? 0 : r.length;
|
|
1346
|
+
for (this.clear(); ++e < t; ) {
|
|
1347
|
+
var n = r[e];
|
|
1270
1348
|
this.set(n[0], n[1]);
|
|
1271
1349
|
}
|
|
1272
1350
|
}
|
|
1273
|
-
|
|
1274
|
-
k.prototype.clear =
|
|
1275
|
-
k.prototype.delete =
|
|
1276
|
-
k.prototype.get =
|
|
1277
|
-
k.prototype.has =
|
|
1278
|
-
k.prototype.set =
|
|
1279
|
-
var
|
|
1280
|
-
function
|
|
1351
|
+
s(k, "Hash");
|
|
1352
|
+
k.prototype.clear = Sn;
|
|
1353
|
+
k.prototype.delete = An;
|
|
1354
|
+
k.prototype.get = Cn;
|
|
1355
|
+
k.prototype.has = jn;
|
|
1356
|
+
k.prototype.set = $n;
|
|
1357
|
+
var Be = k;
|
|
1358
|
+
function Fn() {
|
|
1281
1359
|
this.__data__ = [], this.size = 0;
|
|
1282
1360
|
}
|
|
1283
|
-
|
|
1284
|
-
var
|
|
1285
|
-
function
|
|
1286
|
-
for (var
|
|
1287
|
-
if (
|
|
1288
|
-
return
|
|
1361
|
+
s(Fn, "listCacheClear");
|
|
1362
|
+
var Mn = Fn;
|
|
1363
|
+
function Un(r, e) {
|
|
1364
|
+
for (var t = r.length; t--; )
|
|
1365
|
+
if (hn(r[t][0], e))
|
|
1366
|
+
return t;
|
|
1289
1367
|
return -1;
|
|
1290
1368
|
}
|
|
1291
|
-
|
|
1292
|
-
var
|
|
1293
|
-
function
|
|
1294
|
-
var
|
|
1295
|
-
if (
|
|
1369
|
+
s(Un, "assocIndexOf");
|
|
1370
|
+
var le = Un, Gn = Array.prototype, kn = Gn.splice;
|
|
1371
|
+
function Wn(r) {
|
|
1372
|
+
var e = this.__data__, t = le(e, r);
|
|
1373
|
+
if (t < 0)
|
|
1296
1374
|
return !1;
|
|
1297
|
-
var n =
|
|
1298
|
-
return
|
|
1375
|
+
var n = e.length - 1;
|
|
1376
|
+
return t == n ? e.pop() : kn.call(e, t, 1), --this.size, !0;
|
|
1299
1377
|
}
|
|
1300
|
-
|
|
1301
|
-
var
|
|
1302
|
-
function
|
|
1303
|
-
var
|
|
1304
|
-
return
|
|
1378
|
+
s(Wn, "listCacheDelete");
|
|
1379
|
+
var qn = Wn;
|
|
1380
|
+
function Bn(r) {
|
|
1381
|
+
var e = this.__data__, t = le(e, r);
|
|
1382
|
+
return t < 0 ? void 0 : e[t][1];
|
|
1305
1383
|
}
|
|
1306
|
-
|
|
1307
|
-
var
|
|
1308
|
-
function
|
|
1309
|
-
return
|
|
1384
|
+
s(Bn, "listCacheGet");
|
|
1385
|
+
var Hn = Bn;
|
|
1386
|
+
function Vn(r) {
|
|
1387
|
+
return le(this.__data__, r) > -1;
|
|
1310
1388
|
}
|
|
1311
|
-
|
|
1312
|
-
var
|
|
1313
|
-
function
|
|
1314
|
-
var
|
|
1315
|
-
return n < 0 ? (++this.size,
|
|
1389
|
+
s(Vn, "listCacheHas");
|
|
1390
|
+
var Jn = Vn;
|
|
1391
|
+
function zn(r, e) {
|
|
1392
|
+
var t = this.__data__, n = le(t, r);
|
|
1393
|
+
return n < 0 ? (++this.size, t.push([r, e])) : t[n][1] = e, this;
|
|
1316
1394
|
}
|
|
1317
|
-
|
|
1318
|
-
var
|
|
1319
|
-
function
|
|
1320
|
-
var
|
|
1321
|
-
for (this.clear(); ++
|
|
1322
|
-
var n = r[
|
|
1395
|
+
s(zn, "listCacheSet");
|
|
1396
|
+
var Yn = zn;
|
|
1397
|
+
function W(r) {
|
|
1398
|
+
var e = -1, t = r == null ? 0 : r.length;
|
|
1399
|
+
for (this.clear(); ++e < t; ) {
|
|
1400
|
+
var n = r[e];
|
|
1323
1401
|
this.set(n[0], n[1]);
|
|
1324
1402
|
}
|
|
1325
1403
|
}
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
var
|
|
1333
|
-
function
|
|
1404
|
+
s(W, "ListCache");
|
|
1405
|
+
W.prototype.clear = Mn;
|
|
1406
|
+
W.prototype.delete = qn;
|
|
1407
|
+
W.prototype.get = Hn;
|
|
1408
|
+
W.prototype.has = Jn;
|
|
1409
|
+
W.prototype.set = Yn;
|
|
1410
|
+
var Kn = W, Xn = ot(Te, "Map"), Qn = Xn;
|
|
1411
|
+
function Zn() {
|
|
1334
1412
|
this.size = 0, this.__data__ = {
|
|
1335
|
-
hash: new
|
|
1336
|
-
map: new (
|
|
1337
|
-
string: new
|
|
1413
|
+
hash: new Be(),
|
|
1414
|
+
map: new (Qn || Kn)(),
|
|
1415
|
+
string: new Be()
|
|
1338
1416
|
};
|
|
1339
1417
|
}
|
|
1340
|
-
|
|
1341
|
-
var
|
|
1342
|
-
function
|
|
1343
|
-
var
|
|
1344
|
-
return
|
|
1418
|
+
s(Zn, "mapCacheClear");
|
|
1419
|
+
var eo = Zn;
|
|
1420
|
+
function to(r) {
|
|
1421
|
+
var e = typeof r;
|
|
1422
|
+
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? r !== "__proto__" : r === null;
|
|
1345
1423
|
}
|
|
1346
|
-
|
|
1347
|
-
var
|
|
1348
|
-
function
|
|
1349
|
-
var
|
|
1350
|
-
return
|
|
1424
|
+
s(to, "isKeyable");
|
|
1425
|
+
var ro = to;
|
|
1426
|
+
function no(r, e) {
|
|
1427
|
+
var t = r.__data__;
|
|
1428
|
+
return ro(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map;
|
|
1351
1429
|
}
|
|
1352
|
-
|
|
1353
|
-
var
|
|
1354
|
-
function
|
|
1355
|
-
var
|
|
1356
|
-
return this.size -=
|
|
1430
|
+
s(no, "getMapData");
|
|
1431
|
+
var ue = no;
|
|
1432
|
+
function oo(r) {
|
|
1433
|
+
var e = ue(this, r).delete(r);
|
|
1434
|
+
return this.size -= e ? 1 : 0, e;
|
|
1357
1435
|
}
|
|
1358
|
-
|
|
1359
|
-
var
|
|
1360
|
-
function
|
|
1361
|
-
return
|
|
1436
|
+
s(oo, "mapCacheDelete");
|
|
1437
|
+
var so = oo;
|
|
1438
|
+
function io(r) {
|
|
1439
|
+
return ue(this, r).get(r);
|
|
1362
1440
|
}
|
|
1363
|
-
|
|
1364
|
-
var
|
|
1365
|
-
function
|
|
1366
|
-
return
|
|
1441
|
+
s(io, "mapCacheGet");
|
|
1442
|
+
var ao = io;
|
|
1443
|
+
function po(r) {
|
|
1444
|
+
return ue(this, r).has(r);
|
|
1367
1445
|
}
|
|
1368
|
-
|
|
1369
|
-
var
|
|
1370
|
-
function
|
|
1371
|
-
var
|
|
1372
|
-
return
|
|
1446
|
+
s(po, "mapCacheHas");
|
|
1447
|
+
var co = po;
|
|
1448
|
+
function lo(r, e) {
|
|
1449
|
+
var t = ue(this, r), n = t.size;
|
|
1450
|
+
return t.set(r, e), this.size += t.size == n ? 0 : 1, this;
|
|
1373
1451
|
}
|
|
1374
|
-
|
|
1375
|
-
var
|
|
1376
|
-
function
|
|
1377
|
-
var
|
|
1378
|
-
for (this.clear(); ++
|
|
1379
|
-
var n = r[
|
|
1452
|
+
s(lo, "mapCacheSet");
|
|
1453
|
+
var uo = lo;
|
|
1454
|
+
function q(r) {
|
|
1455
|
+
var e = -1, t = r == null ? 0 : r.length;
|
|
1456
|
+
for (this.clear(); ++e < t; ) {
|
|
1457
|
+
var n = r[e];
|
|
1380
1458
|
this.set(n[0], n[1]);
|
|
1381
1459
|
}
|
|
1382
1460
|
}
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
var
|
|
1390
|
-
function
|
|
1391
|
-
if (typeof r != "function" ||
|
|
1392
|
-
throw new TypeError(
|
|
1393
|
-
var
|
|
1394
|
-
var n = arguments, o =
|
|
1395
|
-
if (
|
|
1396
|
-
return
|
|
1397
|
-
var
|
|
1398
|
-
return
|
|
1461
|
+
s(q, "MapCache");
|
|
1462
|
+
q.prototype.clear = eo;
|
|
1463
|
+
q.prototype.delete = so;
|
|
1464
|
+
q.prototype.get = ao;
|
|
1465
|
+
q.prototype.has = co;
|
|
1466
|
+
q.prototype.set = uo;
|
|
1467
|
+
var st = q, fo = "Expected a function";
|
|
1468
|
+
function we(r, e) {
|
|
1469
|
+
if (typeof r != "function" || e != null && typeof e != "function")
|
|
1470
|
+
throw new TypeError(fo);
|
|
1471
|
+
var t = /* @__PURE__ */ s(function() {
|
|
1472
|
+
var n = arguments, o = e ? e.apply(this, n) : n[0], p = t.cache;
|
|
1473
|
+
if (p.has(o))
|
|
1474
|
+
return p.get(o);
|
|
1475
|
+
var a = r.apply(this, n);
|
|
1476
|
+
return t.cache = p.set(o, a) || p, a;
|
|
1399
1477
|
}, "memoized");
|
|
1400
|
-
return
|
|
1478
|
+
return t.cache = new (we.Cache || st)(), t;
|
|
1401
1479
|
}
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
var
|
|
1405
|
-
function
|
|
1406
|
-
var
|
|
1407
|
-
return
|
|
1408
|
-
}),
|
|
1409
|
-
return
|
|
1480
|
+
s(we, "memoize");
|
|
1481
|
+
we.Cache = st;
|
|
1482
|
+
var yo = we, ho = 500;
|
|
1483
|
+
function go(r) {
|
|
1484
|
+
var e = yo(r, function(n) {
|
|
1485
|
+
return t.size === ho && t.clear(), n;
|
|
1486
|
+
}), t = e.cache;
|
|
1487
|
+
return e;
|
|
1410
1488
|
}
|
|
1411
|
-
|
|
1412
|
-
var
|
|
1489
|
+
s(go, "memoizeCapped");
|
|
1490
|
+
var mo = go, vo = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Eo = /\\(\\)?/g, _o = mo(
|
|
1413
1491
|
function(r) {
|
|
1414
|
-
var
|
|
1415
|
-
return r.charCodeAt(0) === 46 &&
|
|
1416
|
-
|
|
1417
|
-
}),
|
|
1418
|
-
}),
|
|
1419
|
-
function
|
|
1420
|
-
return r == null ? "" :
|
|
1492
|
+
var e = [];
|
|
1493
|
+
return r.charCodeAt(0) === 46 && e.push(""), r.replace(vo, function(t, n, o, p) {
|
|
1494
|
+
e.push(o ? p.replace(Eo, "$1") : n || t);
|
|
1495
|
+
}), e;
|
|
1496
|
+
}), bo = _o;
|
|
1497
|
+
function So(r) {
|
|
1498
|
+
return r == null ? "" : Gr(r);
|
|
1421
1499
|
}
|
|
1422
|
-
|
|
1423
|
-
var
|
|
1424
|
-
function
|
|
1425
|
-
return
|
|
1500
|
+
s(So, "toString");
|
|
1501
|
+
var To = So;
|
|
1502
|
+
function Ao(r, e) {
|
|
1503
|
+
return xe(r) ? r : En(r, e) ? [r] : bo(To(r));
|
|
1426
1504
|
}
|
|
1427
|
-
|
|
1428
|
-
var
|
|
1429
|
-
function
|
|
1430
|
-
if (typeof r == "string" ||
|
|
1505
|
+
s(Ao, "castPath");
|
|
1506
|
+
var xo = Ao, wo = 1 / 0;
|
|
1507
|
+
function Po(r) {
|
|
1508
|
+
if (typeof r == "string" || Ae(r))
|
|
1431
1509
|
return r;
|
|
1432
|
-
var
|
|
1433
|
-
return
|
|
1510
|
+
var e = r + "";
|
|
1511
|
+
return e == "0" && 1 / r == -wo ? "-0" : e;
|
|
1434
1512
|
}
|
|
1435
|
-
|
|
1436
|
-
var
|
|
1437
|
-
function
|
|
1438
|
-
|
|
1439
|
-
for (var
|
|
1440
|
-
r = r[
|
|
1441
|
-
return
|
|
1513
|
+
s(Po, "toKey");
|
|
1514
|
+
var Oo = Po;
|
|
1515
|
+
function Co(r, e) {
|
|
1516
|
+
e = xo(e, r);
|
|
1517
|
+
for (var t = 0, n = e.length; r != null && t < n; )
|
|
1518
|
+
r = r[Oo(e[t++])];
|
|
1519
|
+
return t && t == n ? r : void 0;
|
|
1442
1520
|
}
|
|
1443
|
-
|
|
1444
|
-
var
|
|
1445
|
-
function
|
|
1446
|
-
var n = r == null ? void 0 :
|
|
1447
|
-
return n === void 0 ?
|
|
1521
|
+
s(Co, "baseGet");
|
|
1522
|
+
var No = Co;
|
|
1523
|
+
function Io(r, e, t) {
|
|
1524
|
+
var n = r == null ? void 0 : No(r, e);
|
|
1525
|
+
return n === void 0 ? t : n;
|
|
1448
1526
|
}
|
|
1449
|
-
|
|
1450
|
-
var
|
|
1451
|
-
let t = null, e = !1, n = !1, o = !1, s = "";
|
|
1452
|
-
if (r.indexOf("//") >= 0 || r.indexOf("/*") >= 0)
|
|
1453
|
-
for (let l = 0; l < r.length; l += 1)
|
|
1454
|
-
!t && !e && !n && !o ? r[l] === '"' || r[l] === "'" || r[l] === "`" ? t = r[l] : r[l] === "/" && r[l + 1] === "*" ? e = !0 : r[l] === "\
|
|
1455
|
-
/" && r[l + 1] === "/" ? n = !0 : r[l] === "/" && r[l + 1] !== "/" && (o = !0) : (t && (r[l] === t && r[l - 1] !== "\\" || r[l] === `
|
|
1456
|
-
` && t !== "`") && (t = null), o && (r[l] === "/" && r[l - 1] !== "\\" || r[l] === `
|
|
1457
|
-
`) && (o = !1), e && r[l - 1] === "/" && r[l - 2] === "*" && (e = !1), n && r[l] === `
|
|
1458
|
-
` && (n = !1)), !e && !n && (s += r[l]);
|
|
1459
|
-
else
|
|
1460
|
-
s = r;
|
|
1461
|
-
return s;
|
|
1462
|
-
}, "removeCodeComments"), to = (0, Bt.default)(1e4)(
|
|
1463
|
-
(r) => Zn(r).replace(/\n\s*/g, "").trim()
|
|
1464
|
-
), eo = /* @__PURE__ */ a(function(t, e) {
|
|
1465
|
-
let n = e.slice(0, e.indexOf("{")), o = e.slice(e.indexOf("{"));
|
|
1466
|
-
if (n.includes("=>") || n.includes("function"))
|
|
1467
|
-
return e;
|
|
1468
|
-
let s = n;
|
|
1469
|
-
return s = s.replace(t, "function"), s + o;
|
|
1470
|
-
}, "convertShorthandMethods2"), ro = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/, J = /* @__PURE__ */ a((r) => r.match(/^[\[\{\"\}].*[\]\}\"]$/),
|
|
1527
|
+
s(Io, "get");
|
|
1528
|
+
var Ro = Io, Pe = hr, jo = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/, X = /* @__PURE__ */ s((r) => r.match(/^[\[\{\"\}].*[\]\}\"]$/),
|
|
1471
1529
|
"isJSON");
|
|
1472
|
-
function
|
|
1473
|
-
if (!
|
|
1530
|
+
function it(r) {
|
|
1531
|
+
if (!Pe(r))
|
|
1474
1532
|
return r;
|
|
1475
|
-
let
|
|
1476
|
-
return typeof Event < "u" && r instanceof Event && (
|
|
1533
|
+
let e = r, t = !1;
|
|
1534
|
+
return typeof Event < "u" && r instanceof Event && (e = Ue(e), t = !0), e = Object.keys(e).reduce((n, o) => {
|
|
1477
1535
|
try {
|
|
1478
|
-
|
|
1536
|
+
e[o] && e[o].toJSON, n[o] = e[o];
|
|
1479
1537
|
} catch {
|
|
1480
|
-
|
|
1538
|
+
t = !0;
|
|
1481
1539
|
}
|
|
1482
1540
|
return n;
|
|
1483
|
-
}, {}),
|
|
1541
|
+
}, {}), t ? e : r;
|
|
1484
1542
|
}
|
|
1485
|
-
|
|
1486
|
-
var
|
|
1487
|
-
let
|
|
1488
|
-
return /* @__PURE__ */
|
|
1543
|
+
s(it, "convertUnconventionalData");
|
|
1544
|
+
var Lo = /* @__PURE__ */ s(function(e) {
|
|
1545
|
+
let t, n, o, p;
|
|
1546
|
+
return /* @__PURE__ */ s(function(c, i) {
|
|
1489
1547
|
try {
|
|
1490
1548
|
if (c === "")
|
|
1491
|
-
return
|
|
1492
|
-
let
|
|
1493
|
-
for (; o.length &&
|
|
1494
|
-
o.shift(),
|
|
1549
|
+
return p = [], t = /* @__PURE__ */ new Map([[i, "[]"]]), n = /* @__PURE__ */ new Map(), o = [], i;
|
|
1550
|
+
let u = n.get(this) || this;
|
|
1551
|
+
for (; o.length && u !== o[0]; )
|
|
1552
|
+
o.shift(), p.pop();
|
|
1495
1553
|
if (typeof i == "boolean")
|
|
1496
1554
|
return i;
|
|
1497
1555
|
if (i === void 0)
|
|
1498
|
-
return
|
|
1556
|
+
return e.allowUndefined ? "_undefined_" : void 0;
|
|
1499
1557
|
if (i === null)
|
|
1500
1558
|
return null;
|
|
1501
1559
|
if (typeof i == "number")
|
|
1502
|
-
return i ===
|
|
1560
|
+
return i === Number.NEGATIVE_INFINITY ? "_-Infinity_" : i === Number.POSITIVE_INFINITY ? "_Infinity_" : Number.isNaN(i) ? "_NaN_" : i;
|
|
1503
1561
|
if (typeof i == "bigint")
|
|
1504
1562
|
return `_bigint_${i.toString()}`;
|
|
1505
1563
|
if (typeof i == "string")
|
|
1506
|
-
return
|
|
1507
|
-
if ((0,
|
|
1508
|
-
return
|
|
1509
|
-
if ((0,
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
return y.match(
|
|
1514
|
-
/(\[native code\]|WEBPACK_IMPORTED_MODULE|__webpack_exports__|__webpack_require__)/
|
|
1515
|
-
) ? `_function_${u}|${(() => {
|
|
1516
|
-
}).toString()}` : `_function_${u}|${to(eo(c, y))}`;
|
|
1517
|
-
}
|
|
1518
|
-
if ((0, De.default)(i)) {
|
|
1519
|
-
if (!t.allowSymbol)
|
|
1564
|
+
return jo.test(i) ? e.allowDate ? `_date_${i}` : void 0 : i;
|
|
1565
|
+
if ((0, fr.default)(i))
|
|
1566
|
+
return e.allowRegExp ? `_regexp_${i.flags}|${i.source}` : void 0;
|
|
1567
|
+
if ((0, dr.default)(i))
|
|
1568
|
+
return;
|
|
1569
|
+
if ((0, yr.default)(i)) {
|
|
1570
|
+
if (!e.allowSymbol)
|
|
1520
1571
|
return;
|
|
1521
|
-
let
|
|
1522
|
-
return
|
|
1572
|
+
let f = Symbol.keyFor(i);
|
|
1573
|
+
return f !== void 0 ? `_gsymbol_${f}` : `_symbol_${i.toString().slice(7, -1)}`;
|
|
1523
1574
|
}
|
|
1524
|
-
if (o.length >=
|
|
1575
|
+
if (o.length >= e.maxDepth)
|
|
1525
1576
|
return Array.isArray(i) ? `[Array(${i.length})]` : "[Object]";
|
|
1526
1577
|
if (i === this)
|
|
1527
|
-
return `_duplicate_${JSON.stringify(
|
|
1528
|
-
if (i instanceof Error &&
|
|
1578
|
+
return `_duplicate_${JSON.stringify(p)}`;
|
|
1579
|
+
if (i instanceof Error && e.allowError)
|
|
1529
1580
|
return {
|
|
1530
1581
|
__isConvertedError__: !0,
|
|
1531
1582
|
errorProperties: {
|
|
1583
|
+
// @ts-expect-error cause is not defined in the current tsconfig target(es2020)
|
|
1532
1584
|
...i.cause ? { cause: i.cause } : {},
|
|
1533
1585
|
...i,
|
|
1534
1586
|
name: i.name,
|
|
@@ -1537,152 +1589,140 @@ var no = /* @__PURE__ */ a(function(t) {
|
|
|
1537
1589
|
"_constructor-name_": i.constructor.name
|
|
1538
1590
|
}
|
|
1539
1591
|
};
|
|
1540
|
-
if (i
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1592
|
+
if (i?.constructor?.name && i.constructor.name !== "Object" && !Array.isArray(i)) {
|
|
1593
|
+
let f = t.get(i);
|
|
1594
|
+
if (!f) {
|
|
1595
|
+
let h = {
|
|
1596
|
+
__isClassInstance__: !0,
|
|
1597
|
+
__className__: i.constructor.name,
|
|
1598
|
+
...Object.getOwnPropertyNames(i).reduce(
|
|
1599
|
+
(m, g) => {
|
|
1600
|
+
try {
|
|
1601
|
+
m[g] = i[g];
|
|
1602
|
+
} catch {
|
|
1603
|
+
}
|
|
1604
|
+
return m;
|
|
1605
|
+
},
|
|
1606
|
+
{}
|
|
1607
|
+
)
|
|
1608
|
+
};
|
|
1609
|
+
return p.push(c), o.unshift(h), t.set(i, JSON.stringify(p)), i !== h && n.set(i, h), h;
|
|
1610
|
+
}
|
|
1611
|
+
return `_duplicate_${f}`;
|
|
1551
1612
|
}
|
|
1552
|
-
|
|
1613
|
+
let y = t.get(i);
|
|
1614
|
+
if (!y) {
|
|
1615
|
+
let f = Array.isArray(i) ? i : it(i);
|
|
1616
|
+
return p.push(c), o.unshift(f), t.set(i, JSON.stringify(p)), i !== f && n.set(i, f), f;
|
|
1617
|
+
}
|
|
1618
|
+
return `_duplicate_${y}`;
|
|
1553
1619
|
} catch {
|
|
1554
1620
|
return;
|
|
1555
1621
|
}
|
|
1556
1622
|
}, "replace");
|
|
1557
|
-
}, "replacer2"),
|
|
1558
|
-
let
|
|
1559
|
-
return /* @__PURE__ */
|
|
1560
|
-
if (
|
|
1561
|
-
let
|
|
1562
|
-
|
|
1563
|
-
})),
|
|
1564
|
-
return
|
|
1565
|
-
if (
|
|
1566
|
-
let { message:
|
|
1567
|
-
return Object.assign(
|
|
1568
|
-
}
|
|
1569
|
-
if (it(value) && value["_constructor-name_"] && options.allowFunction) {
|
|
1570
|
-
let r = value["_constructor-name_"];
|
|
1571
|
-
if (r !== "Object") {
|
|
1572
|
-
let t = new Function(`return function ${r.replace(/[^a-zA-Z0-9$_]+/g, "")}(){}`)();
|
|
1573
|
-
Object.setPrototypeOf(value, new t());
|
|
1574
|
-
}
|
|
1575
|
-
return delete value["_constructor-name_"], value;
|
|
1576
|
-
}
|
|
1577
|
-
if (typeof value == "string" && value.startsWith("_function_") && options.allowFunction) {
|
|
1578
|
-
let [, name, source] = value.match(/_function_([^|]*)\|(.*)/) || [], sourceSanitized = source.replace(/[(\(\))|\\| |\]|`]*$/, "");
|
|
1579
|
-
if (!options.lazyEval)
|
|
1580
|
-
return eval(`(${sourceSanitized})`);
|
|
1581
|
-
let result = /* @__PURE__ */ a((...args) => {
|
|
1582
|
-
let f = eval(`(${sourceSanitized})`);
|
|
1583
|
-
return f(...args);
|
|
1584
|
-
}, "result");
|
|
1585
|
-
return Object.defineProperty(result, "toString", {
|
|
1586
|
-
value: /* @__PURE__ */ a(() => sourceSanitized, "value")
|
|
1587
|
-
}), Object.defineProperty(result, "name", {
|
|
1588
|
-
value: name
|
|
1589
|
-
}), result;
|
|
1623
|
+
}, "replacer2"), Do = /* @__PURE__ */ s(function(e) {
|
|
1624
|
+
let t = [], n;
|
|
1625
|
+
return /* @__PURE__ */ s(function(p, a) {
|
|
1626
|
+
if (p === "" && (n = a, t.forEach(({ target: c, container: i, replacement: u }) => {
|
|
1627
|
+
let y = X(u) ? JSON.parse(u) : u.split(".");
|
|
1628
|
+
y.length === 0 ? i[c] = n : i[c] = Ro(n, y);
|
|
1629
|
+
})), p === "_constructor-name_")
|
|
1630
|
+
return a;
|
|
1631
|
+
if (Pe(a) && a.__isConvertedError__) {
|
|
1632
|
+
let { message: c, ...i } = a.errorProperties, u = new Error(c);
|
|
1633
|
+
return Object.assign(u, i), u;
|
|
1590
1634
|
}
|
|
1591
|
-
if (typeof
|
|
1592
|
-
let [,
|
|
1593
|
-
return new RegExp(
|
|
1635
|
+
if (typeof a == "string" && a.startsWith("_regexp_") && e.allowRegExp) {
|
|
1636
|
+
let [, c, i] = a.match(/_regexp_([^|]*)\|(.*)/) || [];
|
|
1637
|
+
return new RegExp(i, c);
|
|
1594
1638
|
}
|
|
1595
|
-
return typeof
|
|
1596
|
-
"
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
value;
|
|
1639
|
+
return typeof a == "string" && a.startsWith("_date_") && e.allowDate ? new Date(a.replace("_date_", "")) : typeof a == "string" && a.startsWith(
|
|
1640
|
+
"_duplicate_") ? (t.push({ target: p, container: this, replacement: a.replace(/^_duplicate_/, "") }), null) : typeof a == "string" && a.
|
|
1641
|
+
startsWith("_symbol_") && e.allowSymbol ? Symbol(a.replace("_symbol_", "")) : typeof a == "string" && a.startsWith("_gsymbol_") && e.allowSymbol ?
|
|
1642
|
+
Symbol.for(a.replace("_gsymbol_", "")) : typeof a == "string" && a === "_-Infinity_" ? Number.NEGATIVE_INFINITY : typeof a == "string" &&
|
|
1643
|
+
a === "_Infinity_" ? Number.POSITIVE_INFINITY : typeof a == "string" && a === "_NaN_" ? Number.NaN : typeof a == "string" && a.startsWith(
|
|
1644
|
+
"_bigint_") && typeof BigInt == "function" ? BigInt(a.replace("_bigint_", "")) : a;
|
|
1602
1645
|
}, "revive");
|
|
1603
|
-
}, "
|
|
1646
|
+
}, "reviver2"), at = {
|
|
1604
1647
|
maxDepth: 10,
|
|
1605
1648
|
space: void 0,
|
|
1606
|
-
allowFunction: !0,
|
|
1607
1649
|
allowRegExp: !0,
|
|
1608
1650
|
allowDate: !0,
|
|
1609
|
-
allowClass: !0,
|
|
1610
1651
|
allowError: !0,
|
|
1611
1652
|
allowUndefined: !0,
|
|
1612
|
-
allowSymbol: !0
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
}, "stringify"), io = /* @__PURE__ */ a(() => {
|
|
1653
|
+
allowSymbol: !0
|
|
1654
|
+
}, fe = /* @__PURE__ */ s((r, e = {}) => {
|
|
1655
|
+
let t = { ...at, ...e };
|
|
1656
|
+
return JSON.stringify(it(r), Lo(t), e.space);
|
|
1657
|
+
}, "stringify"), $o = /* @__PURE__ */ s(() => {
|
|
1618
1658
|
let r = /* @__PURE__ */ new Map();
|
|
1619
|
-
return /* @__PURE__ */
|
|
1620
|
-
|
|
1621
|
-
o === "_undefined_" ?
|
|
1622
|
-
}), Array.isArray(
|
|
1623
|
-
n === "_undefined_" ? (r.set(n, !0),
|
|
1659
|
+
return /* @__PURE__ */ s(function e(t) {
|
|
1660
|
+
Pe(t) && Object.entries(t).forEach(([n, o]) => {
|
|
1661
|
+
o === "_undefined_" ? t[n] = void 0 : r.get(o) || (r.set(o, !0), e(o));
|
|
1662
|
+
}), Array.isArray(t) && t.forEach((n, o) => {
|
|
1663
|
+
n === "_undefined_" ? (r.set(n, !0), t[o] = void 0) : r.get(n) || (r.set(n, !0), e(n));
|
|
1624
1664
|
});
|
|
1625
1665
|
}, "mutateUndefined");
|
|
1626
|
-
}, "mutator"),
|
|
1627
|
-
let
|
|
1628
|
-
return
|
|
1666
|
+
}, "mutator"), de = /* @__PURE__ */ s((r, e = {}) => {
|
|
1667
|
+
let t = { ...at, ...e }, n = JSON.parse(r, Do(t));
|
|
1668
|
+
return $o()(n), n;
|
|
1629
1669
|
}, "parse");
|
|
1630
1670
|
|
|
1631
1671
|
// ../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
|
|
1632
|
-
var
|
|
1633
|
-
function
|
|
1672
|
+
var Fo = !1, Oe = "Invariant failed";
|
|
1673
|
+
function Q(r, e) {
|
|
1634
1674
|
if (!r) {
|
|
1635
|
-
if (
|
|
1636
|
-
throw new Error(
|
|
1637
|
-
var
|
|
1675
|
+
if (Fo)
|
|
1676
|
+
throw new Error(Oe);
|
|
1677
|
+
var t = typeof e == "function" ? e() : e, n = t ? "".concat(Oe, ": ").concat(t) : Oe;
|
|
1638
1678
|
throw new Error(n);
|
|
1639
1679
|
}
|
|
1640
1680
|
}
|
|
1641
|
-
|
|
1681
|
+
s(Q, "invariant");
|
|
1642
1682
|
|
|
1643
1683
|
// src/channels/postmessage/getEventSourceUrl.ts
|
|
1644
|
-
import { logger as
|
|
1645
|
-
var
|
|
1646
|
-
let
|
|
1684
|
+
import { logger as Mo } from "storybook/internal/client-logger";
|
|
1685
|
+
var pt = /* @__PURE__ */ s((r) => {
|
|
1686
|
+
let e = Array.from(
|
|
1647
1687
|
document.querySelectorAll("iframe[data-is-storybook]")
|
|
1648
|
-
), [
|
|
1688
|
+
), [t, ...n] = e.filter((p) => {
|
|
1649
1689
|
try {
|
|
1650
|
-
return
|
|
1690
|
+
return p.contentWindow?.location.origin === r.source.location.origin && p.contentWindow?.location.pathname === r.source.location.pathname;
|
|
1651
1691
|
} catch {
|
|
1652
1692
|
}
|
|
1653
1693
|
try {
|
|
1654
|
-
return
|
|
1694
|
+
return p.contentWindow === r.source;
|
|
1655
1695
|
} catch {
|
|
1656
1696
|
}
|
|
1657
|
-
let
|
|
1697
|
+
let a = p.getAttribute("src"), c;
|
|
1658
1698
|
try {
|
|
1659
|
-
if (!
|
|
1699
|
+
if (!a)
|
|
1660
1700
|
return !1;
|
|
1661
|
-
({ origin: c } = new URL(
|
|
1701
|
+
({ origin: c } = new URL(a, document.location.toString()));
|
|
1662
1702
|
} catch {
|
|
1663
1703
|
return !1;
|
|
1664
1704
|
}
|
|
1665
1705
|
return c === r.origin;
|
|
1666
|
-
}), o =
|
|
1706
|
+
}), o = t?.getAttribute("src");
|
|
1667
1707
|
if (o && n.length === 0) {
|
|
1668
|
-
let { protocol:
|
|
1669
|
-
return `${
|
|
1708
|
+
let { protocol: p, host: a, pathname: c } = new URL(o, document.location.toString());
|
|
1709
|
+
return `${p}//${a}${c}`;
|
|
1670
1710
|
}
|
|
1671
|
-
return n.length > 0 &&
|
|
1711
|
+
return n.length > 0 && Mo.error("found multiple candidates for event source"), null;
|
|
1672
1712
|
}, "getEventSourceUrl");
|
|
1673
1713
|
|
|
1674
1714
|
// src/channels/postmessage/index.ts
|
|
1675
|
-
var { document:
|
|
1676
|
-
constructor(
|
|
1677
|
-
this.config =
|
|
1715
|
+
var { document: Ce, location: Ne } = S, ut = "storybook-channel", Go = { maxDepth: 25 }, Ie = class Ie {
|
|
1716
|
+
constructor(e) {
|
|
1717
|
+
this.config = e;
|
|
1678
1718
|
this.connected = !1;
|
|
1679
|
-
if (this.buffer = [], typeof
|
|
1680
|
-
"manager" &&
|
|
1681
|
-
throw new Error(`postmsg-channel: "config.page" cannot be "${
|
|
1719
|
+
if (this.buffer = [], typeof S?.addEventListener == "function" && S.addEventListener("message", this.handleEvent.bind(this), !1), e.page !==
|
|
1720
|
+
"manager" && e.page !== "preview")
|
|
1721
|
+
throw new Error(`postmsg-channel: "config.page" cannot be "${e.page}"`);
|
|
1682
1722
|
}
|
|
1683
|
-
setHandler(
|
|
1684
|
-
this.handler = (...
|
|
1685
|
-
|
|
1723
|
+
setHandler(e) {
|
|
1724
|
+
this.handler = (...t) => {
|
|
1725
|
+
e.apply(this, t), !this.connected && this.getLocalFrame().length && (this.flush(), this.connected = !0);
|
|
1686
1726
|
};
|
|
1687
1727
|
}
|
|
1688
1728
|
/**
|
|
@@ -1691,133 +1731,127 @@ var { document: _t, location: Tt } = A, Xt = "storybook-channel", co = { allowFu
|
|
|
1691
1731
|
*
|
|
1692
1732
|
* @param event
|
|
1693
1733
|
*/
|
|
1694
|
-
send(
|
|
1734
|
+
send(e, t) {
|
|
1695
1735
|
let {
|
|
1696
1736
|
target: n,
|
|
1697
1737
|
// telejson options
|
|
1698
1738
|
allowRegExp: o,
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
allowUndefined: g,
|
|
1704
|
-
allowClass: p,
|
|
1739
|
+
allowSymbol: p,
|
|
1740
|
+
allowDate: a,
|
|
1741
|
+
allowError: c,
|
|
1742
|
+
allowUndefined: i,
|
|
1705
1743
|
maxDepth: u,
|
|
1706
|
-
space: y
|
|
1707
|
-
|
|
1708
|
-
} = e || {}, d = Object.fromEntries(
|
|
1744
|
+
space: y
|
|
1745
|
+
} = t || {}, f = Object.fromEntries(
|
|
1709
1746
|
Object.entries({
|
|
1710
1747
|
allowRegExp: o,
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
allowUndefined: g,
|
|
1716
|
-
allowClass: p,
|
|
1748
|
+
allowSymbol: p,
|
|
1749
|
+
allowDate: a,
|
|
1750
|
+
allowError: c,
|
|
1751
|
+
allowUndefined: i,
|
|
1717
1752
|
maxDepth: u,
|
|
1718
|
-
space: y
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
...
|
|
1723
|
-
...
|
|
1724
|
-
|
|
1725
|
-
}, E = this.getFrames(n), I = new URLSearchParams(Tt?.search || ""), _ = lt(
|
|
1753
|
+
space: y
|
|
1754
|
+
}).filter(([P, x]) => typeof x < "u")
|
|
1755
|
+
), h = {
|
|
1756
|
+
...Go,
|
|
1757
|
+
...S.CHANNEL_OPTIONS || {},
|
|
1758
|
+
...f
|
|
1759
|
+
}, m = this.getFrames(n), g = new URLSearchParams(Ne?.search || ""), N = fe(
|
|
1726
1760
|
{
|
|
1727
|
-
key:
|
|
1728
|
-
event:
|
|
1729
|
-
refId:
|
|
1761
|
+
key: ut,
|
|
1762
|
+
event: e,
|
|
1763
|
+
refId: g.get("refId")
|
|
1730
1764
|
},
|
|
1731
|
-
|
|
1765
|
+
h
|
|
1732
1766
|
);
|
|
1733
|
-
return
|
|
1767
|
+
return m.length ? (this.buffer.length && this.flush(), m.forEach((P) => {
|
|
1734
1768
|
try {
|
|
1735
|
-
|
|
1769
|
+
P.postMessage(N, "*");
|
|
1736
1770
|
} catch {
|
|
1737
|
-
|
|
1771
|
+
ct.error("sending over postmessage fail");
|
|
1738
1772
|
}
|
|
1739
|
-
}), Promise.resolve(null)) : new Promise((
|
|
1740
|
-
this.buffer.push({ event:
|
|
1773
|
+
}), Promise.resolve(null)) : new Promise((P, x) => {
|
|
1774
|
+
this.buffer.push({ event: e, resolve: P, reject: x });
|
|
1741
1775
|
});
|
|
1742
1776
|
}
|
|
1743
1777
|
flush() {
|
|
1744
|
-
let { buffer:
|
|
1745
|
-
this.buffer = [],
|
|
1746
|
-
this.send(
|
|
1778
|
+
let { buffer: e } = this;
|
|
1779
|
+
this.buffer = [], e.forEach((t) => {
|
|
1780
|
+
this.send(t.event).then(t.resolve).catch(t.reject);
|
|
1747
1781
|
});
|
|
1748
1782
|
}
|
|
1749
|
-
getFrames(
|
|
1783
|
+
getFrames(e) {
|
|
1750
1784
|
if (this.config.page === "manager") {
|
|
1751
1785
|
let n = Array.from(
|
|
1752
|
-
|
|
1786
|
+
Ce.querySelectorAll("iframe[data-is-storybook][data-is-loaded]")
|
|
1753
1787
|
).flatMap((o) => {
|
|
1754
1788
|
try {
|
|
1755
|
-
return o.contentWindow && o.dataset.isStorybook !== void 0 && o.id ===
|
|
1789
|
+
return o.contentWindow && o.dataset.isStorybook !== void 0 && o.id === e ? [o.contentWindow] : [];
|
|
1756
1790
|
} catch {
|
|
1757
1791
|
return [];
|
|
1758
1792
|
}
|
|
1759
1793
|
});
|
|
1760
1794
|
return n?.length ? n : this.getCurrentFrames();
|
|
1761
1795
|
}
|
|
1762
|
-
return
|
|
1796
|
+
return S && S.parent && S.parent !== S.self ? [S.parent] : [];
|
|
1763
1797
|
}
|
|
1764
1798
|
getCurrentFrames() {
|
|
1765
1799
|
return this.config.page === "manager" ? Array.from(
|
|
1766
|
-
|
|
1767
|
-
).flatMap((
|
|
1800
|
+
Ce.querySelectorAll('[data-is-storybook="true"]')
|
|
1801
|
+
).flatMap((t) => t.contentWindow ? [t.contentWindow] : []) : S && S.parent ? [S.parent] : [];
|
|
1768
1802
|
}
|
|
1769
1803
|
getLocalFrame() {
|
|
1770
1804
|
return this.config.page === "manager" ? Array.from(
|
|
1771
|
-
|
|
1772
|
-
).flatMap((
|
|
1805
|
+
Ce.querySelectorAll("#storybook-preview-iframe")
|
|
1806
|
+
).flatMap((t) => t.contentWindow ? [t.contentWindow] : []) : S && S.parent ? [S.parent] : [];
|
|
1773
1807
|
}
|
|
1774
|
-
handleEvent(
|
|
1808
|
+
handleEvent(e) {
|
|
1775
1809
|
try {
|
|
1776
|
-
let { data:
|
|
1777
|
-
if (n ===
|
|
1778
|
-
let
|
|
1779
|
-
1EA7FD; background: black"> preview </span>', c = Object.values(
|
|
1810
|
+
let { data: t } = e, { key: n, event: o, refId: p } = typeof t == "string" && X(t) ? de(t, S.CHANNEL_OPTIONS || {}) : t;
|
|
1811
|
+
if (n === ut) {
|
|
1812
|
+
let a = this.config.page === "manager" ? '<span style="color: #37D5D3; background: black"> manager </span>' : '<span style="color: #\
|
|
1813
|
+
1EA7FD; background: black"> preview </span>', c = Object.values(Uo).includes(o.type) ? `<span style="color: #FF4785">${o.type}</span>` : `<s\
|
|
1780
1814
|
pan style="color: #FFAE00">${o.type}</span>`;
|
|
1781
|
-
if (
|
|
1782
|
-
|
|
1783
|
-
`${
|
|
1815
|
+
if (p && (o.refId = p), o.source = this.config.page === "preview" ? e.origin : pt(e), !o.source) {
|
|
1816
|
+
lt.error(
|
|
1817
|
+
`${a} received ${c} but was unable to determine the source of the event`
|
|
1784
1818
|
);
|
|
1785
1819
|
return;
|
|
1786
1820
|
}
|
|
1787
|
-
let i = `${
|
|
1788
|
-
|
|
1789
|
-
|
|
1821
|
+
let i = `${a} received ${c} (${t.length})`;
|
|
1822
|
+
lt.debug(
|
|
1823
|
+
Ne.origin !== o.source ? i : `${i} <span style="color: gray">(on ${Ne.origin} from ${o.source})</span>`,
|
|
1790
1824
|
...o.args
|
|
1791
|
-
),
|
|
1825
|
+
), Q(this.handler, "ChannelHandler should be set"), this.handler(o);
|
|
1792
1826
|
}
|
|
1793
|
-
} catch (
|
|
1794
|
-
|
|
1827
|
+
} catch (t) {
|
|
1828
|
+
ct.error(t);
|
|
1795
1829
|
}
|
|
1796
1830
|
}
|
|
1797
1831
|
};
|
|
1798
|
-
|
|
1799
|
-
var
|
|
1832
|
+
s(Ie, "PostMessageTransport");
|
|
1833
|
+
var Z = Ie;
|
|
1800
1834
|
|
|
1801
1835
|
// src/channels/websocket/index.ts
|
|
1802
|
-
import * as
|
|
1803
|
-
import { global as
|
|
1804
|
-
var { WebSocket:
|
|
1805
|
-
constructor({ url:
|
|
1836
|
+
import * as ft from "storybook/internal/core-events";
|
|
1837
|
+
import { global as dt } from "@storybook/global";
|
|
1838
|
+
var { WebSocket: ko } = dt, yt = 15e3, ht = 5e3, Re = class Re {
|
|
1839
|
+
constructor({ url: e, onError: t, page: n }) {
|
|
1806
1840
|
this.buffer = [];
|
|
1807
1841
|
this.isReady = !1;
|
|
1808
1842
|
this.isClosed = !1;
|
|
1809
1843
|
this.pingTimeout = 0;
|
|
1810
|
-
this.socket = new
|
|
1844
|
+
this.socket = new ko(e), this.socket.onopen = () => {
|
|
1811
1845
|
this.isReady = !0, this.heartbeat(), this.flush();
|
|
1812
1846
|
}, this.socket.onmessage = ({ data: o }) => {
|
|
1813
|
-
let
|
|
1814
|
-
|
|
1847
|
+
let p = typeof o == "string" && X(o) ? de(o) : o;
|
|
1848
|
+
Q(this.handler, "WebsocketTransport handler should be set"), this.handler(p), p.type === "ping" && (this.heartbeat(), this.send({ type: "\
|
|
1815
1849
|
pong" }));
|
|
1816
1850
|
}, this.socket.onerror = (o) => {
|
|
1817
|
-
|
|
1851
|
+
t && t(o);
|
|
1818
1852
|
}, this.socket.onclose = (o) => {
|
|
1819
|
-
|
|
1820
|
-
type:
|
|
1853
|
+
Q(this.handler, "WebsocketTransport handler should be set"), this.handler({
|
|
1854
|
+
type: ft.CHANNEL_WS_DISCONNECT,
|
|
1821
1855
|
args: [{ reason: o.reason, code: o.code }],
|
|
1822
1856
|
from: n || "preview"
|
|
1823
1857
|
}), this.isClosed = !0, clearTimeout(this.pingTimeout);
|
|
@@ -1826,56 +1860,55 @@ pong" }));
|
|
|
1826
1860
|
heartbeat() {
|
|
1827
1861
|
clearTimeout(this.pingTimeout), this.pingTimeout = setTimeout(() => {
|
|
1828
1862
|
this.socket.close(3008, "timeout");
|
|
1829
|
-
},
|
|
1863
|
+
}, yt + ht);
|
|
1830
1864
|
}
|
|
1831
|
-
setHandler(
|
|
1832
|
-
this.handler =
|
|
1865
|
+
setHandler(e) {
|
|
1866
|
+
this.handler = e;
|
|
1833
1867
|
}
|
|
1834
|
-
send(
|
|
1835
|
-
this.isClosed || (this.isReady ? this.sendNow(
|
|
1868
|
+
send(e) {
|
|
1869
|
+
this.isClosed || (this.isReady ? this.sendNow(e) : this.sendLater(e));
|
|
1836
1870
|
}
|
|
1837
|
-
sendLater(
|
|
1838
|
-
this.buffer.push(
|
|
1871
|
+
sendLater(e) {
|
|
1872
|
+
this.buffer.push(e);
|
|
1839
1873
|
}
|
|
1840
|
-
sendNow(
|
|
1841
|
-
let
|
|
1874
|
+
sendNow(e) {
|
|
1875
|
+
let t = fe(e, {
|
|
1842
1876
|
maxDepth: 15,
|
|
1843
|
-
|
|
1844
|
-
...Zt.CHANNEL_OPTIONS
|
|
1877
|
+
...dt.CHANNEL_OPTIONS
|
|
1845
1878
|
});
|
|
1846
|
-
this.socket.send(
|
|
1879
|
+
this.socket.send(t);
|
|
1847
1880
|
}
|
|
1848
1881
|
flush() {
|
|
1849
|
-
let { buffer:
|
|
1850
|
-
this.buffer = [],
|
|
1882
|
+
let { buffer: e } = this;
|
|
1883
|
+
this.buffer = [], e.forEach((t) => this.send(t));
|
|
1851
1884
|
}
|
|
1852
1885
|
};
|
|
1853
|
-
|
|
1854
|
-
var
|
|
1886
|
+
s(Re, "WebsocketTransport");
|
|
1887
|
+
var ee = Re;
|
|
1855
1888
|
|
|
1856
1889
|
// src/channels/index.ts
|
|
1857
|
-
var { CONFIG_TYPE:
|
|
1858
|
-
function
|
|
1859
|
-
let
|
|
1860
|
-
if (
|
|
1861
|
-
let o = window.location.protocol === "http:" ? "ws" : "wss", { hostname:
|
|
1890
|
+
var { CONFIG_TYPE: qo } = Wo, Ps = z;
|
|
1891
|
+
function Os({ page: r, extraTransports: e = [] }) {
|
|
1892
|
+
let t = [new Z({ page: r }), ...e];
|
|
1893
|
+
if (qo === "DEVELOPMENT") {
|
|
1894
|
+
let o = window.location.protocol === "http:" ? "ws" : "wss", { hostname: p, port: a } = window.location, c = `${o}://${p}:${a}/storybook\
|
|
1862
1895
|
-server-channel`;
|
|
1863
|
-
|
|
1896
|
+
t.push(new ee({ url: c, onError: /* @__PURE__ */ s(() => {
|
|
1864
1897
|
}, "onError"), page: r }));
|
|
1865
1898
|
}
|
|
1866
|
-
let n = new
|
|
1867
|
-
return
|
|
1899
|
+
let n = new z({ transports: t });
|
|
1900
|
+
return U.__prepare(
|
|
1868
1901
|
n,
|
|
1869
|
-
r === "manager" ?
|
|
1902
|
+
r === "manager" ? U.Environment.MANAGER : U.Environment.PREVIEW
|
|
1870
1903
|
), n;
|
|
1871
1904
|
}
|
|
1872
|
-
|
|
1905
|
+
s(Os, "createBrowserChannel");
|
|
1873
1906
|
export {
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1907
|
+
z as Channel,
|
|
1908
|
+
yt as HEARTBEAT_INTERVAL,
|
|
1909
|
+
ht as HEARTBEAT_MAX_LATENCY,
|
|
1910
|
+
Z as PostMessageTransport,
|
|
1911
|
+
ee as WebsocketTransport,
|
|
1912
|
+
Os as createBrowserChannel,
|
|
1913
|
+
Ps as default
|
|
1881
1914
|
};
|