@stencil/core 2.18.0 → 2.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/cli/index.cjs +275 -218
  2. package/cli/index.d.ts +3 -0
  3. package/cli/index.js +275 -218
  4. package/cli/package.json +1 -1
  5. package/compiler/package.json +1 -1
  6. package/compiler/stencil.d.ts +2 -2
  7. package/compiler/stencil.js +49510 -47947
  8. package/compiler/stencil.min.js +2 -2
  9. package/dependencies.json +1 -1
  10. package/dev-server/client/index.d.ts +2 -2
  11. package/dev-server/client/index.js +241 -241
  12. package/dev-server/client/package.json +1 -1
  13. package/dev-server/connector.html +3 -3
  14. package/dev-server/index.d.ts +1 -1
  15. package/dev-server/index.js +2 -2
  16. package/dev-server/package.json +1 -1
  17. package/dev-server/server-process.js +1230 -1199
  18. package/internal/app-data/package.json +1 -1
  19. package/internal/client/css-shim.js +2 -2
  20. package/internal/client/dom.js +1 -1
  21. package/internal/client/index.js +619 -601
  22. package/internal/client/package.json +1 -1
  23. package/internal/client/patch-browser.js +1 -1
  24. package/internal/client/patch-esm.js +1 -1
  25. package/internal/client/polyfills/css-shim.js +1 -1
  26. package/internal/client/shadow-css.js +1 -1
  27. package/internal/hydrate/index.js +119 -119
  28. package/internal/hydrate/package.json +1 -1
  29. package/internal/hydrate/runner.d.ts +1 -1
  30. package/internal/hydrate/runner.js +100 -100
  31. package/internal/package.json +1 -1
  32. package/internal/stencil-core/index.d.ts +8 -10
  33. package/internal/stencil-private.d.ts +104 -42
  34. package/internal/stencil-public-compiler.d.ts +12 -2
  35. package/internal/stencil-public-docs.d.ts +20 -0
  36. package/internal/stencil-public-runtime.d.ts +20 -4
  37. package/internal/testing/index.js +148 -148
  38. package/internal/testing/package.json +1 -1
  39. package/mock-doc/index.cjs +655 -645
  40. package/mock-doc/index.js +655 -645
  41. package/mock-doc/package.json +1 -1
  42. package/package.json +29 -37
  43. package/readme.md +27 -33
  44. package/screenshot/index.d.ts +1 -1
  45. package/screenshot/index.js +3 -3
  46. package/screenshot/package.json +1 -1
  47. package/screenshot/pixel-match.js +983 -849
  48. package/sys/node/autoprefixer.js +5 -5
  49. package/sys/node/glob.js +1 -1
  50. package/sys/node/graceful-fs.js +1 -1
  51. package/sys/node/index.d.ts +4 -0
  52. package/sys/node/index.js +373 -374
  53. package/sys/node/package.json +1 -1
  54. package/sys/node/prompts.js +1 -1
  55. package/sys/node/worker.js +1 -1
  56. package/testing/index.d.ts +6 -6
  57. package/testing/index.js +468 -467
  58. package/testing/jest/jest-config.d.ts +1 -1
  59. package/testing/matchers/index.d.ts +3 -3
  60. package/testing/mock-fetch.d.ts +1 -1
  61. package/testing/mocks.d.ts +2 -2
  62. package/testing/package.json +1 -1
  63. package/testing/puppeteer/puppeteer-element.d.ts +2 -2
  64. package/testing/puppeteer/puppeteer-events.d.ts +1 -1
  65. package/testing/testing-logger.d.ts +1 -1
  66. package/testing/testing.d.ts +1 -1
