@amazon/vinyl-util 1.2.0 → 2.0.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 (81) hide show
  1. package/dist/browserTestUtil/index.js +1850 -1850
  2. package/dist/browserTestUtil/index.js.map +4 -4
  3. package/dist/browserTestUtil/types/current/index.d.ts +17 -17
  4. package/dist/browserTestUtil/types/current/index.d.ts.map +1 -1
  5. package/dist/browserTestUtil/types/current/index.js +17 -17
  6. package/dist/browserTestUtil/types/current/tsconfig.tsbuildinfo +1 -1
  7. package/dist/browserTestUtil/types/ts3.7/index.d.ts +17 -17
  8. package/dist/browserTestUtil/types/ts4.1/index.d.ts +17 -17
  9. package/dist/browserTestUtil/types/ts4.7/index.d.ts +17 -17
  10. package/dist/index.cjs +4997 -4967
  11. package/dist/index.cjs.map +4 -4
  12. package/dist/index.js +4997 -4967
  13. package/dist/index.js.map +4 -4
  14. package/dist/polyfill/index.d.ts +1 -0
  15. package/dist/polyfill/index.d.ts.map +1 -1
  16. package/dist/polyfill/index.js +166 -103
  17. package/dist/polyfill/index.js.map +3 -3
  18. package/dist/polyfill/tsconfig.tsbuildinfo +1 -1
  19. package/dist/test/benchmark.es5.js +68 -68
  20. package/dist/test/benchmark.js +1518 -1517
  21. package/dist/test/benchmark.js.map +4 -4
  22. package/dist/testUtil/index.js +418 -418
  23. package/dist/testUtil/index.js.map +4 -4
  24. package/dist/testUtil/types/current/index.d.ts +16 -16
  25. package/dist/testUtil/types/current/index.d.ts.map +1 -1
  26. package/dist/testUtil/types/current/index.js +16 -16
  27. package/dist/testUtil/types/current/reporters/LogReporter.d.ts +1 -0
  28. package/dist/testUtil/types/current/reporters/LogReporter.d.ts.map +1 -1
  29. package/dist/testUtil/types/current/reporters/LogReporter.js +8 -0
  30. package/dist/testUtil/types/current/tsconfig.tsbuildinfo +1 -1
  31. package/dist/testUtil/types/current/util/event/createEventSpy.d.ts.map +1 -1
  32. package/dist/testUtil/types/current/util/event/createEventSpy.js +6 -4
  33. package/dist/testUtil/types/ts3.7/index.d.ts +16 -16
  34. package/dist/testUtil/types/ts3.7/reporters/LogReporter.d.ts +1 -0
  35. package/dist/testUtil/types/ts4.1/index.d.ts +16 -16
  36. package/dist/testUtil/types/ts4.1/reporters/LogReporter.d.ts +1 -0
  37. package/dist/testUtil/types/ts4.7/index.d.ts +16 -16
  38. package/dist/testUtil/types/ts4.7/reporters/LogReporter.d.ts +1 -0
  39. package/dist/types/current/event/nextEventAsPromise.d.ts +14 -4
  40. package/dist/types/current/event/nextEventAsPromise.d.ts.map +1 -1
  41. package/dist/types/current/event/nextEventAsPromise.js +8 -2
  42. package/dist/types/current/index.d.ts +114 -113
  43. package/dist/types/current/index.d.ts.map +1 -1
  44. package/dist/types/current/index.js +114 -113
  45. package/dist/types/current/tsconfig.tsbuildinfo +1 -1
  46. package/dist/types/current/util/async/poll.d.ts +34 -0
  47. package/dist/types/current/util/async/poll.d.ts.map +1 -0
  48. package/dist/types/current/util/async/poll.js +31 -0
  49. package/dist/types/current/util/async/sleep.d.ts +2 -1
  50. package/dist/types/current/util/async/sleep.d.ts.map +1 -1
  51. package/dist/types/current/util/async/timeout.d.ts +32 -10
  52. package/dist/types/current/util/async/timeout.d.ts.map +1 -1
  53. package/dist/types/current/util/async/timeout.js +7 -11
  54. package/dist/types/current/util/map/map.d.ts +1 -2
  55. package/dist/types/current/util/map/map.d.ts.map +1 -1
  56. package/dist/types/current/util/url/resolveUrl.d.ts +2 -1
  57. package/dist/types/current/util/url/resolveUrl.d.ts.map +1 -1
  58. package/dist/types/current/util/url/resolveUrl.js +9 -3
  59. package/dist/types/ts3.7/event/nextEventAsPromise.d.ts +14 -4
  60. package/dist/types/ts3.7/index.d.ts +114 -113
  61. package/dist/types/ts3.7/util/async/poll.d.ts +34 -0
  62. package/dist/types/ts3.7/util/async/sleep.d.ts +2 -1
  63. package/dist/types/ts3.7/util/async/timeout.d.ts +32 -10
  64. package/dist/types/ts3.7/util/map/map.d.ts +1 -2
  65. package/dist/types/ts3.7/util/url/resolveUrl.d.ts +2 -1
  66. package/dist/types/ts4.1/event/nextEventAsPromise.d.ts +14 -4
  67. package/dist/types/ts4.1/index.d.ts +114 -113
  68. package/dist/types/ts4.1/util/async/poll.d.ts +34 -0
  69. package/dist/types/ts4.1/util/async/sleep.d.ts +2 -1
  70. package/dist/types/ts4.1/util/async/timeout.d.ts +32 -10
  71. package/dist/types/ts4.1/util/map/map.d.ts +1 -2
  72. package/dist/types/ts4.1/util/url/resolveUrl.d.ts +2 -1
  73. package/dist/types/ts4.7/event/nextEventAsPromise.d.ts +14 -4
  74. package/dist/types/ts4.7/index.d.ts +114 -113
  75. package/dist/types/ts4.7/util/async/poll.d.ts +34 -0
  76. package/dist/types/ts4.7/util/async/sleep.d.ts +2 -1
  77. package/dist/types/ts4.7/util/async/timeout.d.ts +32 -10
  78. package/dist/types/ts4.7/util/map/map.d.ts +1 -2
  79. package/dist/types/ts4.7/util/url/resolveUrl.d.ts +2 -1
  80. package/dist/unit/types/current/tsconfig.tsbuildinfo +1 -1
  81. package/package.json +11 -11
@@ -28,503 +28,501 @@ var __objRest = (source, exclude) => {
28
28
  };
29
29
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
30
30
 
