storybook 9.0.0-alpha.11 → 9.0.0-alpha.13
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/highlight.png +0 -0
- package/bin/index.cjs +2 -2
- package/dist/actions/preview.d.ts +0 -1
- 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 +49 -61
- package/dist/bin/index.js +49 -61
- package/dist/builder-manager/index.cjs +390 -380
- package/dist/builder-manager/index.js +489 -479
- package/dist/channels/index.cjs +17 -17
- package/dist/channels/index.js +3 -3
- package/dist/cli/bin/index.cjs +225 -225
- package/dist/cli/bin/index.js +234 -234
- package/dist/cli/index.cjs +1904 -1909
- package/dist/cli/index.d.ts +3 -7
- package/dist/cli/index.js +734 -739
- package/dist/common/index.cjs +2401 -2388
- package/dist/common/index.d.ts +1 -13
- package/dist/common/index.js +2609 -2596
- package/dist/components/index.cjs +5701 -5946
- package/dist/components/index.d.ts +3 -254
- package/dist/components/index.js +7271 -13724
- package/dist/controls/preview.d.ts +0 -1
- 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 +5221 -5122
- package/dist/core-server/index.d.ts +32 -23
- package/dist/core-server/index.js +6511 -6412
- package/dist/core-server/presets/common-manager.js +9815 -12
- package/dist/core-server/presets/common-preset.cjs +2817 -2989
- package/dist/core-server/presets/common-preset.js +2896 -3068
- package/dist/csf/index.d.ts +0 -2
- package/dist/csf-tools/index.cjs +0 -8
- package/dist/csf-tools/index.d.ts +0 -4
- package/dist/csf-tools/index.js +0 -8
- package/dist/docs-tools/index.cjs +626 -600
- package/dist/docs-tools/index.js +613 -587
- package/dist/highlight/index.cjs +27 -0
- package/dist/highlight/index.d.ts +17 -0
- package/dist/highlight/index.js +7 -0
- package/dist/highlight/preview.cjs +81 -0
- package/dist/highlight/preview.d.ts +54 -0
- package/dist/highlight/preview.js +67 -0
- package/dist/instrumenter/index.cjs +70 -60
- package/dist/instrumenter/index.d.ts +8 -7
- package/dist/instrumenter/index.js +98 -88
- package/dist/manager/globals-module-info.cjs +21 -33
- package/dist/manager/globals-module-info.js +6 -18
- package/dist/manager/globals-runtime.js +22671 -22006
- package/dist/manager/runtime.js +4996 -4581
- package/dist/manager-api/index.cjs +1289 -1384
- package/dist/manager-api/index.d.ts +109 -114
- package/dist/manager-api/index.js +920 -1021
- package/dist/measure/index.cjs +474 -0
- package/dist/measure/index.d.ts +66 -0
- package/dist/measure/index.js +462 -0
- package/dist/measure/preview.cjs +464 -0
- package/dist/measure/preview.d.ts +59 -0
- package/dist/measure/preview.js +448 -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 +14340 -13357
- package/dist/preview-api/index.cjs +1201 -1321
- package/dist/preview-api/index.d.ts +66 -120
- package/dist/preview-api/index.js +1546 -1665
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/test/index.cjs +1547 -1546
- package/dist/test/index.js +2308 -2307
- package/dist/test/preview.cjs +1906 -1905
- package/dist/test/preview.d.ts +0 -6
- package/dist/test/preview.js +1439 -1438
- 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 +502 -298
- package/dist/types/index.js +1 -2
- package/dist/viewport/preview.d.ts +0 -1
- package/package.json +124 -19
- package/dist/actions/manager.js +0 -1196
- package/dist/component-testing/manager.js +0 -3099
- package/dist/controls/manager.js +0 -5545
- package/dist/viewport/manager.js +0 -400
- /package/dist/{component-testing/manager.css → core-server/presets/common-manager.css} +0 -0
|
@@ -4,51 +4,51 @@ import { dirname as ESM_COMPAT_dirname } from 'node:path';
|
|
|
4
4
|
const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
|
|
5
5
|
const __dirname = ESM_COMPAT_dirname(__filename);
|
|
6
6
|
const require = ESM_COMPAT_Module.createRequire(import.meta.url);
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var o = (e, i) =>
|
|
7
|
+
var Lt = Object.create;
|
|
8
|
+
var A = Object.defineProperty;
|
|
9
|
+
var Ct = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var At = Object.getOwnPropertyNames;
|
|
11
|
+
var Nt = Object.getPrototypeOf, Dt = Object.prototype.hasOwnProperty;
|
|
12
|
+
var o = (e, i) => A(e, "name", { value: i, configurable: !0 }), S = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "\
|
|
13
13
|
u" ? new Proxy(e, {
|
|
14
14
|
get: (i, t) => (typeof require < "u" ? require : i)[t]
|
|
15
15
|
}) : e)(function(e) {
|
|
16
16
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
17
17
|
throw Error('Dynamic require of "' + e + '" is not supported');
|
|
18
18
|
});
|
|
19
|
-
var
|
|
20
|
-
var
|
|
19
|
+
var q = (e, i) => () => (e && (i = e(e = 0)), i);
|
|
20
|
+
var N = (e, i) => () => (i || e((i = { exports: {} }).exports, i), i.exports), $ = (e, i) => {
|
|
21
21
|
for (var t in i)
|
|
22
|
-
|
|
23
|
-
}, fe = (e, i, t,
|
|
22
|
+
A(e, t, { get: i[t], enumerable: !0 });
|
|
23
|
+
}, fe = (e, i, t, a) => {
|
|
24
24
|
if (i && typeof i == "object" || typeof i == "function")
|
|
25
|
-
for (let
|
|
26
|
-
!
|
|
25
|
+
for (let r of At(i))
|
|
26
|
+
!Dt.call(e, r) && r !== t && A(e, r, { get: () => i[r], enumerable: !(a = Ct(i, r)) || a.enumerable });
|
|
27
27
|
return e;
|
|
28
28
|
};
|
|
29
|
-
var V = (e, i, t) => (t = e != null ?
|
|
29
|
+
var V = (e, i, t) => (t = e != null ? Lt(Nt(e)) : {}, fe(
|
|
30
30
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
31
|
// file that has been converted to a CommonJS file using a Babel-
|
|
32
32
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
33
33
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
34
|
-
i || !e || !e.__esModule ?
|
|
34
|
+
i || !e || !e.__esModule ? A(t, "default", { value: e, enumerable: !0 }) : t,
|
|
35
35
|
e
|
|
36
|
-
)),
|
|
36
|
+
)), W = (e) => fe(A({}, "__esModule", { value: !0 }), e);
|
|
37
37
|
|
|
38
38
|
// ../node_modules/tslib/tslib.es6.mjs
|
|
39
39
|
var He = {};
|
|
40
|
-
|
|
40
|
+
$(He, {
|
|
41
41
|
__addDisposableResource: () => qe,
|
|
42
|
-
__assign: () =>
|
|
42
|
+
__assign: () => H,
|
|
43
43
|
__asyncDelegator: () => Le,
|
|
44
44
|
__asyncGenerator: () => Re,
|
|
45
45
|
__asyncValues: () => Ce,
|
|
46
|
-
__await: () =>
|
|
46
|
+
__await: () => R,
|
|
47
47
|
__awaiter: () => Ee,
|
|
48
48
|
__classPrivateFieldGet: () => Ie,
|
|
49
49
|
__classPrivateFieldIn: () => ze,
|
|
50
50
|
__classPrivateFieldSet: () => Me,
|
|
51
|
-
__createBinding: () =>
|
|
51
|
+
__createBinding: () => J,
|
|
52
52
|
__decorate: () => ye,
|
|
53
53
|
__disposeResources: () => $e,
|
|
54
54
|
__esDecorate: () => we,
|
|
@@ -69,8 +69,8 @@ q(He, {
|
|
|
69
69
|
__spread: () => ke,
|
|
70
70
|
__spreadArray: () => Fe,
|
|
71
71
|
__spreadArrays: () => Te,
|
|
72
|
-
__values: () =>
|
|
73
|
-
default: () =>
|
|
72
|
+
__values: () => B,
|
|
73
|
+
default: () => $t
|
|
74
74
|
});
|
|
75
75
|
function xe(e, i) {
|
|
76
76
|
if (typeof i != "function" && i !== null)
|
|
@@ -83,34 +83,34 @@ function xe(e, i) {
|
|
|
83
83
|
}
|
|
84
84
|
function he(e, i) {
|
|
85
85
|
var t = {};
|
|
86
|
-
for (var
|
|
86
|
+
for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && i.indexOf(a) < 0 && (t[a] = e[a]);
|
|
87
87
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
88
|
-
for (var
|
|
89
|
-
i.indexOf(r
|
|
88
|
+
for (var r = 0, a = Object.getOwnPropertySymbols(e); r < a.length; r++)
|
|
89
|
+
i.indexOf(a[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[r]) && (t[a[r]] = e[a[r]]);
|
|
90
90
|
return t;
|
|
91
91
|
}
|
|
92
|
-
function ye(e, i, t,
|
|
93
|
-
var
|
|
94
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") n = Reflect.decorate(e, i, t,
|
|
95
|
-
else for (var c = e.length - 1; c >= 0; c--) (s = e[c]) && (n = (
|
|
96
|
-
return
|
|
92
|
+
function ye(e, i, t, a) {
|
|
93
|
+
var r = arguments.length, n = r < 3 ? i : a === null ? a = Object.getOwnPropertyDescriptor(i, t) : a, s;
|
|
94
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") n = Reflect.decorate(e, i, t, a);
|
|
95
|
+
else for (var c = e.length - 1; c >= 0; c--) (s = e[c]) && (n = (r < 3 ? s(n) : r > 3 ? s(i, t, n) : s(i, t)) || n);
|
|
96
|
+
return r > 3 && n && Object.defineProperty(i, t, n), n;
|
|
97
97
|
}
|
|
98
98
|
function ve(e, i) {
|
|
99
|
-
return function(t,
|
|
100
|
-
i(t,
|
|
99
|
+
return function(t, a) {
|
|
100
|
+
i(t, a, e);
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function we(e, i, t,
|
|
103
|
+
function we(e, i, t, a, r, n) {
|
|
104
104
|
function s(v) {
|
|
105
105
|
if (v !== void 0 && typeof v != "function") throw new TypeError("Function expected");
|
|
106
106
|
return v;
|
|
107
107
|
}
|
|
108
108
|
o(s, "accept");
|
|
109
|
-
for (var c =
|
|
110
|
-
(l ? Object.getOwnPropertyDescriptor(l,
|
|
109
|
+
for (var c = a.kind, p = c === "getter" ? "get" : c === "setter" ? "set" : "value", l = !i && e ? a.static ? e : e.prototype : null, u = i ||
|
|
110
|
+
(l ? Object.getOwnPropertyDescriptor(l, a.name) : {}), d, x = !1, g = t.length - 1; g >= 0; g--) {
|
|
111
111
|
var m = {};
|
|
112
|
-
for (var f in
|
|
113
|
-
for (var f in
|
|
112
|
+
for (var f in a) m[f] = f === "access" ? {} : a[f];
|
|
113
|
+
for (var f in a.access) m.access[f] = a.access[f];
|
|
114
114
|
m.addInitializer = function(v) {
|
|
115
115
|
if (x) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
116
116
|
n.push(s(v || null));
|
|
@@ -119,15 +119,15 @@ function we(e, i, t, r, a, n) {
|
|
|
119
119
|
if (c === "accessor") {
|
|
120
120
|
if (y === void 0) continue;
|
|
121
121
|
if (y === null || typeof y != "object") throw new TypeError("Object expected");
|
|
122
|
-
(d = s(y.get)) && (u.get = d), (d = s(y.set)) && (u.set = d), (d = s(y.init)) &&
|
|
123
|
-
} else (d = s(y)) && (c === "field" ?
|
|
122
|
+
(d = s(y.get)) && (u.get = d), (d = s(y.set)) && (u.set = d), (d = s(y.init)) && r.unshift(d);
|
|
123
|
+
} else (d = s(y)) && (c === "field" ? r.unshift(d) : u[p] = d);
|
|
124
124
|
}
|
|
125
|
-
l && Object.defineProperty(l,
|
|
125
|
+
l && Object.defineProperty(l, a.name, u), x = !0;
|
|
126
126
|
}
|
|
127
127
|
function be(e, i, t) {
|
|
128
|
-
for (var
|
|
129
|
-
t =
|
|
130
|
-
return
|
|
128
|
+
for (var a = arguments.length > 2, r = 0; r < i.length; r++)
|
|
129
|
+
t = a ? i[r].call(e, t) : i[r].call(e);
|
|
130
|
+
return a ? t : void 0;
|
|
131
131
|
}
|
|
132
132
|
function _e(e) {
|
|
133
133
|
return typeof e == "symbol" ? e : "".concat(e);
|
|
@@ -139,16 +139,16 @@ function je(e, i, t) {
|
|
|
139
139
|
function Oe(e, i) {
|
|
140
140
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, i);
|
|
141
141
|
}
|
|
142
|
-
function Ee(e, i, t,
|
|
143
|
-
function
|
|
142
|
+
function Ee(e, i, t, a) {
|
|
143
|
+
function r(n) {
|
|
144
144
|
return n instanceof t ? n : new t(function(s) {
|
|
145
145
|
s(n);
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
return o(
|
|
148
|
+
return o(r, "adopt"), new (t || (t = Promise))(function(n, s) {
|
|
149
149
|
function c(u) {
|
|
150
150
|
try {
|
|
151
|
-
l(
|
|
151
|
+
l(a.next(u));
|
|
152
152
|
} catch (d) {
|
|
153
153
|
s(d);
|
|
154
154
|
}
|
|
@@ -156,23 +156,23 @@ function Ee(e, i, t, r) {
|
|
|
156
156
|
o(c, "fulfilled");
|
|
157
157
|
function p(u) {
|
|
158
158
|
try {
|
|
159
|
-
l(
|
|
159
|
+
l(a.throw(u));
|
|
160
160
|
} catch (d) {
|
|
161
161
|
s(d);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
o(p, "rejected");
|
|
165
165
|
function l(u) {
|
|
166
|
-
u.done ? n(u.value) :
|
|
166
|
+
u.done ? n(u.value) : r(u.value).then(c, p);
|
|
167
167
|
}
|
|
168
|
-
o(l, "step"), l((
|
|
168
|
+
o(l, "step"), l((a = a.apply(e, i || [])).next());
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
function Pe(e, i) {
|
|
172
172
|
var t = { label: 0, sent: /* @__PURE__ */ o(function() {
|
|
173
173
|
if (n[0] & 1) throw n[1];
|
|
174
174
|
return n[1];
|
|
175
|
-
}, "sent"), trys: [], ops: [] },
|
|
175
|
+
}, "sent"), trys: [], ops: [] }, a, r, n, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
176
176
|
return s.next = c(0), s.throw = c(1), s.return = c(2), typeof Symbol == "function" && (s[Symbol.iterator] = function() {
|
|
177
177
|
return this;
|
|
178
178
|
}), s;
|
|
@@ -182,11 +182,11 @@ function Pe(e, i) {
|
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
184
|
function p(l) {
|
|
185
|
-
if (
|
|
185
|
+
if (a) throw new TypeError("Generator is already executing.");
|
|
186
186
|
for (; s && (s = 0, l[0] && (t = 0)), t; ) try {
|
|
187
|
-
if (
|
|
187
|
+
if (a = 1, r && (n = l[0] & 2 ? r.return : l[0] ? r.throw || ((n = r.return) && n.call(r), 0) : r.next) && !(n = n.call(r, l[1])).done)
|
|
188
188
|
return n;
|
|
189
|
-
switch (
|
|
189
|
+
switch (r = 0, n && (l = [l[0] & 2, n.value]), l[0]) {
|
|
190
190
|
case 0:
|
|
191
191
|
case 1:
|
|
192
192
|
n = l;
|
|
@@ -194,7 +194,7 @@ function Pe(e, i) {
|
|
|
194
194
|
case 4:
|
|
195
195
|
return t.label++, { value: l[1], done: !1 };
|
|
196
196
|
case 5:
|
|
197
|
-
t.label++,
|
|
197
|
+
t.label++, r = l[1], l = [0];
|
|
198
198
|
continue;
|
|
199
199
|
case 7:
|
|
200
200
|
l = t.ops.pop(), t.trys.pop();
|
|
@@ -221,23 +221,23 @@ function Pe(e, i) {
|
|
|
221
221
|
}
|
|
222
222
|
l = i.call(e, t);
|
|
223
223
|
} catch (u) {
|
|
224
|
-
l = [6, u],
|
|
224
|
+
l = [6, u], r = 0;
|
|
225
225
|
} finally {
|
|
226
|
-
|
|
226
|
+
a = n = 0;
|
|
227
227
|
}
|
|
228
228
|
if (l[0] & 5) throw l[1];
|
|
229
229
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
function Se(e, i) {
|
|
233
|
-
for (var t in e) t !== "default" && !Object.prototype.hasOwnProperty.call(i, t) &&
|
|
233
|
+
for (var t in e) t !== "default" && !Object.prototype.hasOwnProperty.call(i, t) && J(i, e, t);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
var i = typeof Symbol == "function" && Symbol.iterator, t = i && e[i],
|
|
235
|
+
function B(e) {
|
|
236
|
+
var i = typeof Symbol == "function" && Symbol.iterator, t = i && e[i], a = 0;
|
|
237
237
|
if (t) return t.call(e);
|
|
238
238
|
if (e && typeof e.length == "number") return {
|
|
239
239
|
next: /* @__PURE__ */ o(function() {
|
|
240
|
-
return e &&
|
|
240
|
+
return e && a >= e.length && (e = void 0), { value: e && e[a++], done: !e };
|
|
241
241
|
}, "next")
|
|
242
242
|
};
|
|
243
243
|
throw new TypeError(i ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
@@ -245,14 +245,14 @@ function H(e) {
|
|
|
245
245
|
function ee(e, i) {
|
|
246
246
|
var t = typeof Symbol == "function" && e[Symbol.iterator];
|
|
247
247
|
if (!t) return e;
|
|
248
|
-
var
|
|
248
|
+
var a = t.call(e), r, n = [], s;
|
|
249
249
|
try {
|
|
250
|
-
for (; (i === void 0 || i-- > 0) && !(
|
|
250
|
+
for (; (i === void 0 || i-- > 0) && !(r = a.next()).done; ) n.push(r.value);
|
|
251
251
|
} catch (c) {
|
|
252
252
|
s = { error: c };
|
|
253
253
|
} finally {
|
|
254
254
|
try {
|
|
255
|
-
|
|
255
|
+
r && !r.done && (t = a.return) && t.call(a);
|
|
256
256
|
} finally {
|
|
257
257
|
if (s) throw s.error;
|
|
258
258
|
}
|
|
@@ -266,47 +266,47 @@ function ke() {
|
|
|
266
266
|
}
|
|
267
267
|
function Te() {
|
|
268
268
|
for (var e = 0, i = 0, t = arguments.length; i < t; i++) e += arguments[i].length;
|
|
269
|
-
for (var
|
|
270
|
-
for (var n = arguments[i], s = 0, c = n.length; s < c; s++,
|
|
271
|
-
r
|
|
272
|
-
return
|
|
269
|
+
for (var a = Array(e), r = 0, i = 0; i < t; i++)
|
|
270
|
+
for (var n = arguments[i], s = 0, c = n.length; s < c; s++, r++)
|
|
271
|
+
a[r] = n[s];
|
|
272
|
+
return a;
|
|
273
273
|
}
|
|
274
274
|
function Fe(e, i, t) {
|
|
275
|
-
if (t || arguments.length === 2) for (var
|
|
276
|
-
(n || !(
|
|
275
|
+
if (t || arguments.length === 2) for (var a = 0, r = i.length, n; a < r; a++)
|
|
276
|
+
(n || !(a in i)) && (n || (n = Array.prototype.slice.call(i, 0, a)), n[a] = i[a]);
|
|
277
277
|
return e.concat(n || Array.prototype.slice.call(i));
|
|
278
278
|
}
|
|
279
|
-
function
|
|
280
|
-
return this instanceof
|
|
279
|
+
function R(e) {
|
|
280
|
+
return this instanceof R ? (this.v = e, this) : new R(e);
|
|
281
281
|
}
|
|
282
282
|
function Re(e, i, t) {
|
|
283
283
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
284
|
-
var
|
|
285
|
-
return
|
|
284
|
+
var a = t.apply(e, i || []), r, n = [];
|
|
285
|
+
return r = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), c("next"), c("throw"), c("return", s), r[Symbol.
|
|
286
286
|
asyncIterator] = function() {
|
|
287
287
|
return this;
|
|
288
|
-
},
|
|
288
|
+
}, r;
|
|
289
289
|
function s(g) {
|
|
290
290
|
return function(m) {
|
|
291
291
|
return Promise.resolve(m).then(g, d);
|
|
292
292
|
};
|
|
293
293
|
}
|
|
294
294
|
function c(g, m) {
|
|
295
|
-
|
|
295
|
+
a[g] && (r[g] = function(f) {
|
|
296
296
|
return new Promise(function(y, v) {
|
|
297
297
|
n.push([g, f, y, v]) > 1 || p(g, f);
|
|
298
298
|
});
|
|
299
|
-
}, m && (
|
|
299
|
+
}, m && (r[g] = m(r[g])));
|
|
300
300
|
}
|
|
301
301
|
function p(g, m) {
|
|
302
302
|
try {
|
|
303
|
-
l(
|
|
303
|
+
l(a[g](m));
|
|
304
304
|
} catch (f) {
|
|
305
305
|
x(n[0][3], f);
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
function l(g) {
|
|
309
|
-
g.value instanceof
|
|
309
|
+
g.value instanceof R ? Promise.resolve(g.value.v).then(u, d) : x(n[0][2], g);
|
|
310
310
|
}
|
|
311
311
|
function u(g) {
|
|
312
312
|
p("next", g);
|
|
@@ -320,32 +320,32 @@ function Re(e, i, t) {
|
|
|
320
320
|
}
|
|
321
321
|
function Le(e) {
|
|
322
322
|
var i, t;
|
|
323
|
-
return i = {},
|
|
324
|
-
throw
|
|
325
|
-
}),
|
|
323
|
+
return i = {}, a("next"), a("throw", function(r) {
|
|
324
|
+
throw r;
|
|
325
|
+
}), a("return"), i[Symbol.iterator] = function() {
|
|
326
326
|
return this;
|
|
327
327
|
}, i;
|
|
328
|
-
function r
|
|
329
|
-
i[
|
|
330
|
-
return (t = !t) ? { value:
|
|
328
|
+
function a(r, n) {
|
|
329
|
+
i[r] = e[r] ? function(s) {
|
|
330
|
+
return (t = !t) ? { value: R(e[r](s)), done: !1 } : n ? n(s) : s;
|
|
331
331
|
} : n;
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
function Ce(e) {
|
|
335
335
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
336
336
|
var i = e[Symbol.asyncIterator], t;
|
|
337
|
-
return i ? i.call(e) : (e = typeof
|
|
337
|
+
return i ? i.call(e) : (e = typeof B == "function" ? B(e) : e[Symbol.iterator](), t = {}, a("next"), a("throw"), a("return"), t[Symbol.asyncIterator] =
|
|
338
338
|
function() {
|
|
339
339
|
return this;
|
|
340
340
|
}, t);
|
|
341
|
-
function
|
|
341
|
+
function a(n) {
|
|
342
342
|
t[n] = e[n] && function(s) {
|
|
343
343
|
return new Promise(function(c, p) {
|
|
344
|
-
s = e[n](s),
|
|
344
|
+
s = e[n](s), r(c, p, s.done, s.value);
|
|
345
345
|
});
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function r(n, s, c, p) {
|
|
349
349
|
Promise.resolve(p).then(function(l) {
|
|
350
350
|
n({ value: l, done: c });
|
|
351
351
|
}, s);
|
|
@@ -357,24 +357,24 @@ function Ae(e, i) {
|
|
|
357
357
|
function Ne(e) {
|
|
358
358
|
if (e && e.__esModule) return e;
|
|
359
359
|
var i = {};
|
|
360
|
-
if (e != null) for (var t = Q(e),
|
|
361
|
-
return
|
|
360
|
+
if (e != null) for (var t = Q(e), a = 0; a < t.length; a++) t[a] !== "default" && J(i, e, t[a]);
|
|
361
|
+
return zt(i, e), i;
|
|
362
362
|
}
|
|
363
363
|
function De(e) {
|
|
364
364
|
return e && e.__esModule ? e : { default: e };
|
|
365
365
|
}
|
|
366
|
-
function Ie(e, i, t,
|
|
367
|
-
if (t === "a" && !
|
|
368
|
-
if (typeof i == "function" ? e !== i || !
|
|
366
|
+
function Ie(e, i, t, a) {
|
|
367
|
+
if (t === "a" && !a) throw new TypeError("Private accessor was defined without a getter");
|
|
368
|
+
if (typeof i == "function" ? e !== i || !a : !i.has(e)) throw new TypeError("Cannot read private member from an object whose class did not\
|
|
369
369
|
declare it");
|
|
370
|
-
return t === "m" ?
|
|
370
|
+
return t === "m" ? a : t === "a" ? a.call(e) : a ? a.value : i.get(e);
|
|
371
371
|
}
|
|
372
|
-
function Me(e, i, t,
|
|
373
|
-
if (
|
|
374
|
-
if (
|
|
375
|
-
if (typeof i == "function" ? e !== i || !
|
|
372
|
+
function Me(e, i, t, a, r) {
|
|
373
|
+
if (a === "m") throw new TypeError("Private method is not writable");
|
|
374
|
+
if (a === "a" && !r) throw new TypeError("Private accessor was defined without a setter");
|
|
375
|
+
if (typeof i == "function" ? e !== i || !r : !i.has(e)) throw new TypeError("Cannot write private member to an object whose class did not \
|
|
376
376
|
declare it");
|
|
377
|
-
return
|
|
377
|
+
return a === "a" ? r.call(e, t) : r ? r.value = t : i.set(e, t), t;
|
|
378
378
|
}
|
|
379
379
|
function ze(e, i) {
|
|
380
380
|
if (i === null || typeof i != "object" && typeof i != "function") throw new TypeError("Cannot use 'in' operator on non-object");
|
|
@@ -383,72 +383,72 @@ function ze(e, i) {
|
|
|
383
383
|
function qe(e, i, t) {
|
|
384
384
|
if (i != null) {
|
|
385
385
|
if (typeof i != "object" && typeof i != "function") throw new TypeError("Object expected.");
|
|
386
|
-
var
|
|
386
|
+
var a, r;
|
|
387
387
|
if (t) {
|
|
388
388
|
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
389
|
-
|
|
389
|
+
a = i[Symbol.asyncDispose];
|
|
390
390
|
}
|
|
391
|
-
if (
|
|
391
|
+
if (a === void 0) {
|
|
392
392
|
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
393
|
-
|
|
393
|
+
a = i[Symbol.dispose], t && (r = a);
|
|
394
394
|
}
|
|
395
|
-
if (typeof
|
|
396
|
-
|
|
395
|
+
if (typeof a != "function") throw new TypeError("Object not disposable.");
|
|
396
|
+
r && (a = /* @__PURE__ */ o(function() {
|
|
397
397
|
try {
|
|
398
|
-
|
|
398
|
+
r.call(this);
|
|
399
399
|
} catch (n) {
|
|
400
400
|
return Promise.reject(n);
|
|
401
401
|
}
|
|
402
|
-
}, "dispose")), e.stack.push({ value: i, dispose:
|
|
402
|
+
}, "dispose")), e.stack.push({ value: i, dispose: a, async: t });
|
|
403
403
|
} else t && e.stack.push({ async: !0 });
|
|
404
404
|
return i;
|
|
405
405
|
}
|
|
406
406
|
function $e(e) {
|
|
407
407
|
function i(n) {
|
|
408
|
-
e.error = e.hasError ? new
|
|
408
|
+
e.error = e.hasError ? new qt(n, e.error, "An error was suppressed during disposal.") : n, e.hasError = !0;
|
|
409
409
|
}
|
|
410
410
|
o(i, "fail");
|
|
411
|
-
var t,
|
|
412
|
-
function
|
|
411
|
+
var t, a = 0;
|
|
412
|
+
function r() {
|
|
413
413
|
for (; t = e.stack.pop(); )
|
|
414
414
|
try {
|
|
415
|
-
if (!t.async &&
|
|
415
|
+
if (!t.async && a === 1) return a = 0, e.stack.push(t), Promise.resolve().then(r);
|
|
416
416
|
if (t.dispose) {
|
|
417
417
|
var n = t.dispose.call(t.value);
|
|
418
|
-
if (t.async) return
|
|
419
|
-
return i(s),
|
|
418
|
+
if (t.async) return a |= 2, Promise.resolve(n).then(r, function(s) {
|
|
419
|
+
return i(s), r();
|
|
420
420
|
});
|
|
421
|
-
} else
|
|
421
|
+
} else a |= 1;
|
|
422
422
|
} catch (s) {
|
|
423
423
|
i(s);
|
|
424
424
|
}
|
|
425
|
-
if (
|
|
425
|
+
if (a === 1) return e.hasError ? Promise.reject(e.error) : Promise.resolve();
|
|
426
426
|
if (e.hasError) throw e.error;
|
|
427
427
|
}
|
|
428
|
-
return o(
|
|
428
|
+
return o(r, "next"), r();
|
|
429
429
|
}
|
|
430
430
|
function We(e, i) {
|
|
431
|
-
return typeof e == "string" && /^\.\.?\//.test(e) ? e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(t,
|
|
432
|
-
return
|
|
431
|
+
return typeof e == "string" && /^\.\.?\//.test(e) ? e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(t, a, r, n, s) {
|
|
432
|
+
return a ? i ? ".jsx" : ".js" : r && (!n || !s) ? t : r + n + "." + s.toLowerCase() + "js";
|
|
433
433
|
}) : e;
|
|
434
434
|
}
|
|
435
|
-
var Y,
|
|
435
|
+
var Y, H, J, zt, Q, qt, $t, Be = q(() => {
|
|
436
436
|
Y = /* @__PURE__ */ o(function(e, i) {
|
|
437
|
-
return Y = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t,
|
|
438
|
-
t.__proto__ =
|
|
439
|
-
} || function(t,
|
|
440
|
-
for (var
|
|
437
|
+
return Y = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, a) {
|
|
438
|
+
t.__proto__ = a;
|
|
439
|
+
} || function(t, a) {
|
|
440
|
+
for (var r in a) Object.prototype.hasOwnProperty.call(a, r) && (t[r] = a[r]);
|
|
441
441
|
}, Y(e, i);
|
|
442
442
|
}, "extendStatics");
|
|
443
443
|
o(xe, "__extends");
|
|
444
|
-
|
|
445
|
-
return
|
|
446
|
-
for (var t,
|
|
447
|
-
t = arguments[
|
|
444
|
+
H = /* @__PURE__ */ o(function() {
|
|
445
|
+
return H = Object.assign || /* @__PURE__ */ o(function(i) {
|
|
446
|
+
for (var t, a = 1, r = arguments.length; a < r; a++) {
|
|
447
|
+
t = arguments[a];
|
|
448
448
|
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (i[n] = t[n]);
|
|
449
449
|
}
|
|
450
450
|
return i;
|
|
451
|
-
}, "__assign"),
|
|
451
|
+
}, "__assign"), H.apply(this, arguments);
|
|
452
452
|
}, "__assign");
|
|
453
453
|
o(he, "__rest");
|
|
454
454
|
o(ye, "__decorate");
|
|
@@ -460,34 +460,34 @@ var Y, W, B, Mt, Q, zt, qt, Be = z(() => {
|
|
|
460
460
|
o(Oe, "__metadata");
|
|
461
461
|
o(Ee, "__awaiter");
|
|
462
462
|
o(Pe, "__generator");
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
var
|
|
466
|
-
(!
|
|
463
|
+
J = Object.create ? function(e, i, t, a) {
|
|
464
|
+
a === void 0 && (a = t);
|
|
465
|
+
var r = Object.getOwnPropertyDescriptor(i, t);
|
|
466
|
+
(!r || ("get" in r ? !i.__esModule : r.writable || r.configurable)) && (r = { enumerable: !0, get: /* @__PURE__ */ o(function() {
|
|
467
467
|
return i[t];
|
|
468
|
-
}, "get") }), Object.defineProperty(e,
|
|
469
|
-
} : function(e, i, t,
|
|
470
|
-
|
|
468
|
+
}, "get") }), Object.defineProperty(e, a, r);
|
|
469
|
+
} : function(e, i, t, a) {
|
|
470
|
+
a === void 0 && (a = t), e[a] = i[t];
|
|
471
471
|
};
|
|
472
472
|
o(Se, "__exportStar");
|
|
473
|
-
o(
|
|
473
|
+
o(B, "__values");
|
|
474
474
|
o(ee, "__read");
|
|
475
475
|
o(ke, "__spread");
|
|
476
476
|
o(Te, "__spreadArrays");
|
|
477
477
|
o(Fe, "__spreadArray");
|
|
478
|
-
o(
|
|
478
|
+
o(R, "__await");
|
|
479
479
|
o(Re, "__asyncGenerator");
|
|
480
480
|
o(Le, "__asyncDelegator");
|
|
481
481
|
o(Ce, "__asyncValues");
|
|
482
482
|
o(Ae, "__makeTemplateObject");
|
|
483
|
-
|
|
483
|
+
zt = Object.create ? function(e, i) {
|
|
484
484
|
Object.defineProperty(e, "default", { enumerable: !0, value: i });
|
|
485
485
|
} : function(e, i) {
|
|
486
486
|
e.default = i;
|
|
487
487
|
}, Q = /* @__PURE__ */ o(function(e) {
|
|
488
488
|
return Q = Object.getOwnPropertyNames || function(i) {
|
|
489
489
|
var t = [];
|
|
490
|
-
for (var
|
|
490
|
+
for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (t[t.length] = a);
|
|
491
491
|
return t;
|
|
492
492
|
}, Q(e);
|
|
493
493
|
}, "ownKeys");
|
|
@@ -497,15 +497,15 @@ var Y, W, B, Mt, Q, zt, qt, Be = z(() => {
|
|
|
497
497
|
o(Me, "__classPrivateFieldSet");
|
|
498
498
|
o(ze, "__classPrivateFieldIn");
|
|
499
499
|
o(qe, "__addDisposableResource");
|
|
500
|
-
|
|
501
|
-
var
|
|
502
|
-
return
|
|
500
|
+
qt = typeof SuppressedError == "function" ? SuppressedError : function(e, i, t) {
|
|
501
|
+
var a = new Error(t);
|
|
502
|
+
return a.name = "SuppressedError", a.error = e, a.suppressed = i, a;
|
|
503
503
|
};
|
|
504
504
|
o($e, "__disposeResources");
|
|
505
505
|
o(We, "__rewriteRelativeImportExtension");
|
|
506
|
-
|
|
506
|
+
$t = {
|
|
507
507
|
__extends: xe,
|
|
508
|
-
__assign:
|
|
508
|
+
__assign: H,
|
|
509
509
|
__rest: he,
|
|
510
510
|
__decorate: ye,
|
|
511
511
|
__param: ve,
|
|
@@ -516,14 +516,14 @@ var Y, W, B, Mt, Q, zt, qt, Be = z(() => {
|
|
|
516
516
|
__metadata: Oe,
|
|
517
517
|
__awaiter: Ee,
|
|
518
518
|
__generator: Pe,
|
|
519
|
-
__createBinding:
|
|
519
|
+
__createBinding: J,
|
|
520
520
|
__exportStar: Se,
|
|
521
|
-
__values:
|
|
521
|
+
__values: B,
|
|
522
522
|
__read: ee,
|
|
523
523
|
__spread: ke,
|
|
524
524
|
__spreadArrays: Te,
|
|
525
525
|
__spreadArray: Fe,
|
|
526
|
-
__await:
|
|
526
|
+
__await: R,
|
|
527
527
|
__asyncGenerator: Re,
|
|
528
528
|
__asyncDelegator: Le,
|
|
529
529
|
__asyncValues: Ce,
|
|
@@ -540,20 +540,20 @@ var Y, W, B, Mt, Q, zt, qt, Be = z(() => {
|
|
|
540
540
|
});
|
|
541
541
|
|
|
542
542
|
// ../node_modules/@yarnpkg/esbuild-plugin-pnp/lib/index.js
|
|
543
|
-
var Ue =
|
|
543
|
+
var Ue = N((U) => {
|
|
544
544
|
"use strict";
|
|
545
|
-
Object.defineProperty(
|
|
546
|
-
|
|
547
|
-
var Je = (Be(),
|
|
545
|
+
Object.defineProperty(U, "__esModule", { value: !0 });
|
|
546
|
+
U.pnpPlugin = void 0;
|
|
547
|
+
var Je = (Be(), W(He)), Wt = Je.__importStar(S("fs")), Ht = Je.__importDefault(S("path")), Bt = /()/, Jt = [".tsx", ".ts", ".jsx", ".mjs",
|
|
548
548
|
".cjs", ".js", ".css", ".json"];
|
|
549
|
-
function
|
|
549
|
+
function Ut(e) {
|
|
550
550
|
return e.map((i) => {
|
|
551
551
|
let t = i.indexOf("*");
|
|
552
552
|
return t !== -1 ? { prefix: i.slice(0, t), suffix: i.slice(t + 1) } : i;
|
|
553
553
|
});
|
|
554
554
|
}
|
|
555
|
-
o(
|
|
556
|
-
function
|
|
555
|
+
o(Ut, "parseExternals");
|
|
556
|
+
function Gt(e, i) {
|
|
557
557
|
for (let t of i)
|
|
558
558
|
if (typeof t == "object") {
|
|
559
559
|
if (e.length >= t.prefix.length + t.suffix.length && e.startsWith(t.prefix) && e.endsWith(t.suffix))
|
|
@@ -563,36 +563,36 @@ var Ue = A((J) => {
|
|
|
563
563
|
return !0;
|
|
564
564
|
return !1;
|
|
565
565
|
}
|
|
566
|
-
o(
|
|
567
|
-
async function
|
|
566
|
+
o(Gt, "isExternal");
|
|
567
|
+
async function Vt(e) {
|
|
568
568
|
return {
|
|
569
|
-
contents: await
|
|
569
|
+
contents: await Wt.promises.readFile(e.path),
|
|
570
570
|
loader: "default",
|
|
571
571
|
// For regular imports in the `file` namespace, resolveDir is the directory the
|
|
572
572
|
// file being resolved lives in. For all other virtual modules, this defaults to
|
|
573
573
|
// empty string: ""
|
|
574
574
|
// A sensible value for pnp imports is the same as the `file` namespace, as pnp
|
|
575
575
|
// still resolves to files on disk (in the cache).
|
|
576
|
-
resolveDir:
|
|
576
|
+
resolveDir: Ht.default.dirname(e.path)
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
-
o(
|
|
580
|
-
async function
|
|
581
|
-
let
|
|
579
|
+
o(Vt, "defaultOnLoad");
|
|
580
|
+
async function Xt(e, { resolvedPath: i, error: t, watchFiles: a }) {
|
|
581
|
+
let r = t ? [{ text: t.message }] : [], n;
|
|
582
582
|
switch (e.kind) {
|
|
583
583
|
case "require-call":
|
|
584
584
|
case "require-resolve":
|
|
585
585
|
case "dynamic-import":
|
|
586
|
-
n = { warnings:
|
|
586
|
+
n = { warnings: r };
|
|
587
587
|
break;
|
|
588
588
|
default:
|
|
589
|
-
n = { errors:
|
|
589
|
+
n = { errors: r };
|
|
590
590
|
break;
|
|
591
591
|
}
|
|
592
|
-
return i !== null ? { namespace: "pnp", path: i, watchFiles:
|
|
592
|
+
return i !== null ? { namespace: "pnp", path: i, watchFiles: a } : { external: !0, ...n, watchFiles: a };
|
|
593
593
|
}
|
|
594
|
-
o(
|
|
595
|
-
function
|
|
594
|
+
o(Xt, "defaultOnResolve");
|
|
595
|
+
function Kt({ baseDir: e = process.cwd(), extensions: i = Jt, filter: t = Bt, onResolve: a = Xt, onLoad: r = Vt } = {}) {
|
|
596
596
|
return {
|
|
597
597
|
name: "@yarnpkg/esbuild-plugin-pnp",
|
|
598
598
|
setup(n) {
|
|
@@ -600,7 +600,7 @@ var Ue = A((J) => {
|
|
|
600
600
|
let { findPnpApi: p } = S("module");
|
|
601
601
|
if (typeof p > "u")
|
|
602
602
|
return;
|
|
603
|
-
let l =
|
|
603
|
+
let l = Ut((s = n.initialOptions.external) !== null && s !== void 0 ? s : []), u = (c = n.initialOptions.platform) !== null && c !==
|
|
604
604
|
void 0 ? c : "browser", d = u === "node", x = new Set(n.initialOptions.conditions);
|
|
605
605
|
x.add("default"), (u === "browser" || u === "node") && x.add(u);
|
|
606
606
|
let g = new Set(x);
|
|
@@ -608,7 +608,7 @@ var Ue = A((J) => {
|
|
|
608
608
|
let m = new Set(x);
|
|
609
609
|
m.add("require"), n.onResolve({ filter: t }, (f) => {
|
|
610
610
|
var y, v;
|
|
611
|
-
if (
|
|
611
|
+
if (Gt(f.path, l))
|
|
612
612
|
return { external: !0 };
|
|
613
613
|
let _ = x;
|
|
614
614
|
f.kind === "dynamic-import" || f.kind === "import-statement" ? _ = g : (f.kind === "require-call" || f.kind === "require-resolve") &&
|
|
@@ -623,77 +623,77 @@ var Ue = A((J) => {
|
|
|
623
623
|
considerBuiltins: d,
|
|
624
624
|
extensions: i
|
|
625
625
|
});
|
|
626
|
-
} catch (
|
|
627
|
-
P =
|
|
626
|
+
} catch (z) {
|
|
627
|
+
P = z;
|
|
628
628
|
}
|
|
629
629
|
let T = [w.resolveRequest("pnpapi", null)];
|
|
630
630
|
if (E) {
|
|
631
|
-
let
|
|
632
|
-
if (
|
|
633
|
-
let G = w.getPackageInformation(
|
|
631
|
+
let z = w.findPackageLocator(E);
|
|
632
|
+
if (z) {
|
|
633
|
+
let G = w.getPackageInformation(z);
|
|
634
634
|
G?.linkType === "SOFT" && T.push((v = (y = w.resolveVirtual) === null || y === void 0 ? void 0 : y.call(w, E)) !== null && v !==
|
|
635
635
|
void 0 ? v : E);
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
|
-
return
|
|
639
|
-
}), n.onLoad !== null && n.onLoad({ filter: t },
|
|
638
|
+
return a(f, { resolvedPath: E, error: P, watchFiles: T });
|
|
639
|
+
}), n.onLoad !== null && n.onLoad({ filter: t }, r);
|
|
640
640
|
}
|
|
641
641
|
};
|
|
642
642
|
}
|
|
643
|
-
o(
|
|
644
|
-
|
|
643
|
+
o(Kt, "pnpPlugin");
|
|
644
|
+
U.pnpPlugin = Kt;
|
|
645
645
|
});
|
|
646
646
|
|
|
647
647
|
// ../node_modules/totalist/sync/index.mjs
|
|
648
648
|
var Ve = {};
|
|
649
|
-
|
|
649
|
+
$(Ve, {
|
|
650
650
|
totalist: () => Ge
|
|
651
651
|
});
|
|
652
|
-
import { join as te, resolve as
|
|
653
|
-
import { readdirSync as
|
|
652
|
+
import { join as te, resolve as Zt } from "path";
|
|
653
|
+
import { readdirSync as Yt, statSync as Qt } from "fs";
|
|
654
654
|
function Ge(e, i, t = "") {
|
|
655
|
-
e =
|
|
656
|
-
let
|
|
657
|
-
for (;
|
|
658
|
-
n = te(e, r
|
|
655
|
+
e = Zt(".", e);
|
|
656
|
+
let a = Yt(e), r = 0, n, s;
|
|
657
|
+
for (; r < a.length; r++)
|
|
658
|
+
n = te(e, a[r]), s = Qt(n), s.isDirectory() ? Ge(n, i, te(t, a[r])) : i(te(t, a[r]), n, s);
|
|
659
659
|
}
|
|
660
|
-
var Xe =
|
|
660
|
+
var Xe = q(() => {
|
|
661
661
|
o(Ge, "totalist");
|
|
662
662
|
});
|
|
663
663
|
|
|
664
664
|
// ../node_modules/@polka/url/build.mjs
|
|
665
665
|
var Ze = {};
|
|
666
|
-
|
|
667
|
-
parse: () =>
|
|
666
|
+
$(Ze, {
|
|
667
|
+
parse: () => ei
|
|
668
668
|
});
|
|
669
669
|
import * as Ke from "node:querystring";
|
|
670
|
-
function
|
|
670
|
+
function ei(e) {
|
|
671
671
|
let i = e.url;
|
|
672
672
|
if (i == null) return;
|
|
673
673
|
let t = e._parsedUrl;
|
|
674
674
|
if (t && t.raw === i) return t;
|
|
675
|
-
let
|
|
675
|
+
let a = i, r = "", n;
|
|
676
676
|
if (i.length > 1) {
|
|
677
677
|
let s = i.indexOf("?", 1);
|
|
678
|
-
s !== -1 && (
|
|
678
|
+
s !== -1 && (r = i.substring(s), a = i.substring(0, s), r.length > 1 && (n = Ke.parse(r.substring(1))));
|
|
679
679
|
}
|
|
680
|
-
return e._parsedUrl = { pathname:
|
|
680
|
+
return e._parsedUrl = { pathname: a, search: r, query: n, raw: i };
|
|
681
681
|
}
|
|
682
|
-
var Ye =
|
|
683
|
-
o(
|
|
682
|
+
var Ye = q(() => {
|
|
683
|
+
o(ei, "parse");
|
|
684
684
|
});
|
|
685
685
|
|
|
686
686
|
// ../node_modules/mrmime/index.mjs
|
|
687
687
|
var et = {};
|
|
688
|
-
|
|
689
|
-
lookup: () =>
|
|
688
|
+
$(et, {
|
|
689
|
+
lookup: () => ti,
|
|
690
690
|
mimes: () => Qe
|
|
691
691
|
});
|
|
692
|
-
function
|
|
692
|
+
function ti(e) {
|
|
693
693
|
let i = ("" + e).trim().toLowerCase(), t = i.lastIndexOf(".");
|
|
694
694
|
return Qe[~t ? i.substring(++t) : i];
|
|
695
695
|
}
|
|
696
|
-
var Qe, tt =
|
|
696
|
+
var Qe, tt = q(() => {
|
|
697
697
|
Qe = {
|
|
698
698
|
"3g2": "video/3gpp2",
|
|
699
699
|
"3gp": "video/3gpp",
|
|
@@ -1130,82 +1130,82 @@ var Qe, tt = z(() => {
|
|
|
1130
1130
|
yml: "text/yaml",
|
|
1131
1131
|
zip: "application/zip"
|
|
1132
1132
|
};
|
|
1133
|
-
o(
|
|
1133
|
+
o(ti, "lookup");
|
|
1134
1134
|
});
|
|
1135
1135
|
|
|
1136
1136
|
// ../node_modules/sirv/build.js
|
|
1137
|
-
var nt =
|
|
1138
|
-
var ie = S("fs"), { join:
|
|
1139
|
-
lookup:
|
|
1137
|
+
var nt = N((Na, rt) => {
|
|
1138
|
+
var ie = S("fs"), { join: ii, normalize: ai, resolve: ri } = S("path"), { totalist: ni } = (Xe(), W(Ve)), { parse: oi } = (Ye(), W(Ze)), {
|
|
1139
|
+
lookup: si } = (tt(), W(et)), li = /* @__PURE__ */ o(() => {
|
|
1140
1140
|
}, "noop");
|
|
1141
|
-
function
|
|
1141
|
+
function ci(e, i) {
|
|
1142
1142
|
for (let t = 0; t < i.length; t++)
|
|
1143
1143
|
if (i[t].test(e)) return !0;
|
|
1144
1144
|
}
|
|
1145
|
-
o(
|
|
1145
|
+
o(ci, "isMatch");
|
|
1146
1146
|
function it(e, i) {
|
|
1147
|
-
let t = 0,
|
|
1148
|
-
e.charCodeAt(
|
|
1147
|
+
let t = 0, a, r = e.length - 1;
|
|
1148
|
+
e.charCodeAt(r) === 47 && (e = e.substring(0, r));
|
|
1149
1149
|
let n = [], s = `${e}/index`;
|
|
1150
1150
|
for (; t < i.length; t++)
|
|
1151
|
-
|
|
1151
|
+
a = i[t] ? `.${i[t]}` : "", e && n.push(e + a), n.push(s + a);
|
|
1152
1152
|
return n;
|
|
1153
1153
|
}
|
|
1154
1154
|
o(it, "toAssume");
|
|
1155
|
-
function
|
|
1156
|
-
let
|
|
1157
|
-
for (; r < n.length; r++)
|
|
1158
|
-
if (a = e[n[r]]) return a;
|
|
1159
|
-
}
|
|
1160
|
-
o(ci, "viaCache");
|
|
1161
|
-
function pi(e, i, t, r) {
|
|
1162
|
-
let a = 0, n = it(t, r), s, c, p, l;
|
|
1155
|
+
function pi(e, i, t) {
|
|
1156
|
+
let a = 0, r, n = it(i, t);
|
|
1163
1157
|
for (; a < n.length; a++)
|
|
1164
|
-
if (
|
|
1158
|
+
if (r = e[n[a]]) return r;
|
|
1159
|
+
}
|
|
1160
|
+
o(pi, "viaCache");
|
|
1161
|
+
function mi(e, i, t, a) {
|
|
1162
|
+
let r = 0, n = it(t, a), s, c, p, l;
|
|
1163
|
+
for (; r < n.length; r++)
|
|
1164
|
+
if (s = ai(ii(e, p = n[r])), s.startsWith(e) && ie.existsSync(s)) {
|
|
1165
1165
|
if (c = ie.statSync(s), c.isDirectory()) continue;
|
|
1166
|
-
return l =
|
|
1166
|
+
return l = at(p, c, i), l["Cache-Control"] = i ? "no-cache" : "no-store", { abs: s, stats: c, headers: l };
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
o(
|
|
1170
|
-
function
|
|
1169
|
+
o(mi, "viaLocal");
|
|
1170
|
+
function ui(e, i) {
|
|
1171
1171
|
return i.statusCode = 404, i.end();
|
|
1172
1172
|
}
|
|
1173
|
-
o(
|
|
1174
|
-
function
|
|
1173
|
+
o(ui, "is404");
|
|
1174
|
+
function fi(e, i, t, a, r) {
|
|
1175
1175
|
let n = 200, s, c = {};
|
|
1176
|
-
|
|
1177
|
-
for (let p in
|
|
1178
|
-
s = i.getHeader(p), s && (
|
|
1179
|
-
if ((s = i.getHeader("content-type")) && (
|
|
1176
|
+
r = { ...r };
|
|
1177
|
+
for (let p in r)
|
|
1178
|
+
s = i.getHeader(p), s && (r[p] = s);
|
|
1179
|
+
if ((s = i.getHeader("content-type")) && (r["Content-Type"] = s), e.headers.range) {
|
|
1180
1180
|
n = 206;
|
|
1181
|
-
let [p, l] = e.headers.range.replace("bytes=", "").split("-"), u = c.end = parseInt(l, 10) ||
|
|
1181
|
+
let [p, l] = e.headers.range.replace("bytes=", "").split("-"), u = c.end = parseInt(l, 10) || a.size - 1, d = c.start = parseInt(p, 10) ||
|
|
1182
1182
|
0;
|
|
1183
|
-
if (u >=
|
|
1184
|
-
return i.setHeader("Content-Range", `bytes */${
|
|
1185
|
-
|
|
1183
|
+
if (u >= a.size && (u = a.size - 1), d >= a.size)
|
|
1184
|
+
return i.setHeader("Content-Range", `bytes */${a.size}`), i.statusCode = 416, i.end();
|
|
1185
|
+
r["Content-Range"] = `bytes ${d}-${u}/${a.size}`, r["Content-Length"] = u - d + 1, r["Accept-Ranges"] = "bytes";
|
|
1186
1186
|
}
|
|
1187
|
-
i.writeHead(n,
|
|
1187
|
+
i.writeHead(n, r), ie.createReadStream(t, c).pipe(i);
|
|
1188
1188
|
}
|
|
1189
|
-
o(
|
|
1190
|
-
var
|
|
1189
|
+
o(fi, "send");
|
|
1190
|
+
var di = {
|
|
1191
1191
|
".br": "br",
|
|
1192
1192
|
".gz": "gzip"
|
|
1193
1193
|
};
|
|
1194
|
-
function
|
|
1195
|
-
let
|
|
1196
|
-
|
|
1194
|
+
function at(e, i, t) {
|
|
1195
|
+
let a = di[e.slice(-3)], r = si(e.slice(0, a && -3)) || "";
|
|
1196
|
+
r === "text/html" && (r += ";charset=utf-8");
|
|
1197
1197
|
let n = {
|
|
1198
1198
|
"Content-Length": i.size,
|
|
1199
|
-
"Content-Type":
|
|
1199
|
+
"Content-Type": r,
|
|
1200
1200
|
"Last-Modified": i.mtime.toUTCString()
|
|
1201
1201
|
};
|
|
1202
|
-
return
|
|
1202
|
+
return a && (n["Content-Encoding"] = a), t && (n.ETag = `W/"${i.size}-${i.mtime.getTime()}"`), n;
|
|
1203
1203
|
}
|
|
1204
|
-
o(
|
|
1205
|
-
|
|
1204
|
+
o(at, "toHeaders");
|
|
1205
|
+
rt.exports = function(e, i = {}) {
|
|
1206
1206
|
e = ri(e || ".");
|
|
1207
|
-
let t = i.onNoMatch ||
|
|
1208
|
-
s = i.brotli &&
|
|
1207
|
+
let t = i.onNoMatch || ui, a = i.setHeaders || li, r = i.extensions || ["html", "htm"], n = i.gzip && r.map((m) => `${m}.gz`).concat("gz"),
|
|
1208
|
+
s = i.brotli && r.map((m) => `${m}.br`).concat("br"), c = {}, p = "/", l = !!i.etag, u = !!i.single;
|
|
1209
1209
|
if (typeof i.single == "string") {
|
|
1210
1210
|
let m = i.single.lastIndexOf(".");
|
|
1211
1211
|
p += ~m ? i.single.substring(0, m) : i.single;
|
|
@@ -1216,51 +1216,51 @@ var nt = A((Nr, at) => {
|
|
|
1216
1216
|
d.push(new RegExp(m, "i"));
|
|
1217
1217
|
}));
|
|
1218
1218
|
let x = i.maxAge != null && `public,max-age=${i.maxAge}`;
|
|
1219
|
-
x && i.immutable ? x += ",immutable" : x && i.maxAge === 0 && (x += ",must-revalidate"), i.dev ||
|
|
1219
|
+
x && i.immutable ? x += ",immutable" : x && i.maxAge === 0 && (x += ",must-revalidate"), i.dev || ni(e, (m, f, y) => {
|
|
1220
1220
|
if (!/\.well-known[\\+\/]/.test(m)) {
|
|
1221
1221
|
if (!i.dotfiles && /(^\.|[\\+|\/+]\.)/.test(m)) return;
|
|
1222
1222
|
}
|
|
1223
|
-
let v =
|
|
1223
|
+
let v = at(m, y, l);
|
|
1224
1224
|
x && (v["Cache-Control"] = x), c["/" + m.normalize().replace(/\\+/g, "/")] = { abs: f, stats: y, headers: v };
|
|
1225
1225
|
});
|
|
1226
|
-
let g = i.dev ?
|
|
1226
|
+
let g = i.dev ? mi.bind(0, e, l) : pi.bind(0, c);
|
|
1227
1227
|
return function(m, f, y) {
|
|
1228
|
-
let v = [""], _ =
|
|
1229
|
-
if (n && O.includes("gzip") && v.unshift(...n), s && /(br|brotli)/i.test(O) && v.unshift(...s), v.push(...
|
|
1228
|
+
let v = [""], _ = oi(m).pathname, O = m.headers["accept-encoding"] || "";
|
|
1229
|
+
if (n && O.includes("gzip") && v.unshift(...n), s && /(br|brotli)/i.test(O) && v.unshift(...s), v.push(...r), _.indexOf("%") !== -1)
|
|
1230
1230
|
try {
|
|
1231
1231
|
_ = decodeURI(_);
|
|
1232
1232
|
} catch {
|
|
1233
1233
|
}
|
|
1234
|
-
let w = g(_, v) || u && !
|
|
1234
|
+
let w = g(_, v) || u && !ci(_, d) && g(p, v);
|
|
1235
1235
|
if (!w) return y ? y() : t(m, f);
|
|
1236
1236
|
if (l && m.headers["if-none-match"] === w.headers.ETag)
|
|
1237
1237
|
return f.writeHead(304), f.end();
|
|
1238
|
-
(n || s) && f.setHeader("Vary", "Accept-Encoding"),
|
|
1238
|
+
(n || s) && f.setHeader("Vary", "Accept-Encoding"), a(f, _, w.stats), fi(m, f, w.abs, w.stats, w.headers);
|
|
1239
1239
|
};
|
|
1240
1240
|
};
|
|
1241
1241
|
});
|
|
1242
1242
|
|
|
1243
1243
|
// ../node_modules/ejs/lib/utils.js
|
|
1244
|
-
var st =
|
|
1244
|
+
var st = N((k) => {
|
|
1245
1245
|
"use strict";
|
|
1246
|
-
var
|
|
1247
|
-
return
|
|
1246
|
+
var gi = /[|\\{}()[\]^$+*?.]/g, xi = Object.prototype.hasOwnProperty, ae = /* @__PURE__ */ o(function(e, i) {
|
|
1247
|
+
return xi.apply(e, [i]);
|
|
1248
1248
|
}, "hasOwn");
|
|
1249
1249
|
k.escapeRegExpChars = function(e) {
|
|
1250
|
-
return e ? String(e).replace(
|
|
1250
|
+
return e ? String(e).replace(gi, "\\$&") : "";
|
|
1251
1251
|
};
|
|
1252
|
-
var
|
|
1252
|
+
var hi = {
|
|
1253
1253
|
"&": "&",
|
|
1254
1254
|
"<": "<",
|
|
1255
1255
|
">": ">",
|
|
1256
1256
|
'"': """,
|
|
1257
1257
|
"'": "'"
|
|
1258
|
-
},
|
|
1259
|
-
function
|
|
1260
|
-
return
|
|
1258
|
+
}, yi = /[&<>'"]/g;
|
|
1259
|
+
function vi(e) {
|
|
1260
|
+
return hi[e] || e;
|
|
1261
1261
|
}
|
|
1262
|
-
o(
|
|
1263
|
-
var
|
|
1262
|
+
o(vi, "encode_char");
|
|
1263
|
+
var wi = `var _ENCODE_HTML_RULES = {
|
|
1264
1264
|
"&": "&"
|
|
1265
1265
|
, "<": "<"
|
|
1266
1266
|
, ">": ">"
|
|
@@ -1273,11 +1273,11 @@ function encode_char(c) {
|
|
|
1273
1273
|
};
|
|
1274
1274
|
`;
|
|
1275
1275
|
k.escapeXML = function(e) {
|
|
1276
|
-
return e == null ? "" : String(e).replace(
|
|
1276
|
+
return e == null ? "" : String(e).replace(yi, vi);
|
|
1277
1277
|
};
|
|
1278
1278
|
function ot() {
|
|
1279
1279
|
return Function.prototype.toString.call(this) + `;
|
|
1280
|
-
` +
|
|
1280
|
+
` + wi;
|
|
1281
1281
|
}
|
|
1282
1282
|
o(ot, "escapeXMLToString");
|
|
1283
1283
|
try {
|
|
@@ -1288,17 +1288,17 @@ function encode_char(c) {
|
|
|
1288
1288
|
k.shallowCopy = function(e, i) {
|
|
1289
1289
|
if (i = i || {}, e != null)
|
|
1290
1290
|
for (var t in i)
|
|
1291
|
-
|
|
1291
|
+
ae(i, t) && (t === "__proto__" || t === "constructor" || (e[t] = i[t]));
|
|
1292
1292
|
return e;
|
|
1293
1293
|
};
|
|
1294
1294
|
k.shallowCopyFromList = function(e, i, t) {
|
|
1295
1295
|
if (t = t || [], i = i || {}, e != null)
|
|
1296
|
-
for (var
|
|
1297
|
-
var
|
|
1298
|
-
if (typeof i[
|
|
1299
|
-
if (!
|
|
1296
|
+
for (var a = 0; a < t.length; a++) {
|
|
1297
|
+
var r = t[a];
|
|
1298
|
+
if (typeof i[r] < "u") {
|
|
1299
|
+
if (!ae(i, r) || r === "__proto__" || r === "constructor")
|
|
1300
1300
|
continue;
|
|
1301
|
-
e[
|
|
1301
|
+
e[r] = i[r];
|
|
1302
1302
|
}
|
|
1303
1303
|
}
|
|
1304
1304
|
return e;
|
|
@@ -1335,14 +1335,14 @@ function encode_char(c) {
|
|
|
1335
1335
|
k.hasOwnOnlyObject = function(e) {
|
|
1336
1336
|
var i = k.createNullProtoObjWherePossible();
|
|
1337
1337
|
for (var t in e)
|
|
1338
|
-
|
|
1338
|
+
ae(e, t) && (i[t] = e[t]);
|
|
1339
1339
|
return i;
|
|
1340
1340
|
};
|
|
1341
1341
|
});
|
|
1342
1342
|
|
|
1343
1343
|
// ../node_modules/ejs/package.json
|
|
1344
|
-
var lt =
|
|
1345
|
-
|
|
1344
|
+
var lt = N((za, bi) => {
|
|
1345
|
+
bi.exports = {
|
|
1346
1346
|
name: "ejs",
|
|
1347
1347
|
description: "Embedded JavaScript templates",
|
|
1348
1348
|
keywords: [
|
|
@@ -1387,9 +1387,9 @@ var lt = A((zr, wi) => {
|
|
|
1387
1387
|
});
|
|
1388
1388
|
|
|
1389
1389
|
// ../node_modules/ejs/lib/ejs.js
|
|
1390
|
-
var ht =
|
|
1390
|
+
var ht = N((h) => {
|
|
1391
1391
|
"use strict";
|
|
1392
|
-
var ne = S("fs"),
|
|
1392
|
+
var ne = S("fs"), D = S("path"), b = st(), ct = !1, _i = lt().version, ji = "<", Oi = ">", Ei = "%", gt = "locals", Pi = "ejs", Si = "(<%%\
|
|
1393
1393
|
|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)", xt = [
|
|
1394
1394
|
"delimiter",
|
|
1395
1395
|
"scope",
|
|
@@ -1402,63 +1402,63 @@ var ht = A((h) => {
|
|
|
1402
1402
|
"strict",
|
|
1403
1403
|
"filename",
|
|
1404
1404
|
"async"
|
|
1405
|
-
],
|
|
1405
|
+
], ki = xt.concat("cache"), pt = /^\uFEFF/, re = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
|
|
1406
1406
|
h.cache = b.cache;
|
|
1407
1407
|
h.fileLoader = ne.readFileSync;
|
|
1408
1408
|
h.localsName = gt;
|
|
1409
1409
|
h.promiseImpl = new Function("return this;")().Promise;
|
|
1410
1410
|
h.resolveInclude = function(e, i, t) {
|
|
1411
|
-
var
|
|
1411
|
+
var a = D.dirname, r = D.extname, n = D.resolve, s = n(t ? i : a(i), e), c = r(e);
|
|
1412
1412
|
return c || (s += ".ejs"), s;
|
|
1413
1413
|
};
|
|
1414
1414
|
function mt(e, i) {
|
|
1415
1415
|
var t;
|
|
1416
|
-
if (i.some(function(
|
|
1417
|
-
return t = h.resolveInclude(e,
|
|
1416
|
+
if (i.some(function(a) {
|
|
1417
|
+
return t = h.resolveInclude(e, a, !0), ne.existsSync(t);
|
|
1418
1418
|
}))
|
|
1419
1419
|
return t;
|
|
1420
1420
|
}
|
|
1421
1421
|
o(mt, "resolvePaths");
|
|
1422
|
-
function
|
|
1423
|
-
var t,
|
|
1422
|
+
function Ti(e, i) {
|
|
1423
|
+
var t, a, r = i.views, n = /^[A-Za-z]+:\\|^\//.exec(e);
|
|
1424
1424
|
if (n && n.length)
|
|
1425
1425
|
e = e.replace(/^\/*/, ""), Array.isArray(i.root) ? t = mt(e, i.root) : t = h.resolveInclude(e, i.root || "/", !0);
|
|
1426
|
-
else if (i.filename && (
|
|
1426
|
+
else if (i.filename && (a = h.resolveInclude(e, i.filename), ne.existsSync(a) && (t = a)), !t && Array.isArray(r) && (t = mt(e, r)), !t &&
|
|
1427
1427
|
typeof i.includer != "function")
|
|
1428
1428
|
throw new Error('Could not find the include file "' + i.escapeFunction(e) + '"');
|
|
1429
1429
|
return t;
|
|
1430
1430
|
}
|
|
1431
|
-
o(
|
|
1432
|
-
function
|
|
1433
|
-
var t,
|
|
1431
|
+
o(Ti, "getIncludePath");
|
|
1432
|
+
function I(e, i) {
|
|
1433
|
+
var t, a = e.filename, r = arguments.length > 1;
|
|
1434
1434
|
if (e.cache) {
|
|
1435
|
-
if (!
|
|
1435
|
+
if (!a)
|
|
1436
1436
|
throw new Error("cache option requires a filename");
|
|
1437
|
-
if (t = h.cache.get(
|
|
1437
|
+
if (t = h.cache.get(a), t)
|
|
1438
1438
|
return t;
|
|
1439
|
-
|
|
1440
|
-
} else if (!
|
|
1441
|
-
if (!
|
|
1439
|
+
r || (i = ut(a).toString().replace(pt, ""));
|
|
1440
|
+
} else if (!r) {
|
|
1441
|
+
if (!a)
|
|
1442
1442
|
throw new Error("Internal EJS error: no file name or template provided");
|
|
1443
|
-
i = ut(
|
|
1443
|
+
i = ut(a).toString().replace(pt, "");
|
|
1444
1444
|
}
|
|
1445
|
-
return t = h.compile(i, e), e.cache && h.cache.set(
|
|
1445
|
+
return t = h.compile(i, e), e.cache && h.cache.set(a, t), t;
|
|
1446
1446
|
}
|
|
1447
|
-
o(
|
|
1448
|
-
function
|
|
1449
|
-
var
|
|
1447
|
+
o(I, "handleCache");
|
|
1448
|
+
function Fi(e, i, t) {
|
|
1449
|
+
var a;
|
|
1450
1450
|
if (t) {
|
|
1451
1451
|
try {
|
|
1452
|
-
|
|
1453
|
-
} catch (
|
|
1454
|
-
return t(
|
|
1452
|
+
a = I(e)(i);
|
|
1453
|
+
} catch (r) {
|
|
1454
|
+
return t(r);
|
|
1455
1455
|
}
|
|
1456
|
-
t(null,
|
|
1456
|
+
t(null, a);
|
|
1457
1457
|
} else {
|
|
1458
1458
|
if (typeof h.promiseImpl == "function")
|
|
1459
|
-
return new h.promiseImpl(function(
|
|
1459
|
+
return new h.promiseImpl(function(r, n) {
|
|
1460
1460
|
try {
|
|
1461
|
-
|
|
1461
|
+
a = I(e)(i), r(a);
|
|
1462
1462
|
} catch (s) {
|
|
1463
1463
|
n(s);
|
|
1464
1464
|
}
|
|
@@ -1466,29 +1466,29 @@ var ht = A((h) => {
|
|
|
1466
1466
|
throw new Error("Please provide a callback function");
|
|
1467
1467
|
}
|
|
1468
1468
|
}
|
|
1469
|
-
o(
|
|
1469
|
+
o(Fi, "tryHandleCache");
|
|
1470
1470
|
function ut(e) {
|
|
1471
1471
|
return h.fileLoader(e);
|
|
1472
1472
|
}
|
|
1473
1473
|
o(ut, "fileLoader");
|
|
1474
|
-
function
|
|
1474
|
+
function Ri(e, i) {
|
|
1475
1475
|
var t = b.shallowCopy(b.createNullProtoObjWherePossible(), i);
|
|
1476
|
-
if (t.filename =
|
|
1477
|
-
var
|
|
1478
|
-
if (
|
|
1479
|
-
return
|
|
1476
|
+
if (t.filename = Ti(e, t), typeof i.includer == "function") {
|
|
1477
|
+
var a = i.includer(e, t.filename);
|
|
1478
|
+
if (a && (a.filename && (t.filename = a.filename), a.template))
|
|
1479
|
+
return I(t, a.template);
|
|
1480
1480
|
}
|
|
1481
|
-
return
|
|
1481
|
+
return I(t);
|
|
1482
1482
|
}
|
|
1483
|
-
o(
|
|
1484
|
-
function ft(e, i, t,
|
|
1483
|
+
o(Ri, "includeFile");
|
|
1484
|
+
function ft(e, i, t, a, r) {
|
|
1485
1485
|
var n = i.split(`
|
|
1486
|
-
`), s = Math.max(
|
|
1486
|
+
`), s = Math.max(a - 3, 0), c = Math.min(n.length, a + 3), p = r(t), l = n.slice(s, c).map(function(u, d) {
|
|
1487
1487
|
var x = d + s + 1;
|
|
1488
|
-
return (x ==
|
|
1488
|
+
return (x == a ? " >> " : " ") + x + "| " + u;
|
|
1489
1489
|
}).join(`
|
|
1490
1490
|
`);
|
|
1491
|
-
throw e.path = p, e.message = (p || "ejs") + ":" +
|
|
1491
|
+
throw e.path = p, e.message = (p || "ejs") + ":" + a + `
|
|
1492
1492
|
` + l + `
|
|
1493
1493
|
|
|
1494
1494
|
` + e.message, e;
|
|
@@ -1499,33 +1499,33 @@ var ht = A((h) => {
|
|
|
1499
1499
|
}
|
|
1500
1500
|
o(dt, "stripSemi");
|
|
1501
1501
|
h.compile = /* @__PURE__ */ o(function(i, t) {
|
|
1502
|
-
var
|
|
1502
|
+
var a;
|
|
1503
1503
|
return t && t.scope && (ct || (console.warn("`scope` option is deprecated and will be removed in EJS 3"), ct = !0), t.context || (t.context =
|
|
1504
|
-
t.scope), delete t.scope),
|
|
1504
|
+
t.scope), delete t.scope), a = new j(i, t), a.compile();
|
|
1505
1505
|
}, "compile");
|
|
1506
1506
|
h.render = function(e, i, t) {
|
|
1507
|
-
var
|
|
1508
|
-
return arguments.length == 2 && b.shallowCopyFromList(
|
|
1507
|
+
var a = i || b.createNullProtoObjWherePossible(), r = t || b.createNullProtoObjWherePossible();
|
|
1508
|
+
return arguments.length == 2 && b.shallowCopyFromList(r, a, xt), I(r, e)(a);
|
|
1509
1509
|
};
|
|
1510
1510
|
h.renderFile = function() {
|
|
1511
|
-
var e = Array.prototype.slice.call(arguments), i = e.shift(), t,
|
|
1512
|
-
return typeof arguments[arguments.length - 1] == "function" && (t = e.pop()), e.length ? (
|
|
1513
|
-
(
|
|
1514
|
-
ns"], n && b.shallowCopy(
|
|
1511
|
+
var e = Array.prototype.slice.call(arguments), i = e.shift(), t, a = { filename: i }, r, n;
|
|
1512
|
+
return typeof arguments[arguments.length - 1] == "function" && (t = e.pop()), e.length ? (r = e.shift(), e.length ? b.shallowCopy(a, e.pop()) :
|
|
1513
|
+
(r.settings && (r.settings.views && (a.views = r.settings.views), r.settings["view cache"] && (a.cache = !0), n = r.settings["view optio\
|
|
1514
|
+
ns"], n && b.shallowCopy(a, n)), b.shallowCopyFromList(a, r, ki)), a.filename = i) : r = b.createNullProtoObjWherePossible(), Fi(a, r, t);
|
|
1515
1515
|
};
|
|
1516
1516
|
h.Template = j;
|
|
1517
1517
|
h.clearCache = function() {
|
|
1518
1518
|
h.cache.reset();
|
|
1519
1519
|
};
|
|
1520
1520
|
function j(e, i) {
|
|
1521
|
-
var t = b.hasOwnOnlyObject(i),
|
|
1522
|
-
this.templateText = e, this.mode = null, this.truncate = !1, this.currentLine = 1, this.source = "",
|
|
1523
|
-
t.escape || t.escapeFunction || b.escapeXML,
|
|
1524
|
-
t.openDelimiter || h.openDelimiter ||
|
|
1525
|
-
delimiter ||
|
|
1526
|
-
root,
|
|
1527
|
-
t.views,
|
|
1528
|
-
!0,
|
|
1521
|
+
var t = b.hasOwnOnlyObject(i), a = b.createNullProtoObjWherePossible();
|
|
1522
|
+
this.templateText = e, this.mode = null, this.truncate = !1, this.currentLine = 1, this.source = "", a.client = t.client || !1, a.escapeFunction =
|
|
1523
|
+
t.escape || t.escapeFunction || b.escapeXML, a.compileDebug = t.compileDebug !== !1, a.debug = !!t.debug, a.filename = t.filename, a.openDelimiter =
|
|
1524
|
+
t.openDelimiter || h.openDelimiter || ji, a.closeDelimiter = t.closeDelimiter || h.closeDelimiter || Oi, a.delimiter = t.delimiter || h.
|
|
1525
|
+
delimiter || Ei, a.strict = t.strict || !1, a.context = t.context, a.cache = t.cache || !1, a.rmWhitespace = t.rmWhitespace, a.root = t.
|
|
1526
|
+
root, a.includer = t.includer, a.outputFunctionName = t.outputFunctionName, a.localsName = t.localsName || h.localsName || gt, a.views =
|
|
1527
|
+
t.views, a.async = t.async, a.destructuredLocals = t.destructuredLocals, a.legacyInclude = typeof t.legacyInclude < "u" ? !!t.legacyInclude :
|
|
1528
|
+
!0, a.strict ? a._with = !1 : a._with = typeof t._with < "u" ? t._with : !0, this.opts = a, this.regex = this.createRegex();
|
|
1529
1529
|
}
|
|
1530
1530
|
o(j, "Template");
|
|
1531
1531
|
j.modes = {
|
|
@@ -1537,39 +1537,39 @@ ns"], n && b.shallowCopy(r, n)), b.shallowCopyFromList(r, a, Si)), r.filename =
|
|
|
1537
1537
|
};
|
|
1538
1538
|
j.prototype = {
|
|
1539
1539
|
createRegex: /* @__PURE__ */ o(function() {
|
|
1540
|
-
var e =
|
|
1540
|
+
var e = Si, i = b.escapeRegExpChars(this.opts.delimiter), t = b.escapeRegExpChars(this.opts.openDelimiter), a = b.escapeRegExpChars(this.
|
|
1541
1541
|
opts.closeDelimiter);
|
|
1542
|
-
return e = e.replace(/%/g, i).replace(/</g, t).replace(/>/g,
|
|
1542
|
+
return e = e.replace(/%/g, i).replace(/</g, t).replace(/>/g, a), new RegExp(e);
|
|
1543
1543
|
}, "createRegex"),
|
|
1544
1544
|
compile: /* @__PURE__ */ o(function() {
|
|
1545
|
-
var e, i, t = this.opts,
|
|
1545
|
+
var e, i, t = this.opts, a = "", r = "", n = t.escapeFunction, s, c = t.filename ? JSON.stringify(t.filename) : "undefined";
|
|
1546
1546
|
if (!this.source) {
|
|
1547
|
-
if (this.generateSource(),
|
|
1547
|
+
if (this.generateSource(), a += ` var __output = "";
|
|
1548
1548
|
function __append(s) { if (s !== undefined && s !== null) __output += s }
|
|
1549
1549
|
`, t.outputFunctionName) {
|
|
1550
|
-
if (!
|
|
1550
|
+
if (!re.test(t.outputFunctionName))
|
|
1551
1551
|
throw new Error("outputFunctionName is not a valid JS identifier.");
|
|
1552
|
-
|
|
1552
|
+
a += " var " + t.outputFunctionName + ` = __append;
|
|
1553
1553
|
`;
|
|
1554
1554
|
}
|
|
1555
|
-
if (t.localsName && !
|
|
1555
|
+
if (t.localsName && !re.test(t.localsName))
|
|
1556
1556
|
throw new Error("localsName is not a valid JS identifier.");
|
|
1557
1557
|
if (t.destructuredLocals && t.destructuredLocals.length) {
|
|
1558
1558
|
for (var p = " var __locals = (" + t.localsName + ` || {}),
|
|
1559
1559
|
`, l = 0; l < t.destructuredLocals.length; l++) {
|
|
1560
1560
|
var u = t.destructuredLocals[l];
|
|
1561
|
-
if (!
|
|
1561
|
+
if (!re.test(u))
|
|
1562
1562
|
throw new Error("destructuredLocals[" + l + "] is not a valid JS identifier.");
|
|
1563
1563
|
l > 0 && (p += `,
|
|
1564
1564
|
`), p += u + " = __locals." + u;
|
|
1565
1565
|
}
|
|
1566
|
-
|
|
1566
|
+
a += p + `;
|
|
1567
1567
|
`;
|
|
1568
1568
|
}
|
|
1569
|
-
t._with !== !1 && (
|
|
1570
|
-
`,
|
|
1571
|
-
`),
|
|
1572
|
-
`, this.source =
|
|
1569
|
+
t._with !== !1 && (a += " with (" + t.localsName + ` || {}) {
|
|
1570
|
+
`, r += ` }
|
|
1571
|
+
`), r += ` return __output;
|
|
1572
|
+
`, this.source = a + this.source + r;
|
|
1573
1573
|
}
|
|
1574
1574
|
t.compileDebug ? e = `var __line = 1
|
|
1575
1575
|
, __lines = ` + JSON.stringify(this.templateText) + `
|
|
@@ -1604,7 +1604,7 @@ try {
|
|
|
1604
1604
|
var d = t.client ? i : /* @__PURE__ */ o(function(f) {
|
|
1605
1605
|
var y = /* @__PURE__ */ o(function(v, _) {
|
|
1606
1606
|
var O = b.shallowCopy(b.createNullProtoObjWherePossible(), f);
|
|
1607
|
-
return _ && (O = b.shallowCopy(O, _)),
|
|
1607
|
+
return _ && (O = b.shallowCopy(O, _)), Ri(v, t)(O);
|
|
1608
1608
|
}, "include");
|
|
1609
1609
|
return i.apply(
|
|
1610
1610
|
t.context,
|
|
@@ -1612,7 +1612,7 @@ try {
|
|
|
1612
1612
|
);
|
|
1613
1613
|
}, "anonymous");
|
|
1614
1614
|
if (t.filename && typeof Object.defineProperty == "function") {
|
|
1615
|
-
var x = t.filename, g =
|
|
1615
|
+
var x = t.filename, g = D.basename(x, D.extname(x));
|
|
1616
1616
|
try {
|
|
1617
1617
|
Object.defineProperty(d, "name", {
|
|
1618
1618
|
value: g,
|
|
@@ -1629,18 +1629,18 @@ try {
|
|
|
1629
1629
|
var e = this.opts;
|
|
1630
1630
|
e.rmWhitespace && (this.templateText = this.templateText.replace(/[\r\n]+/g, `
|
|
1631
1631
|
`).replace(/^\s+|\s+$/gm, "")), this.templateText = this.templateText.replace(/[ \t]*<%_/gm, "<%_").replace(/_%>[ \t]*/gm, "_%>");
|
|
1632
|
-
var i = this, t = this.parseTemplateText(),
|
|
1632
|
+
var i = this, t = this.parseTemplateText(), a = this.opts.delimiter, r = this.opts.openDelimiter, n = this.opts.closeDelimiter;
|
|
1633
1633
|
t && t.length && t.forEach(function(s, c) {
|
|
1634
1634
|
var p;
|
|
1635
|
-
if (s.indexOf(
|
|
1635
|
+
if (s.indexOf(r + a) === 0 && s.indexOf(r + a + a) !== 0 && (p = t[c + 2], !(p == a + n || p == "-" + a + n || p == "_" + a + n)))
|
|
1636
1636
|
throw new Error('Could not find matching close tag for "' + s + '".');
|
|
1637
1637
|
i.scanLine(s);
|
|
1638
1638
|
});
|
|
1639
1639
|
}, "generateSource"),
|
|
1640
1640
|
parseTemplateText: /* @__PURE__ */ o(function() {
|
|
1641
|
-
for (var e = this.templateText, i = this.regex, t = i.exec(e),
|
|
1642
|
-
|
|
1643
|
-
return e &&
|
|
1641
|
+
for (var e = this.templateText, i = this.regex, t = i.exec(e), a = [], r; t; )
|
|
1642
|
+
r = t.index, r !== 0 && (a.push(e.substring(0, r)), e = e.slice(r)), a.push(t[0]), e = e.slice(t[0].length), t = i.exec(e);
|
|
1643
|
+
return e && a.push(e), a;
|
|
1644
1644
|
}, "parseTemplateText"),
|
|
1645
1645
|
_addOutput: /* @__PURE__ */ o(function(e) {
|
|
1646
1646
|
if (this.truncate && (e = e.replace(/^(?:\r\n|\r|\n)/, ""), this.truncate = !1), !e)
|
|
@@ -1650,33 +1650,33 @@ try {
|
|
|
1650
1650
|
`;
|
|
1651
1651
|
}, "_addOutput"),
|
|
1652
1652
|
scanLine: /* @__PURE__ */ o(function(e) {
|
|
1653
|
-
var i = this, t = this.opts.delimiter,
|
|
1653
|
+
var i = this, t = this.opts.delimiter, a = this.opts.openDelimiter, r = this.opts.closeDelimiter, n = 0;
|
|
1654
1654
|
switch (n = e.split(`
|
|
1655
1655
|
`).length - 1, e) {
|
|
1656
|
-
case
|
|
1657
|
-
case
|
|
1656
|
+
case a + t:
|
|
1657
|
+
case a + t + "_":
|
|
1658
1658
|
this.mode = j.modes.EVAL;
|
|
1659
1659
|
break;
|
|
1660
|
-
case
|
|
1660
|
+
case a + t + "=":
|
|
1661
1661
|
this.mode = j.modes.ESCAPED;
|
|
1662
1662
|
break;
|
|
1663
|
-
case
|
|
1663
|
+
case a + t + "-":
|
|
1664
1664
|
this.mode = j.modes.RAW;
|
|
1665
1665
|
break;
|
|
1666
|
-
case
|
|
1666
|
+
case a + t + "#":
|
|
1667
1667
|
this.mode = j.modes.COMMENT;
|
|
1668
1668
|
break;
|
|
1669
|
-
case
|
|
1670
|
-
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(
|
|
1669
|
+
case a + t + t:
|
|
1670
|
+
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(a + t + t, a + t) + `")
|
|
1671
1671
|
`;
|
|
1672
1672
|
break;
|
|
1673
|
-
case t + t +
|
|
1674
|
-
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(t + t +
|
|
1673
|
+
case t + t + r:
|
|
1674
|
+
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(t + t + r, t + r) + `")
|
|
1675
1675
|
`;
|
|
1676
1676
|
break;
|
|
1677
|
-
case t +
|
|
1678
|
-
case "-" + t +
|
|
1679
|
-
case "_" + t +
|
|
1677
|
+
case t + r:
|
|
1678
|
+
case "-" + t + r:
|
|
1679
|
+
case "_" + t + r:
|
|
1680
1680
|
this.mode == j.modes.LITERAL && this._addOutput(e), this.mode = null, this.truncate = e.indexOf("-") === 0 || e.indexOf("_") === 0;
|
|
1681
1681
|
break;
|
|
1682
1682
|
default:
|
|
@@ -1721,16 +1721,16 @@ try {
|
|
|
1721
1721
|
};
|
|
1722
1722
|
h.escapeXML = b.escapeXML;
|
|
1723
1723
|
h.__express = h.renderFile;
|
|
1724
|
-
h.VERSION =
|
|
1725
|
-
h.name =
|
|
1724
|
+
h.VERSION = _i;
|
|
1725
|
+
h.name = Pi;
|
|
1726
1726
|
typeof window < "u" && (window.ejs = h);
|
|
1727
1727
|
});
|
|
1728
1728
|
|
|
1729
1729
|
// src/builder-manager/index.ts
|
|
1730
|
-
import { cp as
|
|
1731
|
-
import { dirname as
|
|
1732
|
-
import { stringifyProcessEnvs as
|
|
1733
|
-
import { globalsModuleInfoMap as
|
|
1730
|
+
import { cp as aa, rm as ra, writeFile as Tt } from "node:fs/promises";
|
|
1731
|
+
import { dirname as Ft, join as F, parse as na } from "node:path";
|
|
1732
|
+
import { stringifyProcessEnvs as oa } from "storybook/internal/common";
|
|
1733
|
+
import { globalsModuleInfoMap as sa } from "storybook/internal/manager/globals-module-info";
|
|
1734
1734
|
import { logger as me } from "storybook/internal/node-logger";
|
|
1735
1735
|
|
|
1736
1736
|
// ../node_modules/@fal-works/esbuild-plugin-global-externals/lib/module-info.js
|
|
@@ -1738,29 +1738,29 @@ var de = /* @__PURE__ */ o((e) => {
|
|
|
1738
1738
|
let {
|
|
1739
1739
|
type: i = "esm",
|
|
1740
1740
|
varName: t,
|
|
1741
|
-
namedExports:
|
|
1742
|
-
defaultExport:
|
|
1741
|
+
namedExports: a = null,
|
|
1742
|
+
defaultExport: r = !0
|
|
1743
1743
|
} = typeof e == "string" ? { varName: e } : e;
|
|
1744
|
-
return { type: i, varName: t, namedExports:
|
|
1744
|
+
return { type: i, varName: t, namedExports: a, defaultExport: r };
|
|
1745
1745
|
}, "normalizeModuleInfo");
|
|
1746
1746
|
|
|
1747
1747
|
// ../node_modules/@fal-works/esbuild-plugin-global-externals/lib/on-load.js
|
|
1748
|
-
var
|
|
1749
|
-
var
|
|
1750
|
-
let
|
|
1748
|
+
var It = /* @__PURE__ */ o((e) => `module.exports = ${e};`, "createCjsContents");
|
|
1749
|
+
var Mt = /* @__PURE__ */ o((e, i, t) => {
|
|
1750
|
+
let a = t ? [`export default ${e};`] : [];
|
|
1751
1751
|
if (i && i.length) {
|
|
1752
|
-
let
|
|
1753
|
-
|
|
1752
|
+
let r = [...new Set(i)].join(", ");
|
|
1753
|
+
a.push(`const { ${r} } = ${e};`), a.push(`export { ${r} };`);
|
|
1754
1754
|
}
|
|
1755
|
-
return
|
|
1755
|
+
return a.join(`
|
|
1756
1756
|
`);
|
|
1757
1757
|
}, "createEsmContents"), ge = /* @__PURE__ */ o((e) => {
|
|
1758
|
-
let { type: i, varName: t, namedExports:
|
|
1758
|
+
let { type: i, varName: t, namedExports: a, defaultExport: r } = e;
|
|
1759
1759
|
switch (i) {
|
|
1760
1760
|
case "esm":
|
|
1761
|
-
return
|
|
1761
|
+
return Mt(t, a, r);
|
|
1762
1762
|
case "cjs":
|
|
1763
|
-
return
|
|
1763
|
+
return It(t);
|
|
1764
1764
|
}
|
|
1765
1765
|
}, "createContents");
|
|
1766
1766
|
|
|
@@ -1769,12 +1769,12 @@ var X = "global-externals", K = /* @__PURE__ */ o((e) => {
|
|
|
1769
1769
|
let { modulePathFilter: i, getModuleInfo: t } = e;
|
|
1770
1770
|
return {
|
|
1771
1771
|
name: X,
|
|
1772
|
-
setup(
|
|
1773
|
-
|
|
1774
|
-
path:
|
|
1772
|
+
setup(a) {
|
|
1773
|
+
a.onResolve({ filter: i }, (r) => ({
|
|
1774
|
+
path: r.path,
|
|
1775
1775
|
namespace: X
|
|
1776
|
-
})),
|
|
1777
|
-
let n =
|
|
1776
|
+
})), a.onLoad({ filter: /.*/, namespace: X }, (r) => {
|
|
1777
|
+
let n = r.path, s = de(t(n));
|
|
1778
1778
|
return { contents: ge(s) };
|
|
1779
1779
|
});
|
|
1780
1780
|
}
|
|
@@ -1791,29 +1791,29 @@ var Z = /* @__PURE__ */ o((e) => {
|
|
|
1791
1791
|
}, "globalExternals");
|
|
1792
1792
|
|
|
1793
1793
|
// src/builder-manager/index.ts
|
|
1794
|
-
var
|
|
1794
|
+
var Rt = V(Ue(), 1), ue = V(nt(), 1);
|
|
1795
1795
|
|
|
1796
1796
|
// src/builder-manager/utils/data.ts
|
|
1797
|
-
import { basename as
|
|
1798
|
-
import { getRefs as
|
|
1797
|
+
import { basename as Ni } from "node:path";
|
|
1798
|
+
import { getRefs as Di } from "storybook/internal/common";
|
|
1799
1799
|
|
|
1800
1800
|
// src/builder-manager/utils/template.ts
|
|
1801
1801
|
var yt = V(ht(), 1);
|
|
1802
|
-
import { readFile as
|
|
1803
|
-
import { dirname as
|
|
1804
|
-
var oe = /* @__PURE__ */ o(async (e) => Ci(
|
|
1802
|
+
import { readFile as Li } from "node:fs/promises";
|
|
1803
|
+
import { dirname as Ci, join as Ai } from "node:path";
|
|
1804
|
+
var oe = /* @__PURE__ */ o(async (e) => Ai(Ci(S.resolve("storybook/package.json")), "assets/server", e), "getTemplatePath"), vt = /* @__PURE__ */ o(
|
|
1805
1805
|
async (e) => {
|
|
1806
1806
|
let i = await oe(e);
|
|
1807
|
-
return
|
|
1807
|
+
return Li(i, { encoding: "utf8" });
|
|
1808
1808
|
}, "readTemplate");
|
|
1809
|
-
var se = /* @__PURE__ */ o(async (e, i, t,
|
|
1809
|
+
var se = /* @__PURE__ */ o(async (e, i, t, a, r, n, s, c, p, l, u, { versionCheck: d, previewUrl: x, configType: g, ignorePreview: m }, f) => {
|
|
1810
1810
|
let y = await i, v = await e, _ = Object.entries(f).reduce(
|
|
1811
1811
|
(O, [w, E]) => ({ ...O, [w]: JSON.stringify(E) }),
|
|
1812
1812
|
{}
|
|
1813
1813
|
);
|
|
1814
1814
|
return (0, yt.render)(v, {
|
|
1815
1815
|
title: y ? `${y} - Storybook` : "Storybook",
|
|
1816
|
-
files: { js: n, css:
|
|
1816
|
+
files: { js: n, css: r },
|
|
1817
1817
|
favicon: await t,
|
|
1818
1818
|
globals: {
|
|
1819
1819
|
FEATURES: JSON.stringify(await s, null, 2),
|
|
@@ -1828,14 +1828,14 @@ var se = /* @__PURE__ */ o(async (e, i, t, r, a, n, s, c, p, l, u, { versionChec
|
|
|
1828
1828
|
TAGS_OPTIONS: JSON.stringify(await u, null, 2),
|
|
1829
1829
|
..._
|
|
1830
1830
|
},
|
|
1831
|
-
head: await
|
|
1831
|
+
head: await a || "",
|
|
1832
1832
|
ignorePreview: m
|
|
1833
1833
|
});
|
|
1834
1834
|
}, "renderHTML");
|
|
1835
1835
|
|
|
1836
1836
|
// src/builder-manager/utils/data.ts
|
|
1837
1837
|
var le = /* @__PURE__ */ o(async (e) => {
|
|
1838
|
-
let i =
|
|
1838
|
+
let i = Di(e), t = e.presets.apply("favicon").then((x) => Ni(x)), a = e.presets.apply("features"), r = e.presets.apply("logLevel"), n = e.
|
|
1839
1839
|
presets.apply("title"), s = e.presets.apply("docs", {}), c = e.presets.apply("tags", {}), p = vt("template.ejs"), l = e.presets.apply("man\
|
|
1840
1840
|
agerHead"), [u, d] = await Promise.all([
|
|
1841
1841
|
//
|
|
@@ -1844,96 +1844,96 @@ agerHead"), [u, d] = await Promise.all([
|
|
|
1844
1844
|
]);
|
|
1845
1845
|
return {
|
|
1846
1846
|
refs: i,
|
|
1847
|
-
features:
|
|
1847
|
+
features: a,
|
|
1848
1848
|
title: n,
|
|
1849
1849
|
docsOptions: s,
|
|
1850
1850
|
template: p,
|
|
1851
1851
|
customHead: l,
|
|
1852
1852
|
instance: u,
|
|
1853
1853
|
config: d,
|
|
1854
|
-
logLevel:
|
|
1854
|
+
logLevel: r,
|
|
1855
1855
|
favicon: t,
|
|
1856
1856
|
tagsOptions: c
|
|
1857
1857
|
};
|
|
1858
1858
|
}, "getData");
|
|
1859
1859
|
|
|
1860
1860
|
// src/builder-manager/utils/files.ts
|
|
1861
|
-
import { existsSync as
|
|
1862
|
-
import { mkdir as
|
|
1863
|
-
import { dirname as
|
|
1861
|
+
import { existsSync as Ii } from "node:fs";
|
|
1862
|
+
import { mkdir as Mi, writeFile as zi } from "node:fs/promises";
|
|
1863
|
+
import { dirname as qi, join as $i, normalize as Wi } from "node:path";
|
|
1864
1864
|
|
|
1865
1865
|
// ../node_modules/slash/index.js
|
|
1866
|
-
function
|
|
1866
|
+
function M(e) {
|
|
1867
1867
|
return e.startsWith("\\\\?\\") ? e : e.replace(/\\/g, "/");
|
|
1868
1868
|
}
|
|
1869
|
-
o(
|
|
1869
|
+
o(M, "slash");
|
|
1870
1870
|
|
|
1871
1871
|
// src/builder-manager/utils/files.ts
|
|
1872
1872
|
async function ce(e, i) {
|
|
1873
1873
|
let t = await Promise.all(
|
|
1874
1874
|
i?.map(async (n) => {
|
|
1875
|
-
let { location: s, url: c } =
|
|
1876
|
-
if (!
|
|
1877
|
-
let p =
|
|
1878
|
-
await
|
|
1875
|
+
let { location: s, url: c } = Hi(n, e);
|
|
1876
|
+
if (!Ii(s)) {
|
|
1877
|
+
let p = qi(s);
|
|
1878
|
+
await Mi(p, { recursive: !0 });
|
|
1879
1879
|
}
|
|
1880
|
-
return await
|
|
1880
|
+
return await zi(s, n.contents), c;
|
|
1881
1881
|
}) || []
|
|
1882
|
-
),
|
|
1883
|
-
return { cssFiles: t.filter((n) => n.endsWith(".css")), jsFiles:
|
|
1882
|
+
), a = t.filter((n) => n.endsWith(".js"));
|
|
1883
|
+
return { cssFiles: t.filter((n) => n.endsWith(".css")), jsFiles: a };
|
|
1884
1884
|
}
|
|
1885
1885
|
o(ce, "readOrderedFiles");
|
|
1886
|
-
function
|
|
1887
|
-
let t = e.path.replace(i, ""),
|
|
1888
|
-
return { location:
|
|
1886
|
+
function Hi(e, i) {
|
|
1887
|
+
let t = e.path.replace(i, ""), a = Wi($i(i, t)), r = `./sb-addons${M(t).split("/").map(encodeURIComponent).join("/")}`;
|
|
1888
|
+
return { location: a, url: r };
|
|
1889
1889
|
}
|
|
1890
|
-
o(
|
|
1890
|
+
o(Hi, "sanitizePath");
|
|
1891
1891
|
|
|
1892
1892
|
// src/builder-manager/utils/framework.ts
|
|
1893
|
-
import { sep as
|
|
1893
|
+
import { sep as Bi } from "node:path";
|
|
1894
1894
|
import {
|
|
1895
1895
|
extractProperRendererNameFromFramework as _t,
|
|
1896
|
-
getFrameworkName as
|
|
1896
|
+
getFrameworkName as Ji
|
|
1897
1897
|
} from "storybook/internal/common";
|
|
1898
1898
|
var jt = /* @__PURE__ */ o((e) => {
|
|
1899
1899
|
if (e)
|
|
1900
1900
|
return typeof e == "string" ? e : e.name;
|
|
1901
|
-
}, "pluckNameFromConfigProperty"), Ot = /* @__PURE__ */ o((e) => e.replaceAll(
|
|
1902
|
-
match(/(@storybook\/.*)$/)?.[1], "pluckStorybookPackageFromPath"),
|
|
1901
|
+
}, "pluckNameFromConfigProperty"), Ot = /* @__PURE__ */ o((e) => e.replaceAll(Bi, "/"), "normalizePath"), Ui = /* @__PURE__ */ o((e) => Ot(e).
|
|
1902
|
+
match(/(@storybook\/.*)$/)?.[1], "pluckStorybookPackageFromPath"), Gi = /* @__PURE__ */ o((e) => Ot(e).split("node_modules/")[1] ?? e, "pluc\
|
|
1903
1903
|
kThirdPartyPackageFromPath"), pe = /* @__PURE__ */ o(async (e) => {
|
|
1904
|
-
let i = {}, { builder: t } = await e.presets.apply("core"),
|
|
1905
|
-
await _t(
|
|
1904
|
+
let i = {}, { builder: t } = await e.presets.apply("core"), a = await Ji(e);
|
|
1905
|
+
await _t(a) && (i.STORYBOOK_RENDERER = await _t(a) ?? void 0);
|
|
1906
1906
|
let n = jt(t);
|
|
1907
|
-
n && (i.STORYBOOK_BUILDER =
|
|
1907
|
+
n && (i.STORYBOOK_BUILDER = Ui(n) ?? Gi(n));
|
|
1908
1908
|
let s = jt(await e.presets.apply("framework"));
|
|
1909
1909
|
return s && (i.STORYBOOK_FRAMEWORK = s), i;
|
|
1910
1910
|
}, "buildFrameworkGlobalsFromOptions");
|
|
1911
1911
|
|
|
1912
1912
|
// src/builder-manager/utils/managerEntries.ts
|
|
1913
|
-
import { existsSync as
|
|
1914
|
-
import { mkdir as
|
|
1915
|
-
import { dirname as
|
|
1916
|
-
import { resolvePathInStorybookCache as
|
|
1917
|
-
var Pt = /* @__PURE__ */ o((e) => e.replaceAll(".", "").replaceAll("@", "").replaceAll(
|
|
1918
|
-
""), "sanitizeBase"),
|
|
1913
|
+
import { existsSync as Vi } from "node:fs";
|
|
1914
|
+
import { mkdir as Xi, writeFile as Ki } from "node:fs/promises";
|
|
1915
|
+
import { dirname as Zi, join as Et, parse as Yi, relative as Qi, sep as ea } from "node:path";
|
|
1916
|
+
import { resolvePathInStorybookCache as ta } from "storybook/internal/common";
|
|
1917
|
+
var Pt = /* @__PURE__ */ o((e) => e.replaceAll(".", "").replaceAll("@", "").replaceAll(ea, "-").replaceAll("/", "-").replaceAll(new RegExp(/^(-)+/g),
|
|
1918
|
+
""), "sanitizeBase"), ia = /* @__PURE__ */ o((e) => {
|
|
1919
1919
|
let i = e.split(/-?node_modules-?/);
|
|
1920
1920
|
return i[i.length - 1].replaceAll("storybook-addon-", "").replaceAll("dist-", "");
|
|
1921
1921
|
}, "sanitizeFinal");
|
|
1922
1922
|
async function St(e, i) {
|
|
1923
1923
|
return Promise.all(
|
|
1924
|
-
e.map(async (t,
|
|
1925
|
-
let { name:
|
|
1924
|
+
e.map(async (t, a) => {
|
|
1925
|
+
let { name: r, dir: n } = Yi(t), s = ta("sb-manager", i);
|
|
1926
1926
|
if (!s)
|
|
1927
1927
|
throw new Error("Could not create/find cache directory");
|
|
1928
|
-
let c =
|
|
1928
|
+
let c = Qi(process.cwd(), n), p = Et(
|
|
1929
1929
|
s,
|
|
1930
|
-
|
|
1930
|
+
ia(Et(`${Pt(c)}-${a}`, `${Pt(r)}-bundle.js`))
|
|
1931
1931
|
);
|
|
1932
|
-
if (!
|
|
1933
|
-
let l =
|
|
1934
|
-
await
|
|
1932
|
+
if (!Vi(p)) {
|
|
1933
|
+
let l = Zi(p);
|
|
1934
|
+
await Xi(l, { recursive: !0 });
|
|
1935
1935
|
}
|
|
1936
|
-
return await
|
|
1936
|
+
return await Ki(p, `import '${M(t).replaceAll(/'/g, "\\'")}';`), p;
|
|
1937
1937
|
})
|
|
1938
1938
|
);
|
|
1939
1939
|
}
|
|
@@ -1949,16 +1949,16 @@ var kt = /* @__PURE__ */ o((e) => {
|
|
|
1949
1949
|
}, "safeResolve");
|
|
1950
1950
|
|
|
1951
1951
|
// src/builder-manager/index.ts
|
|
1952
|
-
var
|
|
1953
|
-
let [i, t,
|
|
1952
|
+
var la = /^\/($|\?)/, L, C, wt = /* @__PURE__ */ o(async (e) => {
|
|
1953
|
+
let [i, t, a, r] = await Promise.all([
|
|
1954
1954
|
e.presets.apply("managerEntries", []),
|
|
1955
|
-
kt(
|
|
1955
|
+
kt(F(e.configDir, "manager")),
|
|
1956
1956
|
oe("addon.tsconfig.json"),
|
|
1957
1957
|
e.presets.apply("env")
|
|
1958
1958
|
]), n = t ? [...i, t] : i;
|
|
1959
1959
|
return {
|
|
1960
1960
|
entryPoints: await St(n, e.cacheKey),
|
|
1961
|
-
outdir:
|
|
1961
|
+
outdir: F(e.outputDir || "./", "sb-addons"),
|
|
1962
1962
|
format: "iife",
|
|
1963
1963
|
write: !1,
|
|
1964
1964
|
ignoreAnnotations: !0,
|
|
@@ -1985,16 +1985,21 @@ var lr = /^\/($|\?)/, U, L, wt = /* @__PURE__ */ o(async (e) => {
|
|
|
1985
1985
|
target: ["chrome100", "safari15", "firefox91"],
|
|
1986
1986
|
platform: "browser",
|
|
1987
1987
|
bundle: !0,
|
|
1988
|
-
minify: !
|
|
1988
|
+
minify: !1,
|
|
1989
|
+
minifyWhitespace: !1,
|
|
1990
|
+
minifyIdentifiers: !1,
|
|
1991
|
+
minifySyntax: !1,
|
|
1992
|
+
metafile: !0,
|
|
1993
|
+
// treeShaking: true,
|
|
1989
1994
|
sourcemap: !1,
|
|
1990
1995
|
conditions: ["browser", "module", "default"],
|
|
1991
1996
|
jsxFactory: "React.createElement",
|
|
1992
1997
|
jsxFragment: "React.Fragment",
|
|
1993
1998
|
jsx: "transform",
|
|
1994
1999
|
jsxImportSource: "react",
|
|
1995
|
-
tsconfig:
|
|
2000
|
+
tsconfig: a,
|
|
1996
2001
|
legalComments: "external",
|
|
1997
|
-
plugins: [Z(
|
|
2002
|
+
plugins: [Z(sa), (0, Rt.pnpPlugin)()],
|
|
1998
2003
|
banner: {
|
|
1999
2004
|
js: "try{"
|
|
2000
2005
|
},
|
|
@@ -2002,8 +2007,8 @@ var lr = /^\/($|\?)/, U, L, wt = /* @__PURE__ */ o(async (e) => {
|
|
|
2002
2007
|
js: '}catch(e){ console.error("[Storybook] One of your manager-entries failed: " + import.meta.url, e); }'
|
|
2003
2008
|
},
|
|
2004
2009
|
define: {
|
|
2005
|
-
"process.env": JSON.stringify(
|
|
2006
|
-
...
|
|
2010
|
+
"process.env": JSON.stringify(r),
|
|
2011
|
+
...oa(r),
|
|
2007
2012
|
global: "window",
|
|
2008
2013
|
module: "{}"
|
|
2009
2014
|
}
|
|
@@ -2013,14 +2018,14 @@ var lr = /^\/($|\?)/, U, L, wt = /* @__PURE__ */ o(async (e) => {
|
|
|
2013
2018
|
let { build: e } = await import("esbuild");
|
|
2014
2019
|
return e;
|
|
2015
2020
|
}, "get")
|
|
2016
|
-
},
|
|
2021
|
+
}, ca = /* @__PURE__ */ o(async function* ({
|
|
2017
2022
|
startTime: i,
|
|
2018
2023
|
options: t,
|
|
2019
|
-
router:
|
|
2024
|
+
router: a
|
|
2020
2025
|
}) {
|
|
2021
2026
|
t.quiet || me.info("=> Starting manager..");
|
|
2022
2027
|
let {
|
|
2023
|
-
config:
|
|
2028
|
+
config: r,
|
|
2024
2029
|
favicon: n,
|
|
2025
2030
|
customHead: s,
|
|
2026
2031
|
features: c,
|
|
@@ -2033,19 +2038,19 @@ var lr = /^\/($|\?)/, U, L, wt = /* @__PURE__ */ o(async (e) => {
|
|
|
2033
2038
|
tagsOptions: m
|
|
2034
2039
|
} = await le(t);
|
|
2035
2040
|
yield;
|
|
2036
|
-
let f =
|
|
2037
|
-
await
|
|
2038
|
-
...
|
|
2041
|
+
let f = r.outdir;
|
|
2042
|
+
await ra(f, { recursive: !0, force: !0 }), yield, L = await p({
|
|
2043
|
+
...r
|
|
2039
2044
|
}), yield;
|
|
2040
|
-
let y =
|
|
2041
|
-
|
|
2045
|
+
let y = F(Ft(S.resolve("storybook/package.json")), "dist", "manager");
|
|
2046
|
+
a.use(
|
|
2042
2047
|
"/sb-addons",
|
|
2043
2048
|
(0, ue.default)(f, {
|
|
2044
2049
|
maxAge: 3e5,
|
|
2045
2050
|
dev: !0,
|
|
2046
2051
|
immutable: !0
|
|
2047
2052
|
})
|
|
2048
|
-
),
|
|
2053
|
+
), a.use(
|
|
2049
2054
|
"/sb-manager",
|
|
2050
2055
|
(0, ue.default)(y, {
|
|
2051
2056
|
maxAge: 3e5,
|
|
@@ -2053,7 +2058,12 @@ var lr = /^\/($|\?)/, U, L, wt = /* @__PURE__ */ o(async (e) => {
|
|
|
2053
2058
|
immutable: !0
|
|
2054
2059
|
})
|
|
2055
2060
|
);
|
|
2056
|
-
let { cssFiles: v, jsFiles: _ } = await ce(f,
|
|
2061
|
+
let { cssFiles: v, jsFiles: _ } = await ce(f, L?.outputFiles);
|
|
2062
|
+
L.metafile && t.outputDir && await Tt(
|
|
2063
|
+
F(t.outputDir, "metafile.json"),
|
|
2064
|
+
JSON.stringify(L.metafile, null, 2)
|
|
2065
|
+
);
|
|
2066
|
+
let O = await pe(t);
|
|
2057
2067
|
yield;
|
|
2058
2068
|
let w = await se(
|
|
2059
2069
|
u,
|
|
@@ -2070,24 +2080,24 @@ var lr = /^\/($|\?)/, U, L, wt = /* @__PURE__ */ o(async (e) => {
|
|
|
2070
2080
|
t,
|
|
2071
2081
|
O
|
|
2072
2082
|
);
|
|
2073
|
-
return yield,
|
|
2074
|
-
E &&
|
|
2075
|
-
}),
|
|
2083
|
+
return yield, a.use("/", ({ url: E }, P, T) => {
|
|
2084
|
+
E && la.test(E) ? (P.statusCode = 200, P.setHeader("Content-Type", "text/html"), P.write(w), P.end()) : T();
|
|
2085
|
+
}), a.use("/index.html", (E, P) => {
|
|
2076
2086
|
P.statusCode = 200, P.setHeader("Content-Type", "text/html"), P.write(w), P.end();
|
|
2077
2087
|
}), {
|
|
2078
|
-
bail:
|
|
2088
|
+
bail: ma,
|
|
2079
2089
|
stats: {
|
|
2080
2090
|
toJson: /* @__PURE__ */ o(() => ({}), "toJson")
|
|
2081
2091
|
},
|
|
2082
2092
|
totalTime: process.hrtime(i)
|
|
2083
2093
|
};
|
|
2084
|
-
}, "starterGeneratorFn"),
|
|
2094
|
+
}, "starterGeneratorFn"), pa = /* @__PURE__ */ o(async function* ({ startTime: i, options: t }) {
|
|
2085
2095
|
if (!t.outputDir)
|
|
2086
2096
|
throw new Error("outputDir is required");
|
|
2087
2097
|
me.info("=> Building manager..");
|
|
2088
2098
|
let {
|
|
2089
|
-
config:
|
|
2090
|
-
customHead:
|
|
2099
|
+
config: a,
|
|
2100
|
+
customHead: r,
|
|
2091
2101
|
favicon: n,
|
|
2092
2102
|
features: s,
|
|
2093
2103
|
instance: c,
|
|
@@ -2099,24 +2109,24 @@ var lr = /^\/($|\?)/, U, L, wt = /* @__PURE__ */ o(async (e) => {
|
|
|
2099
2109
|
tagsOptions: g
|
|
2100
2110
|
} = await le(t);
|
|
2101
2111
|
yield;
|
|
2102
|
-
let m =
|
|
2103
|
-
|
|
2104
|
-
...
|
|
2112
|
+
let m = a.outdir, f = F(Ft(S.resolve("storybook/package.json")), "dist", "manager"), y = F(t.outputDir, "sb-manager");
|
|
2113
|
+
L = await c({
|
|
2114
|
+
...a,
|
|
2105
2115
|
minify: !0
|
|
2106
2116
|
}), yield;
|
|
2107
|
-
let v =
|
|
2117
|
+
let v = aa(f, y, {
|
|
2108
2118
|
filter: /* @__PURE__ */ o((P) => {
|
|
2109
|
-
let { ext: T } =
|
|
2119
|
+
let { ext: T } = na(P);
|
|
2110
2120
|
return T ? T === ".js" : !0;
|
|
2111
2121
|
}, "filter"),
|
|
2112
2122
|
recursive: !0
|
|
2113
|
-
}), { cssFiles: _, jsFiles: O } = await ce(m,
|
|
2123
|
+
}), { cssFiles: _, jsFiles: O } = await ce(m, L?.outputFiles), w = await pe(t);
|
|
2114
2124
|
yield;
|
|
2115
2125
|
let E = await se(
|
|
2116
2126
|
l,
|
|
2117
2127
|
u,
|
|
2118
2128
|
n,
|
|
2119
|
-
|
|
2129
|
+
r,
|
|
2120
2130
|
_,
|
|
2121
2131
|
O,
|
|
2122
2132
|
s,
|
|
@@ -2127,36 +2137,36 @@ var lr = /^\/($|\?)/, U, L, wt = /* @__PURE__ */ o(async (e) => {
|
|
|
2127
2137
|
t,
|
|
2128
2138
|
w
|
|
2129
2139
|
);
|
|
2130
|
-
return await Promise.all([
|
|
2140
|
+
return await Promise.all([Tt(F(t.outputDir, "index.html"), E), v]), me.trace({ message: "=> Manager built", time: process.hrtime(i) }), {
|
|
2131
2141
|
toJson: /* @__PURE__ */ o(() => ({}), "toJson")
|
|
2132
2142
|
};
|
|
2133
|
-
}, "builderGeneratorFn"),
|
|
2134
|
-
if (
|
|
2143
|
+
}, "builderGeneratorFn"), ma = /* @__PURE__ */ o(async () => {
|
|
2144
|
+
if (C)
|
|
2135
2145
|
try {
|
|
2136
|
-
await
|
|
2146
|
+
await C.throw(new Error());
|
|
2137
2147
|
} catch {
|
|
2138
2148
|
}
|
|
2139
|
-
}, "bail"),
|
|
2140
|
-
|
|
2149
|
+
}, "bail"), Rr = /* @__PURE__ */ o(async (e) => {
|
|
2150
|
+
C = ca(e);
|
|
2141
2151
|
let i;
|
|
2142
2152
|
do
|
|
2143
|
-
i = await
|
|
2153
|
+
i = await C.next();
|
|
2144
2154
|
while (!i.done);
|
|
2145
2155
|
return i.value;
|
|
2146
|
-
}, "start"),
|
|
2147
|
-
|
|
2156
|
+
}, "start"), Lr = /* @__PURE__ */ o(async (e) => {
|
|
2157
|
+
C = pa(e);
|
|
2148
2158
|
let i;
|
|
2149
2159
|
do
|
|
2150
|
-
i = await
|
|
2160
|
+
i = await C.next();
|
|
2151
2161
|
while (!i.done);
|
|
2152
2162
|
return i.value;
|
|
2153
|
-
}, "build"),
|
|
2163
|
+
}, "build"), Cr = [], Ar = [];
|
|
2154
2164
|
export {
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2165
|
+
ma as bail,
|
|
2166
|
+
Lr as build,
|
|
2167
|
+
Cr as corePresets,
|
|
2158
2168
|
bt as executor,
|
|
2159
2169
|
wt as getConfig,
|
|
2160
|
-
|
|
2161
|
-
|
|
2170
|
+
Ar as overridePresets,
|
|
2171
|
+
Rr as start
|
|
2162
2172
|
};
|