storybook 10.1.0-alpha.10 → 10.1.0-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_browser-chunks/Color-FTG7SQDA.js +1097 -0
- package/dist/_browser-chunks/WithTooltip-LMROHDUP.js +1651 -0
- package/dist/_browser-chunks/chunk-2FRVAXCZ.js +7 -0
- package/dist/_browser-chunks/chunk-3IAH5M2U.js +171 -0
- package/dist/_browser-chunks/chunk-3OXGAGBE.js +779 -0
- package/dist/_browser-chunks/{chunk-TMDZCWME.js → chunk-3PJE6VLG.js} +1 -3
- package/dist/_browser-chunks/{chunk-VAMFPZY3.js → chunk-45UGUKRX.js} +2 -7
- package/dist/_browser-chunks/chunk-6XWLIJQL.js +11 -0
- package/dist/_browser-chunks/{chunk-FDWKXLBI.js → chunk-74YHFU5B.js} +44 -109
- package/dist/_browser-chunks/{chunk-MM7DTO55.js → chunk-A242L54C.js} +10 -16
- package/dist/_browser-chunks/chunk-AIOS4NGK.js +252 -0
- package/dist/_browser-chunks/chunk-AS2HQEYC.js +14 -0
- package/dist/_browser-chunks/chunk-AXG2BOBL.js +836 -0
- package/dist/_browser-chunks/chunk-BE2DAXKJ.js +2966 -0
- package/dist/_browser-chunks/{chunk-MH6AXFXB.js → chunk-CHUV5WSW.js} +0 -5
- package/dist/_browser-chunks/chunk-EBHB6RPS.js +61 -0
- package/dist/_browser-chunks/chunk-EUVGDK4H.js +93 -0
- package/dist/_browser-chunks/chunk-EZSQOHRI.js +18 -0
- package/dist/_browser-chunks/{chunk-CADGRH3P.js → chunk-FNXWN6IK.js} +3 -8
- package/dist/_browser-chunks/chunk-GFLS4VP3.js +64 -0
- package/dist/_browser-chunks/{chunk-L2D73C6Z.js → chunk-H6XK3RSC.js} +13 -21
- package/dist/_browser-chunks/chunk-IPA5A322.js +71 -0
- package/dist/_browser-chunks/chunk-JP7NCOJX.js +37 -0
- package/dist/_browser-chunks/chunk-KJHJLCBK.js +11 -0
- package/dist/_browser-chunks/{chunk-QMY4G4R2.js → chunk-L4RMQ7D7.js} +17 -64
- package/dist/_browser-chunks/{chunk-AB7OOPUX.js → chunk-QKODTO7K.js} +0 -5
- package/dist/_browser-chunks/chunk-RP5RXKFU.js +2491 -0
- package/dist/_browser-chunks/chunk-SL75JR6Y.js +9 -0
- package/dist/_browser-chunks/chunk-UD6FQLAF.js +1481 -0
- package/dist/_browser-chunks/chunk-VYJQ7RU5.js +2853 -0
- package/dist/_browser-chunks/chunk-WJYERY3R.js +136 -0
- package/dist/_browser-chunks/chunk-WXP2XJ3O.js +950 -0
- package/dist/_browser-chunks/chunk-X3DUQ5RA.js +47 -0
- package/dist/_browser-chunks/chunk-XJNX76GA.js +85 -0
- package/dist/_browser-chunks/{chunk-F4Q6SGTB.js → chunk-YKE5S47A.js} +177 -399
- package/dist/_browser-chunks/{chunk-SN4J4IQ3.js → chunk-ZUWEVLDX.js} +1 -7
- package/dist/_browser-chunks/{formatter-OMEEQ6HG.js → formatter-QJ4M4OGQ.js} +4 -9
- package/dist/_browser-chunks/{syntaxhighlighter-RJZASWHL.js → syntaxhighlighter-WKBQ5RC7.js} +704 -1848
- package/dist/_node-chunks/{builder-manager-HA7CYFCK.js → builder-manager-YUOHSIUB.js} +475 -1013
- package/dist/_node-chunks/camelcase-JREIL7NV.js +18 -0
- package/dist/_node-chunks/{chunk-RMHAL25C.js → chunk-2D2IODUU.js} +88 -228
- package/dist/_node-chunks/chunk-2DMESZFJ.js +943 -0
- package/dist/_node-chunks/chunk-4FT2DHGE.js +3009 -0
- package/dist/_node-chunks/chunk-5HV3B5OP.js +45571 -0
- package/dist/_node-chunks/{chunk-OVXB5GGT.js → chunk-5KLIDWFN.js} +292 -688
- package/dist/_node-chunks/chunk-A4APXFQ2.js +759 -0
- package/dist/_node-chunks/chunk-B6JWY6PC.js +37 -0
- package/dist/_node-chunks/chunk-CZ5GHJCC.js +603 -0
- package/dist/_node-chunks/chunk-DUXPWBOK.js +61 -0
- package/dist/_node-chunks/chunk-DWXTZT3D.js +58 -0
- package/dist/_node-chunks/chunk-E5FJS66Z.js +20 -0
- package/dist/_node-chunks/chunk-EZWWR7AR.js +936 -0
- package/dist/_node-chunks/chunk-FDXFVHIL.js +1114 -0
- package/dist/_node-chunks/{chunk-F3XOPI6H.js → chunk-FZLRAH4N.js} +469 -983
- package/dist/_node-chunks/chunk-HZG65SU3.js +34 -0
- package/dist/_node-chunks/chunk-IXVYNBMD.js +18 -0
- package/dist/_node-chunks/chunk-JARUEMEP.js +4523 -0
- package/dist/_node-chunks/chunk-LIH7MTP7.js +3214 -0
- package/dist/_node-chunks/chunk-N5GIRUP5.js +1047 -0
- package/dist/_node-chunks/{chunk-X4XU27M6.js → chunk-NAOYEL54.js} +15 -24
- package/dist/_node-chunks/chunk-O5DA7YLO.js +3171 -0
- package/dist/_node-chunks/chunk-OP3INKUD.js +54 -0
- package/dist/_node-chunks/chunk-QCO2ZM7F.js +209 -0
- package/dist/_node-chunks/chunk-QYQIZBS6.js +26 -0
- package/dist/_node-chunks/chunk-SEMIAAWG.js +1564 -0
- package/dist/_node-chunks/chunk-TS2UUH2J.js +301 -0
- package/dist/_node-chunks/chunk-WA6KZQZ2.js +119 -0
- package/dist/_node-chunks/{chunk-ZHSCUGNP.js → chunk-WFLWJO24.js} +3799 -7849
- package/dist/_node-chunks/chunk-WUXQMQCB.js +72 -0
- package/dist/_node-chunks/{chunk-VPR5IBMG.js → chunk-XXPJ7XR3.js} +8 -10
- package/dist/_node-chunks/chunk-Y4E6IGQF.js +61 -0
- package/dist/_node-chunks/chunk-ZL3AFKRX.js +1029 -0
- package/dist/_node-chunks/chunk-ZXSD6L3S.js +756 -0
- package/dist/_node-chunks/dist-DS2B5A3J.js +121 -0
- package/dist/_node-chunks/globby-6THB7HVX.js +3452 -0
- package/dist/_node-chunks/lib-5NKX4YGG.js +366 -0
- package/dist/_node-chunks/mdx-N42X6CFJ-ZLT3QOFF.js +14329 -0
- package/dist/_node-chunks/p-limit-PDMWNG7W.js +116 -0
- package/dist/_node-chunks/plugin-6XMWOGPO.js +123 -0
- package/dist/_node-chunks/{plugin-6ZPCS4LI.js → plugin-LTOXVT6A.js} +36 -56
- package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-2SFE5LQS.js +46582 -0
- package/dist/_node-chunks/webpack-mock-plugin-CX5J2U56.js +92 -0
- package/dist/actions/decorator.js +21 -42
- package/dist/actions/index.js +3 -3
- package/dist/babel/index.d.ts +671 -335
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +592 -1546
- package/dist/bin/dispatcher.js +26 -37
- package/dist/bin/loader.js +23 -34
- package/dist/channels/index.js +98 -234
- package/dist/cli/index.js +1951 -5308
- package/dist/client-logger/index.js +31 -61
- package/dist/common/index.js +20 -20
- package/dist/components/index.js +4211 -8586
- package/dist/core-events/index.js +2 -66
- package/dist/core-server/index.js +3054 -7290
- package/dist/core-server/presets/common-manager.css +2 -2
- package/dist/core-server/presets/common-manager.js +1806 -3427
- package/dist/core-server/presets/common-override-preset.js +31 -60
- package/dist/core-server/presets/common-preset.js +434 -924
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +15 -19
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +12 -17
- package/dist/csf/index.js +534 -1179
- package/dist/csf-tools/index.js +9 -9
- package/dist/docs-tools/index.js +6 -6
- package/dist/highlight/index.js +2 -2
- package/dist/instrumenter/index.js +199 -415
- package/dist/manager/globals-runtime.js +24150 -47364
- package/dist/manager/globals.js +2 -3
- package/dist/manager/runtime.js +3961 -8373
- package/dist/manager-api/index.js +1231 -2425
- package/dist/manager-errors.d.ts +3 -0
- package/dist/manager-errors.js +3 -3
- package/dist/node-logger/index.js +1253 -2601
- package/dist/preview/globals.js +2 -3
- package/dist/preview/runtime.js +10364 -21990
- package/dist/preview-api/index.d.ts +67 -68
- package/dist/preview-api/index.js +13 -13
- package/dist/preview-errors.d.ts +3 -0
- package/dist/preview-errors.js +4 -4
- package/dist/router/index.js +347 -899
- package/dist/server-errors.d.ts +3 -0
- package/dist/server-errors.js +10 -10
- package/dist/telemetry/index.js +24 -24
- package/dist/test/index.js +5860 -11645
- package/dist/theming/create.js +4 -4
- package/dist/theming/index.d.ts +3363 -2597
- package/dist/theming/index.js +490 -1086
- package/dist/types/index.js +2 -11
- package/dist/viewport/index.js +3 -3
- package/package.json +5 -5
- package/dist/_browser-chunks/Color-FQNEU7YS.js +0 -1695
- package/dist/_browser-chunks/WithTooltip-6NHN2GXF.js +0 -2343
- package/dist/_browser-chunks/chunk-6A7OIVEL.js +0 -66
- package/dist/_browser-chunks/chunk-AW46NMGV.js +0 -1308
- package/dist/_browser-chunks/chunk-B4A3ADP3.js +0 -3816
- package/dist/_browser-chunks/chunk-FSBVR7H5.js +0 -106
- package/dist/_browser-chunks/chunk-FUOHXXZT.js +0 -23
- package/dist/_browser-chunks/chunk-GTKOCWCT.js +0 -17
- package/dist/_browser-chunks/chunk-HHW4FUMO.js +0 -12
- package/dist/_browser-chunks/chunk-JVSKG4YS.js +0 -4052
- package/dist/_browser-chunks/chunk-LASUB7TL.js +0 -76
- package/dist/_browser-chunks/chunk-LYCSRYYR.js +0 -101
- package/dist/_browser-chunks/chunk-NVV6MIOE.js +0 -243
- package/dist/_browser-chunks/chunk-OBXWFEPB.js +0 -852
- package/dist/_browser-chunks/chunk-OPCDBBL3.js +0 -48
- package/dist/_browser-chunks/chunk-PB6FZ3WE.js +0 -130
- package/dist/_browser-chunks/chunk-RW5PKMWM.js +0 -4182
- package/dist/_browser-chunks/chunk-SYS437NN.js +0 -122
- package/dist/_browser-chunks/chunk-U46RQHA4.js +0 -12
- package/dist/_browser-chunks/chunk-UTNZYD2N.js +0 -311
- package/dist/_browser-chunks/chunk-VUAFL5XK.js +0 -20
- package/dist/_browser-chunks/chunk-XDGMHOV7.js +0 -2197
- package/dist/_browser-chunks/chunk-XW6KSYKF.js +0 -16
- package/dist/_browser-chunks/chunk-Y3M7TW6K.js +0 -1041
- package/dist/_browser-chunks/chunk-ZNRFDIVA.js +0 -233
- package/dist/_node-chunks/camelcase-QALD4XFE.js +0 -18
- package/dist/_node-chunks/chunk-2XY53ALL.js +0 -420
- package/dist/_node-chunks/chunk-3CBQMG2A.js +0 -6712
- package/dist/_node-chunks/chunk-3WDAPZYQ.js +0 -28
- package/dist/_node-chunks/chunk-4ZB555EJ.js +0 -697
- package/dist/_node-chunks/chunk-52DXKXY3.js +0 -4272
- package/dist/_node-chunks/chunk-5OVB4A6F.js +0 -69
- package/dist/_node-chunks/chunk-AGHGNXGH.js +0 -18
- package/dist/_node-chunks/chunk-B23X5ZCK.js +0 -1531
- package/dist/_node-chunks/chunk-B2DAHWJK.js +0 -220
- package/dist/_node-chunks/chunk-CC4PW5MJ.js +0 -34
- package/dist/_node-chunks/chunk-D7NIZELR.js +0 -2256
- package/dist/_node-chunks/chunk-DO5Q3H4L.js +0 -1250
- package/dist/_node-chunks/chunk-ECK7WVFX.js +0 -304
- package/dist/_node-chunks/chunk-EUH3NHXA.js +0 -79
- package/dist/_node-chunks/chunk-FOQHPHCV.js +0 -1657
- package/dist/_node-chunks/chunk-G6EL47NS.js +0 -111
- package/dist/_node-chunks/chunk-GFLS4TJB.js +0 -90
- package/dist/_node-chunks/chunk-J3XZKWHE.js +0 -1586
- package/dist/_node-chunks/chunk-LE63EHJ5.js +0 -1518
- package/dist/_node-chunks/chunk-M47XA42S.js +0 -4741
- package/dist/_node-chunks/chunk-OOI74AL3.js +0 -61
- package/dist/_node-chunks/chunk-PRJHT3GJ.js +0 -61
- package/dist/_node-chunks/chunk-Q52PVUSU.js +0 -101
- package/dist/_node-chunks/chunk-SDCF5RNN.js +0 -1198
- package/dist/_node-chunks/chunk-UJ5SJ23M.js +0 -5029
- package/dist/_node-chunks/chunk-UPHK4ETU.js +0 -64658
- package/dist/_node-chunks/chunk-V7VURIPB.js +0 -1544
- package/dist/_node-chunks/dist-6TXHNR5C.js +0 -175
- package/dist/_node-chunks/globby-PBTV6PX6.js +0 -5222
- package/dist/_node-chunks/lib-4RTDZVGX.js +0 -518
- package/dist/_node-chunks/mdx-N42X6CFJ-COWEH7KR.js +0 -22017
- package/dist/_node-chunks/p-limit-PBVZQOFY.js +0 -168
- package/dist/_node-chunks/plugin-EOZKYZAG.js +0 -159
- package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-35HMSMR5.js +0 -69102
- package/dist/_node-chunks/webpack-mock-plugin-GT3MA5E2.js +0 -124
|
@@ -1,2197 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
dedent
|
|
3
|
-
} from "./chunk-OPCDBBL3.js";
|
|
4
|
-
import {
|
|
5
|
-
__name
|
|
6
|
-
} from "./chunk-MM7DTO55.js";
|
|
7
|
-
|
|
8
|
-
// src/shared/universal-store/instances.ts
|
|
9
|
-
var instances = /* @__PURE__ */ new Map();
|
|
10
|
-
|
|
11
|
-
// src/shared/universal-store/index.ts
|
|
12
|
-
var CHANNEL_EVENT_PREFIX = "UNIVERSAL_STORE:";
|
|
13
|
-
var ProgressState = {
|
|
14
|
-
PENDING: "PENDING",
|
|
15
|
-
RESOLVED: "RESOLVED",
|
|
16
|
-
REJECTED: "REJECTED"
|
|
17
|
-
};
|
|
18
|
-
var _UniversalStore = class _UniversalStore {
|
|
19
|
-
constructor(options, environmentOverrides) {
|
|
20
|
-
/** Enable debug logs for this store */
|
|
21
|
-
this.debugging = false;
|
|
22
|
-
// TODO: narrow type of listeners based on event type
|
|
23
|
-
this.listeners = /* @__PURE__ */ new Map([["*", /* @__PURE__ */ new Set()]]);
|
|
24
|
-
/** Gets the current state */
|
|
25
|
-
this.getState = /* @__PURE__ */ __name(() => {
|
|
26
|
-
this.debug("getState", { state: this.state });
|
|
27
|
-
return this.state;
|
|
28
|
-
}, "getState");
|
|
29
|
-
/**
|
|
30
|
-
* Subscribes to store events
|
|
31
|
-
*
|
|
32
|
-
* @returns A function to unsubscribe
|
|
33
|
-
*/
|
|
34
|
-
this.subscribe = /* @__PURE__ */ __name((eventTypeOrListener, maybeListener) => {
|
|
35
|
-
const subscribesToAllEvents = typeof eventTypeOrListener === "function";
|
|
36
|
-
const eventType = subscribesToAllEvents ? "*" : eventTypeOrListener;
|
|
37
|
-
const listener = subscribesToAllEvents ? eventTypeOrListener : maybeListener;
|
|
38
|
-
this.debug("subscribe", { eventType, listener });
|
|
39
|
-
if (!listener) {
|
|
40
|
-
throw new TypeError(
|
|
41
|
-
`Missing first subscribe argument, or second if first is the event type, when subscribing to a UniversalStore with id '${this.id}'`
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
if (!this.listeners.has(eventType)) {
|
|
45
|
-
this.listeners.set(eventType, /* @__PURE__ */ new Set());
|
|
46
|
-
}
|
|
47
|
-
this.listeners.get(eventType).add(listener);
|
|
48
|
-
return () => {
|
|
49
|
-
this.debug("unsubscribe", { eventType, listener });
|
|
50
|
-
if (!this.listeners.has(eventType)) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
this.listeners.get(eventType).delete(listener);
|
|
54
|
-
if (this.listeners.get(eventType)?.size === 0) {
|
|
55
|
-
this.listeners.delete(eventType);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
}, "subscribe");
|
|
59
|
-
/** Sends a custom event to the other stores */
|
|
60
|
-
this.send = /* @__PURE__ */ __name((event) => {
|
|
61
|
-
this.debug("send", { event });
|
|
62
|
-
if (this.status !== _UniversalStore.Status.READY) {
|
|
63
|
-
throw new TypeError(
|
|
64
|
-
dedent`Cannot send event before store is ready. You can get the current status with store.status,
|
|
65
|
-
or await store.readyPromise to wait for the store to be ready before sending events.
|
|
66
|
-
${JSON.stringify(
|
|
67
|
-
{
|
|
68
|
-
event,
|
|
69
|
-
id: this.id,
|
|
70
|
-
actor: this.actor,
|
|
71
|
-
environment: this.environment
|
|
72
|
-
},
|
|
73
|
-
null,
|
|
74
|
-
2
|
|
75
|
-
)}`
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
this.emitToListeners(event, { actor: this.actor });
|
|
79
|
-
this.emitToChannel(event, { actor: this.actor });
|
|
80
|
-
}, "send");
|
|
81
|
-
this.debugging = options.debug ?? false;
|
|
82
|
-
if (!_UniversalStore.isInternalConstructing) {
|
|
83
|
-
throw new TypeError(
|
|
84
|
-
"UniversalStore is not constructable - use UniversalStore.create() instead"
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
_UniversalStore.isInternalConstructing = false;
|
|
88
|
-
this.id = options.id;
|
|
89
|
-
this.actorId = Date.now().toString(36) + Math.random().toString(36).substring(2);
|
|
90
|
-
this.actorType = options.leader ? _UniversalStore.ActorType.LEADER : _UniversalStore.ActorType.FOLLOWER;
|
|
91
|
-
this.state = options.initialState;
|
|
92
|
-
this.channelEventName = `${CHANNEL_EVENT_PREFIX}${this.id}`;
|
|
93
|
-
this.debug("constructor", {
|
|
94
|
-
options,
|
|
95
|
-
environmentOverrides,
|
|
96
|
-
channelEventName: this.channelEventName
|
|
97
|
-
});
|
|
98
|
-
if (this.actor.type === _UniversalStore.ActorType.LEADER) {
|
|
99
|
-
this.syncing = {
|
|
100
|
-
state: ProgressState.RESOLVED,
|
|
101
|
-
promise: Promise.resolve()
|
|
102
|
-
};
|
|
103
|
-
} else {
|
|
104
|
-
let syncingResolve;
|
|
105
|
-
let syncingReject;
|
|
106
|
-
const syncingPromise = new Promise((resolve, reject) => {
|
|
107
|
-
syncingResolve = /* @__PURE__ */ __name(() => {
|
|
108
|
-
if (this.syncing.state !== ProgressState.PENDING) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
this.syncing.state = ProgressState.RESOLVED;
|
|
112
|
-
resolve();
|
|
113
|
-
}, "syncingResolve");
|
|
114
|
-
syncingReject = /* @__PURE__ */ __name((reason) => {
|
|
115
|
-
if (this.syncing.state !== ProgressState.PENDING) {
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
this.syncing.state = ProgressState.REJECTED;
|
|
119
|
-
reject(reason);
|
|
120
|
-
}, "syncingReject");
|
|
121
|
-
});
|
|
122
|
-
this.syncing = {
|
|
123
|
-
state: ProgressState.PENDING,
|
|
124
|
-
promise: syncingPromise,
|
|
125
|
-
resolve: syncingResolve,
|
|
126
|
-
reject: syncingReject
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
this.getState = this.getState.bind(this);
|
|
130
|
-
this.setState = this.setState.bind(this);
|
|
131
|
-
this.subscribe = this.subscribe.bind(this);
|
|
132
|
-
this.onStateChange = this.onStateChange.bind(this);
|
|
133
|
-
this.send = this.send.bind(this);
|
|
134
|
-
this.emitToChannel = this.emitToChannel.bind(this);
|
|
135
|
-
this.prepareThis = this.prepareThis.bind(this);
|
|
136
|
-
this.emitToListeners = this.emitToListeners.bind(this);
|
|
137
|
-
this.handleChannelEvents = this.handleChannelEvents.bind(this);
|
|
138
|
-
this.debug = this.debug.bind(this);
|
|
139
|
-
this.channel = environmentOverrides?.channel ?? _UniversalStore.preparation.channel;
|
|
140
|
-
this.environment = environmentOverrides?.environment ?? _UniversalStore.preparation.environment;
|
|
141
|
-
if (this.channel && this.environment) {
|
|
142
|
-
_UniversalStore.preparation.resolve({ channel: this.channel, environment: this.environment });
|
|
143
|
-
this.prepareThis({ channel: this.channel, environment: this.environment });
|
|
144
|
-
} else {
|
|
145
|
-
_UniversalStore.preparation.promise.then(this.prepareThis);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
static setupPreparationPromise() {
|
|
149
|
-
let resolveRef;
|
|
150
|
-
let rejectRef;
|
|
151
|
-
const promise = new Promise(
|
|
152
|
-
(resolve, reject) => {
|
|
153
|
-
resolveRef = /* @__PURE__ */ __name((args) => {
|
|
154
|
-
resolve(args);
|
|
155
|
-
}, "resolveRef");
|
|
156
|
-
rejectRef = /* @__PURE__ */ __name((...args) => {
|
|
157
|
-
reject(args);
|
|
158
|
-
}, "rejectRef");
|
|
159
|
-
}
|
|
160
|
-
);
|
|
161
|
-
_UniversalStore.preparation = {
|
|
162
|
-
resolve: resolveRef,
|
|
163
|
-
reject: rejectRef,
|
|
164
|
-
promise
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
/** The actor object representing the store instance with a unique ID and a type */
|
|
168
|
-
get actor() {
|
|
169
|
-
return Object.freeze({
|
|
170
|
-
id: this.actorId,
|
|
171
|
-
type: this.actorType,
|
|
172
|
-
environment: this.environment ?? _UniversalStore.Environment.UNKNOWN
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* The current state of the store, that signals both if the store is prepared by Storybook and
|
|
177
|
-
* also - in the case of a follower - if the state has been synced with the leader's state.
|
|
178
|
-
*/
|
|
179
|
-
get status() {
|
|
180
|
-
if (!this.channel || !this.environment) {
|
|
181
|
-
return _UniversalStore.Status.UNPREPARED;
|
|
182
|
-
}
|
|
183
|
-
switch (this.syncing?.state) {
|
|
184
|
-
case ProgressState.PENDING:
|
|
185
|
-
case void 0:
|
|
186
|
-
return _UniversalStore.Status.SYNCING;
|
|
187
|
-
case ProgressState.REJECTED:
|
|
188
|
-
return _UniversalStore.Status.ERROR;
|
|
189
|
-
case ProgressState.RESOLVED:
|
|
190
|
-
default:
|
|
191
|
-
return _UniversalStore.Status.READY;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* A promise that resolves when the store is fully ready. A leader will be ready when the store
|
|
196
|
-
* has been prepared by Storybook, which is almost instantly.
|
|
197
|
-
*
|
|
198
|
-
* A follower will be ready when the state has been synced with the leader's state, within a few
|
|
199
|
-
* hundred milliseconds.
|
|
200
|
-
*/
|
|
201
|
-
untilReady() {
|
|
202
|
-
return Promise.all([_UniversalStore.preparation.promise, this.syncing?.promise]);
|
|
203
|
-
}
|
|
204
|
-
/** Creates a new instance of UniversalStore */
|
|
205
|
-
static create(options) {
|
|
206
|
-
if (!options || typeof options?.id !== "string") {
|
|
207
|
-
throw new TypeError("id is required and must be a string, when creating a UniversalStore");
|
|
208
|
-
}
|
|
209
|
-
if (options.debug) {
|
|
210
|
-
console.debug(
|
|
211
|
-
dedent`[UniversalStore]
|
|
212
|
-
create`,
|
|
213
|
-
{ options }
|
|
214
|
-
);
|
|
215
|
-
}
|
|
216
|
-
const existing = instances.get(options.id);
|
|
217
|
-
if (existing) {
|
|
218
|
-
console.warn(dedent`UniversalStore with id "${options.id}" already exists in this environment, re-using existing.
|
|
219
|
-
You should reuse the existing instance instead of trying to create a new one.`);
|
|
220
|
-
return existing;
|
|
221
|
-
}
|
|
222
|
-
_UniversalStore.isInternalConstructing = true;
|
|
223
|
-
const store = new _UniversalStore(options);
|
|
224
|
-
instances.set(options.id, store);
|
|
225
|
-
return store;
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Used by Storybook to set the channel for all instances of UniversalStore in the given
|
|
229
|
-
* environment.
|
|
230
|
-
*
|
|
231
|
-
* @internal
|
|
232
|
-
*/
|
|
233
|
-
static __prepare(channel, environment) {
|
|
234
|
-
_UniversalStore.preparation.channel = channel;
|
|
235
|
-
_UniversalStore.preparation.environment = environment;
|
|
236
|
-
_UniversalStore.preparation.resolve({ channel, environment });
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Updates the store's state
|
|
240
|
-
*
|
|
241
|
-
* Either a new state or a state updater function can be passed to the method.
|
|
242
|
-
*/
|
|
243
|
-
setState(updater) {
|
|
244
|
-
const previousState = this.state;
|
|
245
|
-
const newState = typeof updater === "function" ? updater(previousState) : updater;
|
|
246
|
-
this.debug("setState", { newState, previousState, updater });
|
|
247
|
-
if (this.status !== _UniversalStore.Status.READY) {
|
|
248
|
-
throw new TypeError(
|
|
249
|
-
dedent`Cannot set state before store is ready. You can get the current status with store.status,
|
|
250
|
-
or await store.readyPromise to wait for the store to be ready before sending events.
|
|
251
|
-
${JSON.stringify(
|
|
252
|
-
{
|
|
253
|
-
newState,
|
|
254
|
-
id: this.id,
|
|
255
|
-
actor: this.actor,
|
|
256
|
-
environment: this.environment
|
|
257
|
-
},
|
|
258
|
-
null,
|
|
259
|
-
2
|
|
260
|
-
)}`
|
|
261
|
-
);
|
|
262
|
-
}
|
|
263
|
-
this.state = newState;
|
|
264
|
-
const event = {
|
|
265
|
-
type: _UniversalStore.InternalEventType.SET_STATE,
|
|
266
|
-
payload: {
|
|
267
|
-
state: newState,
|
|
268
|
-
previousState
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
this.emitToChannel(event, { actor: this.actor });
|
|
272
|
-
this.emitToListeners(event, { actor: this.actor });
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Subscribes to state changes
|
|
276
|
-
*
|
|
277
|
-
* @returns Unsubscribe function
|
|
278
|
-
*/
|
|
279
|
-
onStateChange(listener) {
|
|
280
|
-
this.debug("onStateChange", { listener });
|
|
281
|
-
return this.subscribe(
|
|
282
|
-
_UniversalStore.InternalEventType.SET_STATE,
|
|
283
|
-
({ payload }, eventInfo) => {
|
|
284
|
-
listener(payload.state, payload.previousState, eventInfo);
|
|
285
|
-
}
|
|
286
|
-
);
|
|
287
|
-
}
|
|
288
|
-
emitToChannel(event, eventInfo) {
|
|
289
|
-
this.debug("emitToChannel", { event, eventInfo, channel: !!this.channel });
|
|
290
|
-
this.channel?.emit(this.channelEventName, {
|
|
291
|
-
event,
|
|
292
|
-
eventInfo
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
prepareThis({
|
|
296
|
-
channel,
|
|
297
|
-
environment
|
|
298
|
-
}) {
|
|
299
|
-
this.channel = channel;
|
|
300
|
-
this.environment = environment;
|
|
301
|
-
this.debug("prepared", { channel: !!channel, environment });
|
|
302
|
-
this.channel.on(this.channelEventName, this.handleChannelEvents);
|
|
303
|
-
if (this.actor.type === _UniversalStore.ActorType.LEADER) {
|
|
304
|
-
this.emitToChannel(
|
|
305
|
-
{ type: _UniversalStore.InternalEventType.LEADER_CREATED },
|
|
306
|
-
{ actor: this.actor }
|
|
307
|
-
);
|
|
308
|
-
} else {
|
|
309
|
-
this.emitToChannel(
|
|
310
|
-
{ type: _UniversalStore.InternalEventType.FOLLOWER_CREATED },
|
|
311
|
-
{ actor: this.actor }
|
|
312
|
-
);
|
|
313
|
-
this.emitToChannel(
|
|
314
|
-
{ type: _UniversalStore.InternalEventType.EXISTING_STATE_REQUEST },
|
|
315
|
-
{ actor: this.actor }
|
|
316
|
-
);
|
|
317
|
-
setTimeout(() => {
|
|
318
|
-
this.syncing.reject(
|
|
319
|
-
new TypeError(
|
|
320
|
-
`No existing state found for follower with id: '${this.id}'. Make sure a leader with the same id exists before creating a follower.`
|
|
321
|
-
)
|
|
322
|
-
);
|
|
323
|
-
}, 1e3);
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
emitToListeners(event, eventInfo) {
|
|
327
|
-
const eventTypeListeners = this.listeners.get(event.type);
|
|
328
|
-
const everythingListeners = this.listeners.get("*");
|
|
329
|
-
this.debug("emitToListeners", {
|
|
330
|
-
event,
|
|
331
|
-
eventInfo,
|
|
332
|
-
eventTypeListeners,
|
|
333
|
-
everythingListeners
|
|
334
|
-
});
|
|
335
|
-
[...eventTypeListeners ?? [], ...everythingListeners ?? []].forEach(
|
|
336
|
-
(listener) => listener(event, eventInfo)
|
|
337
|
-
);
|
|
338
|
-
}
|
|
339
|
-
handleChannelEvents(channelEvent) {
|
|
340
|
-
const { event, eventInfo } = channelEvent;
|
|
341
|
-
if ([eventInfo.actor.id, eventInfo.forwardingActor?.id].includes(this.actor.id)) {
|
|
342
|
-
this.debug("handleChannelEvents: Ignoring event from self", { channelEvent });
|
|
343
|
-
return;
|
|
344
|
-
} else if (this.syncing?.state === ProgressState.PENDING && event.type !== _UniversalStore.InternalEventType.EXISTING_STATE_RESPONSE) {
|
|
345
|
-
this.debug("handleChannelEvents: Ignoring event while syncing", { channelEvent });
|
|
346
|
-
return;
|
|
347
|
-
}
|
|
348
|
-
this.debug("handleChannelEvents", { channelEvent });
|
|
349
|
-
if (this.actor.type === _UniversalStore.ActorType.LEADER) {
|
|
350
|
-
let shouldForwardEvent = true;
|
|
351
|
-
switch (event.type) {
|
|
352
|
-
case _UniversalStore.InternalEventType.EXISTING_STATE_REQUEST:
|
|
353
|
-
shouldForwardEvent = false;
|
|
354
|
-
const responseEvent = {
|
|
355
|
-
type: _UniversalStore.InternalEventType.EXISTING_STATE_RESPONSE,
|
|
356
|
-
payload: this.state
|
|
357
|
-
};
|
|
358
|
-
this.debug("handleChannelEvents: responding to existing state request", {
|
|
359
|
-
responseEvent
|
|
360
|
-
});
|
|
361
|
-
this.emitToChannel(responseEvent, { actor: this.actor });
|
|
362
|
-
this.emitToListeners(responseEvent, { actor: this.actor });
|
|
363
|
-
break;
|
|
364
|
-
case _UniversalStore.InternalEventType.LEADER_CREATED:
|
|
365
|
-
shouldForwardEvent = false;
|
|
366
|
-
this.syncing.state = ProgressState.REJECTED;
|
|
367
|
-
this.debug("handleChannelEvents: erroring due to second leader being created", {
|
|
368
|
-
event
|
|
369
|
-
});
|
|
370
|
-
console.error(
|
|
371
|
-
dedent`Detected multiple UniversalStore leaders created with the same id "${this.id}".
|
|
372
|
-
Only one leader can exists at a time, your stores are now in an invalid state.
|
|
373
|
-
Leaders detected:
|
|
374
|
-
this: ${JSON.stringify(this.actor, null, 2)}
|
|
375
|
-
other: ${JSON.stringify(eventInfo.actor, null, 2)}`
|
|
376
|
-
);
|
|
377
|
-
break;
|
|
378
|
-
}
|
|
379
|
-
if (shouldForwardEvent) {
|
|
380
|
-
this.debug("handleChannelEvents: forwarding event", { channelEvent });
|
|
381
|
-
this.emitToChannel(event, { actor: eventInfo.actor, forwardingActor: this.actor });
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
if (this.actor.type === _UniversalStore.ActorType.FOLLOWER) {
|
|
385
|
-
switch (event.type) {
|
|
386
|
-
case _UniversalStore.InternalEventType.EXISTING_STATE_RESPONSE:
|
|
387
|
-
this.debug("handleChannelEvents: Setting state from leader's existing state response", {
|
|
388
|
-
event
|
|
389
|
-
});
|
|
390
|
-
if (this.syncing?.state !== ProgressState.PENDING) {
|
|
391
|
-
break;
|
|
392
|
-
}
|
|
393
|
-
this.syncing.resolve?.();
|
|
394
|
-
const setStateEvent = {
|
|
395
|
-
type: _UniversalStore.InternalEventType.SET_STATE,
|
|
396
|
-
payload: {
|
|
397
|
-
state: event.payload,
|
|
398
|
-
previousState: this.state
|
|
399
|
-
}
|
|
400
|
-
};
|
|
401
|
-
this.state = event.payload;
|
|
402
|
-
this.emitToListeners(setStateEvent, eventInfo);
|
|
403
|
-
break;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
switch (event.type) {
|
|
407
|
-
case _UniversalStore.InternalEventType.SET_STATE:
|
|
408
|
-
this.debug("handleChannelEvents: Setting state", { event });
|
|
409
|
-
this.state = event.payload.state;
|
|
410
|
-
break;
|
|
411
|
-
}
|
|
412
|
-
this.emitToListeners(event, { actor: eventInfo.actor });
|
|
413
|
-
}
|
|
414
|
-
debug(message, data) {
|
|
415
|
-
if (this.debugging) {
|
|
416
|
-
console.debug(
|
|
417
|
-
dedent`[UniversalStore::${this.id}::${this.environment ?? _UniversalStore.Environment.UNKNOWN}]
|
|
418
|
-
${message}`,
|
|
419
|
-
JSON.stringify(
|
|
420
|
-
{
|
|
421
|
-
data,
|
|
422
|
-
actor: this.actor,
|
|
423
|
-
state: this.state,
|
|
424
|
-
status: this.status
|
|
425
|
-
},
|
|
426
|
-
null,
|
|
427
|
-
2
|
|
428
|
-
)
|
|
429
|
-
);
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
/**
|
|
433
|
-
* Used to reset the static fields of the UniversalStore class when cleaning up tests
|
|
434
|
-
*
|
|
435
|
-
* @internal
|
|
436
|
-
*/
|
|
437
|
-
static __reset() {
|
|
438
|
-
_UniversalStore.preparation.reject(new Error("reset"));
|
|
439
|
-
_UniversalStore.setupPreparationPromise();
|
|
440
|
-
_UniversalStore.isInternalConstructing = false;
|
|
441
|
-
}
|
|
442
|
-
};
|
|
443
|
-
__name(_UniversalStore, "UniversalStore");
|
|
444
|
-
/**
|
|
445
|
-
* Defines the possible actor types in the store system
|
|
446
|
-
*
|
|
447
|
-
* @readonly
|
|
448
|
-
*/
|
|
449
|
-
_UniversalStore.ActorType = {
|
|
450
|
-
LEADER: "LEADER",
|
|
451
|
-
FOLLOWER: "FOLLOWER"
|
|
452
|
-
};
|
|
453
|
-
/**
|
|
454
|
-
* Defines the possible environments the store can run in
|
|
455
|
-
*
|
|
456
|
-
* @readonly
|
|
457
|
-
*/
|
|
458
|
-
_UniversalStore.Environment = {
|
|
459
|
-
SERVER: "SERVER",
|
|
460
|
-
MANAGER: "MANAGER",
|
|
461
|
-
PREVIEW: "PREVIEW",
|
|
462
|
-
UNKNOWN: "UNKNOWN",
|
|
463
|
-
MOCK: "MOCK"
|
|
464
|
-
};
|
|
465
|
-
/**
|
|
466
|
-
* Internal event types used for store synchronization
|
|
467
|
-
*
|
|
468
|
-
* @readonly
|
|
469
|
-
*/
|
|
470
|
-
_UniversalStore.InternalEventType = {
|
|
471
|
-
EXISTING_STATE_REQUEST: "__EXISTING_STATE_REQUEST",
|
|
472
|
-
EXISTING_STATE_RESPONSE: "__EXISTING_STATE_RESPONSE",
|
|
473
|
-
SET_STATE: "__SET_STATE",
|
|
474
|
-
LEADER_CREATED: "__LEADER_CREATED",
|
|
475
|
-
FOLLOWER_CREATED: "__FOLLOWER_CREATED"
|
|
476
|
-
};
|
|
477
|
-
_UniversalStore.Status = {
|
|
478
|
-
UNPREPARED: "UNPREPARED",
|
|
479
|
-
SYNCING: "SYNCING",
|
|
480
|
-
READY: "READY",
|
|
481
|
-
ERROR: "ERROR"
|
|
482
|
-
};
|
|
483
|
-
// This is used to check if constructor was called from the static factory create()
|
|
484
|
-
_UniversalStore.isInternalConstructing = false;
|
|
485
|
-
_UniversalStore.setupPreparationPromise();
|
|
486
|
-
var UniversalStore = _UniversalStore;
|
|
487
|
-
|
|
488
|
-
// ../node_modules/telejson/dist/chunk-EAFQLD22.mjs
|
|
489
|
-
var __create = Object.create;
|
|
490
|
-
var __defProp = Object.defineProperty;
|
|
491
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
492
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
493
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
494
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
495
|
-
var __commonJS = /* @__PURE__ */ __name((cb, mod) => /* @__PURE__ */ __name(function __require() {
|
|
496
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
497
|
-
}, "__require"), "__commonJS");
|
|
498
|
-
var __copyProps = /* @__PURE__ */ __name((to, from, except, desc) => {
|
|
499
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
500
|
-
for (let key of __getOwnPropNames(from))
|
|
501
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
502
|
-
__defProp(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
503
|
-
}
|
|
504
|
-
return to;
|
|
505
|
-
}, "__copyProps");
|
|
506
|
-
var __toESM = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
507
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
508
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
509
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
510
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
511
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
512
|
-
mod
|
|
513
|
-
)), "__toESM");
|
|
514
|
-
var eventProperties = [
|
|
515
|
-
"bubbles",
|
|
516
|
-
"cancelBubble",
|
|
517
|
-
"cancelable",
|
|
518
|
-
"composed",
|
|
519
|
-
"currentTarget",
|
|
520
|
-
"defaultPrevented",
|
|
521
|
-
"eventPhase",
|
|
522
|
-
"isTrusted",
|
|
523
|
-
"returnValue",
|
|
524
|
-
"srcElement",
|
|
525
|
-
"target",
|
|
526
|
-
"timeStamp",
|
|
527
|
-
"type"
|
|
528
|
-
];
|
|
529
|
-
var customEventSpecificProperties = ["detail"];
|
|
530
|
-
function extractEventHiddenProperties(event) {
|
|
531
|
-
const rebuildEvent = eventProperties.filter((value) => event[value] !== void 0).reduce((acc, value) => {
|
|
532
|
-
acc[value] = event[value];
|
|
533
|
-
return acc;
|
|
534
|
-
}, {});
|
|
535
|
-
if (event instanceof CustomEvent) {
|
|
536
|
-
for (const value of customEventSpecificProperties.filter(
|
|
537
|
-
(value2) => event[value2] !== void 0
|
|
538
|
-
)) {
|
|
539
|
-
rebuildEvent[value] = event[value];
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
return rebuildEvent;
|
|
543
|
-
}
|
|
544
|
-
__name(extractEventHiddenProperties, "extractEventHiddenProperties");
|
|
545
|
-
|
|
546
|
-
// ../node_modules/telejson/dist/index.mjs
|
|
547
|
-
var require_es_object_atoms = __commonJS({
|
|
548
|
-
"node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js"(exports, module) {
|
|
549
|
-
"use strict";
|
|
550
|
-
module.exports = Object;
|
|
551
|
-
}
|
|
552
|
-
});
|
|
553
|
-
var require_es_errors = __commonJS({
|
|
554
|
-
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(exports, module) {
|
|
555
|
-
"use strict";
|
|
556
|
-
module.exports = Error;
|
|
557
|
-
}
|
|
558
|
-
});
|
|
559
|
-
var require_eval = __commonJS({
|
|
560
|
-
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(exports, module) {
|
|
561
|
-
"use strict";
|
|
562
|
-
module.exports = EvalError;
|
|
563
|
-
}
|
|
564
|
-
});
|
|
565
|
-
var require_range = __commonJS({
|
|
566
|
-
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(exports, module) {
|
|
567
|
-
"use strict";
|
|
568
|
-
module.exports = RangeError;
|
|
569
|
-
}
|
|
570
|
-
});
|
|
571
|
-
var require_ref = __commonJS({
|
|
572
|
-
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(exports, module) {
|
|
573
|
-
"use strict";
|
|
574
|
-
module.exports = ReferenceError;
|
|
575
|
-
}
|
|
576
|
-
});
|
|
577
|
-
var require_syntax = __commonJS({
|
|
578
|
-
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(exports, module) {
|
|
579
|
-
"use strict";
|
|
580
|
-
module.exports = SyntaxError;
|
|
581
|
-
}
|
|
582
|
-
});
|
|
583
|
-
var require_type = __commonJS({
|
|
584
|
-
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(exports, module) {
|
|
585
|
-
"use strict";
|
|
586
|
-
module.exports = TypeError;
|
|
587
|
-
}
|
|
588
|
-
});
|
|
589
|
-
var require_uri = __commonJS({
|
|
590
|
-
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(exports, module) {
|
|
591
|
-
"use strict";
|
|
592
|
-
module.exports = URIError;
|
|
593
|
-
}
|
|
594
|
-
});
|
|
595
|
-
var require_abs = __commonJS({
|
|
596
|
-
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js"(exports, module) {
|
|
597
|
-
"use strict";
|
|
598
|
-
module.exports = Math.abs;
|
|
599
|
-
}
|
|
600
|
-
});
|
|
601
|
-
var require_floor = __commonJS({
|
|
602
|
-
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js"(exports, module) {
|
|
603
|
-
"use strict";
|
|
604
|
-
module.exports = Math.floor;
|
|
605
|
-
}
|
|
606
|
-
});
|
|
607
|
-
var require_max = __commonJS({
|
|
608
|
-
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js"(exports, module) {
|
|
609
|
-
"use strict";
|
|
610
|
-
module.exports = Math.max;
|
|
611
|
-
}
|
|
612
|
-
});
|
|
613
|
-
var require_min = __commonJS({
|
|
614
|
-
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js"(exports, module) {
|
|
615
|
-
"use strict";
|
|
616
|
-
module.exports = Math.min;
|
|
617
|
-
}
|
|
618
|
-
});
|
|
619
|
-
var require_pow = __commonJS({
|
|
620
|
-
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js"(exports, module) {
|
|
621
|
-
"use strict";
|
|
622
|
-
module.exports = Math.pow;
|
|
623
|
-
}
|
|
624
|
-
});
|
|
625
|
-
var require_round = __commonJS({
|
|
626
|
-
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js"(exports, module) {
|
|
627
|
-
"use strict";
|
|
628
|
-
module.exports = Math.round;
|
|
629
|
-
}
|
|
630
|
-
});
|
|
631
|
-
var require_isNaN = __commonJS({
|
|
632
|
-
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js"(exports, module) {
|
|
633
|
-
"use strict";
|
|
634
|
-
module.exports = Number.isNaN || /* @__PURE__ */ __name(function isNaN2(a) {
|
|
635
|
-
return a !== a;
|
|
636
|
-
}, "isNaN2");
|
|
637
|
-
}
|
|
638
|
-
});
|
|
639
|
-
var require_sign = __commonJS({
|
|
640
|
-
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js"(exports, module) {
|
|
641
|
-
"use strict";
|
|
642
|
-
var $isNaN = require_isNaN();
|
|
643
|
-
module.exports = /* @__PURE__ */ __name(function sign(number) {
|
|
644
|
-
if ($isNaN(number) || number === 0) {
|
|
645
|
-
return number;
|
|
646
|
-
}
|
|
647
|
-
return number < 0 ? -1 : 1;
|
|
648
|
-
}, "sign");
|
|
649
|
-
}
|
|
650
|
-
});
|
|
651
|
-
var require_gOPD = __commonJS({
|
|
652
|
-
"node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js"(exports, module) {
|
|
653
|
-
"use strict";
|
|
654
|
-
module.exports = Object.getOwnPropertyDescriptor;
|
|
655
|
-
}
|
|
656
|
-
});
|
|
657
|
-
var require_gopd = __commonJS({
|
|
658
|
-
"node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js"(exports, module) {
|
|
659
|
-
"use strict";
|
|
660
|
-
var $gOPD = require_gOPD();
|
|
661
|
-
if ($gOPD) {
|
|
662
|
-
try {
|
|
663
|
-
$gOPD([], "length");
|
|
664
|
-
} catch (e) {
|
|
665
|
-
$gOPD = null;
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
module.exports = $gOPD;
|
|
669
|
-
}
|
|
670
|
-
});
|
|
671
|
-
var require_es_define_property = __commonJS({
|
|
672
|
-
"node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js"(exports, module) {
|
|
673
|
-
"use strict";
|
|
674
|
-
var $defineProperty = Object.defineProperty || false;
|
|
675
|
-
if ($defineProperty) {
|
|
676
|
-
try {
|
|
677
|
-
$defineProperty({}, "a", { value: 1 });
|
|
678
|
-
} catch (e) {
|
|
679
|
-
$defineProperty = false;
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
module.exports = $defineProperty;
|
|
683
|
-
}
|
|
684
|
-
});
|
|
685
|
-
var require_shams = __commonJS({
|
|
686
|
-
"node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js"(exports, module) {
|
|
687
|
-
"use strict";
|
|
688
|
-
module.exports = /* @__PURE__ */ __name(function hasSymbols() {
|
|
689
|
-
if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
|
|
690
|
-
return false;
|
|
691
|
-
}
|
|
692
|
-
if (typeof Symbol.iterator === "symbol") {
|
|
693
|
-
return true;
|
|
694
|
-
}
|
|
695
|
-
var obj = {};
|
|
696
|
-
var sym = Symbol("test");
|
|
697
|
-
var symObj = Object(sym);
|
|
698
|
-
if (typeof sym === "string") {
|
|
699
|
-
return false;
|
|
700
|
-
}
|
|
701
|
-
if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
|
|
702
|
-
return false;
|
|
703
|
-
}
|
|
704
|
-
if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
|
|
705
|
-
return false;
|
|
706
|
-
}
|
|
707
|
-
var symVal = 42;
|
|
708
|
-
obj[sym] = symVal;
|
|
709
|
-
for (var _ in obj) {
|
|
710
|
-
return false;
|
|
711
|
-
}
|
|
712
|
-
if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
|
|
713
|
-
return false;
|
|
714
|
-
}
|
|
715
|
-
if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
|
|
716
|
-
return false;
|
|
717
|
-
}
|
|
718
|
-
var syms = Object.getOwnPropertySymbols(obj);
|
|
719
|
-
if (syms.length !== 1 || syms[0] !== sym) {
|
|
720
|
-
return false;
|
|
721
|
-
}
|
|
722
|
-
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
|
|
723
|
-
return false;
|
|
724
|
-
}
|
|
725
|
-
if (typeof Object.getOwnPropertyDescriptor === "function") {
|
|
726
|
-
var descriptor = (
|
|
727
|
-
/** @type {PropertyDescriptor} */
|
|
728
|
-
Object.getOwnPropertyDescriptor(obj, sym)
|
|
729
|
-
);
|
|
730
|
-
if (descriptor.value !== symVal || descriptor.enumerable !== true) {
|
|
731
|
-
return false;
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
return true;
|
|
735
|
-
}, "hasSymbols");
|
|
736
|
-
}
|
|
737
|
-
});
|
|
738
|
-
var require_has_symbols = __commonJS({
|
|
739
|
-
"node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js"(exports, module) {
|
|
740
|
-
"use strict";
|
|
741
|
-
var origSymbol = typeof Symbol !== "undefined" && Symbol;
|
|
742
|
-
var hasSymbolSham = require_shams();
|
|
743
|
-
module.exports = /* @__PURE__ */ __name(function hasNativeSymbols() {
|
|
744
|
-
if (typeof origSymbol !== "function") {
|
|
745
|
-
return false;
|
|
746
|
-
}
|
|
747
|
-
if (typeof Symbol !== "function") {
|
|
748
|
-
return false;
|
|
749
|
-
}
|
|
750
|
-
if (typeof origSymbol("foo") !== "symbol") {
|
|
751
|
-
return false;
|
|
752
|
-
}
|
|
753
|
-
if (typeof Symbol("bar") !== "symbol") {
|
|
754
|
-
return false;
|
|
755
|
-
}
|
|
756
|
-
return hasSymbolSham();
|
|
757
|
-
}, "hasNativeSymbols");
|
|
758
|
-
}
|
|
759
|
-
});
|
|
760
|
-
var require_Reflect_getPrototypeOf = __commonJS({
|
|
761
|
-
"node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js"(exports, module) {
|
|
762
|
-
"use strict";
|
|
763
|
-
module.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
|
|
764
|
-
}
|
|
765
|
-
});
|
|
766
|
-
var require_Object_getPrototypeOf = __commonJS({
|
|
767
|
-
"node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js"(exports, module) {
|
|
768
|
-
"use strict";
|
|
769
|
-
var $Object = require_es_object_atoms();
|
|
770
|
-
module.exports = $Object.getPrototypeOf || null;
|
|
771
|
-
}
|
|
772
|
-
});
|
|
773
|
-
var require_implementation = __commonJS({
|
|
774
|
-
"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports, module) {
|
|
775
|
-
"use strict";
|
|
776
|
-
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
777
|
-
var toStr = Object.prototype.toString;
|
|
778
|
-
var max = Math.max;
|
|
779
|
-
var funcType = "[object Function]";
|
|
780
|
-
var concatty = /* @__PURE__ */ __name(function concatty2(a, b) {
|
|
781
|
-
var arr = [];
|
|
782
|
-
for (var i = 0; i < a.length; i += 1) {
|
|
783
|
-
arr[i] = a[i];
|
|
784
|
-
}
|
|
785
|
-
for (var j = 0; j < b.length; j += 1) {
|
|
786
|
-
arr[j + a.length] = b[j];
|
|
787
|
-
}
|
|
788
|
-
return arr;
|
|
789
|
-
}, "concatty2");
|
|
790
|
-
var slicy = /* @__PURE__ */ __name(function slicy2(arrLike, offset) {
|
|
791
|
-
var arr = [];
|
|
792
|
-
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
793
|
-
arr[j] = arrLike[i];
|
|
794
|
-
}
|
|
795
|
-
return arr;
|
|
796
|
-
}, "slicy2");
|
|
797
|
-
var joiny = /* @__PURE__ */ __name(function(arr, joiner) {
|
|
798
|
-
var str = "";
|
|
799
|
-
for (var i = 0; i < arr.length; i += 1) {
|
|
800
|
-
str += arr[i];
|
|
801
|
-
if (i + 1 < arr.length) {
|
|
802
|
-
str += joiner;
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
return str;
|
|
806
|
-
}, "joiny");
|
|
807
|
-
module.exports = /* @__PURE__ */ __name(function bind(that) {
|
|
808
|
-
var target = this;
|
|
809
|
-
if (typeof target !== "function" || toStr.apply(target) !== funcType) {
|
|
810
|
-
throw new TypeError(ERROR_MESSAGE + target);
|
|
811
|
-
}
|
|
812
|
-
var args = slicy(arguments, 1);
|
|
813
|
-
var bound;
|
|
814
|
-
var binder = /* @__PURE__ */ __name(function() {
|
|
815
|
-
if (this instanceof bound) {
|
|
816
|
-
var result = target.apply(
|
|
817
|
-
this,
|
|
818
|
-
concatty(args, arguments)
|
|
819
|
-
);
|
|
820
|
-
if (Object(result) === result) {
|
|
821
|
-
return result;
|
|
822
|
-
}
|
|
823
|
-
return this;
|
|
824
|
-
}
|
|
825
|
-
return target.apply(
|
|
826
|
-
that,
|
|
827
|
-
concatty(args, arguments)
|
|
828
|
-
);
|
|
829
|
-
}, "binder");
|
|
830
|
-
var boundLength = max(0, target.length - args.length);
|
|
831
|
-
var boundArgs = [];
|
|
832
|
-
for (var i = 0; i < boundLength; i++) {
|
|
833
|
-
boundArgs[i] = "$" + i;
|
|
834
|
-
}
|
|
835
|
-
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
836
|
-
if (target.prototype) {
|
|
837
|
-
var Empty = /* @__PURE__ */ __name(function Empty2() {
|
|
838
|
-
}, "Empty2");
|
|
839
|
-
Empty.prototype = target.prototype;
|
|
840
|
-
bound.prototype = new Empty();
|
|
841
|
-
Empty.prototype = null;
|
|
842
|
-
}
|
|
843
|
-
return bound;
|
|
844
|
-
}, "bind");
|
|
845
|
-
}
|
|
846
|
-
});
|
|
847
|
-
var require_function_bind = __commonJS({
|
|
848
|
-
"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports, module) {
|
|
849
|
-
"use strict";
|
|
850
|
-
var implementation = require_implementation();
|
|
851
|
-
module.exports = Function.prototype.bind || implementation;
|
|
852
|
-
}
|
|
853
|
-
});
|
|
854
|
-
var require_functionCall = __commonJS({
|
|
855
|
-
"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js"(exports, module) {
|
|
856
|
-
"use strict";
|
|
857
|
-
module.exports = Function.prototype.call;
|
|
858
|
-
}
|
|
859
|
-
});
|
|
860
|
-
var require_functionApply = __commonJS({
|
|
861
|
-
"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js"(exports, module) {
|
|
862
|
-
"use strict";
|
|
863
|
-
module.exports = Function.prototype.apply;
|
|
864
|
-
}
|
|
865
|
-
});
|
|
866
|
-
var require_reflectApply = __commonJS({
|
|
867
|
-
"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js"(exports, module) {
|
|
868
|
-
"use strict";
|
|
869
|
-
module.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
870
|
-
}
|
|
871
|
-
});
|
|
872
|
-
var require_actualApply = __commonJS({
|
|
873
|
-
"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js"(exports, module) {
|
|
874
|
-
"use strict";
|
|
875
|
-
var bind = require_function_bind();
|
|
876
|
-
var $apply = require_functionApply();
|
|
877
|
-
var $call = require_functionCall();
|
|
878
|
-
var $reflectApply = require_reflectApply();
|
|
879
|
-
module.exports = $reflectApply || bind.call($call, $apply);
|
|
880
|
-
}
|
|
881
|
-
});
|
|
882
|
-
var require_call_bind_apply_helpers = __commonJS({
|
|
883
|
-
"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js"(exports, module) {
|
|
884
|
-
"use strict";
|
|
885
|
-
var bind = require_function_bind();
|
|
886
|
-
var $TypeError = require_type();
|
|
887
|
-
var $call = require_functionCall();
|
|
888
|
-
var $actualApply = require_actualApply();
|
|
889
|
-
module.exports = /* @__PURE__ */ __name(function callBindBasic(args) {
|
|
890
|
-
if (args.length < 1 || typeof args[0] !== "function") {
|
|
891
|
-
throw new $TypeError("a function is required");
|
|
892
|
-
}
|
|
893
|
-
return $actualApply(bind, $call, args);
|
|
894
|
-
}, "callBindBasic");
|
|
895
|
-
}
|
|
896
|
-
});
|
|
897
|
-
var require_get = __commonJS({
|
|
898
|
-
"node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js"(exports, module) {
|
|
899
|
-
"use strict";
|
|
900
|
-
var callBind = require_call_bind_apply_helpers();
|
|
901
|
-
var gOPD = require_gopd();
|
|
902
|
-
var hasProtoAccessor;
|
|
903
|
-
try {
|
|
904
|
-
hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
905
|
-
[].__proto__ === Array.prototype;
|
|
906
|
-
} catch (e) {
|
|
907
|
-
if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") {
|
|
908
|
-
throw e;
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
var desc = !!hasProtoAccessor && gOPD && gOPD(
|
|
912
|
-
Object.prototype,
|
|
913
|
-
/** @type {keyof typeof Object.prototype} */
|
|
914
|
-
"__proto__"
|
|
915
|
-
);
|
|
916
|
-
var $Object = Object;
|
|
917
|
-
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
918
|
-
module.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? (
|
|
919
|
-
/** @type {import('./get')} */
|
|
920
|
-
/* @__PURE__ */ __name(function getDunder(value) {
|
|
921
|
-
return $getPrototypeOf(value == null ? value : $Object(value));
|
|
922
|
-
}, "getDunder")
|
|
923
|
-
) : false;
|
|
924
|
-
}
|
|
925
|
-
});
|
|
926
|
-
var require_get_proto = __commonJS({
|
|
927
|
-
"node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js"(exports, module) {
|
|
928
|
-
"use strict";
|
|
929
|
-
var reflectGetProto = require_Reflect_getPrototypeOf();
|
|
930
|
-
var originalGetProto = require_Object_getPrototypeOf();
|
|
931
|
-
var getDunderProto = require_get();
|
|
932
|
-
module.exports = reflectGetProto ? /* @__PURE__ */ __name(function getProto(O) {
|
|
933
|
-
return reflectGetProto(O);
|
|
934
|
-
}, "getProto") : originalGetProto ? /* @__PURE__ */ __name(function getProto(O) {
|
|
935
|
-
if (!O || typeof O !== "object" && typeof O !== "function") {
|
|
936
|
-
throw new TypeError("getProto: not an object");
|
|
937
|
-
}
|
|
938
|
-
return originalGetProto(O);
|
|
939
|
-
}, "getProto") : getDunderProto ? /* @__PURE__ */ __name(function getProto(O) {
|
|
940
|
-
return getDunderProto(O);
|
|
941
|
-
}, "getProto") : null;
|
|
942
|
-
}
|
|
943
|
-
});
|
|
944
|
-
var require_hasown = __commonJS({
|
|
945
|
-
"node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(exports, module) {
|
|
946
|
-
"use strict";
|
|
947
|
-
var call = Function.prototype.call;
|
|
948
|
-
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
949
|
-
var bind = require_function_bind();
|
|
950
|
-
module.exports = bind.call(call, $hasOwn);
|
|
951
|
-
}
|
|
952
|
-
});
|
|
953
|
-
var require_get_intrinsic = __commonJS({
|
|
954
|
-
"node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js"(exports, module) {
|
|
955
|
-
"use strict";
|
|
956
|
-
var undefined2;
|
|
957
|
-
var $Object = require_es_object_atoms();
|
|
958
|
-
var $Error = require_es_errors();
|
|
959
|
-
var $EvalError = require_eval();
|
|
960
|
-
var $RangeError = require_range();
|
|
961
|
-
var $ReferenceError = require_ref();
|
|
962
|
-
var $SyntaxError = require_syntax();
|
|
963
|
-
var $TypeError = require_type();
|
|
964
|
-
var $URIError = require_uri();
|
|
965
|
-
var abs = require_abs();
|
|
966
|
-
var floor = require_floor();
|
|
967
|
-
var max = require_max();
|
|
968
|
-
var min = require_min();
|
|
969
|
-
var pow = require_pow();
|
|
970
|
-
var round = require_round();
|
|
971
|
-
var sign = require_sign();
|
|
972
|
-
var $Function = Function;
|
|
973
|
-
var getEvalledConstructor = /* @__PURE__ */ __name(function(expressionSyntax) {
|
|
974
|
-
try {
|
|
975
|
-
return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
|
|
976
|
-
} catch (e) {
|
|
977
|
-
}
|
|
978
|
-
}, "getEvalledConstructor");
|
|
979
|
-
var $gOPD = require_gopd();
|
|
980
|
-
var $defineProperty = require_es_define_property();
|
|
981
|
-
var throwTypeError = /* @__PURE__ */ __name(function() {
|
|
982
|
-
throw new $TypeError();
|
|
983
|
-
}, "throwTypeError");
|
|
984
|
-
var ThrowTypeError = $gOPD ? function() {
|
|
985
|
-
try {
|
|
986
|
-
arguments.callee;
|
|
987
|
-
return throwTypeError;
|
|
988
|
-
} catch (calleeThrows) {
|
|
989
|
-
try {
|
|
990
|
-
return $gOPD(arguments, "callee").get;
|
|
991
|
-
} catch (gOPDthrows) {
|
|
992
|
-
return throwTypeError;
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
}() : throwTypeError;
|
|
996
|
-
var hasSymbols = require_has_symbols()();
|
|
997
|
-
var getProto = require_get_proto();
|
|
998
|
-
var $ObjectGPO = require_Object_getPrototypeOf();
|
|
999
|
-
var $ReflectGPO = require_Reflect_getPrototypeOf();
|
|
1000
|
-
var $apply = require_functionApply();
|
|
1001
|
-
var $call = require_functionCall();
|
|
1002
|
-
var needsEval = {};
|
|
1003
|
-
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
|
|
1004
|
-
var INTRINSICS = {
|
|
1005
|
-
__proto__: null,
|
|
1006
|
-
"%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
|
|
1007
|
-
"%Array%": Array,
|
|
1008
|
-
"%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
|
|
1009
|
-
"%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
|
|
1010
|
-
"%AsyncFromSyncIteratorPrototype%": undefined2,
|
|
1011
|
-
"%AsyncFunction%": needsEval,
|
|
1012
|
-
"%AsyncGenerator%": needsEval,
|
|
1013
|
-
"%AsyncGeneratorFunction%": needsEval,
|
|
1014
|
-
"%AsyncIteratorPrototype%": needsEval,
|
|
1015
|
-
"%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
|
|
1016
|
-
"%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
|
|
1017
|
-
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
|
|
1018
|
-
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
|
|
1019
|
-
"%Boolean%": Boolean,
|
|
1020
|
-
"%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
|
|
1021
|
-
"%Date%": Date,
|
|
1022
|
-
"%decodeURI%": decodeURI,
|
|
1023
|
-
"%decodeURIComponent%": decodeURIComponent,
|
|
1024
|
-
"%encodeURI%": encodeURI,
|
|
1025
|
-
"%encodeURIComponent%": encodeURIComponent,
|
|
1026
|
-
"%Error%": $Error,
|
|
1027
|
-
"%eval%": eval,
|
|
1028
|
-
// eslint-disable-line no-eval
|
|
1029
|
-
"%EvalError%": $EvalError,
|
|
1030
|
-
"%Float16Array%": typeof Float16Array === "undefined" ? undefined2 : Float16Array,
|
|
1031
|
-
"%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
|
|
1032
|
-
"%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
|
|
1033
|
-
"%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
|
|
1034
|
-
"%Function%": $Function,
|
|
1035
|
-
"%GeneratorFunction%": needsEval,
|
|
1036
|
-
"%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
|
|
1037
|
-
"%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
|
|
1038
|
-
"%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
|
|
1039
|
-
"%isFinite%": isFinite,
|
|
1040
|
-
"%isNaN%": isNaN,
|
|
1041
|
-
"%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
|
|
1042
|
-
"%JSON%": typeof JSON === "object" ? JSON : undefined2,
|
|
1043
|
-
"%Map%": typeof Map === "undefined" ? undefined2 : Map,
|
|
1044
|
-
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
1045
|
-
"%Math%": Math,
|
|
1046
|
-
"%Number%": Number,
|
|
1047
|
-
"%Object%": $Object,
|
|
1048
|
-
"%Object.getOwnPropertyDescriptor%": $gOPD,
|
|
1049
|
-
"%parseFloat%": parseFloat,
|
|
1050
|
-
"%parseInt%": parseInt,
|
|
1051
|
-
"%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
|
|
1052
|
-
"%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
|
|
1053
|
-
"%RangeError%": $RangeError,
|
|
1054
|
-
"%ReferenceError%": $ReferenceError,
|
|
1055
|
-
"%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
|
|
1056
|
-
"%RegExp%": RegExp,
|
|
1057
|
-
"%Set%": typeof Set === "undefined" ? undefined2 : Set,
|
|
1058
|
-
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
1059
|
-
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
|
|
1060
|
-
"%String%": String,
|
|
1061
|
-
"%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
|
|
1062
|
-
"%Symbol%": hasSymbols ? Symbol : undefined2,
|
|
1063
|
-
"%SyntaxError%": $SyntaxError,
|
|
1064
|
-
"%ThrowTypeError%": ThrowTypeError,
|
|
1065
|
-
"%TypedArray%": TypedArray,
|
|
1066
|
-
"%TypeError%": $TypeError,
|
|
1067
|
-
"%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
|
|
1068
|
-
"%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
|
|
1069
|
-
"%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
|
|
1070
|
-
"%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
|
|
1071
|
-
"%URIError%": $URIError,
|
|
1072
|
-
"%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
|
|
1073
|
-
"%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
|
|
1074
|
-
"%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet,
|
|
1075
|
-
"%Function.prototype.call%": $call,
|
|
1076
|
-
"%Function.prototype.apply%": $apply,
|
|
1077
|
-
"%Object.defineProperty%": $defineProperty,
|
|
1078
|
-
"%Object.getPrototypeOf%": $ObjectGPO,
|
|
1079
|
-
"%Math.abs%": abs,
|
|
1080
|
-
"%Math.floor%": floor,
|
|
1081
|
-
"%Math.max%": max,
|
|
1082
|
-
"%Math.min%": min,
|
|
1083
|
-
"%Math.pow%": pow,
|
|
1084
|
-
"%Math.round%": round,
|
|
1085
|
-
"%Math.sign%": sign,
|
|
1086
|
-
"%Reflect.getPrototypeOf%": $ReflectGPO
|
|
1087
|
-
};
|
|
1088
|
-
if (getProto) {
|
|
1089
|
-
try {
|
|
1090
|
-
null.error;
|
|
1091
|
-
} catch (e) {
|
|
1092
|
-
errorProto = getProto(getProto(e));
|
|
1093
|
-
INTRINSICS["%Error.prototype%"] = errorProto;
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
var errorProto;
|
|
1097
|
-
var doEval = /* @__PURE__ */ __name(function doEval2(name) {
|
|
1098
|
-
var value;
|
|
1099
|
-
if (name === "%AsyncFunction%") {
|
|
1100
|
-
value = getEvalledConstructor("async function () {}");
|
|
1101
|
-
} else if (name === "%GeneratorFunction%") {
|
|
1102
|
-
value = getEvalledConstructor("function* () {}");
|
|
1103
|
-
} else if (name === "%AsyncGeneratorFunction%") {
|
|
1104
|
-
value = getEvalledConstructor("async function* () {}");
|
|
1105
|
-
} else if (name === "%AsyncGenerator%") {
|
|
1106
|
-
var fn = doEval2("%AsyncGeneratorFunction%");
|
|
1107
|
-
if (fn) {
|
|
1108
|
-
value = fn.prototype;
|
|
1109
|
-
}
|
|
1110
|
-
} else if (name === "%AsyncIteratorPrototype%") {
|
|
1111
|
-
var gen = doEval2("%AsyncGenerator%");
|
|
1112
|
-
if (gen && getProto) {
|
|
1113
|
-
value = getProto(gen.prototype);
|
|
1114
|
-
}
|
|
1115
|
-
}
|
|
1116
|
-
INTRINSICS[name] = value;
|
|
1117
|
-
return value;
|
|
1118
|
-
}, "doEval2");
|
|
1119
|
-
var LEGACY_ALIASES = {
|
|
1120
|
-
__proto__: null,
|
|
1121
|
-
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
1122
|
-
"%ArrayPrototype%": ["Array", "prototype"],
|
|
1123
|
-
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
1124
|
-
"%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
|
|
1125
|
-
"%ArrayProto_keys%": ["Array", "prototype", "keys"],
|
|
1126
|
-
"%ArrayProto_values%": ["Array", "prototype", "values"],
|
|
1127
|
-
"%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
|
|
1128
|
-
"%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
|
|
1129
|
-
"%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
|
|
1130
|
-
"%BooleanPrototype%": ["Boolean", "prototype"],
|
|
1131
|
-
"%DataViewPrototype%": ["DataView", "prototype"],
|
|
1132
|
-
"%DatePrototype%": ["Date", "prototype"],
|
|
1133
|
-
"%ErrorPrototype%": ["Error", "prototype"],
|
|
1134
|
-
"%EvalErrorPrototype%": ["EvalError", "prototype"],
|
|
1135
|
-
"%Float32ArrayPrototype%": ["Float32Array", "prototype"],
|
|
1136
|
-
"%Float64ArrayPrototype%": ["Float64Array", "prototype"],
|
|
1137
|
-
"%FunctionPrototype%": ["Function", "prototype"],
|
|
1138
|
-
"%Generator%": ["GeneratorFunction", "prototype"],
|
|
1139
|
-
"%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
|
|
1140
|
-
"%Int8ArrayPrototype%": ["Int8Array", "prototype"],
|
|
1141
|
-
"%Int16ArrayPrototype%": ["Int16Array", "prototype"],
|
|
1142
|
-
"%Int32ArrayPrototype%": ["Int32Array", "prototype"],
|
|
1143
|
-
"%JSONParse%": ["JSON", "parse"],
|
|
1144
|
-
"%JSONStringify%": ["JSON", "stringify"],
|
|
1145
|
-
"%MapPrototype%": ["Map", "prototype"],
|
|
1146
|
-
"%NumberPrototype%": ["Number", "prototype"],
|
|
1147
|
-
"%ObjectPrototype%": ["Object", "prototype"],
|
|
1148
|
-
"%ObjProto_toString%": ["Object", "prototype", "toString"],
|
|
1149
|
-
"%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
|
|
1150
|
-
"%PromisePrototype%": ["Promise", "prototype"],
|
|
1151
|
-
"%PromiseProto_then%": ["Promise", "prototype", "then"],
|
|
1152
|
-
"%Promise_all%": ["Promise", "all"],
|
|
1153
|
-
"%Promise_reject%": ["Promise", "reject"],
|
|
1154
|
-
"%Promise_resolve%": ["Promise", "resolve"],
|
|
1155
|
-
"%RangeErrorPrototype%": ["RangeError", "prototype"],
|
|
1156
|
-
"%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
|
|
1157
|
-
"%RegExpPrototype%": ["RegExp", "prototype"],
|
|
1158
|
-
"%SetPrototype%": ["Set", "prototype"],
|
|
1159
|
-
"%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
|
|
1160
|
-
"%StringPrototype%": ["String", "prototype"],
|
|
1161
|
-
"%SymbolPrototype%": ["Symbol", "prototype"],
|
|
1162
|
-
"%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
|
|
1163
|
-
"%TypedArrayPrototype%": ["TypedArray", "prototype"],
|
|
1164
|
-
"%TypeErrorPrototype%": ["TypeError", "prototype"],
|
|
1165
|
-
"%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
|
|
1166
|
-
"%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
|
|
1167
|
-
"%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
|
|
1168
|
-
"%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
|
|
1169
|
-
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
1170
|
-
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
1171
|
-
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
1172
|
-
};
|
|
1173
|
-
var bind = require_function_bind();
|
|
1174
|
-
var hasOwn = require_hasown();
|
|
1175
|
-
var $concat = bind.call($call, Array.prototype.concat);
|
|
1176
|
-
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
1177
|
-
var $replace = bind.call($call, String.prototype.replace);
|
|
1178
|
-
var $strSlice = bind.call($call, String.prototype.slice);
|
|
1179
|
-
var $exec = bind.call($call, RegExp.prototype.exec);
|
|
1180
|
-
var rePropName2 = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
1181
|
-
var reEscapeChar2 = /\\(\\)?/g;
|
|
1182
|
-
var stringToPath2 = /* @__PURE__ */ __name(function stringToPath3(string) {
|
|
1183
|
-
var first = $strSlice(string, 0, 1);
|
|
1184
|
-
var last = $strSlice(string, -1);
|
|
1185
|
-
if (first === "%" && last !== "%") {
|
|
1186
|
-
throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
|
|
1187
|
-
} else if (last === "%" && first !== "%") {
|
|
1188
|
-
throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
|
|
1189
|
-
}
|
|
1190
|
-
var result = [];
|
|
1191
|
-
$replace(string, rePropName2, function(match, number, quote, subString) {
|
|
1192
|
-
result[result.length] = quote ? $replace(subString, reEscapeChar2, "$1") : number || match;
|
|
1193
|
-
});
|
|
1194
|
-
return result;
|
|
1195
|
-
}, "stringToPath3");
|
|
1196
|
-
var getBaseIntrinsic = /* @__PURE__ */ __name(function getBaseIntrinsic2(name, allowMissing) {
|
|
1197
|
-
var intrinsicName = name;
|
|
1198
|
-
var alias;
|
|
1199
|
-
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
1200
|
-
alias = LEGACY_ALIASES[intrinsicName];
|
|
1201
|
-
intrinsicName = "%" + alias[0] + "%";
|
|
1202
|
-
}
|
|
1203
|
-
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
1204
|
-
var value = INTRINSICS[intrinsicName];
|
|
1205
|
-
if (value === needsEval) {
|
|
1206
|
-
value = doEval(intrinsicName);
|
|
1207
|
-
}
|
|
1208
|
-
if (typeof value === "undefined" && !allowMissing) {
|
|
1209
|
-
throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
|
|
1210
|
-
}
|
|
1211
|
-
return {
|
|
1212
|
-
alias,
|
|
1213
|
-
name: intrinsicName,
|
|
1214
|
-
value
|
|
1215
|
-
};
|
|
1216
|
-
}
|
|
1217
|
-
throw new $SyntaxError("intrinsic " + name + " does not exist!");
|
|
1218
|
-
}, "getBaseIntrinsic2");
|
|
1219
|
-
module.exports = /* @__PURE__ */ __name(function GetIntrinsic(name, allowMissing) {
|
|
1220
|
-
if (typeof name !== "string" || name.length === 0) {
|
|
1221
|
-
throw new $TypeError("intrinsic name must be a non-empty string");
|
|
1222
|
-
}
|
|
1223
|
-
if (arguments.length > 1 && typeof allowMissing !== "boolean") {
|
|
1224
|
-
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
1225
|
-
}
|
|
1226
|
-
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
1227
|
-
throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
1228
|
-
}
|
|
1229
|
-
var parts = stringToPath2(name);
|
|
1230
|
-
var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
|
|
1231
|
-
var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
|
|
1232
|
-
var intrinsicRealName = intrinsic.name;
|
|
1233
|
-
var value = intrinsic.value;
|
|
1234
|
-
var skipFurtherCaching = false;
|
|
1235
|
-
var alias = intrinsic.alias;
|
|
1236
|
-
if (alias) {
|
|
1237
|
-
intrinsicBaseName = alias[0];
|
|
1238
|
-
$spliceApply(parts, $concat([0, 1], alias));
|
|
1239
|
-
}
|
|
1240
|
-
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
1241
|
-
var part = parts[i];
|
|
1242
|
-
var first = $strSlice(part, 0, 1);
|
|
1243
|
-
var last = $strSlice(part, -1);
|
|
1244
|
-
if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
|
|
1245
|
-
throw new $SyntaxError("property names with quotes must have matching quotes");
|
|
1246
|
-
}
|
|
1247
|
-
if (part === "constructor" || !isOwn) {
|
|
1248
|
-
skipFurtherCaching = true;
|
|
1249
|
-
}
|
|
1250
|
-
intrinsicBaseName += "." + part;
|
|
1251
|
-
intrinsicRealName = "%" + intrinsicBaseName + "%";
|
|
1252
|
-
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
1253
|
-
value = INTRINSICS[intrinsicRealName];
|
|
1254
|
-
} else if (value != null) {
|
|
1255
|
-
if (!(part in value)) {
|
|
1256
|
-
if (!allowMissing) {
|
|
1257
|
-
throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
|
|
1258
|
-
}
|
|
1259
|
-
return void 0;
|
|
1260
|
-
}
|
|
1261
|
-
if ($gOPD && i + 1 >= parts.length) {
|
|
1262
|
-
var desc = $gOPD(value, part);
|
|
1263
|
-
isOwn = !!desc;
|
|
1264
|
-
if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
|
|
1265
|
-
value = desc.get;
|
|
1266
|
-
} else {
|
|
1267
|
-
value = value[part];
|
|
1268
|
-
}
|
|
1269
|
-
} else {
|
|
1270
|
-
isOwn = hasOwn(value, part);
|
|
1271
|
-
value = value[part];
|
|
1272
|
-
}
|
|
1273
|
-
if (isOwn && !skipFurtherCaching) {
|
|
1274
|
-
INTRINSICS[intrinsicRealName] = value;
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
return value;
|
|
1279
|
-
}, "GetIntrinsic");
|
|
1280
|
-
}
|
|
1281
|
-
});
|
|
1282
|
-
var require_call_bound = __commonJS({
|
|
1283
|
-
"node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js"(exports, module) {
|
|
1284
|
-
"use strict";
|
|
1285
|
-
var GetIntrinsic = require_get_intrinsic();
|
|
1286
|
-
var callBindBasic = require_call_bind_apply_helpers();
|
|
1287
|
-
var $indexOf = callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);
|
|
1288
|
-
module.exports = /* @__PURE__ */ __name(function callBoundIntrinsic(name, allowMissing) {
|
|
1289
|
-
var intrinsic = (
|
|
1290
|
-
/** @type {(this: unknown, ...args: unknown[]) => unknown} */
|
|
1291
|
-
GetIntrinsic(name, !!allowMissing)
|
|
1292
|
-
);
|
|
1293
|
-
if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
|
|
1294
|
-
return callBindBasic(
|
|
1295
|
-
/** @type {const} */
|
|
1296
|
-
[intrinsic]
|
|
1297
|
-
);
|
|
1298
|
-
}
|
|
1299
|
-
return intrinsic;
|
|
1300
|
-
}, "callBoundIntrinsic");
|
|
1301
|
-
}
|
|
1302
|
-
});
|
|
1303
|
-
var require_shams2 = __commonJS({
|
|
1304
|
-
"node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js"(exports, module) {
|
|
1305
|
-
"use strict";
|
|
1306
|
-
var hasSymbols = require_shams();
|
|
1307
|
-
module.exports = /* @__PURE__ */ __name(function hasToStringTagShams() {
|
|
1308
|
-
return hasSymbols() && !!Symbol.toStringTag;
|
|
1309
|
-
}, "hasToStringTagShams");
|
|
1310
|
-
}
|
|
1311
|
-
});
|
|
1312
|
-
var require_is_regex = __commonJS({
|
|
1313
|
-
"node_modules/.pnpm/is-regex@1.2.1/node_modules/is-regex/index.js"(exports, module) {
|
|
1314
|
-
"use strict";
|
|
1315
|
-
var callBound = require_call_bound();
|
|
1316
|
-
var hasToStringTag = require_shams2()();
|
|
1317
|
-
var hasOwn = require_hasown();
|
|
1318
|
-
var gOPD = require_gopd();
|
|
1319
|
-
var fn;
|
|
1320
|
-
if (hasToStringTag) {
|
|
1321
|
-
$exec = callBound("RegExp.prototype.exec");
|
|
1322
|
-
isRegexMarker = {};
|
|
1323
|
-
throwRegexMarker = /* @__PURE__ */ __name(function() {
|
|
1324
|
-
throw isRegexMarker;
|
|
1325
|
-
}, "throwRegexMarker");
|
|
1326
|
-
badStringifier = {
|
|
1327
|
-
toString: throwRegexMarker,
|
|
1328
|
-
valueOf: throwRegexMarker
|
|
1329
|
-
};
|
|
1330
|
-
if (typeof Symbol.toPrimitive === "symbol") {
|
|
1331
|
-
badStringifier[Symbol.toPrimitive] = throwRegexMarker;
|
|
1332
|
-
}
|
|
1333
|
-
fn = /* @__PURE__ */ __name(function isRegex(value) {
|
|
1334
|
-
if (!value || typeof value !== "object") {
|
|
1335
|
-
return false;
|
|
1336
|
-
}
|
|
1337
|
-
var descriptor = (
|
|
1338
|
-
/** @type {NonNullable<typeof gOPD>} */
|
|
1339
|
-
gOPD(
|
|
1340
|
-
/** @type {{ lastIndex?: unknown }} */
|
|
1341
|
-
value,
|
|
1342
|
-
"lastIndex"
|
|
1343
|
-
)
|
|
1344
|
-
);
|
|
1345
|
-
var hasLastIndexDataProperty = descriptor && hasOwn(descriptor, "value");
|
|
1346
|
-
if (!hasLastIndexDataProperty) {
|
|
1347
|
-
return false;
|
|
1348
|
-
}
|
|
1349
|
-
try {
|
|
1350
|
-
$exec(
|
|
1351
|
-
value,
|
|
1352
|
-
/** @type {string} */
|
|
1353
|
-
/** @type {unknown} */
|
|
1354
|
-
badStringifier
|
|
1355
|
-
);
|
|
1356
|
-
} catch (e) {
|
|
1357
|
-
return e === isRegexMarker;
|
|
1358
|
-
}
|
|
1359
|
-
}, "isRegex");
|
|
1360
|
-
} else {
|
|
1361
|
-
$toString = callBound("Object.prototype.toString");
|
|
1362
|
-
regexClass = "[object RegExp]";
|
|
1363
|
-
fn = /* @__PURE__ */ __name(function isRegex(value) {
|
|
1364
|
-
if (!value || typeof value !== "object" && typeof value !== "function") {
|
|
1365
|
-
return false;
|
|
1366
|
-
}
|
|
1367
|
-
return $toString(value) === regexClass;
|
|
1368
|
-
}, "isRegex");
|
|
1369
|
-
}
|
|
1370
|
-
var $exec;
|
|
1371
|
-
var isRegexMarker;
|
|
1372
|
-
var throwRegexMarker;
|
|
1373
|
-
var badStringifier;
|
|
1374
|
-
var $toString;
|
|
1375
|
-
var regexClass;
|
|
1376
|
-
module.exports = fn;
|
|
1377
|
-
}
|
|
1378
|
-
});
|
|
1379
|
-
var require_is_function = __commonJS({
|
|
1380
|
-
"node_modules/.pnpm/is-function@1.0.2/node_modules/is-function/index.js"(exports, module) {
|
|
1381
|
-
module.exports = isFunction3;
|
|
1382
|
-
var toString2 = Object.prototype.toString;
|
|
1383
|
-
function isFunction3(fn) {
|
|
1384
|
-
if (!fn) {
|
|
1385
|
-
return false;
|
|
1386
|
-
}
|
|
1387
|
-
var string = toString2.call(fn);
|
|
1388
|
-
return string === "[object Function]" || typeof fn === "function" && string !== "[object RegExp]" || typeof window !== "undefined" && // IE8 and below
|
|
1389
|
-
(fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt);
|
|
1390
|
-
}
|
|
1391
|
-
__name(isFunction3, "isFunction3");
|
|
1392
|
-
}
|
|
1393
|
-
});
|
|
1394
|
-
var require_safe_regex_test = __commonJS({
|
|
1395
|
-
"node_modules/.pnpm/safe-regex-test@1.1.0/node_modules/safe-regex-test/index.js"(exports, module) {
|
|
1396
|
-
"use strict";
|
|
1397
|
-
var callBound = require_call_bound();
|
|
1398
|
-
var isRegex = require_is_regex();
|
|
1399
|
-
var $exec = callBound("RegExp.prototype.exec");
|
|
1400
|
-
var $TypeError = require_type();
|
|
1401
|
-
module.exports = /* @__PURE__ */ __name(function regexTester(regex) {
|
|
1402
|
-
if (!isRegex(regex)) {
|
|
1403
|
-
throw new $TypeError("`regex` must be a RegExp");
|
|
1404
|
-
}
|
|
1405
|
-
return /* @__PURE__ */ __name(function test(s) {
|
|
1406
|
-
return $exec(regex, s) !== null;
|
|
1407
|
-
}, "test");
|
|
1408
|
-
}, "regexTester");
|
|
1409
|
-
}
|
|
1410
|
-
});
|
|
1411
|
-
var require_is_symbol = __commonJS({
|
|
1412
|
-
"node_modules/.pnpm/is-symbol@1.1.1/node_modules/is-symbol/index.js"(exports, module) {
|
|
1413
|
-
"use strict";
|
|
1414
|
-
var callBound = require_call_bound();
|
|
1415
|
-
var $toString = callBound("Object.prototype.toString");
|
|
1416
|
-
var hasSymbols = require_has_symbols()();
|
|
1417
|
-
var safeRegexTest = require_safe_regex_test();
|
|
1418
|
-
if (hasSymbols) {
|
|
1419
|
-
$symToStr = callBound("Symbol.prototype.toString");
|
|
1420
|
-
isSymString = safeRegexTest(/^Symbol\(.*\)$/);
|
|
1421
|
-
isSymbolObject = /* @__PURE__ */ __name(function isRealSymbolObject(value) {
|
|
1422
|
-
if (typeof value.valueOf() !== "symbol") {
|
|
1423
|
-
return false;
|
|
1424
|
-
}
|
|
1425
|
-
return isSymString($symToStr(value));
|
|
1426
|
-
}, "isRealSymbolObject");
|
|
1427
|
-
module.exports = /* @__PURE__ */ __name(function isSymbol3(value) {
|
|
1428
|
-
if (typeof value === "symbol") {
|
|
1429
|
-
return true;
|
|
1430
|
-
}
|
|
1431
|
-
if (!value || typeof value !== "object" || $toString(value) !== "[object Symbol]") {
|
|
1432
|
-
return false;
|
|
1433
|
-
}
|
|
1434
|
-
try {
|
|
1435
|
-
return isSymbolObject(value);
|
|
1436
|
-
} catch (e) {
|
|
1437
|
-
return false;
|
|
1438
|
-
}
|
|
1439
|
-
}, "isSymbol3");
|
|
1440
|
-
} else {
|
|
1441
|
-
module.exports = /* @__PURE__ */ __name(function isSymbol3(value) {
|
|
1442
|
-
return false;
|
|
1443
|
-
}, "isSymbol3");
|
|
1444
|
-
}
|
|
1445
|
-
var $symToStr;
|
|
1446
|
-
var isSymString;
|
|
1447
|
-
var isSymbolObject;
|
|
1448
|
-
}
|
|
1449
|
-
});
|
|
1450
|
-
var import_is_regex = __toESM(require_is_regex());
|
|
1451
|
-
var import_is_function = __toESM(require_is_function());
|
|
1452
|
-
var import_is_symbol = __toESM(require_is_symbol());
|
|
1453
|
-
function isObject(val) {
|
|
1454
|
-
return val != null && typeof val === "object" && Array.isArray(val) === false;
|
|
1455
|
-
}
|
|
1456
|
-
__name(isObject, "isObject");
|
|
1457
|
-
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
1458
|
-
var freeGlobal_default = freeGlobal;
|
|
1459
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
1460
|
-
var root = freeGlobal_default || freeSelf || Function("return this")();
|
|
1461
|
-
var root_default = root;
|
|
1462
|
-
var Symbol2 = root_default.Symbol;
|
|
1463
|
-
var Symbol_default = Symbol2;
|
|
1464
|
-
var objectProto = Object.prototype;
|
|
1465
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1466
|
-
var nativeObjectToString = objectProto.toString;
|
|
1467
|
-
var symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0;
|
|
1468
|
-
function getRawTag(value) {
|
|
1469
|
-
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
|
1470
|
-
try {
|
|
1471
|
-
value[symToStringTag] = void 0;
|
|
1472
|
-
var unmasked = true;
|
|
1473
|
-
} catch (e) {
|
|
1474
|
-
}
|
|
1475
|
-
var result = nativeObjectToString.call(value);
|
|
1476
|
-
if (unmasked) {
|
|
1477
|
-
if (isOwn) {
|
|
1478
|
-
value[symToStringTag] = tag;
|
|
1479
|
-
} else {
|
|
1480
|
-
delete value[symToStringTag];
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
return result;
|
|
1484
|
-
}
|
|
1485
|
-
__name(getRawTag, "getRawTag");
|
|
1486
|
-
var getRawTag_default = getRawTag;
|
|
1487
|
-
var objectProto2 = Object.prototype;
|
|
1488
|
-
var nativeObjectToString2 = objectProto2.toString;
|
|
1489
|
-
function objectToString(value) {
|
|
1490
|
-
return nativeObjectToString2.call(value);
|
|
1491
|
-
}
|
|
1492
|
-
__name(objectToString, "objectToString");
|
|
1493
|
-
var objectToString_default = objectToString;
|
|
1494
|
-
var nullTag = "[object Null]";
|
|
1495
|
-
var undefinedTag = "[object Undefined]";
|
|
1496
|
-
var symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0;
|
|
1497
|
-
function baseGetTag(value) {
|
|
1498
|
-
if (value == null) {
|
|
1499
|
-
return value === void 0 ? undefinedTag : nullTag;
|
|
1500
|
-
}
|
|
1501
|
-
return symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value);
|
|
1502
|
-
}
|
|
1503
|
-
__name(baseGetTag, "baseGetTag");
|
|
1504
|
-
var baseGetTag_default = baseGetTag;
|
|
1505
|
-
function isObjectLike(value) {
|
|
1506
|
-
return value != null && typeof value == "object";
|
|
1507
|
-
}
|
|
1508
|
-
__name(isObjectLike, "isObjectLike");
|
|
1509
|
-
var isObjectLike_default = isObjectLike;
|
|
1510
|
-
var symbolTag = "[object Symbol]";
|
|
1511
|
-
function isSymbol(value) {
|
|
1512
|
-
return typeof value == "symbol" || isObjectLike_default(value) && baseGetTag_default(value) == symbolTag;
|
|
1513
|
-
}
|
|
1514
|
-
__name(isSymbol, "isSymbol");
|
|
1515
|
-
var isSymbol_default = isSymbol;
|
|
1516
|
-
function arrayMap(array, iteratee) {
|
|
1517
|
-
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
1518
|
-
while (++index < length) {
|
|
1519
|
-
result[index] = iteratee(array[index], index, array);
|
|
1520
|
-
}
|
|
1521
|
-
return result;
|
|
1522
|
-
}
|
|
1523
|
-
__name(arrayMap, "arrayMap");
|
|
1524
|
-
var arrayMap_default = arrayMap;
|
|
1525
|
-
var isArray = Array.isArray;
|
|
1526
|
-
var isArray_default = isArray;
|
|
1527
|
-
var INFINITY = 1 / 0;
|
|
1528
|
-
var symbolProto = Symbol_default ? Symbol_default.prototype : void 0;
|
|
1529
|
-
var symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
1530
|
-
function baseToString(value) {
|
|
1531
|
-
if (typeof value == "string") {
|
|
1532
|
-
return value;
|
|
1533
|
-
}
|
|
1534
|
-
if (isArray_default(value)) {
|
|
1535
|
-
return arrayMap_default(value, baseToString) + "";
|
|
1536
|
-
}
|
|
1537
|
-
if (isSymbol_default(value)) {
|
|
1538
|
-
return symbolToString ? symbolToString.call(value) : "";
|
|
1539
|
-
}
|
|
1540
|
-
var result = value + "";
|
|
1541
|
-
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
1542
|
-
}
|
|
1543
|
-
__name(baseToString, "baseToString");
|
|
1544
|
-
var baseToString_default = baseToString;
|
|
1545
|
-
function isObject2(value) {
|
|
1546
|
-
var type = typeof value;
|
|
1547
|
-
return value != null && (type == "object" || type == "function");
|
|
1548
|
-
}
|
|
1549
|
-
__name(isObject2, "isObject2");
|
|
1550
|
-
var isObject_default = isObject2;
|
|
1551
|
-
var asyncTag = "[object AsyncFunction]";
|
|
1552
|
-
var funcTag = "[object Function]";
|
|
1553
|
-
var genTag = "[object GeneratorFunction]";
|
|
1554
|
-
var proxyTag = "[object Proxy]";
|
|
1555
|
-
function isFunction(value) {
|
|
1556
|
-
if (!isObject_default(value)) {
|
|
1557
|
-
return false;
|
|
1558
|
-
}
|
|
1559
|
-
var tag = baseGetTag_default(value);
|
|
1560
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
1561
|
-
}
|
|
1562
|
-
__name(isFunction, "isFunction");
|
|
1563
|
-
var isFunction_default = isFunction;
|
|
1564
|
-
var coreJsData = root_default["__core-js_shared__"];
|
|
1565
|
-
var coreJsData_default = coreJsData;
|
|
1566
|
-
var maskSrcKey = function() {
|
|
1567
|
-
var uid = /[^.]+$/.exec(coreJsData_default && coreJsData_default.keys && coreJsData_default.keys.IE_PROTO || "");
|
|
1568
|
-
return uid ? "Symbol(src)_1." + uid : "";
|
|
1569
|
-
}();
|
|
1570
|
-
function isMasked(func) {
|
|
1571
|
-
return !!maskSrcKey && maskSrcKey in func;
|
|
1572
|
-
}
|
|
1573
|
-
__name(isMasked, "isMasked");
|
|
1574
|
-
var isMasked_default = isMasked;
|
|
1575
|
-
var funcProto = Function.prototype;
|
|
1576
|
-
var funcToString = funcProto.toString;
|
|
1577
|
-
function toSource(func) {
|
|
1578
|
-
if (func != null) {
|
|
1579
|
-
try {
|
|
1580
|
-
return funcToString.call(func);
|
|
1581
|
-
} catch (e) {
|
|
1582
|
-
}
|
|
1583
|
-
try {
|
|
1584
|
-
return func + "";
|
|
1585
|
-
} catch (e) {
|
|
1586
|
-
}
|
|
1587
|
-
}
|
|
1588
|
-
return "";
|
|
1589
|
-
}
|
|
1590
|
-
__name(toSource, "toSource");
|
|
1591
|
-
var toSource_default = toSource;
|
|
1592
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
1593
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
1594
|
-
var funcProto2 = Function.prototype;
|
|
1595
|
-
var objectProto3 = Object.prototype;
|
|
1596
|
-
var funcToString2 = funcProto2.toString;
|
|
1597
|
-
var hasOwnProperty2 = objectProto3.hasOwnProperty;
|
|
1598
|
-
var reIsNative = RegExp(
|
|
1599
|
-
"^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1600
|
-
);
|
|
1601
|
-
function baseIsNative(value) {
|
|
1602
|
-
if (!isObject_default(value) || isMasked_default(value)) {
|
|
1603
|
-
return false;
|
|
1604
|
-
}
|
|
1605
|
-
var pattern = isFunction_default(value) ? reIsNative : reIsHostCtor;
|
|
1606
|
-
return pattern.test(toSource_default(value));
|
|
1607
|
-
}
|
|
1608
|
-
__name(baseIsNative, "baseIsNative");
|
|
1609
|
-
var baseIsNative_default = baseIsNative;
|
|
1610
|
-
function getValue(object, key) {
|
|
1611
|
-
return object == null ? void 0 : object[key];
|
|
1612
|
-
}
|
|
1613
|
-
__name(getValue, "getValue");
|
|
1614
|
-
var getValue_default = getValue;
|
|
1615
|
-
function getNative(object, key) {
|
|
1616
|
-
var value = getValue_default(object, key);
|
|
1617
|
-
return baseIsNative_default(value) ? value : void 0;
|
|
1618
|
-
}
|
|
1619
|
-
__name(getNative, "getNative");
|
|
1620
|
-
var getNative_default = getNative;
|
|
1621
|
-
function eq(value, other) {
|
|
1622
|
-
return value === other || value !== value && other !== other;
|
|
1623
|
-
}
|
|
1624
|
-
__name(eq, "eq");
|
|
1625
|
-
var eq_default = eq;
|
|
1626
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
|
|
1627
|
-
var reIsPlainProp = /^\w*$/;
|
|
1628
|
-
function isKey(value, object) {
|
|
1629
|
-
if (isArray_default(value)) {
|
|
1630
|
-
return false;
|
|
1631
|
-
}
|
|
1632
|
-
var type = typeof value;
|
|
1633
|
-
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol_default(value)) {
|
|
1634
|
-
return true;
|
|
1635
|
-
}
|
|
1636
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
1637
|
-
}
|
|
1638
|
-
__name(isKey, "isKey");
|
|
1639
|
-
var isKey_default = isKey;
|
|
1640
|
-
var nativeCreate = getNative_default(Object, "create");
|
|
1641
|
-
var nativeCreate_default = nativeCreate;
|
|
1642
|
-
function hashClear() {
|
|
1643
|
-
this.__data__ = nativeCreate_default ? nativeCreate_default(null) : {};
|
|
1644
|
-
this.size = 0;
|
|
1645
|
-
}
|
|
1646
|
-
__name(hashClear, "hashClear");
|
|
1647
|
-
var hashClear_default = hashClear;
|
|
1648
|
-
function hashDelete(key) {
|
|
1649
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
1650
|
-
this.size -= result ? 1 : 0;
|
|
1651
|
-
return result;
|
|
1652
|
-
}
|
|
1653
|
-
__name(hashDelete, "hashDelete");
|
|
1654
|
-
var hashDelete_default = hashDelete;
|
|
1655
|
-
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
1656
|
-
var objectProto4 = Object.prototype;
|
|
1657
|
-
var hasOwnProperty3 = objectProto4.hasOwnProperty;
|
|
1658
|
-
function hashGet(key) {
|
|
1659
|
-
var data = this.__data__;
|
|
1660
|
-
if (nativeCreate_default) {
|
|
1661
|
-
var result = data[key];
|
|
1662
|
-
return result === HASH_UNDEFINED ? void 0 : result;
|
|
1663
|
-
}
|
|
1664
|
-
return hasOwnProperty3.call(data, key) ? data[key] : void 0;
|
|
1665
|
-
}
|
|
1666
|
-
__name(hashGet, "hashGet");
|
|
1667
|
-
var hashGet_default = hashGet;
|
|
1668
|
-
var objectProto5 = Object.prototype;
|
|
1669
|
-
var hasOwnProperty4 = objectProto5.hasOwnProperty;
|
|
1670
|
-
function hashHas(key) {
|
|
1671
|
-
var data = this.__data__;
|
|
1672
|
-
return nativeCreate_default ? data[key] !== void 0 : hasOwnProperty4.call(data, key);
|
|
1673
|
-
}
|
|
1674
|
-
__name(hashHas, "hashHas");
|
|
1675
|
-
var hashHas_default = hashHas;
|
|
1676
|
-
var HASH_UNDEFINED2 = "__lodash_hash_undefined__";
|
|
1677
|
-
function hashSet(key, value) {
|
|
1678
|
-
var data = this.__data__;
|
|
1679
|
-
this.size += this.has(key) ? 0 : 1;
|
|
1680
|
-
data[key] = nativeCreate_default && value === void 0 ? HASH_UNDEFINED2 : value;
|
|
1681
|
-
return this;
|
|
1682
|
-
}
|
|
1683
|
-
__name(hashSet, "hashSet");
|
|
1684
|
-
var hashSet_default = hashSet;
|
|
1685
|
-
function Hash(entries) {
|
|
1686
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
1687
|
-
this.clear();
|
|
1688
|
-
while (++index < length) {
|
|
1689
|
-
var entry = entries[index];
|
|
1690
|
-
this.set(entry[0], entry[1]);
|
|
1691
|
-
}
|
|
1692
|
-
}
|
|
1693
|
-
__name(Hash, "Hash");
|
|
1694
|
-
Hash.prototype.clear = hashClear_default;
|
|
1695
|
-
Hash.prototype["delete"] = hashDelete_default;
|
|
1696
|
-
Hash.prototype.get = hashGet_default;
|
|
1697
|
-
Hash.prototype.has = hashHas_default;
|
|
1698
|
-
Hash.prototype.set = hashSet_default;
|
|
1699
|
-
var Hash_default = Hash;
|
|
1700
|
-
function listCacheClear() {
|
|
1701
|
-
this.__data__ = [];
|
|
1702
|
-
this.size = 0;
|
|
1703
|
-
}
|
|
1704
|
-
__name(listCacheClear, "listCacheClear");
|
|
1705
|
-
var listCacheClear_default = listCacheClear;
|
|
1706
|
-
function assocIndexOf(array, key) {
|
|
1707
|
-
var length = array.length;
|
|
1708
|
-
while (length--) {
|
|
1709
|
-
if (eq_default(array[length][0], key)) {
|
|
1710
|
-
return length;
|
|
1711
|
-
}
|
|
1712
|
-
}
|
|
1713
|
-
return -1;
|
|
1714
|
-
}
|
|
1715
|
-
__name(assocIndexOf, "assocIndexOf");
|
|
1716
|
-
var assocIndexOf_default = assocIndexOf;
|
|
1717
|
-
var arrayProto = Array.prototype;
|
|
1718
|
-
var splice = arrayProto.splice;
|
|
1719
|
-
function listCacheDelete(key) {
|
|
1720
|
-
var data = this.__data__, index = assocIndexOf_default(data, key);
|
|
1721
|
-
if (index < 0) {
|
|
1722
|
-
return false;
|
|
1723
|
-
}
|
|
1724
|
-
var lastIndex = data.length - 1;
|
|
1725
|
-
if (index == lastIndex) {
|
|
1726
|
-
data.pop();
|
|
1727
|
-
} else {
|
|
1728
|
-
splice.call(data, index, 1);
|
|
1729
|
-
}
|
|
1730
|
-
--this.size;
|
|
1731
|
-
return true;
|
|
1732
|
-
}
|
|
1733
|
-
__name(listCacheDelete, "listCacheDelete");
|
|
1734
|
-
var listCacheDelete_default = listCacheDelete;
|
|
1735
|
-
function listCacheGet(key) {
|
|
1736
|
-
var data = this.__data__, index = assocIndexOf_default(data, key);
|
|
1737
|
-
return index < 0 ? void 0 : data[index][1];
|
|
1738
|
-
}
|
|
1739
|
-
__name(listCacheGet, "listCacheGet");
|
|
1740
|
-
var listCacheGet_default = listCacheGet;
|
|
1741
|
-
function listCacheHas(key) {
|
|
1742
|
-
return assocIndexOf_default(this.__data__, key) > -1;
|
|
1743
|
-
}
|
|
1744
|
-
__name(listCacheHas, "listCacheHas");
|
|
1745
|
-
var listCacheHas_default = listCacheHas;
|
|
1746
|
-
function listCacheSet(key, value) {
|
|
1747
|
-
var data = this.__data__, index = assocIndexOf_default(data, key);
|
|
1748
|
-
if (index < 0) {
|
|
1749
|
-
++this.size;
|
|
1750
|
-
data.push([key, value]);
|
|
1751
|
-
} else {
|
|
1752
|
-
data[index][1] = value;
|
|
1753
|
-
}
|
|
1754
|
-
return this;
|
|
1755
|
-
}
|
|
1756
|
-
__name(listCacheSet, "listCacheSet");
|
|
1757
|
-
var listCacheSet_default = listCacheSet;
|
|
1758
|
-
function ListCache(entries) {
|
|
1759
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
1760
|
-
this.clear();
|
|
1761
|
-
while (++index < length) {
|
|
1762
|
-
var entry = entries[index];
|
|
1763
|
-
this.set(entry[0], entry[1]);
|
|
1764
|
-
}
|
|
1765
|
-
}
|
|
1766
|
-
__name(ListCache, "ListCache");
|
|
1767
|
-
ListCache.prototype.clear = listCacheClear_default;
|
|
1768
|
-
ListCache.prototype["delete"] = listCacheDelete_default;
|
|
1769
|
-
ListCache.prototype.get = listCacheGet_default;
|
|
1770
|
-
ListCache.prototype.has = listCacheHas_default;
|
|
1771
|
-
ListCache.prototype.set = listCacheSet_default;
|
|
1772
|
-
var ListCache_default = ListCache;
|
|
1773
|
-
var Map2 = getNative_default(root_default, "Map");
|
|
1774
|
-
var Map_default = Map2;
|
|
1775
|
-
function mapCacheClear() {
|
|
1776
|
-
this.size = 0;
|
|
1777
|
-
this.__data__ = {
|
|
1778
|
-
"hash": new Hash_default(),
|
|
1779
|
-
"map": new (Map_default || ListCache_default)(),
|
|
1780
|
-
"string": new Hash_default()
|
|
1781
|
-
};
|
|
1782
|
-
}
|
|
1783
|
-
__name(mapCacheClear, "mapCacheClear");
|
|
1784
|
-
var mapCacheClear_default = mapCacheClear;
|
|
1785
|
-
function isKeyable(value) {
|
|
1786
|
-
var type = typeof value;
|
|
1787
|
-
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
1788
|
-
}
|
|
1789
|
-
__name(isKeyable, "isKeyable");
|
|
1790
|
-
var isKeyable_default = isKeyable;
|
|
1791
|
-
function getMapData(map, key) {
|
|
1792
|
-
var data = map.__data__;
|
|
1793
|
-
return isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
1794
|
-
}
|
|
1795
|
-
__name(getMapData, "getMapData");
|
|
1796
|
-
var getMapData_default = getMapData;
|
|
1797
|
-
function mapCacheDelete(key) {
|
|
1798
|
-
var result = getMapData_default(this, key)["delete"](key);
|
|
1799
|
-
this.size -= result ? 1 : 0;
|
|
1800
|
-
return result;
|
|
1801
|
-
}
|
|
1802
|
-
__name(mapCacheDelete, "mapCacheDelete");
|
|
1803
|
-
var mapCacheDelete_default = mapCacheDelete;
|
|
1804
|
-
function mapCacheGet(key) {
|
|
1805
|
-
return getMapData_default(this, key).get(key);
|
|
1806
|
-
}
|
|
1807
|
-
__name(mapCacheGet, "mapCacheGet");
|
|
1808
|
-
var mapCacheGet_default = mapCacheGet;
|
|
1809
|
-
function mapCacheHas(key) {
|
|
1810
|
-
return getMapData_default(this, key).has(key);
|
|
1811
|
-
}
|
|
1812
|
-
__name(mapCacheHas, "mapCacheHas");
|
|
1813
|
-
var mapCacheHas_default = mapCacheHas;
|
|
1814
|
-
function mapCacheSet(key, value) {
|
|
1815
|
-
var data = getMapData_default(this, key), size = data.size;
|
|
1816
|
-
data.set(key, value);
|
|
1817
|
-
this.size += data.size == size ? 0 : 1;
|
|
1818
|
-
return this;
|
|
1819
|
-
}
|
|
1820
|
-
__name(mapCacheSet, "mapCacheSet");
|
|
1821
|
-
var mapCacheSet_default = mapCacheSet;
|
|
1822
|
-
function MapCache(entries) {
|
|
1823
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
1824
|
-
this.clear();
|
|
1825
|
-
while (++index < length) {
|
|
1826
|
-
var entry = entries[index];
|
|
1827
|
-
this.set(entry[0], entry[1]);
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
__name(MapCache, "MapCache");
|
|
1831
|
-
MapCache.prototype.clear = mapCacheClear_default;
|
|
1832
|
-
MapCache.prototype["delete"] = mapCacheDelete_default;
|
|
1833
|
-
MapCache.prototype.get = mapCacheGet_default;
|
|
1834
|
-
MapCache.prototype.has = mapCacheHas_default;
|
|
1835
|
-
MapCache.prototype.set = mapCacheSet_default;
|
|
1836
|
-
var MapCache_default = MapCache;
|
|
1837
|
-
var FUNC_ERROR_TEXT = "Expected a function";
|
|
1838
|
-
function memoize(func, resolver) {
|
|
1839
|
-
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
|
|
1840
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1841
|
-
}
|
|
1842
|
-
var memoized = /* @__PURE__ */ __name(function() {
|
|
1843
|
-
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
1844
|
-
if (cache.has(key)) {
|
|
1845
|
-
return cache.get(key);
|
|
1846
|
-
}
|
|
1847
|
-
var result = func.apply(this, args);
|
|
1848
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
1849
|
-
return result;
|
|
1850
|
-
}, "memoized");
|
|
1851
|
-
memoized.cache = new (memoize.Cache || MapCache_default)();
|
|
1852
|
-
return memoized;
|
|
1853
|
-
}
|
|
1854
|
-
__name(memoize, "memoize");
|
|
1855
|
-
memoize.Cache = MapCache_default;
|
|
1856
|
-
var memoize_default = memoize;
|
|
1857
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
1858
|
-
function memoizeCapped(func) {
|
|
1859
|
-
var result = memoize_default(func, function(key) {
|
|
1860
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
1861
|
-
cache.clear();
|
|
1862
|
-
}
|
|
1863
|
-
return key;
|
|
1864
|
-
});
|
|
1865
|
-
var cache = result.cache;
|
|
1866
|
-
return result;
|
|
1867
|
-
}
|
|
1868
|
-
__name(memoizeCapped, "memoizeCapped");
|
|
1869
|
-
var memoizeCapped_default = memoizeCapped;
|
|
1870
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
1871
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
1872
|
-
var stringToPath = memoizeCapped_default(function(string) {
|
|
1873
|
-
var result = [];
|
|
1874
|
-
if (string.charCodeAt(0) === 46) {
|
|
1875
|
-
result.push("");
|
|
1876
|
-
}
|
|
1877
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
1878
|
-
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
|
|
1879
|
-
});
|
|
1880
|
-
return result;
|
|
1881
|
-
});
|
|
1882
|
-
var stringToPath_default = stringToPath;
|
|
1883
|
-
function toString(value) {
|
|
1884
|
-
return value == null ? "" : baseToString_default(value);
|
|
1885
|
-
}
|
|
1886
|
-
__name(toString, "toString");
|
|
1887
|
-
var toString_default = toString;
|
|
1888
|
-
function castPath(value, object) {
|
|
1889
|
-
if (isArray_default(value)) {
|
|
1890
|
-
return value;
|
|
1891
|
-
}
|
|
1892
|
-
return isKey_default(value, object) ? [value] : stringToPath_default(toString_default(value));
|
|
1893
|
-
}
|
|
1894
|
-
__name(castPath, "castPath");
|
|
1895
|
-
var castPath_default = castPath;
|
|
1896
|
-
var INFINITY2 = 1 / 0;
|
|
1897
|
-
function toKey(value) {
|
|
1898
|
-
if (typeof value == "string" || isSymbol_default(value)) {
|
|
1899
|
-
return value;
|
|
1900
|
-
}
|
|
1901
|
-
var result = value + "";
|
|
1902
|
-
return result == "0" && 1 / value == -INFINITY2 ? "-0" : result;
|
|
1903
|
-
}
|
|
1904
|
-
__name(toKey, "toKey");
|
|
1905
|
-
var toKey_default = toKey;
|
|
1906
|
-
function baseGet(object, path) {
|
|
1907
|
-
path = castPath_default(path, object);
|
|
1908
|
-
var index = 0, length = path.length;
|
|
1909
|
-
while (object != null && index < length) {
|
|
1910
|
-
object = object[toKey_default(path[index++])];
|
|
1911
|
-
}
|
|
1912
|
-
return index && index == length ? object : void 0;
|
|
1913
|
-
}
|
|
1914
|
-
__name(baseGet, "baseGet");
|
|
1915
|
-
var baseGet_default = baseGet;
|
|
1916
|
-
function get(object, path, defaultValue) {
|
|
1917
|
-
var result = object == null ? void 0 : baseGet_default(object, path);
|
|
1918
|
-
return result === void 0 ? defaultValue : result;
|
|
1919
|
-
}
|
|
1920
|
-
__name(get, "get");
|
|
1921
|
-
var get_default = get;
|
|
1922
|
-
var isObject3 = isObject;
|
|
1923
|
-
var dateFormat = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/;
|
|
1924
|
-
var isJSON = /* @__PURE__ */ __name((input) => input.match(/^[\[\{\"\}].*[\]\}\"]$/), "isJSON");
|
|
1925
|
-
function convertUnconventionalData(data) {
|
|
1926
|
-
if (!isObject3(data)) {
|
|
1927
|
-
return data;
|
|
1928
|
-
}
|
|
1929
|
-
let result = data;
|
|
1930
|
-
let wasMutated = false;
|
|
1931
|
-
if (typeof Event !== "undefined" && data instanceof Event) {
|
|
1932
|
-
result = extractEventHiddenProperties(result);
|
|
1933
|
-
wasMutated = true;
|
|
1934
|
-
}
|
|
1935
|
-
result = Object.keys(result).reduce((acc, key) => {
|
|
1936
|
-
try {
|
|
1937
|
-
if (result[key]) {
|
|
1938
|
-
result[key].toJSON;
|
|
1939
|
-
}
|
|
1940
|
-
acc[key] = result[key];
|
|
1941
|
-
} catch (_err) {
|
|
1942
|
-
wasMutated = true;
|
|
1943
|
-
}
|
|
1944
|
-
return acc;
|
|
1945
|
-
}, {});
|
|
1946
|
-
return wasMutated ? result : data;
|
|
1947
|
-
}
|
|
1948
|
-
__name(convertUnconventionalData, "convertUnconventionalData");
|
|
1949
|
-
var replacer = /* @__PURE__ */ __name(function replacer2(options) {
|
|
1950
|
-
let objects;
|
|
1951
|
-
let map;
|
|
1952
|
-
let stack;
|
|
1953
|
-
let keys;
|
|
1954
|
-
return /* @__PURE__ */ __name(function replace(key, value) {
|
|
1955
|
-
try {
|
|
1956
|
-
if (key === "") {
|
|
1957
|
-
keys = [];
|
|
1958
|
-
objects = /* @__PURE__ */ new Map([[value, "[]"]]);
|
|
1959
|
-
map = /* @__PURE__ */ new Map();
|
|
1960
|
-
stack = [];
|
|
1961
|
-
return value;
|
|
1962
|
-
}
|
|
1963
|
-
const origin = map.get(this) || this;
|
|
1964
|
-
while (stack.length && origin !== stack[0]) {
|
|
1965
|
-
stack.shift();
|
|
1966
|
-
keys.pop();
|
|
1967
|
-
}
|
|
1968
|
-
if (typeof value === "boolean") {
|
|
1969
|
-
return value;
|
|
1970
|
-
}
|
|
1971
|
-
if (value === void 0) {
|
|
1972
|
-
if (!options.allowUndefined) {
|
|
1973
|
-
return void 0;
|
|
1974
|
-
}
|
|
1975
|
-
return "_undefined_";
|
|
1976
|
-
}
|
|
1977
|
-
if (value === null) {
|
|
1978
|
-
return null;
|
|
1979
|
-
}
|
|
1980
|
-
if (typeof value === "number") {
|
|
1981
|
-
if (value === Number.NEGATIVE_INFINITY) {
|
|
1982
|
-
return "_-Infinity_";
|
|
1983
|
-
}
|
|
1984
|
-
if (value === Number.POSITIVE_INFINITY) {
|
|
1985
|
-
return "_Infinity_";
|
|
1986
|
-
}
|
|
1987
|
-
if (Number.isNaN(value)) {
|
|
1988
|
-
return "_NaN_";
|
|
1989
|
-
}
|
|
1990
|
-
return value;
|
|
1991
|
-
}
|
|
1992
|
-
if (typeof value === "bigint") {
|
|
1993
|
-
return `_bigint_${value.toString()}`;
|
|
1994
|
-
}
|
|
1995
|
-
if (typeof value === "string") {
|
|
1996
|
-
if (dateFormat.test(value)) {
|
|
1997
|
-
if (!options.allowDate) {
|
|
1998
|
-
return void 0;
|
|
1999
|
-
}
|
|
2000
|
-
return `_date_${value}`;
|
|
2001
|
-
}
|
|
2002
|
-
return value;
|
|
2003
|
-
}
|
|
2004
|
-
if ((0, import_is_regex.default)(value)) {
|
|
2005
|
-
if (!options.allowRegExp) {
|
|
2006
|
-
return void 0;
|
|
2007
|
-
}
|
|
2008
|
-
return `_regexp_${value.flags}|${value.source}`;
|
|
2009
|
-
}
|
|
2010
|
-
if ((0, import_is_function.default)(value)) {
|
|
2011
|
-
return void 0;
|
|
2012
|
-
}
|
|
2013
|
-
if ((0, import_is_symbol.default)(value)) {
|
|
2014
|
-
if (!options.allowSymbol) {
|
|
2015
|
-
return void 0;
|
|
2016
|
-
}
|
|
2017
|
-
const globalRegistryKey = Symbol.keyFor(value);
|
|
2018
|
-
if (globalRegistryKey !== void 0) {
|
|
2019
|
-
return `_gsymbol_${globalRegistryKey}`;
|
|
2020
|
-
}
|
|
2021
|
-
return `_symbol_${value.toString().slice(7, -1)}`;
|
|
2022
|
-
}
|
|
2023
|
-
if (stack.length >= options.maxDepth) {
|
|
2024
|
-
if (Array.isArray(value)) {
|
|
2025
|
-
return `[Array(${value.length})]`;
|
|
2026
|
-
}
|
|
2027
|
-
return "[Object]";
|
|
2028
|
-
}
|
|
2029
|
-
if (value === this) {
|
|
2030
|
-
return `_duplicate_${JSON.stringify(keys)}`;
|
|
2031
|
-
}
|
|
2032
|
-
if (value instanceof Error && options.allowError) {
|
|
2033
|
-
return {
|
|
2034
|
-
__isConvertedError__: true,
|
|
2035
|
-
errorProperties: {
|
|
2036
|
-
// @ts-expect-error cause is not defined in the current tsconfig target(es2020)
|
|
2037
|
-
...value.cause ? { cause: value.cause } : {},
|
|
2038
|
-
...value,
|
|
2039
|
-
name: value.name,
|
|
2040
|
-
message: value.message,
|
|
2041
|
-
stack: value.stack,
|
|
2042
|
-
"_constructor-name_": value.constructor.name
|
|
2043
|
-
}
|
|
2044
|
-
};
|
|
2045
|
-
}
|
|
2046
|
-
if (value?.constructor?.name && value.constructor.name !== "Object" && !Array.isArray(value)) {
|
|
2047
|
-
const found2 = objects.get(value);
|
|
2048
|
-
if (!found2) {
|
|
2049
|
-
const plainObject = {
|
|
2050
|
-
__isClassInstance__: true,
|
|
2051
|
-
__className__: value.constructor.name,
|
|
2052
|
-
...Object.getOwnPropertyNames(value).reduce(
|
|
2053
|
-
(acc, prop) => {
|
|
2054
|
-
try {
|
|
2055
|
-
acc[prop] = value[prop];
|
|
2056
|
-
} catch (_err) {
|
|
2057
|
-
}
|
|
2058
|
-
return acc;
|
|
2059
|
-
},
|
|
2060
|
-
{}
|
|
2061
|
-
)
|
|
2062
|
-
};
|
|
2063
|
-
keys.push(key);
|
|
2064
|
-
stack.unshift(plainObject);
|
|
2065
|
-
objects.set(value, JSON.stringify(keys));
|
|
2066
|
-
if (value !== plainObject) {
|
|
2067
|
-
map.set(value, plainObject);
|
|
2068
|
-
}
|
|
2069
|
-
return plainObject;
|
|
2070
|
-
}
|
|
2071
|
-
return `_duplicate_${found2}`;
|
|
2072
|
-
}
|
|
2073
|
-
const found = objects.get(value);
|
|
2074
|
-
if (!found) {
|
|
2075
|
-
const converted = Array.isArray(value) ? value : convertUnconventionalData(value);
|
|
2076
|
-
keys.push(key);
|
|
2077
|
-
stack.unshift(converted);
|
|
2078
|
-
objects.set(value, JSON.stringify(keys));
|
|
2079
|
-
if (value !== converted) {
|
|
2080
|
-
map.set(value, converted);
|
|
2081
|
-
}
|
|
2082
|
-
return converted;
|
|
2083
|
-
}
|
|
2084
|
-
return `_duplicate_${found}`;
|
|
2085
|
-
} catch (_e) {
|
|
2086
|
-
return void 0;
|
|
2087
|
-
}
|
|
2088
|
-
}, "replace");
|
|
2089
|
-
}, "replacer2");
|
|
2090
|
-
var reviver = /* @__PURE__ */ __name(function reviver2(options) {
|
|
2091
|
-
const refs = [];
|
|
2092
|
-
let root2;
|
|
2093
|
-
return /* @__PURE__ */ __name(function revive(key, value) {
|
|
2094
|
-
if (key === "") {
|
|
2095
|
-
root2 = value;
|
|
2096
|
-
refs.forEach(({ target, container, replacement }) => {
|
|
2097
|
-
const replacementArr = isJSON(replacement) ? JSON.parse(replacement) : replacement.split(".");
|
|
2098
|
-
if (replacementArr.length === 0) {
|
|
2099
|
-
container[target] = root2;
|
|
2100
|
-
} else {
|
|
2101
|
-
container[target] = get_default(root2, replacementArr);
|
|
2102
|
-
}
|
|
2103
|
-
});
|
|
2104
|
-
}
|
|
2105
|
-
if (key === "_constructor-name_") {
|
|
2106
|
-
return value;
|
|
2107
|
-
}
|
|
2108
|
-
if (isObject3(value) && value.__isConvertedError__) {
|
|
2109
|
-
const { message, ...properties } = value.errorProperties;
|
|
2110
|
-
const error = new Error(message);
|
|
2111
|
-
Object.assign(error, properties);
|
|
2112
|
-
return error;
|
|
2113
|
-
}
|
|
2114
|
-
if (typeof value === "string" && value.startsWith("_regexp_") && options.allowRegExp) {
|
|
2115
|
-
const [, flags, source] = value.match(/_regexp_([^|]*)\|(.*)/) || [];
|
|
2116
|
-
return new RegExp(source, flags);
|
|
2117
|
-
}
|
|
2118
|
-
if (typeof value === "string" && value.startsWith("_date_") && options.allowDate) {
|
|
2119
|
-
return new Date(value.replace("_date_", ""));
|
|
2120
|
-
}
|
|
2121
|
-
if (typeof value === "string" && value.startsWith("_duplicate_")) {
|
|
2122
|
-
refs.push({ target: key, container: this, replacement: value.replace(/^_duplicate_/, "") });
|
|
2123
|
-
return null;
|
|
2124
|
-
}
|
|
2125
|
-
if (typeof value === "string" && value.startsWith("_symbol_") && options.allowSymbol) {
|
|
2126
|
-
return Symbol(value.replace("_symbol_", ""));
|
|
2127
|
-
}
|
|
2128
|
-
if (typeof value === "string" && value.startsWith("_gsymbol_") && options.allowSymbol) {
|
|
2129
|
-
return Symbol.for(value.replace("_gsymbol_", ""));
|
|
2130
|
-
}
|
|
2131
|
-
if (typeof value === "string" && value === "_-Infinity_") {
|
|
2132
|
-
return Number.NEGATIVE_INFINITY;
|
|
2133
|
-
}
|
|
2134
|
-
if (typeof value === "string" && value === "_Infinity_") {
|
|
2135
|
-
return Number.POSITIVE_INFINITY;
|
|
2136
|
-
}
|
|
2137
|
-
if (typeof value === "string" && value === "_NaN_") {
|
|
2138
|
-
return Number.NaN;
|
|
2139
|
-
}
|
|
2140
|
-
if (typeof value === "string" && value.startsWith("_bigint_") && typeof BigInt === "function") {
|
|
2141
|
-
return BigInt(value.replace("_bigint_", ""));
|
|
2142
|
-
}
|
|
2143
|
-
return value;
|
|
2144
|
-
}, "revive");
|
|
2145
|
-
}, "reviver2");
|
|
2146
|
-
var defaultOptions = {
|
|
2147
|
-
maxDepth: 10,
|
|
2148
|
-
space: void 0,
|
|
2149
|
-
allowRegExp: true,
|
|
2150
|
-
allowDate: true,
|
|
2151
|
-
allowError: true,
|
|
2152
|
-
allowUndefined: true,
|
|
2153
|
-
allowSymbol: true
|
|
2154
|
-
};
|
|
2155
|
-
var stringify = /* @__PURE__ */ __name((data, options = {}) => {
|
|
2156
|
-
const mergedOptions = { ...defaultOptions, ...options };
|
|
2157
|
-
return JSON.stringify(convertUnconventionalData(data), replacer(mergedOptions), options.space);
|
|
2158
|
-
}, "stringify");
|
|
2159
|
-
var mutator = /* @__PURE__ */ __name(() => {
|
|
2160
|
-
const mutated = /* @__PURE__ */ new Map();
|
|
2161
|
-
return /* @__PURE__ */ __name(function mutateUndefined(value) {
|
|
2162
|
-
if (isObject3(value)) {
|
|
2163
|
-
Object.entries(value).forEach(([k, v]) => {
|
|
2164
|
-
if (v === "_undefined_") {
|
|
2165
|
-
value[k] = void 0;
|
|
2166
|
-
} else if (!mutated.get(v)) {
|
|
2167
|
-
mutated.set(v, true);
|
|
2168
|
-
mutateUndefined(v);
|
|
2169
|
-
}
|
|
2170
|
-
});
|
|
2171
|
-
}
|
|
2172
|
-
if (Array.isArray(value)) {
|
|
2173
|
-
value.forEach((v, index) => {
|
|
2174
|
-
if (v === "_undefined_") {
|
|
2175
|
-
mutated.set(v, true);
|
|
2176
|
-
value[index] = void 0;
|
|
2177
|
-
} else if (!mutated.get(v)) {
|
|
2178
|
-
mutated.set(v, true);
|
|
2179
|
-
mutateUndefined(v);
|
|
2180
|
-
}
|
|
2181
|
-
});
|
|
2182
|
-
}
|
|
2183
|
-
}, "mutateUndefined");
|
|
2184
|
-
}, "mutator");
|
|
2185
|
-
var parse = /* @__PURE__ */ __name((data, options = {}) => {
|
|
2186
|
-
const mergedOptions = { ...defaultOptions, ...options };
|
|
2187
|
-
const result = JSON.parse(data, reviver(mergedOptions));
|
|
2188
|
-
mutator()(result);
|
|
2189
|
-
return result;
|
|
2190
|
-
}, "parse");
|
|
2191
|
-
|
|
2192
|
-
export {
|
|
2193
|
-
UniversalStore,
|
|
2194
|
-
isJSON,
|
|
2195
|
-
stringify,
|
|
2196
|
-
parse
|
|
2197
|
-
};
|