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