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