package/testing/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Testing v2.18.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Testing v2.19.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  function _lazyRequire(e) {
5
5
  return new Proxy({}, {
@@ -69,22 +69,90 @@ async function startPuppeteerBrowser(e) {
69
69
  i;
70
70
  }
71
71
 
72
- function getAppStyleUrl(e, t) {
73
- return e.globalStyle ? getAppUrl(e, t, `${e.fsNamespace}.css`) : null;
72
+ function transpile(e, t = {}) {
73
+ t = {
74
+ ...t,
75
+ componentExport: null,
76
+ componentMetadata: "compilerstatic",
77
+ coreImportPath: isString(t.coreImportPath) ? t.coreImportPath : "@stencil/core/internal/testing",
78
+ currentDirectory: t.currentDirectory || process.cwd(),
79
+ module: "cjs",
80
+ proxy: null,
81
+ sourceMap: "inline",
82
+ style: null,
83
+ styleImportData: "queryparams",
84
+ target: "es2015"
85
+ };
86
+ try {
87
+ const e = process.versions.node.split(".");
88
+ parseInt(e[0], 10) >= 10 && (t.target = "es2017");
89
+ } catch (e) {}
90
+ return stencil_js.transpileSync(e, t);
74
91
  }
75
92
 
76
- function getAppUrl(e, t, r) {
77
- const s = e.outputTargets.find(isOutputTargetWww);
78
- if (s) {
79
- const e = s.buildDir, n = path$2.join(e, r), o = path$2.relative(s.dir, n);
80
- return new URL(o, t).href;
81
- }
82
- const n = e.outputTargets.find(isOutputTargetDistLazy);
83
- if (n) {
84
- const s = n.esmDir, o = path$2.join(s, r), i = path$2.relative(e.rootDir, o);
85
- return new URL(i, t).href;
86
- }
87
- return t;
93
+ function formatDiagnostic(e) {
94
+ let t = "";
95
+ return e.relFilePath && (t += e.relFilePath, "number" == typeof e.lineNumber && (t += ":" + e.lineNumber + 1,
96
+ "number" == typeof e.columnNumber && (t += ":" + e.columnNumber)), t += "\n"), t += e.messageText,
97
+ t;
98
+ }
99
+
100
+ function getCompilerOptions(e) {
101
+ if (_tsCompilerOptions) return _tsCompilerOptions;
102
+ if ("string" != typeof e) return null;
103
+ e = normalizePath(e);
104
+ const t = stencil_js.ts.findConfigFile(e, stencil_js.ts.sys.fileExists);
105
+ if (!t) return null;
106
+ const r = stencil_js.ts.readConfigFile(t, stencil_js.ts.sys.readFile);
107
+ if (r.error) throw new Error(formatDiagnostic((e => {
108
+ const t = {
109
+ level: "warn",
110
+ type: "typescript",
111
+ language: "typescript",
112
+ header: "TypeScript",
113
+ code: e.code.toString(),
114
+ messageText: flattenDiagnosticMessageText(e, e.messageText),
115
+ relFilePath: null,
116
+ absFilePath: null,
117
+ lines: []
118
+ };
119
+ if (1 === e.category && (t.level = "error"), e.file) {
120
+ t.absFilePath = e.file.fileName;
121
+ const s = "string" != typeof (r = e.file.text) ? [] : (r = r.replace(/\\r/g, "\n")).split("\n"), n = e.file.getLineAndCharacterOfPosition(e.start), o = {
122
+ lineIndex: n.line,
123
+ lineNumber: n.line + 1,
124
+ text: s[n.line],
125
+ errorCharStart: n.character,
126
+ errorLength: Math.max(e.length, 1)
127
+ };
128
+ if (t.lineNumber = o.lineNumber, t.columnNumber = o.errorCharStart + 1, t.lines.push(o),
129
+ 0 === o.errorLength && o.errorCharStart > 0 && (o.errorLength = 1, o.errorCharStart--),
130
+ o.lineIndex > 0) {
131
+ const e = {
132
+ lineIndex: o.lineIndex - 1,
133
+ lineNumber: o.lineNumber - 1,
134
+ text: s[o.lineIndex - 1],
135
+ errorCharStart: -1,
136
+ errorLength: -1
137
+ };
138
+ t.lines.unshift(e);
139
+ }
140
+ if (o.lineIndex + 1 < s.length) {
141
+ const e = {
142
+ lineIndex: o.lineIndex + 1,
143
+ lineNumber: o.lineNumber + 1,
144
+ text: s[o.lineIndex + 1],
145
+ errorCharStart: -1,
146
+ errorLength: -1
147
+ };
148
+ t.lines.push(e);
149
+ }
150
+ }
151
+ var r;
152
+ return t;
153
+ })(r.error)));
154
+ const s = stencil_js.ts.parseJsonConfigFileContent(r.config, stencil_js.ts.sys, e, void 0, t);
155
+ return _tsCompilerOptions = s.options, _tsCompilerOptions;
88
156
  }
89
157
 
90
158
  function setScreenshotEmulateData(e, t) {
@@ -130,7 +198,7 @@ async function runJest(e, t) {
130
198
  e.flags.ci || e.flags.e2e ? t.__STENCIL_DEFAULT_TIMEOUT__ = "30000" : t.__STENCIL_DEFAULT_TIMEOUT__ = "15000",
131
199
  e.flags.devtools && (t.__STENCIL_DEFAULT_TIMEOUT__ = "300000000"), e.logger.debug(`default timeout: ${t.__STENCIL_DEFAULT_TIMEOUT__}`);
132
200
  const n = function n(e) {
133
- const t = require("yargs"), r = [ ...e.flags.unknownArgs.slice(), ...e.flags.knownArgs.slice() ];
201
+ const t = require("yargs"), r = [ ...e.flags.knownArgs.slice(), ...e.flags.unknownArgs.slice() ];
134
202
  r.some((e => e.startsWith("--max-workers") || e.startsWith("--maxWorkers"))) || r.push(`--max-workers=${e.maxConcurrentWorkers}`),
135
203
  e.flags.devtools && r.push("--runInBand"), e.logger.info(e.logger.magenta(`jest args: ${r.join(" ")}`));
136
204
  let s = t(r).argv;
@@ -181,106 +249,15 @@ async function runJest(e, t) {
181
249
  return r;
182
250
  }
183
251
 
184
- function createBuildId() {
185
- const e = new Date;
186
- let t = e.getFullYear() + "";
187
- return t += ("0" + (e.getMonth() + 1)).slice(-2), t += ("0" + e.getDate()).slice(-2),
188
- t += ("0" + e.getHours()).slice(-2), t += ("0" + e.getMinutes()).slice(-2), t += ("0" + e.getSeconds()).slice(-2),
189
- t;
190
- }
191
-
192
- function createBuildMessage() {
193
- const e = new Date;
194
- let t = e.getFullYear() + "-";
195
- return t += ("0" + (e.getMonth() + 1)).slice(-2) + "-", t += ("0" + e.getDate()).slice(-2) + " ",
196
- t += ("0" + e.getHours()).slice(-2) + ":", t += ("0" + e.getMinutes()).slice(-2) + ":",
197
- t += ("0" + e.getSeconds()).slice(-2), `Build: ${t}`;
198
- }
199
-
200
- function transpile(e, t = {}) {
201
- t = {
202
- ...t,
203
- componentExport: null,
204
- componentMetadata: "compilerstatic",
205
- coreImportPath: isString(t.coreImportPath) ? t.coreImportPath : "@stencil/core/internal/testing",
206
- currentDirectory: t.currentDirectory || process.cwd(),
207
- module: "cjs",
208
- proxy: null,
209
- sourceMap: "inline",
210
- style: null,
211
- styleImportData: "queryparams",
212
- target: "es2015"
252
+ function toHaveClasses(e, t) {
253
+ if (!e) throw new Error("expect toHaveClasses value is null");
254
+ if ("function" == typeof e.then) throw new Error("element must be a resolved value, not a promise, before it can be tested");
255
+ if (1 !== e.nodeType) throw new Error("expect toHaveClasses value is not an element");
256
+ const r = t.every((t => e.classList.contains(t)));
257
+ return {
258
+ message: () => `expected to ${r ? "not " : ""}have css classes "${t.join(" ")}", but className is "${e.className}"`,
259
+ pass: r
213
260
  };
214
- try {
215
- const e = process.versions.node.split(".");
216
- parseInt(e[0], 10) >= 10 && (t.target = "es2017");
217
- } catch (e) {}
218
- return stencil_js.transpileSync(e, t);
219
- }
220
-
221
- function formatDiagnostic(e) {
222
- let t = "";
223
- return e.relFilePath && (t += e.relFilePath, "number" == typeof e.lineNumber && (t += ":" + e.lineNumber + 1,
224
- "number" == typeof e.columnNumber && (t += ":" + e.columnNumber)), t += "\n"), t += e.messageText,
225
- t;
226
- }
227
-
228
- function getCompilerOptions(e) {
229
- if (_tsCompilerOptions) return _tsCompilerOptions;
230
- if ("string" != typeof e) return null;
231
- e = normalizePath(e);
232
- const t = stencil_js.ts.findConfigFile(e, stencil_js.ts.sys.fileExists);
233
- if (!t) return null;
234
- const r = stencil_js.ts.readConfigFile(t, stencil_js.ts.sys.readFile);
235
- if (r.error) throw new Error(formatDiagnostic((e => {
236
- const t = {
237
- level: "warn",
238
- type: "typescript",
239
- language: "typescript",
240
- header: "TypeScript",
241
- code: e.code.toString(),
242
- messageText: flattenDiagnosticMessageText(e, e.messageText),
243
- relFilePath: null,
244
- absFilePath: null,
245
- lines: []
246
- };
247
- if (1 === e.category && (t.level = "error"), e.file) {
248
- t.absFilePath = e.file.fileName;
249
- const s = "string" != typeof (r = e.file.text) ? [] : (r = r.replace(/\\r/g, "\n")).split("\n"), n = e.file.getLineAndCharacterOfPosition(e.start), o = {
250
- lineIndex: n.line,
251
- lineNumber: n.line + 1,
252
- text: s[n.line],
253
- errorCharStart: n.character,
254
- errorLength: Math.max(e.length, 1)
255
- };
256
- if (t.lineNumber = o.lineNumber, t.columnNumber = o.errorCharStart + 1, t.lines.push(o),
257
- 0 === o.errorLength && o.errorCharStart > 0 && (o.errorLength = 1, o.errorCharStart--),
258
- o.lineIndex > 0) {
259
- const e = {
260
- lineIndex: o.lineIndex - 1,
261
- lineNumber: o.lineNumber - 1,
262
- text: s[o.lineIndex - 1],
263
- errorCharStart: -1,
264
- errorLength: -1
265
- };
266
- t.lines.unshift(e);
267
- }
268
- if (o.lineIndex + 1 < s.length) {
269
- const e = {
270
- lineIndex: o.lineIndex + 1,
271
- lineNumber: o.lineNumber + 1,
272
- text: s[o.lineIndex + 1],
273
- errorCharStart: -1,
274
- errorLength: -1
275
- };
276
- t.lines.push(e);
277
- }
278
- }
279
- var r;
280
- return t;
281
- })(r.error)));
282
- const s = stencil_js.ts.parseJsonConfigFileContent(r.config, stencil_js.ts.sys, e, void 0, t);
283
- return _tsCompilerOptions = s.options, _tsCompilerOptions;
284
261
  }
285
262
 
286
263
  function compareHtml(e, t, r) {
@@ -326,17 +303,6 @@ function compareHtml(e, t, r) {
326
303
  };
327
304
  }
328
305
 
329
- function toHaveClasses(e, t) {
330
- if (!e) throw new Error("expect toHaveClasses value is null");
331
- if ("function" == typeof e.then) throw new Error("element must be a resolved value, not a promise, before it can be tested");
332
- if (1 !== e.nodeType) throw new Error("expect toHaveClasses value is not an element");
333
- const r = t.every((t => e.classList.contains(t)));
334
- return {
335
- message: () => `expected to ${r ? "not " : ""}have css classes "${t.join(" ")}", but className is "${e.className}"`,
336
- pass: r
337
- };
338
- }
339
-
340
306
  async function globalMockFetch(e) {
341
307
  let t;
342
308
  if (null == e) throw new Error("missing url input for mock fetch()");
@@ -808,21 +774,6 @@ function mockLogger() {
808
774
  return new TestingLogger;
809
775
  }
810
776
 
811
- function findRootComponent(e, t) {
812
- if (null != t) {
813
- const r = t.children, s = r.length;
814
- for (let t = 0; t < s; t++) {
815
- const s = r[t];
816
- if (e.has(s.nodeName.toLowerCase())) return s;
817
- }
818
- for (let t = 0; t < s; t++) {
819
- const s = findRootComponent(e, r[t]);
820
- if (null != s) return s;
821
- }
822
- }
823
- return null;
824
- }
825
-
826
777
  async function initPageEvents(e) {
827
778
  e._e2eEvents = new Map, e._e2eEventIds = 0, e.spyOnEvent = pageSpyOnEvent.bind(e, e),
828
779
  await e.exposeFunction("stencilOnEvent", ((t, r) => {
@@ -1182,9 +1133,58 @@ function serializeConsoleMessage(e) {
1182
1133
  }(e.location())}`;
1183
1134
  }
1184
1135
 
1136
+ function findRootComponent(e, t) {
1137
+ if (null != t) {
1138
+ const r = t.children, s = r.length;
1139
+ for (let t = 0; t < s; t++) {
1140
+ const s = r[t];
1141
+ if (e.has(s.nodeName.toLowerCase())) return s;
1142
+ }
1143
+ for (let t = 0; t < s; t++) {
1144
+ const s = findRootComponent(e, r[t]);
1145
+ if (null != s) return s;
1146
+ }
1147
+ }
1148
+ return null;
1149
+ }
1150
+
1151
+ function createBuildId() {
1152
+ const e = new Date;
1153
+ let t = e.getFullYear() + "";
1154
+ return t += ("0" + (e.getMonth() + 1)).slice(-2), t += ("0" + e.getDate()).slice(-2),
1155
+ t += ("0" + e.getHours()).slice(-2), t += ("0" + e.getMinutes()).slice(-2), t += ("0" + e.getSeconds()).slice(-2),
1156
+ t;
1157
+ }
1158
+
1159
+ function createBuildMessage() {
1160
+ const e = new Date;
1161
+ let t = e.getFullYear() + "-";
1162
+ return t += ("0" + (e.getMonth() + 1)).slice(-2) + "-", t += ("0" + e.getDate()).slice(-2) + " ",
1163
+ t += ("0" + e.getHours()).slice(-2) + ":", t += ("0" + e.getMinutes()).slice(-2) + ":",
1164
+ t += ("0" + e.getSeconds()).slice(-2), `Build: ${t}`;
1165
+ }
1166
+
1167
+ function getAppStyleUrl(e, t) {
1168
+ return e.globalStyle ? getAppUrl(e, t, `${e.fsNamespace}.css`) : null;
1169
+ }
1170
+
1171
+ function getAppUrl(e, t, r) {
1172
+ const s = e.outputTargets.find(isOutputTargetWww);
1173
+ if (s) {
1174
+ const e = s.buildDir, n = path$2.join(e, r), o = path$2.relative(s.dir, n);
1175
+ return new URL(o, t).href;
1176
+ }
1177
+ const n = e.outputTargets.find(isOutputTargetDistLazy);
1178
+ if (n) {
1179
+ const s = n.esmDir, o = path$2.join(s, r), i = path$2.relative(e.rootDir, o);
1180
+ return new URL(i, t).href;
1181
+ }
1182
+ return t;
1183
+ }
1184
+
1185
1185
  var posix, pathBrowserify, caller, pathParse, parse, getNodeModulesDirs, nodeModulesPaths, normalizeOptions, ERROR_MESSAGE, slice, toStr, implementation, functionBind, src, isCoreModule, realpathFS$1, defaultIsFile$1, defaultIsDir$1, defaultRealpath, maybeRealpath, defaultReadPackage, getPackageCandidates$1, async, current, core, mod, core_1, isCore, realpathFS, defaultIsFile, defaultIsDir, defaultRealpathSync, maybeRealpathSync, defaultReadPackageSync, getPackageCandidates, sync, resolve;
1186
1186
 
1187
- const path$2 = require("path"), index_js = _lazyRequire("../dev-server/index.js"), stencil_js = require("../compiler/stencil.js"), appData = _lazyRequire("@stencil/core/internal/app-data"), index_cjs = _lazyRequire("../mock-doc/index.cjs"), testing = _lazyRequire("@stencil/core/internal/testing"), process$3 = require("process"), os$2 = require("os"), fs$2 = require("fs"), crypto$3 = require("crypto"), child_process$2 = require("child_process"), path__default = _interopDefaultLegacy(path$2), process__namespace = _interopNamespace(process$3), os__namespace = _interopNamespace(os$2), fs__default = _interopDefaultLegacy(fs$2), formatComponentRuntimeMembers = (e, t = !0) => ({
1187
+ const stencil_js = require("../compiler/stencil.js"), appData = _lazyRequire("@stencil/core/internal/app-data"), testing = _lazyRequire("@stencil/core/internal/testing"), index_cjs = _lazyRequire("../mock-doc/index.cjs"), path$2 = require("path"), crypto$3 = require("crypto"), os$2 = require("os"), process$3 = require("process"), fs$2 = require("fs"), index_js = _lazyRequire("../dev-server/index.js"), child_process$2 = require("child_process"), path__default = _interopDefaultLegacy(path$2), os__namespace = _interopNamespace(os$2), process__namespace = _interopNamespace(process$3), fs__default = _interopDefaultLegacy(fs$2), formatComponentRuntimeMembers = (e, t = !0) => ({
1188
1188
  ...formatPropertiesRuntimeMember(e.properties),
1189
1189
  ...formatStatesRuntimeMember(e.states),
1190
1190
  ...t ? formatMethodsRuntimeMember(e.methods) : {}
@@ -1300,15 +1300,16 @@ const path$2 = require("path"), index_js = _lazyRequire("../dev-server/index.js"
1300
1300
  const r = e.substring(0, t), s = e.substring(t).split("/"), n = s.length;
1301
1301
  return n > 0 && !s[n - 1] && s.pop(), [ r, ...s ];
1302
1302
  }, normalizeFsPath = e => normalizePath(e.split("?")[0].replace(/\0/g, "")), flattenDiagnosticMessageText = (e, t) => {
1303
+ var r, s;
1303
1304
  if ("string" == typeof t) return t;
1304
1305
  if (void 0 === t) return "";
1305
- const r = [], s = e.file.fileName.includes("stencil.config");
1306
- s && r.push(2322);
1307
- let n = "";
1308
- if (!r.includes(t.code) && (n = t.messageText, isIterable(t.next))) for (const r of t.next) n += flattenDiagnosticMessageText(e, r);
1309
- return s && (n = n.replace("type 'StencilConfig'", "Stencil Config"), n = n.replace("Object literal may only specify known properties, but ", ""),
1310
- n = n.replace("Object literal may only specify known properties, and ", "")), n.trim();
1311
- }, isOutputTargetDistLazy = e => e.type === DIST_LAZY, isOutputTargetWww = e => e.type === WWW, DIST_LAZY = "dist-lazy", WWW = "www", isJest27TransformOptions = e => null != e && "object" == typeof e && e.hasOwnProperty("config");
1306
+ const n = [], o = (null !== (s = null === (r = e.file) || void 0 === r ? void 0 : r.fileName) && void 0 !== s ? s : "").includes("stencil.config");
1307
+ o && n.push(2322);
1308
+ let i = "";
1309
+ if (!n.includes(t.code) && (i = t.messageText, isIterable(t.next))) for (const r of t.next) i += flattenDiagnosticMessageText(e, r);
1310
+ return o && (i = i.replace("type 'StencilConfig'", "Stencil Config"), i = i.replace("Object literal may only specify known properties, but ", ""),
1311
+ i = i.replace("Object literal may only specify known properties, and ", "")), i.trim();
1312
+ }, isJest27TransformOptions = e => null != e && "object" == typeof e && e.hasOwnProperty("config");
1312
1313
 
1313
1314
  let _tsCompilerOptions = null, _tsCompilerOptionsKey = null;
1314
1315
 
@@ -1719,7 +1720,13 @@ const FETCH_DEFAULT_PATH = "/mock-fetch-data", HtmlSerializer = {
1719
1720
  outerHtml: !0
1720
1721
  }),
1721
1722
  test: e => null != e && (e instanceof HTMLElement || e instanceof index_cjs.MockNode)
1722
- };
1723
+ }, createConfigFlags = (e = {}) => ({
1724
+ task: null,
1725
+ args: [],
1726
+ knownArgs: [],
1727
+ unknownArgs: [],
1728
+ ...e
1729
+ });
1723
1730
 
1724
1731
  class BuildContext {
1725
1732
  constructor(e, t) {
@@ -1905,7 +1912,46 @@ class Cache {
1905
1912
  }
1906
1913
  }
1907
1914
 
1908
- const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY = "last_clear_expired_cache", CACHE_DIR_README = '# Stencil Cache Directory\n\nThis directory contains files which the compiler has\ncached for faster builds. To disable caching, please set\n"enableCache: false" within the stencil config.\n\nTo change the cache directory, please update the\n"cacheDir" property within the stencil config.\n', getCommitInstructions = e => {
1915
+ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY = "last_clear_expired_cache", CACHE_DIR_README = '# Stencil Cache Directory\n\nThis directory contains files which the compiler has\ncached for faster builds. To disable caching, please set\n"enableCache: false" within the stencil config.\n\nTo change the cache directory, please update the\n"cacheDir" property within the stencil config.\n', buildEvents = () => {
1916
+ const e = [], t = t => {
1917
+ const r = e.findIndex((e => e.callback === t));
1918
+ return r > -1 && (e.splice(r, 1), !0);
1919
+ };
1920
+ return {
1921
+ emit: (t, r) => {
1922
+ const s = t.toLowerCase().trim(), n = e.slice();
1923
+ for (const e of n) if (null == e.eventName) try {
1924
+ e.callback(t, r);
1925
+ } catch (e) {
1926
+ console.error(e);
1927
+ } else if (e.eventName === s) try {
1928
+ e.callback(r);
1929
+ } catch (e) {
1930
+ console.error(e);
1931
+ }
1932
+ },
1933
+ on: (r, s) => {
1934
+ if ("function" == typeof r) {
1935
+ const s = null, n = r;
1936
+ return e.push({
1937
+ eventName: s,
1938
+ callback: n
1939
+ }), () => t(n);
1940
+ }
1941
+ if ("string" == typeof r && "function" == typeof s) {
1942
+ const n = r.toLowerCase().trim(), o = s;
1943
+ return e.push({
1944
+ eventName: n,
1945
+ callback: o
1946
+ }), () => t(o);
1947
+ }
1948
+ return () => !1;
1949
+ },
1950
+ unsubscribeAll: () => {
1951
+ e.length = 0;
1952
+ }
1953
+ };
1954
+ }, getCommitInstructions = e => {
1909
1955
  const t = {
1910
1956
  filesToDelete: [],
1911
1957
  filesToWrite: [],
@@ -1965,6 +2011,70 @@ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY
1965
2011
  })), t;
1966
2012
  }, shouldIgnore = e => (e = e.trim().toLowerCase(), IGNORE.some((t => e.endsWith(t)))), IGNORE = [ ".ds_store", ".gitignore", "desktop.ini", "thumbs.db" ];
1967
2013
 
2014
+ class TestingLogger {
2015
+ constructor() {
2016
+ this.isEnabled = !1;
2017
+ }
2018
+ setLevel(e) {}
2019
+ getLevel() {
2020
+ return "info";
2021
+ }
2022
+ enableColors(e) {}
2023
+ emoji(e) {
2024
+ return "";
2025
+ }
2026
+ info(...e) {
2027
+ this.isEnabled && console.log(...e);
2028
+ }
2029
+ warn(...e) {
2030
+ this.isEnabled && console.warn(...e);
2031
+ }
2032
+ error(...e) {
2033
+ this.isEnabled && console.error(...e);
2034
+ }
2035
+ debug(...e) {
2036
+ this.isEnabled && console.log(...e);
2037
+ }
2038
+ color(e, t) {}
2039
+ red(e) {
2040
+ return e;
2041
+ }
2042
+ green(e) {
2043
+ return e;
2044
+ }
2045
+ yellow(e) {
2046
+ return e;
2047
+ }
2048
+ blue(e) {
2049
+ return e;
2050
+ }
2051
+ magenta(e) {
2052
+ return e;
2053
+ }
2054
+ cyan(e) {
2055
+ return e;
2056
+ }
2057
+ gray(e) {
2058
+ return e;
2059
+ }
2060
+ bold(e) {
2061
+ return e;
2062
+ }
2063
+ dim(e) {
2064
+ return e;
2065
+ }
2066
+ bgRed(e) {
2067
+ return e;
2068
+ }
2069
+ createTimeSpan(e, t = !1) {
2070
+ return {
2071
+ duration: () => 0,
2072
+ finish: () => 0
2073
+ };
2074
+ }
2075
+ printDiagnostics(e) {}
2076
+ }
2077
+
1968
2078
  (posix = {
1969
2079
  resolve: function e() {
1970
2080
  var t, r, s, n = "", o = !1;
@@ -2085,46 +2195,7 @@ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY
2085
2195
  posix: null
2086
2196
  }).posix = posix, pathBrowserify = posix;
2087
2197
 
2088
- const buildEvents = () => {
2089
- const e = [], t = t => {
2090
- const r = e.findIndex((e => e.callback === t));
2091
- return r > -1 && (e.splice(r, 1), !0);
2092
- };
2093
- return {
2094
- emit: (t, r) => {
2095
- const s = t.toLowerCase().trim(), n = e.slice();
2096
- for (const e of n) if (null == e.eventName) try {
2097
- e.callback(t, r);
2098
- } catch (e) {
2099
- console.error(e);
2100
- } else if (e.eventName === s) try {
2101
- e.callback(r);
2102
- } catch (e) {
2103
- console.error(e);
2104
- }
2105
- },
2106
- on: (r, s) => {
2107
- if ("function" == typeof r) {
2108
- const s = null, n = r;
2109
- return e.push({
2110
- eventName: s,
2111
- callback: n
2112
- }), () => t(n);
2113
- }
2114
- if ("string" == typeof r && "function" == typeof s) {
2115
- const n = r.toLowerCase().trim(), o = s;
2116
- return e.push({
2117
- eventName: n,
2118
- callback: o
2119
- }), () => t(o);
2120
- }
2121
- return () => !1;
2122
- },
2123
- unsubscribeAll: () => {
2124
- e.length = 0;
2125
- }
2126
- };
2127
- }, IS_NODE_ENV = !("undefined" == typeof global || "function" != typeof require || !global.process || "string" != typeof __filename || global.origin && "string" == typeof global.origin);
2198
+ const IS_NODE_ENV = !("undefined" == typeof global || "function" != typeof require || !global.process || "string" != typeof __filename || global.origin && "string" == typeof global.origin);
2128
2199
 
2129
2200
  IS_NODE_ENV && process.platform;
2130
2201
 
@@ -2132,74 +2203,7 @@ const IS_BROWSER_ENV = "undefined" != typeof location && "undefined" != typeof n
2132
2203
 
2133
2204
  IS_NODE_ENV && require, IS_NODE_ENV && process.cwd;
2134
2205
 
2135
- const YELLOW = "#f39c12", RED = "#c0392b", BLUE = "#3498db", COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json", ".md" ], COMMON_DIR_FILENAMES = [ "package.json", "index.js", "index.mjs" ], getCommonDirName = (e, t) => e + "/" + t, isCommonDirModuleFile = e => COMMON_DIR_MODULE_EXTS.some((t => e.endsWith(t))), shouldFetchModule = e => IS_FETCH_ENV && IS_BROWSER_ENV && isNodeModulePath(e), isNodeModulePath = e => normalizePath(e).split("/").includes("node_modules"), getPackageDirPath = (e, t) => {
2136
- const r = normalizePath(e).split("/"), s = (e => {
2137
- e.startsWith("~") && (e = e.substring(1));
2138
- const t = e.split("/"), r = {
2139
- moduleId: null,
2140
- filePath: null,
2141
- scope: null,
2142
- scopeSubModuleId: null
2143
- };
2144
- return e.startsWith("@") && t.length > 1 ? (r.moduleId = t.slice(0, 2).join("/"),
2145
- r.filePath = t.slice(2).join("/"), r.scope = t[0], r.scopeSubModuleId = t[1]) : (r.moduleId = t[0],
2146
- r.filePath = t.slice(1).join("/")), r;
2147
- })(t);
2148
- for (let e = r.length - 1; e >= 1; e--) if ("node_modules" === r[e - 1]) if (s.scope) {
2149
- if (r[e] === s.scope && r[e + 1] === s.scopeSubModuleId) return r.slice(0, e + 2).join("/");
2150
- } else if (r[e] === s.moduleId) return r.slice(0, e + 1).join("/");
2151
- return null;
2152
- }, packageVersions = new Map, known404Urls = new Set, getCommonDirUrl = (e, t, r, s) => getNodeModuleFetchUrl(e, t, r) + "/" + s, getNodeModuleFetchUrl = (e, t, r) => {
2153
- let s = (r = normalizePath(r)).split("/").filter((e => e.length));
2154
- const n = s.lastIndexOf("node_modules");
2155
- n > -1 && n < s.length - 1 && (s = s.slice(n + 1));
2156
- let o = s.shift();
2157
- o.startsWith("@") && (o += "/" + s.shift());
2158
- const i = s.join("/");
2159
- return "@stencil/core" === o ? ((e, t) => {
2160
- let r = (t = normalizePath(t)).split("/");
2161
- const s = r.lastIndexOf("node_modules");
2162
- s > -1 && s < r.length - 1 && (r = r.slice(s + 1), r = r[0].startsWith("@") ? r.slice(2) : r.slice(1),
2163
- t = r.join("/"));
2164
- const n = new URL("../", e).href;
2165
- return new URL("./" + t, n).href;
2166
- })(e.getCompilerExecutingPath(), i) : e.getRemoteModuleUrl({
2167
- moduleId: o,
2168
- version: t.get(o),
2169
- path: i
2170
- });
2171
- }, knownUrlSkips = [ "/@stencil/core/internal.js", "/@stencil/core/internal.json", "/@stencil/core/internal.mjs", "/@stencil/core/internal/stencil-core.js/index.json", "/@stencil/core/internal/stencil-core.js.json", "/@stencil/core/internal/stencil-core.js/package.json", "/@stencil/core.js", "/@stencil/core.json", "/@stencil/core.mjs", "/@stencil/core.css", "/@stencil/core/index.js", "/@stencil/core/index.json", "/@stencil/core/index.mjs", "/@stencil/core/index.css", "/@stencil/package.json" ], fetchModuleAsync = async (e, t, r, s, n) => {
2172
- if (!((e => {
2173
- if (!(e => e.endsWith(".d.ts"))(t = e) && t.endsWith(".ts") || (e => e.endsWith(".tsx"))(e)) return !0;
2174
- var t;
2175
- const r = e.split("/"), s = r[r.length - 2], n = r[r.length - 1];
2176
- return !("node_modules" !== s || !isCommonDirModuleFile(n));
2177
- })(n) || known404Urls.has(s) || (e => knownUrlSkips.some((t => e.endsWith(t))))(s))) try {
2178
- const o = await ((e, t, r) => e && isFunction(e.fetch) ? e.fetch(t, r) : fetch(t, r))(e, s);
2179
- if (o) {
2180
- if (o.ok) {
2181
- const i = await o.clone().text();
2182
- return await (async (e, t, r, s, n, o) => {
2183
- r.endsWith("package.json") && ((e, t) => {
2184
- try {
2185
- const r = JSON.parse(t);
2186
- r.name && r.version && ((e, t, r) => {
2187
- e.set(t, r);
2188
- })(e, r.name, r.version);
2189
- } catch (e) {}
2190
- })(o, n);
2191
- let i = path$2.dirname(s);
2192
- for (;"/" !== i && "" !== i; ) t ? (t.clearFileCache(i), await t.sys.createDir(i)) : await e.createDir(i),
2193
- i = path$2.dirname(i);
2194
- t ? (t.clearFileCache(s), await t.sys.writeFile(s, n)) : await e.writeFile(s, n);
2195
- })(e, t, s, n, i, r), i;
2196
- }
2197
- 404 === o.status && known404Urls.add(s);
2198
- }
2199
- } catch (e) {
2200
- console.error(e);
2201
- }
2202
- };
2206
+ const YELLOW = "#f39c12", RED = "#c0392b", BLUE = "#3498db";
2203
2207
 
2204
2208
  caller = function() {
2205
2209
  var e, t = Error.prepareStackTrace;
@@ -2694,8 +2698,76 @@ defaultIsFile = function e(t) {
2694
2698
  b;
2695
2699
  }, async.core = core_1, async.isCore = isCore, async.sync = sync, resolve = async;
2696
2700
 
2697
- const createSystem = e => {
2698
- const t = e && e.logger ? e.logger : (() => {
2701
+ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json", ".md" ], COMMON_DIR_FILENAMES = [ "package.json", "index.js", "index.mjs" ], getCommonDirName = (e, t) => e + "/" + t, isCommonDirModuleFile = e => COMMON_DIR_MODULE_EXTS.some((t => e.endsWith(t))), shouldFetchModule = e => IS_FETCH_ENV && IS_BROWSER_ENV && isNodeModulePath(e), isNodeModulePath = e => normalizePath(e).split("/").includes("node_modules"), getPackageDirPath = (e, t) => {
2702
+ const r = normalizePath(e).split("/"), s = (e => {
2703
+ e.startsWith("~") && (e = e.substring(1));
2704
+ const t = e.split("/"), r = {
2705
+ moduleId: null,
2706
+ filePath: null,
2707
+ scope: null,
2708
+ scopeSubModuleId: null
2709
+ };
2710
+ return e.startsWith("@") && t.length > 1 ? (r.moduleId = t.slice(0, 2).join("/"),
2711
+ r.filePath = t.slice(2).join("/"), r.scope = t[0], r.scopeSubModuleId = t[1]) : (r.moduleId = t[0],
2712
+ r.filePath = t.slice(1).join("/")), r;
2713
+ })(t);
2714
+ for (let e = r.length - 1; e >= 1; e--) if ("node_modules" === r[e - 1]) if (s.scope) {
2715
+ if (r[e] === s.scope && r[e + 1] === s.scopeSubModuleId) return r.slice(0, e + 2).join("/");
2716
+ } else if (r[e] === s.moduleId) return r.slice(0, e + 1).join("/");
2717
+ return null;
2718
+ }, packageVersions = new Map, known404Urls = new Set, getCommonDirUrl = (e, t, r, s) => getNodeModuleFetchUrl(e, t, r) + "/" + s, getNodeModuleFetchUrl = (e, t, r) => {
2719
+ let s = (r = normalizePath(r)).split("/").filter((e => e.length));
2720
+ const n = s.lastIndexOf("node_modules");
2721
+ n > -1 && n < s.length - 1 && (s = s.slice(n + 1));
2722
+ let o = s.shift();
2723
+ o.startsWith("@") && (o += "/" + s.shift());
2724
+ const i = s.join("/");
2725
+ return "@stencil/core" === o ? ((e, t) => {
2726
+ let r = (t = normalizePath(t)).split("/");
2727
+ const s = r.lastIndexOf("node_modules");
2728
+ s > -1 && s < r.length - 1 && (r = r.slice(s + 1), r = r[0].startsWith("@") ? r.slice(2) : r.slice(1),
2729
+ t = r.join("/"));
2730
+ const n = new URL("../", e).href;
2731
+ return new URL("./" + t, n).href;
2732
+ })(e.getCompilerExecutingPath(), i) : e.getRemoteModuleUrl({
2733
+ moduleId: o,
2734
+ version: t.get(o),
2735
+ path: i
2736
+ });
2737
+ }, knownUrlSkips = [ "/@stencil/core/internal.js", "/@stencil/core/internal.json", "/@stencil/core/internal.mjs", "/@stencil/core/internal/stencil-core.js/index.json", "/@stencil/core/internal/stencil-core.js.json", "/@stencil/core/internal/stencil-core.js/package.json", "/@stencil/core.js", "/@stencil/core.json", "/@stencil/core.mjs", "/@stencil/core.css", "/@stencil/core/index.js", "/@stencil/core/index.json", "/@stencil/core/index.mjs", "/@stencil/core/index.css", "/@stencil/package.json" ], fetchModuleAsync = async (e, t, r, s, n) => {
2738
+ if (!((e => {
2739
+ if (!(e => e.endsWith(".d.ts"))(t = e) && t.endsWith(".ts") || (e => e.endsWith(".tsx"))(e)) return !0;
2740
+ var t;
2741
+ const r = e.split("/"), s = r[r.length - 2], n = r[r.length - 1];
2742
+ return !("node_modules" !== s || !isCommonDirModuleFile(n));
2743
+ })(n) || known404Urls.has(s) || (e => knownUrlSkips.some((t => e.endsWith(t))))(s))) try {
2744
+ const o = await ((e, t, r) => e && isFunction(e.fetch) ? e.fetch(t, r) : fetch(t, r))(e, s);
2745
+ if (o) {
2746
+ if (o.ok) {
2747
+ const i = await o.clone().text();
2748
+ return await (async (e, t, r, s, n, o) => {
2749
+ r.endsWith("package.json") && ((e, t) => {
2750
+ try {
2751
+ const r = JSON.parse(t);
2752
+ r.name && r.version && ((e, t, r) => {
2753
+ e.set(t, r);
2754
+ })(e, r.name, r.version);
2755
+ } catch (e) {}
2756
+ })(o, n);
2757
+ let i = path$2.dirname(s);
2758
+ for (;"/" !== i && "" !== i; ) t ? (t.clearFileCache(i), await t.sys.createDir(i)) : await e.createDir(i),
2759
+ i = path$2.dirname(i);
2760
+ t ? (t.clearFileCache(s), await t.sys.writeFile(s, n)) : await e.writeFile(s, n);
2761
+ })(e, t, s, n, i, r), i;
2762
+ }
2763
+ 404 === o.status && known404Urls.add(s);
2764
+ }
2765
+ } catch (e) {
2766
+ console.error(e);
2767
+ }
2768
+ }, createSystem = e => {
2769
+ var t;
2770
+ const r = null !== (t = null == e ? void 0 : e.logger) && void 0 !== t ? t : (() => {
2699
2771
  let e = IS_BROWSER_ENV, t = "info";
2700
2772
  return {
2701
2773
  enableColors: t => e = t,
@@ -2737,15 +2809,15 @@ const createSystem = e => {
2737
2809
  })(t, e)));
2738
2810
  }
2739
2811
  };
2740
- })(), r = new Map, s = new Set, n = e => s.add(e), o = e => s.delete(e), i = buildEvents(), a = IS_BROWSER_ENV && navigator.hardwareConcurrency || 1, l = e => {
2812
+ })(), s = new Map, n = new Set, o = e => n.add(e), i = e => n.delete(e), a = buildEvents(), l = IS_BROWSER_ENV && navigator.hardwareConcurrency || 1, c = e => {
2741
2813
  if ("/" === e || "" === e) return "/";
2742
2814
  const t = path$2.dirname(e), r = path$2.basename(e);
2743
2815
  return t.endsWith("/") ? normalizePath(`${t}${r}`) : normalizePath(`${t}/${r}`);
2744
- }, c = e => {
2745
- const t = r.get(l(e));
2816
+ }, u = e => {
2817
+ const t = s.get(c(e));
2746
2818
  return !(!t || !(t.isDirectory || t.isFile && "string" == typeof t.data));
2747
- }, u = (e, t) => {
2748
- e = l(e);
2819
+ }, d = (e, t) => {
2820
+ e = c(e);
2749
2821
  const r = {
2750
2822
  basename: path$2.basename(e),
2751
2823
  dirname: path$2.dirname(e),
@@ -2753,60 +2825,60 @@ const createSystem = e => {
2753
2825
  newDirs: [],
2754
2826
  error: null
2755
2827
  };
2756
- return d(e, t, r), r;
2757
- }, d = (e, t, s) => {
2828
+ return h(e, t, r), r;
2829
+ }, h = (e, t, r) => {
2758
2830
  const n = path$2.dirname(e);
2759
- t && t.recursive && !(e => "/" === e || windowsPathRegex.test(e))(n) && d(n, t, s);
2760
- const o = r.get(e);
2761
- o ? (o.isDirectory = !0, o.isFile = !1) : (r.set(e, {
2831
+ t && t.recursive && !(e => "/" === e || windowsPathRegex.test(e))(n) && h(n, t, r);
2832
+ const o = s.get(e);
2833
+ o ? (o.isDirectory = !0, o.isFile = !1) : (s.set(e, {
2762
2834
  basename: path$2.basename(e),
2763
2835
  dirname: n,
2764
2836
  isDirectory: !0,
2765
2837
  isFile: !1,
2766
2838
  watcherCallbacks: null,
2767
2839
  data: void 0
2768
- }), s.newDirs.push(e), v(e, new Set));
2769
- }, h = e => {
2770
- e = l(e);
2771
- const t = [], s = r.get(e);
2772
- return s && s.isDirectory && r.forEach(((r, s) => {
2840
+ }), r.newDirs.push(e), b(e, new Set));
2841
+ }, p = e => {
2842
+ e = c(e);
2843
+ const t = [], r = s.get(e);
2844
+ return r && r.isDirectory && s.forEach(((r, s) => {
2773
2845
  "/" !== s && (r.isDirectory || r.isFile && "string" == typeof r.data) && (e.endsWith("/") && `${e}${r.basename}` === s || `${e}/${r.basename}` === s) && t.push(s);
2774
2846
  })), t.sort();
2775
- }, p = e => {
2776
- e = l(e);
2777
- const t = r.get(e);
2847
+ }, f = e => {
2848
+ e = c(e);
2849
+ const t = s.get(e);
2778
2850
  if (t && t.isFile) return t.data;
2779
- }, f = e => ({
2780
- path: l(e),
2851
+ }, m = e => ({
2852
+ path: c(e),
2781
2853
  error: null
2782
- }), m = (e, t, s) => {
2783
- const n = w(e);
2784
- if (!n.error && !s.error) if (n.isFile) {
2785
- const n = path$2.dirname(t), o = u(n, {
2854
+ }), g = (e, t, r) => {
2855
+ const n = _(e);
2856
+ if (!n.error && !r.error) if (n.isFile) {
2857
+ const n = path$2.dirname(t), o = d(n, {
2786
2858
  recursive: !0
2787
- }), i = r.get(e).data, a = b(t, i);
2788
- s.newDirs.push(...o.newDirs), s.renamed.push({
2859
+ }), i = s.get(e).data, a = E(t, i);
2860
+ r.newDirs.push(...o.newDirs), r.renamed.push({
2789
2861
  oldPath: e,
2790
2862
  newPath: t,
2791
2863
  isDirectory: !1,
2792
2864
  isFile: !0
2793
- }), a.error ? s.error = a.error : s.newFiles.push(t);
2865
+ }), a.error ? r.error = a.error : r.newFiles.push(t);
2794
2866
  } else if (n.isDirectory) {
2795
- const r = h(e), n = u(t, {
2867
+ const s = p(e), n = d(t, {
2796
2868
  recursive: !0
2797
2869
  });
2798
- s.newDirs.push(...n.newDirs), s.renamed.push({
2870
+ r.newDirs.push(...n.newDirs), r.renamed.push({
2799
2871
  oldPath: e,
2800
2872
  newPath: t,
2801
2873
  isDirectory: !0,
2802
2874
  isFile: !1
2803
2875
  });
2804
- for (const n of r) {
2805
- const r = n.replace(e, t);
2806
- m(n, r, s);
2876
+ for (const n of s) {
2877
+ const s = n.replace(e, t);
2878
+ g(n, s, r);
2807
2879
  }
2808
2880
  }
2809
- }, g = (e, t = {}) => {
2881
+ }, y = (e, t = {}) => {
2810
2882
  const r = {
2811
2883
  basename: path$2.basename(e),
2812
2884
  dirname: path$2.dirname(e),
@@ -2815,23 +2887,23 @@ const createSystem = e => {
2815
2887
  removedFiles: [],
2816
2888
  error: null
2817
2889
  };
2818
- return y(e, t, r), r;
2819
- }, y = (e, t, s) => {
2820
- if (!s.error) {
2821
- e = l(e);
2822
- const n = h(e);
2890
+ return w(e, t, r), r;
2891
+ }, w = (e, t, r) => {
2892
+ if (!r.error) {
2893
+ e = c(e);
2894
+ const n = p(e);
2823
2895
  if (t && t.recursive) for (const e of n) {
2824
- const n = r.get(e);
2825
- if (n) if (n.isDirectory) y(e, t, s); else if (n.isFile) {
2826
- const t = _(e);
2827
- t.error ? s.error = t.error : s.removedFiles.push(e);
2896
+ const n = s.get(e);
2897
+ if (n) if (n.isDirectory) w(e, t, r); else if (n.isFile) {
2898
+ const t = v(e);
2899
+ t.error ? r.error = t.error : r.removedFiles.push(e);
2828
2900
  }
2829
- } else if (n.length > 0) return void (s.error = "cannot delete directory that contains files/subdirectories");
2830
- r.delete(e), v(e, new Set), s.removedDirs.push(e);
2901
+ } else if (n.length > 0) return void (r.error = "cannot delete directory that contains files/subdirectories");
2902
+ s.delete(e), b(e, new Set), r.removedDirs.push(e);
2831
2903
  }
2832
- }, w = e => {
2833
- e = l(e);
2834
- const t = r.get(e);
2904
+ }, _ = e => {
2905
+ e = c(e);
2906
+ const t = s.get(e);
2835
2907
  return t && (t.isDirectory || t.isFile && "string" == typeof t.data) ? {
2836
2908
  isDirectory: t.isDirectory,
2837
2909
  isFile: t.isFile,
@@ -2845,52 +2917,52 @@ const createSystem = e => {
2845
2917
  size: 0,
2846
2918
  error: `ENOENT: no such file or directory, statSync '${e}'`
2847
2919
  };
2848
- }, _ = e => {
2849
- e = l(e);
2920
+ }, v = e => {
2921
+ e = c(e);
2850
2922
  const t = {
2851
2923
  basename: path$2.basename(e),
2852
2924
  dirname: path$2.dirname(e),
2853
2925
  path: e,
2854
2926
  error: null
2855
- }, s = r.get(e);
2856
- if (s) {
2857
- if (s.watcherCallbacks) for (const t of s.watcherCallbacks) t(e, "fileDelete");
2858
- r.delete(e), v(e, new Set);
2927
+ }, r = s.get(e);
2928
+ if (r) {
2929
+ if (r.watcherCallbacks) for (const t of r.watcherCallbacks) t(e, "fileDelete");
2930
+ s.delete(e), b(e, new Set);
2859
2931
  }
2860
2932
  return t;
2861
- }, v = (e, t) => {
2862
- const s = l(path$2.dirname(e)), n = r.get(s);
2863
- if (n && n.isDirectory && n.watcherCallbacks) for (const t of n.watcherCallbacks) t(e, null);
2864
- t.has(s) || (t.add(s), v(s, t));
2865
2933
  }, b = (e, t) => {
2866
- const s = {
2867
- path: e = l(e),
2934
+ const r = c(path$2.dirname(e)), n = s.get(r);
2935
+ if (n && n.isDirectory && n.watcherCallbacks) for (const t of n.watcherCallbacks) t(e, null);
2936
+ t.has(r) || (t.add(r), b(r, t));
2937
+ }, E = (e, t) => {
2938
+ const r = {
2939
+ path: e = c(e),
2868
2940
  error: null
2869
- }, n = r.get(e);
2941
+ }, n = s.get(e);
2870
2942
  if (n) {
2871
2943
  const r = n.data !== t;
2872
2944
  if (n.data = t, r && n.watcherCallbacks) for (const t of n.watcherCallbacks) t(e, "fileUpdate");
2873
- } else r.set(e, {
2945
+ } else s.set(e, {
2874
2946
  basename: path$2.basename(e),
2875
2947
  dirname: path$2.dirname(e),
2876
2948
  isDirectory: !1,
2877
2949
  isFile: !0,
2878
2950
  watcherCallbacks: null,
2879
2951
  data: t
2880
- }), v(e, new Set);
2881
- return s;
2882
- }, E = "undefined" != typeof self ? null === self || void 0 === self ? void 0 : self.fetch : "undefined" != typeof window ? null === window || void 0 === window ? void 0 : window.fetch : "undefined" != typeof global ? null === global || void 0 === global ? void 0 : global.fetch : void 0, T = Promise.resolve();
2883
- u("/");
2884
- const S = {
2952
+ }), b(e, new Set);
2953
+ return r;
2954
+ }, T = "undefined" != typeof self ? null === self || void 0 === self ? void 0 : self.fetch : "undefined" != typeof window ? null === window || void 0 === window ? void 0 : window.fetch : "undefined" != typeof global ? null === global || void 0 === global ? void 0 : global.fetch : void 0, S = Promise.resolve();
2955
+ d("/");
2956
+ const C = {
2885
2957
  name: "in-memory",
2886
- version: "2.18.0",
2887
- events: i,
2888
- access: async e => c(e),
2889
- accessSync: c,
2890
- addDestory: n,
2891
- copyFile: async (e, t) => (b(t, p(e)), !0),
2892
- createDir: async (e, t) => u(e, t),
2893
- createDirSync: u,
2958
+ version: "2.19.0",
2959
+ events: a,
2960
+ access: async e => u(e),
2961
+ accessSync: u,
2962
+ addDestory: o,
2963
+ copyFile: async (e, t) => (E(t, f(e)), !0),
2964
+ createDir: async (e, t) => d(e, t),
2965
+ createDirSync: d,
2894
2966
  homeDir: () => os__namespace.homedir(),
2895
2967
  isTTY: () => {
2896
2968
  var e;
@@ -2899,19 +2971,19 @@ const createSystem = e => {
2899
2971
  getEnvironmentVar: e => null == process__namespace ? void 0 : process__namespace.env[e],
2900
2972
  destroy: async () => {
2901
2973
  const e = [];
2902
- s.forEach((r => {
2974
+ n.forEach((t => {
2903
2975
  try {
2904
- const t = r();
2905
- t && t.then && e.push(t);
2976
+ const r = t();
2977
+ r && r.then && e.push(r);
2906
2978
  } catch (e) {
2907
- t.error(`stencil sys destroy: ${e}`);
2979
+ r.error(`stencil sys destroy: ${e}`);
2908
2980
  }
2909
- })), await Promise.all(e), s.clear();
2981
+ })), await Promise.all(e), n.clear();
2910
2982
  },
2911
2983
  encodeToBase64: e => btoa(unescape(encodeURIComponent(e))),
2912
- exit: async e => t.warn(`exit ${e}`),
2984
+ exit: async e => r.warn(`exit ${e}`),
2913
2985
  getCurrentDirectory: () => "/",
2914
- getCompilerExecutingPath: () => IS_WEB_WORKER_ENV ? location.href : S.getRemoteModuleUrl({
2986
+ getCompilerExecutingPath: () => IS_WEB_WORKER_ENV ? location.href : C.getRemoteModuleUrl({
2915
2987
  moduleId: "@stencil/core",
2916
2988
  path: "compiler/stencil.min.js"
2917
2989
  }),
@@ -2920,18 +2992,18 @@ const createSystem = e => {
2920
2992
  const t = `${e.moduleId}${e.version ? "@" + e.version : ""}/${e.path}`;
2921
2993
  return new URL(t, "https://cdn.jsdelivr.net/npm/").href;
2922
2994
  },
2923
- hardwareConcurrency: a,
2995
+ hardwareConcurrency: l,
2924
2996
  isSymbolicLink: async e => !1,
2925
- nextTick: e => T.then(e),
2926
- normalizePath: l,
2997
+ nextTick: e => S.then(e),
2998
+ normalizePath: c,
2927
2999
  platformPath: pathBrowserify,
2928
- readDir: async e => h(e),
2929
- readDirSync: h,
2930
- readFile: async e => p(e),
2931
- readFileSync: p,
2932
- realpath: async e => f(e),
2933
- realpathSync: f,
2934
- removeDestory: o,
3000
+ readDir: async e => p(e),
3001
+ readDirSync: p,
3002
+ readFile: async e => f(e),
3003
+ readFileSync: f,
3004
+ realpath: async e => m(e),
3005
+ realpathSync: m,
3006
+ removeDestory: i,
2935
3007
  rename: async (e, t) => {
2936
3008
  const r = {
2937
3009
  oldPath: e = normalizePath(e),
@@ -2944,39 +3016,39 @@ const createSystem = e => {
2944
3016
  isFile: !1,
2945
3017
  isDirectory: !1,
2946
3018
  error: null
2947
- }, s = w(e);
3019
+ }, s = _(e);
2948
3020
  if (s.error) r.error = `${e} does not exist`; else if (s.isFile ? r.isFile = !0 : s.isDirectory && (r.isDirectory = !0),
2949
- m(e, t, r), !r.error) if (r.isDirectory) {
2950
- const t = g(e, {
3021
+ g(e, t, r), !r.error) if (r.isDirectory) {
3022
+ const t = y(e, {
2951
3023
  recursive: !0
2952
3024
  });
2953
3025
  t.error ? r.error = t.error : (r.oldDirs.push(...t.removedDirs), r.oldFiles.push(...t.removedFiles));
2954
3026
  } else if (r.isFile) {
2955
- const t = _(e);
3027
+ const t = v(e);
2956
3028
  t.error ? r.error = t.error : r.oldFiles.push(e);
2957
3029
  }
2958
3030
  return r;
2959
3031
  },
2960
- fetch: E,
2961
- resolvePath: e => l(e),
2962
- removeDir: async (e, t = {}) => g(e, t),
2963
- removeDirSync: g,
2964
- stat: async e => w(e),
2965
- statSync: w,
3032
+ fetch: T,
3033
+ resolvePath: e => c(e),
3034
+ removeDir: async (e, t = {}) => y(e, t),
3035
+ removeDirSync: y,
3036
+ stat: async e => _(e),
3037
+ statSync: _,
2966
3038
  tmpDirSync: () => "/.tmp",
2967
- removeFile: async e => _(e),
2968
- removeFileSync: _,
3039
+ removeFile: async e => v(e),
3040
+ removeFileSync: v,
2969
3041
  watchDirectory: (e, t) => {
2970
- e = l(e);
2971
- const s = r.get(e), i = () => {
2972
- const s = r.get(e);
2973
- if (s && s.watcherCallbacks) {
2974
- const e = s.watcherCallbacks.indexOf(t);
2975
- e > -1 && s.watcherCallbacks.splice(e, 1);
3042
+ e = c(e);
3043
+ const r = s.get(e), n = () => {
3044
+ const r = s.get(e);
3045
+ if (r && r.watcherCallbacks) {
3046
+ const e = r.watcherCallbacks.indexOf(t);
3047
+ e > -1 && r.watcherCallbacks.splice(e, 1);
2976
3048
  }
2977
3049
  };
2978
- return n(i), s ? (s.isDirectory = !0, s.isFile = !1, s.watcherCallbacks = s.watcherCallbacks || [],
2979
- s.watcherCallbacks.push(t)) : r.set(e, {
3050
+ return o(n), r ? (r.isDirectory = !0, r.isFile = !1, r.watcherCallbacks = r.watcherCallbacks || [],
3051
+ r.watcherCallbacks.push(t)) : s.set(e, {
2980
3052
  basename: path$2.basename(e),
2981
3053
  dirname: path$2.dirname(e),
2982
3054
  isDirectory: !0,
@@ -2985,21 +3057,21 @@ const createSystem = e => {
2985
3057
  data: void 0
2986
3058
  }), {
2987
3059
  close() {
2988
- o(i), i();
3060
+ i(n), n();
2989
3061
  }
2990
3062
  };
2991
3063
  },
2992
3064
  watchFile: (e, t) => {
2993
- e = l(e);
2994
- const s = r.get(e), i = () => {
2995
- const s = r.get(e);
2996
- if (s && s.watcherCallbacks) {
2997
- const e = s.watcherCallbacks.indexOf(t);
2998
- e > -1 && s.watcherCallbacks.splice(e, 1);
3065
+ e = c(e);
3066
+ const r = s.get(e), n = () => {
3067
+ const r = s.get(e);
3068
+ if (r && r.watcherCallbacks) {
3069
+ const e = r.watcherCallbacks.indexOf(t);
3070
+ e > -1 && r.watcherCallbacks.splice(e, 1);
2999
3071
  }
3000
3072
  };
3001
- return n(i), s ? (s.isDirectory = !1, s.isFile = !0, s.watcherCallbacks = s.watcherCallbacks || [],
3002
- s.watcherCallbacks.push(t)) : r.set(e, {
3073
+ return o(n), r ? (r.isDirectory = !1, r.isFile = !0, r.watcherCallbacks = r.watcherCallbacks || [],
3074
+ r.watcherCallbacks.push(t)) : s.set(e, {
3003
3075
  basename: path$2.basename(e),
3004
3076
  dirname: path$2.dirname(e),
3005
3077
  isDirectory: !1,
@@ -3008,13 +3080,13 @@ const createSystem = e => {
3008
3080
  data: void 0
3009
3081
  }), {
3010
3082
  close() {
3011
- o(i), i();
3083
+ i(n), n();
3012
3084
  }
3013
3085
  };
3014
3086
  },
3015
3087
  watchTimeout: 32,
3016
- writeFile: async (e, t) => b(e, t),
3017
- writeFileSync: b,
3088
+ writeFile: async (e, t) => E(e, t),
3089
+ writeFileSync: E,
3018
3090
  generateContentHash: async (e, t) => {
3019
3091
  const r = await crypto.subtle.digest("SHA-256", (new TextEncoder).encode(e));
3020
3092
  let s = Array.from(new Uint8Array(r)).map((e => e.toString(16).padStart(2, "0"))).join("");
@@ -3085,7 +3157,7 @@ const createSystem = e => {
3085
3157
  },
3086
3158
  maxWorkers: u
3087
3159
  };
3088
- })(S, e) : null,
3160
+ })(C, e) : null,
3089
3161
  details: {
3090
3162
  cpuModel: "",
3091
3163
  freemem: () => 0,
@@ -3093,13 +3165,13 @@ const createSystem = e => {
3093
3165
  release: "",
3094
3166
  totalmem: 0
3095
3167
  },
3096
- copy: async (e, r) => (t.info("todo, copy task", e.length, r), {
3168
+ copy: async (e, t) => (r.info("todo, copy task", e.length, t), {
3097
3169
  diagnostics: [],
3098
3170
  dirPaths: [],
3099
3171
  filePaths: []
3100
3172
  })
3101
3173
  };
3102
- return S.resolveModuleId = e => ((e, t, r) => {
3174
+ return C.resolveModuleId = e => ((e, t, r) => {
3103
3175
  const s = ((e, t, r) => ({
3104
3176
  async isFile(s, n) {
3105
3177
  const o = normalizeFsPath(s);
@@ -3151,7 +3223,7 @@ const createSystem = e => {
3151
3223
  }
3152
3224
  }));
3153
3225
  }));
3154
- })(S, 0, e), S;
3226
+ })(C, 0, e), C;
3155
3227
  }, createTestingSystem = () => {
3156
3228
  let e = 0, t = 0;
3157
3229
  const r = createSystem();
@@ -3191,78 +3263,6 @@ const createSystem = e => {
3191
3263
  return r;
3192
3264
  };
3193
3265
 
3194
- class TestingLogger {
3195
- constructor() {
3196
- this.isEnabled = !1;
3197
- }
3198
- setLevel(e) {}
3199
- getLevel() {
3200
- return "info";
3201
- }
3202
- enableColors(e) {}
3203
- emoji(e) {
3204
- return "";
3205
- }
3206
- info(...e) {
3207
- this.isEnabled && console.log(...e);
3208
- }
3209
- warn(...e) {
3210
- this.isEnabled && console.warn(...e);
3211
- }
3212
- error(...e) {
3213
- this.isEnabled && console.error(...e);
3214
- }
3215
- debug(...e) {
3216
- this.isEnabled && console.log(...e);
3217
- }
3218
- color(e, t) {}
3219
- red(e) {
3220
- return e;
3221
- }
3222
- green(e) {
3223
- return e;
3224
- }
3225
- yellow(e) {
3226
- return e;
3227
- }
3228
- blue(e) {
3229
- return e;
3230
- }
3231
- magenta(e) {
3232
- return e;
3233
- }
3234
- cyan(e) {
3235
- return e;
3236
- }
3237
- gray(e) {
3238
- return e;
3239
- }
3240
- bold(e) {
3241
- return e;
3242
- }
3243
- dim(e) {
3244
- return e;
3245
- }
3246
- bgRed(e) {
3247
- return e;
3248
- }
3249
- createTimeSpan(e, t = !1) {
3250
- return {
3251
- duration: () => 0,
3252
- finish: () => 0
3253
- };
3254
- }
3255
- printDiagnostics(e) {}
3256
- }
3257
-
3258
- const createConfigFlags = (e = {}) => ({
3259
- task: null,
3260
- args: [],
3261
- knownArgs: [],
3262
- unknownArgs: [],
3263
- ...e
3264
- });
3265
-
3266
3266
  class EventSpy {
3267
3267
  constructor(e) {
3268
3268
  this.eventName = e, this.events = [], this.cursor = 0, this.queuedHandler = [];
@@ -3585,7 +3585,7 @@ class E2EElement extends index_cjs.MockHTMLElement {
3585
3585
  }
3586
3586
  }
3587
3587
 
3588
- const env = process.env;
3588
+ const env = process.env, isOutputTargetDistLazy = e => e.type === DIST_LAZY, isOutputTargetWww = e => e.type === WWW, DIST_LAZY = "dist-lazy", WWW = "www";
3589
3589
 
3590
3590
  exports.MockHeaders = MockHeaders, exports.MockRequest = MockRequest, exports.MockResponse = MockResponse,
3591
3591
  exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment() {
@@ -3997,20 +3997,21 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
3997
3997
  }, n = e.components.map((e => {
3998
3998
  if (null == e.COMPILER_META) throw new Error('Invalid component class: Missing static "COMPILER_META" property.');
3999
3999
  t.add(e.COMPILER_META.tagName), e.isProxied = !1, function r(e) {
4000
- "function" == typeof e.prototype.__componentWillLoad && (e.prototype.componentWillLoad = e.prototype.__componentWillLoad,
4001
- e.prototype.__componentWillLoad = null), "function" == typeof e.prototype.__componentWillUpdate && (e.prototype.componentWillUpdate = e.prototype.__componentWillUpdate,
4002
- e.prototype.__componentWillUpdate = null), "function" == typeof e.prototype.__componentWillRender && (e.prototype.componentWillRender = e.prototype.__componentWillRender,
4003
- e.prototype.__componentWillRender = null), "function" == typeof e.prototype.componentWillLoad && (e.prototype.__componentWillLoad = e.prototype.componentWillLoad,
4000
+ var t, r, s, n, o, i;
4001
+ "function" == typeof (null === (t = e.prototype) || void 0 === t ? void 0 : t.__componentWillLoad) && (e.prototype.componentWillLoad = e.prototype.__componentWillLoad,
4002
+ e.prototype.__componentWillLoad = null), "function" == typeof (null === (r = e.prototype) || void 0 === r ? void 0 : r.__componentWillUpdate) && (e.prototype.componentWillUpdate = e.prototype.__componentWillUpdate,
4003
+ e.prototype.__componentWillUpdate = null), "function" == typeof (null === (s = e.prototype) || void 0 === s ? void 0 : s.__componentWillRender) && (e.prototype.componentWillRender = e.prototype.__componentWillRender,
4004
+ e.prototype.__componentWillRender = null), "function" == typeof (null === (n = e.prototype) || void 0 === n ? void 0 : n.componentWillLoad) && (e.prototype.__componentWillLoad = e.prototype.componentWillLoad,
4004
4005
  e.prototype.componentWillLoad = function() {
4005
4006
  const e = this.__componentWillLoad();
4006
4007
  return null != e && "function" == typeof e.then ? testing.writeTask((() => e)) : testing.writeTask((() => Promise.resolve())),
4007
4008
  e;
4008
- }), "function" == typeof e.prototype.componentWillUpdate && (e.prototype.__componentWillUpdate = e.prototype.componentWillUpdate,
4009
+ }), "function" == typeof (null === (o = e.prototype) || void 0 === o ? void 0 : o.componentWillUpdate) && (e.prototype.__componentWillUpdate = e.prototype.componentWillUpdate,
4009
4010
  e.prototype.componentWillUpdate = function() {
4010
4011
  const e = this.__componentWillUpdate();
4011
4012
  return null != e && "function" == typeof e.then ? testing.writeTask((() => e)) : testing.writeTask((() => Promise.resolve())),
4012
4013
  e;
4013
- }), "function" == typeof e.prototype.componentWillRender && (e.prototype.__componentWillRender = e.prototype.componentWillRender,
4014
+ }), "function" == typeof (null === (i = e.prototype) || void 0 === i ? void 0 : i.componentWillRender) && (e.prototype.__componentWillRender = e.prototype.componentWillRender,
4014
4015
  e.prototype.componentWillRender = function() {
4015
4016
  const e = this.__componentWillRender();
4016
4017
  return null != e && "function" == typeof e.then ? testing.writeTask((() => e)) : testing.writeTask((() => Promise.resolve())),