31
- // test/browserTestUtil/reporters/ConsoleReporter.ts
32
- var ConsoleReporter = class {
33
- constructor() {
34
- __publicField(this, "errors", []);
35
- }
36
- jasmineStarted(suiteInfo) {
37
- console.log(
38
- `Running suite with ${suiteInfo.totalSpecsDefined} specs, seed ${suiteInfo.order.seed}`
39
- );
40
- console.log(
41
- "Testing for UA:",
42
- typeof navigator === "object" ? navigator.userAgent : "Node.js/<21"
43
- );
44
- }
45
- specDone(result) {
46
- if (result.failedExpectations.length > 0) {
47
- console.warn(`Spec failed: ${result.fullName}`);
48
- for (let i = 0; i < result.failedExpectations.length; i++) {
49
- console.warn(`Failure: ${result.failedExpectations[i].message}`);
50
- console.warn(result.failedExpectations[i].stack);
51
- this.errors.push(result.failedExpectations[i]);
31
+ // test/browserTestUtil/async/async.ts
32
+ var scheduler = setTimeout;
33
+ function flushPromises() {
34
+ return new Promise((resolve) => {
35
+ scheduler(() => resolve(void 0));
36
+ });
37
+ }
38
+ function useMockTime() {
39
+ const clock = jasmine.clock();
40
+ beforeEach(() => {
41
+ clock.install();
42
+ clock.mockDate(/* @__PURE__ */ new Date(0));
43
+ });
44
+ afterEach(() => {
45
+ clock.uninstall();
46
+ });
47
+ const mockTime = {
48
+ async tick(...time) {
49
+ if (!time.length) {
50
+ clock.tick(0);
51
+ await flushPromises();
52
52
  }
53
+ for (const s of time) {
54
+ clock.tick(s * 1e3);
55
+ await flushPromises();
56
+ }
57
+ },
58
+ mockDate(date) {
59
+ clock.mockDate(date);
53
60
  }
54
- }
55
- jasmineDone() {
56
- if (this.errors.length > 0) {
57
- console.log(`There were ${this.errors.length} errors:`);
58
- this.errors.forEach((error, index) => {
59
- console.error(`Error ${index + 1}:`, error);
60
- });
61
- } else {
62
- console.log("No errors were found.");
63
- }
64
- }
65
- };
61
+ };
62
+ return mockTime;
63
+ }
66
64
 
67
- // test/browserTestUtil/mock/createSpyFactory.ts
68
- var createSpy = jasmine.createSpy;
69
- function createSpyFactory(createFake) {
70
- return (key) => {
71
- const spy = createSpy(String(key));
72
- if (createFake) spy.and.callFake(createFake(key));
73
- return spy;
65
+ // test/browserTestUtil/async/marble.ts
66
+ function marbleTest(init, legend, output) {
67
+ return async (input) => {
68
+ const test = await init();
69
+ for (let i = 0; i < input.length; i++) {
70
+ const char = input[i];
71
+ const action = legend[char];
72
+ if (!action) throw new Error(`Unknown marble: '${char}'`);
73
+ await action(test);
74
+ }
75
+ return output(test);
74
76
  };
75
77
  }
76
- function createSpy2(key) {
77
- return createSpy(String(key));
78
+
79
+ // test/browserTestUtil/async/createCallbackTimingTest.ts
80
+ var createSpy = jasmine.createSpy;
81
+ function createCallbackTimingTest(clock, wrapCallback) {
82
+ return marbleTest(
83
+ () => {
84
+ clock.mockDate(/* @__PURE__ */ new Date(0));
85
+ let _out = "";
86
+ let lastTimeMs = 0;
87
+ const writeTime = () => {
88
+ const nowMs = Date.now();
89
+ _out += "-".repeat((nowMs - lastTimeMs) / 1e3);
90
+ lastTimeMs = nowMs;
91
+ };
92
+ const spy = createSpy("inner").and.callFake(() => {
93
+ writeTime();
94
+ _out += "x";
95
+ });
96
+ const throttled = wrapCallback(spy);
97
+ return {
98
+ spy,
99
+ throttled,
100
+ get out() {
101
+ return _out;
102
+ }
103
+ };
104
+ },
105
+ {
106
+ "-": () => {
107
+ return clock.tick(1);
108
+ },
109
+ x: (test) => {
110
+ test.throttled();
111
+ }
112
+ },
113
+ async (o) => {
114
+ for (let i = 0; i < 10; i++) {
115
+ await clock.tick(1);
116
+ }
117
+ return o.out;
118
+ }
119
+ );
78
120
  }
79
121
 
80
- // test/browserTestUtil/mock/dom/lib.dom.ts
81
- var MockAbortController = class {
82
- constructor() {
83
- __publicField(this, "signal");
84
- __publicField(this, "abort", createSpy2("abort"));
122
+ // test/browserTestUtil/benchmark/Benchmark.ts
123
+ var now;
124
+ if (typeof window !== "undefined" && typeof window.performance !== "undefined" && typeof window.performance.now !== "undefined") {
125
+ now = () => window.performance.now();
126
+ } else if (typeof self !== "undefined" && typeof self.performance !== "undefined" && typeof self.performance.now !== "undefined") {
127
+ now = () => self.performance.now();
128
+ } else {
129
+ now = () => Date.now();
130
+ }
131
+ var BenchmarkRunResults = class {
132
+ constructor(name) {
133
+ __publicField(this, "name", name);
134
+ __publicField(this, "cycleResults", []);
135
+ __publicField(this, "_totalSamples", 0);
85
136
  }
86
- };
87
- var MockAbortSignal = class {
88
- constructor() {
89
- __publicField(this, "aborted", false);
90
- __publicField(this, "onabort", null);
91
- __publicField(this, "reason");
92
- __publicField(this, "throwIfAborted", createSpy2("throwIfAborted"));
93
- __publicField(this, "addEventListener", createSpy2("addEventListener"));
94
- __publicField(this, "removeEventListener", createSpy2(
95
- "removeEventListener"
96
- ));
97
- __publicField(this, "dispatchEvent", createSpy2("dispatchEvent"));
137
+ get totalSamples() {
138
+ return this._totalSamples;
98
139
  }
99
- };
100
- var MockAudioContext = class {
101
- constructor() {
102
- __publicField(this, "baseLatency", 0);
103
- __publicField(this, "outputLatency", 0);
104
- __publicField(this, "audioWorklet");
105
- __publicField(this, "currentTime", 0);
106
- __publicField(this, "destination");
107
- __publicField(this, "listener");
108
- __publicField(this, "onstatechange", null);
109
- __publicField(this, "sampleRate", 0);
110
- __publicField(this, "state", "closed");
111
- __publicField(this, "close", createSpy2("close"));
112
- __publicField(this, "createMediaElementSource", createSpy2("createMediaElementSource"));
113
- __publicField(this, "createMediaStreamDestination", createSpy2("createMediaStreamDestination"));
114
- __publicField(this, "createMediaStreamSource", createSpy2("createMediaStreamSource"));
115
- __publicField(this, "getOutputTimestamp", createSpy2("getOutputTimestamp"));
116
- __publicField(this, "resume", createSpy2("resume"));
117
- __publicField(this, "suspend", createSpy2("suspend"));
118
- __publicField(this, "addEventListener", createSpy2("addEventListener"));
119
- __publicField(this, "removeEventListener", createSpy2(
120
- "removeEventListener"
121
- ));
122
- __publicField(this, "createAnalyser", createSpy2("createAnalyser"));
123
- __publicField(this, "createBiquadFilter", createSpy2("createBiquadFilter"));
124
- __publicField(this, "createBuffer", createSpy2("createBuffer"));
125
- __publicField(this, "createBufferSource", createSpy2("createBufferSource"));
126
- __publicField(this, "createChannelMerger", createSpy2(
127
- "createChannelMerger"
128
- ));
129
- __publicField(this, "createChannelSplitter", createSpy2(
130
- "createChannelSplitter"
131
- ));
132
- __publicField(this, "createConstantSource", createSpy2(
133
- "createConstantSource"
134
- ));
135
- __publicField(this, "createConvolver", createSpy2("createConvolver"));
136
- __publicField(this, "createDelay", createSpy2("createDelay"));
137
- __publicField(this, "createDynamicsCompressor", createSpy2("createDynamicsCompressor"));
138
- __publicField(this, "createGain", createSpy2("createGain"));
139
- __publicField(this, "createIIRFilter", createSpy2("createIIRFilter"));
140
- __publicField(this, "createOscillator", createSpy2("createOscillator"));
141
- __publicField(this, "createPanner", createSpy2("createPanner"));
142
- __publicField(this, "createPeriodicWave", createSpy2("createPeriodicWave"));
143
- __publicField(this, "createScriptProcessor", createSpy2(
144
- "createScriptProcessor"
145
- ));
146
- __publicField(this, "createStereoPanner", createSpy2("createStereoPanner"));
147
- __publicField(this, "createWaveShaper", createSpy2("createWaveShaper"));
148
- __publicField(this, "decodeAudioData", createSpy2("decodeAudioData"));
149
- __publicField(this, "dispatchEvent", createSpy2("dispatchEvent"));
140
+ get cycleResultsNoOutliers() {
141
+ const sD = this.standardDeviation;
142
+ const avg = average(this.cycleResults);
143
+ return this.cycleResults.filter((e) => {
144
+ const zScore = (avg - e) / sD;
145
+ return Math.abs(zScore) < 3;
146
+ });
150
147
  }
151
- };
152
- var MockCache = class {
153
- constructor() {
154
- __publicField(this, "add", createSpy2("add"));
155
- __publicField(this, "addAll", createSpy2("addAll"));
156
- __publicField(this, "delete", createSpy2("delete"));
157
- __publicField(this, "keys", createSpy2("keys"));
158
- __publicField(this, "match", createSpy2("match"));
159
- __publicField(this, "matchAll", createSpy2("matchAll"));
160
- __publicField(this, "put", createSpy2("put"));
148
+ /**
149
+ * Returns the mean ops per second minus outliers of greater than 3 standard deviations.
150
+ */
151
+ get meanOpsPerSec() {
152
+ return average(this.cycleResultsNoOutliers);
161
153
  }
162
- };
163
- var MockCacheStorage = class {
164
- constructor() {
165
- __publicField(this, "delete", createSpy2("delete"));
166
- __publicField(this, "has", createSpy2("has"));
167
- __publicField(this, "keys", createSpy2("keys"));
168
- __publicField(this, "match", createSpy2("match"));
169
- __publicField(this, "open", createSpy2("open"));
154
+ get standardDeviation() {
155
+ return standardDeviation(this.cycleResults);
170
156
  }
171
- };
172
- var MockCustomEvent = class {
173
- constructor() {
174
- __publicField(this, "detail");
175
- __publicField(this, "bubbles", false);
176
- __publicField(this, "cancelBubble", false);
177
- __publicField(this, "cancelable", false);
178
- __publicField(this, "composed", false);
179
- __publicField(this, "currentTarget", null);
180
- __publicField(this, "defaultPrevented", false);
181
- __publicField(this, "eventPhase", 0);
182
- __publicField(this, "isTrusted", false);
183
- __publicField(this, "returnValue", false);
184
- __publicField(this, "srcElement", null);
185
- __publicField(this, "target", null);
186
- __publicField(this, "timeStamp", 0);
187
- __publicField(this, "type", "");
188
- __publicField(this, "NONE", 0);
189
- __publicField(this, "CAPTURING_PHASE", 1);
190
- __publicField(this, "AT_TARGET", 2);
191
- __publicField(this, "BUBBLING_PHASE", 3);
192
- __publicField(this, "initCustomEvent", createSpy2("initCustomEvent"));
193
- __publicField(this, "composedPath", createSpy2("composedPath"));
194
- __publicField(this, "initEvent", createSpy2("initEvent"));
195
- __publicField(this, "preventDefault", createSpy2("preventDefault"));
196
- __publicField(this, "stopImmediatePropagation", createSpy2("stopImmediatePropagation"));
197
- __publicField(this, "stopPropagation", createSpy2("stopPropagation"));
157
+ get variance() {
158
+ return this.standardDeviation / this.meanOpsPerSec;
159
+ }
160
+ /**
161
+ * Returns the mean ops / s ± variance % as a string.
162
+ */
163
+ get meanOpsStr() {
164
+ const mean = this.meanOpsPerSec.toLocaleString(void 0, {
165
+ maximumSignificantDigits: 4
166
+ });
167
+ const variance = this.variance.toLocaleString(void 0, {
168
+ style: "percent"
169
+ });
170
+ return `${mean} \xB1${variance}`;
171
+ }
172
+ add(cycle) {
173
+ const opsPerSecond = cycle.ops / cycle.duration;
174
+ let index = this.cycleResults.findIndex((value) => opsPerSecond < value);
175
+ if (index < 0) index = this.cycleResults.length;
176
+ this.cycleResults.splice(index, 0, opsPerSecond);
177
+ this._totalSamples += cycle.ops;
178
+ }
179
+ toString() {
180
+ if (!this.cycleResults.length) return "No results";
181
+ return `${this.name}: ${this.meanOpsStr} ops/sec`;
198
182
  }
199
183
  };
200
- var MockDocument = class {
201
- constructor() {
202
- __publicField(this, "URL", "");
203
- __publicField(this, "alinkColor", "");
204
- __publicField(this, "all");
205
- __publicField(this, "anchors");
206
- __publicField(this, "applets");
207
- __publicField(this, "bgColor", "");
208
- __publicField(this, "body");
209
- __publicField(this, "characterSet", "");
210
- __publicField(this, "charset", "");
211
- __publicField(this, "compatMode", "");
212
- __publicField(this, "contentType", "");
213
- __publicField(this, "cookie", "");
214
- __publicField(this, "currentScript");
215
- __publicField(this, "defaultView");
216
- __publicField(this, "designMode", "");
217
- __publicField(this, "dir", "");
218
- __publicField(this, "doctype", null);
219
- __publicField(this, "documentElement");
220
- __publicField(this, "documentURI", "");
221
- __publicField(this, "domain", "");
222
- __publicField(this, "embeds");
223
- __publicField(this, "fgColor", "");
224
- __publicField(this, "forms");
225
- __publicField(this, "fragmentDirective");
226
- __publicField(this, "fullscreen", false);
227
- __publicField(this, "fullscreenEnabled", false);
228
- __publicField(this, "head");
229
- __publicField(this, "hidden", false);
230
- __publicField(this, "images");
231
- __publicField(this, "implementation");
232
- __publicField(this, "inputEncoding", "");
233
- __publicField(this, "lastModified", "");
234
- __publicField(this, "linkColor", "");
235
- __publicField(this, "links");
236
- __publicField(this, "onfullscreenchange", null);
237
- __publicField(this, "onfullscreenerror", null);
238
- __publicField(this, "onpointerlockchange", null);
239
- __publicField(this, "onpointerlockerror", null);
240
- __publicField(this, "onreadystatechange", null);
241
- __publicField(this, "onvisibilitychange", null);
242
- __publicField(this, "ownerDocument", null);
243
- __publicField(this, "pictureInPictureEnabled", false);
244
- __publicField(this, "plugins");
245
- __publicField(this, "readyState", "complete");
246
- __publicField(this, "referrer", "");
247
- __publicField(this, "rootElement", null);
248
- __publicField(this, "scripts");
249
- __publicField(this, "scrollingElement", null);
250
- __publicField(this, "timeline");
251
- __publicField(this, "title", "");
252
- __publicField(this, "visibilityState", "hidden");
253
- __publicField(this, "vlinkColor", "");
254
- __publicField(this, "location");
255
- __publicField(this, "textContent", null);
256
- __publicField(this, "baseURI", "");
257
- __publicField(this, "childNodes");
258
- __publicField(this, "firstChild", null);
259
- __publicField(this, "isConnected", false);
260
- __publicField(this, "lastChild", null);
261
- __publicField(this, "nextSibling", null);
262
- __publicField(this, "nodeName", "");
263
- __publicField(this, "nodeType", 0);
264
- __publicField(this, "nodeValue", "");
265
- __publicField(this, "parentElement", null);
266
- __publicField(this, "parentNode", null);
267
- __publicField(this, "previousSibling", null);
268
- __publicField(this, "ELEMENT_NODE", 1);
269
- __publicField(this, "ATTRIBUTE_NODE", 2);
270
- __publicField(this, "TEXT_NODE", 3);
271
- __publicField(this, "CDATA_SECTION_NODE", 4);
272
- __publicField(this, "ENTITY_REFERENCE_NODE", 5);
273
- __publicField(this, "ENTITY_NODE", 6);
274
- __publicField(this, "PROCESSING_INSTRUCTION_NODE", 7);
275
- __publicField(this, "COMMENT_NODE", 8);
276
- __publicField(this, "DOCUMENT_NODE", 9);
277
- __publicField(this, "DOCUMENT_TYPE_NODE", 10);
278
- __publicField(this, "DOCUMENT_FRAGMENT_NODE", 11);
279
- __publicField(this, "NOTATION_NODE", 12);
280
- __publicField(this, "DOCUMENT_POSITION_DISCONNECTED", 1);
281
- __publicField(this, "DOCUMENT_POSITION_PRECEDING", 2);
282
- __publicField(this, "DOCUMENT_POSITION_FOLLOWING", 4);
283
- __publicField(this, "DOCUMENT_POSITION_CONTAINS", 8);
284
- __publicField(this, "DOCUMENT_POSITION_CONTAINED_BY", 16);
285
- __publicField(this, "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", 32);
286
- __publicField(this, "activeElement", null);
287
- __publicField(this, "adoptedStyleSheets", []);
288
- __publicField(this, "fullscreenElement", null);
289
- __publicField(this, "pictureInPictureElement", null);
290
- __publicField(this, "pointerLockElement", null);
291
- __publicField(this, "styleSheets");
292
- __publicField(this, "fonts");
293
- __publicField(this, "onabort", null);
294
- __publicField(this, "onanimationcancel", null);
295
- __publicField(this, "onanimationend", null);
296
- __publicField(this, "onanimationiteration", null);
297
- __publicField(this, "onanimationstart", null);
298
- __publicField(this, "onauxclick", null);
299
- __publicField(this, "onbeforeinput", null);
300
- __publicField(this, "onbeforematch", null);
301
- __publicField(this, "onbeforetoggle", null);
302
- __publicField(this, "onblur", null);
303
- __publicField(this, "oncancel", null);
304
- __publicField(this, "oncanplay", null);
305
- __publicField(this, "oncanplaythrough", null);
306
- __publicField(this, "onchange", null);
307
- __publicField(this, "onclick", null);
308
- __publicField(this, "onclose", null);
309
- __publicField(this, "oncontextlost", null);
310
- __publicField(this, "oncontextmenu", null);
311
- __publicField(this, "oncontextrestored", null);
312
- __publicField(this, "oncopy", null);
313
- __publicField(this, "oncuechange", null);
314
- __publicField(this, "oncut", null);
315
- __publicField(this, "ondblclick", null);
316
- __publicField(this, "ondrag", null);
317
- __publicField(this, "ondragend", null);
318
- __publicField(this, "ondragenter", null);
319
- __publicField(this, "ondragleave", null);
320
- __publicField(this, "ondragover", null);
321
- __publicField(this, "ondragstart", null);
322
- __publicField(this, "ondrop", null);
323
- __publicField(this, "ondurationchange", null);
324
- __publicField(this, "onemptied", null);
325
- __publicField(this, "onended", null);
326
- __publicField(this, "onerror");
327
- __publicField(this, "onfocus", null);
328
- __publicField(this, "onformdata", null);
329
- __publicField(this, "ongotpointercapture", null);
330
- __publicField(this, "oninput", null);
331
- __publicField(this, "oninvalid", null);
332
- __publicField(this, "onkeydown", null);
333
- __publicField(this, "onkeypress", null);
334
- __publicField(this, "onkeyup", null);
335
- __publicField(this, "onload", null);
336
- __publicField(this, "onloadeddata", null);
337
- __publicField(this, "onloadedmetadata", null);
338
- __publicField(this, "onloadstart", null);
339
- __publicField(this, "onlostpointercapture", null);
340
- __publicField(this, "onmousedown", null);
341
- __publicField(this, "onmouseenter", null);
342
- __publicField(this, "onmouseleave", null);
343
- __publicField(this, "onmousemove", null);
344
- __publicField(this, "onmouseout", null);
345
- __publicField(this, "onmouseover", null);
346
- __publicField(this, "onmouseup", null);
347
- __publicField(this, "onpaste", null);
348
- __publicField(this, "onpause", null);
349
- __publicField(this, "onplay", null);
350
- __publicField(this, "onplaying", null);
351
- __publicField(this, "onpointercancel", null);
352
- __publicField(this, "onpointerdown", null);
353
- __publicField(this, "onpointerenter", null);
354
- __publicField(this, "onpointerleave", null);
355
- __publicField(this, "onpointermove", null);
356
- __publicField(this, "onpointerout", null);
357
- __publicField(this, "onpointerover", null);
358
- __publicField(this, "onpointerrawupdate", null);
359
- __publicField(this, "onpointerup", null);
360
- __publicField(this, "onprogress", null);
361
- __publicField(this, "onratechange", null);
362
- __publicField(this, "onreset", null);
363
- __publicField(this, "onresize", null);
364
- __publicField(this, "onscroll", null);
365
- __publicField(this, "onscrollend", null);
366
- __publicField(this, "onsecuritypolicyviolation", null);
367
- __publicField(this, "onseeked", null);
368
- __publicField(this, "onseeking", null);
369
- __publicField(this, "onselect", null);
370
- __publicField(this, "onselectionchange", null);
371
- __publicField(this, "onselectstart", null);
372
- __publicField(this, "onslotchange", null);
373
- __publicField(this, "onstalled", null);
374
- __publicField(this, "onsubmit", null);
375
- __publicField(this, "onsuspend", null);
376
- __publicField(this, "ontimeupdate", null);
377
- __publicField(this, "ontoggle", null);
378
- __publicField(this, "ontransitioncancel", null);
379
- __publicField(this, "ontransitionend", null);
380
- __publicField(this, "ontransitionrun", null);
381
- __publicField(this, "ontransitionstart", null);
382
- __publicField(this, "onvolumechange", null);
383
- __publicField(this, "onwaiting", null);
384
- __publicField(this, "onwebkitanimationend", null);
385
- __publicField(this, "onwebkitanimationiteration", null);
386
- __publicField(this, "onwebkitanimationstart", null);
387
- __publicField(this, "onwebkittransitionend", null);
388
- __publicField(this, "onwheel", null);
389
- __publicField(this, "childElementCount", 0);
390
- __publicField(this, "children");
391
- __publicField(this, "firstElementChild", null);
392
- __publicField(this, "lastElementChild", null);
393
- __publicField(this, "adoptNode", createSpy2("adoptNode"));
394
- __publicField(this, "captureEvents", createSpy2("captureEvents"));
395
- __publicField(this, "caretPositionFromPoint", createSpy2(
396
- "caretPositionFromPoint"
397
- ));
398
- __publicField(this, "caretRangeFromPoint", createSpy2(
399
- "caretRangeFromPoint"
400
- ));
401
- __publicField(this, "clear", createSpy2("clear"));
402
- __publicField(this, "close", createSpy2("close"));
403
- __publicField(this, "createAttribute", createSpy2("createAttribute"));
404
- __publicField(this, "createAttributeNS", createSpy2("createAttributeNS"));
405
- __publicField(this, "createCDATASection", createSpy2("createCDATASection"));
406
- __publicField(this, "createComment", createSpy2("createComment"));
407
- __publicField(this, "createDocumentFragment", createSpy2(
408
- "createDocumentFragment"
409
- ));
410
- __publicField(this, "createElement", createSpy2("createElement"));
411
- __publicField(this, "createElementNS", createSpy2("createElementNS"));
412
- __publicField(this, "createEvent", createSpy2("createEvent"));
413
- __publicField(this, "createNodeIterator", createSpy2("createNodeIterator"));
414
- __publicField(this, "createProcessingInstruction", createSpy2("createProcessingInstruction"));
415
- __publicField(this, "createRange", createSpy2("createRange"));
416
- __publicField(this, "createTextNode", createSpy2("createTextNode"));
417
- __publicField(this, "createTreeWalker", createSpy2("createTreeWalker"));
418
- __publicField(this, "execCommand", createSpy2("execCommand"));
419
- __publicField(this, "exitFullscreen", createSpy2("exitFullscreen"));
420
- __publicField(this, "exitPictureInPicture", createSpy2(
421
- "exitPictureInPicture"
422
- ));
423
- __publicField(this, "exitPointerLock", createSpy2("exitPointerLock"));
424
- __publicField(this, "getElementById", createSpy2("getElementById"));
425
- __publicField(this, "getElementsByClassName", createSpy2(
426
- "getElementsByClassName"
427
- ));
428
- __publicField(this, "getElementsByName", createSpy2("getElementsByName"));
429
- __publicField(this, "getElementsByTagName", createSpy2(
430
- "getElementsByTagName"
431
- ));
432
- __publicField(this, "getElementsByTagNameNS", createSpy2(
433
- "getElementsByTagNameNS"
434
- ));
435
- __publicField(this, "getSelection", createSpy2("getSelection"));
436
- __publicField(this, "hasFocus", createSpy2("hasFocus"));
437
- __publicField(this, "hasStorageAccess", createSpy2("hasStorageAccess"));
438
- __publicField(this, "importNode", createSpy2("importNode"));
439
- __publicField(this, "open", createSpy2("open"));
440
- __publicField(this, "queryCommandEnabled", createSpy2(
441
- "queryCommandEnabled"
442
- ));
443
- __publicField(this, "queryCommandIndeterm", createSpy2(
444
- "queryCommandIndeterm"
184
+ var RunResultsComparison = class {
185
+ constructor(name, results) {
186
+ __publicField(this, "name", name);
187
+ /**
188
+ * Sorted by median ops/s from slowest to fastest.
189
+ */
190
+ __publicField(this, "results");
191
+ this.results = results.sort((a, b) => {
192
+ return a.meanOpsPerSec - b.meanOpsPerSec;
193
+ });
194
+ }
195
+ logToTable() {
196
+ const r = this.results.map((run) => {
197
+ const variance = run.variance.toLocaleString(void 0, {
198
+ style: "percent"
199
+ });
200
+ const mean = run.meanOpsPerSec.toLocaleString(void 0, {
201
+ maximumSignificantDigits: 4
202
+ });
203
+ return {
204
+ Name: run.name,
205
+ Mean: `${mean} \xB1${variance}`,
206
+ Samples: run.totalSamples,
207
+ Compare: this.runComparisonToString(run)
208
+ };
209
+ });
210
+ const table = r.reduce((acc, _a) => {
211
+ var _b = _a, { Name } = _b, x = __objRest(_b, ["Name"]);
212
+ acc[Name] = x;
213
+ return acc;
214
+ }, {});
215
+ console.log("\n" + this.name);
216
+ console.table(table);
217
+ }
218
+ runComparisonToString(run) {
219
+ var _a, _b;
220
+ const baseline = (_b = (_a = this.results[0]) == null ? void 0 : _a.meanOpsPerSec) != null ? _b : 0;
221
+ const fasterPercent = run.meanOpsPerSec / baseline - 1;
222
+ return fasterPercent < 0.01 ? "-" : fasterPercent.toLocaleString(void 0, {
223
+ style: "percent"
224
+ }) + " faster";
225
+ }
226
+ };
227
+ function compareResults(name, ...results) {
228
+ return new RunResultsComparison(name, results);
229
+ }
230
+ var defaultBenchmarkOptions = {
231
+ warmupTime: 0.5,
232
+ maxCycleDuration: 0.5,
233
+ cycles: 9
234
+ };
235
+ var _Benchmark = class _Benchmark {
236
+ /**
237
+ * Constructs a new Benchmark.
238
+ *
239
+ * @param name The name of the benchmark, to be used when logging.
240
+ * @param executor The method to execute and measure. If this method returns a promise, the
241
+ * promise will be awaited. The executor should either always return a promise, or never.
242
+ * @param options Optional configuration for the benchmark.
243
+ */
244
+ constructor(name, executor, options) {
245
+ __publicField(this, "name", name);
246
+ __publicField(this, "executor", executor);
247
+ __publicField(this, "options");
248
+ this.options = __spreadValues(__spreadValues({}, defaultBenchmarkOptions), options);
249
+ }
250
+ async run() {
251
+ const opts = this.options;
252
+ await _Benchmark.semaphore;
253
+ const warmupTimeMs = opts.warmupTime * 1e3;
254
+ const cycleStart = now();
255
+ let isAsync = false;
256
+ do {
257
+ const result = this.executor();
258
+ isAsync = isAsync || result && typeof result.then === "function";
259
+ if (isAsync) await result;
260
+ } while (now() - cycleStart < warmupTimeMs);
261
+ const resultsPromise = (async () => {
262
+ const results = new BenchmarkRunResults(this.name);
263
+ for (let i = 0; i < opts.cycles; i++) {
264
+ const cycleResults = await this.runCycle(isAsync);
265
+ results.add(cycleResults);
266
+ await nextFrame();
267
+ }
268
+ return results;
269
+ })();
270
+ _Benchmark.semaphore = resultsPromise;
271
+ return await resultsPromise;
272
+ }
273
+ /**
274
+ * Runs one cycle. A cycle will repeat the executor approximately `options.maxCycleDuration`
275
+ * seconds.
276
+ *
277
+ * @param isAsync
278
+ * @return Returns the duration (in seconds) and number of operations the cycle repeated.
279
+ */
280
+ async runCycle(isAsync) {
281
+ const cycleMs = this.options.maxCycleDuration * 1e3;
282
+ let ops = 0;
283
+ const cycleStart = now();
284
+ do {
285
+ const result = this.executor();
286
+ if (isAsync) await result;
287
+ ops++;
288
+ } while (now() - cycleStart < cycleMs);
289
+ const duration = (now() - cycleStart) / 1e3;
290
+ return {
291
+ duration,
292
+ ops
293
+ };
294
+ }
295
+ };
296
+ __publicField(_Benchmark, "semaphore", nextFrame());
297
+ var Benchmark = _Benchmark;
298
+ function benchmark(name, executor, options) {
299
+ const benchmark2 = new Benchmark(name, executor, options);
300
+ return benchmark2.run().then((results) => {
301
+ console.log(results.toString());
302
+ return results;
303
+ });
304
+ }
305
+ function nextFrame() {
306
+ return new Promise((resolve) => {
307
+ setTimeout(resolve);
308
+ });
309
+ }
310
+ function standardDeviation(values) {
311
+ const avg = average(values);
312
+ const squareDiffs = values.map((value) => {
313
+ const diff = value - avg;
314
+ return diff * diff;
315
+ });
316
+ const avgSquareDiff = average(squareDiffs);
317
+ return Math.sqrt(avgSquareDiff);
318
+ }
319
+ function average(values) {
320
+ const sum = values.reduce((acc, value) => acc + value, 0);
321
+ return sum / values.length;
322
+ }
323
+
324
+ // test/browserTestUtil/env/jasmineEnv.ts
325
+ var nextTestTimeoutOverridden = false;
326
+ function setTestTimeout(timeout) {
327
+ let originalTimeout = null;
328
+ beforeEach(() => {
329
+ originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
330
+ if (!nextTestTimeoutOverridden)
331
+ jasmine.DEFAULT_TIMEOUT_INTERVAL = timeout * 1e3;
332
+ });
333
+ afterEach(() => {
334
+ if (originalTimeout) jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
335
+ if (nextTestTimeoutOverridden) nextTestTimeoutOverridden = false;
336
+ });
337
+ }
338
+ function setNextTestTimeout(timeout) {
339
+ nextTestTimeoutOverridden = true;
340
+ jasmine.DEFAULT_TIMEOUT_INTERVAL = timeout * 1e3;
341
+ }
342
+
343
+ // test/browserTestUtil/expect/expectIterableEquals.ts
344
+ function expectIterableEquals(arr1, arr2) {
345
+ expect(Array.from(arr1)).toEqual(Array.from(arr2));
346
+ }
347
+
348
+ // test/browserTestUtil/expect/expectNothing.ts
349
+ function expectNothing() {
350
+ expect(true).toBeTruthy();
351
+ }
352
+
353
+ // test/browserTestUtil/expect/prototype.ts
354
+ function expectPrototype(factory, ...classes) {
355
+ const e = factory();
356
+ classes.forEach((clazz) => expect(e).toBeInstanceOf(clazz));
357
+ const spy = spyOn(classes[classes.length - 1], "call");
358
+ spy.and.returnValue(null);
359
+ const e2 = factory();
360
+ classes.forEach((clazz) => expect(e2).toBeInstanceOf(clazz));
361
+ }
362
+
363
+ // test/browserTestUtil/expect/typesafety.ts
364
+ function expectTypeStrictlyEquals(_matches) {
365
+ expect(true).toBeTrue();
366
+ }
367
+ function expectTypeEquals(_matches) {
368
+ expect(true).toBeTrue();
369
+ }
370
+ function expectTypeExtends(_matches) {
371
+ expect(true).toBeTrue();
372
+ }
373
+ function expectTypeTrue() {
374
+ expect(true).toBeTrue();
375
+ }
376
+ function expectTypeFalse() {
377
+ expect(true).toBeTrue();
378
+ }
379
+
380
+ // test/browserTestUtil/matchers/toBeCloseToWithin.ts
381
+ function addToBeCloseToWithin() {
382
+ beforeEach(function() {
383
+ jasmine.addMatchers({
384
+ toBeCloseToWithin: function() {
385
+ return {
386
+ compare: function(actual, expected, tolerance = Number.EPSILON) {
387
+ if (tolerance == null) {
388
+ throw new Error("You must supply a tolerance value");
389
+ }
390
+ const pass = Math.abs(expected - actual) <= tolerance;
391
+ const message = pass ? `Expected ${actual} to be close to ${expected} with tolerance ${tolerance}` : `Expected ${actual} to be close to ${expected} with tolerance ${tolerance}, but it was not`;
392
+ return { pass, message };
393
+ }
394
+ };
395
+ }
396
+ });
397
+ });
398
+ }
399
+
400
+ // test/browserTestUtil/matchers/customMatchers.ts
401
+ function addCustomMatchers() {
402
+ addToBeCloseToWithin();
403
+ }
404
+
405
+ // test/browserTestUtil/mock/asSpy.ts
406
+ function asSpy(object, method) {
407
+ if (object == null || object[method] == null) {
408
+ throw new Error("method not implemented");
409
+ }
410
+ const fun = object[method];
411
+ if ("calls" in fun) {
412
+ return fun;
413
+ } else {
414
+ return spyOn(object, method);
415
+ }
416
+ }
417
+
418
+ // test/browserTestUtil/mock/createSpyFactory.ts
419
+ var createSpy2 = jasmine.createSpy;
420
+ function createSpyFactory(createFake) {
421
+ return (key) => {
422
+ const spy = createSpy2(String(key));
423
+ if (createFake) spy.and.callFake(createFake(key));
424
+ return spy;
425
+ };
426
+ }
427
+ function createSpy22(key) {
428
+ return createSpy2(String(key));
429
+ }
430
+
431
+ // test/browserTestUtil/mock/dom/lib.dom.ts
432
+ var MockAbortController = class {
433
+ constructor() {
434
+ __publicField(this, "signal");
435
+ __publicField(this, "abort", createSpy22("abort"));
436
+ }
437
+ };
438
+ var MockAbortSignal = class {
439
+ constructor() {
440
+ __publicField(this, "aborted", false);
441
+ __publicField(this, "onabort", null);
442
+ __publicField(this, "reason");
443
+ __publicField(this, "throwIfAborted", createSpy22("throwIfAborted"));
444
+ __publicField(this, "addEventListener", createSpy22("addEventListener"));
445
+ __publicField(this, "removeEventListener", createSpy22(
446
+ "removeEventListener"
445
447
  ));
446
- __publicField(this, "queryCommandState", createSpy2("queryCommandState"));
447
- __publicField(this, "queryCommandSupported", createSpy2(
448
- "queryCommandSupported"
448
+ __publicField(this, "dispatchEvent", createSpy22("dispatchEvent"));
449
+ }
450
+ };
451
+ var MockAudioContext = class {
452
+ constructor() {
453
+ __publicField(this, "baseLatency", 0);
454
+ __publicField(this, "outputLatency", 0);
455
+ __publicField(this, "audioWorklet");
456
+ __publicField(this, "currentTime", 0);
457
+ __publicField(this, "destination");
458
+ __publicField(this, "listener");
459
+ __publicField(this, "onstatechange", null);
460
+ __publicField(this, "sampleRate", 0);
461
+ __publicField(this, "state", "closed");
462
+ __publicField(this, "close", createSpy22("close"));
463
+ __publicField(this, "createMediaElementSource", createSpy22("createMediaElementSource"));
464
+ __publicField(this, "createMediaStreamDestination", createSpy22("createMediaStreamDestination"));
465
+ __publicField(this, "createMediaStreamSource", createSpy22("createMediaStreamSource"));
466
+ __publicField(this, "getOutputTimestamp", createSpy22("getOutputTimestamp"));
467
+ __publicField(this, "resume", createSpy22("resume"));
468
+ __publicField(this, "suspend", createSpy22("suspend"));
469
+ __publicField(this, "addEventListener", createSpy22("addEventListener"));
470
+ __publicField(this, "removeEventListener", createSpy22(
471
+ "removeEventListener"
449
472
  ));
450
- __publicField(this, "queryCommandValue", createSpy2("queryCommandValue"));
451
- __publicField(this, "releaseEvents", createSpy2("releaseEvents"));
452
- __publicField(this, "requestStorageAccess", createSpy2(
453
- "requestStorageAccess"
473
+ __publicField(this, "createAnalyser", createSpy22("createAnalyser"));
474
+ __publicField(this, "createBiquadFilter", createSpy22("createBiquadFilter"));
475
+ __publicField(this, "createBuffer", createSpy22("createBuffer"));
476
+ __publicField(this, "createBufferSource", createSpy22("createBufferSource"));
477
+ __publicField(this, "createChannelMerger", createSpy22(
478
+ "createChannelMerger"
454
479
  ));
455
- __publicField(this, "startViewTransition", createSpy2(
456
- "startViewTransition"
480
+ __publicField(this, "createChannelSplitter", createSpy22(
481
+ "createChannelSplitter"
457
482
  ));
458
- __publicField(this, "write", createSpy2("write"));
459
- __publicField(this, "writeln", createSpy2("writeln"));
460
- __publicField(this, "addEventListener", createSpy2("addEventListener"));
461
- __publicField(this, "removeEventListener", createSpy2(
462
- "removeEventListener"
483
+ __publicField(this, "createConstantSource", createSpy22(
484
+ "createConstantSource"
463
485
  ));
464
- __publicField(this, "appendChild", createSpy2("appendChild"));
465
- __publicField(this, "cloneNode", createSpy2("cloneNode"));
466
- __publicField(this, "compareDocumentPosition", createSpy2(
467
- "compareDocumentPosition"
486
+ __publicField(this, "createConvolver", createSpy22("createConvolver"));
487
+ __publicField(this, "createDelay", createSpy22("createDelay"));
488
+ __publicField(this, "createDynamicsCompressor", createSpy22("createDynamicsCompressor"));
489
+ __publicField(this, "createGain", createSpy22("createGain"));
490
+ __publicField(this, "createIIRFilter", createSpy22("createIIRFilter"));
491
+ __publicField(this, "createOscillator", createSpy22("createOscillator"));
492
+ __publicField(this, "createPanner", createSpy22("createPanner"));
493
+ __publicField(this, "createPeriodicWave", createSpy22("createPeriodicWave"));
494
+ __publicField(this, "createScriptProcessor", createSpy22(
495
+ "createScriptProcessor"
468
496
  ));
469
- __publicField(this, "contains", createSpy2("contains"));
470
- __publicField(this, "getRootNode", createSpy2("getRootNode"));
471
- __publicField(this, "hasChildNodes", createSpy2("hasChildNodes"));
472
- __publicField(this, "insertBefore", createSpy2("insertBefore"));
473
- __publicField(this, "isDefaultNamespace", createSpy2("isDefaultNamespace"));
474
- __publicField(this, "isEqualNode", createSpy2("isEqualNode"));
475
- __publicField(this, "isSameNode", createSpy2("isSameNode"));
476
- __publicField(this, "lookupNamespaceURI", createSpy2("lookupNamespaceURI"));
477
- __publicField(this, "lookupPrefix", createSpy2("lookupPrefix"));
478
- __publicField(this, "normalize", createSpy2("normalize"));
479
- __publicField(this, "removeChild", createSpy2("removeChild"));
480
- __publicField(this, "replaceChild", createSpy2("replaceChild"));
481
- __publicField(this, "elementFromPoint", createSpy2("elementFromPoint"));
482
- __publicField(this, "elementsFromPoint", createSpy2("elementsFromPoint"));
483
- __publicField(this, "getAnimations", createSpy2("getAnimations"));
484
- __publicField(this, "append", createSpy2("append"));
485
- __publicField(this, "prepend", createSpy2("prepend"));
486
- __publicField(this, "querySelector", createSpy2("querySelector"));
487
- __publicField(this, "querySelectorAll", createSpy2("querySelectorAll"));
488
- __publicField(this, "replaceChildren", createSpy2("replaceChildren"));
489
- __publicField(this, "createExpression", createSpy2("createExpression"));
490
- __publicField(this, "createNSResolver", createSpy2("createNSResolver"));
491
- __publicField(this, "evaluate", createSpy2("evaluate"));
492
- __publicField(this, "dispatchEvent", createSpy2("dispatchEvent"));
497
+ __publicField(this, "createStereoPanner", createSpy22("createStereoPanner"));
498
+ __publicField(this, "createWaveShaper", createSpy22("createWaveShaper"));
499
+ __publicField(this, "decodeAudioData", createSpy22("decodeAudioData"));
500
+ __publicField(this, "dispatchEvent", createSpy22("dispatchEvent"));
493
501
  }
494
502
  };
495
- var MockErrorEvent = class {
503
+ var MockCache = class {
496
504
  constructor() {
497
- __publicField(this, "colno", 0);
498
- __publicField(this, "error");
499
- __publicField(this, "filename", "");
500
- __publicField(this, "lineno", 0);
501
- __publicField(this, "message", "");
502
- __publicField(this, "bubbles", false);
503
- __publicField(this, "cancelBubble", false);
504
- __publicField(this, "cancelable", false);
505
- __publicField(this, "composed", false);
506
- __publicField(this, "currentTarget", null);
507
- __publicField(this, "defaultPrevented", false);
508
- __publicField(this, "eventPhase", 0);
509
- __publicField(this, "isTrusted", false);
510
- __publicField(this, "returnValue", false);
511
- __publicField(this, "srcElement", null);
512
- __publicField(this, "target", null);
513
- __publicField(this, "timeStamp", 0);
514
- __publicField(this, "type", "");
515
- __publicField(this, "NONE", 0);
516
- __publicField(this, "CAPTURING_PHASE", 1);
517
- __publicField(this, "AT_TARGET", 2);
518
- __publicField(this, "BUBBLING_PHASE", 3);
519
- __publicField(this, "composedPath", createSpy2("composedPath"));
520
- __publicField(this, "initEvent", createSpy2("initEvent"));
521
- __publicField(this, "preventDefault", createSpy2("preventDefault"));
522
- __publicField(this, "stopImmediatePropagation", createSpy2("stopImmediatePropagation"));
523
- __publicField(this, "stopPropagation", createSpy2("stopPropagation"));
505
+ __publicField(this, "add", createSpy22("add"));
506
+ __publicField(this, "addAll", createSpy22("addAll"));
507
+ __publicField(this, "delete", createSpy22("delete"));
508
+ __publicField(this, "keys", createSpy22("keys"));
509
+ __publicField(this, "match", createSpy22("match"));
510
+ __publicField(this, "matchAll", createSpy22("matchAll"));
511
+ __publicField(this, "put", createSpy22("put"));
524
512
  }
525
513
  };
526
- var MockEvent = class {
514
+ var MockCacheStorage = class {
515
+ constructor() {
516
+ __publicField(this, "delete", createSpy22("delete"));
517
+ __publicField(this, "has", createSpy22("has"));
518
+ __publicField(this, "keys", createSpy22("keys"));
519
+ __publicField(this, "match", createSpy22("match"));
520
+ __publicField(this, "open", createSpy22("open"));
521
+ }
522
+ };
523
+ var MockCustomEvent = class {
527
524
  constructor() {
525
+ __publicField(this, "detail");
528
526
  __publicField(this, "bubbles", false);
529
527
  __publicField(this, "cancelBubble", false);
530
528
  __publicField(this, "cancelable", false);
@@ -542,120 +540,107 @@ var MockEvent = class {
542
540
  __publicField(this, "CAPTURING_PHASE", 1);
543
541
  __publicField(this, "AT_TARGET", 2);
544
542
  __publicField(this, "BUBBLING_PHASE", 3);
545
- __publicField(this, "composedPath", createSpy2("composedPath"));
546
- __publicField(this, "initEvent", createSpy2("initEvent"));
547
- __publicField(this, "preventDefault", createSpy2("preventDefault"));
548
- __publicField(this, "stopImmediatePropagation", createSpy2(
549
- "stopImmediatePropagation"
550
- ));
551
- __publicField(this, "stopPropagation", createSpy2("stopPropagation"));
552
- }
553
- };
554
- var MockEventTarget = class {
555
- constructor() {
556
- __publicField(this, "addEventListener", createSpy2("addEventListener"));
557
- __publicField(this, "dispatchEvent", createSpy2("dispatchEvent"));
558
- __publicField(this, "removeEventListener", createSpy2(
559
- "removeEventListener"
560
- ));
543
+ __publicField(this, "initCustomEvent", createSpy22("initCustomEvent"));
544
+ __publicField(this, "composedPath", createSpy22("composedPath"));
545
+ __publicField(this, "initEvent", createSpy22("initEvent"));
546
+ __publicField(this, "preventDefault", createSpy22("preventDefault"));
547
+ __publicField(this, "stopImmediatePropagation", createSpy22("stopImmediatePropagation"));
548
+ __publicField(this, "stopPropagation", createSpy22("stopPropagation"));
561
549
  }
562
550
  };
563
- var MockHTMLAudioElement = class {
551
+ var MockDocument = class {
564
552
  constructor() {
565
- __publicField(this, "autoplay", false);
566
- __publicField(this, "buffered");
567
- __publicField(this, "controls", false);
568
- __publicField(this, "crossOrigin", "");
569
- __publicField(this, "currentSrc", "");
570
- __publicField(this, "currentTime", 0);
571
- __publicField(this, "defaultMuted", false);
572
- __publicField(this, "defaultPlaybackRate", 0);
573
- __publicField(this, "disableRemotePlayback", false);
574
- __publicField(this, "duration", 0);
575
- __publicField(this, "ended", false);
576
- __publicField(this, "error", null);
577
- __publicField(this, "loop", false);
578
- __publicField(this, "mediaKeys", null);
579
- __publicField(this, "muted", false);
580
- __publicField(this, "networkState", 0);
581
- __publicField(this, "onencrypted", null);
582
- __publicField(this, "onwaitingforkey", null);
583
- __publicField(this, "paused", false);
584
- __publicField(this, "playbackRate", 0);
585
- __publicField(this, "played");
586
- __publicField(this, "preload", "none");
587
- __publicField(this, "preservesPitch", false);
588
- __publicField(this, "readyState", 0);
589
- __publicField(this, "remote");
590
- __publicField(this, "seekable");
591
- __publicField(this, "seeking", false);
592
- __publicField(this, "sinkId", "");
593
- __publicField(this, "src", "");
594
- __publicField(this, "srcObject");
595
- __publicField(this, "textTracks");
596
- __publicField(this, "volume", 0);
597
- __publicField(this, "NETWORK_EMPTY", 0);
598
- __publicField(this, "NETWORK_IDLE", 1);
599
- __publicField(this, "NETWORK_LOADING", 2);
600
- __publicField(this, "NETWORK_NO_SOURCE", 3);
601
- __publicField(this, "HAVE_NOTHING", 0);
602
- __publicField(this, "HAVE_METADATA", 1);
603
- __publicField(this, "HAVE_CURRENT_DATA", 2);
604
- __publicField(this, "HAVE_FUTURE_DATA", 3);
605
- __publicField(this, "HAVE_ENOUGH_DATA", 4);
606
- __publicField(this, "accessKey", "");
607
- __publicField(this, "accessKeyLabel", "");
608
- __publicField(this, "autocapitalize", "");
609
- __publicField(this, "autocorrect", false);
553
+ __publicField(this, "URL", "");
554
+ __publicField(this, "alinkColor", "");
555
+ __publicField(this, "all");
556
+ __publicField(this, "anchors");
557
+ __publicField(this, "applets");
558
+ __publicField(this, "bgColor", "");
559
+ __publicField(this, "body");
560
+ __publicField(this, "characterSet", "");
561
+ __publicField(this, "charset", "");
562
+ __publicField(this, "compatMode", "");
563
+ __publicField(this, "contentType", "");
564
+ __publicField(this, "cookie", "");
565
+ __publicField(this, "currentScript");
566
+ __publicField(this, "defaultView");
567
+ __publicField(this, "designMode", "");
610
568
  __publicField(this, "dir", "");
611
- __publicField(this, "draggable", false);
569
+ __publicField(this, "doctype", null);
570
+ __publicField(this, "documentElement");
571
+ __publicField(this, "documentURI", "");
572
+ __publicField(this, "domain", "");
573
+ __publicField(this, "embeds");
574
+ __publicField(this, "fgColor", "");
575
+ __publicField(this, "forms");
576
+ __publicField(this, "fragmentDirective");
577
+ __publicField(this, "fullscreen", false);
578
+ __publicField(this, "fullscreenEnabled", false);
579
+ __publicField(this, "head");
612
580
  __publicField(this, "hidden", false);
613
- __publicField(this, "inert", false);
614
- __publicField(this, "innerText", "");
615
- __publicField(this, "lang", "");
616
- __publicField(this, "offsetHeight", 0);
617
- __publicField(this, "offsetLeft", 0);
618
- __publicField(this, "offsetParent", null);
619
- __publicField(this, "offsetTop", 0);
620
- __publicField(this, "offsetWidth", 0);
621
- __publicField(this, "outerText", "");
622
- __publicField(this, "popover", "");
623
- __publicField(this, "spellcheck", false);
624
- __publicField(this, "title", "");
625
- __publicField(this, "translate", false);
626
- __publicField(this, "writingSuggestions", "");
627
- __publicField(this, "attributes");
628
- __publicField(this, "className", "");
629
- __publicField(this, "clientHeight", 0);
630
- __publicField(this, "clientLeft", 0);
631
- __publicField(this, "clientTop", 0);
632
- __publicField(this, "clientWidth", 0);
633
- __publicField(this, "currentCSSZoom", 0);
634
- __publicField(this, "id", "");
635
- __publicField(this, "innerHTML", "");
636
- __publicField(this, "localName", "");
637
- __publicField(this, "namespaceURI", "");
638
- __publicField(this, "onfullscreenchange", null);
639
- __publicField(this, "onfullscreenerror", null);
640
- __publicField(this, "outerHTML", "");
641
- __publicField(this, "ownerDocument");
642
- __publicField(this, "prefix", "");
643
- __publicField(this, "scrollHeight", 0);
644
- __publicField(this, "scrollLeft", 0);
645
- __publicField(this, "scrollTop", 0);
646
- __publicField(this, "scrollWidth", 0);
647
- __publicField(this, "shadowRoot", null);
648
- __publicField(this, "slot", "");
649
- __publicField(this, "tagName", "");
650
- __publicField(this, "classList");
651
- __publicField(this, "part");
652
- __publicField(this, "textContent");
653
- __publicField(this, "attributeStyleMap");
654
- __publicField(this, "style");
655
- __publicField(this, "contentEditable", "");
656
- __publicField(this, "enterKeyHint", "");
657
- __publicField(this, "inputMode", "");
658
- __publicField(this, "isContentEditable", false);
581
+ __publicField(this, "images");
582
+ __publicField(this, "implementation");
583
+ __publicField(this, "inputEncoding", "");
584
+ __publicField(this, "lastModified", "");
585
+ __publicField(this, "linkColor", "");
586
+ __publicField(this, "links");
587
+ __publicField(this, "onfullscreenchange", null);
588
+ __publicField(this, "onfullscreenerror", null);
589
+ __publicField(this, "onpointerlockchange", null);
590
+ __publicField(this, "onpointerlockerror", null);
591
+ __publicField(this, "onreadystatechange", null);
592
+ __publicField(this, "onvisibilitychange", null);
593
+ __publicField(this, "ownerDocument", null);
594
+ __publicField(this, "pictureInPictureEnabled", false);
595
+ __publicField(this, "plugins");
596
+ __publicField(this, "readyState", "complete");
597
+ __publicField(this, "referrer", "");
598
+ __publicField(this, "rootElement", null);
599
+ __publicField(this, "scripts");
600
+ __publicField(this, "scrollingElement", null);
601
+ __publicField(this, "timeline");
602
+ __publicField(this, "title", "");
603
+ __publicField(this, "visibilityState", "hidden");
604
+ __publicField(this, "vlinkColor", "");
605
+ __publicField(this, "location");
606
+ __publicField(this, "textContent", null);
607
+ __publicField(this, "baseURI", "");
608
+ __publicField(this, "childNodes");
609
+ __publicField(this, "firstChild", null);
610
+ __publicField(this, "isConnected", false);
611
+ __publicField(this, "lastChild", null);
612
+ __publicField(this, "nextSibling", null);
613
+ __publicField(this, "nodeName", "");
614
+ __publicField(this, "nodeType", 0);
615
+ __publicField(this, "nodeValue", "");
616
+ __publicField(this, "parentElement", null);
617
+ __publicField(this, "parentNode", null);
618
+ __publicField(this, "previousSibling", null);
619
+ __publicField(this, "ELEMENT_NODE", 1);
620
+ __publicField(this, "ATTRIBUTE_NODE", 2);
621
+ __publicField(this, "TEXT_NODE", 3);
622
+ __publicField(this, "CDATA_SECTION_NODE", 4);
623
+ __publicField(this, "ENTITY_REFERENCE_NODE", 5);
624
+ __publicField(this, "ENTITY_NODE", 6);
625
+ __publicField(this, "PROCESSING_INSTRUCTION_NODE", 7);
626
+ __publicField(this, "COMMENT_NODE", 8);
627
+ __publicField(this, "DOCUMENT_NODE", 9);
628
+ __publicField(this, "DOCUMENT_TYPE_NODE", 10);
629
+ __publicField(this, "DOCUMENT_FRAGMENT_NODE", 11);
630
+ __publicField(this, "NOTATION_NODE", 12);
631
+ __publicField(this, "DOCUMENT_POSITION_DISCONNECTED", 1);
632
+ __publicField(this, "DOCUMENT_POSITION_PRECEDING", 2);
633
+ __publicField(this, "DOCUMENT_POSITION_FOLLOWING", 4);
634
+ __publicField(this, "DOCUMENT_POSITION_CONTAINS", 8);
635
+ __publicField(this, "DOCUMENT_POSITION_CONTAINED_BY", 16);
636
+ __publicField(this, "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", 32);
637
+ __publicField(this, "activeElement", null);
638
+ __publicField(this, "adoptedStyleSheets", []);
639
+ __publicField(this, "fullscreenElement", null);
640
+ __publicField(this, "pictureInPictureElement", null);
641
+ __publicField(this, "pointerLockElement", null);
642
+ __publicField(this, "styleSheets");
643
+ __publicField(this, "fonts");
659
644
  __publicField(this, "onabort", null);
660
645
  __publicField(this, "onanimationcancel", null);
661
646
  __publicField(this, "onanimationend", null);
@@ -752,194 +737,223 @@ var MockHTMLAudioElement = class {
752
737
  __publicField(this, "onwebkitanimationstart", null);
753
738
  __publicField(this, "onwebkittransitionend", null);
754
739
  __publicField(this, "onwheel", null);
755
- __publicField(this, "autofocus", false);
756
- __publicField(this, "dataset");
757
- __publicField(this, "tabIndex", 0);
758
- __publicField(this, "baseURI", "");
759
- __publicField(this, "childNodes");
760
- __publicField(this, "firstChild", null);
761
- __publicField(this, "isConnected", false);
762
- __publicField(this, "lastChild", null);
763
- __publicField(this, "nextSibling", null);
764
- __publicField(this, "nodeName", "");
765
- __publicField(this, "nodeType", 0);
766
- __publicField(this, "nodeValue", "");
767
- __publicField(this, "parentElement", null);
768
- __publicField(this, "parentNode", null);
769
- __publicField(this, "previousSibling", null);
770
- __publicField(this, "ELEMENT_NODE", 1);
771
- __publicField(this, "ATTRIBUTE_NODE", 2);
772
- __publicField(this, "TEXT_NODE", 3);
773
- __publicField(this, "CDATA_SECTION_NODE", 4);
774
- __publicField(this, "ENTITY_REFERENCE_NODE", 5);
775
- __publicField(this, "ENTITY_NODE", 6);
776
- __publicField(this, "PROCESSING_INSTRUCTION_NODE", 7);
777
- __publicField(this, "COMMENT_NODE", 8);
778
- __publicField(this, "DOCUMENT_NODE", 9);
779
- __publicField(this, "DOCUMENT_TYPE_NODE", 10);
780
- __publicField(this, "DOCUMENT_FRAGMENT_NODE", 11);
781
- __publicField(this, "NOTATION_NODE", 12);
782
- __publicField(this, "DOCUMENT_POSITION_DISCONNECTED", 1);
783
- __publicField(this, "DOCUMENT_POSITION_PRECEDING", 2);
784
- __publicField(this, "DOCUMENT_POSITION_FOLLOWING", 4);
785
- __publicField(this, "DOCUMENT_POSITION_CONTAINS", 8);
786
- __publicField(this, "DOCUMENT_POSITION_CONTAINED_BY", 16);
787
- __publicField(this, "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", 32);
788
- __publicField(this, "ariaActiveDescendantElement", null);
789
- __publicField(this, "ariaAtomic", "");
790
- __publicField(this, "ariaAutoComplete", "");
791
- __publicField(this, "ariaBrailleLabel", "");
792
- __publicField(this, "ariaBrailleRoleDescription", "");
793
- __publicField(this, "ariaBusy", "");
794
- __publicField(this, "ariaChecked", "");
795
- __publicField(this, "ariaColCount", "");
796
- __publicField(this, "ariaColIndex", "");
797
- __publicField(this, "ariaColIndexText", "");
798
- __publicField(this, "ariaColSpan", "");
799
- __publicField(this, "ariaControlsElements", null);
800
- __publicField(this, "ariaCurrent", "");
801
- __publicField(this, "ariaDescribedByElements", null);
802
- __publicField(this, "ariaDescription", "");
803
- __publicField(this, "ariaDetailsElements", null);
804
- __publicField(this, "ariaDisabled", "");
805
- __publicField(this, "ariaErrorMessageElements", null);
806
- __publicField(this, "ariaExpanded", "");
807
- __publicField(this, "ariaFlowToElements", null);
808
- __publicField(this, "ariaHasPopup", "");
809
- __publicField(this, "ariaHidden", "");
810
- __publicField(this, "ariaInvalid", "");
811
- __publicField(this, "ariaKeyShortcuts", "");
812
- __publicField(this, "ariaLabel", "");
813
- __publicField(this, "ariaLabelledByElements", null);
814
- __publicField(this, "ariaLevel", "");
815
- __publicField(this, "ariaLive", "");
816
- __publicField(this, "ariaModal", "");
817
- __publicField(this, "ariaMultiLine", "");
818
- __publicField(this, "ariaMultiSelectable", "");
819
- __publicField(this, "ariaOrientation", "");
820
- __publicField(this, "ariaOwnsElements", null);
821
- __publicField(this, "ariaPlaceholder", "");
822
- __publicField(this, "ariaPosInSet", "");
823
- __publicField(this, "ariaPressed", "");
824
- __publicField(this, "ariaReadOnly", "");
825
- __publicField(this, "ariaRelevant", "");
826
- __publicField(this, "ariaRequired", "");
827
- __publicField(this, "ariaRoleDescription", "");
828
- __publicField(this, "ariaRowCount", "");
829
- __publicField(this, "ariaRowIndex", "");
830
- __publicField(this, "ariaRowIndexText", "");
831
- __publicField(this, "ariaRowSpan", "");
832
- __publicField(this, "ariaSelected", "");
833
- __publicField(this, "ariaSetSize", "");
834
- __publicField(this, "ariaSort", "");
835
- __publicField(this, "ariaValueMax", "");
836
- __publicField(this, "ariaValueMin", "");
837
- __publicField(this, "ariaValueNow", "");
838
- __publicField(this, "ariaValueText", "");
839
- __publicField(this, "role", "");
840
- __publicField(this, "nextElementSibling", null);
841
- __publicField(this, "previousElementSibling", null);
842
740
  __publicField(this, "childElementCount", 0);
843
741
  __publicField(this, "children");
844
742
  __publicField(this, "firstElementChild", null);
845
743
  __publicField(this, "lastElementChild", null);
846
- __publicField(this, "assignedSlot", null);
847
- __publicField(this, "addEventListener", createSpy2("addEventListener"));
848
- __publicField(this, "removeEventListener", createSpy2(
849
- "removeEventListener"
744
+ __publicField(this, "adoptNode", createSpy22("adoptNode"));
745
+ __publicField(this, "captureEvents", createSpy22("captureEvents"));
746
+ __publicField(this, "caretPositionFromPoint", createSpy22(
747
+ "caretPositionFromPoint"
748
+ ));
749
+ __publicField(this, "caretRangeFromPoint", createSpy22(
750
+ "caretRangeFromPoint"
751
+ ));
752
+ __publicField(this, "clear", createSpy22("clear"));
753
+ __publicField(this, "close", createSpy22("close"));
754
+ __publicField(this, "createAttribute", createSpy22("createAttribute"));
755
+ __publicField(this, "createAttributeNS", createSpy22("createAttributeNS"));
756
+ __publicField(this, "createCDATASection", createSpy22("createCDATASection"));
757
+ __publicField(this, "createComment", createSpy22("createComment"));
758
+ __publicField(this, "createDocumentFragment", createSpy22(
759
+ "createDocumentFragment"
850
760
  ));
851
- __publicField(this, "addTextTrack", createSpy2("addTextTrack"));
852
- __publicField(this, "canPlayType", createSpy2("canPlayType"));
853
- __publicField(this, "fastSeek", createSpy2("fastSeek"));
854
- __publicField(this, "load", createSpy2("load"));
855
- __publicField(this, "pause", createSpy2("pause"));
856
- __publicField(this, "play", createSpy2("play"));
857
- __publicField(this, "setMediaKeys", createSpy2("setMediaKeys"));
858
- __publicField(this, "setSinkId", createSpy2("setSinkId"));
859
- __publicField(this, "attachInternals", createSpy2("attachInternals"));
860
- __publicField(this, "click", createSpy2("click"));
861
- __publicField(this, "hidePopover", createSpy2("hidePopover"));
862
- __publicField(this, "showPopover", createSpy2("showPopover"));
863
- __publicField(this, "togglePopover", createSpy2("togglePopover"));
864
- __publicField(this, "attachShadow", createSpy2("attachShadow"));
865
- __publicField(this, "checkVisibility", createSpy2("checkVisibility"));
866
- __publicField(this, "closest", createSpy2("closest"));
867
- __publicField(this, "computedStyleMap", createSpy2("computedStyleMap"));
868
- __publicField(this, "getAttribute", createSpy2("getAttribute"));
869
- __publicField(this, "getAttributeNS", createSpy2("getAttributeNS"));
870
- __publicField(this, "getAttributeNames", createSpy2("getAttributeNames"));
871
- __publicField(this, "getAttributeNode", createSpy2("getAttributeNode"));
872
- __publicField(this, "getAttributeNodeNS", createSpy2("getAttributeNodeNS"));
873
- __publicField(this, "getBoundingClientRect", createSpy2("getBoundingClientRect"));
874
- __publicField(this, "getClientRects", createSpy2("getClientRects"));
875
- __publicField(this, "getElementsByClassName", createSpy2("getElementsByClassName"));
876
- __publicField(this, "getElementsByTagName", createSpy2(
761
+ __publicField(this, "createElement", createSpy22("createElement"));
762
+ __publicField(this, "createElementNS", createSpy22("createElementNS"));
763
+ __publicField(this, "createEvent", createSpy22("createEvent"));
764
+ __publicField(this, "createNodeIterator", createSpy22("createNodeIterator"));
765
+ __publicField(this, "createProcessingInstruction", createSpy22("createProcessingInstruction"));
766
+ __publicField(this, "createRange", createSpy22("createRange"));
767
+ __publicField(this, "createTextNode", createSpy22("createTextNode"));
768
+ __publicField(this, "createTreeWalker", createSpy22("createTreeWalker"));
769
+ __publicField(this, "execCommand", createSpy22("execCommand"));
770
+ __publicField(this, "exitFullscreen", createSpy22("exitFullscreen"));
771
+ __publicField(this, "exitPictureInPicture", createSpy22(
772
+ "exitPictureInPicture"
773
+ ));
774
+ __publicField(this, "exitPointerLock", createSpy22("exitPointerLock"));
775
+ __publicField(this, "getElementById", createSpy22("getElementById"));
776
+ __publicField(this, "getElementsByClassName", createSpy22(
777
+ "getElementsByClassName"
778
+ ));
779
+ __publicField(this, "getElementsByName", createSpy22("getElementsByName"));
780
+ __publicField(this, "getElementsByTagName", createSpy22(
877
781
  "getElementsByTagName"
878
782
  ));
879
- __publicField(this, "getElementsByTagNameNS", createSpy2("getElementsByTagNameNS"));
880
- __publicField(this, "getHTML", createSpy2("getHTML"));
881
- __publicField(this, "hasAttribute", createSpy2("hasAttribute"));
882
- __publicField(this, "hasAttributeNS", createSpy2("hasAttributeNS"));
883
- __publicField(this, "hasAttributes", createSpy2("hasAttributes"));
884
- __publicField(this, "hasPointerCapture", createSpy2("hasPointerCapture"));
885
- __publicField(this, "insertAdjacentElement", createSpy2("insertAdjacentElement"));
886
- __publicField(this, "insertAdjacentHTML", createSpy2("insertAdjacentHTML"));
887
- __publicField(this, "insertAdjacentText", createSpy2("insertAdjacentText"));
888
- __publicField(this, "matches", createSpy2("matches"));
889
- __publicField(this, "releasePointerCapture", createSpy2("releasePointerCapture"));
890
- __publicField(this, "removeAttribute", createSpy2("removeAttribute"));
891
- __publicField(this, "removeAttributeNS", createSpy2("removeAttributeNS"));
892
- __publicField(this, "removeAttributeNode", createSpy2(
893
- "removeAttributeNode"
783
+ __publicField(this, "getElementsByTagNameNS", createSpy22(
784
+ "getElementsByTagNameNS"
785
+ ));
786
+ __publicField(this, "getSelection", createSpy22("getSelection"));
787
+ __publicField(this, "hasFocus", createSpy22("hasFocus"));
788
+ __publicField(this, "hasStorageAccess", createSpy22("hasStorageAccess"));
789
+ __publicField(this, "importNode", createSpy22("importNode"));
790
+ __publicField(this, "open", createSpy22("open"));
791
+ __publicField(this, "queryCommandEnabled", createSpy22(
792
+ "queryCommandEnabled"
894
793
  ));
895
- __publicField(this, "requestFullscreen", createSpy2("requestFullscreen"));
896
- __publicField(this, "requestPointerLock", createSpy2("requestPointerLock"));
897
- __publicField(this, "scroll", createSpy2("scroll"));
898
- __publicField(this, "scrollBy", createSpy2("scrollBy"));
899
- __publicField(this, "scrollIntoView", createSpy2("scrollIntoView"));
900
- __publicField(this, "scrollTo", createSpy2("scrollTo"));
901
- __publicField(this, "setAttribute", createSpy2("setAttribute"));
902
- __publicField(this, "setAttributeNS", createSpy2("setAttributeNS"));
903
- __publicField(this, "setAttributeNode", createSpy2("setAttributeNode"));
904
- __publicField(this, "setAttributeNodeNS", createSpy2("setAttributeNodeNS"));
905
- __publicField(this, "setHTMLUnsafe", createSpy2("setHTMLUnsafe"));
906
- __publicField(this, "setPointerCapture", createSpy2("setPointerCapture"));
907
- __publicField(this, "toggleAttribute", createSpy2("toggleAttribute"));
908
- __publicField(this, "webkitMatchesSelector", createSpy2("webkitMatchesSelector"));
909
- __publicField(this, "blur", createSpy2("blur"));
910
- __publicField(this, "focus", createSpy2("focus"));
911
- __publicField(this, "appendChild", createSpy2("appendChild"));
912
- __publicField(this, "cloneNode", createSpy2("cloneNode"));
913
- __publicField(this, "compareDocumentPosition", createSpy2("compareDocumentPosition"));
914
- __publicField(this, "contains", createSpy2("contains"));
915
- __publicField(this, "getRootNode", createSpy2("getRootNode"));
916
- __publicField(this, "hasChildNodes", createSpy2("hasChildNodes"));
917
- __publicField(this, "insertBefore", createSpy2("insertBefore"));
918
- __publicField(this, "isDefaultNamespace", createSpy2("isDefaultNamespace"));
919
- __publicField(this, "isEqualNode", createSpy2("isEqualNode"));
920
- __publicField(this, "isSameNode", createSpy2("isSameNode"));
921
- __publicField(this, "lookupNamespaceURI", createSpy2("lookupNamespaceURI"));
922
- __publicField(this, "lookupPrefix", createSpy2("lookupPrefix"));
923
- __publicField(this, "normalize", createSpy2("normalize"));
924
- __publicField(this, "removeChild", createSpy2("removeChild"));
925
- __publicField(this, "replaceChild", createSpy2("replaceChild"));
926
- __publicField(this, "animate", createSpy2("animate"));
927
- __publicField(this, "getAnimations", createSpy2("getAnimations"));
928
- __publicField(this, "after", createSpy2("after"));
929
- __publicField(this, "before", createSpy2("before"));
930
- __publicField(this, "remove", createSpy2("remove"));
931
- __publicField(this, "replaceWith", createSpy2("replaceWith"));
932
- __publicField(this, "append", createSpy2("append"));
933
- __publicField(this, "prepend", createSpy2("prepend"));
934
- __publicField(this, "querySelector", createSpy2("querySelector"));
935
- __publicField(this, "querySelectorAll", createSpy2("querySelectorAll"));
936
- __publicField(this, "replaceChildren", createSpy2("replaceChildren"));
937
- __publicField(this, "dispatchEvent", createSpy2("dispatchEvent"));
794
+ __publicField(this, "queryCommandIndeterm", createSpy22(
795
+ "queryCommandIndeterm"
796
+ ));
797
+ __publicField(this, "queryCommandState", createSpy22("queryCommandState"));
798
+ __publicField(this, "queryCommandSupported", createSpy22(
799
+ "queryCommandSupported"
800
+ ));
801
+ __publicField(this, "queryCommandValue", createSpy22("queryCommandValue"));
802
+ __publicField(this, "releaseEvents", createSpy22("releaseEvents"));
803
+ __publicField(this, "requestStorageAccess", createSpy22(
804
+ "requestStorageAccess"
805
+ ));
806
+ __publicField(this, "startViewTransition", createSpy22(
807
+ "startViewTransition"
808
+ ));
809
+ __publicField(this, "write", createSpy22("write"));
810
+ __publicField(this, "writeln", createSpy22("writeln"));
811
+ __publicField(this, "addEventListener", createSpy22("addEventListener"));
812
+ __publicField(this, "removeEventListener", createSpy22(
813
+ "removeEventListener"
814
+ ));
815
+ __publicField(this, "appendChild", createSpy22("appendChild"));
816
+ __publicField(this, "cloneNode", createSpy22("cloneNode"));
817
+ __publicField(this, "compareDocumentPosition", createSpy22(
818
+ "compareDocumentPosition"
819
+ ));
820
+ __publicField(this, "contains", createSpy22("contains"));
821
+ __publicField(this, "getRootNode", createSpy22("getRootNode"));
822
+ __publicField(this, "hasChildNodes", createSpy22("hasChildNodes"));
823
+ __publicField(this, "insertBefore", createSpy22("insertBefore"));
824
+ __publicField(this, "isDefaultNamespace", createSpy22("isDefaultNamespace"));
825
+ __publicField(this, "isEqualNode", createSpy22("isEqualNode"));
826
+ __publicField(this, "isSameNode", createSpy22("isSameNode"));
827
+ __publicField(this, "lookupNamespaceURI", createSpy22("lookupNamespaceURI"));
828
+ __publicField(this, "lookupPrefix", createSpy22("lookupPrefix"));
829
+ __publicField(this, "normalize", createSpy22("normalize"));
830
+ __publicField(this, "removeChild", createSpy22("removeChild"));
831
+ __publicField(this, "replaceChild", createSpy22("replaceChild"));
832
+ __publicField(this, "elementFromPoint", createSpy22("elementFromPoint"));
833
+ __publicField(this, "elementsFromPoint", createSpy22("elementsFromPoint"));
834
+ __publicField(this, "getAnimations", createSpy22("getAnimations"));
835
+ __publicField(this, "append", createSpy22("append"));
836
+ __publicField(this, "prepend", createSpy22("prepend"));
837
+ __publicField(this, "querySelector", createSpy22("querySelector"));
838
+ __publicField(this, "querySelectorAll", createSpy22("querySelectorAll"));
839
+ __publicField(this, "replaceChildren", createSpy22("replaceChildren"));
840
+ __publicField(this, "createExpression", createSpy22("createExpression"));
841
+ __publicField(this, "createNSResolver", createSpy22("createNSResolver"));
842
+ __publicField(this, "evaluate", createSpy22("evaluate"));
843
+ __publicField(this, "dispatchEvent", createSpy22("dispatchEvent"));
938
844
  }
939
845
  };
940
- var MockHTMLDivElement = class {
846
+ var MockErrorEvent = class {
941
847
  constructor() {
942
- __publicField(this, "align", "");
848
+ __publicField(this, "colno", 0);
849
+ __publicField(this, "error");
850
+ __publicField(this, "filename", "");
851
+ __publicField(this, "lineno", 0);
852
+ __publicField(this, "message", "");
853
+ __publicField(this, "bubbles", false);
854
+ __publicField(this, "cancelBubble", false);
855
+ __publicField(this, "cancelable", false);
856
+ __publicField(this, "composed", false);
857
+ __publicField(this, "currentTarget", null);
858
+ __publicField(this, "defaultPrevented", false);
859
+ __publicField(this, "eventPhase", 0);
860
+ __publicField(this, "isTrusted", false);
861
+ __publicField(this, "returnValue", false);
862
+ __publicField(this, "srcElement", null);
863
+ __publicField(this, "target", null);
864
+ __publicField(this, "timeStamp", 0);
865
+ __publicField(this, "type", "");
866
+ __publicField(this, "NONE", 0);
867
+ __publicField(this, "CAPTURING_PHASE", 1);
868
+ __publicField(this, "AT_TARGET", 2);
869
+ __publicField(this, "BUBBLING_PHASE", 3);
870
+ __publicField(this, "composedPath", createSpy22("composedPath"));
871
+ __publicField(this, "initEvent", createSpy22("initEvent"));
872
+ __publicField(this, "preventDefault", createSpy22("preventDefault"));
873
+ __publicField(this, "stopImmediatePropagation", createSpy22("stopImmediatePropagation"));
874
+ __publicField(this, "stopPropagation", createSpy22("stopPropagation"));
875
+ }
876
+ };
877
+ var MockEvent = class {
878
+ constructor() {
879
+ __publicField(this, "bubbles", false);
880
+ __publicField(this, "cancelBubble", false);
881
+ __publicField(this, "cancelable", false);
882
+ __publicField(this, "composed", false);
883
+ __publicField(this, "currentTarget", null);
884
+ __publicField(this, "defaultPrevented", false);
885
+ __publicField(this, "eventPhase", 0);
886
+ __publicField(this, "isTrusted", false);
887
+ __publicField(this, "returnValue", false);
888
+ __publicField(this, "srcElement", null);
889
+ __publicField(this, "target", null);
890
+ __publicField(this, "timeStamp", 0);
891
+ __publicField(this, "type", "");
892
+ __publicField(this, "NONE", 0);
893
+ __publicField(this, "CAPTURING_PHASE", 1);
894
+ __publicField(this, "AT_TARGET", 2);
895
+ __publicField(this, "BUBBLING_PHASE", 3);
896
+ __publicField(this, "composedPath", createSpy22("composedPath"));
897
+ __publicField(this, "initEvent", createSpy22("initEvent"));
898
+ __publicField(this, "preventDefault", createSpy22("preventDefault"));
899
+ __publicField(this, "stopImmediatePropagation", createSpy22(
900
+ "stopImmediatePropagation"
901
+ ));
902
+ __publicField(this, "stopPropagation", createSpy22("stopPropagation"));
903
+ }
904
+ };
905
+ var MockEventTarget = class {
906
+ constructor() {
907
+ __publicField(this, "addEventListener", createSpy22("addEventListener"));
908
+ __publicField(this, "dispatchEvent", createSpy22("dispatchEvent"));
909
+ __publicField(this, "removeEventListener", createSpy22(
910
+ "removeEventListener"
911
+ ));
912
+ }
913
+ };
914
+ var MockHTMLAudioElement = class {
915
+ constructor() {
916
+ __publicField(this, "autoplay", false);
917
+ __publicField(this, "buffered");
918
+ __publicField(this, "controls", false);
919
+ __publicField(this, "crossOrigin", "");
920
+ __publicField(this, "currentSrc", "");
921
+ __publicField(this, "currentTime", 0);
922
+ __publicField(this, "defaultMuted", false);
923
+ __publicField(this, "defaultPlaybackRate", 0);
924
+ __publicField(this, "disableRemotePlayback", false);
925
+ __publicField(this, "duration", 0);
926
+ __publicField(this, "ended", false);
927
+ __publicField(this, "error", null);
928
+ __publicField(this, "loop", false);
929
+ __publicField(this, "mediaKeys", null);
930
+ __publicField(this, "muted", false);
931
+ __publicField(this, "networkState", 0);
932
+ __publicField(this, "onencrypted", null);
933
+ __publicField(this, "onwaitingforkey", null);
934
+ __publicField(this, "paused", false);
935
+ __publicField(this, "playbackRate", 0);
936
+ __publicField(this, "played");
937
+ __publicField(this, "preload", "none");
938
+ __publicField(this, "preservesPitch", false);
939
+ __publicField(this, "readyState", 0);
940
+ __publicField(this, "remote");
941
+ __publicField(this, "seekable");
942
+ __publicField(this, "seeking", false);
943
+ __publicField(this, "sinkId", "");
944
+ __publicField(this, "src", "");
945
+ __publicField(this, "srcObject");
946
+ __publicField(this, "textTracks");
947
+ __publicField(this, "volume", 0);
948
+ __publicField(this, "NETWORK_EMPTY", 0);
949
+ __publicField(this, "NETWORK_IDLE", 1);
950
+ __publicField(this, "NETWORK_LOADING", 2);
951
+ __publicField(this, "NETWORK_NO_SOURCE", 3);
952
+ __publicField(this, "HAVE_NOTHING", 0);
953
+ __publicField(this, "HAVE_METADATA", 1);
954
+ __publicField(this, "HAVE_CURRENT_DATA", 2);
955
+ __publicField(this, "HAVE_FUTURE_DATA", 3);
956
+ __publicField(this, "HAVE_ENOUGH_DATA", 4);
943
957
  __publicField(this, "accessKey", "");
944
958
  __publicField(this, "accessKeyLabel", "");
945
959
  __publicField(this, "autocapitalize", "");
@@ -1181,142 +1195,102 @@ var MockHTMLDivElement = class {
1181
1195
  __publicField(this, "firstElementChild", null);
1182
1196
  __publicField(this, "lastElementChild", null);
1183
1197
  __publicField(this, "assignedSlot", null);
1184
- __publicField(this, "addEventListener", createSpy2("addEventListener"));
1185
- __publicField(this, "removeEventListener", createSpy2(
1198
+ __publicField(this, "addEventListener", createSpy22("addEventListener"));
1199
+ __publicField(this, "removeEventListener", createSpy22(
1186
1200
  "removeEventListener"
1187
1201
  ));
1188
- __publicField(this, "attachInternals", createSpy2("attachInternals"));
1189
- __publicField(this, "click", createSpy2("click"));
1190
- __publicField(this, "hidePopover", createSpy2("hidePopover"));
1191
- __publicField(this, "showPopover", createSpy2("showPopover"));
1192
- __publicField(this, "togglePopover", createSpy2("togglePopover"));
1193
- __publicField(this, "attachShadow", createSpy2("attachShadow"));
1194
- __publicField(this, "checkVisibility", createSpy2("checkVisibility"));
1195
- __publicField(this, "closest", createSpy2("closest"));
1196
- __publicField(this, "computedStyleMap", createSpy2("computedStyleMap"));
1197
- __publicField(this, "getAttribute", createSpy2("getAttribute"));
1198
- __publicField(this, "getAttributeNS", createSpy2("getAttributeNS"));
1199
- __publicField(this, "getAttributeNames", createSpy2("getAttributeNames"));
1200
- __publicField(this, "getAttributeNode", createSpy2("getAttributeNode"));
1201
- __publicField(this, "getAttributeNodeNS", createSpy2("getAttributeNodeNS"));
1202
- __publicField(this, "getBoundingClientRect", createSpy2(
1203
- "getBoundingClientRect"
1204
- ));
1205
- __publicField(this, "getClientRects", createSpy2("getClientRects"));
1206
- __publicField(this, "getElementsByClassName", createSpy2("getElementsByClassName"));
1207
- __publicField(this, "getElementsByTagName", createSpy2(
1202
+ __publicField(this, "addTextTrack", createSpy22("addTextTrack"));
1203
+ __publicField(this, "canPlayType", createSpy22("canPlayType"));
1204
+ __publicField(this, "fastSeek", createSpy22("fastSeek"));
1205
+ __publicField(this, "load", createSpy22("load"));
1206
+ __publicField(this, "pause", createSpy22("pause"));
1207
+ __publicField(this, "play", createSpy22("play"));
1208
+ __publicField(this, "setMediaKeys", createSpy22("setMediaKeys"));
1209
+ __publicField(this, "setSinkId", createSpy22("setSinkId"));
1210
+ __publicField(this, "attachInternals", createSpy22("attachInternals"));
1211
+ __publicField(this, "click", createSpy22("click"));
1212
+ __publicField(this, "hidePopover", createSpy22("hidePopover"));
1213
+ __publicField(this, "showPopover", createSpy22("showPopover"));
1214
+ __publicField(this, "togglePopover", createSpy22("togglePopover"));
1215
+ __publicField(this, "attachShadow", createSpy22("attachShadow"));
1216
+ __publicField(this, "checkVisibility", createSpy22("checkVisibility"));
1217
+ __publicField(this, "closest", createSpy22("closest"));
1218
+ __publicField(this, "computedStyleMap", createSpy22("computedStyleMap"));
1219
+ __publicField(this, "getAttribute", createSpy22("getAttribute"));
1220
+ __publicField(this, "getAttributeNS", createSpy22("getAttributeNS"));
1221
+ __publicField(this, "getAttributeNames", createSpy22("getAttributeNames"));
1222
+ __publicField(this, "getAttributeNode", createSpy22("getAttributeNode"));
1223
+ __publicField(this, "getAttributeNodeNS", createSpy22("getAttributeNodeNS"));
1224
+ __publicField(this, "getBoundingClientRect", createSpy22("getBoundingClientRect"));
1225
+ __publicField(this, "getClientRects", createSpy22("getClientRects"));
1226
+ __publicField(this, "getElementsByClassName", createSpy22("getElementsByClassName"));
1227
+ __publicField(this, "getElementsByTagName", createSpy22(
1208
1228
  "getElementsByTagName"
1209
1229
  ));
1210
- __publicField(this, "getElementsByTagNameNS", createSpy2("getElementsByTagNameNS"));
1211
- __publicField(this, "getHTML", createSpy2("getHTML"));
1212
- __publicField(this, "hasAttribute", createSpy2("hasAttribute"));
1213
- __publicField(this, "hasAttributeNS", createSpy2("hasAttributeNS"));
1214
- __publicField(this, "hasAttributes", createSpy2("hasAttributes"));
1215
- __publicField(this, "hasPointerCapture", createSpy2("hasPointerCapture"));
1216
- __publicField(this, "insertAdjacentElement", createSpy2(
1217
- "insertAdjacentElement"
1218
- ));
1219
- __publicField(this, "insertAdjacentHTML", createSpy2("insertAdjacentHTML"));
1220
- __publicField(this, "insertAdjacentText", createSpy2("insertAdjacentText"));
1221
- __publicField(this, "matches", createSpy2("matches"));
1222
- __publicField(this, "releasePointerCapture", createSpy2(
1223
- "releasePointerCapture"
1224
- ));
1225
- __publicField(this, "removeAttribute", createSpy2("removeAttribute"));
1226
- __publicField(this, "removeAttributeNS", createSpy2("removeAttributeNS"));
1227
- __publicField(this, "removeAttributeNode", createSpy2(
1230
+ __publicField(this, "getElementsByTagNameNS", createSpy22("getElementsByTagNameNS"));
1231
+ __publicField(this, "getHTML", createSpy22("getHTML"));
1232
+ __publicField(this, "hasAttribute", createSpy22("hasAttribute"));
1233
+ __publicField(this, "hasAttributeNS", createSpy22("hasAttributeNS"));
1234
+ __publicField(this, "hasAttributes", createSpy22("hasAttributes"));
1235
+ __publicField(this, "hasPointerCapture", createSpy22("hasPointerCapture"));
1236
+ __publicField(this, "insertAdjacentElement", createSpy22("insertAdjacentElement"));
1237
+ __publicField(this, "insertAdjacentHTML", createSpy22("insertAdjacentHTML"));
1238
+ __publicField(this, "insertAdjacentText", createSpy22("insertAdjacentText"));
1239
+ __publicField(this, "matches", createSpy22("matches"));
1240
+ __publicField(this, "releasePointerCapture", createSpy22("releasePointerCapture"));
1241
+ __publicField(this, "removeAttribute", createSpy22("removeAttribute"));
1242
+ __publicField(this, "removeAttributeNS", createSpy22("removeAttributeNS"));
1243
+ __publicField(this, "removeAttributeNode", createSpy22(
1228
1244
  "removeAttributeNode"
1229
1245
  ));
1230
- __publicField(this, "requestFullscreen", createSpy2("requestFullscreen"));
1231
- __publicField(this, "requestPointerLock", createSpy2("requestPointerLock"));
1232
- __publicField(this, "scroll", createSpy2("scroll"));
1233
- __publicField(this, "scrollBy", createSpy2("scrollBy"));
1234
- __publicField(this, "scrollIntoView", createSpy2("scrollIntoView"));
1235
- __publicField(this, "scrollTo", createSpy2("scrollTo"));
1236
- __publicField(this, "setAttribute", createSpy2("setAttribute"));
1237
- __publicField(this, "setAttributeNS", createSpy2("setAttributeNS"));
1238
- __publicField(this, "setAttributeNode", createSpy2("setAttributeNode"));
1239
- __publicField(this, "setAttributeNodeNS", createSpy2("setAttributeNodeNS"));
1240
- __publicField(this, "setHTMLUnsafe", createSpy2("setHTMLUnsafe"));
1241
- __publicField(this, "setPointerCapture", createSpy2("setPointerCapture"));
1242
- __publicField(this, "toggleAttribute", createSpy2("toggleAttribute"));
1243
- __publicField(this, "webkitMatchesSelector", createSpy2(
1244
- "webkitMatchesSelector"
1245
- ));
1246
- __publicField(this, "blur", createSpy2("blur"));
1247
- __publicField(this, "focus", createSpy2("focus"));
1248
- __publicField(this, "appendChild", createSpy2("appendChild"));
1249
- __publicField(this, "cloneNode", createSpy2("cloneNode"));
1250
- __publicField(this, "compareDocumentPosition", createSpy2("compareDocumentPosition"));
1251
- __publicField(this, "contains", createSpy2("contains"));
1252
- __publicField(this, "getRootNode", createSpy2("getRootNode"));
1253
- __publicField(this, "hasChildNodes", createSpy2("hasChildNodes"));
1254
- __publicField(this, "insertBefore", createSpy2("insertBefore"));
1255
- __publicField(this, "isDefaultNamespace", createSpy2("isDefaultNamespace"));
1256
- __publicField(this, "isEqualNode", createSpy2("isEqualNode"));
1257
- __publicField(this, "isSameNode", createSpy2("isSameNode"));
1258
- __publicField(this, "lookupNamespaceURI", createSpy2("lookupNamespaceURI"));
1259
- __publicField(this, "lookupPrefix", createSpy2("lookupPrefix"));
1260
- __publicField(this, "normalize", createSpy2("normalize"));
1261
- __publicField(this, "removeChild", createSpy2("removeChild"));
1262
- __publicField(this, "replaceChild", createSpy2("replaceChild"));
1263
- __publicField(this, "animate", createSpy2("animate"));
1264
- __publicField(this, "getAnimations", createSpy2("getAnimations"));
1265
- __publicField(this, "after", createSpy2("after"));
1266
- __publicField(this, "before", createSpy2("before"));
1267
- __publicField(this, "remove", createSpy2("remove"));
1268
- __publicField(this, "replaceWith", createSpy2("replaceWith"));
1269
- __publicField(this, "append", createSpy2("append"));
1270
- __publicField(this, "prepend", createSpy2("prepend"));
1271
- __publicField(this, "querySelector", createSpy2("querySelector"));
1272
- __publicField(this, "querySelectorAll", createSpy2("querySelectorAll"));
1273
- __publicField(this, "replaceChildren", createSpy2("replaceChildren"));
1274
- __publicField(this, "dispatchEvent", createSpy2("dispatchEvent"));
1246
+ __publicField(this, "requestFullscreen", createSpy22("requestFullscreen"));
1247
+ __publicField(this, "requestPointerLock", createSpy22("requestPointerLock"));
1248
+ __publicField(this, "scroll", createSpy22("scroll"));
1249
+ __publicField(this, "scrollBy", createSpy22("scrollBy"));
1250
+ __publicField(this, "scrollIntoView", createSpy22("scrollIntoView"));
1251
+ __publicField(this, "scrollTo", createSpy22("scrollTo"));
1252
+ __publicField(this, "setAttribute", createSpy22("setAttribute"));
1253
+ __publicField(this, "setAttributeNS", createSpy22("setAttributeNS"));
1254
+ __publicField(this, "setAttributeNode", createSpy22("setAttributeNode"));
1255
+ __publicField(this, "setAttributeNodeNS", createSpy22("setAttributeNodeNS"));
1256
+ __publicField(this, "setHTMLUnsafe", createSpy22("setHTMLUnsafe"));
1257
+ __publicField(this, "setPointerCapture", createSpy22("setPointerCapture"));
1258
+ __publicField(this, "toggleAttribute", createSpy22("toggleAttribute"));
1259
+ __publicField(this, "webkitMatchesSelector", createSpy22("webkitMatchesSelector"));
1260
+ __publicField(this, "blur", createSpy22("blur"));
1261
+ __publicField(this, "focus", createSpy22("focus"));
1262
+ __publicField(this, "appendChild", createSpy22("appendChild"));
1263
+ __publicField(this, "cloneNode", createSpy22("cloneNode"));
1264
+ __publicField(this, "compareDocumentPosition", createSpy22("compareDocumentPosition"));
1265
+ __publicField(this, "contains", createSpy22("contains"));
1266
+ __publicField(this, "getRootNode", createSpy22("getRootNode"));
1267
+ __publicField(this, "hasChildNodes", createSpy22("hasChildNodes"));
1268
+ __publicField(this, "insertBefore", createSpy22("insertBefore"));
1269
+ __publicField(this, "isDefaultNamespace", createSpy22("isDefaultNamespace"));
1270
+ __publicField(this, "isEqualNode", createSpy22("isEqualNode"));
1271
+ __publicField(this, "isSameNode", createSpy22("isSameNode"));
1272
+ __publicField(this, "lookupNamespaceURI", createSpy22("lookupNamespaceURI"));
1273
+ __publicField(this, "lookupPrefix", createSpy22("lookupPrefix"));
1274
+ __publicField(this, "normalize", createSpy22("normalize"));
1275
+ __publicField(this, "removeChild", createSpy22("removeChild"));
1276
+ __publicField(this, "replaceChild", createSpy22("replaceChild"));
1277
+ __publicField(this, "animate", createSpy22("animate"));
1278
+ __publicField(this, "getAnimations", createSpy22("getAnimations"));
1279
+ __publicField(this, "after", createSpy22("after"));
1280
+ __publicField(this, "before", createSpy22("before"));
1281
+ __publicField(this, "remove", createSpy22("remove"));
1282
+ __publicField(this, "replaceWith", createSpy22("replaceWith"));
1283
+ __publicField(this, "append", createSpy22("append"));
1284
+ __publicField(this, "prepend", createSpy22("prepend"));
1285
+ __publicField(this, "querySelector", createSpy22("querySelector"));
1286
+ __publicField(this, "querySelectorAll", createSpy22("querySelectorAll"));
1287
+ __publicField(this, "replaceChildren", createSpy22("replaceChildren"));
1288
+ __publicField(this, "dispatchEvent", createSpy22("dispatchEvent"));
1275
1289
  }
1276
1290
  };
1277
- var MockHTMLMediaElement = class {
1291
+ var MockHTMLDivElement = class {
1278
1292
  constructor() {
1279
- __publicField(this, "autoplay", false);
1280
- __publicField(this, "buffered");
1281
- __publicField(this, "controls", false);
1282
- __publicField(this, "crossOrigin", "");
1283
- __publicField(this, "currentSrc", "");
1284
- __publicField(this, "currentTime", 0);
1285
- __publicField(this, "defaultMuted", false);
1286
- __publicField(this, "defaultPlaybackRate", 0);
1287
- __publicField(this, "disableRemotePlayback", false);
1288
- __publicField(this, "duration", 0);
1289
- __publicField(this, "ended", false);
1290
- __publicField(this, "error", null);
1291
- __publicField(this, "loop", false);
1292
- __publicField(this, "mediaKeys", null);
1293
- __publicField(this, "muted", false);
1294
- __publicField(this, "networkState", 0);
1295
- __publicField(this, "onencrypted", null);
1296
- __publicField(this, "onwaitingforkey", null);
1297
- __publicField(this, "paused", false);
1298
- __publicField(this, "playbackRate", 0);
1299
- __publicField(this, "played");
1300
- __publicField(this, "preload", "none");
1301
- __publicField(this, "preservesPitch", false);
1302
- __publicField(this, "readyState", 0);
1303
- __publicField(this, "remote");
1304
- __publicField(this, "seekable");
1305
- __publicField(this, "seeking", false);
1306
- __publicField(this, "sinkId", "");
1307
- __publicField(this, "src", "");
1308
- __publicField(this, "srcObject");
1309
- __publicField(this, "textTracks");
1310
- __publicField(this, "volume", 0);
1311
- __publicField(this, "NETWORK_EMPTY", 0);
1312
- __publicField(this, "NETWORK_IDLE", 1);
1313
- __publicField(this, "NETWORK_LOADING", 2);
1314
- __publicField(this, "NETWORK_NO_SOURCE", 3);
1315
- __publicField(this, "HAVE_NOTHING", 0);
1316
- __publicField(this, "HAVE_METADATA", 1);
1317
- __publicField(this, "HAVE_CURRENT_DATA", 2);
1318
- __publicField(this, "HAVE_FUTURE_DATA", 3);
1319
- __publicField(this, "HAVE_ENOUGH_DATA", 4);
1293
+ __publicField(this, "align", "");
1320
1294
  __publicField(this, "accessKey", "");
1321
1295
  __publicField(this, "accessKeyLabel", "");
1322
1296
  __publicField(this, "autocapitalize", "");
@@ -1535,448 +1509,317 @@ var MockHTMLMediaElement = class {
1535
1509
  __publicField(this, "ariaPlaceholder", "");
1536
1510
  __publicField(this, "ariaPosInSet", "");
1537
1511
  __publicField(this, "ariaPressed", "");
1538
- __publicField(this, "ariaReadOnly", "");
1539
- __publicField(this, "ariaRelevant", "");
1540
- __publicField(this, "ariaRequired", "");
1541
- __publicField(this, "ariaRoleDescription", "");
1542
- __publicField(this, "ariaRowCount", "");
1543
- __publicField(this, "ariaRowIndex", "");
1544
- __publicField(this, "ariaRowIndexText", "");
1545
- __publicField(this, "ariaRowSpan", "");
1546
- __publicField(this, "ariaSelected", "");
1547
- __publicField(this, "ariaSetSize", "");
1548
- __publicField(this, "ariaSort", "");
1549
- __publicField(this, "ariaValueMax", "");
1550
- __publicField(this, "ariaValueMin", "");
1551
- __publicField(this, "ariaValueNow", "");
1552
- __publicField(this, "ariaValueText", "");
1553
- __publicField(this, "role", "");
1554
- __publicField(this, "nextElementSibling", null);
1555
- __publicField(this, "previousElementSibling", null);
1556
- __publicField(this, "childElementCount", 0);
1557
- __publicField(this, "children");
1558
- __publicField(this, "firstElementChild", null);
1559
- __publicField(this, "lastElementChild", null);
1560
- __publicField(this, "assignedSlot", null);
1561
- __publicField(this, "addTextTrack", createSpy2("addTextTrack"));
1562
- __publicField(this, "canPlayType", createSpy2("canPlayType"));
1563
- __publicField(this, "fastSeek", createSpy2("fastSeek"));
1564
- __publicField(this, "load", createSpy2("load"));
1565
- __publicField(this, "pause", createSpy2("pause"));
1566
- __publicField(this, "play", createSpy2("play"));
1567
- __publicField(this, "setMediaKeys", createSpy2("setMediaKeys"));
1568
- __publicField(this, "setSinkId", createSpy2("setSinkId"));
1569
- __publicField(this, "addEventListener", createSpy2("addEventListener"));
1570
- __publicField(this, "removeEventListener", createSpy2(
1571
- "removeEventListener"
1572
- ));
1573
- __publicField(this, "attachInternals", createSpy2("attachInternals"));
1574
- __publicField(this, "click", createSpy2("click"));
1575
- __publicField(this, "hidePopover", createSpy2("hidePopover"));
1576
- __publicField(this, "showPopover", createSpy2("showPopover"));
1577
- __publicField(this, "togglePopover", createSpy2("togglePopover"));
1578
- __publicField(this, "attachShadow", createSpy2("attachShadow"));
1579
- __publicField(this, "checkVisibility", createSpy2("checkVisibility"));
1580
- __publicField(this, "closest", createSpy2("closest"));
1581
- __publicField(this, "computedStyleMap", createSpy2("computedStyleMap"));
1582
- __publicField(this, "getAttribute", createSpy2("getAttribute"));
1583
- __publicField(this, "getAttributeNS", createSpy2("getAttributeNS"));
1584
- __publicField(this, "getAttributeNames", createSpy2("getAttributeNames"));
1585
- __publicField(this, "getAttributeNode", createSpy2("getAttributeNode"));
1586
- __publicField(this, "getAttributeNodeNS", createSpy2("getAttributeNodeNS"));
1587
- __publicField(this, "getBoundingClientRect", createSpy2("getBoundingClientRect"));
1588
- __publicField(this, "getClientRects", createSpy2("getClientRects"));
1589
- __publicField(this, "getElementsByClassName", createSpy2("getElementsByClassName"));
1590
- __publicField(this, "getElementsByTagName", createSpy2(
1591
- "getElementsByTagName"
1592
- ));
1593
- __publicField(this, "getElementsByTagNameNS", createSpy2("getElementsByTagNameNS"));
1594
- __publicField(this, "getHTML", createSpy2("getHTML"));
1595
- __publicField(this, "hasAttribute", createSpy2("hasAttribute"));
1596
- __publicField(this, "hasAttributeNS", createSpy2("hasAttributeNS"));
1597
- __publicField(this, "hasAttributes", createSpy2("hasAttributes"));
1598
- __publicField(this, "hasPointerCapture", createSpy2("hasPointerCapture"));
1599
- __publicField(this, "insertAdjacentElement", createSpy2("insertAdjacentElement"));
1600
- __publicField(this, "insertAdjacentHTML", createSpy2("insertAdjacentHTML"));
1601
- __publicField(this, "insertAdjacentText", createSpy2("insertAdjacentText"));
1602
- __publicField(this, "matches", createSpy2("matches"));
1603
- __publicField(this, "releasePointerCapture", createSpy2("releasePointerCapture"));
1604
- __publicField(this, "removeAttribute", createSpy2("removeAttribute"));
1605
- __publicField(this, "removeAttributeNS", createSpy2("removeAttributeNS"));
1606
- __publicField(this, "removeAttributeNode", createSpy2(
1607
- "removeAttributeNode"
1608
- ));
1609
- __publicField(this, "requestFullscreen", createSpy2("requestFullscreen"));
1610
- __publicField(this, "requestPointerLock", createSpy2("requestPointerLock"));
1611
- __publicField(this, "scroll", createSpy2("scroll"));
1612
- __publicField(this, "scrollBy", createSpy2("scrollBy"));
1613
- __publicField(this, "scrollIntoView", createSpy2("scrollIntoView"));
1614
- __publicField(this, "scrollTo", createSpy2("scrollTo"));
1615
- __publicField(this, "setAttribute", createSpy2("setAttribute"));
1616
- __publicField(this, "setAttributeNS", createSpy2("setAttributeNS"));
1617
- __publicField(this, "setAttributeNode", createSpy2("setAttributeNode"));
1618
- __publicField(this, "setAttributeNodeNS", createSpy2("setAttributeNodeNS"));
1619
- __publicField(this, "setHTMLUnsafe", createSpy2("setHTMLUnsafe"));
1620
- __publicField(this, "setPointerCapture", createSpy2("setPointerCapture"));
1621
- __publicField(this, "toggleAttribute", createSpy2("toggleAttribute"));
1622
- __publicField(this, "webkitMatchesSelector", createSpy2("webkitMatchesSelector"));
1623
- __publicField(this, "blur", createSpy2("blur"));
1624
- __publicField(this, "focus", createSpy2("focus"));
1625
- __publicField(this, "appendChild", createSpy2("appendChild"));
1626
- __publicField(this, "cloneNode", createSpy2("cloneNode"));
1627
- __publicField(this, "compareDocumentPosition", createSpy2("compareDocumentPosition"));
1628
- __publicField(this, "contains", createSpy2("contains"));
1629
- __publicField(this, "getRootNode", createSpy2("getRootNode"));
1630
- __publicField(this, "hasChildNodes", createSpy2("hasChildNodes"));
1631
- __publicField(this, "insertBefore", createSpy2("insertBefore"));
1632
- __publicField(this, "isDefaultNamespace", createSpy2("isDefaultNamespace"));
1633
- __publicField(this, "isEqualNode", createSpy2("isEqualNode"));
1634
- __publicField(this, "isSameNode", createSpy2("isSameNode"));
1635
- __publicField(this, "lookupNamespaceURI", createSpy2("lookupNamespaceURI"));
1636
- __publicField(this, "lookupPrefix", createSpy2("lookupPrefix"));
1637
- __publicField(this, "normalize", createSpy2("normalize"));
1638
- __publicField(this, "removeChild", createSpy2("removeChild"));
1639
- __publicField(this, "replaceChild", createSpy2("replaceChild"));
1640
- __publicField(this, "animate", createSpy2("animate"));
1641
- __publicField(this, "getAnimations", createSpy2("getAnimations"));
1642
- __publicField(this, "after", createSpy2("after"));
1643
- __publicField(this, "before", createSpy2("before"));
1644
- __publicField(this, "remove", createSpy2("remove"));
1645
- __publicField(this, "replaceWith", createSpy2("replaceWith"));
1646
- __publicField(this, "append", createSpy2("append"));
1647
- __publicField(this, "prepend", createSpy2("prepend"));
1648
- __publicField(this, "querySelector", createSpy2("querySelector"));
1649
- __publicField(this, "querySelectorAll", createSpy2("querySelectorAll"));
1650
- __publicField(this, "replaceChildren", createSpy2("replaceChildren"));
1651
- __publicField(this, "dispatchEvent", createSpy2("dispatchEvent"));
1652
- }
1653
- };
1654
- var MockMediaError = class {
1655
- constructor() {
1656
- __publicField(this, "code", 0);
1657
- __publicField(this, "message", "");
1658
- __publicField(this, "MEDIA_ERR_ABORTED", 1);
1659
- __publicField(this, "MEDIA_ERR_NETWORK", 2);
1660
- __publicField(this, "MEDIA_ERR_DECODE", 3);
1661
- __publicField(this, "MEDIA_ERR_SRC_NOT_SUPPORTED", 4);
1662
- }
1663
- };
1664
- var MockMediaKeyMessageEvent = class {
1665
- constructor() {
1666
- __publicField(this, "message", new ArrayBuffer(0));
1667
- __publicField(this, "messageType", "individualization-request");
1668
- __publicField(this, "bubbles", false);
1669
- __publicField(this, "cancelBubble", false);
1670
- __publicField(this, "cancelable", false);
1671
- __publicField(this, "composed", false);
1672
- __publicField(this, "currentTarget", null);
1673
- __publicField(this, "defaultPrevented", false);
1674
- __publicField(this, "eventPhase", 0);
1675
- __publicField(this, "isTrusted", false);
1676
- __publicField(this, "returnValue", false);
1677
- __publicField(this, "srcElement", null);
1678
- __publicField(this, "target", null);
1679
- __publicField(this, "timeStamp", 0);
1680
- __publicField(this, "type", "");
1681
- __publicField(this, "NONE", 0);
1682
- __publicField(this, "CAPTURING_PHASE", 1);
1683
- __publicField(this, "AT_TARGET", 2);
1684
- __publicField(this, "BUBBLING_PHASE", 3);
1685
- __publicField(this, "composedPath", createSpy2("composedPath"));
1686
- __publicField(this, "initEvent", createSpy2("initEvent"));
1687
- __publicField(this, "preventDefault", createSpy2("preventDefault"));
1688
- __publicField(this, "stopImmediatePropagation", createSpy2("stopImmediatePropagation"));
1689
- __publicField(this, "stopPropagation", createSpy2("stopPropagation"));
1690
- }
1691
- };
1692
- var MockMediaKeySession = class {
1693
- constructor() {
1694
- __publicField(this, "closed");
1695
- __publicField(this, "expiration", 0);
1696
- __publicField(this, "keyStatuses");
1697
- __publicField(this, "onkeystatuseschange", null);
1698
- __publicField(this, "onmessage", null);
1699
- __publicField(this, "sessionId", "");
1700
- __publicField(this, "close", createSpy2("close"));
1701
- __publicField(this, "generateRequest", createSpy2("generateRequest"));
1702
- __publicField(this, "load", createSpy2("load"));
1703
- __publicField(this, "remove", createSpy2("remove"));
1704
- __publicField(this, "update", createSpy2("update"));
1705
- __publicField(this, "addEventListener", createSpy2("addEventListener"));
1706
- __publicField(this, "removeEventListener", createSpy2(
1707
- "removeEventListener"
1708
- ));
1709
- __publicField(this, "dispatchEvent", createSpy2("dispatchEvent"));
1710
- }
1711
- };
1712
- var MockMediaKeySystemAccess = class {
1713
- constructor() {
1714
- __publicField(this, "keySystem", "");
1715
- __publicField(this, "createMediaKeys", createSpy2("createMediaKeys"));
1716
- __publicField(this, "getConfiguration", createSpy2("getConfiguration"));
1717
- }
1718
- };
1719
- var MockMediaKeys = class {
1720
- constructor() {
1721
- __publicField(this, "createSession", createSpy2("createSession"));
1722
- __publicField(this, "getStatusForPolicy", createSpy2("getStatusForPolicy"));
1723
- __publicField(this, "setServerCertificate", createSpy2(
1724
- "setServerCertificate"
1725
- ));
1726
- }
1727
- };
1728
- var MockMediaSource = class {
1729
- constructor() {
1730
- __publicField(this, "activeSourceBuffers");
1731
- __publicField(this, "duration", 0);
1732
- __publicField(this, "onsourceclose", null);
1733
- __publicField(this, "onsourceended", null);
1734
- __publicField(this, "onsourceopen", null);
1735
- __publicField(this, "readyState", "closed");
1736
- __publicField(this, "sourceBuffers");
1737
- __publicField(this, "addSourceBuffer", createSpy2("addSourceBuffer"));
1738
- __publicField(this, "clearLiveSeekableRange", createSpy2(
1739
- "clearLiveSeekableRange"
1740
- ));
1741
- __publicField(this, "endOfStream", createSpy2("endOfStream"));
1742
- __publicField(this, "removeSourceBuffer", createSpy2("removeSourceBuffer"));
1743
- __publicField(this, "setLiveSeekableRange", createSpy2(
1744
- "setLiveSeekableRange"
1745
- ));
1746
- __publicField(this, "addEventListener", createSpy2("addEventListener"));
1747
- __publicField(this, "removeEventListener", createSpy2(
1748
- "removeEventListener"
1749
- ));
1750
- __publicField(this, "dispatchEvent", createSpy2("dispatchEvent"));
1751
- }
1752
- };
1753
- var MockMediaStream = class {
1754
- constructor() {
1755
- __publicField(this, "active", false);
1756
- __publicField(this, "id", "");
1757
- __publicField(this, "onaddtrack", null);
1758
- __publicField(this, "onremovetrack", null);
1759
- __publicField(this, "addTrack", createSpy2("addTrack"));
1760
- __publicField(this, "clone", createSpy2("clone"));
1761
- __publicField(this, "getAudioTracks", createSpy2("getAudioTracks"));
1762
- __publicField(this, "getTrackById", createSpy2("getTrackById"));
1763
- __publicField(this, "getTracks", createSpy2("getTracks"));
1764
- __publicField(this, "getVideoTracks", createSpy2("getVideoTracks"));
1765
- __publicField(this, "removeTrack", createSpy2("removeTrack"));
1766
- __publicField(this, "addEventListener", createSpy2("addEventListener"));
1767
- __publicField(this, "removeEventListener", createSpy2(
1768
- "removeEventListener"
1769
- ));
1770
- __publicField(this, "dispatchEvent", createSpy2("dispatchEvent"));
1771
- }
1772
- };
1773
- var MockNavigator = class {
1774
- constructor() {
1775
- __publicField(this, "clipboard");
1776
- __publicField(this, "credentials");
1777
- __publicField(this, "doNotTrack", "");
1778
- __publicField(this, "geolocation");
1779
- __publicField(this, "login");
1780
- __publicField(this, "maxTouchPoints", 0);
1781
- __publicField(this, "mediaCapabilities");
1782
- __publicField(this, "mediaDevices");
1783
- __publicField(this, "mediaSession");
1784
- __publicField(this, "permissions");
1785
- __publicField(this, "serviceWorker");
1786
- __publicField(this, "userActivation");
1787
- __publicField(this, "wakeLock");
1788
- __publicField(this, "webdriver", false);
1789
- __publicField(this, "hardwareConcurrency", 0);
1790
- __publicField(this, "cookieEnabled", false);
1791
- __publicField(this, "appCodeName", "");
1792
- __publicField(this, "appName", "");
1793
- __publicField(this, "appVersion", "");
1794
- __publicField(this, "platform", "");
1795
- __publicField(this, "product", "");
1796
- __publicField(this, "productSub", "");
1797
- __publicField(this, "userAgent", "");
1798
- __publicField(this, "vendor", "");
1799
- __publicField(this, "vendorSub", "");
1800
- __publicField(this, "language", "");
1801
- __publicField(this, "languages", []);
1802
- __publicField(this, "locks");
1803
- __publicField(this, "onLine", false);
1804
- __publicField(this, "mimeTypes");
1805
- __publicField(this, "pdfViewerEnabled", false);
1806
- __publicField(this, "plugins");
1807
- __publicField(this, "storage");
1808
- __publicField(this, "canShare", createSpy2("canShare"));
1809
- __publicField(this, "getGamepads", createSpy2("getGamepads"));
1810
- __publicField(this, "requestMIDIAccess", createSpy2("requestMIDIAccess"));
1811
- __publicField(this, "requestMediaKeySystemAccess", createSpy2("requestMediaKeySystemAccess"));
1812
- __publicField(this, "sendBeacon", createSpy2("sendBeacon"));
1813
- __publicField(this, "share", createSpy2("share"));
1814
- __publicField(this, "vibrate", createSpy2("vibrate"));
1815
- __publicField(this, "clearAppBadge", createSpy2("clearAppBadge"));
1816
- __publicField(this, "setAppBadge", createSpy2("setAppBadge"));
1817
- __publicField(this, "registerProtocolHandler", createSpy2(
1818
- "registerProtocolHandler"
1819
- ));
1820
- __publicField(this, "javaEnabled", createSpy2("javaEnabled"));
1821
- }
1822
- };
1823
- var MockNode = class {
1824
- constructor() {
1825
- __publicField(this, "baseURI", "");
1826
- __publicField(this, "childNodes");
1827
- __publicField(this, "firstChild", null);
1828
- __publicField(this, "isConnected", false);
1829
- __publicField(this, "lastChild", null);
1830
- __publicField(this, "nextSibling", null);
1831
- __publicField(this, "nodeName", "");
1832
- __publicField(this, "nodeType", 0);
1833
- __publicField(this, "nodeValue", "");
1834
- __publicField(this, "ownerDocument", null);
1835
- __publicField(this, "parentElement", null);
1836
- __publicField(this, "parentNode", null);
1837
- __publicField(this, "previousSibling", null);
1838
- __publicField(this, "textContent", "");
1839
- __publicField(this, "ELEMENT_NODE", 1);
1840
- __publicField(this, "ATTRIBUTE_NODE", 2);
1841
- __publicField(this, "TEXT_NODE", 3);
1842
- __publicField(this, "CDATA_SECTION_NODE", 4);
1843
- __publicField(this, "ENTITY_REFERENCE_NODE", 5);
1844
- __publicField(this, "ENTITY_NODE", 6);
1845
- __publicField(this, "PROCESSING_INSTRUCTION_NODE", 7);
1846
- __publicField(this, "COMMENT_NODE", 8);
1847
- __publicField(this, "DOCUMENT_NODE", 9);
1848
- __publicField(this, "DOCUMENT_TYPE_NODE", 10);
1849
- __publicField(this, "DOCUMENT_FRAGMENT_NODE", 11);
1850
- __publicField(this, "NOTATION_NODE", 12);
1851
- __publicField(this, "DOCUMENT_POSITION_DISCONNECTED", 1);
1852
- __publicField(this, "DOCUMENT_POSITION_PRECEDING", 2);
1853
- __publicField(this, "DOCUMENT_POSITION_FOLLOWING", 4);
1854
- __publicField(this, "DOCUMENT_POSITION_CONTAINS", 8);
1855
- __publicField(this, "DOCUMENT_POSITION_CONTAINED_BY", 16);
1856
- __publicField(this, "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", 32);
1857
- __publicField(this, "appendChild", createSpy2("appendChild"));
1858
- __publicField(this, "cloneNode", createSpy2("cloneNode"));
1859
- __publicField(this, "compareDocumentPosition", createSpy2(
1860
- "compareDocumentPosition"
1861
- ));
1862
- __publicField(this, "contains", createSpy2("contains"));
1863
- __publicField(this, "getRootNode", createSpy2("getRootNode"));
1864
- __publicField(this, "hasChildNodes", createSpy2("hasChildNodes"));
1865
- __publicField(this, "insertBefore", createSpy2("insertBefore"));
1866
- __publicField(this, "isDefaultNamespace", createSpy2("isDefaultNamespace"));
1867
- __publicField(this, "isEqualNode", createSpy2("isEqualNode"));
1868
- __publicField(this, "isSameNode", createSpy2("isSameNode"));
1869
- __publicField(this, "lookupNamespaceURI", createSpy2("lookupNamespaceURI"));
1870
- __publicField(this, "lookupPrefix", createSpy2("lookupPrefix"));
1871
- __publicField(this, "normalize", createSpy2("normalize"));
1872
- __publicField(this, "removeChild", createSpy2("removeChild"));
1873
- __publicField(this, "replaceChild", createSpy2("replaceChild"));
1874
- __publicField(this, "addEventListener", createSpy2("addEventListener"));
1875
- __publicField(this, "dispatchEvent", createSpy2("dispatchEvent"));
1876
- __publicField(this, "removeEventListener", createSpy2(
1512
+ __publicField(this, "ariaReadOnly", "");
1513
+ __publicField(this, "ariaRelevant", "");
1514
+ __publicField(this, "ariaRequired", "");
1515
+ __publicField(this, "ariaRoleDescription", "");
1516
+ __publicField(this, "ariaRowCount", "");
1517
+ __publicField(this, "ariaRowIndex", "");
1518
+ __publicField(this, "ariaRowIndexText", "");
1519
+ __publicField(this, "ariaRowSpan", "");
1520
+ __publicField(this, "ariaSelected", "");
1521
+ __publicField(this, "ariaSetSize", "");
1522
+ __publicField(this, "ariaSort", "");
1523
+ __publicField(this, "ariaValueMax", "");
1524
+ __publicField(this, "ariaValueMin", "");
1525
+ __publicField(this, "ariaValueNow", "");
1526
+ __publicField(this, "ariaValueText", "");
1527
+ __publicField(this, "role", "");
1528
+ __publicField(this, "nextElementSibling", null);
1529
+ __publicField(this, "previousElementSibling", null);
1530
+ __publicField(this, "childElementCount", 0);
1531
+ __publicField(this, "children");
1532
+ __publicField(this, "firstElementChild", null);
1533
+ __publicField(this, "lastElementChild", null);
1534
+ __publicField(this, "assignedSlot", null);
1535
+ __publicField(this, "addEventListener", createSpy22("addEventListener"));
1536
+ __publicField(this, "removeEventListener", createSpy22(
1877
1537
  "removeEventListener"
1878
1538
  ));
1879
- }
1880
- };
1881
- var MockProgressEvent = class {
1882
- constructor() {
1883
- __publicField(this, "lengthComputable", false);
1884
- __publicField(this, "loaded", 0);
1885
- __publicField(this, "target");
1886
- __publicField(this, "total", 0);
1887
- __publicField(this, "bubbles", false);
1888
- __publicField(this, "cancelBubble", false);
1889
- __publicField(this, "cancelable", false);
1890
- __publicField(this, "composed", false);
1891
- __publicField(this, "currentTarget", null);
1892
- __publicField(this, "defaultPrevented", false);
1893
- __publicField(this, "eventPhase", 0);
1894
- __publicField(this, "isTrusted", false);
1895
- __publicField(this, "returnValue", false);
1896
- __publicField(this, "srcElement", null);
1897
- __publicField(this, "timeStamp", 0);
1898
- __publicField(this, "type", "");
1899
- __publicField(this, "NONE", 0);
1900
- __publicField(this, "CAPTURING_PHASE", 1);
1901
- __publicField(this, "AT_TARGET", 2);
1902
- __publicField(this, "BUBBLING_PHASE", 3);
1903
- __publicField(this, "composedPath", createSpy2("composedPath"));
1904
- __publicField(this, "initEvent", createSpy2("initEvent"));
1905
- __publicField(this, "preventDefault", createSpy2("preventDefault"));
1906
- __publicField(this, "stopImmediatePropagation", createSpy2("stopImmediatePropagation"));
1907
- __publicField(this, "stopPropagation", createSpy2("stopPropagation"));
1908
- }
1909
- };
1910
- var MockPromiseRejectionEvent = class {
1911
- constructor() {
1912
- __publicField(this, "promise");
1913
- __publicField(this, "reason");
1914
- __publicField(this, "bubbles", false);
1915
- __publicField(this, "cancelBubble", false);
1916
- __publicField(this, "cancelable", false);
1917
- __publicField(this, "composed", false);
1918
- __publicField(this, "currentTarget", null);
1919
- __publicField(this, "defaultPrevented", false);
1920
- __publicField(this, "eventPhase", 0);
1921
- __publicField(this, "isTrusted", false);
1922
- __publicField(this, "returnValue", false);
1923
- __publicField(this, "srcElement", null);
1924
- __publicField(this, "target", null);
1925
- __publicField(this, "timeStamp", 0);
1926
- __publicField(this, "type", "");
1927
- __publicField(this, "NONE", 0);
1928
- __publicField(this, "CAPTURING_PHASE", 1);
1929
- __publicField(this, "AT_TARGET", 2);
1930
- __publicField(this, "BUBBLING_PHASE", 3);
1931
- __publicField(this, "composedPath", createSpy2("composedPath"));
1932
- __publicField(this, "initEvent", createSpy2("initEvent"));
1933
- __publicField(this, "preventDefault", createSpy2("preventDefault"));
1934
- __publicField(this, "stopImmediatePropagation", createSpy2("stopImmediatePropagation"));
1935
- __publicField(this, "stopPropagation", createSpy2("stopPropagation"));
1936
- }
1937
- };
1938
- var MockSourceBuffer = class {
1939
- constructor() {
1940
- __publicField(this, "appendWindowEnd", 0);
1941
- __publicField(this, "appendWindowStart", 0);
1942
- __publicField(this, "buffered");
1943
- __publicField(this, "mode", "segments");
1944
- __publicField(this, "onabort", null);
1945
- __publicField(this, "onerror", null);
1946
- __publicField(this, "onupdate", null);
1947
- __publicField(this, "onupdateend", null);
1948
- __publicField(this, "onupdatestart", null);
1949
- __publicField(this, "timestampOffset", 0);
1950
- __publicField(this, "updating", false);
1951
- __publicField(this, "abort", createSpy2("abort"));
1952
- __publicField(this, "appendBuffer", createSpy2("appendBuffer"));
1953
- __publicField(this, "changeType", createSpy2("changeType"));
1954
- __publicField(this, "remove", createSpy2("remove"));
1955
- __publicField(this, "addEventListener", createSpy2("addEventListener"));
1956
- __publicField(this, "removeEventListener", createSpy2(
1957
- "removeEventListener"
1539
+ __publicField(this, "attachInternals", createSpy22("attachInternals"));
1540
+ __publicField(this, "click", createSpy22("click"));
1541
+ __publicField(this, "hidePopover", createSpy22("hidePopover"));
1542
+ __publicField(this, "showPopover", createSpy22("showPopover"));
1543
+ __publicField(this, "togglePopover", createSpy22("togglePopover"));
1544
+ __publicField(this, "attachShadow", createSpy22("attachShadow"));
1545
+ __publicField(this, "checkVisibility", createSpy22("checkVisibility"));
1546
+ __publicField(this, "closest", createSpy22("closest"));
1547
+ __publicField(this, "computedStyleMap", createSpy22("computedStyleMap"));
1548
+ __publicField(this, "getAttribute", createSpy22("getAttribute"));
1549
+ __publicField(this, "getAttributeNS", createSpy22("getAttributeNS"));
1550
+ __publicField(this, "getAttributeNames", createSpy22("getAttributeNames"));
1551
+ __publicField(this, "getAttributeNode", createSpy22("getAttributeNode"));
1552
+ __publicField(this, "getAttributeNodeNS", createSpy22("getAttributeNodeNS"));
1553
+ __publicField(this, "getBoundingClientRect", createSpy22(
1554
+ "getBoundingClientRect"
1958
1555
  ));
1959
- __publicField(this, "dispatchEvent", createSpy2("dispatchEvent"));
1960
- }
1961
- };
1962
- var MockStorage = class {
1963
- constructor() {
1964
- __publicField(this, "length", 0);
1965
- __publicField(this, "clear", createSpy2("clear"));
1966
- __publicField(this, "getItem", createSpy2("getItem"));
1967
- __publicField(this, "key", createSpy2("key"));
1968
- __publicField(this, "removeItem", createSpy2("removeItem"));
1969
- __publicField(this, "setItem", createSpy2("setItem"));
1556
+ __publicField(this, "getClientRects", createSpy22("getClientRects"));
1557
+ __publicField(this, "getElementsByClassName", createSpy22("getElementsByClassName"));
1558
+ __publicField(this, "getElementsByTagName", createSpy22(
1559
+ "getElementsByTagName"
1560
+ ));
1561
+ __publicField(this, "getElementsByTagNameNS", createSpy22("getElementsByTagNameNS"));
1562
+ __publicField(this, "getHTML", createSpy22("getHTML"));
1563
+ __publicField(this, "hasAttribute", createSpy22("hasAttribute"));
1564
+ __publicField(this, "hasAttributeNS", createSpy22("hasAttributeNS"));
1565
+ __publicField(this, "hasAttributes", createSpy22("hasAttributes"));
1566
+ __publicField(this, "hasPointerCapture", createSpy22("hasPointerCapture"));
1567
+ __publicField(this, "insertAdjacentElement", createSpy22(
1568
+ "insertAdjacentElement"
1569
+ ));
1570
+ __publicField(this, "insertAdjacentHTML", createSpy22("insertAdjacentHTML"));
1571
+ __publicField(this, "insertAdjacentText", createSpy22("insertAdjacentText"));
1572
+ __publicField(this, "matches", createSpy22("matches"));
1573
+ __publicField(this, "releasePointerCapture", createSpy22(
1574
+ "releasePointerCapture"
1575
+ ));
1576
+ __publicField(this, "removeAttribute", createSpy22("removeAttribute"));
1577
+ __publicField(this, "removeAttributeNS", createSpy22("removeAttributeNS"));
1578
+ __publicField(this, "removeAttributeNode", createSpy22(
1579
+ "removeAttributeNode"
1580
+ ));
1581
+ __publicField(this, "requestFullscreen", createSpy22("requestFullscreen"));
1582
+ __publicField(this, "requestPointerLock", createSpy22("requestPointerLock"));
1583
+ __publicField(this, "scroll", createSpy22("scroll"));
1584
+ __publicField(this, "scrollBy", createSpy22("scrollBy"));
1585
+ __publicField(this, "scrollIntoView", createSpy22("scrollIntoView"));
1586
+ __publicField(this, "scrollTo", createSpy22("scrollTo"));
1587
+ __publicField(this, "setAttribute", createSpy22("setAttribute"));
1588
+ __publicField(this, "setAttributeNS", createSpy22("setAttributeNS"));
1589
+ __publicField(this, "setAttributeNode", createSpy22("setAttributeNode"));
1590
+ __publicField(this, "setAttributeNodeNS", createSpy22("setAttributeNodeNS"));
1591
+ __publicField(this, "setHTMLUnsafe", createSpy22("setHTMLUnsafe"));
1592
+ __publicField(this, "setPointerCapture", createSpy22("setPointerCapture"));
1593
+ __publicField(this, "toggleAttribute", createSpy22("toggleAttribute"));
1594
+ __publicField(this, "webkitMatchesSelector", createSpy22(
1595
+ "webkitMatchesSelector"
1596
+ ));
1597
+ __publicField(this, "blur", createSpy22("blur"));
1598
+ __publicField(this, "focus", createSpy22("focus"));
1599
+ __publicField(this, "appendChild", createSpy22("appendChild"));
1600
+ __publicField(this, "cloneNode", createSpy22("cloneNode"));
1601
+ __publicField(this, "compareDocumentPosition", createSpy22("compareDocumentPosition"));
1602
+ __publicField(this, "contains", createSpy22("contains"));
1603
+ __publicField(this, "getRootNode", createSpy22("getRootNode"));
1604
+ __publicField(this, "hasChildNodes", createSpy22("hasChildNodes"));
1605
+ __publicField(this, "insertBefore", createSpy22("insertBefore"));
1606
+ __publicField(this, "isDefaultNamespace", createSpy22("isDefaultNamespace"));
1607
+ __publicField(this, "isEqualNode", createSpy22("isEqualNode"));
1608
+ __publicField(this, "isSameNode", createSpy22("isSameNode"));
1609
+ __publicField(this, "lookupNamespaceURI", createSpy22("lookupNamespaceURI"));
1610
+ __publicField(this, "lookupPrefix", createSpy22("lookupPrefix"));
1611
+ __publicField(this, "normalize", createSpy22("normalize"));
1612
+ __publicField(this, "removeChild", createSpy22("removeChild"));
1613
+ __publicField(this, "replaceChild", createSpy22("replaceChild"));
1614
+ __publicField(this, "animate", createSpy22("animate"));
1615
+ __publicField(this, "getAnimations", createSpy22("getAnimations"));
1616
+ __publicField(this, "after", createSpy22("after"));
1617
+ __publicField(this, "before", createSpy22("before"));
1618
+ __publicField(this, "remove", createSpy22("remove"));
1619
+ __publicField(this, "replaceWith", createSpy22("replaceWith"));
1620
+ __publicField(this, "append", createSpy22("append"));
1621
+ __publicField(this, "prepend", createSpy22("prepend"));
1622
+ __publicField(this, "querySelector", createSpy22("querySelector"));
1623
+ __publicField(this, "querySelectorAll", createSpy22("querySelectorAll"));
1624
+ __publicField(this, "replaceChildren", createSpy22("replaceChildren"));
1625
+ __publicField(this, "dispatchEvent", createSpy22("dispatchEvent"));
1970
1626
  }
1971
1627
  };
1972
- var MockText = class {
1628
+ var MockHTMLMediaElement = class {
1973
1629
  constructor() {
1974
- __publicField(this, "wholeText", "");
1975
- __publicField(this, "data", "");
1976
- __publicField(this, "length", 0);
1630
+ __publicField(this, "autoplay", false);
1631
+ __publicField(this, "buffered");
1632
+ __publicField(this, "controls", false);
1633
+ __publicField(this, "crossOrigin", "");
1634
+ __publicField(this, "currentSrc", "");
1635
+ __publicField(this, "currentTime", 0);
1636
+ __publicField(this, "defaultMuted", false);
1637
+ __publicField(this, "defaultPlaybackRate", 0);
1638
+ __publicField(this, "disableRemotePlayback", false);
1639
+ __publicField(this, "duration", 0);
1640
+ __publicField(this, "ended", false);
1641
+ __publicField(this, "error", null);
1642
+ __publicField(this, "loop", false);
1643
+ __publicField(this, "mediaKeys", null);
1644
+ __publicField(this, "muted", false);
1645
+ __publicField(this, "networkState", 0);
1646
+ __publicField(this, "onencrypted", null);
1647
+ __publicField(this, "onwaitingforkey", null);
1648
+ __publicField(this, "paused", false);
1649
+ __publicField(this, "playbackRate", 0);
1650
+ __publicField(this, "played");
1651
+ __publicField(this, "preload", "none");
1652
+ __publicField(this, "preservesPitch", false);
1653
+ __publicField(this, "readyState", 0);
1654
+ __publicField(this, "remote");
1655
+ __publicField(this, "seekable");
1656
+ __publicField(this, "seeking", false);
1657
+ __publicField(this, "sinkId", "");
1658
+ __publicField(this, "src", "");
1659
+ __publicField(this, "srcObject");
1660
+ __publicField(this, "textTracks");
1661
+ __publicField(this, "volume", 0);
1662
+ __publicField(this, "NETWORK_EMPTY", 0);
1663
+ __publicField(this, "NETWORK_IDLE", 1);
1664
+ __publicField(this, "NETWORK_LOADING", 2);
1665
+ __publicField(this, "NETWORK_NO_SOURCE", 3);
1666
+ __publicField(this, "HAVE_NOTHING", 0);
1667
+ __publicField(this, "HAVE_METADATA", 1);
1668
+ __publicField(this, "HAVE_CURRENT_DATA", 2);
1669
+ __publicField(this, "HAVE_FUTURE_DATA", 3);
1670
+ __publicField(this, "HAVE_ENOUGH_DATA", 4);
1671
+ __publicField(this, "accessKey", "");
1672
+ __publicField(this, "accessKeyLabel", "");
1673
+ __publicField(this, "autocapitalize", "");
1674
+ __publicField(this, "autocorrect", false);
1675
+ __publicField(this, "dir", "");
1676
+ __publicField(this, "draggable", false);
1677
+ __publicField(this, "hidden", false);
1678
+ __publicField(this, "inert", false);
1679
+ __publicField(this, "innerText", "");
1680
+ __publicField(this, "lang", "");
1681
+ __publicField(this, "offsetHeight", 0);
1682
+ __publicField(this, "offsetLeft", 0);
1683
+ __publicField(this, "offsetParent", null);
1684
+ __publicField(this, "offsetTop", 0);
1685
+ __publicField(this, "offsetWidth", 0);
1686
+ __publicField(this, "outerText", "");
1687
+ __publicField(this, "popover", "");
1688
+ __publicField(this, "spellcheck", false);
1689
+ __publicField(this, "title", "");
1690
+ __publicField(this, "translate", false);
1691
+ __publicField(this, "writingSuggestions", "");
1692
+ __publicField(this, "attributes");
1693
+ __publicField(this, "className", "");
1694
+ __publicField(this, "clientHeight", 0);
1695
+ __publicField(this, "clientLeft", 0);
1696
+ __publicField(this, "clientTop", 0);
1697
+ __publicField(this, "clientWidth", 0);
1698
+ __publicField(this, "currentCSSZoom", 0);
1699
+ __publicField(this, "id", "");
1700
+ __publicField(this, "innerHTML", "");
1701
+ __publicField(this, "localName", "");
1702
+ __publicField(this, "namespaceURI", "");
1703
+ __publicField(this, "onfullscreenchange", null);
1704
+ __publicField(this, "onfullscreenerror", null);
1705
+ __publicField(this, "outerHTML", "");
1977
1706
  __publicField(this, "ownerDocument");
1707
+ __publicField(this, "prefix", "");
1708
+ __publicField(this, "scrollHeight", 0);
1709
+ __publicField(this, "scrollLeft", 0);
1710
+ __publicField(this, "scrollTop", 0);
1711
+ __publicField(this, "scrollWidth", 0);
1712
+ __publicField(this, "shadowRoot", null);
1713
+ __publicField(this, "slot", "");
1714
+ __publicField(this, "tagName", "");
1715
+ __publicField(this, "classList");
1716
+ __publicField(this, "part");
1978
1717
  __publicField(this, "textContent");
1979
- __publicField(this, "assignedSlot", null);
1718
+ __publicField(this, "attributeStyleMap");
1719
+ __publicField(this, "style");
1720
+ __publicField(this, "contentEditable", "");
1721
+ __publicField(this, "enterKeyHint", "");
1722
+ __publicField(this, "inputMode", "");
1723
+ __publicField(this, "isContentEditable", false);
1724
+ __publicField(this, "onabort", null);
1725
+ __publicField(this, "onanimationcancel", null);
1726
+ __publicField(this, "onanimationend", null);
1727
+ __publicField(this, "onanimationiteration", null);
1728
+ __publicField(this, "onanimationstart", null);
1729
+ __publicField(this, "onauxclick", null);
1730
+ __publicField(this, "onbeforeinput", null);
1731
+ __publicField(this, "onbeforematch", null);
1732
+ __publicField(this, "onbeforetoggle", null);
1733
+ __publicField(this, "onblur", null);
1734
+ __publicField(this, "oncancel", null);
1735
+ __publicField(this, "oncanplay", null);
1736
+ __publicField(this, "oncanplaythrough", null);
1737
+ __publicField(this, "onchange", null);
1738
+ __publicField(this, "onclick", null);
1739
+ __publicField(this, "onclose", null);
1740
+ __publicField(this, "oncontextlost", null);
1741
+ __publicField(this, "oncontextmenu", null);
1742
+ __publicField(this, "oncontextrestored", null);
1743
+ __publicField(this, "oncopy", null);
1744
+ __publicField(this, "oncuechange", null);
1745
+ __publicField(this, "oncut", null);
1746
+ __publicField(this, "ondblclick", null);
1747
+ __publicField(this, "ondrag", null);
1748
+ __publicField(this, "ondragend", null);
1749
+ __publicField(this, "ondragenter", null);
1750
+ __publicField(this, "ondragleave", null);
1751
+ __publicField(this, "ondragover", null);
1752
+ __publicField(this, "ondragstart", null);
1753
+ __publicField(this, "ondrop", null);
1754
+ __publicField(this, "ondurationchange", null);
1755
+ __publicField(this, "onemptied", null);
1756
+ __publicField(this, "onended", null);
1757
+ __publicField(this, "onerror");
1758
+ __publicField(this, "onfocus", null);
1759
+ __publicField(this, "onformdata", null);
1760
+ __publicField(this, "ongotpointercapture", null);
1761
+ __publicField(this, "oninput", null);
1762
+ __publicField(this, "oninvalid", null);
1763
+ __publicField(this, "onkeydown", null);
1764
+ __publicField(this, "onkeypress", null);
1765
+ __publicField(this, "onkeyup", null);
1766
+ __publicField(this, "onload", null);
1767
+ __publicField(this, "onloadeddata", null);
1768
+ __publicField(this, "onloadedmetadata", null);
1769
+ __publicField(this, "onloadstart", null);
1770
+ __publicField(this, "onlostpointercapture", null);
1771
+ __publicField(this, "onmousedown", null);
1772
+ __publicField(this, "onmouseenter", null);
1773
+ __publicField(this, "onmouseleave", null);
1774
+ __publicField(this, "onmousemove", null);
1775
+ __publicField(this, "onmouseout", null);
1776
+ __publicField(this, "onmouseover", null);
1777
+ __publicField(this, "onmouseup", null);
1778
+ __publicField(this, "onpaste", null);
1779
+ __publicField(this, "onpause", null);
1780
+ __publicField(this, "onplay", null);
1781
+ __publicField(this, "onplaying", null);
1782
+ __publicField(this, "onpointercancel", null);
1783
+ __publicField(this, "onpointerdown", null);
1784
+ __publicField(this, "onpointerenter", null);
1785
+ __publicField(this, "onpointerleave", null);
1786
+ __publicField(this, "onpointermove", null);
1787
+ __publicField(this, "onpointerout", null);
1788
+ __publicField(this, "onpointerover", null);
1789
+ __publicField(this, "onpointerrawupdate", null);
1790
+ __publicField(this, "onpointerup", null);
1791
+ __publicField(this, "onprogress", null);
1792
+ __publicField(this, "onratechange", null);
1793
+ __publicField(this, "onreset", null);
1794
+ __publicField(this, "onresize", null);
1795
+ __publicField(this, "onscroll", null);
1796
+ __publicField(this, "onscrollend", null);
1797
+ __publicField(this, "onsecuritypolicyviolation", null);
1798
+ __publicField(this, "onseeked", null);
1799
+ __publicField(this, "onseeking", null);
1800
+ __publicField(this, "onselect", null);
1801
+ __publicField(this, "onselectionchange", null);
1802
+ __publicField(this, "onselectstart", null);
1803
+ __publicField(this, "onslotchange", null);
1804
+ __publicField(this, "onstalled", null);
1805
+ __publicField(this, "onsubmit", null);
1806
+ __publicField(this, "onsuspend", null);
1807
+ __publicField(this, "ontimeupdate", null);
1808
+ __publicField(this, "ontoggle", null);
1809
+ __publicField(this, "ontransitioncancel", null);
1810
+ __publicField(this, "ontransitionend", null);
1811
+ __publicField(this, "ontransitionrun", null);
1812
+ __publicField(this, "ontransitionstart", null);
1813
+ __publicField(this, "onvolumechange", null);
1814
+ __publicField(this, "onwaiting", null);
1815
+ __publicField(this, "onwebkitanimationend", null);
1816
+ __publicField(this, "onwebkitanimationiteration", null);
1817
+ __publicField(this, "onwebkitanimationstart", null);
1818
+ __publicField(this, "onwebkittransitionend", null);
1819
+ __publicField(this, "onwheel", null);
1820
+ __publicField(this, "autofocus", false);
1821
+ __publicField(this, "dataset");
1822
+ __publicField(this, "tabIndex", 0);
1980
1823
  __publicField(this, "baseURI", "");
1981
1824
  __publicField(this, "childNodes");
1982
1825
  __publicField(this, "firstChild", null);
@@ -2007,577 +1850,734 @@ var MockText = class {
2007
1850
  __publicField(this, "DOCUMENT_POSITION_CONTAINS", 8);
2008
1851
  __publicField(this, "DOCUMENT_POSITION_CONTAINED_BY", 16);
2009
1852
  __publicField(this, "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", 32);
1853
+ __publicField(this, "ariaActiveDescendantElement", null);
1854
+ __publicField(this, "ariaAtomic", "");
1855
+ __publicField(this, "ariaAutoComplete", "");
1856
+ __publicField(this, "ariaBrailleLabel", "");
1857
+ __publicField(this, "ariaBrailleRoleDescription", "");
1858
+ __publicField(this, "ariaBusy", "");
1859
+ __publicField(this, "ariaChecked", "");
1860
+ __publicField(this, "ariaColCount", "");
1861
+ __publicField(this, "ariaColIndex", "");
1862
+ __publicField(this, "ariaColIndexText", "");
1863
+ __publicField(this, "ariaColSpan", "");
1864
+ __publicField(this, "ariaControlsElements", null);
1865
+ __publicField(this, "ariaCurrent", "");
1866
+ __publicField(this, "ariaDescribedByElements", null);
1867
+ __publicField(this, "ariaDescription", "");
1868
+ __publicField(this, "ariaDetailsElements", null);
1869
+ __publicField(this, "ariaDisabled", "");
1870
+ __publicField(this, "ariaErrorMessageElements", null);
1871
+ __publicField(this, "ariaExpanded", "");
1872
+ __publicField(this, "ariaFlowToElements", null);
1873
+ __publicField(this, "ariaHasPopup", "");
1874
+ __publicField(this, "ariaHidden", "");
1875
+ __publicField(this, "ariaInvalid", "");
1876
+ __publicField(this, "ariaKeyShortcuts", "");
1877
+ __publicField(this, "ariaLabel", "");
1878
+ __publicField(this, "ariaLabelledByElements", null);
1879
+ __publicField(this, "ariaLevel", "");
1880
+ __publicField(this, "ariaLive", "");
1881
+ __publicField(this, "ariaModal", "");
1882
+ __publicField(this, "ariaMultiLine", "");
1883
+ __publicField(this, "ariaMultiSelectable", "");
1884
+ __publicField(this, "ariaOrientation", "");
1885
+ __publicField(this, "ariaOwnsElements", null);
1886
+ __publicField(this, "ariaPlaceholder", "");
1887
+ __publicField(this, "ariaPosInSet", "");
1888
+ __publicField(this, "ariaPressed", "");
1889
+ __publicField(this, "ariaReadOnly", "");
1890
+ __publicField(this, "ariaRelevant", "");
1891
+ __publicField(this, "ariaRequired", "");
1892
+ __publicField(this, "ariaRoleDescription", "");
1893
+ __publicField(this, "ariaRowCount", "");
1894
+ __publicField(this, "ariaRowIndex", "");
1895
+ __publicField(this, "ariaRowIndexText", "");
1896
+ __publicField(this, "ariaRowSpan", "");
1897
+ __publicField(this, "ariaSelected", "");
1898
+ __publicField(this, "ariaSetSize", "");
1899
+ __publicField(this, "ariaSort", "");
1900
+ __publicField(this, "ariaValueMax", "");
1901
+ __publicField(this, "ariaValueMin", "");
1902
+ __publicField(this, "ariaValueNow", "");
1903
+ __publicField(this, "ariaValueText", "");
1904
+ __publicField(this, "role", "");
2010
1905
  __publicField(this, "nextElementSibling", null);
2011
1906
  __publicField(this, "previousElementSibling", null);
2012
- __publicField(this, "splitText", createSpy2("splitText"));
2013
- __publicField(this, "appendData", createSpy2("appendData"));
2014
- __publicField(this, "deleteData", createSpy2("deleteData"));
2015
- __publicField(this, "insertData", createSpy2("insertData"));
2016
- __publicField(this, "replaceData", createSpy2("replaceData"));
2017
- __publicField(this, "substringData", createSpy2("substringData"));
2018
- __publicField(this, "appendChild", createSpy2("appendChild"));
2019
- __publicField(this, "cloneNode", createSpy2("cloneNode"));
2020
- __publicField(this, "compareDocumentPosition", createSpy2(
2021
- "compareDocumentPosition"
2022
- ));
2023
- __publicField(this, "contains", createSpy2("contains"));
2024
- __publicField(this, "getRootNode", createSpy2("getRootNode"));
2025
- __publicField(this, "hasChildNodes", createSpy2("hasChildNodes"));
2026
- __publicField(this, "insertBefore", createSpy2("insertBefore"));
2027
- __publicField(this, "isDefaultNamespace", createSpy2("isDefaultNamespace"));
2028
- __publicField(this, "isEqualNode", createSpy2("isEqualNode"));
2029
- __publicField(this, "isSameNode", createSpy2("isSameNode"));
2030
- __publicField(this, "lookupNamespaceURI", createSpy2("lookupNamespaceURI"));
2031
- __publicField(this, "lookupPrefix", createSpy2("lookupPrefix"));
2032
- __publicField(this, "normalize", createSpy2("normalize"));
2033
- __publicField(this, "removeChild", createSpy2("removeChild"));
2034
- __publicField(this, "replaceChild", createSpy2("replaceChild"));
2035
- __publicField(this, "after", createSpy2("after"));
2036
- __publicField(this, "before", createSpy2("before"));
2037
- __publicField(this, "remove", createSpy2("remove"));
2038
- __publicField(this, "replaceWith", createSpy2("replaceWith"));
2039
- __publicField(this, "addEventListener", createSpy2("addEventListener"));
2040
- __publicField(this, "dispatchEvent", createSpy2("dispatchEvent"));
2041
- __publicField(this, "removeEventListener", createSpy2(
1907
+ __publicField(this, "childElementCount", 0);
1908
+ __publicField(this, "children");
1909
+ __publicField(this, "firstElementChild", null);
1910
+ __publicField(this, "lastElementChild", null);
1911
+ __publicField(this, "assignedSlot", null);
1912
+ __publicField(this, "addTextTrack", createSpy22("addTextTrack"));
1913
+ __publicField(this, "canPlayType", createSpy22("canPlayType"));
1914
+ __publicField(this, "fastSeek", createSpy22("fastSeek"));
1915
+ __publicField(this, "load", createSpy22("load"));
1916
+ __publicField(this, "pause", createSpy22("pause"));
1917
+ __publicField(this, "play", createSpy22("play"));
1918
+ __publicField(this, "setMediaKeys", createSpy22("setMediaKeys"));
1919
+ __publicField(this, "setSinkId", createSpy22("setSinkId"));
1920
+ __publicField(this, "addEventListener", createSpy22("addEventListener"));
1921
+ __publicField(this, "removeEventListener", createSpy22(
2042
1922
  "removeEventListener"
2043
1923
  ));
1924
+ __publicField(this, "attachInternals", createSpy22("attachInternals"));
1925
+ __publicField(this, "click", createSpy22("click"));
1926
+ __publicField(this, "hidePopover", createSpy22("hidePopover"));
1927
+ __publicField(this, "showPopover", createSpy22("showPopover"));
1928
+ __publicField(this, "togglePopover", createSpy22("togglePopover"));
1929
+ __publicField(this, "attachShadow", createSpy22("attachShadow"));
1930
+ __publicField(this, "checkVisibility", createSpy22("checkVisibility"));
1931
+ __publicField(this, "closest", createSpy22("closest"));
1932
+ __publicField(this, "computedStyleMap", createSpy22("computedStyleMap"));
1933
+ __publicField(this, "getAttribute", createSpy22("getAttribute"));
1934
+ __publicField(this, "getAttributeNS", createSpy22("getAttributeNS"));
1935
+ __publicField(this, "getAttributeNames", createSpy22("getAttributeNames"));
1936
+ __publicField(this, "getAttributeNode", createSpy22("getAttributeNode"));
1937
+ __publicField(this, "getAttributeNodeNS", createSpy22("getAttributeNodeNS"));
1938
+ __publicField(this, "getBoundingClientRect", createSpy22("getBoundingClientRect"));
1939
+ __publicField(this, "getClientRects", createSpy22("getClientRects"));
1940
+ __publicField(this, "getElementsByClassName", createSpy22("getElementsByClassName"));
1941
+ __publicField(this, "getElementsByTagName", createSpy22(
1942
+ "getElementsByTagName"
1943
+ ));
1944
+ __publicField(this, "getElementsByTagNameNS", createSpy22("getElementsByTagNameNS"));
1945
+ __publicField(this, "getHTML", createSpy22("getHTML"));
1946
+ __publicField(this, "hasAttribute", createSpy22("hasAttribute"));
1947
+ __publicField(this, "hasAttributeNS", createSpy22("hasAttributeNS"));
1948
+ __publicField(this, "hasAttributes", createSpy22("hasAttributes"));
1949
+ __publicField(this, "hasPointerCapture", createSpy22("hasPointerCapture"));
1950
+ __publicField(this, "insertAdjacentElement", createSpy22("insertAdjacentElement"));
1951
+ __publicField(this, "insertAdjacentHTML", createSpy22("insertAdjacentHTML"));
1952
+ __publicField(this, "insertAdjacentText", createSpy22("insertAdjacentText"));
1953
+ __publicField(this, "matches", createSpy22("matches"));
1954
+ __publicField(this, "releasePointerCapture", createSpy22("releasePointerCapture"));
1955
+ __publicField(this, "removeAttribute", createSpy22("removeAttribute"));
1956
+ __publicField(this, "removeAttributeNS", createSpy22("removeAttributeNS"));
1957
+ __publicField(this, "removeAttributeNode", createSpy22(
1958
+ "removeAttributeNode"
1959
+ ));
1960
+ __publicField(this, "requestFullscreen", createSpy22("requestFullscreen"));
1961
+ __publicField(this, "requestPointerLock", createSpy22("requestPointerLock"));
1962
+ __publicField(this, "scroll", createSpy22("scroll"));
1963
+ __publicField(this, "scrollBy", createSpy22("scrollBy"));
1964
+ __publicField(this, "scrollIntoView", createSpy22("scrollIntoView"));
1965
+ __publicField(this, "scrollTo", createSpy22("scrollTo"));
1966
+ __publicField(this, "setAttribute", createSpy22("setAttribute"));
1967
+ __publicField(this, "setAttributeNS", createSpy22("setAttributeNS"));
1968
+ __publicField(this, "setAttributeNode", createSpy22("setAttributeNode"));
1969
+ __publicField(this, "setAttributeNodeNS", createSpy22("setAttributeNodeNS"));
1970
+ __publicField(this, "setHTMLUnsafe", createSpy22("setHTMLUnsafe"));
1971
+ __publicField(this, "setPointerCapture", createSpy22("setPointerCapture"));
1972
+ __publicField(this, "toggleAttribute", createSpy22("toggleAttribute"));
1973
+ __publicField(this, "webkitMatchesSelector", createSpy22("webkitMatchesSelector"));
1974
+ __publicField(this, "blur", createSpy22("blur"));
1975
+ __publicField(this, "focus", createSpy22("focus"));
1976
+ __publicField(this, "appendChild", createSpy22("appendChild"));
1977
+ __publicField(this, "cloneNode", createSpy22("cloneNode"));
1978
+ __publicField(this, "compareDocumentPosition", createSpy22("compareDocumentPosition"));
1979
+ __publicField(this, "contains", createSpy22("contains"));
1980
+ __publicField(this, "getRootNode", createSpy22("getRootNode"));
1981
+ __publicField(this, "hasChildNodes", createSpy22("hasChildNodes"));
1982
+ __publicField(this, "insertBefore", createSpy22("insertBefore"));
1983
+ __publicField(this, "isDefaultNamespace", createSpy22("isDefaultNamespace"));
1984
+ __publicField(this, "isEqualNode", createSpy22("isEqualNode"));
1985
+ __publicField(this, "isSameNode", createSpy22("isSameNode"));
1986
+ __publicField(this, "lookupNamespaceURI", createSpy22("lookupNamespaceURI"));
1987
+ __publicField(this, "lookupPrefix", createSpy22("lookupPrefix"));
1988
+ __publicField(this, "normalize", createSpy22("normalize"));
1989
+ __publicField(this, "removeChild", createSpy22("removeChild"));
1990
+ __publicField(this, "replaceChild", createSpy22("replaceChild"));
1991
+ __publicField(this, "animate", createSpy22("animate"));
1992
+ __publicField(this, "getAnimations", createSpy22("getAnimations"));
1993
+ __publicField(this, "after", createSpy22("after"));
1994
+ __publicField(this, "before", createSpy22("before"));
1995
+ __publicField(this, "remove", createSpy22("remove"));
1996
+ __publicField(this, "replaceWith", createSpy22("replaceWith"));
1997
+ __publicField(this, "append", createSpy22("append"));
1998
+ __publicField(this, "prepend", createSpy22("prepend"));
1999
+ __publicField(this, "querySelector", createSpy22("querySelector"));
2000
+ __publicField(this, "querySelectorAll", createSpy22("querySelectorAll"));
2001
+ __publicField(this, "replaceChildren", createSpy22("replaceChildren"));
2002
+ __publicField(this, "dispatchEvent", createSpy22("dispatchEvent"));
2044
2003
  }
2045
- };
2046
-
2047
- // test/browserTestUtil/mock/polyfillCustomEvent.ts
2048
- var FakeCustomEvent = class extends MockEvent {
2049
- constructor(type, eventInitDict) {
2050
- var _a, _b;
2051
- super();
2052
- __publicField(this, "detail");
2053
- this.type = type;
2054
- this.detail = eventInitDict == null ? void 0 : eventInitDict.detail;
2055
- this.bubbles = (_a = eventInitDict == null ? void 0 : eventInitDict.bubbles) != null ? _a : false;
2056
- this.cancelable = (_b = eventInitDict == null ? void 0 : eventInitDict.cancelable) != null ? _b : false;
2057
- }
2058
- initCustomEvent() {
2059
- }
2060
- };
2061
- function polyfillCustomEvent() {
2062
- beforeEach(() => {
2063
- if (typeof window === "undefined")
2064
- globalThis.CustomEvent = FakeCustomEvent;
2065
- });
2066
- afterEach(() => {
2067
- if (typeof window === "undefined") delete globalThis.CustomEvent;
2068
- });
2069
- }
2070
-
2071
- // test/browserTestUtil/mock/asSpy.ts
2072
- function asSpy(object, method) {
2073
- if (object == null || object[method] == null) {
2074
- throw new Error("method not implemented");
2075
- }
2076
- const fun = object[method];
2077
- if ("calls" in fun) {
2078
- return fun;
2079
- } else {
2080
- return spyOn(object, method);
2081
- }
2082
- }
2083
-
2084
- // test/browserTestUtil/mock/implementEventFakes.ts
2085
- function implementEventFakes(target) {
2086
- const callbacks = /* @__PURE__ */ new Map();
2087
- asSpy(target, "addEventListener").and.callFake(
2088
- (type, callback, addOptions) => {
2089
- var _a, _b;
2090
- if (!callbacks.has(type)) callbacks.set(type, /* @__PURE__ */ new Map());
2091
- const captureMap = callbacks.get(type);
2092
- let newOptions;
2093
- let capture;
2094
- if (addOptions == null) {
2095
- newOptions = { once: false };
2096
- capture = false;
2097
- } else if (typeof addOptions === "boolean") {
2098
- newOptions = { once: false };
2099
- capture = addOptions;
2100
- } else {
2101
- newOptions = { once: (_a = addOptions.once) != null ? _a : false };
2102
- capture = (_b = addOptions.capture) != null ? _b : false;
2103
- }
2104
- if (!captureMap.has(capture)) captureMap.set(capture, /* @__PURE__ */ new Map());
2105
- const callbacksMap = captureMap.get(capture);
2106
- if (!callbacksMap.has(callback)) {
2107
- callbacksMap.set(callback, newOptions);
2108
- }
2109
- }
2110
- );
2111
- asSpy(target, "removeEventListener").and.callFake(
2112
- (type, callback, options) => {
2113
- var _a;
2114
- if (!callbacks.has(type)) return;
2115
- const captureMap = callbacks.get(type);
2116
- const capture = typeof options === "boolean" ? options : (_a = options == null ? void 0 : options.capture) != null ? _a : false;
2117
- if (!captureMap.has(capture)) return;
2118
- const callbacksMap = captureMap.get(capture);
2119
- callbacksMap.delete(callback);
2120
- }
2121
- );
2122
- asSpy(target, "dispatchEvent").and.callFake((event) => {
2123
- if (!callbacks.has(event.type)) return true;
2124
- const captureMap = callbacks.get(event.type);
2125
- event.eventPhase = event.AT_TARGET;
2126
- event.currentTarget = target;
2127
- event.target = target;
2128
- if (captureMap.has(true)) {
2129
- const captureCallbacks = captureMap.get(true);
2130
- for (const [callback, options] of captureCallbacks.entries()) {
2131
- if (event.stopImmediatePropagation.calls.any()) break;
2132
- if (event.eventPhase === event.AT_TARGET || event.eventPhase === event.CAPTURING_PHASE) {
2133
- if (options.once) {
2134
- target.removeEventListener(event.type, callback, true);
2135
- }
2136
- callback(event);
2137
- }
2138
- }
2139
- }
2140
- if (captureMap.has(false)) {
2141
- const bubbleCallbacks = captureMap.get(false);
2142
- for (const [callback, options] of bubbleCallbacks.entries()) {
2143
- if (event.stopImmediatePropagation.calls.any()) break;
2144
- if (event.eventPhase === event.AT_TARGET || event.eventPhase === event.BUBBLING_PHASE) {
2145
- if (options.once) {
2146
- target.removeEventListener(event.type, callback, false);
2147
- }
2148
- callback(event);
2149
- }
2150
- }
2151
- }
2152
- return !event.cancelable || !event.preventDefault.calls.any();
2153
- });
2154
- return {
2155
- hasAnyListeners() {
2156
- for (const typeMap of callbacks.values()) {
2157
- for (const captureMap of typeMap.values()) {
2158
- if (captureMap.size > 0) return true;
2159
- }
2160
- }
2161
- return false;
2162
- }
2163
- };
2164
- }
2165
-
2166
- // test/browserTestUtil/mock/dom/mockEvent.ts
2167
- function mockEvent(type) {
2168
- const e = new MockEvent();
2169
- e.type = type;
2170
- return e;
2171
- }
2172
-
2173
- // test/browserTestUtil/mock/dom/globals.ts
2174
- var MockMediaSourceGlobal = class extends MockMediaSource {
2175
- };
2176
- __publicField(MockMediaSourceGlobal, "canConstructInDedicatedWorker", false);
2177
- __publicField(MockMediaSourceGlobal, "isTypeSupported", createSpy2(
2178
- "isTypeSupported"
2179
- ));
2180
- var MockAbortSignalGlobal = class extends MockAbortSignal {
2181
- };
2182
- __publicField(MockAbortSignalGlobal, "abort", createSpy2("abort"));
2183
- __publicField(MockAbortSignalGlobal, "any", createSpy2("any"));
2184
- __publicField(MockAbortSignalGlobal, "timeout", createSpy2("timeout"));
2185
-
2186
- // test/browserTestUtil/mock/dom/MockTimeRanges.ts
2187
- var MockTimeRanges = class {
2188
- constructor(ranges = []) {
2189
- __publicField(this, "ranges", ranges);
2190
- for (let i = 1; i < ranges.length; i++) {
2191
- const prev = ranges[i - 1];
2192
- const range = ranges[i];
2193
- if (range[0] >= range[1] || range[0] <= prev[1])
2194
- throw new Error("invalid ranges");
2195
- }
2196
- }
2197
- get length() {
2198
- return this.ranges.length;
2199
- }
2200
- start(index) {
2201
- return this.ranges[index][0];
2004
+ };
2005
+ var MockMediaError = class {
2006
+ constructor() {
2007
+ __publicField(this, "code", 0);
2008
+ __publicField(this, "message", "");
2009
+ __publicField(this, "MEDIA_ERR_ABORTED", 1);
2010
+ __publicField(this, "MEDIA_ERR_NETWORK", 2);
2011
+ __publicField(this, "MEDIA_ERR_DECODE", 3);
2012
+ __publicField(this, "MEDIA_ERR_SRC_NOT_SUPPORTED", 4);
2202
2013
  }
2203
- end(index) {
2204
- return this.ranges[index][1];
2014
+ };
2015
+ var MockMediaKeyMessageEvent = class {
2016
+ constructor() {
2017
+ __publicField(this, "message", new ArrayBuffer(0));
2018
+ __publicField(this, "messageType", "individualization-request");
2019
+ __publicField(this, "bubbles", false);
2020
+ __publicField(this, "cancelBubble", false);
2021
+ __publicField(this, "cancelable", false);
2022
+ __publicField(this, "composed", false);
2023
+ __publicField(this, "currentTarget", null);
2024
+ __publicField(this, "defaultPrevented", false);
2025
+ __publicField(this, "eventPhase", 0);
2026
+ __publicField(this, "isTrusted", false);
2027
+ __publicField(this, "returnValue", false);
2028
+ __publicField(this, "srcElement", null);
2029
+ __publicField(this, "target", null);
2030
+ __publicField(this, "timeStamp", 0);
2031
+ __publicField(this, "type", "");
2032
+ __publicField(this, "NONE", 0);
2033
+ __publicField(this, "CAPTURING_PHASE", 1);
2034
+ __publicField(this, "AT_TARGET", 2);
2035
+ __publicField(this, "BUBBLING_PHASE", 3);
2036
+ __publicField(this, "composedPath", createSpy22("composedPath"));
2037
+ __publicField(this, "initEvent", createSpy22("initEvent"));
2038
+ __publicField(this, "preventDefault", createSpy22("preventDefault"));
2039
+ __publicField(this, "stopImmediatePropagation", createSpy22("stopImmediatePropagation"));
2040
+ __publicField(this, "stopPropagation", createSpy22("stopPropagation"));
2205
2041
  }
2206
2042
  };
2207
-
2208
- // test/browserTestUtil/matchers/toBeCloseToWithin.ts
2209
- function addToBeCloseToWithin() {
2210
- beforeEach(function() {
2211
- jasmine.addMatchers({
2212
- toBeCloseToWithin: function() {
2213
- return {
2214
- compare: function(actual, expected, tolerance = Number.EPSILON) {
2215
- if (tolerance == null) {
2216
- throw new Error("You must supply a tolerance value");
2217
- }
2218
- const pass = Math.abs(expected - actual) <= tolerance;
2219
- const message = pass ? `Expected ${actual} to be close to ${expected} with tolerance ${tolerance}` : `Expected ${actual} to be close to ${expected} with tolerance ${tolerance}, but it was not`;
2220
- return { pass, message };
2221
- }
2222
- };
2223
- }
2224
- });
2225
- });
2226
- }
2227
-
2228
- // test/browserTestUtil/matchers/customMatchers.ts
2229
- function addCustomMatchers() {
2230
- addToBeCloseToWithin();
2231
- }
2232
-
2233
- // test/browserTestUtil/expect/typesafety.ts
2234
- function expectTypeStrictlyEquals(_matches) {
2235
- expect(true).toBeTrue();
2236
- }
2237
- function expectTypeEquals(_matches) {
2238
- expect(true).toBeTrue();
2239
- }
2240
- function expectTypeExtends(_matches) {
2241
- expect(true).toBeTrue();
2242
- }
2243
- function expectTypeTrue() {
2244
- expect(true).toBeTrue();
2245
- }
2246
- function expectTypeFalse() {
2247
- expect(true).toBeTrue();
2248
- }
2249
-
2250
- // test/browserTestUtil/expect/prototype.ts
2251
- function expectPrototype(factory, ...classes) {
2252
- const e = factory();
2253
- classes.forEach((clazz) => expect(e).toBeInstanceOf(clazz));
2254
- const spy = spyOn(classes[classes.length - 1], "call");
2255
- spy.and.returnValue(null);
2256
- const e2 = factory();
2257
- classes.forEach((clazz) => expect(e2).toBeInstanceOf(clazz));
2258
- }
2259
-
2260
- // test/browserTestUtil/expect/expectNothing.ts
2261
- function expectNothing() {
2262
- expect(true).toBeTruthy();
2263
- }
2264
-
2265
- // test/browserTestUtil/expect/expectIterableEquals.ts
2266
- function expectIterableEquals(arr1, arr2) {
2267
- expect(Array.from(arr1)).toEqual(Array.from(arr2));
2268
- }
2269
-
2270
- // test/browserTestUtil/env/jasmineEnv.ts
2271
- var nextTestTimeoutOverridden = false;
2272
- function setTestTimeout(timeout) {
2273
- let originalTimeout = null;
2274
- beforeEach(() => {
2275
- originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
2276
- if (!nextTestTimeoutOverridden)
2277
- jasmine.DEFAULT_TIMEOUT_INTERVAL = timeout * 1e3;
2278
- });
2279
- afterEach(() => {
2280
- if (originalTimeout) jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
2281
- if (nextTestTimeoutOverridden) nextTestTimeoutOverridden = false;
2282
- });
2283
- }
2284
- function setNextTestTimeout(timeout) {
2285
- nextTestTimeoutOverridden = true;
2286
- jasmine.DEFAULT_TIMEOUT_INTERVAL = timeout * 1e3;
2287
- }
2288
-
2289
- // test/browserTestUtil/benchmark/Benchmark.ts
2290
- var now;
2291
- if (typeof window !== "undefined" && typeof window.performance !== "undefined" && typeof window.performance.now !== "undefined") {
2292
- now = () => window.performance.now();
2293
- } else if (typeof self !== "undefined" && typeof self.performance !== "undefined" && typeof self.performance.now !== "undefined") {
2294
- now = () => self.performance.now();
2295
- } else {
2296
- now = () => Date.now();
2297
- }
2298
- var BenchmarkRunResults = class {
2299
- constructor(name) {
2300
- __publicField(this, "name", name);
2301
- __publicField(this, "cycleResults", []);
2302
- __publicField(this, "_totalSamples", 0);
2043
+ var MockMediaKeySession = class {
2044
+ constructor() {
2045
+ __publicField(this, "closed");
2046
+ __publicField(this, "expiration", 0);
2047
+ __publicField(this, "keyStatuses");
2048
+ __publicField(this, "onkeystatuseschange", null);
2049
+ __publicField(this, "onmessage", null);
2050
+ __publicField(this, "sessionId", "");
2051
+ __publicField(this, "close", createSpy22("close"));
2052
+ __publicField(this, "generateRequest", createSpy22("generateRequest"));
2053
+ __publicField(this, "load", createSpy22("load"));
2054
+ __publicField(this, "remove", createSpy22("remove"));
2055
+ __publicField(this, "update", createSpy22("update"));
2056
+ __publicField(this, "addEventListener", createSpy22("addEventListener"));
2057
+ __publicField(this, "removeEventListener", createSpy22(
2058
+ "removeEventListener"
2059
+ ));
2060
+ __publicField(this, "dispatchEvent", createSpy22("dispatchEvent"));
2303
2061
  }
2304
- get totalSamples() {
2305
- return this._totalSamples;
2062
+ };
2063
+ var MockMediaKeySystemAccess = class {
2064
+ constructor() {
2065
+ __publicField(this, "keySystem", "");
2066
+ __publicField(this, "createMediaKeys", createSpy22("createMediaKeys"));
2067
+ __publicField(this, "getConfiguration", createSpy22("getConfiguration"));
2306
2068
  }
2307
- get cycleResultsNoOutliers() {
2308
- const sD = this.standardDeviation;
2309
- const avg = average(this.cycleResults);
2310
- return this.cycleResults.filter((e) => {
2311
- const zScore = (avg - e) / sD;
2312
- return Math.abs(zScore) < 3;
2313
- });
2069
+ };
2070
+ var MockMediaKeys = class {
2071
+ constructor() {
2072
+ __publicField(this, "createSession", createSpy22("createSession"));
2073
+ __publicField(this, "getStatusForPolicy", createSpy22("getStatusForPolicy"));
2074
+ __publicField(this, "setServerCertificate", createSpy22(
2075
+ "setServerCertificate"
2076
+ ));
2314
2077
  }
2315
- /**
2316
- * Returns the mean ops per second minus outliers of greater than 3 standard deviations.
2317
- */
2318
- get meanOpsPerSec() {
2319
- return average(this.cycleResultsNoOutliers);
2078
+ };
2079
+ var MockMediaSource = class {
2080
+ constructor() {
2081
+ __publicField(this, "activeSourceBuffers");
2082
+ __publicField(this, "duration", 0);
2083
+ __publicField(this, "onsourceclose", null);
2084
+ __publicField(this, "onsourceended", null);
2085
+ __publicField(this, "onsourceopen", null);
2086
+ __publicField(this, "readyState", "closed");
2087
+ __publicField(this, "sourceBuffers");
2088
+ __publicField(this, "addSourceBuffer", createSpy22("addSourceBuffer"));
2089
+ __publicField(this, "clearLiveSeekableRange", createSpy22(
2090
+ "clearLiveSeekableRange"
2091
+ ));
2092
+ __publicField(this, "endOfStream", createSpy22("endOfStream"));
2093
+ __publicField(this, "removeSourceBuffer", createSpy22("removeSourceBuffer"));
2094
+ __publicField(this, "setLiveSeekableRange", createSpy22(
2095
+ "setLiveSeekableRange"
2096
+ ));
2097
+ __publicField(this, "addEventListener", createSpy22("addEventListener"));
2098
+ __publicField(this, "removeEventListener", createSpy22(
2099
+ "removeEventListener"
2100
+ ));
2101
+ __publicField(this, "dispatchEvent", createSpy22("dispatchEvent"));
2320
2102
  }
2321
- get standardDeviation() {
2322
- return standardDeviation(this.cycleResults);
2103
+ };
2104
+ var MockMediaStream = class {
2105
+ constructor() {
2106
+ __publicField(this, "active", false);
2107
+ __publicField(this, "id", "");
2108
+ __publicField(this, "onaddtrack", null);
2109
+ __publicField(this, "onremovetrack", null);
2110
+ __publicField(this, "addTrack", createSpy22("addTrack"));
2111
+ __publicField(this, "clone", createSpy22("clone"));
2112
+ __publicField(this, "getAudioTracks", createSpy22("getAudioTracks"));
2113
+ __publicField(this, "getTrackById", createSpy22("getTrackById"));
2114
+ __publicField(this, "getTracks", createSpy22("getTracks"));
2115
+ __publicField(this, "getVideoTracks", createSpy22("getVideoTracks"));
2116
+ __publicField(this, "removeTrack", createSpy22("removeTrack"));
2117
+ __publicField(this, "addEventListener", createSpy22("addEventListener"));
2118
+ __publicField(this, "removeEventListener", createSpy22(
2119
+ "removeEventListener"
2120
+ ));
2121
+ __publicField(this, "dispatchEvent", createSpy22("dispatchEvent"));
2323
2122
  }
2324
- get variance() {
2325
- return this.standardDeviation / this.meanOpsPerSec;
2123
+ };
2124
+ var MockNavigator = class {
2125
+ constructor() {
2126
+ __publicField(this, "clipboard");
2127
+ __publicField(this, "credentials");
2128
+ __publicField(this, "doNotTrack", "");
2129
+ __publicField(this, "geolocation");
2130
+ __publicField(this, "login");
2131
+ __publicField(this, "maxTouchPoints", 0);
2132
+ __publicField(this, "mediaCapabilities");
2133
+ __publicField(this, "mediaDevices");
2134
+ __publicField(this, "mediaSession");
2135
+ __publicField(this, "permissions");
2136
+ __publicField(this, "serviceWorker");
2137
+ __publicField(this, "userActivation");
2138
+ __publicField(this, "wakeLock");
2139
+ __publicField(this, "webdriver", false);
2140
+ __publicField(this, "hardwareConcurrency", 0);
2141
+ __publicField(this, "cookieEnabled", false);
2142
+ __publicField(this, "appCodeName", "");
2143
+ __publicField(this, "appName", "");
2144
+ __publicField(this, "appVersion", "");
2145
+ __publicField(this, "platform", "");
2146
+ __publicField(this, "product", "");
2147
+ __publicField(this, "productSub", "");
2148
+ __publicField(this, "userAgent", "");
2149
+ __publicField(this, "vendor", "");
2150
+ __publicField(this, "vendorSub", "");
2151
+ __publicField(this, "language", "");
2152
+ __publicField(this, "languages", []);
2153
+ __publicField(this, "locks");
2154
+ __publicField(this, "onLine", false);
2155
+ __publicField(this, "mimeTypes");
2156
+ __publicField(this, "pdfViewerEnabled", false);
2157
+ __publicField(this, "plugins");
2158
+ __publicField(this, "storage");
2159
+ __publicField(this, "canShare", createSpy22("canShare"));
2160
+ __publicField(this, "getGamepads", createSpy22("getGamepads"));
2161
+ __publicField(this, "requestMIDIAccess", createSpy22("requestMIDIAccess"));
2162
+ __publicField(this, "requestMediaKeySystemAccess", createSpy22("requestMediaKeySystemAccess"));
2163
+ __publicField(this, "sendBeacon", createSpy22("sendBeacon"));
2164
+ __publicField(this, "share", createSpy22("share"));
2165
+ __publicField(this, "vibrate", createSpy22("vibrate"));
2166
+ __publicField(this, "clearAppBadge", createSpy22("clearAppBadge"));
2167
+ __publicField(this, "setAppBadge", createSpy22("setAppBadge"));
2168
+ __publicField(this, "registerProtocolHandler", createSpy22(
2169
+ "registerProtocolHandler"
2170
+ ));
2171
+ __publicField(this, "javaEnabled", createSpy22("javaEnabled"));
2326
2172
  }
2327
- /**
2328
- * Returns the mean ops / s ± variance % as a string.
2329
- */
2330
- get meanOpsStr() {
2331
- const mean = this.meanOpsPerSec.toLocaleString(void 0, {
2332
- maximumSignificantDigits: 4
2333
- });
2334
- const variance = this.variance.toLocaleString(void 0, {
2335
- style: "percent"
2336
- });
2337
- return `${mean} \xB1${variance}`;
2173
+ };
2174
+ var MockNode = class {
2175
+ constructor() {
2176
+ __publicField(this, "baseURI", "");
2177
+ __publicField(this, "childNodes");
2178
+ __publicField(this, "firstChild", null);
2179
+ __publicField(this, "isConnected", false);
2180
+ __publicField(this, "lastChild", null);
2181
+ __publicField(this, "nextSibling", null);
2182
+ __publicField(this, "nodeName", "");
2183
+ __publicField(this, "nodeType", 0);
2184
+ __publicField(this, "nodeValue", "");
2185
+ __publicField(this, "ownerDocument", null);
2186
+ __publicField(this, "parentElement", null);
2187
+ __publicField(this, "parentNode", null);
2188
+ __publicField(this, "previousSibling", null);
2189
+ __publicField(this, "textContent", "");
2190
+ __publicField(this, "ELEMENT_NODE", 1);
2191
+ __publicField(this, "ATTRIBUTE_NODE", 2);
2192
+ __publicField(this, "TEXT_NODE", 3);
2193
+ __publicField(this, "CDATA_SECTION_NODE", 4);
2194
+ __publicField(this, "ENTITY_REFERENCE_NODE", 5);
2195
+ __publicField(this, "ENTITY_NODE", 6);
2196
+ __publicField(this, "PROCESSING_INSTRUCTION_NODE", 7);
2197
+ __publicField(this, "COMMENT_NODE", 8);
2198
+ __publicField(this, "DOCUMENT_NODE", 9);
2199
+ __publicField(this, "DOCUMENT_TYPE_NODE", 10);
2200
+ __publicField(this, "DOCUMENT_FRAGMENT_NODE", 11);
2201
+ __publicField(this, "NOTATION_NODE", 12);
2202
+ __publicField(this, "DOCUMENT_POSITION_DISCONNECTED", 1);
2203
+ __publicField(this, "DOCUMENT_POSITION_PRECEDING", 2);
2204
+ __publicField(this, "DOCUMENT_POSITION_FOLLOWING", 4);
2205
+ __publicField(this, "DOCUMENT_POSITION_CONTAINS", 8);
2206
+ __publicField(this, "DOCUMENT_POSITION_CONTAINED_BY", 16);
2207
+ __publicField(this, "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", 32);
2208
+ __publicField(this, "appendChild", createSpy22("appendChild"));
2209
+ __publicField(this, "cloneNode", createSpy22("cloneNode"));
2210
+ __publicField(this, "compareDocumentPosition", createSpy22(
2211
+ "compareDocumentPosition"
2212
+ ));
2213
+ __publicField(this, "contains", createSpy22("contains"));
2214
+ __publicField(this, "getRootNode", createSpy22("getRootNode"));
2215
+ __publicField(this, "hasChildNodes", createSpy22("hasChildNodes"));
2216
+ __publicField(this, "insertBefore", createSpy22("insertBefore"));
2217
+ __publicField(this, "isDefaultNamespace", createSpy22("isDefaultNamespace"));
2218
+ __publicField(this, "isEqualNode", createSpy22("isEqualNode"));
2219
+ __publicField(this, "isSameNode", createSpy22("isSameNode"));
2220
+ __publicField(this, "lookupNamespaceURI", createSpy22("lookupNamespaceURI"));
2221
+ __publicField(this, "lookupPrefix", createSpy22("lookupPrefix"));
2222
+ __publicField(this, "normalize", createSpy22("normalize"));
2223
+ __publicField(this, "removeChild", createSpy22("removeChild"));
2224
+ __publicField(this, "replaceChild", createSpy22("replaceChild"));
2225
+ __publicField(this, "addEventListener", createSpy22("addEventListener"));
2226
+ __publicField(this, "dispatchEvent", createSpy22("dispatchEvent"));
2227
+ __publicField(this, "removeEventListener", createSpy22(
2228
+ "removeEventListener"
2229
+ ));
2338
2230
  }
2339
- add(cycle) {
2340
- const opsPerSecond = cycle.ops / cycle.duration;
2341
- let index = this.cycleResults.findIndex((value) => opsPerSecond < value);
2342
- if (index < 0) index = this.cycleResults.length;
2343
- this.cycleResults.splice(index, 0, opsPerSecond);
2344
- this._totalSamples += cycle.ops;
2231
+ };
2232
+ var MockProgressEvent = class {
2233
+ constructor() {
2234
+ __publicField(this, "lengthComputable", false);
2235
+ __publicField(this, "loaded", 0);
2236
+ __publicField(this, "target");
2237
+ __publicField(this, "total", 0);
2238
+ __publicField(this, "bubbles", false);
2239
+ __publicField(this, "cancelBubble", false);
2240
+ __publicField(this, "cancelable", false);
2241
+ __publicField(this, "composed", false);
2242
+ __publicField(this, "currentTarget", null);
2243
+ __publicField(this, "defaultPrevented", false);
2244
+ __publicField(this, "eventPhase", 0);
2245
+ __publicField(this, "isTrusted", false);
2246
+ __publicField(this, "returnValue", false);
2247
+ __publicField(this, "srcElement", null);
2248
+ __publicField(this, "timeStamp", 0);
2249
+ __publicField(this, "type", "");
2250
+ __publicField(this, "NONE", 0);
2251
+ __publicField(this, "CAPTURING_PHASE", 1);
2252
+ __publicField(this, "AT_TARGET", 2);
2253
+ __publicField(this, "BUBBLING_PHASE", 3);
2254
+ __publicField(this, "composedPath", createSpy22("composedPath"));
2255
+ __publicField(this, "initEvent", createSpy22("initEvent"));
2256
+ __publicField(this, "preventDefault", createSpy22("preventDefault"));
2257
+ __publicField(this, "stopImmediatePropagation", createSpy22("stopImmediatePropagation"));
2258
+ __publicField(this, "stopPropagation", createSpy22("stopPropagation"));
2345
2259
  }
2346
- toString() {
2347
- if (!this.cycleResults.length) return "No results";
2348
- return `${this.name}: ${this.meanOpsStr} ops/sec`;
2260
+ };
2261
+ var MockPromiseRejectionEvent = class {
2262
+ constructor() {
2263
+ __publicField(this, "promise");
2264
+ __publicField(this, "reason");
2265
+ __publicField(this, "bubbles", false);
2266
+ __publicField(this, "cancelBubble", false);
2267
+ __publicField(this, "cancelable", false);
2268
+ __publicField(this, "composed", false);
2269
+ __publicField(this, "currentTarget", null);
2270
+ __publicField(this, "defaultPrevented", false);
2271
+ __publicField(this, "eventPhase", 0);
2272
+ __publicField(this, "isTrusted", false);
2273
+ __publicField(this, "returnValue", false);
2274
+ __publicField(this, "srcElement", null);
2275
+ __publicField(this, "target", null);
2276
+ __publicField(this, "timeStamp", 0);
2277
+ __publicField(this, "type", "");
2278
+ __publicField(this, "NONE", 0);
2279
+ __publicField(this, "CAPTURING_PHASE", 1);
2280
+ __publicField(this, "AT_TARGET", 2);
2281
+ __publicField(this, "BUBBLING_PHASE", 3);
2282
+ __publicField(this, "composedPath", createSpy22("composedPath"));
2283
+ __publicField(this, "initEvent", createSpy22("initEvent"));
2284
+ __publicField(this, "preventDefault", createSpy22("preventDefault"));
2285
+ __publicField(this, "stopImmediatePropagation", createSpy22("stopImmediatePropagation"));
2286
+ __publicField(this, "stopPropagation", createSpy22("stopPropagation"));
2349
2287
  }
2350
2288
  };
2351
- var RunResultsComparison = class {
2352
- constructor(name, results) {
2353
- __publicField(this, "name", name);
2354
- /**
2355
- * Sorted by median ops/s from slowest to fastest.
2356
- */
2357
- __publicField(this, "results");
2358
- this.results = results.sort((a, b) => {
2359
- return a.meanOpsPerSec - b.meanOpsPerSec;
2360
- });
2289
+ var MockSourceBuffer = class {
2290
+ constructor() {
2291
+ __publicField(this, "appendWindowEnd", 0);
2292
+ __publicField(this, "appendWindowStart", 0);
2293
+ __publicField(this, "buffered");
2294
+ __publicField(this, "mode", "segments");
2295
+ __publicField(this, "onabort", null);
2296
+ __publicField(this, "onerror", null);
2297
+ __publicField(this, "onupdate", null);
2298
+ __publicField(this, "onupdateend", null);
2299
+ __publicField(this, "onupdatestart", null);
2300
+ __publicField(this, "timestampOffset", 0);
2301
+ __publicField(this, "updating", false);
2302
+ __publicField(this, "abort", createSpy22("abort"));
2303
+ __publicField(this, "appendBuffer", createSpy22("appendBuffer"));
2304
+ __publicField(this, "changeType", createSpy22("changeType"));
2305
+ __publicField(this, "remove", createSpy22("remove"));
2306
+ __publicField(this, "addEventListener", createSpy22("addEventListener"));
2307
+ __publicField(this, "removeEventListener", createSpy22(
2308
+ "removeEventListener"
2309
+ ));
2310
+ __publicField(this, "dispatchEvent", createSpy22("dispatchEvent"));
2361
2311
  }
2362
- logToTable() {
2363
- const r = this.results.map((run) => {
2364
- const variance = run.variance.toLocaleString(void 0, {
2365
- style: "percent"
2366
- });
2367
- const mean = run.meanOpsPerSec.toLocaleString(void 0, {
2368
- maximumSignificantDigits: 4
2369
- });
2370
- return {
2371
- Name: run.name,
2372
- Mean: `${mean} \xB1${variance}`,
2373
- Samples: run.totalSamples,
2374
- Compare: this.runComparisonToString(run)
2375
- };
2376
- });
2377
- const table = r.reduce((acc, _a) => {
2378
- var _b = _a, { Name } = _b, x = __objRest(_b, ["Name"]);
2379
- acc[Name] = x;
2380
- return acc;
2381
- }, {});
2382
- console.log("\n" + this.name);
2383
- console.table(table);
2312
+ };
2313
+ var MockStorage = class {
2314
+ constructor() {
2315
+ __publicField(this, "length", 0);
2316
+ __publicField(this, "clear", createSpy22("clear"));
2317
+ __publicField(this, "getItem", createSpy22("getItem"));
2318
+ __publicField(this, "key", createSpy22("key"));
2319
+ __publicField(this, "removeItem", createSpy22("removeItem"));
2320
+ __publicField(this, "setItem", createSpy22("setItem"));
2384
2321
  }
2385
- runComparisonToString(run) {
2386
- var _a, _b;
2387
- const baseline = (_b = (_a = this.results[0]) == null ? void 0 : _a.meanOpsPerSec) != null ? _b : 0;
2388
- const fasterPercent = run.meanOpsPerSec / baseline - 1;
2389
- return fasterPercent < 0.01 ? "-" : fasterPercent.toLocaleString(void 0, {
2390
- style: "percent"
2391
- }) + " faster";
2322
+ };
2323
+ var MockText = class {
2324
+ constructor() {
2325
+ __publicField(this, "wholeText", "");
2326
+ __publicField(this, "data", "");
2327
+ __publicField(this, "length", 0);
2328
+ __publicField(this, "ownerDocument");
2329
+ __publicField(this, "textContent");
2330
+ __publicField(this, "assignedSlot", null);
2331
+ __publicField(this, "baseURI", "");
2332
+ __publicField(this, "childNodes");
2333
+ __publicField(this, "firstChild", null);
2334
+ __publicField(this, "isConnected", false);
2335
+ __publicField(this, "lastChild", null);
2336
+ __publicField(this, "nextSibling", null);
2337
+ __publicField(this, "nodeName", "");
2338
+ __publicField(this, "nodeType", 0);
2339
+ __publicField(this, "nodeValue", "");
2340
+ __publicField(this, "parentElement", null);
2341
+ __publicField(this, "parentNode", null);
2342
+ __publicField(this, "previousSibling", null);
2343
+ __publicField(this, "ELEMENT_NODE", 1);
2344
+ __publicField(this, "ATTRIBUTE_NODE", 2);
2345
+ __publicField(this, "TEXT_NODE", 3);
2346
+ __publicField(this, "CDATA_SECTION_NODE", 4);
2347
+ __publicField(this, "ENTITY_REFERENCE_NODE", 5);
2348
+ __publicField(this, "ENTITY_NODE", 6);
2349
+ __publicField(this, "PROCESSING_INSTRUCTION_NODE", 7);
2350
+ __publicField(this, "COMMENT_NODE", 8);
2351
+ __publicField(this, "DOCUMENT_NODE", 9);
2352
+ __publicField(this, "DOCUMENT_TYPE_NODE", 10);
2353
+ __publicField(this, "DOCUMENT_FRAGMENT_NODE", 11);
2354
+ __publicField(this, "NOTATION_NODE", 12);
2355
+ __publicField(this, "DOCUMENT_POSITION_DISCONNECTED", 1);
2356
+ __publicField(this, "DOCUMENT_POSITION_PRECEDING", 2);
2357
+ __publicField(this, "DOCUMENT_POSITION_FOLLOWING", 4);
2358
+ __publicField(this, "DOCUMENT_POSITION_CONTAINS", 8);
2359
+ __publicField(this, "DOCUMENT_POSITION_CONTAINED_BY", 16);
2360
+ __publicField(this, "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", 32);
2361
+ __publicField(this, "nextElementSibling", null);
2362
+ __publicField(this, "previousElementSibling", null);
2363
+ __publicField(this, "splitText", createSpy22("splitText"));
2364
+ __publicField(this, "appendData", createSpy22("appendData"));
2365
+ __publicField(this, "deleteData", createSpy22("deleteData"));
2366
+ __publicField(this, "insertData", createSpy22("insertData"));
2367
+ __publicField(this, "replaceData", createSpy22("replaceData"));
2368
+ __publicField(this, "substringData", createSpy22("substringData"));
2369
+ __publicField(this, "appendChild", createSpy22("appendChild"));
2370
+ __publicField(this, "cloneNode", createSpy22("cloneNode"));
2371
+ __publicField(this, "compareDocumentPosition", createSpy22(
2372
+ "compareDocumentPosition"
2373
+ ));
2374
+ __publicField(this, "contains", createSpy22("contains"));
2375
+ __publicField(this, "getRootNode", createSpy22("getRootNode"));
2376
+ __publicField(this, "hasChildNodes", createSpy22("hasChildNodes"));
2377
+ __publicField(this, "insertBefore", createSpy22("insertBefore"));
2378
+ __publicField(this, "isDefaultNamespace", createSpy22("isDefaultNamespace"));
2379
+ __publicField(this, "isEqualNode", createSpy22("isEqualNode"));
2380
+ __publicField(this, "isSameNode", createSpy22("isSameNode"));
2381
+ __publicField(this, "lookupNamespaceURI", createSpy22("lookupNamespaceURI"));
2382
+ __publicField(this, "lookupPrefix", createSpy22("lookupPrefix"));
2383
+ __publicField(this, "normalize", createSpy22("normalize"));
2384
+ __publicField(this, "removeChild", createSpy22("removeChild"));
2385
+ __publicField(this, "replaceChild", createSpy22("replaceChild"));
2386
+ __publicField(this, "after", createSpy22("after"));
2387
+ __publicField(this, "before", createSpy22("before"));
2388
+ __publicField(this, "remove", createSpy22("remove"));
2389
+ __publicField(this, "replaceWith", createSpy22("replaceWith"));
2390
+ __publicField(this, "addEventListener", createSpy22("addEventListener"));
2391
+ __publicField(this, "dispatchEvent", createSpy22("dispatchEvent"));
2392
+ __publicField(this, "removeEventListener", createSpy22(
2393
+ "removeEventListener"
2394
+ ));
2392
2395
  }
2393
2396
  };
2394
- function compareResults(name, ...results) {
2395
- return new RunResultsComparison(name, results);
2396
- }
2397
- var defaultBenchmarkOptions = {
2398
- warmupTime: 0.5,
2399
- maxCycleDuration: 0.5,
2400
- cycles: 9
2397
+
2398
+ // test/browserTestUtil/mock/dom/globals.ts
2399
+ var MockMediaSourceGlobal = class extends MockMediaSource {
2401
2400
  };
2402
- var _Benchmark = class _Benchmark {
2403
- /**
2404
- * Constructs a new Benchmark.
2405
- *
2406
- * @param name The name of the benchmark, to be used when logging.
2407
- * @param executor The method to execute and measure. If this method returns a promise, the
2408
- * promise will be awaited. The executor should either always return a promise, or never.
2409
- * @param options Optional configuration for the benchmark.
2410
- */
2411
- constructor(name, executor, options) {
2412
- __publicField(this, "name", name);
2413
- __publicField(this, "executor", executor);
2414
- __publicField(this, "options");
2415
- this.options = __spreadValues(__spreadValues({}, defaultBenchmarkOptions), options);
2416
- }
2417
- async run() {
2418
- const opts = this.options;
2419
- await _Benchmark.semaphore;
2420
- const warmupTimeMs = opts.warmupTime * 1e3;
2421
- const cycleStart = now();
2422
- let isAsync = false;
2423
- do {
2424
- const result = this.executor();
2425
- isAsync = isAsync || result && typeof result.then === "function";
2426
- if (isAsync) await result;
2427
- } while (now() - cycleStart < warmupTimeMs);
2428
- const resultsPromise = (async () => {
2429
- const results = new BenchmarkRunResults(this.name);
2430
- for (let i = 0; i < opts.cycles; i++) {
2431
- const cycleResults = await this.runCycle(isAsync);
2432
- results.add(cycleResults);
2433
- await nextFrame();
2434
- }
2435
- return results;
2436
- })();
2437
- _Benchmark.semaphore = resultsPromise;
2438
- return await resultsPromise;
2439
- }
2440
- /**
2441
- * Runs one cycle. A cycle will repeat the executor approximately `options.maxCycleDuration`
2442
- * seconds.
2443
- *
2444
- * @param isAsync
2445
- * @return Returns the duration (in seconds) and number of operations the cycle repeated.
2446
- */
2447
- async runCycle(isAsync) {
2448
- const cycleMs = this.options.maxCycleDuration * 1e3;
2449
- let ops = 0;
2450
- const cycleStart = now();
2451
- do {
2452
- const result = this.executor();
2453
- if (isAsync) await result;
2454
- ops++;
2455
- } while (now() - cycleStart < cycleMs);
2456
- const duration = (now() - cycleStart) / 1e3;
2457
- return {
2458
- duration,
2459
- ops
2460
- };
2461
- }
2401
+ __publicField(MockMediaSourceGlobal, "canConstructInDedicatedWorker", false);
2402
+ __publicField(MockMediaSourceGlobal, "isTypeSupported", createSpy22(
2403
+ "isTypeSupported"
2404
+ ));
2405
+ var MockAbortSignalGlobal = class extends MockAbortSignal {
2462
2406
  };
2463
- __publicField(_Benchmark, "semaphore", nextFrame());
2464
- var Benchmark = _Benchmark;
2465
- function benchmark(name, executor, options) {
2466
- const benchmark2 = new Benchmark(name, executor, options);
2467
- return benchmark2.run().then((results) => {
2468
- console.log(results.toString());
2469
- return results;
2470
- });
2471
- }
2472
- function nextFrame() {
2473
- return new Promise((resolve) => {
2474
- setTimeout(resolve);
2475
- });
2476
- }
2477
- function standardDeviation(values) {
2478
- const avg = average(values);
2479
- const squareDiffs = values.map((value) => {
2480
- const diff = value - avg;
2481
- return diff * diff;
2482
- });
2483
- const avgSquareDiff = average(squareDiffs);
2484
- return Math.sqrt(avgSquareDiff);
2485
- }
2486
- function average(values) {
2487
- const sum = values.reduce((acc, value) => acc + value, 0);
2488
- return sum / values.length;
2407
+ __publicField(MockAbortSignalGlobal, "abort", createSpy22("abort"));
2408
+ __publicField(MockAbortSignalGlobal, "any", createSpy22("any"));
2409
+ __publicField(MockAbortSignalGlobal, "timeout", createSpy22("timeout"));
2410
+
2411
+ // test/browserTestUtil/mock/dom/mockEvent.ts
2412
+ function mockEvent(type) {
2413
+ const e = new MockEvent();
2414
+ e.type = type;
2415
+ return e;
2489
2416
  }
2490
2417
 
2491
- // test/browserTestUtil/async/marble.ts
2492
- function marbleTest(init, legend, output) {
2493
- return async (input) => {
2494
- const test = await init();
2495
- for (let i = 0; i < input.length; i++) {
2496
- const char = input[i];
2497
- const action = legend[char];
2498
- if (!action) throw new Error(`Unknown marble: '${char}'`);
2499
- await action(test);
2418
+ // test/browserTestUtil/mock/dom/MockTimeRanges.ts
2419
+ var MockTimeRanges = class {
2420
+ constructor(ranges = []) {
2421
+ __publicField(this, "ranges", ranges);
2422
+ for (let i = 1; i < ranges.length; i++) {
2423
+ const prev = ranges[i - 1];
2424
+ const range = ranges[i];
2425
+ if (range[0] >= range[1] || range[0] <= prev[1])
2426
+ throw new Error("invalid ranges");
2500
2427
  }
2501
- return output(test);
2502
- };
2503
- }
2428
+ }
2429
+ get length() {
2430
+ return this.ranges.length;
2431
+ }
2432
+ start(index) {
2433
+ return this.ranges[index][0];
2434
+ }
2435
+ end(index) {
2436
+ return this.ranges[index][1];
2437
+ }
2438
+ };
2504
2439
 
2505
- // test/browserTestUtil/async/createCallbackTimingTest.ts
2506
- var createSpy3 = jasmine.createSpy;
2507
- function createCallbackTimingTest(clock, wrapCallback) {
2508
- return marbleTest(
2509
- () => {
2510
- clock.mockDate(/* @__PURE__ */ new Date(0));
2511
- let _out = "";
2512
- let lastTimeMs = 0;
2513
- const writeTime = () => {
2514
- const nowMs = Date.now();
2515
- _out += "-".repeat((nowMs - lastTimeMs) / 1e3);
2516
- lastTimeMs = nowMs;
2517
- };
2518
- const spy = createSpy3("inner").and.callFake(() => {
2519
- writeTime();
2520
- _out += "x";
2521
- });
2522
- const throttled = wrapCallback(spy);
2523
- return {
2524
- spy,
2525
- throttled,
2526
- get out() {
2527
- return _out;
2528
- }
2529
- };
2530
- },
2531
- {
2532
- "-": () => {
2533
- return clock.tick(1);
2534
- },
2535
- x: (test) => {
2536
- test.throttled();
2440
+ // test/browserTestUtil/mock/implementEventFakes.ts
2441
+ function implementEventFakes(target) {
2442
+ const callbacks = /* @__PURE__ */ new Map();
2443
+ asSpy(target, "addEventListener").and.callFake(
2444
+ (type, callback, addOptions) => {
2445
+ var _a, _b;
2446
+ if (!callbacks.has(type)) callbacks.set(type, /* @__PURE__ */ new Map());
2447
+ const captureMap = callbacks.get(type);
2448
+ let newOptions;
2449
+ let capture;
2450
+ if (addOptions == null) {
2451
+ newOptions = { once: false };
2452
+ capture = false;
2453
+ } else if (typeof addOptions === "boolean") {
2454
+ newOptions = { once: false };
2455
+ capture = addOptions;
2456
+ } else {
2457
+ newOptions = { once: (_a = addOptions.once) != null ? _a : false };
2458
+ capture = (_b = addOptions.capture) != null ? _b : false;
2537
2459
  }
2538
- },
2539
- async (o) => {
2540
- for (let i = 0; i < 10; i++) {
2541
- await clock.tick(1);
2460
+ if (!captureMap.has(capture)) captureMap.set(capture, /* @__PURE__ */ new Map());
2461
+ const callbacksMap = captureMap.get(capture);
2462
+ if (!callbacksMap.has(callback)) {
2463
+ callbacksMap.set(callback, newOptions);
2542
2464
  }
2543
- return o.out;
2544
2465
  }
2545
2466
  );
2546
- }
2547
-
2548
- // test/browserTestUtil/async/async.ts
2549
- var scheduler = setTimeout;
2550
- function flushPromises() {
2551
- return new Promise((resolve) => {
2552
- scheduler(() => resolve(void 0));
2467
+ asSpy(target, "removeEventListener").and.callFake(
2468
+ (type, callback, options) => {
2469
+ var _a;
2470
+ if (!callbacks.has(type)) return;
2471
+ const captureMap = callbacks.get(type);
2472
+ const capture = typeof options === "boolean" ? options : (_a = options == null ? void 0 : options.capture) != null ? _a : false;
2473
+ if (!captureMap.has(capture)) return;
2474
+ const callbacksMap = captureMap.get(capture);
2475
+ callbacksMap.delete(callback);
2476
+ }
2477
+ );
2478
+ asSpy(target, "dispatchEvent").and.callFake((event) => {
2479
+ if (!callbacks.has(event.type)) return true;
2480
+ const captureMap = callbacks.get(event.type);
2481
+ event.eventPhase = event.AT_TARGET;
2482
+ event.currentTarget = target;
2483
+ event.target = target;
2484
+ if (captureMap.has(true)) {
2485
+ const captureCallbacks = captureMap.get(true);
2486
+ for (const [callback, options] of captureCallbacks.entries()) {
2487
+ if (event.stopImmediatePropagation.calls.any()) break;
2488
+ if (event.eventPhase === event.AT_TARGET || event.eventPhase === event.CAPTURING_PHASE) {
2489
+ if (options.once) {
2490
+ target.removeEventListener(event.type, callback, true);
2491
+ }
2492
+ callback(event);
2493
+ }
2494
+ }
2495
+ }
2496
+ if (captureMap.has(false)) {
2497
+ const bubbleCallbacks = captureMap.get(false);
2498
+ for (const [callback, options] of bubbleCallbacks.entries()) {
2499
+ if (event.stopImmediatePropagation.calls.any()) break;
2500
+ if (event.eventPhase === event.AT_TARGET || event.eventPhase === event.BUBBLING_PHASE) {
2501
+ if (options.once) {
2502
+ target.removeEventListener(event.type, callback, false);
2503
+ }
2504
+ callback(event);
2505
+ }
2506
+ }
2507
+ }
2508
+ return !event.cancelable || !event.preventDefault.calls.any();
2553
2509
  });
2510
+ return {
2511
+ hasAnyListeners() {
2512
+ for (const typeMap of callbacks.values()) {
2513
+ for (const captureMap of typeMap.values()) {
2514
+ if (captureMap.size > 0) return true;
2515
+ }
2516
+ }
2517
+ return false;
2518
+ }
2519
+ };
2554
2520
  }
2555
- function useMockTime() {
2556
- const clock = jasmine.clock();
2521
+
2522
+ // test/browserTestUtil/mock/polyfillCustomEvent.ts
2523
+ var FakeCustomEvent = class extends MockEvent {
2524
+ constructor(type, eventInitDict) {
2525
+ var _a, _b;
2526
+ super();
2527
+ __publicField(this, "detail");
2528
+ this.type = type;
2529
+ this.detail = eventInitDict == null ? void 0 : eventInitDict.detail;
2530
+ this.bubbles = (_a = eventInitDict == null ? void 0 : eventInitDict.bubbles) != null ? _a : false;
2531
+ this.cancelable = (_b = eventInitDict == null ? void 0 : eventInitDict.cancelable) != null ? _b : false;
2532
+ }
2533
+ initCustomEvent() {
2534
+ }
2535
+ };
2536
+ function polyfillCustomEvent() {
2557
2537
  beforeEach(() => {
2558
- clock.install();
2559
- clock.mockDate(/* @__PURE__ */ new Date(0));
2538
+ if (typeof window === "undefined")
2539
+ globalThis.CustomEvent = FakeCustomEvent;
2560
2540
  });
2561
2541
  afterEach(() => {
2562
- clock.uninstall();
2542
+ if (typeof window === "undefined") delete globalThis.CustomEvent;
2563
2543
  });
2564
- const mockTime = {
2565
- async tick(...time) {
2566
- if (!time.length) {
2567
- clock.tick(0);
2568
- await flushPromises();
2569
- }
2570
- for (const s of time) {
2571
- clock.tick(s * 1e3);
2572
- await flushPromises();
2544
+ }
2545
+
2546
+ // test/browserTestUtil/reporters/ConsoleReporter.ts
2547
+ var ConsoleReporter = class {
2548
+ constructor() {
2549
+ __publicField(this, "errors", []);
2550
+ }
2551
+ jasmineStarted(suiteInfo) {
2552
+ console.log(
2553
+ `Running suite with ${suiteInfo.totalSpecsDefined} specs, seed ${suiteInfo.order.seed}`
2554
+ );
2555
+ console.log(
2556
+ "Testing for UA:",
2557
+ typeof navigator === "object" ? navigator.userAgent : "Node.js/<21"
2558
+ );
2559
+ }
2560
+ specDone(result) {
2561
+ if (result.failedExpectations.length > 0) {
2562
+ console.warn(`Spec failed: ${result.fullName}`);
2563
+ for (let i = 0; i < result.failedExpectations.length; i++) {
2564
+ console.warn(`Failure: ${result.failedExpectations[i].message}`);
2565
+ console.warn(result.failedExpectations[i].stack);
2566
+ this.errors.push(result.failedExpectations[i]);
2573
2567
  }
2574
- },
2575
- mockDate(date) {
2576
- clock.mockDate(date);
2577
2568
  }
2578
- };
2579
- return mockTime;
2580
- }
2569
+ }
2570
+ jasmineDone() {
2571
+ if (this.errors.length > 0) {
2572
+ console.log(`There were ${this.errors.length} errors:`);
2573
+ this.errors.forEach((error, index) => {
2574
+ console.error(`Error ${index + 1}:`, error);
2575
+ });
2576
+ } else {
2577
+ console.log("No errors were found.");
2578
+ }
2579
+ }
2580
+ };
2581
2581
  export {
2582
2582
  Benchmark,
2583
2583
  BenchmarkRunResults,
@@ -2619,7 +2619,7 @@ export {
2619
2619
  benchmark,
2620
2620
  compareResults,
2621
2621
  createCallbackTimingTest,
2622
- createSpy2,
2622
+ createSpy22 as createSpy2,
2623
2623
  createSpyFactory,
2624
2624
  expectIterableEquals,
2625
2625
  expectNothing,