storybook 9.0.0-beta.8 → 9.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/index.cjs +44 -44
- package/dist/bin/index.js +44 -44
- package/dist/builder-manager/index.cjs +191 -186
- package/dist/builder-manager/index.js +476 -471
- package/dist/channels/index.js +919 -941
- package/dist/cli/bin/index.cjs +1 -1
- package/dist/cli/bin/index.js +1 -1
- package/dist/common/index.cjs +44 -44
- package/dist/common/index.js +44 -44
- package/dist/components/index.js +2254 -2260
- package/dist/core-server/index.cjs +3054 -3025
- package/dist/core-server/index.js +3260 -3230
- package/dist/core-server/presets/common-manager.js +2279 -2288
- package/dist/docs-tools/index.js +596 -603
- package/dist/instrumenter/index.js +1105 -1110
- package/dist/manager/globals-runtime.js +19828 -19967
- package/dist/manager/runtime.js +1874 -1881
- package/dist/manager-api/index.cjs +1 -1
- package/dist/manager-api/index.js +1309 -1340
- package/dist/manager-errors.js +37 -41
- package/dist/preview/runtime.js +12954 -13106
- package/dist/preview-api/index.js +815 -831
- package/dist/preview-errors.js +152 -173
- package/dist/test/index.js +8269 -8357
- package/dist/test/preview.js +3508 -3568
- package/package.json +2 -1
|
@@ -4,11 +4,11 @@ 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
|
|
7
|
+
var At = Object.create;
|
|
8
8
|
var A = Object.defineProperty;
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
9
|
+
var Nt = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var Dt = Object.getOwnPropertyNames;
|
|
11
|
+
var It = Object.getPrototypeOf, Mt = Object.prototype.hasOwnProperty;
|
|
12
12
|
var o = (e, i) => A(e, "name", { value: i, configurable: !0 }), P = /* @__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]
|
|
@@ -20,13 +20,13 @@ var q = (e, i) => () => (e && (i = e(e = 0)), i);
|
|
|
20
20
|
var N = (e, i) => () => (i || e((i = { exports: {} }).exports, i), i.exports), $ = (e, i) => {
|
|
21
21
|
for (var t in i)
|
|
22
22
|
A(e, t, { get: i[t], enumerable: !0 });
|
|
23
|
-
}, fe = (e, i, t,
|
|
23
|
+
}, fe = (e, i, t, r) => {
|
|
24
24
|
if (i && typeof i == "object" || typeof i == "function")
|
|
25
|
-
for (let
|
|
26
|
-
!
|
|
25
|
+
for (let a of Dt(i))
|
|
26
|
+
!Mt.call(e, a) && a !== t && A(e, a, { get: () => i[a], enumerable: !(r = Nt(i, a)) || r.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 ? At(It(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
|
|
@@ -70,7 +70,7 @@ $(Be, {
|
|
|
70
70
|
__spreadArray: () => ke,
|
|
71
71
|
__spreadArrays: () => Re,
|
|
72
72
|
__values: () => H,
|
|
73
|
-
default: () =>
|
|
73
|
+
default: () => Bt
|
|
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 r in e) Object.prototype.hasOwnProperty.call(e, r) && i.indexOf(r) < 0 && (t[r] = e[r]);
|
|
87
87
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
88
|
-
for (var
|
|
89
|
-
i.indexOf(a
|
|
88
|
+
for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
|
|
89
|
+
i.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (t[r[a]] = e[r[a]]);
|
|
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 l = e.length - 1; l >= 0; l--) (s = e[l]) && (n = (
|
|
96
|
-
return
|
|
92
|
+
function ye(e, i, t, r) {
|
|
93
|
+
var a = arguments.length, n = a < 3 ? i : r === null ? r = Object.getOwnPropertyDescriptor(i, t) : r, s;
|
|
94
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") n = Reflect.decorate(e, i, t, r);
|
|
95
|
+
else for (var l = e.length - 1; l >= 0; l--) (s = e[l]) && (n = (a < 3 ? s(n) : a > 3 ? s(i, t, n) : s(i, t)) || n);
|
|
96
|
+
return a > 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, r) {
|
|
100
|
+
i(t, r, e);
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function we(e, i, t,
|
|
103
|
+
function we(e, i, t, r, a, 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 l =
|
|
110
|
-
(c ? Object.getOwnPropertyDescriptor(c,
|
|
109
|
+
for (var l = r.kind, p = l === "getter" ? "get" : l === "setter" ? "set" : "value", c = !i && e ? r.static ? e : e.prototype : null, u = i ||
|
|
110
|
+
(c ? Object.getOwnPropertyDescriptor(c, r.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 r) m[f] = f === "access" ? {} : r[f];
|
|
113
|
+
for (var f in r.access) m.access[f] = r.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, a, r, n) {
|
|
|
119
119
|
if (l === "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)) && (l === "field" ?
|
|
122
|
+
(d = s(y.get)) && (u.get = d), (d = s(y.set)) && (u.set = d), (d = s(y.init)) && a.unshift(d);
|
|
123
|
+
} else (d = s(y)) && (l === "field" ? a.unshift(d) : u[p] = d);
|
|
124
124
|
}
|
|
125
|
-
c && Object.defineProperty(c,
|
|
125
|
+
c && Object.defineProperty(c, r.name, u), x = !0;
|
|
126
126
|
}
|
|
127
127
|
function be(e, i, t) {
|
|
128
|
-
for (var
|
|
129
|
-
t =
|
|
130
|
-
return
|
|
128
|
+
for (var r = arguments.length > 2, a = 0; a < i.length; a++)
|
|
129
|
+
t = r ? i[a].call(e, t) : i[a].call(e);
|
|
130
|
+
return r ? 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, r) {
|
|
143
|
+
function a(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(a, "adopt"), new (t || (t = Promise))(function(n, s) {
|
|
149
149
|
function l(u) {
|
|
150
150
|
try {
|
|
151
|
-
c(
|
|
151
|
+
c(r.next(u));
|
|
152
152
|
} catch (d) {
|
|
153
153
|
s(d);
|
|
154
154
|
}
|
|
@@ -156,23 +156,23 @@ function Ee(e, i, t, a) {
|
|
|
156
156
|
o(l, "fulfilled");
|
|
157
157
|
function p(u) {
|
|
158
158
|
try {
|
|
159
|
-
c(
|
|
159
|
+
c(r.throw(u));
|
|
160
160
|
} catch (d) {
|
|
161
161
|
s(d);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
o(p, "rejected");
|
|
165
165
|
function c(u) {
|
|
166
|
-
u.done ? n(u.value) :
|
|
166
|
+
u.done ? n(u.value) : a(u.value).then(l, p);
|
|
167
167
|
}
|
|
168
|
-
o(c, "step"), c((
|
|
168
|
+
o(c, "step"), c((r = r.apply(e, i || [])).next());
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
function Se(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: [] }, r, a, n, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
176
176
|
return s.next = l(0), s.throw = l(1), s.return = l(2), typeof Symbol == "function" && (s[Symbol.iterator] = function() {
|
|
177
177
|
return this;
|
|
178
178
|
}), s;
|
|
@@ -182,11 +182,11 @@ function Se(e, i) {
|
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
184
|
function p(c) {
|
|
185
|
-
if (
|
|
185
|
+
if (r) throw new TypeError("Generator is already executing.");
|
|
186
186
|
for (; s && (s = 0, c[0] && (t = 0)), t; ) try {
|
|
187
|
-
if (
|
|
187
|
+
if (r = 1, a && (n = c[0] & 2 ? a.return : c[0] ? a.throw || ((n = a.return) && n.call(a), 0) : a.next) && !(n = n.call(a, c[1])).done)
|
|
188
188
|
return n;
|
|
189
|
-
switch (
|
|
189
|
+
switch (a = 0, n && (c = [c[0] & 2, n.value]), c[0]) {
|
|
190
190
|
case 0:
|
|
191
191
|
case 1:
|
|
192
192
|
n = c;
|
|
@@ -194,7 +194,7 @@ function Se(e, i) {
|
|
|
194
194
|
case 4:
|
|
195
195
|
return t.label++, { value: c[1], done: !1 };
|
|
196
196
|
case 5:
|
|
197
|
-
t.label++,
|
|
197
|
+
t.label++, a = c[1], c = [0];
|
|
198
198
|
continue;
|
|
199
199
|
case 7:
|
|
200
200
|
c = t.ops.pop(), t.trys.pop();
|
|
@@ -221,9 +221,9 @@ function Se(e, i) {
|
|
|
221
221
|
}
|
|
222
222
|
c = i.call(e, t);
|
|
223
223
|
} catch (u) {
|
|
224
|
-
c = [6, u],
|
|
224
|
+
c = [6, u], a = 0;
|
|
225
225
|
} finally {
|
|
226
|
-
|
|
226
|
+
r = n = 0;
|
|
227
227
|
}
|
|
228
228
|
if (c[0] & 5) throw c[1];
|
|
229
229
|
return { value: c[0] ? c[1] : void 0, done: !0 };
|
|
@@ -233,11 +233,11 @@ function Pe(e, i) {
|
|
|
233
233
|
for (var t in e) t !== "default" && !Object.prototype.hasOwnProperty.call(i, t) && J(i, e, t);
|
|
234
234
|
}
|
|
235
235
|
function H(e) {
|
|
236
|
-
var i = typeof Symbol == "function" && Symbol.iterator, t = i && e[i],
|
|
236
|
+
var i = typeof Symbol == "function" && Symbol.iterator, t = i && e[i], r = 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 && r >= e.length && (e = void 0), { value: e && e[r++], 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 r = t.call(e), a, n = [], s;
|
|
249
249
|
try {
|
|
250
|
-
for (; (i === void 0 || i-- > 0) && !(
|
|
250
|
+
for (; (i === void 0 || i-- > 0) && !(a = r.next()).done; ) n.push(a.value);
|
|
251
251
|
} catch (l) {
|
|
252
252
|
s = { error: l };
|
|
253
253
|
} finally {
|
|
254
254
|
try {
|
|
255
|
-
|
|
255
|
+
a && !a.done && (t = r.return) && t.call(r);
|
|
256
256
|
} finally {
|
|
257
257
|
if (s) throw s.error;
|
|
258
258
|
}
|
|
@@ -266,14 +266,14 @@ function Te() {
|
|
|
266
266
|
}
|
|
267
267
|
function Re() {
|
|
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, l = n.length; s < l; s++,
|
|
271
|
-
a
|
|
272
|
-
return
|
|
269
|
+
for (var r = Array(e), a = 0, i = 0; i < t; i++)
|
|
270
|
+
for (var n = arguments[i], s = 0, l = n.length; s < l; s++, a++)
|
|
271
|
+
r[a] = n[s];
|
|
272
|
+
return r;
|
|
273
273
|
}
|
|
274
274
|
function ke(e, i, t) {
|
|
275
|
-
if (t || arguments.length === 2) for (var
|
|
276
|
-
(n || !(
|
|
275
|
+
if (t || arguments.length === 2) for (var r = 0, a = i.length, n; r < a; r++)
|
|
276
|
+
(n || !(r in i)) && (n || (n = Array.prototype.slice.call(i, 0, r)), n[r] = i[r]);
|
|
277
277
|
return e.concat(n || Array.prototype.slice.call(i));
|
|
278
278
|
}
|
|
279
279
|
function F(e) {
|
|
@@ -281,26 +281,26 @@ function F(e) {
|
|
|
281
281
|
}
|
|
282
282
|
function Fe(e, i, t) {
|
|
283
283
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
284
|
-
var
|
|
285
|
-
return
|
|
284
|
+
var r = t.apply(e, i || []), a, n = [];
|
|
285
|
+
return a = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), l("next"), l("throw"), l("return", s), a[Symbol.
|
|
286
286
|
asyncIterator] = function() {
|
|
287
287
|
return this;
|
|
288
|
-
},
|
|
288
|
+
}, a;
|
|
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 l(g, m) {
|
|
295
|
-
|
|
295
|
+
r[g] && (a[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 && (a[g] = m(a[g])));
|
|
300
300
|
}
|
|
301
301
|
function p(g, m) {
|
|
302
302
|
try {
|
|
303
|
-
c(
|
|
303
|
+
c(r[g](m));
|
|
304
304
|
} catch (f) {
|
|
305
305
|
x(n[0][3], f);
|
|
306
306
|
}
|
|
@@ -320,32 +320,32 @@ function Fe(e, i, t) {
|
|
|
320
320
|
}
|
|
321
321
|
function Le(e) {
|
|
322
322
|
var i, t;
|
|
323
|
-
return i = {},
|
|
324
|
-
throw
|
|
325
|
-
}),
|
|
323
|
+
return i = {}, r("next"), r("throw", function(a) {
|
|
324
|
+
throw a;
|
|
325
|
+
}), r("return"), i[Symbol.iterator] = function() {
|
|
326
326
|
return this;
|
|
327
327
|
}, i;
|
|
328
|
-
function a
|
|
329
|
-
i[
|
|
330
|
-
return (t = !t) ? { value: F(e[
|
|
328
|
+
function r(a, n) {
|
|
329
|
+
i[a] = e[a] ? function(s) {
|
|
330
|
+
return (t = !t) ? { value: F(e[a](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 H == "function" ? H(e) : e[Symbol.iterator](), t = {},
|
|
337
|
+
return i ? i.call(e) : (e = typeof H == "function" ? H(e) : e[Symbol.iterator](), t = {}, r("next"), r("throw"), r("return"), t[Symbol.asyncIterator] =
|
|
338
338
|
function() {
|
|
339
339
|
return this;
|
|
340
340
|
}, t);
|
|
341
|
-
function
|
|
341
|
+
function r(n) {
|
|
342
342
|
t[n] = e[n] && function(s) {
|
|
343
343
|
return new Promise(function(l, p) {
|
|
344
|
-
s = e[n](s),
|
|
344
|
+
s = e[n](s), a(l, p, s.done, s.value);
|
|
345
345
|
});
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function a(n, s, l, p) {
|
|
349
349
|
Promise.resolve(p).then(function(c) {
|
|
350
350
|
n({ value: c, done: l });
|
|
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), r = 0; r < t.length; r++) t[r] !== "default" && J(i, e, t[r]);
|
|
361
|
+
return $t(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, r) {
|
|
367
|
+
if (t === "a" && !r) throw new TypeError("Private accessor was defined without a getter");
|
|
368
|
+
if (typeof i == "function" ? e !== i || !r : !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" ? r : t === "a" ? r.call(e) : r ? r.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, r, a) {
|
|
373
|
+
if (r === "m") throw new TypeError("Private method is not writable");
|
|
374
|
+
if (r === "a" && !a) throw new TypeError("Private accessor was defined without a setter");
|
|
375
|
+
if (typeof i == "function" ? e !== i || !a : !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 r === "a" ? a.call(e, t) : a ? a.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,68 +383,68 @@ 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 r, a;
|
|
387
387
|
if (t) {
|
|
388
388
|
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
389
|
-
|
|
389
|
+
r = i[Symbol.asyncDispose];
|
|
390
390
|
}
|
|
391
|
-
if (
|
|
391
|
+
if (r === void 0) {
|
|
392
392
|
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
393
|
-
|
|
393
|
+
r = i[Symbol.dispose], t && (a = r);
|
|
394
394
|
}
|
|
395
|
-
if (typeof
|
|
396
|
-
|
|
395
|
+
if (typeof r != "function") throw new TypeError("Object not disposable.");
|
|
396
|
+
a && (r = /* @__PURE__ */ o(function() {
|
|
397
397
|
try {
|
|
398
|
-
|
|
398
|
+
a.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: r, 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 Wt(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, r = 0;
|
|
412
|
+
function a() {
|
|
413
413
|
for (; t = e.stack.pop(); )
|
|
414
414
|
try {
|
|
415
|
-
if (!t.async &&
|
|
415
|
+
if (!t.async && r === 1) return r = 0, e.stack.push(t), Promise.resolve().then(a);
|
|
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 r |= 2, Promise.resolve(n).then(a, function(s) {
|
|
419
|
+
return i(s), a();
|
|
420
420
|
});
|
|
421
|
-
} else
|
|
421
|
+
} else r |= 1;
|
|
422
422
|
} catch (s) {
|
|
423
423
|
i(s);
|
|
424
424
|
}
|
|
425
|
-
if (
|
|
425
|
+
if (r === 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(a, "next"), a();
|
|
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, r, a, n, s) {
|
|
432
|
+
return r ? i ? ".jsx" : ".js" : a && (!n || !s) ? t : a + n + "." + s.toLowerCase() + "js";
|
|
433
433
|
}) : e;
|
|
434
434
|
}
|
|
435
|
-
var Y, B, J,
|
|
435
|
+
var Y, B, J, $t, Q, Wt, Bt, He = 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, r) {
|
|
438
|
+
t.__proto__ = r;
|
|
439
|
+
} || function(t, r) {
|
|
440
|
+
for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
|
|
441
441
|
}, Y(e, i);
|
|
442
442
|
}, "extendStatics");
|
|
443
443
|
o(xe, "__extends");
|
|
444
444
|
B = /* @__PURE__ */ o(function() {
|
|
445
445
|
return B = Object.assign || /* @__PURE__ */ o(function(i) {
|
|
446
|
-
for (var t,
|
|
447
|
-
t = arguments[
|
|
446
|
+
for (var t, r = 1, a = arguments.length; r < a; r++) {
|
|
447
|
+
t = arguments[r];
|
|
448
448
|
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (i[n] = t[n]);
|
|
449
449
|
}
|
|
450
450
|
return i;
|
|
@@ -460,14 +460,14 @@ var Y, B, J, qt, Q, $t, Wt, He = q(() => {
|
|
|
460
460
|
o(Oe, "__metadata");
|
|
461
461
|
o(Ee, "__awaiter");
|
|
462
462
|
o(Se, "__generator");
|
|
463
|
-
J = Object.create ? function(e, i, t,
|
|
464
|
-
|
|
465
|
-
var
|
|
466
|
-
(!
|
|
463
|
+
J = Object.create ? function(e, i, t, r) {
|
|
464
|
+
r === void 0 && (r = t);
|
|
465
|
+
var a = Object.getOwnPropertyDescriptor(i, t);
|
|
466
|
+
(!a || ("get" in a ? !i.__esModule : a.writable || a.configurable)) && (a = { 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, r, a);
|
|
469
|
+
} : function(e, i, t, r) {
|
|
470
|
+
r === void 0 && (r = t), e[r] = i[t];
|
|
471
471
|
};
|
|
472
472
|
o(Pe, "__exportStar");
|
|
473
473
|
o(H, "__values");
|
|
@@ -480,14 +480,14 @@ var Y, B, J, qt, Q, $t, Wt, He = q(() => {
|
|
|
480
480
|
o(Le, "__asyncDelegator");
|
|
481
481
|
o(Ce, "__asyncValues");
|
|
482
482
|
o(Ae, "__makeTemplateObject");
|
|
483
|
-
|
|
483
|
+
$t = 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 r in i) Object.prototype.hasOwnProperty.call(i, r) && (t[t.length] = r);
|
|
491
491
|
return t;
|
|
492
492
|
}, Q(e);
|
|
493
493
|
}, "ownKeys");
|
|
@@ -497,13 +497,13 @@ var Y, B, J, qt, Q, $t, Wt, He = q(() => {
|
|
|
497
497
|
o(Me, "__classPrivateFieldSet");
|
|
498
498
|
o(ze, "__classPrivateFieldIn");
|
|
499
499
|
o(qe, "__addDisposableResource");
|
|
500
|
-
|
|
501
|
-
var
|
|
502
|
-
return
|
|
500
|
+
Wt = typeof SuppressedError == "function" ? SuppressedError : function(e, i, t) {
|
|
501
|
+
var r = new Error(t);
|
|
502
|
+
return r.name = "SuppressedError", r.error = e, r.suppressed = i, r;
|
|
503
503
|
};
|
|
504
504
|
o($e, "__disposeResources");
|
|
505
505
|
o(We, "__rewriteRelativeImportExtension");
|
|
506
|
-
|
|
506
|
+
Bt = {
|
|
507
507
|
__extends: xe,
|
|
508
508
|
__assign: B,
|
|
509
509
|
__rest: he,
|
|
@@ -540,20 +540,20 @@ var Y, B, J, qt, Q, $t, Wt, He = q(() => {
|
|
|
540
540
|
});
|
|
541
541
|
|
|
542
542
|
// ../node_modules/@yarnpkg/esbuild-plugin-pnp/lib/index.js
|
|
543
|
-
var
|
|
543
|
+
var Ue = N((U) => {
|
|
544
544
|
"use strict";
|
|
545
|
-
Object.defineProperty(
|
|
546
|
-
|
|
547
|
-
var Je = (He(), W(Be)),
|
|
545
|
+
Object.defineProperty(U, "__esModule", { value: !0 });
|
|
546
|
+
U.pnpPlugin = void 0;
|
|
547
|
+
var Je = (He(), W(Be)), Ht = Je.__importStar(P("fs")), Jt = Je.__importDefault(P("path")), Ut = /()/, Gt = [".tsx", ".ts", ".jsx", ".mjs",
|
|
548
548
|
".cjs", ".js", ".css", ".json"];
|
|
549
|
-
function
|
|
549
|
+
function Vt(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(Vt, "parseExternals");
|
|
556
|
+
function Xt(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 Ge = N((G) => {
|
|
|
563
563
|
return !0;
|
|
564
564
|
return !1;
|
|
565
565
|
}
|
|
566
|
-
o(
|
|
567
|
-
async function
|
|
566
|
+
o(Xt, "isExternal");
|
|
567
|
+
async function Kt(e) {
|
|
568
568
|
return {
|
|
569
|
-
contents: await
|
|
569
|
+
contents: await Ht.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: Jt.default.dirname(e.path)
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
-
o(
|
|
580
|
-
async function
|
|
581
|
-
let
|
|
579
|
+
o(Kt, "defaultOnLoad");
|
|
580
|
+
async function Zt(e, { resolvedPath: i, error: t, watchFiles: r }) {
|
|
581
|
+
let a = 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: a };
|
|
587
587
|
break;
|
|
588
588
|
default:
|
|
589
|
-
n = { errors:
|
|
589
|
+
n = { errors: a };
|
|
590
590
|
break;
|
|
591
591
|
}
|
|
592
|
-
return i !== null ? { namespace: "pnp", path: i, watchFiles:
|
|
592
|
+
return i !== null ? { namespace: "pnp", path: i, watchFiles: r } : { external: !0, ...n, watchFiles: r };
|
|
593
593
|
}
|
|
594
|
-
o(
|
|
595
|
-
function
|
|
594
|
+
o(Zt, "defaultOnResolve");
|
|
595
|
+
function Yt({ baseDir: e = process.cwd(), extensions: i = Gt, filter: t = Ut, onResolve: r = Zt, onLoad: a = Kt } = {}) {
|
|
596
596
|
return {
|
|
597
597
|
name: "@yarnpkg/esbuild-plugin-pnp",
|
|
598
598
|
setup(n) {
|
|
@@ -600,7 +600,7 @@ var Ge = N((G) => {
|
|
|
600
600
|
let { findPnpApi: p } = P("module");
|
|
601
601
|
if (typeof p > "u")
|
|
602
602
|
return;
|
|
603
|
-
let c =
|
|
603
|
+
let c = Vt((s = n.initialOptions.external) !== null && s !== void 0 ? s : []), u = (l = n.initialOptions.platform) !== null && l !==
|
|
604
604
|
void 0 ? l : "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 Ge = N((G) => {
|
|
|
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 (Xt(f.path, c))
|
|
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") &&
|
|
@@ -630,67 +630,67 @@ var Ge = N((G) => {
|
|
|
630
630
|
if (E) {
|
|
631
631
|
let z = w.findPackageLocator(E);
|
|
632
632
|
if (z) {
|
|
633
|
-
let
|
|
634
|
-
|
|
633
|
+
let G = w.getPackageInformation(z);
|
|
634
|
+
G?.linkType === "SOFT" && R.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 r(f, { resolvedPath: E, error: S, watchFiles: R });
|
|
639
|
+
}), n.onLoad !== null && n.onLoad({ filter: t }, a);
|
|
640
640
|
}
|
|
641
641
|
};
|
|
642
642
|
}
|
|
643
|
-
o(
|
|
644
|
-
|
|
643
|
+
o(Yt, "pnpPlugin");
|
|
644
|
+
U.pnpPlugin = Yt;
|
|
645
645
|
});
|
|
646
646
|
|
|
647
647
|
// ../node_modules/totalist/sync/index.mjs
|
|
648
648
|
var Ve = {};
|
|
649
649
|
$(Ve, {
|
|
650
|
-
totalist: () =>
|
|
650
|
+
totalist: () => Ge
|
|
651
651
|
});
|
|
652
|
-
import { join as te, resolve as
|
|
653
|
-
import { readdirSync as
|
|
654
|
-
function
|
|
655
|
-
e =
|
|
656
|
-
let
|
|
657
|
-
for (;
|
|
658
|
-
n = te(e, a
|
|
652
|
+
import { join as te, resolve as Qt } from "path";
|
|
653
|
+
import { readdirSync as ei, statSync as ti } from "fs";
|
|
654
|
+
function Ge(e, i, t = "") {
|
|
655
|
+
e = Qt(".", e);
|
|
656
|
+
let r = ei(e), a = 0, n, s;
|
|
657
|
+
for (; a < r.length; a++)
|
|
658
|
+
n = te(e, r[a]), s = ti(n), s.isDirectory() ? Ge(n, i, te(t, r[a])) : i(te(t, r[a]), n, s);
|
|
659
659
|
}
|
|
660
660
|
var Xe = q(() => {
|
|
661
|
-
o(
|
|
661
|
+
o(Ge, "totalist");
|
|
662
662
|
});
|
|
663
663
|
|
|
664
664
|
// ../node_modules/@polka/url/build.mjs
|
|
665
665
|
var Ze = {};
|
|
666
666
|
$(Ze, {
|
|
667
|
-
parse: () =>
|
|
667
|
+
parse: () => ii
|
|
668
668
|
});
|
|
669
669
|
import * as Ke from "node:querystring";
|
|
670
|
-
function
|
|
670
|
+
function ii(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 r = i, a = "", n, s;
|
|
676
676
|
if (i.length > 1) {
|
|
677
677
|
let l = i.indexOf("#", 1);
|
|
678
|
-
l !== -1 && (s = i.substring(l),
|
|
679
|
-
length > 1 && (n = Ke.parse(
|
|
678
|
+
l !== -1 && (s = i.substring(l), r = i.substring(0, l)), l = r.indexOf("?", 1), l !== -1 && (a = r.substring(l), r = r.substring(0, l), a.
|
|
679
|
+
length > 1 && (n = Ke.parse(a.substring(1))));
|
|
680
680
|
}
|
|
681
|
-
return e._parsedUrl = { pathname:
|
|
681
|
+
return e._parsedUrl = { pathname: r, search: a, query: n, hash: s, raw: i };
|
|
682
682
|
}
|
|
683
683
|
var Ye = q(() => {
|
|
684
|
-
o(
|
|
684
|
+
o(ii, "parse");
|
|
685
685
|
});
|
|
686
686
|
|
|
687
687
|
// ../node_modules/mrmime/index.mjs
|
|
688
688
|
var et = {};
|
|
689
689
|
$(et, {
|
|
690
|
-
lookup: () =>
|
|
690
|
+
lookup: () => ri,
|
|
691
691
|
mimes: () => Qe
|
|
692
692
|
});
|
|
693
|
-
function
|
|
693
|
+
function ri(e) {
|
|
694
694
|
let i = ("" + e).trim().toLowerCase(), t = i.lastIndexOf(".");
|
|
695
695
|
return Qe[~t ? i.substring(++t) : i];
|
|
696
696
|
}
|
|
@@ -1135,82 +1135,82 @@ var Qe, tt = q(() => {
|
|
|
1135
1135
|
yml: "text/yaml",
|
|
1136
1136
|
zip: "application/zip"
|
|
1137
1137
|
};
|
|
1138
|
-
o(
|
|
1138
|
+
o(ri, "lookup");
|
|
1139
1139
|
});
|
|
1140
1140
|
|
|
1141
1141
|
// ../node_modules/sirv/build.js
|
|
1142
|
-
var nt = N((
|
|
1143
|
-
var ie = P("fs"), { join: ai, normalize:
|
|
1144
|
-
lookup:
|
|
1142
|
+
var nt = N((Ir, at) => {
|
|
1143
|
+
var ie = P("fs"), { join: ai, normalize: ni, resolve: oi } = P("path"), { totalist: si } = (Xe(), W(Ve)), { parse: li } = (Ye(), W(Ze)), {
|
|
1144
|
+
lookup: ci } = (tt(), W(et)), pi = /* @__PURE__ */ o(() => {
|
|
1145
1145
|
}, "noop");
|
|
1146
|
-
function
|
|
1146
|
+
function mi(e, i) {
|
|
1147
1147
|
for (let t = 0; t < i.length; t++)
|
|
1148
1148
|
if (i[t].test(e)) return !0;
|
|
1149
1149
|
}
|
|
1150
|
-
o(
|
|
1150
|
+
o(mi, "isMatch");
|
|
1151
1151
|
function it(e, i) {
|
|
1152
|
-
let t = 0,
|
|
1153
|
-
e.charCodeAt(
|
|
1152
|
+
let t = 0, r, a = e.length - 1;
|
|
1153
|
+
e.charCodeAt(a) === 47 && (e = e.substring(0, a));
|
|
1154
1154
|
let n = [], s = `${e}/index`;
|
|
1155
1155
|
for (; t < i.length; t++)
|
|
1156
|
-
|
|
1156
|
+
r = i[t] ? `.${i[t]}` : "", e && n.push(e + r), n.push(s + r);
|
|
1157
1157
|
return n;
|
|
1158
1158
|
}
|
|
1159
1159
|
o(it, "toAssume");
|
|
1160
|
-
function
|
|
1161
|
-
let
|
|
1162
|
-
for (; a < n.length; a++)
|
|
1163
|
-
if (r = e[n[a]]) return r;
|
|
1164
|
-
}
|
|
1165
|
-
o(mi, "viaCache");
|
|
1166
|
-
function ui(e, i, t, a) {
|
|
1167
|
-
let r = 0, n = it(t, a), s, l, p, c;
|
|
1160
|
+
function ui(e, i, t) {
|
|
1161
|
+
let r = 0, a, n = it(i, t);
|
|
1168
1162
|
for (; r < n.length; r++)
|
|
1169
|
-
if (
|
|
1163
|
+
if (a = e[n[r]]) return a;
|
|
1164
|
+
}
|
|
1165
|
+
o(ui, "viaCache");
|
|
1166
|
+
function fi(e, i, t, r) {
|
|
1167
|
+
let a = 0, n = it(t, r), s, l, p, c;
|
|
1168
|
+
for (; a < n.length; a++)
|
|
1169
|
+
if (s = ni(ai(e, p = n[a])), s.startsWith(e) && ie.existsSync(s)) {
|
|
1170
1170
|
if (l = ie.statSync(s), l.isDirectory()) continue;
|
|
1171
|
-
return c =
|
|
1171
|
+
return c = rt(p, l, i), c["Cache-Control"] = i ? "no-cache" : "no-store", { abs: s, stats: l, headers: c };
|
|
1172
1172
|
}
|
|
1173
1173
|
}
|
|
1174
|
-
o(
|
|
1175
|
-
function
|
|
1174
|
+
o(fi, "viaLocal");
|
|
1175
|
+
function di(e, i) {
|
|
1176
1176
|
return i.statusCode = 404, i.end();
|
|
1177
1177
|
}
|
|
1178
|
-
o(
|
|
1179
|
-
function
|
|
1178
|
+
o(di, "is404");
|
|
1179
|
+
function gi(e, i, t, r, a) {
|
|
1180
1180
|
let n = 200, s, l = {};
|
|
1181
|
-
|
|
1182
|
-
for (let p in
|
|
1183
|
-
s = i.getHeader(p), s && (
|
|
1184
|
-
if ((s = i.getHeader("content-type")) && (
|
|
1181
|
+
a = { ...a };
|
|
1182
|
+
for (let p in a)
|
|
1183
|
+
s = i.getHeader(p), s && (a[p] = s);
|
|
1184
|
+
if ((s = i.getHeader("content-type")) && (a["Content-Type"] = s), e.headers.range) {
|
|
1185
1185
|
n = 206;
|
|
1186
|
-
let [p, c] = e.headers.range.replace("bytes=", "").split("-"), u = l.end = parseInt(c, 10) ||
|
|
1186
|
+
let [p, c] = e.headers.range.replace("bytes=", "").split("-"), u = l.end = parseInt(c, 10) || r.size - 1, d = l.start = parseInt(p, 10) ||
|
|
1187
1187
|
0;
|
|
1188
|
-
if (u >=
|
|
1189
|
-
return i.setHeader("Content-Range", `bytes */${
|
|
1190
|
-
|
|
1188
|
+
if (u >= r.size && (u = r.size - 1), d >= r.size)
|
|
1189
|
+
return i.setHeader("Content-Range", `bytes */${r.size}`), i.statusCode = 416, i.end();
|
|
1190
|
+
a["Content-Range"] = `bytes ${d}-${u}/${r.size}`, a["Content-Length"] = u - d + 1, a["Accept-Ranges"] = "bytes";
|
|
1191
1191
|
}
|
|
1192
|
-
i.writeHead(n,
|
|
1192
|
+
i.writeHead(n, a), ie.createReadStream(t, l).pipe(i);
|
|
1193
1193
|
}
|
|
1194
|
-
o(
|
|
1195
|
-
var
|
|
1194
|
+
o(gi, "send");
|
|
1195
|
+
var xi = {
|
|
1196
1196
|
".br": "br",
|
|
1197
1197
|
".gz": "gzip"
|
|
1198
1198
|
};
|
|
1199
|
-
function
|
|
1200
|
-
let
|
|
1201
|
-
|
|
1199
|
+
function rt(e, i, t) {
|
|
1200
|
+
let r = xi[e.slice(-3)], a = ci(e.slice(0, r && -3)) || "";
|
|
1201
|
+
a === "text/html" && (a += ";charset=utf-8");
|
|
1202
1202
|
let n = {
|
|
1203
1203
|
"Content-Length": i.size,
|
|
1204
|
-
"Content-Type":
|
|
1204
|
+
"Content-Type": a,
|
|
1205
1205
|
"Last-Modified": i.mtime.toUTCString()
|
|
1206
1206
|
};
|
|
1207
|
-
return
|
|
1207
|
+
return r && (n["Content-Encoding"] = r), t && (n.ETag = `W/"${i.size}-${i.mtime.getTime()}"`), n;
|
|
1208
1208
|
}
|
|
1209
|
-
o(
|
|
1210
|
-
|
|
1211
|
-
e =
|
|
1212
|
-
let t = i.onNoMatch ||
|
|
1213
|
-
s = i.brotli &&
|
|
1209
|
+
o(rt, "toHeaders");
|
|
1210
|
+
at.exports = function(e, i = {}) {
|
|
1211
|
+
e = oi(e || ".");
|
|
1212
|
+
let t = i.onNoMatch || di, r = i.setHeaders || pi, a = i.extensions || ["html", "htm"], n = i.gzip && a.map((m) => `${m}.gz`).concat("gz"),
|
|
1213
|
+
s = i.brotli && a.map((m) => `${m}.br`).concat("br"), l = {}, p = "/", c = !!i.etag, u = !!i.single;
|
|
1214
1214
|
if (typeof i.single == "string") {
|
|
1215
1215
|
let m = i.single.lastIndexOf(".");
|
|
1216
1216
|
p += ~m ? i.single.substring(0, m) : i.single;
|
|
@@ -1221,51 +1221,51 @@ var nt = N((Da, rt) => {
|
|
|
1221
1221
|
d.push(new RegExp(m, "i"));
|
|
1222
1222
|
}));
|
|
1223
1223
|
let x = i.maxAge != null && `public,max-age=${i.maxAge}`;
|
|
1224
|
-
x && i.immutable ? x += ",immutable" : x && i.maxAge === 0 && (x += ",must-revalidate"), i.dev ||
|
|
1224
|
+
x && i.immutable ? x += ",immutable" : x && i.maxAge === 0 && (x += ",must-revalidate"), i.dev || si(e, (m, f, y) => {
|
|
1225
1225
|
if (!/\.well-known[\\+\/]/.test(m)) {
|
|
1226
1226
|
if (!i.dotfiles && /(^\.|[\\+|\/+]\.)/.test(m)) return;
|
|
1227
1227
|
}
|
|
1228
|
-
let v =
|
|
1228
|
+
let v = rt(m, y, c);
|
|
1229
1229
|
x && (v["Cache-Control"] = x), l["/" + m.normalize().replace(/\\+/g, "/")] = { abs: f, stats: y, headers: v };
|
|
1230
1230
|
});
|
|
1231
|
-
let g = i.dev ?
|
|
1231
|
+
let g = i.dev ? fi.bind(0, e, c) : ui.bind(0, l);
|
|
1232
1232
|
return function(m, f, y) {
|
|
1233
|
-
let v = [""], _ =
|
|
1234
|
-
if (n && O.includes("gzip") && v.unshift(...n), s && /(br|brotli)/i.test(O) && v.unshift(...s), v.push(...
|
|
1233
|
+
let v = [""], _ = li(m).pathname, O = m.headers["accept-encoding"] || "";
|
|
1234
|
+
if (n && O.includes("gzip") && v.unshift(...n), s && /(br|brotli)/i.test(O) && v.unshift(...s), v.push(...a), _.indexOf("%") !== -1)
|
|
1235
1235
|
try {
|
|
1236
1236
|
_ = decodeURI(_);
|
|
1237
1237
|
} catch {
|
|
1238
1238
|
}
|
|
1239
|
-
let w = g(_, v) || u && !
|
|
1239
|
+
let w = g(_, v) || u && !mi(_, d) && g(p, v);
|
|
1240
1240
|
if (!w) return y ? y() : t(m, f);
|
|
1241
1241
|
if (c && m.headers["if-none-match"] === w.headers.ETag)
|
|
1242
1242
|
return f.writeHead(304), f.end();
|
|
1243
|
-
(n || s) && f.setHeader("Vary", "Accept-Encoding"),
|
|
1243
|
+
(n || s) && f.setHeader("Vary", "Accept-Encoding"), r(f, _, w.stats), gi(m, f, w.abs, w.stats, w.headers);
|
|
1244
1244
|
};
|
|
1245
1245
|
};
|
|
1246
1246
|
});
|
|
1247
1247
|
|
|
1248
1248
|
// ../node_modules/ejs/lib/utils.js
|
|
1249
|
-
var
|
|
1249
|
+
var ct = N((T) => {
|
|
1250
1250
|
"use strict";
|
|
1251
|
-
var
|
|
1252
|
-
return
|
|
1251
|
+
var hi = /[|\\{}()[\]^$+*?.]/g, yi = Object.prototype.hasOwnProperty, re = /* @__PURE__ */ o(function(e, i) {
|
|
1252
|
+
return yi.apply(e, [i]);
|
|
1253
1253
|
}, "hasOwn");
|
|
1254
1254
|
T.escapeRegExpChars = function(e) {
|
|
1255
|
-
return e ? String(e).replace(
|
|
1255
|
+
return e ? String(e).replace(hi, "\\$&") : "";
|
|
1256
1256
|
};
|
|
1257
|
-
var
|
|
1257
|
+
var vi = {
|
|
1258
1258
|
"&": "&",
|
|
1259
1259
|
"<": "<",
|
|
1260
1260
|
">": ">",
|
|
1261
1261
|
'"': """,
|
|
1262
1262
|
"'": "'"
|
|
1263
|
-
},
|
|
1264
|
-
function
|
|
1265
|
-
return
|
|
1263
|
+
}, wi = /[&<>'"]/g;
|
|
1264
|
+
function bi(e) {
|
|
1265
|
+
return vi[e] || e;
|
|
1266
1266
|
}
|
|
1267
|
-
o(
|
|
1268
|
-
var
|
|
1267
|
+
o(bi, "encode_char");
|
|
1268
|
+
var _i = `var _ENCODE_HTML_RULES = {
|
|
1269
1269
|
"&": "&"
|
|
1270
1270
|
, "<": "<"
|
|
1271
1271
|
, ">": ">"
|
|
@@ -1278,32 +1278,32 @@ function encode_char(c) {
|
|
|
1278
1278
|
};
|
|
1279
1279
|
`;
|
|
1280
1280
|
T.escapeXML = function(e) {
|
|
1281
|
-
return e == null ? "" : String(e).replace(
|
|
1281
|
+
return e == null ? "" : String(e).replace(wi, bi);
|
|
1282
1282
|
};
|
|
1283
|
-
function
|
|
1283
|
+
function lt() {
|
|
1284
1284
|
return Function.prototype.toString.call(this) + `;
|
|
1285
|
-
` +
|
|
1285
|
+
` + _i;
|
|
1286
1286
|
}
|
|
1287
|
-
o(
|
|
1287
|
+
o(lt, "escapeXMLToString");
|
|
1288
1288
|
try {
|
|
1289
|
-
typeof Object.defineProperty == "function" ? Object.defineProperty(T.escapeXML, "toString", { value:
|
|
1289
|
+
typeof Object.defineProperty == "function" ? Object.defineProperty(T.escapeXML, "toString", { value: lt }) : T.escapeXML.toString = lt;
|
|
1290
1290
|
} catch {
|
|
1291
1291
|
console.warn("Unable to set escapeXML.toString (is the Function prototype frozen?)");
|
|
1292
1292
|
}
|
|
1293
1293
|
T.shallowCopy = function(e, i) {
|
|
1294
1294
|
if (i = i || {}, e != null)
|
|
1295
1295
|
for (var t in i)
|
|
1296
|
-
|
|
1296
|
+
re(i, t) && (t === "__proto__" || t === "constructor" || (e[t] = i[t]));
|
|
1297
1297
|
return e;
|
|
1298
1298
|
};
|
|
1299
1299
|
T.shallowCopyFromList = function(e, i, t) {
|
|
1300
1300
|
if (t = t || [], i = i || {}, e != null)
|
|
1301
|
-
for (var
|
|
1302
|
-
var
|
|
1303
|
-
if (typeof i[
|
|
1304
|
-
if (!
|
|
1301
|
+
for (var r = 0; r < t.length; r++) {
|
|
1302
|
+
var a = t[r];
|
|
1303
|
+
if (typeof i[a] < "u") {
|
|
1304
|
+
if (!re(i, a) || a === "__proto__" || a === "constructor")
|
|
1305
1305
|
continue;
|
|
1306
|
-
e[
|
|
1306
|
+
e[a] = i[a];
|
|
1307
1307
|
}
|
|
1308
1308
|
}
|
|
1309
1309
|
return e;
|
|
@@ -1340,14 +1340,14 @@ function encode_char(c) {
|
|
|
1340
1340
|
T.hasOwnOnlyObject = function(e) {
|
|
1341
1341
|
var i = T.createNullProtoObjWherePossible();
|
|
1342
1342
|
for (var t in e)
|
|
1343
|
-
|
|
1343
|
+
re(e, t) && (i[t] = e[t]);
|
|
1344
1344
|
return i;
|
|
1345
1345
|
};
|
|
1346
1346
|
});
|
|
1347
1347
|
|
|
1348
1348
|
// ../node_modules/ejs/package.json
|
|
1349
|
-
var
|
|
1350
|
-
|
|
1349
|
+
var pt = N((Wr, ji) => {
|
|
1350
|
+
ji.exports = {
|
|
1351
1351
|
name: "ejs",
|
|
1352
1352
|
description: "Embedded JavaScript templates",
|
|
1353
1353
|
keywords: [
|
|
@@ -1392,10 +1392,10 @@ var ct = N(($a, _i) => {
|
|
|
1392
1392
|
});
|
|
1393
1393
|
|
|
1394
1394
|
// ../node_modules/ejs/lib/ejs.js
|
|
1395
|
-
var
|
|
1395
|
+
var vt = N((h) => {
|
|
1396
1396
|
"use strict";
|
|
1397
|
-
var ne = P("fs"), D = P("path"), b =
|
|
1398
|
-
|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)",
|
|
1397
|
+
var ne = P("fs"), D = P("path"), b = ct(), mt = !1, Oi = pt().version, Ei = "<", Si = ">", Pi = "%", ht = "locals", Ti = "ejs", Ri = "(<%%\
|
|
1398
|
+
|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)", yt = [
|
|
1399
1399
|
"delimiter",
|
|
1400
1400
|
"scope",
|
|
1401
1401
|
"context",
|
|
@@ -1407,63 +1407,63 @@ var yt = N((h) => {
|
|
|
1407
1407
|
"strict",
|
|
1408
1408
|
"filename",
|
|
1409
1409
|
"async"
|
|
1410
|
-
],
|
|
1410
|
+
], ki = yt.concat("cache"), ut = /^\uFEFF/, ae = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
|
|
1411
1411
|
h.cache = b.cache;
|
|
1412
1412
|
h.fileLoader = ne.readFileSync;
|
|
1413
|
-
h.localsName =
|
|
1413
|
+
h.localsName = ht;
|
|
1414
1414
|
h.promiseImpl = new Function("return this;")().Promise;
|
|
1415
1415
|
h.resolveInclude = function(e, i, t) {
|
|
1416
|
-
var
|
|
1416
|
+
var r = D.dirname, a = D.extname, n = D.resolve, s = n(t ? i : r(i), e), l = a(e);
|
|
1417
1417
|
return l || (s += ".ejs"), s;
|
|
1418
1418
|
};
|
|
1419
|
-
function
|
|
1419
|
+
function ft(e, i) {
|
|
1420
1420
|
var t;
|
|
1421
|
-
if (i.some(function(
|
|
1422
|
-
return t = h.resolveInclude(e,
|
|
1421
|
+
if (i.some(function(r) {
|
|
1422
|
+
return t = h.resolveInclude(e, r, !0), ne.existsSync(t);
|
|
1423
1423
|
}))
|
|
1424
1424
|
return t;
|
|
1425
1425
|
}
|
|
1426
|
-
o(
|
|
1427
|
-
function
|
|
1428
|
-
var t,
|
|
1426
|
+
o(ft, "resolvePaths");
|
|
1427
|
+
function Fi(e, i) {
|
|
1428
|
+
var t, r, a = i.views, n = /^[A-Za-z]+:\\|^\//.exec(e);
|
|
1429
1429
|
if (n && n.length)
|
|
1430
|
-
e = e.replace(/^\/*/, ""), Array.isArray(i.root) ? t =
|
|
1431
|
-
else if (i.filename && (
|
|
1430
|
+
e = e.replace(/^\/*/, ""), Array.isArray(i.root) ? t = ft(e, i.root) : t = h.resolveInclude(e, i.root || "/", !0);
|
|
1431
|
+
else if (i.filename && (r = h.resolveInclude(e, i.filename), ne.existsSync(r) && (t = r)), !t && Array.isArray(a) && (t = ft(e, a)), !t &&
|
|
1432
1432
|
typeof i.includer != "function")
|
|
1433
1433
|
throw new Error('Could not find the include file "' + i.escapeFunction(e) + '"');
|
|
1434
1434
|
return t;
|
|
1435
1435
|
}
|
|
1436
|
-
o(
|
|
1436
|
+
o(Fi, "getIncludePath");
|
|
1437
1437
|
function I(e, i) {
|
|
1438
|
-
var t,
|
|
1438
|
+
var t, r = e.filename, a = arguments.length > 1;
|
|
1439
1439
|
if (e.cache) {
|
|
1440
|
-
if (!
|
|
1440
|
+
if (!r)
|
|
1441
1441
|
throw new Error("cache option requires a filename");
|
|
1442
|
-
if (t = h.cache.get(
|
|
1442
|
+
if (t = h.cache.get(r), t)
|
|
1443
1443
|
return t;
|
|
1444
|
-
|
|
1445
|
-
} else if (!
|
|
1446
|
-
if (!
|
|
1444
|
+
a || (i = dt(r).toString().replace(ut, ""));
|
|
1445
|
+
} else if (!a) {
|
|
1446
|
+
if (!r)
|
|
1447
1447
|
throw new Error("Internal EJS error: no file name or template provided");
|
|
1448
|
-
i =
|
|
1448
|
+
i = dt(r).toString().replace(ut, "");
|
|
1449
1449
|
}
|
|
1450
|
-
return t = h.compile(i, e), e.cache && h.cache.set(
|
|
1450
|
+
return t = h.compile(i, e), e.cache && h.cache.set(r, t), t;
|
|
1451
1451
|
}
|
|
1452
1452
|
o(I, "handleCache");
|
|
1453
|
-
function
|
|
1454
|
-
var
|
|
1453
|
+
function Li(e, i, t) {
|
|
1454
|
+
var r;
|
|
1455
1455
|
if (t) {
|
|
1456
1456
|
try {
|
|
1457
|
-
|
|
1458
|
-
} catch (
|
|
1459
|
-
return t(
|
|
1457
|
+
r = I(e)(i);
|
|
1458
|
+
} catch (a) {
|
|
1459
|
+
return t(a);
|
|
1460
1460
|
}
|
|
1461
|
-
t(null,
|
|
1461
|
+
t(null, r);
|
|
1462
1462
|
} else {
|
|
1463
1463
|
if (typeof h.promiseImpl == "function")
|
|
1464
|
-
return new h.promiseImpl(function(
|
|
1464
|
+
return new h.promiseImpl(function(a, n) {
|
|
1465
1465
|
try {
|
|
1466
|
-
|
|
1466
|
+
r = I(e)(i), a(r);
|
|
1467
1467
|
} catch (s) {
|
|
1468
1468
|
n(s);
|
|
1469
1469
|
}
|
|
@@ -1471,66 +1471,66 @@ var yt = N((h) => {
|
|
|
1471
1471
|
throw new Error("Please provide a callback function");
|
|
1472
1472
|
}
|
|
1473
1473
|
}
|
|
1474
|
-
o(
|
|
1475
|
-
function
|
|
1474
|
+
o(Li, "tryHandleCache");
|
|
1475
|
+
function dt(e) {
|
|
1476
1476
|
return h.fileLoader(e);
|
|
1477
1477
|
}
|
|
1478
|
-
o(
|
|
1479
|
-
function
|
|
1478
|
+
o(dt, "fileLoader");
|
|
1479
|
+
function Ci(e, i) {
|
|
1480
1480
|
var t = b.shallowCopy(b.createNullProtoObjWherePossible(), i);
|
|
1481
|
-
if (t.filename =
|
|
1482
|
-
var
|
|
1483
|
-
if (
|
|
1484
|
-
return I(t,
|
|
1481
|
+
if (t.filename = Fi(e, t), typeof i.includer == "function") {
|
|
1482
|
+
var r = i.includer(e, t.filename);
|
|
1483
|
+
if (r && (r.filename && (t.filename = r.filename), r.template))
|
|
1484
|
+
return I(t, r.template);
|
|
1485
1485
|
}
|
|
1486
1486
|
return I(t);
|
|
1487
1487
|
}
|
|
1488
|
-
o(
|
|
1489
|
-
function
|
|
1488
|
+
o(Ci, "includeFile");
|
|
1489
|
+
function gt(e, i, t, r, a) {
|
|
1490
1490
|
var n = i.split(`
|
|
1491
|
-
`), s = Math.max(
|
|
1491
|
+
`), s = Math.max(r - 3, 0), l = Math.min(n.length, r + 3), p = a(t), c = n.slice(s, l).map(function(u, d) {
|
|
1492
1492
|
var x = d + s + 1;
|
|
1493
|
-
return (x ==
|
|
1493
|
+
return (x == r ? " >> " : " ") + x + "| " + u;
|
|
1494
1494
|
}).join(`
|
|
1495
1495
|
`);
|
|
1496
|
-
throw e.path = p, e.message = (p || "ejs") + ":" +
|
|
1496
|
+
throw e.path = p, e.message = (p || "ejs") + ":" + r + `
|
|
1497
1497
|
` + c + `
|
|
1498
1498
|
|
|
1499
1499
|
` + e.message, e;
|
|
1500
1500
|
}
|
|
1501
|
-
o(
|
|
1502
|
-
function
|
|
1501
|
+
o(gt, "rethrow");
|
|
1502
|
+
function xt(e) {
|
|
1503
1503
|
return e.replace(/;(\s*$)/, "$1");
|
|
1504
1504
|
}
|
|
1505
|
-
o(
|
|
1505
|
+
o(xt, "stripSemi");
|
|
1506
1506
|
h.compile = /* @__PURE__ */ o(function(i, t) {
|
|
1507
|
-
var
|
|
1508
|
-
return t && t.scope && (
|
|
1509
|
-
t.scope), delete t.scope),
|
|
1507
|
+
var r;
|
|
1508
|
+
return t && t.scope && (mt || (console.warn("`scope` option is deprecated and will be removed in EJS 3"), mt = !0), t.context || (t.context =
|
|
1509
|
+
t.scope), delete t.scope), r = new j(i, t), r.compile();
|
|
1510
1510
|
}, "compile");
|
|
1511
1511
|
h.render = function(e, i, t) {
|
|
1512
|
-
var
|
|
1513
|
-
return arguments.length == 2 && b.shallowCopyFromList(
|
|
1512
|
+
var r = i || b.createNullProtoObjWherePossible(), a = t || b.createNullProtoObjWherePossible();
|
|
1513
|
+
return arguments.length == 2 && b.shallowCopyFromList(a, r, yt), I(a, e)(r);
|
|
1514
1514
|
};
|
|
1515
1515
|
h.renderFile = function() {
|
|
1516
|
-
var e = Array.prototype.slice.call(arguments), i = e.shift(), t,
|
|
1517
|
-
return typeof arguments[arguments.length - 1] == "function" && (t = e.pop()), e.length ? (
|
|
1518
|
-
(
|
|
1519
|
-
ns"], n && b.shallowCopy(
|
|
1516
|
+
var e = Array.prototype.slice.call(arguments), i = e.shift(), t, r = { filename: i }, a, n;
|
|
1517
|
+
return typeof arguments[arguments.length - 1] == "function" && (t = e.pop()), e.length ? (a = e.shift(), e.length ? b.shallowCopy(r, e.pop()) :
|
|
1518
|
+
(a.settings && (a.settings.views && (r.views = a.settings.views), a.settings["view cache"] && (r.cache = !0), n = a.settings["view optio\
|
|
1519
|
+
ns"], n && b.shallowCopy(r, n)), b.shallowCopyFromList(r, a, ki)), r.filename = i) : a = b.createNullProtoObjWherePossible(), Li(r, a, t);
|
|
1520
1520
|
};
|
|
1521
1521
|
h.Template = j;
|
|
1522
1522
|
h.clearCache = function() {
|
|
1523
1523
|
h.cache.reset();
|
|
1524
1524
|
};
|
|
1525
1525
|
function j(e, i) {
|
|
1526
|
-
var t = b.hasOwnOnlyObject(i),
|
|
1527
|
-
this.templateText = e, this.mode = null, this.truncate = !1, this.currentLine = 1, this.source = "",
|
|
1528
|
-
t.escape || t.escapeFunction || b.escapeXML,
|
|
1529
|
-
t.openDelimiter || h.openDelimiter ||
|
|
1530
|
-
delimiter ||
|
|
1531
|
-
root,
|
|
1532
|
-
t.views,
|
|
1533
|
-
!0,
|
|
1526
|
+
var t = b.hasOwnOnlyObject(i), r = b.createNullProtoObjWherePossible();
|
|
1527
|
+
this.templateText = e, this.mode = null, this.truncate = !1, this.currentLine = 1, this.source = "", r.client = t.client || !1, r.escapeFunction =
|
|
1528
|
+
t.escape || t.escapeFunction || b.escapeXML, r.compileDebug = t.compileDebug !== !1, r.debug = !!t.debug, r.filename = t.filename, r.openDelimiter =
|
|
1529
|
+
t.openDelimiter || h.openDelimiter || Ei, r.closeDelimiter = t.closeDelimiter || h.closeDelimiter || Si, r.delimiter = t.delimiter || h.
|
|
1530
|
+
delimiter || Pi, r.strict = t.strict || !1, r.context = t.context, r.cache = t.cache || !1, r.rmWhitespace = t.rmWhitespace, r.root = t.
|
|
1531
|
+
root, r.includer = t.includer, r.outputFunctionName = t.outputFunctionName, r.localsName = t.localsName || h.localsName || ht, r.views =
|
|
1532
|
+
t.views, r.async = t.async, r.destructuredLocals = t.destructuredLocals, r.legacyInclude = typeof t.legacyInclude < "u" ? !!t.legacyInclude :
|
|
1533
|
+
!0, r.strict ? r._with = !1 : r._with = typeof t._with < "u" ? t._with : !0, this.opts = r, this.regex = this.createRegex();
|
|
1534
1534
|
}
|
|
1535
1535
|
o(j, "Template");
|
|
1536
1536
|
j.modes = {
|
|
@@ -1542,39 +1542,39 @@ ns"], n && b.shallowCopy(a, n)), b.shallowCopyFromList(a, r, Ri)), a.filename =
|
|
|
1542
1542
|
};
|
|
1543
1543
|
j.prototype = {
|
|
1544
1544
|
createRegex: /* @__PURE__ */ o(function() {
|
|
1545
|
-
var e =
|
|
1545
|
+
var e = Ri, i = b.escapeRegExpChars(this.opts.delimiter), t = b.escapeRegExpChars(this.opts.openDelimiter), r = b.escapeRegExpChars(this.
|
|
1546
1546
|
opts.closeDelimiter);
|
|
1547
|
-
return e = e.replace(/%/g, i).replace(/</g, t).replace(/>/g,
|
|
1547
|
+
return e = e.replace(/%/g, i).replace(/</g, t).replace(/>/g, r), new RegExp(e);
|
|
1548
1548
|
}, "createRegex"),
|
|
1549
1549
|
compile: /* @__PURE__ */ o(function() {
|
|
1550
|
-
var e, i, t = this.opts,
|
|
1550
|
+
var e, i, t = this.opts, r = "", a = "", n = t.escapeFunction, s, l = t.filename ? JSON.stringify(t.filename) : "undefined";
|
|
1551
1551
|
if (!this.source) {
|
|
1552
|
-
if (this.generateSource(),
|
|
1552
|
+
if (this.generateSource(), r += ` var __output = "";
|
|
1553
1553
|
function __append(s) { if (s !== undefined && s !== null) __output += s }
|
|
1554
1554
|
`, t.outputFunctionName) {
|
|
1555
|
-
if (!
|
|
1555
|
+
if (!ae.test(t.outputFunctionName))
|
|
1556
1556
|
throw new Error("outputFunctionName is not a valid JS identifier.");
|
|
1557
|
-
|
|
1557
|
+
r += " var " + t.outputFunctionName + ` = __append;
|
|
1558
1558
|
`;
|
|
1559
1559
|
}
|
|
1560
|
-
if (t.localsName && !
|
|
1560
|
+
if (t.localsName && !ae.test(t.localsName))
|
|
1561
1561
|
throw new Error("localsName is not a valid JS identifier.");
|
|
1562
1562
|
if (t.destructuredLocals && t.destructuredLocals.length) {
|
|
1563
1563
|
for (var p = " var __locals = (" + t.localsName + ` || {}),
|
|
1564
1564
|
`, c = 0; c < t.destructuredLocals.length; c++) {
|
|
1565
1565
|
var u = t.destructuredLocals[c];
|
|
1566
|
-
if (!
|
|
1566
|
+
if (!ae.test(u))
|
|
1567
1567
|
throw new Error("destructuredLocals[" + c + "] is not a valid JS identifier.");
|
|
1568
1568
|
c > 0 && (p += `,
|
|
1569
1569
|
`), p += u + " = __locals." + u;
|
|
1570
1570
|
}
|
|
1571
|
-
|
|
1571
|
+
r += p + `;
|
|
1572
1572
|
`;
|
|
1573
1573
|
}
|
|
1574
|
-
t._with !== !1 && (
|
|
1575
|
-
`,
|
|
1576
|
-
`),
|
|
1577
|
-
`, this.source =
|
|
1574
|
+
t._with !== !1 && (r += " with (" + t.localsName + ` || {}) {
|
|
1575
|
+
`, a += ` }
|
|
1576
|
+
`), a += ` return __output;
|
|
1577
|
+
`, this.source = r + this.source + a;
|
|
1578
1578
|
}
|
|
1579
1579
|
t.compileDebug ? e = `var __line = 1
|
|
1580
1580
|
, __lines = ` + JSON.stringify(this.templateText) + `
|
|
@@ -1584,7 +1584,7 @@ try {
|
|
|
1584
1584
|
rethrow(e, __lines, __filename, __line, escapeFn);
|
|
1585
1585
|
}
|
|
1586
1586
|
` : e = this.source, t.client && (e = "escapeFn = escapeFn || " + n.toString() + `;
|
|
1587
|
-
` + e, t.compileDebug && (e = "rethrow = rethrow || " +
|
|
1587
|
+
` + e, t.compileDebug && (e = "rethrow = rethrow || " + gt.toString() + `;
|
|
1588
1588
|
` + e)), t.strict && (e = `"use strict";
|
|
1589
1589
|
` + e), t.debug && console.log(e), t.compileDebug && t.filename && (e = e + `
|
|
1590
1590
|
//# sourceURL=` + l + `
|
|
@@ -1609,11 +1609,11 @@ try {
|
|
|
1609
1609
|
var d = t.client ? i : /* @__PURE__ */ o(function(f) {
|
|
1610
1610
|
var y = /* @__PURE__ */ o(function(v, _) {
|
|
1611
1611
|
var O = b.shallowCopy(b.createNullProtoObjWherePossible(), f);
|
|
1612
|
-
return _ && (O = b.shallowCopy(O, _)),
|
|
1612
|
+
return _ && (O = b.shallowCopy(O, _)), Ci(v, t)(O);
|
|
1613
1613
|
}, "include");
|
|
1614
1614
|
return i.apply(
|
|
1615
1615
|
t.context,
|
|
1616
|
-
[f || b.createNullProtoObjWherePossible(), n, y,
|
|
1616
|
+
[f || b.createNullProtoObjWherePossible(), n, y, gt]
|
|
1617
1617
|
);
|
|
1618
1618
|
}, "anonymous");
|
|
1619
1619
|
if (t.filename && typeof Object.defineProperty == "function") {
|
|
@@ -1634,18 +1634,18 @@ try {
|
|
|
1634
1634
|
var e = this.opts;
|
|
1635
1635
|
e.rmWhitespace && (this.templateText = this.templateText.replace(/[\r\n]+/g, `
|
|
1636
1636
|
`).replace(/^\s+|\s+$/gm, "")), this.templateText = this.templateText.replace(/[ \t]*<%_/gm, "<%_").replace(/_%>[ \t]*/gm, "_%>");
|
|
1637
|
-
var i = this, t = this.parseTemplateText(),
|
|
1637
|
+
var i = this, t = this.parseTemplateText(), r = this.opts.delimiter, a = this.opts.openDelimiter, n = this.opts.closeDelimiter;
|
|
1638
1638
|
t && t.length && t.forEach(function(s, l) {
|
|
1639
1639
|
var p;
|
|
1640
|
-
if (s.indexOf(
|
|
1640
|
+
if (s.indexOf(a + r) === 0 && s.indexOf(a + r + r) !== 0 && (p = t[l + 2], !(p == r + n || p == "-" + r + n || p == "_" + r + n)))
|
|
1641
1641
|
throw new Error('Could not find matching close tag for "' + s + '".');
|
|
1642
1642
|
i.scanLine(s);
|
|
1643
1643
|
});
|
|
1644
1644
|
}, "generateSource"),
|
|
1645
1645
|
parseTemplateText: /* @__PURE__ */ o(function() {
|
|
1646
|
-
for (var e = this.templateText, i = this.regex, t = i.exec(e),
|
|
1647
|
-
|
|
1648
|
-
return e &&
|
|
1646
|
+
for (var e = this.templateText, i = this.regex, t = i.exec(e), r = [], a; t; )
|
|
1647
|
+
a = t.index, a !== 0 && (r.push(e.substring(0, a)), e = e.slice(a)), r.push(t[0]), e = e.slice(t[0].length), t = i.exec(e);
|
|
1648
|
+
return e && r.push(e), r;
|
|
1649
1649
|
}, "parseTemplateText"),
|
|
1650
1650
|
_addOutput: /* @__PURE__ */ o(function(e) {
|
|
1651
1651
|
if (this.truncate && (e = e.replace(/^(?:\r\n|\r|\n)/, ""), this.truncate = !1), !e)
|
|
@@ -1655,33 +1655,33 @@ try {
|
|
|
1655
1655
|
`;
|
|
1656
1656
|
}, "_addOutput"),
|
|
1657
1657
|
scanLine: /* @__PURE__ */ o(function(e) {
|
|
1658
|
-
var i = this, t = this.opts.delimiter,
|
|
1658
|
+
var i = this, t = this.opts.delimiter, r = this.opts.openDelimiter, a = this.opts.closeDelimiter, n = 0;
|
|
1659
1659
|
switch (n = e.split(`
|
|
1660
1660
|
`).length - 1, e) {
|
|
1661
|
-
case
|
|
1662
|
-
case
|
|
1661
|
+
case r + t:
|
|
1662
|
+
case r + t + "_":
|
|
1663
1663
|
this.mode = j.modes.EVAL;
|
|
1664
1664
|
break;
|
|
1665
|
-
case
|
|
1665
|
+
case r + t + "=":
|
|
1666
1666
|
this.mode = j.modes.ESCAPED;
|
|
1667
1667
|
break;
|
|
1668
|
-
case
|
|
1668
|
+
case r + t + "-":
|
|
1669
1669
|
this.mode = j.modes.RAW;
|
|
1670
1670
|
break;
|
|
1671
|
-
case
|
|
1671
|
+
case r + t + "#":
|
|
1672
1672
|
this.mode = j.modes.COMMENT;
|
|
1673
1673
|
break;
|
|
1674
|
-
case
|
|
1675
|
-
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(
|
|
1674
|
+
case r + t + t:
|
|
1675
|
+
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(r + t + t, r + t) + `")
|
|
1676
1676
|
`;
|
|
1677
1677
|
break;
|
|
1678
|
-
case t + t +
|
|
1679
|
-
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(t + t +
|
|
1678
|
+
case t + t + a:
|
|
1679
|
+
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(t + t + a, t + a) + `")
|
|
1680
1680
|
`;
|
|
1681
1681
|
break;
|
|
1682
|
-
case t +
|
|
1683
|
-
case "-" + t +
|
|
1684
|
-
case "_" + t +
|
|
1682
|
+
case t + a:
|
|
1683
|
+
case "-" + t + a:
|
|
1684
|
+
case "_" + t + a:
|
|
1685
1685
|
this.mode == j.modes.LITERAL && this._addOutput(e), this.mode = null, this.truncate = e.indexOf("-") === 0 || e.indexOf("_") === 0;
|
|
1686
1686
|
break;
|
|
1687
1687
|
default:
|
|
@@ -1702,12 +1702,12 @@ try {
|
|
|
1702
1702
|
break;
|
|
1703
1703
|
// Exec, esc, and output
|
|
1704
1704
|
case j.modes.ESCAPED:
|
|
1705
|
-
this.source += " ; __append(escapeFn(" +
|
|
1705
|
+
this.source += " ; __append(escapeFn(" + xt(e) + `))
|
|
1706
1706
|
`;
|
|
1707
1707
|
break;
|
|
1708
1708
|
// Exec and output
|
|
1709
1709
|
case j.modes.RAW:
|
|
1710
|
-
this.source += " ; __append(" +
|
|
1710
|
+
this.source += " ; __append(" + xt(e) + `)
|
|
1711
1711
|
`;
|
|
1712
1712
|
break;
|
|
1713
1713
|
case j.modes.COMMENT:
|
|
@@ -1726,16 +1726,16 @@ try {
|
|
|
1726
1726
|
};
|
|
1727
1727
|
h.escapeXML = b.escapeXML;
|
|
1728
1728
|
h.__express = h.renderFile;
|
|
1729
|
-
h.VERSION =
|
|
1730
|
-
h.name =
|
|
1729
|
+
h.VERSION = Oi;
|
|
1730
|
+
h.name = Ti;
|
|
1731
1731
|
typeof window < "u" && (window.ejs = h);
|
|
1732
1732
|
});
|
|
1733
1733
|
|
|
1734
1734
|
// src/builder-manager/index.ts
|
|
1735
|
-
import { cp as
|
|
1736
|
-
import { dirname as
|
|
1737
|
-
import { stringifyProcessEnvs as
|
|
1738
|
-
import { globalsModuleInfoMap as
|
|
1735
|
+
import { cp as nr, rm as or, writeFile as Ft } from "node:fs/promises";
|
|
1736
|
+
import { dirname as Lt, join as k, parse as sr } from "node:path";
|
|
1737
|
+
import { stringifyProcessEnvs as lr } from "storybook/internal/common";
|
|
1738
|
+
import { globalsModuleInfoMap as cr } from "storybook/internal/manager/globals-module-info";
|
|
1739
1739
|
import { logger as me } from "storybook/internal/node-logger";
|
|
1740
1740
|
|
|
1741
1741
|
// ../node_modules/@fal-works/esbuild-plugin-global-externals/lib/module-info.js
|
|
@@ -1743,29 +1743,29 @@ var de = /* @__PURE__ */ o((e) => {
|
|
|
1743
1743
|
let {
|
|
1744
1744
|
type: i = "esm",
|
|
1745
1745
|
varName: t,
|
|
1746
|
-
namedExports:
|
|
1747
|
-
defaultExport:
|
|
1746
|
+
namedExports: r = null,
|
|
1747
|
+
defaultExport: a = !0
|
|
1748
1748
|
} = typeof e == "string" ? { varName: e } : e;
|
|
1749
|
-
return { type: i, varName: t, namedExports:
|
|
1749
|
+
return { type: i, varName: t, namedExports: r, defaultExport: a };
|
|
1750
1750
|
}, "normalizeModuleInfo");
|
|
1751
1751
|
|
|
1752
1752
|
// ../node_modules/@fal-works/esbuild-plugin-global-externals/lib/on-load.js
|
|
1753
|
-
var
|
|
1754
|
-
var
|
|
1755
|
-
let
|
|
1753
|
+
var zt = /* @__PURE__ */ o((e) => `module.exports = ${e};`, "createCjsContents");
|
|
1754
|
+
var qt = /* @__PURE__ */ o((e, i, t) => {
|
|
1755
|
+
let r = t ? [`export default ${e};`] : [];
|
|
1756
1756
|
if (i && i.length) {
|
|
1757
|
-
let
|
|
1758
|
-
|
|
1757
|
+
let a = [...new Set(i)].join(", ");
|
|
1758
|
+
r.push(`const { ${a} } = ${e};`), r.push(`export { ${a} };`);
|
|
1759
1759
|
}
|
|
1760
|
-
return
|
|
1760
|
+
return r.join(`
|
|
1761
1761
|
`);
|
|
1762
1762
|
}, "createEsmContents"), ge = /* @__PURE__ */ o((e) => {
|
|
1763
|
-
let { type: i, varName: t, namedExports:
|
|
1763
|
+
let { type: i, varName: t, namedExports: r, defaultExport: a } = e;
|
|
1764
1764
|
switch (i) {
|
|
1765
1765
|
case "esm":
|
|
1766
|
-
return
|
|
1766
|
+
return qt(t, r, a);
|
|
1767
1767
|
case "cjs":
|
|
1768
|
-
return
|
|
1768
|
+
return zt(t);
|
|
1769
1769
|
}
|
|
1770
1770
|
}, "createContents");
|
|
1771
1771
|
|
|
@@ -1774,12 +1774,12 @@ var X = "global-externals", K = /* @__PURE__ */ o((e) => {
|
|
|
1774
1774
|
let { modulePathFilter: i, getModuleInfo: t } = e;
|
|
1775
1775
|
return {
|
|
1776
1776
|
name: X,
|
|
1777
|
-
setup(
|
|
1778
|
-
|
|
1779
|
-
path:
|
|
1777
|
+
setup(r) {
|
|
1778
|
+
r.onResolve({ filter: i }, (a) => ({
|
|
1779
|
+
path: a.path,
|
|
1780
1780
|
namespace: X
|
|
1781
|
-
})),
|
|
1782
|
-
let n =
|
|
1781
|
+
})), r.onLoad({ filter: /.*/, namespace: X }, (a) => {
|
|
1782
|
+
let n = a.path, s = de(t(n));
|
|
1783
1783
|
return { contents: ge(s) };
|
|
1784
1784
|
});
|
|
1785
1785
|
}
|
|
@@ -1796,7 +1796,7 @@ var Z = /* @__PURE__ */ o((e) => {
|
|
|
1796
1796
|
}, "globalExternals");
|
|
1797
1797
|
|
|
1798
1798
|
// src/builder-manager/index.ts
|
|
1799
|
-
var
|
|
1799
|
+
var Ct = V(Ue(), 1), ue = V(nt(), 1);
|
|
1800
1800
|
|
|
1801
1801
|
// src/shared/constants/environments-support.ts
|
|
1802
1802
|
var ot = [
|
|
@@ -1807,31 +1807,35 @@ var ot = [
|
|
|
1807
1807
|
"ios18.3",
|
|
1808
1808
|
"opera117"
|
|
1809
1809
|
];
|
|
1810
|
+
var st = {
|
|
1811
|
+
// React Native does not support class static blocks without a specific babel plugin
|
|
1812
|
+
"class-static-blocks": !1
|
|
1813
|
+
};
|
|
1810
1814
|
|
|
1811
1815
|
// src/builder-manager/utils/data.ts
|
|
1812
|
-
import { basename as
|
|
1813
|
-
import { getRefs as
|
|
1816
|
+
import { basename as Ii } from "node:path";
|
|
1817
|
+
import { getRefs as Mi } from "storybook/internal/common";
|
|
1814
1818
|
|
|
1815
1819
|
// src/builder-manager/utils/template.ts
|
|
1816
|
-
var
|
|
1817
|
-
import { readFile as
|
|
1818
|
-
import { dirname as
|
|
1819
|
-
var oe = /* @__PURE__ */ o(async (e) =>
|
|
1820
|
-
|
|
1820
|
+
var wt = V(vt(), 1);
|
|
1821
|
+
import { readFile as Ai } from "node:fs/promises";
|
|
1822
|
+
import { dirname as Ni, join as Di } from "node:path";
|
|
1823
|
+
var oe = /* @__PURE__ */ o(async (e) => Di(
|
|
1824
|
+
Ni(P.resolve("storybook/internal/package.json")),
|
|
1821
1825
|
"assets/server",
|
|
1822
1826
|
e
|
|
1823
|
-
), "getTemplatePath"),
|
|
1827
|
+
), "getTemplatePath"), bt = /* @__PURE__ */ o(async (e) => {
|
|
1824
1828
|
let i = await oe(e);
|
|
1825
|
-
return
|
|
1829
|
+
return Ai(i, { encoding: "utf8" });
|
|
1826
1830
|
}, "readTemplate");
|
|
1827
|
-
var se = /* @__PURE__ */ o(async (e, i, t,
|
|
1831
|
+
var se = /* @__PURE__ */ o(async (e, i, t, r, a, n, s, l, p, c, u, { versionCheck: d, previewUrl: x, configType: g, ignorePreview: m }, f) => {
|
|
1828
1832
|
let y = await i, v = await e, _ = Object.entries(f).reduce(
|
|
1829
1833
|
(O, [w, E]) => ({ ...O, [w]: JSON.stringify(E) }),
|
|
1830
1834
|
{}
|
|
1831
1835
|
);
|
|
1832
|
-
return (0,
|
|
1836
|
+
return (0, wt.render)(v, {
|
|
1833
1837
|
title: y ? `${y} - Storybook` : "Storybook",
|
|
1834
|
-
files: { js: n, css:
|
|
1838
|
+
files: { js: n, css: a },
|
|
1835
1839
|
favicon: await t,
|
|
1836
1840
|
globals: {
|
|
1837
1841
|
FEATURES: JSON.stringify(await s, null, 2),
|
|
@@ -1846,39 +1850,39 @@ var se = /* @__PURE__ */ o(async (e, i, t, a, r, n, s, l, p, c, u, { versionChec
|
|
|
1846
1850
|
TAGS_OPTIONS: JSON.stringify(await u, null, 2),
|
|
1847
1851
|
..._
|
|
1848
1852
|
},
|
|
1849
|
-
head: await
|
|
1853
|
+
head: await r || "",
|
|
1850
1854
|
ignorePreview: m
|
|
1851
1855
|
});
|
|
1852
1856
|
}, "renderHTML");
|
|
1853
1857
|
|
|
1854
1858
|
// src/builder-manager/utils/data.ts
|
|
1855
1859
|
var le = /* @__PURE__ */ o(async (e) => {
|
|
1856
|
-
let i =
|
|
1857
|
-
presets.apply("title"), s = e.presets.apply("docs", {}), l = e.presets.apply("tags", {}), p =
|
|
1860
|
+
let i = Mi(e), t = e.presets.apply("favicon").then((x) => Ii(x)), r = e.presets.apply("features"), a = e.presets.apply("logLevel"), n = e.
|
|
1861
|
+
presets.apply("title"), s = e.presets.apply("docs", {}), l = e.presets.apply("tags", {}), p = bt("template.ejs"), c = e.presets.apply("man\
|
|
1858
1862
|
agerHead"), [u, d] = await Promise.all([
|
|
1859
1863
|
//
|
|
1860
|
-
|
|
1861
|
-
|
|
1864
|
+
jt.get(),
|
|
1865
|
+
_t(e)
|
|
1862
1866
|
]);
|
|
1863
1867
|
return {
|
|
1864
1868
|
refs: i,
|
|
1865
|
-
features:
|
|
1869
|
+
features: r,
|
|
1866
1870
|
title: n,
|
|
1867
1871
|
docsOptions: s,
|
|
1868
1872
|
template: p,
|
|
1869
1873
|
customHead: c,
|
|
1870
1874
|
instance: u,
|
|
1871
1875
|
config: d,
|
|
1872
|
-
logLevel:
|
|
1876
|
+
logLevel: a,
|
|
1873
1877
|
favicon: t,
|
|
1874
1878
|
tagsOptions: l
|
|
1875
1879
|
};
|
|
1876
1880
|
}, "getData");
|
|
1877
1881
|
|
|
1878
1882
|
// src/builder-manager/utils/files.ts
|
|
1879
|
-
import { existsSync as
|
|
1880
|
-
import { mkdir as
|
|
1881
|
-
import { dirname as
|
|
1883
|
+
import { existsSync as zi } from "node:fs";
|
|
1884
|
+
import { mkdir as qi, writeFile as $i } from "node:fs/promises";
|
|
1885
|
+
import { dirname as Wi, join as Bi, normalize as Hi } from "node:path";
|
|
1882
1886
|
|
|
1883
1887
|
// ../node_modules/slash/index.js
|
|
1884
1888
|
function M(e) {
|
|
@@ -1890,75 +1894,75 @@ o(M, "slash");
|
|
|
1890
1894
|
async function ce(e, i) {
|
|
1891
1895
|
let t = await Promise.all(
|
|
1892
1896
|
i?.map(async (n) => {
|
|
1893
|
-
let { location: s, url: l } =
|
|
1894
|
-
if (!
|
|
1895
|
-
let p =
|
|
1896
|
-
await
|
|
1897
|
+
let { location: s, url: l } = Ji(n, e);
|
|
1898
|
+
if (!zi(s)) {
|
|
1899
|
+
let p = Wi(s);
|
|
1900
|
+
await qi(p, { recursive: !0 });
|
|
1897
1901
|
}
|
|
1898
|
-
return await
|
|
1902
|
+
return await $i(s, n.contents), l;
|
|
1899
1903
|
}) || []
|
|
1900
|
-
),
|
|
1901
|
-
return { cssFiles: t.filter((n) => n.endsWith(".css")), jsFiles:
|
|
1904
|
+
), r = t.filter((n) => n.endsWith(".js"));
|
|
1905
|
+
return { cssFiles: t.filter((n) => n.endsWith(".css")), jsFiles: r };
|
|
1902
1906
|
}
|
|
1903
1907
|
o(ce, "readOrderedFiles");
|
|
1904
|
-
function
|
|
1905
|
-
let t = e.path.replace(i, ""),
|
|
1906
|
-
return { location:
|
|
1908
|
+
function Ji(e, i) {
|
|
1909
|
+
let t = e.path.replace(i, ""), r = Hi(Bi(i, t)), a = `./sb-addons${M(t).split("/").map(encodeURIComponent).join("/")}`;
|
|
1910
|
+
return { location: r, url: a };
|
|
1907
1911
|
}
|
|
1908
|
-
o(
|
|
1912
|
+
o(Ji, "sanitizePath");
|
|
1909
1913
|
|
|
1910
1914
|
// src/builder-manager/utils/framework.ts
|
|
1911
|
-
import { sep as
|
|
1915
|
+
import { sep as Ui } from "node:path";
|
|
1912
1916
|
import {
|
|
1913
|
-
extractProperRendererNameFromFramework as
|
|
1917
|
+
extractProperRendererNameFromFramework as Ot,
|
|
1914
1918
|
getFrameworkName as Gi
|
|
1915
1919
|
} from "storybook/internal/common";
|
|
1916
|
-
var
|
|
1920
|
+
var Et = /* @__PURE__ */ o((e) => {
|
|
1917
1921
|
if (e)
|
|
1918
1922
|
return typeof e == "string" ? e : e.name;
|
|
1919
|
-
}, "pluckNameFromConfigProperty"),
|
|
1920
|
-
match(/(@storybook\/.*)$/)?.[1], "pluckStorybookPackageFromPath"),
|
|
1923
|
+
}, "pluckNameFromConfigProperty"), St = /* @__PURE__ */ o((e) => e.replaceAll(Ui, "/"), "normalizePath"), Vi = /* @__PURE__ */ o((e) => St(e).
|
|
1924
|
+
match(/(@storybook\/.*)$/)?.[1], "pluckStorybookPackageFromPath"), Xi = /* @__PURE__ */ o((e) => St(e).split("node_modules/")[1] ?? e, "pluc\
|
|
1921
1925
|
kThirdPartyPackageFromPath"), pe = /* @__PURE__ */ o(async (e) => {
|
|
1922
|
-
let i = {}, { builder: t } = await e.presets.apply("core"),
|
|
1923
|
-
await
|
|
1924
|
-
let n =
|
|
1925
|
-
n && (i.STORYBOOK_BUILDER =
|
|
1926
|
-
let s =
|
|
1926
|
+
let i = {}, { builder: t } = await e.presets.apply("core"), r = await Gi(e);
|
|
1927
|
+
await Ot(r) && (i.STORYBOOK_RENDERER = await Ot(r) ?? void 0);
|
|
1928
|
+
let n = Et(t);
|
|
1929
|
+
n && (i.STORYBOOK_BUILDER = Vi(n) ?? Xi(n));
|
|
1930
|
+
let s = Et(await e.presets.apply("framework"));
|
|
1927
1931
|
return s && (i.STORYBOOK_FRAMEWORK = s), i;
|
|
1928
1932
|
}, "buildFrameworkGlobalsFromOptions");
|
|
1929
1933
|
|
|
1930
1934
|
// src/builder-manager/utils/managerEntries.ts
|
|
1931
|
-
import { existsSync as
|
|
1932
|
-
import { mkdir as
|
|
1933
|
-
import { dirname as
|
|
1934
|
-
import { resolvePathInStorybookCache as
|
|
1935
|
-
var
|
|
1936
|
-
""), "sanitizeBase"),
|
|
1935
|
+
import { existsSync as Ki } from "node:fs";
|
|
1936
|
+
import { mkdir as Zi, writeFile as Yi } from "node:fs/promises";
|
|
1937
|
+
import { dirname as Qi, join as Pt, parse as er, relative as tr, sep as ir } from "node:path";
|
|
1938
|
+
import { resolvePathInStorybookCache as rr } from "storybook/internal/common";
|
|
1939
|
+
var Tt = /* @__PURE__ */ o((e) => e.replaceAll(".", "").replaceAll("@", "").replaceAll(ir, "-").replaceAll("/", "-").replaceAll(new RegExp(/^(-)+/g),
|
|
1940
|
+
""), "sanitizeBase"), ar = /* @__PURE__ */ o((e) => {
|
|
1937
1941
|
let i = e.split(/-?node_modules-?/);
|
|
1938
1942
|
return i[i.length - 1].replaceAll("storybook-addon-", "").replaceAll("dist-", "");
|
|
1939
1943
|
}, "sanitizeFinal");
|
|
1940
|
-
async function
|
|
1944
|
+
async function Rt(e, i) {
|
|
1941
1945
|
return Promise.all(
|
|
1942
|
-
e.map(async (t,
|
|
1943
|
-
let { name:
|
|
1946
|
+
e.map(async (t, r) => {
|
|
1947
|
+
let { name: a, dir: n } = er(t), s = rr("sb-manager", i);
|
|
1944
1948
|
if (!s)
|
|
1945
1949
|
throw new Error("Could not create/find cache directory");
|
|
1946
|
-
let l =
|
|
1950
|
+
let l = tr(process.cwd(), n), p = Pt(
|
|
1947
1951
|
s,
|
|
1948
|
-
|
|
1952
|
+
ar(Pt(`${Tt(l)}-${r}`, `${Tt(a)}-bundle.js`))
|
|
1949
1953
|
);
|
|
1950
|
-
if (!
|
|
1951
|
-
let c =
|
|
1952
|
-
await
|
|
1954
|
+
if (!Ki(p)) {
|
|
1955
|
+
let c = Qi(p);
|
|
1956
|
+
await Zi(c, { recursive: !0 });
|
|
1953
1957
|
}
|
|
1954
|
-
return await
|
|
1958
|
+
return await Yi(p, `import '${M(t).replaceAll(/'/g, "\\'")}';`), p;
|
|
1955
1959
|
})
|
|
1956
1960
|
);
|
|
1957
1961
|
}
|
|
1958
|
-
o(
|
|
1962
|
+
o(Rt, "wrapManagerEntries");
|
|
1959
1963
|
|
|
1960
1964
|
// src/builder-manager/utils/safeResolve.ts
|
|
1961
|
-
var
|
|
1965
|
+
var kt = /* @__PURE__ */ o((e) => {
|
|
1962
1966
|
try {
|
|
1963
1967
|
return Promise.resolve(P.resolve(e));
|
|
1964
1968
|
} catch {
|
|
@@ -1967,15 +1971,15 @@ var Rt = /* @__PURE__ */ o((e) => {
|
|
|
1967
1971
|
}, "safeResolve");
|
|
1968
1972
|
|
|
1969
1973
|
// src/builder-manager/index.ts
|
|
1970
|
-
var
|
|
1971
|
-
let [i, t,
|
|
1974
|
+
var pr = /^\/($|\?)/, L, C, _t = /* @__PURE__ */ o(async (e) => {
|
|
1975
|
+
let [i, t, r, a] = await Promise.all([
|
|
1972
1976
|
e.presets.apply("managerEntries", []),
|
|
1973
|
-
|
|
1977
|
+
kt(k(e.configDir, "manager")),
|
|
1974
1978
|
oe("addon.tsconfig.json"),
|
|
1975
1979
|
e.presets.apply("env")
|
|
1976
1980
|
]), n = t ? [...i, t] : i;
|
|
1977
1981
|
return {
|
|
1978
|
-
entryPoints: await
|
|
1982
|
+
entryPoints: await Rt(n, e.cacheKey),
|
|
1979
1983
|
outdir: k(e.outputDir || "./", "sb-addons"),
|
|
1980
1984
|
format: "iife",
|
|
1981
1985
|
write: !1,
|
|
@@ -2001,6 +2005,7 @@ var ca = /^\/($|\?)/, L, C, bt = /* @__PURE__ */ o(async (e) => {
|
|
|
2001
2005
|
".ttf": "dataurl"
|
|
2002
2006
|
},
|
|
2003
2007
|
target: ot,
|
|
2008
|
+
supported: st,
|
|
2004
2009
|
platform: "browser",
|
|
2005
2010
|
bundle: !0,
|
|
2006
2011
|
minify: !1,
|
|
@@ -2015,9 +2020,9 @@ var ca = /^\/($|\?)/, L, C, bt = /* @__PURE__ */ o(async (e) => {
|
|
|
2015
2020
|
jsxFragment: "React.Fragment",
|
|
2016
2021
|
jsx: "transform",
|
|
2017
2022
|
jsxImportSource: "react",
|
|
2018
|
-
tsconfig:
|
|
2023
|
+
tsconfig: r,
|
|
2019
2024
|
legalComments: "external",
|
|
2020
|
-
plugins: [Z(
|
|
2025
|
+
plugins: [Z(cr), (0, Ct.pnpPlugin)()],
|
|
2021
2026
|
banner: {
|
|
2022
2027
|
js: "try{"
|
|
2023
2028
|
},
|
|
@@ -2025,25 +2030,25 @@ var ca = /^\/($|\?)/, L, C, bt = /* @__PURE__ */ o(async (e) => {
|
|
|
2025
2030
|
js: '}catch(e){ console.error("[Storybook] One of your manager-entries failed: " + import.meta.url, e); }'
|
|
2026
2031
|
},
|
|
2027
2032
|
define: {
|
|
2028
|
-
"process.env": JSON.stringify(
|
|
2029
|
-
...
|
|
2033
|
+
"process.env": JSON.stringify(a),
|
|
2034
|
+
...lr(a),
|
|
2030
2035
|
global: "window",
|
|
2031
2036
|
module: "{}"
|
|
2032
2037
|
}
|
|
2033
2038
|
};
|
|
2034
|
-
}, "getConfig"),
|
|
2039
|
+
}, "getConfig"), jt = {
|
|
2035
2040
|
get: /* @__PURE__ */ o(async () => {
|
|
2036
2041
|
let { build: e } = await import("esbuild");
|
|
2037
2042
|
return e;
|
|
2038
2043
|
}, "get")
|
|
2039
|
-
},
|
|
2044
|
+
}, mr = /* @__PURE__ */ o(async function* ({
|
|
2040
2045
|
startTime: i,
|
|
2041
2046
|
options: t,
|
|
2042
|
-
router:
|
|
2047
|
+
router: r
|
|
2043
2048
|
}) {
|
|
2044
2049
|
t.quiet || me.info("=> Starting manager..");
|
|
2045
2050
|
let {
|
|
2046
|
-
config:
|
|
2051
|
+
config: a,
|
|
2047
2052
|
favicon: n,
|
|
2048
2053
|
customHead: s,
|
|
2049
2054
|
features: l,
|
|
@@ -2056,23 +2061,23 @@ var ca = /^\/($|\?)/, L, C, bt = /* @__PURE__ */ o(async (e) => {
|
|
|
2056
2061
|
tagsOptions: m
|
|
2057
2062
|
} = await le(t);
|
|
2058
2063
|
yield;
|
|
2059
|
-
let f =
|
|
2060
|
-
await
|
|
2061
|
-
...
|
|
2064
|
+
let f = a.outdir;
|
|
2065
|
+
await or(f, { recursive: !0, force: !0 }), yield, L = await p({
|
|
2066
|
+
...a
|
|
2062
2067
|
}), yield;
|
|
2063
2068
|
let y = k(
|
|
2064
|
-
|
|
2069
|
+
Lt(P.resolve("storybook/internal/package.json")),
|
|
2065
2070
|
"dist",
|
|
2066
2071
|
"manager"
|
|
2067
2072
|
);
|
|
2068
|
-
|
|
2073
|
+
r.use(
|
|
2069
2074
|
"/sb-addons",
|
|
2070
2075
|
(0, ue.default)(f, {
|
|
2071
2076
|
maxAge: 3e5,
|
|
2072
2077
|
dev: !0,
|
|
2073
2078
|
immutable: !0
|
|
2074
2079
|
})
|
|
2075
|
-
),
|
|
2080
|
+
), r.use(
|
|
2076
2081
|
"/sb-manager",
|
|
2077
2082
|
(0, ue.default)(y, {
|
|
2078
2083
|
maxAge: 3e5,
|
|
@@ -2081,7 +2086,7 @@ var ca = /^\/($|\?)/, L, C, bt = /* @__PURE__ */ o(async (e) => {
|
|
|
2081
2086
|
})
|
|
2082
2087
|
);
|
|
2083
2088
|
let { cssFiles: v, jsFiles: _ } = await ce(f, L?.outputFiles);
|
|
2084
|
-
L.metafile && t.outputDir && await
|
|
2089
|
+
L.metafile && t.outputDir && await Ft(
|
|
2085
2090
|
k(t.outputDir, "metafile.json"),
|
|
2086
2091
|
JSON.stringify(L.metafile, null, 2)
|
|
2087
2092
|
);
|
|
@@ -2102,24 +2107,24 @@ var ca = /^\/($|\?)/, L, C, bt = /* @__PURE__ */ o(async (e) => {
|
|
|
2102
2107
|
t,
|
|
2103
2108
|
O
|
|
2104
2109
|
);
|
|
2105
|
-
return yield,
|
|
2106
|
-
E &&
|
|
2107
|
-
}),
|
|
2110
|
+
return yield, r.use("/", ({ url: E }, S, R) => {
|
|
2111
|
+
E && pr.test(E) ? (S.statusCode = 200, S.setHeader("Content-Type", "text/html"), S.write(w), S.end()) : R();
|
|
2112
|
+
}), r.use("/index.html", (E, S) => {
|
|
2108
2113
|
S.statusCode = 200, S.setHeader("Content-Type", "text/html"), S.write(w), S.end();
|
|
2109
2114
|
}), {
|
|
2110
|
-
bail:
|
|
2115
|
+
bail: fr,
|
|
2111
2116
|
stats: {
|
|
2112
2117
|
toJson: /* @__PURE__ */ o(() => ({}), "toJson")
|
|
2113
2118
|
},
|
|
2114
2119
|
totalTime: process.hrtime(i)
|
|
2115
2120
|
};
|
|
2116
|
-
}, "starterGeneratorFn"),
|
|
2121
|
+
}, "starterGeneratorFn"), ur = /* @__PURE__ */ o(async function* ({ startTime: i, options: t }) {
|
|
2117
2122
|
if (!t.outputDir)
|
|
2118
2123
|
throw new Error("outputDir is required");
|
|
2119
2124
|
me.info("=> Building manager..");
|
|
2120
2125
|
let {
|
|
2121
|
-
config:
|
|
2122
|
-
customHead:
|
|
2126
|
+
config: r,
|
|
2127
|
+
customHead: a,
|
|
2123
2128
|
favicon: n,
|
|
2124
2129
|
features: s,
|
|
2125
2130
|
instance: l,
|
|
@@ -2131,18 +2136,18 @@ var ca = /^\/($|\?)/, L, C, bt = /* @__PURE__ */ o(async (e) => {
|
|
|
2131
2136
|
tagsOptions: g
|
|
2132
2137
|
} = await le(t);
|
|
2133
2138
|
yield;
|
|
2134
|
-
let m =
|
|
2135
|
-
|
|
2139
|
+
let m = r.outdir, f = k(
|
|
2140
|
+
Lt(P.resolve("storybook/internal/package.json")),
|
|
2136
2141
|
"dist",
|
|
2137
2142
|
"manager"
|
|
2138
2143
|
), y = k(t.outputDir, "sb-manager");
|
|
2139
2144
|
L = await l({
|
|
2140
|
-
...
|
|
2145
|
+
...r,
|
|
2141
2146
|
minify: !0
|
|
2142
2147
|
}), yield;
|
|
2143
|
-
let v =
|
|
2148
|
+
let v = nr(f, y, {
|
|
2144
2149
|
filter: /* @__PURE__ */ o((S) => {
|
|
2145
|
-
let { ext: R } =
|
|
2150
|
+
let { ext: R } = sr(S);
|
|
2146
2151
|
return R ? R === ".js" : !0;
|
|
2147
2152
|
}, "filter"),
|
|
2148
2153
|
recursive: !0
|
|
@@ -2152,7 +2157,7 @@ var ca = /^\/($|\?)/, L, C, bt = /* @__PURE__ */ o(async (e) => {
|
|
|
2152
2157
|
c,
|
|
2153
2158
|
u,
|
|
2154
2159
|
n,
|
|
2155
|
-
|
|
2160
|
+
a,
|
|
2156
2161
|
_,
|
|
2157
2162
|
O,
|
|
2158
2163
|
s,
|
|
@@ -2163,36 +2168,36 @@ var ca = /^\/($|\?)/, L, C, bt = /* @__PURE__ */ o(async (e) => {
|
|
|
2163
2168
|
t,
|
|
2164
2169
|
w
|
|
2165
2170
|
);
|
|
2166
|
-
return await Promise.all([
|
|
2171
|
+
return await Promise.all([Ft(k(t.outputDir, "index.html"), E), v]), me.trace({ message: "=> Manager built", time: process.hrtime(i) }), {
|
|
2167
2172
|
toJson: /* @__PURE__ */ o(() => ({}), "toJson")
|
|
2168
2173
|
};
|
|
2169
|
-
}, "builderGeneratorFn"),
|
|
2174
|
+
}, "builderGeneratorFn"), fr = /* @__PURE__ */ o(async () => {
|
|
2170
2175
|
if (C)
|
|
2171
2176
|
try {
|
|
2172
2177
|
await C.throw(new Error());
|
|
2173
2178
|
} catch {
|
|
2174
2179
|
}
|
|
2175
|
-
}, "bail"),
|
|
2176
|
-
C =
|
|
2180
|
+
}, "bail"), Na = /* @__PURE__ */ o(async (e) => {
|
|
2181
|
+
C = mr(e);
|
|
2177
2182
|
let i;
|
|
2178
2183
|
do
|
|
2179
2184
|
i = await C.next();
|
|
2180
2185
|
while (!i.done);
|
|
2181
2186
|
return i.value;
|
|
2182
|
-
}, "start"),
|
|
2183
|
-
C =
|
|
2187
|
+
}, "start"), Da = /* @__PURE__ */ o(async (e) => {
|
|
2188
|
+
C = ur(e);
|
|
2184
2189
|
let i;
|
|
2185
2190
|
do
|
|
2186
2191
|
i = await C.next();
|
|
2187
2192
|
while (!i.done);
|
|
2188
2193
|
return i.value;
|
|
2189
|
-
}, "build"),
|
|
2194
|
+
}, "build"), Ia = [], Ma = [];
|
|
2190
2195
|
export {
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2196
|
+
fr as bail,
|
|
2197
|
+
Da as build,
|
|
2198
|
+
Ia as corePresets,
|
|
2199
|
+
jt as executor,
|
|
2200
|
+
_t as getConfig,
|
|
2201
|
+
Ma as overridePresets,
|
|
2202
|
+
Na as start
|
|
2198
2203
|
};
|