storybook 9.0.0-alpha.1 → 9.0.0-alpha.3

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