storybook 9.0.0-alpha.1 → 9.0.0-alpha.11
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/README.md +31 -29
- package/assets/browser/favicon.svg +1 -0
- package/assets/browser/nunito-sans-bold-italic.woff2 +0 -0
- package/assets/browser/nunito-sans-bold.woff2 +0 -0
- package/assets/browser/nunito-sans-italic.woff2 +0 -0
- package/assets/browser/nunito-sans-regular.woff2 +0 -0
- package/assets/docs/addon-controls-args-annotated.png +0 -0
- package/assets/docs/addon-controls-args-background-color.png +0 -0
- package/assets/docs/addon-controls-args-background-string.png +0 -0
- package/assets/docs/addon-controls-args-docs.png +0 -0
- package/assets/docs/addon-controls-args-logging.png +0 -0
- package/assets/docs/addon-controls-args-no-annotation.png +0 -0
- package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
- package/assets/docs/addon-controls-args-reflow.png +0 -0
- package/assets/docs/addon-controls-args-template.png +0 -0
- package/assets/docs/addon-controls-expanded.png +0 -0
- package/assets/docs/addon-controls-hero.gif +0 -0
- package/assets/docs/addon-controls-install.png +0 -0
- package/assets/docs/hero.gif +0 -0
- package/assets/docs/message-reference.png +0 -0
- package/assets/docs/viewport.png +0 -0
- package/assets/server/addon.tsconfig.json +6 -0
- package/assets/server/base-preview-body.html +119 -0
- package/assets/server/base-preview-head.html +451 -0
- package/assets/server/template.ejs +87 -0
- package/bin/index.cjs +1 -1
- package/dist/actions/decorator.d.ts +6 -0
- package/dist/actions/decorator.js +139 -0
- package/dist/actions/index.cjs +127 -0
- package/dist/actions/index.d.ts +105 -0
- package/dist/actions/index.js +112 -0
- package/dist/actions/manager.js +1196 -0
- package/dist/actions/preview.cjs +165 -0
- package/dist/actions/preview.d.ts +55 -0
- package/dist/actions/preview.js +156 -0
- package/dist/babel/index.cjs +54034 -0
- package/dist/babel/index.d.ts +7488 -0
- package/dist/babel/index.js +54044 -0
- package/dist/bin/index.cjs +118 -0
- package/dist/bin/index.js +112 -0
- package/dist/builder-manager/index.cjs +2140 -0
- package/dist/builder-manager/index.d.ts +19 -0
- package/dist/builder-manager/index.js +2162 -0
- package/dist/channels/index.cjs +1913 -0
- package/dist/channels/index.d.ts +108 -0
- package/dist/channels/index.js +1881 -0
- package/dist/cli/bin/index.cjs +2687 -0
- package/dist/cli/bin/index.d.ts +2 -0
- package/dist/cli/bin/index.js +2707 -0
- package/dist/cli/index.cjs +17327 -0
- package/dist/cli/index.d.ts +209 -0
- package/dist/cli/index.js +17349 -0
- package/dist/client-logger/index.cjs +80 -0
- package/dist/client-logger/index.d.ts +29 -0
- package/dist/client-logger/index.js +64 -0
- package/dist/common/index.cjs +20568 -0
- package/dist/common/index.d.ts +948 -0
- package/dist/common/index.js +20653 -0
- package/dist/component-testing/index.cjs +23 -0
- package/dist/component-testing/index.d.ts +3 -0
- package/dist/component-testing/index.js +5 -0
- package/dist/component-testing/manager.css +170 -0
- package/dist/component-testing/manager.js +3099 -0
- package/dist/component-testing/preview.cjs +40 -0
- package/dist/component-testing/preview.d.ts +5 -0
- package/dist/component-testing/preview.js +25 -0
- package/dist/components/index.cjs +27925 -0
- package/dist/components/index.d.ts +1423 -0
- package/dist/components/index.js +24674 -0
- package/dist/controls/decorator.d.ts +5 -0
- package/dist/controls/decorator.js +8 -0
- package/dist/controls/index.cjs +26 -0
- package/dist/controls/index.d.ts +39 -0
- package/dist/controls/index.js +6 -0
- package/dist/controls/manager.js +5545 -0
- package/dist/controls/preview.cjs +26 -0
- package/dist/controls/preview.d.ts +55 -0
- package/dist/controls/preview.js +9 -0
- package/dist/core-events/index.cjs +167 -0
- package/dist/core-events/index.d.ts +426 -0
- package/dist/core-events/index.js +149 -0
- package/dist/core-server/index.cjs +38183 -0
- package/dist/core-server/index.d.ts +720 -0
- package/dist/core-server/index.js +38272 -0
- package/dist/core-server/presets/common-manager.js +20 -0
- package/dist/core-server/presets/common-override-preset.cjs +4824 -0
- package/dist/core-server/presets/common-override-preset.js +4829 -0
- package/dist/core-server/presets/common-preset.cjs +10231 -0
- package/dist/core-server/presets/common-preset.js +10309 -0
- package/dist/csf/index.cjs +179 -0
- package/dist/csf/index.d.ts +750 -0
- package/dist/csf/index.js +172 -0
- package/dist/csf-tools/index.cjs +1422 -0
- package/dist/csf-tools/index.d.ts +250 -0
- package/dist/csf-tools/index.js +1439 -0
- package/dist/docs-tools/index.cjs +2891 -0
- package/dist/docs-tools/index.d.ts +162 -0
- package/dist/docs-tools/index.js +2876 -0
- package/dist/index.cjs +17 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -7
- package/dist/instrumenter/index.cjs +3492 -0
- package/dist/instrumenter/index.d.ts +104 -0
- package/dist/instrumenter/index.js +4964 -0
- package/dist/manager/globals-module-info.cjs +817 -0
- package/dist/manager/globals-module-info.d.ts +36 -0
- package/dist/manager/globals-module-info.js +804 -0
- package/dist/manager/globals-runtime.js +83389 -0
- package/dist/manager/globals.cjs +47 -0
- package/dist/manager/globals.d.ts +24 -0
- package/dist/manager/globals.js +34 -0
- package/dist/manager/runtime.js +12323 -0
- package/dist/manager-api/index.cjs +11074 -0
- package/dist/manager-api/index.d.ts +1512 -0
- package/dist/manager-api/index.js +4835 -0
- package/dist/manager-errors.d.ts +89 -0
- package/dist/manager-errors.js +99 -0
- package/dist/node-logger/index.cjs +1642 -0
- package/dist/node-logger/index.d.ts +117 -0
- package/dist/node-logger/index.js +1652 -0
- package/dist/preview/globals.cjs +38 -0
- package/dist/preview/globals.d.ts +15 -0
- package/dist/preview/globals.js +25 -0
- package/dist/preview/runtime.js +44921 -0
- package/dist/preview-api/index.cjs +5227 -0
- package/dist/preview-api/index.d.ts +1093 -0
- package/dist/preview-api/index.js +5295 -0
- package/dist/preview-errors.cjs +503 -0
- package/dist/preview-errors.d.ts +212 -0
- package/dist/preview-errors.js +449 -0
- package/dist/router/index.cjs +3296 -0
- package/dist/router/index.d.ts +385 -0
- package/dist/router/index.js +1843 -0
- package/dist/server-errors.cjs +727 -0
- package/dist/server-errors.d.ts +296 -0
- package/dist/server-errors.js +728 -0
- package/dist/telemetry/index.cjs +2756 -0
- package/dist/telemetry/index.d.ts +133 -0
- package/dist/telemetry/index.js +2797 -0
- package/dist/test/index.cjs +35685 -0
- package/dist/test/index.d.ts +186 -0
- package/dist/test/index.js +33751 -0
- package/dist/test/preview.cjs +15869 -0
- package/dist/test/preview.d.ts +54 -0
- package/dist/test/preview.js +14440 -0
- package/dist/test/spy.cjs +257 -0
- package/dist/test/spy.d.ts +66 -0
- package/dist/test/spy.js +239 -0
- package/dist/theming/create.cjs +232 -0
- package/dist/theming/create.d.ts +50 -0
- package/dist/theming/create.js +216 -0
- package/dist/theming/index.cjs +2665 -0
- package/dist/theming/index.d.ts +11939 -0
- package/dist/theming/index.js +2485 -0
- package/dist/types/index.cjs +27 -0
- package/dist/types/index.d.ts +2795 -0
- package/dist/types/index.js +7 -0
- package/dist/viewport/index.cjs +310 -0
- package/dist/viewport/index.d.ts +320 -0
- package/dist/viewport/index.js +290 -0
- package/dist/viewport/manager.js +400 -0
- package/dist/viewport/preview.cjs +35 -0
- package/dist/viewport/preview.d.ts +69 -0
- package/dist/viewport/preview.js +19 -0
- package/package.json +539 -209
- package/.eslintrc.cjs +0 -31
- package/__mocks__/@aw-web-design/x-default-browser.js +0 -2
- package/core/babel/index.cjs +0 -1
- package/core/babel/index.d.ts +0 -2
- package/core/babel/index.js +0 -1
- package/core/builder-manager/index.cjs +0 -1
- package/core/builder-manager/index.d.ts +0 -2
- package/core/builder-manager/index.js +0 -1
- package/core/channels/index.cjs +0 -1
- package/core/channels/index.d.ts +0 -2
- package/core/channels/index.js +0 -1
- package/core/cli/bin/index.cjs +0 -1
- package/core/cli/bin/index.d.ts +0 -2
- package/core/cli/bin/index.js +0 -1
- package/core/cli/index.cjs +0 -1
- package/core/cli/index.d.ts +0 -2
- package/core/cli/index.js +0 -1
- package/core/client-logger/index.cjs +0 -1
- package/core/client-logger/index.d.ts +0 -2
- package/core/client-logger/index.js +0 -1
- package/core/common/index.cjs +0 -1
- package/core/common/index.d.ts +0 -2
- package/core/common/index.js +0 -1
- package/core/components/index.cjs +0 -1
- package/core/components/index.d.ts +0 -2
- package/core/components/index.js +0 -1
- package/core/core-events/index.cjs +0 -1
- package/core/core-events/index.d.ts +0 -2
- package/core/core-events/index.js +0 -1
- package/core/core-server/index.cjs +0 -1
- package/core/core-server/index.d.ts +0 -2
- package/core/core-server/index.js +0 -1
- package/core/core-server/presets/common-manager.js +0 -1
- package/core/core-server/presets/common-override-preset.cjs +0 -1
- package/core/core-server/presets/common-override-preset.js +0 -1
- package/core/core-server/presets/common-preset.cjs +0 -1
- package/core/core-server/presets/common-preset.js +0 -1
- package/core/csf/index.cjs +0 -1
- package/core/csf/index.d.ts +0 -2
- package/core/csf/index.js +0 -1
- package/core/csf-tools/index.cjs +0 -1
- package/core/csf-tools/index.d.ts +0 -2
- package/core/csf-tools/index.js +0 -1
- package/core/docs-tools/index.cjs +0 -1
- package/core/docs-tools/index.d.ts +0 -2
- package/core/docs-tools/index.js +0 -1
- package/core/index.cjs +0 -1
- package/core/index.d.ts +0 -2
- package/core/index.js +0 -1
- package/core/manager/globals-module-info.cjs +0 -1
- package/core/manager/globals-module-info.d.ts +0 -2
- package/core/manager/globals-module-info.js +0 -1
- package/core/manager/globals-runtime.js +0 -1
- package/core/manager/globals.cjs +0 -1
- package/core/manager/globals.d.ts +0 -2
- package/core/manager/globals.js +0 -1
- package/core/manager-api/index.cjs +0 -1
- package/core/manager-api/index.d.ts +0 -2
- package/core/manager-api/index.js +0 -1
- package/core/manager-errors.d.ts +0 -2
- package/core/manager-errors.js +0 -1
- package/core/node-logger/index.cjs +0 -1
- package/core/node-logger/index.d.ts +0 -2
- package/core/node-logger/index.js +0 -1
- package/core/preview/globals.cjs +0 -1
- package/core/preview/globals.d.ts +0 -2
- package/core/preview/globals.js +0 -1
- package/core/preview/runtime.js +0 -1
- package/core/preview-api/index.cjs +0 -1
- package/core/preview-api/index.d.ts +0 -2
- package/core/preview-api/index.js +0 -1
- package/core/preview-errors.cjs +0 -1
- package/core/preview-errors.d.ts +0 -2
- package/core/preview-errors.js +0 -1
- package/core/router/index.cjs +0 -1
- package/core/router/index.d.ts +0 -2
- package/core/router/index.js +0 -1
- package/core/server-errors.cjs +0 -1
- package/core/server-errors.d.ts +0 -2
- package/core/server-errors.js +0 -1
- package/core/telemetry/index.cjs +0 -1
- package/core/telemetry/index.d.ts +0 -2
- package/core/telemetry/index.js +0 -1
- package/core/theming/create.cjs +0 -1
- package/core/theming/create.d.ts +0 -2
- package/core/theming/create.js +0 -1
- package/core/theming/index.cjs +0 -1
- package/core/theming/index.d.ts +0 -2
- package/core/theming/index.js +0 -1
- package/core/types/index.cjs +0 -1
- package/core/types/index.d.ts +0 -2
- package/core/types/index.js +0 -1
- package/core.cjs +0 -0
- package/core.d.ts +0 -0
- package/core.js +0 -1
- package/dist/chunk-OWLSIX54.js +0 -8
- package/dist/core-path.cjs +0 -1
- package/dist/core-path.d.ts +0 -3
- package/dist/core-path.js +0 -9
- package/dist/proxy.cjs +0 -1
- package/dist/proxy.d.ts +0 -2
- package/dist/proxy.js +0 -9
|
@@ -0,0 +1,2162 @@
|
|
|
1
|
+
import ESM_COMPAT_Module from "node:module";
|
|
2
|
+
import { fileURLToPath as ESM_COMPAT_fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as ESM_COMPAT_dirname } from 'node:path';
|
|
4
|
+
const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
|
|
5
|
+
const __dirname = ESM_COMPAT_dirname(__filename);
|
|
6
|
+
const require = ESM_COMPAT_Module.createRequire(import.meta.url);
|
|
7
|
+
var Rt = Object.create;
|
|
8
|
+
var C = Object.defineProperty;
|
|
9
|
+
var Lt = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var Ct = Object.getOwnPropertyNames;
|
|
11
|
+
var At = Object.getPrototypeOf, Nt = Object.prototype.hasOwnProperty;
|
|
12
|
+
var o = (e, i) => C(e, "name", { value: i, configurable: !0 }), S = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "\
|
|
13
|
+
u" ? new Proxy(e, {
|
|
14
|
+
get: (i, t) => (typeof require < "u" ? require : i)[t]
|
|
15
|
+
}) : e)(function(e) {
|
|
16
|
+
if (typeof require < "u") return require.apply(this, arguments);
|
|
17
|
+
throw Error('Dynamic require of "' + e + '" is not supported');
|
|
18
|
+
});
|
|
19
|
+
var z = (e, i) => () => (e && (i = e(e = 0)), i);
|
|
20
|
+
var A = (e, i) => () => (i || e((i = { exports: {} }).exports, i), i.exports), q = (e, i) => {
|
|
21
|
+
for (var t in i)
|
|
22
|
+
C(e, t, { get: i[t], enumerable: !0 });
|
|
23
|
+
}, fe = (e, i, t, r) => {
|
|
24
|
+
if (i && typeof i == "object" || typeof i == "function")
|
|
25
|
+
for (let a of Ct(i))
|
|
26
|
+
!Nt.call(e, a) && a !== t && C(e, a, { get: () => i[a], enumerable: !(r = Lt(i, a)) || r.enumerable });
|
|
27
|
+
return e;
|
|
28
|
+
};
|
|
29
|
+
var V = (e, i, t) => (t = e != null ? Rt(At(e)) : {}, fe(
|
|
30
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
32
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
33
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
34
|
+
i || !e || !e.__esModule ? C(t, "default", { value: e, enumerable: !0 }) : t,
|
|
35
|
+
e
|
|
36
|
+
)), $ = (e) => fe(C({}, "__esModule", { value: !0 }), e);
|
|
37
|
+
|
|
38
|
+
// ../node_modules/tslib/tslib.es6.mjs
|
|
39
|
+
var He = {};
|
|
40
|
+
q(He, {
|
|
41
|
+
__addDisposableResource: () => qe,
|
|
42
|
+
__assign: () => W,
|
|
43
|
+
__asyncDelegator: () => Le,
|
|
44
|
+
__asyncGenerator: () => Re,
|
|
45
|
+
__asyncValues: () => Ce,
|
|
46
|
+
__await: () => F,
|
|
47
|
+
__awaiter: () => Ee,
|
|
48
|
+
__classPrivateFieldGet: () => Ie,
|
|
49
|
+
__classPrivateFieldIn: () => ze,
|
|
50
|
+
__classPrivateFieldSet: () => Me,
|
|
51
|
+
__createBinding: () => B,
|
|
52
|
+
__decorate: () => ye,
|
|
53
|
+
__disposeResources: () => $e,
|
|
54
|
+
__esDecorate: () => we,
|
|
55
|
+
__exportStar: () => Se,
|
|
56
|
+
__extends: () => xe,
|
|
57
|
+
__generator: () => Pe,
|
|
58
|
+
__importDefault: () => De,
|
|
59
|
+
__importStar: () => Ne,
|
|
60
|
+
__makeTemplateObject: () => Ae,
|
|
61
|
+
__metadata: () => Oe,
|
|
62
|
+
__param: () => ve,
|
|
63
|
+
__propKey: () => _e,
|
|
64
|
+
__read: () => ee,
|
|
65
|
+
__rest: () => he,
|
|
66
|
+
__rewriteRelativeImportExtension: () => We,
|
|
67
|
+
__runInitializers: () => be,
|
|
68
|
+
__setFunctionName: () => je,
|
|
69
|
+
__spread: () => ke,
|
|
70
|
+
__spreadArray: () => Fe,
|
|
71
|
+
__spreadArrays: () => Te,
|
|
72
|
+
__values: () => H,
|
|
73
|
+
default: () => qt
|
|
74
|
+
});
|
|
75
|
+
function xe(e, i) {
|
|
76
|
+
if (typeof i != "function" && i !== null)
|
|
77
|
+
throw new TypeError("Class extends value " + String(i) + " is not a constructor or null");
|
|
78
|
+
Y(e, i);
|
|
79
|
+
function t() {
|
|
80
|
+
this.constructor = e;
|
|
81
|
+
}
|
|
82
|
+
o(t, "__"), e.prototype = i === null ? Object.create(i) : (t.prototype = i.prototype, new t());
|
|
83
|
+
}
|
|
84
|
+
function he(e, i) {
|
|
85
|
+
var t = {};
|
|
86
|
+
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && i.indexOf(r) < 0 && (t[r] = e[r]);
|
|
87
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
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
|
+
return t;
|
|
91
|
+
}
|
|
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 c = e.length - 1; c >= 0; c--) (s = e[c]) && (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
|
+
}
|
|
98
|
+
function ve(e, i) {
|
|
99
|
+
return function(t, r) {
|
|
100
|
+
i(t, r, e);
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
function we(e, i, t, r, a, n) {
|
|
104
|
+
function s(v) {
|
|
105
|
+
if (v !== void 0 && typeof v != "function") throw new TypeError("Function expected");
|
|
106
|
+
return v;
|
|
107
|
+
}
|
|
108
|
+
o(s, "accept");
|
|
109
|
+
for (var c = r.kind, p = c === "getter" ? "get" : c === "setter" ? "set" : "value", l = !i && e ? r.static ? e : e.prototype : null, u = i ||
|
|
110
|
+
(l ? Object.getOwnPropertyDescriptor(l, r.name) : {}), d, x = !1, g = t.length - 1; g >= 0; g--) {
|
|
111
|
+
var m = {};
|
|
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
|
+
m.addInitializer = function(v) {
|
|
115
|
+
if (x) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
116
|
+
n.push(s(v || null));
|
|
117
|
+
};
|
|
118
|
+
var y = (0, t[g])(c === "accessor" ? { get: u.get, set: u.set } : u[p], m);
|
|
119
|
+
if (c === "accessor") {
|
|
120
|
+
if (y === void 0) continue;
|
|
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)) && a.unshift(d);
|
|
123
|
+
} else (d = s(y)) && (c === "field" ? a.unshift(d) : u[p] = d);
|
|
124
|
+
}
|
|
125
|
+
l && Object.defineProperty(l, r.name, u), x = !0;
|
|
126
|
+
}
|
|
127
|
+
function be(e, i, t) {
|
|
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
|
+
}
|
|
132
|
+
function _e(e) {
|
|
133
|
+
return typeof e == "symbol" ? e : "".concat(e);
|
|
134
|
+
}
|
|
135
|
+
function je(e, i, t) {
|
|
136
|
+
return typeof i == "symbol" && (i = i.description ? "[".concat(i.description, "]") : ""), Object.defineProperty(e, "name", { configurable: !0,
|
|
137
|
+
value: t ? "".concat(t, " ", i) : i });
|
|
138
|
+
}
|
|
139
|
+
function Oe(e, i) {
|
|
140
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, i);
|
|
141
|
+
}
|
|
142
|
+
function Ee(e, i, t, r) {
|
|
143
|
+
function a(n) {
|
|
144
|
+
return n instanceof t ? n : new t(function(s) {
|
|
145
|
+
s(n);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
return o(a, "adopt"), new (t || (t = Promise))(function(n, s) {
|
|
149
|
+
function c(u) {
|
|
150
|
+
try {
|
|
151
|
+
l(r.next(u));
|
|
152
|
+
} catch (d) {
|
|
153
|
+
s(d);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
o(c, "fulfilled");
|
|
157
|
+
function p(u) {
|
|
158
|
+
try {
|
|
159
|
+
l(r.throw(u));
|
|
160
|
+
} catch (d) {
|
|
161
|
+
s(d);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
o(p, "rejected");
|
|
165
|
+
function l(u) {
|
|
166
|
+
u.done ? n(u.value) : a(u.value).then(c, p);
|
|
167
|
+
}
|
|
168
|
+
o(l, "step"), l((r = r.apply(e, i || [])).next());
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
function Pe(e, i) {
|
|
172
|
+
var t = { label: 0, sent: /* @__PURE__ */ o(function() {
|
|
173
|
+
if (n[0] & 1) throw n[1];
|
|
174
|
+
return n[1];
|
|
175
|
+
}, "sent"), trys: [], ops: [] }, r, a, n, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
176
|
+
return s.next = c(0), s.throw = c(1), s.return = c(2), typeof Symbol == "function" && (s[Symbol.iterator] = function() {
|
|
177
|
+
return this;
|
|
178
|
+
}), s;
|
|
179
|
+
function c(l) {
|
|
180
|
+
return function(u) {
|
|
181
|
+
return p([l, u]);
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
function p(l) {
|
|
185
|
+
if (r) throw new TypeError("Generator is already executing.");
|
|
186
|
+
for (; s && (s = 0, l[0] && (t = 0)), t; ) try {
|
|
187
|
+
if (r = 1, a && (n = l[0] & 2 ? a.return : l[0] ? a.throw || ((n = a.return) && n.call(a), 0) : a.next) && !(n = n.call(a, l[1])).done)
|
|
188
|
+
return n;
|
|
189
|
+
switch (a = 0, n && (l = [l[0] & 2, n.value]), l[0]) {
|
|
190
|
+
case 0:
|
|
191
|
+
case 1:
|
|
192
|
+
n = l;
|
|
193
|
+
break;
|
|
194
|
+
case 4:
|
|
195
|
+
return t.label++, { value: l[1], done: !1 };
|
|
196
|
+
case 5:
|
|
197
|
+
t.label++, a = l[1], l = [0];
|
|
198
|
+
continue;
|
|
199
|
+
case 7:
|
|
200
|
+
l = t.ops.pop(), t.trys.pop();
|
|
201
|
+
continue;
|
|
202
|
+
default:
|
|
203
|
+
if (n = t.trys, !(n = n.length > 0 && n[n.length - 1]) && (l[0] === 6 || l[0] === 2)) {
|
|
204
|
+
t = 0;
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
if (l[0] === 3 && (!n || l[1] > n[0] && l[1] < n[3])) {
|
|
208
|
+
t.label = l[1];
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
if (l[0] === 6 && t.label < n[1]) {
|
|
212
|
+
t.label = n[1], n = l;
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
if (n && t.label < n[2]) {
|
|
216
|
+
t.label = n[2], t.ops.push(l);
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
n[2] && t.ops.pop(), t.trys.pop();
|
|
220
|
+
continue;
|
|
221
|
+
}
|
|
222
|
+
l = i.call(e, t);
|
|
223
|
+
} catch (u) {
|
|
224
|
+
l = [6, u], a = 0;
|
|
225
|
+
} finally {
|
|
226
|
+
r = n = 0;
|
|
227
|
+
}
|
|
228
|
+
if (l[0] & 5) throw l[1];
|
|
229
|
+
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
function Se(e, i) {
|
|
233
|
+
for (var t in e) t !== "default" && !Object.prototype.hasOwnProperty.call(i, t) && B(i, e, t);
|
|
234
|
+
}
|
|
235
|
+
function H(e) {
|
|
236
|
+
var i = typeof Symbol == "function" && Symbol.iterator, t = i && e[i], r = 0;
|
|
237
|
+
if (t) return t.call(e);
|
|
238
|
+
if (e && typeof e.length == "number") return {
|
|
239
|
+
next: /* @__PURE__ */ o(function() {
|
|
240
|
+
return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e };
|
|
241
|
+
}, "next")
|
|
242
|
+
};
|
|
243
|
+
throw new TypeError(i ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
244
|
+
}
|
|
245
|
+
function ee(e, i) {
|
|
246
|
+
var t = typeof Symbol == "function" && e[Symbol.iterator];
|
|
247
|
+
if (!t) return e;
|
|
248
|
+
var r = t.call(e), a, n = [], s;
|
|
249
|
+
try {
|
|
250
|
+
for (; (i === void 0 || i-- > 0) && !(a = r.next()).done; ) n.push(a.value);
|
|
251
|
+
} catch (c) {
|
|
252
|
+
s = { error: c };
|
|
253
|
+
} finally {
|
|
254
|
+
try {
|
|
255
|
+
a && !a.done && (t = r.return) && t.call(r);
|
|
256
|
+
} finally {
|
|
257
|
+
if (s) throw s.error;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return n;
|
|
261
|
+
}
|
|
262
|
+
function ke() {
|
|
263
|
+
for (var e = [], i = 0; i < arguments.length; i++)
|
|
264
|
+
e = e.concat(ee(arguments[i]));
|
|
265
|
+
return e;
|
|
266
|
+
}
|
|
267
|
+
function Te() {
|
|
268
|
+
for (var e = 0, i = 0, t = arguments.length; i < t; i++) e += arguments[i].length;
|
|
269
|
+
for (var r = Array(e), a = 0, i = 0; i < t; i++)
|
|
270
|
+
for (var n = arguments[i], s = 0, c = n.length; s < c; s++, a++)
|
|
271
|
+
r[a] = n[s];
|
|
272
|
+
return r;
|
|
273
|
+
}
|
|
274
|
+
function Fe(e, i, t) {
|
|
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
|
+
return e.concat(n || Array.prototype.slice.call(i));
|
|
278
|
+
}
|
|
279
|
+
function F(e) {
|
|
280
|
+
return this instanceof F ? (this.v = e, this) : new F(e);
|
|
281
|
+
}
|
|
282
|
+
function Re(e, i, t) {
|
|
283
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
284
|
+
var r = t.apply(e, i || []), a, n = [];
|
|
285
|
+
return a = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), c("next"), c("throw"), c("return", s), a[Symbol.
|
|
286
|
+
asyncIterator] = function() {
|
|
287
|
+
return this;
|
|
288
|
+
}, a;
|
|
289
|
+
function s(g) {
|
|
290
|
+
return function(m) {
|
|
291
|
+
return Promise.resolve(m).then(g, d);
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
function c(g, m) {
|
|
295
|
+
r[g] && (a[g] = function(f) {
|
|
296
|
+
return new Promise(function(y, v) {
|
|
297
|
+
n.push([g, f, y, v]) > 1 || p(g, f);
|
|
298
|
+
});
|
|
299
|
+
}, m && (a[g] = m(a[g])));
|
|
300
|
+
}
|
|
301
|
+
function p(g, m) {
|
|
302
|
+
try {
|
|
303
|
+
l(r[g](m));
|
|
304
|
+
} catch (f) {
|
|
305
|
+
x(n[0][3], f);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
function l(g) {
|
|
309
|
+
g.value instanceof F ? Promise.resolve(g.value.v).then(u, d) : x(n[0][2], g);
|
|
310
|
+
}
|
|
311
|
+
function u(g) {
|
|
312
|
+
p("next", g);
|
|
313
|
+
}
|
|
314
|
+
function d(g) {
|
|
315
|
+
p("throw", g);
|
|
316
|
+
}
|
|
317
|
+
function x(g, m) {
|
|
318
|
+
g(m), n.shift(), n.length && p(n[0][0], n[0][1]);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
function Le(e) {
|
|
322
|
+
var i, t;
|
|
323
|
+
return i = {}, r("next"), r("throw", function(a) {
|
|
324
|
+
throw a;
|
|
325
|
+
}), r("return"), i[Symbol.iterator] = function() {
|
|
326
|
+
return this;
|
|
327
|
+
}, i;
|
|
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
|
+
} : n;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
function Ce(e) {
|
|
335
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
336
|
+
var i = e[Symbol.asyncIterator], 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
|
+
function() {
|
|
339
|
+
return this;
|
|
340
|
+
}, t);
|
|
341
|
+
function r(n) {
|
|
342
|
+
t[n] = e[n] && function(s) {
|
|
343
|
+
return new Promise(function(c, p) {
|
|
344
|
+
s = e[n](s), a(c, p, s.done, s.value);
|
|
345
|
+
});
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
function a(n, s, c, p) {
|
|
349
|
+
Promise.resolve(p).then(function(l) {
|
|
350
|
+
n({ value: l, done: c });
|
|
351
|
+
}, s);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
function Ae(e, i) {
|
|
355
|
+
return Object.defineProperty ? Object.defineProperty(e, "raw", { value: i }) : e.raw = i, e;
|
|
356
|
+
}
|
|
357
|
+
function Ne(e) {
|
|
358
|
+
if (e && e.__esModule) return e;
|
|
359
|
+
var i = {};
|
|
360
|
+
if (e != null) for (var t = Q(e), r = 0; r < t.length; r++) t[r] !== "default" && B(i, e, t[r]);
|
|
361
|
+
return Mt(i, e), i;
|
|
362
|
+
}
|
|
363
|
+
function De(e) {
|
|
364
|
+
return e && e.__esModule ? e : { default: e };
|
|
365
|
+
}
|
|
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
|
+
declare it");
|
|
370
|
+
return t === "m" ? r : t === "a" ? r.call(e) : r ? r.value : i.get(e);
|
|
371
|
+
}
|
|
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
|
+
declare it");
|
|
377
|
+
return r === "a" ? a.call(e, t) : a ? a.value = t : i.set(e, t), t;
|
|
378
|
+
}
|
|
379
|
+
function ze(e, i) {
|
|
380
|
+
if (i === null || typeof i != "object" && typeof i != "function") throw new TypeError("Cannot use 'in' operator on non-object");
|
|
381
|
+
return typeof e == "function" ? i === e : e.has(i);
|
|
382
|
+
}
|
|
383
|
+
function qe(e, i, t) {
|
|
384
|
+
if (i != null) {
|
|
385
|
+
if (typeof i != "object" && typeof i != "function") throw new TypeError("Object expected.");
|
|
386
|
+
var r, a;
|
|
387
|
+
if (t) {
|
|
388
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
389
|
+
r = i[Symbol.asyncDispose];
|
|
390
|
+
}
|
|
391
|
+
if (r === void 0) {
|
|
392
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
393
|
+
r = i[Symbol.dispose], t && (a = r);
|
|
394
|
+
}
|
|
395
|
+
if (typeof r != "function") throw new TypeError("Object not disposable.");
|
|
396
|
+
a && (r = /* @__PURE__ */ o(function() {
|
|
397
|
+
try {
|
|
398
|
+
a.call(this);
|
|
399
|
+
} catch (n) {
|
|
400
|
+
return Promise.reject(n);
|
|
401
|
+
}
|
|
402
|
+
}, "dispose")), e.stack.push({ value: i, dispose: r, async: t });
|
|
403
|
+
} else t && e.stack.push({ async: !0 });
|
|
404
|
+
return i;
|
|
405
|
+
}
|
|
406
|
+
function $e(e) {
|
|
407
|
+
function i(n) {
|
|
408
|
+
e.error = e.hasError ? new zt(n, e.error, "An error was suppressed during disposal.") : n, e.hasError = !0;
|
|
409
|
+
}
|
|
410
|
+
o(i, "fail");
|
|
411
|
+
var t, r = 0;
|
|
412
|
+
function a() {
|
|
413
|
+
for (; t = e.stack.pop(); )
|
|
414
|
+
try {
|
|
415
|
+
if (!t.async && r === 1) return r = 0, e.stack.push(t), Promise.resolve().then(a);
|
|
416
|
+
if (t.dispose) {
|
|
417
|
+
var n = t.dispose.call(t.value);
|
|
418
|
+
if (t.async) return r |= 2, Promise.resolve(n).then(a, function(s) {
|
|
419
|
+
return i(s), a();
|
|
420
|
+
});
|
|
421
|
+
} else r |= 1;
|
|
422
|
+
} catch (s) {
|
|
423
|
+
i(s);
|
|
424
|
+
}
|
|
425
|
+
if (r === 1) return e.hasError ? Promise.reject(e.error) : Promise.resolve();
|
|
426
|
+
if (e.hasError) throw e.error;
|
|
427
|
+
}
|
|
428
|
+
return o(a, "next"), a();
|
|
429
|
+
}
|
|
430
|
+
function We(e, i) {
|
|
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
|
+
}) : e;
|
|
434
|
+
}
|
|
435
|
+
var Y, W, B, Mt, Q, zt, qt, Be = z(() => {
|
|
436
|
+
Y = /* @__PURE__ */ o(function(e, i) {
|
|
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
|
+
}, Y(e, i);
|
|
442
|
+
}, "extendStatics");
|
|
443
|
+
o(xe, "__extends");
|
|
444
|
+
W = /* @__PURE__ */ o(function() {
|
|
445
|
+
return W = Object.assign || /* @__PURE__ */ o(function(i) {
|
|
446
|
+
for (var t, r = 1, a = arguments.length; r < a; r++) {
|
|
447
|
+
t = arguments[r];
|
|
448
|
+
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (i[n] = t[n]);
|
|
449
|
+
}
|
|
450
|
+
return i;
|
|
451
|
+
}, "__assign"), W.apply(this, arguments);
|
|
452
|
+
}, "__assign");
|
|
453
|
+
o(he, "__rest");
|
|
454
|
+
o(ye, "__decorate");
|
|
455
|
+
o(ve, "__param");
|
|
456
|
+
o(we, "__esDecorate");
|
|
457
|
+
o(be, "__runInitializers");
|
|
458
|
+
o(_e, "__propKey");
|
|
459
|
+
o(je, "__setFunctionName");
|
|
460
|
+
o(Oe, "__metadata");
|
|
461
|
+
o(Ee, "__awaiter");
|
|
462
|
+
o(Pe, "__generator");
|
|
463
|
+
B = 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
|
+
return i[t];
|
|
468
|
+
}, "get") }), Object.defineProperty(e, r, a);
|
|
469
|
+
} : function(e, i, t, r) {
|
|
470
|
+
r === void 0 && (r = t), e[r] = i[t];
|
|
471
|
+
};
|
|
472
|
+
o(Se, "__exportStar");
|
|
473
|
+
o(H, "__values");
|
|
474
|
+
o(ee, "__read");
|
|
475
|
+
o(ke, "__spread");
|
|
476
|
+
o(Te, "__spreadArrays");
|
|
477
|
+
o(Fe, "__spreadArray");
|
|
478
|
+
o(F, "__await");
|
|
479
|
+
o(Re, "__asyncGenerator");
|
|
480
|
+
o(Le, "__asyncDelegator");
|
|
481
|
+
o(Ce, "__asyncValues");
|
|
482
|
+
o(Ae, "__makeTemplateObject");
|
|
483
|
+
Mt = Object.create ? function(e, i) {
|
|
484
|
+
Object.defineProperty(e, "default", { enumerable: !0, value: i });
|
|
485
|
+
} : function(e, i) {
|
|
486
|
+
e.default = i;
|
|
487
|
+
}, Q = /* @__PURE__ */ o(function(e) {
|
|
488
|
+
return Q = Object.getOwnPropertyNames || function(i) {
|
|
489
|
+
var t = [];
|
|
490
|
+
for (var r in i) Object.prototype.hasOwnProperty.call(i, r) && (t[t.length] = r);
|
|
491
|
+
return t;
|
|
492
|
+
}, Q(e);
|
|
493
|
+
}, "ownKeys");
|
|
494
|
+
o(Ne, "__importStar");
|
|
495
|
+
o(De, "__importDefault");
|
|
496
|
+
o(Ie, "__classPrivateFieldGet");
|
|
497
|
+
o(Me, "__classPrivateFieldSet");
|
|
498
|
+
o(ze, "__classPrivateFieldIn");
|
|
499
|
+
o(qe, "__addDisposableResource");
|
|
500
|
+
zt = 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
|
+
};
|
|
504
|
+
o($e, "__disposeResources");
|
|
505
|
+
o(We, "__rewriteRelativeImportExtension");
|
|
506
|
+
qt = {
|
|
507
|
+
__extends: xe,
|
|
508
|
+
__assign: W,
|
|
509
|
+
__rest: he,
|
|
510
|
+
__decorate: ye,
|
|
511
|
+
__param: ve,
|
|
512
|
+
__esDecorate: we,
|
|
513
|
+
__runInitializers: be,
|
|
514
|
+
__propKey: _e,
|
|
515
|
+
__setFunctionName: je,
|
|
516
|
+
__metadata: Oe,
|
|
517
|
+
__awaiter: Ee,
|
|
518
|
+
__generator: Pe,
|
|
519
|
+
__createBinding: B,
|
|
520
|
+
__exportStar: Se,
|
|
521
|
+
__values: H,
|
|
522
|
+
__read: ee,
|
|
523
|
+
__spread: ke,
|
|
524
|
+
__spreadArrays: Te,
|
|
525
|
+
__spreadArray: Fe,
|
|
526
|
+
__await: F,
|
|
527
|
+
__asyncGenerator: Re,
|
|
528
|
+
__asyncDelegator: Le,
|
|
529
|
+
__asyncValues: Ce,
|
|
530
|
+
__makeTemplateObject: Ae,
|
|
531
|
+
__importStar: Ne,
|
|
532
|
+
__importDefault: De,
|
|
533
|
+
__classPrivateFieldGet: Ie,
|
|
534
|
+
__classPrivateFieldSet: Me,
|
|
535
|
+
__classPrivateFieldIn: ze,
|
|
536
|
+
__addDisposableResource: qe,
|
|
537
|
+
__disposeResources: $e,
|
|
538
|
+
__rewriteRelativeImportExtension: We
|
|
539
|
+
};
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
// ../node_modules/@yarnpkg/esbuild-plugin-pnp/lib/index.js
|
|
543
|
+
var Ue = A((J) => {
|
|
544
|
+
"use strict";
|
|
545
|
+
Object.defineProperty(J, "__esModule", { value: !0 });
|
|
546
|
+
J.pnpPlugin = void 0;
|
|
547
|
+
var Je = (Be(), $(He)), $t = Je.__importStar(S("fs")), Wt = Je.__importDefault(S("path")), Ht = /()/, Bt = [".tsx", ".ts", ".jsx", ".mjs",
|
|
548
|
+
".cjs", ".js", ".css", ".json"];
|
|
549
|
+
function Jt(e) {
|
|
550
|
+
return e.map((i) => {
|
|
551
|
+
let t = i.indexOf("*");
|
|
552
|
+
return t !== -1 ? { prefix: i.slice(0, t), suffix: i.slice(t + 1) } : i;
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
o(Jt, "parseExternals");
|
|
556
|
+
function Ut(e, i) {
|
|
557
|
+
for (let t of i)
|
|
558
|
+
if (typeof t == "object") {
|
|
559
|
+
if (e.length >= t.prefix.length + t.suffix.length && e.startsWith(t.prefix) && e.endsWith(t.suffix))
|
|
560
|
+
return !0;
|
|
561
|
+
} else if (e === t || !t.startsWith("/") && !t.startsWith("./") && !t.startsWith("../") && t !== "." && t !== ".." && e.startsWith(`${t}\
|
|
562
|
+
/`))
|
|
563
|
+
return !0;
|
|
564
|
+
return !1;
|
|
565
|
+
}
|
|
566
|
+
o(Ut, "isExternal");
|
|
567
|
+
async function Gt(e) {
|
|
568
|
+
return {
|
|
569
|
+
contents: await $t.promises.readFile(e.path),
|
|
570
|
+
loader: "default",
|
|
571
|
+
// For regular imports in the `file` namespace, resolveDir is the directory the
|
|
572
|
+
// file being resolved lives in. For all other virtual modules, this defaults to
|
|
573
|
+
// empty string: ""
|
|
574
|
+
// A sensible value for pnp imports is the same as the `file` namespace, as pnp
|
|
575
|
+
// still resolves to files on disk (in the cache).
|
|
576
|
+
resolveDir: Wt.default.dirname(e.path)
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
o(Gt, "defaultOnLoad");
|
|
580
|
+
async function Vt(e, { resolvedPath: i, error: t, watchFiles: r }) {
|
|
581
|
+
let a = t ? [{ text: t.message }] : [], n;
|
|
582
|
+
switch (e.kind) {
|
|
583
|
+
case "require-call":
|
|
584
|
+
case "require-resolve":
|
|
585
|
+
case "dynamic-import":
|
|
586
|
+
n = { warnings: a };
|
|
587
|
+
break;
|
|
588
|
+
default:
|
|
589
|
+
n = { errors: a };
|
|
590
|
+
break;
|
|
591
|
+
}
|
|
592
|
+
return i !== null ? { namespace: "pnp", path: i, watchFiles: r } : { external: !0, ...n, watchFiles: r };
|
|
593
|
+
}
|
|
594
|
+
o(Vt, "defaultOnResolve");
|
|
595
|
+
function Xt({ baseDir: e = process.cwd(), extensions: i = Bt, filter: t = Ht, onResolve: r = Vt, onLoad: a = Gt } = {}) {
|
|
596
|
+
return {
|
|
597
|
+
name: "@yarnpkg/esbuild-plugin-pnp",
|
|
598
|
+
setup(n) {
|
|
599
|
+
var s, c;
|
|
600
|
+
let { findPnpApi: p } = S("module");
|
|
601
|
+
if (typeof p > "u")
|
|
602
|
+
return;
|
|
603
|
+
let l = Jt((s = n.initialOptions.external) !== null && s !== void 0 ? s : []), u = (c = n.initialOptions.platform) !== null && c !==
|
|
604
|
+
void 0 ? c : "browser", d = u === "node", x = new Set(n.initialOptions.conditions);
|
|
605
|
+
x.add("default"), (u === "browser" || u === "node") && x.add(u);
|
|
606
|
+
let g = new Set(x);
|
|
607
|
+
g.add("import");
|
|
608
|
+
let m = new Set(x);
|
|
609
|
+
m.add("require"), n.onResolve({ filter: t }, (f) => {
|
|
610
|
+
var y, v;
|
|
611
|
+
if (Ut(f.path, l))
|
|
612
|
+
return { external: !0 };
|
|
613
|
+
let _ = x;
|
|
614
|
+
f.kind === "dynamic-import" || f.kind === "import-statement" ? _ = g : (f.kind === "require-call" || f.kind === "require-resolve") &&
|
|
615
|
+
(_ = m);
|
|
616
|
+
let O = f.resolveDir ? `${f.resolveDir}/` : f.importer ? f.importer : `${e}/`, w = p(O);
|
|
617
|
+
if (!w)
|
|
618
|
+
return;
|
|
619
|
+
let E = null, P;
|
|
620
|
+
try {
|
|
621
|
+
E = w.resolveRequest(f.path, O, {
|
|
622
|
+
conditions: _,
|
|
623
|
+
considerBuiltins: d,
|
|
624
|
+
extensions: i
|
|
625
|
+
});
|
|
626
|
+
} catch (M) {
|
|
627
|
+
P = M;
|
|
628
|
+
}
|
|
629
|
+
let T = [w.resolveRequest("pnpapi", null)];
|
|
630
|
+
if (E) {
|
|
631
|
+
let M = w.findPackageLocator(E);
|
|
632
|
+
if (M) {
|
|
633
|
+
let G = w.getPackageInformation(M);
|
|
634
|
+
G?.linkType === "SOFT" && T.push((v = (y = w.resolveVirtual) === null || y === void 0 ? void 0 : y.call(w, E)) !== null && v !==
|
|
635
|
+
void 0 ? v : E);
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
return r(f, { resolvedPath: E, error: P, watchFiles: T });
|
|
639
|
+
}), n.onLoad !== null && n.onLoad({ filter: t }, a);
|
|
640
|
+
}
|
|
641
|
+
};
|
|
642
|
+
}
|
|
643
|
+
o(Xt, "pnpPlugin");
|
|
644
|
+
J.pnpPlugin = Xt;
|
|
645
|
+
});
|
|
646
|
+
|
|
647
|
+
// ../node_modules/totalist/sync/index.mjs
|
|
648
|
+
var Ve = {};
|
|
649
|
+
q(Ve, {
|
|
650
|
+
totalist: () => Ge
|
|
651
|
+
});
|
|
652
|
+
import { join as te, resolve as Kt } from "path";
|
|
653
|
+
import { readdirSync as Zt, statSync as Yt } from "fs";
|
|
654
|
+
function Ge(e, i, t = "") {
|
|
655
|
+
e = Kt(".", e);
|
|
656
|
+
let r = Zt(e), a = 0, n, s;
|
|
657
|
+
for (; a < r.length; a++)
|
|
658
|
+
n = te(e, r[a]), s = Yt(n), s.isDirectory() ? Ge(n, i, te(t, r[a])) : i(te(t, r[a]), n, s);
|
|
659
|
+
}
|
|
660
|
+
var Xe = z(() => {
|
|
661
|
+
o(Ge, "totalist");
|
|
662
|
+
});
|
|
663
|
+
|
|
664
|
+
// ../node_modules/@polka/url/build.mjs
|
|
665
|
+
var Ze = {};
|
|
666
|
+
q(Ze, {
|
|
667
|
+
parse: () => Qt
|
|
668
|
+
});
|
|
669
|
+
import * as Ke from "node:querystring";
|
|
670
|
+
function Qt(e) {
|
|
671
|
+
let i = e.url;
|
|
672
|
+
if (i == null) return;
|
|
673
|
+
let t = e._parsedUrl;
|
|
674
|
+
if (t && t.raw === i) return t;
|
|
675
|
+
let r = i, a = "", n;
|
|
676
|
+
if (i.length > 1) {
|
|
677
|
+
let s = i.indexOf("?", 1);
|
|
678
|
+
s !== -1 && (a = i.substring(s), r = i.substring(0, s), a.length > 1 && (n = Ke.parse(a.substring(1))));
|
|
679
|
+
}
|
|
680
|
+
return e._parsedUrl = { pathname: r, search: a, query: n, raw: i };
|
|
681
|
+
}
|
|
682
|
+
var Ye = z(() => {
|
|
683
|
+
o(Qt, "parse");
|
|
684
|
+
});
|
|
685
|
+
|
|
686
|
+
// ../node_modules/mrmime/index.mjs
|
|
687
|
+
var et = {};
|
|
688
|
+
q(et, {
|
|
689
|
+
lookup: () => ei,
|
|
690
|
+
mimes: () => Qe
|
|
691
|
+
});
|
|
692
|
+
function ei(e) {
|
|
693
|
+
let i = ("" + e).trim().toLowerCase(), t = i.lastIndexOf(".");
|
|
694
|
+
return Qe[~t ? i.substring(++t) : i];
|
|
695
|
+
}
|
|
696
|
+
var Qe, tt = z(() => {
|
|
697
|
+
Qe = {
|
|
698
|
+
"3g2": "video/3gpp2",
|
|
699
|
+
"3gp": "video/3gpp",
|
|
700
|
+
"3gpp": "video/3gpp",
|
|
701
|
+
"3mf": "model/3mf",
|
|
702
|
+
aac: "audio/aac",
|
|
703
|
+
ac: "application/pkix-attr-cert",
|
|
704
|
+
adp: "audio/adpcm",
|
|
705
|
+
adts: "audio/aac",
|
|
706
|
+
ai: "application/postscript",
|
|
707
|
+
aml: "application/automationml-aml+xml",
|
|
708
|
+
amlx: "application/automationml-amlx+zip",
|
|
709
|
+
amr: "audio/amr",
|
|
710
|
+
apng: "image/apng",
|
|
711
|
+
appcache: "text/cache-manifest",
|
|
712
|
+
appinstaller: "application/appinstaller",
|
|
713
|
+
appx: "application/appx",
|
|
714
|
+
appxbundle: "application/appxbundle",
|
|
715
|
+
asc: "application/pgp-keys",
|
|
716
|
+
atom: "application/atom+xml",
|
|
717
|
+
atomcat: "application/atomcat+xml",
|
|
718
|
+
atomdeleted: "application/atomdeleted+xml",
|
|
719
|
+
atomsvc: "application/atomsvc+xml",
|
|
720
|
+
au: "audio/basic",
|
|
721
|
+
avci: "image/avci",
|
|
722
|
+
avcs: "image/avcs",
|
|
723
|
+
avif: "image/avif",
|
|
724
|
+
aw: "application/applixware",
|
|
725
|
+
bdoc: "application/bdoc",
|
|
726
|
+
bin: "application/octet-stream",
|
|
727
|
+
bmp: "image/bmp",
|
|
728
|
+
bpk: "application/octet-stream",
|
|
729
|
+
btf: "image/prs.btif",
|
|
730
|
+
btif: "image/prs.btif",
|
|
731
|
+
buffer: "application/octet-stream",
|
|
732
|
+
ccxml: "application/ccxml+xml",
|
|
733
|
+
cdfx: "application/cdfx+xml",
|
|
734
|
+
cdmia: "application/cdmi-capability",
|
|
735
|
+
cdmic: "application/cdmi-container",
|
|
736
|
+
cdmid: "application/cdmi-domain",
|
|
737
|
+
cdmio: "application/cdmi-object",
|
|
738
|
+
cdmiq: "application/cdmi-queue",
|
|
739
|
+
cer: "application/pkix-cert",
|
|
740
|
+
cgm: "image/cgm",
|
|
741
|
+
cjs: "application/node",
|
|
742
|
+
class: "application/java-vm",
|
|
743
|
+
coffee: "text/coffeescript",
|
|
744
|
+
conf: "text/plain",
|
|
745
|
+
cpl: "application/cpl+xml",
|
|
746
|
+
cpt: "application/mac-compactpro",
|
|
747
|
+
crl: "application/pkix-crl",
|
|
748
|
+
css: "text/css",
|
|
749
|
+
csv: "text/csv",
|
|
750
|
+
cu: "application/cu-seeme",
|
|
751
|
+
cwl: "application/cwl",
|
|
752
|
+
cww: "application/prs.cww",
|
|
753
|
+
davmount: "application/davmount+xml",
|
|
754
|
+
dbk: "application/docbook+xml",
|
|
755
|
+
deb: "application/octet-stream",
|
|
756
|
+
def: "text/plain",
|
|
757
|
+
deploy: "application/octet-stream",
|
|
758
|
+
dib: "image/bmp",
|
|
759
|
+
"disposition-notification": "message/disposition-notification",
|
|
760
|
+
dist: "application/octet-stream",
|
|
761
|
+
distz: "application/octet-stream",
|
|
762
|
+
dll: "application/octet-stream",
|
|
763
|
+
dmg: "application/octet-stream",
|
|
764
|
+
dms: "application/octet-stream",
|
|
765
|
+
doc: "application/msword",
|
|
766
|
+
dot: "application/msword",
|
|
767
|
+
dpx: "image/dpx",
|
|
768
|
+
drle: "image/dicom-rle",
|
|
769
|
+
dsc: "text/prs.lines.tag",
|
|
770
|
+
dssc: "application/dssc+der",
|
|
771
|
+
dtd: "application/xml-dtd",
|
|
772
|
+
dump: "application/octet-stream",
|
|
773
|
+
dwd: "application/atsc-dwd+xml",
|
|
774
|
+
ear: "application/java-archive",
|
|
775
|
+
ecma: "application/ecmascript",
|
|
776
|
+
elc: "application/octet-stream",
|
|
777
|
+
emf: "image/emf",
|
|
778
|
+
eml: "message/rfc822",
|
|
779
|
+
emma: "application/emma+xml",
|
|
780
|
+
emotionml: "application/emotionml+xml",
|
|
781
|
+
eps: "application/postscript",
|
|
782
|
+
epub: "application/epub+zip",
|
|
783
|
+
exe: "application/octet-stream",
|
|
784
|
+
exi: "application/exi",
|
|
785
|
+
exp: "application/express",
|
|
786
|
+
exr: "image/aces",
|
|
787
|
+
ez: "application/andrew-inset",
|
|
788
|
+
fdf: "application/fdf",
|
|
789
|
+
fdt: "application/fdt+xml",
|
|
790
|
+
fits: "image/fits",
|
|
791
|
+
g3: "image/g3fax",
|
|
792
|
+
gbr: "application/rpki-ghostbusters",
|
|
793
|
+
geojson: "application/geo+json",
|
|
794
|
+
gif: "image/gif",
|
|
795
|
+
glb: "model/gltf-binary",
|
|
796
|
+
gltf: "model/gltf+json",
|
|
797
|
+
gml: "application/gml+xml",
|
|
798
|
+
gpx: "application/gpx+xml",
|
|
799
|
+
gram: "application/srgs",
|
|
800
|
+
grxml: "application/srgs+xml",
|
|
801
|
+
gxf: "application/gxf",
|
|
802
|
+
gz: "application/gzip",
|
|
803
|
+
h261: "video/h261",
|
|
804
|
+
h263: "video/h263",
|
|
805
|
+
h264: "video/h264",
|
|
806
|
+
heic: "image/heic",
|
|
807
|
+
heics: "image/heic-sequence",
|
|
808
|
+
heif: "image/heif",
|
|
809
|
+
heifs: "image/heif-sequence",
|
|
810
|
+
hej2: "image/hej2k",
|
|
811
|
+
held: "application/atsc-held+xml",
|
|
812
|
+
hjson: "application/hjson",
|
|
813
|
+
hlp: "application/winhlp",
|
|
814
|
+
hqx: "application/mac-binhex40",
|
|
815
|
+
hsj2: "image/hsj2",
|
|
816
|
+
htm: "text/html",
|
|
817
|
+
html: "text/html",
|
|
818
|
+
ics: "text/calendar",
|
|
819
|
+
ief: "image/ief",
|
|
820
|
+
ifb: "text/calendar",
|
|
821
|
+
iges: "model/iges",
|
|
822
|
+
igs: "model/iges",
|
|
823
|
+
img: "application/octet-stream",
|
|
824
|
+
in: "text/plain",
|
|
825
|
+
ini: "text/plain",
|
|
826
|
+
ink: "application/inkml+xml",
|
|
827
|
+
inkml: "application/inkml+xml",
|
|
828
|
+
ipfix: "application/ipfix",
|
|
829
|
+
iso: "application/octet-stream",
|
|
830
|
+
its: "application/its+xml",
|
|
831
|
+
jade: "text/jade",
|
|
832
|
+
jar: "application/java-archive",
|
|
833
|
+
jhc: "image/jphc",
|
|
834
|
+
jls: "image/jls",
|
|
835
|
+
jp2: "image/jp2",
|
|
836
|
+
jpe: "image/jpeg",
|
|
837
|
+
jpeg: "image/jpeg",
|
|
838
|
+
jpf: "image/jpx",
|
|
839
|
+
jpg: "image/jpeg",
|
|
840
|
+
jpg2: "image/jp2",
|
|
841
|
+
jpgm: "image/jpm",
|
|
842
|
+
jpgv: "video/jpeg",
|
|
843
|
+
jph: "image/jph",
|
|
844
|
+
jpm: "image/jpm",
|
|
845
|
+
jpx: "image/jpx",
|
|
846
|
+
js: "text/javascript",
|
|
847
|
+
json: "application/json",
|
|
848
|
+
json5: "application/json5",
|
|
849
|
+
jsonld: "application/ld+json",
|
|
850
|
+
jsonml: "application/jsonml+json",
|
|
851
|
+
jsx: "text/jsx",
|
|
852
|
+
jt: "model/jt",
|
|
853
|
+
jxr: "image/jxr",
|
|
854
|
+
jxra: "image/jxra",
|
|
855
|
+
jxrs: "image/jxrs",
|
|
856
|
+
jxs: "image/jxs",
|
|
857
|
+
jxsc: "image/jxsc",
|
|
858
|
+
jxsi: "image/jxsi",
|
|
859
|
+
jxss: "image/jxss",
|
|
860
|
+
kar: "audio/midi",
|
|
861
|
+
ktx: "image/ktx",
|
|
862
|
+
ktx2: "image/ktx2",
|
|
863
|
+
less: "text/less",
|
|
864
|
+
lgr: "application/lgr+xml",
|
|
865
|
+
list: "text/plain",
|
|
866
|
+
litcoffee: "text/coffeescript",
|
|
867
|
+
log: "text/plain",
|
|
868
|
+
lostxml: "application/lost+xml",
|
|
869
|
+
lrf: "application/octet-stream",
|
|
870
|
+
m1v: "video/mpeg",
|
|
871
|
+
m21: "application/mp21",
|
|
872
|
+
m2a: "audio/mpeg",
|
|
873
|
+
m2v: "video/mpeg",
|
|
874
|
+
m3a: "audio/mpeg",
|
|
875
|
+
m4a: "audio/mp4",
|
|
876
|
+
m4p: "application/mp4",
|
|
877
|
+
m4s: "video/iso.segment",
|
|
878
|
+
ma: "application/mathematica",
|
|
879
|
+
mads: "application/mads+xml",
|
|
880
|
+
maei: "application/mmt-aei+xml",
|
|
881
|
+
man: "text/troff",
|
|
882
|
+
manifest: "text/cache-manifest",
|
|
883
|
+
map: "application/json",
|
|
884
|
+
mar: "application/octet-stream",
|
|
885
|
+
markdown: "text/markdown",
|
|
886
|
+
mathml: "application/mathml+xml",
|
|
887
|
+
mb: "application/mathematica",
|
|
888
|
+
mbox: "application/mbox",
|
|
889
|
+
md: "text/markdown",
|
|
890
|
+
mdx: "text/mdx",
|
|
891
|
+
me: "text/troff",
|
|
892
|
+
mesh: "model/mesh",
|
|
893
|
+
meta4: "application/metalink4+xml",
|
|
894
|
+
metalink: "application/metalink+xml",
|
|
895
|
+
mets: "application/mets+xml",
|
|
896
|
+
mft: "application/rpki-manifest",
|
|
897
|
+
mid: "audio/midi",
|
|
898
|
+
midi: "audio/midi",
|
|
899
|
+
mime: "message/rfc822",
|
|
900
|
+
mj2: "video/mj2",
|
|
901
|
+
mjp2: "video/mj2",
|
|
902
|
+
mjs: "text/javascript",
|
|
903
|
+
mml: "text/mathml",
|
|
904
|
+
mods: "application/mods+xml",
|
|
905
|
+
mov: "video/quicktime",
|
|
906
|
+
mp2: "audio/mpeg",
|
|
907
|
+
mp21: "application/mp21",
|
|
908
|
+
mp2a: "audio/mpeg",
|
|
909
|
+
mp3: "audio/mpeg",
|
|
910
|
+
mp4: "video/mp4",
|
|
911
|
+
mp4a: "audio/mp4",
|
|
912
|
+
mp4s: "application/mp4",
|
|
913
|
+
mp4v: "video/mp4",
|
|
914
|
+
mpd: "application/dash+xml",
|
|
915
|
+
mpe: "video/mpeg",
|
|
916
|
+
mpeg: "video/mpeg",
|
|
917
|
+
mpf: "application/media-policy-dataset+xml",
|
|
918
|
+
mpg: "video/mpeg",
|
|
919
|
+
mpg4: "video/mp4",
|
|
920
|
+
mpga: "audio/mpeg",
|
|
921
|
+
mpp: "application/dash-patch+xml",
|
|
922
|
+
mrc: "application/marc",
|
|
923
|
+
mrcx: "application/marcxml+xml",
|
|
924
|
+
ms: "text/troff",
|
|
925
|
+
mscml: "application/mediaservercontrol+xml",
|
|
926
|
+
msh: "model/mesh",
|
|
927
|
+
msi: "application/octet-stream",
|
|
928
|
+
msix: "application/msix",
|
|
929
|
+
msixbundle: "application/msixbundle",
|
|
930
|
+
msm: "application/octet-stream",
|
|
931
|
+
msp: "application/octet-stream",
|
|
932
|
+
mtl: "model/mtl",
|
|
933
|
+
musd: "application/mmt-usd+xml",
|
|
934
|
+
mxf: "application/mxf",
|
|
935
|
+
mxmf: "audio/mobile-xmf",
|
|
936
|
+
mxml: "application/xv+xml",
|
|
937
|
+
n3: "text/n3",
|
|
938
|
+
nb: "application/mathematica",
|
|
939
|
+
nq: "application/n-quads",
|
|
940
|
+
nt: "application/n-triples",
|
|
941
|
+
obj: "model/obj",
|
|
942
|
+
oda: "application/oda",
|
|
943
|
+
oga: "audio/ogg",
|
|
944
|
+
ogg: "audio/ogg",
|
|
945
|
+
ogv: "video/ogg",
|
|
946
|
+
ogx: "application/ogg",
|
|
947
|
+
omdoc: "application/omdoc+xml",
|
|
948
|
+
onepkg: "application/onenote",
|
|
949
|
+
onetmp: "application/onenote",
|
|
950
|
+
onetoc: "application/onenote",
|
|
951
|
+
onetoc2: "application/onenote",
|
|
952
|
+
opf: "application/oebps-package+xml",
|
|
953
|
+
opus: "audio/ogg",
|
|
954
|
+
otf: "font/otf",
|
|
955
|
+
owl: "application/rdf+xml",
|
|
956
|
+
oxps: "application/oxps",
|
|
957
|
+
p10: "application/pkcs10",
|
|
958
|
+
p7c: "application/pkcs7-mime",
|
|
959
|
+
p7m: "application/pkcs7-mime",
|
|
960
|
+
p7s: "application/pkcs7-signature",
|
|
961
|
+
p8: "application/pkcs8",
|
|
962
|
+
pdf: "application/pdf",
|
|
963
|
+
pfr: "application/font-tdpfr",
|
|
964
|
+
pgp: "application/pgp-encrypted",
|
|
965
|
+
pkg: "application/octet-stream",
|
|
966
|
+
pki: "application/pkixcmp",
|
|
967
|
+
pkipath: "application/pkix-pkipath",
|
|
968
|
+
pls: "application/pls+xml",
|
|
969
|
+
png: "image/png",
|
|
970
|
+
prc: "model/prc",
|
|
971
|
+
prf: "application/pics-rules",
|
|
972
|
+
provx: "application/provenance+xml",
|
|
973
|
+
ps: "application/postscript",
|
|
974
|
+
pskcxml: "application/pskc+xml",
|
|
975
|
+
pti: "image/prs.pti",
|
|
976
|
+
qt: "video/quicktime",
|
|
977
|
+
raml: "application/raml+yaml",
|
|
978
|
+
rapd: "application/route-apd+xml",
|
|
979
|
+
rdf: "application/rdf+xml",
|
|
980
|
+
relo: "application/p2p-overlay+xml",
|
|
981
|
+
rif: "application/reginfo+xml",
|
|
982
|
+
rl: "application/resource-lists+xml",
|
|
983
|
+
rld: "application/resource-lists-diff+xml",
|
|
984
|
+
rmi: "audio/midi",
|
|
985
|
+
rnc: "application/relax-ng-compact-syntax",
|
|
986
|
+
rng: "application/xml",
|
|
987
|
+
roa: "application/rpki-roa",
|
|
988
|
+
roff: "text/troff",
|
|
989
|
+
rq: "application/sparql-query",
|
|
990
|
+
rs: "application/rls-services+xml",
|
|
991
|
+
rsat: "application/atsc-rsat+xml",
|
|
992
|
+
rsd: "application/rsd+xml",
|
|
993
|
+
rsheet: "application/urc-ressheet+xml",
|
|
994
|
+
rss: "application/rss+xml",
|
|
995
|
+
rtf: "text/rtf",
|
|
996
|
+
rtx: "text/richtext",
|
|
997
|
+
rusd: "application/route-usd+xml",
|
|
998
|
+
s3m: "audio/s3m",
|
|
999
|
+
sbml: "application/sbml+xml",
|
|
1000
|
+
scq: "application/scvp-cv-request",
|
|
1001
|
+
scs: "application/scvp-cv-response",
|
|
1002
|
+
sdp: "application/sdp",
|
|
1003
|
+
senmlx: "application/senml+xml",
|
|
1004
|
+
sensmlx: "application/sensml+xml",
|
|
1005
|
+
ser: "application/java-serialized-object",
|
|
1006
|
+
setpay: "application/set-payment-initiation",
|
|
1007
|
+
setreg: "application/set-registration-initiation",
|
|
1008
|
+
sgi: "image/sgi",
|
|
1009
|
+
sgm: "text/sgml",
|
|
1010
|
+
sgml: "text/sgml",
|
|
1011
|
+
shex: "text/shex",
|
|
1012
|
+
shf: "application/shf+xml",
|
|
1013
|
+
shtml: "text/html",
|
|
1014
|
+
sieve: "application/sieve",
|
|
1015
|
+
sig: "application/pgp-signature",
|
|
1016
|
+
sil: "audio/silk",
|
|
1017
|
+
silo: "model/mesh",
|
|
1018
|
+
siv: "application/sieve",
|
|
1019
|
+
slim: "text/slim",
|
|
1020
|
+
slm: "text/slim",
|
|
1021
|
+
sls: "application/route-s-tsid+xml",
|
|
1022
|
+
smi: "application/smil+xml",
|
|
1023
|
+
smil: "application/smil+xml",
|
|
1024
|
+
snd: "audio/basic",
|
|
1025
|
+
so: "application/octet-stream",
|
|
1026
|
+
spdx: "text/spdx",
|
|
1027
|
+
spp: "application/scvp-vp-response",
|
|
1028
|
+
spq: "application/scvp-vp-request",
|
|
1029
|
+
spx: "audio/ogg",
|
|
1030
|
+
sql: "application/sql",
|
|
1031
|
+
sru: "application/sru+xml",
|
|
1032
|
+
srx: "application/sparql-results+xml",
|
|
1033
|
+
ssdl: "application/ssdl+xml",
|
|
1034
|
+
ssml: "application/ssml+xml",
|
|
1035
|
+
stk: "application/hyperstudio",
|
|
1036
|
+
stl: "model/stl",
|
|
1037
|
+
stpx: "model/step+xml",
|
|
1038
|
+
stpxz: "model/step-xml+zip",
|
|
1039
|
+
stpz: "model/step+zip",
|
|
1040
|
+
styl: "text/stylus",
|
|
1041
|
+
stylus: "text/stylus",
|
|
1042
|
+
svg: "image/svg+xml",
|
|
1043
|
+
svgz: "image/svg+xml",
|
|
1044
|
+
swidtag: "application/swid+xml",
|
|
1045
|
+
t: "text/troff",
|
|
1046
|
+
t38: "image/t38",
|
|
1047
|
+
td: "application/urc-targetdesc+xml",
|
|
1048
|
+
tei: "application/tei+xml",
|
|
1049
|
+
teicorpus: "application/tei+xml",
|
|
1050
|
+
text: "text/plain",
|
|
1051
|
+
tfi: "application/thraud+xml",
|
|
1052
|
+
tfx: "image/tiff-fx",
|
|
1053
|
+
tif: "image/tiff",
|
|
1054
|
+
tiff: "image/tiff",
|
|
1055
|
+
toml: "application/toml",
|
|
1056
|
+
tr: "text/troff",
|
|
1057
|
+
trig: "application/trig",
|
|
1058
|
+
ts: "video/mp2t",
|
|
1059
|
+
tsd: "application/timestamped-data",
|
|
1060
|
+
tsv: "text/tab-separated-values",
|
|
1061
|
+
ttc: "font/collection",
|
|
1062
|
+
ttf: "font/ttf",
|
|
1063
|
+
ttl: "text/turtle",
|
|
1064
|
+
ttml: "application/ttml+xml",
|
|
1065
|
+
txt: "text/plain",
|
|
1066
|
+
u3d: "model/u3d",
|
|
1067
|
+
u8dsn: "message/global-delivery-status",
|
|
1068
|
+
u8hdr: "message/global-headers",
|
|
1069
|
+
u8mdn: "message/global-disposition-notification",
|
|
1070
|
+
u8msg: "message/global",
|
|
1071
|
+
ubj: "application/ubjson",
|
|
1072
|
+
uri: "text/uri-list",
|
|
1073
|
+
uris: "text/uri-list",
|
|
1074
|
+
urls: "text/uri-list",
|
|
1075
|
+
vcard: "text/vcard",
|
|
1076
|
+
vrml: "model/vrml",
|
|
1077
|
+
vtt: "text/vtt",
|
|
1078
|
+
vxml: "application/voicexml+xml",
|
|
1079
|
+
war: "application/java-archive",
|
|
1080
|
+
wasm: "application/wasm",
|
|
1081
|
+
wav: "audio/wav",
|
|
1082
|
+
weba: "audio/webm",
|
|
1083
|
+
webm: "video/webm",
|
|
1084
|
+
webmanifest: "application/manifest+json",
|
|
1085
|
+
webp: "image/webp",
|
|
1086
|
+
wgsl: "text/wgsl",
|
|
1087
|
+
wgt: "application/widget",
|
|
1088
|
+
wif: "application/watcherinfo+xml",
|
|
1089
|
+
wmf: "image/wmf",
|
|
1090
|
+
woff: "font/woff",
|
|
1091
|
+
woff2: "font/woff2",
|
|
1092
|
+
wrl: "model/vrml",
|
|
1093
|
+
wsdl: "application/wsdl+xml",
|
|
1094
|
+
wspolicy: "application/wspolicy+xml",
|
|
1095
|
+
x3d: "model/x3d+xml",
|
|
1096
|
+
x3db: "model/x3d+fastinfoset",
|
|
1097
|
+
x3dbz: "model/x3d+binary",
|
|
1098
|
+
x3dv: "model/x3d-vrml",
|
|
1099
|
+
x3dvz: "model/x3d+vrml",
|
|
1100
|
+
x3dz: "model/x3d+xml",
|
|
1101
|
+
xaml: "application/xaml+xml",
|
|
1102
|
+
xav: "application/xcap-att+xml",
|
|
1103
|
+
xca: "application/xcap-caps+xml",
|
|
1104
|
+
xcs: "application/calendar+xml",
|
|
1105
|
+
xdf: "application/xcap-diff+xml",
|
|
1106
|
+
xdssc: "application/dssc+xml",
|
|
1107
|
+
xel: "application/xcap-el+xml",
|
|
1108
|
+
xenc: "application/xenc+xml",
|
|
1109
|
+
xer: "application/patch-ops-error+xml",
|
|
1110
|
+
xfdf: "application/xfdf",
|
|
1111
|
+
xht: "application/xhtml+xml",
|
|
1112
|
+
xhtml: "application/xhtml+xml",
|
|
1113
|
+
xhvml: "application/xv+xml",
|
|
1114
|
+
xlf: "application/xliff+xml",
|
|
1115
|
+
xm: "audio/xm",
|
|
1116
|
+
xml: "text/xml",
|
|
1117
|
+
xns: "application/xcap-ns+xml",
|
|
1118
|
+
xop: "application/xop+xml",
|
|
1119
|
+
xpl: "application/xproc+xml",
|
|
1120
|
+
xsd: "application/xml",
|
|
1121
|
+
xsf: "application/prs.xsf+xml",
|
|
1122
|
+
xsl: "application/xml",
|
|
1123
|
+
xslt: "application/xml",
|
|
1124
|
+
xspf: "application/xspf+xml",
|
|
1125
|
+
xvm: "application/xv+xml",
|
|
1126
|
+
xvml: "application/xv+xml",
|
|
1127
|
+
yaml: "text/yaml",
|
|
1128
|
+
yang: "application/yang",
|
|
1129
|
+
yin: "application/yin+xml",
|
|
1130
|
+
yml: "text/yaml",
|
|
1131
|
+
zip: "application/zip"
|
|
1132
|
+
};
|
|
1133
|
+
o(ei, "lookup");
|
|
1134
|
+
});
|
|
1135
|
+
|
|
1136
|
+
// ../node_modules/sirv/build.js
|
|
1137
|
+
var nt = A((Nr, at) => {
|
|
1138
|
+
var ie = S("fs"), { join: ti, normalize: ii, resolve: ri } = S("path"), { totalist: ai } = (Xe(), $(Ve)), { parse: ni } = (Ye(), $(Ze)), {
|
|
1139
|
+
lookup: oi } = (tt(), $(et)), si = /* @__PURE__ */ o(() => {
|
|
1140
|
+
}, "noop");
|
|
1141
|
+
function li(e, i) {
|
|
1142
|
+
for (let t = 0; t < i.length; t++)
|
|
1143
|
+
if (i[t].test(e)) return !0;
|
|
1144
|
+
}
|
|
1145
|
+
o(li, "isMatch");
|
|
1146
|
+
function it(e, i) {
|
|
1147
|
+
let t = 0, r, a = e.length - 1;
|
|
1148
|
+
e.charCodeAt(a) === 47 && (e = e.substring(0, a));
|
|
1149
|
+
let n = [], s = `${e}/index`;
|
|
1150
|
+
for (; t < i.length; t++)
|
|
1151
|
+
r = i[t] ? `.${i[t]}` : "", e && n.push(e + r), n.push(s + r);
|
|
1152
|
+
return n;
|
|
1153
|
+
}
|
|
1154
|
+
o(it, "toAssume");
|
|
1155
|
+
function ci(e, i, t) {
|
|
1156
|
+
let r = 0, a, n = it(i, t);
|
|
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;
|
|
1163
|
+
for (; a < n.length; a++)
|
|
1164
|
+
if (s = ii(ti(e, p = n[a])), s.startsWith(e) && ie.existsSync(s)) {
|
|
1165
|
+
if (c = ie.statSync(s), c.isDirectory()) continue;
|
|
1166
|
+
return l = rt(p, c, i), l["Cache-Control"] = i ? "no-cache" : "no-store", { abs: s, stats: c, headers: l };
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
o(pi, "viaLocal");
|
|
1170
|
+
function mi(e, i) {
|
|
1171
|
+
return i.statusCode = 404, i.end();
|
|
1172
|
+
}
|
|
1173
|
+
o(mi, "is404");
|
|
1174
|
+
function ui(e, i, t, r, a) {
|
|
1175
|
+
let n = 200, s, c = {};
|
|
1176
|
+
a = { ...a };
|
|
1177
|
+
for (let p in a)
|
|
1178
|
+
s = i.getHeader(p), s && (a[p] = s);
|
|
1179
|
+
if ((s = i.getHeader("content-type")) && (a["Content-Type"] = s), e.headers.range) {
|
|
1180
|
+
n = 206;
|
|
1181
|
+
let [p, l] = e.headers.range.replace("bytes=", "").split("-"), u = c.end = parseInt(l, 10) || r.size - 1, d = c.start = parseInt(p, 10) ||
|
|
1182
|
+
0;
|
|
1183
|
+
if (u >= r.size && (u = r.size - 1), d >= r.size)
|
|
1184
|
+
return i.setHeader("Content-Range", `bytes */${r.size}`), i.statusCode = 416, i.end();
|
|
1185
|
+
a["Content-Range"] = `bytes ${d}-${u}/${r.size}`, a["Content-Length"] = u - d + 1, a["Accept-Ranges"] = "bytes";
|
|
1186
|
+
}
|
|
1187
|
+
i.writeHead(n, a), ie.createReadStream(t, c).pipe(i);
|
|
1188
|
+
}
|
|
1189
|
+
o(ui, "send");
|
|
1190
|
+
var fi = {
|
|
1191
|
+
".br": "br",
|
|
1192
|
+
".gz": "gzip"
|
|
1193
|
+
};
|
|
1194
|
+
function rt(e, i, t) {
|
|
1195
|
+
let r = fi[e.slice(-3)], a = oi(e.slice(0, r && -3)) || "";
|
|
1196
|
+
a === "text/html" && (a += ";charset=utf-8");
|
|
1197
|
+
let n = {
|
|
1198
|
+
"Content-Length": i.size,
|
|
1199
|
+
"Content-Type": a,
|
|
1200
|
+
"Last-Modified": i.mtime.toUTCString()
|
|
1201
|
+
};
|
|
1202
|
+
return r && (n["Content-Encoding"] = r), t && (n.ETag = `W/"${i.size}-${i.mtime.getTime()}"`), n;
|
|
1203
|
+
}
|
|
1204
|
+
o(rt, "toHeaders");
|
|
1205
|
+
at.exports = function(e, i = {}) {
|
|
1206
|
+
e = ri(e || ".");
|
|
1207
|
+
let t = i.onNoMatch || mi, r = i.setHeaders || si, a = i.extensions || ["html", "htm"], n = i.gzip && a.map((m) => `${m}.gz`).concat("gz"),
|
|
1208
|
+
s = i.brotli && a.map((m) => `${m}.br`).concat("br"), c = {}, p = "/", l = !!i.etag, u = !!i.single;
|
|
1209
|
+
if (typeof i.single == "string") {
|
|
1210
|
+
let m = i.single.lastIndexOf(".");
|
|
1211
|
+
p += ~m ? i.single.substring(0, m) : i.single;
|
|
1212
|
+
}
|
|
1213
|
+
let d = [];
|
|
1214
|
+
i.ignores !== !1 && (d.push(/[/]([A-Za-z\s\d~$._-]+\.\w+){1,}$/), i.dotfiles ? d.push(/\/\.\w/) : d.push(/\/\.well-known/), [].concat(i.
|
|
1215
|
+
ignores || []).forEach((m) => {
|
|
1216
|
+
d.push(new RegExp(m, "i"));
|
|
1217
|
+
}));
|
|
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 || ai(e, (m, f, y) => {
|
|
1220
|
+
if (!/\.well-known[\\+\/]/.test(m)) {
|
|
1221
|
+
if (!i.dotfiles && /(^\.|[\\+|\/+]\.)/.test(m)) return;
|
|
1222
|
+
}
|
|
1223
|
+
let v = rt(m, y, l);
|
|
1224
|
+
x && (v["Cache-Control"] = x), c["/" + m.normalize().replace(/\\+/g, "/")] = { abs: f, stats: y, headers: v };
|
|
1225
|
+
});
|
|
1226
|
+
let g = i.dev ? pi.bind(0, e, l) : ci.bind(0, c);
|
|
1227
|
+
return function(m, f, y) {
|
|
1228
|
+
let v = [""], _ = ni(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(...a), _.indexOf("%") !== -1)
|
|
1230
|
+
try {
|
|
1231
|
+
_ = decodeURI(_);
|
|
1232
|
+
} catch {
|
|
1233
|
+
}
|
|
1234
|
+
let w = g(_, v) || u && !li(_, d) && g(p, v);
|
|
1235
|
+
if (!w) return y ? y() : t(m, f);
|
|
1236
|
+
if (l && m.headers["if-none-match"] === w.headers.ETag)
|
|
1237
|
+
return f.writeHead(304), f.end();
|
|
1238
|
+
(n || s) && f.setHeader("Vary", "Accept-Encoding"), r(f, _, w.stats), ui(m, f, w.abs, w.stats, w.headers);
|
|
1239
|
+
};
|
|
1240
|
+
};
|
|
1241
|
+
});
|
|
1242
|
+
|
|
1243
|
+
// ../node_modules/ejs/lib/utils.js
|
|
1244
|
+
var st = A((k) => {
|
|
1245
|
+
"use strict";
|
|
1246
|
+
var di = /[|\\{}()[\]^$+*?.]/g, gi = Object.prototype.hasOwnProperty, re = /* @__PURE__ */ o(function(e, i) {
|
|
1247
|
+
return gi.apply(e, [i]);
|
|
1248
|
+
}, "hasOwn");
|
|
1249
|
+
k.escapeRegExpChars = function(e) {
|
|
1250
|
+
return e ? String(e).replace(di, "\\$&") : "";
|
|
1251
|
+
};
|
|
1252
|
+
var xi = {
|
|
1253
|
+
"&": "&",
|
|
1254
|
+
"<": "<",
|
|
1255
|
+
">": ">",
|
|
1256
|
+
'"': """,
|
|
1257
|
+
"'": "'"
|
|
1258
|
+
}, hi = /[&<>'"]/g;
|
|
1259
|
+
function yi(e) {
|
|
1260
|
+
return xi[e] || e;
|
|
1261
|
+
}
|
|
1262
|
+
o(yi, "encode_char");
|
|
1263
|
+
var vi = `var _ENCODE_HTML_RULES = {
|
|
1264
|
+
"&": "&"
|
|
1265
|
+
, "<": "<"
|
|
1266
|
+
, ">": ">"
|
|
1267
|
+
, '"': """
|
|
1268
|
+
, "'": "'"
|
|
1269
|
+
}
|
|
1270
|
+
, _MATCH_HTML = /[&<>'"]/g;
|
|
1271
|
+
function encode_char(c) {
|
|
1272
|
+
return _ENCODE_HTML_RULES[c] || c;
|
|
1273
|
+
};
|
|
1274
|
+
`;
|
|
1275
|
+
k.escapeXML = function(e) {
|
|
1276
|
+
return e == null ? "" : String(e).replace(hi, yi);
|
|
1277
|
+
};
|
|
1278
|
+
function ot() {
|
|
1279
|
+
return Function.prototype.toString.call(this) + `;
|
|
1280
|
+
` + vi;
|
|
1281
|
+
}
|
|
1282
|
+
o(ot, "escapeXMLToString");
|
|
1283
|
+
try {
|
|
1284
|
+
typeof Object.defineProperty == "function" ? Object.defineProperty(k.escapeXML, "toString", { value: ot }) : k.escapeXML.toString = ot;
|
|
1285
|
+
} catch {
|
|
1286
|
+
console.warn("Unable to set escapeXML.toString (is the Function prototype frozen?)");
|
|
1287
|
+
}
|
|
1288
|
+
k.shallowCopy = function(e, i) {
|
|
1289
|
+
if (i = i || {}, e != null)
|
|
1290
|
+
for (var t in i)
|
|
1291
|
+
re(i, t) && (t === "__proto__" || t === "constructor" || (e[t] = i[t]));
|
|
1292
|
+
return e;
|
|
1293
|
+
};
|
|
1294
|
+
k.shallowCopyFromList = function(e, i, t) {
|
|
1295
|
+
if (t = t || [], i = i || {}, e != null)
|
|
1296
|
+
for (var r = 0; r < t.length; r++) {
|
|
1297
|
+
var a = t[r];
|
|
1298
|
+
if (typeof i[a] < "u") {
|
|
1299
|
+
if (!re(i, a) || a === "__proto__" || a === "constructor")
|
|
1300
|
+
continue;
|
|
1301
|
+
e[a] = i[a];
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
return e;
|
|
1305
|
+
};
|
|
1306
|
+
k.cache = {
|
|
1307
|
+
_data: {},
|
|
1308
|
+
set: /* @__PURE__ */ o(function(e, i) {
|
|
1309
|
+
this._data[e] = i;
|
|
1310
|
+
}, "set"),
|
|
1311
|
+
get: /* @__PURE__ */ o(function(e) {
|
|
1312
|
+
return this._data[e];
|
|
1313
|
+
}, "get"),
|
|
1314
|
+
remove: /* @__PURE__ */ o(function(e) {
|
|
1315
|
+
delete this._data[e];
|
|
1316
|
+
}, "remove"),
|
|
1317
|
+
reset: /* @__PURE__ */ o(function() {
|
|
1318
|
+
this._data = {};
|
|
1319
|
+
}, "reset")
|
|
1320
|
+
};
|
|
1321
|
+
k.hyphenToCamel = function(e) {
|
|
1322
|
+
return e.replace(/-[a-z]/g, function(i) {
|
|
1323
|
+
return i[1].toUpperCase();
|
|
1324
|
+
});
|
|
1325
|
+
};
|
|
1326
|
+
k.createNullProtoObjWherePossible = function() {
|
|
1327
|
+
return typeof Object.create == "function" ? function() {
|
|
1328
|
+
return /* @__PURE__ */ Object.create(null);
|
|
1329
|
+
} : { __proto__: null } instanceof Object ? function() {
|
|
1330
|
+
return {};
|
|
1331
|
+
} : function() {
|
|
1332
|
+
return { __proto__: null };
|
|
1333
|
+
};
|
|
1334
|
+
}();
|
|
1335
|
+
k.hasOwnOnlyObject = function(e) {
|
|
1336
|
+
var i = k.createNullProtoObjWherePossible();
|
|
1337
|
+
for (var t in e)
|
|
1338
|
+
re(e, t) && (i[t] = e[t]);
|
|
1339
|
+
return i;
|
|
1340
|
+
};
|
|
1341
|
+
});
|
|
1342
|
+
|
|
1343
|
+
// ../node_modules/ejs/package.json
|
|
1344
|
+
var lt = A((zr, wi) => {
|
|
1345
|
+
wi.exports = {
|
|
1346
|
+
name: "ejs",
|
|
1347
|
+
description: "Embedded JavaScript templates",
|
|
1348
|
+
keywords: [
|
|
1349
|
+
"template",
|
|
1350
|
+
"engine",
|
|
1351
|
+
"ejs"
|
|
1352
|
+
],
|
|
1353
|
+
version: "3.1.10",
|
|
1354
|
+
author: "Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)",
|
|
1355
|
+
license: "Apache-2.0",
|
|
1356
|
+
bin: {
|
|
1357
|
+
ejs: "./bin/cli.js"
|
|
1358
|
+
},
|
|
1359
|
+
main: "./lib/ejs.js",
|
|
1360
|
+
jsdelivr: "ejs.min.js",
|
|
1361
|
+
unpkg: "ejs.min.js",
|
|
1362
|
+
repository: {
|
|
1363
|
+
type: "git",
|
|
1364
|
+
url: "git://github.com/mde/ejs.git"
|
|
1365
|
+
},
|
|
1366
|
+
bugs: "https://github.com/mde/ejs/issues",
|
|
1367
|
+
homepage: "https://github.com/mde/ejs",
|
|
1368
|
+
dependencies: {
|
|
1369
|
+
jake: "^10.8.5"
|
|
1370
|
+
},
|
|
1371
|
+
devDependencies: {
|
|
1372
|
+
browserify: "^16.5.1",
|
|
1373
|
+
eslint: "^6.8.0",
|
|
1374
|
+
"git-directory-deploy": "^1.5.1",
|
|
1375
|
+
jsdoc: "^4.0.2",
|
|
1376
|
+
"lru-cache": "^4.0.1",
|
|
1377
|
+
mocha: "^10.2.0",
|
|
1378
|
+
"uglify-js": "^3.3.16"
|
|
1379
|
+
},
|
|
1380
|
+
engines: {
|
|
1381
|
+
node: ">=0.10.0"
|
|
1382
|
+
},
|
|
1383
|
+
scripts: {
|
|
1384
|
+
test: "npx jake test"
|
|
1385
|
+
}
|
|
1386
|
+
};
|
|
1387
|
+
});
|
|
1388
|
+
|
|
1389
|
+
// ../node_modules/ejs/lib/ejs.js
|
|
1390
|
+
var ht = A((h) => {
|
|
1391
|
+
"use strict";
|
|
1392
|
+
var ne = S("fs"), N = S("path"), b = st(), ct = !1, bi = lt().version, _i = "<", ji = ">", Oi = "%", gt = "locals", Ei = "ejs", Pi = "(<%%\
|
|
1393
|
+
|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)", xt = [
|
|
1394
|
+
"delimiter",
|
|
1395
|
+
"scope",
|
|
1396
|
+
"context",
|
|
1397
|
+
"debug",
|
|
1398
|
+
"compileDebug",
|
|
1399
|
+
"client",
|
|
1400
|
+
"_with",
|
|
1401
|
+
"rmWhitespace",
|
|
1402
|
+
"strict",
|
|
1403
|
+
"filename",
|
|
1404
|
+
"async"
|
|
1405
|
+
], Si = xt.concat("cache"), pt = /^\uFEFF/, ae = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
|
|
1406
|
+
h.cache = b.cache;
|
|
1407
|
+
h.fileLoader = ne.readFileSync;
|
|
1408
|
+
h.localsName = gt;
|
|
1409
|
+
h.promiseImpl = new Function("return this;")().Promise;
|
|
1410
|
+
h.resolveInclude = function(e, i, t) {
|
|
1411
|
+
var r = N.dirname, a = N.extname, n = N.resolve, s = n(t ? i : r(i), e), c = a(e);
|
|
1412
|
+
return c || (s += ".ejs"), s;
|
|
1413
|
+
};
|
|
1414
|
+
function mt(e, i) {
|
|
1415
|
+
var t;
|
|
1416
|
+
if (i.some(function(r) {
|
|
1417
|
+
return t = h.resolveInclude(e, r, !0), ne.existsSync(t);
|
|
1418
|
+
}))
|
|
1419
|
+
return t;
|
|
1420
|
+
}
|
|
1421
|
+
o(mt, "resolvePaths");
|
|
1422
|
+
function ki(e, i) {
|
|
1423
|
+
var t, r, a = i.views, n = /^[A-Za-z]+:\\|^\//.exec(e);
|
|
1424
|
+
if (n && n.length)
|
|
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 && (r = h.resolveInclude(e, i.filename), ne.existsSync(r) && (t = r)), !t && Array.isArray(a) && (t = mt(e, a)), !t &&
|
|
1427
|
+
typeof i.includer != "function")
|
|
1428
|
+
throw new Error('Could not find the include file "' + i.escapeFunction(e) + '"');
|
|
1429
|
+
return t;
|
|
1430
|
+
}
|
|
1431
|
+
o(ki, "getIncludePath");
|
|
1432
|
+
function D(e, i) {
|
|
1433
|
+
var t, r = e.filename, a = arguments.length > 1;
|
|
1434
|
+
if (e.cache) {
|
|
1435
|
+
if (!r)
|
|
1436
|
+
throw new Error("cache option requires a filename");
|
|
1437
|
+
if (t = h.cache.get(r), t)
|
|
1438
|
+
return t;
|
|
1439
|
+
a || (i = ut(r).toString().replace(pt, ""));
|
|
1440
|
+
} else if (!a) {
|
|
1441
|
+
if (!r)
|
|
1442
|
+
throw new Error("Internal EJS error: no file name or template provided");
|
|
1443
|
+
i = ut(r).toString().replace(pt, "");
|
|
1444
|
+
}
|
|
1445
|
+
return t = h.compile(i, e), e.cache && h.cache.set(r, t), t;
|
|
1446
|
+
}
|
|
1447
|
+
o(D, "handleCache");
|
|
1448
|
+
function Ti(e, i, t) {
|
|
1449
|
+
var r;
|
|
1450
|
+
if (t) {
|
|
1451
|
+
try {
|
|
1452
|
+
r = D(e)(i);
|
|
1453
|
+
} catch (a) {
|
|
1454
|
+
return t(a);
|
|
1455
|
+
}
|
|
1456
|
+
t(null, r);
|
|
1457
|
+
} else {
|
|
1458
|
+
if (typeof h.promiseImpl == "function")
|
|
1459
|
+
return new h.promiseImpl(function(a, n) {
|
|
1460
|
+
try {
|
|
1461
|
+
r = D(e)(i), a(r);
|
|
1462
|
+
} catch (s) {
|
|
1463
|
+
n(s);
|
|
1464
|
+
}
|
|
1465
|
+
});
|
|
1466
|
+
throw new Error("Please provide a callback function");
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
o(Ti, "tryHandleCache");
|
|
1470
|
+
function ut(e) {
|
|
1471
|
+
return h.fileLoader(e);
|
|
1472
|
+
}
|
|
1473
|
+
o(ut, "fileLoader");
|
|
1474
|
+
function Fi(e, i) {
|
|
1475
|
+
var t = b.shallowCopy(b.createNullProtoObjWherePossible(), i);
|
|
1476
|
+
if (t.filename = ki(e, t), typeof i.includer == "function") {
|
|
1477
|
+
var r = i.includer(e, t.filename);
|
|
1478
|
+
if (r && (r.filename && (t.filename = r.filename), r.template))
|
|
1479
|
+
return D(t, r.template);
|
|
1480
|
+
}
|
|
1481
|
+
return D(t);
|
|
1482
|
+
}
|
|
1483
|
+
o(Fi, "includeFile");
|
|
1484
|
+
function ft(e, i, t, r, a) {
|
|
1485
|
+
var n = i.split(`
|
|
1486
|
+
`), s = Math.max(r - 3, 0), c = Math.min(n.length, r + 3), p = a(t), l = n.slice(s, c).map(function(u, d) {
|
|
1487
|
+
var x = d + s + 1;
|
|
1488
|
+
return (x == r ? " >> " : " ") + x + "| " + u;
|
|
1489
|
+
}).join(`
|
|
1490
|
+
`);
|
|
1491
|
+
throw e.path = p, e.message = (p || "ejs") + ":" + r + `
|
|
1492
|
+
` + l + `
|
|
1493
|
+
|
|
1494
|
+
` + e.message, e;
|
|
1495
|
+
}
|
|
1496
|
+
o(ft, "rethrow");
|
|
1497
|
+
function dt(e) {
|
|
1498
|
+
return e.replace(/;(\s*$)/, "$1");
|
|
1499
|
+
}
|
|
1500
|
+
o(dt, "stripSemi");
|
|
1501
|
+
h.compile = /* @__PURE__ */ o(function(i, t) {
|
|
1502
|
+
var r;
|
|
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), r = new j(i, t), r.compile();
|
|
1505
|
+
}, "compile");
|
|
1506
|
+
h.render = function(e, i, t) {
|
|
1507
|
+
var r = i || b.createNullProtoObjWherePossible(), a = t || b.createNullProtoObjWherePossible();
|
|
1508
|
+
return arguments.length == 2 && b.shallowCopyFromList(a, r, xt), D(a, e)(r);
|
|
1509
|
+
};
|
|
1510
|
+
h.renderFile = function() {
|
|
1511
|
+
var e = Array.prototype.slice.call(arguments), i = e.shift(), t, r = { filename: i }, a, n;
|
|
1512
|
+
return typeof arguments[arguments.length - 1] == "function" && (t = e.pop()), e.length ? (a = e.shift(), e.length ? b.shallowCopy(r, e.pop()) :
|
|
1513
|
+
(a.settings && (a.settings.views && (r.views = a.settings.views), a.settings["view cache"] && (r.cache = !0), n = a.settings["view optio\
|
|
1514
|
+
ns"], n && b.shallowCopy(r, n)), b.shallowCopyFromList(r, a, Si)), r.filename = i) : a = b.createNullProtoObjWherePossible(), Ti(r, a, t);
|
|
1515
|
+
};
|
|
1516
|
+
h.Template = j;
|
|
1517
|
+
h.clearCache = function() {
|
|
1518
|
+
h.cache.reset();
|
|
1519
|
+
};
|
|
1520
|
+
function j(e, i) {
|
|
1521
|
+
var t = b.hasOwnOnlyObject(i), r = b.createNullProtoObjWherePossible();
|
|
1522
|
+
this.templateText = e, this.mode = null, this.truncate = !1, this.currentLine = 1, this.source = "", r.client = t.client || !1, r.escapeFunction =
|
|
1523
|
+
t.escape || t.escapeFunction || b.escapeXML, r.compileDebug = t.compileDebug !== !1, r.debug = !!t.debug, r.filename = t.filename, r.openDelimiter =
|
|
1524
|
+
t.openDelimiter || h.openDelimiter || _i, r.closeDelimiter = t.closeDelimiter || h.closeDelimiter || ji, r.delimiter = t.delimiter || h.
|
|
1525
|
+
delimiter || Oi, r.strict = t.strict || !1, r.context = t.context, r.cache = t.cache || !1, r.rmWhitespace = t.rmWhitespace, r.root = t.
|
|
1526
|
+
root, r.includer = t.includer, r.outputFunctionName = t.outputFunctionName, r.localsName = t.localsName || h.localsName || gt, r.views =
|
|
1527
|
+
t.views, r.async = t.async, r.destructuredLocals = t.destructuredLocals, r.legacyInclude = typeof t.legacyInclude < "u" ? !!t.legacyInclude :
|
|
1528
|
+
!0, r.strict ? r._with = !1 : r._with = typeof t._with < "u" ? t._with : !0, this.opts = r, this.regex = this.createRegex();
|
|
1529
|
+
}
|
|
1530
|
+
o(j, "Template");
|
|
1531
|
+
j.modes = {
|
|
1532
|
+
EVAL: "eval",
|
|
1533
|
+
ESCAPED: "escaped",
|
|
1534
|
+
RAW: "raw",
|
|
1535
|
+
COMMENT: "comment",
|
|
1536
|
+
LITERAL: "literal"
|
|
1537
|
+
};
|
|
1538
|
+
j.prototype = {
|
|
1539
|
+
createRegex: /* @__PURE__ */ o(function() {
|
|
1540
|
+
var e = Pi, i = b.escapeRegExpChars(this.opts.delimiter), t = b.escapeRegExpChars(this.opts.openDelimiter), r = b.escapeRegExpChars(this.
|
|
1541
|
+
opts.closeDelimiter);
|
|
1542
|
+
return e = e.replace(/%/g, i).replace(/</g, t).replace(/>/g, r), new RegExp(e);
|
|
1543
|
+
}, "createRegex"),
|
|
1544
|
+
compile: /* @__PURE__ */ o(function() {
|
|
1545
|
+
var e, i, t = this.opts, r = "", a = "", n = t.escapeFunction, s, c = t.filename ? JSON.stringify(t.filename) : "undefined";
|
|
1546
|
+
if (!this.source) {
|
|
1547
|
+
if (this.generateSource(), r += ` var __output = "";
|
|
1548
|
+
function __append(s) { if (s !== undefined && s !== null) __output += s }
|
|
1549
|
+
`, t.outputFunctionName) {
|
|
1550
|
+
if (!ae.test(t.outputFunctionName))
|
|
1551
|
+
throw new Error("outputFunctionName is not a valid JS identifier.");
|
|
1552
|
+
r += " var " + t.outputFunctionName + ` = __append;
|
|
1553
|
+
`;
|
|
1554
|
+
}
|
|
1555
|
+
if (t.localsName && !ae.test(t.localsName))
|
|
1556
|
+
throw new Error("localsName is not a valid JS identifier.");
|
|
1557
|
+
if (t.destructuredLocals && t.destructuredLocals.length) {
|
|
1558
|
+
for (var p = " var __locals = (" + t.localsName + ` || {}),
|
|
1559
|
+
`, l = 0; l < t.destructuredLocals.length; l++) {
|
|
1560
|
+
var u = t.destructuredLocals[l];
|
|
1561
|
+
if (!ae.test(u))
|
|
1562
|
+
throw new Error("destructuredLocals[" + l + "] is not a valid JS identifier.");
|
|
1563
|
+
l > 0 && (p += `,
|
|
1564
|
+
`), p += u + " = __locals." + u;
|
|
1565
|
+
}
|
|
1566
|
+
r += p + `;
|
|
1567
|
+
`;
|
|
1568
|
+
}
|
|
1569
|
+
t._with !== !1 && (r += " with (" + t.localsName + ` || {}) {
|
|
1570
|
+
`, a += ` }
|
|
1571
|
+
`), a += ` return __output;
|
|
1572
|
+
`, this.source = r + this.source + a;
|
|
1573
|
+
}
|
|
1574
|
+
t.compileDebug ? e = `var __line = 1
|
|
1575
|
+
, __lines = ` + JSON.stringify(this.templateText) + `
|
|
1576
|
+
, __filename = ` + c + `;
|
|
1577
|
+
try {
|
|
1578
|
+
` + this.source + `} catch (e) {
|
|
1579
|
+
rethrow(e, __lines, __filename, __line, escapeFn);
|
|
1580
|
+
}
|
|
1581
|
+
` : e = this.source, t.client && (e = "escapeFn = escapeFn || " + n.toString() + `;
|
|
1582
|
+
` + e, t.compileDebug && (e = "rethrow = rethrow || " + ft.toString() + `;
|
|
1583
|
+
` + e)), t.strict && (e = `"use strict";
|
|
1584
|
+
` + e), t.debug && console.log(e), t.compileDebug && t.filename && (e = e + `
|
|
1585
|
+
//# sourceURL=` + c + `
|
|
1586
|
+
`);
|
|
1587
|
+
try {
|
|
1588
|
+
if (t.async)
|
|
1589
|
+
try {
|
|
1590
|
+
s = new Function("return (async function(){}).constructor;")();
|
|
1591
|
+
} catch (m) {
|
|
1592
|
+
throw m instanceof SyntaxError ? new Error("This environment does not support async/await") : m;
|
|
1593
|
+
}
|
|
1594
|
+
else
|
|
1595
|
+
s = Function;
|
|
1596
|
+
i = new s(t.localsName + ", escapeFn, include, rethrow", e);
|
|
1597
|
+
} catch (m) {
|
|
1598
|
+
throw m instanceof SyntaxError && (t.filename && (m.message += " in " + t.filename), m.message += ` while compiling ejs
|
|
1599
|
+
|
|
1600
|
+
`, m.message += `If the above error is not helpful, you may want to try EJS-Lint:
|
|
1601
|
+
`, m.message += "https://github.com/RyanZim/EJS-Lint", t.async || (m.message += `
|
|
1602
|
+
`, m.message += "Or, if you meant to create an async function, pass `async: true` as an option.")), m;
|
|
1603
|
+
}
|
|
1604
|
+
var d = t.client ? i : /* @__PURE__ */ o(function(f) {
|
|
1605
|
+
var y = /* @__PURE__ */ o(function(v, _) {
|
|
1606
|
+
var O = b.shallowCopy(b.createNullProtoObjWherePossible(), f);
|
|
1607
|
+
return _ && (O = b.shallowCopy(O, _)), Fi(v, t)(O);
|
|
1608
|
+
}, "include");
|
|
1609
|
+
return i.apply(
|
|
1610
|
+
t.context,
|
|
1611
|
+
[f || b.createNullProtoObjWherePossible(), n, y, ft]
|
|
1612
|
+
);
|
|
1613
|
+
}, "anonymous");
|
|
1614
|
+
if (t.filename && typeof Object.defineProperty == "function") {
|
|
1615
|
+
var x = t.filename, g = N.basename(x, N.extname(x));
|
|
1616
|
+
try {
|
|
1617
|
+
Object.defineProperty(d, "name", {
|
|
1618
|
+
value: g,
|
|
1619
|
+
writable: !1,
|
|
1620
|
+
enumerable: !1,
|
|
1621
|
+
configurable: !0
|
|
1622
|
+
});
|
|
1623
|
+
} catch {
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
return d;
|
|
1627
|
+
}, "compile"),
|
|
1628
|
+
generateSource: /* @__PURE__ */ o(function() {
|
|
1629
|
+
var e = this.opts;
|
|
1630
|
+
e.rmWhitespace && (this.templateText = this.templateText.replace(/[\r\n]+/g, `
|
|
1631
|
+
`).replace(/^\s+|\s+$/gm, "")), this.templateText = this.templateText.replace(/[ \t]*<%_/gm, "<%_").replace(/_%>[ \t]*/gm, "_%>");
|
|
1632
|
+
var i = this, t = this.parseTemplateText(), r = this.opts.delimiter, a = this.opts.openDelimiter, n = this.opts.closeDelimiter;
|
|
1633
|
+
t && t.length && t.forEach(function(s, c) {
|
|
1634
|
+
var p;
|
|
1635
|
+
if (s.indexOf(a + r) === 0 && s.indexOf(a + r + r) !== 0 && (p = t[c + 2], !(p == r + n || p == "-" + r + n || p == "_" + r + n)))
|
|
1636
|
+
throw new Error('Could not find matching close tag for "' + s + '".');
|
|
1637
|
+
i.scanLine(s);
|
|
1638
|
+
});
|
|
1639
|
+
}, "generateSource"),
|
|
1640
|
+
parseTemplateText: /* @__PURE__ */ o(function() {
|
|
1641
|
+
for (var e = this.templateText, i = this.regex, t = i.exec(e), r = [], a; t; )
|
|
1642
|
+
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);
|
|
1643
|
+
return e && r.push(e), r;
|
|
1644
|
+
}, "parseTemplateText"),
|
|
1645
|
+
_addOutput: /* @__PURE__ */ o(function(e) {
|
|
1646
|
+
if (this.truncate && (e = e.replace(/^(?:\r\n|\r|\n)/, ""), this.truncate = !1), !e)
|
|
1647
|
+
return e;
|
|
1648
|
+
e = e.replace(/\\/g, "\\\\"), e = e.replace(/\n/g, "\\n"), e = e.replace(/\r/g, "\\r"), e = e.replace(/"/g, '\\"'), this.source += ' \
|
|
1649
|
+
; __append("' + e + `")
|
|
1650
|
+
`;
|
|
1651
|
+
}, "_addOutput"),
|
|
1652
|
+
scanLine: /* @__PURE__ */ o(function(e) {
|
|
1653
|
+
var i = this, t = this.opts.delimiter, r = this.opts.openDelimiter, a = this.opts.closeDelimiter, n = 0;
|
|
1654
|
+
switch (n = e.split(`
|
|
1655
|
+
`).length - 1, e) {
|
|
1656
|
+
case r + t:
|
|
1657
|
+
case r + t + "_":
|
|
1658
|
+
this.mode = j.modes.EVAL;
|
|
1659
|
+
break;
|
|
1660
|
+
case r + t + "=":
|
|
1661
|
+
this.mode = j.modes.ESCAPED;
|
|
1662
|
+
break;
|
|
1663
|
+
case r + t + "-":
|
|
1664
|
+
this.mode = j.modes.RAW;
|
|
1665
|
+
break;
|
|
1666
|
+
case r + t + "#":
|
|
1667
|
+
this.mode = j.modes.COMMENT;
|
|
1668
|
+
break;
|
|
1669
|
+
case r + t + t:
|
|
1670
|
+
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(r + t + t, r + t) + `")
|
|
1671
|
+
`;
|
|
1672
|
+
break;
|
|
1673
|
+
case t + t + a:
|
|
1674
|
+
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(t + t + a, t + a) + `")
|
|
1675
|
+
`;
|
|
1676
|
+
break;
|
|
1677
|
+
case t + a:
|
|
1678
|
+
case "-" + t + a:
|
|
1679
|
+
case "_" + t + a:
|
|
1680
|
+
this.mode == j.modes.LITERAL && this._addOutput(e), this.mode = null, this.truncate = e.indexOf("-") === 0 || e.indexOf("_") === 0;
|
|
1681
|
+
break;
|
|
1682
|
+
default:
|
|
1683
|
+
if (this.mode) {
|
|
1684
|
+
switch (this.mode) {
|
|
1685
|
+
case j.modes.EVAL:
|
|
1686
|
+
case j.modes.ESCAPED:
|
|
1687
|
+
case j.modes.RAW:
|
|
1688
|
+
e.lastIndexOf("//") > e.lastIndexOf(`
|
|
1689
|
+
`) && (e += `
|
|
1690
|
+
`);
|
|
1691
|
+
}
|
|
1692
|
+
switch (this.mode) {
|
|
1693
|
+
// Just executing code
|
|
1694
|
+
case j.modes.EVAL:
|
|
1695
|
+
this.source += " ; " + e + `
|
|
1696
|
+
`;
|
|
1697
|
+
break;
|
|
1698
|
+
// Exec, esc, and output
|
|
1699
|
+
case j.modes.ESCAPED:
|
|
1700
|
+
this.source += " ; __append(escapeFn(" + dt(e) + `))
|
|
1701
|
+
`;
|
|
1702
|
+
break;
|
|
1703
|
+
// Exec and output
|
|
1704
|
+
case j.modes.RAW:
|
|
1705
|
+
this.source += " ; __append(" + dt(e) + `)
|
|
1706
|
+
`;
|
|
1707
|
+
break;
|
|
1708
|
+
case j.modes.COMMENT:
|
|
1709
|
+
break;
|
|
1710
|
+
// Literal <%% mode, append as raw output
|
|
1711
|
+
case j.modes.LITERAL:
|
|
1712
|
+
this._addOutput(e);
|
|
1713
|
+
break;
|
|
1714
|
+
}
|
|
1715
|
+
} else
|
|
1716
|
+
this._addOutput(e);
|
|
1717
|
+
}
|
|
1718
|
+
i.opts.compileDebug && n && (this.currentLine += n, this.source += " ; __line = " + this.currentLine + `
|
|
1719
|
+
`);
|
|
1720
|
+
}, "scanLine")
|
|
1721
|
+
};
|
|
1722
|
+
h.escapeXML = b.escapeXML;
|
|
1723
|
+
h.__express = h.renderFile;
|
|
1724
|
+
h.VERSION = bi;
|
|
1725
|
+
h.name = Ei;
|
|
1726
|
+
typeof window < "u" && (window.ejs = h);
|
|
1727
|
+
});
|
|
1728
|
+
|
|
1729
|
+
// src/builder-manager/index.ts
|
|
1730
|
+
import { cp as ir, rm as rr, writeFile as ar } from "node:fs/promises";
|
|
1731
|
+
import { dirname as Tt, join as R, parse as nr } from "node:path";
|
|
1732
|
+
import { stringifyProcessEnvs as or } from "storybook/internal/common";
|
|
1733
|
+
import { globalsModuleInfoMap as sr } from "storybook/internal/manager/globals-module-info";
|
|
1734
|
+
import { logger as me } from "storybook/internal/node-logger";
|
|
1735
|
+
|
|
1736
|
+
// ../node_modules/@fal-works/esbuild-plugin-global-externals/lib/module-info.js
|
|
1737
|
+
var de = /* @__PURE__ */ o((e) => {
|
|
1738
|
+
let {
|
|
1739
|
+
type: i = "esm",
|
|
1740
|
+
varName: t,
|
|
1741
|
+
namedExports: r = null,
|
|
1742
|
+
defaultExport: a = !0
|
|
1743
|
+
} = typeof e == "string" ? { varName: e } : e;
|
|
1744
|
+
return { type: i, varName: t, namedExports: r, defaultExport: a };
|
|
1745
|
+
}, "normalizeModuleInfo");
|
|
1746
|
+
|
|
1747
|
+
// ../node_modules/@fal-works/esbuild-plugin-global-externals/lib/on-load.js
|
|
1748
|
+
var Dt = /* @__PURE__ */ o((e) => `module.exports = ${e};`, "createCjsContents");
|
|
1749
|
+
var It = /* @__PURE__ */ o((e, i, t) => {
|
|
1750
|
+
let r = t ? [`export default ${e};`] : [];
|
|
1751
|
+
if (i && i.length) {
|
|
1752
|
+
let a = [...new Set(i)].join(", ");
|
|
1753
|
+
r.push(`const { ${a} } = ${e};`), r.push(`export { ${a} };`);
|
|
1754
|
+
}
|
|
1755
|
+
return r.join(`
|
|
1756
|
+
`);
|
|
1757
|
+
}, "createEsmContents"), ge = /* @__PURE__ */ o((e) => {
|
|
1758
|
+
let { type: i, varName: t, namedExports: r, defaultExport: a } = e;
|
|
1759
|
+
switch (i) {
|
|
1760
|
+
case "esm":
|
|
1761
|
+
return It(t, r, a);
|
|
1762
|
+
case "cjs":
|
|
1763
|
+
return Dt(t);
|
|
1764
|
+
}
|
|
1765
|
+
}, "createContents");
|
|
1766
|
+
|
|
1767
|
+
// ../node_modules/@fal-works/esbuild-plugin-global-externals/lib/with-reg-exp.js
|
|
1768
|
+
var X = "global-externals", K = /* @__PURE__ */ o((e) => {
|
|
1769
|
+
let { modulePathFilter: i, getModuleInfo: t } = e;
|
|
1770
|
+
return {
|
|
1771
|
+
name: X,
|
|
1772
|
+
setup(r) {
|
|
1773
|
+
r.onResolve({ filter: i }, (a) => ({
|
|
1774
|
+
path: a.path,
|
|
1775
|
+
namespace: X
|
|
1776
|
+
})), r.onLoad({ filter: /.*/, namespace: X }, (a) => {
|
|
1777
|
+
let n = a.path, s = de(t(n));
|
|
1778
|
+
return { contents: ge(s) };
|
|
1779
|
+
});
|
|
1780
|
+
}
|
|
1781
|
+
};
|
|
1782
|
+
}, "globalExternalsWithRegExp");
|
|
1783
|
+
|
|
1784
|
+
// ../node_modules/@fal-works/esbuild-plugin-global-externals/lib/with-object.js
|
|
1785
|
+
var Z = /* @__PURE__ */ o((e) => {
|
|
1786
|
+
let i = {
|
|
1787
|
+
modulePathFilter: new RegExp(`^(?:${Object.keys(e).join("|")})$`),
|
|
1788
|
+
getModuleInfo: /* @__PURE__ */ o((t) => e[t], "getModuleInfo")
|
|
1789
|
+
};
|
|
1790
|
+
return K(i);
|
|
1791
|
+
}, "globalExternals");
|
|
1792
|
+
|
|
1793
|
+
// src/builder-manager/index.ts
|
|
1794
|
+
var Ft = V(Ue(), 1), ue = V(nt(), 1);
|
|
1795
|
+
|
|
1796
|
+
// src/builder-manager/utils/data.ts
|
|
1797
|
+
import { basename as Ai } from "node:path";
|
|
1798
|
+
import { getRefs as Ni } from "storybook/internal/common";
|
|
1799
|
+
|
|
1800
|
+
// src/builder-manager/utils/template.ts
|
|
1801
|
+
var yt = V(ht(), 1);
|
|
1802
|
+
import { readFile as Ri } from "node:fs/promises";
|
|
1803
|
+
import { dirname as Li, join as Ci } from "node:path";
|
|
1804
|
+
var oe = /* @__PURE__ */ o(async (e) => Ci(Li(S.resolve("storybook/package.json")), "assets/server", e), "getTemplatePath"), vt = /* @__PURE__ */ o(
|
|
1805
|
+
async (e) => {
|
|
1806
|
+
let i = await oe(e);
|
|
1807
|
+
return Ri(i, { encoding: "utf8" });
|
|
1808
|
+
}, "readTemplate");
|
|
1809
|
+
var se = /* @__PURE__ */ o(async (e, i, t, r, a, n, s, c, p, l, u, { versionCheck: d, previewUrl: x, configType: g, ignorePreview: m }, f) => {
|
|
1810
|
+
let y = await i, v = await e, _ = Object.entries(f).reduce(
|
|
1811
|
+
(O, [w, E]) => ({ ...O, [w]: JSON.stringify(E) }),
|
|
1812
|
+
{}
|
|
1813
|
+
);
|
|
1814
|
+
return (0, yt.render)(v, {
|
|
1815
|
+
title: y ? `${y} - Storybook` : "Storybook",
|
|
1816
|
+
files: { js: n, css: a },
|
|
1817
|
+
favicon: await t,
|
|
1818
|
+
globals: {
|
|
1819
|
+
FEATURES: JSON.stringify(await s, null, 2),
|
|
1820
|
+
REFS: JSON.stringify(await c, null, 2),
|
|
1821
|
+
LOGLEVEL: JSON.stringify(await p, null, 2),
|
|
1822
|
+
DOCS_OPTIONS: JSON.stringify(await l, null, 2),
|
|
1823
|
+
CONFIG_TYPE: JSON.stringify(await g, null, 2),
|
|
1824
|
+
// These two need to be double stringified because the UI expects a string
|
|
1825
|
+
VERSIONCHECK: JSON.stringify(JSON.stringify(d), null, 2),
|
|
1826
|
+
PREVIEW_URL: JSON.stringify(x, null, 2),
|
|
1827
|
+
// global preview URL
|
|
1828
|
+
TAGS_OPTIONS: JSON.stringify(await u, null, 2),
|
|
1829
|
+
..._
|
|
1830
|
+
},
|
|
1831
|
+
head: await r || "",
|
|
1832
|
+
ignorePreview: m
|
|
1833
|
+
});
|
|
1834
|
+
}, "renderHTML");
|
|
1835
|
+
|
|
1836
|
+
// src/builder-manager/utils/data.ts
|
|
1837
|
+
var le = /* @__PURE__ */ o(async (e) => {
|
|
1838
|
+
let i = Ni(e), t = e.presets.apply("favicon").then((x) => Ai(x)), r = e.presets.apply("features"), a = e.presets.apply("logLevel"), n = e.
|
|
1839
|
+
presets.apply("title"), s = e.presets.apply("docs", {}), c = e.presets.apply("tags", {}), p = vt("template.ejs"), l = e.presets.apply("man\
|
|
1840
|
+
agerHead"), [u, d] = await Promise.all([
|
|
1841
|
+
//
|
|
1842
|
+
bt.get(),
|
|
1843
|
+
wt(e)
|
|
1844
|
+
]);
|
|
1845
|
+
return {
|
|
1846
|
+
refs: i,
|
|
1847
|
+
features: r,
|
|
1848
|
+
title: n,
|
|
1849
|
+
docsOptions: s,
|
|
1850
|
+
template: p,
|
|
1851
|
+
customHead: l,
|
|
1852
|
+
instance: u,
|
|
1853
|
+
config: d,
|
|
1854
|
+
logLevel: a,
|
|
1855
|
+
favicon: t,
|
|
1856
|
+
tagsOptions: c
|
|
1857
|
+
};
|
|
1858
|
+
}, "getData");
|
|
1859
|
+
|
|
1860
|
+
// src/builder-manager/utils/files.ts
|
|
1861
|
+
import { existsSync as Di } from "node:fs";
|
|
1862
|
+
import { mkdir as Ii, writeFile as Mi } from "node:fs/promises";
|
|
1863
|
+
import { dirname as zi, join as qi, normalize as $i } from "node:path";
|
|
1864
|
+
|
|
1865
|
+
// ../node_modules/slash/index.js
|
|
1866
|
+
function I(e) {
|
|
1867
|
+
return e.startsWith("\\\\?\\") ? e : e.replace(/\\/g, "/");
|
|
1868
|
+
}
|
|
1869
|
+
o(I, "slash");
|
|
1870
|
+
|
|
1871
|
+
// src/builder-manager/utils/files.ts
|
|
1872
|
+
async function ce(e, i) {
|
|
1873
|
+
let t = await Promise.all(
|
|
1874
|
+
i?.map(async (n) => {
|
|
1875
|
+
let { location: s, url: c } = Wi(n, e);
|
|
1876
|
+
if (!Di(s)) {
|
|
1877
|
+
let p = zi(s);
|
|
1878
|
+
await Ii(p, { recursive: !0 });
|
|
1879
|
+
}
|
|
1880
|
+
return await Mi(s, n.contents), c;
|
|
1881
|
+
}) || []
|
|
1882
|
+
), r = t.filter((n) => n.endsWith(".js"));
|
|
1883
|
+
return { cssFiles: t.filter((n) => n.endsWith(".css")), jsFiles: r };
|
|
1884
|
+
}
|
|
1885
|
+
o(ce, "readOrderedFiles");
|
|
1886
|
+
function Wi(e, i) {
|
|
1887
|
+
let t = e.path.replace(i, ""), r = $i(qi(i, t)), a = `./sb-addons${I(t).split("/").map(encodeURIComponent).join("/")}`;
|
|
1888
|
+
return { location: r, url: a };
|
|
1889
|
+
}
|
|
1890
|
+
o(Wi, "sanitizePath");
|
|
1891
|
+
|
|
1892
|
+
// src/builder-manager/utils/framework.ts
|
|
1893
|
+
import { sep as Hi } from "node:path";
|
|
1894
|
+
import {
|
|
1895
|
+
extractProperRendererNameFromFramework as _t,
|
|
1896
|
+
getFrameworkName as Bi
|
|
1897
|
+
} from "storybook/internal/common";
|
|
1898
|
+
var jt = /* @__PURE__ */ o((e) => {
|
|
1899
|
+
if (e)
|
|
1900
|
+
return typeof e == "string" ? e : e.name;
|
|
1901
|
+
}, "pluckNameFromConfigProperty"), Ot = /* @__PURE__ */ o((e) => e.replaceAll(Hi, "/"), "normalizePath"), Ji = /* @__PURE__ */ o((e) => Ot(e).
|
|
1902
|
+
match(/(@storybook\/.*)$/)?.[1], "pluckStorybookPackageFromPath"), Ui = /* @__PURE__ */ o((e) => Ot(e).split("node_modules/")[1] ?? e, "pluc\
|
|
1903
|
+
kThirdPartyPackageFromPath"), pe = /* @__PURE__ */ o(async (e) => {
|
|
1904
|
+
let i = {}, { builder: t } = await e.presets.apply("core"), r = await Bi(e);
|
|
1905
|
+
await _t(r) && (i.STORYBOOK_RENDERER = await _t(r) ?? void 0);
|
|
1906
|
+
let n = jt(t);
|
|
1907
|
+
n && (i.STORYBOOK_BUILDER = Ji(n) ?? Ui(n));
|
|
1908
|
+
let s = jt(await e.presets.apply("framework"));
|
|
1909
|
+
return s && (i.STORYBOOK_FRAMEWORK = s), i;
|
|
1910
|
+
}, "buildFrameworkGlobalsFromOptions");
|
|
1911
|
+
|
|
1912
|
+
// src/builder-manager/utils/managerEntries.ts
|
|
1913
|
+
import { existsSync as Gi } from "node:fs";
|
|
1914
|
+
import { mkdir as Vi, writeFile as Xi } from "node:fs/promises";
|
|
1915
|
+
import { dirname as Ki, join as Et, parse as Zi, relative as Yi, sep as Qi } from "node:path";
|
|
1916
|
+
import { resolvePathInStorybookCache as er } from "storybook/internal/common";
|
|
1917
|
+
var Pt = /* @__PURE__ */ o((e) => e.replaceAll(".", "").replaceAll("@", "").replaceAll(Qi, "-").replaceAll("/", "-").replaceAll(new RegExp(/^(-)+/g),
|
|
1918
|
+
""), "sanitizeBase"), tr = /* @__PURE__ */ o((e) => {
|
|
1919
|
+
let i = e.split(/-?node_modules-?/);
|
|
1920
|
+
return i[i.length - 1].replaceAll("storybook-addon-", "").replaceAll("dist-", "");
|
|
1921
|
+
}, "sanitizeFinal");
|
|
1922
|
+
async function St(e, i) {
|
|
1923
|
+
return Promise.all(
|
|
1924
|
+
e.map(async (t, r) => {
|
|
1925
|
+
let { name: a, dir: n } = Zi(t), s = er("sb-manager", i);
|
|
1926
|
+
if (!s)
|
|
1927
|
+
throw new Error("Could not create/find cache directory");
|
|
1928
|
+
let c = Yi(process.cwd(), n), p = Et(
|
|
1929
|
+
s,
|
|
1930
|
+
tr(Et(`${Pt(c)}-${r}`, `${Pt(a)}-bundle.js`))
|
|
1931
|
+
);
|
|
1932
|
+
if (!Gi(p)) {
|
|
1933
|
+
let l = Ki(p);
|
|
1934
|
+
await Vi(l, { recursive: !0 });
|
|
1935
|
+
}
|
|
1936
|
+
return await Xi(p, `import '${I(t).replaceAll(/'/g, "\\'")}';`), p;
|
|
1937
|
+
})
|
|
1938
|
+
);
|
|
1939
|
+
}
|
|
1940
|
+
o(St, "wrapManagerEntries");
|
|
1941
|
+
|
|
1942
|
+
// src/builder-manager/utils/safeResolve.ts
|
|
1943
|
+
var kt = /* @__PURE__ */ o((e) => {
|
|
1944
|
+
try {
|
|
1945
|
+
return Promise.resolve(S.resolve(e));
|
|
1946
|
+
} catch {
|
|
1947
|
+
return Promise.resolve(!1);
|
|
1948
|
+
}
|
|
1949
|
+
}, "safeResolve");
|
|
1950
|
+
|
|
1951
|
+
// src/builder-manager/index.ts
|
|
1952
|
+
var lr = /^\/($|\?)/, U, L, wt = /* @__PURE__ */ o(async (e) => {
|
|
1953
|
+
let [i, t, r, a] = await Promise.all([
|
|
1954
|
+
e.presets.apply("managerEntries", []),
|
|
1955
|
+
kt(R(e.configDir, "manager")),
|
|
1956
|
+
oe("addon.tsconfig.json"),
|
|
1957
|
+
e.presets.apply("env")
|
|
1958
|
+
]), n = t ? [...i, t] : i;
|
|
1959
|
+
return {
|
|
1960
|
+
entryPoints: await St(n, e.cacheKey),
|
|
1961
|
+
outdir: R(e.outputDir || "./", "sb-addons"),
|
|
1962
|
+
format: "iife",
|
|
1963
|
+
write: !1,
|
|
1964
|
+
ignoreAnnotations: !0,
|
|
1965
|
+
resolveExtensions: [".ts", ".tsx", ".mjs", ".js", ".jsx"],
|
|
1966
|
+
outExtension: { ".js": ".js" },
|
|
1967
|
+
loader: {
|
|
1968
|
+
".js": "jsx",
|
|
1969
|
+
// media
|
|
1970
|
+
".png": "dataurl",
|
|
1971
|
+
".gif": "dataurl",
|
|
1972
|
+
".jpg": "dataurl",
|
|
1973
|
+
".jpeg": "dataurl",
|
|
1974
|
+
".svg": "dataurl",
|
|
1975
|
+
".webp": "dataurl",
|
|
1976
|
+
".webm": "dataurl",
|
|
1977
|
+
".mp3": "dataurl",
|
|
1978
|
+
// modern fonts
|
|
1979
|
+
".woff2": "dataurl",
|
|
1980
|
+
// legacy font formats
|
|
1981
|
+
".woff": "dataurl",
|
|
1982
|
+
".eot": "dataurl",
|
|
1983
|
+
".ttf": "dataurl"
|
|
1984
|
+
},
|
|
1985
|
+
target: ["chrome100", "safari15", "firefox91"],
|
|
1986
|
+
platform: "browser",
|
|
1987
|
+
bundle: !0,
|
|
1988
|
+
minify: !0,
|
|
1989
|
+
sourcemap: !1,
|
|
1990
|
+
conditions: ["browser", "module", "default"],
|
|
1991
|
+
jsxFactory: "React.createElement",
|
|
1992
|
+
jsxFragment: "React.Fragment",
|
|
1993
|
+
jsx: "transform",
|
|
1994
|
+
jsxImportSource: "react",
|
|
1995
|
+
tsconfig: r,
|
|
1996
|
+
legalComments: "external",
|
|
1997
|
+
plugins: [Z(sr), (0, Ft.pnpPlugin)()],
|
|
1998
|
+
banner: {
|
|
1999
|
+
js: "try{"
|
|
2000
|
+
},
|
|
2001
|
+
footer: {
|
|
2002
|
+
js: '}catch(e){ console.error("[Storybook] One of your manager-entries failed: " + import.meta.url, e); }'
|
|
2003
|
+
},
|
|
2004
|
+
define: {
|
|
2005
|
+
"process.env": JSON.stringify(a),
|
|
2006
|
+
...or(a),
|
|
2007
|
+
global: "window",
|
|
2008
|
+
module: "{}"
|
|
2009
|
+
}
|
|
2010
|
+
};
|
|
2011
|
+
}, "getConfig"), bt = {
|
|
2012
|
+
get: /* @__PURE__ */ o(async () => {
|
|
2013
|
+
let { build: e } = await import("esbuild");
|
|
2014
|
+
return e;
|
|
2015
|
+
}, "get")
|
|
2016
|
+
}, cr = /* @__PURE__ */ o(async function* ({
|
|
2017
|
+
startTime: i,
|
|
2018
|
+
options: t,
|
|
2019
|
+
router: r
|
|
2020
|
+
}) {
|
|
2021
|
+
t.quiet || me.info("=> Starting manager..");
|
|
2022
|
+
let {
|
|
2023
|
+
config: a,
|
|
2024
|
+
favicon: n,
|
|
2025
|
+
customHead: s,
|
|
2026
|
+
features: c,
|
|
2027
|
+
instance: p,
|
|
2028
|
+
refs: l,
|
|
2029
|
+
template: u,
|
|
2030
|
+
title: d,
|
|
2031
|
+
logLevel: x,
|
|
2032
|
+
docsOptions: g,
|
|
2033
|
+
tagsOptions: m
|
|
2034
|
+
} = await le(t);
|
|
2035
|
+
yield;
|
|
2036
|
+
let f = a.outdir;
|
|
2037
|
+
await rr(f, { recursive: !0, force: !0 }), yield, U = await p({
|
|
2038
|
+
...a
|
|
2039
|
+
}), yield;
|
|
2040
|
+
let y = R(Tt(S.resolve("storybook/package.json")), "dist", "manager");
|
|
2041
|
+
r.use(
|
|
2042
|
+
"/sb-addons",
|
|
2043
|
+
(0, ue.default)(f, {
|
|
2044
|
+
maxAge: 3e5,
|
|
2045
|
+
dev: !0,
|
|
2046
|
+
immutable: !0
|
|
2047
|
+
})
|
|
2048
|
+
), r.use(
|
|
2049
|
+
"/sb-manager",
|
|
2050
|
+
(0, ue.default)(y, {
|
|
2051
|
+
maxAge: 3e5,
|
|
2052
|
+
dev: !0,
|
|
2053
|
+
immutable: !0
|
|
2054
|
+
})
|
|
2055
|
+
);
|
|
2056
|
+
let { cssFiles: v, jsFiles: _ } = await ce(f, U?.outputFiles), O = await pe(t);
|
|
2057
|
+
yield;
|
|
2058
|
+
let w = await se(
|
|
2059
|
+
u,
|
|
2060
|
+
d,
|
|
2061
|
+
n,
|
|
2062
|
+
s,
|
|
2063
|
+
v,
|
|
2064
|
+
_,
|
|
2065
|
+
c,
|
|
2066
|
+
l,
|
|
2067
|
+
x,
|
|
2068
|
+
g,
|
|
2069
|
+
m,
|
|
2070
|
+
t,
|
|
2071
|
+
O
|
|
2072
|
+
);
|
|
2073
|
+
return yield, r.use("/", ({ url: E }, P, T) => {
|
|
2074
|
+
E && lr.test(E) ? (P.statusCode = 200, P.setHeader("Content-Type", "text/html"), P.write(w), P.end()) : T();
|
|
2075
|
+
}), r.use("/index.html", (E, P) => {
|
|
2076
|
+
P.statusCode = 200, P.setHeader("Content-Type", "text/html"), P.write(w), P.end();
|
|
2077
|
+
}), {
|
|
2078
|
+
bail: mr,
|
|
2079
|
+
stats: {
|
|
2080
|
+
toJson: /* @__PURE__ */ o(() => ({}), "toJson")
|
|
2081
|
+
},
|
|
2082
|
+
totalTime: process.hrtime(i)
|
|
2083
|
+
};
|
|
2084
|
+
}, "starterGeneratorFn"), pr = /* @__PURE__ */ o(async function* ({ startTime: i, options: t }) {
|
|
2085
|
+
if (!t.outputDir)
|
|
2086
|
+
throw new Error("outputDir is required");
|
|
2087
|
+
me.info("=> Building manager..");
|
|
2088
|
+
let {
|
|
2089
|
+
config: r,
|
|
2090
|
+
customHead: a,
|
|
2091
|
+
favicon: n,
|
|
2092
|
+
features: s,
|
|
2093
|
+
instance: c,
|
|
2094
|
+
refs: p,
|
|
2095
|
+
template: l,
|
|
2096
|
+
title: u,
|
|
2097
|
+
logLevel: d,
|
|
2098
|
+
docsOptions: x,
|
|
2099
|
+
tagsOptions: g
|
|
2100
|
+
} = await le(t);
|
|
2101
|
+
yield;
|
|
2102
|
+
let m = r.outdir, f = R(Tt(S.resolve("storybook/package.json")), "dist", "manager"), y = R(t.outputDir, "sb-manager");
|
|
2103
|
+
U = await c({
|
|
2104
|
+
...r,
|
|
2105
|
+
minify: !0
|
|
2106
|
+
}), yield;
|
|
2107
|
+
let v = ir(f, y, {
|
|
2108
|
+
filter: /* @__PURE__ */ o((P) => {
|
|
2109
|
+
let { ext: T } = nr(P);
|
|
2110
|
+
return T ? T === ".js" : !0;
|
|
2111
|
+
}, "filter"),
|
|
2112
|
+
recursive: !0
|
|
2113
|
+
}), { cssFiles: _, jsFiles: O } = await ce(m, U?.outputFiles), w = await pe(t);
|
|
2114
|
+
yield;
|
|
2115
|
+
let E = await se(
|
|
2116
|
+
l,
|
|
2117
|
+
u,
|
|
2118
|
+
n,
|
|
2119
|
+
a,
|
|
2120
|
+
_,
|
|
2121
|
+
O,
|
|
2122
|
+
s,
|
|
2123
|
+
p,
|
|
2124
|
+
d,
|
|
2125
|
+
x,
|
|
2126
|
+
g,
|
|
2127
|
+
t,
|
|
2128
|
+
w
|
|
2129
|
+
);
|
|
2130
|
+
return await Promise.all([ar(R(t.outputDir, "index.html"), E), v]), me.trace({ message: "=> Manager built", time: process.hrtime(i) }), {
|
|
2131
|
+
toJson: /* @__PURE__ */ o(() => ({}), "toJson")
|
|
2132
|
+
};
|
|
2133
|
+
}, "builderGeneratorFn"), mr = /* @__PURE__ */ o(async () => {
|
|
2134
|
+
if (L)
|
|
2135
|
+
try {
|
|
2136
|
+
await L.throw(new Error());
|
|
2137
|
+
} catch {
|
|
2138
|
+
}
|
|
2139
|
+
}, "bail"), Ra = /* @__PURE__ */ o(async (e) => {
|
|
2140
|
+
L = cr(e);
|
|
2141
|
+
let i;
|
|
2142
|
+
do
|
|
2143
|
+
i = await L.next();
|
|
2144
|
+
while (!i.done);
|
|
2145
|
+
return i.value;
|
|
2146
|
+
}, "start"), La = /* @__PURE__ */ o(async (e) => {
|
|
2147
|
+
L = pr(e);
|
|
2148
|
+
let i;
|
|
2149
|
+
do
|
|
2150
|
+
i = await L.next();
|
|
2151
|
+
while (!i.done);
|
|
2152
|
+
return i.value;
|
|
2153
|
+
}, "build"), Ca = [], Aa = [];
|
|
2154
|
+
export {
|
|
2155
|
+
mr as bail,
|
|
2156
|
+
La as build,
|
|
2157
|
+
Ca as corePresets,
|
|
2158
|
+
bt as executor,
|
|
2159
|
+
wt as getConfig,
|
|
2160
|
+
Aa as overridePresets,
|
|
2161
|
+
Ra as start
|
|
2162
|
+
};
|