PageSourceSearch

https://vgtc.be/wp-content/plugins/videomail-for-ninja-forms/targe…/videomail-client/index-min.js?ver=11.3.1

js vgtc.be collected 2026-10-02 18:12:00 UTC 932,207 bytes, 19,287 lines download raw bytes

1(function(root, factory) {
2    if ('object' == typeof exports && 'object' == typeof module) module.exports = factory();
3    else if ('function' == typeof define && define.amd) define([], factory);
4    else if ('object' == typeof exports) exports["VideomailClient"] = factory();
5    else root["VideomailClient"] = factory();
6})(globalThis, ()=>(()=>{
7        var __webpack_modules__ = {
8            6846 (module1, __webpack_exports__, __webpack_require__) {
9                "use strict";
10                var _node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0 = __webpack_require__(5068);
11                var _node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0);
12                var _node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1 = __webpack_require__(37);
13                var _node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1);
14                var ___CSS_LOADER_EXPORT___ = _node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default()(_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default());
15                ___CSS_LOADER_EXPORT___.push([
16                    module1.id,
17                    `@keyframes blink {
18  0% {
19    opacity: .9;
20  }
21
22  35% {
23    opacity: .9;
24  }
25
26  50% {
27    opacity: .1;
28  }
29
30  85% {
31    opacity: .1;
32  }
33
34  100% {
35    opacity: .9;
36  }
37}
38
39.videomail .visuals {
40  position: relative;
41}
42
43.videomail .visuals video.replay {
44  width: 100%;
45  height: 100%;
46}
47
48.videomail .countdown, .videomail .recordTimer, .videomail .recordNote, .videomail .pausedHeader, .videomail .pausedHint {
49  height: auto;
50  margin: 0;
51}
52
53.videomail .countdown, .videomail .recordTimer, .videomail .recordNote, .videomail .paused, .videomail .facingMode, .videomail noscript {
54  z-index: 100;
55  position: absolute;
56}
57
58.videomail .countdown, .videomail .recordTimer, .videomail .recordNote, .videomail .pausedHeader, .videomail .pausedHint, .videomail noscript {
59  font-weight: bold;
60}
61
62.videomail .countdown, .videomail .paused, .videomail noscript {
63  width: 100%;
64  top: 50%;
65  transform: translateY(-50%);
66}
67
68.videomail .pausedHeader, .videomail .pausedHint, .videomail .countdown {
69  text-align: center;
70  letter-spacing: 4px;
71  text-shadow: -2px 0 #fff, 0 2px #fff, 2px 0 #fff, 0 -2px #fff;
72}
73
74.videomail .pausedHeader, .videomail .countdown {
75  opacity: .9;
76  font-size: 460%;
77}
78
79.videomail .pausedHint {
80  font-size: 150%;
81}
82
83.videomail .facingMode {
84  color: #f5f5f5e6;
85  z-index: 10;
86  background: #1e1e1e80;
87  border: none;
88  outline: none;
89  padding: .1em .3em;
90  font-family: monospace;
91  font-size: 1.2em;
92  transition: all .2s;
93  bottom: .6em;
94  right: .7em;
95}
96
97.videomail .facingMode:hover {
98  cursor: pointer;
99  background: #323232b3;
100}
101
102.videomail .recordTimer, .videomail .recordNote {
103  color: #00d814;
104  opacity: .9;
105  background: #0a0a0acc;
106  padding: .3em .4em;
107  font-family: monospace;
108  transition: all 1s;
109  right: .7em;
110}
111
112.videomail .recordTimer.near, .videomail .recordNote.near {
113  color: #eb9369;
114}
115
116.videomail .recordTimer.nigh, .videomail .recordNote.nigh {
117  color: #ea4b2a;
118}
119
120.videomail .recordTimer {
121  top: .7em;
122}
123
124.videomail .recordNote {
125  top: 3.6em;
126}
127
128.videomail .recordNote:before {
129  content: "REC";
130  animation: 1s infinite blink;
131}
132
133.videomail .notifier {
134  box-sizing: border-box;
135  overflow: hidden;
136}
137
138.videomail .radioGroup {
139  display: block;
140}
141
142.videomail .radioGroup label {
143  cursor: pointer;
144}
145
146.videomail video {
147  margin-bottom: 0;
148}
149
150.videomail video.userMedia {
151  background-color: #3232321a;
152}
153`,
154                    ""
155                ]);
156                const __rspack_default_export = ___CSS_LOADER_EXPORT___;
157                __webpack_require__.d(__webpack_exports__, {}, {
158                    A: __rspack_default_export
159                });
160            },
161            8824 (module1, exports1, __webpack_require__) {
162                var EventEmitter = __webpack_require__(7007).EventEmitter, inherits = __webpack_require__(6698), raf = __webpack_require__(3146), methods;
163                var defaultRAFObject = {
164                    requestAnimationFrame: raf,
165                    cancelAnimationFrame: raf.cancel
166                };
167                function returnTrue() {
168                    return true;
169                }
170                function makeThrottle(fps) {
171                    var delay = 1000 / fps;
172                    var lastTime = Date.now();
173                    if (fps <= 0 || fps === 1 / 0) return returnTrue;
174                    var half = Math.ceil(1000 / 60) / 2;
175                    return function() {
176                        var now = Date.now();
177                        if (now - lastTime < delay - half) return false;
178                        lastTime = now;
179                        return true;
180                    };
181                }
182                function Animitter(opts) {
183                    opts = opts || {};
184                    this.__delay = opts.delay || 0;
185                    this.fixedDelta = !!opts.fixedDelta;
186                    this.frameCount = 0;
187                    this.deltaTime = 0;
188                    this.elapsedTime = 0;
189                    this.__running = false;
190                    this.__completed = false;
191                    this.setFPS(opts.fps || 1 / 0);
192                    this.setRequestAnimationFrameObject(opts.requestAnimationFrameObject || defaultRAFObject);
193                }
194                inherits(Animitter, EventEmitter);
195                function onStart(scope) {
196                    var now = Date.now();
197                    var rAFID;
198                    if (scope.__running) return scope;
199                    exports1.running += 1;
200                    scope.__running = true;
201                    scope.__lastTime = now;
202                    scope.deltaTime = 0;
203                    scope.emit('start', scope.deltaTime, 0, scope.frameCount);
204                    var lastRAFObject = scope.requestAnimationFrameObject;
205                    var drawFrame = function() {
206                        if (lastRAFObject !== scope.requestAnimationFrameObject) {
207                            lastRAFObject = scope.requestAnimationFrameObject;
208                            scope.requestAnimationFrameObject.requestAnimationFrame(drawFrame);
209                            return;
210                        }
211                        if (scope.__isReadyForUpdate()) scope.update();
212                        if (scope.__running) rAFID = scope.requestAnimationFrameObject.requestAnimationFrame(drawFrame);
213                        else scope.requestAnimationFrameObject.cancelAnimationFrame(rAFID);
214                    };
215                    scope.requestAnimationFrameObject.requestAnimationFrame(drawFrame);
216                    return scope;
217                }
218                methods = {
219                    off: EventEmitter.prototype.removeListener,
220                    trigger: EventEmitter.prototype.emit,
221                    complete: function() {
222                        this.stop();
223                        this.__completed = true;
224                        this.emit('complete', this.frameCount, this.deltaTime);
225                        return this;
226                    },
227                    dispose: function() {
228                        this.stop();
229                        this.removeAllListeners();
230                        return this;
231                    },
232                    getDeltaTime: function() {
233                        return this.deltaTime;
234                    },
235                    getElapsedTime: function() {
236                        return this.elapsedTime;
237                    },
238                    getFPS: function() {
239                        return this.deltaTime > 0 ? 1000 / this.deltaTime : 0;
240                    },
241                    getFPSLimit: function() {
242                        return this.__fps;
243                    },
244                    getFrameCount: function() {
245                        return this.frameCount;
246                    },
247                    getRequestAnimationFrameObject: function() {
248                        return this.requestAnimationFrameObject;
249                    },
250                    isRunning: function() {
251                        return this.__running;
252                    },
253                    isCompleted: function() {
254                        return this.__completed;
255                    },
256                    reset: function() {
257                        this.stop();
258                        this.__completed = false;
259                        this.__lastTime = 0;
260                        this.deltaTime = 0;
261                        this.elapsedTime = 0;
262                        this.frameCount = 0;
263                        this.emit('reset', 0, 0, this.frameCount);
264                        return this;
265                    },
266                    setFPS: function(fps) {
267                        this.__fps = fps;
268                        this.__isReadyForUpdate = makeThrottle(fps);
269                        return this;
270                    },
271                    setRequestAnimationFrameObject: function(object) {
272                        if ('function' != typeof object.requestAnimationFrame || 'function' != typeof object.cancelAnimationFrame) throw new Error("Invalid object provide to `setRequestAnimationFrameObject`");
273                        this.requestAnimationFrameObject = object;
274                        return this;
275                    },
276                    start: function() {
277                        var self1 = this;
278                        if (this.__delay) setTimeout(function() {
279                            onStart(self1);
280                        }, this.__delay);
281                        else onStart(this);
282                        return this;
283                    },
284                    stop: function() {
285                        if (this.__running) {
286                            this.__running = false;
287                            exports1.running -= 1;
288                            this.emit('stop', this.deltaTime, this.elapsedTime, this.frameCount);
289                        }
290                        return this;
291                    },
292                    update: function() {
293                        this.frameCount++;
294                        var now = Date.now();
295                        this.__lastTime = this.__lastTime || now;
296                        this.deltaTime = this.fixedDelta || exports1.globalFixedDelta ? 1000 / Math.min(60, this.__fps) : now - this.__lastTime;
297                        this.elapsedTime += this.deltaTime;
298                        this.__lastTime = now;
299                        this.emit('update', this.deltaTime, this.elapsedTime, this.frameCount);
300                        return this;
301                    }
302                };
303                for(var method in methods)Animitter.prototype[method] = methods[method];
304                function createAnimitter(options, fn) {
305                    if (1 === arguments.length && 'function' == typeof options) {
306                        fn = options;
307                        options = {};
308                    }
309                    var _instance = new Animitter(options);
310                    if (fn) _instance.on('update', fn);
311                    return _instance;
312                }
313                module1.exports = exports1 = createAnimitter;
314                exports1.bound = function(options, fn) {
315                    var loop = createAnimitter(options, fn), functionKeys = functions(Animitter.prototype), hasBind = !!Function.prototype.bind, fnKey;
316                    for(var i = 0; i < functionKeys.length; i++){
317                        fnKey = functionKeys[i];
318                        loop[fnKey] = hasBind ? loop[fnKey].bind(loop) : bind(loop[fnKey], loop);
319                    }
320                    return loop;
321                };
322                exports1.Animitter = Animitter;
323                exports1.globalFixedDelta = false;
324                exports1.EventEmitter = EventEmitter;
325                exports1.running = 0;
326                function bind(fn, scope) {
327                    if ('function' == typeof fn.bind) return fn.bind(scope);
328                    return function() {
329                        return fn.apply(scope, arguments);
330                    };
331                }
332                function functions(obj) {
333                    var keys = Object.keys(obj);
334                    var arr = [];
335                    for(var i = 0; i < keys.length; i++)if ('function' == typeof obj[keys[i]]) arr.push(keys[i]);
336                    return arr;
337                }
338                Date.now = Date.now || function() {
339                    return new Date().getTime();
340                };
341            },
342            7526 (__unused_rspack_module, exports1) {
343                "use strict";
344                exports1.byteLength = byteLength;
345                exports1.toByteArray = toByteArray;
346                exports1.fromByteArray = fromByteArray;
347                var lookup = [];
348                var revLookup = [];
349                var Arr = "u" > typeof Uint8Array ? Uint8Array : Array;
350                var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 5,960 bytes, lines 350-461
350+/';
351                for(var i = 0, len = code.length; i < len; ++i){
352                    lookup[i] = code[i];
353                    revLookup[code.charCodeAt(i)] = i;
354                }
355                revLookup['-'.charCodeAt(0)] = 62;
356                revLookup['_'.charCodeAt(0)] = 63;
357                function getLens(b64) {
358                    var len = b64.length;
359                    if (len % 4 > 0) throw new Error('Invalid string. Length must be a multiple of 4');
360                    var validLen = b64.indexOf('=');
361                    if (-1 === validLen) validLen = len;
362                    var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;
363                    return [
364                        validLen,
365                        placeHoldersLen
366                    ];
367                }
368                function byteLength(b64) {
369                    var lens = getLens(b64);
370                    var validLen = lens[0];
371                    var placeHoldersLen = lens[1];
372                    return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
373                }
374                function _byteLength(b64, validLen, placeHoldersLen) {
375                    return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
376                }
377                function toByteArray(b64) {
378                    var tmp;
379                    var lens = getLens(b64);
380                    var validLen = lens[0];
381                    var placeHoldersLen = lens[1];
382                    var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
383                    var curByte = 0;
384                    var len = placeHoldersLen > 0 ? validLen - 4 : validLen;
385                    var i;
386                    for(i = 0; i < len; i += 4){
387                        tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
388                        arr[curByte++] = tmp >> 16 & 0xFF;
389                        arr[curByte++] = tmp >> 8 & 0xFF;
390                        arr[curByte++] = 0xFF & tmp;
391                    }
392                    if (2 === placeHoldersLen) {
393                        tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
394                        arr[curByte++] = 0xFF & tmp;
395                    }
396                    if (1 === placeHoldersLen) {
397                        tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
398                        arr[curByte++] = tmp >> 8 & 0xFF;
399                        arr[curByte++] = 0xFF & tmp;
400                    }
401                    return arr;
402                }
403                function tripletToBase64(num) {
404                    return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[0x3F & num];
405                }
406                function encodeChunk(uint8, start, end) {
407                    var tmp;
408                    var output = [];
409                    for(var i = start; i < end; i += 3){
410                        tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (0xFF & uint8[i + 2]);
411                        output.push(tripletToBase64(tmp));
412                    }
413                    return output.join('');
414                }
415                function fromByteArray(uint8) {
416                    var tmp;
417                    var len = uint8.length;
418                    var extraBytes = len % 3;
419                    var parts = [];
420                    var maxChunkLength = 16383;
421                    for(var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength)parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
422                    if (1 === extraBytes) {
423                        tmp = uint8[len - 1];
424                        parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 0x3F] + '==');
425                    } else if (2 === extraBytes) {
426                        tmp = (uint8[len - 2] << 8) + uint8[len - 1];
427                        parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 0x3F] + lookup[tmp << 2 & 0x3F] + '=');
428                    }
429                    return parts.join('');
430                }
431            },
432            8287 (__unused_rspack_module, exports1, __webpack_require__) {
433                "use strict";
434                /*!
435 * The buffer module from node.js, for the browser.
436 *
437 * @author   Feross Aboukhadijeh <https://feross.org>
438 * @license  MIT
439 */ var base64 = __webpack_require__(7526);
440                var ieee754 = __webpack_require__(251);
441                var customInspectSymbol = 'function' == typeof Symbol && 'function' == typeof Symbol['for'] ? Symbol['for']('nodejs.util.inspect.custom') : null;
442                exports1.Buffer = Buffer;
443                exports1.SlowBuffer = SlowBuffer;
444                exports1.INSPECT_MAX_BYTES = 50;
445                var K_MAX_LENGTH = 0x7fffffff;
446                exports1.kMaxLength = K_MAX_LENGTH;
447                Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport();
448                if (!Buffer.TYPED_ARRAY_SUPPORT && "u" > typeof console && 'function' == typeof console.error) console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");
449                function typedArraySupport() {
450                    try {
451                        var arr = new Uint8Array(1);
452                        var proto = {
453                            foo: function() {
454                                return 42;
455                            }
456                        };
457                        Object.setPrototypeOf(proto, Uint8Array.prototype);
458                        Object.setPrototypeOf(arr, proto);
459                        return 42 === arr.foo();
460                    } catch (e) {
461                        return false;
462                    }
463                }
464                Object.defineProperty(Buffer.prototype, 'parent', {
465                    enumerable: true,
466                    get: function() {
467                        if (!Buffer.isBuffer(this)) return;
468                        return this.buffer;
469                    }
470                });
471                Object.defineProperty(Buffer.prototype, 'offset', {
472                    enumerable: true,
473                    get: function() {
474                        if (!Buffer.isBuffer(this)) return;
475                        return this.byteOffset;
476                    }
477                });
478                function createBuffer(length) {
479                    if (length > K_MAX_LENGTH) throw new RangeError('The value "' + length + '" is invalid for option "size"');
480                    var buf = new Uint8Array(length);
481                    Object.setPrototypeOf(buf, Buffer.prototype);
482                    return buf;
483                }
484                function Buffer(arg, encodingOrOffset, length) {
485                    if ('number' == typeof arg) {
486                        if ('string' == typeof encodingOrOffset) throw new TypeError('The "string" argument must be of type string. Received type number');
487                        return allocUnsafe(arg);
488                    }
489                    return from(arg, encodingOrOffset, length);
490                }
491                Buffer.poolSize = 8192;
492                function from(value, encodingOrOffset, length) {
493                    if ('string' == typeof value) return fromString(value, encodingOrOffset);
494                    if (ArrayBuffer.isView(value)) return fromArrayView(value);
495                    if (null == value) throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
496                    if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) return fromArrayBuffer(value, encodingOrOffset, length);
497                    if ("u" > typeof SharedArrayBuffer && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) return fromArrayBuffer(value, encodingOrOffset, length);
498                    if ('number' == typeof value) throw new TypeError('The "value" argument must not be of type number. Received type number');
499                    var valueOf = value.valueOf && value.valueOf();
500                    if (null != valueOf && valueOf !== value) return Buffer.from(valueOf, encodingOrOffset, length);
501                    var b = fromObject(value);
502                    if (b) return b;
503                    if ("u" > typeof Symbol && null != Symbol.toPrimitive && 'function' == typeof value[Symbol.toPrimitive]) return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length);
504                    throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
505                }
506                Buffer.from = function(value, encodingOrOffset, length) {
507                    return from(value, encodingOrOffset, length);
508                };
509                Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype);
510                Object.setPrototypeOf(Buffer, Uint8Array);
511                function assertSize(size) {
512                    if ('number' != typeof size) throw new TypeError('"size" argument must be of type number');
513                    if (size < 0) throw new RangeError('The value "' + size + '" is invalid for option "size"');
514                }
515                function alloc(size, fill, encoding) {
516                    assertSize(size);
517                    if (size <= 0) return createBuffer(size);
518                    if (void 0 !== fill) return 'string' == typeof encoding ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
519                    return createBuffer(size);
520                }
521                Buffer.alloc = function(size, fill, encoding) {
522                    return alloc(size, fill, encoding);
523                };
524                function allocUnsafe(size) {
525                    assertSize(size);
526                    return createBuffer(size < 0 ? 0 : 0 | checked(size));
527                }
528                Buffer.allocUnsafe = function(size) {
529                    return allocUnsafe(size);
530                };
531                Buffer.allocUnsafeSlow = function(size) {
532                    return allocUnsafe(size);
533                };
534                function fromString(string, encoding) {
535                    if ('string' != typeof encoding || '' === encoding) encoding = 'utf8';
536                    if (!Buffer.isEncoding(encoding)) throw new TypeError('Unknown encoding: ' + encoding);
537                    var length = 0 | byteLength(string, encoding);
538                    var buf = createBuffer(length);
539                    var actual = buf.write(string, encoding);
540                    if (actual !== length) buf = buf.slice(0, actual);
541                    return buf;
542                }
543                function fromArrayLike(array) {
544                    var length = array.length < 0 ? 0 : 0 | checked(array.length);
545                    var buf = createBuffer(length);
546                    for(var i = 0; i < length; i += 1)buf[i] = 255 & array[i];
547                    return buf;
548                }
549                function fromArrayView(arrayView) {
550                    if (isInstance(arrayView, Uint8Array)) {
551                        var copy = new Uint8Array(arrayView);
552                        return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);
553                    }
554                    return fromArrayLike(arrayView);
555                }
556                function fromArrayBuffer(array, byteOffset, length) {
557                    if (byteOffset < 0 || array.byteLength < byteOffset) throw new RangeError('"offset" is outside of buffer bounds');
558                    if (array.byteLength < byteOffset + (length || 0)) throw new RangeError('"length" is outside of buffer bounds');
559                    var buf;
560                    buf = void 0 === byteOffset && void 0 === length ? new Uint8Array(array) : void 0 === length ? new Uint8Array(array, byteOffset) : new Uint8Array(array, byteOffset, length);
561                    Object.setPrototypeOf(buf, Buffer.prototype);
562                    return buf;
563                }
564                function fromObject(obj) {
565                    if (Buffer.isBuffer(obj)) {
566                        var len = 0 | checked(obj.length);
567                        var buf = createBuffer(len);
568                        if (0 === buf.length) return buf;
569                        obj.copy(buf, 0, 0, len);
570                        return buf;
571                    }
572                    if (void 0 !== obj.length) {
573                        if ('number' != typeof obj.length || numberIsNaN(obj.length)) return createBuffer(0);
574                        return fromArrayLike(obj);
575                    }
576                    if ('Buffer' === obj.type && Array.isArray(obj.data)) return fromArrayLike(obj.data);
577                }
578                function checked(length) {
579                    if (length >= K_MAX_LENGTH) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + ' bytes');
580                    return 0 | length;
581                }
582                function SlowBuffer(length) {
583                    if (+length != length) length = 0;
584                    return Buffer.alloc(+length);
585                }
586                Buffer.isBuffer = function(b) {
587                    return null != b && true === b._isBuffer && b !== Buffer.prototype;
588                };
589                Buffer.compare = function(a, b) {
590                    if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength);
591                    if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength);
592                    if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
593                    if (a === b) return 0;
594                    var x = a.length;
595                    var y = b.length;
596                    for(var i = 0, len = Math.min(x, y); i < len; ++i)if (a[i] !== b[i]) {
597                        x = a[i];
598                        y = b[i];
599                        break;
600                    }
601                    if (x < y) return -1;
602                    if (y < x) return 1;
603                    return 0;
604                };
605                Buffer.isEncoding = function(encoding) {
606                    switch(String(encoding).toLowerCase()){
607                        case 'hex':
608                        case 'utf8':
609                        case 'utf-8':
610                        case 'ascii':
611                        case 'latin1':
612                        case 'binary':
613                        case 'base64':
614                        case 'ucs2':
615                        case 'ucs-2':
616                        case 'utf16le':
617                        case 'utf-16le':
618                            return true;
619                        default:
620                            return false;
621                    }
622                };
623                Buffer.concat = function(list, length) {
624                    if (!Array.isArray(list)) throw new TypeError('"list" argument must be an Array of Buffers');
625                    if (0 === list.length) return Buffer.alloc(0);
626                    var i;
627                    if (void 0 === length) {
628                        length = 0;
629                        for(i = 0; i < list.length; ++i)length += list[i].length;
630                    }
631                    var buffer = Buffer.allocUnsafe(length);
632                    var pos = 0;
633                    for(i = 0; i < list.length; ++i){
634                        var buf = list[i];
635                        if (isInstance(buf, Uint8Array)) if (pos + buf.length > buffer.length) Buffer.from(buf).copy(buffer, pos);
636                        else Uint8Array.prototype.set.call(buffer, buf, pos);
637                        else if (Buffer.isBuffer(buf)) buf.copy(buffer, pos);
638                        else throw new TypeError('"list" argument must be an Array of Buffers');
639                        pos += buf.length;
640                    }
641                    return buffer;
642                };
643                function byteLength(string, encoding) {
644                    if (Buffer.isBuffer(string)) return string.length;
645                    if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) return string.byteLength;
646                    if ('string' != typeof string) throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string);
647                    var len = string.length;
648                    var mustMatch = arguments.length > 2 && true === arguments[2];
649                    if (!mustMatch && 0 === len) return 0;
650                    var loweredCase = false;
651                    for(;;)switch(encoding){
652                        case 'ascii':
653                        case 'latin1':
654                        case 'binary':
655                            return len;
656                        case 'utf8':
657                        case 'utf-8':
658                            return utf8ToBytes(string).length;
659                        case 'ucs2':
660                        case 'ucs-2':
661                        case 'utf16le':
662                        case 'utf-16le':
663                            return 2 * len;
664                        case 'hex':
665                            return len >>> 1;
666                        case 'base64':
667                            return base64ToBytes(string).length;
668                        default:
669                            if (loweredCase) return mustMatch ? -1 : utf8ToBytes(string).length;
670                            encoding = ('' + encoding).toLowerCase();
671                            loweredCase = true;
672                    }
673                }
674                Buffer.byteLength = byteLength;
675                function slowToString(encoding, start, end) {
676                    var loweredCase = false;
677                    if (void 0 === start || start < 0) start = 0;
678                    if (start > this.length) return '';
679                    if (void 0 === end || end > this.length) end = this.length;
680                    if (end <= 0) return '';
681                    end >>>= 0;
682                    start >>>= 0;
683                    if (end <= start) return '';
684                    if (!encoding) encoding = 'utf8';
685                    while(true)switch(encoding){
686                        case 'hex':
687                            return hexSlice(this, start, end);
688                        case 'utf8':
689                        case 'utf-8':
690                            return utf8Slice(this, start, end);
691                        case 'ascii':
692                            return asciiSlice(this, start, end);
693                        case 'latin1':
694                        case 'binary':
695                            return latin1Slice(this, start, end);
696                        case 'base64':
697                            return base64Slice(this, start, end);
698                        case 'ucs2':
699                        case 'ucs-2':
700                        case 'utf16le':
701                        case 'utf-16le':
702                            return utf16leSlice(this, start, end);
703                        default:
704                            if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
705                            encoding = (encoding + '').toLowerCase();
706                            loweredCase = true;
707                    }
708                }
709                Buffer.prototype._isBuffer = true;
710                function swap(b, n, m) {
711                    var i = b[n];
712                    b[n] = b[m];
713                    b[m] = i;
714                }
715                Buffer.prototype.swap16 = function() {
716                    var len = this.length;
717                    if (len % 2 !== 0) throw new RangeError('Buffer size must be a multiple of 16-bits');
718                    for(var i = 0; i < len; i += 2)swap(this, i, i + 1);
719                    return this;
720                };
721                Buffer.prototype.swap32 = function() {
722                    var len = this.length;
723                    if (len % 4 !== 0) throw new RangeError('Buffer size must be a multiple of 32-bits');
724                    for(var i = 0; i < len; i += 4){
725                        swap(this, i, i + 3);
726                        swap(this, i + 1, i + 2);
727                    }
728                    return this;
729                };
730                Buffer.prototype.swap64 = function() {
731                    var len = this.length;
732                    if (len % 8 !== 0) throw new RangeError('Buffer size must be a multiple of 64-bits');
733                    for(var i = 0; i < len; i += 8){
734                        swap(this, i, i + 7);
735                        swap(this, i + 1, i + 6);
736                        swap(this, i + 2, i + 5);
737                        swap(this, i + 3, i + 4);
738                    }
739                    return this;
740                };
741                Buffer.prototype.toString = function() {
742                    var length = this.length;
743                    if (0 === length) return '';
744                    if (0 === arguments.length) return utf8Slice(this, 0, length);
745                    return slowToString.apply(this, arguments);
746                };
747                Buffer.prototype.toLocaleString = Buffer.prototype.toString;
748                Buffer.prototype.equals = function(b) {
749                    if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');
750                    if (this === b) return true;
751                    return 0 === Buffer.compare(this, b);
752                };
753                Buffer.prototype.inspect = function() {
754                    var str = '';
755                    var max = exports1.INSPECT_MAX_BYTES;
756                    str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();
757                    if (this.length > max) str += ' ... ';
758                    return '<Buffer ' + str + '>';
759                };
760                if (customInspectSymbol) Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect;
761                Buffer.prototype.compare = function(target, start, end, thisStart, thisEnd) {
762                    if (isInstance(target, Uint8Array)) target = Buffer.from(target, target.offset, target.byteLength);
763                    if (!Buffer.isBuffer(target)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);
764                    if (void 0 === start) start = 0;
765                    if (void 0 === end) end = target ? target.length : 0;
766                    if (void 0 === thisStart) thisStart = 0;
767                    if (void 0 === thisEnd) thisEnd = this.length;
768                    if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) throw new RangeError('out of range index');
769                    if (thisStart >= thisEnd && start >= end) return 0;
770                    if (thisStart >= thisEnd) return -1;
771                    if (start >= end) return 1;
772                    start >>>= 0;
773                    end >>>= 0;
774                    thisStart >>>= 0;
775                    thisEnd >>>= 0;
776                    if (this === target) return 0;
777                    var x = thisEnd - thisStart;
778                    var y = end - start;
779                    var len = Math.min(x, y);
780                    var thisCopy = this.slice(thisStart, thisEnd);
781                    var targetCopy = target.slice(start, end);
782                    for(var i = 0; i < len; ++i)if (thisCopy[i] !== targetCopy[i]) {
783                        x = thisCopy[i];
784                        y = targetCopy[i];
785                        break;
786                    }
787                    if (x < y) return -1;
788                    if (y < x) return 1;
789                    return 0;
790                };
791                function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
792                    if (0 === buffer.length) return -1;
793                    if ('string' == typeof byteOffset) {
794                        encoding = byteOffset;
795                        byteOffset = 0;
796                    } else if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff;
797                    else if (byteOffset < -2147483648) byteOffset = -2147483648;
798                    byteOffset *= 1;
799                    if (numberIsNaN(byteOffset)) byteOffset = dir ? 0 : buffer.length - 1;
800                    if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
801                    if (byteOffset >= buffer.length) if (dir) return -1;
802                    else byteOffset = buffer.length - 1;
803                    else if (byteOffset < 0) if (!dir) return -1;
804                    else byteOffset = 0;
805                    if ('string' == typeof val) val = Buffer.from(val, encoding);
806                    if (Buffer.isBuffer(val)) {
807                        if (0 === val.length) return -1;
808                        return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
809                    }
810                    if ('number' == typeof val) {
811                        val &= 0xFF;
812                        if ('function' == typeof Uint8Array.prototype.indexOf) if (dir) return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
813                        else return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
814                        return arrayIndexOf(buffer, [
815                            val
816                        ], byteOffset, encoding, dir);
817                    }
818                    throw new TypeError('val must be string, number or Buffer');
819                }
820                function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
821                    var indexSize = 1;
822                    var arrLength = arr.length;
823                    var valLength = val.length;
824                    if (void 0 !== encoding) {
825                        encoding = String(encoding).toLowerCase();
826                        if ('ucs2' === encoding || 'ucs-2' === encoding || 'utf16le' === encoding || 'utf-16le' === encoding) {
827                            if (arr.length < 2 || val.length < 2) return -1;
828                            indexSize = 2;
829                            arrLength /= 2;
830                            valLength /= 2;
831                            byteOffset /= 2;
832                        }
833                    }
834                    function read(buf, i) {
835                        if (1 === indexSize) return buf[i];
836                        return buf.readUInt16BE(i * indexSize);
837                    }
838                    var i;
839                    if (dir) {
840                        var foundIndex = -1;
841                        for(i = byteOffset; i < arrLength;
841 i++)if (read(arr, i) === read(val, -1 === foundIndex ? 0 : i - foundIndex)) {
842                            if (-1 === foundIndex) foundIndex = i;
843                            if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
844                        } else {
845                            if (-1 !== foundIndex) i -= i - foundIndex;
846                            foundIndex = -1;
847                        }
848                    } else {
849                        if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
850                        for(i = byteOffset; i >= 0; i--){
851                            var found = true;
852                            for(var j = 0; j < valLength; j++)if (read(arr, i + j) !== read(val, j)) {
853                                found = false;
854                                break;
855                            }
856                            if (found) return i;
857                        }
858                    }
859                    return -1;
860                }
861                Buffer.prototype.includes = function(val, byteOffset, encoding) {
862                    return -1 !== this.indexOf(val, byteOffset, encoding);
863                };
864                Buffer.prototype.indexOf = function(val, byteOffset, encoding) {
865                    return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
866                };
867                Buffer.prototype.lastIndexOf = function(val, byteOffset, encoding) {
868                    return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
869                };
870                function hexWrite(buf, string, offset, length) {
871                    offset = Number(offset) || 0;
872                    var remaining = buf.length - offset;
873                    if (length) {
874                        length = Number(length);
875                        if (length > remaining) length = remaining;
876                    } else length = remaining;
877                    var strLen = string.length;
878                    if (length > strLen / 2) length = strLen / 2;
879                    for(var i = 0; i < length; ++i){
880                        var parsed = parseInt(string.substr(2 * i, 2), 16);
881                        if (numberIsNaN(parsed)) break;
882                        buf[offset + i] = parsed;
883                    }
884                    return i;
885                }
886                function utf8Write(buf, string, offset, length) {
887                    return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
888                }
889                function asciiWrite(buf, string, offset, length) {
890                    return blitBuffer(asciiToBytes(string), buf, offset, length);
891                }
892                function base64Write(buf, string, offset, length) {
893                    return blitBuffer(base64ToBytes(string), buf, offset, length);
894                }
895                function ucs2Write(buf, string, offset, length) {
896                    return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
897                }
898                Buffer.prototype.write = function(string, offset, length, encoding) {
899                    if (void 0 === offset) {
900                        encoding = 'utf8';
901                        length = this.length;
902                        offset = 0;
903                    } else if (void 0 === length && 'string' == typeof offset) {
904                        encoding = offset;
905                        length = this.length;
906                        offset = 0;
907                    } else if (isFinite(offset)) {
908                        offset >>>= 0;
909                        if (isFinite(length)) {
910                            length >>>= 0;
911                            if (void 0 === encoding) encoding = 'utf8';
912                        } else {
913                            encoding = length;
914                            length = void 0;
915                        }
916                    } else throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');
917                    var remaining = this.length - offset;
918                    if (void 0 === length || length > remaining) length = remaining;
919                    if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) throw new RangeError('Attempt to write outside buffer bounds');
920                    if (!encoding) encoding = 'utf8';
921                    var loweredCase = false;
vendor: 16,450 bytes, lines 922-1218
922                    for(;;)switch(encoding){
923                        case 'hex':
924                            return hexWrite(this, string, offset, length);
925                        case 'utf8':
926                        case 'utf-8':
927                            return utf8Write(this, string, offset, length);
928                        case 'ascii':
929                        case 'latin1':
930                        case 'binary':
931                            return asciiWrite(this, string, offset, length);
932                        case 'base64':
933                            return base64Write(this, string, offset, length);
934                        case 'ucs2':
935                        case 'ucs-2':
936                        case 'utf16le':
937                        case 'utf-16le':
938                            return ucs2Write(this, string, offset, length);
939                        default:
940                            if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
941                            encoding = ('' + encoding).toLowerCase();
942                            loweredCase = true;
943                    }
944                };
945                Buffer.prototype.toJSON = function() {
946                    return {
947                        type: 'Buffer',
948                        data: Array.prototype.slice.call(this._arr || this, 0)
949                    };
950                };
951                function base64Slice(buf, start, end) {
952                    if (0 === start && end === buf.length) return base64.fromByteArray(buf);
953                    return base64.fromByteArray(buf.slice(start, end));
954                }
955                function utf8Slice(buf, start, end) {
956                    end = Math.min(buf.length, end);
957                    var res = [];
958                    var i = start;
959                    while(i < end){
960                        var firstByte = buf[i];
961                        var codePoint = null;
962                        var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;
963                        if (i + bytesPerSequence <= end) {
964                            var secondByte, thirdByte, fourthByte, tempCodePoint;
965                            switch(bytesPerSequence){
966                                case 1:
967                                    if (firstByte < 0x80) codePoint = firstByte;
968                                    break;
969                                case 2:
970                                    secondByte = buf[i + 1];
971                                    if ((0xC0 & secondByte) === 0x80) {
972                                        tempCodePoint = (0x1F & firstByte) << 0x6 | 0x3F & secondByte;
973                                        if (tempCodePoint > 0x7F) codePoint = tempCodePoint;
974                                    }
975                                    break;
976                                case 3:
977                                    secondByte = buf[i + 1];
978                                    thirdByte = buf[i + 2];
979                                    if ((0xC0 & secondByte) === 0x80 && (0xC0 & thirdByte) === 0x80) {
980                                        tempCodePoint = (0xF & firstByte) << 0xC | (0x3F & secondByte) << 0x6 | 0x3F & thirdByte;
981                                        if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) codePoint = tempCodePoint;
982                                    }
983                                    break;
984                                case 4:
985                                    secondByte = buf[i + 1];
986                                    thirdByte = buf[i + 2];
987                                    fourthByte = buf[i + 3];
988                                    if ((0xC0 & secondByte) === 0x80 && (0xC0 & thirdByte) === 0x80 && (0xC0 & fourthByte) === 0x80) {
989                                        tempCodePoint = (0xF & firstByte) << 0x12 | (0x3F & secondByte) << 0xC | (0x3F & thirdByte) << 0x6 | 0x3F & fourthByte;
990                                        if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) codePoint = tempCodePoint;
991                                    }
992                            }
993                        }
994                        if (null === codePoint) {
995                            codePoint = 0xFFFD;
996                            bytesPerSequence = 1;
997                        } else if (codePoint > 0xFFFF) {
998                            codePoint -= 0x10000;
999                            res.push(codePoint >>> 10 & 0x3FF | 0xD800);
1000                            codePoint = 0xDC00 | 0x3FF & codePoint;
1001                        }
1002                        res.push(codePoint);
1003                        i += bytesPerSequence;
1004                    }
1005                    return decodeCodePointsArray(res);
1006                }
1007                var MAX_ARGUMENTS_LENGTH = 0x1000;
1008                function decodeCodePointsArray(codePoints) {
1009                    var len = codePoints.length;
1010                    if (len <= MAX_ARGUMENTS_LENGTH) return String.fromCharCode.apply(String, codePoints);
1011                    var res = '';
1012                    var i = 0;
1013                    while(i < len)res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
1014                    return res;
1015                }
1016                function asciiSlice(buf, start, end) {
1017                    var ret = '';
1018                    end = Math.min(buf.length, end);
1019                    for(var i = start; i < end; ++i)ret += String.fromCharCode(0x7F & buf[i]);
1020                    return ret;
1021                }
1022                function latin1Slice(buf, start, end) {
1023                    var ret = '';
1024                    end = Math.min(buf.length, end);
1025                    for(var i = start; i < end; ++i)ret += String.fromCharCode(buf[i]);
1026                    return ret;
1027                }
1028                function hexSlice(buf, start, end) {
1029                    var len = buf.length;
1030                    if (!start || start < 0) start = 0;
1031                    if (!end || end < 0 || end > len) end = len;
1032                    var out = '';
1033                    for(var i = start; i < end; ++i)out += hexSliceLookupTable[buf[i]];
1034                    return out;
1035                }
1036                function utf16leSlice(buf, start, end) {
1037                    var bytes = buf.slice(start, end);
1038                    var res = '';
1039                    for(var i = 0; i < bytes.length - 1; i += 2)res += String.fromCharCode(bytes[i] + 256 * bytes[i + 1]);
1040                    return res;
1041                }
1042                Buffer.prototype.slice = function(start, end) {
1043                    var len = this.length;
1044                    start = ~~start;
1045                    end = void 0 === end ? len : ~~end;
1046                    if (start < 0) {
1047                        start += len;
1048                        if (start < 0) start = 0;
1049                    } else if (start > len) start = len;
1050                    if (end < 0) {
1051                        end += len;
1052                        if (end < 0) end = 0;
1053                    } else if (end > len) end = len;
1054                    if (end < start) end = start;
1055                    var newBuf = this.subarray(start, end);
1056                    Object.setPrototypeOf(newBuf, Buffer.prototype);
1057                    return newBuf;
1058                };
1059                function checkOffset(offset, ext, length) {
1060                    if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');
1061                    if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');
1062                }
1063                Buffer.prototype.readUintLE = Buffer.prototype.readUIntLE = function(offset, byteLength, noAssert) {
1064                    offset >>>= 0;
1065                    byteLength >>>= 0;
1066                    if (!noAssert) checkOffset(offset, byteLength, this.length);
1067                    var val = this[offset];
1068                    var mul = 1;
1069                    var i = 0;
1070                    while(++i < byteLength && (mul *= 0x100))val += this[offset + i] * mul;
1071                    return val;
1072                };
1073                Buffer.prototype.readUintBE = Buffer.prototype.readUIntBE = function(offset, byteLength, noAssert) {
1074                    offset >>>= 0;
1075                    byteLength >>>= 0;
1076                    if (!noAssert) checkOffset(offset, byteLength, this.length);
1077                    var val = this[offset + --byteLength];
1078                    var mul = 1;
1079                    while(byteLength > 0 && (mul *= 0x100))val += this[offset + --byteLength] * mul;
1080                    return val;
1081                };
1082                Buffer.prototype.readUint8 = Buffer.prototype.readUInt8 = function(offset, noAssert) {
1083                    offset >>>= 0;
1084                    if (!noAssert) checkOffset(offset, 1, this.length);
1085                    return this[offset];
1086                };
1087                Buffer.prototype.readUint16LE = Buffer.prototype.readUInt16LE = function(offset, noAssert) {
1088                    offset >>>= 0;
1089                    if (!noAssert) checkOffset(offset, 2, this.length);
1090                    return this[offset] | this[offset + 1] << 8;
1091                };
1092                Buffer.prototype.readUint16BE = Buffer.prototype.readUInt16BE = function(offset, noAssert) {
1093                    offset >>>= 0;
1094                    if (!noAssert) checkOffset(offset, 2, this.length);
1095                    return this[offset] << 8 | this[offset + 1];
1096                };
1097                Buffer.prototype.readUint32LE = Buffer.prototype.readUInt32LE = function(offset, noAssert) {
1098                    offset >>>= 0;
1099                    if (!noAssert) checkOffset(offset, 4, this.length);
1100                    return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + 0x1000000 * this[offset + 3];
1101                };
1102                Buffer.prototype.readUint32BE = Buffer.prototype.readUInt32BE = function(offset, noAssert) {
1103                    offset >>>= 0;
1104                    if (!noAssert) checkOffset(offset, 4, this.length);
1105                    return 0x1000000 * this[offset] + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
1106                };
1107                Buffer.prototype.readIntLE = function(offset, byteLength, noAssert) {
1108                    offset >>>= 0;
1109                    byteLength >>>= 0;
1110                    if (!noAssert) checkOffset(offset, byteLength, this.length);
1111                    var val = this[offset];
1112                    var mul = 1;
1113                    var i = 0;
1114                    while(++i < byteLength && (mul *= 0x100))val += this[offset + i] * mul;
1115                    mul *= 0x80;
1116                    if (val >= mul) val -= Math.pow(2, 8 * byteLength);
1117                    return val;
1118                };
1119                Buffer.prototype.readIntBE = function(offset, byteLength, noAssert) {
1120                    offset >>>= 0;
1121                    byteLength >>>= 0;
1122                    if (!noAssert) checkOffset(offset, byteLength, this.length);
1123                    var i = byteLength;
1124                    var mul = 1;
1125                    var val = this[offset + --i];
1126                    while(i > 0 && (mul *= 0x100))val += this[offset + --i] * mul;
1127                    mul *= 0x80;
1128                    if (val >= mul) val -= Math.pow(2, 8 * byteLength);
1129                    return val;
1130                };
1131                Buffer.prototype.readInt8 = function(offset, noAssert) {
1132                    offset >>>= 0;
1133                    if (!noAssert) checkOffset(offset, 1, this.length);
1134                    if (!(0x80 & this[offset])) return this[offset];
1135                    return (0xff - this[offset] + 1) * -1;
1136                };
1137                Buffer.prototype.readInt16LE = function(offset, noAssert) {
1138                    offset >>>= 0;
1139                    if (!noAssert) checkOffset(offset, 2, this.length);
1140                    var val = this[offset] | this[offset + 1] << 8;
1141                    return 0x8000 & val ? 0xFFFF0000 | val : val;
1142                };
1143                Buffer.prototype.readInt16BE = function(offset, noAssert) {
1144                    offset >>>= 0;
1145                    if (!noAssert) checkOffset(offset, 2, this.length);
1146                    var val = this[offset + 1] | this[offset] << 8;
1147                    return 0x8000 & val ? 0xFFFF0000 | val : val;
1148                };
1149                Buffer.prototype.readInt32LE = function(offset, noAssert) {
1150                    offset >>>= 0;
1151                    if (!noAssert) checkOffset(offset, 4, this.length);
1152                    return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
1153                };
1154                Buffer.prototype.readInt32BE = function(offset, noAssert) {
1155                    offset >>>= 0;
1156                    if (!noAssert) checkOffset(offset, 4, this.length);
1157                    return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
1158                };
1159                Buffer.prototype.readFloatLE = function(offset, noAssert) {
1160                    offset >>>= 0;
1161                    if (!noAssert) checkOffset(offset, 4, this.length);
1162                    return ieee754.read(this, offset, true, 23, 4);
1163                };
1164                Buffer.prototype.readFloatBE = function(offset, noAssert) {
1165                    offset >>>= 0;
1166                    if (!noAssert) checkOffset(offset, 4, this.length);
1167                    return ieee754.read(this, offset, false, 23, 4);
1168                };
1169                Buffer.prototype.readDoubleLE = function(offset, noAssert) {
1170                    offset >>>= 0;
1171                    if (!noAssert) checkOffset(offset, 8, this.length);
1172                    return ieee754.read(this, offset, true, 52, 8);
1173                };
1174                Buffer.prototype.readDoubleBE = function(offset, noAssert) {
1175                    offset >>>= 0;
1176                    if (!noAssert) checkOffset(offset, 8, this.length);
1177                    return ieee754.read(this, offset, false, 52, 8);
1178                };
1179                function checkInt(buf, value, offset, ext, max, min) {
1180                    if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
1181                    if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
1182                    if (offset + ext > buf.length) throw new RangeError('Index out of range');
1183                }
1184                Buffer.prototype.writeUintLE = Buffer.prototype.writeUIntLE = function(value, offset, byteLength, noAssert) {
1185                    value *= 1;
1186                    offset >>>= 0;
1187                    byteLength >>>= 0;
1188                    if (!noAssert) {
1189                        var maxBytes = Math.pow(2, 8 * byteLength) - 1;
1190                        checkInt(this, value, offset, byteLength, maxBytes, 0);
1191                    }
1192                    var mul = 1;
1193                    var i = 0;
1194                    this[offset] = 0xFF & value;
1195                    while(++i < byteLength && (mul *= 0x100))this[offset + i] = value / mul & 0xFF;
1196                    return offset + byteLength;
1197                };
1198                Buffer.prototype.writeUintBE = Buffer.prototype.writeUIntBE = function(value, offset, byteLength, noAssert) {
1199                    value *= 1;
1200                    offset >>>= 0;
1201                    byteLength >>>= 0;
1202                    if (!noAssert) {
1203                        var maxBytes = Math.pow(2, 8 * byteLength) - 1;
1204                        checkInt(this, value, offset, byteLength, maxBytes, 0);
1205                    }
1206                    var i = byteLength - 1;
1207                    var mul = 1;
1208                    this[offset + i] = 0xFF & value;
1209                    while(--i >= 0 && (mul *= 0x100))this[offset + i] = value / mul & 0xFF;
1210                    return offset + byteLength;
1211                };
1212                Buffer.prototype.writeUint8 = Buffer.prototype.writeUInt8 = function(value, offset, noAssert) {
1213                    value *= 1;
1214                    offset >>>= 0;
1215                    if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
1216                    this[offset] = 0xff & value;
1217                    return offset + 1;
1218                };
1219                Buffer.prototype.writeUint16LE = Buffer.prototype.writeUInt16LE = function(value, offset, noAssert) {
1220                    value *= 1;
1221                    offset >>>= 0;
1222                    if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
1223                    this[offset] = 0xff & value;
1224                    this[offset + 1] = value >>> 8;
1225                    return offset + 2;
1226                };
1227                Buffer.prototype.writeUint16BE = Buffer.prototype.writeUInt16BE = function(value, offset, noAssert) {
1228                    value *= 1;
1229                    offset >>>= 0;
1230                    if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
1231                    this[offset] = value >>> 8;
1232                    this[offset + 1] = 0xff & value;
1233                    return offset + 2;
1234                };
1235                Buffer.prototype.writeUint32LE = Buffer.prototype.writeUInt32LE = function(value, offset, noAssert) {
1236                    value *= 1;
1237                    offset >>>= 0;
1238                    if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
1239                    this[offset + 3] = value >>> 24;
1240                    this[offset + 2] = value >>> 16;
1241                    this[offset + 1] = value >>> 8;
1242                    this[offset] = 0xff & value;
1243                    return offset + 4;
1244                };
1245                Buffer.prototype.writeUint32BE = Buffer.prototype.writeUInt32BE = function(value, offset, noAssert) {
1246                    value *= 1;
1247                    offset >>>= 0;
1248                    if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
1249                    this[offset] = value >>> 24;
1250                    this[offset + 1] = value >>> 16;
1251                    this[offset + 2] = value >>> 8;
1252                    this[offset + 3] = 0xff & value;
1253                    return offset + 4;
1254                };
1255                Buffer.prototype.writeIntLE = function(value, offset, byteLength, noAssert) {
1256                    value *= 1;
1257                    offset >>>= 0;
1258                    if (!noAssert) {
1259                        var limit = Math.pow(2, 8 * byteLength - 1);
1260                        checkInt(this, value, offset, byteLength, limit - 1, -limit);
1261                    }
1262                    var i = 0;
1263                    var mul = 1;
1264                    var sub = 0;
1265                    this[offset] = 0xFF & value;
1266                    while(++i < byteLength && (mul *= 0x100)){
1267                        if (value < 0 && 0 === sub && 0 !== this[offset + i - 1]) sub = 1;
1268                        this[offset + i] = (value / mul | 0) - sub & 0xFF;
1269                    }
1270                    return offset + byteLength;
1271                };
1272                Buffer.prototype.writeIntBE = function(value, offset, byteLength, noAssert) {
1273                    value *= 1;
1274                    offset >>>= 0;
1275                    if (!noAssert) {
1276                        var limit = Math.pow(2, 8 * byteLength - 1);
1277                        checkInt(this, value, offset, byteLength, limit - 1, -limit);
1278                    }
1279                    var i = byteLength - 1;
1280                    var mul = 1;
1281                    var sub = 0;
1282                    this[offset + i] = 0xFF & value;
1283                    while(--i >= 0 && (mul *= 0x100)){
1284                        if (value < 0 && 0 === sub && 0 !== this[offset + i + 1]) sub = 1;
1285                        this[offset + i] = (value / mul | 0) - sub & 0xFF;
1286                    }
1287                    return offset + byteLength;
1288                };
1289                Buffer.prototype.writeInt8 = function(value, offset, noAssert) {
1290                    value *= 1;
1291                    offset >>>= 0;
1292                    if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -128);
1293                    if (value < 0) value = 0xff + value + 1;
1294                    this[offset] = 0xff & value;
1295                    return offset + 1;
1296                };
1297                Buffer.prototype.writeInt16LE = function(value, offset, noAssert) {
1298                    value *= 1;
1299                    offset >>>= 0;
1300                    if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -32768);
1301                    this[offset] = 0xff & value;
1302                    this[offset + 1] = value >>> 8;
1303                    return offset + 2;
1304                };
1305                Buffer.prototype.writeInt16BE = function(value, offset, noAssert) {
1306                    value *= 1;
1307                    offset >>>= 0;
1308                    if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -32768);
1309                    this[offset] = value >>> 8;
1310                    this[offset + 1] = 0xff & value;
1311                    return offset + 2;
1312                };
1313                Buffer.prototype.writeInt32LE = function(value, offset, noAssert) {
1314                    value *= 1;
1315                    offset >>>= 0;
1316                    if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -2147483648);
1317                    this[offset] = 0xff & value;
1318                    this[offset + 1] = value >>> 8;
1319                    this[offset + 2] = value >>> 16;
1320                    this[offset + 3] = value >>> 24;
1321                    return offset + 4;
1322                };
1323                Buffer.prototype.writeInt32BE = function(value, offset, noAssert) {
1324                    value *= 1;
1325                    offset >>>= 0;
1326                    if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -2147483648);
1327                    if (value < 0) value = 0xffffffff + value + 1;
1328                    this[offset] = value >>> 24;
1329                    this[offset + 1] = value >>> 16;
1330                    this[offset + 2] = value >>> 8;
1331                    this[offset + 3] = 0xff & value;
1332                    return offset + 4;
1333                };
1334                function checkIEEE754(buf, value, offset, ext, max, min) {
1335                    if (offset + ext > buf.length) throw new RangeError('Index out of range');
1336                    if (offset < 0) throw new RangeError('Index out of range');
1337                }
1338                function writeFloat(buf, value, offset, littleEndian, noAssert) {
1339                    value *= 1;
1340                    offset >>>= 0;
1341                    if (!noAssert) checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);
1342                    ieee754.write(buf, value, offset, littleEndian, 23, 4);
1343                    return offset + 4;
1344                }
1345                Buffer.prototype.writeFloatLE = function(value, offset, noAssert) {
1346                    return writeFloat(this, value, offset, true, noAssert);
1347                };
1348                Buffer.prototype.writeFloatBE = function(value, offset, noAssert) {
1349                    return writeFloat(this, value, offset, false, noAssert);
1350                };
1351                function writeDouble(buf, value, offset, littleEndian, noAssert) {
1352                    value *= 1;
1353                    offset >>>= 0;
1354                    if (!noAssert) checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157e+308);
1355                    ieee754.write(buf, value, offset, littleEndian, 52, 8);
1356                    return offset + 8;
1357                }
1358                Buffer.prototype.writeDoubleLE = function(value, offset, noAssert) {
1359                    return writeDouble(this, value, offset, true, noAssert);
1360                };
1361                Buffer.prototype.writeDoubleBE = function(value, offset, noAssert) {
1362                    return writeDouble(this, value, offset, false, noAssert);
1363                };
1364                Buffer.prototype.copy = function(target, targetStart, start, end) {
1365                    if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer');
1366                    if (!start) start = 0;
1367                    if (!end && 0 !== end) end = this.length;
1368                    if (targetStart >= target.length) targetStart = target.length;
1369                    if (!targetStart) targetStart = 0;
1370                    if (end > 0 && end < start) end = start;
1371                    if (end === start) return 0;
1372                    if (0 === target.length || 0 === this.length) return 0;
1373                    if (targetStart < 0) throw new RangeError('targetStart out of bounds');
1374                    if (start < 0 || start >= this.length) throw new RangeError('Index out of range');
1375                    if (end < 0) throw new RangeError('sourceEnd out of bounds');
1376                    if (end > this.length) end = this.length;
1377                    if (target.length - targetStart < end - start) end = target.length - targetStart + start;
1378                    var len = end - start;
1379                    if (this === target && 'function' == typeof Uint8Array.prototype.copyWithin) this.copyWithin(targetStart, start, end);
1380                    else Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);
1381                    return len;
1382                };
1383                Buffer.prototype.fill = function(val, start, end, encoding) {
1384                    if ('string' == typeof val) {
1385                        if ('string' == typeof start) {
1386                            encoding = start;
1387                            start = 0;
1388                            end = this.length;
1389                        } else if ('string' == typeof end) {
1390                            encoding = end;
1391                            end = this.length;
1392                        }
1393                        if (void 0 !== encoding && 'string' != typeof encoding) throw new TypeError('encoding must be a string');
1394                        if ('string' == typeof encoding && !Buffer.isEncoding(encoding)) throw new TypeError('Unknown encoding: ' + encoding);
1395                        if (1 === val.length) {
1396                            var code = val.charCodeAt(0);
1397                            if ('utf8' === encoding && code < 128 || 'latin1' === encoding) val = code;
1398                        }
1399                    } else if ('number' == typeof val) val &= 255;
1400                    else if ('boolean' == typeof val) val = Number(val);
1401                    if (start < 0 || this.length < start || this.length < end) throw new RangeError('Out of range index');
1402                    if (end <= start) return this;
1403                    start >>>= 0;
1404                    end = void 0 === end ? this.length : end >>> 0;
1405                    if (!val) val = 0;
1406                    var i;
1407                    if ('number' == typeof val) for(i = start; i < end; ++i)this[i] = val;
1408                    else {
1409                        var bytes = Buffer.isBuffer(val) ? val : Buffer.from(val, encoding);
1410                        var len = bytes.length;
1411                        if (0 === len) throw new TypeError('The value "' + val + '" is invali
1411d for argument "value"');
1412                        for(i = 0; i < end - start; ++i)this[i + start] = bytes[i % len];
1413                    }
1414                    return this;
1415                };
1416                var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
1417                function base64clean(str) {
1418                    str = str.split('=')[0];
1419                    str = str.trim().replace(INVALID_BASE64_RE, '');
1420                    if (str.length < 2) return '';
1421                    while(str.length % 4 !== 0)str += '=';
1422                    return str;
1423                }
1424                function utf8ToBytes(string, units) {
1425                    units = units || 1 / 0;
1426                    var codePoint;
1427                    var length = string.length;
1428                    var leadSurrogate = null;
1429                    var bytes = [];
1430                    for(var i = 0; i < length; ++i){
1431                        codePoint = string.charCodeAt(i);
1432                        if (codePoint > 0xD7FF && codePoint < 0xE000) {
1433                            if (!leadSurrogate) {
1434                                if (codePoint > 0xDBFF) {
1435                                    if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
1436                                    continue;
1437                                }
1438                                if (i + 1 === length) {
1439                                    if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
1440                                    continue;
1441                                }
1442                                leadSurrogate = codePoint;
1443                                continue;
1444                            }
1445                            if (codePoint < 0xDC00) {
1446                                if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
1447                                leadSurrogate = codePoint;
1448                                continue;
1449                            }
1450                            codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
1451                        } else if (leadSurrogate) {
1452                            if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
1453                        }
1454                        leadSurrogate = null;
1455                        if (codePoint < 0x80) {
1456                            if ((units -= 1) < 0) break;
1457                            bytes.push(codePoint);
1458                        } else if (codePoint < 0x800) {
1459                            if ((units -= 2) < 0) break;
1460                            bytes.push(codePoint >> 0x6 | 0xC0, 0x3F & codePoint | 0x80);
1461                        } else if (codePoint < 0x10000) {
1462                            if ((units -= 3) < 0) break;
1463                            bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, 0x3F & codePoint | 0x80);
1464                        } else if (codePoint < 0x110000) {
1465                            if ((units -= 4) < 0) break;
1466                            bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, 0x3F & codePoint | 0x80);
1467                        } else throw new Error('Invalid code point');
1468                    }
1469                    return bytes;
1470                }
1471                function asciiToBytes(str) {
1472                    var byteArray = [];
1473                    for(var i = 0; i < str.length; ++i)byteArray.push(0xFF & str.charCodeAt(i));
1474                    return byteArray;
1475                }
1476                function utf16leToBytes(str, units) {
1477                    var c, hi, lo;
1478                    var byteArray = [];
1479                    for(var i = 0; i < str.length; ++i){
1480                        if ((units -= 2) < 0) break;
1481                        c = str.charCodeAt(i);
1482                        hi = c >> 8;
1483                        lo = c % 256;
1484                        byteArray.push(lo);
1485                        byteArray.push(hi);
1486                    }
1487                    return byteArray;
1488                }
1489                function base64ToBytes(str) {
1490                    return base64.toByteArray(base64clean(str));
1491                }
1492                function blitBuffer(src, dst, offset, length) {
1493                    for(var i = 0; i < length; ++i){
1494                        if (i + offset >= dst.length || i >= src.length) break;
1495                        dst[i + offset] = src[i];
1496                    }
1497                    return i;
1498                }
1499                function isInstance(obj, type) {
1500                    return obj instanceof type || null != obj && null != obj.constructor && null != obj.constructor.name && obj.constructor.name === type.name;
1501                }
1502                function numberIsNaN(obj) {
1503                    return obj !== obj;
1504                }
1505                var hexSliceLookupTable = function() {
1506                    var alphabet = '0123456789abcdef';
1507                    var table = new Array(256);
1508                    for(var i = 0; i < 16; ++i){
1509                        var i16 = 16 * i;
1510                        for(var j = 0; j < 16;
1510 ++j)table[i16 + j] = alphabet[i] + alphabet[j];
1511                    }
1512                    return table;
1513                }();
1514            },
1515            3144 (module1, __unused_rspack_exports, __webpack_require__) {
1516                "use strict";
1517                var bind = __webpack_require__(6743);
1518                var $apply = __webpack_require__(1002);
1519                var $call = __webpack_require__(76);
1520                var $reflectApply = __webpack_require__(7119);
1521                module1.exports = $reflectApply || bind.call($call, $apply);
1522            },
1523            2205 (module1, __unused_rspack_exports, __webpack_require__) {
1524                "use strict";
1525                var bind = __webpack_require__(6743);
1526                var $apply = __webpack_require__(1002);
1527                var actualApply = __webpack_require__(3144);
1528                module1.exports = function() {
1529                    return actualApply(bind, $apply, arguments);
1530                };
1531            },
1532            1002 (module1) {
1533                "use strict";
1534                module1.exports = Function.prototype.apply;
1535            },
1536            76 (module1) {
1537                "use strict";
1538                module1.exports = Function.prototype.call;
1539            },
1540            3126 (module1, __unused_rspack_exports, __webpack_require__) {
1541                "use strict";
1542                var bind = __webpack_require__(6743);
1543                var $TypeError = __webpack_require__(9675);
1544                var $call = __webpack_require__(76);
1545                var $actualApply = __webpack_require__(3144);
1546                module1.exports = function(args) {
1547                    if (args.length < 1 || 'function' != typeof args[0]) throw new $TypeError('a function is required');
1548                    return $actualApply(bind, $call, args);
1549                };
1550            },
1551            7119 (module1) {
1552                "use strict";
1553                module1.exports = "u" > typeof Reflect && Reflect && Reflect.apply;
1554            },
1555            487 (module1, __unused_rspack_exports, __webpack_require__) {
1556                "use strict";
1557                var setFunctionLength = __webpack_require__(6897);
1558                var $defineProperty = __webpack_require__(655);
1559                var callBindBasic = __webpack_require__(3126);
1560                var applyBind = __webpack_require__(2205);
1561                module1.exports = function(originalFunction) {
1562                    var func = callBindBasic(arguments);
1563                    var adjustedLength = 1 + originalFunction.length - (arguments.length - 1);
1564                    return setFunctionLength(func, adjustedLength > 0 ? adjustedLength : 0, true);
1565                };
1566                if ($defineProperty) $defineProperty(module1.exports, 'apply', {
1567                    value: applyBind
1568                });
1569                else module1.exports.apply = applyBind;
1570            },
1571            6556 (module1, __unused_rspack_exports, __webpack_require__) {
1572                "use strict";
1573                var GetIntrinsic = __webpack_require__(453);
1574                var callBindBasic = __webpack_require__(3126);
1575                var $indexOf = callBindBasic([
1576                    GetIntrinsic('%String.prototype.indexOf%')
1577                ]);
1578                module1.exports = function(name, allowMissing) {
1579                    var intrinsic = GetIntrinsic(name, !!allowMissing);
1580                    if ('function' == typeof intrinsic && $indexOf(name, '.prototype.') > -1) return callBindBasic([
1581                        intrinsic
1582                    ]);
1583                    return intrinsic;
1584                };
1585            },
1586            5971 (module1) {
1587                module1.exports = Emitter;
1588                function Emitter(obj) {
1589                    if (obj) return mixin(obj);
1590                }
1591                function mixin(obj) {
1592                    for(var key in Emitter.prototype)obj[key] = Emitter.prototype[key];
1593                    return obj;
1594                }
1595                Emitter.prototype.on = Emitter.prototype.addEventListener = function(event, fn) {
1596                    this._callbacks = this._callbacks || {};
1597                    (this._callbacks['$' + event] = this._callbacks['$' + event] || []).push(fn);
1598                    return this;
1599                };
1600                Emitter.prototype.once = function(event, fn) {
1601                    function on() {
1602                        this.off(event, on);
1603                        fn.apply(this, arguments);
1604                    }
1605                    on.fn = fn;
1606                    this.on(event, on);
1607                    return this;
1608                };
1609                Emitter.prototype.off = Emitter.prototype.removeListener = Emitter.prototype.removeAllListeners = Emitter.prototype.removeEventListener = function(event, fn) {
1610                    this._callbacks = this._callbacks || {};
1611                    if (0 == arguments.length) {
1612                        this._callbacks = {};
1613                        return this;
1614                    }
1615                    var callbacks = this._callbacks['$' + event];
1616                    if (!callbacks) return this;
1617                    if (1 == arguments.length) {
1618                        delete this._callbacks['$' + event];
1619                        return this;
1620                    }
1621                    var cb;
1622                    for(var i = 0; i < callbacks.length; i++){
1623                        cb = callbacks[i];
1624                        if (cb === fn || cb.fn === fn) {
1625                            callbacks.splice(i, 1);
1626                            break;
1627                        }
1628                    }
1629                    if (0 === callbacks.length) delete this._callbacks['$' + event];
1630                    return this;
1631                };
1632                Emitter.prototype.emit = function(event) {
1633                    this._callbacks = this._callbacks || {};
1634                    var args = new Array(arguments.length - 1), callbacks = this._callbacks['$' + event];
1635                    for(var i = 1; i < arguments.length; i++)args[i - 1] = arguments[i];
1636                    if (callbacks) {
1637                        callbacks = callbacks.slice(0);
1638                        for(var i = 0, len = callbacks.length; i < len; ++i)callbacks[i].apply(this, args);
1639                    }
1640                    return this;
1641                };
1642                Emitter.prototype.listeners = function(event) {
1643                    this._callbacks = this._callbacks || {};
1644                    return this._callbacks['$' + event] || [];
1645                };
1646                Emitter.prototype.hasListeners = function(event) {
1647                    return !!this.listeners(event).length;
1648                };
1649            },
1650            808 (module1) {
1651                var DOCUMENT_POSITION_CONTAINED_BY = 16;
1652                module1.exports = contains;
1653                function contains(container, elem) {
1654                    if (container.contains) return container.contains(elem);
1655                    var comparison = container.compareDocumentPosition(elem);
1656                    return 0 === comparison || comparison & DOCUMENT_POSITION_CONTAINED_BY;
1657                }
1658            },
1659            5622 (__unused_rspack_module, exports1, __webpack_require__) {
1660                function isArray(arg) {
1661                    if (Array.isArray) return Array.isArray(arg);
1662                    return '[object Array]' === objectToString(arg);
1663                }
1664                exports1.isArray = isArray;
1665                function isBoolean(arg) {
1666                    return 'boolean' == typeof arg;
1667                }
1668                exports1.isBoolean = isBoolean;
1669                function isNull(arg) {
1670                    return null === arg;
1671                }
1672                exports1.isNull = isNull;
1673                function isNullOrUndefined(arg) {
1674                    return null == arg;
1675                }
1676                exports1.isNullOrUndefined = isNullOrUndefined;
1677                function isNumber(arg) {
1678                    return 'number' == typeof arg;
1679                }
1680                exports1.isNumber = isNumber;
1681                function isString(arg) {
1682                    return 'string' == typeof arg;
1683                }
1684                exports1.isString = isString;
1685                function isSymbol(arg) {
1686                    return 'symbol' == typeof arg;
1687                }
1688                exports1.isSymbol = isSymbol;
1689                function isUndefined(arg) {
1690                    return void 0 === arg;
1691                }
1692                exports1.isUndefined = isUndefined;
1693                function isRegExp(re) {
1694                    return '[object RegExp]' === objectToString(re);
1695                }
1696                exports1.isRegExp = isRegExp;
1697                function isObject(arg) {
1698                    return 'object' == typeof arg && null !== arg;
1699                }
1700                exports1.isObject = isObject;
1701                function isDate(d) {
1702                    return '[object Date]' === objectToString(d);
1703                }
1704                exports1.isDate = isDate;
1705                function isError(e) {
1706                    return '[object Error]' === objectToString(e) || e instanceof Error;
1707                }
1708                exports1.isError = isError;
1709                function isFunction(arg) {
1710                    return 'function' == typeof arg;
1711                }
1712                exports1.isFunction = isFunction;
1713                function isPrimitive(arg) {
1714                    return null === arg || 'boolean' == typeof arg || 'number' == typeof arg || 'string' == typeof arg || 'symbol' == typeof arg || void 0 === arg;
1715                }
1716                exports1.isPrimitive = isPrimitive;
1717                exports1.isBuffer = __webpack_require__(8287).Buffer.isBuffer;
1718                function objectToString(o) {
1719                    return Object.prototype.toString.call(o);
1720                }
1721            },
1722            4744 (module1) {
1723                "use strict";
1724                var isMergeableObject = function(value) {
1725                    return isNonNullObject(value) && !isSpecial(value);
1726                };
1727                function isNonNullObject(value) {
1728                    return !!value && 'object' == typeof value;
1729                }
1730                function isSpecial(value) {
1731                    var stringValue = Object.prototype.toString.call(value);
1732                    return '[object RegExp]' === stringValue || '[object Date]' === stringValue || isReactElement(value);
1733                }
1734                var canUseSymbol = 'function' == typeof Symbol && Symbol.for;
1735                var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
1736                function isReactElement(value) {
1737                    return value.$$typeof === REACT_ELEMENT_TYPE;
1738                }
1739                function emptyTarget(val) {
1740                    return Array.isArray(val) ? [] : {};
1741                }
1742                function cloneUnlessOtherwiseSpecified(value, options) {
1743                    return false !== options.clone && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
1744                }
1745                function defaultArrayMerge(target, source, options) {
1746                    return target.concat(source).map(function(element) {
1747                        return cloneUnlessOtherwiseSpecified(element, options);
1748                    });
1749                }
1750                function getMergeFunction(key, options) {
1751                    if (!options.customMerge) return deepmerge;
1752                    var customMerge = options.customMerge(key);
1753                    return 'function' == typeof customMerge ? customMerge : deepmerge;
1754                }
1755                function getEnumerableOwnPropertySymbols(target) {
1756                    return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
1757                        return Object.propertyIsEnumerable.call(target, symbol);
1758                    }) : [];
1759                }
1760                function getKeys(target) {
1761                    return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
1762                }
1763                function propertyIsOnObject(object, property) {
1764                    try {
1765                        return property in object;
1766                    } catch (_) {
1767                        return false;
1768                    }
1769                }
1770                function propertyIsUnsafe(target, key) {
1771                    return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
1772                }
1773                function mergeObject(target, source, options) {
1774                    var destination = {};
1775                    if (options.isMergeableObject(target)) getKeys(target).forEach(function(key) {
1776                        destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
1777                    });
1778                    getKeys(source).forEach(function(key) {
1779                        if (propertyIsUnsafe(target, key)) return;
1780                        if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
1781                        else destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
1782                    });
1783                    return destination;
1784                }
1785                function deepmerge(target, source, options) {
1786                    options = options || {};
1787                    options.arrayMerge = options.arrayMerge || defaultArrayMerge;
1788                    options.isMergeableObject = options.isMergeableObject || isMergeableObject;
1789                    options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
1790                    var sourceIsArray = Array.isArray(source);
1791                    var targetIsArray = Array.isArray(target);
1792                    var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
1793                    if (!sourceAndTargetTypesMatch) return cloneUnlessOtherwiseSpecified(source, options);
1794                    if (sourceIsArray) return options.arrayMerge(target, source, options);
1795                    return mergeObject(target, source, options);
1796                }
1797                deepmerge.all = function(array, options) {
1798                    if (!Array.isArray(array)) throw new Error('first argument should be an array');
1799                    return array.reduce(function(prev, next) {
1800                        return deepmerge(prev, next, options);
1801                    }, {});
1802                };
1803                var deepmerge_1 = deepmerge;
1804                module1.exports = deepmerge_1;
1805            },
1806            41 (module1, __unused_rspack_exports, __webpack_require__) {
1807                "use strict";
1808                var $defineProperty = __webpack_require__(655);
1809                var $SyntaxError = __webpack_require__(8068);
1810                var $TypeError = __webpack_require__(9675);
1811                var gopd = __webpack_require__(5795);
1812                module1.exports = function(obj, property, value) {
1813                    if (!obj || 'object' != typeof obj && 'function' != typeof obj) throw new $TypeError('`obj` must be an object or a function`');
1814                    if ('string' != typeof property && 'symbol' 
1814!= typeof property) throw new $TypeError('`property` must be a string or a symbol`');
1815                    if (arguments.length > 3 && 'boolean' != typeof arguments[3] && null !== arguments[3]) throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');
1816                    if (arguments.length > 4 && 'boolean' != typeof arguments[4] && null !== arguments[4]) throw new $TypeError('`nonWritable`, if provided, must be a boolean or null');
1817                    if (arguments.length > 5 && 'boolean' != typeof arguments[5] && null !== arguments[5]) throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');
1818                    if (arguments.length > 6 && 'boolean' != typeof arguments[6]) throw new $TypeError('`loose`, if provided, must be a boolean');
1819                    var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
1820                    var nonWritable = arguments.length > 4 ? arguments[4] : null;
1821                    var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
1822                    var loose = arguments.length > 6 ? arguments[6] : false;
1823                    var desc = !!gopd && gopd(obj, property);
1824                    if ($defineProperty) $defineProperty(obj, property, {
1825                        configurable: null === nonConfigurable && desc ? desc.configurable : !nonConfigurable,
1826                        enumerable: null === nonEnumerable && desc ? desc.enumerable : !nonEnumerable,
1827                        value: value,
1828                        writable: null === nonWritable && desc ? desc.writable : !nonWritable
1829                    });
1830                    else if (!loose && (nonEnumerable || nonWritable || nonConfigurable)) throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
1831                    else obj[property] = value;
1832                };
1833            },
1834            8766 (module1) {
1835                "use strict";
1836                module1.exports = function() {
1837                    for(var i = 0; i < arguments.length; i++)if (void 0 !== arguments[i]) return arguments[i];
1838                };
1839            },
1840            2379 (module1, __unused_rspack_exports, __webpack_require__) {
1841                "use strict";
1842                var document1 = __webpack_require__(9697);
1843                var Event = __webpack_require__(6591);
1844                var Keys = __webpack_require__(2795);
1845                module1.exports = Visibility;
1846                function Visibility() {
1847                    var keys = Keys(document1);
1848                    if (!keys) return noopShim();
1849                    return {
1850                        visible: visible,
1851                        onChange: Event(listen)
1852                    };
1853                    function visible() {
1854                        return !document1[keys.hidden];
1855                    }
1856                    function listen(broadcast) {
1857                        document1.addEventListener(keys.event, function() {
1858                            broadcast(visible());
1859                        });
1860                    }
1861                }
1862                function noopShim() {
1863                    return {
1864                        visible: function() {
1865                            return true;
1866                        },
1867                        onChange: noop
1868                    };
1869                }
1870                function noop() {}
1871            },
1872            2795 (module1) {
1873                "use strict";
1874                module1.exports = keys;
1875                function keys(document1) {
1876                    var prefix = detectPrefix(document1);
1877                    if (null == prefix) return;
1878                    return {
1879                        hidden: lowercaseFirst(prefix + 'Hidden'),
1880                        event: prefix + 'visibilitychange'
1881                    };
1882                }
1883                function detectPrefix(document1) {
1884                    if (null != document1.hidden) return '';
1885                    if (null != document1.mozHidden) return 'moz';
1886                    if (null != document1.msHidden) return 'ms';
1887                    if (null != document1.webkitHidden) return 'webkit';
1888                }
1889                function lowercaseFirst(string) {
1890                    return string.substring(0, 1).toLowerCase() + string.substring(1);
1891                }
1892            },
1893            7176 (module1, __unused_rspack_exports, __webpack_require__) {
1894                "use strict";
1895                var callBind = __webpack_require__(3126);
1896                var gOPD = __webpack_require__(5795);
1897                var hasProtoAccessor;
1898                try {
1899                    hasProtoAccessor = [].__proto__ === Array.prototype;
1900                } catch (e) {
1901                    if (!e || 'object' != typeof e || !('code' in e) || 'ERR_PROTO_ACCESS' !== e.code) throw e;
1902                }
1903                var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, '__proto__');
1904                var $Object = Object;
1905                var $getPrototypeOf = $Object.getPrototypeOf;
1906                module1.exports = desc && 'function' == typeof desc.get ? callBind([
1907                    desc.get
1908                ]) : 'function' == typeof $getPrototypeOf ? function(value) {
1909                    return $getPrototypeOf(null == value ? value : $Object(value));
1910                } : false;
1911            },
1912            2623 (module1, __unused_rspack_exports, __webpack_require__) {
1913                var Buffer = __webpack_require__(8287).Buffer;
1914                var process = __webpack_require__(5606);
1915                var stream = __webpack_require__(2713);
1916                var eos = __webpack_require__(6611);
1917                var inherits = __webpack_require__(6698);
1918                var shift = __webpack_require__(5332);
1919                var SIGNAL_FLUSH = Buffer.from && Buffer.from !== Uint8Array.from ? Buffer.from([
1920                    0
1921                ]) : new Buffer([
1922                    0
1923                ]);
1924                var onuncork = function(self1, fn) {
1925                    if (self1._corked) self1.once('uncork', fn);
1926                    else fn();
1927                };
1928                var autoDestroy = function(self1, err) {
1929                    if (self1._autoDestroy) self1.destroy(err);
1930                };
1931                var destroyer = function(self1, end) {
1932                    return function(err) {
1933                        if (err) autoDestroy(self1, 'premature close' === err.message ? null : err);
1934                        else if (end && !self1._ended) self1.end();
1935                    };
1936                };
1937                var end = function(ws, fn) {
1938                    if (!ws) return fn();
1939                    if (ws._writableState && ws._writableState.finished) return fn();
1940                    if (ws._writableState) return ws.end(fn);
1941                    ws.end();
1942                    fn();
1943                };
1944                var toStreams2 = function(rs) {
1945                    return new stream.Readable({
1946                        objectMode: true,
1947                        highWaterMark: 16
1948                    }).wrap(rs);
1949                };
1950                var Duplexify = function(writable, readable, opts) {
1951                    if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts);
1952                    stream.Duplex.call(this, opts);
1953                    this._writable = null;
1954                    this._readable = null;
1955                    this._readable2 = null;
1956                    this._autoDestroy = !opts || false !== opts.autoDestroy;
1957                    this._forwardDestroy = !opts || false !== opts.destroy;
1958                    this._forwardEnd = !opts || false !== opts.end;
1959                    this._corked = 1;
1960                    this._ondrain = null;
1961                    this._drained = false;
1962                    this._forwarding = false;
1963                    this._unwrite = null;
1964                    this._unread = null;
1965                    this._ended = false;
1966                    this.destroyed = false;
1967                    if (writable) this.setWritable(writable);
1968                    if (readable) this.setReadable(readable);
1969                };
1970                inherits(Duplexify, stream.Duplex);
1971                Duplexify.obj = function(writable, readable, opts) {
1972                    if (!opts) opts = {};
1973                    opts.objectMode = true;
1974                    opts.highWaterMark = 16;
1975                    return new Duplexify(writable, readable, opts);
1976                };
1977                Duplexify.prototype.cork = function() {
1978                    if (1 === ++this._corked) this.emit('cork');
1979                };
1980                Duplexify.prototype.uncork = function() {
1981                    if (this._corked && 0 === --this._corked) this.emit('uncork');
1982                };
1983                Duplexify.prototype.setWritable = function(writable) {
1984                    if (this._unwrite) this._unwrite();
1985                    if (this.destroyed) {
1986                        if (writable && writable.destroy) writable.destroy();
1987                        return;
1988                    }
1989                    if (null === writable || false === writable) return void this.end();
1990                    var self1 = this;
1991                    var unend = eos(writable, {
1992                        writable: true,
1993                        readable: false
1994                    }, destroyer(this, this._forwardEnd));
1995                    var ondrain = function() {
1996                        var ondrain = self1._ondrain;
1997                        self1._ondrain = null;
1998                        if (ondrain) ondrain();
1999                    };
2000                    var clear = function() {
2001                        self1._writable.removeListener('drain', ondrain);
2002                        unend();
2003                    };
2004                    if (this._unwrite) process.nextTick(ondrain);
2005                    this._writable = writable;
2006                    this._writable.on('drain', ondrain);
2007                    this._unwrite = clear;
2008                    this.uncork();
2009                };
2010                Duplexify.prototype.setReadable = function(readable) {
2011                    if (this._unread) this._unread();
2012                    if (this.destroyed) {
2013                        if (readable && readable.destroy) readable.destroy();
2014                        return;
2015                    }
2016                    if (null === readable || false === readable) {
2017                        this.push(null);
2018                        this.resume();
2019                        return;
2020                    }
2021                    var self1 = this;
2022                    var unend = eos(readable, {
2023                        writable: false,
2024                        readable: true
2025                    }, destroyer(this));
2026                    var onreadable = function() {
2027                        self1._forward();
2028                    };
2029                    var onend = function() {
2030                        self1.push(null);
2031                    };
2032                    var clear = function() {
2033                        self1._readable2.removeListener('readable', onreadable);
2034                        self1._readable2.removeListener('end', onend);
2035                        unend();
2036                    };
2037                    this._drained = true;
2038                    this._readable = readable;
2039                    this._readable2 = readable._readableState ? readable : toStreams2(readable);
2040                    this._readable2.on('readable', onreadable);
2041                    this._readable2.on('end', onend);
2042                    this._unread = clear;
2043                    this._forward();
2044                };
2045                Duplexify.prototype._read = function() {
2046                    this._drained = true;
2047                    this._forward();
2048                };
2049                Duplexify.prototype._forward = function() {
2050                    if (this._forwarding || !this._readable2 || !this._drained) return;
2051                    this._forwarding = true;
2052                    var data;
2053                    while(this._drained && null !== (data = shift(this._readable2))){
2054                        if (this.destroyed) continue;
2055                        this._drained = this.push(data);
2056                    }
2057                    this._forwarding = false;
2058                };
2059                Duplexify.prototype.destroy = function(err) {
2060                    if (this.destroyed) return;
2061                    this.destroyed = true;
2062                    var self1 = this;
2063                    process.nextTick(function() {
2064                        self1._destroy(err);
2065                    });
2066                };
2067                Duplexify.prototype._destroy = function(err) {
2068                    if (err) {
2069                        var ondrain = this._ondrain;
2070                        this._ondrain = null;
2071                        if (ondrain) ondrain(err);
2072                        else this.emit('error', err);
2073                    }
2074                    if (this._forwardDestroy) {
2075                        if (this._readable && this._readable.destroy) this._readable.destroy();
2076                        if (this._writable && this._writable.destroy) this._writable.destroy();
2077                    }
2078                    this.emit('close');
2079                };
2080                Duplexify.prototype._write = function(data, enc, cb) {
2081                    if (this.destroyed) return cb();
2082                    if (this._corked) return onuncork(this, this._write.bind(this, data, enc, cb));
2083                    if (data === SIGNAL_FLUSH) return this._finish(cb);
2084                    if (!this._writable) return cb();
2085                    if (false === this._writable.write(data)) this._ondrain = cb;
2086                    else cb();
2087                };
2088                Duplexify.prototype._finish = function(cb) {
2089                    var self1 = this;
2090                    this.emit('preend');
2091                    onuncork(this, function() {
2092                        end(self1._forwardEnd && self1._writable, function() {
2093                            if (false === self1._writableState.prefinished) self1._writableState.prefinished = true;
2094                            self1.emit('prefinish');
2095                            onuncork(self1, cb);
2096                        });
2097                    });
2098                };
2099                Duplexify.prototype.end = function(data, enc, cb) {
2100                    if ('function' == typeof data) return this.end(null, null, data);
2101                    if ('function' == typeof enc) return this.end(data, null, enc);
2102                    this._ended = true;
2103                    if (data) this.write(data);
2104                    if (!this._writableState.ending) this.write(SIGNAL_FLUSH);
2105                    return stream.Writable.prototype.end.call(this, cb);
2106                };
2107                module1.exports = Duplexify;
2108            },
2109            1288 (module1) {
2110                var toString = {}.toString;
2111                module1.exports = Array.isArray || function(arr) {
2112                    return '[object Array]' == toString.call(arr);
2113                };
2114            },
2115            7920 (module1, __unused_rspack_exports, __webpack_require__) {
2116                "use strict";
2117                var pna = __webpack_require__(3225);
2118                var objectKeys = Object.keys || function(obj) {
2119                    var keys = [];
2120                    for(var key in obj)keys.push(key);
2121                    return keys;
2122                };
2123                module1.exports = Duplex;
2124                var util = Object.create(__webpack_require__(5622));
2125                util.inherits = __webpack_require__(6698);
2126                var Readable = __webpack_require__(9158);
2127                var Writable = __webpack_require__(8522);
2128                util.inherits(Duplex, Readable);
2129                var keys = objectKeys(Writable.prototype);
2130                for(var v = 0; v < keys.length; v++){
2131                    var method = keys[v];
2132                    if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
2133                }
2134                function Duplex(options) {
2135                    if (!(this instanceof Duplex)) return new Duplex(options);
2136                    Readable.call(this, options);
2137                    Writable.call(this, options);
2138                    if (options && false === options.readable) this.readable = false;
2139                    if (options && false === options.writable) this.writable = false;
2140                    this.allowHalfOpen = true;
2141                    if (options && false === options.allowHalfOpen) this.allowHalfOpen = false;
2142                    this.once('end', onend);
2143                }
2144                Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
2145                    enumerable: false,
2146                    get: function() {
2147                        return this._writableState.highWaterMark;
2148                    }
2149                });
2150                function onend() {
2151                    if (this.allowHalfOpen || this._writableState.ended) return;
2152                    pna.nextTick(onEndNT, this);
2153                }
2154                function onEndNT(self1) {
2155                    self1.end();
2156                }
2157                Object.defineProperty(Duplex.prototype, 'destroyed', {
2158                    get: function() {
2159                        if (void 0 === this._readableState || void 0 === this._writableState) return false;
2160                        return this._readableState.destroyed && this._writableState.destroyed;
2161                    },
2162                    set: function(value) {
2163                        if (void 0 === this._readableState || void 0 === this._writableState) return;
2164                        this._readableState.destroyed = value;
2165                        this._writableState.destroyed = value;
2166                    }
2167                });
2168                Duplex.prototype._destroy = function(err, cb) {
2169                    this.push(null);
2170                    this.end();
2171                    pna.nextTick(cb, err);
2172                };
2173            },
2174            8290 (module1, __unused_rspack_exports, __webpack_require__) {
2175                "use strict";
2176                module1.exports = PassThrough;
2177                var Transform = __webpack_require__(6608);
2178                var util = Object.create(__webpack_require__(5622));
2179                util.inherits = __webpack_require__(6698);
2180                util.inherits(PassThrough, Transform);
2181                function PassThrough(options) {
2182                    if (!(this instanceof PassThrough)) return new PassThrough(options);
2183                    Transform.call(this, options);
2184                }
2185                PassThrough.prototype._transform = function(chunk, encoding, cb) {
2186                    cb(null, chunk);
2187                };
2188            },
2189            9158 (module1, __unused_rspack_exports, __webpack_require__) {
2190                "use strict";
2191                var process = __webpack_require__(5606);
2192                var pna = __webpack_require__(3225);
2193                module1.exports = Readable;
2194                var isArray = __webpack_require__(1288);
2195                var Duplex;
2196                Readable.ReadableState = ReadableState;
2197                __webpack_require__(7007).EventEmitter;
2198                var EElistenerCount = function(emitter, type) {
2199                    return emitter.listeners(type).length;
2200                };
2201                var Stream = __webpack_require__(9239);
2202                var Buffer = __webpack_require__(2103).Buffer;
2203                var OurUint8Array = (void 0 !== __webpack_require__.g ? __webpack_require__.g : "u" > typeof window ? window : "u" > typeof self ? self : {}).Uint8Array || function() {};
2204                function _uint8ArrayToBuffer(chunk) {
2205                    return Buffer.from(chunk);
2206                }
2207                function _isUint8Array(obj) {
2208                    return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
2209                }
2210                var util = Object.create(__webpack_require__(5622));
2211                util.inherits = __webpack_require__(6698);
2212                var debugUtil = __webpack_require__(4219);
2213                var debug = void 0;
2214                debug = debugUtil && debugUtil.debuglog ? debugUtil.debuglog('stream') : function() {};
2215                var BufferList = __webpack_require__(6584);
2216                var destroyImpl = __webpack_require__(2110);
2217                var StringDecoder;
2218                util.inherits(Readable, Stream);
2219                var kProxyEvents = [
2220                    'error',
2221                    'close',
2222                    'destroy',
2223                    'pause',
2224                    'resume'
2225                ];
2226                function prependListener(emitter, event, fn) {
2227                    if ('function' == typeof emitter.prependListener) return emitter.prependListener(event, fn);
2228                    if (emitter._events && emitter._events[event]) if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);
2229                    else emitter._events[event] = [
2230                        fn,
2231                        emitter._events[event]
2232                    ];
2233                    else emitter.on(event, fn);
2234                }
2235                function ReadableState(options, stream) {
2236                    Duplex = Duplex || __webpack_require__(7920);
2237                    options = options || {};
2238                    var isDuplex = stream instanceof Duplex;
2239                    this.objectMode = !!options.objectMode;
2240                    if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
2241                    var hwm = options.highWaterMark;
2242                    var readableHwm = options.readableHighWaterMark;
2243                    var defaultHwm = this.objectMode ? 16 : 16384;
2244                    if (hwm || 0 === hwm) this.highWaterMark = hwm;
2245                    else if (isDuplex && (readableHwm || 0 === readableHwm)) this.highWaterMark = readableHwm;
2246                    else this.highWaterMark = defaultHwm;
2247                    this.highWaterMark = Math.floor(this.highWaterMark);
2248                    this.buffer = new BufferList();
2249                    this.length = 0;
2250                    this.pipes = null;
2251                    this.pipesCount = 0;
2252                    this.flowing = null;
2253                    this.ended = false;
vendor: 9,024 bytes, lines 2254-2423
2254                    this.endEmitted = false;
2255                    this.reading = false;
2256                    this.sync = true;
2257                    this.needReadable = false;
2258                    this.emittedReadable = false;
2259                    this.readableListening = false;
2260                    this.resumeScheduled = false;
2261                    this.destroyed = false;
2262                    this.defaultEncoding = options.defaultEncoding || 'utf8';
2263                    this.awaitDrain = 0;
2264                    this.readingMore = false;
2265                    this.decoder = null;
2266                    this.encoding = null;
2267                    if (options.encoding) {
2268                        if (!StringDecoder) StringDecoder = __webpack_require__(9251).I;
2269                        this.decoder = new StringDecoder(options.encoding);
2270                        this.encoding = options.encoding;
2271                    }
2272                }
2273                function Readable(options) {
2274                    Duplex = Duplex || __webpack_require__(7920);
2275                    if (!(this instanceof Readable)) return new Readable(options);
2276                    this._readableState = new ReadableState(options, this);
2277                    this.readable = true;
2278                    if (options) {
2279                        if ('function' == typeof options.read) this._read = options.read;
2280                        if ('function' == typeof options.destroy) this._destroy = options.destroy;
2281                    }
2282                    Stream.call(this);
2283                }
2284                Object.defineProperty(Readable.prototype, 'destroyed', {
2285                    get: function() {
2286                        if (void 0 === this._readableState) return false;
2287                        return this._readableState.destroyed;
2288                    },
2289                    set: function(value) {
2290                        if (!this._readableState) return;
2291                        this._readableState.destroyed = value;
2292                    }
2293                });
2294                Readable.prototype.destroy = destroyImpl.destroy;
2295                Readable.prototype._undestroy = destroyImpl.undestroy;
2296                Readable.prototype._destroy = function(err, cb) {
2297                    this.push(null);
2298                    cb(err);
2299                };
2300                Readable.prototype.push = function(chunk, encoding) {
2301                    var state = this._readableState;
2302                    var skipChunkCheck;
2303                    if (state.objectMode) skipChunkCheck = true;
2304                    else if ('string' == typeof chunk) {
2305                        encoding = encoding || state.defaultEncoding;
2306                        if (encoding !== state.encoding) {
2307                            chunk = Buffer.from(chunk, encoding);
2308                            encoding = '';
2309                        }
2310                        skipChunkCheck = true;
2311                    }
2312                    return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
2313                };
2314                Readable.prototype.unshift = function(chunk) {
2315                    return readableAddChunk(this, chunk, null, true, false);
2316                };
2317                function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
2318                    var state = stream._readableState;
2319                    if (null === chunk) {
2320                        state.reading = false;
2321                        onEofChunk(stream, state);
2322                    } else {
2323                        var er;
2324                        if (!skipChunkCheck) er = chunkInvalid(state, chunk);
2325                        if (er) stream.emit('error', er);
2326                        else if (state.objectMode || chunk && chunk.length > 0) {
2327                            if ('string' != typeof chunk && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) chunk = _uint8ArrayToBuffer(chunk);
2328                            if (addToFront) if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));
2329                            else addChunk(stream, state, chunk, true);
2330                            else if (state.ended) stream.emit('error', new Error('stream.push() after EOF'));
2331                            else {
2332                                state.reading = false;
2333                                if (state.decoder && !encoding) {
2334                                    chunk = state.decoder.write(chunk);
2335                                    if (state.objectMode || 0 !== chunk.length) addChunk(stream, state, chunk, false);
2336                                    else maybeReadMore(stream, state);
2337                                } else addChunk(stream, state, chunk, false);
2338                            }
2339                        } else if (!addToFront) state.reading = false;
2340                    }
2341                    return needMoreData(state);
2342                }
2343                function addChunk(stream, state, chunk, addToFront) {
2344                    if (state.flowing && 0 === state.length && !state.sync) {
2345                        stream.emit('data', chunk);
2346                        stream.read(0);
2347                    } else {
2348                        state.length += state.objectMode ? 1 : chunk.length;
2349                        if (addToFront) state.buffer.unshift(chunk);
2350                        else state.buffer.push(chunk);
2351                        if (state.needReadable) emitReadable(stream);
2352                    }
2353                    maybeReadMore(stream, state);
2354                }
2355                function chunkInvalid(state, chunk) {
2356                    var er;
2357                    if (!_isUint8Array(chunk) && 'string' != typeof chunk && void 0 !== chunk && !state.objectMode) er = new TypeError('Invalid non-string/buffer chunk');
2358                    return er;
2359                }
2360                function needMoreData(state) {
2361                    return !state.ended && (state.needReadable || state.length < state.highWaterMark || 0 === state.length);
2362                }
2363                Readable.prototype.isPaused = function() {
2364                    return false === this._readableState.flowing;
2365                };
2366                Readable.prototype.setEncoding = function(enc) {
2367                    if (!StringDecoder) StringDecoder = __webpack_require__(9251).I;
2368                    this._readableState.decoder = new StringDecoder(enc);
2369                    this._readableState.encoding = enc;
2370                    return this;
2371                };
2372                var MAX_HWM = 0x800000;
2373                function computeNewHighWaterMark(n) {
2374                    if (n >= MAX_HWM) n = MAX_HWM;
2375                    else {
2376                        n--;
2377                        n |= n >>> 1;
2378                        n |= n >>> 2;
2379                        n |= n >>> 4;
2380                        n |= n >>> 8;
2381                        n |= n >>> 16;
2382                        n++;
2383                    }
2384                    return n;
2385                }
2386                function howMuchToRead(n, state) {
2387                    if (n <= 0 || 0 === state.length && state.ended) return 0;
2388                    if (state.objectMode) return 1;
2389                    if (n !== n) if (state.flowing && state.length) return state.buffer.head.data.length;
2390                    else return state.length;
2391                    if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
2392                    if (n <= state.length) return n;
2393                    if (!state.ended) {
2394                        state.needReadable = true;
2395                        return 0;
2396                    }
2397                    return state.length;
2398                }
2399                Readable.prototype.read = function(n) {
2400                    debug('read', n);
2401                    n = parseInt(n, 10);
2402                    var state = this._readableState;
2403                    var nOrig = n;
2404                    if (0 !== n) state.emittedReadable = false;
2405                    if (0 === n && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
2406                        debug('read: emitReadable', state.length, state.ended);
2407                        if (0 === state.length && state.ended) endReadable(this);
2408                        else emitReadable(this);
2409                        return null;
2410                    }
2411                    n = howMuchToRead(n, state);
2412                    if (0 === n && state.ended) {
2413                        if (0 === state.length) endReadable(this);
2414                        return null;
2415                    }
2416                    var doRead = state.needReadable;
2417                    debug('need readable', doRead);
2418                    if (0 === state.length || state.length - n < state.highWaterMark) {
2419                        doRead = true;
2420                        debug('length less than watermark', doRead);
2421                    }
2422                    if (state.ended || state.reading) {
2423                        doRead = false;
vendor: 5,060 bytes, lines 2424-2532
2424                        debug('reading or ended', doRead);
2425                    } else if (doRead) {
2426                        debug('do read');
2427                        state.reading = true;
2428                        state.sync = true;
2429                        if (0 === state.length) state.needReadable = true;
2430                        this._read(state.highWaterMark);
2431                        state.sync = false;
2432                        if (!state.reading) n = howMuchToRead(nOrig, state);
2433                    }
2434                    var ret;
2435                    ret = n > 0 ? fromList(n, state) : null;
2436                    if (null === ret) {
2437                        state.needReadable = true;
2438                        n = 0;
2439                    } else state.length -= n;
2440                    if (0 === state.length) {
2441                        if (!state.ended) state.needReadable = true;
2442                        if (nOrig !== n && state.ended) endReadable(this);
2443                    }
2444                    if (null !== ret) this.emit('data', ret);
2445                    return ret;
2446                };
2447                function onEofChunk(stream, state) {
2448                    if (state.ended) return;
2449                    if (state.decoder) {
2450                        var chunk = state.decoder.end();
2451                        if (chunk && chunk.length) {
2452                            state.buffer.push(chunk);
2453                            state.length += state.objectMode ? 1 : chunk.length;
2454                        }
2455                    }
2456                    state.ended = true;
2457                    emitReadable(stream);
2458                }
2459                function emitReadable(stream) {
2460                    var state = stream._readableState;
2461                    state.needReadable = false;
2462                    if (!state.emittedReadable) {
2463                        debug('emitReadable', state.flowing);
2464                        state.emittedReadable = true;
2465                        if (state.sync) pna.nextTick(emitReadable_, stream);
2466                        else emitReadable_(stream);
2467                    }
2468                }
2469                function emitReadable_(stream) {
2470                    debug('emit readable');
2471                    stream.emit('readable');
2472                    flow(stream);
2473                }
2474                function maybeReadMore(stream, state) {
2475                    if (!state.readingMore) {
2476                        state.readingMore = true;
2477                        pna.nextTick(maybeReadMore_, stream, state);
2478                    }
2479                }
2480                function maybeReadMore_(stream, state) {
2481                    var len = state.length;
2482                    while(!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark){
2483                        debug('maybeReadMore read 0');
2484                        stream.read(0);
2485                        if (len === state.length) break;
2486                        len = state.length;
2487                    }
2488                    state.readingMore = false;
2489                }
2490                Readable.prototype._read = function(n) {
2491                    this.emit('error', new Error('_read() is not implemented'));
2492                };
2493                Readable.prototype.pipe = function(dest, pipeOpts) {
2494                    var src = this;
2495                    var state = this._readableState;
2496                    switch(state.pipesCount){
2497                        case 0:
2498                            state.pipes = dest;
2499                            break;
2500                        case 1:
2501                            state.pipes = [
2502                                state.pipes,
2503                                dest
2504                            ];
2505                            break;
2506                        default:
2507                            state.pipes.push(dest);
2508                            break;
2509                    }
2510                    state.pipesCount += 1;
2511                    debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
2512                    var doEnd = (!pipeOpts || false !== pipeOpts.end) && dest !== process.stdout && dest !== process.stderr;
2513                    var endFn = doEnd ? onend : unpipe;
2514                    if (state.endEmitted) pna.nextTick(endFn);
2515                    else src.once('end', endFn);
2516                    dest.on('unpipe', onunpipe);
2517                    function onunpipe(readable, unpipeInfo) {
2518                        debug('onunpipe');
2519                        if (readable === src) {
2520                            if (unpipeInfo && false === unpipeInfo.hasUnpiped) {
2521                                unpipeInfo.hasUnpiped = true;
2522                                cleanup();
2523                            }
2524                        }
2525                    }
2526                    function onend() {
2527                        debug('onend');
2528                        dest.end();
2529                    }
2530                    var ondrain = pipeOnDrain(src);
2531                    dest.on('drain', ondrain);
2532                    var cleanedUp = false;
2533                    function cleanup() {
2534                        debug('cleanup');
2535                        dest.removeListener('close', onclose);
2536                        dest.removeListener('finish', onfinish);
2537                        dest.removeListener('drain', ondrain);
2538                        dest.removeListener('error', onerror);
2539                        dest.removeListener('unpipe', onunpipe);
2540                        src.removeListener('end', onend);
2541                        src.removeListener('end', unpipe);
2542                        src.removeListener('data', ondata);
2543                        cleanedUp = true;
2544                        if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
2545                    }
2546                    var increasedAwaitDrain = false;
2547                    src.on('data', ondata);
2548                    function ondata(chunk) {
2549                        debug('ondata');
2550                        increasedAwaitDrain = false;
2551                        var ret = dest.write(chunk);
2552                        if (false === ret && !increasedAwaitDrain) {
2553                            if ((1 === state.pipesCount && state.pipes === dest || state.pipesCount > 1 && -1 !== indexOf(state.pipes, dest)) && !cleanedUp) {
2554                                debug('false write response, pause', state.awaitDrain);
2555                                state.awaitDrain++;
2556                                increasedAwaitDrain = true;
2557                            }
2558                            src.pause();
2559                        }
2560                    }
2561                    function onerror(er) {
2562                        debug('onerror', er);
2563                        unpipe();
2564                        dest.removeListener('error', onerror);
2565                        if (0 === EElistenerCount(dest, 'error')) dest.emit('error', er);
2566                    }
2567                    prependListener(dest, 'error', onerror);
2568                    function onclose() {
2569                        dest.removeListener('finish', onfinish);
2570                        unpipe();
2571                    }
2572                    dest.once('close', onclose);
2573                    function onfinish() {
2574                        debug('onfinish');
2575                        dest.removeListener('close', onclose);
2576                        unpipe();
2577                    }
2578                    dest.once('finish', onfinish);
2579                    function unpipe() {
2580                        debug('unpipe');
2581                        src.unpipe(dest);
2582                    }
2583                    dest.emit('pipe', src);
2584                    if (!state.flowing) {
2585                        debug('pipe resume');
2586                        src.resume();
2587                    }
2588                    return dest;
2589                };
2590                function pipeOnDrain(src) {
2591                    return function() {
2592                        var state = src._readableState;
2593                        debug('pipeOnDrain', state.awaitDrain);
2594                        if (state.awaitDrain) state.awaitDrain--;
2595                        if (0 === state.awaitDrain && EElistenerCount(src, 'data')) {
2596                            state.flowing = true;
2597                            flow(src);
2598                        }
2599                    };
2600                }
2601                Readable.prototype.unpipe = function(dest) {
2602                    var state = this._readableState;
2603                    var unpipeInfo = {
2604                        hasUnpiped: false
2605                    };
2606                    if (0 === state.pipesCount) return this;
2607                    if (1 === state.pipesCount) {
2608                        if (dest && dest !== state.pipes) return this;
2609                        if (!dest) dest = state.pipes;
2610                        state.pipes = null;
2611                        state.pipesCount = 0;
2612                        state.flowing = false;
2613                        if (dest) dest.emit('unpipe', this, unpipeInfo);
2614                        return this;
2615                    }
2616                    if (!dest) {
2617                        var dests = state.pipes;
2618                        var len = state.pipesCount;
2619                        state.pipes = null;
2620                        state.pipesCount = 0;
2621                        state.flowing = false;
vendor: 5,188 bytes, lines 2622-2728
2622                        for(var i = 0; i < len; i++)dests[i].emit('unpipe', this, {
2623                            hasUnpiped: false
2624                        });
2625                        return this;
2626                    }
2627                    var index = indexOf(state.pipes, dest);
2628                    if (-1 === index) return this;
2629                    state.pipes.splice(index, 1);
2630                    state.pipesCount -= 1;
2631                    if (1 === state.pipesCount) state.pipes = state.pipes[0];
2632                    dest.emit('unpipe', this, unpipeInfo);
2633                    return this;
2634                };
2635                Readable.prototype.on = function(ev, fn) {
2636                    var res = Stream.prototype.on.call(this, ev, fn);
2637                    if ('data' === ev) {
2638                        if (false !== this._readableState.flowing) this.resume();
2639                    } else if ('readable' === ev) {
2640                        var state = this._readableState;
2641                        if (!state.endEmitted && !state.readableListening) {
2642                            state.readableListening = state.needReadable = true;
2643                            state.emittedReadable = false;
2644                            if (state.reading) {
2645                                if (state.length) emitReadable(this);
2646                            } else pna.nextTick(nReadingNextTick, this);
2647                        }
2648                    }
2649                    return res;
2650                };
2651                Readable.prototype.addListener = Readable.prototype.on;
2652                function nReadingNextTick(self1) {
2653                    debug('readable nexttick read 0');
2654                    self1.read(0);
2655                }
2656                Readable.prototype.resume = function() {
2657                    var state = this._readableState;
2658                    if (!state.flowing) {
2659                        debug('resume');
2660                        state.flowing = true;
2661                        resume(this, state);
2662                    }
2663                    return this;
2664                };
2665                function resume(stream, state) {
2666                    if (!state.resumeScheduled) {
2667                        state.resumeScheduled = true;
2668                        pna.nextTick(resume_, stream, state);
2669                    }
2670                }
2671                function resume_(stream, state) {
2672                    if (!state.reading) {
2673                        debug('resume read 0');
2674                        stream.read(0);
2675                    }
2676                    state.resumeScheduled = false;
2677                    state.awaitDrain = 0;
2678                    stream.emit('resume');
2679                    flow(stream);
2680                    if (state.flowing && !state.reading) stream.read(0);
2681                }
2682                Readable.prototype.pause = function() {
2683                    debug('call pause flowing=%j', this._readableState.flowing);
2684                    if (false !== this._readableState.flowing) {
2685                        debug('pause');
2686                        this._readableState.flowing = false;
2687                        this.emit('pause');
2688                    }
2689                    return this;
2690                };
2691                function flow(stream) {
2692                    var state = stream._readableState;
2693                    debug('flow', state.flowing);
2694                    while(state.flowing && null !== stream.read());
2695                }
2696                Readable.prototype.wrap = function(stream) {
2697                    var _this = this;
2698                    var state = this._readableState;
2699                    var paused = false;
2700                    stream.on('end', function() {
2701                        debug('wrapped end');
2702                        if (state.decoder && !state.ended) {
2703                            var chunk = state.decoder.end();
2704                            if (chunk && chunk.length) _this.push(chunk);
2705                        }
2706                        _this.push(null);
2707                    });
2708                    stream.on('data', function(chunk) {
2709                        debug('wrapped data');
2710                        if (state.decoder) chunk = state.decoder.write(chunk);
2711                        if (state.objectMode && null == chunk) return;
2712                        if (!state.objectMode && (!chunk || !chunk.length)) return;
2713                        var ret = _this.push(chunk);
2714                        if (!ret) {
2715                            paused = true;
2716                            stream.pause();
2717                        }
2718                    });
2719                    for(var i in stream)if (void 0 === this[i] && 'function' == typeof stream[i]) this[i] = function(method) {
2720                        return function() {
2721                            return stream[method].apply(stream, arguments);
2722                        };
2723                    }(i);
2724                    for(var n = 0; n < kProxyEvents.length; n++)stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
2725                    this._read = function(n) {
2726                        debug('wrapped _read', n);
2727                        if (paused) {
2728                            paused = false;
2729                            stream.resume();
2730                        }
2731                    };
2732                    return this;
2733                };
2734                Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
2735                    enumerable: false,
2736                    get: function() {
2737                        return this._readableState.highWaterMark;
2738                    }
2739                });
2740                Readable._fromList = fromList;
2741                function fromList(n, state) {
2742                    if (0 === state.length) return null;
2743                    var ret;
2744                    if (state.objectMode) ret = state.buffer.shift();
2745                    else if (!n || n >= state.length) {
2746                        ret = state.decoder ? state.buffer.join('') : 1 === state.buffer.length ? state.buffer.head.data : state.buffer.concat(state.length);
2747                        state.buffer.clear();
2748                    } else ret = fromListPartial(n, state.buffer, state.decoder);
2749                    return ret;
2750                }
2751                function fromListPartial(n, list, hasStrings) {
2752                    var ret;
2753                    if (n < list.head.data.length) {
2754                        ret = list.head.data.slice(0, n);
2755                        list.head.data = list.head.data.slice(n);
2756                    } else ret = n === list.head.data.length ? list.shift() : hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
2757                    return ret;
2758                }
2759                function copyFromBufferString(n, list) {
2760                    var p = list.head;
2761                    var c = 1;
2762                    var ret = p.data;
2763                    n -= ret.length;
2764                    while(p = p.next){
2765                        var str = p.data;
2766                        var nb = n > str.length ? str.length : n;
2767                        if (nb === str.length) ret += str;
2768                        else ret += str.slice(0, n);
2769                        n -= nb;
2770                        if (0 === n) {
2771                            if (nb === str.length) {
2772                                ++c;
2773                                if (p.next) list.head = p.next;
2774                                else list.head = list.tail = null;
2775                            } else {
2776                                list.head = p;
2777                                p.data = str.slice(nb);
2778                            }
2779                            break;
2780                        }
2781                        ++c;
2782                    }
2783                    list.length -= c;
2784                    return ret;
2785                }
2786                function copyFromBuffer(n, list) {
2787                    var ret = Buffer.allocUnsafe(n);
2788                    var p = list.head;
2789                    var c = 1;
2790                    p.data.copy(ret);
2791                    n -= p.data.length;
2792                    while(p = p.next){
2793                        var buf = p.data;
2794                        var nb = n > buf.length ? buf.length : n;
2795                        buf.copy(ret, ret.length - n, 0, nb);
2796                        n -= nb;
2797                        if (0 === n) {
2798                            if (nb === buf.length) {
2799                                ++c;
2800                                if (p.next) list.head = p.next;
2801                                else list.head = list.tail = null;
2802                            } else {
2803                                list.head = p;
2804                                p.data = buf.slice(nb);
2805                            }
2806                            break;
2807                        }
2808                        ++c;
2809                    }
2810                    list.length -= c;
2811                    return ret;
2812                }
2813                function endReadable(stream) {
2814                    var state = stream._readableState;
2815                    if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
2816                    if (!state.endEmitted) {
2817                        state.ended = true;
2818                        pna.nextTick(endReadableNT, state, stream);
2819                    }
2820                }
2821                function endReadableNT(state, stream) {
2822                    if (!state.endEmitted && 0 === state.length) {
2823                        state.endEmitted = true;
2824                        stream.readable = false;
vendor: 7,484 bytes, lines 2825-2967
2825                        stream.emit('end');
2826                    }
2827                }
2828                function indexOf(xs, x) {
2829                    for(var i = 0, l = xs.length; i < l; i++)if (xs[i] === x) return i;
2830                    return -1;
2831                }
2832            },
2833            6608 (module1, __unused_rspack_exports, __webpack_require__) {
2834                "use strict";
2835                module1.exports = Transform;
2836                var Duplex = __webpack_require__(7920);
2837                var util = Object.create(__webpack_require__(5622));
2838                util.inherits = __webpack_require__(6698);
2839                util.inherits(Transform, Duplex);
2840                function afterTransform(er, data) {
2841                    var ts = this._transformState;
2842                    ts.transforming = false;
2843                    var cb = ts.writecb;
2844                    if (!cb) return this.emit('error', new Error('write callback called multiple times'));
2845                    ts.writechunk = null;
2846                    ts.writecb = null;
2847                    if (null != data) this.push(data);
2848                    cb(er);
2849                    var rs = this._readableState;
2850                    rs.reading = false;
2851                    if (rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
2852                }
2853                function Transform(options) {
2854                    if (!(this instanceof Transform)) return new Transform(options);
2855                    Duplex.call(this, options);
2856                    this._transformState = {
2857                        afterTransform: afterTransform.bind(this),
2858                        needTransform: false,
2859                        transforming: false,
2860                        writecb: null,
2861                        writechunk: null,
2862                        writeencoding: null
2863                    };
2864                    this._readableState.needReadable = true;
2865                    this._readableState.sync = false;
2866                    if (options) {
2867                        if ('function' == typeof options.transform) this._transform = options.transform;
2868                        if ('function' == typeof options.flush) this._flush = options.flush;
2869                    }
2870                    this.on('prefinish', prefinish);
2871                }
2872                function prefinish() {
2873                    var _this = this;
2874                    if ('function' == typeof this._flush) this._flush(function(er, data) {
2875                        done(_this, er, data);
2876                    });
2877                    else done(this, null, null);
2878                }
2879                Transform.prototype.push = function(chunk, encoding) {
2880                    this._transformState.needTransform = false;
2881                    return Duplex.prototype.push.call(this, chunk, encoding);
2882                };
2883                Transform.prototype._transform = function(chunk, encoding, cb) {
2884                    throw new Error('_transform() is not implemented');
2885                };
2886                Transform.prototype._write = function(chunk, encoding, cb) {
2887                    var ts = this._transformState;
2888                    ts.writecb = cb;
2889                    ts.writechunk = chunk;
2890                    ts.writeencoding = encoding;
2891                    if (!ts.transforming) {
2892                        var rs = this._readableState;
2893                        if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
2894                    }
2895                };
2896                Transform.prototype._read = function(n) {
2897                    var ts = this._transformState;
2898                    if (null !== ts.writechunk && ts.writecb && !ts.transforming) {
2899                        ts.transforming = true;
2900                        this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
2901                    } else ts.needTransform = true;
2902                };
2903                Transform.prototype._destroy = function(err, cb) {
2904                    var _this2 = this;
2905                    Duplex.prototype._destroy.call(this, err, function(err2) {
2906                        cb(err2);
2907                        _this2.emit('close');
2908                    });
2909                };
2910                function done(stream, er, data) {
2911                    if (er) return stream.emit('error', er);
2912                    if (null != data) stream.push(data);
2913                    if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
2914                    if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
2915                    return stream.push(null);
2916                }
2917            },
2918            8522 (module1, __unused_rspack_exports, __webpack_require__) {
2919                "use strict";
2920                var process = __webpack_require__(5606);
2921                var pna = __webpack_require__(3225);
2922                module1.exports = Writable;
2923                function CorkedRequest(state) {
2924                    var _this = this;
2925                    this.next = null;
2926                    this.entry = null;
2927                    this.finish = function() {
2928                        onCorkedFinish(_this, state);
2929                    };
2930                }
2931                var asyncWrite = !process.browser && [
2932                    'v0.10',
2933                    'v0.9.'
2934                ].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
2935                var Duplex;
2936                Writable.WritableState = WritableState;
2937                var util = Object.create(__webpack_require__(5622));
2938                util.inherits = __webpack_require__(6698);
2939                var internalUtil = {
2940                    deprecate: __webpack_require__(4643)
2941                };
2942                var Stream = __webpack_require__(9239);
2943                var Buffer = __webpack_require__(2103).Buffer;
2944                var OurUint8Array = (void 0 !== __webpack_require__.g ? __webpack_require__.g : "u" > typeof window ? window : "u" > typeof self ? self : {}).Uint8Array || function() {};
2945                function _uint8ArrayToBuffer(chunk) {
2946                    return Buffer.from(chunk);
2947                }
2948                function _isUint8Array(obj) {
2949                    return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
2950                }
2951                var destroyImpl = __webpack_require__(2110);
2952                util.inherits(Writable, Stream);
2953                function nop() {}
2954                function WritableState(options, stream) {
2955                    Duplex = Duplex || __webpack_require__(7920);
2956                    options = options || {};
2957                    var isDuplex = stream instanceof Duplex;
2958                    this.objectMode = !!options.objectMode;
2959                    if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
2960                    var hwm = options.highWaterMark;
2961                    var writableHwm = options.writableHighWaterMark;
2962                    var defaultHwm = this.objectMode ? 16 : 16384;
2963                    if (hwm || 0 === hwm) this.highWaterMark = hwm;
2964                    else if (isDuplex && (writableHwm || 0 === writableHwm)) this.highWaterMark = writableHwm;
2965                    else this.highWaterMark = defaultHwm;
2966                    this.highWaterMark = Math.floor(this.highWaterMark);
2967                    this.finalCalled = false;
vendor: 23,114 bytes, lines 2968-3437
2968                    this.needDrain = false;
2969                    this.ending = false;
2970                    this.ended = false;
2971                    this.finished = false;
2972                    this.destroyed = false;
2973                    var noDecode = false === options.decodeStrings;
2974                    this.decodeStrings = !noDecode;
2975                    this.defaultEncoding = options.defaultEncoding || 'utf8';
2976                    this.length = 0;
2977                    this.writing = false;
2978                    this.corked = 0;
2979                    this.sync = true;
2980                    this.bufferProcessing = false;
2981                    this.onwrite = function(er) {
2982                        onwrite(stream, er);
2983                    };
2984                    this.writecb = null;
2985                    this.writelen = 0;
2986                    this.bufferedRequest = null;
2987                    this.lastBufferedRequest = null;
2988                    this.pendingcb = 0;
2989                    this.prefinished = false;
2990                    this.errorEmitted = false;
2991                    this.bufferedRequestCount = 0;
2992                    this.corkedRequestsFree = new CorkedRequest(this);
2993                }
2994                WritableState.prototype.getBuffer = function() {
2995                    var current = this.bufferedRequest;
2996                    var out = [];
2997                    while(current){
2998                        out.push(current);
2999                        current = current.next;
3000                    }
3001                    return out;
3002                };
3003                (function() {
3004                    try {
3005                        Object.defineProperty(WritableState.prototype, 'buffer', {
3006                            get: internalUtil.deprecate(function() {
3007                                return this.getBuffer();
3008                            }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", 'DEP0003')
3009                        });
3010                    } catch (_) {}
3011                })();
3012                var realHasInstance;
3013                if ('function' == typeof Symbol && Symbol.hasInstance && 'function' == typeof Function.prototype[Symbol.hasInstance]) {
3014                    realHasInstance = Function.prototype[Symbol.hasInstance];
3015                    Object.defineProperty(Writable, Symbol.hasInstance, {
3016                        value: function(object) {
3017                            if (realHasInstance.call(this, object)) return true;
3018                            if (this !== Writable) return false;
3019                            return object && object._writableState instanceof WritableState;
3020                        }
3021                    });
3022                } else realHasInstance = function(object) {
3023                    return object instanceof this;
3024                };
3025                function Writable(options) {
3026                    Duplex = Duplex || __webpack_require__(7920);
3027                    if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) return new Writable(options);
3028                    this._writableState = new WritableState(options, this);
3029                    this.writable = true;
3030                    if (options) {
3031                        if ('function' == typeof options.write) this._write = options.write;
3032                        if ('function' == typeof options.writev) this._writev = options.writev;
3033                        if ('function' == typeof options.destroy) this._destroy = options.destroy;
3034                        if ('function' == typeof options.final) this._final = options.final;
3035                    }
3036                    Stream.call(this);
3037                }
3038                Writable.prototype.pipe = function() {
3039                    this.emit('error', new Error('Cannot pipe, not readable'));
3040                };
3041                function writeAfterEnd(stream, cb) {
3042                    var er = new Error('write after end');
3043                    stream.emit('error', er);
3044                    pna.nextTick(cb, er);
3045                }
3046                function validChunk(stream, state, chunk, cb) {
3047                    var valid = true;
3048                    var er = false;
3049                    if (null === chunk) er = new TypeError('May not write null values to stream');
3050                    else if ('string' != typeof chunk && void 0 !== chunk && !state.objectMode) er = new TypeError('Invalid non-string/buffer chunk');
3051                    if (er) {
3052                        stream.emit('error', er);
3053                        pna.nextTick(cb, er);
3054                        valid = false;
3055                    }
3056                    return valid;
3057                }
3058                Writable.prototype.write = function(chunk, encoding, cb) {
3059                    var state = this._writableState;
3060                    var ret = false;
3061                    var isBuf = !state.objectMode && _isUint8Array(chunk);
3062                    if (isBuf && !Buffer.isBuffer(chunk)) chunk = _uint8ArrayToBuffer(chunk);
3063                    if ('function' == typeof encoding) {
3064                        cb = encoding;
3065                        encoding = null;
3066                    }
3067                    if (isBuf) encoding = 'buffer';
3068                    else if (!encoding) encoding = state.defaultEncoding;
3069                    if ('function' != typeof cb) cb = nop;
3070                    if (state.ended) writeAfterEnd(this, cb);
3071                    else if (isBuf || validChunk(this, state, chunk, cb)) {
3072                        state.pendingcb++;
3073                        ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
3074                    }
3075                    return ret;
3076                };
3077                Writable.prototype.cork = function() {
3078                    var state = this._writableState;
3079                    state.corked++;
3080                };
3081                Writable.prototype.uncork = function() {
3082                    var state = this._writableState;
3083                    if (state.corked) {
3084                        state.corked--;
3085                        if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
3086                    }
3087                };
3088                Writable.prototype.setDefaultEncoding = function(encoding) {
3089                    if ('string' == typeof encoding) encoding = encoding.toLowerCase();
3090                    if (!([
3091                        'hex',
3092                        'utf8',
3093                        'utf-8',
3094                        'ascii',
3095                        'binary',
3096                        'base64',
3097                        'ucs2',
3098                        'ucs-2',
3099                        'utf16le',
3100                        'utf-16le',
3101                        'raw'
3102                    ].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
3103                    this._writableState.defaultEncoding = encoding;
3104                    return this;
3105                };
3106                function decodeChunk(state, chunk, encoding) {
3107                    if (!state.objectMode && false !== state.decodeStrings && 'string' == typeof chunk) chunk = Buffer.from(chunk, encoding);
3108                    return chunk;
3109                }
3110                Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
3111                    enumerable: false,
3112                    get: function() {
3113                        return this._writableState.highWaterMark;
3114                    }
3115                });
3116                function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
3117                    if (!isBuf) {
3118                        var newChunk = decodeChunk(state, chunk, encoding);
3119                        if (chunk !== newChunk) {
3120                            isBuf = true;
3121                            encoding = 'buffer';
3122                            chunk = newChunk;
3123                        }
3124                    }
3125                    var len = state.objectMode ? 1 : chunk.length;
3126                    state.length += len;
3127                    var ret = state.length < state.highWaterMark;
3128                    if (!ret) state.needDrain = true;
3129                    if (state.writing || state.corked) {
3130                        var last = state.lastBufferedRequest;
3131                        state.lastBufferedRequest = {
3132                            chunk: chunk,
3133                            encoding: encoding,
3134                            isBuf: isBuf,
3135                            callback: cb,
3136                            next: null
3137                        };
3138                        if (last) last.next = state.lastBufferedRequest;
3139                        else state.bufferedRequest = state.lastBufferedRequest;
3140                        state.bufferedRequestCount += 1;
3141                    } else doWrite(stream, state, false, len, chunk, encoding, cb);
3142                    return ret;
3143                }
3144                function doWrite(stream, state, writev, len, chunk, encoding, cb) {
3145                    state.writelen = len;
3146                    state.writecb = cb;
3147                    state.writing = true;
3148                    state.sync = true;
3149                    if (writev) stream._writev(chunk, state.onwrite);
3150                    else stream._write(chunk, encoding, state.onwrite);
3151                    state.sync = false;
3152                }
3153                function onwriteError(stream, state, sync, er, cb) {
3154                    --state.pendingcb;
3155                    if (sync) {
3156                        pna.nextTick(cb, er);
3157                        pna.nextTick(finishMaybe, stream, state);
3158                        stream._writableState.errorEmitted = true;
3159                        stream.emit('error', er);
3160                    } else {
3161                        cb(er);
3162                        stream._writableState.errorEmitted = true;
3163                        stream.emit('error', er);
3164                        finishMaybe(stream, state);
3165                    }
3166                }
3167                function onwriteStateUpdate(state) {
3168                    state.writing = false;
3169                    state.writecb = null;
3170                    state.length -= state.writelen;
3171                    state.writelen = 0;
3172                }
3173                function onwrite(stream, er) {
3174                    var state = stream._writableState;
3175                    var sync = state.sync;
3176                    var cb = state.writecb;
3177                    onwriteStateUpdate(state);
3178                    if (er) onwriteError(stream, state, sync, er, cb);
3179                    else {
3180                        var finished = needFinish(state);
3181                        if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(stream, state);
3182                        if (sync) asyncWrite(afterWrite, stream, state, finished, cb);
3183                        else afterWrite(stream, state, finished, cb);
3184                    }
3185                }
3186                function afterWrite(stream, state, finished, cb) {
3187                    if (!finished) onwriteDrain(stream, state);
3188                    state.pendingcb--;
3189                    cb();
3190                    finishMaybe(stream, state);
3191                }
3192                function onwriteDrain(stream, state) {
3193                    if (0 === state.length && state.needDrain) {
3194                        state.needDrain = false;
3195                        stream.emit('drain');
3196                    }
3197                }
3198                function clearBuffer(stream, state) {
3199                    state.bufferProcessing = true;
3200                    var entry = state.bufferedRequest;
3201                    if (stream._writev && entry && entry.next) {
3202                        var l = state.bufferedRequestCount;
3203                        var buffer = new Array(l);
3204                        var holder = state.corkedRequestsFree;
3205                        holder.entry = entry;
3206                        var count = 0;
3207                        var allBuffers = true;
3208                        while(entry){
3209                            buffer[count] = entry;
3210                            if (!entry.isBuf) allBuffers = false;
3211                            entry = entry.next;
3212                            count += 1;
3213                        }
3214                        buffer.allBuffers = allBuffers;
3215                        doWrite(stream, state, true, state.length, buffer, '', holder.finish);
3216                        state.pendingcb++;
3217                        state.lastBufferedRequest = null;
3218                        if (holder.next) {
3219                            state.corkedRequestsFree = holder.next;
3220                            holder.next = null;
3221                        } else state.corkedRequestsFree = new CorkedRequest(state);
3222                        state.bufferedRequestCount = 0;
3223                    } else {
3224                        while(entry){
3225                            var chunk = entry.chunk;
3226                            var encoding = entry.encoding;
3227                            var cb = entry.callback;
3228                            var len = state.objectMode ? 1 : chunk.length;
3229                            doWrite(stream, state, false, len, chunk, encoding, cb);
3230                            entry = entry.next;
3231                            state.bufferedRequestCount--;
3232                            if (state.writing) break;
3233                        }
3234                        if (null === entry) state.lastBufferedRequest = null;
3235                    }
3236                    state.bufferedRequest = entry;
3237                    state.bufferProcessing = false;
3238                }
3239                Writable.prototype._write = function(chunk, encoding, cb) {
3240                    cb(new Error('_write() is not implemented'));
3241                };
3242                Writable.prototype._writev = null;
3243                Writable.prototype.end = function(chunk, encoding, cb) {
3244                    var state = this._writableState;
3245                    if ('function' == typeof chunk) {
3246                        cb = chunk;
3247                        chunk = null;
3248                        encoding = null;
3249                    } else if ('function' == typeof encoding) {
3250                        cb = encoding;
3251                        encoding = null;
3252                    }
3253                    if (null != chunk) this.write(chunk, encoding);
3254                    if (state.corked) {
3255                        state.corked = 1;
3256                        this.uncork();
3257                    }
3258                    if (!state.ending) endWritable(this, state, cb);
3259                };
3260                function needFinish(state) {
3261                    return state.ending && 0 === state.length && null === state.bufferedRequest && !state.finished && !state.writing;
3262                }
3263                function callFinal(stream, state) {
3264                    stream._final(function(err) {
3265                        state.pendingcb--;
3266                        if (err) stream.emit('error', err);
3267                        state.prefinished = true;
3268                        stream.emit('prefinish');
3269                        finishMaybe(stream, state);
3270                    });
3271                }
3272                function prefinish(stream, state) {
3273                    if (!state.prefinished && !state.finalCalled) if ('function' == typeof stream._final) {
3274                        state.pendingcb++;
3275                        state.finalCalled = true;
3276                        pna.nextTick(callFinal, stream, state);
3277                    } else {
3278                        state.prefinished = true;
3279                        stream.emit('prefinish');
3280                    }
3281                }
3282                function finishMaybe(stream, state) {
3283                    var need = needFinish(state);
3284                    if (need) {
3285                        prefinish(stream, state);
3286                        if (0 === state.pendingcb) {
3287                            state.finished = true;
3288                            stream.emit('finish');
3289                        }
3290                    }
3291                    return need;
3292                }
3293                function endWritable(stream, state, cb) {
3294                    state.ending = true;
3295                    finishMaybe(stream, state);
3296                    if (cb) if (state.finished) pna.nextTick(cb);
3297                    else stream.once('finish', cb);
3298                    state.ended = true;
3299                    stream.writable = false;
3300                }
3301                function onCorkedFinish(corkReq, state, err) {
3302                    var entry = corkReq.entry;
3303                    corkReq.entry = null;
3304                    while(entry){
3305                        var cb = entry.callback;
3306                        state.pendingcb--;
3307                        cb(err);
3308                        entry = entry.next;
3309                    }
3310                    state.corkedRequestsFree.next = corkReq;
3311                }
3312                Object.defineProperty(Writable.prototype, 'destroyed', {
3313                    get: function() {
3314                        if (void 0 === this._writableState) return false;
3315                        return this._writableState.destroyed;
3316                    },
3317                    set: function(value) {
3318                        if (!this._writableState) return;
3319                        this._writableState.destroyed = value;
3320                    }
3321                });
3322                Writable.prototype.destroy = destroyImpl.destroy;
3323                Writable.prototype._undestroy = destroyImpl.undestroy;
3324                Writable.prototype._destroy = function(err, cb) {
3325                    this.end();
3326                    cb(err);
3327                };
3328            },
3329            6584 (module1, __unused_rspack_exports, __webpack_require__) {
3330                "use strict";
3331                function _classCallCheck(instance, Constructor) {
3332                    if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
3333                }
3334                var Buffer = __webpack_require__(2103).Buffer;
3335                var util = __webpack_require__(5889);
3336                function copyBuffer(src, target, offset) {
3337                    src.copy(target, offset);
3338                }
3339                module1.exports = function() {
3340                    function BufferList() {
3341                        _classCallCheck(this, BufferList);
3342                        this.head = null;
3343                        this.tail = null;
3344                        this.length = 0;
3345                    }
3346                    BufferList.prototype.push = function(v) {
3347                        var entry = {
3348                            data: v,
3349                            next: null
3350                        };
3351                        if (this.length > 0) this.tail.next = entry;
3352                        else this.head = entry;
3353                        this.tail = entry;
3354                        ++this.length;
3355                    };
3356                    BufferList.prototype.unshift = function(v) {
3357                        var entry = {
3358                            data: v,
3359                            next: this.head
3360                        };
3361                        if (0 === this.length) this.tail = entry;
3362                        this.head = entry;
3363                        ++this.length;
3364                    };
3365                    BufferList.prototype.shift = function() {
3366                        if (0 === this.length) return;
3367                        var ret = this.head.data;
3368                        if (1 === this.length) this.head = this.tail = null;
3369                        else this.head = this.head.next;
3370                        --this.length;
3371                        return ret;
3372                    };
3373                    BufferList.prototype.clear = function() {
3374                        this.head = this.tail = null;
3375                        this.length = 0;
3376                    };
3377                    BufferList.prototype.join = function(s) {
3378                        if (0 === this.length) return '';
3379                        var p = this.head;
3380                        var ret = '' + p.data;
3381                        while(p = p.next)ret += s + p.data;
3382                        return ret;
3383                    };
3384                    BufferList.prototype.concat = function(n) {
3385                        if (0 === this.length) return Buffer.alloc(0);
3386                        var ret = Buffer.allocUnsafe(n >>> 0);
3387                        var p = this.head;
3388                        var i = 0;
3389                        while(p){
3390                            copyBuffer(p.data, ret, i);
3391                            i += p.data.length;
3392                            p = p.next;
3393                        }
3394                        return ret;
3395                    };
3396                    return BufferList;
3397                }();
3398                if (util && util.inspect && util.inspect.custom) module1.exports.prototype[util.inspect.custom] = function() {
3399                    var obj = util.inspect({
3400                        length: this.length
3401                    });
3402                    return this.constructor.name + ' ' + obj;
3403                };
3404            },
3405            2110 (module1, __unused_rspack_exports, __webpack_require__) {
3406                "use strict";
3407                var pna = __webpack_require__(3225);
3408                function destroy(err, cb) {
3409                    var _this = this;
3410                    var readableDestroyed = this._readableState && this._readableState.destroyed;
3411                    var writableDestroyed = this._writableState && this._writableState.destroyed;
3412                    if (readableDestroyed || writableDestroyed) {
3413                        if (cb) cb(err);
3414                        else if (err) if (this._writableState) {
3415                            if (!this._writableState.errorEmitted) {
3416                                this._writableState.errorEmitted = true;
3417                                pna.nextTick(emitErrorNT, this, err);
3418                            }
3419                        } else pna.nextTick(emitErrorNT, this, err);
3420                        return this;
3421                    }
3422                    if (this._readableState) this._readableState.destroyed = true;
3423                    if (this._writableState) this._writableState.destroyed = true;
3424                    this._destroy(err || null, function(err) {
3425                        if (!cb && err) if (_this._writableState) {
3426                            if (!_this._writableState.errorEmitted) {
3427                                _this._writableState.errorEmitted = true;
3428                                pna.nextTick(emitErrorNT, _this, err);
3429                            }
3430                        } else pna.nextTick(emitErrorNT, _this, err);
3431                        else if (cb) cb(err);
3432                    });
3433                    return this;
3434                }
3435                function undestroy() {
3436                    if (this._readableState) {
3437                        this._readableState.destroyed = false;
3438                        this._readableState.reading = false;
3439                        this._readableState.ended = false;
3440                        this._readableState.endEmitted = false;
3441                    }
3442                    if (this._writableState) {
3443                        this._writableState.destroyed = false;
3444                        this._writableState.ended = false;
3445                        this._writableState.ending = false;
3446                        this._writableState.finalCalled = false;
3447                        this._writableState.prefinished = false;
3448                        this._writableState.finished = false;
3449                        this._writableState.errorEmitted = false;
3450                    }
3451                }
3452                function emitErrorNT(self1, err) {
3453                    self1.emit('error', err);
3454                }
3455                module1.exports = {
3456                    destroy: destroy,
3457                    undestroy: undestroy
3458                };
3459            },
3460            9239 (module1, __unused_rspack_exports, __webpack_require__) {
3461                module1.exports = __webpack_require__(7007).EventEmitter;
3462            },
3463            2713 (module1, exports1, __webpack_require__) {
3464                exports1 = module1.exports = __webpack_require__(9158);
3465                exports1.Stream = exports1;
3466                exports1.Readable = exports1;
3467                exports1.Writable = __webpack_require__(8522);
3468                exports1.Duplex = __webpack_require__(7920);
3469                exports1.Transform = __webpack_require__(6608);
3470                exports1.PassThrough = __webpack_require__(8290);
3471            },
3472            2103 (module1, exports1, __webpack_require__) {
3473                var buffer = __webpack_require__(8287);
3474                var Buffer = buffer.Buffer;
3475                function copyProps(src, dst) {
3476                    for(var key in src)dst[key] = src[key];
3477                }
3478                if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) module1.exports = buffer;
3479                else {
3480                    copyProps(buffer, exports1);
3481                    exports1.Buffer = SafeBuffer;
3482                }
3483                function SafeBuffer(arg, encodingOrOffset, length) {
3484                    return Buffer(arg, encodingOrOffset, length);
3485                }
3486                copyProps(Buffer, SafeBuffer);
3487                SafeBuffer.from = function(arg, encodingOrOffset, length) {
3488                    if ('number' == typeof arg) throw new TypeError('Argument must not be a number');
3489                    return Buffer(arg, encodingOrOffset, length);
3490                };
3491                SafeBuffer.alloc = function(size, fill, encoding) {
3492                    if ('number' != typeof size) throw new TypeError('Argument must be a number');
3493                    var buf = Buffer(size);
3494                    if (void 0 !== fill) if ('string' == typeof encoding) buf.fill(fill, encoding);
3495                    else buf.fill(fill);
3496                    else buf.fill(0);
3497                    return buf;
3498                };
3499                SafeBuffer.allocUnsafe = function(size) {
3500                    if ('number' != typeof size) throw new TypeError('Argument must be a number');
3501                    return Buffer(size);
3502                };
3503                SafeBuffer.allocUnsafeSlow = function(size) {
3504                    if ('number' != typeof size) throw new TypeError('Argument must be a number');
3505                    return buffer.SlowBuffer(size);
3506                };
3507            },
3508            9251 (__unused_rspack_module, exports1, __webpack_require__) {
3509                "use strict";
3510                var Buffer = __webpack_require__(2103).Buffer;
3511                var isEncoding = Buffer.isEncoding || function(encoding) {
3512                    encoding = '' + encoding;
3513                    switch(encoding && encoding.toLowerCase()){
3514                        case 'hex':
3515                        case 'utf8':
3516                        case 'utf-8':
3517                        case 'ascii':
3518                        case 'binary':
3519                        case 'base64':
3520                        case 'ucs2':
3521                        case 'ucs-2':
3522                        case 'utf16le':
3523                        case 'utf-16le':
3524                        case 'raw':
3525                            return true;
3526                        default:
3527                            return false;
vendor: 7,436 bytes, lines 3528-3690
3528                    }
3529                };
3530                function _normalizeEncoding(enc) {
3531                    if (!enc) return 'utf8';
3532                    var retried;
3533                    while(true)switch(enc){
3534                        case 'utf8':
3535                        case 'utf-8':
3536                            return 'utf8';
3537                        case 'ucs2':
3538                        case 'ucs-2':
3539                        case 'utf16le':
3540                        case 'utf-16le':
3541                            return 'utf16le';
3542                        case 'latin1':
3543                        case 'binary':
3544                            return 'latin1';
3545                        case 'base64':
3546                        case 'ascii':
3547                        case 'hex':
3548                            return enc;
3549                        default:
3550                            if (retried) return;
3551                            enc = ('' + enc).toLowerCase();
3552                            retried = true;
3553                    }
3554                }
3555                function normalizeEncoding(enc) {
3556                    var nenc = _normalizeEncoding(enc);
3557                    if ('string' != typeof nenc && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
3558                    return nenc || enc;
3559                }
3560                exports1.I = StringDecoder;
3561                function StringDecoder(encoding) {
3562                    this.encoding = normalizeEncoding(encoding);
3563                    var nb;
3564                    switch(this.encoding){
3565                        case 'utf16le':
3566                            this.text = utf16Text;
3567                            this.end = utf16End;
3568                            nb = 4;
3569                            break;
3570                        case 'utf8':
3571                            this.fillLast = utf8FillLast;
3572                            nb = 4;
3573                            break;
3574                        case 'base64':
3575                            this.text = base64Text;
3576                            this.end = base64End;
3577                            nb = 3;
3578                            break;
3579                        default:
3580                            this.write = simpleWrite;
3581                            this.end = simpleEnd;
3582                            return;
3583                    }
3584                    this.lastNeed = 0;
3585                    this.lastTotal = 0;
3586                    this.lastChar = Buffer.allocUnsafe(nb);
3587                }
3588                StringDecoder.prototype.write = function(buf) {
3589                    if (0 === buf.length) return '';
3590                    var r;
3591                    var i;
3592                    if (this.lastNeed) {
3593                        r = this.fillLast(buf);
3594                        if (void 0 === r) return '';
3595                        i = this.lastNeed;
3596                        this.lastNeed = 0;
3597                    } else i = 0;
3598                    if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
3599                    return r || '';
3600                };
3601                StringDecoder.prototype.end = utf8End;
3602                StringDecoder.prototype.text = utf8Text;
3603                StringDecoder.prototype.fillLast = function(buf) {
3604                    if (this.lastNeed <= buf.length) {
3605                        buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
3606                        return this.lastChar.toString(this.encoding, 0, this.lastTotal);
3607                    }
3608                    buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
3609                    this.lastNeed -= buf.length;
3610                };
3611                function utf8CheckByte(byte) {
3612                    if (byte <= 0x7F) return 0;
3613                    if (byte >> 5 === 0x06) return 2;
3614                    if (byte >> 4 === 0x0E) return 3;
3615                    if (byte >> 3 === 0x1E) return 4;
3616                    return byte >> 6 === 0x02 ? -1 : -2;
3617                }
3618                function utf8CheckIncomplete(self1, buf, i) {
3619                    var j = buf.length - 1;
3620                    if (j < i) return 0;
3621                    var nb = utf8CheckByte(buf[j]);
3622                    if (nb >= 0) {
3623                        if (nb > 0) self1.lastNeed = nb - 1;
3624                        return nb;
3625                    }
3626                    if (--j < i || -2 === nb) return 0;
3627                    nb = utf8CheckByte(buf[j]);
3628                    if (nb >= 0) {
3629                        if (nb > 0) self1.lastNeed = nb - 2;
3630                        return nb;
3631                    }
3632                    if (--j < i || -2 === nb) return 0;
3633                    nb = utf8CheckByte(buf[j]);
3634                    if (nb >= 0) {
3635                        if (nb > 0) if (2 === nb) nb = 0;
3636                        else self1.lastNeed = nb - 3;
3637                        return nb;
3638                    }
3639                    return 0;
3640                }
3641                function utf8CheckExtraBytes(self1, buf, p) {
3642                    if ((0xC0 & buf[0]) !== 0x80) {
3643                        self1.lastNeed = 0;
3644                        return '\ufffd';
3645                    }
3646                    if (self1.lastNeed > 1 && buf.length > 1) {
3647                        if ((0xC0 & buf[1]) !== 0x80) {
3648                            self1.lastNeed = 1;
3649                            return '\ufffd';
3650                        }
3651                        if (self1.lastNeed > 2 && buf.length > 2) {
3652                            if ((0xC0 & buf[2]) !== 0x80) {
3653                                self1.lastNeed = 2;
3654                                return '\ufffd';
3655                            }
3656                        }
3657                    }
3658                }
3659                function utf8FillLast(buf) {
3660                    var p = this.lastTotal - this.lastNeed;
3661                    var r = utf8CheckExtraBytes(this, buf, p);
3662                    if (void 0 !== r) return r;
3663                    if (this.lastNeed <= buf.length) {
3664                        buf.copy(this.lastChar, p, 0, this.lastNeed);
3665                        return this.lastChar.toString(this.encoding, 0, this.lastTotal);
3666                    }
3667                    buf.copy(this.lastChar, p, 0, buf.length);
3668                    this.lastNeed -= buf.length;
3669                }
3670                function utf8Text(buf, i) {
3671                    var total = utf8CheckIncomplete(this, buf, i);
3672                    if (!this.lastNeed) return buf.toString('utf8', i);
3673                    this.lastTotal = total;
3674                    var end = buf.length - (total - this.lastNeed);
3675                    buf.copy(this.lastChar, 0, end);
3676                    return buf.toString('utf8', i, end);
3677                }
3678                function utf8End(buf) {
3679                    var r = buf && buf.length ? this.write(buf) : '';
3680                    if (this.lastNeed) return r + '\ufffd';
3681                    return r;
3682                }
3683                function utf16Text(buf, i) {
3684                    if ((buf.length - i) % 2 === 0) {
3685                        var r = buf.toString('utf16le', i);
3686                        if (r) {
3687                            var c = r.charCodeAt(r.length - 1);
3688                            if (c >= 0xD800 && c <= 0xDBFF) {
3689                                this.lastNeed = 2;
3690                                this.lastTotal = 4;
3691                                this.lastChar[0] = buf[buf.length - 2];
3692                                this.lastChar[1] = buf[buf.length - 1];
3693                                return r.slice(0, -1);
3694                            }
3695                        }
3696                        return r;
3697                    }
3698                    this.lastNeed = 1;
3699                    this.lastTotal = 2;
3700                    this.lastChar[0] = buf[buf.length - 1];
3701                    return buf.toString('utf16le', i, buf.length - 1);
3702                }
3703                function utf16End(buf) {
3704                    var r = buf && buf.length ? this.write(buf) : '';
3705                    if (this.lastNeed) {
3706                        var end = this.lastTotal - this.lastNeed;
3707                        return r + this.lastChar.toString('utf16le', 0, end);
3708                    }
3709                    return r;
3710                }
3711                function base64Text(buf, i) {
3712                    var n = (buf.length - i) % 3;
3713                    if (0 === n) return buf.toString('base64', i);
3714                    this.lastNeed = 3 - n;
3715                    this.lastTotal = 3;
3716                    if (1 === n) this.lastChar[0] = buf[buf.length - 1];
3717                    else {
3718                        this.lastChar[0] = buf[buf.length - 2];
3719                        this.lastChar[1] = buf[buf.length - 1];
3720                    }
3721                    return buf.toString('base64', i, buf.length - n);
3722                }
3723                function base64End(buf) {
3724                    var r = buf && buf.length ? this.write(buf) : '';
3725                    if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
3726                    return r;
3727                }
3728                function simpleWrite(buf) {
3729                    return buf.toString(this.encoding);
3730                }
3731                function simpleEnd(buf) {
3732                    return buf && buf.length ? this.write(buf) : '';
3733                }
3734            },
3735            6611 (module1, __unused_rspack_exports, __webpack_require__) {
3736                var process = __webpack_require__(5606);
3737                var once = __webpack_require__(3519);
3738                var noop = function() {};
3739                var qnt = __webpack_require__.g.Bare ? queueMicrotask : process.nextTick.bind(process);
3740                var isRequest = function(stream) {
3741                    return stream.setHeader && 'function' == typeof stream.abort;
3742                };
3743                var isChildProcess = function(stream) {
3744                    return stream.stdio && Array.isArray(stream.stdio) && 3 === stream.stdio.length;
3745                };
3746                var eos = function(stream, opts, callback) {
3747                    if ('function' == typeof opts) return eos(stream, null, opts);
3748                    if (!opts) opts = {};
3749                    callback = once(callback || noop);
3750                    var ws = stream._writableState;
3751                    var rs = stream._readableState;
3752                    var readable = opts.readable || false !== opts.readable && stream.readable;
3753                    var writable = opts.writable || false !== opts.writable && stream.writable;
3754                    var cancelled = false;
3755                    var onlegacyfinish = function() {
3756                        if (!stream.writable) onfinish();
3757                    };
3758                    var onfinish = function() {
3759                        writable = false;
3760                        if (!readable) callback.call(stream);
3761                    };
3762                    var onend = function() {
3763                        readable = false;
3764                        if (!writable) callback.call(stream);
3765                    };
3766                    var onexit = function(exitCode) {
3767                        callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
3768                    };
3769                    var onerror = function(err) {
3770                        callback.call(stream, err);
3771                    };
3772                    var onclose = function() {
3773                        qnt(onclosenexttick);
3774                    };
3775                    var onclosenexttick = function() {
3776                        if (cancelled) return;
3777                        if (readable && !(rs && rs.ended && !rs.destroyed)) return callback.call(stream, new Error('premature close'));
3778                        if (writable && !(ws && ws.ended && !ws.destroyed)) return callback.call(stream, new Error('premature close'));
3779                    };
3780                    var onrequest = function() {
3781                        stream.req.on('finish', onfinish);
3782                    };
3783                    if (isRequest(stream)) {
3784                        stream.on('complete', onfinish);
3785                        stream.on('abort', onclose);
3786                        if (stream.req) onrequest();
3787                        else stream.on('request', onrequest);
3788                    } else if (writable && !ws) {
3789                        stream.on('end', onlegacyfinish);
3790                        stream.on('close', onlegacyfinish);
3791                    }
3792                    if (isChildProcess(stream)) stream.on('exit', onexit);
3793                    stream.on('end', onend);
3794                    stream.on('finish', onfinish);
3795                    if (false !== opts.error) stream.on('error', onerror);
3796                    stream.on('close', onclose);
3797                    return function() {
3798                        cancelled = true;
3799                        stream.removeListener('complete', onfinish);
3800                        stream.removeListener('abort', onclose);
3801                        stream.removeListener('request', onrequest);
3802                        if (stream.req) stream.req.removeListener('finish', onfinish);
3803                        stream.removeListener('end', onlegacyfinish);
3804                        stream.removeListener('close', onlegacyfinish);
3805                        stream.removeListener('finish', onfinish);
3806                        stream.removeListener('exit', onexit);
3807                        stream.removeListener('end', onend);
3808                        stream.removeListener('error', onerror);
3809                        stream.removeListener('close', onclose);
3810                    };
3811                };
3812                module1.exports = eos;
3813            },
3814            655 (module1) {
3815                "use strict";
3816                var $defineProperty = Object.defineProperty || false;
3817                if ($defineProperty) try {
3818                    $defineProperty({}, 'a', {
3819                        value: 1
3820                    });
3821                } catch (e) {
3822                    $defineProperty = false;
vendor: 17,361 bytes, lines 3823-4161
3823                }
3824                module1.exports = $defineProperty;
3825            },
3826            1237 (module1) {
3827                "use strict";
3828                module1.exports = EvalError;
3829            },
3830            9383 (module1) {
3831                "use strict";
3832                module1.exports = Error;
3833            },
3834            9290 (module1) {
3835                "use strict";
3836                module1.exports = RangeError;
3837            },
3838            9538 (module1) {
3839                "use strict";
3840                module1.exports = ReferenceError;
3841            },
3842            8068 (module1) {
3843                "use strict";
3844                module1.exports = SyntaxError;
3845            },
3846            9675 (module1) {
3847                "use strict";
3848                module1.exports = TypeError;
3849            },
3850            5345 (module1) {
3851                "use strict";
3852                module1.exports = URIError;
3853            },
3854            9612 (module1) {
3855                "use strict";
3856                module1.exports = Object;
3857            },
3858            7007 (module1) {
3859                "use strict";
3860                var R = 'object' == typeof Reflect ? Reflect : null;
3861                var ReflectApply = R && 'function' == typeof R.apply ? R.apply : function(target, receiver, args) {
3862                    return Function.prototype.apply.call(target, receiver, args);
3863                };
3864                var ReflectOwnKeys;
3865                ReflectOwnKeys = R && 'function' == typeof R.ownKeys ? R.ownKeys : Object.getOwnPropertySymbols ? function(target) {
3866                    return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
3867                } : function(target) {
3868                    return Object.getOwnPropertyNames(target);
3869                };
3870                function ProcessEmitWarning(warning) {
3871                    if (console && console.warn) console.warn(warning);
3872                }
3873                var NumberIsNaN = Number.isNaN || function(value) {
3874                    return value !== value;
3875                };
3876                function EventEmitter() {
3877                    EventEmitter.init.call(this);
3878                }
3879                module1.exports = EventEmitter;
3880                module1.exports.once = once;
3881                EventEmitter.EventEmitter = EventEmitter;
3882                EventEmitter.prototype._events = void 0;
3883                EventEmitter.prototype._eventsCount = 0;
3884                EventEmitter.prototype._maxListeners = void 0;
3885                var defaultMaxListeners = 10;
3886                function checkListener(listener) {
3887                    if ('function' != typeof listener) throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
3888                }
3889                Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
3890                    enumerable: true,
3891                    get: function() {
3892                        return defaultMaxListeners;
3893                    },
3894                    set: function(arg) {
3895                        if ('number' != typeof arg || arg < 0 || NumberIsNaN(arg)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
3896                        defaultMaxListeners = arg;
3897                    }
3898                });
3899                EventEmitter.init = function() {
3900                    if (void 0 === this._events || this._events === Object.getPrototypeOf(this)._events) {
3901                        this._events = Object.create(null);
3902                        this._eventsCount = 0;
3903                    }
3904                    this._maxListeners = this._maxListeners || void 0;
3905                };
3906                EventEmitter.prototype.setMaxListeners = function(n) {
3907                    if ('number' != typeof n || n < 0 || NumberIsNaN(n)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
3908                    this._maxListeners = n;
3909                    return this;
3910                };
3911                function _getMaxListeners(that) {
3912                    if (void 0 === that._maxListeners) return EventEmitter.defaultMaxListeners;
3913                    return that._maxListeners;
3914                }
3915                EventEmitter.prototype.getMaxListeners = function() {
3916                    return _getMaxListeners(this);
3917                };
3918                EventEmitter.prototype.emit = function(type) {
3919                    var args = [];
3920                    for(var i = 1; i < arguments.length; i++)args.push(arguments[i]);
3921                    var doError = 'error' === type;
3922                    var events = this._events;
3923                    if (void 0 !== events) doError = doError && void 0 === events.error;
3924                    else if (!doError) return false;
3925                    if (doError) {
3926                        var er;
3927                        if (args.length > 0) er = args[0];
3928                        if (er instanceof Error) throw er;
3929                        var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
3930                        err.context = er;
3931                        throw err;
3932                    }
3933                    var handler = events[type];
3934                    if (void 0 === handler) return false;
3935                    if ('function' == typeof handler) ReflectApply(handler, this, args);
3936                    else {
3937                        var len = handler.length;
3938                        var listeners = arrayClone(handler, len);
3939                        for(var i = 0; i < len; ++i)ReflectApply(listeners[i], this, args);
3940                    }
3941                    return true;
3942                };
3943                function _addListener(target, type, listener, prepend) {
3944                    var m;
3945                    var events;
3946                    var existing;
3947                    checkListener(listener);
3948                    events = target._events;
3949                    if (void 0 === events) {
3950                        events = target._events = Object.create(null);
3951                        target._eventsCount = 0;
3952                    } else {
3953                        if (void 0 !== events.newListener) {
3954                            target.emit('newListener', type, listener.listener ? listener.listener : listener);
3955                            events = target._events;
3956                        }
3957                        existing = events[type];
3958                    }
3959                    if (void 0 === existing) {
3960                        existing = events[type] = listener;
3961                        ++target._eventsCount;
3962                    } else {
3963                        if ('function' == typeof existing) existing = events[type] = prepend ? [
3964                            listener,
3965                            existing
3966                        ] : [
3967                            existing,
3968                            listener
3969                        ];
3970                        else if (prepend) existing.unshift(listener);
3971                        else existing.push(listener);
3972                        m = _getMaxListeners(target);
3973                        if (m > 0 && existing.length > m && !existing.warned) {
3974                            existing.warned = true;
3975                            var w = new Error('Possible EventEmitter memory leak detected. ' + existing.length + ' ' + String(type) + " listeners added. Use emitter.setMaxListeners() to increase limit");
3976                            w.name = 'MaxListenersExceededWarning';
3977                            w.emitter = target;
3978                            w.type = type;
3979                            w.count = existing.length;
3980                            ProcessEmitWarning(w);
3981                        }
3982                    }
3983                    return target;
3984                }
3985                EventEmitter.prototype.addListener = function(type, listener) {
3986                    return _addListener(this, type, listener, false);
3987                };
3988                EventEmitter.prototype.on = EventEmitter.prototype.addListener;
3989                EventEmitter.prototype.prependListener = function(type, listener) {
3990                    return _addListener(this, type, listener, true);
3991                };
3992                function onceWrapper() {
3993                    if (!this.fired) {
3994                        this.target.removeListener(this.type, this.wrapFn);
3995                        this.fired = true;
3996                        if (0 === arguments.length) return this.listener.call(this.target);
3997                        return this.listener.apply(this.target, arguments);
3998                    }
3999                }
4000                function _onceWrap(target, type, listener) {
4001                    var state = {
4002                        fired: false,
4003                        wrapFn: void 0,
4004                        target: target,
4005                        type: type,
4006                        listener: listener
4007                    };
4008                    var wrapped = onceWrapper.bind(state);
4009                    wrapped.listener = listener;
4010                    state.wrapFn = wrapped;
4011                    return wrapped;
4012                }
4013                EventEmitter.prototype.once = function(type, listener) {
4014                    checkListener(listener);
4015                    this.on(type, _onceWrap(this, type, listener));
4016                    return this;
4017                };
4018                EventEmitter.prototype.prependOnceListener = function(type, listener) {
4019                    checkListener(listener);
4020                    this.prependListener(type, _onceWrap(this, type, listener));
4021                    return this;
4022                };
4023                EventEmitter.prototype.removeListener = function(type, listener) {
4024                    var list, events, position, i, originalListener;
4025                    checkListener(listener);
4026                    events = this._events;
4027                    if (void 0 === events) return this;
4028                    list = events[type];
4029                    if (void 0 === list) return this;
4030                    if (list === listener || list.listener === listener) if (0 === --this._eventsCount) this._events = Object.create(null);
4031                    else {
4032                        delete events[type];
4033                        if (events.removeListener) this.emit('removeListener', type, list.listener || listener);
4034                    }
4035                    else if ('function' != typeof list) {
4036                        position = -1;
4037                        for(i = list.length - 1; i >= 0; i--)if (list[i] === listener || list[i].listener === listener) {
4038                            originalListener = list[i].listener;
4039                            position = i;
4040                            break;
4041                        }
4042                        if (position < 0) return this;
4043                        if (0 === position) list.shift();
4044                        else spliceOne(list, position);
4045                        if (1 === list.length) events[type] = list[0];
4046                        if (void 0 !== events.removeListener) this.emit('removeListener', type, originalListener || listener);
4047                    }
4048                    return this;
4049                };
4050                EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
4051                EventEmitter.prototype.removeAllListeners = function(type) {
4052                    var listeners, events, i;
4053                    events = this._events;
4054                    if (void 0 === events) return this;
4055                    if (void 0 === events.removeListener) {
4056                        if (0 === arguments.length) {
4057                            this._events = Object.create(null);
4058                            this._eventsCount = 0;
4059                        } else if (void 0 !== events[type]) if (0 === --this._eventsCount) this._events = Object.create(null);
4060                        else delete events[type];
4061                        return this;
4062                    }
4063                    if (0 === arguments.length) {
4064                        var keys = Object.keys(events);
4065                        var key;
4066                        for(i = 0; i < keys.length; ++i){
4067                            key = keys[i];
4068                            if ('removeListener' !== key) this.removeAllListeners(key);
4069                        }
4070                        this.removeAllListeners('removeListener');
4071                        this._events = Object.create(null);
4072                        this._eventsCount = 0;
4073                        return this;
4074                    }
4075                    listeners = events[type];
4076                    if ('function' == typeof listeners) this.removeListener(type, listeners);
4077                    else if (void 0 !== listeners) for(i = listeners.length - 1; i >= 0; i--)this.removeListener(type, listeners[i]);
4078                    return this;
4079                };
4080                function _listeners(target, type, unwrap) {
4081                    var events = target._events;
4082                    if (void 0 === events) return [];
4083                    var evlistener = events[type];
4084                    if (void 0 === evlistener) return [];
4085                    if ('function' == typeof evlistener) return unwrap ? [
4086                        evlistener.listener || evlistener
4087                    ] : [
4088                        evlistener
4089                    ];
4090                    return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
4091                }
4092                EventEmitter.prototype.listeners = function(type) {
4093                    return _listeners(this, type, true);
4094                };
4095                EventEmitter.prototype.rawListeners = function(type) {
4096                    return _listeners(this, type, false);
4097                };
4098                EventEmitter.listenerCount = function(emitter, type) {
4099                    if ('function' == typeof emitter.listenerCount) return emitter.listenerCount(type);
4100                    return listenerCount.call(emitter, type);
4101                };
4102                EventEmitter.prototype.listenerCount = listenerCount;
4103                function listenerCount(type) {
4104                    var events = this._events;
4105                    if (void 0 !== events) {
4106                        var evlistener = events[type];
4107                        if ('function' == typeof evlistener) return 1;
4108                        if (void 0 !== evlistener) return evlistener.length;
4109                    }
4110                    return 0;
4111                }
4112                EventEmitter.prototype.eventNames = function() {
4113                    return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
4114                };
4115                function arrayClone(arr, n) {
4116                    var copy = new Array(n);
4117                    for(var i = 0; i < n; ++i)copy[i] = arr[i];
4118                    return copy;
4119                }
4120                function spliceOne(list, index) {
4121                    for(; index + 1 < list.length; index++)list[index] = list[index + 1];
4122                    list.pop();
4123                }
4124                function unwrapListeners(arr) {
4125                    var ret = new Array(arr.length);
4126                    for(var i = 0; i < ret.length; ++i)ret[i] = arr[i].listener || arr[i];
4127                    return ret;
4128                }
4129                function once(emitter, name) {
4130                    return new Promise(function(resolve, reject) {
4131                        function errorListener(err) {
4132                            emitter.removeListener(name, resolver);
4133                            reject(err);
4134                        }
4135                        function resolver() {
4136                            if ('function' == typeof emitter.removeListener) emitter.removeListener('error', errorListener);
4137                            resolve([].slice.call(arguments));
4138                        }
4139                        eventTargetAgnosticAddListener(emitter, name, resolver, {
4140                            once: true
4141                        });
4142                        if ('error' !== name) addErrorHandlerIfEventEmitter(emitter, errorListener, {
4143                            once: true
4144                        });
4145                    });
4146                }
4147                function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
4148                    if ('function' == typeof emitter.on) eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
4149                }
4150                function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
4151                    if ('function' == typeof emitter.on) if (flags.once) emitter.once(name, listener);
4152                    else emitter.on(name, listener);
4153                    else if ('function' == typeof emitter.addEventListener) emitter.addEventListener(name, function wrapListener(arg) {
4154                        if (flags.once) emitter.removeEventListener(name, wrapListener);
4155                        listener(arg);
4156                    });
4157                    else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
4158                }
4159            },
4160            8463 (module1) {
4161                module1.exports = stringify;
4162                stringify.default = stringify;
4163                stringify.stable = deterministicStringify;
4164                stringify.stableStringify = deterministicStringify;
4165                var LIMIT_REPLACE_NODE = '[...]';
4166                var CIRCULAR_REPLACE_NODE = '[Circular]';
4167                var arr = [];
4168                var replacerStack = [];
4169                function defaultOptions() {
4170                    return {
4171                        depthLimit: Number.MAX_SAFE_INTEGER,
4172                        edgesLimit: Number.MAX_SAFE_INTEGER
4173                    };
4174                }
4175                function stringify(obj, replacer, spacer, options) {
4176                    if (void 0 === options) options = defaultOptions();
4177                    decirc(obj, '', 0, [], void 0, 0, options);
4178                    var res;
4179                    try {
4180                        res = 0 === replacerStack.length ? JSON.stringify(obj, replacer, spacer) : JSON.stringify(obj, replaceGetterValues(replacer), spacer);
4181                    } catch (_) {
4182                        return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]');
4183                    } finally{
4184                        while(0 !== arr.length){
4185                            var part = arr.pop();
4186                            if (4 === part.length) Object.defineProperty(part[0], part[1], part[3]);
4187                            else part[0][part[1]] = part[2];
4188                        }
4189                    }
4190                    return res;
4191                }
4192                function setReplace(replace, val, k, parent) {
4193                    var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k);
4194                    if (void 0 !== propertyDescriptor.get) if (propertyDescriptor.configurable) {
4195                        Object.defineProperty(parent, k, {
4196                            value: replace
4197                        });
4198                        arr.push([
4199                            parent,
4200                            k,
4201                            val,
4202                            propertyDescriptor
4203                        ]);
4204                    } else replacerStack.push([
4205                        val,
4206                        k,
4207                        replace
4208                    ]);
4209                    else {
4210                        parent[k] = replace;
4211                        arr.push([
4212                            parent,
4213                            k,
4214                            val
4215                        ]);
4216                    }
4217                }
4218                function decirc(val, k, edgeIndex, stack, parent, depth, options) {
4219                    depth += 1;
4220                    var i;
4221                    if ('object' == typeof val && null !== val) {
4222                        for(i = 0; i < stack.length; i++)if (stack[i] === val) return void setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);
4223                        if (void 0 !== options.depthLimit && depth > options.depthLimit) return void setReplace(LIMIT_REPLACE_NODE, val, k, parent);
4224                        if (void 0 !== options.edgesLimit && edgeIndex + 1 > options.edgesLimit) return void setReplace(LIMIT_REPLACE_NODE, val, k, parent);
4225                        stack.push(val);
4226                        if (Array.isArray(val)) for(i = 0; i < val.length; i++)decirc(val[i], i, i, stack, val, depth, options);
4227                        else {
4228                            var keys = Object.keys(val);
4229                            for(i = 0; i < keys.length; i++){
4230                                var key = keys[i];
4231                                decirc(val[key], key, i, stack, val, depth, options);
4232                            }
4233                        }
4234                        stack.pop();
4235                    }
4236                }
4237                function compareFunction(a, b) {
4238                    if (a < b) return -1;
4239                    if (a > b) return 1;
4240                    return 0;
4241                }
4242                function deterministicStringify(obj, replacer, spacer, options) {
4243                    if (void 0 === options) options = defaultOptions();
4244                    var tmp = deterministicDecirc(obj, '', 0, [], void 0, 0, options) || obj;
4245                    var res;
4246                    try {
4247                        res = 0 === replacerStack.length ? JSON.stringify(tmp, replacer, spacer) : JSON.stringify(tmp, replaceGetterValues(replacer), spacer);
4248                    } catch (_) {
4249                        return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]');
4250                    } finally{
4251                        while(0 !== arr.length){
4252                            var part = arr.pop();
4253                            if (4 === part.length) Object.defineProperty(part[0], part[1], part[3]);
4254                            else part[0][part[1]] = part[2];
4255                        }
4256                    }
4257                    return res;
4258                }
4259                function deterministicDecirc(val, k, edgeIndex, stack, parent, depth, options) {
4260                    depth += 1;
4261                    var i;
4262                    if ('object' == typeof val && null !== val) {
4263                        for(i = 0; i < stack.length; i++)if (stack[i] === val) return void setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);
4264                        try {
4265                            if ('function' == typeof val.toJSON) return;
4266                        } catch (_) {
4267                            return;
4268                        }
4269                        if (void 0 !== options.depthLimit && depth > options.depthLimit) return void setReplace(LIMIT_REPLACE_NODE, val, k, parent);
4270                        if (void 0 !== options.edgesLimit && edgeIndex + 1 > options.edgesLimit) return void setReplace(LIMIT_REPLACE_NODE, val, k, parent);
4271                        stack.push(val);
4272                        if (Array.isArray(val)) for(i = 0; i < val.length;
4272 i++)deterministicDecirc(val[i], i, i, stack, val, depth, options);
4273                        else {
4274                            var tmp = {};
4275                            var keys = Object.keys(val).sort(compareFunction);
4276                            for(i = 0; i < keys.length; i++){
4277                                var key = keys[i];
4278                                deterministicDecirc(val[key], key, i, stack, val, depth, options);
4279                                tmp[key] = val[key];
4280                            }
4281                            if (void 0 === parent) return tmp;
4282                            arr.push([
4283                                parent,
4284                                k,
4285                                val
4286                            ]);
4287                            parent[k] = tmp;
4288                        }
4289                        stack.pop();
4290                    }
4291                }
4292                function replaceGetterValues(replacer) {
4293                    replacer = void 0 !== replacer ? replacer : function(k, v) {
4294                        return v;
4295                    };
4296                    return function(key, val) {
4297                        if (replacerStack.length > 0) for(var i = 0; i < replacerStack.length; i++){
4298                            var part = replacerStack[i];
4299                            if (part[1] === key && part[0] === val) {
4300                                val = part[2];
4301                                replacerStack.splice(i, 1);
4302                                break;
4303                            }
4304                        }
4305                        return replacer.call(this, key, val);
4306                    };
4307                }
4308            },
4309            2682 (module1, __unused_rspack_exports, __webpack_require__) {
4310                "use strict";
4311                var isCallable = __webpack_require__(9600);
4312                var toStr = Object.prototype.toString;
4313                var hasOwnProperty = Object.prototype.hasOwnProperty;
4314                var forEachArray = function(array, iterator, receiver) {
4315                    for(var i = 0, len = array.length; i < len; i++)if (hasOwnProperty.call(array, i)) if (null == receiver) iterator(array[i], i, array);
4316                    else iterator.call(receiver, array[i], i, array);
4317                };
4318                var forEachString = function(string, iterator, receiver) {
4319                    for(var i = 0, len = string.length; i < len; i++)if (null == receiver) iterator(string.charAt(i), i, string);
4320                    else iterator.call(receiver, string.charAt(i), i, string);
4321                };
4322                var forEachObject = function(object, iterator, receiver) {
4323                    for(var k in object)if (hasOwnProperty.call(object, k)) if (null == receiver) iterator(object[k], k, object);
4324                    else iterator.call(receiver, object[k], k, object);
4325                };
4326                function isArray(x) {
4327                    return '[object Array]' === toStr.call(x);
4328                }
4329                module1.exports = function(list, iterator, thisArg) {
4330                    if (!isCallable(iterator)) throw new TypeError('iterator must be a function');
4331                    var receiver;
4332                    if (arguments.length >= 3) receiver = thisArg;
4333                    if (isArray(list)) forEachArray(list, iterator, receiver);
4334                    else if ('string' == typeof list) forEachString(list, iterator, receiver);
4335                    else forEachObject(list, iterator, receiver);
4336                };
4337            },
4338            9353 (module1) {
4339                "use strict";
4340                var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
4341                var toStr = Object.prototype.toString;
4342                var max = Math.max;
4343                var funcType = '[object Function]';
4344                var concatty = function(a, b) {
4345                    var arr = [];
4346                    for(var i = 0; i < a.length; i += 1)arr[i] = a[i];
4347                    for(var j = 0; j < b.length; j += 1)arr[j + a.length] = b[j];
4348                    return arr;
4349                };
4350                var slicy = function(arrLike, offset) {
4351                    var arr = [];
4352                    for(var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1)arr[j] = arrLike[i];
4353                    return arr;
4354                };
4355                var joiny = function(arr, joiner) {
4356                    var str = '';
4357                    for(var i = 0; i < arr.length; i += 1){
4358                        str += arr[i];
4359                        if (i + 1 < arr.length) str += joiner;
4360                    }
4361                    return str;
4362                };
4363                module1.exports = function(that) {
4364                    var target = this;
4365                    if ('function' != typeof target || toStr.apply(target) !== funcType) throw new TypeError(ERROR_MESSAGE + target);
4366                    var args = slicy(arguments, 1);
4367                    var bound;
4368                    var binder = function() {
4369                        if (this instanceof bound) {
4370                            var result = target.apply(this, concatty(args, arguments));
4371                            if (Object(result) === result) return result;
4372                            return this;
4373                        }
4374                        return target.apply(that, concatty(args, arguments));
4375                    };
4376                    var boundLength = max(0, target.length - args.length);
4377                    var boundArgs = [];
4378                    for(var i = 0; i < boundLength; i++)boundArgs[i] = '$' + i;
4379                    bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
4380                    if (target.prototype) {
4381                        var Empty = function() {};
4382                        Empty.prototype = target.prototype;
4383                        bound.prototype = new Empty();
4384                        Empty.prototype = null;
4385                    }
4386                    return bound;
4387                };
4388            },
4389            6743 (module1, __unused_rspack_exports, __webpack_require__) {
4390                "use strict";
4391                var implementation = __webpack_require__(9353);
4392                module1.exports = Function.prototype.bind || implementation;
4393            },
4394            4233 (module1) {
4395                "use strict";
4396                const cached = (function*() {}).constructor;
4397                module1.exports = ()=>cached;
4398            },
4399            453 (module1, __unused_rspack_exports, __webpack_require__) {
4400                "use strict";
4401                var undefined;
4402                var $Object = __webpack_require__(9612);
4403                var $Error = __webpack_require__(9383);
4404                var $EvalError = __webpack_require__(1237);
4405                var $RangeError = __webpack_require__(9290);
4406                var $ReferenceError = __webpack_require__(9538);
4407                var $SyntaxError = __webpack_require__(8068);
4408                var $TypeError = __webpack_require__(9675);
4409                var $URIError = __webpack_require__(5345);
4410                var abs = __webpack_require__(1514);
4411                var floor = __webpack_require__(8968);
4412                var max = __webpack_require__(6188);
4413                var min = __webpack_require__(8002);
4414                var pow = __webpack_require__(5880);
4415                var round = __webpack_require__(414);
4416                var sign = __webpack_require__(3093);
4417                var $Function = Function;
4418                var getEvalledConstructor = function(expressionSyntax) {
4419                    try {
4420                        return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
4421                    } catch (e) {}
4422                };
4423                var $gOPD = __webpack_require__(5795);
4424                var $defineProperty = __webpack_require__(655);
4425                var throwTypeError = function() {
4426                    throw new $TypeError();
4427                };
4428                var ThrowTypeError = $gOPD ? function() {
4429                    try {
4430                        arguments.callee;
4431                        return throwTypeError;
4432                    } catch (calleeThrows) {
4433                        try {
4434                            return $gOPD(arguments, 'callee').get;
4435                        } catch (gOPDthrows) {
4436                            return throwTypeError;
4437                        }
4438                    }
4439                }() : throwTypeError;
4440                var hasSymbols = __webpack_require__(4039)();
4441                var getProto = __webpack_require__(3628);
4442                var $ObjectGPO = __webpack_require__(1064);
4443                var $ReflectGPO = __webpack_require__(8648);
4444                var $apply = __webpack_require__(1002);
4445                var $call = __webpack_require__(76);
4446                var needsEval = {};
4447                var TypedArray = "u" > typeof Uint8Array && getProto ? getProto(Uint8Array) : undefined;
4448                var INTRINSICS = {
4449                    __proto__: null,
4450                    '%AggregateError%': "u" < typeof AggregateError ? undefined : AggregateError,
4451                    '%Array%': Array,
4452                    '%ArrayBuffer%': "u" < typeof ArrayBuffer ? undefined : ArrayBuffer,
4453                    '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,
4454                    '%AsyncFromSyncIteratorPrototype%': undefined,
4455                    '%AsyncFunction%': needsEval,
4456                    '%AsyncGenerator%': needsEval,
4457                    '%AsyncGeneratorFunction%': needsEval,
4458                    '%AsyncIteratorPrototype%': needsEval,
4459                    '%Atomics%': "u" < typeof Atomics ? undefined : Atomics,
4460                    '%BigInt%': "u" < typeof BigInt ? undefined : BigInt,
4461                    '%BigInt64Array%': "u" < typeof BigInt64Array ? undefined : BigInt64Array,
4462                    '%BigUint64Array%': "u" < typeof BigUint64Array ? undefined : BigUint64Array,
4463                    '%Boolean%': Boolean,
4464                    '%DataView%': "u" < typeof DataView ? undefined : DataView,
4465                    '%Date%': Date,
4466                    '%decodeURI%': decodeURI,
4467                    '%decodeURIComponent%': decodeURIComponent,
4468                    '%encodeURI%': encodeURI,
4469                    '%encodeURIComponent%': encodeURIComponent,
4470                    '%Error%': $Error,
4471                    '%eval%': eval,
4472                    '%EvalError%': $EvalError,
4473                    '%Float16Array%': "u" < typeof Float16Array ? undefined : Float16Array,
4474                    '%Float32Array%': "u" < typeof Float32Array ? undefined : Float32Array,
4475                    '%Float64Array%': "u" < typeof Float64Array ? undefined : Float64Array,
4476                    '%FinalizationRegistry%': "u" < typeof FinalizationRegistry ? undefined : FinalizationRegistry,
4477                    '%Function%': $Function,
4478                    '%GeneratorFunction%': needsEval,
4479                    '%Int8Array%': "u" < typeof Int8Array ? undefined : Int8Array,
4480                    '%Int16Array%': "u" < typeof Int16Array ? undefined : Int16Array,
4481                    '%Int32Array%': "u" < typeof Int32Array ? undefined : Int32Array,
4482                    '%isFinite%': isFinite,
4483                    '%isNaN%': isNaN,
4484                    '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,
4485                    '%JSON%': 'object' == typeof JSON ? JSON : undefined,
4486                    '%Map%': "u" < typeof Map ? undefined : Map,
4487                    '%MapIteratorPrototype%': "u" > typeof Map && hasSymbols && getProto ? getProto(new Map()[Symbol.iterator]()) : undefined,
4488                    '%Math%': Math,
4489                    '%Number%': Number,
4490                    '%Object%': $Object,
4491                    "%Object.getOwnPropertyDescriptor%": $gOPD,
4492                    '%parseFloat%': parseFloat,
4493                    '%parseInt%': parseInt,
4494                    '%Promise%': "u" < typeof Promise ? undefined : Promise,
4495                    '%Proxy%': "u" < typeof Proxy ? undefined : Proxy,
4496                    '%RangeError%': $RangeError,
4497                    '%ReferenceError%': $ReferenceError,
4498                    '%Reflect%': "u" < typeof Reflect ? undefined : Reflect,
4499                    '%RegExp%': RegExp,
4500                    '%Set%': "u" < typeof Set ? undefined : Set,
4501                    '%SetIteratorPrototype%': "u" > typeof Set && hasSymbols && getProto ? getProto(new Set()[Symbol.iterator]()) : undefined,
4502                    '%SharedArrayBuffer%': "u" < typeof SharedArrayBuffer ? undefined : SharedArrayBuffer,
4503                    '%String%': String,
4504                    '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,
4505                    '%Symbol%': hasSymbols ? Symbol : undefined,
4506                    '%SyntaxError%': $SyntaxError,
4507                    '%ThrowTypeError%': ThrowTypeError,
4508                    '%TypedArray%': TypedArray,
4509                    '%TypeError%': $TypeError,
4510                    '%Uint8Array%': "u" < typeof Uint8Array ? undefined : Uint8Array,
4511                    '%Uint8ClampedArray%': "u" < typeof Uint8ClampedArray ? undefined : Uint8ClampedArray,
4512                    '%Uint16Array%': "u" < typeof Uint16Array ? undefined : Uint16Array,
4513                    '%Uint32Array%': "u" < typeof Uint32Array ? undefined : Uint32Array,
4514                    '%URIError%': $URIError,
4515                    '%WeakMap%': "u" < typeof WeakMap ? undefined : WeakMap,
4516                    '%WeakRef%': "u" < typeof WeakRef ? undefined : WeakRef,
4517                    '%WeakSet%': "u" < typeof WeakSet ? undefined : WeakSet,
4518                    '%Function.prototype.call%': $call,
4519                    '%Function.prototype.apply%': $apply,
4520                    '%Object.defineProperty%': $defineProperty,
4521                    '%Object.getPrototypeOf%': $ObjectGPO,
4522                    '%Math.abs%': abs,
4523                    '%Math.floor%': floor,
4524                    '%Math.max%': max,
4525                    '%Math.min%': min,
4526                    '%Math.pow%': pow,
4527                    '%Math.round%': round,
4528                    '%Math.sign%': sign,
4529                    '%Reflect.getPrototypeOf%': $ReflectGPO
4530                };
4531                if (getProto) try {
4532                    null.error;
4533                } catch (e) {
4534                    var errorProto = getProto(getProto(e));
4535                    INTRINSICS['%Error.prototype%'] = errorProto;
4536                }
4537                var doEval = function doEval(name) {
4538                    var value;
4539                    if ('%AsyncFunction%' === name) value = getEvalledConstructor('async function () {}');
4540                    else if ('%GeneratorFunction%' === name) value = getEvalledConstructor('function* () {}');
4541                    else if ('%AsyncGeneratorFunction%' === name) value = getEvalledConstructor('async function* () {}');
4542                    else if ('%AsyncGenerator%' === name) {
4543                        var fn = doEval('%AsyncGeneratorFunction%');
4544                        if (fn) value = fn.prototype;
4545                    } else if ('%AsyncIteratorPrototype%' === name) {
4546                        var gen = doEval('%AsyncGenerator%');
4547                        if (gen && getProto) value = getProto(gen.prototype);
4548                    }
4549                    INTRINSICS[name] = value;
4550                    return value;
4551                };
4552                var LEGACY_ALIASES = {
4553                    __proto__: null,
4554                    '%ArrayBufferPrototype%': [
4555                        'ArrayBuffer',
4556                        'prototype'
4557                    ],
4558                    '%ArrayPrototype%': [
4559                        'Array',
4560                        'prototype'
4561                    ],
4562                    '%ArrayProto_entries%': [
4563                        'Array',
4564                        'prototype',
4565                        'entries'
4566                    ],
4567                    '%ArrayProto_forEach%': [
4568                        'Array',
4569                        'prototype',
4570                        'forEach'
4571                    ],
4572                    '%ArrayProto_keys%': [
4573                        'Array',
4574                        'prototype',
4575                        'keys'
4576                    ],
4577                    '%ArrayProto_values%': [
4578                        'Array',
4579                        'prototype',
4580                        'values'
4581                    ],
4582                    '%AsyncFunctionPrototype%': [
4583                        'AsyncFunction',
4584                        'prototype'
4585                    ],
4586                    '%AsyncGenerator%': [
4587                        'AsyncGeneratorFunction',
4588                        'prototype'
4589                    ],
4590                    '%AsyncGeneratorPrototype%': [
4591                        'AsyncGeneratorFunction',
4592                        'prototype',
4593                        'prototype'
4594                    ],
4595                    '%BooleanPrototype%': [
4596                        'Boolean',
4597                        'prototype'
4598                    ],
4599                    '%DataViewPrototype%': [
4600                        'DataView',
4601                        'prototype'
4602                    ],
4603                    '%DatePrototype%': [
4604                        'Date',
4605                        'prototype'
4606                    ],
4607                    '%ErrorPrototype%': [
4608                        'Error',
4609                        'prototype'
4610                    ],
4611                    '%EvalErrorPrototype%': [
4612                        'EvalError',
4613                        'prototype'
4614                    ],
4615                    '%Float32ArrayPrototype%': [
4616                        'Float32Array',
4617                        'prototype'
4618                    ],
4619                    '%Float64ArrayPrototype%': [
4620                        'Float64Array',
4621                        'prototype'
4622                    ],
4623                    '%FunctionPrototype%': [
4624                        'Function',
4625                        'prototype'
4626                    ],
4627                    '%Generator%': [
4628                        'GeneratorFunction',
4629                        'prototype'
4630                    ],
4631                    '%GeneratorPrototype%': [
4632                        'GeneratorFunction',
4633                        'prototype',
4634                        'prototype'
4635                    ],
4636                    '%Int8ArrayPrototype%': [
4637                        'Int8Array',
4638                        'prototype'
4639                    ],
4640                    '%Int16ArrayPrototype%': [
4641                        'Int16Array',
4642                        'prototype'
4643                    ],
4644                    '%Int32ArrayPrototype%': [
4645                        'Int32Array',
4646                        'prototype'
4647                    ],
4648                    '%JSONParse%': [
4649                        'JSON',
4650                        'parse'
4651                    ],
4652                    '%JSONStringify%': [
4653                        'JSON',
4654                        'stringify'
4655                    ],
4656                    '%MapPrototype%': [
4657                        'Map',
4658                        'prototype'
4659                    ],
4660                    '%NumberPrototype%': [
vendor: 5,800 bytes, lines 4661-4798
4661                        'Number',
4662                        'prototype'
4663                    ],
4664                    '%ObjectPrototype%': [
4665                        'Object',
4666                        'prototype'
4667                    ],
4668                    '%ObjProto_toString%': [
4669                        'Object',
4670                        'prototype',
4671                        'toString'
4672                    ],
4673                    '%ObjProto_valueOf%': [
4674                        'Object',
4675                        'prototype',
4676                        'valueOf'
4677                    ],
4678                    '%PromisePrototype%': [
4679                        'Promise',
4680                        'prototype'
4681                    ],
4682                    '%PromiseProto_then%': [
4683                        'Promise',
4684                        'prototype',
4685                        'then'
4686                    ],
4687                    '%Promise_all%': [
4688                        'Promise',
4689                        'all'
4690                    ],
4691                    '%Promise_reject%': [
4692                        'Promise',
4693                        'reject'
4694                    ],
4695                    '%Promise_resolve%': [
4696                        'Promise',
4697                        'resolve'
4698                    ],
4699                    '%RangeErrorPrototype%': [
4700                        'RangeError',
4701                        'prototype'
4702                    ],
4703                    '%ReferenceErrorPrototype%': [
4704                        'ReferenceError',
4705                        'prototype'
4706                    ],
4707                    '%RegExpPrototype%': [
4708                        'RegExp',
4709                        'prototype'
4710                    ],
4711                    '%SetPrototype%': [
4712                        'Set',
4713                        'prototype'
4714                    ],
4715                    '%SharedArrayBufferPrototype%': [
4716                        'SharedArrayBuffer',
4717                        'prototype'
4718                    ],
4719                    '%StringPrototype%': [
4720                        'String',
4721                        'prototype'
4722                    ],
4723                    '%SymbolPrototype%': [
4724                        'Symbol',
4725                        'prototype'
4726                    ],
4727                    '%SyntaxErrorPrototype%': [
4728                        'SyntaxError',
4729                        'prototype'
4730                    ],
4731                    '%TypedArrayPrototype%': [
4732                        'TypedArray',
4733                        'prototype'
4734                    ],
4735                    '%TypeErrorPrototype%': [
4736                        'TypeError',
4737                        'prototype'
4738                    ],
4739                    '%Uint8ArrayPrototype%': [
4740                        'Uint8Array',
4741                        'prototype'
4742                    ],
4743                    '%Uint8ClampedArrayPrototype%': [
4744                        'Uint8ClampedArray',
4745                        'prototype'
4746                    ],
4747                    '%Uint16ArrayPrototype%': [
4748                        'Uint16Array',
4749                        'prototype'
4750                    ],
4751                    '%Uint32ArrayPrototype%': [
4752                        'Uint32Array',
4753                        'prototype'
4754                    ],
4755                    '%URIErrorPrototype%': [
4756                        'URIError',
4757                        'prototype'
4758                    ],
4759                    '%WeakMapPrototype%': [
4760                        'WeakMap',
4761                        'prototype'
4762                    ],
4763                    '%WeakSetPrototype%': [
4764                        'WeakSet',
4765                        'prototype'
4766                    ]
4767                };
4768                var bind = __webpack_require__(6743);
4769                var hasOwn = __webpack_require__(9957);
4770                var $concat = bind.call($call, Array.prototype.concat);
4771                var $spliceApply = bind.call($apply, Array.prototype.splice);
4772                var $replace = bind.call($call, String.prototype.replace);
4773                var $strSlice = bind.call($call, String.prototype.slice);
4774                var $exec = bind.call($call, RegExp.prototype.exec);
4775                var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
4776                var reEscapeChar = /\\(\\)?/g;
4777                var stringToPath = function(string) {
4778                    var first = $strSlice(string, 0, 1);
4779                    var last = $strSlice(string, -1);
4780                    if ('%' === first && '%' !== last) throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
4781                    if ('%' === last && '%' !== first) throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
4782                    var result = [];
4783                    $replace(string, rePropName, function(match, number, quote, subString) {
4784                        result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
4785                    });
4786                    return result;
4787                };
4788                var getBaseIntrinsic = function(name, allowMissing) {
4789                    var intrinsicName = name;
4790                    var alias;
4791                    if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
4792                        alias = LEGACY_ALIASES[intrinsicName];
4793                        intrinsicName = '%' + alias[0] + '%';
4794                    }
4795                    if (hasOwn(INTRINSICS, intrinsicName)) {
4796                        var value = INTRINSICS[intrinsicName];
4797                        if (value === needsEval) value = doEval(intrinsicName);
4798                        if (void 0 === value && !allowMissing) throw new $TypeError('intrinsic ' + n
4798ame + ' exists, but is not available. Please file an issue!');
4799                        return {
4800                            alias: alias,
4801                            name: intrinsicName,
4802                            value: value
4803                        };
4804                    }
4805                    throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
4806                };
4807                module1.exports = function(name, allowMissing) {
4808                    if ('string' != typeof name || 0 === name.length) throw new $TypeError('intrinsic name must be a non-empty string');
4809                    if (arguments.length > 1 && 'boolean' != typeof allowMissing) throw new $TypeError('"allowMissing" argument must be a boolean');
4810                    if (null === $exec(/^%?[^%]*%?$/, name)) throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
4811                    var parts = stringToPath(name);
4812                    var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
4813                    var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
4814                    var intrinsicRealName = intrinsic.name;
4815                    var value = intrinsic.value;
4816                    var skipFurtherCaching = false;
4817                    var alias = intrinsic.alias;
4818                    if (alias) {
4819                        intrinsicBaseName = alias[0];
4820                        $spliceApply(parts, $concat([
4821                            0,
4822                            1
4823                        ], alias));
4824                    }
4825                    for(var i = 1, isOwn = true; i < parts.length; i += 1){
4826                        var part = parts[i];
4827                        var first = $strSlice(part, 0, 1);
4828                        var last = $strSlice(part, -1);
4829                        if (('"' === first || "'" === first || '`' === first || '"' === last || "'" === last || '`' === last) && first !== last) throw new $SyntaxError('property names with quotes must have matching quotes');
4830                        if ('constructor' === part || !isOwn) skipFurtherCaching = true;
4831                        intrinsicBaseName += '.' + part;
4832                        intrinsicRealName = '%' + intrinsicBaseName + '%';
4833                        if (hasOwn(INTRINSICS, intrinsicRealName)) value = INTRINSICS[intrinsicRealName];
4834                        else if (null != value) {
4835                            if (!(part in value)) {
4836                                if (!allowMissing) throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
4837                                return;
4838                            }
4839                            if ($gOPD && i + 1 >= parts.length) {
4840                                var desc = $gOPD(value, part);
4841                                isOwn = !!desc;
4842                                value = isOwn && 'get' in desc && !('originalValue' in desc.get) ? desc.get : value[part];
4843                            } else {
4844                                isOwn = hasOwn(value, part);
4845                                value = value[part];
4846                            }
4847                            if (isOwn && !skipFurtherCaching) INTRINSICS[intrinsicRealName] = value;
4848                        }
4849                    }
4850                    return value;
4851                };
4852            },
4853            1064 (module1, __unused_rspack_exports, __webpack_require__) {
4854                "use strict";
4855                var $Object = __webpack_require__(9612);
4856                module1.exports = $Object.getPrototypeOf || null;
4857            },
4858            8648 (module1) {
4859                "use strict";
4860                module1.exports = "u" > typeof Reflect && Reflect.getPrototypeOf || null;
4861            },
4862            3628 (module1, __unused_rspack_exports, __webpack_require__) {
4863                "use strict";
4864                var reflectGetProto = __webpack_require__(8648);
4865                var originalGetProto = __webpack_require__(1064);
4866                var getDunderProto = __webpack_require__(7176);
4867                module1.exports = reflectGetProto ? function(O) {
4868                    return reflectGetProto(O);
4869                } : originalGetProto ? function(O) {
4870                    if (!O || 'object' != typeof O && 'function' != typeof O) throw new TypeError('getProto: not an object');
4871                    return originalGetProto(O);
4872                } : getDunderProto ? function(O) {
4873                    return getDunderProto(O);
4874                } : null;
4875            },
4876            1068 (module1) {
4877                module1.exports = Event;
4878                function Event() {
4879                    var listeners = [];
4880                    return {
4881                        broadcast: broadcast,
4882                        listen: event
4883                    };
4884                    function broadcast(value) {
4885                        for(var i = 0; i < listeners.length; i++)listeners[i](value);
4886                    }
4887                    function event(listener) {
4888                        listeners.push(listener);
4889                        return removeListener;
4890                        function removeListener() {
4891                            var index = listeners.indexOf(listener);
4892                            if (-1 !== index) listeners.splice(index, 1);
4893                        }
4894                    }
4895                }
4896            },
4897            6591 (module1, __unused_rspack_exports, __webpack_require__) {
4898                var Event = __webpack_require__(1068);
4899                module1.exports = Source;
4900                function Source(broadcaster) {
4901                    var tuple = Event();
4902                    broadcaster(tuple.broadcast);
4903                    return tuple.listen;
4904                }
4905            },
4906            9697 (module1, __unused_rspack_exports, __webpack_require__) {
4907                var topLevel = void 0 !== __webpack_require__.g ? __webpack_require__.g : "u" > typeof window ? window : {};
4908                var minDoc = __webpack_require__(1345);
4909                var doccy;
4910                if ("u" > typeof document) doccy = document;
4911                else {
4912                    doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];
4913                    if (!doccy) doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;
4914                }
4915                module1.exports = doccy;
4916            },
4917            6549 (module1) {
4918                "use strict";
4919                module1.exports = Object.getOwnPropertyDescriptor;
4920            },
4921            5795 (module1, __unused_rspack_exports, __webpack_require__) {
4922                "use strict";
4923                var $gOPD = __webpack_require__(6549);
4924                if ($gOPD) try {
4925                    $gOPD([], 'length');
4926                } catch (e) {
4927                    $gOPD = null;
4928                }
4929                module1.exports = $gOPD;
4930            },
4931            592 (module1, __unused_rspack_exports, __webpack_require__) {
4932                "use strict";
4933                var $defineProperty = __webpack_require__(655);
4934                var hasPropertyDescriptors = function() {
4935                    return !!$defineProperty;
4936                };
4937                hasPropertyDescriptors.hasArrayLengthDefineBug = function() {
4938                    if (!$defineProperty) return null;
4939                    try {
4940                        return 1 !== $defineProperty([], 'length', {
4941                            value: 1
4942                        }).length;
4943                    } catch (e) {
4944                        return true;
4945                    }
4946                };
4947                module1.exports = hasPropertyDescriptors;
4948            },
4949            4039 (module1, __unused_rspack_exports, __webpack_require__) {
4950                "use strict";
4951                var origSymbol = "u" > typeof Symbol && Symbol;
4952                var hasSymbolSham = __webpack_require__(1333);
4953                module1.exports = function() {
4954                    if ('function' != typeof origSymbol) return false;
4955                    if ('function' != typeof Symbol) return false;
4956                    if ('symbol' != typeof origSymbol('foo')) return false;
4957                    if ('symbol' != typeof Symbol('bar')) return false;
4958                    return hasSymbolSham();
4959                };
4960            },
4961            1333 (module1) {
4962                "use strict";
4963                module1.exports = function() {
4964                    if ('function' != typeof Symbol || 'function' != typeof Object.getOwnPropertySymbols) return false;
4965                    if ('symbol' == typeof Symbol.iterator) return true;
4966                    var obj = {};
4967                    var sym = Symbol('test');
4968                    var symObj = Object(sym);
4969                    if ('string' == typeof sym) return false;
4970                    if ('[object Symbol]' !== Object.prototype.toString.call(sym)) return false;
4971                    if ('[object Symbol]' !== Object.prototype.toString.call(symObj)) return false;
4972                    var symVal = 42;
4973                    obj[sym] = symVal;
4974                    for(var _ in obj)return false;
4975                    if ('function' == typeof Object.keys && 0 !== Object.keys(obj).length) return false;
4976                    if ('function' == typeof Object.getOwnPropertyNames && 0 !== Object.getOwnPropertyNames(obj).length) return false;
4977                    var syms = Object.getOwnPropertySymbols(obj);
4978                    if (1 !== syms.length || syms[0] !== sym) return false;
4979                    if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) return false;
4980                    if ('function' == typeof Object.getOwnPropertyDescriptor) {
4981                        var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
4982                        if (descriptor.value !== symVal || true !== descriptor.enumerable) return false;
4983                    }
4984                    return true;
4985                };
4986            },
4987            9092 (module1, __unused_rspack_exports, __webpack_require__) {
4988                "use strict";
4989                var hasSymbols = __webpack_require__(1333);
4990                module1.exports = function() {
4991                    return hasSymbols() && !!Symbol.toStringTag;
4992                };
4993            },
4994            9957 (module1, __unused_rspack_exports, __webpack_require__) {
4995                "use strict";
4996                var call = Function.prototype.call;
4997                var $hasOwn = Object.prototype.hasOwnProperty;
4998                var bind = __webpack_require__(6743);
4999                module1.exports = bind.call(call, $hasOwn);
5000            },
5001            251 (__unused_rspack_module, exports1) {
5002                /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ exports1.read = function(buffer, offset, isLE, mLen, nBytes) {
5003                    var e, m;
5004                    var eLen = 8 * nBytes - mLen - 1;
5005                    var eMax = (1 << eLen) - 1;
5006                    var eBias = eMax >> 1;
5007                    var nBits = -7;
5008                    var i = isLE ? nBytes - 1 : 0;
5009                    var d = isLE ? -1 : 1;
5010                    var s = buffer[offset + i];
5011                    i += d;
5012                    e = s & (1 << -nBits) - 1;
5013                    s >>= -nBits;
5014                    nBits += eLen;
5015                    for(; nBits > 0; e = 256 * e + buffer[offset + i], i += d, nBits -= 8);
5016                    m = e & (1 << -nBits) - 1;
5017                    e >>= -nBits;
5018                    nBits += mLen;
5019                    for(; nBits > 0; m = 256 * m + buffer[offset + i], i += d, nBits -= 8);
5020                    if (0 === e) e = 1 - eBias;
5021                    else {
5022                        if (e === eMax) return m ? NaN : 1 / 0 * (s ? -1 : 1);
5023                        m += Math.pow(2, mLen);
5024                        e -= eBias;
5025                    }
5026                    return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
5027                };
5028                exports1.write = function(buffer, value, offset, isLE, mLen, nBytes) {
5029                    var e, m, c;
5030                    var eLen = 8 * nBytes - mLen - 1;
5031                    var eMax = (1 << eLen) - 1;
5032                    var eBias = eMax >> 1;
5033                    var rt = 23 === mLen ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
5034                    var i = isLE ? 0 : nBytes - 1;
5035                    var d = isLE ? 1 : -1;
5036                    var s = value < 0 || 0 === value && 1 / value < 0 ? 1 : 0;
5037                    value = Math.abs(value);
5038                    if (isNaN(value) || value === 1 / 0) {
5039                        m = isNaN(value) ? 1 : 0;
5040                        e = eMax;
5041                    } else {
5042                        e = Math.floor(Math.log(value) / Math.LN2);
5043                        if (value * (c = Math.pow(2, -e)) < 1) {
5044                            e--;
5045                            c *= 2;
5046                        }
5047                        if (e + eBias >= 1) value += rt / c;
5048                        else value += rt * Math.pow(2, 1 - eBias);
5049                        if (value * c >= 2) {
5050                            e++;
5051                            c /= 2;
5052                        }
5053                        if (e + eBias >= eMax) {
5054                            m = 0;
5055                            e = eMax;
5056                        } else if (e + eBias >= 1) {
5057                            m = (value * c - 1) * Math.pow(2, mLen);
5058                            e += eBias;
5059                        } else {
5060                            m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
5061                            e = 0;
5062                        }
5063                    }
5064                    for(; mLen >= 8; buffer[offset + i] = 0xff & m, i += d, m /= 256, mLen -= 8);
5065                    e = e << mLen | m;
5066                    eLen += mLen;
5067                    for(; eLen > 0;
5067 buffer[offset + i] = 0xff & e, i += d, e /= 256, eLen -= 8);
5068                    buffer[offset + i - d] |= 128 * s;
5069                };
5070            },
5071            6698 (module1) {
5072                if ('function' == typeof Object.create) module1.exports = function(ctor, superCtor) {
5073                    if (superCtor) {
5074                        ctor.super_ = superCtor;
5075                        ctor.prototype = Object.create(superCtor.prototype, {
5076                            constructor: {
5077                                value: ctor,
5078                                enumerable: false,
5079                                writable: true,
5080                                configurable: true
5081                            }
5082                        });
5083                    }
5084                };
5085                else module1.exports = function(ctor, superCtor) {
5086                    if (superCtor) {
5087                        ctor.super_ = superCtor;
5088                        var TempCtor = function() {};
5089                        TempCtor.prototype = superCtor.prototype;
5090                        ctor.prototype = new TempCtor();
5091                        ctor.prototype.constructor = ctor;
5092                    }
5093                };
5094            },
5095            7244 (module1, __unused_rspack_exports, __webpack_require__) {
5096                "use strict";
5097                var hasToStringTag = __webpack_require__(9092)();
5098                var callBound = __webpack_require__(6556);
5099                var $toString = callBound('Object.prototype.toString');
5100                var isStandardArguments = function(value) {
5101                    if (hasToStringTag && value && 'object' == typeof value && Symbol.toStringTag in value) return false;
5102                    return '[object Arguments]' === $toString(value);
5103                };
5104                var isLegacyArguments = function(value) {
5105                    if (isStandardArguments(value)) return true;
5106                    return null !== value && 'object' == typeof value && 'length' in value && 'number' == typeof value.length && value.length >= 0 && '[object Array]' !== $toString(value) && 'callee' in value && '[object Function]' === $toString(value.callee);
5107                };
5108                var supportsStandardArguments = function() {
5109                    return isStandardArguments(arguments);
5110                }();
5111                isStandardArguments.isLegacyArguments = isLegacyArguments;
5112                module1.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
5113            },
5114            9600 (module1) {
5115                "use strict";
5116                var fnToStr = Function.prototype.toString;
5117                var reflectApply = 'object' == typeof Reflect && null !== Reflect && Reflect.apply;
5118                var badArrayLike;
5119                var isCallableMarker;
5120                if ('function' == typeof reflectApply && 'function' == typeof Object.defineProperty) try {
5121                    badArrayLike = Object.defineProperty({}, 'length', {
5122                        get: function() {
5123                            throw isCallableMarker;
5124                        }
5125                    });
5126                    isCallableMarker = {};
5127                    reflectApply(function() {
5128                        throw 42;
5129                    }, null, badArrayLike);
5130                } catch (_) {
5131                    if (_ !== isCallableMarker) reflectApply = null;
5132                }
5133                else reflectApply = null;
5134                var constructorRegex = /^\s*class\b/;
5135                var isES6ClassFn = function(value) {
5136                    try {
5137                        var fnStr = fnToStr.call(value);
5138                        return constructorRegex.test(fnStr);
5139                    } catch (e) {
5140                        return false;
5141                    }
5142                };
5143                var tryFunctionObject = function(value) {
5144                    try {
5145                        if (isES6ClassFn(value)) return false;
5146                        fnToStr.call(value);
5147                        return true;
5148                    } catch (e) {
5149                        return false;
5150                    }
5151                };
5152                var toStr = Object.prototype.toString;
5153                var objectClass = '[object Object]';
5154                var fnClass = '[object Function]';
5155                var genClass = '[object GeneratorFunction]';
5156                var ddaClass = '[object HTMLAllCollection]';
5157                var ddaClass2 = '[object HTML document.all class]';
5158                var ddaClass3 = '[object HTMLCollection]';
5159                var hasToStringTag = 'function' == typeof Symbol && !!Symbol.toStringTag;
5160                var isIE68 = !(0 in [
5161                    , 
5162                ]);
5163                var isDDA = function() {
5164                    return false;
5165                };
5166                if ('object' == typeof document) {
5167                    var all = document.all;
5168                    if (toStr.call(all) === toStr.call(document.all)) isDDA = function(value) {
5169                        if ((isIE68 || !value) && (void 0 === value || 'object' == typeof value)) try {
5170                            var str = toStr.call(value);
5171                            return (str === ddaClass || str === ddaClass2 || str === ddaClass3 || str === objectClass) && null == value('');
5172                        } catch (e) {}
5173                        return false;
5174                    };
5175                }
5176                module1.exports = reflectApply ? function(value) {
5177                    if (isDDA(value)) return true;
5178                    if (!value) return false;
5179                    if ('function' != typeof value && 'object' != typeof value) return false;
5180                    try {
5181                        reflectApply(value, null, badArrayLike);
5182                    } catch (e) {
5183                        if (e !== isCallableMarker) return false;
5184                    }
5185                    return !isES6ClassFn(value) && tryFunctionObject(value);
5186                } : function(value) {
5187                    if (isDDA(value)) return true;
5188                    if (!value) return false;
5189                    if ('function' != typeof value && 'object' != typeof value) return false;
5190                    if (hasToStringTag) return tryFunctionObject(value);
5191                    if (isES6ClassFn(value)) return false;
5192                    var strClass = toStr.call(value);
5193                    if (strClass !== fnClass && strClass !== genClass && !/^\[object HTML/.test(strClass)) return false;
5194                    return tryFunctionObject(value);
5195                };
5196            },
5197            8184 (module1, __unused_rspack_exports, __webpack_require__) {
5198                "use strict";
5199                var callBound = __webpack_require__(6556);
5200                var safeRegexTest = __webpack_require__(9721);
5201                var isFnRegex = safeRegexTest(/^\s*(?:function)?\*/);
5202                var hasToStringTag = __webpack_require__(9092)();
5203                var getProto = __webpack_require__(3628);
5204                var toStr = callBound('Object.prototype.toString');
5205                var fnToStr = callBound('Function.prototype.toString');
5206                var getGeneratorFunction = __webpack_require__(4233);
5207                module1.exports = function(fn) {
5208                    if ('function' != typeof fn) return false;
5209                    if (isFnRegex(fnToStr(fn))) return true;
5210                    if (!hasToStringTag) {
5211                        var str = toStr(fn);
5212                        return '[object GeneratorFunction]' === str;
5213                    }
5214                    if (!getProto) return false;
5215                    var GeneratorFunction = getGeneratorFunction();
5216                    return GeneratorFunction && getProto(fn) === GeneratorFunction.prototype;
5217                };
5218            },
5219            8646 (module1) {
5220                module1.exports = isPowerOfTwo;
5221                function isPowerOfTwo(n) {
5222                    return 0 !== n && (n & n - 1) === 0;
5223                }
5224            },
5225            4035 (module1, __unused_rspack_exports, __webpack_require__) {
5226                "use strict";
5227                var callBound = __webpack_require__(6556);
5228                var hasToStringTag = __webpack_require__(9092)();
5229                var hasOwn = __webpack_require__(9957);
5230                var gOPD = __webpack_require__(5795);
5231                var fn;
5232                if (hasToStringTag) {
5233                    var $exec = callBound('RegExp.prototype.exec');
5234                    var isRegexMarker = {};
5235                    var throwRegexMarker = function() {
5236                        throw isRegexMarker;
5237                    };
5238                    var badStringifier = {
5239                        toString: throwRegexMarker,
5240                        valueOf: throwRegexMarker
5241                    };
5242                    if ('symbol' == typeof Symbol.toPrimitive) badStringifier[Symbol.toPrimitive] = throwRegexMarker;
5243                    fn = function(value) {
5244                        if (!value || 'object' != typeof value) return false;
5245                        var descriptor = gOPD(value, 'lastIndex');
5246                        var hasLastIndexDataProperty = descriptor && hasOwn(descriptor, 'value');
5247                        if (!hasLastIndexDataProperty) return false;
5248                        try {
5249                            $exec(value, badStringifier);
5250                        } catch (e) {
5251                            return e === isRegexMarker;
5252                        }
5253                    };
5254                } else {
5255                    var $toString = callBound('Object.prototype.toString');
5256                    var regexClass = '[object RegExp]';
5257                    fn = function(value) {
5258                        if (!value || 'object' != typeof value && 'function' != typeof value) return false;
5259                        return $toString(value) === regexClass;
5260                    };
5261                }
5262                module1.exports = fn;
5263            },
5264            5680 (module1, __unused_rspack_exports, __webpack_require__) {
5265                "use strict";
5266                var whichTypedArray = __webpack_require__(5767);
5267                module1.exports = function(value) {
5268                    return !!whichTypedArray(value);
5269                };
5270            },
5271            1514 (module1) {
5272                "use strict";
5273                module1.exports = Math.abs;
5274            },
5275            8968 (module1) {
5276                "use strict";
5277                module1.exports = Math.floor;
5278            },
5279            4459 (module1) {
5280                "use strict";
5281                module1.exports = Number.isNaN || function(a) {
5282                    return a !== a;
5283                };
5284            },
5285            6188 (module1) {
5286                "use strict";
5287                module1.exports = Math.max;
5288            },
5289            8002 (module1) {
5290                "use strict";
5291                module1.exports = Math.min;
5292            },
5293            5880 (module1) {
5294                "use strict";
5295                module1.exports = Math.pow;
5296            },
5297            414 (module1) {
5298                "use strict";
5299                module1.exports = Math.round;
5300            },
5301            3093 (module1, __unused_rspack_exports, __webpack_require__) {
5302                "use strict";
5303                var $isNaN = __webpack_require__(4459);
5304                module1.exports = function(number) {
5305                    if ($isNaN(number) || 0 === number) return number;
5306                    return number < 0 ? -1 : 1;
5307                };
5308            },
5309            8859 (module1, __unused_rspack_exports, __webpack_require__) {
5310                var hasMap = 'function' == typeof Map && Map.prototype;
5311                var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
5312                var mapSize = hasMap && mapSizeDescriptor && 'function' == typeof mapSizeDescriptor.get ? mapSizeDescriptor.get : null;
5313                var mapForEach = hasMap && Map.prototype.forEach;
5314                var hasSet = 'function' == typeof Set && Set.prototype;
5315                var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
5316                var setSize = hasSet && setSizeDescriptor && 'function' == typeof setSizeDescriptor.get ? setSizeDescriptor.get : null;
5317                var setForEach = hasSet && Set.prototype.forEach;
5318                var hasWeakMap = 'function' == typeof WeakMap && WeakMap.prototype;
5319                var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
5320                var hasWeakSet = 'function' == typeof WeakSet && WeakSet.prototype;
5321                var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
5322                var hasWeakRef = 'function' == typeof WeakRef && WeakRef.prototype;
5323                var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
5324                var booleanValueOf = Boolean.prototype.valueOf;
5325                var objectToString = Object.prototype.toString;
5326                var functionToString = Function.prototype.toString;
5327                var $match = String.prototype.match;
5328                var $slice = String.prototype.slice;
5329                var $replace = String.prototype.replace;
5330                var $toUpperCase = String.prototype.toUpperCase;
5331                var $toLowerCase = String.prototype.toLowerCase;
5332                var $test = RegExp.prototype.test;
5333                var $concat = Array.prototype.concat;
5334                var $join = Array.prototype.join;
5335                var $arrSlice = Array.prototype.slice;
5336                var $floor = Math.floor;
5337                var bigIntValueOf = 'function' == typeof BigInt ? BigInt.prototype.valueOf : null;
5338                var gOPS = Object.getOwnPropertySymbols;
5339                var symToString = 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator ? Symbol.prototype.toString : null;
5340                var hasShammedSymbols = 'function' == typeof Symbol && 'object' == typeof Symbol.iterator;
5341                var toStringTag = 'function' == typeof Symbol && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') ? Symbol.toStringTag : null;
5342                var isEnumerable = Object.prototype.propertyIsEnumerable;
5343                var gPO = ('function' == typeof Reflect ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
5344                    return O.__proto__;
5345                } : null);
5346                function addNumericSeparator(num, str) {
5347                    if (num === 1 / 0 || num === -1 / 0 || num !== num || num && num > -1000 && num < 1000 || $test.call(/e/, str)) return str;
5348                    var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
5349                    if ('number' == typeof num) {
5350                        var int = num < 0 ? -$floor(-num) : $floor(num);
5351                        if (int !== num) {
5352                            var intStr = String(int);
5353                            var dec = $slice.call(str, intStr.length + 1);
5354                            return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
5355                        }
5356                    }
5357                    return $replace.call(str, sepRegex, '$&_');
5358                }
5359                var utilInspect = __webpack_require__(4892);
5360                var inspectCustom = utilInspect.custom;
5361                var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
5362                var quotes = {
5363                    __proto__: null,
5364                    double: '"',
5365                    single: "'"
5366                };
5367                var quoteREs = {
5368                    __proto__: null,
5369                    double: /(["\\])/g,
5370                    single: /(['\\])/g
5371                };
5372                module1.exports = function inspect_(obj, options, depth, seen) {
5373                    var opts = options || {};
5374                    if (has(opts, 'quoteStyle') && !has(quotes, opts.quoteStyle)) throw new TypeError('option "quoteStyle" must be "single" or "double"');
5375                    if (has(opts, 'maxStringLength') && ('number' == typeof opts.maxStringLength ? opts.maxStringLength < 0 && opts.maxStringLength !== 1 / 0 : null !== opts.maxStringLength)) throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
5376                    var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
5377                    if ('boolean' != typeof customInspect && 'symbol' !== customInspect) throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
5378                    if (has(opts, 'indent') && null !== opts.indent && '\t' !== opts.indent && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
5379                    if (has(opts, 'numericSeparator') && 'boolean' != typeof opts.numericSeparator) throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
5380                    var numericSeparator = opts.numericSeparator;
5381                    if (void 0 === obj) return 'undefined';
5382                    if (null === obj) return 'null';
5383                    if ('boolean' == typeof obj) return obj ? 'true' : 'false';
5384                    if ('string' == typeof obj) return inspectString(obj, opts);
5385                    if ('number' == typeof obj) {
5386                        if (0 === obj) return 1 / 0 / obj > 0 ? '0' : '-0';
5387                        var str = String(obj);
5388                        return numericSeparator ? addNumericSeparator(obj, str) : str;
5389                    }
5390                    if ('bigint' == typeof obj) {
5391                        var bigIntStr = String(obj) + 'n';
5392                        return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
5393                    }
5394                    var maxDepth = void 0 === opts.depth ? 5 : opts.depth;
5395                    if (void 0 === depth) depth = 0;
5396                    if (depth >= maxDepth && maxDepth > 0 && 'object' == typeof obj) return isArray(obj) ? '[Array]' : '[Object]';
5397                    var indent = getIndent(opts, depth);
5398                    if (void 0 === seen) seen = [];
5399                    else if (indexOf(seen, obj) >= 0) return '[Circular]';
5400                    function inspect(value, from, noIndent) {
5401                        if (from) {
5402                            seen = $arrSlice.call(seen);
5403                            seen.push(from);
5404                        }
5405                        if (noIndent) {
5406                            var newOpts = {
5407                                depth: opts.depth
5408                            };
5409                            if (has(opts, 'quoteStyle')) newOpts.quoteStyle = opts.quoteStyle;
5410                            return inspect_(value, newOpts, depth + 1, seen);
5411                        }
5412                        return inspect_(value, opts, depth + 1, seen);
5413                    }
5414                    if ('function' == typeof obj && !isRegExp(obj)) {
5415                        var name = nameOf(obj);
5416                        var keys = arrObjKeys(obj, inspect);
5417                        return '[Function' + (name ? ': ' + name : ' 
5417(anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
5418                    }
5419                    if (isSymbol(obj)) {
5420                        var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
5421                        return 'object' != typeof obj || hasShammedSymbols ? symString : markBoxed(symString);
5422                    }
5423                    if (isElement(obj)) {
5424                        var s = '<' + $toLowerCase.call(String(obj.nodeName));
5425                        var attrs = obj.attributes || [];
5426                        for(var i = 0; i < attrs.length; i++)s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
5427                        s += '>';
5428                        if (obj.childNodes && obj.childNodes.length) s += '...';
5429                        s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
5430                        return s;
5431                    }
5432                    if (isArray(obj)) {
5433                        if (0 === obj.length) return '[]';
5434                        var xs = arrObjKeys(obj, inspect);
5435                        if (indent && !singleLineValues(xs)) return '[' + indentedJoin(xs, indent) + ']';
5436                        return '[ ' + $join.call(xs, ', ') + ' ]';
5437                    }
5438                    if (isError(obj)) {
5439                        var parts = arrObjKeys(obj, inspect);
5440                        if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
5441                        if (0 === parts.length) return '[' + String(obj) + ']';
5442                        return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
5443                    }
5444                    if ('object' == typeof obj && customInspect) {
5445                        if (inspectSymbol && 'function' == typeof obj[inspectSymbol] && utilInspect) return utilInspect(obj, {
5446                            depth: maxDepth - depth
5447                        });
5448                        else if ('symbol' !== customInspect && 'function' == typeof obj.inspect) return obj.inspect();
5449                    }
5450                    if (isMap(obj)) {
5451                        var mapParts = [];
5452                        if (mapForEach) mapForEach.call(obj, function(value, key) {
5453                            mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
5454                        });
5455                        return collectionOf('Map', mapSize.call(obj), mapParts, indent);
5456                    }
5457                    if (isSet(obj)) {
5458                        var setParts = [];
5459                        if (setForEach) setForEach.call(obj, function(value) {
5460                            setParts.push(inspect(value, obj));
5461                        });
5462                        return collectionOf('Set', setSize.call(obj), setParts, indent);
5463                    }
5464                    if (isWeakMap(obj)) return weakCollectionOf('WeakMap');
5465                    if (isWeakSet(obj)) return weakCollectionOf('WeakSet');
5466                    if (isWeakRef(obj)) return weakCollectionOf('WeakRef');
5467                    if (isNumber(obj)) return markBoxed(inspect(Number(obj)));
5468                    if (isBigInt(obj)) return markBoxed(inspect(bigIntValueOf.call(obj)));
5469                    if (isBoolean(obj)) return markBoxed(booleanValueOf.call(obj));
5470                    if (isString(obj)) return markBoxed(inspect(String(obj)));
5471                    if ("u" > typeof window && obj === window) return '{ [object Window] }';
5472                    if ("u" > typeof globalThis && obj === globalThis || void 0 !== __webpack_require__.g && obj === __webpack_require__.g) return '{ [object globalThis] }';
5473                    if (!isDate(obj) && !isRegExp(obj)) {
5474                        var ys = arrObjKeys(obj, inspect);
5475                        var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
5476                        var protoTag = obj instanceof Object ? '' : 'null prototype';
5477                        var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
5478                        var constructorTag = isPlainObject || 'function' != typeof obj.constructor ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
5479                        var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
5480                        if (0 === ys.length) return tag + '{}';
5481                        if (indent) return tag + '{' + indentedJoin(ys, indent) + '}';
5482                        return tag + '{ ' + $join.call(ys, ', ') + ' }';
5483                    }
5484                    return String(obj);
5485                };
5486                function wrapQuotes(s, defaultStyle, opts) {
5487                    var style = opts.quoteStyle || defaultStyle;
5488                    var quoteChar = quotes[style];
5489                    return quoteChar + s + quoteChar;
5490                }
5491                function quote(s) {
5492                    return $replace.call(String(s), /"/g, '&quot;');
5493                }
5494                function canTrustToString(obj) {
5495                    return !toStringTag || !('object' == typeof obj && (toStringTag in obj || void 0 !== obj[toStringTag]));
5496                }
5497                function isArray(obj) {
5498                    return '[object Array]' === toStr(obj) && canTrustToString(obj);
5499                }
5500                function isDate(obj) {
5501                    return '[object Date]' === toStr(obj) && canTrustToString(obj);
5502                }
5503                function isRegExp(obj) {
5504                    return '[object RegExp]' === toStr(obj) && canTrustToString(obj);
5505                }
5506                function isError(obj) {
5507                    return '[object Error]' === toStr(obj) && canTrustToString(obj);
5508                }
5509                function isString(obj) {
5510                    return '[object String]' === toStr(obj) && canTrustToString(obj);
5511                }
5512                function isNumber(obj) {
5513                    return '[object Number]' === toStr(obj) && canTrustToString(obj);
5514                }
5515                function isBoolean(obj) {
5516                    return '[object Boolean]' === toStr(obj) && canTrustToString(obj);
5517                }
5518                function isSymbol(obj) {
5519                    if (hasShammedSymbols) return obj && 'object' == typeof obj && obj instanceof Symbol;
5520                    if ('symbol' == typeof obj) return true;
5521                    if (!obj || 'object' != typeof obj || !symToString) return false;
5522                    try {
5523                        symToString.call(obj);
5524                        return true;
5525                    } catch (e) {}
5526                    return false;
5527                }
5528                function isBigInt(obj) {
5529                    if (!obj || 'object' != typeof obj || !bigIntValueOf) return false;
5530                    try {
5531                        bigIntValueOf.call(obj);
5532                        return true;
5533                    } catch (e) {}
5534                    return false;
5535                }
5536                var hasOwn = Object.prototype.hasOwnProperty || function(key) {
5537                    return key in this;
5538                };
5539                function has(obj, key) {
5540                    return hasOwn.call(obj, key);
5541                }
5542                function toStr(obj) {
5543                    return objectToString.call(obj);
5544                }
5545                function nameOf(f) {
5546                    if (f.name) return f.name;
5547                    var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
5548                    if (m) return m[1];
5549                    return null;
5550                }
5551                function indexOf(xs, x) {
5552                    if (xs.indexOf) return xs.indexOf(x);
5553                    for(var i = 0, l = xs.length; i < l; i++)if (xs[i] === x) return i;
5554                    return -1;
5555                }
5556                function isMap(x) {
5557                    if (!mapSize || !x || 'object' != typeof x) return false;
5558                    try {
5559                        mapSize.call(x);
5560                        try {
5561                            setSize.call(x);
5562                        } catch (s) {
5563                            return true;
5564                        }
5565                        return x instanceof Map;
5566                    } catch (e) {}
5567                    return false;
5568                }
5569                function isWeakMap(x) {
5570                    if (!weakMapHas || !x || 'object' != typeof x) return false;
5571                    try {
5572                        weakMapHas.call(x, weakMapHas);
5573                        try {
5574                            weakSetHas.call(x, weakSetHas);
5575                        } catch (s) {
5576                            return true;
5577                        }
5578                        return x instanceof WeakMap;
5579                    } catch (e) {}
5580                    return false;
5581                }
5582                function isWeakRef(x) {
5583                    if (!weakRefDeref || !x || 'object' != typeof x) return false;
5584                    try {
5585                        weakRefDeref.call(x);
5586                        return true;
5587                    } catch (e) {}
5588                    return false;
5589                }
5590                function isSet(x) {
5591                    if (!setSize || !x || 'object' != typeof x) return false;
5592                    try {
5593                        setSize.call(x);
5594                        try {
5595                            mapSize.call(x);
5596                        } catch (m) {
5597                            return true;
5598                        }
5599                        return x instanceof Set;
5600                    } catch (e) {}
5601                    return false;
5602                }
5603                function isWeakSet(x) {
5604                    if (!weakSetHas || !x || 'object' != typeof x) return false;
5605                    try {
5606                        weakSetHas.call(x, weakSetHas);
5607                        try {
5608                            weakMapHas.call(x, weakMapHas);
5609                        } catch (s) {
5610                            return true;
5611                        }
5612                        return x instanceof WeakSet;
5613                    } catch (e) {}
5614                    return false;
5615                }
5616                function isElement(x) {
5617                    if (!x || 'object' != typeof x) return false;
5618                    if ("u" > typeof HTMLElement && x instanceof HTMLElement) return true;
5619                    return 'string' == typeof x.nodeName && 'function' == typeof x.getAttribute;
5620                }
5621                function inspectString(str, opts) {
5622                    if (str.length > opts.maxStringLength) {
5623                        var remaining = str.length - opts.maxStringLength;
5624                        var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
5625                        return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
5626                    }
5627                    var quoteRE = quoteREs[opts.quoteStyle || 'single'];
5628                    quoteRE.lastIndex = 0;
5629                    var s = $replace.call($replace.call(str, quoteRE, '\\$1'), /[\x00-\x1f]/g, lowbyte);
5630                    return wrapQuotes(s, 'single', opts);
5631                }
5632                function lowbyte(c) {
5633                    var n = c.charCodeAt(0);
5634                    var x = {
5635                        8: 'b',
5636                        9: 't',
5637                        10: 'n',
5638                        12: 'f',
5639                        13: 'r'
5640                    }[n];
5641                    if (x) return '\\' + x;
5642                    return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
5643                }
5644                function markBoxed(str) {
5645                    return 'Object(' + str + ')';
5646                }
5647                function weakCollectionOf(type) {
5648                    return type + ' { ? }';
5649                }
5650                function collectionOf(type, size, entries, indent) {
5651                    var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
5652                    return type + ' (' + size + ') {' + joinedEntries + '}';
5653                }
5654                function singleLineValues(xs) {
5655                    for(var i = 0; i < xs.length; i++)if (indexOf(xs[i], '\n') >= 0) return false;
5656                    return true;
5657                }
5658                function getIndent(opts, depth) {
5659                    var baseIndent;
5660                    if ('\t' === opts.indent) baseIndent = '\t';
5661                    else {
5662                        if ('number' != typeof opts.indent || !(opts.indent > 0)) return null;
5663                        baseIndent = $join.call(Array(opts.indent + 1), ' ');
5664                    }
5665                    return {
5666                        base: baseIndent,
5667                        prev: $join.call(Array(depth + 1), baseIndent)
5668                    };
5669                }
5670                function indentedJoin(xs, indent) {
5671                    if (0 === xs.length) return '';
5672                    var lineJoiner = '\n' + indent.prev + indent.base;
5673                    return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
5674                }
5675                function arrObjKeys(obj, inspect) {
5676                    var isArr = isArray(obj);
5677                    var xs = [];
5678                    if (isArr) {
5679                        xs.length = obj.length;
5680                        for(var i = 0; i < obj.length; i++)xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
5681                    }
5682                    var syms = 'function' == typeof gOPS ? gOPS(obj) : [];
5683                    var symMap;
5684                    if (hasShammedSymbols) {
5685                        symMap = {};
5686                        for(var k = 0; k < syms.length; k++)symMap['$' + syms[k]] = syms[k];
5687                    }
5688                    for(var key in obj)if (has(obj, key)) {
5689                        if (!isArr || String(Number(key)) !== key || !(key < obj.length)) if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) continue;
5690                        else if ($test.call(/[^\w$]/, key)) xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
5691                        else xs.push(key + ': ' + inspect(obj[key], obj));
5692                    }
5693                    if ('function' == typeof gOPS) {
5694                        for(var j = 0; j < syms.length; j++)if (isEnumerable.call(obj, syms[j])) xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
5695                    }
5696                    return xs;
5697                }
5698            },
5699            3519 (module1, __unused_rspack_exports, __webpack_require__) {
5700                var wrappy = __webpack_require__(6587);
5701                module1.exports = wrappy(once);
5702                module1.exports.strict = wrappy(onceStrict);
5703                once.proto = once(function() {
5704                    Object.defineProperty(Function.prototype, 'once', {
5705                        value: function() {
5706                            return once(this);
5707                        },
5708                        configurable: true
5709                    });
5710                    Object.defineProperty(Function.prototype, 'onceStrict', {
5711                        value: function() {
5712                            return onceStrict(this);
5713                        },
5714                        configurable: true
5715                    });
5716                });
5717                function once(fn) {
5718                    var f = function() {
5719                        if (f.called) return f.value;
5720                        f.called = true;
5721                        return f.value = fn.apply(this, arguments);
5722                    };
5723                    f.called = false;
5724                    return f;
5725                }
5726                function onceStrict(fn) {
5727                    var f = function() {
5728                        if (f.called) throw new Error(f.onceError);
5729                        f.called = true;
5730                        return f.value = fn.apply(this, arguments);
5731                    };
5732                    var name = fn.name || 'Function wrapped with `once`';
5733                    f.onceError = name + " shouldn't be called more than once";
5734                    f.called = false;
5735                    return f;
5736                }
5737            },
5738            3491 (module1, __unused_rspack_exports, __webpack_require__) {
5739                var process = __webpack_require__(5606);
5740                (function() {
5741                    var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
5742                    if ("u" > typeof performance && null !== performance && performance.now) module1.exports = function() {
5743                        return performance.now();
5744                    };
5745                    else if (null != process && process.hrtime) {
5746                        module1.exports = function() {
5747                            return (getNanoSeconds() - nodeLoadTime) / 1e6;
5748                        };
5749                        hrtime = process.hrtime;
5750                        getNanoSeconds = function() {
5751                            var hr;
5752                            hr = hrtime();
5753                            return 1e9 * hr[0] + hr[1];
5754                        };
5755                        moduleLoadTime = getNanoSeconds();
5756                        upTime = 1e9 * process.uptime();
5757                        nodeLoadTime = moduleLoadTime - upTime;
5758                    } else if (Date.now) {
5759                        module1.exports = function() {
5760                            return Date.now() - loadTime;
5761                        };
5762                        loadTime = Date.now();
5763                    } else {
5764                        module1.exports = function() {
5765                            return new Date().getTime() - loadTime;
5766                        };
5767                        loadTime = new Date().getTime();
5768                    }
5769                }).call(this);
5770            },
5771            6578 (module1) {
5772                "use strict";
5773                module1.exports = [
5774                    'Float16Array',
5775                    'Float32Array',
5776                    'Float64Array',
5777                    'Int8Array',
5778                    'Int16Array',
5779                    'Int32Array',
5780                    'Uint8Array',
5781                    'Uint8ClampedArray',
5782                    'Uint16Array',
5783                    'Uint32Array',
5784                    'BigInt64Array',
5785                    'BigUint64Array'
5786                ];
5787            },
5788            3225 (module1, __unused_rspack_exports, __webpack_require__) {
5789                "use strict";
5790                var process = __webpack_require__(5606);
5791                if (void 0 !== process && process.version && 0 !== process.version.indexOf('v0.') && (0 !== process.version.indexOf('v1.') || 0 === process.version.indexOf('v1.8.'))) module1.exports = process;
5792                else module1.exports = {
5793                    nextTick: nextTick
5794                };
5795                function nextTick(fn, arg1, arg2, arg3) {
5796                    if ('function' != typeof fn) throw new TypeError('"callback" argument must be a function');
5797                    var len = arguments.length;
5798                    var args, i;
5799                    switch(len){
5800                        case 0:
5801                        case 1:
5802                            return process.nextTick(fn);
5803                        case 2:
5804                            return process.nextTick(function() {
5805                                fn.call(null, arg1);
5806                            });
5807                        case 3:
5808                            return process.nextTick(function() {
5809                                fn.call(null, arg1, arg2);
5810                            });
5811                        case 4:
5812                            return process.nextTick(function() {
5813                                fn.call(null, arg1, arg2, arg3);
5814                            });
5815                        default:
5816                            args = new Array(len - 1);
5817                            i = 0;
5818                            while(i < args.length)args[i++] = arguments[i];
5819                            return process.nextTick(function() {
vendor: 6,003 bytes, lines 5820-5957
5820                                fn.apply(null, args);
5821                            });
5822                    }
5823                }
5824            },
5825            5606 (module1) {
5826                var process = module1.exports = {};
5827                var cachedSetTimeout;
5828                var cachedClearTimeout;
5829                function defaultSetTimout() {
5830                    throw new Error('setTimeout has not been defined');
5831                }
5832                function defaultClearTimeout() {
5833                    throw new Error('clearTimeout has not been defined');
5834                }
5835                (function() {
5836                    try {
5837                        cachedSetTimeout = 'function' == typeof setTimeout ? setTimeout : defaultSetTimout;
5838                    } catch (e) {
5839                        cachedSetTimeout = defaultSetTimout;
5840                    }
5841                    try {
5842                        cachedClearTimeout = 'function' == typeof clearTimeout ? clearTimeout : defaultClearTimeout;
5843                    } catch (e) {
5844                        cachedClearTimeout = defaultClearTimeout;
5845                    }
5846                })();
5847                function runTimeout(fun) {
5848                    if (cachedSetTimeout === setTimeout) return setTimeout(fun, 0);
5849                    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
5850                        cachedSetTimeout = setTimeout;
5851                        return setTimeout(fun, 0);
5852                    }
5853                    try {
5854                        return cachedSetTimeout(fun, 0);
5855                    } catch (e) {
5856                        try {
5857                            return cachedSetTimeout.call(null, fun, 0);
5858                        } catch (e) {
5859                            return cachedSetTimeout.call(this, fun, 0);
5860                        }
5861                    }
5862                }
5863                function runClearTimeout(marker) {
5864                    if (cachedClearTimeout === clearTimeout) return clearTimeout(marker);
5865                    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
5866                        cachedClearTimeout = clearTimeout;
5867                        return clearTimeout(marker);
5868                    }
5869                    try {
5870                        return cachedClearTimeout(marker);
5871                    } catch (e) {
5872                        try {
5873                            return cachedClearTimeout.call(null, marker);
5874                        } catch (e) {
5875                            return cachedClearTimeout.call(this, marker);
5876                        }
5877                    }
5878                }
5879                var queue = [];
5880                var draining = false;
5881                var currentQueue;
5882                var queueIndex = -1;
5883                function cleanUpNextTick() {
5884                    if (!draining || !currentQueue) return;
5885                    draining = false;
5886                    if (currentQueue.length) queue = currentQueue.concat(queue);
5887                    else queueIndex = -1;
5888                    if (queue.length) drainQueue();
5889                }
5890                function drainQueue() {
5891                    if (draining) return;
5892                    var timeout = runTimeout(cleanUpNextTick);
5893                    draining = true;
5894                    var len = queue.length;
5895                    while(len){
5896                        currentQueue = queue;
5897                        queue = [];
5898                        while(++queueIndex < len)if (currentQueue) currentQueue[queueIndex].run();
5899                        queueIndex = -1;
5900                        len = queue.length;
5901                    }
5902                    currentQueue = null;
5903                    draining = false;
5904                    runClearTimeout(timeout);
5905                }
5906                process.nextTick = function(fun) {
5907                    var args = new Array(arguments.length - 1);
5908                    if (arguments.length > 1) for(var i = 1; i < arguments.length; i++)args[i - 1] = arguments[i];
5909                    queue.push(new Item(fun, args));
5910                    if (1 === queue.length && !draining) runTimeout(drainQueue);
5911                };
5912                function Item(fun, array) {
5913                    this.fun = fun;
5914                    this.array = array;
5915                }
5916                Item.prototype.run = function() {
5917                    this.fun.apply(null, this.array);
5918                };
5919                process.title = 'browser';
5920                process.browser = true;
5921                process.env = {};
5922                process.argv = [];
5923                process.version = '';
5924                process.versions = {};
5925                function noop() {}
5926                process.on = noop;
5927                process.addListener = noop;
5928                process.once = noop;
5929                process.off = noop;
5930                process.removeListener = noop;
5931                process.removeAllListeners = noop;
5932                process.emit = noop;
5933                process.prependListener = noop;
5934                process.prependOnceListener = noop;
5935                process.listeners = function(name) {
5936                    return [];
5937                };
5938                process.binding = function(name) {
5939                    throw new Error('process.binding is not supported');
5940                };
5941                process.cwd = function() {
5942                    return '/';
5943                };
5944                process.chdir = function(dir) {
5945                    throw new Error('process.chdir is not supported');
5946                };
5947                process.umask = function() {
5948                    return 0;
5949                };
5950            },
5951            4765 (module1) {
5952                "use strict";
5953                var replace = String.prototype.replace;
5954                var percentTwenties = /%20/g;
5955                var Format = {
5956                    RFC1738: 'RFC1738',
5957                    RFC3986: 'RFC3986'
5958                };
5959                module1.exports = {
5960                    default: Format.RFC3986,
5961                    formatters: {
5962                        RFC1738: function(value) {
5963                            return replace.call(value, percentTwenties, '+');
5964                        },
5965                        RFC3986: function(value) {
5966                            return String(value);
5967                        }
5968                    },
5969                    RFC1738: Format.RFC1738,
5970                    RFC3986: Format.RFC3986
5971                };
5972            },
5973            5373 (module1, __unused_rspack_exports, __webpack_require__) {
5974                "use strict";
5975                var stringify = __webpack_require__(8636);
5976                var parse = __webpack_require__(2642);
5977                var formats = __webpack_require__(4765);
5978                module1.exports = {
5979                    formats: formats,
5980                    parse: parse,
5981                    stringify: stringify
5982                };
5983            },
5984            2642 (module1, __unused_rspack_exports, __webpack_require__) {
5985                "use strict";
5986                var utils = __webpack_require__(7720);
5987                var has = Object.prototype.hasOwnProperty;
5988                var isArray = Array.isArray;
5989                var defaults = {
5990                    allowDots: false,
5991                    allowEmptyArrays: false,
5992                    allowPrototypes: false,
5993                    allowSparse: false,
5994                    arrayLimit: 20,
5995                    charset: 'utf-8',
5996                    charsetSentinel: false,
5997                    comma: false,
5998                    decodeDotInKeys: false,
5999                    decoder: utils.decode,
6000                    delimiter: '&',
6001                    depth: 5,
6002                    duplicates: 'combine',
6003                    ignoreQueryPrefix: false,
6004                    interpretNumericEntities: false,
6005                    parameterLimit: 1000,
6006                    parseArrays: true,
6007                    plainObjects: false,
6008                    strictDepth: false,
6009                    strictMerge: true,
6010                    strictNullHandling: false,
6011                    throwOnLimitExceeded: false
6012                };
6013                var interpretNumericEntities = function(str) {
6014                    return str.replace(/&#(\d+);/g, function($0, numberStr) {
6015                        return String.fromCharCode(parseInt(numberStr, 10));
6016                    });
6017                };
6018                var parseArrayValue = function(val, options, currentArrayLength) {
6019                    if (val && 'string' == typeof val && options.comma && val.indexOf(',') > -1) return val.split(',');
6020                    if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (1 === options.arrayLimit ? '' : 's') + ' allowed in an array.');
6021                    return val;
6022                };
6023                var isoSentinel = 'utf8=%26%2310003%3B';
6024                var charsetSentinel = 'utf8=%E2%9C%93';
6025                var parseValues = function(str, options) {
6026                    var obj = {
6027                        __proto__: null
6028                    };
6029                    var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
6030                    cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']');
6031                    var limit = options.parameterLimit === 1 / 0 ? void 0 : options.parameterLimit;
6032                    var parts = cleanStr.split(options.delimiter, options.throwOnLimitExceeded && void 0 !== limit ? limit + 1 : limit);
6033                    if (options.throwOnLimitExceeded && void 0 !== limit && parts.length > limit) throw new RangeError('Parameter limit exceeded. Only ' + limit + ' parameter' + (1 === limit ? '' : 's') + ' allowed.');
6034                    var skipIndex = -1;
6035                    var i;
6036                    var charset = options.charset;
6037                    if (options.charsetSentinel) {
6038                        for(i = 0; i < parts.length; ++i)if (0 === parts[i].indexOf('utf8=')) {
6039                            if (parts[i] === charsetSentinel) charset = 'utf-8';
6040                            else if (parts[i] === isoSentinel) charset = 'iso-8859-1';
6041                            skipIndex = i;
6042                            i = parts.length;
6043                        }
6044                    }
6045                    for(i = 0; i < parts.length; ++i)if (i !== skipIndex) {
6046                        var part = parts[i];
6047                        var bracketEqualsPos = part.indexOf(']=');
6048                        var pos = -1 === bracketEqualsPos ? part.indexOf('=') : bracketEqualsPos + 1;
6049                        var key;
6050                        var val;
6051                        if (-1 === pos) {
6052                            key = options.decoder(part, defaults.decoder, charset, 'key');
6053                            val = options.strictNullHandling ? null : '';
6054                        } else {
6055                            key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
6056                            if (null !== key) val = utils.maybeMap(parseArrayValue(part.slice(pos + 1), options, isArray(obj[key]) ? obj[key].length : 0), function(encodedVal) {
6057                                return options.decoder(encodedVal, defaults.decoder, charset, 'value');
6058                            });
6059                        }
6060                        if (val && options.interpretNumericEntities && 'iso-8859-1' === charset) val = interpretNumericEntities(String(val));
6061                        if (part.indexOf('[]=') > -1) val = isArray(val) ? [
6062                            val
6063                        ] : val;
6064                        if (options.comma && isArray(val) && val.length > options.arrayLimit) {
6065                            if (options.throwOnLimitExceeded) throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (1 === options.arrayLimit ? '' : 's') + ' allowed in an array.');
6066                            val = utils.combine([], val, options.arrayLimit, options.plainObjects);
6067                        }
6068                        if (null !== key) {
6069                            var existing = has.call(obj, key);
6070                            if (existing && ('combine' === options.duplicates || part.indexOf('[]=') > -1)) obj[key] = utils.combine(obj[key], val, options.arrayLimit, options.plainObjects);
6071                            else if (!existing || 'last' === options.duplicates) obj[key] = val;
6072                        }
6073                    }
6074                    return obj;
6075                };
6076                var parseObject = function(chain, val, options, valuesParsed) {
6077                    var currentArrayLength = 0;
6078                    if (chain.length > 0 && '[]' === chain[chain.length - 1]) {
6079                        var parentKey = chain.slice(0, -1).join('');
6080                        currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0;
6081                    }
6082                    var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength);
6083                    for(var i = chain.length - 1; i >= 0; --i){
6084                        var obj;
6085                        var root = chain[i];
6086                        if ('[]' === root && options.parseArrays) obj = utils.isOverflow(leaf) ? leaf : options.allowEmptyArrays && ('' === leaf || options.strictNullHandling && null === leaf) ? [] : utils.combine([], leaf, options.arrayLimit, options.plainObjects);
6087                        else {
6088                            obj = options.plainObjects ? {
6089                                __proto__: null
6090                            } : {};
6091                            var cleanRoot = '[' === root.charAt(0) && ']' === root.charAt(root.length - 1) ? root.slice(1, -1) : root;
6092                            var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;
6093                            var index = parseInt(decodedRoot, 10);
6094                            var isValidArrayIndex = !isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && options.parseArrays;
6095                            if (options.parseArrays || '' !== decodedRoot) {
6096                                if (isValidArrayIndex && index < options.arrayLimit) {
6097                                    obj = [];
6098                                    obj[index] = leaf;
6099                                } else if (isValidArrayIndex && options.throwOnLimitExceeded) throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (1 === options.arrayLimit ? '' : 's') + ' allowed in an array.');
6100                                else if (isValidArrayIndex) {
6101                                    obj[index] = leaf;
6102                                    utils.markOverflow(obj, index);
6103                                } else if ('__proto__' !== decodedRoot) obj[decodedRoot] = leaf;
6104                            } else obj = {
6105                                0: leaf
6106                            };
6107                        }
6108                        leaf = obj;
6109                    }
6110                    return leaf;
6111                };
6112                var splitKeyIntoSegments = function(originalKey, options) {
6113                    var key = options.allowDots ? originalKey.replace(/\.([^.[]+)/g, '[$1]') : originalKey;
6114                    if (options.depth <= 0) {
6115                        if (!options.plainObjects && has.call(Object.prototype, key)) {
6116                            if (!options.allowPrototypes) return;
6117                        }
6118                        return [
6119                            key
6120                        ];
6121                    }
6122                    var segments = [];
6123                    var first = key.indexOf('[');
6124                    var parent = first >= 0 ? key.slice(0, first) : key;
6125                    if (parent) {
6126                        if (!options.plainObjects && has.call(Object.prototype, parent)) {
6127                            if (!options.allowPrototypes) return;
6128                        }
6129                        segments[segments.length] = parent;
6130                    }
6131                    var n = key.length;
6132                    var open = first;
6133                    var collected = 0;
6134                    while(open >= 0 && collected < options.depth){
6135                        var level = 1;
6136                        var i = open + 1;
6137                        var close = -1;
6138                        while(i < n && close < 0){
6139                            var cu = key.charCodeAt(i);
6140                            if (0x5B === cu) level += 1;
6141                            else if (0x5D === cu) {
6142                                level -= 1;
6143                                if (0 === level) close = i;
6144                            }
6145                            i += 1;
6146                        }
6147                        if (close < 0) {
6148                            segments[segments.length] = '[' + key.slice(open) + ']';
6149                            return segments;
6150                        }
6151                        var seg = key.slice(open, close + 1);
6152                        var content = seg.slice(1, -1);
6153                        if (!options.plainObjects && has.call(Object.prototype, content) && !options.allowPrototypes) return;
6154                        segments[segments.length] = seg;
6155                        collected += 1;
6156                        open = key.indexOf('[', close + 1);
6157                    }
6158                    if (open >= 0) {
6159                        if (true === options.strictDepth) throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true');
6160                        segments[segments.length] = '[' + key.slice(open) + ']';
6161                    }
6162                    return segments;
6163                };
6164                var parseKeys = function(givenKey, val, options, valuesParsed) {
6165                    if (!givenKey) return;
6166                    var keys = splitKeyIntoSegments(givenKey, options);
6167                    if (!keys) return;
6168                    return parseObject(keys, val, options, valuesParsed);
6169                };
6170                var normalizeParseOptions = function(opts) {
6171                    if (!opts) return defaults;
6172                    if (void 0 !== opts.allowEmptyArrays && 'boolean' != typeof opts.allowEmptyArrays) throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');
6173                    if (void 0 !== opts.decodeDotInKeys && 'boolean' != typeof opts.decodeDotInKeys) throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided');
6174                    if (null !== opts.decoder && void 0 !== opts.decoder && 'function' != typeof opts.decoder) throw new TypeError('Decoder has to be a function.');
6175                    if (void 0 !== opts.charset && 'utf-8' !== opts.charset && 'iso-8859-1' !== opts.charset) throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
6176                    if (void 0 !== opts.throwOnLimitExceeded && 'boolean' != typeof opts.throwOnLimitExceeded) throw new TypeError('`throwOnLimitExceeded` option must be a boolean');
6177                    var charset = void 0 === opts.charset ? defaults.charset : opts.charset;
6178                    var duplicates = void 0 === opts.duplicates ? defaults.duplicates : opts.duplicates;
6179                    if ('combine' !== duplicates && 'first' !== duplicates && 'last' !== duplicates) throw new TypeError('The duplicates option must be either combine, first, or last');
6180                    var allowDots = void 0 === opts.allowDots ? true === opts.decodeDotInKeys ? true : defaults.allowDots : !!opts.allowDots;
6181                    return {
6182                        allowDots: allowDots,
6183                        allowEmptyArrays: 'boolean' == typeof opts.allowEmptyArrays ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
6184                        allowPrototypes: 'boolean' == typeof opts.allowPrototypes ? opts.allowPrototypes : defaults.allowPrototypes,
6185                        allowSparse: 'boolean' == typeof opts.allowSparse ? opts.allowSparse : defaults.allowSparse,
6186                        arrayLimit: 'number' == typeof opts.arrayLimit ? opts.arrayLimit : defaults.arrayLimit,
6187                        charset: charset,
6188                        charsetSentinel: 'boolean' == typeof opts.charsetSentinel ? opts.charsetSentinel : defaults.charsetSentinel,
6189                        comma: 'boolean' == typeof opts.comma ? opts.comma : defaults.comma,
6190                        decodeDotInKeys: 'boolean' == typeof opts.decodeDotInKeys ? opts.decodeDotInKeys : defaults.decodeDotInKeys,
6191                        decoder: 'function' == typeof opts.decoder ? opts.decoder : defaults.decoder,
6192                        delimiter: 'string' == typeof opts.delimiter || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
6193                        depth: 'number' == typeof opts.depth || false === opts.depth ? +opts.depth : defaults.depth,
6194                        duplicates: duplicates,
6195                        ignoreQueryPrefix: true === opts.ignoreQueryPrefix,
6196                        interpretNumericEntities: 'boolean' == typeof opts.interpretNumericEntities ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
6197                        parameterLimit: 'number' == typeof opts.parameterLimit ? opts.parameterLimit : defaults.parameterLimit,
6198                        parseArrays: false !== opts.parseArrays,
6199                        plainObjects: 'boolean' == typeof opts.plainObjects ? opts.plainObjects : defaults.plainObjects,
6200                        strictDepth: 'boolean' == typeof opts.strictDepth ? !!opts.strictDepth : defaults.strictDepth,
6201                        strictMerge: 'boolean' == typeof opts.strictMerge ? !!opts.strictMerge : defaults.strictMerge,
6202                        strictNullHandling: 'boolean' == typeof opts.strictNullHandling ? opts.strictNullHandling : defaults.strictNullHandling,
6203                        throwOnLimitExceeded: 'boolean' == typeof opts.throwOnLimitExceeded ? opts.throwOnLimitExceeded : false
6204                    };
6205                };
6206                module1.exports = function(str, opts) {
6207                    var options = normalizeParseOptions(opts);
6208                    if ('' === str || null == str) return options.plainObjects ? {
6209                        __proto__: null
6210                    } : {};
6211                    var tempObj = 'string' == typeof str ? parseValues(str, options) : str;
6212                    var obj = options.plainObjects ? {
6213                        __proto__: null
6214                    } : {};
6215                    var keys = Object.keys(tempObj);
6216                    for(var i = 0; i < keys.length; ++i){
6217                        var key = keys[i];
6218                        var newObj = parseKeys(key, tempObj[key], options, 'string' == typeof str);
6219                        obj = utils.merge(obj, newObj, options);
6220                    }
6221                    if (true === options.allowSparse) return obj;
6222                    return utils.compact(obj);
6223                };
6224            },
6225            8636 (module1, __unused_rspack_exports, __webpack_require__) {
6226                "use strict";
6227                var getSideChannel = __webpack_require__(920);
6228                var utils = __webpack_require__(7720);
6229                var formats = __webpack_require__(4765);
6230                var has = Object.prototype.hasOwnProperty;
6231                var arrayPrefixGenerators = {
6232                    brackets: function(prefix) {
6233                        return prefix + '[]';
6234                    },
6235                    comma: 'comma',
6236                    indices: function(prefix, key) {
6237                        return prefix + '[' + key + ']';
6238                    },
6239                    repeat: function(prefix) {
6240                        return prefix;
6241                    }
6242                };
6243                var isArray = Array.isArray;
6244                var push = Array.prototype.push;
6245                var pushToArray = function(arr, valueOrArray) {
6246                    push.apply(arr, isArray(valueOrArray) ? valueOrArray : [
6247                        valueOrArray
6248                    ]);
6249                };
6250                var toISO = Date.prototype.toISOString;
6251                var defaultFormat = formats['default'];
6252                var defaults = {
6253                    addQueryPrefix: false,
6254                    allowDots: false,
6255                    allowEmptyArrays: false,
6256                    arrayFormat: 'indices',
6257                    charset: 'utf-8',
6258                    charsetSentinel: false,
6259                    commaRoundTrip: false,
6260                    delimiter: '&',
6261                    encode: true,
6262                    encodeDotInKeys: false,
6263                    encoder: utils.encode,
6264                    encodeValuesOnly: false,
6265                    filter: void 0,
6266                    format: defaultFormat,
6267                    formatter: formats.formatters[defaultFormat],
6268                    indices: false,
6269                    serializeDate: function(date) {
6270                        return toISO.call(date);
6271                    },
6272                    skipNulls: false,
6273                    strictNullHandling: false
6274                };
6275                var isNonNullishPrimitive = function(v) {
6276                    return 'string' == typeof v || 'number' == typeof v || 'boolean' == typeof v || 'symbol' == typeof v || 'bigint' == typeof v;
6277                };
6278                var sentinel = {};
6279                var stringify = function stringify(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
6280                    var obj = object;
6281                    var tmpSc = sideChannel;
6282                    var step = 0;
6283                    var findFlag = false;
6284                    while(void 0 !== (tmpSc = tmpSc.get(sentinel)) && !findFlag){
6285                        var pos = tmpSc.get(object);
6286                        step += 1;
6287                        if (void 0 !== pos) if (pos === step) throw new RangeError('Cyclic object value');
6288                        else findFlag = true;
6289                        if (void 0 === tmpSc.get(sentinel)) step = 0;
6290                    }
6291                    if ('function' == typeof filter) obj = filter(prefix, obj);
6292                    else if (obj instanceof Date) obj = serializeDate(obj);
6293                    else if ('comma' === generateArrayPrefix && isArray(obj)) obj = utils.maybeMap(obj, function(value) {
6294                        if (value instanceof Date) return serializeDate(value);
6295                        return value;
6296                    });
6297                    if (null === obj) {
6298                        if (strictNullHandling) return formatter(encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix);
6299                        obj = '';
6300                    }
6301                    if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
6302                        if (encoder) {
6303                            var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
6304                            return [
6305                                formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))
6306                            ];
6307                        }
6308                        return [
6309                            formatter(prefix) + '=' + formatter(String(obj))
6310                        ];
6311                    }
6312                    var values = [];
6313                    if (void 0 === obj) return values;
6314                    var objKeys;
6315                    if ('comma' === generateArrayPrefix && isArray(obj)) {
6316                        if (encodeValuesOnly && encoder) obj = utils.maybeMap(obj, function(v) {
6317                            return null == v ? v : encoder(v);
6318                        });
6319                        objKeys = [
6320                            {
6321                                value: obj.length > 0 ? obj.join(',') || null : void 0
6322                            }
6323                        ];
6324                    } else if (isArray(filter)) objKeys = filter;
6325                    else {
6326                        var keys = Object.keys(obj);
6327                        objKeys = sort ? keys.sort(sort) : keys;
6328                    }
6329                    var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, '%2E') : String(prefix);
6330                    var adjustedPrefix = commaRoundTrip && isArray(obj) && 1 === obj.length ? encodedPrefix + '[]' : encodedPrefix;
6331                    if (allowEmptyArrays && isArray(obj) && 0 === obj.length) return adjustedPrefix + '[]';
6332                    for(var j = 0; j < objKeys.length; ++j){
6333                        var key = objKeys[j];
6334                        var value = 'object' == typeof key && key && void 0 !== key.value ? key.value : obj[key];
6335                        if (!skipNulls || null !== value) {
6336                            var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, '%2E') : String(key);
6337                            var keyPrefix = isArray(obj) ? 'function' == typeof generateArrayPrefix ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']');
6338                            sideChannel.set(object, step);
6339                            var valueSideChannel = getSideChannel();
6340                            valueSideChannel.set(sentinel, sideChannel);
6341                            pushToArray(values, stringify(value, keyPrefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, 'comma' === generateArrayPrefix && encodeValuesOnly && isArray(obj) ? null : encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, valueSideChannel));
6342                        }
6343                    }
6344                    return values;
6345                };
6346                var normalizeStringifyOptions = function(opts) {
6347                    if (!opts) return defaults;
6348                    if (void 0 !== opts.allowEmptyArrays && 'boolean' != typeof opts.allowEmptyArrays) throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');
6349                    if (void 0 !== opts.encodeDotInKeys && 'boolean' != typeof opts.encodeDotInKeys) throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided');
6350                    if (null !== opts.encoder && void 0 !== opts.encoder && 'function' != typeof opts.encoder) throw new TypeError('Encoder has to be a function.');
6351                    var charset = opts.charset || defaults.charset;
6352                    if (void 0 !== opts.charset && 'utf-8' !== opts.charset && 'iso-8859-1' !== opts.charset) throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
6353                    var format = formats['default'];
6354                    if (void 0 !== opts.format) {
6355                        if (!has.call(formats.formatters, opts.format)) throw new TypeError('Unknown format option provided.');
6356                        format = opts.format;
6357                    }
6358                    var formatter = formats.formatters[format];
6359                    var filter = defaults.filter;
6360                    if ('function' == typeof opts.filter || isArray(opts.filter)) filter = opts.filter;
6361                    var arrayFormat;
6362                    arrayFormat = opts.arrayFormat in arrayPrefixGenerators ? opts.arrayFormat : 'indices' in opts ? opts.indices ? 'indices' : 'repeat' : defaults.arrayFormat;
6363                    if ('commaRoundTrip' in opts && 'boolean' != typeof opts.commaRoundTrip) throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
6364                    var allowDots = void 0 === opts.allowDots ? true === opts.encodeDotInKeys ? true : defaults.allowDots : !!opts.allowDots;
6365                    return {
6366                        addQueryPrefix: 'boolean' == typeof opts.addQueryPrefix ? opts.addQueryPrefix : defaults.addQueryPrefix,
6367                        allowDots: allowDots,
6368                        allowEmptyArrays: 'boolean' == typeof opts.allowEmptyArrays ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
6369                        arrayFormat: arrayFormat,
6370                        charset: charset,
6371                        charsetSentinel: 'boolean' == typeof opts.charsetSentinel ? opts.charsetSentinel : defaults.charsetSentinel,
6372                        commaRoundTrip: !!opts.commaRoundTrip,
6373                        delimiter: void 0 === opts.delimiter ? defaults.delimiter : opts.delimiter,
6374                        encode: 'boolean' == typeof opts.encode ? opts.encode : defaults.encode,
6375                        encodeDotInKeys: 'boolean' == typeof opts.encodeDotInKeys ? opts.encodeDotInKeys : defaults.encodeDotInKeys,
6376                        encoder: 'function' == typeof opts.encoder ? opts.encoder : defaults.encoder,
6377                        encodeValuesOnly: 'boolean' == typeof opts.encodeValuesOnly ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
6378                        filter: filter,
6379                        format: format,
6380                        formatter: formatter,
6381                        serializeDate: 'function' == typeof opts.serializeDate ? opts.serializeDate : defaults.serializeDate,
6382                        skipNulls: 'boolean' == typeof opts.skipNulls ? opts.skipNulls : defaults.skipNulls,
6383                        sort: 'function' == typeof opts.sort ? opts.sort : null,
6384                        strictNullHandling: 'boolean' == typeof opts.strictNullHandling ? opts.strictNullHandling : defaults.strictNullHandling
6385                    };
6386                };
6387                module1.exports = function(object, opts) {
6388                    var obj = object;
6389                    var options = normalizeStringifyOptions(opts);
6390                    var objKeys;
6391                    var filter;
6392                    if ('function' == typeof options.filter) {
6393                        filter = options.filter;
6394                        obj = filter('', obj);
6395                    } else if (isArray(options.filter)) {
6396                        filter = options.filter;
6397                        objKeys = filter;
6398                    }
6399                    var keys = [];
6400                    if ('object' != typeof obj || null === obj) return '';
6401                    var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];
6402                    var commaRoundTrip = 'comma' === generateArrayPrefix && options.commaRoundTrip;
6403                    if (!objKeys) objKeys = Object.keys(obj);
6404                    if (options.sort) objKeys.sort(options.sort);
6405                    var sideChannel = getSideChannel();
6406                    for(var i = 0; i < objKeys.length; ++i){
6407                        var key = objKeys[i];
6408                        if (null != key) {
6409                            var value = obj[key];
6410                            if (!options.skipNulls || null !== value) pushToArray(keys, stringify(value, key, generateArrayPrefix, commaRoundTrip, options.allowEmptyArrays, options.strictNullHandling, options.skipNulls, options.encodeDotInKeys, options.encode ? options.encoder : null, options.filter, options.sort, options.allowDots, options.serializeDate, options.format, options.formatter, options.encodeValuesOnly, options.charset, sideChannel));
6411                        }
6412                    }
6413                    var joined = keys.join(options.delimiter);
6414                    var prefix = true === options.addQueryPrefix ? '?' : '';
6415                    if (options.charsetSentinel) if ('iso-8859-1' === options.charset) prefix += 'utf8=%26%2310003%3B' + options.delimiter;
6416                    else prefix += 'utf8=%E2%9C%93' + options.delimiter;
6417                    return joined.length >
6417 0 ? prefix + joined : '';
6418                };
6419            },
6420            7720 (module1, __unused_rspack_exports, __webpack_require__) {
6421                "use strict";
6422                var formats = __webpack_require__(4765);
6423                var getSideChannel = __webpack_require__(920);
6424                var has = Object.prototype.hasOwnProperty;
6425                var isArray = Array.isArray;
6426                var overflowChannel = getSideChannel();
6427                var markOverflow = function(obj, maxIndex) {
6428                    overflowChannel.set(obj, maxIndex);
6429                    return obj;
6430                };
6431                var isOverflow = function(obj) {
6432                    return overflowChannel.has(obj);
6433                };
6434                var getMaxIndex = function(obj) {
6435                    return overflowChannel.get(obj);
6436                };
6437                var setMaxIndex = function(obj, maxIndex) {
6438                    overflowChannel.set(obj, maxIndex);
6439                };
6440                var hexTable = function() {
6441                    var array = [];
6442                    for(var i = 0; i < 256; ++i)array[array.length] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();
6443                    return array;
6444                }();
6445                var compactQueue = function(queue) {
6446                    while(queue.length > 1){
6447                        var item = queue.pop();
6448                        var obj = item.obj[item.prop];
6449                        if (isArray(obj)) {
6450                            var compacted = [];
6451                            for(var j = 0; j < obj.length; ++j)if (void 0 !== obj[j]) compacted[compacted.length] = obj[j];
6452                            item.obj[item.prop] = compacted;
6453                        }
6454                    }
6455                };
6456                var arrayToObject = function(source, options) {
6457                    var obj = options && options.plainObjects ? {
6458                        __proto__: null
6459                    } : {};
6460                    for(var i = 0; i < source.length; ++i)if (void 0 !== source[i]) obj[i] = source[i];
6461                    return obj;
6462                };
6463                var merge = function merge(target, source, options) {
6464                    if (!source) return target;
6465                    if ('object' != typeof source && 'function' != typeof source) {
6466                        if (isArray(target)) {
6467                            var nextIndex = target.length;
6468                            if (options && 'number' == typeof options.arrayLimit && nextIndex > options.arrayLimit) return markOverflow(arrayToObject(target.concat(source), options), nextIndex);
6469                            target[nextIndex] = source;
6470                        } else if (!target || 'object' != typeof target) return [
6471                            target,
6472                            source
6473                        ];
6474                        else if (isOverflow(target)) {
6475                            var newIndex = getMaxIndex(target) + 1;
6476                            target[newIndex] = source;
6477                            setMaxIndex(target, newIndex);
6478                        } else if (options && options.strictMerge) return [
6479                            target,
6480                            source
6481                        ];
6482                        else if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) target[source] = true;
6483                        return target;
6484                    }
6485                    if (!target || 'object' != typeof target) {
6486                        if (isOverflow(source)) {
6487                            var sourceKeys = Object.keys(source);
6488                            var result = options && options.plainObjects ? {
6489                                __proto__: null,
6490                                0: target
6491                            } : {
6492                                0: target
6493                            };
6494                            for(var m = 0; m < sourceKeys.length; m++){
6495                                var oldKey = parseInt(sourceKeys[m], 10);
6496                                result[oldKey + 1] = source[sourceKeys[m]];
6497                            }
6498                            return markOverflow(result, getMaxIndex(source) + 1);
6499                        }
6500                        var combined = [
6501                            target
6502                        ].concat(source);
6503                        if (options && 'number' == typeof options.arrayLimit && combined.length > options.arrayLimit) return markOverflow(arrayToObject(combined, options), combined.length - 1);
6504                        return combined;
6505                    }
6506                    var mergeTarget = target;
6507                    if (isArray(target) && !isArray(source)) mergeTarget = arrayToObject(target, options);
6508                    if (isArray(target) && isArray(source)) {
6509                        source.forEach(function(item, i) {
6510                            if (has.call(target, i)) {
6511                                var targetItem = target[i];
6512                                if (targetItem && 'object' == typeof targetItem && item && 'object' == typeof item) target[i] = merge(targetItem, item, options);
6513                                else target[target.length] = item;
6514                            } else target[i] = item;
6515                        });
6516                        return target;
6517                    }
6518                    return Object.keys(source).reduce(function(acc, key) {
6519                        var value = source[key];
6520                        if (has.call(acc, key)) acc[key] = merge(acc[key], value, options);
6521                        else acc[key] = value;
6522                        if (isOverflow(source) && !isOverflow(acc)) markOverflow(acc, getMaxIndex(source));
6523                        if (isOverflow(acc)) {
6524                            var keyNum = parseInt(key, 10);
6525                            if (String(keyNum) === key && keyNum >= 0 && keyNum > getMaxIndex(acc)) setMaxIndex(acc, keyNum);
6526                        }
6527                        return acc;
6528                    }, mergeTarget);
6529                };
6530                var assign = function(target, source) {
6531                    return Object.keys(source).reduce(function(acc, key) {
6532                        acc[key] = source[key];
6533                        return acc;
6534                    }, target);
6535                };
6536                var decode = function(str, defaultDecoder, charset) {
6537                    var strWithoutPlus = str.replace(/\+/g, ' ');
6538                    if ('iso-8859-1' === charset) return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
6539                    try {
6540                        return decodeURIComponent(strWithoutPlus);
6541                    } catch (e) {
6542                        return strWithoutPlus;
6543                    }
6544                };
6545                var limit = 1024;
6546                var encode = function(str, defaultEncoder, charset, kind, format) {
6547                    if (0 === str.length) return str;
6548                    var string = str;
6549                    if ('symbol' == typeof str) string = Symbol.prototype.toString.call(str);
6550                    else if ('string' != typeof str) string = String(str);
6551                    if ('iso-8859-1' === charset) return escape(string).replace(/%u[0-9a-f]{4}
6551/gi, function($0) {
6552                        return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
6553                    });
6554                    var out = '';
6555                    for(var j = 0; j < string.length; j += limit){
6556                        var segment = string.length >= limit ? string.slice(j, j + limit) : string;
6557                        var arr = [];
6558                        for(var i = 0; i < segment.length; ++i){
6559                            var c = segment.charCodeAt(i);
6560                            if (0x2D === c || 0x2E === c || 0x5F === c || 0x7E === c || c >= 0x30 && c <= 0x39 || c >= 0x41 && c <= 0x5A || c >= 0x61 && c <= 0x7A || format === formats.RFC1738 && (0x28 === c || 0x29 === c)) {
6561                                arr[arr.length] = segment.charAt(i);
6562                                continue;
6563                            }
6564                            if (c < 0x80) {
6565                                arr[arr.length] = hexTable[c];
6566                                continue;
6567                            }
6568                            if (c < 0x800) {
6569                                arr[arr.length] = hexTable[0xC0 | c >> 6] + hexTable[0x80 | 0x3F & c];
6570                                continue;
6571                            }
6572                            if (c < 0xD800 || c >= 0xE000) {
6573                                arr[arr.length] = hexTable[0xE0 | c >> 12] + hexTable[0x80 | c >> 6 & 0x3F] + hexTable[0x80 | 0x3F & c];
6574                                continue;
6575                            }
6576                            i += 1;
6577                            c = 0x10000 + ((0x3FF & c) << 10 | 0x3FF & segment.charCodeAt(i));
6578                            arr[arr.length] = hexTable[0xF0 | c >> 18] + hexTable[0x80 | c >> 12 & 0x3F] + hexTable[0x80 | c >> 6 & 0x3F] + hexTable[0x80 | 0x3F & c];
6579                        }
6580                        out += arr.join('');
6581                    }
6582                    return out;
6583                };
6584                var compact = function(value) {
6585                    var queue = [
6586                        {
6587                            obj: {
6588                                o: value
6589                            },
6590                            prop: 'o'
6591                        }
6592                    ];
6593                    var refs = [];
6594                    for(var i = 0; i < queue.length; ++i){
6595                        var item = queue[i];
6596                        var obj = item.obj[item.prop];
6597                        var keys = Object.keys(obj);
6598                        for(var j = 0; j < keys.length; ++j){
6599                            var key = keys[j];
6600                            var val = obj[key];
6601                            if ('object' == typeof val && null !== val && -1 === refs.indexOf(val)) {
6602                                queue[queue.length] = {
6603                                    obj: obj,
6604                                    prop: key
6605                                };
6606                                refs[refs.length] = val;
6607                            }
6608                        }
6609                    }
6610                    compactQueue(queue);
6611                    return value;
6612                };
6613                var isRegExp = function(obj) {
6614                    return '[object RegExp]' === Object.prototype.toString.call(obj);
6615                };
6616                var isBuffer = function(obj) {
6617                    if (!obj || 'object' != typeof obj) return false;
6618                    return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
6619                };
6620                var combine = function(a, b, arrayLimit, plainObjects) {
6621                    if (isOverflow(a)) {
6622                        var newIndex = getMaxIndex(a) + 1;
6623                        a[newIndex] = b;
6624                        setMaxIndex(a, newIndex);
6625                        return a;
6626                    }
6627                    var result = [].concat(a, b);
6628                    if (result.length > arrayLimit) return markOverflow(arrayToObject(result, {
6629                        plainObjects: plainObjects
6630                    }), result.length - 1);
6631                    return result;
6632                };
6633                var maybeMap = function(val, fn) {
6634                    if (isArray(val)) {
6635                        var mapped = [];
6636                        for(var i = 0; i < val.length;
6636 i += 1)mapped[mapped.length] = fn(val[i]);
6637                        return mapped;
6638                    }
6639                    return fn(val);
6640                };
6641                module1.exports = {
6642                    arrayToObject: arrayToObject,
6643                    assign: assign,
6644                    combine: combine,
6645                    compact: compact,
6646                    decode: decode,
6647                    encode: encode,
6648                    isBuffer: isBuffer,
6649                    isOverflow: isOverflow,
6650                    isRegExp: isRegExp,
6651                    markOverflow: markOverflow,
6652                    maybeMap: maybeMap,
6653                    merge: merge
6654                };
6655            },
6656            3146 (module1, __unused_rspack_exports, __webpack_require__) {
6657                var now = __webpack_require__(3491), root = "u" < typeof window ? __webpack_require__.g : window, vendors = [
6658                    'moz',
6659                    'webkit'
6660                ], suffix = 'AnimationFrame', raf = root['request' + suffix], caf = root['cancel' + suffix] || root['cancelRequest' + suffix];
6661                for(var i = 0; !raf && i < vendors.length; i++){
6662                    raf = root[vendors[i] + 'Request' + suffix];
6663                    caf = root[vendors[i] + 'Cancel' + suffix] || root[vendors[i] + 'CancelRequest' + suffix];
6664                }
6665                if (!raf || !caf) {
6666                    var last = 0, id = 0, queue = [], frameDuration = 1000 / 60;
6667                    raf = function(callback) {
6668                        if (0 === queue.length) {
6669                            var _now = now(), next = Math.max(0, frameDuration - (_now - last));
6670                            last = next + _now;
6671                            setTimeout(function() {
6672                                var cp = queue.slice(0);
6673                                queue.length = 0;
6674                                for(var i = 0; i < cp.length; i++)if (!cp[i].cancelled) try {
6675                                    cp[i].callback(last);
6676                                } catch (e) {
6677                                    setTimeout(function() {
6678                                        throw e;
6679                                    }, 0);
6680                                }
6681                            }, Math.round(next));
6682                        }
6683                        queue.push({
6684                            handle: ++id,
6685                            callback: callback,
6686                            cancelled: false
6687                        });
6688                        return id;
6689                    };
6690                    caf = function(handle) {
6691                        for(var i = 0; i < queue.length; i++)if (queue[i].handle === handle) queue[i].cancelled = true;
6692                    };
6693                }
6694                module1.exports = function(fn) {
6695                    return raf.call(root, fn);
6696                };
6697                module1.exports.cancel = function() {
6698                    caf.apply(root, arguments);
6699                };
6700                module1.exports.polyfill = function(object) {
6701                    if (!object) object = root;
6702                    object.requestAnimationFrame = raf;
6703                    object.cancelAnimationFrame = caf;
6704                };
6705            },
6706            9721 (module1, __unused_rspack_exports, __webpack_require__) {
6707                "use strict";
6708                var callBound = __webpack_require__(6556);
6709                var isRegex = __webpack_require__(4035);
6710                var $exec = callBound('RegExp.prototype.exec');
6711                var $TypeError = __webpack_require__(9675);
6712                module1.exports = function(regex) {
6713                    if (!isRegex(regex)) throw new $TypeError('`regex` must be a RegExp');
6714                    return function(s) {
6715                        return null !== $exec(regex, s);
6716                    };
6717                };
6718            },
6719            6897 (module1, __unused_rspack_exports, __webpack_require__) {
6720                "use strict";
6721                var GetIntrinsic = __webpack_require__(453);
6722                var define1 = __webpack_require__(41);
6723                var hasDescriptors = __webpack_require__(592)();
6724                var gOPD = __webpack_require__(5795);
6725                var $TypeError = __webpack_require__(9675);
6726                var $floor = GetIntrinsic('%Math.floor%');
6727                module1.exports = function(fn, length) {
6728                    if ('function' != typeof fn) throw new $TypeError('`fn` is not a function');
6729                    if ('number' != typeof length || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) throw new $TypeError('`length` must be a positive 32-bit integer');
6730                    var loose = arguments.length > 2 && !!arguments[2];
6731                    var functionLengthIsConfigurable = true;
6732                    var functionLengthIsWritable = true;
6733                    if ('length' in fn && gOPD) {
6734                        var desc = gOPD(fn, 'length');
6735                        if (desc && !desc.configurable) functionLengthIsConfigurable = false;
6736                        if (desc && !desc.writable) functionLengthIsWritable = false;
6737                    }
6738                    if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) hasDescriptors ? define1(fn, 'length', length, true, true) : define1(fn, 'length', length);
6739                    return fn;
6740                };
6741            },
6742            4803 (module1, __unused_rspack_exports, __webpack_require__) {
6743                "use strict";
6744                var inspect = __webpack_require__(8859);
6745                var $TypeError = __webpack_require__(9675);
6746                var listGetNode = function(list, key, isDelete) {
6747                    var prev = list;
6748                    var curr;
6749                    for(; null != (curr = prev.next); prev = curr)if (curr.key === key) {
6750                        prev.next = curr.next;
6751                        if (!isDelete) {
6752                            curr.next = list.next;
6753                            list.next = curr;
6754                        }
6755                        return curr;
6756                    }
6757                };
6758                var listGet = function(objects, key) {
6759                    if (!objects) return;
6760                    var node = listGetNode(objects, key);
6761                    return node && node.value;
6762                };
6763                var listSet = function(objects, key, value) {
6764                    var node = listGetNode(objects, key);
6765                    if (node) node.value = value;
6766                    else objects.next = {
6767                        key: key,
6768                        next: objects.next,
6769                        value: value
6770                    };
6771                };
6772                var listHas = function(objects, key) {
6773                    if (!objects) return false;
6774                    return !!listGetNode(objects, key);
6775                };
6776                var listDelete = function(objects, key) {
6777                    if (objects) return listGetNode(objects, key, true);
6778                };
6779                module1.exports = function() {
6780                    var $o;
6781                    var channel = {
6782                        assert: function(key) {
6783                            if (!channel.has(key)) throw new $TypeError('Side channel does not contain ' + inspect(key));
6784                        },
6785                        delete: function(key) {
6786                            var deletedNode = listDelete($o, key);
6787                            if (deletedNode && $o && !$o.next) $o = void 0;
6788                            return !!deletedNode;
6789                        },
6790                        get: function(key) {
6791                            return listGet($o, key);
6792                        },
6793                        has: function(key) {
6794                            return listHas($o, key);
6795                        },
6796                        set: function(key, value) {
6797                            if (!$o) $o = {
6798                                next: void 0
6799                            };
6800                            listSet($o, key, value);
6801                        }
6802                    };
6803                    return channel;
6804                };
6805            },
6806            507 (module1, __unused_rspack_exports, __webpack_require__) {
6807                "use strict";
6808                var GetIntrinsic = __webpack_require__(453);
6809                var callBound = __webpack_require__(6556);
6810                var inspect = __webpack_require__(8859);
6811                var $TypeError = __webpack_require__(9675);
6812                var $Map = GetIntrinsic('%Map%', true);
6813                var $mapGet = callBound('Map.prototype.get', true);
6814                var $mapSet = callBound('Map.prototype.set', true);
6815                var $mapHas = callBound('Map.prototype.has', true);
6816                var $mapDelete = callBound('Map.prototype.delete', true);
6817                var $mapSize = callBound('Map.prototype.size', true);
6818                module1.exports = !!$Map && function() {
6819                    var $m;
6820                    var channel = {
6821                        assert: function(key) {
6822                            if (!channel.has(key)) throw new $TypeError('Side channel does not contain ' + inspect(key));
6823                        },
6824                        delete: function(key) {
6825                            if ($m) {
6826                                var result = $mapDelete($m, key);
6827                                if (0 === $mapSize($m)) $m = void 0;
6828                                return result;
6829                            }
6830                            return false;
6831                        },
6832                        get: function(key) {
6833                            if ($m) return $mapGet($m, key);
6834                        },
6835                        has: function(key) {
6836                            if ($m) return $mapHas($m, key);
6837                            return false;
6838                        },
6839                        set: function(key, value) {
6840                            if (!$m) $m = new $Map();
6841                            $mapSet($m, key, value);
6842                        }
6843                    };
6844                    return channel;
6845                };
6846            },
6847            2271 (module1, __unused_rspack_exports, __webpack_require__) {
6848                "use strict";
6849                var GetIntrinsic = __webpack_require__(453);
6850                var callBound = __webpack_require__(6556);
6851                var inspect = __webpack_require__(8859);
6852                var getSideChannelMap = __webpack_require__(507);
6853                var $TypeError = __webpack_require__(9675);
6854                var $WeakMap = GetIntrinsic('%WeakMap%', true);
6855                var $weakMapGet = callBound('WeakMap.prototype.get', true);
6856                var $weakMapSet = callBound('WeakMap.prototype.set', true);
6857                var $weakMapHas = callBound('WeakMap.prototype.has', true);
6858                var $weakMapDelete = callBound('WeakMap.prototype.delete', true);
6859                module1.exports = $WeakMap ? function() {
6860                    var $wm;
6861                    var $m;
6862                    var channel = {
6863                        assert: function(key) {
6864                            if (!channel.has(key)) throw new $TypeError('Side channel does not contain ' + inspect(key));
6865                        },
6866                        delete: function(key) {
6867                            if ($WeakMap && key && ('object' == typeof key || 'function' == typeof key)) {
6868                                if ($wm) return $weakMapDelete($wm, key);
6869                            } else if (getSideChannelMap) {
6870                                if ($m) return $m['delete'](key);
6871                            }
6872                            return false;
6873                        },
6874                        get: function(key) {
6875                            if ($WeakMap && key && ('object' == typeof key || 'function' == typeof key)) {
6876                                if ($wm) return $weakMapGet($wm, key);
6877                            }
6878                            return $m && $m.get(key);
6879                        },
6880                        has: function(key) {
6881                            if ($WeakMap && key && ('object' == typeof key || 'function' == typeof key)) {
6882                                if ($wm) return $weakMapHas($wm, key);
6883                            }
6884                            return !!$m && $m.has(key);
6885                        },
6886                        set: function(key, value) {
6887                            if ($WeakMap && key && ('object' == typeof key || 'function' == typeof key)) {
6888                                if (!$wm) $wm = new $WeakMap();
6889                                $weakMapSet($wm, key, value);
6890                            } else if (getSideChannelMap) {
6891                                if (!$m) $m = getSideChannelMap();
6892                                $m.set(key, value);
6893                            }
6894                        }
6895                    };
6896                    return channel;
6897                } : getSideChannelMap;
6898            },
6899            920 (module1, __unused_rspack_exports, __webpack_require__) {
6900                "use strict";
6901                var $TypeError = __webpack_require__(9675);
6902                var inspect = __webpack_require__(8859);
6903                var getSideChannelList = __webpack_require__(4803);
6904                var getSideChannelMap = __webpack_require__(507);
6905                var getSideChannelWeakMap = __webpack_require__(2271);
6906                var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
6907                module1.exports = function() {
6908                    var $channelData;
6909                    var channel = {
6910                        assert: function(key) {
6911                            if (!channel.has(key)) throw new $TypeError('Side channel does not contain ' + inspect(key));
6912                        },
6913                        delete: function(key) {
6914                            return !!$channelData && $channelData['delete'](key);
6915                        },
6916                        get: function(key) {
6917                            return $channelData && $channelData.get(key);
6918                        },
6919                        has: function(key) {
6920                            return !!$channelData && $channelData.has(key);
6921                        },
6922                        set: function(key, value) {
6923                            if (!$channelData) $channelData = makeChannel();
6924                            $channelData.set(key, value);
6925                        }
6926                    };
6927                    return channel;
6928                };
6929            },
6930            5332 (module1) {
6931                module1.exports = shift;
6932                function shift(stream) {
6933                    var rs = stream._readableState;
6934                    if (!rs) return null;
6935                    return rs.objectMode || 'number' == typeof stream._duplexState ? stream.read() : stream.read(getStateLength(rs));
6936                }
6937                function getStateLength(state) {
6938                    if (state.buffer.length) {
6939                        var idx = state.bufferIndex || 0;
6940                        if (state.buffer.head) return state.buffer.head.data.length;
6941                        if (state.buffer.length - idx > 0 && state.buffer[idx]) return state.buffer[idx].length;
6942                    }
6943                    return state.length;
6944                }
6945            },
6946            1380 (module1) {
6947                "use strict";
6948                const defaults = [
6949                    'use',
6950                    'on',
6951                    'once',
6952                    'set',
6953                    'query',
6954                    'type',
6955                    'accept',
6956                    'auth',
6957                    'withCredentials',
6958                    'sortQuery',
6959                    'retry',
6960                    'ok',
6961                    'redirects',
6962                    'timeout',
6963                    'buffer',
6964                    'serialize',
6965                    'parse',
6966                    'ca',
6967                    'key',
6968                    'pfx',
6969                    'cert',
6970                    'disableTLSCerts'
6971                ];
6972                class Agent {
6973                    constructor(){
6974                        this._defaults = [];
6975                    }
6976                    _setDefaults(request) {
6977                        for (const def of this._defaults)request[def.fn](...def.args);
6978                    }
6979                }
6980                for (const fn of defaults)Agent.prototype[fn] = function(...args) {
6981                    this._defaults.push({
6982                        fn,
6983                        args
6984                    });
6985                    return this;
6986                };
6987                module1.exports = Agent;
6988            },
6989            5734 (module1, exports1, __webpack_require__) {
6990                "use strict";
6991                let root;
6992                if ("u" > typeof window) root = window;
6993                else if ("u" < typeof self) {
6994                    console.warn('Using browser-only version of superagent in non-browser environment');
6995                    root = void 0;
6996                } else root = self;
6997                const Emitter = __webpack_require__(5971);
6998                const safeStringify = __webpack_require__(8463);
6999                const qs = __webpack_require__(5373);
7000                const RequestBase = __webpack_require__(1948);
7001                const { isObject, mixin, hasOwn } = __webpack_require__(3048);
7002                const ResponseBase = __webpack_require__(9450);
7003                const Agent = __webpack_require__(1380);
7004                function noop() {}
7005                module1.exports = function(method, url) {
7006                    if ('function' == typeof url) return new exp
7006orts1.Request('GET', method).end(url);
7007                    if (1 === arguments.length) return new exports1.Request('GET', method);
7008                    return new exports1.Request(method, url);
7009                };
7010                exports1 = module1.exports;
7011                const request = exports1;
7012                exports1.Request = Request;
7013                request.getXHR = ()=>{
7014                    if (root.XMLHttpRequest) return new root.XMLHttpRequest();
7015                    throw new Error('Browser-only version of superagent could not find XHR');
7016                };
7017                const trim = ''.trim ? (s)=>s.trim() : (s)=>s.replace(/(^\s*|\s*$)/g, '');
7018                function serialize(object) {
7019                    if (!isObject(object)) return object;
7020                    const pairs = [];
7021                    for(const key in object)if (hasOwn(object, key)) pushEncodedKeyValuePair(pairs, key, object[key]);
7022                    return pairs.join('&');
7023                }
7024                function pushEncodedKeyValuePair(pairs, key, value) {
7025                    if (void 0 === value) return;
7026                    if (null === value) return void pairs.push(encodeURI(key));
7027                    if (Array.isArray(value)) for (const v of value)pushEncodedKeyValuePair(pairs, key, v);
7028                    else if (isObject(value)) {
7029                        for(const subkey in value)if (hasOwn(value, subkey)) pushEncodedKeyValuePair(pairs, `${key}[${subkey}]`, value[subkey]);
7030                    } else pairs.push(encodeURI(key) + '=' + encodeURIComponent(value));
7031                }
7032                request.serializeObject = serialize;
7033                function parseString(string_) {
7034                    const object = {};
7035                    const pairs = string_.split('&');
7036                    let pair;
7037                    let pos;
7038                    for(let i = 0, length_ = pairs.length; i < length_; ++i){
7039                        pair = pairs[i];
7040                        pos = pair.indexOf('=');
7041                        if (-1 === pos) object[decodeURIComponent(pair)] = '';
7042                        else object[decodeURIComponent(pair.slice(0, pos))] = decodeURIComponent(pair.slice(pos + 1));
7043                    }
7044                    return object;
7045                }
7046                request.parseString = parseString;
7047                request.types = {
7048                    html: 'text/html',
7049                    json: 'application/json',
7050                    xml: 'text/xml',
7051                    urlencoded: 'application/x-www-form-urlencoded',
7052                    form: 'application/x-www-form-urlencoded',
7053                    'form-data': 'application/x-www-form-urlencoded'
7054                };
7055                request.serialize = {
7056                    'application/x-www-form-urlencoded': (obj)=>qs.stringify(obj, {
7057                            indices: false,
7058                            strictNullHandling: true
7059                        }),
7060                    'application/json': safeStringify
7061                };
7062                request.parse = {
7063                    'application/x-www-form-urlencoded': parseString,
7064                    'application/json': JSON.parse
7065                };
7066                function parseHeader(string_) {
7067                    const lines = string_.split(/\r?\n/);
7068                    const fields = {};
7069                    let index;
7070                    let line;
7071                    let field;
7072                    let value;
7073                    for(let i = 0, length_ = lines.length; i < length_; ++i){
7074                        line = lines[i];
7075                        index = line.indexOf(':');
7076                        if (-1 !== index) {
7077                            field = line.slice(0, index).toLowerCase();
7078                            value = trim(line.slice(index + 1));
7079                            fields[field] = value;
7080                        }
7081                    }
7082                    return fields;
7083                }
7084                function isJSON(mime) {
7085                    return /[/+]json($|[^-\w])/i.test(mime);
7086                }
7087                function Response(request_) {
7088                    this.req = request_;
7089                    this.xhr = this.req.xhr;
7090                    this.text = 'HEAD' !== this.req.method && ('' === this.xhr.responseType || 'text' === this.xhr.responseType) || void 0 === this.xhr.responseType ? this.xhr.responseText : null;
7091                    this.statusText = this.req.xhr.statusText;
7092                    let { status } = this.xhr;
7093                    if (1223 === status) status = 204;
7094                    this._setStatusProperties(status);
7095                    this.headers = parseHeader(this.xhr.getAllResponseHeaders());
7096                    this.header = this.headers;
7097                    this.header['content-type'] = this.xhr.getResponseHeader('content-type');
7098                    this._setHeaderProperties(this.header);
7099                    if (null === this.text && request_._responseType) this.body = this.xhr.response;
7100                    else this.body = 'HEAD' === this.req.method ? null : this._parseBody(this.text ? this.text : this.xhr.response);
7101                }
7102                mixin(Response.prototype, ResponseBase.prototype);
7103                Response.prototype._parseBody = function(string_) {
7104                    let parse = request.parse[this.type];
7105                    if (this.req._parser) return this.req._parser(this, string_);
7106                    if (!parse && isJSON(this.type)) parse = request.parse['application/json'];
7107                    return parse && string_ && (string_.length > 0 || string_ instanceof Object) ? parse(string_) : null;
7108                };
7109                Response.prototype.toError = function() {
7110                    const { req } = this;
7111                    const { method } = req;
7112                    const { url } = req;
7113                    const message = `cannot ${method} ${url} (${this.status})`;
7114                    const error = new Error(message);
7115                    error.status = this.status;
7116                    error.method = method;
7117                    error.url = url;
7118                    return error;
7119                };
7120                request.Response = Response;
7121                function Request(method, url) {
7122                    const self1 = this;
7123                    this._query = this._query || [];
7124                    this.method = method;
7125                    this.url = url;
7126                    this.header = {};
7127                    this._header = {};
7128                    this.on('end', ()=>{
7129                        let error = null;
7130                        let res = null;
7131                        try {
7132                            res = new Response(self1);
7133                        } catch (err) {
7134                            error = new Error('Parser is unable to parse the response');
7135                            error.parse = true;
7136                            error.original = err;
7137                            if (self1.xhr) {
7138                                error.rawResponse = void 0 === self1.xhr.responseType ? self1.xhr.responseText : self1.xhr.response;
7139                                error.status = self1.xhr.status ? self1.xhr.status : null;
7140                                error.statusCode = error.status;
7141                            } else {
7142                                error.rawResponse = null;
7143                                error.status = null;
7144                            }
7145                            return self1.callback(error);
7146                        }
7147                        self1.emit('response', res);
7148                        let new_error;
7149                        try {
7150                            if (!self1._isResponseOK(res)) new_error = new Error(res.statusText || res.text || 'Unsuccessful HTTP response');
7151                        } catch (err) {
7152                            new_error = err;
7153                        }
7154                        if (new_error) {
7155                            new_error.original = error;
7156                            new_error.response = res;
7157                            new_error.status = new_error.status || res.status;
7158                            self1.callback(new_error, res);
7159                        } else self1.callback(null, res);
7160                    });
7161                }
7162                Emitter(Request.prototype);
7163                mixin(Request.prototype, RequestBase.prototype);
7164                Request.prototype.type = function(type) {
7165                    this.set('Content-Type', request.types[type] || type);
7166                    return this;
7167                };
7168                Request.prototype.accept = function(type) {
7169                    this.set('Accept', request.types[type] || type);
7170                    return this;
7171                };
7172                Request.prototype.auth = function(user, pass, options) {
7173                    if (1 === arguments.length) pass = '';
7174                    if ('object' == typeof pass && null !== pass) {
7175                        options = pass;
7176                        pass = '';
7177                    }
7178                    if (!options) options = {
7179                        type: 'function' == typeof btoa ? 'basic' : 'auto'
7180                    };
7181                    const encoder = options.encoder ? options.encoder : (string)=>{
7182                        if ('function' == typeof btoa) return btoa(string);
7183                        throw new Error('Cannot use basic auth, btoa is not a function');
7184                    };
7185                    return this._auth(user, pass, options, encoder);
7186                };
7187                Request.prototype.query = function(value) {
7188                    if ('string' != typeof value) value = serialize(value);
7189                    if (value) this._query.push(value);
7190                    return this;
7191                };
7192                Request.prototype.attach = function(field, file, options) {
7193                    if (file) {
7194                        if (this._data) throw new Error("superagent can't mix .send() and .attach()");
7195                        this._getFormData().append(field, file, options || file.name);
7196                    }
7197                    return this;
7198                };
7199                Request.prototype._getFormData = function() {
7200                    if (!this._formData) this._formData = new root.FormData();
7201                    return this._formData;
7202                };
7203                Request.prototype.callback = function(error, res) {
7204                    if (this._shouldRetry(error, res)) return this._retry();
7205                    const fn = this._callback;
7206                    this.clearTimeout();
7207                    if (error) {
7208                        if (this._maxRetries) error.retries = this._retries - 1;
7209                        this.emit('error', error);
7210                    }
7211                    fn(error, res);
7212                };
7213                Request.prototype.crossDomainError = function() {
7214                    const error = new Error('Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.');
7215                    error.crossDomain = true;
7216                    error.status = this.status;
7217                    error.method = this.method;
7218                    error.url = this.url;
7219                    this.callback(error);
7220                };
7221                Request.prototype.agent = function() {
7222                    console.warn('This is not supported in browser version of superagent');
7223                    return this;
7224                };
7225                Request.prototype.ca = Request.prototype.agent;
7226                Request.prototype.buffer = Request.prototype.ca;
7227                Request.prototype.write = ()=>{
7228                    throw new Error('Streaming is not supported in browser version of superagent');
7229                };
7230                Request.prototype.pipe = Request.prototype.write;
7231                Request.prototype._isHost = function(object) {
7232                    return object && 'object' == typeof object && !Array.isArray(object) && '[object Object]' !== Object.prototype.toString.call(object);
7233                };
7234                Request.prototype.end = function(fn) {
7235                    if (this._endCalled) console.warn('Warning: .end() was called twice. This is not supported in superagent');
7236                    this._endCalled = true;
7237                    this._callback = fn || noop;
7238                    this._finalizeQueryString();
7239                    this._end();
7240                };
7241                Request.prototype._setUploadTimeout = function() {
7242                    const self1 = this;
7243                    if (this._uploadTimeout && !this._uploadTimeoutTimer) this._uploadTimeoutTimer = setTimeout(()=>{
7244                        self1._timeoutError('Upload timeout of ', self1._uploadTimeout, 'ETIMEDOUT');
7245                    }, this._uploadTimeout);
7246                };
7247                Request.prototype._end = function() {
7248                    if (this._aborted) return this.callback(new Error('The request has been aborted even before .end() was called'));
7249                    const self1 = this;
7250                    this.xhr = request.getXHR();
7251                    const { xhr } = this;
7252                    let data = this._formData || this._data;
7253                    this._setTimeouts();
7254                    xhr.addEventListener('readystatechange', ()=>{
7255                        const { readyState } = xhr;
7256                        if (readyState >= 2 && self1._responseTimeoutTimer) clearTimeout(self1._responseTimeoutTimer);
7257                        if (4 !== readyState) return;
7258                        let status;
7259                        try {
7260                            status = xhr.status;
7261                        } catch (err) {
7262                            status = 0;
7263                        }
7264                        if (!status) {
7265                            if (self1.timedout || self1._aborted) return;
7266                            return self1.crossDomainError();
7267                        }
7268                        self1.emit('end');
7269                    });
7270                    const handleProgress = (direction, e)=>{
7271                        if (e.total > 0) {
7272                            e.percent = e.loaded / e.total * 100;
7273                            if (100 === e.percent) clearTimeout(self1._uploadTimeoutTimer);
7274                        }
7275                        e.direction = direction;
7276                        self1.emit('progress', e);
7277                    };
7278                    if (this.hasListeners('progress')) try {
7279                        xhr.addEventListener('progress', handleProgress.bind(null, 'download'));
7280                        if (xhr.upload) xhr.upload.addEventListener('progress', handleProgress.bind(null, 'upload'));
7281                    } catch (err) {}
7282                    if (xhr.upload) this._setUploadTimeout();
7283                    try {
7284                        if (this.username && this.password) xhr.open(this.method, this.url, true, this.username, this.password);
7285                        else xhr.open(this.method, this.url, true);
7286                    } catch (err) {
7287                        return this.callback(err);
7288                    }
7289                    if (this._withCredentials) xhr.withCredentials = true;
7290                    if (!this._formData && 'GET' !== this.method && 'HEAD' !== this.method && 'string' != typeof data && !this._isHost(data)) {
7291                        const contentType = this._header['content-type'];
7292                        let serialize = this._serializer || request.serialize[contentType ? contentType.split(';')[0] : ''];
7293                        if (!serialize && isJSON(contentType)) serialize = request.serialize['application/json'];
7294                        if (serialize) data = serialize(data);
7295                    }
7296                    for(const field in this.header)if (null !== this.header[field]) {
7297                        if (hasOwn(this.header, field)) xhr.setRequestHeader(field, this.header[field]);
7298                    }
7299                    if (this._responseType) xhr.responseType = this._responseType;
vendor: 7,337 bytes, lines 7300-7475
7300                    this.emit('request', this);
7301                    xhr.send(void 0 === data ? null : data);
7302                };
7303                const proxyAgent = new Proxy(Agent, {
7304                    apply (target, thisArg, argumentsList) {
7305                        return new target(...argumentsList);
7306                    }
7307                });
7308                request.agent = proxyAgent;
7309                for (const method of [
7310                    'GET',
7311                    'POST',
7312                    'OPTIONS',
7313                    'PATCH',
7314                    'PUT',
7315                    'DELETE'
7316                ])Agent.prototype[method.toLowerCase()] = function(url, fn) {
7317                    const request_ = new request.Request(method, url);
7318                    this._setDefaults(request_);
7319                    if (fn) request_.end(fn);
7320                    return request_;
7321                };
7322                Agent.prototype.del = Agent.prototype.delete;
7323                request.get = (url, data, fn)=>{
7324                    const request_ = request('GET', url);
7325                    if ('function' == typeof data) {
7326                        fn = data;
7327                        data = null;
7328                    }
7329                    if (data) request_.query(data);
7330                    if (fn) request_.end(fn);
7331                    return request_;
7332                };
7333                request.head = (url, data, fn)=>{
7334                    const request_ = request('HEAD', url);
7335                    if ('function' == typeof data) {
7336                        fn = data;
7337                        data = null;
7338                    }
7339                    if (data) request_.query(data);
7340                    if (fn) request_.end(fn);
7341                    return request_;
7342                };
7343                request.options = (url, data, fn)=>{
7344                    const request_ = request('OPTIONS', url);
7345                    if ('function' == typeof data) {
7346                        fn = data;
7347                        data = null;
7348                    }
7349                    if (data) request_.send(data);
7350                    if (fn) request_.end(fn);
7351                    return request_;
7352                };
7353                function del(url, data, fn) {
7354                    const request_ = request('DELETE', url);
7355                    if ('function' == typeof data) {
7356                        fn = data;
7357                        data = null;
7358                    }
7359                    if (data) request_.send(data);
7360                    if (fn) request_.end(fn);
7361                    return request_;
7362                }
7363                request.del = del;
7364                request.delete = del;
7365                request.patch = (url, data, fn)=>{
7366                    const request_ = request('PATCH', url);
7367                    if ('function' == typeof data) {
7368                        fn = data;
7369                        data = null;
7370                    }
7371                    if (data) request_.send(data);
7372                    if (fn) request_.end(fn);
7373                    return request_;
7374                };
7375                request.post = (url, data, fn)=>{
7376                    const request_ = request('POST', url);
7377                    if ('function' == typeof data) {
7378                        fn = data;
7379                        data = null;
7380                    }
7381                    if (data) request_.send(data);
7382                    if (fn) request_.end(fn);
7383                    return request_;
7384                };
7385                request.put = (url, data, fn)=>{
7386                    const request_ = request('PUT', url);
7387                    if ('function' == typeof data) {
7388                        fn = data;
7389                        data = null;
7390                    }
7391                    if (data) request_.send(data);
7392                    if (fn) request_.end(fn);
7393                    return request_;
7394                };
7395            },
7396            1948 (module1, __unused_rspack_exports, __webpack_require__) {
7397                "use strict";
7398                const { isObject, hasOwn } = __webpack_require__(3048);
7399                module1.exports = RequestBase;
7400                function RequestBase() {}
7401                RequestBase.prototype.clearTimeout = function() {
7402                    clearTimeout(this._timer);
7403                    clearTimeout(this._responseTimeoutTimer);
7404                    clearTimeout(this._uploadTimeoutTimer);
7405                    delete this._timer;
7406                    delete this._responseTimeoutTimer;
7407                    delete this._uploadTimeoutTimer;
7408                    return this;
7409                };
7410                RequestBase.prototype.parse = function(fn) {
7411                    this._parser = fn;
7412                    return this;
7413                };
7414                RequestBase.prototype.responseType = function(value) {
7415                    this._responseType = value;
7416                    return this;
7417                };
7418                RequestBase.prototype.serialize = function(fn) {
7419                    this._serializer = fn;
7420                    return this;
7421                };
7422                RequestBase.prototype.timeout = function(options) {
7423                    if (!options || 'object' != typeof options) {
7424                        this._timeout = options;
7425                        this._responseTimeout = 0;
7426                        this._uploadTimeout = 0;
7427                        return this;
7428                    }
7429                    for(const option in options)if (hasOwn(options, option)) switch(option){
7430                        case 'deadline':
7431                            this._timeout = options.deadline;
7432                            break;
7433                        case 'response':
7434                            this._responseTimeout = options.response;
7435                            break;
7436                        case 'upload':
7437                            this._uploadTimeout = options.upload;
7438                            break;
7439                        default:
7440                            console.warn('Unknown timeout option', option);
7441                    }
7442                    return this;
7443                };
7444                RequestBase.prototype.retry = function(count, fn) {
7445                    if (0 === arguments.length || true === count) count = 1;
7446                    if (count <= 0) count = 0;
7447                    this._maxRetries = count;
7448                    this._retries = 0;
7449                    this._retryCallback = fn;
7450                    return this;
7451                };
7452                const ERROR_CODES = new Set([
7453                    'ETIMEDOUT',
7454                    'ECONNRESET',
7455                    'EADDRINUSE',
7456                    'ECONNREFUSED',
7457                    'EPIPE',
7458                    'ENOTFOUND',
7459                    'ENETUNREACH',
7460                    'EAI_AGAIN'
7461                ]);
7462                const STATUS_CODES = new Set([
7463                    408,
7464                    413,
7465                    429,
7466                    500,
7467                    502,
7468                    503,
7469                    504,
7470                    521,
7471                    522,
7472                    524
7473                ]);
7474                RequestBase.prototype._shouldRetry = function(error, res) {
7475                    if (!this._maxRetries || this._retries++ >= this._maxRetries) return false;
7476                    if (this._retryCallback) try {
7477                        const override = this._retryCallback(error, res);
7478                        if (true === override) return true;
7479                        if (false === override) return false;
7480                    } catch (err) {
7481                        console.error(err);
7482                    }
7483                    if (res && res.status && STATUS_CODES.has(res.status)) return true;
7484                    if (error) {
7485                        if (error.code && ERROR_CODES.has(error.code)) return true;
7486                        if (error.timeout && 'ECONNABORTED' === error.code) return true;
7487                        if (error.crossDomain) return true;
7488                    }
7489                    return false;
7490                };
7491                RequestBase.prototype._retry = function() {
7492                    this.clearTimeout();
7493                    if (this.req) {
7494                        this.req = null;
7495                        this.req = this.request();
7496                    }
7497                    this._aborted = false;
7498                    this.timedout = false;
7499                    this.timedoutError = null;
7500                    return this._end();
7501                };
7502                RequestBase.prototype.then = function(resolve, reject) {
7503                    if (!this._fullfilledPromise) {
7504                        const self1 = this;
7505                        if (this._endCalled) console.warn('Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises');
7506                        this._fullfilledPromise = new Promise((resolve, reject)=>{
7507                            self1.on('abort', ()=>{
7508                                if (this._maxRetries && this._maxRetries > this._retries) return;
7509                                if (this.timedout && this.timedoutError) return void reject(this.timedoutError);
7510                                const error = new Error('Aborted');
7511                                error.code = 'ABORTED';
7512                                error.status = this.status;
7513                                error.method = this.method;
7514                                error.url = this.url;
7515                                reject(error);
7516                            });
7517                            self1.end((error, res)=>{
7518                                if (error) reject(error);
7519                                else resolve(res);
7520                            });
7521                        });
7522                    }
7523                    return this._fullfilledPromise.then(resolve, reject);
7524                };
7525                RequestBase.prototype.catch = function(callback) {
7526                    return this.then(void 0, callback);
7527                };
7528                RequestBase.prototype.use = function(fn) {
7529                    fn(this);
7530                    return this;
7531                };
7532                RequestBase.prototype.ok = function(callback) {
7533                    if ('function' != typeof callback) throw new Error('Callback required');
7534                    this._okCallback = callback;
7535                    return this;
7536                };
7537                RequestBase.prototype._isResponseOK = function(res) {
7538                    if (!res) return false;
7539                    if (this._okCallback) return this._okCallback(res);
7540                    return res.status >= 200 && res.status < 300;
7541                };
7542                RequestBase.prototype.get = function(field) {
7543                    return this._header[field.toLowerCase()];
7544                };
7545                RequestBase.prototype.getHeader = RequestBase.prototype.get;
7546                RequestBase.prototype.set = function(field, value) {
7547                    if (isObject(field)) {
7548                        for(const key in field)if (hasOwn(field, key)) this.set(key, field[key]);
7549                        return this;
7550                    }
7551                    this._header[field.toLowerCase()] = value;
7552                    this.header[field] = value;
7553                    return this;
7554                };
7555                RequestBase.prototype.unset = function(field) {
7556                    delete this._header[field.toLowerCase()];
7557                    delete this.header[field];
7558                    return this;
7559                };
7560                RequestBase.prototype.field = function(name, value, options) {
7561                    if (null == name) throw new Error('.field(name, val) name can not be empty');
7562                    if (this._data) throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");
7563                    if (isObject(name)) {
7564                        for(const key in name)if (hasOwn(name, key)) this.field(key, name[key]);
7565                        return this;
7566                    }
7567                    if (Array.isArray(value)) {
7568                        for(const i in value)if (hasOwn(value, i)) this.field(name, value[i]);
7569                        return this;
7570                    }
7571                    if (null == value) throw new Error('.field(name, val) val can not be empty');
7572                    if ('boolean' == typeof value) value = String(value);
7573                    if (options) this._getFormData().append(name, value, options);
7574                    else this._getFormData().append(name, value);
7575                    return this;
7576                };
7577                RequestBase.prototype.abort = function() {
7578                    if (this._aborted) return this;
7579                    this._aborted = true;
7580                    if (this.xhr) this.xhr.abort();
7581                    if (this.req) this.req.abort();
7582                    this.clearTimeout();
7583                    this.emit('abort');
7584                    return this;
7585                };
7586                RequestBase.prototype._auth = function(user, pass, options, base64Encoder) {
7587                    switch(options.type){
7588                        case 'basic':
7589                            this.set('Authorization', `Basic ${base64Encoder(`${user}:${pass}`)}`);
7590                            break;
7591                        case 'auto':
7592                            this.username = user;
7593                            this.password = pass;
7594                            break;
7595                        case 'bearer':
7596                            this.set('Authorization', `Bearer ${user}`);
7597                            break;
7598                        default:
7599                            break;
7600                    }
7601                    return this;
7602                };
7603                RequestBase.prototype.withCredentials = function(on) {
7604                    if (void 0 === on) on = true;
7605                    this._withCredentials = on;
7606                    return this;
7607                };
7608                RequestBase.prototype.redirects = function(n) {
7609                    this._maxRedirects = n;
7610                    return this;
7611                };
7612                RequestBase.prototype.maxResponseSize = function(n) {
7613                    if ('number' != typeof n) throw new TypeError('Invalid argument');
7614                    this._maxResponseSize = n;
7615                    return this;
7616                };
7617                RequestBase.prototype.toJSON = function() {
7618                    return {
7619                        method: this.method,
7620                        url: this.url,
7621                        data: this._data,
7622                        headers: this._header
7623                    };
7624                };
7625                RequestBase.prototype.send = function(data) {
7626                    const isObject_ = isObject(data);
7627                    let type = this._header['content-type'];
7628                    if (this._formData) throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");
7629                    if (isObject_ && !this._data) {
7630                        if (Array.isArray(data)) this._data = [];
7631                        else if (!this._isHost(data)) this._data = {};
7632                    } else if (data && this._data && this._isHost(this._data)) throw new Error("Can't merge these send calls");
7633                    if (isObject_ && isObject(this._data)) for(const key in data){
7634                        if ('bigint' == typeof data[key] && !data[key].toJSON) throw new Error('Cannot serialize BigInt value to json');
7635                        if (hasOwn(data, key)) this._data[key] = data[key];
7636                    }
7637                    else if ('bigint' == typeof data) throw new Error("Cannot send value of type BigInt");
7638                    else if ('string' == typeof data) {
7639                        if (!type) this.type('form');
7640                        type = this._header['content-type'];
7641                        if (type) type = type.toLowerCase().trim();
7642                        if ('application/x-www-form-urlencoded' === type) this._data = this._data ? `${this._data}&${data}` : data;
7643                        else this._data = (this._data || '') + data;
7644                    } else this._data = data;
7645                    if (!isObject_ || this._isHost(data)) return this;
7646                    if (!type) this.type('json');
7647                    return this;
7648                };
7649                RequestBase.prototype.sortQuery = function(sort) {
7650                    this._sort = void 0 === sort ? true : sort;
7651                    return this;
7652                };
7653                RequestBase.prototype._finalizeQueryString = function() {
7654                    const query = this._query.join('&');
7655                    if (query) this.url += (this.url.includes('?') ? '&' : '?') + query;
7656                    this._query.length = 0;
7657                    if (this._sort) {
7658                        const index = this.url.indexOf('?');
7659                        if (index >= 0) {
7660                            const queryArray = this.url.slice(index + 1).split('&');
7661                            if ('function' == typeof this._sort) queryArray.sort(this._sort);
7662                            else queryArray.sort();
7663                            this.url = this.url.slice(0, index) + '?' + queryArray.join('&');
7664                        }
7665                    }
7666                };
7667                RequestBase.prototype._appendQueryString = ()=>{
7668                    console.warn('Unsupported');
7669                };
7670                RequestBase.prototype._timeoutError = function(reason, timeout, errno) {
7671                    if (this._aborted) return;
7672                    const error = new Error(`${reason + timeout}ms exceeded`);
7673                    error.timeout = timeout;
7674                    error.code = 'ECONNABORTED';
7675                    error.errno = errno;
7676                    this.timedout = true;
7677                    this.timedoutError = error;
7678                    this.abort();
7679                    this.callback(error);
7680                };
7681                RequestBase.prototype._setTimeouts = function() {
7682                    const self1 = this;
7683                    if (this._timeout && !this._timer) this._timer = setTimeout(()=>{
7684                        self1._timeoutError('Timeout of ', self1._timeout, 'ETIME');
7685                    }, this._timeout);
7686                    if (this._responseTimeout && !this._responseTimeoutTimer) this._responseTimeoutTimer = setTimeout(()=>{
7687                        self1._timeoutError('Response timeout of ', self1._responseTimeout, 'ETIMEDOUT');
7688                    }, this._responseTimeout);
7689                };
7690            },
7691            9450 (module1, __unused_rspack_exports, __webpack_require__) {
7692                "use strict";
7693                const utils = __webpack_require__(3048);
7694                module1.exports = ResponseBase;
7695                function ResponseBase() {}
7696                ResponseBase.prototype.get = function(field) {
7697                    return this.header[field.toLowerCase()];
7698                };
7699                ResponseBase.prototype._setHeaderProperties = function(header) {
7700                    const ct = header['content-type'] || '';
7701                    this.type = utils.type(ct);
7702                    const parameters = utils.params(ct);
7703                    for(const key in parameters)if (Object.prototype.hasOwnProperty.call(parameters, 
7703key)) this[key] = parameters[key];
7704                    this.links = {};
7705                    try {
7706                        if (header.link) this.links = utils.parseLinks(header.link);
7707                    } catch (err) {}
7708                };
7709                ResponseBase.prototype._setStatusProperties = function(status) {
7710                    const type = Math.trunc(status / 100);
7711                    this.statusCode = status;
7712                    this.status = this.statusCode;
7713                    this.statusType = type;
7714                    this.info = 1 === type;
7715                    this.ok = 2 === type;
7716                    this.redirect = 3 === type;
7717                    this.clientError = 4 === type;
7718                    this.serverError = 5 === type;
7719                    this.error = 4 === type || 5 === type ? this.toError() : false;
7720                    this.created = 201 === status;
7721                    this.accepted = 202 === status;
7722                    this.noContent = 204 === status;
7723                    this.badRequest = 400 === status;
7724                    this.unauthorized = 401 === status;
7725                    this.notAcceptable = 406 === status;
7726                    this.forbidden = 403 === status;
7727                    this.notFound = 404 === status;
7728                    this.unprocessableEntity = 422 === status;
7729                };
7730            },
7731            3048 (__unused_rspack_module, exports1) {
7732                "use strict";
7733                exports1.type = (string_)=>string_.split(/ *; */).shift();
7734                exports1.params = (value)=>{
7735                    const object = {};
7736                    for (const string_ of value.split(/ *; */)){
7737                        const parts = string_.split(/ *= */);
7738                        const key = parts.shift();
7739                        const value = parts.shift();
7740                        if (key && value) object[key] = value;
7741                    }
7742                    return object;
7743                };
7744                exports1.parseLinks = (value)=>{
7745                    const object = {};
7746                    for (const string_ of value.split(/ *, */)){
7747                        const parts = string_.split(/ *; */);
7748                        const url = parts[0].slice(1, -1);
7749                        const rel = parts[1].split(/ *= */)[1].slice(1, -1);
7750                        object[rel] = url;
7751                    }
7752                    return object;
7753                };
7754                exports1.cleanHeader = (header, changesOrigin)=>{
7755                    delete header['content-type'];
7756                    delete header['content-length'];
7757                    delete header['transfer-encoding'];
7758                    delete header.host;
7759                    if (changesOrigin) {
7760                        delete header.authorization;
7761                        delete header.cookie;
7762                    }
7763                    return header;
7764                };
7765                exports1.normalizeHostname = (hostname)=>{
7766                    const [, normalized] = hostname.match(/^\[([^\]]+)\]$/) || [];
7767                    return normalized || hostname;
7768                };
7769                exports1.isObject = (object)=>null !== object && 'object' == typeof object;
7770                exports1.hasOwn = Object.hasOwn || function(object, property) {
7771                    if (null == object) throw new TypeError('Cannot convert undefined or null to object');
7772                    return Object.prototype.hasOwnProperty.call(new Object(object), property);
7773                };
7774                exports1.mixin = (target, source)=>{
7775                    for(const key in source)if (exports1.hasOwn(source, key)) target[key] = source[key];
7776                };
7777                exports1.isGzipOrDeflateEncoding = (res)=>new RegExp(/^\s*(?:deflate|gzip)\s*$/).test(res.headers['content-encoding']);
7778                exports1.isBrotliEncoding = (res)=>new RegExp(/^\s*(?:br)\s*$/).test(res.headers['content-encoding']);
7779            },
7780            4527 (module1, __unused_rspack_exports, __webpack_require__) {
7781                var Buffer = __webpack_require__(8287).Buffer;
7782                /*! typedarray-to-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ module1.exports = function(arr) {
7783                    return ArrayBuffer.isView(arr) ? Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength) : Buffer.from(arr);
7784                };
7785            },
7786            4643 (module1, __unused_rspack_exports, __webpack_require__) {
7787                module1.exports = deprecate;
7788                function deprecate(fn, msg) {
7789                    if (config('noDeprecation')) return fn;
7790                    var warned = false;
7791                    function deprecated() {
7792                        if (!warned) {
7793                            if (config('throwDeprecation')) throw new Error(msg);
7794                            if (config('traceDeprecation')) console.trace(msg);
7795                            else console.warn(msg);
7796                            warned = true;
7797                        }
7798                        return fn.apply(this, arguments);
7799                    }
7800                    return deprecated;
7801                }
7802                function config(name) {
7803                    try {
7804                        if (!__webpack_require__.g.localStorage) return false;
7805                    } catch (_) {
7806                        return false;
7807                    }
7808                    var val = __webpack_require__.g.localStorage[name];
7809                    if (null == val) return false;
7810                    return 'true' === String(val).toLowerCase();
7811                }
7812            },
7813            1135 (module1) {
7814                module1.exports = function(arg) {
7815                    return arg && 'object' == typeof arg && 'function' == typeof arg.copy && 'function' == typeof arg.fill && 'function' == typeof arg.readUInt8;
7816                };
7817            },
7818            9032 (__unused_rspack_module, exports1, __webpack_require__) {
7819                "use strict";
7820                var isArgumentsObject = __webpack_require__(7244);
7821                var isGeneratorFunction = __webpack_require__(8184);
7822                var whichTypedArray = __webpack_require__(5767);
7823                var isTypedArray = __webpack_require__(5680);
7824                function uncurryThis(f) {
7825                    return f.call.bind(f);
7826                }
7827                var BigIntSupported = "u" > typeof BigInt;
7828                var SymbolSupported = "u" > typeof Symbol;
7829                var ObjectToString = uncurryThis(Object.prototype.toString);
7830                var numberValue = uncurryThis(Number.prototype.valueOf);
7831                var stringValue = uncurryThis(String.prototype.valueOf);
7832                var booleanValue = uncurryThis(Boolean.prototype.valueOf);
7833                if (BigIntSupported) var bigIntValue = uncurryThis(BigInt.prototype.valueOf);
7834                if (SymbolSupported) var symbolValue = uncurryThis(Symbol.prototype.valueOf);
7835                function checkBoxedPrimitive(value, prototypeValueOf) {
7836                    if ('object' != typeof value) return false;
7837                    try {
7838                        prototypeValueOf(value);
7839                        return true;
7840                    } catch (e) {
7841                        return false;
7842                    }
7843                }
7844                exports1.isArgumentsObject = isArgumentsObject;
7845                exports1.isGeneratorFunction = isGeneratorFunction;
7846                exports1.isTypedArray = isTypedArray;
7847                function isPromise(input) {
7848                    return "u" > typeof Promise && input instanceof Promise || null !== input && 'object' == typeof input && 'function' == typeof input.then && 'function' == typeof input.catch;
7849                }
7850                exports1.isPromise = isPromise;
7851                function isArrayBufferView(value) {
7852                    if ("u" > typeof ArrayBuffer && ArrayBuffer.isView) return ArrayBuffer.isView(value);
7853                    return isTypedArray(value) || isDataView(value);
7854                }
7855                exports1.isArrayBufferView = isArrayBufferView;
7856                function isUint8Array(value) {
7857                    return 'Uint8Array' === whichTypedArray(value);
7858                }
7859                exports1.isUint8Array = isUint8Array;
7860                function isUint8ClampedArray(value) {
7861                    return 'Uint8ClampedArray' === whichTypedArray(value);
7862                }
7863                exports1.isUint8ClampedArray = isUint8ClampedArray;
7864                function isUint16Array(value) {
7865                    return 'Uint16Array' === whichTypedArray(value);
7866                }
7867                exports1.isUint16Array = isUint16Array;
7868                function isUint32Array(value) {
7869                    return 'Uint32Array' === whichTypedArray(value);
7870                }
7871                exports1.isUint32Array = isUint32Array;
7872                function isInt8Array(value) {
7873                    return 'Int8Array' === whichTypedArray(value);
7874                }
7875                exports1.isInt8Array = isInt8Array;
7876                function isInt16Array(value) {
7877                    return 'Int16Array' === whichTypedArray(value);
7878                }
7879                exports1.isInt16Array = isInt16Array;
7880                function isInt32Array(value) {
7881                    return 'Int32Array' === whichTypedArray(value);
7882                }
7883                exports1.isInt32Array = isInt32Array;
7884                function isFloat32Array(value) {
7885                    return 'Float32Array' === whichTypedArray(value);
7886                }
7887                exports1.isFloat32Array = isFloat32Array;
7888                function isFloat64Array(value) {
7889                    return 'Float64Array' === whichTypedArray(value);
7890                }
7891                exports1.isFloat64Array = isFloat64Array;
7892                function isBigInt64Array(value) {
7893                    return 'BigInt64Array' === whichTypedArray(value);
7894                }
7895                exports1.isBigInt64Array = isBigInt64Array;
7896                function isBigUint64Array(value) {
7897                    return 'BigUint64Array' === whichTypedArray(value);
7898                }
7899                exports1.isBigUint64Array = isBigUint64Array;
7900                function isMapToString(value) {
7901                    return '[object Map]' === ObjectToString(value);
7902                }
7903                isMapToString.working = "u" > typeof Map && isMapToString(new Map());
7904                function isMap(value) {
7905                    if ("u" < typeof Map) return false;
7906                    return isMapToString.working ? isMapToString(value) : value instanceof Map;
7907                }
7908                exports1.isMap = isMap;
7909                function isSetToString(value) {
7910                    return '[object Set]' === ObjectToString(value);
7911                }
7912                isSetToString.working = "u" > typeof Set && isSetToString(new Set());
7913                function isSet(value) {
7914                    if ("u" < typeof Set) return false;
7915                    return isSetToString.working ? isSetToString(value) : value instanceof Set;
7916                }
7917                exports1.isSet = isSet;
7918                function isWeakMapToString(value) {
7919                    return '[object WeakMap]' === ObjectToString(value);
7920                }
7921                isWeakMapToString.working = "u" > typeof WeakMap && isWeakMapToString(new WeakMap());
7922                function isWeakMap(value) {
7923                    if ("u" < typeof WeakMap) return false;
7924                    return isWeakMapToString.working ? isWeakMapToString(value) : value instanceof WeakMap;
7925                }
7926                exports1.isWeakMap = isWeakMap;
7927                function isWeakSetToString(value) {
7928                    return '[object WeakSet]' === ObjectToString(value);
7929                }
7930                isWeakSetToString.working = "u" > typeof WeakSet && isWeakSetToString(new WeakSet());
7931                function isWeakSet(value) {
7932                    return isWeakSetToString(value);
7933                }
7934                exports1.isWeakSet = isWeakSet;
7935                function isArrayBufferToString(value) {
7936                    return '[object ArrayBuffer]' === ObjectToString(value);
7937                }
7938                isArrayBufferToString.working = "u" > typeof ArrayBuffer && isArrayBufferToString(new ArrayBuffer());
7939                function isArrayBuffer(value) {
7940                    if ("u" < typeof ArrayBuffer) return false;
7941                    return isArrayBufferToString.working ? isArrayBufferToString(value) : value instanceof ArrayBuffer;
7942                }
7943                exports1.isArrayBuffer = isArrayBuffer;
7944                function isDataViewToString(value) {
7945                    return '[object DataView]' === ObjectToString(value);
7946                }
7947                isDataViewToString.working = "u" > typeof ArrayBuffer && "u" > typeof DataView && isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1));
7948                function isDataView(value) {
7949                    if ("u" < typeof DataView) return false;
7950                    return isDataViewToString.working ? isDataViewToString(value) : value instanceof DataView;
7951                }
7952                exports1.isDataView = isDataView;
7953                var SharedArrayBufferCopy = "u" > typeof SharedArrayBuffer ? SharedArrayBuffer : void 0;
7954                function isSharedArrayBufferToString(value) {
7955                    return '[object SharedArrayBuffer]' === ObjectToString(value);
7956                }
7957                function isSharedArrayBuffer(value) {
7958                    if (void 0 === SharedArrayBufferCopy) return false;
7959                    if (void 0 === isSharedArrayBufferToString.working) isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());
7960                    return isSharedArrayBufferToString.working ? isSharedArrayBufferToString(value) : value instanceof SharedArrayBufferCopy;
7961                }
7962                exports1.isSharedArrayBuffer = isSharedArrayBuffer;
7963                function isAsyncFunction(value) {
7964                    return '[object AsyncFunction]' === ObjectToString(value);
7965                }
7966                exports1.isAsyncFunction = isAsyncFunction;
7967                function isMapIterator(value) {
7968                    return '[object Map Iterator]' === ObjectToString(value);
7969                }
7970                exports1.isMapIterator = isMapIterator;
7971                function isSetIterator(value) {
7972                    return '[object Set Iterator]' === ObjectToString(value);
7973                }
7974                exports1.isSetIterator = isSetIterator;
7975                function isGeneratorObject(value) {
7976                    return '[object Generator]' === ObjectToString(value);
7977                }
7978                exports1.isGeneratorObject = isGeneratorObject;
7979                function isWebAssemblyCompiledModule(value) {
7980                    return '[object WebAssembly.Module]' === ObjectToString(value);
7981                }
7982                exports1.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;
7983                function isNumberObject(value) {
7984                    return checkBoxedPrimitive(value, numberValue);
7985                }
7986                exports1.isNumberObject = isNumberObject;
7987                function isStringObject(value) {
7988                    return checkBoxedPrimitive(value, stringValue);
7989                }
7990                exports1.isStringObject = isStringObject;
7991                function isBooleanObject(value) {
7992                    return checkBoxedPrimitive(value, booleanValue);
7993                }
7994                exports1.isBooleanObject = isBooleanObject;
7995                function isBigIntObject(value) {
7996                    return BigIntSupported && checkBoxedPrimitive(value, bigIntV
vendor: 24,138 bytes, lines 7996-8487
7996alue);
7997                }
7998                exports1.isBigIntObject = isBigIntObject;
7999                function isSymbolObject(value) {
8000                    return SymbolSupported && checkBoxedPrimitive(value, symbolValue);
8001                }
8002                exports1.isSymbolObject = isSymbolObject;
8003                function isBoxedPrimitive(value) {
8004                    return isNumberObject(value) || isStringObject(value) || isBooleanObject(value) || isBigIntObject(value) || isSymbolObject(value);
8005                }
8006                exports1.isBoxedPrimitive = isBoxedPrimitive;
8007                function isAnyArrayBuffer(value) {
8008                    return "u" > typeof Uint8Array && (isArrayBuffer(value) || isSharedArrayBuffer(value));
8009                }
8010                exports1.isAnyArrayBuffer = isAnyArrayBuffer;
8011                [
8012                    'isProxy',
8013                    'isExternal',
8014                    'isModuleNamespaceObject'
8015                ].forEach(function(method) {
8016                    Object.defineProperty(exports1, method, {
8017                        enumerable: false,
8018                        value: function() {
8019                            throw new Error(method + ' is not supported in userland');
8020                        }
8021                    });
8022                });
8023            },
8024            537 (__unused_rspack_module, exports1, __webpack_require__) {
8025                var process = __webpack_require__(5606);
8026                var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || function(obj) {
8027                    var keys = Object.keys(obj);
8028                    var descriptors = {};
8029                    for(var i = 0; i < keys.length; i++)descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);
8030                    return descriptors;
8031                };
8032                var formatRegExp = /%[sdj%]/g;
8033                exports1.format = function(f) {
8034                    if (!isString(f)) {
8035                        var objects = [];
8036                        for(var i = 0; i < arguments.length; i++)objects.push(inspect(arguments[i]));
8037                        return objects.join(' ');
8038                    }
8039                    var i = 1;
8040                    var args = arguments;
8041                    var len = args.length;
8042                    var str = String(f).replace(formatRegExp, function(x) {
8043                        if ('%%' === x) return '%';
8044                        if (i >= len) return x;
8045                        switch(x){
8046                            case '%s':
8047                                return String(args[i++]);
8048                            case '%d':
8049                                return Number(args[i++]);
8050                            case '%j':
8051                                try {
8052                                    return JSON.stringify(args[i++]);
8053                                } catch (_) {
8054                                    return '[Circular]';
8055                                }
8056                            default:
8057                                return x;
8058                        }
8059                    });
8060                    for(var x = args[i]; i < len; x = args[++i])if (isNull(x) || !isObject(x)) str += ' ' + x;
8061                    else str += ' ' + inspect(x);
8062                    return str;
8063                };
8064                exports1.deprecate = function(fn, msg) {
8065                    if (void 0 !== process && true === process.noDeprecation) return fn;
8066                    if (void 0 === process) return function() {
8067                        return exports1.deprecate(fn, msg).apply(this, arguments);
8068                    };
8069                    var warned = false;
8070                    function deprecated() {
8071                        if (!warned) {
8072                            if (process.throwDeprecation) throw new Error(msg);
8073                            if (process.traceDeprecation) console.trace(msg);
8074                            else console.error(msg);
8075                            warned = true;
8076                        }
8077                        return fn.apply(this, arguments);
8078                    }
8079                    return deprecated;
8080                };
8081                var debugs = {};
8082                var debugEnvRegex = /^$/;
8083                if (process.env.NODE_DEBUG) {
8084                    var debugEnv = process.env.NODE_DEBUG;
8085                    debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, '\\$&').replace(/\*/g, '.*').replace(/,/g, '$|^').toUpperCase();
8086                    debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');
8087                }
8088                exports1.debuglog = function(set) {
8089                    set = set.toUpperCase();
8090                    if (!debugs[set]) if (debugEnvRegex.test(set)) {
8091                        var pid = process.pid;
8092                        debugs[set] = function() {
8093                            var msg = exports1.format.apply(exports1, arguments);
8094                            console.error('%s %d: %s', set, pid, msg);
8095                        };
8096                    } else debugs[set] = function() {};
8097                    return debugs[set];
8098                };
8099                function inspect(obj, opts) {
8100                    var ctx = {
8101                        seen: [],
8102                        stylize: stylizeNoColor
8103                    };
8104                    if (arguments.length >= 3) ctx.depth = arguments[2];
8105                    if (arguments.length >= 4) ctx.colors = arguments[3];
8106                    if (isBoolean(opts)) ctx.showHidden = opts;
8107                    else if (opts) exports1._extend(ctx, opts);
8108                    if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
8109                    if (isUndefined(ctx.depth)) ctx.depth = 2;
8110                    if (isUndefined(ctx.colors)) ctx.colors = false;
8111                    if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
8112                    if (ctx.colors) ctx.stylize = stylizeWithColor;
8113                    return formatValue(ctx, obj, ctx.depth);
8114                }
8115                exports1.inspect = inspect;
8116                inspect.colors = {
8117                    bold: [
8118                        1,
8119                        22
8120                    ],
8121                    italic: [
8122                        3,
8123                        23
8124                    ],
8125                    underline: [
8126                        4,
8127                        24
8128                    ],
8129                    inverse: [
8130                        7,
8131                        27
8132                    ],
8133                    white: [
8134                        37,
8135                        39
8136                    ],
8137                    grey: [
8138                        90,
8139                        39
8140                    ],
8141                    black: [
8142                        30,
8143                        39
8144                    ],
8145                    blue: [
8146                        34,
8147                        39
8148                    ],
8149                    cyan: [
8150                        36,
8151                        39
8152                    ],
8153                    green: [
8154                        32,
8155                        39
8156                    ],
8157                    magenta: [
8158                        35,
8159                        39
8160                    ],
8161                    red: [
8162                        31,
8163                        39
8164                    ],
8165                    yellow: [
8166                        33,
8167                        39
8168                    ]
8169                };
8170                inspect.styles = {
8171                    special: 'cyan',
8172                    number: 'yellow',
8173                    boolean: 'yellow',
8174                    undefined: 'grey',
8175                    null: 'bold',
8176                    string: 'green',
8177                    date: 'magenta',
8178                    regexp: 'red'
8179                };
8180                function stylizeWithColor(str, styleType) {
8181                    var style = inspect.styles[styleType];
8182                    if (style) return '\u001b[' + inspect.colors[style][0] + 'm' + str + '\u001b[' + inspect.colors[style][1] + 'm';
8183                    return str;
8184                }
8185                function stylizeNoColor(str, styleType) {
8186                    return str;
8187                }
8188                function arrayToHash(array) {
8189                    var hash = {};
8190                    array.forEach(function(val, idx) {
8191                        hash[val] = true;
8192                    });
8193                    return hash;
8194                }
8195                function formatValue(ctx, value, recurseTimes) {
8196                    if (ctx.customInspect && value && isFunction(value.inspect) && value.inspect !== exports1.inspect && !(value.constructor && value.constructor.prototype === value)) {
8197                        var ret = value.inspect(recurseTimes, ctx);
8198                        if (!isString(ret)) ret = formatValue(ctx, ret, recurseTimes);
8199                        return ret;
8200                    }
8201                    var primitive = formatPrimitive(ctx, value);
8202                    if (primitive) return primitive;
8203                    var keys = Object.keys(value);
8204                    var visibleKeys = arrayToHash(keys);
8205                    if (ctx.showHidden) keys = Object.getOwnPropertyNames(value);
8206                    if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf("description") >= 0)) return formatError(value);
8207                    if (0 === keys.length) {
8208                        if (isFunction(value)) {
8209                            var name = value.name ? ': ' + value.name : '';
8210                            return ctx.stylize('[Function' + name + ']', 'special');
8211                        }
8212                        if (isRegExp(value)) return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
8213                        if (isDate(value)) return ctx.stylize(Date.prototype.toString.call(value), 'date');
8214                        if (isError(value)) return formatError(value);
8215                    }
8216                    var base = '', array = false, braces = [
8217                        '{',
8218                        '}'
8219                    ];
8220                    if (isArray(value)) {
8221                        array = true;
8222                        braces = [
8223                            '[',
8224                            ']'
8225                        ];
8226                    }
8227                    if (isFunction(value)) {
8228                        var n = value.name ? ': ' + value.name : '';
8229                        base = ' [Function' + n + ']';
8230                    }
8231                    if (isRegExp(value)) base = ' ' + RegExp.prototype.toString.call(value);
8232                    if (isDate(value)) base = ' ' + Date.prototype.toUTCString.call(value);
8233                    if (isError(value)) base = ' ' + formatError(value);
8234                    if (0 === keys.length && (!array || 0 == value.length)) return braces[0] + base + braces[1];
8235                    if (recurseTimes < 0) if (isRegExp(value)) return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
8236                    else return ctx.stylize('[Object]', 'special');
8237                    ctx.seen.push(value);
8238                    var output;
8239                    output = array ? formatArray(ctx, value, recurseTimes, visibleKeys, keys) : keys.map(function(key) {
8240                        return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
8241                    });
8242                    ctx.seen.pop();
8243                    return reduceToSingleString(output, base, braces);
8244                }
8245                function formatPrimitive(ctx, value) {
8246                    if (isUndefined(value)) return ctx.stylize('undefined', 'undefined');
8247                    if (isString(value)) {
8248                        var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + '\'';
8249                        return ctx.stylize(simple, 'string');
8250                    }
8251                    if (isNumber(value)) return ctx.stylize('' + value, 'number');
8252                    if (isBoolean(value)) return ctx.stylize('' + value, 'boolean');
8253                    if (isNull(value)) return ctx.stylize('null', 'null');
8254                }
8255                function formatError(value) {
8256                    return '[' + Error.prototype.toString.call(value) + ']';
8257                }
8258                function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
8259                    var output = [];
8260                    for(var i = 0, l = value.length; i < l; ++i)if (hasOwnProperty(value, String(i))) output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true));
8261                    else output.push('');
8262                    keys.forEach(function(key) {
8263                        if (!key.match(/^\d+$/)) output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
8264                    });
8265                    return output;
8266                }
8267                function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
8268                    var name, str, desc;
8269                    desc = Object.getOwnPropertyDescriptor(value, key) || {
8270                        value: value[key]
8271                    };
8272                    if (desc.get) str = desc.set ? ctx.stylize('[Getter/Setter]', 'special') : ctx.stylize('[Getter]', 'special');
8273                    else if (desc.set) str = ctx.stylize('[Setter]', 'special');
8274                    if (!hasOwnProperty(visibleKeys, key)) name = '[' + key + ']';
8275                    if (!str) if (ctx.seen.indexOf(desc.value) < 0) {
8276                        str = isNull(recurseTimes) ? formatValue(ctx, desc.value, null) : formatValue(ctx, desc.value, recurseTimes - 1);
8277                        if (str.indexOf('\n') > -1) str = array ? str.split('\n').map(function(line) {
8278                            return '  ' + line;
8279                        }).join('\n').slice(2) : '\n' + str.split('\n').map(function(line) {
8280                            return '   ' + line;
8281                        }).join('\n');
8282                    } else str = ctx.stylize('[Circular]', 'special');
8283                    if (isUndefined(name)) {
8284                        if (array && key.match(/^\d+$/)) return str;
8285                        name = JSON.stringify('' + key);
8286                        if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
8287                            name = name.slice(1, -1);
8288                            name = ctx.stylize(name, 'name');
8289                        } else {
8290                            name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
8291                            name = ctx.stylize(name, 'string');
8292                        }
8293                    }
8294                    return name + ': ' + str;
8295                }
8296                function reduceToSingleString(output, base, braces) {
8297                    var numLinesEst = 0;
8298                    var length = output.reduce(function(prev, cur) {
8299                        numLinesEst++;
8300                        if (cur.indexOf('\n') >= 0) numLinesEst++;
8301                        return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
8302                    }, 0);
8303                    if (length > 60) return braces[0] + ('' === base ? '' : base + '\n ') + ' ' + output.join(',\n  ') + ' ' + braces[1];
8304                    return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
8305                }
8306                exports1.types = __webpack_require__(9032);
8307                function isArray(ar) {
8308                    return Array.isArray(ar);
8309                }
8310                exports1.isArray = isArray;
8311                function isBoolean(arg) {
8312                    return 'boolean' == typeof arg;
8313                }
8314                exports1.isBoolean = isBoolean;
8315                function isNull(arg) {
8316                    return null === arg;
8317                }
8318                exports1.isNull = isNull;
8319                function isNullOrUndefined(arg) {
8320                    return null == arg;
8321                }
8322                exports1.isNullOrUndefined = isNullOrUndefined;
8323                function isNumber(arg) {
8324                    return 'number' == typeof arg;
8325                }
8326                exports1.isNumber = isNumber;
8327                function isString(arg) {
8328                    return 'string' == typeof arg;
8329                }
8330                exports1.isString = isString;
8331                function isSymbol(arg) {
8332                    return 'symbol' == typeof arg;
8333                }
8334                exports1.isSymbol = isSymbol;
8335                function isUndefined(arg) {
8336                    return void 0 === arg;
8337                }
8338                exports1.isUndefined = isUndefined;
8339                function isRegExp(re) {
8340                    return isObject(re) && '[object RegExp]' === objectToString(re);
8341                }
8342                exports1.isRegExp = isRegExp;
8343                exports1.types.isRegExp = isRegExp;
8344                function isObject(arg) {
8345                    return 'object' == typeof arg && null !== arg;
8346                }
8347                exports1.isObject = isObject;
8348                function isDate(d) {
8349                    return isObject(d) && '[object Date]' === objectToString(d);
8350                }
8351                exports1.isDate = isDate;
8352                exports1.types.isDate = isDate;
8353                function isError(e) {
8354                    return isObject(e) && ('[object Error]' === objectToString(e) || e instanceof Error);
8355                }
8356                exports1.isError = isError;
8357                exports1.types.isNativeError = isError;
8358                function isFunction(arg) {
8359                    return 'function' == typeof arg;
8360                }
8361                exports1.isFunction = isFunction;
8362                function isPrimitive(arg) {
8363                    return null === arg || 'boolean' == typeof arg || 'number' == typeof arg || 'string' == typeof arg || 'symbol' == typeof arg || void 0 === arg;
8364                }
8365                exports1.isPrimitive = isPrimitive;
8366                exports1.isBuffer = __webpack_require__(1135);
8367                function objectToString(o) {
8368                    return Object.prototype.toString.call(o);
8369                }
8370                function pad(n) {
8371                    return n < 10 ? '0' + n.toString(10) : n.toString(10);
8372                }
8373                var months = [
8374                    'Jan',
8375                    'Feb',
8376                    'Mar',
8377                    'Apr',
8378                    'May',
8379                    'Jun',
8380                    'Jul',
8381                    'Aug',
8382                    'Sep',
8383                    'Oct',
8384                    'Nov',
8385                    'Dec'
8386                ];
8387                function timestamp() {
8388                    var d = new Date();
8389                    var time = [
8390                        pad(d.getHours()),
8391                        pad(d.getMinutes()),
8392                        pad(d.getSeconds())
8393                    ].join(':');
8394                    return [
8395                        d.getDate(),
8396                        months[d.getMonth()],
8397                        time
8398                    ].join(' ');
8399                }
8400                exports1.log = function() {
8401                    console.log('%s - %s', timestamp(), exports1.format.apply(exports1, arguments));
8402                };
8403                exports1.inherits = __webpack_require__(6698);
8404                exports1._extend = function(origin, add) {
8405                    if (!add || !isObject(add)) return origin;
8406                    var keys = Object.keys(add);
8407                    var i = keys.length;
8408                    while(i--)origin[keys[i]] = add[keys[i]];
8409                    return origin;
8410                };
8411                function hasOwnProperty(obj, prop) {
8412                    return Object.prototype.hasOwnProperty.call(obj, prop);
8413                }
8414                var kCustomPromisifiedSymbol = "u" > typeof Symbol ? Symbol('util.promisify.custom') : void 0;
8415                exports1.promisify = function(original) {
8416                    if ('function' != typeof original) throw new TypeError('The "original" argument must be of type Function');
8417                    if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
8418                        var fn = original[kCustomPromisifiedSymbol];
8419                        if ('function' != typeof fn) throw new TypeError('The "util.promisify.custom" argument must be of type Function');
8420                        Object.defineProperty(fn, kCustomPromisifiedSymbol, {
8421                            value: fn,
8422                            enumerable: false,
8423                            writable: false,
8424                            configurable: true
8425                        });
8426                        return fn;
8427                    }
8428                    function fn() {
8429                        var promiseResolve, promiseReject;
8430                        var promise = new Promise(function(resolve, reject) {
8431                            promiseResolve = resolve;
8432                            promiseReject = reject;
8433                        });
8434                        var args = [];
8435                        for(var i = 0; i < arguments.length; i++)args.push(arguments[i]);
8436                        args.push(function(err, value) {
8437                            if (err) promiseReject(err);
8438                            else promiseResolve(value);
8439                        });
8440                        try {
8441                            original.apply(this, args);
8442                        } catch (err) {
8443                            promiseReject(err);
8444                        }
8445                        return promise;
8446                    }
8447                    Object.setPrototypeOf(fn, Object.getPrototypeOf(original));
8448                    if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {
8449                        value: fn,
8450                        enumerable: false,
8451                        writable: false,
8452                        configurable: true
8453                    });
8454                    return Object.defineProperties(fn, getOwnPropertyDescriptors(original));
8455                };
8456                exports1.promisify.custom = kCustomPromisifiedSymbol;
8457                function callbackifyOnRejected(reason, cb) {
8458                    if (!reason) {
8459                        var newReason = new Error('Promise was rejected with a falsy value');
8460                        newReason.reason = reason;
8461                        reason = newReason;
8462                    }
8463                    return cb(reason);
8464                }
8465                function callbackify(original) {
8466                    if ('function' != typeof original) throw new TypeError('The "original" argument must be of type Function');
8467                    function callbackified() {
8468                        var args = [];
8469                        for(var i = 0; i < arguments.length; i++)args.push(arguments[i]);
8470                        var maybeCb = args.pop();
8471                        if ('function' != typeof maybeCb) throw new TypeError('The last argument must be of type Function');
8472                        var self1 = this;
8473                        var cb = function() {
8474                            return maybeCb.apply(self1, arguments);
8475                        };
8476                        original.apply(this, args).then(function(ret) {
8477                            process.nextTick(cb.bind(null, null, ret));
8478                        }, function(rej) {
8479                            process.nextTick(callbackifyOnRejected.bind(null, rej, cb));
8480                        });
8481                    }
8482                    Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
8483                    Object.defineProperties(callbackified, getOwnPropertyDescriptors(original));
8484                    return callbackified;
8485                }
8486                exports1.callbackify = callbackify;
8487            },
8488            8708 (module1) {
8489                var toString = {}.toString;
8490                module1.exports = Array.isArray || function(arr) {
8491                    return '[object Array]' == toString.call(arr);
8492                };
8493            },
8494            8180 (module1, __unused_rspack_exports, __webpack_require__) {
8495                "use strict";
8496                var pna = __webpack_require__(3225);
8497                var objectKeys = Object.keys || function(obj) {
8498                    var keys = [];
8499                    for(var key in obj)keys.push(key);
8500                    return keys;
8501                };
8502                module1.exports = Duplex;
8503                var util = Object.create(__webpack_require__(5622));
8504                util.inherits = __webpack_require__(6698);
8505                var Readable = __webpack_require__(2954);
8506                var Writable = __webpack_require__(3646);
8507                util.inherits(Duplex, Readable);
8508                var keys = objectKeys(Writable.prototype);
8509                for(var v = 0; v < keys.length; v++){
8510                    var method = keys[v];
8511                    if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
8512                }
8513                function Duplex(options) {
8514                    if (!(this instanceof Duplex)) return new Duplex(options);
8515                    Readable.call(this, options);
8516                    Writable.call(this, options);
8517                    if (options && false === options.readable) this.readable = false;
8518                    if (options && false === options.writable) this.writable = false;
8519                    this.allowHalfOpen = true;
8520                    if (options && false === options.allowHalfOpen) this.allowHalfOpen = false;
8521                    this.once('end', onend);
8522                }
8523                Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
8524                    enumerable: false,
8525                    get: function() {
8526                        return this._writableState.highWaterMark;
8527                    }
8528                });
8529                function onend() {
8530                    if (this.allowHalfOpen || this._writableState.ended) return;
8531                    pna.nextTick(onEndNT, this);
8532                }
8533                function onEndNT(self1) {
8534                    self1.end();
8535                }
8536                Object.defineProperty(Duplex.prototype, 'destroyed', {
8537                    get: function() {
8538                        if (void 0 === this._readableState || void 0 === this._writableState) return false;
8539                        return this._readableState.destroyed && this._writableState.destroyed;
8540                    },
8541                    set: function(value) {
8542                        if (void 0 === this._readableState || void 0 === this._writableState) return;
8543                        this._readableState.destroyed = value;
8544                        this._writableState.destroyed = value;
8545                    }
8546                });
8547                Duplex.prototype._destroy = function(err, cb) {
8548                    this.push(null);
8549                    this.end();
8550                    pna.nextTick(cb, err);
8551                };
8552            },
8553            2046 (module1, __unused_rspack_exports, __webpack_require__) {
8554                "use strict";
8555                module1.exports = PassThrough;
8556                var Transform = __webpack_require__(4756);
8557                var util = Object.create(__webpack_require__(5622));
8558                util.inherits = __webpack_require__(6698);
8559                util.inherits(PassThrough, Transform);
8560                function PassThrough(options) {
8561                    if (!(this instanceof PassThrough)) return new PassThrough(options);
8562                    Transform.call(this, options);
8563                }
8564                PassThrough.prototype._transform = function(chunk, encoding, cb) {
8565                    cb(null, chunk);
8566                };
8567            },
8568            2954 (module1, __unused_rspack_exports, __webpack_require__) {
8569                "use strict";
8570                var process = __webpack_require__(5606);
8571                var pna = __webpack_require__(3225);
8572                module1.exports = Readable;
8573                var isArray = __webpack_require__(8708);
8574                var Duplex;
8575                Readable.ReadableState = ReadableState;
8576                __webpack_require__(7007).EventEmitter;
8577                var EElistenerCount = function(emitter, type) {
8578                    return emitter.listeners(type).length;
8579                };
8580                var Stream = __webpack_require__(3267);
8581                var Buffer = __webpack_require__(8731).Buffer;
8582                var OurUint8Array = (void 0 !== __webpack_require__.g ? __webpack_require__.g : "u" > typeof window ? window : "u" > typeof self ? self : {}).Uint8Array || function() {};
8583                function _uint8ArrayToBuffer(chunk) {
8584                    return Buffer.from(chunk);
8585                }
8586                function _isUint8Array(obj) {
8587                    return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
8588                }
8589                var util = Object.create(__webpack_require__(5622));
8590                util.inherits = __webpack_require__(6698);
8591                var debugUtil = __webpack_require__(3415);
8592                var debug = void 0;
8593                debug = debugUtil && debugUtil.debuglog ? debugUtil.debuglog('stream') : function() {};
8594                var BufferList = __webpack_require__(6572);
8595                var destroyImpl = __webpack_require__(4058);
8596                var StringDecoder;
8597                util.inherits(Readable, Stream);
8598                var kProxyEvents = [
8599                    'error',
8600                    'close',
8601                    'destroy',
8602                    'pause',
8603                    'resume'
8604                ];
8605                function prependListener(emitter, event, fn) {
8606                    if ('function' == typeof emitter.prependListener) return emitter.prependListener(event, fn);
8607                    if (emitter._events && emitter._events[event]) if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);
8608                    else emitter._events[event] = [
8609                        fn,
8610                        emitter._events[event]
8611                    ];
8612                    else emitter.on(event, fn);
8613                }
8614                function ReadableState(options, stream) {
8615                    Duplex = Duplex || __webpack_require__(8180);
8616                    options = options || {};
8617                    var isDuplex = stream instanceof Duplex;
8618                    this.objectMode = !!options.objectMode;
8619                    if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
8620                    var hwm = options.highWaterMark;
8621                    var readableHwm = options.readableHighWaterMark;
8622                    var defaultHwm = this.objectMode ? 16 : 16384;
8623                    if (hwm || 0 === hwm) this.highWaterMark = hwm;
8624                    else if (isDuplex && (readableHwm || 0 === readableHwm)) this.highWaterMark = readableHwm;
8625                    else this.highWaterMark = defaultHwm;
8626                    this.highWaterMark = Math.floor(this.highWaterMark);
8627                    this.buffer = new BufferList();
8628                    this.length = 0;
8629                    this.pipes = null;
8630                    this.pipesCount = 0;
8631                    this.flowing = null;
8632                    this.ended = false;
vendor: 9,024 bytes, lines 8633-8802
8633                    this.endEmitted = false;
8634                    this.reading = false;
8635                    this.sync = true;
8636                    this.needReadable = false;
8637                    this.emittedReadable = false;
8638                    this.readableListening = false;
8639                    this.resumeScheduled = false;
8640                    this.destroyed = false;
8641                    this.defaultEncoding = options.defaultEncoding || 'utf8';
8642                    this.awaitDrain = 0;
8643                    this.readingMore = false;
8644                    this.decoder = null;
8645                    this.encoding = null;
8646                    if (options.encoding) {
8647                        if (!StringDecoder) StringDecoder = __webpack_require__(1879).I;
8648                        this.decoder = new StringDecoder(options.encoding);
8649                        this.encoding = options.encoding;
8650                    }
8651                }
8652                function Readable(options) {
8653                    Duplex = Duplex || __webpack_require__(8180);
8654                    if (!(this instanceof Readable)) return new Readable(options);
8655                    this._readableState = new ReadableState(options, this);
8656                    this.readable = true;
8657                    if (options) {
8658                        if ('function' == typeof options.read) this._read = options.read;
8659                        if ('function' == typeof options.destroy) this._destroy = options.destroy;
8660                    }
8661                    Stream.call(this);
8662                }
8663                Object.defineProperty(Readable.prototype, 'destroyed', {
8664                    get: function() {
8665                        if (void 0 === this._readableState) return false;
8666                        return this._readableState.destroyed;
8667                    },
8668                    set: function(value) {
8669                        if (!this._readableState) return;
8670                        this._readableState.destroyed = value;
8671                    }
8672                });
8673                Readable.prototype.destroy = destroyImpl.destroy;
8674                Readable.prototype._undestroy = destroyImpl.undestroy;
8675                Readable.prototype._destroy = function(err, cb) {
8676                    this.push(null);
8677                    cb(err);
8678                };
8679                Readable.prototype.push = function(chunk, encoding) {
8680                    var state = this._readableState;
8681                    var skipChunkCheck;
8682                    if (state.objectMode) skipChunkCheck = true;
8683                    else if ('string' == typeof chunk) {
8684                        encoding = encoding || state.defaultEncoding;
8685                        if (encoding !== state.encoding) {
8686                            chunk = Buffer.from(chunk, encoding);
8687                            encoding = '';
8688                        }
8689                        skipChunkCheck = true;
8690                    }
8691                    return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
8692                };
8693                Readable.prototype.unshift = function(chunk) {
8694                    return readableAddChunk(this, chunk, null, true, false);
8695                };
8696                function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
8697                    var state = stream._readableState;
8698                    if (null === chunk) {
8699                        state.reading = false;
8700                        onEofChunk(stream, state);
8701                    } else {
8702                        var er;
8703                        if (!skipChunkCheck) er = chunkInvalid(state, chunk);
8704                        if (er) stream.emit('error', er);
8705                        else if (state.objectMode || chunk && chunk.length > 0) {
8706                            if ('string' != typeof chunk && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) chunk = _uint8ArrayToBuffer(chunk);
8707                            if (addToFront) if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));
8708                            else addChunk(stream, state, chunk, true);
8709                            else if (state.ended) stream.emit('error', new Error('stream.push() after EOF'));
8710                            else {
8711                                state.reading = false;
8712                                if (state.decoder && !encoding) {
8713                                    chunk = state.decoder.write(chunk);
8714                                    if (state.objectMode || 0 !== chunk.length) addChunk(stream, state, chunk, false);
8715                                    else maybeReadMore(stream, state);
8716                                } else addChunk(stream, state, chunk, false);
8717                            }
8718                        } else if (!addToFront) state.reading = false;
8719                    }
8720                    return needMoreData(state);
8721                }
8722                function addChunk(stream, state, chunk, addToFront) {
8723                    if (state.flowing && 0 === state.length && !state.sync) {
8724                        stream.emit('data', chunk);
8725                        stream.read(0);
8726                    } else {
8727                        state.length += state.objectMode ? 1 : chunk.length;
8728                        if (addToFront) state.buffer.unshift(chunk);
8729                        else state.buffer.push(chunk);
8730                        if (state.needReadable) emitReadable(stream);
8731                    }
8732                    maybeReadMore(stream, state);
8733                }
8734                function chunkInvalid(state, chunk) {
8735                    var er;
8736                    if (!_isUint8Array(chunk) && 'string' != typeof chunk && void 0 !== chunk && !state.objectMode) er = new TypeError('Invalid non-string/buffer chunk');
8737                    return er;
8738                }
8739                function needMoreData(state) {
8740                    return !state.ended && (state.needReadable || state.length < state.highWaterMark || 0 === state.length);
8741                }
8742                Readable.prototype.isPaused = function() {
8743                    return false === this._readableState.flowing;
8744                };
8745                Readable.prototype.setEncoding = function(enc) {
8746                    if (!StringDecoder) StringDecoder = __webpack_require__(1879).I;
8747                    this._readableState.decoder = new StringDecoder(enc);
8748                    this._readableState.encoding = enc;
8749                    return this;
8750                };
8751                var MAX_HWM = 0x800000;
8752                function computeNewHighWaterMark(n) {
8753                    if (n >= MAX_HWM) n = MAX_HWM;
8754                    else {
8755                        n--;
8756                        n |= n >>> 1;
8757                        n |= n >>> 2;
8758                        n |= n >>> 4;
8759                        n |= n >>> 8;
8760                        n |= n >>> 16;
8761                        n++;
8762                    }
8763                    return n;
8764                }
8765                function howMuchToRead(n, state) {
8766                    if (n <= 0 || 0 === state.length && state.ended) return 0;
8767                    if (state.objectMode) return 1;
8768                    if (n !== n) if (state.flowing && state.length) return state.buffer.head.data.length;
8769                    else return state.length;
8770                    if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
8771                    if (n <= state.length) return n;
8772                    if (!state.ended) {
8773                        state.needReadable = true;
8774                        return 0;
8775                    }
8776                    return state.length;
8777                }
8778                Readable.prototype.read = function(n) {
8779                    debug('read', n);
8780                    n = parseInt(n, 10);
8781                    var state = this._readableState;
8782                    var nOrig = n;
8783                    if (0 !== n) state.emittedReadable = false;
8784                    if (0 === n && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
8785                        debug('read: emitReadable', state.length, state.ended);
8786                        if (0 === state.length && state.ended) endReadable(this);
8787                        else emitReadable(this);
8788                        return null;
8789                    }
8790                    n = howMuchToRead(n, state);
8791                    if (0 === n && state.ended) {
8792                        if (0 === state.length) endReadable(this);
8793                        return null;
8794                    }
8795                    var doRead = state.needReadable;
8796                    debug('need readable', doRead);
8797                    if (0 === state.length || state.length - n < state.highWaterMark) {
8798                        doRead = true;
8799                        debug('length less than watermark', doRead);
8800                    }
8801                    if (state.ended || state.reading) {
8802                        doRead = false;
vendor: 5,060 bytes, lines 8803-8911
8803                        debug('reading or ended', doRead);
8804                    } else if (doRead) {
8805                        debug('do read');
8806                        state.reading = true;
8807                        state.sync = true;
8808                        if (0 === state.length) state.needReadable = true;
8809                        this._read(state.highWaterMark);
8810                        state.sync = false;
8811                        if (!state.reading) n = howMuchToRead(nOrig, state);
8812                    }
8813                    var ret;
8814                    ret = n > 0 ? fromList(n, state) : null;
8815                    if (null === ret) {
8816                        state.needReadable = true;
8817                        n = 0;
8818                    } else state.length -= n;
8819                    if (0 === state.length) {
8820                        if (!state.ended) state.needReadable = true;
8821                        if (nOrig !== n && state.ended) endReadable(this);
8822                    }
8823                    if (null !== ret) this.emit('data', ret);
8824                    return ret;
8825                };
8826                function onEofChunk(stream, state) {
8827                    if (state.ended) return;
8828                    if (state.decoder) {
8829                        var chunk = state.decoder.end();
8830                        if (chunk && chunk.length) {
8831                            state.buffer.push(chunk);
8832                            state.length += state.objectMode ? 1 : chunk.length;
8833                        }
8834                    }
8835                    state.ended = true;
8836                    emitReadable(stream);
8837                }
8838                function emitReadable(stream) {
8839                    var state = stream._readableState;
8840                    state.needReadable = false;
8841                    if (!state.emittedReadable) {
8842                        debug('emitReadable', state.flowing);
8843                        state.emittedReadable = true;
8844                        if (state.sync) pna.nextTick(emitReadable_, stream);
8845                        else emitReadable_(stream);
8846                    }
8847                }
8848                function emitReadable_(stream) {
8849                    debug('emit readable');
8850                    stream.emit('readable');
8851                    flow(stream);
8852                }
8853                function maybeReadMore(stream, state) {
8854                    if (!state.readingMore) {
8855                        state.readingMore = true;
8856                        pna.nextTick(maybeReadMore_, stream, state);
8857                    }
8858                }
8859                function maybeReadMore_(stream, state) {
8860                    var len = state.length;
8861                    while(!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark){
8862                        debug('maybeReadMore read 0');
8863                        stream.read(0);
8864                        if (len === state.length) break;
8865                        len = state.length;
8866                    }
8867                    state.readingMore = false;
8868                }
8869                Readable.prototype._read = function(n) {
8870                    this.emit('error', new Error('_read() is not implemented'));
8871                };
8872                Readable.prototype.pipe = function(dest, pipeOpts) {
8873                    var src = this;
8874                    var state = this._readableState;
8875                    switch(state.pipesCount){
8876                        case 0:
8877                            state.pipes = dest;
8878                            break;
8879                        case 1:
8880                            state.pipes = [
8881                                state.pipes,
8882                                dest
8883                            ];
8884                            break;
8885                        default:
8886                            state.pipes.push(dest);
8887                            break;
8888                    }
8889                    state.pipesCount += 1;
8890                    debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
8891                    var doEnd = (!pipeOpts || false !== pipeOpts.end) && dest !== process.stdout && dest !== process.stderr;
8892                    var endFn = doEnd ? onend : unpipe;
8893                    if (state.endEmitted) pna.nextTick(endFn);
8894                    else src.once('end', endFn);
8895                    dest.on('unpipe', onunpipe);
8896                    function onunpipe(readable, unpipeInfo) {
8897                        debug('onunpipe');
8898                        if (readable === src) {
8899                            if (unpipeInfo && false === unpipeInfo.hasUnpiped) {
8900                                unpipeInfo.hasUnpiped = true;
8901                                cleanup();
8902                            }
8903                        }
8904                    }
8905                    function onend() {
8906                        debug('onend');
8907                        dest.end();
8908                    }
8909                    var ondrain = pipeOnDrain(src);
8910                    dest.on('drain', ondrain);
8911                    var cleanedUp = false;
8912                    function cleanup() {
8913                        debug('cleanup');
8914                        dest.removeListener('close', onclose);
8915                        dest.removeListener('finish', onfinish);
8916                        dest.removeListener('drain', ondrain);
8917                        dest.removeListener('error', onerror);
8918                        dest.removeListener('unpipe', onunpipe);
8919                        src.removeListener('end', onend);
8920                        src.removeListener('end', unpipe);
8921                        src.removeListener('data', ondata);
8922                        cleanedUp = true;
8923                        if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
8924                    }
8925                    var increasedAwaitDrain = false;
8926                    src.on('data', ondata);
8927                    function ondata(chunk) {
8928                        debug('ondata');
8929                        increasedAwaitDrain = false;
8930                        var ret = dest.write(chunk);
8931                        if (false === ret && !increasedAwaitDrain) {
8932                            if ((1 === state.pipesCount && state.pipes === dest || state.pipesCount > 1 && -1 !== indexOf(state.pipes, dest)) && !cleanedUp) {
8933                                debug('false write response, pause', state.awaitDrain);
8934                                state.awaitDrain++;
8935                                increasedAwaitDrain = true;
8936                            }
8937                            src.pause();
8938                        }
8939                    }
8940                    function onerror(er) {
8941                        debug('onerror', er);
8942                        unpipe();
8943                        dest.removeListener('error', onerror);
8944                        if (0 === EElistenerCount(dest, 'error')) dest.emit('error', er);
8945                    }
8946                    prependListener(dest, 'error', onerror);
8947                    function onclose() {
8948                        dest.removeListener('finish', onfinish);
8949                        unpipe();
8950                    }
8951                    dest.once('close', onclose);
8952                    function onfinish() {
8953                        debug('onfinish');
8954                        dest.removeListener('close', onclose);
8955                        unpipe();
8956                    }
8957                    dest.once('finish', onfinish);
8958                    function unpipe() {
8959                        debug('unpipe');
8960                        src.unpipe(dest);
8961                    }
8962                    dest.emit('pipe', src);
8963                    if (!state.flowing) {
8964                        debug('pipe resume');
8965                        src.resume();
8966                    }
8967                    return dest;
8968                };
8969                function pipeOnDrain(src) {
8970                    return function() {
8971                        var state = src._readableState;
8972                        debug('pipeOnDrain', state.awaitDrain);
8973                        if (state.awaitDrain) state.awaitDrain--;
8974                        if (0 === state.awaitDrain && EElistenerCount(src, 'data')) {
8975                            state.flowing = true;
8976                            flow(src);
8977                        }
8978                    };
8979                }
8980                Readable.prototype.unpipe = function(dest) {
8981                    var state = this._readableState;
8982                    var unpipeInfo = {
8983                        hasUnpiped: false
8984                    };
8985                    if (0 === state.pipesCount) return this;
8986                    if (1 === state.pipesCount) {
8987                        if (dest && dest !== state.pipes) return this;
8988                        if (!dest) dest = state.pipes;
8989                        state.pipes = null;
8990                        state.pipesCount = 0;
8991                        state.flowing = false;
8992                        if (dest) dest.emit('unpipe', this, unpipeInfo);
8993                        return this;
8994                    }
8995                    if (!dest) {
8996                        var dests = state.pipes;
8997                        var len = state.pipesCount;
8998                        state.pipes = null;
8999                        state.pipesCount = 0;
9000                        state.flowing = false;
vendor: 5,188 bytes, lines 9001-9107
9001                        for(var i = 0; i < len; i++)dests[i].emit('unpipe', this, {
9002                            hasUnpiped: false
9003                        });
9004                        return this;
9005                    }
9006                    var index = indexOf(state.pipes, dest);
9007                    if (-1 === index) return this;
9008                    state.pipes.splice(index, 1);
9009                    state.pipesCount -= 1;
9010                    if (1 === state.pipesCount) state.pipes = state.pipes[0];
9011                    dest.emit('unpipe', this, unpipeInfo);
9012                    return this;
9013                };
9014                Readable.prototype.on = function(ev, fn) {
9015                    var res = Stream.prototype.on.call(this, ev, fn);
9016                    if ('data' === ev) {
9017                        if (false !== this._readableState.flowing) this.resume();
9018                    } else if ('readable' === ev) {
9019                        var state = this._readableState;
9020                        if (!state.endEmitted && !state.readableListening) {
9021                            state.readableListening = state.needReadable = true;
9022                            state.emittedReadable = false;
9023                            if (state.reading) {
9024                                if (state.length) emitReadable(this);
9025                            } else pna.nextTick(nReadingNextTick, this);
9026                        }
9027                    }
9028                    return res;
9029                };
9030                Readable.prototype.addListener = Readable.prototype.on;
9031                function nReadingNextTick(self1) {
9032                    debug('readable nexttick read 0');
9033                    self1.read(0);
9034                }
9035                Readable.prototype.resume = function() {
9036                    var state = this._readableState;
9037                    if (!state.flowing) {
9038                        debug('resume');
9039                        state.flowing = true;
9040                        resume(this, state);
9041                    }
9042                    return this;
9043                };
9044                function resume(stream, state) {
9045                    if (!state.resumeScheduled) {
9046                        state.resumeScheduled = true;
9047                        pna.nextTick(resume_, stream, state);
9048                    }
9049                }
9050                function resume_(stream, state) {
9051                    if (!state.reading) {
9052                        debug('resume read 0');
9053                        stream.read(0);
9054                    }
9055                    state.resumeScheduled = false;
9056                    state.awaitDrain = 0;
9057                    stream.emit('resume');
9058                    flow(stream);
9059                    if (state.flowing && !state.reading) stream.read(0);
9060                }
9061                Readable.prototype.pause = function() {
9062                    debug('call pause flowing=%j', this._readableState.flowing);
9063                    if (false !== this._readableState.flowing) {
9064                        debug('pause');
9065                        this._readableState.flowing = false;
9066                        this.emit('pause');
9067                    }
9068                    return this;
9069                };
9070                function flow(stream) {
9071                    var state = stream._readableState;
9072                    debug('flow', state.flowing);
9073                    while(state.flowing && null !== stream.read());
9074                }
9075                Readable.prototype.wrap = function(stream) {
9076                    var _this = this;
9077                    var state = this._readableState;
9078                    var paused = false;
9079                    stream.on('end', function() {
9080                        debug('wrapped end');
9081                        if (state.decoder && !state.ended) {
9082                            var chunk = state.decoder.end();
9083                            if (chunk && chunk.length) _this.push(chunk);
9084                        }
9085                        _this.push(null);
9086                    });
9087                    stream.on('data', function(chunk) {
9088                        debug('wrapped data');
9089                        if (state.decoder) chunk = state.decoder.write(chunk);
9090                        if (state.objectMode && null == chunk) return;
9091                        if (!state.objectMode && (!chunk || !chunk.length)) return;
9092                        var ret = _this.push(chunk);
9093                        if (!ret) {
9094                            paused = true;
9095                            stream.pause();
9096                        }
9097                    });
9098                    for(var i in stream)if (void 0 === this[i] && 'function' == typeof stream[i]) this[i] = function(method) {
9099                        return function() {
9100                            return stream[method].apply(stream, arguments);
9101                        };
9102                    }(i);
9103                    for(var n = 0; n < kProxyEvents.length; n++)stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
9104                    this._read = function(n) {
9105                        debug('wrapped _read', n);
9106                        if (paused) {
9107                            paused = false;
9108                            stream.resume();
9109                        }
9110                    };
9111                    return this;
9112                };
9113                Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
9114                    enumerable: false,
9115                    get: function() {
9116                        return this._readableState.highWaterMark;
9117                    }
9118                });
9119                Readable._fromList = fromList;
9120                function fromList(n, state) {
9121                    if (0 === state.length) return null;
9122                    var ret;
9123                    if (state.objectMode) ret = state.buffer.shift();
9124                    else if (!n || n >= state.length) {
9125                        ret = state.decoder ? state.buffer.join('') : 1 === state.buffer.length ? state.buffer.head.data : state.buffer.concat(state.length);
9126                        state.buffer.clear();
9127                    } else ret = fromListPartial(n, state.buffer, state.decoder);
9128                    return ret;
9129                }
9130                function fromListPartial(n, list, hasStrings) {
9131                    var ret;
9132                    if (n < list.head.data.length) {
9133                        ret = list.head.data.slice(0, n);
9134                        list.head.data = list.head.data.slice(n);
9135                    } else ret = n === list.head.data.length ? list.shift() : hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
9136                    return ret;
9137                }
9138                function copyFromBufferString(n, list) {
9139                    var p = list.head;
9140                    var c = 1;
9141                    var ret = p.data;
9142                    n -= ret.length;
9143                    while(p = p.next){
9144                        var str = p.data;
9145                        var nb = n > str.length ? str.length : n;
9146                        if (nb === str.length) ret += str;
9147                        else ret += str.slice(0, n);
9148                        n -= nb;
9149                        if (0 === n) {
9150                            if (nb === str.length) {
9151                                ++c;
9152                                if (p.next) list.head = p.next;
9153                                else list.head = list.tail = null;
9154                            } else {
9155                                list.head = p;
9156                                p.data = str.slice(nb);
9157                            }
9158                            break;
9159                        }
9160                        ++c;
9161                    }
9162                    list.length -= c;
9163                    return ret;
9164                }
9165                function copyFromBuffer(n, list) {
9166                    var ret = Buffer.allocUnsafe(n);
9167                    var p = list.head;
9168                    var c = 1;
9169                    p.data.copy(ret);
9170                    n -= p.data.length;
9171                    while(p = p.next){
9172                        var buf = p.data;
9173                        var nb = n > buf.length ? buf.length : n;
9174                        buf.copy(ret, ret.length - n, 0, nb);
9175                        n -= nb;
9176                        if (0 === n) {
9177                            if (nb === buf.length) {
9178                                ++c;
9179                                if (p.next) list.head = p.next;
9180                                else list.head = list.tail = null;
9181                            } else {
9182                                list.head = p;
9183                                p.data = buf.slice(nb);
9184                            }
9185                            break;
9186                        }
9187                        ++c;
9188                    }
9189                    list.length -= c;
9190                    return ret;
9191                }
9192                function endReadable(stream) {
9193                    var state = stream._readableState;
9194                    if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
9195                    if (!state.endEmitted) {
9196                        state.ended = true;
9197                        pna.nextTick(endReadableNT, state, stream);
9198                    }
9199                }
9200                function endReadableNT(state, stream) {
9201                    if (!state.endEmitted && 0 === state.length) {
9202                        state.endEmitted = true;
9203                        stream.readable = false;
vendor: 7,484 bytes, lines 9204-9346
9204                        stream.emit('end');
9205                    }
9206                }
9207                function indexOf(xs, x) {
9208                    for(var i = 0, l = xs.length; i < l; i++)if (xs[i] === x) return i;
9209                    return -1;
9210                }
9211            },
9212            4756 (module1, __unused_rspack_exports, __webpack_require__) {
9213                "use strict";
9214                module1.exports = Transform;
9215                var Duplex = __webpack_require__(8180);
9216                var util = Object.create(__webpack_require__(5622));
9217                util.inherits = __webpack_require__(6698);
9218                util.inherits(Transform, Duplex);
9219                function afterTransform(er, data) {
9220                    var ts = this._transformState;
9221                    ts.transforming = false;
9222                    var cb = ts.writecb;
9223                    if (!cb) return this.emit('error', new Error('write callback called multiple times'));
9224                    ts.writechunk = null;
9225                    ts.writecb = null;
9226                    if (null != data) this.push(data);
9227                    cb(er);
9228                    var rs = this._readableState;
9229                    rs.reading = false;
9230                    if (rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
9231                }
9232                function Transform(options) {
9233                    if (!(this instanceof Transform)) return new Transform(options);
9234                    Duplex.call(this, options);
9235                    this._transformState = {
9236                        afterTransform: afterTransform.bind(this),
9237                        needTransform: false,
9238                        transforming: false,
9239                        writecb: null,
9240                        writechunk: null,
9241                        writeencoding: null
9242                    };
9243                    this._readableState.needReadable = true;
9244                    this._readableState.sync = false;
9245                    if (options) {
9246                        if ('function' == typeof options.transform) this._transform = options.transform;
9247                        if ('function' == typeof options.flush) this._flush = options.flush;
9248                    }
9249                    this.on('prefinish', prefinish);
9250                }
9251                function prefinish() {
9252                    var _this = this;
9253                    if ('function' == typeof this._flush) this._flush(function(er, data) {
9254                        done(_this, er, data);
9255                    });
9256                    else done(this, null, null);
9257                }
9258                Transform.prototype.push = function(chunk, encoding) {
9259                    this._transformState.needTransform = false;
9260                    return Duplex.prototype.push.call(this, chunk, encoding);
9261                };
9262                Transform.prototype._transform = function(chunk, encoding, cb) {
9263                    throw new Error('_transform() is not implemented');
9264                };
9265                Transform.prototype._write = function(chunk, encoding, cb) {
9266                    var ts = this._transformState;
9267                    ts.writecb = cb;
9268                    ts.writechunk = chunk;
9269                    ts.writeencoding = encoding;
9270                    if (!ts.transforming) {
9271                        var rs = this._readableState;
9272                        if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
9273                    }
9274                };
9275                Transform.prototype._read = function(n) {
9276                    var ts = this._transformState;
9277                    if (null !== ts.writechunk && ts.writecb && !ts.transforming) {
9278                        ts.transforming = true;
9279                        this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
9280                    } else ts.needTransform = true;
9281                };
9282                Transform.prototype._destroy = function(err, cb) {
9283                    var _this2 = this;
9284                    Duplex.prototype._destroy.call(this, err, function(err2) {
9285                        cb(err2);
9286                        _this2.emit('close');
9287                    });
9288                };
9289                function done(stream, er, data) {
9290                    if (er) return stream.emit('error', er);
9291                    if (null != data) stream.push(data);
9292                    if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
9293                    if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
9294                    return stream.push(null);
9295                }
9296            },
9297            3646 (module1, __unused_rspack_exports, __webpack_require__) {
9298                "use strict";
9299                var process = __webpack_require__(5606);
9300                var pna = __webpack_require__(3225);
9301                module1.exports = Writable;
9302                function CorkedRequest(state) {
9303                    var _this = this;
9304                    this.next = null;
9305                    this.entry = null;
9306                    this.finish = function() {
9307                        onCorkedFinish(_this, state);
9308                    };
9309                }
9310                var asyncWrite = !process.browser && [
9311                    'v0.10',
9312                    'v0.9.'
9313                ].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
9314                var Duplex;
9315                Writable.WritableState = WritableState;
9316                var util = Object.create(__webpack_require__(5622));
9317                util.inherits = __webpack_require__(6698);
9318                var internalUtil = {
9319                    deprecate: __webpack_require__(4643)
9320                };
9321                var Stream = __webpack_require__(3267);
9322                var Buffer = __webpack_require__(8731).Buffer;
9323                var OurUint8Array = (void 0 !== __webpack_require__.g ? __webpack_require__.g : "u" > typeof window ? window : "u" > typeof self ? self : {}).Uint8Array || function() {};
9324                function _uint8ArrayToBuffer(chunk) {
9325                    return Buffer.from(chunk);
9326                }
9327                function _isUint8Array(obj) {
9328                    return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
9329                }
9330                var destroyImpl = __webpack_require__(4058);
9331                util.inherits(Writable, Stream);
9332                function nop() {}
9333                function WritableState(options, stream) {
9334                    Duplex = Duplex || __webpack_require__(8180);
9335                    options = options || {};
9336                    var isDuplex = stream instanceof Duplex;
9337                    this.objectMode = !!options.objectMode;
9338                    if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
9339                    var hwm = options.highWaterMark;
9340                    var writableHwm = options.writableHighWaterMark;
9341                    var defaultHwm = this.objectMode ? 16 : 16384;
9342                    if (hwm || 0 === hwm) this.highWaterMark = hwm;
9343                    else if (isDuplex && (writableHwm || 0 === writableHwm)) this.highWaterMark = writableHwm;
9344                    else this.highWaterMark = defaultHwm;
9345                    this.highWaterMark = Math.floor(this.highWaterMark);
9346                    this.finalCalled = false;
vendor: 23,114 bytes, lines 9347-9816
9347                    this.needDrain = false;
9348                    this.ending = false;
9349                    this.ended = false;
9350                    this.finished = false;
9351                    this.destroyed = false;
9352                    var noDecode = false === options.decodeStrings;
9353                    this.decodeStrings = !noDecode;
9354                    this.defaultEncoding = options.defaultEncoding || 'utf8';
9355                    this.length = 0;
9356                    this.writing = false;
9357                    this.corked = 0;
9358                    this.sync = true;
9359                    this.bufferProcessing = false;
9360                    this.onwrite = function(er) {
9361                        onwrite(stream, er);
9362                    };
9363                    this.writecb = null;
9364                    this.writelen = 0;
9365                    this.bufferedRequest = null;
9366                    this.lastBufferedRequest = null;
9367                    this.pendingcb = 0;
9368                    this.prefinished = false;
9369                    this.errorEmitted = false;
9370                    this.bufferedRequestCount = 0;
9371                    this.corkedRequestsFree = new CorkedRequest(this);
9372                }
9373                WritableState.prototype.getBuffer = function() {
9374                    var current = this.bufferedRequest;
9375                    var out = [];
9376                    while(current){
9377                        out.push(current);
9378                        current = current.next;
9379                    }
9380                    return out;
9381                };
9382                (function() {
9383                    try {
9384                        Object.defineProperty(WritableState.prototype, 'buffer', {
9385                            get: internalUtil.deprecate(function() {
9386                                return this.getBuffer();
9387                            }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", 'DEP0003')
9388                        });
9389                    } catch (_) {}
9390                })();
9391                var realHasInstance;
9392                if ('function' == typeof Symbol && Symbol.hasInstance && 'function' == typeof Function.prototype[Symbol.hasInstance]) {
9393                    realHasInstance = Function.prototype[Symbol.hasInstance];
9394                    Object.defineProperty(Writable, Symbol.hasInstance, {
9395                        value: function(object) {
9396                            if (realHasInstance.call(this, object)) return true;
9397                            if (this !== Writable) return false;
9398                            return object && object._writableState instanceof WritableState;
9399                        }
9400                    });
9401                } else realHasInstance = function(object) {
9402                    return object instanceof this;
9403                };
9404                function Writable(options) {
9405                    Duplex = Duplex || __webpack_require__(8180);
9406                    if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) return new Writable(options);
9407                    this._writableState = new WritableState(options, this);
9408                    this.writable = true;
9409                    if (options) {
9410                        if ('function' == typeof options.write) this._write = options.write;
9411                        if ('function' == typeof options.writev) this._writev = options.writev;
9412                        if ('function' == typeof options.destroy) this._destroy = options.destroy;
9413                        if ('function' == typeof options.final) this._final = options.final;
9414                    }
9415                    Stream.call(this);
9416                }
9417                Writable.prototype.pipe = function() {
9418                    this.emit('error', new Error('Cannot pipe, not readable'));
9419                };
9420                function writeAfterEnd(stream, cb) {
9421                    var er = new Error('write after end');
9422                    stream.emit('error', er);
9423                    pna.nextTick(cb, er);
9424                }
9425                function validChunk(stream, state, chunk, cb) {
9426                    var valid = true;
9427                    var er = false;
9428                    if (null === chunk) er = new TypeError('May not write null values to stream');
9429                    else if ('string' != typeof chunk && void 0 !== chunk && !state.objectMode) er = new TypeError('Invalid non-string/buffer chunk');
9430                    if (er) {
9431                        stream.emit('error', er);
9432                        pna.nextTick(cb, er);
9433                        valid = false;
9434                    }
9435                    return valid;
9436                }
9437                Writable.prototype.write = function(chunk, encoding, cb) {
9438                    var state = this._writableState;
9439                    var ret = false;
9440                    var isBuf = !state.objectMode && _isUint8Array(chunk);
9441                    if (isBuf && !Buffer.isBuffer(chunk)) chunk = _uint8ArrayToBuffer(chunk);
9442                    if ('function' == typeof encoding) {
9443                        cb = encoding;
9444                        encoding = null;
9445                    }
9446                    if (isBuf) encoding = 'buffer';
9447                    else if (!encoding) encoding = state.defaultEncoding;
9448                    if ('function' != typeof cb) cb = nop;
9449                    if (state.ended) writeAfterEnd(this, cb);
9450                    else if (isBuf || validChunk(this, state, chunk, cb)) {
9451                        state.pendingcb++;
9452                        ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
9453                    }
9454                    return ret;
9455                };
9456                Writable.prototype.cork = function() {
9457                    var state = this._writableState;
9458                    state.corked++;
9459                };
9460                Writable.prototype.uncork = function() {
9461                    var state = this._writableState;
9462                    if (state.corked) {
9463                        state.corked--;
9464                        if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
9465                    }
9466                };
9467                Writable.prototype.setDefaultEncoding = function(encoding) {
9468                    if ('string' == typeof encoding) encoding = encoding.toLowerCase();
9469                    if (!([
9470                        'hex',
9471                        'utf8',
9472                        'utf-8',
9473                        'ascii',
9474                        'binary',
9475                        'base64',
9476                        'ucs2',
9477                        'ucs-2',
9478                        'utf16le',
9479                        'utf-16le',
9480                        'raw'
9481                    ].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
9482                    this._writableState.defaultEncoding = encoding;
9483                    return this;
9484                };
9485                function decodeChunk(state, chunk, encoding) {
9486                    if (!state.objectMode && false !== state.decodeStrings && 'string' == typeof chunk) chunk = Buffer.from(chunk, encoding);
9487                    return chunk;
9488                }
9489                Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
9490                    enumerable: false,
9491                    get: function() {
9492                        return this._writableState.highWaterMark;
9493                    }
9494                });
9495                function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
9496                    if (!isBuf) {
9497                        var newChunk = decodeChunk(state, chunk, encoding);
9498                        if (chunk !== newChunk) {
9499                            isBuf = true;
9500                            encoding = 'buffer';
9501                            chunk = newChunk;
9502                        }
9503                    }
9504                    var len = state.objectMode ? 1 : chunk.length;
9505                    state.length += len;
9506                    var ret = state.length < state.highWaterMark;
9507                    if (!ret) state.needDrain = true;
9508                    if (state.writing || state.corked) {
9509                        var last = state.lastBufferedRequest;
9510                        state.lastBufferedRequest = {
9511                            chunk: chunk,
9512                            encoding: encoding,
9513                            isBuf: isBuf,
9514                            callback: cb,
9515                            next: null
9516                        };
9517                        if (last) last.next = state.lastBufferedRequest;
9518                        else state.bufferedRequest = state.lastBufferedRequest;
9519                        state.bufferedRequestCount += 1;
9520                    } else doWrite(stream, state, false, len, chunk, encoding, cb);
9521                    return ret;
9522                }
9523                function doWrite(stream, state, writev, len, chunk, encoding, cb) {
9524                    state.writelen = len;
9525                    state.writecb = cb;
9526                    state.writing = true;
9527                    state.sync = true;
9528                    if (writev) stream._writev(chunk, state.onwrite);
9529                    else stream._write(chunk, encoding, state.onwrite);
9530                    state.sync = false;
9531                }
9532                function onwriteError(stream, state, sync, er, cb) {
9533                    --state.pendingcb;
9534                    if (sync) {
9535                        pna.nextTick(cb, er);
9536                        pna.nextTick(finishMaybe, stream, state);
9537                        stream._writableState.errorEmitted = true;
9538                        stream.emit('error', er);
9539                    } else {
9540                        cb(er);
9541                        stream._writableState.errorEmitted = true;
9542                        stream.emit('error', er);
9543                        finishMaybe(stream, state);
9544                    }
9545                }
9546                function onwriteStateUpdate(state) {
9547                    state.writing = false;
9548                    state.writecb = null;
9549                    state.length -= state.writelen;
9550                    state.writelen = 0;
9551                }
9552                function onwrite(stream, er) {
9553                    var state = stream._writableState;
9554                    var sync = state.sync;
9555                    var cb = state.writecb;
9556                    onwriteStateUpdate(state);
9557                    if (er) onwriteError(stream, state, sync, er, cb);
9558                    else {
9559                        var finished = needFinish(state);
9560                        if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(stream, state);
9561                        if (sync) asyncWrite(afterWrite, stream, state, finished, cb);
9562                        else afterWrite(stream, state, finished, cb);
9563                    }
9564                }
9565                function afterWrite(stream, state, finished, cb) {
9566                    if (!finished) onwriteDrain(stream, state);
9567                    state.pendingcb--;
9568                    cb();
9569                    finishMaybe(stream, state);
9570                }
9571                function onwriteDrain(stream, state) {
9572                    if (0 === state.length && state.needDrain) {
9573                        state.needDrain = false;
9574                        stream.emit('drain');
9575                    }
9576                }
9577                function clearBuffer(stream, state) {
9578                    state.bufferProcessing = true;
9579                    var entry = state.bufferedRequest;
9580                    if (stream._writev && entry && entry.next) {
9581                        var l = state.bufferedRequestCount;
9582                        var buffer = new Array(l);
9583                        var holder = state.corkedRequestsFree;
9584                        holder.entry = entry;
9585                        var count = 0;
9586                        var allBuffers = true;
9587                        while(entry){
9588                            buffer[count] = entry;
9589                            if (!entry.isBuf) allBuffers = false;
9590                            entry = entry.next;
9591                            count += 1;
9592                        }
9593                        buffer.allBuffers = allBuffers;
9594                        doWrite(stream, state, true, state.length, buffer, '', holder.finish);
9595                        state.pendingcb++;
9596                        state.lastBufferedRequest = null;
9597                        if (holder.next) {
9598                            state.corkedRequestsFree = holder.next;
9599                            holder.next = null;
9600                        } else state.corkedRequestsFree = new CorkedRequest(state);
9601                        state.bufferedRequestCount = 0;
9602                    } else {
9603                        while(entry){
9604                            var chunk = entry.chunk;
9605                            var encoding = entry.encoding;
9606                            var cb = entry.callback;
9607                            var len = state.objectMode ? 1 : chunk.length;
9608                            doWrite(stream, state, false, len, chunk, encoding, cb);
9609                            entry = entry.next;
9610                            state.bufferedRequestCount--;
9611                            if (state.writing) break;
9612                        }
9613                        if (null === entry) state.lastBufferedRequest = null;
9614                    }
9615                    state.bufferedRequest = entry;
9616                    state.bufferProcessing = false;
9617                }
9618                Writable.prototype._write = function(chunk, encoding, cb) {
9619                    cb(new Error('_write() is not implemented'));
9620                };
9621                Writable.prototype._writev = null;
9622                Writable.prototype.end = function(chunk, encoding, cb) {
9623                    var state = this._writableState;
9624                    if ('function' == typeof chunk) {
9625                        cb = chunk;
9626                        chunk = null;
9627                        encoding = null;
9628                    } else if ('function' == typeof encoding) {
9629                        cb = encoding;
9630                        encoding = null;
9631                    }
9632                    if (null != chunk) this.write(chunk, encoding);
9633                    if (state.corked) {
9634                        state.corked = 1;
9635                        this.uncork();
9636                    }
9637                    if (!state.ending) endWritable(this, state, cb);
9638                };
9639                function needFinish(state) {
9640                    return state.ending && 0 === state.length && null === state.bufferedRequest && !state.finished && !state.writing;
9641                }
9642                function callFinal(stream, state) {
9643                    stream._final(function(err) {
9644                        state.pendingcb--;
9645                        if (err) stream.emit('error', err);
9646                        state.prefinished = true;
9647                        stream.emit('prefinish');
9648                        finishMaybe(stream, state);
9649                    });
9650                }
9651                function prefinish(stream, state) {
9652                    if (!state.prefinished && !state.finalCalled) if ('function' == typeof stream._final) {
9653                        state.pendingcb++;
9654                        state.finalCalled = true;
9655                        pna.nextTick(callFinal, stream, state);
9656                    } else {
9657                        state.prefinished = true;
9658                        stream.emit('prefinish');
9659                    }
9660                }
9661                function finishMaybe(stream, state) {
9662                    var need = needFinish(state);
9663                    if (need) {
9664                        prefinish(stream, state);
9665                        if (0 === state.pendingcb) {
9666                            state.finished = true;
9667                            stream.emit('finish');
9668                        }
9669                    }
9670                    return need;
9671                }
9672                function endWritable(stream, state, cb) {
9673                    state.ending = true;
9674                    finishMaybe(stream, state);
9675                    if (cb) if (state.finished) pna.nextTick(cb);
9676                    else stream.once('finish', cb);
9677                    state.ended = true;
9678                    stream.writable = false;
9679                }
9680                function onCorkedFinish(corkReq, state, err) {
9681                    var entry = corkReq.entry;
9682                    corkReq.entry = null;
9683                    while(entry){
9684                        var cb = entry.callback;
9685                        state.pendingcb--;
9686                        cb(err);
9687                        entry = entry.next;
9688                    }
9689                    state.corkedRequestsFree.next = corkReq;
9690                }
9691                Object.defineProperty(Writable.prototype, 'destroyed', {
9692                    get: function() {
9693                        if (void 0 === this._writableState) return false;
9694                        return this._writableState.destroyed;
9695                    },
9696                    set: function(value) {
9697                        if (!this._writableState) return;
9698                        this._writableState.destroyed = value;
9699                    }
9700                });
9701                Writable.prototype.destroy = destroyImpl.destroy;
9702                Writable.prototype._undestroy = destroyImpl.undestroy;
9703                Writable.prototype._destroy = function(err, cb) {
9704                    this.end();
9705                    cb(err);
9706                };
9707            },
9708            6572 (module1, __unused_rspack_exports, __webpack_require__) {
9709                "use strict";
9710                function _classCallCheck(instance, Constructor) {
9711                    if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
9712                }
9713                var Buffer = __webpack_require__(8731).Buffer;
9714                var util = __webpack_require__(7125);
9715                function copyBuffer(src, target, offset) {
9716                    src.copy(target, offset);
9717                }
9718                module1.exports = function() {
9719                    function BufferList() {
9720                        _classCallCheck(this, BufferList);
9721                        this.head = null;
9722                        this.tail = null;
9723                        this.length = 0;
9724                    }
9725                    BufferList.prototype.push = function(v) {
9726                        var entry = {
9727                            data: v,
9728                            next: null
9729                        };
9730                        if (this.length > 0) this.tail.next = entry;
9731                        else this.head = entry;
9732                        this.tail = entry;
9733                        ++this.length;
9734                    };
9735                    BufferList.prototype.unshift = function(v) {
9736                        var entry = {
9737                            data: v,
9738                            next: this.head
9739                        };
9740                        if (0 === this.length) this.tail = entry;
9741                        this.head = entry;
9742                        ++this.length;
9743                    };
9744                    BufferList.prototype.shift = function() {
9745                        if (0 === this.length) return;
9746                        var ret = this.head.data;
9747                        if (1 === this.length) this.head = this.tail = null;
9748                        else this.head = this.head.next;
9749                        --this.length;
9750                        return ret;
9751                    };
9752                    BufferList.prototype.clear = function() {
9753                        this.head = this.tail = null;
9754                        this.length = 0;
9755                    };
9756                    BufferList.prototype.join = function(s) {
9757                        if (0 === this.length) return '';
9758                        var p = this.head;
9759                        var ret = '' + p.data;
9760                        while(p = p.next)ret += s + p.data;
9761                        return ret;
9762                    };
9763                    BufferList.prototype.concat = function(n) {
9764                        if (0 === this.length) return Buffer.alloc(0);
9765                        var ret = Buffer.allocUnsafe(n >>> 0);
9766                        var p = this.head;
9767                        var i = 0;
9768                        while(p){
9769                            copyBuffer(p.data, ret, i);
9770                            i += p.data.length;
9771                            p = p.next;
9772                        }
9773                        return ret;
9774                    };
9775                    return BufferList;
9776                }();
9777                if (util && util.inspect && util.inspect.custom) module1.exports.prototype[util.inspect.custom] = function() {
9778                    var obj = util.inspect({
9779                        length: this.length
9780                    });
9781                    return this.constructor.name + ' ' + obj;
9782                };
9783            },
9784            4058 (module1, __unused_rspack_exports, __webpack_require__) {
9785                "use strict";
9786                var pna = __webpack_require__(3225);
9787                function destroy(err, cb) {
9788                    var _this = this;
9789                    var readableDestroyed = this._readableState && this._readableState.destroyed;
9790                    var writableDestroyed = this._writableState && this._writableState.destroyed;
9791                    if (readableDestroyed || writableDestroyed) {
9792                        if (cb) cb(err);
9793                        else if (err) if (this._writableState) {
9794                            if (!this._writableState.errorEmitted) {
9795                                this._writableState.errorEmitted = true;
9796                                pna.nextTick(emitErrorNT, this, err);
9797                            }
9798                        } else pna.nextTick(emitErrorNT, this, err);
9799                        return this;
9800                    }
9801                    if (this._readableState) this._readableState.destroyed = true;
9802                    if (this._writableState) this._writableState.destroyed = true;
9803                    this._destroy(err || null, function(err) {
9804                        if (!cb && err) if (_this._writableState) {
9805                            if (!_this._writableState.errorEmitted) {
9806                                _this._writableState.errorEmitted = true;
9807                                pna.nextTick(emitErrorNT, _this, err);
9808                            }
9809                        } else pna.nextTick(emitErrorNT, _this, err);
9810                        else if (cb) cb(err);
9811                    });
9812                    return this;
9813                }
9814                function undestroy() {
9815                    if (this._readableState) {
9816                        this._readableState.destroyed = false;
9817                        this._readableState.reading = false;
9818                        this._readableState.ended = false;
9819                        this._readableState.endEmitted = false;
9820                    }
9821                    if (this._writableState) {
9822                        this._writableState.destroyed = false;
9823                        this._writableState.ended = false;
9824                        this._writableState.ending = false;
9825                        this._writableState.finalCalled = false;
9826                        this._writableState.prefinished = false;
9827                        this._writableState.finished = false;
9828                        this._writableState.errorEmitted = false;
9829                    }
9830                }
9831                function emitErrorNT(self1, err) {
9832                    self1.emit('error', err);
9833                }
9834                module1.exports = {
9835                    destroy: destroy,
9836                    undestroy: undestroy
9837                };
9838            },
9839            3267 (module1, __unused_rspack_exports, __webpack_require__) {
9840                module1.exports = __webpack_require__(7007).EventEmitter;
9841            },
9842            6325 (module1, exports1, __webpack_require__) {
9843                exports1 = module1.exports = __webpack_require__(2954);
9844                exports1.Stream = exports1;
9845                exports1.Readable = exports1;
9846                exports1.Writable = __webpack_require__(3646);
9847                exports1.Duplex = __webpack_require__(8180);
9848                exports1.Transform = __webpack_require__(4756);
9849                exports1.PassThrough = __webpack_require__(2046);
9850            },
9851            8731 (module1, exports1, __webpack_require__) {
9852                var buffer = __webpack_require__(8287);
9853                var Buffer = buffer.Buffer;
9854                function copyProps(src, dst) {
9855                    for(var key in src)dst[key] = src[key];
9856                }
9857                if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) module1.exports = buffer;
9858                else {
9859                    copyProps(buffer, exports1);
9860                    exports1.Buffer = SafeBuffer;
9861                }
9862                function SafeBuffer(arg, encodingOrOffset, length) {
9863                    return Buffer(arg, encodingOrOffset, length);
9864                }
9865                copyProps(Buffer, SafeBuffer);
9866                SafeBuffer.from = function(arg, encodingOrOffset, length) {
9867                    if ('number' == typeof arg) throw new TypeError('Argument must not be a number');
9868                    return Buffer(arg, encodingOrOffset, length);
9869                };
9870                SafeBuffer.alloc = function(size, fill, encoding) {
9871                    if ('number' != typeof size) throw new TypeError('Argument must be a number');
9872                    var buf = Buffer(size);
9873                    if (void 0 !== fill) if ('string' == typeof encoding) buf.fill(fill, encoding);
9874                    else buf.fill(fill);
9875                    else buf.fill(0);
9876                    return buf;
9877                };
9878                SafeBuffer.allocUnsafe = function(size) {
9879                    if ('number' != typeof size) throw new TypeError('Argument must be a number');
9880                    return Buffer(size);
9881                };
9882                SafeBuffer.allocUnsafeSlow = function(size) {
9883                    if ('number' != typeof size) throw new TypeError('Argument must be a number');
9884                    return buffer.SlowBuffer(size);
9885                };
9886            },
9887            1879 (__unused_rspack_module, exports1, __webpack_require__) {
9888                "use strict";
9889                var Buffer = __webpack_require__(8731).Buffer;
9890                var isEncoding = Buffer.isEncoding || function(encoding) {
9891                    encoding = '' + encoding;
9892                    switch(encoding && encoding.toLowerCase()){
9893                        case 'hex':
9894                        case 'utf8':
9895                        case 'utf-8':
9896                        case 'ascii':
9897                        case 'binary':
9898                        case 'base64':
9899                        case 'ucs2':
9900                        case 'ucs-2':
9901                        case 'utf16le':
9902                        case 'utf-16le':
9903                        case 'raw':
9904                            return true;
9905                        default:
9906                            return false;
vendor: 7,436 bytes, lines 9907-10069
9907                    }
9908                };
9909                function _normalizeEncoding(enc) {
9910                    if (!enc) return 'utf8';
9911                    var retried;
9912                    while(true)switch(enc){
9913                        case 'utf8':
9914                        case 'utf-8':
9915                            return 'utf8';
9916                        case 'ucs2':
9917                        case 'ucs-2':
9918                        case 'utf16le':
9919                        case 'utf-16le':
9920                            return 'utf16le';
9921                        case 'latin1':
9922                        case 'binary':
9923                            return 'latin1';
9924                        case 'base64':
9925                        case 'ascii':
9926                        case 'hex':
9927                            return enc;
9928                        default:
9929                            if (retried) return;
9930                            enc = ('' + enc).toLowerCase();
9931                            retried = true;
9932                    }
9933                }
9934                function normalizeEncoding(enc) {
9935                    var nenc = _normalizeEncoding(enc);
9936                    if ('string' != typeof nenc && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
9937                    return nenc || enc;
9938                }
9939                exports1.I = StringDecoder;
9940                function StringDecoder(encoding) {
9941                    this.encoding = normalizeEncoding(encoding);
9942                    var nb;
9943                    switch(this.encoding){
9944                        case 'utf16le':
9945                            this.text = utf16Text;
9946                            this.end = utf16End;
9947                            nb = 4;
9948                            break;
9949                        case 'utf8':
9950                            this.fillLast = utf8FillLast;
9951                            nb = 4;
9952                            break;
9953                        case 'base64':
9954                            this.text = base64Text;
9955                            this.end = base64End;
9956                            nb = 3;
9957                            break;
9958                        default:
9959                            this.write = simpleWrite;
9960                            this.end = simpleEnd;
9961                            return;
9962                    }
9963                    this.lastNeed = 0;
9964                    this.lastTotal = 0;
9965                    this.lastChar = Buffer.allocUnsafe(nb);
9966                }
9967                StringDecoder.prototype.write = function(buf) {
9968                    if (0 === buf.length) return '';
9969                    var r;
9970                    var i;
9971                    if (this.lastNeed) {
9972                        r = this.fillLast(buf);
9973                        if (void 0 === r) return '';
9974                        i = this.lastNeed;
9975                        this.lastNeed = 0;
9976                    } else i = 0;
9977                    if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
9978                    return r || '';
9979                };
9980                StringDecoder.prototype.end = utf8End;
9981                StringDecoder.prototype.text = utf8Text;
9982                StringDecoder.prototype.fillLast = function(buf) {
9983                    if (this.lastNeed <= buf.length) {
9984                        buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
9985                        return this.lastChar.toString(this.encoding, 0, this.lastTotal);
9986                    }
9987                    buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
9988                    this.lastNeed -= buf.length;
9989                };
9990                function utf8CheckByte(byte) {
9991                    if (byte <= 0x7F) return 0;
9992                    if (byte >> 5 === 0x06) return 2;
9993                    if (byte >> 4 === 0x0E) return 3;
9994                    if (byte >> 3 === 0x1E) return 4;
9995                    return byte >> 6 === 0x02 ? -1 : -2;
9996                }
9997                function utf8CheckIncomplete(self1, buf, i) {
9998                    var j = buf.length - 1;
9999                    if (j < i) return 0;
10000                    var nb = utf8CheckByte(buf[j]);
10001                    if (nb >= 0) {
10002                        if (nb > 0) self1.lastNeed = nb - 1;
10003                        return nb;
10004                    }
10005                    if (--j < i || -2 === nb) return 0;
10006                    nb = utf8CheckByte(buf[j]);
10007                    if (nb >= 0) {
10008                        if (nb > 0) self1.lastNeed = nb - 2;
10009                        return nb;
10010                    }
10011                    if (--j < i || -2 === nb) return 0;
10012                    nb = utf8CheckByte(buf[j]);
10013                    if (nb >= 0) {
10014                        if (nb > 0) if (2 === nb) nb = 0;
10015                        else self1.lastNeed = nb - 3;
10016                        return nb;
10017                    }
10018                    return 0;
10019                }
10020                function utf8CheckExtraBytes(self1, buf, p) {
10021                    if ((0xC0 & buf[0]) !== 0x80) {
10022                        self1.lastNeed = 0;
10023                        return '\ufffd';
10024                    }
10025                    if (self1.lastNeed > 1 && buf.length > 1) {
10026                        if ((0xC0 & buf[1]) !== 0x80) {
10027                            self1.lastNeed = 1;
10028                            return '\ufffd';
10029                        }
10030                        if (self1.lastNeed > 2 && buf.length > 2) {
10031                            if ((0xC0 & buf[2]) !== 0x80) {
10032                                self1.lastNeed = 2;
10033                                return '\ufffd';
10034                            }
10035                        }
10036                    }
10037                }
10038                function utf8FillLast(buf) {
10039                    var p = this.lastTotal - this.lastNeed;
10040                    var r = utf8CheckExtraBytes(this, buf, p);
10041                    if (void 0 !== r) return r;
10042                    if (this.lastNeed <= buf.length) {
10043                        buf.copy(this.lastChar, p, 0, this.lastNeed);
10044                        return this.lastChar.toString(this.encoding, 0, this.lastTotal);
10045                    }
10046                    buf.copy(this.lastChar, p, 0, buf.length);
10047                    this.lastNeed -= buf.length;
10048                }
10049                function utf8Text(buf, i) {
10050                    var total = utf8CheckIncomplete(this, buf, i);
10051                    if (!this.lastNeed) return buf.toString('utf8', i);
10052                    this.lastTotal = total;
10053                    var end = buf.length - (total - this.lastNeed);
10054                    buf.copy(this.lastChar, 0, end);
10055                    return buf.toString('utf8', i, end);
10056                }
10057                function utf8End(buf) {
10058                    var r = buf && buf.length ? this.write(buf) : '';
10059                    if (this.lastNeed) return r + '\ufffd';
10060                    return r;
10061                }
10062                function utf16Text(buf, i) {
10063                    if ((buf.length - i) % 2 === 0) {
10064                        var r = buf.toString('utf16le', i);
10065                        if (r) {
10066                            var c = r.charCodeAt(r.length - 1);
10067                            if (c >= 0xD800 && c <= 0xDBFF) {
10068                                this.lastNeed = 2;
10069                                this.lastTotal = 4;
10070                                this.lastChar[0] = buf[buf.length - 2];
10071                                this.lastChar[1] = buf[buf.length - 1];
10072                                return r.slice(0, -1);
10073                            }
10074                        }
10075                        return r;
10076                    }
10077                    this.lastNeed = 1;
10078                    this.lastTotal = 2;
10079                    this.lastChar[0] = buf[buf.length - 1];
10080                    return buf.toString('utf16le', i, buf.length - 1);
10081                }
10082                function utf16End(buf) {
10083                    var r = buf && buf.length ? this.write(buf) : '';
10084                    if (this.lastNeed) {
10085                        var end = this.lastTotal - this.lastNeed;
10086                        return r + this.lastChar.toString('utf16le', 0, end);
10087                    }
10088                    return r;
10089                }
10090                function base64Text(buf, i) {
10091                    var n = (buf.length - i) % 3;
10092                    if (0 === n) return buf.toString('base64', i);
10093                    this.lastNeed = 3 - n;
10094                    this.lastTotal = 3;
10095                    if (1 === n) this.lastChar[0] = buf[buf.length - 1];
10096                    else {
10097                        this.lastChar[0] = buf[buf.length - 2];
10098                        this.lastChar[1] = buf[buf.length - 1];
10099                    }
10100                    return buf.toString('base64', i, buf.length - n);
10101                }
10102                function base64End(buf) {
10103                    var r = buf && buf.length ? this.write(buf) : '';
10104                    if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
10105                    return r;
10106                }
10107                function simpleWrite(buf) {
10108                    return buf.toString(this.encoding);
10109                }
10110                function simpleEnd(buf) {
10111                    return buf && buf.length ? this.write(buf) : '';
10112                }
10113            },
10114            9967 (module1, __unused_rspack_exports, __webpack_require__) {
10115                "use strict";
10116                var process = __webpack_require__(5606);
10117                var Transform = __webpack_require__(6325).Transform;
10118                var duplexify = __webpack_require__(2623);
10119                var WS = __webpack_require__(4208);
10120                var Buffer = __webpack_require__(8731).Buffer;
10121                module1.exports = WebSocketStream;
10122                function buildProxy(options, socketWrite, socketEnd) {
10123                    var proxy = new Transform({
10124                        objectMode: options.objectMode
10125                    });
10126                    proxy._write = socketWrite;
10127                    proxy._flush = socketEnd;
10128                    return proxy;
10129                }
10130                function WebSocketStream(target, protocols, options) {
10131                    var stream, socket;
10132                    var isBrowser = 'browser' === process.title;
10133                    var isNative = !!__webpack_require__.g.WebSocket;
10134                    var socketWrite = isBrowser ? socketWriteBrowser : socketWriteNode;
10135                    if (protocols && !Array.isArray(protocols) && 'object' == typeof protocols) {
10136                        options = protocols;
10137                        protocols = null;
10138                        if ('string' == typeof options.protocol || Array.isArray(options.protocol)) protocols = options.protocol;
10139                    }
10140                    if (!options) options = {};
10141                    if (void 0 === options.objectMode) options.objectMode = !(true === options.binary || void 0 === options.binary);
10142                    var proxy = buildProxy(options, socketWrite, socketEnd);
10143                    if (!options.objectMode) proxy._writev = writev;
10144                    var bufferSize = options.browserBufferSize || 524288;
10145                    var bufferTimeout = options.browserBufferTimeout || 1000;
10146                    if ('object' == typeof target) socket = target;
10147                    else {
10148                        socket = isNative && isBrowser ? new WS(target, protocols) : new WS(target, protocols, options);
10149                        socket.binaryType = 'arraybuffer';
10150                    }
10151                    var eventListenerSupport = void 0 === socket.addEventListener;
10152                    if (socket.readyState === socket.OPEN) stream = proxy;
10153                    else {
10154                        stream = stream = duplexify(void 0, void 0, options);
10155                        if (!options.objectMode) stream._writev = writev;
10156                        if (eventListenerSupport) socket.addEventListener('open', onopen);
10157                        else socket.onopen = onopen;
10158                    }
10159                    stream.socket = socket;
10160                    if (eventListenerSupport) {
10161                        socket.addEventListener('close', onclose);
10162                        socket.addEventListener('error', onerror);
10163                        socket.addEventListener('message', onmessage);
10164                    } else {
10165                        socket.onclose = onclose;
10166                        socket.onerror = onerror;
10167                        socket.onmessage = onmessage;
10168                    }
10169                    proxy.on('close', destroy);
10170                    var coerceToBuffer = !options.objectMode;
10171                    function socketWriteNode(chunk, enc, next) {
10172                        if (socket.readyState !== socket.OPEN) return void next();
10173                        if (coerceToBuffer && 'string' == typeof chunk) chunk = Buffer.from(chunk, 'utf8');
10174                        socket.send(chunk, next);
10175                    }
10176                    function socketWriteBrowser(chunk, enc, next) {
10177                        if (socket.bufferedAmount > bufferSize) return void setTimeout(socketWriteBrowser, bufferTimeout, chunk, enc, next);
10178                        if (coerceToBuffer && 'string' == typeof chunk) chunk = Buffer.from(chunk, 'utf8');
10179                        try {
10180                            socket.send(chunk);
10181                        } catch (err) {
10182                            return next(err);
10183                        }
10184                        next();
10185                    }
10186                    function socketEnd(done) {
10187                        socket.close();
10188                        done();
10189                    }
10190                    function onopen() {
10191                        stream.setReadable(proxy);
10192                        stream.setWritable(proxy);
10193                        stream.emit('connect');
10194                    }
10195                    function onclose() {
10196                        stream.end();
10197                        stream.destroy();
10198                    }
10199                    function onerror(err) {
10200                        stream.destroy(err);
10201                    }
10202                    function onmessage(event) {
10203                        var data = event.data;
10204                        data = data instanceof ArrayBuffer ? Buffer.from(data) : Buffer.from(data, 'utf8');
10205                        proxy.push(data);
10206                    }
10207                    function destroy() {
10208                        socket.close();
10209                    }
10210                    function writev(chunks, cb) {
10211                        var buffers = new Array(chunks.length);
10212                        for(var i = 0; i < chunks.length; i++)if ('string' == typeof chunks[i].chunk) buffers[i] = Buffer.from(chunks[i], 'utf8');
10213                        else buffers[i] = chunks[i].chunk;
10214                        this._write(Buffer.concat(buffers), 'binary', cb);
10215                    }
10216                    return stream;
10217                }
10218            },
10219            4208 (module1) {
10220                var ws = null;
10221                if ("u" > typeof WebSocket) ws = WebSocket;
10222                else if ("u" > typeof MozWebSocket) ws = MozWebSocket;
10223                else if ("u" > typeof window) ws = window.WebSocket || window.MozWebSocket;
10224                module1.exports = ws;
10225            },
10226            5767 (module1, __unused_rspack_exports, __webpack_require__) {
10227                "use strict";
10228                var forEach = __webpack_require__(2682);
10229                var availableTypedArrays = __webpack_require__(9209);
10230                var callBind = __webpack_require__(487);
10231                var callBound = __webpack_require__(6556);
10232                var gOPD = __webpack_require__(5795);
10233                var getProto = __webpack_require__(3628);
10234                var $toString = callBound('Object.prototype.toString');
10235                var hasToStringTag = __webpack_require__(9092)();
10236                var g = "u" < typeof globalThis ? __webpack_require__.g : globalThis;
10237                var typedArrays = availableTypedArrays();
10238                var $slice = callBound('String.prototype.slice');
10239                var $indexOf = callBound('Array.prototype.indexOf', true) || function(array, value) {
10240                    for(var i = 0; i < array.length; i += 1)if (array[i] === value) return i;
10241                    return -1;
10242                };
10243                var cache = {
10244                    __proto__: null
10245                };
10246                hasToStringTag && gOPD && getProto ? forEach(typedArrays, function(typedArray) {
10247                    var arr = new g[typedArray]();
10248                    if (Symbol.toStringTag in arr && getProto) {
10249                        var proto = getProto(arr);
10250                        var descriptor = gOPD(proto, Symbol.toStringTag);
10251                        if (!descriptor && proto) {
10252                            var superProto = getProto(proto);
10253                            descriptor = gOPD(superProto, Symbol.toStringTag);
10254                        }
10255                        if (descriptor && descriptor.get) {
10256                            var bound = callBind(descriptor.get);
10257                            cache['$' + typedArray] = bound;
10258                        }
10259                    }
10260                }) : forEach(typedArrays, function(typedArray) {
10261                    var arr = new g[typedArray]();
10262                    var fn = arr.slice || arr.set;
10263                    if (fn) {
10264                        var bound = callBind(fn);
10265                        cache['$' + typedArray] = bound;
10266                    }
10267                });
10268                var tryTypedArrays = function(value) {
10269                    var found = false;
10270                    forEach(cache, function(getter, typedArray) {
10271                        if (!found) try {
10272                            if ('$' + getter(value) === typedArray) found = $slice(typedArray, 1);
10273                        } catch (e) {}
10274                    });
10275                    return found;
10276                };
10277                var trySlices = function(value) {
10278                    var found = false;
10279                    forEach(cache, function(getter, name) {
10280                        if (!found) try {
10281                            getter(value);
10282                            found = $slice(name, 1);
10283                        } catch (e) {}
10284                    });
10285                    return found;
10286                };
10287                module1.exports = function(value) {
10288                    if (!value || 'object' != typeof value) return false;
10289                    if (!hasToStringTag) {
10290                        var tag = $slice($toString(value), 8, -1);
10291                        if ($indexOf(typedArrays, tag) > -1) return tag;
10292                        if ('Object' !== tag) return false;
10293                        return trySlices(value);
10294                    }
10295                    if (!gOPD) return null;
10296                    return tryTypedArrays(value);
10297                };
10298            },
10299            6587 (module1) {
10300                module1.exports = wrappy;
10301                function wrappy(fn, cb) {
10302                    if (fn && cb) return wrappy(fn)(cb);
10303                    if ('function' != typeof fn) throw new TypeError('need wrapper function');
10304                    Object.keys(fn).forEach(function(k) {
10305                        wrapper[k] = fn[k];
10306                    });
10307                    return wrapper;
10308                    function wrapper() {
10309                        var args = new Array(arguments.length);
10310                        for(var i = 0; i < args.length; i++)args[i] = arguments[i];
10311                        var ret = fn.apply(this, args);
10312                        var cb = args[args.length - 1];
10313                        if ('function' == typeof ret && ret !== cb) Object.keys(cb).forEach(function(k) {
10314                            ret[k] = cb[k];
10315                        });
10316                        return ret;
10317                    }
10318                }
10319            },
10320            5889 () {},
10321            4219 () {},
10322            1345 () {},
10323            4892 () {},
10324            7125 () {},
10325            3415 () {},
10326            37 (module1) {
10327                "use strict";
10328                module1.exports = function(cssWithMappingToString) {
10329                    var list = [];
10330                    list.toString = function() {
10331                        return this.map(function(item) {
10332                            var content = "";
10333                            var needLayer = void 0 !== item[5];
10334                            if (item[4]) content += "@supports (".concat(item[4], ") {");
10335                            if (item[2]) content += "@media ".concat(item[2], " {");
10336                            if (needLayer) content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
10337                            content += cssWithMappingToString(item);
10338                            if (needLayer) content += "}";
10339                            if (item[2]) content += "}";
10340                            if (item[4]) content += "}";
10341                            return content;
10342                        }).join("");
10343                    };
10344                    list.i = function(modules, media, dedupe, supports, layer) {
10345                        if ("string" == typeof modules) modules = [
10346                            [
10347                                null,
10348                                modules,
10349                                void 0
10350                            ]
10351                        ];
10352                        var alreadyImportedModules = {};
10353                        if (dedupe) for(var k = 0; k < this.length; k++){
10354                            var id = this[k][0];
10355                            if (null != id) alreadyImportedModules[id] = true;
10356                        }
10357                        for(var _k = 0; _k < modules.length; _k++){
10358                            var item = [].concat(modules[_k]);
10359                            if (!dedupe || !alreadyImportedModules[item[0]]) {
10360                                if (void 0 !== layer) if (void 0 === item[5]) item[5] = layer;
10361                                else {
10362                                    item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
10363                                    item[5] = layer;
10364                                }
10365                                if (media) if (item[2]) {
10366                                    item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
10367                                    item[2] = media;
10368                                } else item[2] = media;
10369                                if (supports) if (item[4]) {
10370                                    item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
10371                                    item[4] = supports;
10372                                } else item[4] = "".concat(supports);
10373                                list.push(item);
10374                            }
10375                        }
10376                    };
10377                    return list;
10378                };
10379            },
10380            5068 (module1) {
10381                "use strict";
10382                module1.exports = function(i) {
10383                    return i[1];
10384                };
10385            },
10386            4860 (module1) {
10387                "use strict";
10388                var stylesInDOM = [];
10389                function getIndexByIdentifier(identifier) {
10390                    var result = -1;
10391                    for(var i = 0; i < stylesInDOM.length; i++)if (stylesInDOM[i].identifier === identifier) {
10392                        result = i;
10393                        break;
10394                    }
10395                    return result;
10396                }
10397                function modulesToDom(list, options) {
10398                    var idCountMap = {};
10399                    var identifiers = [];
10400                    for(var i = 0; i < list.length; i++){
10401                        var item = list[i];
10402                        var id = options.base ? item[0] + options.base : item[0];
10403                        var count = idCountMap[id] || 0;
10404                        var identifier = "".concat(id, " ").concat(count);
10405                        idCountMap[id] = count + 1;
10406                        var indexByIdentifier = getIndexByIdentifier(identifier);
10407                        var obj = {
10408                            css: item[1],
10409                            media: item[2],
10410                            sourceMap: item[3],
10411                            supports: item[4],
10412                            layer: item[5]
10413                        };
10414                        if (-1 !== indexByIdentifier) {
10415                            stylesInDOM[indexByIdentifier].references++;
10416                            stylesInDOM[indexByIdentifier].updater(obj);
10417                        } else {
10418                            var updater = addElementStyle(obj, options);
10419                            options.byIndex = i;
10420                            stylesInDOM.splice(i, 0, {
10421                                identifier: identifier,
10422                                updater: updater,
10423                                references: 1
10424                            });
10425                        }
10426                        identifiers.push(identifier);
10427                    }
10428                    return identifiers;
10429                }
10430                function addElementStyle(obj, options) {
10431                    var api = options.domAPI(options);
10432                    api.update(obj);
10433                    var updater = function(newObj) {
10434                        if (newObj) {
10435                            if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) return;
10436                            api.update(obj = newObj);
10437                        } else api.remove();
10438                    };
10439                    return updater;
10440                }
10441                module1.exports = function(list, options) {
10442                    options = options || {};
10443                    list = list || [];
10444                    var lastIdentifiers = modulesToDom(list, options);
10445                    return function(newList) {
10446                        newList = newList || [];
10447                        for(var i = 0; i < lastIdentifiers.length; i++){
10448                            var identifier = lastIdentifiers[i];
10449                            var index = getIndexByIdentifier(identifier);
10450                            stylesInDOM[index].references--;
10451                        }
10452                        var newLastIdentifiers = modulesToDom(newList, options);
10453                        for(var _i = 0; _i < lastIdentifiers.length; _i++){
10454                            var _identifier = lastIdentifiers[_i];
10455                            var _index = getIndexByIdentifier(_identifier);
10456                            if (0 === stylesInDOM[_index].references) {
10457                                stylesInDOM[_index].updater();
10458                                stylesInDOM.splice(_index, 1);
10459                            }
10460                        }
10461                        lastIdentifiers = newLastIdentifiers;
10462                    };
10463                };
10464            },
10465            3175 (module1) {
10466                "use strict";
10467                var memo = {};
10468                function getTarget(target) {
10469                    if (void 0 === memo[target]) {
10470                        var styleTarget = document.querySelector(target);
10471                        if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) try {
10472                            styleTarget = styleTarget.contentDocument.head;
10473                        } catch (e) {
10474                            styleTarget = null;
10475                        }
10476                        memo[target] = styleTarget;
10477                    }
10478                    return memo[target];
10479                }
10480                function insertBySelector(insert, style) {
10481                    var target = getTarget(insert);
10482                    if (!target) throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invali
10482d.");
10483                    target.appendChild(style);
10484                }
10485                module1.exports = insertBySelector;
10486            },
10487            6384 (module1) {
10488                "use strict";
10489                function insertStyleElement(options) {
10490                    var element = document.createElement("style");
10491                    options.setAttributes(element, options.attributes);
10492                    options.insert(element, options.options);
10493                    return element;
10494                }
10495                module1.exports = insertStyleElement;
10496            },
10497            7956 (module1, __unused_rspack_exports, __webpack_require__) {
10498                "use strict";
10499                function setAttributesWithoutAttributes(styleElement) {
10500                    var nonce = __webpack_require__.nc;
10501                    if (nonce) styleElement.setAttribute("nonce", nonce);
10502                }
10503                module1.exports = setAttributesWithoutAttributes;
10504            },
10505            7045 (module1) {
10506                "use strict";
10507                function apply(styleElement, options, obj) {
10508                    var css = "";
10509                    if (obj.supports) css += "@supports (".concat(obj.supports, ") {");
10510                    if (obj.media) css += "@media ".concat(obj.media, " {");
10511                    var needLayer = void 0 !== obj.layer;
10512                    if (needLayer) css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
10513                    css += obj.css;
10514                    if (needLayer) css += "}";
10515                    if (obj.media) css += "}";
10516                    if (obj.supports) css += "}";
10517                    var sourceMap = obj.sourceMap;
10518                    if (sourceMap && "u" > typeof btoa) css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
10519                    options.styleTagTransform(css, styleElement, options.options);
10520                }
10521                function removeStyleElement(styleElement) {
10522                    if (null === styleElement.parentNode) return false;
10523                    styleElement.parentNode.removeChild(styleElement);
10524                }
10525                function domAPI(options) {
10526                    if ("u" < typeof document) return {
10527                        update: function() {},
10528                        remove: function() {}
10529                    };
10530                    var styleElement = options.insertStyleElement(options);
10531                    return {
10532                        update: function(obj) {
10533                            apply(styleElement, options, obj);
10534                        },
10535                        remove: function() {
10536                            removeStyleElement(styleElement);
10537                        }
10538                    };
10539                }
10540                module1.exports = domAPI;
10541            },
10542            2045 (module1) {
10543                "use strict";
10544                function styleTagTransform(css, styleElement) {
10545                    if (styleElement.styleSheet) styleElement.styleSheet.cssText = css;
10546                    else {
10547                        while(styleElement.firstChild)styleElement.removeChild(styleElement.firstChild);
10548                        styleElement.appendChild(document.createTextNode(css));
10549                    }
10550                }
10551                module1.exports = styleTagTransform;
10552            },
10553            9209 (module1, __unused_rspack_exports, __webpack_require__) {
10554                "use strict";
10555                var possibleNames = __webpack_require__(6578);
10556                var g = "u" < typeof globalThis ? __webpack_require__.g : globalThis;
10557                module1.exports = function() {
10558                    var out = [];
10559                    for(var i = 0; i < possibleNames.length; i++)if ('function' == typeof g[possibleNames[i]]) out[out.length] = possibleNames[i];
10560                    return out;
10561                };
10562            }
10563        };
10564        var __webpack_module_cache__ = {};
10565        function __webpack_require__(moduleId) {
10566            var cachedModule = __webpack_module_cache__[moduleId];
10567            if (void 0 !== cachedModule) return cachedModule.exports;
10568            var module1 = __webpack_module_cache__[moduleId] = {
10569                id: moduleId,
10570                exports: {}
10571            };
10572            __webpack_modules__[moduleId].call(module1.exports, module1, module1.exports, __webpack_require__);
10573            return module1.exports;
10574        }
10575        (()=>{
10576            __webpack_require__.n = (module1)=>{
10577                var getter = module1 && module1.__esModule ? ()=>module1['default'] : ()=>module1;
10578                __webpack_require__.d(getter, {
10579                    a: getter
10580                });
10581                return getter;
10582            };
10583        })();
10584        (()=>{
10585            __webpack_require__.d = (exports1, getters, values)=>{
10586                var define1 = (defs, kind)=>{
10587                    for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
10588                        enumerable: true,
10589                        [kind]: defs[key]
10590                    });
10591                };
10592                define1(getters, "get");
10593                define1(values, "value");
10594            };
10595        })();
10596        (()=>{
10597            __webpack_require__.g = (()=>{
10598                if ('object' == typeof globalThis) return globalThis;
10599                try {
10600                    return this || new Function('return this')();
10601                } catch (e) {
10602                    if ('object' == typeof window) return window;
10603                }
10604            })();
10605        })();
10606        (()=>{
10607            __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
10608        })();
10609        (()=>{
10610            __webpack_require__.r = (exports1)=>{
10611                if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
10612                    value: 'Module'
10613                });
10614                Object.defineProperty(exports1, '__esModule', {
10615                    value: true
10616                });
10617            };
10618        })();
10619        (()=>{
10620            __webpack_require__.nc = void 0;
10621        })();
10622        var __webpack_exports__ = {};
10623        (()=>{
10624            "use strict";
10625            __webpack_require__.r(__webpack_exports__);
10626            __webpack_require__.d(__webpack_exports__, {
10627                Reactions: ()=>Reactions,
10628                VideoType: ()=>VideoType,
10629                VideomailClient: ()=>VideomailClient
10630            });
10631            const VideoType = {
10632                WebM: "webm",
10633                MP4: "mp4"
10634            };
10635            const constants = {
10636                WHITELIST_KEY_LABEL: "x-videomail-whitelist-key",
10637                VERSION_LABEL: "videomailClientVersion",
10638                public: {
10639                    ENC_TYPE_APP_JSON: "application/json",
10640                    ENC_TYPE_FORM: "application/x-www-form-urlencoded"
10641                }
10642            };
10643            const isNonErrorSymbol = Symbol('isNonError');
10644            function defineProperty(object, key, value) {
10645                Object.defineProperty(object, key, {
10646                    value,
10647                    writable: false,
10648                    enumerable: false,
10649                    configurable: false
10650                });
10651            }
10652            function stringify(value) {
10653                if (void 0 === value) return 'undefined';
10654                if (null === value) return 'null';
10655                if ('string' == typeof value) return value;
10656                if ('number' == typeof value || 'boolean' == typeof value) return String(value);
10657                if ('bigint' == typeof value) return `${value}n`;
10658                if ('symbol' == typeof value) return value.toString();
10659                if ('function' == typeof value) return `[Function${value.name ? ` ${value.name}` : ' (anonymous)'}]`;
10660                if (value instanceof Error) try {
10661                    return String(value);
10662                } catch  {
10663                    return '<Unserializable error>';
10664                }
10665                try {
10666                    return JSON.stringify(value);
10667                } catch  {
10668                    try {
10669                        return String(value);
10670                    } catch  {
10671                        return '<Unserializable value>';
10672                    }
10673                }
10674            }
10675            class NonError extends Error {
10676                constructor(value, { superclass: Superclass = Error } = {}){
10677                    if (NonError.isNonError(value)) return value;
10678                    if (value instanceof Error) throw new TypeError('Do not pass Error instances to NonError. Throw the error directly instead.');
10679                    super(`Non-error value: ${stringify(value)}`);
10680                    if (Superclass !== Error) Object.setPrototypeOf(this, Superclass.prototype);
10681                    defineProperty(this, 'name', 'NonError');
10682                    defineProperty(this, isNonErrorSymbol, true);
10683                    defineProperty(this, 'isNonError', true);
10684                    defineProperty(this, 'value', value);
10685                }
10686                static isNonError(value) {
10687                    return value?.[isNonErrorSymbol] === true;
10688                }
10689                static #handleCallback(callback, arguments_) {
10690                    try {
10691                        const result = callback(...arguments_);
10692                        if (result && 'function' == typeof result.then) return (async ()=>{
10693                            try {
10694                                return await result;
10695                            } catch (error) {
10696                                if (error instanceof Error) throw error;
10697                                throw new NonError(error);
10698                            }
10699                        })();
10700                        return result;
10701                    } catch (error) {
10702                        if (error instanceof Error) throw error;
10703                        throw new NonError(error);
10704                    }
10705                }
10706                static try(callback) {
10707                    return NonError.#handleCallback(callback, []);
10708                }
10709                static wrap(callback) {
10710                    return (...arguments_)=>NonError.#handleCallback(callback, arguments_);
10711                }
10712                static [Symbol.hasInstance](instance) {
10713                    return NonError.isNonError(instance);
10714                }
10715            }
10716            const list = [
10717                Error,
10718                EvalError,
10719                RangeError,
10720                ReferenceError,
10721                SyntaxError,
10722                TypeError,
10723                URIError,
10724                AggregateError,
10725                globalThis.DOMException,
10726                globalThis.AssertionError,
10727                globalThis.SystemError
10728            ].filter(Boolean).map((constructor)=>[
10729                    constructor.name,
10730                    constructor
10731                ]);
10732            const errorConstructors = new Map(list);
10733            const errorFactories = new Map();
10734            const errorProperties = [
10735                {
10736                    property: 'name',
10737                    enumerable: false
10738                },
10739                {
10740                    property: 'message',
10741                    enumerable: false
10742                },
10743                {
10744                    property: 'stack',
10745                    enumerable: false
10746                },
10747                {
10748                    property: 'code',
10749                    enumerable: true
10750                },
10751                {
10752                    property: 'cause',
10753                    enumerable: false
10754                },
10755                {
10756                    property: 'errors',
10757                    enumerable: false
10758                }
10759            ];
10760            const toJsonWasCalled = new WeakSet();
10761            const toJSON = (from)=>{
10762                toJsonWasCalled.add(from);
10763                const json = from.toJSON();
10764                toJsonWasCalled.delete(from);
10765                return json;
10766            };
10767            const newError = (name)=>{
10768                if ('NonError' === name) return new NonError();
10769                const factory = errorFactories.get(name);
10770                if (factory) return factory();
10771                const ErrorConstructor = errorConstructors.get(name) ?? Error;
10772                return ErrorConstructor === AggregateError ? new ErrorConstructor([]) : new ErrorConstructor();
10773            };
10774            const destroyCircular = ({ from, seen, to, forceEnumerable, maxDepth, depth, useToJSON, serialize })=>{
10775                if (!to) to = Array.isArray(from) ? [] : !serialize && isErrorLike(from) ? newError(from.name) : {};
10776                seen.add(from);
10777                if (depth >= maxDepth) {
10778                    seen.delete(from);
10779                    return to;
10780                }
10781                if (useToJSON && 'function' == typeof from.toJSON && !toJsonWasCalled.has(from)) {
10782                    seen.delete(from);
10783                    return toJSON(from);
10784                }
10785                const continueDestroyCircular = (value)=>destroyCircular({
10786                        from: value,
10787                        seen,
10788                        forceEnumerable,
10789                        maxDepth,
10790                        depth: depth + 1,
10791                        useToJSON,
10792                        serialize
10793                    });
10794                for (const key of Object.keys(from)){
10795                    const value = from[key];
10796                    if (value && value instanceof Uint8Array && 'Buffer' === value.constructor.name) {
10797                        to[key] = serialize ? '[object Buffer]' : value;
10798                        continue;
10799                    }
10800                    if (null !== value && 'object' == typeof value && 'function' == typeof value.pipe) {
10801                        to[key] = serialize ? '[object Stream]' : value;
10802                        continue;
10803                    }
10804                    if ('function' == typeof value) {
10805                        if (!serialize) to[key] = value;
10806                        continue;
10807                    }
10808                    if (serialize && 'bigint' == typeof value) {
10809                        to[key] = `${value}n`;
10810                        continue;
10811                    }
10812                    if (!value || 'object' != typeof value) {
10813                        try {
10814                            to[key] = value;
10815                        } catch  {}
10816                        continue;
10817                    }
10818                    if (!seen.has(value)) {
10819                        to[key] = continueDestroyCircular(value);
10820                        continue;
10821                    }
10822                    to[key] = '[Circular]';
10823                }
10824                if (serialize || to instanceof Error) for (const { property, enumerable } of errorProperties){
10825                    const value = from[property];
10826                    if (null == value) continue;
10827                    const descriptor = Object.getOwnPropertyDescriptor(to, property);
10828                    if (descriptor?.configurable === false) continue;
10829                    let processedValue = value;
10830                    if ('object' == typeof value) processedValue = seen.has(value) ? '[Circular]' : continueDestroyCircular(value);
10831                    Object.defineProperty(to, property, {
10832                        value: processedValue,
10833                        enumerable: forceEnumerable || enumerable,
10834                        configurable: true,
10835                        writable: true
10836                    });
10837                }
10838                seen.delete(from);
10839                return to;
10840            };
10841            function serializeError(value, options = {}) {
10842                const { maxDepth = 1 / 0, useToJSON = true } = options;
10843                if ('object' == typeof value && null !== value) return destroyCircular({
10844                    from: value,
10845                    seen: new Set(),
10846                    forceEnumerable: true,
10847                    maxDepth,
10848                    depth: 0,
10849                    useToJSON,
10850                    serialize: true
10851                });
10852                if ('function' == typeof value) value = '<Function>';
10853                return destroyCircular({
10854                    from: new NonError(value),
10855                    seen: new Set(),
10856                    forceEnumerable: true,
10857                    maxDepth,
10858                    depth: 0,
10859                    useToJSON,
10860                    serialize: true
10861                });
10862            }
10863            function deserializeError(value, options = {}) {
10864                const { maxDepth = 1 / 0 } = options;
10865                if (value instanceof Error) return value;
10866                if (isMinimumViableSerializedError(value)) return destroyCircular({
10867                    from: value,
10868                    seen: new Set(),
10869                    to: newError(value.name),
10870                    maxDepth,
10871                    depth: 0,
10872                    serialize: false
10873                });
10874                return new NonError(value);
10875            }
10876            function isErrorLike(value) {
10877                return Boolean(value) && 'object' == typeof value && 'string' == typeof value.name && 'string' == typeof value.message && 'string' == typeof value.stack;
10878            }
10879            function isMinimumViableSerializedError(value) {
10880                return Boolean(value) && 'object' == typeof value && 'string' == typeof value.message && !Array.isArray(value);
10881            }
10882            var client = __webpack_require__(5734);
10883            var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10884            var package_namespaceObject = {
10885                rE: "14.0.0"
10886            };
10887            function isAudioEnabled(options) {
10888                return Boolean(options.audio.enabled);
10889            }
10890            function setAudioEnabled(enabled, options) {
10891                options.audio.enabled = enabled;
10892                return options;
10893            }
10894            function isAutoPauseEnabled(options) {
10895                return options.enableAutoPause && options.enablePause;
10896            }
10897            var util = __webpack_require__(537);
10898            var util_default = /*#__PURE__*/ __webpack_require__.n(util);
10899            function inspect(element) {
10900                return util_default().inspect(element, {
10901                    colors: false,
10902                    compact: true,
10903                    depth: 4,
10904                    breakLength: 1 / 0
10905                }).replace(/\s+/gu, " ").replace(/\r?\n/gu, "");
10906            }
10907            function pretty(anything) {
10908                if (anything instanceof HTMLElement) {
10909                    if (anything.id) return `#${anything.id}`;
10910                    if (anything.className) return `.${anything.className}`;
10911                    return "(No HTML identifier available)";
10912                }
10913                return inspect(anything);
10914            }
10915            const util_pretty = pretty;
10916            var defined = __webpack_require__(8766);
10917            var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
10918            var LIBVERSION = '2.0.10', UA_MAX_LENGTH = 500, USER_AGENT = 'user-agent', EMPTY = '', UNKNOWN = '?', TYPEOF = {
10919                FUNCTION: 'function',
10920                OBJECT: 'object',
10921                STRING: 'string',
10922                UNDEFINED: 'undefined'
10923            }, BROWSER = 'browser', CPU = 'cpu', DEVICE = 'device', ENGINE = 'engine', OS = 'os', RESULT = 'result', NAME = 'name', TYPE = 'type', VENDOR = 'vendor', VERSION = 'version', ARCHITECTURE = 'architecture', MAJOR = 'major', MODEL = 'model', CONSOLE = 'console', MOBILE = 'mobile', TABLET = 'tablet', SMARTTV = 'smarttv', WEARABLE = 'wearable', XR = 'xr', EMBEDDED = 'embedded', FETCHER = 'fetcher', INAPP = 'inapp', BRANDS = 'brands', FORMFACTORS = 'formFactors', FULLVERLIST = 'fullVersionList', PLATFORM = 'platform', PLATFORMVER = 'platformVersion', BITNESS = 'bitness', CH = '
10923sec-ch-ua', CH_FULL_VER_LIST = CH + '-full-version-list', CH_ARCH = CH + '-arch', CH_BITNESS = CH + '-' + BITNESS, CH_FORM_FACTORS = CH + '-form-factors', CH_MOBILE = CH + '-' + MOBILE, CH_MODEL = CH + '-' + MODEL, CH_PLATFORM = CH + '-' + PLATFORM, CH_PLATFORM_VER = CH_PLATFORM + '-version', CH_ALL_VALUES = [
10924                BRANDS,
10925                FULLVERLIST,
10926                MOBILE,
10927                MODEL,
10928                PLATFORM,
10929                PLATFORMVER,
10930                ARCHITECTURE,
10931                FORMFACTORS,
10932                BITNESS
10933            ], AMAZON = 'Amazon', APPLE = 'Apple', ASUS = 'ASUS', BLACKBERRY = 'BlackBerry', GOOGLE = 'Google', HUAWEI = 'Huawei', LENOVO = 'Lenovo', HONOR = 'Honor', LG = 'LG', MICROSOFT = 'Microsoft', MOTOROLA = 'Motorola', NVIDIA = 'Nvidia', ONEPLUS = 'OnePlus', OPPO = 'OPPO', SAMSUNG = 'Samsung', SHARP = 'Sharp', SONY = 'Sony', XIAOMI = 'Xiaomi', ZEBRA = 'Zebra', CHROME = 'Chrome', CHROMIUM = 'Chromium', CHROMECAST = 'Chromecast', EDGE = 'Edge', FIREFOX = 'Firefox', OPERA = 'Opera', FACEBOOK = 'Facebook', SOGOU = 'Sogou', PREFIX_MOBILE = 'Mobile ', SUFFIX_BROWSER = ' Browser', WINDOWS = 'Windows';
10934            var isWindow = typeof window !== TYPEOF.UNDEFINED, NAVIGATOR = isWindow && window.navigator ? window.navigator : void 0, NAVIGATOR_UADATA = NAVIGATOR && NAVIGATOR.userAgentData ? NAVIGATOR.userAgentData : void 0;
10935            var extend = function(defaultRgx, extensions) {
10936                var mergedRgx = {};
10937                var extraRgx = extensions;
10938                if (!isExtensions(extensions)) {
10939                    extraRgx = {};
10940                    for(var i in extensions)for(var j in extensions[i])extraRgx[j] = extensions[i][j].concat(extraRgx[j] ? extraRgx[j] : []);
10941                }
10942                for(var k in defaultRgx)mergedRgx[k] = extraRgx[k] && extraRgx[k].length % 2 === 0 ? extraRgx[k].concat(defaultRgx[k]) : defaultRgx[k];
10943                return mergedRgx;
10944            }, enumerize = function(arr) {
10945                var enums = {};
10946                for(var i = 0; i < arr.length; i++)enums[arr[i].toUpperCase()] = arr[i];
10947                return enums;
10948            }, has = function(str1, str2) {
10949                if (typeof str1 === TYPEOF.OBJECT && str1.length > 0) {
10950                    for(var i in str1)if (lowerize(str2) == lowerize(str1[i])) return true;
10951                    return false;
10952                }
10953                return isString(str1) ? lowerize(str2) == lowerize(str1) : false;
10954            }, isExtensions = function(obj, deep) {
10955                for(var prop in obj)return /^(browser|cpu|device|engine|os)$/.test(prop) || (deep ? isExtensions(obj[prop]) : false);
10956            }, isString = function(val) {
10957                return typeof val === TYPEOF.STRING;
10958            }, itemListToArray = function(header) {
10959                if (!header) return;
10960                var arr = [];
10961                var tokens = normalizeHeaderValue(header).split(',');
10962                for(var i = 0; i < tokens.length; i++)if (tokens[i].indexOf(';') > -1) {
10963                    var token = ua_parser_trim(tokens[i]).split(';v=');
10964                    arr[i] = {
10965                        brand: token[0],
10966                        version: token[1]
10967                    };
10968                } else arr[i] = ua_parser_trim(tokens[i]);
10969                return arr;
10970            }, lowerize = function(str) {
10971                return isString(str) ? str.toLowerCase() : str;
10972            }, majorize = function(version) {
10973                return isString(version) ? strip(/[^\d\.]/g, version).split('.')[0] : void 0;
10974            }, normalizeHeaderValue = function(str) {
10975                return isString(str) ? ua_parser_trim(strip(/\\?\"/g, str), UA_MAX_LENGTH) : void 0;
10976            }, setProps = function(arr) {
10977                for(var i in arr)if (arr.hasOwnProperty(i)) {
10978                    var propName = arr[i];
10979                    if (typeof propName == TYPEOF.OBJECT && 2 == propName.length) this[propName[0]] = propName[1];
10980                    else this[propName] = void 0;
10981                }
10982                return this;
10983            }, strip = function(pattern, str) {
10984                return isString(str) ? str.replace(pattern, EMPTY) : str;
10985            }, ua_parser_trim = function(str, len) {
10986                str = strip(/^\s\s*/, String(str));
10987                return typeof len === TYPEOF.UNDEFINED ? str : str.substring(0, len);
10988            };
10989            var rgxMapper = function(ua, arrays) {
10990                if (!ua || !arrays) return;
10991                var i = 0, j, k, p, q, matches, match;
10992                while(i < arrays.length && !matches){
10993                    var regex = arrays[i], props = arrays[i + 1];
10994                    j = k = 0;
10995                    while(j < regex.length && !matches){
10996                        if (!regex[j]) break;
10997                        matches = regex[j++].exec(ua);
10998                        if (!!matches) for(p = 0; p < props.length; p++){
10999                            match = matches[++k];
11000                            q = props[p];
11001                            if (typeof q === TYPEOF.OBJECT && q.length > 0) {
11002                                if (2 === q.length) if (typeof q[1] == TYPEOF.FUNCTION) this[q[0]] = q[1].call(this, match);
11003                                else this[q[0]] = q[1];
11004                                else if (q.length >= 3) if (typeof q[1] !== TYPEOF.FUNCTION || q[1].exec && q[1].test) {
11005                                    if (3 == q.length) this[q[0]] = match ? match.replace(q[1], q[2]) : void 0;
11006                                    else if (4 == q.length) this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : void 0;
11007                                    else if (q.length > 4) this[q[0]] = match ? q[3].apply(this, [
11008                                        match.replace(q[1], q[2])
11009                                    ].concat(q.slice(4))) : void 0;
11010                                } else if (q.length > 3) this[q[0]] = match ? q[1].apply(this, q.slice(2)) : void 0;
11011                                else this[q[0]] = match ? q[1].call(this, match, q[2]) : void 0;
11012                            } else this[q] = match ? match : void 0;
11013                        }
11014                    }
11015                    i += 2;
11016                }
11017            }, strTest = function(str, map) {
11018                return map.test.test(str) ? map.ifTrue : map.ifFalse;
11019            }, strMapper = function(str, map) {
11020                for(var i in map)if (typeof map[i] === TYPEOF.OBJECT && map[i].length > 0) {
11021                    for(var j = 0; j < map[i].length; j++)if (has(map[i][j], str)) return i === UNKNOWN ? void 0 : i;
11022                } else if (has(map[i], str)) return i === UNKNOWN ? void 0 : i;
11023                return map.hasOwnProperty('*') ? map['*'] : str;
11024            };
11025            var windowsVersionMap = {
11026                ME: '4.90',
vendor: 16,700 bytes, lines 11027-11538
11027                'NT 3.51': '3.51',
11028                'NT 4.0': '4.0',
11029                2000: [
11030                    '5.0',
11031                    '5.01'
11032                ],
11033                XP: [
11034                    '5.1',
11035                    '5.2'
11036                ],
11037                Vista: '6.0',
11038                7: '6.1',
11039                8: '6.2',
11040                '8.1': '6.3',
11041                10: [
11042                    '6.4',
11043                    '10.0'
11044                ],
11045                NT: ''
11046            }, formFactorsMap = {
11047                embedded: 'Automotive',
11048                mobile: 'Mobile',
11049                tablet: [
11050                    'Tablet',
11051                    'EInk'
11052                ],
11053                smarttv: 'TV',
11054                wearable: 'Watch',
11055                xr: [
11056                    'VR',
11057                    'XR'
11058                ],
11059                '?': [
11060                    'Desktop',
11061                    'Unknown'
11062                ],
11063                '*': void 0
11064            }, browserHintsMap = {
11065                Chrome: 'Google Chrome',
11066                Edge: 'Microsoft Edge',
11067                'Edge WebView2': 'Microsoft Edge WebView2',
11068                'Chrome WebView': 'Android WebView',
11069                'Chrome Headless': 'HeadlessChrome',
11070                'Huawei Browser': 'HuaweiBrowser',
11071                'MIUI Browser': 'Miui Browser',
11072                'Opera Mobi': 'OperaMobile',
11073                Yandex: 'YaBrowser'
11074            };
11075            var defaultRegexes = {
11076                browser: [
11077                    [
11078                        /\b(?:crmo|crios)\/([\w\.]+)/i
11079                    ],
11080                    [
11081                        VERSION,
11082                        [
11083                            NAME,
11084                            PREFIX_MOBILE + 'Chrome'
11085                        ]
11086                    ],
11087                    [
11088                        /webview.+edge\/([\w\.]+)/i
11089                    ],
11090                    [
11091                        VERSION,
11092                        [
11093                            NAME,
11094                            EDGE + ' WebView'
11095                        ],
11096                        [
11097                            TYPE,
11098                            INAPP
11099                        ]
11100                    ],
11101                    [
11102                        /edg(?:e|ios|a)?\/([\w\.]+)/i
11103                    ],
11104                    [
11105                        VERSION,
11106                        [
11107                            NAME,
11108                            'Edge'
11109                        ]
11110                    ],
11111                    [
11112                        /(opera mini)\/([-\w\.]+)/i,
11113                        /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,
11114                        /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i
11115                    ],
11116                    [
11117                        NAME,
11118                        VERSION
11119                    ],
11120                    [
11121                        /opios[\/ ]+([\w\.]+)/i
11122                    ],
11123                    [
11124                        VERSION,
11125                        [
11126                            NAME,
11127                            OPERA + ' Mini'
11128                        ]
11129                    ],
11130                    [
11131                        /\bop(?:rg)?x\/([\w\.]+)/i
11132                    ],
11133                    [
11134                        VERSION,
11135                        [
11136                            NAME,
11137                            OPERA + ' GX'
11138                        ]
11139                    ],
11140                    [
11141                        /\bopr\/([\w\.]+)/i
11142                    ],
11143                    [
11144                        VERSION,
11145                        [
11146                            NAME,
11147                            OPERA
11148                        ]
11149                    ],
11150                    [
11151                        /\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
11152                    ],
11153                    [
11154                        VERSION,
11155                        [
11156                            NAME,
11157                            'Baidu'
11158                        ]
11159                    ],
11160                    [
11161                        /\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i
11162                    ],
11163                    [
11164                        VERSION,
11165                        [
11166                            NAME,
11167                            'Maxthon'
11168                        ]
11169                    ],
11170                    [
11171                        /(kindle)\/([\w\.]+)/i,
11172                        /(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,
11173                        /(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,
11174                        /(?:ms|\()(ie) ([\w\.]+)/i,
11175                        /(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:hi|lg |ovi|qute)browser|palemoon)\/v?([-\w\.]+)/i,
11176                        /(brave)(?: chrome)?\/([\d\.]+)/i,
11177                        /(aloha|heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,
11178                        /(qwant)(?:ios|mobile)\/([\d\.]+)/i,
11179                        /(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i
11180                    ],
11181                    [
11182                        NAME,
11183                        VERSION
11184                    ],
11185                    [
11186                        /quark(?:pc)?\/([-\w\.]+)/i
11187                    ],
11188                    [
11189                        VERSION,
11190                        [
11191                            NAME,
11192                            'Quark'
11193                        ]
11194                    ],
11195                    [
11196                        /\bddg\/([\w\.]+)/i
11197                    ],
11198                    [
11199                        VERSION,
11200                        [
11201                            NAME,
11202                            'DuckDuckGo'
11203                        ]
11204                    ],
11205                    [
11206                        /(?:\buc? ?browser|(?:juc.+)ucweb| ucpc)[\/ ]?([\w\.]+)/i
11207                    ],
11208                    [
11209                        VERSION,
11210                        [
11211                            NAME,
11212                            'UCBrowser'
11213                        ]
11214                    ],
11215                    [
11216                        /microm.+\bqbcore\/([\w\.]+)/i,
11217                        /\bqbcore\/([\w\.]+).+microm/i,
11218                        /micromessenger\/([\w\.]+)/i
11219                    ],
11220                    [
11221                        VERSION,
11222                        [
11223                            NAME,
11224                            'WeChat'
11225                        ]
11226                    ],
11227                    [
11228                        /konqueror\/([\w\.]+)/i
11229                    ],
11230                    [
11231                        VERSION,
11232                        [
11233                            NAME,
11234                            'Konqueror'
11235                        ]
11236                    ],
11237                    [
11238                        /trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i
11239                    ],
11240                    [
11241                        VERSION,
11242                        [
11243                            NAME,
11244                            'IE'
11245                        ]
11246                    ],
11247                    [
11248                        /ya(?:search)?browser\/([\w\.]+)/i
11249                    ],
11250                    [
11251                        VERSION,
11252                        [
11253                            NAME,
11254                            'Yandex'
11255                        ]
11256                    ],
11257                    [
11258                        /slbrowser\/([\w\.]+)/i
11259                    ],
11260                    [
11261                        VERSION,
11262                        [
11263                            NAME,
11264                            'Smart ' + LENOVO + SUFFIX_BROWSER
11265                        ]
11266                    ],
11267                    [
11268                        /(av(?:ast|g|ira))\/([\w\.]+)/i
11269                    ],
11270                    [
11271                        [
11272                            NAME,
11273                            /(.+)/,
11274                            '$1 Secure' + SUFFIX_BROWSER
11275                        ],
11276                        VERSION
11277                    ],
11278                    [
11279                        /norton\/([\w\.]+)/i
11280                    ],
11281                    [
11282                        VERSION,
11283                        [
11284                            NAME,
11285                            'Norton Private' + SUFFIX_BROWSER
11286                        ]
11287                    ],
11288                    [
11289                        /\bfocus\/([\w\.]+)/i
11290                    ],
11291                    [
11292                        VERSION,
11293                        [
11294                            NAME,
11295                            FIREFOX + ' Focus'
11296                        ]
11297                    ],
11298                    [
11299                        / mms\/([\w\.]+)$/i
11300                    ],
11301                    [
11302                        VERSION,
11303                        [
11304                            NAME,
11305                            OPERA + ' Neon'
11306                        ]
11307                    ],
11308                    [
11309                        / opt\/([\w\.]+)$/i
11310                    ],
11311                    [
11312                        VERSION,
11313                        [
11314                            NAME,
11315                            OPERA + ' Touch'
11316                        ]
11317                    ],
11318                    [
11319                        /coc_coc\w+\/([\w\.]+)/i
11320                    ],
11321                    [
11322                        VERSION,
11323                        [
11324                            NAME,
11325                            'Coc Coc'
11326                        ]
11327                    ],
11328                    [
11329                        /dolfin\/([\w\.]+)/i
11330                    ],
11331                    [
11332                        VERSION,
11333                        [
11334                            NAME,
11335                            'Dolphin'
11336                        ]
11337                    ],
11338                    [
11339                        /coast\/([\w\.]+)/i
11340                    ],
11341                    [
11342                        VERSION,
11343                        [
11344                            NAME,
11345                            OPERA + ' Coast'
11346                        ]
11347                    ],
11348                    [
11349                        /miuibrowser\/([\w\.]+)/i
11350                    ],
11351                    [
11352                        VERSION,
11353                        [
11354                            NAME,
11355                            'MIUI' + SUFFIX_BROWSER
11356                        ]
11357                    ],
11358                    [
11359                        /fxios\/([\w\.-]+)/i
11360                    ],
11361                    [
11362                        VERSION,
11363                        [
11364                            NAME,
11365                            PREFIX_MOBILE + FIREFOX
11366                        ]
11367                    ],
11368                    [
11369                        /\bqihoobrowser\/?([\w\.]*)/i
11370                    ],
11371                    [
11372                        VERSION,
11373                        [
11374                            NAME,
11375                            '360'
11376                        ]
11377                    ],
11378                    [
11379                        /\b(qq)\/([\w\.]+)/i
11380                    ],
11381                    [
11382                        [
11383                            NAME,
11384                            /(.+)/,
11385                            '$1Browser'
11386                        ],
11387                        VERSION
11388                    ],
11389                    [
11390                        /(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i
11391                    ],
11392                    [
11393                        [
11394                            NAME,
11395                            /(.+)/,
11396                            '$1' + SUFFIX_BROWSER
11397                        ],
11398                        VERSION
11399                    ],
11400                    [
11401                        / HBPC\/([\w\.]+)/
11402                    ],
11403                    [
11404                        VERSION,
11405                        [
11406                            NAME,
11407                            HUAWEI + SUFFIX_BROWSER
11408                        ]
11409                    ],
11410                    [
11411                        /samsungbrowser\/([\w\.]+)/i
11412                    ],
11413                    [
11414                        VERSION,
11415                        [
11416                            NAME,
11417                            SAMSUNG + ' Internet'
11418                        ]
11419                    ],
11420                    [
11421                        /metasr[\/ ]?([\d\.]+)/i
11422                    ],
11423                    [
11424                        VERSION,
11425                        [
11426                            NAME,
11427                            SOGOU + ' Explorer'
11428                        ]
11429                    ],
11430                    [
11431                        /(sogou)mo\w+\/([\d\.]+)/i
11432                    ],
11433                    [
11434                        [
11435                            NAME,
11436                            SOGOU + ' Mobile'
11437                        ],
11438                        VERSION
11439                    ],
11440                    [
11441                        /(electron)\/([\w\.]+) safari/i,
11442                        /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,
11443                        /m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i
11444                    ],
11445                    [
11446                        NAME,
11447                        VERSION
11448                    ],
11449                    [
11450                        /(lbbrowser|luakit|rekonq|steam(?= (clie|tenf|gameo)))/i
11451                    ],
11452                    [
11453                        NAME
11454                    ],
11455                    [
11456                        /ome\/([\w\.]+).+(iron(?= saf)|360(?=[es]e$))/i
11457                    ],
11458                    [
11459                        VERSION,
11460                        NAME
11461                    ],
11462                    [
11463                        /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
11464                    ],
11465                    [
11466                        [
11467                            NAME,
11468                            FACEBOOK
11469                        ],
11470                        VERSION,
11471                        [
11472                            TYPE,
11473                            INAPP
11474                        ]
11475                    ],
11476                    [
11477                        /(kakao(?:talk|story))[\/ ]([\w\.]+)/i,
11478                        /(naver)\(.*?(\d+\.[\w\.]+).*\)/i,
11479                        /(daum)apps[\/ ]([\w\.]+)/i,
11480                        /safari (line)\/([\w\.]+)/i,
11481                        /\b(line)\/([\w\.]+)\/iab/i,
11482                        /(alipay)client\/([\w\.]+)/i,
11483                        /(twitter)(?:and| f.+e\/([\w\.]+))/i,
11484                        /(bing)(?:web|sapphire)\/([\w\.]+)/i,
11485                        /(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i
11486                    ],
11487                    [
11488                        NAME,
11489                        VERSION,
11490                        [
11491                            TYPE,
11492                            INAPP
11493                        ]
11494                    ],
11495                    [
11496                        /\bgsa\/([\w\.]+) .*safari\//i
11497                    ],
11498                    [
11499                        VERSION,
11500                        [
11501                            NAME,
11502                            'GSA'
11503                        ],
11504                        [
11505                            TYPE,
11506                            INAPP
11507                        ]
11508                    ],
11509                    [
11510                        /(?:musical_ly|trill)(?:.+app_?version\/|_)([\w\.]+)/i
11511                    ],
11512                    [
11513                        VERSION,
11514                        [
11515                            NAME,
11516                            'TikTok'
11517                        ],
11518                        [
11519                            TYPE,
11520                            INAPP
11521                        ]
11522                    ],
11523                    [
11524                        /\[(linkedin)app\]/i
11525                    ],
11526                    [
11527                        NAME,
11528                        [
11529                            TYPE,
11530                            INAPP
11531                        ]
11532                    ],
11533                    [
11534                        /(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i
11535                    ],
11536                    [
11537                        [
11538                            NAME,
vendor: 11,070 bytes, lines 11539-11875
11539                            /(.+)/,
11540                            'Zalo'
11541                        ],
11542                        VERSION,
11543                        [
11544                            TYPE,
11545                            INAPP
11546                        ]
11547                    ],
11548                    [
11549                        /(chromium)[\/ ]([-\w\.]+)/i
11550                    ],
11551                    [
11552                        NAME,
11553                        VERSION
11554                    ],
11555                    [
11556                        /ome-(lighthouse)$/i
11557                    ],
11558                    [
11559                        NAME,
11560                        [
11561                            TYPE,
11562                            FETCHER
11563                        ]
11564                    ],
11565                    [
11566                        /headlesschrome(?:\/([\w\.]+)| )/i
11567                    ],
11568                    [
11569                        VERSION,
11570                        [
11571                            NAME,
11572                            CHROME + ' Headless'
11573                        ]
11574                    ],
11575                    [
11576                        /wv\).+chrome\/([\w\.]+).+edgw\//i
11577                    ],
11578                    [
11579                        VERSION,
11580                        [
11581                            NAME,
11582                            EDGE + ' WebView2'
11583                        ],
11584                        [
11585                            TYPE,
11586                            INAPP
11587                        ]
11588                    ],
11589                    [
11590                        /; wv\).+(chrome)\/([\w\.]+)/i
11591                    ],
11592                    [
11593                        [
11594                            NAME,
11595                            CHROME + ' WebView'
11596                        ],
11597                        VERSION,
11598                        [
11599                            TYPE,
11600                            INAPP
11601                        ]
11602                    ],
11603                    [
11604                        /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
11605                    ],
11606                    [
11607                        VERSION,
11608                        [
11609                            NAME,
11610                            'Android' + SUFFIX_BROWSER
11611                        ]
11612                    ],
11613                    [
11614                        /chrome\/([\w\.]+) mobile/i
11615                    ],
11616                    [
11617                        VERSION,
11618                        [
11619                            NAME,
11620                            PREFIX_MOBILE + 'Chrome'
11621                        ]
11622                    ],
11623                    [
11624                        /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i
11625                    ],
11626                    [
11627                        NAME,
11628                        VERSION
11629                    ],
11630                    [
11631                        /version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i
11632                    ],
11633                    [
11634                        VERSION,
11635                        [
11636                            NAME,
11637                            PREFIX_MOBILE + 'Safari'
11638                        ]
11639                    ],
11640                    [
11641                        /iphone .*mobile(?:\/\w+ | ?)safari/i
11642                    ],
11643                    [
11644                        [
11645                            NAME,
11646                            PREFIX_MOBILE + 'Safari'
11647                        ]
11648                    ],
11649                    [
11650                        /version\/([\w\.\,]+) .*(safari)/i
11651                    ],
11652                    [
11653                        VERSION,
11654                        NAME
11655                    ],
11656                    [
11657                        /webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i
11658                    ],
11659                    [
11660                        NAME,
11661                        [
11662                            VERSION,
11663                            '1'
11664                        ]
11665                    ],
11666                    [
11667                        /(webkit|khtml)\/([\w\.]+)/i
11668                    ],
11669                    [
11670                        NAME,
11671                        VERSION
11672                    ],
11673                    [
11674                        /(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i
11675                    ],
11676                    [
11677                        [
11678                            NAME,
11679                            PREFIX_MOBILE + FIREFOX
11680                        ],
11681                        VERSION
11682                    ],
11683                    [
11684                        /(navigator|netscape\d?)\/([-\w\.]+)/i
11685                    ],
11686                    [
11687                        [
11688                            NAME,
11689                            'Netscape'
11690                        ],
11691                        VERSION
11692                    ],
11693                    [
11694                        /(wolvic|librewolf)\/([\w\.]+)/i
11695                    ],
11696                    [
11697                        NAME,
11698                        VERSION
11699                    ],
11700                    [
11701                        /mobile vr; rv:([\w\.]+)\).+firefox/i
11702                    ],
11703                    [
11704                        VERSION,
11705                        [
11706                            NAME,
11707                            FIREFOX + ' Reality'
11708                        ]
11709                    ],
11710                    [
11711                        /ekiohf.+(flow)\/([\w\.]+)/i,
11712                        /(swiftfox)/i,
11713                        /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,
11714                        /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,
11715                        /(firefox)\/([\w\.]+)/i,
11716                        /(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,
11717                        /(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
11718                        /\b(links) \(([\w\.]+)/i
11719                    ],
11720                    [
11721                        NAME,
11722                        [
11723                            VERSION,
11724                            /_/g,
11725                            '.'
11726                        ]
11727                    ],
11728                    [
11729                        /(cobalt)\/([\w\.]+)/i
11730                    ],
11731                    [
11732                        NAME,
11733                        [
11734                            VERSION,
11735                            /[^\d\.]+./,
11736                            EMPTY
11737                        ]
11738                    ]
11739                ],
11740                cpu: [
11741                    [
11742                        /\b((amd|x|x86[-_]?|wow|win)64)\b/i
11743                    ],
11744                    [
11745                        [
11746                            ARCHITECTURE,
11747                            'amd64'
11748                        ]
11749                    ],
11750                    [
11751                        /(ia32(?=;))/i,
11752                        /\b((i[346]|x)86)(pc)?\b/i
11753                    ],
11754                    [
11755                        [
11756                            ARCHITECTURE,
11757                            'ia32'
11758                        ]
11759                    ],
11760                    [
11761                        /\b(aarch64|arm(v?[89]e?l?|_?64))\b/i
11762                    ],
11763                    [
11764                        [
11765                            ARCHITECTURE,
11766                            'arm64'
11767                        ]
11768                    ],
11769                    [
11770                        /\b(arm(v[67])?ht?n?[fl]p?)\b/i
11771                    ],
11772                    [
11773                        [
11774                            ARCHITECTURE,
11775                            'armhf'
11776                        ]
11777                    ],
11778                    [
11779                        /( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i
11780                    ],
11781                    [
11782                        [
11783                            ARCHITECTURE,
11784                            'arm'
11785                        ]
11786                    ],
11787                    [
11788                        / sun4\w[;\)]/i
11789                    ],
11790                    [
11791                        [
11792                            ARCHITECTURE,
11793                            'sparc'
11794                        ]
11795                    ],
11796                    [
11797                        /\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,
11798                        /((ppc|powerpc)(64)?)( mac|;|\))/i,
11799                        /(?:osf1|[freopnt]{3,4}bsd) (alpha)/i
11800                    ],
11801                    [
11802                        [
11803                            ARCHITECTURE,
11804                            /ower/,
11805                            EMPTY,
11806                            lowerize
11807                        ]
11808                    ],
11809                    [
11810                        /mc680.0/i
11811                    ],
11812                    [
11813                        [
11814                            ARCHITECTURE,
11815                            '68k'
11816                        ]
11817                    ],
11818                    [
11819                        /winnt.+\[axp/i
11820                    ],
11821                    [
11822                        [
11823                            ARCHITECTURE,
11824                            'alpha'
11825                        ]
11826                    ]
11827                ],
11828                device: [
11829                    [
11830                        /\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i
11831                    ],
11832                    [
11833                        MODEL,
11834                        [
11835                            VENDOR,
11836                            SAMSUNG
11837                        ],
11838                        [
11839                            TYPE,
11840                            TABLET
11841                        ]
11842                    ],
11843                    [
11844                        /\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
11845                        /samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,
11846                        /sec-(sgh\w+)/i
11847                    ],
11848                    [
11849                        MODEL,
11850                        [
11851                            VENDOR,
11852                            SAMSUNG
11853                        ],
11854                        [
11855                            TYPE,
11856                            MOBILE
11857                        ]
11858                    ],
11859                    [
11860                        /(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i
11861                    ],
11862                    [
11863                        MODEL,
11864                        [
11865                            VENDOR,
11866                            APPLE
11867                        ],
11868                        [
11869                            TYPE,
11870                            MOBILE
11871                        ]
11872                    ],
11873                    [
11874                        /\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,
11875                        /\b(ipad)[\d,]*[;
11875\] ].+(mac |i(pad)?)os/i
11876                    ],
11877                    [
11878                        MODEL,
11879                        [
11880                            VENDOR,
11881                            APPLE
11882                        ],
11883                        [
11884                            TYPE,
11885                            TABLET
11886                        ]
11887                    ],
11888                    [
11889                        /(macintosh);/i
11890                    ],
11891                    [
11892                        MODEL,
11893                        [
11894                            VENDOR,
11895                            APPLE
11896                        ]
11897                    ],
11898                    [
11899                        /\b(sh-?[altvz]?\d\d[a-ekm]?)/i
11900                    ],
11901                    [
11902                        MODEL,
11903                        [
11904                            VENDOR,
11905                            SHARP
11906                        ],
11907                        [
11908                            TYPE,
11909                            MOBILE
11910                        ]
11911                    ],
11912                    [
11913                        /\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i
11914                    ],
11915                    [
11916                        MODEL,
11917                        [
11918                            VENDOR,
11919                            HONOR
11920                        ],
11921                        [
11922                            TYPE,
11923                            TABLET
11924                        ]
11925                    ],
11926                    [
11927                        /honor([-\w ]+)[;\)]/i
11928                    ],
11929                    [
11930                        MODEL,
11931                        [
11932                            VENDOR,
11933                            HONOR
11934                        ],
11935                        [
11936                            TYPE,
11937                            MOBILE
11938                        ]
11939                    ],
11940                    [
11941                        /\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i
11942                    ],
11943                    [
11944                        MODEL,
11945                        [
11946                            VENDOR,
11947                            HUAWEI
11948                        ],
11949                        [
11950                            TYPE,
11951                            TABLET
11952                        ]
11953                    ],
11954                    [
11955                        /(?:huawei) ?([-\w ]+)[;\)]/i,
11956                        /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i
11957                    ],
11958                    [
11959                        MODEL,
11960                        [
11961                            VENDOR,
11962                            HUAWEI
11963                        ],
11964                        [
11965                            TYPE,
11966                            MOBILE
11967                        ]
11968                    ],
11969                    [
11970                        /oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,
11971                        /\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i
11972                    ],
11973                    [
11974                        [
11975                            MODEL,
11976                            /_/g,
11977                            ' '
11978                        ],
11979                        [
11980                            VENDOR,
11981                            XIAOMI
11982                        ],
11983                        [
11984                            TYPE,
11985                            TABLET
11986                        ]
11987                    ],
11988                    [
11989                        /\b; (\w+) build\/hm\1/i,
11990                        /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,
11991                        /oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,
11992                        /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,
11993                        /; ([\w ]+) miui\/v?\d/i
11994                    ],
11995                    [
11996                        [
11997                            MODEL,
11998                            /_/g,
11999                            ' '
12000                        ],
12001                        [
12002                            VENDOR,
12003                            XIAOMI
12004                        ],
12005                        [
12006                            TYPE,
12007                            MOBILE
12008                        ]
12009                    ],
12010                    [
12011                        /droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-l]\w[1m]10)\b/i,
12012                        /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
12013                    ],
12014                    [
12015                        MODEL,
12016                        [
12017                            VENDOR,
12018                            ONEPLUS
12019                        ],
12020                        [
12021                            TYPE,
12022                            MOBILE
12023                        ]
12024                    ],
12025                    [
12026                        /; (\w+) bui.+ oppo/i,
12027                        /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
12028                    ],
12029                    [
12030                        MODEL,
12031                        [
12032                            VENDOR,
12033                            OPPO
12034                        ],
12035                        [
12036                            TYPE,
12037                            MOBILE
12038                        ]
12039                    ],
12040                    [
12041                        /\b(opd2(\d{3}a?))(?: bui|\))/i
12042                    ],
12043                    [
12044                        MODEL,
12045                        [
12046                            VENDOR,
12047                            strMapper,
12048                            {
12049                                OnePlus: [
12050                                    '203',
12051                                    '304',
12052                                    '403',
12053                                    '404',
12054                                    '413',
12055                                    '415'
12056                                ],
12057                                '*': OPPO
12058                            }
12059                        ],
12060                        [
12061                            TYPE,
12062                            TABLET
12063                        ]
12064                    ],
12065                    [
12066                        /(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i
12067                    ],
12068                    [
12069                        MODEL,
12070                        [
12071                            VENDOR,
12072                            'BLU'
12073                        ],
12074                        [
12075                            TYPE,
12076                            MOBILE
12077                        ]
12078                    ],
12079                    [
12080                        /; vivo (\w+)(?: bui|\))/i,
12081                        /\b(v[12]\d{3}\w?[at])(?: bui|;)/i
12082                    ],
12083                    [
12084                        MODEL,
12085                        [
12086                            VENDOR,
12087                            'Vivo'
12088                        ],
12089                        [
12090                            TYPE,
12091                            MOBILE
12092                        ]
12093                    ],
12094                    [
12095                        /\b(rmx[1-3]\d{3})(?: bui|;|\))/i
12096                    ],
12097                    [
12098                        MODEL,
12099                        [
12100                            VENDOR,
12101                            'Realme'
12102                        ],
12103                        [
12104                            TYPE,
12105                            MOBILE
12106                        ]
12107                    ],
12108                    [
12109                        /(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}
12109(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,
12110                        /lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i
12111                    ],
12112                    [
12113                        MODEL,
12114                        [
12115                            VENDOR,
12116                            LENOVO
12117                        ],
12118                        [
12119                            TYPE,
12120                            TABLET
12121                        ]
12122                    ],
12123                    [
12124                        /lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i
12125                    ],
12126                    [
12127                        MODEL,
12128                        [
12129                            VENDOR,
12130                            LENOVO
12131                        ],
12132                        [
12133                            TYPE,
12134                            MOBILE
12135                        ]
12136                    ],
12137                    [
12138                        /\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
12139                        /\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,
12140                        /((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i
12141                    ],
12142                    [
12143                        MODEL,
12144                        [
12145                            VENDOR,
12146                            MOTOROLA
12147                        ],
12148                        [
12149                            TYPE,
12150                            MOBILE
12151                        ]
12152                    ],
12153                    [
12154                        /\b(mz60\d|xoom[2 ]{0,2}) build\//i
12155                    ],
12156                    [
12157                        MODEL,
12158                        [
12159                            VENDOR,
12160                            MOTOROLA
12161                        ],
12162                        [
12163                            TYPE,
12164                            TABLET
12165                        ]
12166                    ],
12167                    [
12168                        /\b(?:lg)?([vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
12169                    ],
12170                    [
12171                        MODEL,
12172                        [
12173                            VENDOR,
12174                            LG
12175                        ],
12176                        [
12177                            TYPE,
12178                            TABLET
12179                        ]
12180                    ],
12181                    [
12182                        /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
12183                        /\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,
12184                        /\blg-?([\d\w]+) bui/i
12185                    ],
12186                    [
12187                        MODEL,
12188                        [
12189                            VENDOR,
12190                            LG
12191                        ],
12192                        [
12193                            TYPE,
12194                            MOBILE
12195                        ]
12196                    ],
12197                    [
12198                        /(nokia) (t[12][01])/i
12199                    ],
12200                    [
12201                        VENDOR,
12202                        MODEL,
12203                        [
12204                            TYPE,
12205                            TABLET
12206                        ]
12207                    ],
12208                    [
12209                        /(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,
12210                        /nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i
12211                    ],
12212                    [
12213                        [
12214                            MODEL,
12215                            /_/g,
12216                            ' '
12217                        ],
12218                        [
12219                            TYPE,
12220                            MOBILE
12221                        ],
12222                        [
12223                            VENDOR,
12224                            'Nokia'
12225                        ]
12226                    ],
12227                    [
12228                        /(pixel (c|tablet))\b/i
12229                    ],
12230                    [
12231                        MODEL,
12232                        [
12233                            VENDOR,
12234                            GOOGLE
12235                        ],
12236                        [
12237                            TYPE,
12238                            TABLET
12239                        ]
12240                    ],
12241                    [
12242                        /droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i
12243                    ],
12244                    [
12245                        MODEL,
12246                        [
12247                            VENDOR,
12248                            GOOGLE
12249                        ],
12250                        [
12251                            TYPE,
12252                            MOBILE
12253                        ]
12254                    ],
12255                    [
12256                        /(google) (pixelbook( go)?)/i
12257                    ],
12258                    [
12259                        VENDOR,
12260                        MODEL
12261                    ],
12262                    [
12263                        /droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
12264                    ],
12265                    [
12266                        MODEL,
12267                        [
12268                            VENDOR,
12269                            SONY
12270                        ],
12271                        [
12272                            TYPE,
12273                            MOBILE
12274                        ]
12275                    ],
12276                    [
12277                        /sony tablet [ps]/i,
12278                        /\b(?:sony)?sgp\w+(?: bui|\))/i
12279                    ],
12280                    [
12281                        [
12282                            MODEL,
12283                            'Xperia Tablet'
12284                        ],
12285                        [
12286                            VENDOR,
12287                            SONY
12288                        ],
12289                        [
12290                            TYPE,
12291                            TABLET
12292                        ]
12293                    ],
12294                    [
12295                        /(alexa)webm/i,
12296                        /(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,
12297                        /(kf[a-z]+)( bui|\)).+silk\//i
12298                    ],
12299                    [
12300                        MODEL,
12301                        [
12302                            VENDOR,
12303                            AMAZON
12304                        ],
12305                        [
12306                            TYPE,
12307                            TABLET
12308                        ]
12309                    ],
12310                    [
12311                        /((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
12312                    ],
12313                    [
12314                        [
12315                            MODEL,
vendor: 8,009 bytes, lines 12316-12556
12316                            /(.+)/g,
12317                            'Fire Phone $1'
12318                        ],
12319                        [
12320                            VENDOR,
12321                            AMAZON
12322                        ],
12323                        [
12324                            TYPE,
12325                            MOBILE
12326                        ]
12327                    ],
12328                    [
12329                        /(playbook);[-\w\),; ]+(rim)/i
12330                    ],
12331                    [
12332                        MODEL,
12333                        VENDOR,
12334                        [
12335                            TYPE,
12336                            TABLET
12337                        ]
12338                    ],
12339                    [
12340                        /\b((?:bb[a-f]|st[hv])100-\d)/i,
12341                        /(?:blackberry|\(bb10;) (\w+)/i
12342                    ],
12343                    [
12344                        MODEL,
12345                        [
12346                            VENDOR,
12347                            BLACKBERRY
12348                        ],
12349                        [
12350                            TYPE,
12351                            MOBILE
12352                        ]
12353                    ],
12354                    [
12355                        /(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
12356                    ],
12357                    [
12358                        MODEL,
12359                        [
12360                            VENDOR,
12361                            ASUS
12362                        ],
12363                        [
12364                            TYPE,
12365                            TABLET
12366                        ]
12367                    ],
12368                    [
12369                        / (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
12370                    ],
12371                    [
12372                        MODEL,
12373                        [
12374                            VENDOR,
12375                            ASUS
12376                        ],
12377                        [
12378                            TYPE,
12379                            MOBILE
12380                        ]
12381                    ],
12382                    [
12383                        /(nexus 9)/i
12384                    ],
12385                    [
12386                        MODEL,
12387                        [
12388                            VENDOR,
12389                            'HTC'
12390                        ],
12391                        [
12392                            TYPE,
12393                            TABLET
12394                        ]
12395                    ],
12396                    [
12397                        /(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
12398                        /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,
12399                        /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i
12400                    ],
12401                    [
12402                        VENDOR,
12403                        [
12404                            MODEL,
12405                            /_/g,
12406                            ' '
12407                        ],
12408                        [
12409                            TYPE,
12410                            MOBILE
12411                        ]
12412                    ],
12413                    [
12414                        /tcl (xess p17aa)/i,
12415                        /droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i
12416                    ],
12417                    [
12418                        MODEL,
12419                        [
12420                            VENDOR,
12421                            'TCL'
12422                        ],
12423                        [
12424                            TYPE,
12425                            TABLET
12426                        ]
12427                    ],
12428                    [
12429                        /droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i
12430                    ],
12431                    [
12432                        MODEL,
12433                        [
12434                            VENDOR,
12435                            'TCL'
12436                        ],
12437                        [
12438                            TYPE,
12439                            MOBILE
12440                        ]
12441                    ],
12442                    [
12443                        /(itel) ((\w+))/i
12444                    ],
12445                    [
12446                        [
12447                            VENDOR,
12448                            lowerize
12449                        ],
12450                        MODEL,
12451                        [
12452                            TYPE,
12453                            strMapper,
12454                            {
12455                                tablet: [
12456                                    'p10001l',
12457                                    'w7001'
12458                                ],
12459                                '*': 'mobile'
12460                            }
12461                        ]
12462                    ],
12463                    [
12464                        /droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
12465                    ],
12466                    [
12467                        MODEL,
12468                        [
12469                            VENDOR,
12470                            'Acer'
12471                        ],
12472                        [
12473                            TYPE,
12474                            TABLET
12475                        ]
12476                    ],
12477                    [
12478                        /droid.+; (m[1-5] note) bui/i,
12479                        /\bmz-([-\w]{2,})/i
12480                    ],
12481                    [
12482                        MODEL,
12483                        [
12484                            VENDOR,
12485                            'Meizu'
12486                        ],
12487                        [
12488                            TYPE,
12489                            MOBILE
12490                        ]
12491                    ],
12492                    [
12493                        /; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
12494                    ],
12495                    [
12496                        MODEL,
12497                        [
12498                            VENDOR,
12499                            'Ulefone'
12500                        ],
12501                        [
12502                            TYPE,
12503                            MOBILE
12504                        ]
12505                    ],
12506                    [
12507                        /; (energy ?\w+)(?: bui|\))/i,
12508                        /; energizer ([\w ]+)(?: bui|\))/i
12509                    ],
12510                    [
12511                        MODEL,
12512                        [
12513                            VENDOR,
12514                            'Energizer'
12515                        ],
12516                        [
12517                            TYPE,
12518                            MOBILE
12519                        ]
12520                    ],
12521                    [
12522                        /; cat (b35);/i,
12523                        /; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i
12524                    ],
12525                    [
12526                        MODEL,
12527                        [
12528                            VENDOR,
12529                            'Cat'
12530                        ],
12531                        [
12532                            TYPE,
12533                            MOBILE
12534                        ]
12535                    ],
12536                    [
12537                        /((?:new )?andromax[\w- ]+)(?: bui|\))/i
12538                    ],
12539                    [
12540                        MODEL,
12541                        [
12542                            VENDOR,
12543                            'Smartfren'
12544                        ],
12545                        [
12546                            TYPE,
12547                            MOBILE
12548                        ]
12549                    ],
12550                    [
12551                        /droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i
12552                    ],
12553                    [
12554                        MODEL,
12555                        [
12556                            VENDOR,
vendor: 32,193 bytes, lines 12557-13571
12557                            'Nothing'
12558                        ],
12559                        [
12560                            TYPE,
12561                            MOBILE
12562                        ]
12563                    ],
12564                    [
12565                        /; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,
12566                        /archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i
12567                    ],
12568                    [
12569                        MODEL,
12570                        [
12571                            VENDOR,
12572                            'Archos'
12573                        ],
12574                        [
12575                            TYPE,
12576                            TABLET
12577                        ]
12578                    ],
12579                    [
12580                        /archos ([\w ]+)( b|\))/i,
12581                        /; (ac[3-6]\d\w{2,8})( b|\))/i
12582                    ],
12583                    [
12584                        MODEL,
12585                        [
12586                            VENDOR,
12587                            'Archos'
12588                        ],
12589                        [
12590                            TYPE,
12591                            MOBILE
12592                        ]
12593                    ],
12594                    [
12595                        /blackview ([-\w ]+)( b|\))/i,
12596                        /; (bv\d{4}[-\w ]*)( b|\))/i
12597                    ],
12598                    [
12599                        MODEL,
12600                        [
12601                            VENDOR,
12602                            'Blackview'
12603                        ],
12604                        [
12605                            TYPE,
12606                            MOBILE
12607                        ]
12608                    ],
12609                    [
12610                        /; (n159v)/i
12611                    ],
12612                    [
12613                        MODEL,
12614                        [
12615                            VENDOR,
12616                            'HMD'
12617                        ],
12618                        [
12619                            TYPE,
12620                            MOBILE
12621                        ]
12622                    ],
12623                    [
12624                        /((revvl[ \w\+]+|tm(?:rv|af)\w*[45]g(?:tb)?))( b|\))/i
12625                    ],
12626                    [
12627                        MODEL,
12628                        [
12629                            TYPE,
12630                            strTest,
12631                            {
12632                                test: /ta?b/i,
12633                                ifTrue: TABLET,
12634                                ifFalse: MOBILE
12635                            }
12636                        ],
12637                        [
12638                            VENDOR,
12639                            'T-Mobile'
12640                        ]
12641                    ],
12642                    [
12643                        /(imo) (tab \w+)/i,
12644                        /(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i
12645                    ],
12646                    [
12647                        VENDOR,
12648                        MODEL,
12649                        [
12650                            TYPE,
12651                            TABLET
12652                        ]
12653                    ],
12654                    [
12655                        /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,
12656                        /; (blu|coolpad|cubot|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([-\w\+ ]+?)(?: bui|\)|; r)/i,
12657                        /(hp) ([\w ]+\w)/i,
12658                        /(microsoft); (lumia[\w ]+)/i,
12659                        /(oppo) ?([\w ]+) bui/i,
12660                        /(hisense) ([ehv][\w ]+)\)/i,
12661                        /droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i
12662                    ],
12663                    [
12664                        VENDOR,
12665                        MODEL,
12666                        [
12667                            TYPE,
12668                            MOBILE
12669                        ]
12670                    ],
12671                    [
12672                        /(kobo)\s(ereader|touch)/i,
12673                        /(hp).+(touchpad(?!.+tablet)|tablet)/i,
12674                        /(kindle)\/([\w\.]+)/i
12675                    ],
12676                    [
12677                        VENDOR,
12678                        MODEL,
12679                        [
12680                            TYPE,
12681                            TABLET
12682                        ]
12683                    ],
12684                    [
12685                        /(surface duo)/i
12686                    ],
12687                    [
12688                        MODEL,
12689                        [
12690                            VENDOR,
12691                            MICROSOFT
12692                        ],
12693                        [
12694                            TYPE,
12695                            TABLET
12696                        ]
12697                    ],
12698                    [
12699                        /droid [\d\.]+; (fp\du?)(?: b|\))/i
12700                    ],
12701                    [
12702                        MODEL,
12703                        [
12704                            VENDOR,
12705                            'Fairphone'
12706                        ],
12707                        [
12708                            TYPE,
12709                            MOBILE
12710                        ]
12711                    ],
12712                    [
12713                        /((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i
12714                    ],
12715                    [
12716                        MODEL,
12717                        [
12718                            VENDOR,
12719                            NVIDIA
12720                        ],
12721                        [
12722                            TYPE,
12723                            TABLET
12724                        ]
12725                    ],
12726                    [
12727                        /(sprint) (\w+)/i
12728                    ],
12729                    [
12730                        VENDOR,
12731                        MODEL,
12732                        [
12733                            TYPE,
12734                            MOBILE
12735                        ]
12736                    ],
12737                    [
12738                        /(kin\.[onetw]{3})/i
12739                    ],
12740                    [
12741                        [
12742                            MODEL,
12743                            /\./g,
12744                            ' '
12745                        ],
12746                        [
12747                            VENDOR,
12748                            MICROSOFT
12749                        ],
12750                        [
12751                            TYPE,
12752                            MOBILE
12753                        ]
12754                    ],
12755                    [
12756                        /droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
12757                    ],
12758                    [
12759                        MODEL,
12760                        [
12761                            VENDOR,
12762                            ZEBRA
12763                        ],
12764                        [
12765                            TYPE,
12766                            TABLET
12767                        ]
12768                    ],
12769                    [
12770                        /droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
12771                    ],
12772                    [
12773                        MODEL,
12774                        [
12775                            VENDOR,
12776                            ZEBRA
12777                        ],
12778                        [
12779                            TYPE,
12780                            MOBILE
12781                        ]
12782                    ],
12783                    [
12784                        /(philips)[\w ]+tv/i,
12785                        /smart-tv.+(samsung)/i
12786                    ],
12787                    [
12788                        VENDOR,
12789                        [
12790                            TYPE,
12791                            SMARTTV
12792                        ]
12793                    ],
12794                    [
12795                        /hbbtv.+maple;(\d+)/i
12796                    ],
12797                    [
12798                        [
12799                            MODEL,
12800                            /^/,
12801                            'SmartTV'
12802                        ],
12803                        [
12804                            VENDOR,
12805                            SAMSUNG
12806                        ],
12807                        [
12808                            TYPE,
12809                            SMARTTV
12810                        ]
12811                    ],
12812                    [
12813                        /(vizio)(?: |.+model\/)(\w+-\w+)/i,
12814                        /tcast.+(lg)e?. ([-\w]+)/i
12815                    ],
12816                    [
12817                        VENDOR,
12818                        MODEL,
12819                        [
12820                            TYPE,
12821                            SMARTTV
12822                        ]
12823                    ],
12824                    [
12825                        /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
12826                    ],
12827                    [
12828                        [
12829                            VENDOR,
12830                            LG
12831                        ],
12832                        [
12833                            TYPE,
12834                            SMARTTV
12835                        ]
12836                    ],
12837                    [
12838                        /(apple) ?tv/i
12839                    ],
12840                    [
12841                        VENDOR,
12842                        [
12843                            MODEL,
12844                            APPLE + ' TV'
12845                        ],
12846                        [
12847                            TYPE,
12848                            SMARTTV
12849                        ]
12850                    ],
12851                    [
12852                        /crkey.*devicetype\/chromecast/i
12853                    ],
12854                    [
12855                        [
12856                            MODEL,
12857                            CHROMECAST + ' Third Generation'
12858                        ],
12859                        [
12860                            VENDOR,
12861                            GOOGLE
12862                        ],
12863                        [
12864                            TYPE,
12865                            SMARTTV
12866                        ]
12867                    ],
12868                    [
12869                        /crkey.*devicetype\/([^/]*)/i
12870                    ],
12871                    [
12872                        [
12873                            MODEL,
12874                            /^/,
12875                            'Chromecast '
12876                        ],
12877                        [
12878                            VENDOR,
12879                            GOOGLE
12880                        ],
12881                        [
12882                            TYPE,
12883                            SMARTTV
12884                        ]
12885                    ],
12886                    [
12887                        /fuchsia.*crkey/i
12888                    ],
12889                    [
12890                        [
12891                            MODEL,
12892                            CHROMECAST + ' Nest Hub'
12893                        ],
12894                        [
12895                            VENDOR,
12896                            GOOGLE
12897                        ],
12898                        [
12899                            TYPE,
12900                            SMARTTV
12901                        ]
12902                    ],
12903                    [
12904                        /crkey/i
12905                    ],
12906                    [
12907                        [
12908                            MODEL,
12909                            CHROMECAST
12910                        ],
12911                        [
12912                            VENDOR,
12913                            GOOGLE
12914                        ],
12915                        [
12916                            TYPE,
12917                            SMARTTV
12918                        ]
12919                    ],
12920                    [
12921                        /(portaltv)/i
12922                    ],
12923                    [
12924                        MODEL,
12925                        [
12926                            VENDOR,
12927                            FACEBOOK
12928                        ],
12929                        [
12930                            TYPE,
12931                            SMARTTV
12932                        ]
12933                    ],
12934                    [
12935                        /droid.+aft(\w+)( bui|\))/i
12936                    ],
12937                    [
12938                        MODEL,
12939                        [
12940                            VENDOR,
12941                            AMAZON
12942                        ],
12943                        [
12944                            TYPE,
12945                            SMARTTV
12946                        ]
12947                    ],
12948                    [
12949                        /(shield \w+ tv)/i
12950                    ],
12951                    [
12952                        MODEL,
12953                        [
12954                            VENDOR,
12955                            NVIDIA
12956                        ],
12957                        [
12958                            TYPE,
12959                            SMARTTV
12960                        ]
12961                    ],
12962                    [
12963                        /\(dtv[\);].+(aquos)/i,
12964                        /(aquos-tv[\w ]+)\)/i
12965                    ],
12966                    [
12967                        MODEL,
12968                        [
12969                            VENDOR,
12970                            SHARP
12971                        ],
12972                        [
12973                            TYPE,
12974                            SMARTTV
12975                        ]
12976                    ],
12977                    [
12978                        /(bravia[\w ]+)( bui|\))/i
12979                    ],
12980                    [
12981                        MODEL,
12982                        [
12983                            VENDOR,
12984                            SONY
12985                        ],
12986                        [
12987                            TYPE,
12988                            SMARTTV
12989                        ]
12990                    ],
12991                    [
12992                        /(mi(tv|box)-?\w+) bui/i
12993                    ],
12994                    [
12995                        MODEL,
12996                        [
12997                            VENDOR,
12998                            XIAOMI
12999                        ],
13000                        [
13001                            TYPE,
13002                            SMARTTV
13003                        ]
13004                    ],
13005                    [
13006                        /Hbbtv.*(technisat) (.*);/i
13007                    ],
13008                    [
13009                        VENDOR,
13010                        MODEL,
13011                        [
13012                            TYPE,
13013                            SMARTTV
13014                        ]
13015                    ],
13016                    [
13017                        /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
13018                        /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
13019                    ],
13020                    [
13021                        [
13022                            VENDOR,
13023                            /.+\/(\w+)/,
13024                            '$1',
13025                            strMapper,
13026                            {
13027                                LG: 'lge'
13028                            }
13029                        ],
13030                        [
13031                            MODEL,
13032                            ua_parser_trim
13033                        ],
13034                        [
13035                            TYPE,
13036                            SMARTTV
13037                        ]
13038                    ],
13039                    [
13040                        /(playstation \w+)/i
13041                    ],
13042                    [
13043                        MODEL,
13044                        [
13045                            VENDOR,
13046                            SONY
13047                        ],
13048                        [
13049                            TYPE,
13050                            CONSOLE
13051                        ]
13052                    ],
13053                    [
13054                        /\b(xbox(?: one)?(?!; xbox))[\); ]/i
13055                    ],
13056                    [
13057                        MODEL,
13058                        [
13059                            VENDOR,
13060                            MICROSOFT
13061                        ],
13062                        [
13063                            TYPE,
13064                            CONSOLE
13065                        ]
13066                    ],
13067                    [
13068                        /(ouya)/i,
13069                        /(nintendo) (\w+)/i,
13070                        /(retroid) (pocket ([^\)]+))/i,
13071                        /(valve).+(steam deck)/i,
13072                        /droid.+; ((shield|rgcube|gr0006))( bui|\))/i
13073                    ],
13074                    [
13075                        [
13076                            VENDOR,
13077                            strMapper,
13078                            {
13079                                Nvidia: 'Shield',
13080                                Anbernic: 'RGCUBE',
13081                                Logitech: 'GR0006'
13082                            }
13083                        ],
13084                        MODEL,
13085                        [
13086                            TYPE,
13087                            CONSOLE
13088                        ]
13089                    ],
13090                    [
13091                        /\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i
13092                    ],
13093                    [
13094                        MODEL,
13095                        [
13096                            VENDOR,
13097                            SAMSUNG
13098                        ],
13099                        [
13100                            TYPE,
13101                            WEARABLE
13102                        ]
13103                    ],
13104                    [
13105                        /((pebble))app/i,
13106                        /(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i
13107                    ],
13108                    [
13109                        VENDOR,
13110                        MODEL,
13111                        [
13112                            TYPE,
13113                            WEARABLE
13114                        ]
13115                    ],
13116                    [
13117                        /(ow(?:19|20)?we?[1-3]{1,3})/i
13118                    ],
13119                    [
13120                        MODEL,
13121                        [
13122                            VENDOR,
13123                            OPPO
13124                        ],
13125                        [
13126                            TYPE,
13127                            WEARABLE
13128                        ]
13129                    ],
13130                    [
13131                        /(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
13132                    ],
13133                    [
13134                        MODEL,
13135                        [
13136                            VENDOR,
13137                            APPLE
13138                        ],
13139                        [
13140                            TYPE,
13141                            WEARABLE
13142                        ]
13143                    ],
13144                    [
13145                        /(opwwe\d{3})/i
13146                    ],
13147                    [
13148                        MODEL,
13149                        [
13150                            VENDOR,
13151                            ONEPLUS
13152                        ],
13153                        [
13154                            TYPE,
13155                            WEARABLE
13156                        ]
13157                    ],
13158                    [
13159                        /(moto 360)/i
13160                    ],
13161                    [
13162                        MODEL,
13163                        [
13164                            VENDOR,
13165                            MOTOROLA
13166                        ],
13167                        [
13168                            TYPE,
13169                            WEARABLE
13170                        ]
13171                    ],
13172                    [
13173                        /(smartwatch 3)/i
13174                    ],
13175                    [
13176                        MODEL,
13177                        [
13178                            VENDOR,
13179                            SONY
13180                        ],
13181                        [
13182                            TYPE,
13183                            WEARABLE
13184                        ]
13185                    ],
13186                    [
13187                        /(g watch r)/i
13188                    ],
13189                    [
13190                        MODEL,
13191                        [
13192                            VENDOR,
13193                            LG
13194                        ],
13195                        [
13196                            TYPE,
13197                            WEARABLE
13198                        ]
13199                    ],
13200                    [
13201                        /droid.+; (wt63?0{2,3})\)/i
13202                    ],
13203                    [
13204                        MODEL,
13205                        [
13206                            VENDOR,
13207                            ZEBRA
13208                        ],
13209                        [
13210                            TYPE,
13211                            WEARABLE
13212                        ]
13213                    ],
13214                    [
13215                        /droid.+; (glass) \d/i
13216                    ],
13217                    [
13218                        MODEL,
13219                        [
13220                            VENDOR,
13221                            GOOGLE
13222                        ],
13223                        [
13224                            TYPE,
13225                            XR
13226                        ]
13227                    ],
13228                    [
13229                        /(pico) ([\w ]+) os\d/i
13230                    ],
13231                    [
13232                        VENDOR,
13233                        MODEL,
13234                        [
13235                            TYPE,
13236                            XR
13237                        ]
13238                    ],
13239                    [
13240                        /(quest( \d| pro)?s?).+vr/i
13241                    ],
13242                    [
13243                        MODEL,
13244                        [
13245                            VENDOR,
13246                            FACEBOOK
13247                        ],
13248                        [
13249                            TYPE,
13250                            XR
13251                        ]
13252                    ],
13253                    [
13254                        /mobile vr; rv.+firefox/i
13255                    ],
13256                    [
13257                        [
13258                            TYPE,
13259                            XR
13260                        ]
13261                    ],
13262                    [
13263                        /(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
13264                    ],
13265                    [
13266                        VENDOR,
13267                        [
13268                            TYPE,
13269                            EMBEDDED
13270                        ]
13271                    ],
13272                    [
13273                        /(aeobc)\b/i
13274                    ],
13275                    [
13276                        MODEL,
13277                        [
13278                            VENDOR,
13279                            AMAZON
13280                        ],
13281                        [
13282                            TYPE,
13283                            EMBEDDED
13284                        ]
13285                    ],
13286                    [
13287                        /(homepod).+mac os/i
13288                    ],
13289                    [
13290                        MODEL,
13291                        [
13292                            VENDOR,
13293                            APPLE
13294                        ],
13295                        [
13296                            TYPE,
13297                            EMBEDDED
13298                        ]
13299                    ],
13300                    [
13301                        /windows iot/i
13302                    ],
13303                    [
13304                        [
13305                            TYPE,
13306                            EMBEDDED
13307                        ]
13308                    ],
13309                    [
13310                        /droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i
13311                    ],
13312                    [
13313                        MODEL,
13314                        [
13315                            TYPE,
13316                            SMARTTV
13317                        ]
13318                    ],
13319                    [
13320                        /\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i
13321                    ],
13322                    [
13323                        [
13324                            TYPE,
13325                            SMARTTV
13326                        ]
13327                    ],
13328                    [
13329                        /droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i
13330                    ],
13331                    [
13332                        MODEL,
13333                        [
13334                            TYPE,
13335                            strMapper,
13336                            {
13337                                mobile: 'Mobile',
13338                                xr: 'VR',
13339                                '*': TABLET
13340                            }
13341                        ]
13342                    ],
13343                    [
13344                        /\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i
13345                    ],
13346                    [
13347                        [
13348                            TYPE,
13349                            TABLET
13350                        ]
13351                    ],
13352                    [
13353                        /(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i
13354                    ],
13355                    [
13356                        [
13357                            TYPE,
13358                            MOBILE
13359                        ]
13360                    ],
13361                    [
13362                        /droid .+?; ([\w\. -]+)( bui|\))/i
13363                    ],
13364                    [
13365                        MODEL,
13366                        [
13367                            VENDOR,
13368                            'Generic'
13369                        ]
13370                    ]
13371                ],
13372                engine: [
13373                    [
13374                        /windows.+ edge\/([\w\.]+)/i
13375                    ],
13376                    [
13377                        VERSION,
13378                        [
13379                            NAME,
13380                            EDGE + 'HTML'
13381                        ]
13382                    ],
13383                    [
13384                        /(arkweb)\/([\w\.]+)/i
13385                    ],
13386                    [
13387                        NAME,
13388                        VERSION
13389                    ],
13390                    [
13391                        /webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i
13392                    ],
13393                    [
13394                        VERSION,
13395                        [
13396                            NAME,
13397                            'Blink'
13398                        ]
13399                    ],
13400                    [
13401                        /(presto)\/([\w\.]+)/i,
13402                        /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,
13403                        /ekioh(flow)\/([\w\.]+)/i,
13404                        /(khtml|tasman|links|dillo)[\/ ]\(?([\w\.]+)/i,
13405                        /(icab)[\/ ]([23]\.[\d\.]+)/i,
13406                        /\b(libweb)/i
13407                    ],
13408                    [
13409                        NAME,
13410                        VERSION
13411                    ],
13412                    [
13413                        /ladybird\//i
13414                    ],
13415                    [
13416                        [
13417                            NAME,
13418                            'LibWeb'
13419                        ]
13420                    ],
13421                    [
13422                        /rv\:([\w\.]{1,9})\b.+(gecko)/i
13423                    ],
13424                    [
13425                        VERSION,
13426                        NAME
13427                    ]
13428                ],
13429                os: [
13430                    [
13431                        /(windows nt) (6\.[23]); arm/i
13432                    ],
13433                    [
13434                        [
13435                            NAME,
13436                            /N/,
13437                            'R'
13438                        ],
13439                        [
13440                            VERSION,
13441                            strMapper,
13442                            windowsVersionMap
13443                        ]
13444                    ],
13445                    [
13446                        /(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,
13447                        /(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i
13448                    ],
13449                    [
13450                        NAME,
13451                        VERSION
13452                    ],
13453                    [
13454                        /windows nt ?([\d\.\)]*)(?!.+xbox)/i,
13455                        /\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i
13456                    ],
13457                    [
13458                        [
13459                            VERSION,
13460                            /(;|\))/g,
13461                            '',
13462                            strMapper,
13463                            windowsVersionMap
13464                        ],
13465                        [
13466                            NAME,
13467                            WINDOWS
13468                        ]
13469                    ],
13470                    [
13471                        /(windows ce)\/?([\d\.]*)/i
13472                    ],
13473                    [
13474                        NAME,
13475                        VERSION
13476                    ],
13477                    [
13478                        /[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,
13479                        /(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,
13480                        /\btvos ?([\w\.]+)/i,
13481                        /cfnetwork\/.+darwin/i
13482                    ],
13483                    [
13484                        [
13485                            VERSION,
13486                            /_/g,
13487                            '.'
13488                        ],
13489                        [
13490                            NAME,
13491                            'iOS'
13492                        ]
13493                    ],
13494                    [
13495                        /(mac os x) ?([\w\. ]*)/i,
13496                        /(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i
13497                    ],
13498                    [
13499                        [
13500                            NAME,
13501                            'macOS'
13502                        ],
13503                        [
13504                            VERSION,
13505                            /_/g,
13506                            '.'
13507                        ]
13508                    ],
13509                    [
13510                        /android ([\d\.]+).*crkey/i
13511                    ],
13512                    [
13513                        VERSION,
13514                        [
13515                            NAME,
13516                            CHROMECAST + ' Android'
13517                        ]
13518                    ],
13519                    [
13520                        /fuchsia.*crkey\/([\d\.]+)/i
13521                    ],
13522                    [
13523                        VERSION,
13524                        [
13525                            NAME,
13526                            CHROMECAST + ' Fuchsia'
13527                        ]
13528                    ],
13529                    [
13530                        /crkey\/([\d\.]+).*devicetype\/smartspeaker/i
13531                    ],
13532                    [
13533                        VERSION,
13534                        [
13535                            NAME,
13536                            CHROMECAST + ' SmartSpeaker'
13537                        ]
13538                    ],
13539                    [
13540                        /linux.*crkey\/([\d\.]+)/i
13541                    ],
13542                    [
13543                        VERSION,
13544                        [
13545                            NAME,
13546                            CHROMECAST + ' Linux'
13547                        ]
13548                    ],
13549                    [
13550                        /crkey\/([\d\.]+)/i
13551                    ],
13552                    [
13553                        VERSION,
13554                        [
13555                            NAME,
13556                            CHROMECAST
13557                        ]
13558                    ],
13559                    [
13560                        /droid ([\w\.]+)\b.+(android[- ]x86)/i
13561                    ],
13562                    [
13563                        VERSION,
13564                        NAME
13565                    ],
13566                    [
13567                        /(ubuntu) ([\w\.]+) like android/i
13568                    ],
13569                    [
13570                        [
13571                            NAME,
vendor: 4,932 bytes, lines 13572-13696
13572                            /(.+)/,
13573                            '$1 Touch'
13574                        ],
13575                        VERSION
13576                    ],
13577                    [
13578                        /(harmonyos)[\/ ]?([\d\.]*)/i,
13579                        /(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i
13580                    ],
13581                    [
13582                        NAME,
13583                        VERSION
13584                    ],
13585                    [
13586                        /\(bb(10);/i
13587                    ],
13588                    [
13589                        VERSION,
13590                        [
13591                            NAME,
13592                            BLACKBERRY
13593                        ]
13594                    ],
13595                    [
13596                        /(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i
13597                    ],
13598                    [
13599                        VERSION,
13600                        [
13601                            NAME,
13602                            'Symbian'
13603                        ]
13604                    ],
13605                    [
13606                        /mozilla\/[\d\.]+ \((?:mobile[;\w ]*|tablet|tv|[^\)]*(?:viera|lg(?:l25|-d300)|alcatel ?o.+|y300-f1)); rv:([\w\.]+)\).+gecko\//i
13607                    ],
13608                    [
13609                        VERSION,
13610                        [
13611                            NAME,
13612                            FIREFOX + ' OS'
13613                        ]
13614                    ],
13615                    [
13616                        /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,
13617                        /webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i
13618                    ],
13619                    [
13620                        VERSION,
13621                        [
13622                            NAME,
13623                            'webOS'
13624                        ]
13625                    ],
13626                    [
13627                        /web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i
13628                    ],
13629                    [
13630                        [
13631                            VERSION,
13632                            strMapper,
13633                            {
13634                                25: '120',
13635                                24: '108',
13636                                23: '94',
13637                                22: '87',
13638                                6: '79',
13639                                5: '68',
13640                                4: '53',
13641                                3: '38',
13642                                2: '538',
13643                                1: '537',
13644                                '*': 'TV'
13645                            }
13646                        ],
13647                        [
13648                            NAME,
13649                            'webOS'
13650                        ]
13651                    ],
13652                    [
13653                        /watch(?: ?os[,\/ ]|\d,\d\/)([\d\.]+)/i
13654                    ],
13655                    [
13656                        VERSION,
13657                        [
13658                            NAME,
13659                            'watchOS'
13660                        ]
13661                    ],
13662                    [
13663                        /cros [\w]+(?:\)| ([\w\.]+)\b)/i
13664                    ],
13665                    [
13666                        VERSION,
13667                        [
13668                            NAME,
13669                            'Chrome OS'
13670                        ]
13671                    ],
13672                    [
13673                        /kepler ([\w\.]+); (aft|aeo)/i
13674                    ],
13675                    [
13676                        VERSION,
13677                        [
13678                            NAME,
13679                            'Vega OS'
13680                        ]
13681                    ],
13682                    [
13683                        /(netrange)mmh/i,
13684                        /(nettv)\/(\d+\.[\w\.]+)/i,
13685                        /(nintendo|playstation) (\w+)/i,
13686                        /(xbox); +xbox ([^\);]+)/i,
13687                        /(pico) .+os([\w\.]+)/i,
13688                        /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,
13689                        /linux.+(mint)[\/\(\) ]?([\w\.]*)/i,
13690                        /(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,
13691                        /([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
13692                        /((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
13693                        /\b(aix)[; ]([1-9\.]{0,4})/i,
13694                        /(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,
13695                        /(gnu) ?([\w\.]*)/i,
13696                        /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,
vendor: 4,645 bytes, lines 13697-13846
13697                        /(haiku) ?(r\d)?/i
13698                    ],
13699                    [
13700                        NAME,
13701                        VERSION
13702                    ],
13703                    [
13704                        /(sunos) ?([\d\.]*)/i
13705                    ],
13706                    [
13707                        [
13708                            NAME,
13709                            'Solaris'
13710                        ],
13711                        VERSION
13712                    ],
13713                    [
13714                        /\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,
13715                        /(unix) ?([\w\.]*)/i
13716                    ],
13717                    [
13718                        NAME,
13719                        VERSION
13720                    ]
13721                ]
13722            };
13723            var defaultProps = function() {
13724                var props = {
13725                    init: {},
13726                    isIgnore: {},
13727                    isIgnoreRgx: {},
13728                    toString: {}
13729                };
13730                setProps.call(props.init, [
13731                    [
13732                        BROWSER,
13733                        [
13734                            NAME,
13735                            VERSION,
13736                            MAJOR,
13737                            TYPE
13738                        ]
13739                    ],
13740                    [
13741                        CPU,
13742                        [
13743                            ARCHITECTURE
13744                        ]
13745                    ],
13746                    [
13747                        DEVICE,
13748                        [
13749                            TYPE,
13750                            MODEL,
13751                            VENDOR
13752                        ]
13753                    ],
13754                    [
13755                        ENGINE,
13756                        [
13757                            NAME,
13758                            VERSION
13759                        ]
13760                    ],
13761                    [
13762                        OS,
13763                        [
13764                            NAME,
13765                            VERSION
13766                        ]
13767                    ]
13768                ]);
13769                setProps.call(props.isIgnore, [
13770                    [
13771                        BROWSER,
13772                        [
13773                            VERSION,
13774                            MAJOR
13775                        ]
13776                    ],
13777                    [
13778                        ENGINE,
13779                        [
13780                            VERSION
13781                        ]
13782                    ],
13783                    [
13784                        OS,
13785                        [
13786                            VERSION
13787                        ]
13788                    ]
13789                ]);
13790                setProps.call(props.isIgnoreRgx, [
13791                    [
13792                        BROWSER,
13793                        / ?browser$/i
13794                    ],
13795                    [
13796                        OS,
13797                        / ?os$/i
13798                    ]
13799                ]);
13800                setProps.call(props.toString, [
13801                    [
13802                        BROWSER,
13803                        [
13804                            NAME,
13805                            VERSION
13806                        ]
13807                    ],
13808                    [
13809                        CPU,
13810                        [
13811                            ARCHITECTURE
13812                        ]
13813                    ],
13814                    [
13815                        DEVICE,
13816                        [
13817                            VENDOR,
13818                            MODEL
13819                        ]
13820                    ],
13821                    [
13822                        ENGINE,
13823                        [
13824                            NAME,
13825                            VERSION
13826                        ]
13827                    ],
13828                    [
13829                        OS,
13830                        [
13831                            NAME,
13832                            VERSION
13833                        ]
13834                    ]
13835                ]);
13836                return props;
13837            }();
13838            var createIData = function(item, itemType) {
13839                var init_props = defaultProps.init[itemType], is_ignoreProps = defaultProps.isIgnore[itemType] || 0, is_ignoreRgx = defaultProps.isIgnoreRgx[itemType] || 0, toString_props = defaultProps.toString[itemType] || 0;
13840                function IData() {
13841                    setProps.call(this, init_props);
13842                }
13843                IData.prototype.getItem = function() {
13844                    return item;
13845                };
13846                IData.prototype.withClientHints = function() {
13847                    if (!NAVIGATOR_UADATA) return item.parseCH().get();
13848                    return NAVIGATOR_UADATA.getHighEntropyValues(CH_ALL_VALUES).then(function(res) {
13849                        return item.setCH(new UACHData(res, false)).parseCH().get();
13850                    });
13851                };
13852                IData.prototype.withFeatureCheck = function() {
13853                    return item.detectFeature().get();
13854                };
13855                if (itemType != RESULT) {
13856                    IData.prototype.is = function(strToCheck) {
13857                        var is = false;
13858                        for(var i in this)if (this.hasOwnProperty(i) && !has(is_ignoreProps, i) && lowerize(is_ignoreRgx ? strip(is_ignoreRgx, this[i]) : this[i]) == lowerize(is_ignoreRgx ? strip(is_ignoreRgx, strToCheck) : strToCheck)) {
13859                            is = true;
13860                            if (strToCheck != TYPEOF.UNDEFINED) break;
13861                        } else if (strToCheck == TYPEOF.UNDEFINED && is) {
13862                            is = !is;
13863                            break;
13864                        }
13865                        return is;
13866                    };
13867                    IData.prototype.toString = function() {
13868                        var str = EMPTY;
13869                        for(var i in toString_props)if (typeof this[toString_props[i]] !== TYPEOF.UNDEFINED) str += (str ? ' ' : EMPTY) + this[toString_props[i]];
13870                        return str || TYPEOF.UNDEFINED;
13871                    };
13872                }
13873                IData.prototype.then = function(cb) {
13874                    var that = this;
13875                    var IDataResolve = function() {
13876                        for(var prop in that)if (that.hasOwnProperty(prop)) this[prop] = that[prop];
13877                    };
13878                    IDataResolve.prototype = {
13879                        is: IData.prototype.is,
13880                        toString: IData.prototype.toString,
13881                        withClientHints: IData.prototype.withClientHints,
13882                        withFeatureCheck: IData.prototype.withFeatureCheck
13883                    };
13884                    var resolveData = new IDataResolve();
13885                    cb(resolveData);
13886                    return resolveData;
13887                };
13888                return new IData();
13889            };
13890            function UACHData(uach, isHttpUACH) {
13891                uach = uach || {};
13892                setProps.call(this, CH_ALL_VALUES);
13893                if (isHttpUACH) setProps.call(this, [
13894                    [
13895                        BRANDS,
13896                        itemListToArray(uach[CH])
13897                    ],
13898                    [
13899                        FULLVERLIST,
13900                        itemListToArray(uach[CH_FULL_VER_LIST])
13901                    ],
13902                    [
13903                        MOBILE,
13904                        /\?1/.test(uach[CH_MOBILE])
13905                    ],
13906                    [
13907                        MODEL,
13908                        normalizeHeaderValue(uach[CH_MODEL])
13909                    ],
13910                    [
13911                        PLATFORM,
13912                        normalizeHeaderValue(uach[CH_PLATFORM])
13913                    ],
13914                    [
13915                        PLATFORMVER,
13916                        normalizeHeaderValue(uach[CH_PLATFORM_VER])
13917                    ],
13918                    [
13919                        ARCHITECTURE,
13920                        normalizeHeaderValue(uach[CH_ARCH])
13921                    ],
13922                    [
13923                        FORMFACTORS,
13924                        itemListToArray(uach[CH_FORM_FACTORS])
13925                    ],
13926                    [
13927                        BITNESS,
13928                        normalizeHeaderValue(uach[CH_BITNESS])
13929                    ]
13930                ]);
13931                else for(var prop in uach)if (this.hasOwnProperty(prop) && typeof uach[prop] !== TYPEOF.UNDEFINED) this[prop] = uach[prop];
13932            }
13933            function UAItem(itemType, ua, rgxMap, uaCH) {
13934                setProps.call(this, [
13935                    [
13936                        'itemType',
13937                        itemType
13938                    ],
13939                    [
13940                        'ua',
13941                        ua
13942                    ],
13943                    [
13944                        'uaCH',
13945                        uaCH
13946                    ],
13947                    [
13948                        'rgxMap',
13949                        rgxMap
13950                    ],
13951                    [
13952                        'data',
13953                        createIData(this, itemType)
13954                    ]
13955                ]);
13956                return this;
13957            }
13958            UAItem.prototype.get = function(prop) {
13959                if (!prop) return this.data;
13960                return this.data.hasOwnProperty(prop) ? this.data[prop] : void 0;
13961            };
13962            UAItem.prototype.set = function(prop, val) {
13963                this.data[prop] = val;
13964                return this;
13965            };
13966            UAItem.prototype.setCH = function(ch) {
13967                this.uaCH = ch;
13968                return this;
13969            };
13970            UAItem.prototype.detectFeature = function() {
13971                if (NAVIGATOR && NAVIGATOR.userAgent == this.ua) switch(this.itemType){
13972                    case BROWSER:
13973                        if (NAVIGATOR.brave && typeof NAVIGATOR.brave.isBrave == TYPEOF.FUNCTION) this.set(NAME, 'Brave');
13974                        break;
13975                    case DEVICE:
13976                        if (!this.get(TYPE) && NAVIGATOR_UADATA && NAVIGATOR_UADATA[MOBILE]) this.set(TYPE, MOBILE);
13977                        if ('Macintosh' == this.get(MODEL) && NAVIGATOR && typeof NAVIGATOR.standalone !== TYPEOF.UNDEFINED && NAVIGATOR.maxTouchPoints && NAVIGATOR.maxTouchPoints > 2) this.set(MODEL, 'iPad').set(TYPE, TABLET);
13978                        break;
13979                    case OS:
13980                        if (!this.get(NAME) && NAVIGATOR_UADATA && NAVIGATOR_UADATA[PLATFORM]) this.set(NAME, NAVIGATOR_UADATA[PLATFORM]);
13981                        break;
13982                    case RESULT:
13983                        var data = this.data;
13984                        var detect = function(itemType) {
13985                            return data[itemType].getItem().detectFeature
13985().get();
13986                        };
13987                        this.set(BROWSER, detect(BROWSER)).set(CPU, detect(CPU)).set(DEVICE, detect(DEVICE)).set(ENGINE, detect(ENGINE)).set(OS, detect(OS));
13988                }
13989                return this;
13990            };
13991            UAItem.prototype.parseUA = function() {
13992                if (this.itemType != RESULT) rgxMapper.call(this.data, this.ua, this.rgxMap);
13993                switch(this.itemType){
13994                    case BROWSER:
13995                        this.set(MAJOR, majorize(this.get(VERSION)));
13996                        break;
13997                    case OS:
13998                        if ('iOS' == this.get(NAME) && this.get(VERSION)) {
13999                            if (/^1[89][^\d]/.exec(this.get(VERSION))) {
14000                                var realVersion = /\) Version\/((\d+)[\d\.]*)/.exec(this.ua);
14001                                if (realVersion && parseInt(realVersion[2], 10) >= 26) this.set(VERSION, realVersion[1]);
14002                            }
14003                        }
14004                        break;
14005                }
14006                return this;
14007            };
14008            UAItem.prototype.parseCH = function() {
14009                var uaCH = this.uaCH, rgxMap = this.rgxMap;
14010                switch(this.itemType){
14011                    case BROWSER:
14012                    case ENGINE:
14013                        var brands = uaCH[FULLVERLIST] || uaCH[BRANDS], prevName;
14014                        if (brands) for(var i = 0; i < brands.length; i++){
14015                            var brandName = brands[i].brand || brands[i], brandVersion = brands[i].version;
14016                            if (this.itemType == BROWSER && !/not.a.brand/i.test(brandName) && (!prevName || /Chrom/.test(prevName) && brandName != CHROMIUM || prevName == EDGE && /WebView2/.test(brandName))) {
14017                                brandName = strMapper(brandName, browserHintsMap);
14018                                prevName = this.get(NAME);
14019                                if (!(prevName && !/Chrom/.test(prevName) && /Chrom/.test(brandName))) this.set(NAME, brandName).set(VERSION, brandVersion).set(MAJOR, majorize(brandVersion));
14020                                prevName = brandName;
14021                            }
14022                            if (this.itemType == ENGINE && brandName == CHROMIUM) this.set(VERSION, brandVersion);
14023                        }
14024                        break;
14025                    case CPU:
14026                        var archName = uaCH[ARCHITECTURE];
14027                        if (archName) {
14028                            if (archName && '64' == uaCH[BITNESS]) archName += '64';
14029                            rgxMapper.call(this.data, archName + ';', rgxMap);
14030                        }
14031                        break;
14032                    case DEVICE:
14033                        if (uaCH[MOBILE]) this.set(TYPE, MOBILE);
14034                        if (uaCH[MODEL]) {
14035                            this.set(MODEL, uaCH[MODEL]);
14036                            if (!this.get(TYPE) || !this.get(VENDOR)) {
14037                                var reParse = {};
14038                                rgxMapper.call(reParse, 'droid 9; ' + uaCH[MODEL] + ')', rgxMap);
14039                                if (!this.get(TYPE) && !!reParse.type) this.set(TYPE, reParse.type);
14040                                if (!this.get(VENDOR) && !!reParse.vendor) this.set(VENDOR, reParse.vendor);
14041                            }
14042                        }
14043                        if (uaCH[FORMFACTORS]) {
14044                            var ff;
14045                            if ('string' != typeof uaCH[FORMFACTORS]) {
14046                                var idx = 0;
14047                                while(!ff && idx < uaCH[FORMFACTORS].length)ff = strMapper(uaCH[FORMFACTORS][idx++], formFactorsMap);
14048                            } else ff = strMapper(uaCH[FORMFACTORS], formFactorsMap);
14049                            this.set(TYPE, ff);
14050                        }
14051                        break;
14052                    case OS:
14053                        var osName = uaCH[PLATFORM];
14054                        if (osName) {
14055                            var osVersion = uaCH[PLATFORMVER];
14056                            if (osName == WINDOWS) osVersion = parseInt(majorize(osVersion), 10) >= 13 ? '11' : '10';
14057                            this.set(NAME, osName).set(VERSION, osVersion);
14058                        }
14059                        if (this.get(NAME) == WINDOWS && 'Xbox' == uaCH[MODEL]) this.set(NAME, 'Xbox').set(VERSION, void 0);
14060                        break;
14061                    case RESULT:
14062                        var data = this.data;
14063                        var parse = function(itemType) {
14064                            return data[itemType].getItem().setCH(uaCH).parseCH().get();
14065                        };
14066                        this.set(BROWSER, parse(BROWSER)).set(CPU, parse(CPU)).set(DEVICE, parse(DEVICE)).set(ENGINE, parse(ENGINE)).set(OS, parse(OS));
14067                }
14068                return this;
14069            };
14070            function UAParser(ua, extensions, headers) {
14071                if (typeof ua === TYPEOF.OBJECT) {
14072                    if (isExtensions(ua, true)) {
14073                        if (typeof extensions === TYPEOF.OBJECT) headers = extensions;
14074                        extensions = ua;
14075                    } else {
14076                        headers = ua;
14077                        extensions = void 0;
14078                    }
14079                    ua = void 0;
14080                } else if (typeof ua === TYPEOF.STRING && !isExtensions(extensions, true)) {
14081                    headers = extensions;
14082                    extensions = void 0;
14083                }
14084                if (headers) if (typeof headers.append === TYPEOF.FUNCTION) {
14085                    var kv = {};
14086                    headers.forEach(function(v, k) {
14087                        kv[String(k).toLowerCase()] = v;
14088                    });
14089                    headers = kv;
14090                } else {
14091                    var normalized = {};
14092                    for(var header in headers)if (headers.hasOwnProperty(header)) normalized[String(header).toLowerCase()] = headers[header];
14093                    headers = normalized;
14094                }
14095                if (!(this instanceof UAParser)) return new UAParser(ua, extensions, headers).getResult();
14096                var userAgent = typeof ua === TYPEOF.STRING ? ua : headers && headers[USER_AGENT] ? headers[USER_AGENT] : NAVIGATOR && NAVIGATOR.userAgent ? NAVIGATOR.userAgent : EMPTY, httpUACH = new UACHData(headers, true), regexMap = defaultRegexes, createItemFunc = function(itemType) {
14097                    if (itemType == RESULT) return function() {
14098                        return new UAItem(itemType, userAgent, regexMap, httpUACH).set('ua', userAgent).set(BROWSER, this.getBrowser()).set(CPU, this.getCPU()).set(DEVICE, this.getDevice()).set(ENGINE, this.getEngine()).set(OS, this.getOS()).get();
14099                    };
14100                    return function() {
14101                        return new UAItem(itemType, userAgent, regexMap[itemType], httpUACH).parseUA().get();
14102                    };
14103                };
14104                setProps.call(this, [
14105                    [
14106                        'getBrowser',
14107                        createItemFunc(BROWSER)
14108                    ],
14109                    [
14110                        'getCPU',
14111                        createItemFunc(CPU)
14112                    ],
14113                    [
14114                        'getDevice',
14115                        createItemFunc(DEVICE)
14116                    ],
14117                    [
14118                        'getEngine',
14119                        createItemFunc(ENGINE)
14120                    ],
14121                    [
14122                        'getOS',
14123                        createItemFunc(OS)
14124                    ],
14125                    [
14126                        'getResult',
14127                        createItemFunc(RESULT)
14128                    ],
14129                    [
14130                        'getUA',
14131                        function() {
14132                            return userAgent;
14133                        }
14134                    ],
14135                    [
14136                        'setUA',
14137                        function(ua) {
14138                            if (isString(ua)) userAgent = ua_parser_trim(ua, UA_MAX_LENGTH);
14139                            return this;
14140                        }
14141                    ],
14142                    [
14143                        'useExtension',
14144                        function(exts) {
14145                            if (exts) regexMap = extend(regexMap, exts);
14146                            return this;
14147                        }
14148                    ]
14149                ]).setUA(userAgent).useExtension(extensions);
14150                return this;
14151            }
14152            UAParser.VERSION = LIBVERSION;
14153            UAParser.BROWSER = enumerize([
14154                NAME,
14155                VERSION,
14156                MAJOR,
14157                TYPE
14158            ]);
14159            UAParser.CPU = enumerize([
14160                ARCHITECTURE
14161            ]);
14162            UAParser.DEVICE = enumerize([
14163                MODEL,
14164                VENDOR,
14165                TYPE,
14166                CONSOLE,
14167                MOBILE,
14168                SMARTTV,
14169                TABLET,
14170                WEARABLE,
14171                EMBEDDED
14172            ]);
14173            UAParser.ENGINE = UAParser.OS = enumerize([
14174                NAME,
14175                VERSION
14176            ]);
14177            function canPlayType_canPlayType(video, type) {
14178                const canPlayType = video.canPlayType(`video/${type}`);
14179                if ("" === canPlayType) return false;
14180                return canPlayType;
14181            }
14182            const media_canPlayType = canPlayType_canPlayType;
14183            const FALLBACK_VIDEO_TYPE = VideoType.MP4;
14184            class Browser {
14185                options;
14186                result;
14187                videoType;
14188                constructor(options){
14189                    this.options = options;
14190                    const ua = defined_default()(options.fakeUaString, window.navigator.userAgent, "");
14191                    const userAgentParser = new UAParser(ua);
14192                    this.result = userAgentParser.getResult();
14193                }
14194                isIOS() {
14195                    return "iOS" === this.result.os.name;
14196                }
14197                getBrowserVersion() {
14198                    return this.result.browser.version;
14199                }
14200                isChrome() {
14201                    return "Chrome" === this.result.browser.name;
14202                }
14203                isChromium() {
14204                    return "Chromium" === this.result.browser.name;
14205                }
14206                isFirefox() {
14207                    return "Firefox" === this.result.browser.name;
14208                }
14209                isSafari() {
14210                    if (!this.result.browser.name) return false;
14211                    return this.result.browser.name.includes("Safari");
14212                }
14213                isAndroid() {
14214                    if (!this.result.os.name) return false;
14215                    return this.result.os.name.includes("Android");
14216                }
14217                isChromeBased() {
14218                    return this.isChrome() || this.isChromium();
14219                }
14220                isMobile() {
14221                    return this.isIOS() || this.isAndroid();
14222                }
14223                isOkSafari() {
14224                    const version = this.getBrowserVersion();
14225                    if (!version) return false;
14226                    return this.isSafari() && Number.parseFloat(version) >= 11;
14227                }
14228                getVideoType(video) {
14229                    if (!this.videoType) {
14230                        if (media_canPlayType(video, VideoType.MP4)) this.videoType = VideoType.MP4;
14231                        else if (media_canPlayType(video, VideoType.WebM)) this.videoType = VideoType.WebM;
14232                    }
14233                    if (this.videoType !== VideoType.WebM && this.videoType !== VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
14234                    if ("" === this.videoType.trim()) this.videoType = FALLBACK_VIDEO_TYPE;
14235                    return this.videoType;
14236                }
14237                getNoAccessIssue() {
14238                    const message = "Unable to access webcam";
14239                    let explanation;
14240                    explanation = this.isChromeBased() ? "Click on the allow button to grant access to your webcam" : this.isFirefox() ? "Please grant Firefox access to your webcam" : "Your system does not let your browser access your webcam";
14241                    return error_createError({
14242                        message,
14243                        explanation,
14244                        options: this.options
14245                    });
14246                }
14247                getUsefulData() {
14248                    const data = {
14249                        ua: this.result.ua,
14250                        browser: this.result.browser,
14251                        cpu: this.result.cpu,
14252                        device: this.result.device,
14253                        engine: this.result.engine,
14254                        os: this.result.os
14255                    };
14256                    return data;
14257                }
14258            }
14259            const util_Browser = Browser;
14260            let getBrowser_browser;
14261            function getBrowser(localOptions) {
14262                if (!getBrowser_browser) getBrowser_browser = new util_Browser(localOptions);
14263                return getBrowser_browser;
14264            }
14265            const util_getBrowser = getBrowser;
14266            class HTTPVideomailError extends Error {
14267                name = "VideomailError";
14268                code;
14269                status;
14270                explanation;
14271            }
14272            const error_HTTPVideomailError = HTTPVideomailError;
14273            class VideomailError extends error_HTTPVideomailError {
14274                title = "Error from videomail-client npm package";
14275                location = window.location.href;
14276                logLines;
14277                whitelistKey;
14278                cookie;
14279                err;
14280                promise;
14281                reason;
14282                browser;
14283                cpu;
14284                device;
14285                engine;
14286                os;
14287                screen;
14288                orientation;
14289                classList;
14290                static PERMISSION_DENIED = "PERMISSION_DENIED";
14291                static NOT_ALLOWED_ERROR = "NotAllowedError";
14292                static DOM_EXCEPTION = "DOMException";
14293                static STARTING_FAILED = "Starting video failed";
14294                static MEDIA_DEVICE_NOT_SUPPORTED = "MediaDeviceNotSupported";
14295                static BROWSER_PROBLEM = "browser-problem";
14296                static WEBCAM_PROBLEM = "webcam-problem";
14297                static OVERCONSTRAINED = "OverconstrainedError";
14298                static NOT_READABLE_ERROR = "NotReadableError";
14299                static SECURITY_ERROR = "SecurityError";
14300                static TRACK_START_ERROR = "TrackStartError";
14301                static INVALID_STATE_ERROR = "InvalidStateError";
14302                constructor(message, options, classList, errData){
14303                    super(message, errData);
14304                    this.explanation = errData?.explanation;
14305                    this.logLines = errData?.logLines;
14306                    this.whitelistKey = options.whitelistKey;
14307                    this.classList = classList;
14308                    const browser = util_getBrowser(options);
14309                    const usefulClientData = browser.getUsefulData();
14310                    this.browser = usefulClientData.browser;
14311                    if (usefulClientData.cpu.architecture) this.cpu = usefulClientData.cpu;
14312                    this.device = usefulClientData.device.type ? usefulClientData.device : void 0;
14313                    this.engine = usefulClientData.engine;
14314                    this.os = usefulClientData.os;
14315                    let cookie;
14316                    if (__webpack_require__.g.document.cookie.length > 0) cookie = __webpack_require__.g.document.cookie.split(",").map((c)=>c.trim());
14317                    this.cookie = cookie && cookie.length > 0 ? cookie : void 0;
14318                    this.screen = [
14319                        screen.width,
14320                        screen.height,
14321                        screen.colorDepth
14322                    ].join("×");
14323                    if (screen.orientation) this.orientation = screen.orientation.type;
14324                    this.err = errData?.err;
14325                    const stackTarget = errData?.cause ?? errData?.err;
14326                    if (stackTarget) {
14327                        if ("captureStackTrace" in Error) Error.captureStackTrace(stackTarget, VideomailError);
14328                    }
14329                }
14330                hasClass(name) {
14331                    return this.classList?.includes(name);
14332                }
14333                isBrowserProblem() {
14334                    return this.hasClass(VideomailError.BROWSER_PROBLEM);
14335                }
14336                getClassList() {
14337                    return this.classList;
14338                }
14339            }
14340            const error_VideomailError = VideomailError;
14341            function createError(errorParams) {
14342                const { exc, options } = errorParams;
14343                let err = errorParams.err;
14344                if (!err && exc instanceof Error) err = exc;
14345                if (err instanceof error_VideomailError) return err;
14346                let message = errorParams.message;
14347                let explanation = errorParams.explanation;
14348                const classList = errorParams.classList ?? [];
14349                const audioEnabled = isAudioEnabled(options);
14350                const errName = err?.name ?? err?.constructor.name;
14351                switch(errName){
14352                    case error_VideomailError.SECURITY_ERROR:
14353                        message = "The operation was insecure";
14354                        explanation = "Probably you have disallowed Cookies for this page?";
14355                        classList.push(error_VideomailError.BROW
14355SER_PROBLEM);
14356                        break;
14357                    case error_VideomailError.OVERCONSTRAINED:
14358                        message = "Invalid webcam constraints";
14359                        if (err && "constraint" in err) {
14360                            const overconstrainedError = err;
14361                            const constraint = overconstrainedError.constraint;
14362                            if ("width" === constraint) explanation = "Your webcam does not meet the width requirement.";
14363                            else if (constraint) explanation = `Unmet constraint: ${constraint}`;
14364                            else if (err.message) explanation = err.message;
14365                        } else if (err?.message) explanation = err.message;
14366                        break;
14367                    case "MediaDeviceFailedDueToShutdown":
14368                        message = "Webcam is shutting down";
14369                        explanation = "This happens your webcam is already switching off and not giving you permission to use it.";
14370                        break;
14371                    case "SourceUnavailableError":
14372                        message = "Source of your webcam cannot be accessed";
14373                        explanation = "Probably it is locked from another process or has a hardware error.";
14374                        break;
14375                    case "NO_DEVICES_FOUND":
14376                        if (audioEnabled) {
14377                            message = "No webcam nor microphone found";
14378                            explanation = "Your browser cannot find a webcam with microphone attached to your machine.";
14379                        } else {
14380                            message = "No webcam found";
14381                            explanation = "Your browser cannot find a webcam attached to your machine.";
14382                        }
14383                        classList.push(error_VideomailError.WEBCAM_PROBLEM);
14384                        break;
14385                    case "PermissionDismissedError":
14386                        message = "Ooops, you didn't give me any permissions?";
14387                        explanation = "Looks like you skipped the webcam permission dialogue.<br/>Please grant access next time the dialogue appears.";
14388                        classList.push(error_VideomailError.WEBCAM_PROBLEM);
14389                        break;
14390                    case error_VideomailError.NOT_ALLOWED_ERROR:
14391                    case error_VideomailError.PERMISSION_DENIED:
14392                    case "PermissionDeniedError":
14393                        message = "Permission denied";
14394                        explanation = "Cannot access your webcam. This can have two reasons:<br/>a) you blocked access to webcam; or<br/>b) your webcam is already in use.";
14395                        classList.push(error_VideomailError.WEBCAM_PROBLEM);
14396                        break;
14397                    case "HARDWARE_UNAVAILABLE":
14398                    case "AbortError":
14399                        message = "Webcam is unavailable";
14400                        explanation = "Maybe it is already busy in another window?";
14401                        classList.push(error_VideomailError.WEBCAM_PROBLEM);
14402                        break;
14403                    case "NO_VIDEO_FEED":
14404                        message = "No video feed found!";
14405                        explanation = "Your webcam is already used in another browser.";
14406                        classList.push(error_VideomailError.WEBCAM_PROBLEM);
14407                        break;
14408                    case error_VideomailError.STARTING_FAILED:
14409                        message = "Starting video failed";
14410                        explanation = "Most likely this happens when the webcam is already active in another browser";
14411                        classList.push(error_VideomailError.WEBCAM_PROBLEM);
14412                        break;
14413                    case "DevicesNotFoundError":
14414                        message = "No available webcam could be found";
14415                        explanation = "Looks like you do not have any webcam attached to your machine; or the one you plugged in is already used.";
14416                        classList.push(error_VideomailError.WEBCAM_PROBLEM);
14417                        break;
14418                    case error_VideomailError.NOT_READABLE_ERROR:
14419                    case error_VideomailError.TRACK_START_ERROR:
14420                        message = "No access to webcam";
14421                        explanation = "Perhaps you are already using it in another browser?";
14422                        classList.push(error_VideomailError.WEBCAM_PROBLEM);
14423                        break;
14424                    case error_VideomailError.INVALID_STATE_ERROR:
14425                        message = "Invalid state";
14426                        explanation = "Video recording stream from your webcam already has finished";
14427                        classList.push(error_VideomailError.WEBCAM_PROBLEM);
14428                        break;
14429                    case error_VideomailError.DOM_EXCEPTION:
14430                        message = "DOM Exception";
14431                        if (err) explanation = util_pretty(err);
14432                        break;
14433                    case error_VideomailError.MEDIA_DEVICE_NOT_SUPPORTED:
14434                        message = "Media device not supported";
14435                        if (err) explanation = util_pretty(err);
14436                        break;
14437                    default:
14438                        {
14439                            const originalExplanation = explanation;
14440                            if (explanation && "object" == typeof explanation) explanation = util_pretty(explanation);
14441                            if (!explanation && originalExplanation) explanation = `Inspected: ${originalExplanation}`;
14442                            if (!explanation && err?.explanation) explanation = err.explanation;
14443                            if (!message && err?.message) message = err.message;
14444                            if (!message && errName) message = `${errName} (weird)`;
14445                            break;
14446                        }
14447                }
14448                let logLines;
14449                if (options.logger.getLines) logLines = options.logger.getLines();
14450                const args = [
14451                    message,
14452                    explanation
14453                ].filter(Boolean).join(", ");
14454                options.logger.debug(`VideomailError: create(${args})`);
14455                const errData = {
14456                    explanation,
14457                    logLines,
14458                    err
14459                };
14460                const videomailError = new error_VideomailError(message ?? "(undefined message)", options, classList, errData);
14461                if (err) {
14462                    videomailError.status = err.status;
14463                    videomailError.code = err.code;
14464                }
14465                if (options.reportErrors) {
14466                    const resource = new src_resource(options);
14467                    resource.reportError(videomailError).catch((reason)=>{
14468                        console.error(reason);
14469                    });
14470                }
14471                return videomailError;
14472            }
14473            const error_createError = createError;
14474            function findOriginalExc(exc) {
14475                if (exc instanceof Error && "response" in exc) {
14476                    const response = exc.response;
14477                    const body = response.body;
14478                    if ("error" in body) {
14479                        const message = body.error.message;
14480                        const cause = body.error.cause;
14481                        const error = new error_HTTPVideomailError(message, {
14482                            cause
14483                        });
14484                        if (body.error.name) error.name = body.error.name;
14485                        if (body.error.explanation) error.explanation = body.error.explanation;
14486                        if (body.error.stack) error.stack = body.error.stack;
14487                        if (body.error.status) error.status = body.error.status;
14488                        if (body.error.code) error.code = body.error.code;
14489                        return error;
14490                    }
14491                }
14492                return exc;
14493            }
14494            const error_findOriginalExc = findOriginalExc;
14495            function _extends() {
14496                _extends = Object.assign || function(target) {
14497                    for(var i = 1; i < arguments.length; i++){
14498                        var source = arguments[i];
14499                        for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
14500                    }
14501                    return target;
14502                };
14503                return _extends.apply(this, arguments);
14504            }
14505            var NODE_LIST_CLASSES = {
14506                '[object HTMLCollection]': true,
14507                '[object NodeList]': true,
14508                '[object RadioNodeList]': true
14509            };
14510            var IGNORED_ELEMENT_TYPES = {
14511                button: true,
14512                fieldset: true,
14513                reset: true,
14514                submit: true
14515            };
14516            var CHECKED_INPUT_TYPES = {
14517                checkbox: true,
14518                radio: true
14519            };
14520            var TRIM_RE = /^\s+|\s+$/g;
14521            var slice = Array.prototype.slice;
14522            var es_toString = Object.prototype.toString;
14523            function getFormData(form, options) {
14524                if (!form) throw new Error("A form is required by getFormData, was given form=" + form);
14525                options = _extends({
14526                    includeDisabled: false,
14527                    trim: false
14528                }, options);
14529                var data = {};
14530                var elementName;
14531                var elementNames = [];
14532                var elementNameLookup = {};
14533                for(var i = 0, l = form.elements.length; i < l; i++){
14534                    var element = form.elements[i];
14535                    if (!IGNORED_ELEMENT_TYPES[element.type] && (!element.disabled || options.includeDisabled)) {
14536                        elementName = element.name || element.id;
14537                        if (elementName && !elementNameLookup[elementName]) {
14538                            elementNames.push(elementName);
14539                            elementNameLookup[elementName] = true;
14540                        }
14541                    }
14542                }
14543                for(var _i = 0, _l = elementNames.length; _i < _l; _i++){
14544                    elementName = elementNames[_i];
14545                    var value = getFieldData(form, elementName, options);
14546                    if (null != value) data[elementName] = value;
14547                }
14548                return data;
14549            }
14550            function getFieldData(form, fieldName, options) {
14551                if (!form) throw new Error("A form is required by getFieldData, was given form=" + form);
14552                if (!fieldName && '[object String]' !== es_toString.call(fieldName)) throw new Error("A field name is required by getFieldData, was given fieldName=" + fieldName);
14553                options = _extends({
14554                    includeDisabled: false,
14555                    trim: false
14556                }, options);
14557                var element = form.elements[fieldName];
14558                if (!element || element.disabled && !options.includeDisabled) return null;
14559                if (!NODE_LIST_CLASSES[es_toString.call(element)]) return getFormElementValue(element, options.trim);
14560                var data = [];
14561                var allRadios = true;
14562                for(var i = 0, l = element.length; i < l; i++)if (!element[i].disabled || options.includeDisabled) {
14563                    if (allRadios && 'radio' !== element[i].type) allRadios = false;
14564                    var value = getFormElementValue(element[i], options.trim);
14565                    if (null != value) data = data.concat(value);
14566                }
14567                if (allRadios && 1 === data.length) return data[0];
14568                return data.length > 0 ? data : null;
14569            }
14570            function getFormElementValue(element, trim) {
14571                var value = null;
14572                var type = element.type;
14573                if ('select-one' === type) {
14574                    if (element.options.length) value = element.options[element.selectedIndex].value;
14575                    return value;
14576                }
14577                if ('select-multiple' === type) {
14578                    value = [];
14579                    for(var i = 0, l = element.options.length; i < l; i++)if (element.options[i].selected) value.push(element.options[i].value);
14580                    if (0 === value.length) value = null;
14581                    return value;
14582                }
14583                if ('file' === type && 'files' in element) {
14584                    if (element.multiple) {
14585                        value = slice.call(element.files);
14586                        if (0 === value.length) value = null;
14587                    } else value = element.files[0];
14588                    return value;
14589                }
14590                if (CHECKED_INPUT_TYPES[type]) {
14591                    if (element.checked) value = 'checkbox' !== type || element.hasAttribute('value') ? element.value : true;
14592                } else value = trim ? element.value.replace(TRIM_RE, '') : element.value;
14593                return value;
14594            }
14595            getFormData.getFieldData = getFieldData;
14596            let createNanoEvents = ()=>({
14597                    emit (event, ...args) {
14598                        for(let callbacks = this.events[event] || [], i = 0, length = callbacks.length; i < length; i++)callbacks[i](...args);
14599                    },
14600                    events: {},
14601                    on (event, cb) {
14602                        (this.events[event] ||= []).push(cb);
14603                        return ()=>{
14604                            this.events[event] = this.events[event]?.filter((i)=>cb !== i);
14605                        };
14606                    }
14607                });
14608            class Despot {
14609                name;
14610                options;
14611                static EMITTER = createNanoEvents();
14612                constructor(name, options){
14613                    this.name = name;
14614                    this.options = options;
14615                }
14616                emit(eventName, ...params) {
14617                    const firstParam = params[0];
14618                    const showParams = firstParam && ("object" != typeof firstParam || "object" == typeof firstParam && Object.keys(firstParam).filter(Boolean).length > 0);
14619                    if (showParams) this.options.logger.debug(`${this.name} emits ${eventName} with ${util_pretty(params)}`);
14620                    else this.options.logger.debug(`${this.name} emits ${eventName}`);
14621                    try {
14622                        Despot.EMITTER.emit(eventName, ...params);
14623                    } catch (exc) {
14624                        if (exc instanceof error_VideomailError) Despot.EMITTER.emit("ERROR", {
14625                            err: exc
14626                        });
14627                        else Despot.EMITTER.emit("ERROR", {
14628                            exc
14629                        });
14630                    }
14631                }
14632                on(eventName, callback) {
14633                    return Despot.EMITTER.on(eventName, callback);
14634                }
14635                once(eventName, listener) {
14636                    const callback = (...params)=>{
14637                        unbind();
14638                        params.length > 0 ? listener(...params) : listener();
14639                    };
14640                    const unbind = this.on(eventName, callback);
14641                    return unbind;
14642                }
14643                static getListeners(eventName) {
14644                    return Despot.EMITTER.events[eventName];
14645                }
14646                static removeListener(eventName) {
14647                    delete Despot.EMITTER.events[eventName];
14648                }
14649                static removeAllListeners() {
14650                    Despot.EMITTER.events = {};
14651                }
14652            }
14653            const util_Despot = Despot;
14654            function getValidity(element) {
14655                const validity = "validity" in element ? element.validity : void 0;
14656                return validity;
14657            }
14658            const util_getValidity = getValidity;
14659            function hideElement(element) {
14660                if (!element) return;
14661                element.style.setProperty("display", "none", "important");
14662            }
14663            const html_hideElement = hideElement;
14664            function isNotButton(element) {
14665                return "BUTTON" !== element.tagName && "submit" !== element.getAttribute("type");
14666            }
14667            const html_isNotButton = isNotButton;
14668            function showElement(element) {
14669                if (!element) return;
14670                element.style.removeProperty("display");
14671            }
14672            const html_showElement = showElement;
14673            const REGEX = /[ ,]+/u;
14674            function trimEmail(email) {
14675                return email.replace(REGEX, "");
14676            }
14677            function trimEmails(emails) {
14678                const trimmedEmails = emails.split(REGEX).map((item)=>
14678item.trim()).filter(Boolean);
14679                return trimmedEmails;
14680            }
14681            const FormMethod = {
14682                POST: "post",
14683                PUT: "put",
14684                GET: "get"
14685            };
14686            class Form extends util_Despot {
14687                container;
14688                formElement;
14689                keyInput;
14690                FORM_FIELDS = {};
14691                constructor(container, formElement, options){
14692                    super("Form", options);
14693                    this.container = container;
14694                    this.formElement = formElement;
14695                    this.FORM_FIELDS = {
14696                        subject: options.selectors.subjectInputName,
14697                        from: options.selectors.fromInputName,
14698                        to: options.selectors.toInputName,
14699                        cc: options.selectors.ccInputName,
14700                        bcc: options.selectors.bccInputName,
14701                        body: options.selectors.bodyInputName,
14702                        key: options.selectors.keyInputName,
14703                        parentKey: options.selectors.parentKeyInputName,
14704                        sendCopy: options.selectors.sendCopyInputName
14705                    };
14706                }
14707                getData() {
14708                    return getFormData(this.formElement, {
14709                        includeDisabled: true
14710                    });
14711                }
14712                transformFormData(formInputs) {
14713                    const transformedVideomail = {};
14714                    Object.keys(this.FORM_FIELDS).forEach((key)=>{
14715                        const formFieldValue = this.FORM_FIELDS[key];
14716                        if (formFieldValue in formInputs) {
14717                            const value = formInputs[formFieldValue];
14718                            if (void 0 !== value) switch(key){
14719                                case "from":
14720                                    transformedVideomail[key] = trimEmail(value);
14721                                    break;
14722                                case "to":
14723                                case "cc":
14724                                case "bcc":
14725                                    transformedVideomail[key] = trimEmails(value);
14726                                    break;
14727                                default:
14728                                    transformedVideomail[key] = value;
14729                            }
14730                        }
14731                    });
14732                    return transformedVideomail;
14733                }
14734                getRecipients() {
14735                    const partialVideomail = this.getData();
14736                    const videomail = this.transformFormData(partialVideomail);
14737                    const recipients = {};
14738                    if (videomail.to) recipients.to = videomail.to;
14739                    if (videomail.cc) recipients.cc = videomail.cc;
14740                    if (videomail.bcc) recipients.bcc = videomail.bcc;
14741                    return recipients;
14742                }
14743                loadVideomail(videomail) {
14744                    this.options.logger.debug("Form: loadVideomail()");
14745                    for (const formControl of this.formElement.elements){
14746                        const name = formControl.getAttribute("name");
14747                        if (name) {
14748                            let value = videomail[name];
14749                            const tagName = formControl.tagName;
14750                            if (this.options.callbacks.adjustFormValueBeforePopulating) value = this.options.callbacks.adjustFormValueBeforePopulating(name, value, videomail);
14751                            switch(tagName){
14752                                case "INPUT":
14753                                    {
14754                                        const inputControl = formControl;
14755                                        if (Array.isArray(value)) inputControl.value = value.join(", ");
14756                                        else inputControl.value = value;
14757                                        break;
14758                                    }
14759                                case "TEXTAREA":
14760                                    {
14761                                        const textArea = formControl;
14762                                        textArea.value = value;
14763                                        break;
14764                                    }
14765                                default:
14766                                    throw error_createError({
14767                                        message: `Unsupported form control tag name $${tagName} found`,
14768                                        options: this.options
14769                                    });
14770                            }
14771                            if (name === this.options.selectors.toInputName || name === this.options.selectors.subjectInputName || name === this.options.selectors.bodyInputName) formControl.setAttribute("disabled", "disabled");
14772                        }
14773                    }
14774                    this.formElement.setAttribute("method", FormMethod.PUT);
14775                }
14776                setDisabled(disabled, buttonsToo) {
14777                    for (const formControl of this.formElement.elements)if (buttonsToo || html_isNotButton(formControl)) if (disabled) formControl.setAttribute("disabled", "disabled");
14778                    else formControl.removeAttribute("disabled");
14779                }
14780                hideAll() {
14781                    for (const formElement of this.formElement.elements)html_hideElement(formElement);
14782                    if (!this.formElement.classList.contains(this.options.selectors.containerClass)) html_hideElement(this.formElement);
14783                }
14784                isRegisteredFormField(formElement) {
14785                    const formElementName = formElement.getAttribute("name");
14786                    const registeredFormFieldNames = Object.values(this.FORM_FIELDS);
14787                    const isRegistered = registeredFormFieldNames.includes(formElementName);
14788                    return isRegistered;
14789                }
14790                getRegisteredFormElements() {
14791                    const elements = this.formElement.querySelectorAll("input, textarea, select");
14792                    const registeredElements = [];
14793                    for (const element of elements)if (this.isRegisteredFormField(element)) registeredElements.push(element);
14794                    return registeredElements;
14795                }
14796                disable(buttonsToo) {
14797                    this.setDisabled(true, buttonsToo);
14798                }
14799                enable(buttonsToo) {
14800                    this.setDisabled(false, buttonsToo);
14801                }
14802                build() {
14803                    this.options.logger.debug("Form: build()");
14804                    this.keyInput = this.formElement.querySelector(`input[name="${this.options.selectors.keyInputName}"]`);
14805                    if (!this.keyInput) {
14806                        this.keyInput = document.createElement("input");
14807                        this.keyInput.type = "hidden";
14808                        this.keyInput.name = this.options.selectors.keyInputName;
14809                        this.formElement.appendChild(this.keyInput);
14810                    }
14811                    if (this.options.enableAutoValidation) {
14812                        const inputElements = this.getRegisteredFormElements();
14813                        for(let i = 0, len = inputElements.length; i < len; i++){
14814                            const inputElement = inputElements[i];
14815                            const type = inputElement?.getAttribute("type");
14816                            if ("radio" === type || "select" === type) inputElement?.addEventListener("change", this.container.validate.bind(this.container));
14817                            else inputElement?.addEventListener("input", this.container.validate.bind(this.container));
14818                        }
14819                    }
14820                    this.on("PREVIEW", (params)=>{
14821                        if (params?.key || this.keyInput?.value) {
14822                            if (params?.key && this.keyInput) {
14823                                this.keyInput.value = params.key;
14824                                this.keyInput.dispatchEvent(new InputEvent("input", {
14825                                    bubbles: true
14826                                }));
14827                            }
14828                        } else {
14829                            const err = error_createError({
14830                                message: "Videomail key and its value for previewing is missing",
14831                                options: this.options
14832                            });
14833                            this.emit("ERROR", {
14834                                err
14835                            });
14836                        }
14837                    });
14838                    this.on("STARTING_OVER", ()=>{
14839                        this.resetForm();
14840                    });
14841                    this.on("INVALID", ()=>{
14842                        this.formElement.classList.add("invalid");
14843                    });
14844                    this.on("VALID", ()=>{
14845                        this.formElement.classList.remove("invalid");
14846                    });
14847                    this.on("ERROR", (params)=>{
14848                        const isBrowserProblem = params.err?.isBrowserProblem();
14849                        if (isBrowserProblem && this.options.adjustFormOnBrowserError) this.hideAll();
14850                        if (isBrowserProblem) this.hideSubmitButton();
14851                    });
14852                    this.on("BUILT", ()=>{
14853                        this.startListeningToSubmitEvents();
14854                    });
14855                }
14856                removeAllInputListeners() {
14857                    const inputElements = this.getRegisteredFormElements();
14858                    for (const inputElement of inputElements){
14859                        const type = inputElement.getAttribute("type");
14860                        if ("radio" === type || "select" === type) inputElement.removeEventListener("change", this.container.validate.bind(this.container));
14861                        else inputElement.removeEventListener("input", this.container.validate.bind(this.container));
14862                    }
14863                }
14864                hideSubmitButton() {
14865                    const submitButton = this.findSubmitButton();
14866                    html_hideElement(submitButton);
14867                }
14868                unload() {
14869                    this.options.logger.debug("Form: unload()");
14870                    this.removeAllInputListeners();
14871                    util_Despot.removeAllListeners();
14872                    this.stopListeningToSubmitEvents();
14873                    this.resetForm();
14874                }
14875                resetForm() {
14876                    this.formElement.setAttribute("method", "");
14877                    this.formElement.reset();
14878                    const inputElements = this.getRegisteredFormElements();
14879                    for (const inputElement of inputElements){
14880                        const type = inputElement.getAttribute("type");
14881                        if (type?.toLowerCase() === "hidden") inputElement.setAttribute("value", "");
14882                    }
14883                }
14884                startListeningToSubmitEvents() {
14885                    const submitButton = this.container.getSubmitButton();
14886                    if (submitButton) submitButton.onclick = this.doTheSubmit.bind(this);
14887                }
14888                stopListeningToSubmitEvents() {
14889                    const submitButton = this.container.getSubmitButton();
14890                    if (submitButton) submitButton.onclick = null;
14891                }
14892                async doTheSubmit(e) {
14893                    if (e) {
14894                        this.options.logger.debug(`Form: doTheSubmit(${util_pretty(e)})`);
14895                        e.preventDefault();
14896                    } else this.options.logger.debug("Form: doTheSubmit()");
14897                    const url = this.formElement.getAttribute("action") ?? this.options.apiUrl;
14898                    const method = this.formElement.getAttribute("method");
14899                    let chosenMethod;
14900                    switch(method){
14901                        case FormMethod.POST:
14902                            chosenMethod = FormMethod.POST;
14903                            break;
14904                        case FormMethod.PUT:
14905                            chosenMethod = FormMethod.PUT;
14906                            break;
14907                        default:
14908                            chosenMethod = FormMethod.POST;
14909                    }
14910                    if (this.container.hasElement()) await this.container.submitAll(this.getData(), chosenMethod, url);
14911                    return false;
14912                }
14913                getInvalidElement() {
14914                    const elements = this.getRegisteredFormElements();
14915                    for (const element of elements){
14916                        const validity = util_getValidity(element);
14917                        if (!validity?.valid) return element;
14918                    }
14919                    return null;
14920                }
14921                findSubmitButton() {
14922                    return this.formElement.querySelector("[type='submit']");
14923                }
14924                hide() {
14925                    html_hideElement(this.formElement);
14926                }
14927                show() {
14928                    html_showElement(this.formElement);
14929                }
14930            }
14931            const wrappers_form = Form;
14932            class Resource {
14933                options;
14934                timezoneId;
14935                constructor(options){
14936                    this.options = options;
14937                    this.timezoneId = window.Intl.DateTimeFormat().resolvedOptions().timeZone;
14938                }
14939                applyDefaultValue(videomail, name) {
14940                    if (this.options.defaults[name] && !videomail[name]) videomail[name] = this.options.defaults[name];
14941                    return videomail;
14942                }
14943                applyDefaultValues(videomail) {
14944                    let newVideomail = {
14945                        ...videomail
14946                    };
14947                    newVideomail = this.applyDefaultValue(newVideomail, "from");
14948                    newVideomail = this.applyDefaultValue(newVideomail, "to");
14949                    newVideomail = this.applyDefaultValue(newVideomail, "cc");
14950                    newVideomail = this.applyDefaultValue(newVideomail, "bcc");
14951                    newVideomail = this.applyDefaultValue(newVideomail, "subject");
14952                    newVideomail = this.applyDefaultValue(newVideomail, "body");
14953                    return newVideomail;
14954                }
14955                async get(identifierName, identifierValue, identifierType) {
14956                    const url = `${this.options.apiUrl}/videomail/${identifierName}/${identifierValue}/${identifierType}`;
14957                    try {
14958                        const request = await client_default()("get", url).type("json").set("Accept", "application/json").withCredentials().set("Timezone-Id", this.timezoneId).set(constants.WHITELIST_KEY_LABEL, this.options.whitelistKey).timeout(this.options.timeouts.connection);
14959                        if ("thread" === identifierType) {
14960                            const thread = request.body;
14961                            return thread;
14962                        }
14963                        const videomail = request.body;
14964                        return videomail;
14965                    } catch (exc) {
14966                        throw error_createError({
14967                            exc: error_findOriginalExc(exc),
14968                            options: this.options
14969                        });
14970                    }
14971                }
14972                async write(method, videomail) {
14973                    const queryParams = {
14974                        [constants.WHITELIST_KEY_LABEL]: this.options.whitelistKey
14975                    };
14976                    const path = videomail.public ? "wall" : "videomail";
14977                    let url = `${this.options.apiUrl}/${path}/`;
14978                    if (method === FormMethod.PUT) {
14979                        if (videomail.public) throw error_createError({
14980                            message: "A public videomail cannot be updated.",
14981                            options: this.options
14982                        });
14983                        if (videomail.key) url += videomail.key;
14984                    }
14985                    try {
14986                        const request = await client_default()(method, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(videomail).timeout(this.options.timeouts.connection);
14987                        return request;
14988                    } catch (exc) {
14989                        throw error_createError({
14990                            exc: error_findOriginalExc(exc),
14991                            options: this.options
14992                        });
14993                    }
14994                }
14995                async getByAlias(alias) {
14996                    return await this.get("alias", alias, "snapshot");
14997                }
14998                async getByKey(key) {
14999                    return await this.get("key", key, "snapshot");
15000                }
15001                async getThreadByAlias(alias) {
15002                    return await this.get("alias", alias, "thread");
15003                }
15004                async getThreadByKey(key) {
15005                    return await this.get("key", key, "thread");
15006                }
15007                async reportError(err) {
15008                    const queryParams = {
15009                        [constants.WHITELIST_KEY_LABEL]: this.options.whitelistKey
15010                    };
15011                    const url = `${this.options.apiUrl}/client-error/`;
15012                    try {
15013                        const fullVideomailErrorData = {
15014                            browser: err.browser,
15015                            code: err.code,
15016                            cookie: err.cookie,
15017                            cpu: err.cpu,
15018                            device: err.device,
15019                            engine: err.engine,
15020                            err: err.err ? serializeError(err.err) : void 0,
15021                            explanation: err.explanation,
15022                            location: err.location,
15023                            logLines: err.logLines,
15024                            orientation: err.orientation,
15025                            os: err.os,
15026                            screen: err.screen,
15027                            whitelistKey: err.whitelistKey,
15028                            status: err.status,
15029                            title: err.title,
15030                            message: err.message,
15031                            stack: err.stack,
15032                            versions: {
15033                                videomailClient: package_namespaceObject.rE,
15034                                videomailNinjaFormPlugin: this.options.versions?.videomailNinjaFormPlugin
15035                            }
15036                        };
15037                        await client_default()(FormMethod.POST, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(fullVideomailErrorData).timeout(this.options.timeouts.connection);
15038                    } catch (exc) {
15039                        console.error(exc);
15040                    }
15041                }
15042                async post(videomail) {
15043                    const newVideomail = this.applyDefaultValues(videomail);
15044                    if (!newVideomail.versions) newVideomail.versions = {};
15045                    newVideomail.versions.videomailClient = package_namespaceObject.rE;
15046                    newVideomail.recordLocation = window.location.href;
15047                    const browser = util_getBrowser(this.options);
15048                    newVideomail.browserStats = browser.getUsefulData();
15049                    try {
15050                        let res;
15051                        if (this.options.callbacks.adjustFormDataBeforePosting) {
15052                            const adjustedVideomail = this.options.callbacks.adjustFormDataBeforePosting(newVideomail);
15053                            res = await this.write(FormMethod.POST, adjustedVideomail);
15054                        } else res = await this.write(FormMethod.POST, newVideomail);
15055                        return res;
15056                    } catch (exc) {
15057                        throw error_createError({
15058                            exc: error_findOriginalExc(exc),
15059                            options: this.options
15060                        });
15061                    }
15062                }
15063                async put(videomail) {
15064                    return await this.write(FormMethod.PUT, videomail);
15065                }
15066                async form(formData, url) {
15067                    let formType;
15068                    switch(this.options.enctype){
15069                        case constants["public"].ENC_TYPE_APP_JSON:
15070                            formType = "json";
15071                            break;
15072                        case constants["public"].ENC_TYPE_FORM:
15073                            formType = "form";
15074                            break;
15075                        default:
15076                            throw error_createError({
15077                                err: new Error(`Invalid enctype given: ${this.options.enctype}`),
15078                                options: this.options
15079                            });
15080                    }
15081                    try {
15082                        const res = await client_default().post(url).type(formType).set("Timezone-Id", this.timezoneId).send(formData).timeout(this.options.timeouts.connection);
15083                        return res;
15084                    } catch (exc) {
15085                        throw error_createError({
15086                            exc: error_findOriginalExc(exc),
15087                            options: this.options
15088                        });
15089                    }
15090                }
15091            }
15092            const src_resource = Resource;
15093            var cjs = __webpack_require__(4744);
15094            var cjs_default = /*#__PURE__*/ __webpack_require__.n(cjs);
15095            const NodeEnvType = {
15096                DEVELOPMENT: "development",
15097                PRODUCTION: "production"
15098            };
15099            function getNodeEnv() {
15100                return "production";
15101            }
15102            const util_getNodeEnv = getNodeEnv;
15103            function isProductionMode() {
15104                return util_getNodeEnv() === NodeEnvType.PRODUCTION;
15105            }
15106            const util_isProductionMode = isProductionMode;
15107            const PRODUCTION = util_isProductionMode();
15108            const options_options = {
15109                logger: console,
15110                logStackSize: 30,
15111                verbose: !PRODUCTION,
15112                apiUrl: "https://videomail.io/api",
15113                socketUrl: "wss://videomail.io/ws",
15114                whitelistKey: "videomail-client-demo",
15115                enablePause: true,
15116                enableAutoPause: true,
15117                enableSpace: true,
15118                submitWithVideomail: false,
15119                disableSubmit: false,
15120                enableAutoValidation: true,
15121                enableAutoUnload: true,
15122                enableAutoSubmission: true,
15123                enctype: "application/json",
15124                selectors: {
15125                    containerId: void 0,
15126                    containerClass: "videomail",
15127                    replayClass: "replay",
15128                    userMediaClass: "userMedia",
15129                    visualsClass: "visuals",
15130                    buttonClass: void 0,
15131                    buttonsClass: "buttons",
15132                    recordButtonClass: "record",
15133                    pauseButtonClass: "pause",
15134                    resumeButtonClass: "resume",
15135                    previewButtonClass: "preview",
15136                    recordAgainButtonClass: "recordAgain",
15137                    submitButtonClass: "submit",
15138                    subjectInputName: "subject",
15139                    fromInputName: "from",
15140                    toInputName: "to",
15141                    ccInputName: "cc",
15142                    bccInputName: "bcc",
15143                    bodyInputName: "body",
15144                    sendCopyInputName: "sendCopy",
15145                    keyInputName: "videomail_key",
15146                    parentKeyInputName: "videomail_parent_key",
15147                    formId: void 0,
15148                    submitButtonId: void 0,
15149                    submitButtonSelector: void 0
15150                },
15151                audio: {
15152                    enabled: false,
15153                    switch: false,
15154                    volume: 0.2,
15155                    bufferSize: "auto"
15156                },
15157                video: {
15158                    fps: 15,
15159                    limitSeconds: 30,
15160                    countdown: 3,
15161                    width: void 0,
15162                    height: void 0,
15163                    facingMode: "user",
15164                    facingModeButton: false,
15165                    stretch: false,
15166                    mobileBreakPoint: void 0,
15167                    autoPlay: void 0
15168                },
15169                image: {
15170                    quality: 0.42,
15171                    types: [
15172                        "webp",
15173                        "jpeg"
15174                    ]
15175                },
15176                text: {
15177                    pausedHeader: "Paused",
15178                    pausedHint: void 0,
15179                    sending: "Teleporting",
15180                    encoding: "Encoding",
15181                    limitReached: "Limit reached",
15182                    audioOff: "Audio off",
15183                    audioOn: "Audio on",
15184                    buttons: {
15185                        record: "Record video",
15186                        recordAgain: "Record again",
15187                        resume: "Resume",
15188                        pause: "Pause",
15189                        preview: "Preview"
15190                    }
15191                },
15192                notifier: {
15193                    entertain: false,
15194                    entertainClass: "bg",
15195                    entertainLimit: 6,
15196                    entertainInterval: 9000
15197                },
15198                timeouts: {
15199                    userMedia: 20e3,
15200                    connection: 1e4,
15201                    pingInterval: 30e3
15202                },
15203                loadUserMediaOnRecord: false,
15204                callbacks: {
15205                    adjustFormDataBeforePosting: void 0,
15206                    adjustFormValueBeforePopulating: void 0
15207                },
15208                defaults: {
15209                    from: void 0,
15210                    to: void 0,
15211                    cc: void 0,
15212                    bcc: void 0,
15213                    subject: void 0,
15214                    body: void 0
15215                },
15216                displayErrors: true,
15217                adjustFormOnBrowserError: true,
15218                reportErrors: true,
15219                disableFormWhenSubmitting: true,
15220                fakeUaString: void 0,
15221                recalculateDimensionsOnWindowResize: false,
15222                versions: {
15223                    videomailNinjaFormPlugin: void 0
15224                }
15225            };
15226            const src_options = options_options;
15227            class CollectLogger {
15228                browser;
15229                logger;
15230                stack = [];
15231                options;
15232                constructor(options){
15233                    this.options = options;
15234                    this.browser = util_getBrowser(options);
15235                    this.logger = options.logger;
15236                }
15237                lifo(level, parameters) {
15238                    const line = parameters.join();
15239                    if (this.stack.length > this.options.logStackSize) this.stack.pop();
15240                    this.stack.push(`[${level}] ${line}`);
15241                    return line;
15242                }
15243                debug(...args) {
15244                    const output = this.lifo("debug", args);
15245                    if (this.options.verbose) if (this.browser.isFirefox()) this.logger.debug(output);
15246                    else if (this.logger.groupCollapsed) {
15247                        this.logger.groupCollapsed(output);
15248                        this.logger.trace("Trace");
15249                        this.logger.groupEnd();
15250                    } else if (this.logger.debug) this.logger.debug(output);
15251                    else console.log(output);
15252                }
15253                error(...args) {
15254                    this.logger.error(this.lifo("error", args));
15255                }
15256                warn(...args) {
15257                    this.logger.warn(this.lifo("warn", args));
15258                }
15259                info(...args) {
15260                    this.logger.info(this.lifo("info", args));
15261                }
15262                getLines() {
15263                    return this.stack;
15264                }
15265            }
15266            const util_CollectLogger = CollectLogger;
15267            var process = __webpack_require__(5606);
15268            function isTest() {
15269                return "test" === process.env.ENVIRON;
15270            }
15271            const util_isTest = isTest;
15272            function mergeWithDefaultOptions(options = {}) {
15273                const newOptions = cjs_default()(src_options, options, {
15274                    arrayMerge (_destination, source) {
15275                        return source;
15276                    }
15277                });
15278                const collectLogger = new util_CollectLogger(newOptions);
15279                newOptions.logger = collectLogger;
15280                if (util_isTest()) newOptions.verbose = false;
15281                return newOptions;
15282            }
15283            const options_mergeWithDefaultOptions = mergeWithDefaultOptions;
15284            var injectStylesIntoStyleTag = __webpack_require__(4860);
15285            var injectStylesIntoStyleTag_default = /*#__PURE__*/ __webpack_require__.n(injectStylesIntoStyleTag);
15286            var styleDomAPI = __webpack_require__(7045);
15287            var styleDomAPI_default = /*#__PURE__*/ __webpack_require__.n(styleDomAPI);
15288            var insertBySelector = __webpack_require__(3175);
15289            var insertBySelector_default = /*#__PURE__*/ __webpack_require__.n(insertBySelector);
15290            var setAttributesWithoutAttributes = __webpack_require__(7956);
15291            var setAttributesWithoutAttributes_default = /*#__PURE__*/ __webpack_require__.n(setAttributesWithoutAttributes);
15292            var insertStyleElement = __webpack_require__(6384);
15293            var insertStyleElement_default = /*#__PURE__*/ __webpack_require__.n(insertStyleElement);
15294            var styleTagTransform = __webpack_require__(2045);
15295            var styleTagTransform_default = /*#__PURE__*/ __webpack_require__.n(styleTagTransform);
15296            var main = __webpack_require__(6846);
15297            var main_options = {};
15298            main_options.styleTagTransform = styleTagTransform_default();
15299            main_options.setAttributes = setAttributesWithoutAttributes_default();
15300            main_options.insert = insertBySelector_default().bind(null, "head");
15301            main_options.domAPI = styleDomAPI_default();
15302            main_options.insertStyleElement = insertStyleElement_default();
15303            injectStylesIntoStyleTag_default()(main.A, main_options);
15304            main.A && main.A.locals && main.A.locals;
15305            var document_visibility = __webpack_require__(2379);
15306            var document_visibility_default = /*#__PURE__*/ __webpack_require__.n(document_visibility);
15307            function limitHeight(height, options, calledFrom) {
15308                const dimension = {
15309                    unit: "px"
15310                };
15311                let limitedHeight = document.documentElement.clientHeight;
15312                if (height) limitedHeight = Math.min(height, limitedHeight);
15313                if (limitedHeight < 1) throw error_createError({
15314                    message: `Limited height ${limitedHeight} cannot be less than 1! (Called from ${calledFrom})`,
15315                    options
15316                });
15317                dimension.value = limitedHeight;
15318                return dimension;
15319            }
15320            const dimensions_limitHeight = limitHeight;
15321            function getOuterWidth(element) {
15322                let rect = element.getBoundingClientRect();
15323                let outerWidth = rect.right - rect.left;
15324                if (outerWidth < 1) {
15325                    rect = document.body.getBoundingClientRect();
15326                    outerWidth = rect.right - rect.left;
15327                }
15328                return outerWidth;
15329            }
15330            const dimensions_getOuterWidth = getOuterWidth;
15331            function limitWidth(element, options, width) {
15332                const limitedDimension = {
15333                    unit: "px"
15334                };
15335                let limitedWidth;
15336                const outerWidth = dimensions_getOuterWidth(element);
15337                limitedWidth = width && "number" == typeof width ? outerWidth > 0 && outerWidth < width ? outerWidth : width : outerWidth;
15338                if (Number.isInteger(limitedWidth) && limitedWidth < 1) throw error_createError({
15339                    message: "Limited width cannot be less than 1!",
15340                    options
15341                });
15342                limitedDimension.value = limitedWidth;
15343                return limitedDimension;
15344            }
15345            const dimensions_limitWidth = limitWidth;
15346            function useFullWidth(mobileBreakPoint) {
15347                if (void 0 === mobileBreakPoint) return;
15348                const viewportWidth = window.innerWidth;
15349                if (viewportWidth < mobileBreakPoint) {
15350                    const dimension = {
15351                        unit: "%",
15352                        value: 100
15353                    };
15354                    return dimension;
15355                }
15356            }
15357            const dimensions_useFullWidth = useFullWidth;
15358            var contains = __webpack_require__(808);
15359            var contains_default = /*#__PURE__*/ __webpack_require__.n(contains);
15360            function disableElement(element) {
15361                if (!element) return;
15362                if ("INPUT" === element.tagName || "BUTTON" === element.tagName) element.setAttribute("disabled", "true");
15363                else element.classList.add("disabled");
15364            }
15365            const html_disableElement = disableElement;
15366            function adjustButton(buttonElement, show, type, disabled) {
15367                if (disabled) html_disableElement(buttonElement);
15368                if (type) buttonElement.type = type;
15369                if (!show) html_hideElement(buttonElement);
15370                return buttonElement;
15371            }
15372            const html_adjustButton = adjustButton;
15373            function enableElement(element) {
15374                if (!element) return;
15375                if ("INPUT" === element.tagName || "BUTTON" === element.tagName) element.removeAttribute("disabled");
15376                else element.classList.remove("disabled");
15377            }
15378            const html_enableElement = enableElement;
15379            function isShown(element) {
15380                if (!element) return false;
15381                const display = element.style.getPropertyValue("display");
15382                return !display.includes("none");
15383            }
15384            const html_isShown = isShown;
15385            class Buttons extends util_Despot {
15386                container;
15387                buttonsElement;
15388                recordButton;
15389                pauseButton;
15390                resumeButton;
15391                previewButton;
15392                recordAgainButton;
15393                submitButton;
15394                audioOnRadioPair;
15395                audioOffRadioPair;
15396                built = false;
15397                constructor(container, options){
15398                    super("Buttons", options);
15399                    this.container = container;
15400                }
15401                replaceClickHandler(element, clickHandler) {
15402                    const wrappedClickHandler = (ev)=>{
15403                        ev.preventDefault();
15404                        try {
15405                            clickHandler({
15406                                event: ev
15407                            });
15408                        } catch (exc) {
15409                            this.emit("ERROR", {
15410                                exc
15411                            });
15412                        }
15413                    };
15414                    element.onclick = wrappedClickHandler;
15415                }
15416                makeRadioButtonPair(options) {
15417                    let radioButtonElement;
15418                    let radioButtonGroup;
15419                    if (options.id) radioButtonElement = document.querySelector(`#${options.id}`);
15420                    if (!radioButtonElement) {
15421                        radioButtonElement = document.createElement("input");
15422                        radioButtonElement.id = options.id;
15423                        radioButtonElement.type = "radio";
15424                        radioButtonElement.name = options.name;
15425                        radioButtonElement.value = options.value;
15426                        radioButtonElement.checked = options.checked;
15427                        radioButtonGroup = document.createElement("span");
15428                        radioButtonGroup.classList.add("radioGroup");
15429                        radioButtonGroup.appendChild(radioButtonElement);
15430                        const radioLabel = document.createElement("label");
15431                        radioLabel.htmlFor = options.id;
15432                        radioLabel.textContent = options.label;
15433                        radioButtonGroup.appendChild(radioLabel);
15434                        if (this.submitButton && contains_default()(this.buttonsElement, this.submitButton)) this.buttonsElement?.insertBefore(radioButtonGroup, this.submitButton);
15435                        else this.buttonsElement?.appendChild(radioButtonGroup);
15436                    }
15437                    radioButtonElement.onchange = options.changeHandler;
15438                    html_disableElement(radioButtonElement);
15439                    return radioButtonElement;
15440                }
15441                makeButton(buttonClass, text, clickHandler, show, id, type, selector, disabled = true) {
15442                    let buttonElement;
15443                    buttonElement = id ? document.querySelector(`#${id}`) : selector ? document.querySelector(selector) : this.buttonsElement?.querySelector(`.${buttonClass}`);
15444                    if (buttonElement) buttonElement = html_adjustButton(buttonElement, show, type, disabled);
15445                    else {
15446                        buttonElement = document.createElement("button");
15447                        buttonElement.classList.add(buttonClass);
15448                        if (this.options.selectors.buttonClass) buttonElement.classList.add(this.options.selectors.buttonClass);
15449                        buttonElement = html_adjustButton(buttonElement, show, type, disabled);
15450                        buttonElement.innerHTML = text;
15451                        if (this.submitButton && contains_default()(this.buttonsElement, this.submitButton)) this.buttonsElement?.insertBefore(buttonElement, this.submitButton);
15452                        else this.buttonsElement?.appendChild(buttonElement);
15453                    }
15454                    if (clickHandler) this.replaceClickHandler(buttonElement, clickHandler);
15455                    return buttonElement;
15456                }
15457                buildButtons() {
15458                    if (!this.options.disableSubmit) {
15459                        if (this.submitButton) html_disableElement(this.submitButton);
15460                        else this.submitButton = this.makeButton(this.options.selectors.submitButtonClass, "Submit", void 0, true, this.options.selectors.submitButtonId, "submit", this.options.selectors.submitButtonSelector, this.options.enableAutoValidation);
15461                        if (!this.container.hasForm()) this.replaceClickHandler(this.submitButton, this.submit.bind(this));
15462                    }
15463                    this.recordButton = this.makeButton(this.options.selectors.recordButtonClass, this.options.text.buttons.record, this.record.bind(this), false);
15464                    if (this.options.enablePause) this.pauseButton = this.makeButton(this.options.selectors.pauseButtonClass, this.options.text.buttons.pause, this.container.pause.bind(this.container), false);
15465                    if (this.options.enablePause) this.resumeButton = this.makeButton(this.options.selectors.resumeButtonClass, this.options.text.buttons.resume, this.container.resume.bind(this.container), false);
15466                    this.previewButton = this.makeButton(this.options.selectors.previewButtonClass, this.options.text.buttons.preview, this.container.stop.bind(this.container), false);
15467                    this.recordAgainButton = this.makeButton(this.options.selectors.recordAgainButtonClass, this.options.text.buttons.recordAgain, this.recordAgain.bind(this), false);
15468                    if (this.options.audio.switch) {
15469                        this.audioOffRadioPair = this.makeRadioButtonPair
15469({
15470                            id: "audioOffOption",
15471                            name: "audio",
15472                            value: "off",
15473                            label: this.options.text.audioOff,
15474                            checked: !isAudioEnabled(this.options),
15475                            changeHandler: ()=>{
15476                                this.container.disableAudio();
15477                            }
15478                        });
15479                        this.audioOnRadioPair = this.makeRadioButtonPair({
15480                            id: "audioOnOption",
15481                            name: "audio",
15482                            value: "on",
15483                            label: this.options.text.audioOn,
15484                            checked: isAudioEnabled(this.options),
15485                            changeHandler: ()=>{
15486                                this.container.enableAudio();
15487                            }
15488                        });
15489                    }
15490                }
15491                onFormReady(params) {
15492                    if (!html_isShown(this.recordAgainButton)) {
15493                        if (!params?.paused) html_showElement(this.recordButton);
15494                    }
15495                    if (!params?.paused) {
15496                        html_disableElement(this.previewButton);
15497                        html_hideElement(this.previewButton);
15498                    }
15499                    if (!this.options.enableAutoValidation) html_enableElement(this.submitButton);
15500                }
15501                onGoingBack() {
15502                    html_hideElement(this.recordAgainButton);
15503                    html_showElement(this.recordButton);
15504                    html_showElement(this.submitButton);
15505                }
15506                onReplayShown() {
15507                    this.hide();
15508                }
15509                onUserMediaReady(params) {
15510                    this.onFormReady();
15511                    html_showElement(this.buttonsElement);
15512                    html_showElement(this.audioOnRadioPair);
15513                    html_showElement(this.audioOffRadioPair);
15514                    if (html_isShown(this.recordButton) && !params.recordWhenReady) html_enableElement(this.recordButton);
15515                    else if (html_isShown(this.recordAgainButton) && !params.recordWhenReady) html_enableElement(this.recordAgainButton);
15516                    if (this.options.enableAutoValidation) html_disableElement(this.submitButton);
15517                    if (!params.recordWhenReady) {
15518                        if (html_isShown(this.audioOnRadioPair)) html_enableElement(this.audioOnRadioPair);
15519                        if (html_isShown(this.audioOffRadioPair)) html_enableElement(this.audioOffRadioPair);
15520                    }
15521                }
15522                onResetting() {
15523                    html_disableElement(this.submitButton);
15524                    this.reset();
15525                }
15526                onPreview() {
15527                    html_hideElement(this.recordButton);
15528                    html_hideElement(this.previewButton);
15529                    html_disableElement(this.audioOnRadioPair);
15530                    html_disableElement(this.audioOffRadioPair);
15531                    html_showElement(this.recordAgainButton);
15532                    html_enableElement(this.recordAgainButton);
15533                    if (!this.options.enableAutoValidation) html_enableElement(this.submitButton);
15534                }
15535                enableSubmit() {
15536                    html_enableElement(this.submitButton);
15537                }
15538                adjustButtonsForPause() {
15539                    if (!this.isCountingDown()) {
15540                        if (this.pauseButton) html_hideElement(this.pauseButton);
15541                        html_showElement(this.resumeButton);
15542                        html_enableElement(this.resumeButton);
15543                        html_hideElement(this.recordButton);
15544                        html_showElement(this.previewButton);
15545                        html_enableElement(this.previewButton);
15546                    }
15547                }
15548                onFirstFrameSent() {
15549                    html_hideElement(this.recordButton);
15550                    html_hideElement(this.recordAgainButton);
15551                    if (this.pauseButton) {
15552                        html_showElement(this.pauseButton);
15553                        html_enableElement(this.pauseButton);
15554                    }
15555                    html_enableElement(this.previewButton);
15556                    html_showElement(this.previewButton);
15557                }
15558                onRecording(params) {
15559                    if (params.framesCount > 1) this.onFirstFrameSent();
15560                    else {
15561                        html_disableElement(this.audioOffRadioPair);
15562                        html_disableElement(this.audioOnRadioPair);
15563                        html_disableElement(this.recordAgainButton);
15564                        html_disableElement(this.recordButton);
15565                    }
15566                }
15567                onResuming() {
15568                    html_hideElement(this.resumeButton);
15569                    html_hideElement(this.recordButton);
15570                    if (this.pauseButton) {
15571                        html_enableElement(this.pauseButton);
15572                        html_showElement(this.pauseButton);
15573                    }
15574                }
15575                onStopping() {
15576                    html_disableElement(this.previewButton);
15577                    html_disableElement(this.recordButton);
15578                    html_hideElement(this.pauseButton);
15579                    html_hideElement(this.resumeButton);
15580                }
15581                onCountdown() {
15582                    html_disableElement(this.recordButton);
15583                    html_disableElement(this.audioOffRadioPair);
15584                    html_disableElement(this.audioOnRadioPair);
15585                }
15586                onSubmitting() {
15587                    this.options.logger.debug("Buttons: onSubmitting()");
15588                    html_disableElement(this.submitButton);
15589                    html_disableElement(this.recordAgainButton);
15590                }
15591                onSubmitted() {
15592                    html_disableElement(this.previewButton);
15593                    html_disableElement(this.recordAgainButton);
15594                    html_disableElement(this.recordButton);
15595                    html_disableElement(this.submitButton);
15596                }
15597                onInvalid() {
15598                    if (this.options.enableAutoValidation) html_disableElement(this.submitButton);
15599                }
15600                onValid() {
15601                    if (this.options.enableAutoValidation) html_enableElement(this.submitButton);
15602                }
15603                onHidden() {
15604                    html_hideElement(this.recordButton);
15605                    html_hideElement(this.previewButton);
15606                    html_hideElement(this.recordAgainButton);
15607                    html_hideElement(this.resumeButton);
15608                    html_hideElement(this.audioOnRadioPair);
15609                    html_hideElement(this.audioOffRadioPair);
15610                }
15611                onEnablingAudio() {
15612                    this.options.logger.debug("Buttons: onEnablingAudio()");
15613                    html_disableElement(this.recordButton);
15614                    html_disableElement(this.audioOnRadioPair);
15615                    html_disableElement(this.audioOffRadioPair);
15616                }
15617                onDisablingAudio() {
15618                    this.options.logger.debug("Buttons: onDisablingAudio()");
15619                    html_disableElement(this.recordButton);
15620                    html_disableElement(this.audioOnRadioPair);
15621                    html_disableElement(this.audioOffRadioPair);
15622                }
15623                recordAgain() {
15624                    html_disableElement(this.recordAgainButton);
15625                    this.container.beginWaiting();
15626                    this.container.recordAgain();
15627                }
15628                onStartingOver() {
15629                    html_showElement(this.submitButton);
15630                }
15631                submit() {
15632                    this.container.submit();
15633                }
15634                record() {
15635                    html_disableElement(this.recordButton);
15636                    this.container.record();
15637                }
15638                initEvents() {
15639                    this.options.logger.debug("Buttons: initEvents()");
15640                    this.on("USER_MEDIA_READY", (params)=>{
15641                        if (!params.switchingFacingMode) this.onUserMediaReady(params);
15642                    });
15643                    this.on("PREVIEW", ()=>{
15644                        this.onPreview();
15645                    });
15646                    this.on("PAUSED", ()=>{
15647                        this.adjustButtonsForPause();
15648                    });
15649                    this.on("RECORDING", (params)=>{
15650                        this.onRecording(params);
15651                    });
15652                    this.on("FIRST_FRAME_SENT", ()=>{
15653                        this.onFirstFrameSent();
15654                    });
15655                    this.on("RESUMING", ()=>{
15656                        this.onResuming();
15657                    });
15658                    this.on("STOPPING", ()=>{
15659                        this.onStopping();
15660                    });
15661                    this.on("COUNTDOWN", ()=>{
15662                        this.onCountdown();
15663                    });
15664                    this.on("SUBMITTING", ()=>{
15665                        this.onSubmitting();
15666                    });
15667                    this.on("RESETTING", ()=>{
15668                        this.onResetting();
15669                    });
15670                    this.on("INVALID", ()=>{
15671                        this.onInvalid();
15672                    });
15673                    this.on("VALID", ()=>{
15674                        this.onValid();
15675                    });
15676                    this.on("SUBMITTED", ()=>{
15677                        this.onSubmitted();
15678                    });
15679                    this.on("HIDE", ()=>{
15680                        this.onHidden();
15681                    });
15682                    this.on("FORM_READY", (params)=>{
15683                        this.onFormReady(params);
15684                    });
15685                    this.on("REPLAY_SHOWN", ()=>{
15686                        this.onReplayShown();
15687                    });
15688                    this.on("GOING_BACK", ()=>{
15689                        this.onGoingBack();
15690                    });
15691                    this.on("ENABLING_AUDIO", ()=>{
15692                        this.onEnablingAudio();
15693                    });
15694                    this.on("DISABLING_AUDIO", ()=>{
15695                        this.onDisablingAudio();
15696                    });
15697                    this.on("STARTING_OVER", ()=>{
15698                        this.onStartingOver();
15699                    });
15700                    this.on("CONNECTED", ()=>{
15701                        if (this.options.loadUserMediaOnRecord) {
15702                            if (html_isShown(this.recordButton)) html_enableElement(this.recordButton);
15703                        }
15704                    });
15705                    this.on("DISCONNECTED", ()=>{
15706                        html_disableElement(this.recordButton);
15707                        html_disableElement(this.audioOnRadioPair);
15708                        html_disableElement(this.audioOffRadioPair);
15709                    });
15710                    this.on("ERROR", (params)=>{
15711                        if (params.err?.isBrowserProblem() && this.options.adjustFormOnBrowserError) this.hide();
15712                    });
15713                }
15714                reset() {
15715                    this.options.logger.debug("Buttons: reset()");
15716                    html_disableElement(this.pauseButton);
15717                    html_disableElement(this.resumeButton);
15718                    html_disableElement(this.recordButton);
15719                    html_disableElement(this.previewButton);
15720                    html_disableElement(this.recordAgainButton);
15721                    html_disableElement(this.audioOnRadioPair);
15722                    html_disableElement(this.audioOffRadioPair);
15723                }
15724                isRecordAgainButtonEnabled() {
15725                    return !this.recordAgainButton?.disabled;
15726                }
15727                isReady() {
15728                    if (!this.recordButton) return false;
15729                    return this.isRecordButtonEnabled();
15730                }
15731                isRecordButtonEnabled() {
15732                    return !this.recordButton?.disabled;
15733                }
15734                setSubmitButton(newSubmitButton) {
15735                    this.submitButton = newSubmitButton;
15736                }
15737                getSubmitButton() {
15738                    return this.submitButton;
15739                }
15740                build() {
15741                    this.buttonsElement = this.container.querySelector(`.${this.options.selectors.buttonsClass}`);
15742                    if (!this.buttonsElement) {
15743                        this.buttonsElement = document.createElement("div");
15744                        this.buttonsElement.classList.add(this.options.selectors.buttonsClass);
15745                        this.container.appendChild(this.buttonsElement);
15746                    }
15747                    html_hideElement(this.buttonsElement);
15748                    this.buildButtons();
15749                    if (!this.built) this.initEvents();
15750                    this.built = true;
15751                }
15752                unload() {
15753                    if (this.built) {
15754                        this.reset();
15755                        this.options.logger.debug("Buttons: unload()");
15756                        util_Despot.removeAllListeners();
15757                        this.hide();
15758                        this.built = false;
15759                    }
15760                }
15761                hide(deep = false) {
15762                    html_hideElement(this.buttonsElement);
15763                    if (deep) {
15764                        html_hideElement(this.recordButton);
15765                        html_hideElement(this.pauseButton);
15766                        html_hideElement(this.resumeButton);
15767                        html_hideElement(this.previewButton);
15768                        html_hideElement(this.recordAgainButton);
15769                        html_hideElement(this.submitButton);
15770                        html_hideElement(this.audioOnRadioPair);
15771                        html_hideElement(this.audioOffRadioPair);
15772                    }
15773                }
15774                show() {
15775                    html_showElement(this.buttonsElement);
15776                }
15777                isCountingDown() {
15778                    return this.container.isCountingDown();
15779                }
15780            }
15781            const buttons = Buttons;
15782            function isHidden(element) {
15783                if (!element) return true;
15784                const display = element.style.getPropertyValue("display");
15785                return display.includes("none");
15786            }
15787            const html_isHidden = isHidden;
15788            class Countdown {
15789                visuals;
15790                options;
15791                countdownElement;
15792                intervalId;
15793                countdown;
15794                paused = false;
15795                constructor(visuals, options){
15796                    this.visuals = visuals;
15797                    this.options = options;
15798                }
15799                fire(cb) {
15800                    this.unload();
15801                    this.hide();
15802                    setTimeout(function() {
15803                        cb();
15804                    }, 0);
15805                }
15806                countBackward(cb) {
15807                    if (!this.paused) {
15808                        this.options.logger.debug(`Countdown ${this.countdown}`);
15809                        if (void 0 !== this.countdown) {
15810                            this.countdown--;
15811                            if (this.countdown < 1) this.fire(cb);
15812                            else if (this.countdownElement) this.countdownElement.innerHTML = this.countdown.toString();
15813                        }
15814                    }
15815                }
15816                start(cb) {
15817                    if (!this.countdownElement) throw new Error("Unable to start countdown without an element");
15818                    if ("number" != typeof this.options.video.countdown) throw new TypeError(`The defined countdown is not a valid number: ${this.options.video.countdown}`);
15819                    this.countdown = this.options.video.countdown;
15820                    this.countdownElement.innerHTML = this.countdown.toString();
15821                    this.show();
15822                    this.intervalId = window.setInterval(this.countBackward.bind(this, cb), 950);
15823                }
15824                pause() {
15825                    this.paused = true;
15826                }
15827                resume() {
15828                    this.paused = false;
15829                }
15830                build() {
15831                    this.countdownElement = this.visuals.getElement()?.querySelector(".countdown");
15832                    if (this.countdownElement) this.hide();
15833                    else {
15834                        this.countdownElement = document.createElement("p");
15835                        this.countdownElement.className = "countdown";
15836                        this.hide();
15837                        this.visuals.appendChild(this.countdownElement);
15838                    }
15839                }
15840                show() {
15841                    html_showElement(this.countdownElement);
15842                }
15843                isCountingDown() {
15844                    return Boolean(this.intervalId);
15845                }
15846                unload() {
15847                    clearInterval(this.intervalId);
15848                    this.paused = false;
15849                    this.intervalId = void 0;
15850                }
15851                hide() {
15852                    html_hideElement(this.countdownElement);
15853                    this.unload();
15854                }
15855            }
15856            const countdown = Countdown;
15857            class FacingMode extends util_Despot {
15858                visuals;
15859                facingModeElement;
15860                constructor(visuals, options){
15861                    super("Facing Mode", options);
15862                    this.visuals = visuals;
15863                }
15864                initEvents() {
15865                    this.on("ERROR", ()=>{
15866                        this.hide();
15867                    });
15868                }
15869                build() {
15870                    this.facingModeElement = this.visuals.getElement()?.querySelector(".facingMode");
15871                    if (this.facingModeElement) this.hide();
15872                    else {
15873                        this.facingModeElement = document.createElement("button");
15874                        this.facingModeElement.classList.add("facingMode");
15875                        this.facingModeElement.innerHTML = "⤾";
15876                        this.facingModeElement.onclick = (e)=>{
15877                            e?.preventDefault();
15878                            try {
15879                                this.emit("SWITCH_FACING_MODE");
15880                            } catch (exc) {
15881                                this.emit("ERROR", {
15882                                    exc
15883                                });
15884                            }
15885                        };
15886                        this.hide();
15887                        this.visuals.appendChild(this.facingModeElement);
15888                    }
15889                    this.initEvents();
15890                }
15891                hide() {
15892                    html_hideElement(this.facingModeElement);
15893                }
15894                show() {
15895                    html_showElement(this.facingModeElement);
15896                }
15897            }
15898            const facingMode = FacingMode;
15899            class PausedNote {
15900                visuals;
15901                options;
15902                pausedBlockElement;
15903                pausedHeaderElement;
15904                pausedHintElement;
15905                constructor(visuals, options){
15906                    this.visuals = visuals;
15907                    this.options = options;
15908                }
15909                hasPausedHintText() {
15910                    return this.options.text.pausedHint;
15911                }
15912                build() {
15913                    this.pausedBlockElement = this.visuals.getElement()?.querySelector(".paused");
15914                    this.pausedHeaderElement = this.visuals.getElement()?.querySelector(".pausedHeader");
15915                    if (this.pausedHeaderElement) {
15916                        this.hide();
15917                        this.pausedHeaderElement.innerHTML = this.options.text.pausedHeader;
15918                        if (this.options.text.pausedHint && this.pausedHintElement) this.pausedHintElement.innerHTML = this.options.text.pausedHint;
15919                    } else {
15920                        this.pausedBlockElement = document.createElement("div");
15921                        this.pausedBlockElement.classList.add("paused");
15922                        this.pausedHeaderElement = document.createElement("p");
15923                        this.pausedHeaderElement.classList.add("pausedHeader");
15924                        this.hide();
15925                        this.pausedHeaderElement.innerHTML = this.options.text.pausedHeader;
15926                        this.pausedBlockElement.appendChild(this.pausedHeaderElement);
15927                        if (this.hasPausedHintText()) {
15928                            this.pausedHintElement = this.visuals.getElement()?.querySelector(".pausedHint");
15929                            if (!this.pausedHintElement) {
15930                                this.pausedHintElement = document.createElement("p");
15931                                this.pausedHintElement.classList.add("pausedHint");
15932                                this.pausedBlockElement.appendChild(this.pausedHintElement);
15933                            }
15934                            if (this.options.text.pausedHint) this.pausedHintElement.innerHTML = this.options.text.pausedHint;
15935                        }
15936                        this.visuals.appendChild(this.pausedBlockElement);
15937                    }
15938                }
15939                hide() {
15940                    html_hideElement(this.pausedBlockElement);
15941                }
15942                show() {
15943                    html_showElement(this.pausedBlockElement);
15944                }
15945            }
15946            const pausedNote = PausedNote;
15947            class RecordNote {
15948                visuals;
15949                recordNoteElement;
15950                constructor(visuals){
15951                    this.visuals = visuals;
15952                }
15953                build() {
15954                    this.recordNoteElement = this.visuals.getElement()?.querySelector(".recordNote");
15955                    if (this.recordNoteElement) this.hide();
15956                    else {
15957                        this.recordNoteElement = document.createElement("p");
15958                        this.recordNoteElement.classList.add("recordNote");
15959                        this.hide();
15960                        this.visuals.appendChild(this.recordNoteElement);
15961                    }
15962                }
15963                stop() {
15964                    this.hide();
15965                    this.recordNoteElement?.classList.remove("near");
15966                    this.recordNoteElement?.classList.remove("nigh");
15967                }
15968                setNear() {
15969                    this.recordNoteElement?.classList.add("near");
15970                }
15971                setNigh() {
15972                    this.recordNoteElement?.classList.add("nigh");
15973                }
15974                hide() {
15975                    html_hideElement(this.recordNoteElement);
15976                }
15977                show() {
15978                    html_showElement(this.recordNoteElement);
15979                }
15980            }
15981            const recorder_recordNote = RecordNote;
15982            function pad(n) {
15983                const absNum = Math.abs(n);
15984                if (absNum < 10) return n < 0 ? `-0${absNum}` : `0${absNum}`;
15985                return String(n);
15986            }
15987            const util_pad = pad;
15988            class RecordTimer {
15989                visuals;
15990                recordNote;
15991                options;
15992                recordTimerElement;
15993                nearComputed = false;
15994                endNighComputed = false;
15995                started = false;
15996                countdown;
15997                constructor(visuals, recordNote, options){
15998                    this.visuals = visuals;
15999                    this.recordNote = recordNote;
16000                    this.options = options;
16001                }
16002                thresholdReached(secs, threshold) {
16003                    return secs >= this.options.video.limitSeconds * threshold;
16004                }
16005                isNear(secs) {
16006                    if (!this.nearComputed && this.thresholdReached(secs, 0.6)) {
16007                        this.nearComputed = true;
16008                        return true;
16009                    }
16010                    return false;
16011                }
16012                endIsNigh(secs) {
16013                    if (!this.endNighComputed && this.thresholdReached(secs, 0.8)) {
16014                        this.endNighComputed = true;
16015                        return true;
16016                    }
16017                    return false;
16018                }
16019                setNear() {
16020                    this.recordTimerElement?.classList.add("near");
16021                }
16022                setNigh() {
16023                    this.recordTimerElement?.classList.add("nigh");
16024                }
16025                check(elapsedTime) {
16026                    const newCountdown = this.getStartSeconds() - Math.floor(elapsedTime / 1e3);
16027                    if (newCountdown !== this.countdown) {
16028                        this.countdown = newCountdown;
16029                        this.update();
16030                        if (this.countdown < 1) this.visuals.stop();
16031                    }
16032                }
16033                update() {
16034                    if (void 0 === this.countdown) throw new Error("Countdown is set to undefined, unable to update timer");
16035                    const mins = Math.floor(this.countdown / 60);
16036                    const secs = this.countdown - 60 * mins;
16037                    if (!this.nearComputed || !this.endNighComputed) {
16038                        const remainingSeconds = this.options.video.limitSeconds - this.countdown;
16039                        if (this.isNear(remainingSeconds)) {
16040                            this.recordNote.setNear();
16041                            this.setNear();
16042                            this.options.logger.debug(`End is near, ${this.countdown} seconds to go`);
16043                        } else if (this.endIsNigh(remainingSeconds)) {
16044                            this.recordNote.setNigh();
16045                            this.setNigh();
16046                            this.options.logger.debug(`End is nigh, ${this.countdown} seconds to go`);
16047                        }
16048                    }
16049                    if (this.recordTimerElement) this.recordTimerElement.innerHTML = `${mins}:${util_pad(secs)}`;
16050                }
16051                hide() {
16052                    html_hideElement(this.recordTimerElement);
16053                }
16054                show() {
16055                    this.recordTimerElement?.classList.remove("near");
16056                    this.recordTimerElement?.classList.remove("nigh");
16057                    html_showElement(this.recordTimerElement);
16058                }
16059                getSecondsRecorded() {
16060                    if (void 0 === this.countdown) return this.getSecondsRecorded();
16061                    return this.getStartSeconds() - this.countdown;
16062                }
16063                getStartSeconds() {
16064                    return this.options.video.limitSeconds;
16065                }
16066                setLimitSeconds(limitSeconds) {
16067                    this.options.video.limitSeconds = limitSeconds;
16068                }
16069                start() {
16070                    this.countdown = this.getStartSeconds();
16071                    this.nearComputed = this.endNighComputed = false;
16072                    this.started = true;
16073                    this.update();
16074                    this.show();
16075                }
16076                pause() {
16077                    this.recordNote.hide();
16078                }
16079                resume() {
16080                    this.recordNote.show();
16081                }
16082                isStopped() {
16083                    return void 0 === this.countdown;
16084                }
16085                stop() {
16086                    if (!this.isStopped() && this.started) {
16087                        this.options.logger.debug(`Stopping record timer. Was recording for about ~${this.get
16087SecondsRecorded()} seconds.`);
16088                        this.hide();
16089                        this.recordNote.stop();
16090                        this.countdown = void 0;
16091                        this.started = false;
16092                    }
16093                }
16094                build() {
16095                    this.recordTimerElement = this.visuals.getElement()?.querySelector(".recordTimer");
16096                    if (this.recordTimerElement) this.hide();
16097                    else {
16098                        this.recordTimerElement = document.createElement("p");
16099                        this.recordTimerElement.classList.add("recordTimer");
16100                        this.hide();
16101                        this.visuals.appendChild(this.recordTimerElement);
16102                    }
16103                }
16104            }
16105            const recordTimer = RecordTimer;
16106            class RecorderInsides extends util_Despot {
16107                recordNote;
16108                recordTimer;
16109                countdown;
16110                facingMode;
16111                pausedNote;
16112                built = false;
16113                constructor(visuals, options){
16114                    super("RecorderInsides", options);
16115                    this.recordNote = new recorder_recordNote(visuals);
16116                    this.recordTimer = new recordTimer(visuals, this.recordNote, options);
16117                    const browser = util_getBrowser(options);
16118                    if (options.video.countdown) this.countdown = new countdown(visuals, options);
16119                    if (options.video.facingModeButton && browser.isMobile()) this.facingMode = new facingMode(visuals, options);
16120                    if (options.enablePause) this.pausedNote = new pausedNote(visuals, options);
16121                }
16122                startRecording() {
16123                    this.recordTimer.start();
16124                }
16125                resumeRecording() {
16126                    this.recordTimer.resume();
16127                }
16128                stopRecording() {
16129                    this.recordTimer.stop();
16130                }
16131                pauseRecording() {
16132                    if (this.isCountingDown()) this.countdown?.pause();
16133                    else this.recordTimer.pause();
16134                }
16135                onResetting() {
16136                    this.hidePause();
16137                    this.hideCountdown();
16138                    this.recordTimer.stop();
16139                    this.facingMode?.hide();
16140                }
16141                initEvents() {
16142                    this.options.logger.debug("RecorderInsides: initEvents()");
16143                    this.on("USER_MEDIA_READY", ()=>{
16144                        this.facingMode?.show();
16145                    });
16146                    this.on("RECORDING", ()=>{
16147                        this.startRecording();
16148                    });
16149                    this.on("RESUMING", ()=>{
16150                        this.resumeRecording();
16151                    });
16152                    this.on("STOPPING", ()=>{
16153                        this.stopRecording();
16154                    });
16155                    this.on("PAUSED", ()=>{
16156                        this.pauseRecording();
16157                    });
16158                    this.on("ERROR", ()=>{
16159                        this.onResetting();
16160                    });
16161                    this.on("RESETTING", ()=>{
16162                        this.onResetting();
16163                    });
16164                    this.on("HIDE", ()=>{
16165                        this.hideCountdown();
16166                    });
16167                }
16168                build() {
16169                    this.options.logger.debug("RecorderInsides: build()");
16170                    this.countdown?.build();
16171                    this.pausedNote?.build();
16172                    this.facingMode?.build();
16173                    this.recordNote.build();
16174                    this.recordTimer.build();
16175                    if (!this.built) this.initEvents();
16176                    this.built = true;
16177                }
16178                unload() {
16179                    this.countdown?.unload();
16180                    this.built = false;
16181                }
16182                showPause() {
16183                    this.pausedNote?.show();
16184                }
16185                hidePause() {
16186                    this.pausedNote?.hide();
16187                }
16188                hideCountdown() {
16189                    this.countdown?.hide();
16190                }
16191                startCountdown(cb) {
16192                    this.countdown?.start(cb);
16193                }
16194                resumeCountdown() {
16195                    this.countdown?.resume();
16196                }
16197                isCountingDown() {
16198                    return this.countdown?.isCountingDown();
16199                }
16200                checkTimer(elapsedTime) {
16201                    this.recordTimer.check(elapsedTime);
16202                }
16203                setLimitSeconds(limitSeconds) {
16204                    this.options.video.limitSeconds = limitSeconds;
16205                    this.recordTimer.setLimitSeconds(limitSeconds);
16206                }
16207            }
16208            const recorderInsides = RecorderInsides;
16209            const NOTIFIER_MESSAGE_ID = "notifierMessage";
16210            class Notifier extends util_Despot {
16211                visuals;
16212                notifyElement;
16213                messageElement;
16214                explanationElement;
16215                entertainTimeoutId;
16216                entertaining = false;
16217                built = false;
16218                constructor(visuals, options){
16219                    super("Notifier", options);
16220                    this.visuals = visuals;
16221                }
16222                onStopping(limitReached = false) {
16223                    let lead = "";
16224                    this.visuals.beginWaiting();
16225                    if (limitReached) {
16226                        this.options.logger.debug("Limit reached");
16227                        lead += `${this.options.text.limitReached}.<br/>`;
16228                    }
16229                    lead += `${this.options.text.sending} …`;
16230                    this.notify(lead, void 0, {
16231                        stillWait: true,
16232                        entertain: this.options.notifier.entertain
16233                    });
16234                }
16235                onConnecting() {
16236                    this.notify("Connecting …");
16237                }
16238                onLoadingUserMedia() {
16239                    this.notify("Loading webcam …");
16240                }
16241                onProgress(frameProgress, sampleProgress) {
16242                    let overallProgress;
16243                    if (isAudioEnabled(this.options)) {
16244                        overallProgress = `Video: ${frameProgress}`;
16245                        if (sampleProgress) overallProgress += `, Audio: ${sampleProgress}`;
16246                    } else overallProgress = frameProgress;
16247                    this.setExplanation(overallProgress);
16248                }
16249                onBeginVideoEncoding() {
16250                    this.visuals.beginWaiting();
16251                    const lead = `${this.options.text.encoding} …`;
16252                    this.notify(lead, void 0, {
16253                        stillWait: true,
16254                        entertain: this.options.notifier.entertain
16255                    });
16256                    this.hideExplanation();
16257                }
16258                initEvents() {
16259                    this.options.logger.debug("Notifier: initEvents()");
16260                    this.on("CONNECTING", ()=>{
16261                        this.onConnecting();
16262                    });
16263                    this.on("LOADING_USER_MEDIA", ()=>{
16264                        this.onLoadingUserMedia();
16265                    });
16266                    this.on("USER_MEDIA_READY", (_params)=>{
16267                        this.correctNotifierDimensions();
16268                        this.hide();
16269                    });
16270                    this.on("PREVIEW", ()=>{
16271                        this.hide();
16272                    });
16273                    this.on("STOPPING", (params)=>{
16274                        this.onStopping(params.limitReached);
16275                    });
16276                    this.on("PROGRESS", (params)=>{
16277                        this.onProgress(params.frameProgress, params.sampleProgress);
16278                    });
16279                    this.on("BEGIN_VIDEO_ENCODING", ()=>{
16280                        this.onBeginVideoEncoding();
16281                    });
16282                    this.on("UNLOADING", ()=>{
16283                        this.notify("Unloading …");
16284                    });
16285                    this.on("DISCONNECTED", ()=>{
16286                        this.notify("Disconnected");
16287                    });
16288                    this.on("CONNECTED", ()=>{
16289                        this.notify("Connected");
16290                        if (this.options.loadUserMediaOnRecord) this.hide();
16291                    });
16292                    this.on("WINDOW_RESIZE", ()=>{
16293                        this.correctNotifierDimensions();
16294                    });
16295                }
16296                correctNotifierDimensions() {
16297                    if (!this.notifyElement) return;
16298                    if (this.options.video.stretch) {
16299                        const heightDimension = this.visuals.getRecorderHeight(true, true);
16300                        this.notifyElement.style.width = "auto";
16301                        if (heightDimension) this.notifyElement.style.height = `${heightDimension.value}${heightDimension.unit}`;
16302                    } else {
16303                        let heightDimension;
16304                        let widthDimension = dimensions_useFullWidth(this.options.video.mobileBreakPoint);
16305                        if (!widthDimension) {
16306                            widthDimension = this.visuals.getRecorderWidth(true);
16307                            heightDimension = this.visuals.getRecorderHeight(true);
16308                        }
16309                        if (widthDimension) this.notifyElement.style.width = `${widthDimension.value}${widthDimension.unit}`;
16310                        else this.notifyElement.style.removeProperty("width");
16311                        if (heightDimension) this.notifyElement.style.height = `${heightDimension.value}${heightDimension.unit}`;
16312                        else this.notifyElement.style.removeProperty("height");
16313                    }
16314                }
16315                show() {
16316                    html_showElement(this.notifyElement);
16317                }
16318                runEntertainment() {
16319                    if (this.options.notifier.entertain) {
16320                        if (!this.entertaining) {
16321                            const randomBackgroundClass = Math.floor(Math.random() * this.options.notifier.entertainLimit + 1);
16322                            if (this.notifyElement) this.notifyElement.className = `notifier entertain ${this.options.notifier.entertainClass}${randomBackgroundClass}`;
16323                            this.entertainTimeoutId = window.setTimeout(this.runEntertainment.bind(this), this.options.notifier.entertainInterval);
16324                            this.entertaining = true;
16325                        }
16326                    } else this.cancelEntertainment();
16327                }
16328                cancelEntertainment() {
16329                    if (this.notifyElement) this.notifyElement.classList.remove("entertain");
16330                    clearTimeout(this.entertainTimeoutId);
16331                    this.entertainTimeoutId = void 0;
16332                    this.entertaining = false;
16333                }
16334                error(err) {
16335                    const message = err.message;
16336                    const explanation = err.explanation;
16337                    if (!message) this.options.logger.debug(`Weird empty error message generated for error ${util_pretty(err)}`);
16338                    this.notify(message, explanation, {
16339                        blocking: true,
16340                        problem: true,
16341                        classList: err.getClassList(),
16342                        removeDimensions: util_getBrowser(this.options).isMobile()
16343                    });
16344                }
16345                getMessageElement() {
16346                    if (this.messageElement) return this.messageElement;
16347                    this.messageElement = document.querySelector(`#${NOTIFIER_MESSAGE_ID}`);
16348                    return this.messageElement;
16349                }
16350                setMessage(message, messageOptions) {
16351                    this.options.logger.debug(`Notifier: setMessage(${message})`);
16352                    if (!this.getMessageElement()) {
16353                        this.messageElement = document.createElement("h2");
16354                        this.messageElement.id = NOTIFIER_MESSAGE_ID;
16355                        if (this.notifyElement) if (this.explanationElement) this.notifyElement.insertBefore(this.messageElement, this.explanationElement);
16356                        else this.notifyElement.appendChild(this.messageElement);
16357                        else this.options.logger.warn(`Unable to show message ${message} because notifyElement is empty`);
16358                    }
16359                    if (message.length > 0) if (this.messageElement) {
16360                        const problem = messageOptions?.problem;
16361                        this.messageElement.innerHTML = (problem ? "&#x2639; " : "") + message;
16362                    } else this.options.logger.warn("There is no message element for displaying a message");
16363                    else this.options.logger.warn("Not going to update notifierMessage element because message is empty");
16364                    html_showElement(this.messageElement);
16365                }
16366                setExplanation(explanation) {
16367                    this.options.logger.debug(`Notifier: setExplanation(${explanation})`);
16368                    if (!this.explanationElement) {
16369                        this.explanationElement = document.createElement("p");
16370                        this.explanationElement.classList.add("explanation");
16371                        if (this.notifyElement) this.notifyElement.appendChild(this.explanationElement);
16372                        else this.options.logger.warn(`Unable to show explanation because notifyElement is empty: ${explanation}`);
16373                    }
16374                    this.explanationElement.innerHTML = explanation;
16375                    html_showElement(this.explanationElement);
16376                }
16377                build() {
16378                    this.options.logger.debug("Notifier: build()");
16379                    this.notifyElement = this.visuals.getElement()?.querySelector(".notifier");
16380                    if (this.notifyElement) this.hide();
16381                    else {
16382                        this.notifyElement = document.createElement("div");
16383                        this.hide();
16384                        this.visuals.appendChild(this.notifyElement);
16385                    }
16386                    if (!this.built) this.initEvents();
16387                    this.built = true;
16388                }
16389                hideMessage() {
16390                    html_hideElement(this.getMessageElement());
16391                }
16392                hideExplanation() {
16393                    html_hideElement(this.explanationElement);
16394                }
16395                hide() {
16396                    this.cancelEntertainment();
16397                    if (this.notifyElement) {
16398                        html_hideElement(this.notifyElement);
16399                        this.notifyElement.classList.remove("blocking");
16400                    }
16401                    this.hideMessage();
16402                    this.hideExplanation();
16403                }
16404                isVisible() {
16405                    if (!this.built) return false;
16406                    return this.notifyElement && !html_isHidden(this.notifyElement);
16407                }
16408                isBuilt() {
16409                    return this.built;
16410                }
16411                notify(message, explanation, notifyOptions = {}) {
16412                    const params = [
16413                        message,
16414                        explanation
16415                    ].filter(Boolean);
16416                    this.options.logger.debug(`Notifier: notify(${params.join(", ")})`);
16417                    const stillWait = notifyOptions.stillWait ?? false;
16418                    const entertain = notifyOptions.entertain ?? false;
16419                    const blocking = notifyOptions.blocking ?? false;
16420                    const classList = notifyOptions.classList ?? false;
16421                    const removeDimensions = notifyOptions.removeDimensions ?? false;
16422                    if (this.notifyElement) {
16423                        if (!entertain) this.notifyElement.className = "notifier";
16424                        if (classList) classList.forEach((className)=>{
16425                            this.notifyElement?.classList.add(className);
16426                        });
16427                        if (removeDimensions) {
16428                            this.notifyElement.style.width = "auto";
16429                            this.notifyElement.style.height = "auto";
16430                        }
16431                    }
16432                    if (blocking) {
16433                        this.notifyElement?.classList.add("blocking");
16434                        this.emit("BLOCKING");
16435                    } else this.emit("NOTIFYING");
16436                    this.visuals.hideReplay();
16437                    this.visuals.hideRecorder();
16438                    this.setMessage(message, notifyOptions);
16439                    if (explanation && explanation.length > 0) this.setExplanation(explanation);
16440                    if (entertain) this.runEntertainment();
16441                    else this.cancelEntertainment();
16442                    this.visuals.showVisuals();
16443                    this.show();
16444                    if (!stillWait) this.visuals.endWaiting();
16445                }
16446            }
16447            const notifier = Notifier;
16448            var animitter = __webpack_require__(8824);
16449            var animitter_default = /*#__PURE__*/ __webpack_require__.n(animitter);
16450            var typedarray_to_buffer = __webpack_require__(4527);
16451            const canvas_to_buffer_modern_e = "u" > typeof document && "function" == typeof document.createElement, canvas_to_buffer_modern_i = canvas_to_buffer_modern_e ? [
16452                "webp",
16453                "jpeg"
16454            ] : [
16455                "png"
16456            ];
16457            let canvas_to_buffer_modern_s;
16458            class canvas_to_buffer_modern_r {
16459                constructor(t, e = canvas_to_buffer_modern_i, s = .5){
16460                    if (this.quality = void 0, this.types = void 0, this.canvas = void 0, e.length > 2) throw new Error("Too many image types are specified!");
16461                    this.canvas = t, this.quality = s, this.types = e;
16462                }
16463                composeMimeType(t) {
16464                    let e;
16465                    return this.types[t] && (e = "image/" + this.types[t]), e;
16466                }
16467                isMatch(t, e) {
16468                    return t.match(e);
16469                }
16470                getTestCanvas() {
16471                    let t;
16472                    return canvas_to_buffer_modern_e ? (t = document.createElement("canvas"), t.width = t.height = 1) : t = this.canvas, t;
16473                }
16474                canvasSupportsMimeType(t) {
16475                    try {
16476                        const e = this.getTestCanvas(), i = e.toDataURL && e.toDataURL(t);
16477                        return this.isMatch(i, t);
16478                    } catch (t) {
16479                        return !1;
16480                    }
16481                }
16482                figureMimeType() {
16483                    let t = this.composeMimeType(0);
16484                    return t && this.canvasSupportsMimeType(t) || (this.types[1] ? (t = this.composeMimeType(1), t && !this.canvasSupportsMimeType(t) && (t = void 0)) : t = void 0), t;
16485                }
16486                uriToBuffer(i) {
16487                    const s = i.split(",")[1];
16488                    let o;
16489                    if (!s) throw new Error("Empty uri string given!");
16490                    if (o = canvas_to_buffer_modern_e ? window.atob(s) : null == canvas_to_buffer_modern_r.atob ? void 0 : canvas_to_buffer_modern_r.atob(s), !o) throw new Error("Byte are empty, something within atob went wrong.");
16491                    const n = new Uint8Array(o.length);
16492                    for(let t = 0, e = o.length; t < e; t++)n[t] = o.charCodeAt(t);
16493                    return typedarray_to_buffer(n);
16494                }
16495                toBuffer() {
16496                    const t = this.getMimeType();
16497                    let e;
16498                    if (t) {
16499                        const i = this.canvas.toDataURL(t, this.quality);
16500                        e = this.uriToBuffer(i);
16501                    }
16502                    return e;
16503                }
16504                getMimeType() {
16505                    return canvas_to_buffer_modern_s && canvas_to_buffer_modern_e || (canvas_to_buffer_modern_s = this.figureMimeType()), canvas_to_buffer_modern_s;
16506                }
16507            }
16508            canvas_to_buffer_modern_r.atob = void 0;
16509            var websocket_stream_stream = __webpack_require__(9967);
16510            var stream_default = /*#__PURE__*/ __webpack_require__.n(websocket_stream_stream);
16511            function getEdgeCodes(value, amount, fromEnd) {
16512                const chars = fromEnd ? value.slice(-amount) : value.slice(0, amount);
16513                const codes = Array.from(chars, (char)=>String(char.codePointAt(0))).join(".");
16514                return codes || "none";
16515            }
16516            function hasControlCharacters(value) {
16517                return Array.from(value).some((char)=>{
16518                    const code = char.codePointAt(0);
16519                    if (void 0 === code) return false;
16520                    return code <= 31 || 127 === code;
16521                });
16522            }
16523            function probeWebSocketConstructor(url) {
16524                try {
16525                    const socket = new WebSocket(url);
16526                    socket.close();
16527                    return "ok";
16528                } catch (exc) {
16529                    if (exc instanceof Error) return `${exc.name}:${exc.message}`;
16530                    return String(exc);
16531                }
16532            }
16533            function getLanguagesValue() {
16534                const languageList = navigator.languages;
16535                if (languageList.length > 0) return languageList.join(",");
16536                return navigator.language || "none";
16537            }
16538            function getAutomationSignals(probeBase, probeSimpleQuery) {
16539                const reasons = [];
16540                if (navigator.webdriver) reasons.push("webdriver=true");
16541                if (/HeadlessChrome|PhantomJS|puppeteer|playwright/iu.test(navigator.userAgent)) reasons.push("headless_ua_marker");
16542                if (0 === navigator.languages.length) reasons.push("no_languages");
16543                if ("ok" !== probeBase) reasons.push("probe_base_failed");
16544                if ("ok" !== probeSimpleQuery) reasons.push("probe_simple_query_failed");
16545                return {
16546                    looksAutomated: reasons.length > 0,
16547                    reasons: reasons.length > 0 ? reasons.join(",") : "none"
16548                };
16549            }
16550            function getWebSocketDiagnostic(url2Connect) {
16551                const wsCtorFingerprint = String(globalThis.WebSocket).slice(0, 80).replace(/\s+/gu, " ");
16552                const wsCtorNative = wsCtorFingerprint.includes("[native code]");
16553                let urlParsedProtocol = "invalid";
16554                try {
16555                    urlParsedProtocol = new URL(url2Connect).protocol;
16556                } catch (_exc) {}
16557                const urlHasWhitespace = /\s/u.test(url2Connect);
16558                const urlHasControlChars = hasControlCharacters(url2Connect);
16559                const urlHasReplacementChar = url2Connect.includes("\uFFFD");
16560                const probeBase = probeWebSocketConstructor("wss://videomail.io");
16561                const probeWithSimpleQuery = probeWebSocketConstructor("wss://videomail.io/?a=b");
16562                const languages = getLanguagesValue();
16563                const automationSignals = getAutomationSignals(probeBase, probeWithSimpleQuery);
16564                const diagnosticPairs = [
16565                    `webdriver=${String(navigator.webdriver)}`,
16566                    `wsCtorNative=${String(wsCtorNative)}`,
16567                    `looksAutomated=${String(automationSignals.looksAutomated)}`,
16568                    `automationReasons=${automationSignals.reasons}`,
16569                    `urlLen=${url2Connect.length}`,
16570                    `urlParsedProtocol=${urlParsedProtocol}`,
16571                    `locationProtocol=${location.protocol}`,
16572                    `secureContext=${String(globalThis.isSecureContext)}`,
16573                    `online=${String(navigator.onLine)}`,
16574                    `languages=${languages}`,
16575                    `urlHasWhitespace=${String(urlHasWhitespace)}`,
16576                    `urlHasControlChars=${String(urlHasControlChars)}`,
16577                    `urlHasReplacementChar=${String(urlHasReplacementChar)}`,
16578                    `probeBase=${probeBase}`,
16579                    `probeSimpleQuery=${probeWithSimpleQuery}`,
16580                    `urlFirstCodes=${getEdgeCodes(url2Connect, 4)}`,
16581                    `urlLastCodes=${getEdgeCodes(url2Connect, 4, true)}`,
16582                    "ipAsnCheck=server_side_only"
16583                ];
16584                return {
16585                    text: `websocketDiagnostics(v3): ${diagnosticPairs.join("; ")}`,
16586                    looksAutomated: automationSignals.looksAutomated
16587                };
16588            }
16589            const error_getWebSocketDiagnostic = getWebSocketDiagnostic;
16590            function figureMinHeight(height, options) {
16591                let minHeight;
16592                if (options.video.height) {
16593                    minHeight = height ? Math.min(options.video.height, height) : options.video.height;
16594                    if (minHeight < 1) throw error_createError({
16595                        message: `Got a min height less than 1 (${minHeight})!`,
16596                        options
16597                    });
16598                } else minHeight = height;
16599                return minHeight;
16600            }
16601            const dimensions_figureMinHeight = figureMinHeight;
16602            function getRatio(options, videoHeight, videoWidth) {
16603                let ratio = 1;
16604                const hasVideoDimensions = videoHeight && videoWidth;
16605                const desiredHeight = options.video.height;
16606                const desiredWidth = options.video.width;
16607                const hasDesiredDimensions = desiredHeight && desiredWidth;
16608                if (hasDesiredDimensions) ratio = hasVideoDimensions ? videoHeight < desiredHeight || videoWidth < desiredWidth ? videoHeight / videoWidth : desiredHeight / desiredWidth : desiredHeight / desiredWidth;
16609                else if (hasVideoDimensions) ratio = videoHeight / videoWidth;
16610                return ratio;
16611            }
16612            const dimensions_getRatio = getRatio;
16613            function calculateHeight(responsive, videoWidth, options, ratio, element) {
16614                const dimension = {
16615                    unit: "px"
16616                };
16617                let width = videoWidth;
16618                if (responsive && element) {
16619                    const limitedDimension = dimensions_limitWidth(element, options, width);
16620                    width = limitedDimension.value;
16621                }
16622                const chosenRatio = ratio ?? dimensions_getRatio(options, void 0, videoWidth);
16623                const height = width ? Math.round(width * chosenRatio) : void 0;
16624                if (height && Number.isInteger(height) && height < 1) throw error_createError({
16625                    message: "Just calculated a height less than 1 which is wrong.",
16626                    options
16627                });
16628                const minHeight = dimensions_figureMinHeight(height, options);
16629                dimension.value = minHeight;
16630                return dimension;
16631            }
16632            const dimensions_calculateHeight = calculateHeight;
16633            function calculateWidth(responsive, options, videoHeight, ratio) {
16634                const dimension = {
16635                    unit: "px"
16636                };
16637                let height = dimensions_figureMinHeight(videoHeight, options);
16638                if (responsive) {
16639                    const limitedDimension = dimensions_limitHeight(height, options, "calculateWidth");
16640                    height = limitedDimension.value;
16641                }
16642                if (!height || height < 1) throw error_createError({
16643                    message: `Height ${height} cannot be smaller than 1 when calculating width.`,
16644                    options
16645                });
16646                const chosenRatio = ratio ?? dimensions_getRatio(options, videoHeight);
16647                const calculatedWidth = Math.round(height / chosenRatio);
16648                if (calculatedWidth < 1) throw error_createError({
16649                    message: "Calculated width cannot be smaller than 1!",
16650                    options
16651                });
16652                dimension.value = calculatedWidth;
16653                return dimension;
16654            }
16655            const dimensions_calculateWidth = calculateWidth;
16656            class audio_sample_modern_t {
16657                constructor(r){
16658                    this.float32Array = void 0, this.float32Array = r;
16659                }
16660                toBuffer() {
16661                    const t = new Int16Array(this.float32Array.length);
16662                    return this.float32Array.forEach((r, a)=>{
16663                        t[a] = 32767 * Math.min(1, r);
16664                    }), typedarray_to_buffer(t);
16665                }
16666            }
16667            var is_power_of_two = __webpack_require__(8646);
16668            var is_power_of_two_default = /*#__PURE__*/ __webpack_require__.n(is_power_of_two);
16669            const CHANNELS = 1;
16670            function getAudioContextClass() {
16671                return window.AudioContext;
16672            }
16673            class AudioRecorder {
16674                scriptProcessor;
16675                audioInput;
16676                vcAudioContext;
16677                userMedia;
16678                options;
16679                constructor(userMedia, options){
16680                    this.options = options;
16681                    this.userMedia = userMedia;
16682                }
16683                hasAudioContext() {
16684                    return Boolean(getAudioContextClass()) && Boolean(this.getAudioContext());
16685                }
16686                getAudioContext() {
16687                    if (!this.vcAudioContext) {
16688                        const AudioContext = getAudioContextClass();
16689                        this.vcAudioContext = new AudioContext();
16690                    }
16691                    return this.vcAudioContext;
16692                }
16693                onAudioProcess(e, cb) {
16694                    if (!this.userMedia.isRecording() || this.userMedia.isPaused()) return;
16695                    const float32Array = e.inputBuffer.getChannelData(0);
16696                    cb(new audio_sample_modern_t(float32Array));
16697                }
16698                init(localMediaStream) {
16699                    this.options.logger.debug("AudioRecorder: init()");
16700                    const volume = this.getAudioContext().createGain();
16701                    try {
16702                        this.audioInput = this.getAudioContext().createMediaStreamSource(localMediaStream);
16703                    } catch (exc) {
16704                        throw error_createError({
16705                            message: "Webcam has no audio",
16706                            exc,
16707                            options: this.options
16708                        });
16709                    }
16710                    let { bufferSize } = this.options.audio;
16711                    if ("auto" === bufferSize) bufferSize = util_getBrowser(this.options).isFirefox() ? 512 : 2048;
16712                    if (!is_power_of_two_default()(bufferSize)) throw error_createError({
16713                        message: "Audio buffer size must be a power of two.",
16714                        options: this.options
16715                    });
16716                    if (!this.options.audio.volume || src_options.audio.volume > 1) throw error_createError({
16717                        message: "Audio volume must be between zero and one.",
16718                        options: this.options
16719                    });
16720                    volume.gain.value = this.options.audio.volume;
16721                    this.scriptProcessor = this.getAudioContext().createScriptProcessor(bufferSize, CHANNELS, CHANNELS);
16722                    this.audioInput.connect(this.scriptProcessor);
16723                    this.scriptProcessor.connect(this.getAudioContext().destination);
16724                    this.audioInput.connect(volume);
16725                    volume.connect(this.scriptProcessor);
16726                }
16727                record(cb) {
16728                    this.options.logger.debug("AudioRecorder: record()");
16729                    if (this.scriptProcessor) this.scriptProcessor.onaudioprocess = (e)=>{
16730                        this.onAudioProcess(e, cb);
16731                    };
16732                }
16733                stop() {
16734                    this.options.logger.debug("AudioRecorder: stop()");
16735                    if (this.scriptProcessor) this.scriptProcessor.onaudioprocess = null;
16736                    if (this.audioInput) this.audioInput.disconnect();
16737                    if (this.hasAudioContext()) this.getAudioContext().close().then(()=>{
16738                        this.options.logger.debug("AudioRecorder: audio context is closed");
16739                        this.vcAudioContext = void 0;
16740                    }).catch(function(err) {
16741                        if (err instanceof Error) throw error_createError({
16742                            err,
16743                            options: src_options
16744                        });
16745                        throw err;
16746                    });
16747                }
16748                getSampleRate() {
16749                    if (this.hasAudioContext()) return this.getAudioContext().sampleRate;
16750                    return -1;
16751                }
16752            }
16753            const media_AudioRecorder = AudioRecorder;
16754            function getFirstVideoTrack(localMediaStream) {
16755                const videoTracks = localMediaStream.getVideoTracks();
16756                let videoTrack;
16757                if (videoTracks[0]) videoTrack = videoTracks[0];
16758                return videoTrack;
16759            }
16760            const media_getFirstVideoTrack = getFirstVideoTrack;
16761            const MEDIA_EVENTS = [
16762                "loadstart",
16763                "suspend",
16764                "progress",
16765                "abort",
16766                "emptied",
16767                "stalled",
16768                "pause",
16769                "loadeddata",
16770                "waiting",
16771                "playing",
16772                "canplay",
16773                "canplaythrough",
16774                "seeking",
16775                "seeked",
16776                "ended",
16777                "ratechange",
16778                "durationchange",
16779                "volumechange"
16780            ];
16781            const mediaEvents = MEDIA_EVENTS;
16782            const VIRTUAL_KEYWORDS = [
16783                "obs",
16784                "virtual",
16785                "manycam",
16786                "vcam",
16787                "splitcam",
16788                "droidcam"
16789            ];
16790            function isVirtualCamera(videoTrack) {
16791                const capabilities = videoTrack.getCapabilities();
16792                if (!capabilities.frameRate) return true;
16793                return VIRTUAL_KEYWORDS.some((keyword)=>videoTrack.label.toLowerCase().includes(keyword));
16794            }
16795            const util_isVirtualCamera = isVirtualCamera;
16796            const EVENT_ASCII = "|—O—|";
16797            class UserMedia extends util_Despot {
16798                recorder;
16799                rawVisualUserMedia;
16800                paused = false;
16801                recording = false;
16802                audioRecorder;
16803                currentVisualStream;
16804                onPlayReached = false;
16805                onLoadedMetaDataReached = false;
16806                playingPromiseReached = false;
16807                videoTrackLabel;
16808                constructor(recorder, options){
16809                    super("UserMedia", options);
16810                    this.recorder = recorder;
16811                    this.rawVisualUserMedia = recorder.getRawVisualUserMedia();
16812                    mediaEvents.forEach((eventName)=>{
16813                        this.rawVisualUserMedia?.addEventListener(eventName, this.outputEvent.bind(this), false);
16814                    });
16815                }
16816                attachMediaStream(stream) {
16817                    this.currentVisualStream = stream;
16818                    if (this.rawVisualUserMedia) this.rawVisualUserMedia.srcObject = stream;
16819                    else throw error_createError({
16820                        message: "Error attaching stream to element.",
16821                        explanation: "Contact the developer about this",
16822                        options: this.options
16823                    });
16824                }
16825                setVisualStream(localMediaStream) {
16826                    if (localMediaStream) this.attachMediaStream(localMediaStream);
16827                    else {
16828                        this.rawVisualUserMedia?.removeAttribute("srcObject");
16829                        this.rawVisualUserMedia?.removeAttribute("src");
16830                        this.currentVisualStream = void 0;
16831                    }
16832                }
16833                hasEnded() {
16834                    if (this.rawVisualUserMedia?.ended) return this.rawVisualUserMedia.ended;
16835                    return !this.currentVisualStream?.active;
16836                }
16837                hasInvalidDimensions() {
16838                    if (this.rawVisualUserMedia?.videoWidth && this.rawVisualUserMedia.videoWidth < 3 || this.rawVisualUserMedia?.height && this.rawVisualUserMedia.height < 3) return true;
16839                    return false;
16840                }
16841                logEvent(eventType, params) {
16842                    this.options.logger.debug(`UserMedia: ... ${EVENT_ASCII} event ${eventType}: ${util_pretty(params)}`);
16843                }
16844                outputEvent(e) {
16845                    this.logEvent(e.type, {
16846                        readyState: this.rawVisualUserMedia?.readyState
16847                    });
16848                    this.rawVisualUserMedia?.removeEventListener(e.type, this.outputEvent.bind(this));
16849                }
16850                unloadRemainingEventListeners() {
16851                    this.options.logger.debug("UserMedia: unloadRemainingEventListeners()");
16852                    mediaEvents.forEach((eventName)=>{
16853                        this.rawVisualUserMedia?.removeEventListener(eventName, this.outputEvent.bind(this));
16854                    });
16855                }
16856                audioRecord(audioCallback) {
16857                    util_Despot.removeListener("SENDING_FIRST_FRAME");
16858                    this.audioRecorder?.record(audioCallback);
16859                }
16860                init(localMediaStream, videoCallback, audioCallback, endedEarlyCallback, switchingFacingMode) {
16861                    this.stop(localMediaStream, {
16862                        aboutToInitialize: true,
16863                        switchingFacingMode
16864                    });
16865                    this.onPlayReached = false;
16866                    this.onLoadedMetaDataReached = false;
16867                    this.playingPromiseReached = false;
16868                    this.videoTrackLabel = void 0;
16869                    if (isAudioEnabled(this.options)) this.audioRecorder ??= new media_AudioRecorder(this, this.options);
16870                    const unloadAllEventListeners = ()=>{
16871                        this.options.logger.debug("UserMedia: unloadAllEventListeners()");
16872                        this.unloadRemainingEventListeners();
16873                        util_Despot.removeListener("SENDING_FIRST_FRAME");
16874                        this.rawVisualUserMedia?.removeEventListener("play", onPlay);
16875                        this.rawVisualUserMedia?.removeEventListener("loadedmetadata", onLoadedMetaData);
16876                    };
16877                    const play = ()=>{
16878                        try {
16879                            this.rawVisualUserMedia?.load();
16880                            if (this.rawVisualUserMedia?.paused) {
16881                                this.options.logger.debug(`UserMedia: play(): media.readyState=${this.rawVisualUserMedia.readyState}, media.paused=${this.rawVisualUserMedia.paused}, media.ended=${this.rawVisualUserMedia.ended}, media.played=${util_pretty(this.rawVisualUserMedia.played)}`);
16882                                this.rawVisualUserMedia.play().then(()=>{
16883                                    if (!this.playingPromiseReached) {
16884                                        this.options.logger.debug("UserMedia: play promise successful. Playing now.");
16885                                        this.playingPromiseReached = true;
16886                                    }
16887                                }).catch((exc)=>{
16888                                    if (exc instanceof Error) this.options.logger.warn(`Caught pending user media promise exception: ${exc.toString()}`);
16889                                    else throw error_createError({
16890                                        message: "Failed to play user media upon play event.",
16891                                        exc,
16892                                        options: this.options
16893                                    });
16894                                });
16895                            }
16896                        } catch (exc) {
16897                            unloadAllEventListeners();
16898                            endedEarlyCallback(exc);
16899                        }
16900                    };
16901                    const fireCallbacks = ()=>{
16902                        const readyState = this.rawVisualUserMedia?.readyState;
16903                        this.options.logger.debug(`UserMedia: fireCallbacks(readyState=${readyState}, onPlayReached=${this.onPlayReached}, onLoadedMetaDataReached=${this.onLoadedMetaDataReached})`);
16904                        if (this.onPlayReached && this.onLoadedMetaDataReached) {
16905                            videoCallback();
16906                            if (this.audioRecorder) try {
16907                                this.audioRecorder.init(localMediaStream);
16908                                this.on("SENDING_FIRST_FRAME", ()=>{
16909                                    this.audioRecord(audioCallback);
16910                                });
16911                            } catch (exc) {
16912                                unloadAllEventListeners();
16913                                endedEarlyCallback(exc);
16914                            }
16915                        }
16916                    };
16917                    const onPlay = ()=>{
16918                        try {
16919                            this.logEvent("play", {
16920                                readyState: this.rawVisualUserMedia?.readyState,
16921                                audio: isAudioEnabled(this.options),
16922                                width: this.rawVisualUserMedia?.width,
16923                                height: this.rawVisualUserMedia?.height,
16924                                videoWidth: this.rawVisualUserMedia?.videoWidth,
16925                                videoHeight: this.rawVisualUserMedia?.videoHeight
16926                            });
16927                            this.rawVisualUserMedia?.removeEventListener("play", onPlay);
16928                            if (this.hasEnded() || this.hasInvalidDimensions()) endedEarlyCallback(error_createError({
16929                                message: "Already busy",
16930                                explanation: "Probably another browser window is using your webcam?",
16931                                options: this.options
16932                            }));
16933                            else {
16934                                this.onPlayReached = true;
16935                                fireCallbacks();
16936                            }
16937                        } catch (exc) {
16938                            unloadAllEventListeners();
16939                            endedEarlyCallback(exc);
16940                        }
16941                    };
16942                    const onLoadedMetaData = ()=>{
16943                        this.logEvent("loadedmetadata", {
16944                            readyState: this.rawVisualUserMedia?.readyState,
16945                            paused: this.rawVisualUserMedia?.paused,
16946                            width: this.rawVisualUserMedia?.width,
16947                            height: this.rawVisualUserMedia?.height,
16948                            videoWidth: this.rawVisualUserMedia?.videoWidth,
16949                            videoHeight: this.rawVisualUserMedia?.videoHeight
16950                        });
16951                        this.rawVisualUserMedia?.removeEventListener("loadedmetadata", onLoadedMetaData);
16952                        if (!this.hasEnded() && !this.hasInvalidDimensions()) {
16953                            this.emit("LOADED_META_DATA");
16954                            this.onLoadedMetaDataReached = true;
16955                            fireCallbacks();
16956                        }
16957                    };
16958                    try {
16959                        const videoTrack = media_getFirstVideoTrack(localMediaStream);
16960                        this.videoTrackLabel = videoTrack?.label;
16961                        if (videoTrack) if (videoTrack.enabled) if (util_isVirtualCamera(videoTrack)) throw error_createError({
16962                            message: "Virtual cameras are not allowed.",
16963                            explanation: `Please use a real camera, not "${videoTrack.label}".`,
16964                            options: this.options
16965                        });
16966                        else {
16967                            let description = "";
16968                            if (videoTrack.label.length > 0) description = description.concat(videoTrack.label);
16969                            description = description.concat(` with enabled=${videoTrack.enabled}, muted=${videoTrack.muted}, readyState=${videoTrack.readyState}`);
16970                            this.options.logger.debug(`UserMedia: ${videoTrack.kind} detected. ${description}`);
16971                        }
16972                        else throw error_createError({
16973                            message: "Webcam is disabled",
16974                            explanation: "The video track seems to be disabled. Enable it in your system.",
16975                            options: this.options
16976                        });
16977                        else this.options.logger.debug("UserMedia: detected (but no video tracks exist");
16978                        this.rawVisualUserMedia?.addEventListener("loadedmetadata", onLoadedMetaData);
16979                        this.rawVisualUserMedia?.addEventListener("play", onPlay);
16980                        this.rawVisualUserMedia?.addEventListener("error", (err)=>{
16981                            this.options.logger.warn(`Caught video element error event: ${util_pretty(err)}`);
16982                        });
16983                        this.setVisualStream(localMediaStream);
16984                        play();
16985                    } catch (exc) {
16986                        this.emit("ERROR", {
16987                            exc
16988                        });
16989                    }
16990                }
16991                getVideoTrackLabel() {
16992                    return this.videoTrackLabel;
16993                }
16994                isReady() {
16995                    return Boolean(this.rawVisualUserMedia?.src);
16996                }
16997                stop(visualStream, params) {
16998                    try {
16999                        let chosenStream = visualStream;
17000                        if (!params?.aboutToInitialize) {
17001                            chosenStream ??= this.currentVisualStream;
17002                            const tracks = chosenStream?.getTracks();
17003                            if (tracks) tracks.forEach((track)=>{
17004                                track.stop();
17005                            });
17006                            this.setVisualStream();
17007                            this.audioRecorder?.stop();
17008                            this.audioRecorder = void 0;
17009                        }
17010                        if (!params?.switchingFacingMode) this.paused = this.recording = false;
17011                    } catch (exc) {
17012                        this.emit("ERROR", {
17013                            exc
17014                        });
17015                    }
17016                }
17017                createCanvas() {
17018                    const canvas = document.createElement("canvas");
17019                    const rawWidthDimension = this.getRawWidth(true);
17020                    if (rawWidthDimension.value) canvas.width = rawWidthDimension.value;
17021                    const rawHeight = this.getRawHeight(true);
17022                    if (rawHeight) canvas.height = rawHeight;
17023                    return canvas;
17024                }
17025                getVideoHeight() {
17026                    if (!this.rawVisualUserMedia) return;
17027                    return this.rawVisualUserMedia.videoHeight || this.rawVisualUserMedia.height;
17028                }
17029                getVideoWidth() {
17030                    if (!this.rawVisualUserMedia) return;
17031                    return this.rawVisualUserMedia.videoWidth || this.rawVisualUserMedia.width;
17032                }
17033                hasVideoWidth() {
17034                    const videoWidth = this.getVideoWidth();
17035                    return videoWidth && videoWidth > 0;
17036                }
17037                getRawWidth(responsive) {
17038                    let rawWidth;
17039                    const widthDimension = {
17040                        unit: "px"
17041                    };
17042                    rawWidth = responsive ? this.getVideoWidth() : this.options.video.width ? this.options.video.width : this.getVideoWidth();
17043                    if (responsive) {
17044                        const widthDimension = this.recorder.limitWidth(rawWidth);
17045                        rawWidth = widthDimension?.value;
17046                    }
17047                    widthDimension.value = rawWidth;
17048                    return widthDimension;
17049                }
17050                getRawHeight(responsive) {
17051                    let rawHeight;
17052                    if (responsive) {
17053                        rawHeight = this.options.video.height || this.getVideoHeight();
17054                        const ratio = this.recorder.getRatio();
17055                        const rawWidth = this.getRawWidth(responsive);
17056                        if (void 0 !== ratio && rawWidth.value) rawHeight = rawWidth.value * ratio;
17057                    } else rawHeight = this.options.video.height ? this.options.video.height : this.getVideoHeight();
17058                    if (responsive) {
17059                        const heightDimension = this.recorder.limitHeight(rawHeight);
17060                        rawHeight = heightDimension.value;
17061                    }
17062                    return rawHeight;
17063                }
17064                getRawVisuals() {
17065                    return this.rawVisualUserMedia;
17066                }
17067                pause() {
17068                    this.paused = true;
17069                }
17070                isPaused() {
17071                    return this.paused;
17072                }
17073                resume() {
17074                    this.paused = false;
17075                }
17076                record() {
17077                    this.recording = true;
17078                }
17079                isRecording() {
17080                    return this.recording;
17081                }
17082                getAudioSampleRate() {
17083                    if (this.audioRecorder) return this.audioRecorder.getSampleRate();
17084                    return -1;
17085                }
17086                getCharacteristics() {
17087                    return {
17088                        audioSampleRate: this.getAudioSampleRate(),
17089                        muted: this.rawVisualUserMedia?.muted,
17090                        width: this.rawVisualUserMedia?.width,
17091                        height: this.rawVisualUserMedia?.height,
17092                        videoWidth: this.rawVisualUserMedia?.videoWidth,
17093                        videoHeight: this.rawVisualUserMedia?.videoHeight
17094                    };
17095                }
17096            }
17097            const visuals_userMedia = UserMedia;
17098            var Buffer = __webpack_require__(8287).Buffer;
17099            const PIPE_SYMBOL = "°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸ ";
17100            class Recorder extends util_Despot {
17101                visuals;
17102                replay;
17103                loop;
17104                originalAnimationFrameObject;
17105                samplesCount = 0;
17106                framesCount = 0;
17107                recordingStats;
17108                confirmedFrameNumber = 0;
17109                confirmedSampleNumber = 0;
17110                recorderElement;
17111                userMedia;
17112                userMediaTimeout;
17113                retryTimeout;
17114                frameProgress;
17115                sampleProgress;
17116                canvas;
17117                ctx;
17118                userMediaLoaded;
17119                userMediaLoading = false;
17120                submitting = false;
17121                unloaded;
17122                stopTime;
17123                stream;
17124                connecting = false;
17125                connected = false;
17126                blocking = false;
17127                built = false;
17128                key;
17129                waitingTime;
17130                pingInterval;
17131                frame;
17132                recordingBuffer;
17133                facingMode;
17134                constructor(visuals, replay, options){
17135                    super("Recorder", options);
17136                    this.visuals = visuals;
17137                    this.replay = replay;
17138                    this.facingMode = options.video.facingMode;
17139                }
17140                writeStream(buffer, opts) {
17141                    if (this.stream) if (this.stream.destroyed) {
17142                        this.stopPings();
17143                        const err = error_createError({
17144                            message: "Already disconnected",
17145                            explanation: "Sorry, connection to the server has been destroyed. Please reload.",
17146                            options: this.options
17147                        });
17148                        this.emit("ERROR", {
17149                            err
17150                        });
17151                    } else {
17152                        const onFlushedCallback = opts?.onFlushedCallback;
17153                        try {
17154                            this.stream.write(buffer, ()=>{
17155                                if (!onFlushedCallback) return;
17156                                try {
17157                                    onFlushedCallback(opts);
17158                                } catch (exc) {
17159                                    const err = error_createError({
17160                                        message: "Failed to write stream buffer",
17161                                        explanation: `stream.write() failed because of ${util_pretty(exc)}`,
17162                                        options: this.options,
17163                                        exc
17164                                    });
17165                                    this.emit("ERROR", {
17166                                        err
17167                                    });
17168                                }
17169                            });
17170                        } catch (exc) {
17171                            const err = error_createError({
17172                                message: "Failed writing to server",
17173                                explanation: `stream.write() failed because of ${util_pretty(exc)}`,
17174                                options: this.options,
17175                                exc
17176                            });
17177                            this.emit("ERROR", {
17178                                err
17179                            });
17180                        }
17181                    }
17182                }
17183                sendPings() {
17184                    this.pingInterval = window.setInterval(()=>{
17185                        this.options.logger.debug("Recorder: pinging...");
17186                        this.writeStream(Buffer.from(""));
17187                    }, this.options.timeouts.pingInterval);
17188                }
17189                stopPings() {
17190                    clearInterval(this.pingInterval);
17191                }
17192                onAudioSample(audioSample) {
17193                    this.samplesCount++;
17194                    const audioBuffer = audioSample.toBuffer();
17195                    this.writeStream(audioBuffer);
17196                }
17197                show() {
17198                    html_showElement(this.recorderElement);
17199                }
17200                onUserMediaReady(params) {
17201                    try {
17202                        this.options.logger.debug(`Recorder: onUserMediaReady(${params ? util_pretty(params) : ""})`);
17203                        const switchingFacingMode = params?.switchingFacingMode;
17204                        this.userMediaLoading = this.blocking = this.unloaded = this.submitting = false;
17205                        this.userMediaLoaded = true;
17206                        if (!switchingFacingMode) this.loop = this.createLoop();
17207                        this.show();
17208                        if (params?.recordWhenReady) this.record();
17209                        this.emit("USER_MEDIA_READY", {
17210                            switchingFacingMode: params?.switchingFacingMode,
17211                            paused: this.isPaused(),
17212                            recordWhenReady: params?.recordWhenReady
17213                        });
17214                    } catch (exc) {
17215                        this.emit("ERROR", {
17216                            exc
17217                        });
17218                    }
17219                }
17220                clearRetryTimeout() {
17221                    if (!this.retryTimeout) return;
17222                    this.options.logger.debug("Recorder: clearRetryTimeout()");
17223                    window.clearTimeout(this.retryTimeout);
17224                    this.retryTimeout = void 0;
17225                }
17226                calculateFrameProgress() {
17227                    return `${(this.confirmedFrameNumber / (this.framesCount || 1) * 100).toFixed(2)}%`;
17228                }
17229                calculateSampleProgress() {
17230                    return `${(this.confirmedSampleNumber / (this.samplesCount || 1) * 100).toFixed(2)}%`;
17231                }
17232                updateOverallProgress() {
17233                    this.frameProgress = this.calculateFrameProgress();
17234                    if (isAudioEnabled(this.options)) this.sampleProgress = this.calculateSampleProgress();
17235                    this.emit("PROGRESS", {
17236                        frameProgress: this.frameProgress,
17237                        sampleProgress: this.sampleProgress
17238                    });
17239                }
17240                updateFrameProgress(args) {
17241                    if (args) {
17242                        if (!args.frame) throw error_createError({
17243                            message: "The frame number is missing",
17244                            options: this.options
17245                        });
17246                    } else throw error_createError({
17247                        message: "Arguments are missing for updating the frame progress",
17248                        options: this.options
17249                    });
17250                    this.confirmedFrameNumber = args.frame;
17251                    this.frameProgress = this.calculateFrameProgress();
17252                    this.updateOverallProgress();
17253                }
17254                updateSampleProgress(args) {
17255                    if (args) {
17256                        if (!args.sample) throw error_createError({
17257                            message: "The audio sample number is missing",
17258                            options: this.options
17259                        });
17260                    } else throw error_createError({
17261                        message: "Arguments are missing for updating the audio sample progress",
17262                        options: this.options
17263                    });
17264                    this.confirmedSampleNumber = args.sample;
17265                    this.sampleProgress = this.calculateSampleProgress();
17266                    this.updateOverallProgress();
17267                }
17268                preview(args) {
17269                    if (!args) throw error_createError({
17270                        message: "Preview arguments are missing.",
17271                        options: this.options
17272                    });
17273                    const hasAudio = this.samplesCount > 0;
17274                    this.confirmedFrameNumber = this.confirmedSampleNumber = this.samplesCount = this.framesCount = 0;
17275                    this.sampleProgress = this.frameProgress = void 0;
17276                    this.key = args.key;
17277                    if (args.mp4) this.replay.setMp4Source(`${args.mp4 + constants.WHITELIST_KEY_LABEL}/${this.options.whitelistKey}/videomail.mp4`, true);
17278                    if (args.webm) this.replay.setWebMSource(`${args.webm + constants.WHITELIST_KEY_LABEL}/${this.options.whitelistKey}/videomail.webm`, true);
17279                    this.hide();
17280                    const widthDimension = this.getRecorderWidth(true);
17281                    const heightDimension = this.getRecorderHeight(true);
17282                    const duration = args.duration ?? -1;
17283                    this.emit("PREVIEW", {
17284                        key: this.key,
17285                        width: widthDimension?.value,
17286                        height: heightDimension?.value,
17287                        hasAudio,
17288                        duration
17289                    });
17290                    if (this.stopTime) this.waitingTime = Date.now() - this.stopTime;
17291                    this.recordingStats ??= {};
17292                    this.recordingStats.waitingTime = this.waitingTime;
17293                }
17294                initSocket(cb) {
17295                    if (!this.connected) {
17296                        this.connecting = true;
17297                        this.emit("CONNECTING");
17298                        let url2Connect;
17299                        try {
17300                            const socketUrlObj = new URL(this.options.socketUrl);
17301                            socketUrlObj.searchParams.set(constants.WHITELIST_KEY_LABEL, this.options.whitelistKey);
17302                            url2Connect = socketUrlObj.toString();
17303                        } catch (exc) {
17304                            this.connecting = this.connected = false;
17305                            const err = error_createError({
17306                                message: "Invalid WebSocket URL",
17307                                explanation: `The configured socketUrl "${this.options.socketUrl}" is not a valid URL. Please check your videomail-client configuration.`,
17308                                options: this.options,
17309                                exc
17310                            });
17311                            this.emit("ERROR", {
17312                                err
17313                            });
17314                            return;
17315                        }
17316                        this.options.logger.debug(`Recorder: initializing web socket stream to ${url2Connect}`);
17317                        let nativeSocket;
17318                        try {
17319                            nativeSocket = new WebSocket(url2Connect);
17320                        } catch (exc) {
17321                            this.connecting = this.connected = false;
17322                            const diagnostic = error_getWebSocketDiagnostic(url2Connect);
17323                            const message = diagnostic.looksAutomated ? "Automated crawler: WebSocket not supported in this environment" : `Failed to construct WebSocket to ${url2Connect}`;
17324                            const explanation = diagnostic.looksAutomated ? "Headless crawlers cannot use Videomail's WebSocket. No action needed." : `Please check your connection and try again. If the problem persists, contact us. Diagnostic: ${diagnostic.text}`;
17325                            const err = error_createError({
17326                                message,
17327                                explanation,
17328                                options: this.options,
17329                                exc
17330                            });
17331                            this.emit("ERROR", {
17332                                err
17333                            });
17334                            return;
17335                        }
17336                        try {
17337                            this.stream = stream_default()(nativeSocket);
17338                        } catch (exc) {
17339                            this.connecting = this.connected = false;
17340                            const err = error_createError({
17341                                message: `Failed to create a stream to ${url2Connect}`,
17342                                explanation: "Please check your connection and try again. If the problem persists, contact us.",
17343                                options: this.options,
17344                                exc
17345                            });
17346                            this.emit("ERROR", {
17347                                err
17348                            });
17349                        }
17350                        if (this.stream) {
17351                            this.stream.on("close", (err)=>{
17352                                this.options.logger.debug(`${PIPE_SYMBOL}Stream has closed`);
17353                                this.connecting = this.connected = false;
17354                                if (err) this.emit("ERROR", {
17355                                    err
17356                                });
17357                                else if (this.userMediaLoaded) this.initSocket();
17358                            });
17359                            this.stream.on("connect", ()=>{
17360                                this.options.logger.debug(`${PIPE_SYMBOL}Stream *connect* event emitted`);
17361                                const isClosing = this.stream?.socket.readyState === WebSocket.CLOSING;
17362                                if (!this.connected && !isClosing && !this.unloaded) {
17363                                    this.connected = true;
17364                                    this.connecting = this.unloaded = false;
17365                                    this.emit("CONNECTED");
17366                                    cb?.();
17367                                }
17368                            });
17369                            this.stream.on("data", (data)=>{
17370                                this.options.logger.debug(`${PIPE_SYMBOL}Stream *data* event emitted`);
17371                                try {
17372                                    const command = JSON.parse(data.toString());
17373                                    this.executeCommand(command);
17374                                } catch (exc) {
17375                                    this.options.logger.debug(`Failed to parse command: ${exc}`);
17376                                    const err = error_createError({
17377                                        message: "Invalid server command",
17378                                        explanation: `Contact us asap. Bad command was ${data.toString()}. `,
17379                                        options: this.options,
17380                                        exc
17381                                    });
17382                                    this.emit("ERROR", {
17383                                        err
17384                                    });
17385                                }
17386                            });
17387                            this.stream.on("error", (err)=>{
17388                                this.options.logger.debug(`${PIPE_SYMBOL}Stream *error* event emitted: ${util_pretty(err)}`);
17389                            });
17390                            this.stream.on("drain", ()=>{
17391                                this.options.logger.debug(`${PIPE_SYMBOL}Stream *drain* event emitted (should not happen!)`);
17392                            });
17393                            this.stream.on("preend", ()=>{
17394                                this.options.logger.debug(`${PIPE_SYMBOL}Stream *preend* event emitted`);
17395                            });
17396                            this.stream.on("end", ()=>{
17397                                this.options.logger.debug(`${PIPE_SYMBOL}Stream *end* event emitted`);
17398                            });
17399                            this.stream.on("drain", ()=>{
17400                                this.options.logger.debug(`${PIPE_SYMBOL}Stream *drain* event emitted`);
17401                            });
17402                            this.stream.on("pipe", ()=>{
17403                                this.options.logger.debug(`${PIPE_SYMBOL}Stream *pipe* event emitted`);
17404                            });
17405                            this.stream.on("unpipe", ()=>{
17406                                this.options.logger.debug(`${PIPE_SYMBOL}Stream *unpipe* event emitted`);
17407                            });
17408                            this.stream.on("resume", ()=>{
17409                                this.options.logger.debug(`${PIPE_SYMBOL}Stream *resume* event emitted`);
17410                            });
17411                            this.stream.on("uncork", ()=>{
17412                                this.options.logger.debug(`${PIPE_SYMBOL}Stream *uncork* event emitted`);
17413                            });
17414                            this.stream.on("readable", ()=>{
17415                                this.options.logger.debug(`${PIPE_SYMBOL}Stream *preend* event emitted`);
17416                            });
17417                            this.stream.on("prefinish", ()=>{
17418                                this.options.logger.debug(`${PIPE_SYMBOL}Stream *preend* event emitted`);
17419                            });
17420                            this.stream.on("finish", ()=>{
17421                                this.options.logger.debug(`${PIPE_SYMBOL}Stream *preend* event emitted`);
17422                            });
17423                        }
17424                    }
17425                }
17426                showUserMedia() {
17427                    if (!this.connected) return false;
17428                    const hidden = this.isHidden();
17429                    if (!hidden) return true;
17430                    const notifying = this.isNotifying();
17431                    if (notifying) return true;
17432                    return this.blocking;
17433                }
17434                userMediaErrorCallback(err) {
17435                    this.userMediaLoading = false;
17436                    this.clearUserMediaTimeout();
17437                    const characteristics = this.userMedia?.getCharacteristics();
17438                    this.options.logger.debug(`Recorder: userMediaErrorCallback(), name: ${err.name}, message: ${err.message} and Webcam characteristics: ${characteristics ? util_pretty(characteristics) : "none"}`);
17439                    const errorListeners = util_Despot.getListeners("ERROR");
17440                    if (errorListeners?.length) {
17441                        if (err.name !== error_VideomailError.MEDIA_DEVICE_NOT_SUPPORTED) {
17442                            const videomailError = error_createError({
17443                                err,
17444                                options: this.options
17445                            });
17446                            this.emit("ERROR", {
17447                                err: videomailError
17448                            });
17449                        } else this.options.logger.debug(`Recorder: ignore user media error ${util_pretty(err)}`);
17450                        this.retryTimeout = window.setTimeout(this.initSocket.b
17450ind(this), this.options.timeouts.userMedia);
17451                    } else if (this.unloaded) this.options.logger.debug(`Recorder: already unloaded. Not going to throw error ${util_pretty(err)}`);
17452                    else {
17453                        this.options.logger.debug(`Recorder: no error listeners attached but throwing error ${util_pretty(err)}`);
17454                        throw error_createError({
17455                            err,
17456                            message: "Unable to process this error since there are no error listeners anymore.",
17457                            options: this.options
17458                        });
17459                    }
17460                }
17461                getUserMediaCallback(localStream, params) {
17462                    if (!this.userMedia) throw new Error("No user media is defined");
17463                    this.options.logger.debug(`Recorder: getUserMediaCallback(${params ? util_pretty(params) : ""})`);
17464                    if (this.showUserMedia()) try {
17465                        this.clearUserMediaTimeout();
17466                        this.userMedia.init(localStream, ()=>{
17467                            this.onUserMediaReady(params);
17468                        }, this.onAudioSample.bind(this), (err)=>{
17469                            this.emit("ERROR", {
17470                                err
17471                            });
17472                        }, params?.switchingFacingMode);
17473                    } catch (exc) {
17474                        this.emit("ERROR", {
17475                            exc
17476                        });
17477                    }
17478                }
17479                loadGenuineUserMedia(params) {
17480                    this.options.logger.debug(`Recorder: loadGenuineUserMedia(${params ? util_pretty(params) : ""})`);
17481                    this.emit("ASKING_WEBCAM_PERMISSION");
17482                    const constraints = {
17483                        video: {
17484                            frameRate: {
17485                                ideal: this.options.video.fps
17486                            }
17487                        },
17488                        audio: isAudioEnabled(this.options)
17489                    };
17490                    if (params?.switchingFacingMode && constraints.video && true !== constraints.video) constraints.video.facingMode = params.switchingFacingMode;
17491                    if (this.options.video.width && constraints.video && true !== constraints.video) {
17492                        const idealWidth = this.options.video.width;
17493                        if (idealWidth) constraints.video.width = {
17494                            ideal: idealWidth
17495                        };
17496                    } else if (constraints.video && true !== constraints.video) {
17497                        const limitedWidth = this.limitWidth();
17498                        if (limitedWidth?.value) constraints.video.width = {
17499                            ideal: limitedWidth.value
17500                        };
17501                    }
17502                    if (this.options.video.height && constraints.video && true !== constraints.video) {
17503                        const idealHeight = this.options.video.height;
17504                        if (idealHeight) constraints.video.height = {
17505                            ideal: idealHeight
17506                        };
17507                    }
17508                    this.options.logger.debug(`Recorder: our webcam constraints are: ${util_pretty(constraints)}`);
17509                    this.options.logger.debug(`Recorder: available webcam constraints are: ${util_pretty(navigator.mediaDevices.getSupportedConstraints())}`);
17510                    const genuineUserMediaRequest = navigator.mediaDevices.getUserMedia(constraints);
17511                    genuineUserMediaRequest.then((localStream)=>{
17512                        this.getUserMediaCallback(localStream, params);
17513                    }).catch((reason)=>{
17514                        this.userMediaErrorCallback(reason);
17515                    });
17516                }
17517                loadUserMedia(params) {
17518                    if (this.userMediaLoaded) {
17519                        this.options.logger.debug("Recorder: skipping loadUserMedia() because it is already loaded");
17520                        this.onUserMediaReady(params);
17521                        return;
17522                    }
17523                    if (this.userMediaLoading) return void this.options.logger.debug("Recorder: skipping loadUserMedia() because it is already asking for permission");
17524                    this.options.logger.debug(`Recorder: loadUserMedia(${params ? util_pretty(params) : ""})`);
17525                    this.emit("LOADING_USER_MEDIA");
17526                    try {
17527                        if (!navigator.mediaDevices) throw new Error("No media devices are available.");
17528                        this.userMediaTimeout = window.setTimeout(()=>{
17529                            if (!this.isReady()) {
17530                                const err = util_getBrowser(this.options).getNoAccessIssue();
17531                                this.emit("ERROR", {
17532                                    err
17533                                });
17534                            }
17535                        }, this.options.timeouts.userMedia);
17536                        this.userMediaLoading = true;
17537                        this.loadGenuineUserMedia(params);
17538                    } catch (exc) {
17539                        this.clearUserMediaTimeout();
17540                        this.options.logger.debug("Recorder: failed to load genuine user media");
17541                        this.userMediaLoading = false;
17542                        const errorListeners = util_Despot.getListeners("ERROR");
17543                        if (errorListeners?.length) this.emit("ERROR", {
17544                            exc
17545                        });
17546                        else {
17547                            this.options.logger.debug("Recorder: no error listeners attached but throwing exception further");
17548                            throw exc;
17549                        }
17550                    }
17551                }
17552                executeCommand(command) {
17553                    if (this.unloaded) return;
17554                    try {
17555                        if (command.args) this.options.logger.debug(`Server commanded: ${command.command} with ${util_pretty(command.args)}`);
17556                        else this.options.logger.debug(`Server commanded: ${command.command}`);
17557                        switch(command.command){
17558                            case "ready":
17559                                this.emit("SERVER_READY");
17560                                if (!this.userMediaTimeout) if (this.options.loadUserMediaOnRecord) this.show();
17561                                else this.loadUserMedia();
17562                                break;
17563                            case "preview":
17564                                this.preview(command.args);
17565                                break;
17566                            case "error":
17567                                {
17568                                    let explanation = "(No explanation given)";
17569                                    if (command.args?.err?.message) explanation = command.args.err.message;
17570                                    const err = error_createError({
17571                                        message: "Websocket error from Videomail server",
17572                                        explanation,
17573                                        err: deserializeError(command.args?.err),
17574                                        options: this.options
17575                                    });
17576                                    this.emit("ERROR", {
17577                                        err
17578                                    });
17579                                    break;
17580                                }
17581                            case "confirmFrame":
17582                                this.updateFrameProgress(command.args);
17583                                break;
17584                            case "confirmSample":
17585                                this.updateSampleProgress(command.args);
17586                                break;
17587                            case "beginAudioEncoding":
17588                                this.emit("BEGIN_AUDIO_ENCODING");
17589                                break;
17590                            case "beginVideoEncoding":
17591                                this.emit("BEGIN_VIDEO_ENCODING");
17592                                break;
17593                            default:
17594                                {
17595                                    const err = error_createError({
17596                                        message: `Unknown server command: ${command.command}`,
17597                                        options: this.options
17598                                    });
17599                                    this.emit("ERROR", {
17600                                        err
17601                                    });
17602                                    break;
17603                                }
17604                        }
17605                    } catch (exc) {
17606                        this.emit("ERROR", {
17607                            exc
17608                        });
17609                    }
17610                }
17611                isNotifying() {
17612                    return this.visuals.isNotifying();
17613                }
17614                isHidden() {
17615                    return !this.recorderElement || html_isHidden(this.recorderElement);
17616                }
17617                writeCommand(command, args, cb) {
17618                    if (this.connected) {
17619                        if (this.stream) {
17620                            if (args) this.options.logger.debug(`$ ${command} with ${util_pretty(args)}`);
17621                            else this.options.logger.debug(`$ ${command}`);
17622                            const commandObj = {
17623                                command,
17624                                args
17625                            };
17626                            this.writeStream(Buffer.from(JSON.stringify(commandObj)));
17627                            if (cb) setTimeout(function() {
17628                                cb();
17629                            }, 0);
17630                        }
17631                    } else {
17632                        this.options.logger.debug(`Reconnecting for the command ${command} …`);
17633                        this.initSocket(()=>{
17634                            this.writeCommand(command, args);
17635                            cb?.();
17636                        });
17637                    }
17638                }
17639                cancelAnimationFrame() {
17640                    this.loop?.dispose();
17641                }
17642                getIntervalSum() {
17643                    if (!this.loop) return;
17644                    return this.loop.getElapsedTime();
17645                }
17646                getAvgInterval() {
17647                    const intervalSum = this.getIntervalSum();
17648                    if (!intervalSum) return;
17649                    return intervalSum / this.framesCount;
17650                }
17651                getAvgFps() {
17652                    const intervalSum = this.getIntervalSum();
17653                    if (!intervalSum) return;
17654                    return this.framesCount / intervalSum * 1000;
17655                }
17656                getRecordingStats() {
17657                    return this.recordingStats;
17658                }
17659                getAudioSampleRate() {
17660                    return this.userMedia?.getAudioSampleRate();
17661                }
17662                stop(params) {
17663                    if (!this.userMedia) throw new Error("No user media defined, unable to stop");
17664                    this.options.logger.debug(`Recorder: stop(${params ? util_pretty(params) : ""})`);
17665                    const limitReached = params?.limitReached;
17666                    this.emit("STOPPING", {
17667                        limitReached
17668                    });
17669                    this.loop?.complete();
17670                    setTimeout(()=>{
17671                        this.stopTime = Date.now();
17672                        const videoType = this.replay.getVideoType();
17673                        if (!videoType) throw new Error("Unable to video record when no video type is defined.");
17674                        this.recordingStats = {
17675                            avgFps: this.getAvgFps(),
17676                            wantedFps: this.options.video.fps,
17677                            avgInterval: this.getAvgInterval(),
17678                            wantedInterval: 1e3 / this.options.video.fps,
17679                            intervalSum: this.getIntervalSum(),
17680                            framesCount: this.framesCount,
17681                            videoType
17682                        };
17683                        if (this.userMedia) this.recordingStats.videoTrackLabel = this.userMedia.getVideoTrackLabel();
17684                        if (isAudioEnabled(this.options) && this.userMedia) {
17685                            this.recordingStats.samplesCount = this.samplesCount;
17686                            this.recordingStats.sampleRate = this.userMedia.getAudioSampleRate();
17687                        }
17688                        this.writeCommand("stop", this.recordingStats, ()=>{
17689                            this.emit("STOPPED", {
17690                                recordingStats: this.recordingStats
17691                            });
17692                        });
17693                        this.reset();
17694                    }, 60);
17695                }
17696                back(cb) {
17697                    this.emit("GOING_BACK");
17698                    this.unloaded = false;
17699                    this.show();
17700                    this.writeCommand("back", void 0, cb);
17701                }
17702                reInitializeAudio() {
17703                    this.options.logger.debug("Recorder: reInitializeAudio()");
17704                    this.clearUserMediaTimeout();
17705                    this.userMedia?.stop();
17706                    this.userMediaLoaded = this.key = this.canvas = this.ctx = void 0;
17707                    this.loadUserMedia();
17708                }
17709                unload(params) {
17710                    if (this.unloaded || !this.built) return;
17711                    const e = params?.e;
17712                    let cause;
17713                    if (e) cause = e.type;
17714                    const prettyCause = cause ? `, cause: ${cause}` : "";
17715                    this.options.logger.debug(`Recorder: unload()${prettyCause}`);
17716                    this.reset();
17717                    this.clearUserMediaTimeout();
17718                    if (this.userMedia) this.userMedia.unloadRemainingEventListeners();
17719                    if (this.submitting) ;
17720                    else if (this.stream) {
17721                        this.options.logger.debug("Recorder: destroying stream ...");
17722                        this.stream.destroy();
17723                        this.stream = void 0;
17724                    }
17725                    this.unloaded = true;
17726                    this.built = this.connecting = this.connected = false;
17727                }
17728                reset() {
17729                    if (!this.unloaded) {
17730                        this.options.logger.debug("Recorder: reset()");
17731                        this.emit("RESETTING");
17732                        this.cancelAnimationFrame();
17733                        this.userMedia?.stop();
17734                        this.replay.reset();
17735                        this.userMediaLoaded = this.key = this.canvas = this.ctx = this.recordingBuffer = void 0;
17736                    }
17737                }
17738                clearUserMediaTimeout() {
17739                    if (this.userMediaTimeout) {
17740                        this.options.logger.debug("Recorder: clearUserMediaTimeout()");
17741                        window.clearTimeout(this.userMediaTimeout);
17742                        this.userMediaTimeout = void 0;
17743                    }
17744                }
17745                validate() {
17746                    return this.connected && void 0 === this.canvas;
17747                }
17748                isReady() {
17749                    return this.userMedia?.isReady();
17750                }
17751                pause(params) {
17752                    if (params) this.options.logger.debug(`pause() at frame ${this.framesCount} with ${util_pretty(params)}`);
17753                    else this.options.logger.debug(`pause() at frame ${this.framesCount}`);
17754                    this.userMedia?.pause();
17755                    this.loop.stop();
17756                    this.emit("PAUSED");
17757                    this.sendPings();
17758                }
17759                resume() {
17760                    this.options.logger.debug(`Recorder: resume() with frame ${this.framesCount}`);
17761                    this.stopPings();
17762                    this.emit("RESUMING");
17763                    this.userMedia?.resume();
17764                    this.loop.start();
17765                }
17766                onFlushed(opts) {
17767                    const frameNumber = opts.frameNumber;
17768                    if (1 === frameNumber) this.emit("FIRST_FRAME_SENT");
17769                }
17770                draw(_deltaTime, elapsedTime) {
17771                    if (!this.userMedia) throw new Error("No user media defined, unable to draw on canvas");
17772                    try {
17773                        if (!this.isPaused() && this.stream && this.ctx) {
17774                            if (0 === this.framesCount) this.emit
17774("SENDING_FIRST_FRAME");
17775                            this.framesCount++;
17776                            const imageSource = this.userMedia.getRawVisuals();
17777                            if (this.canvas && imageSource) this.ctx.drawImage(imageSource, 0, 0, this.canvas.width, this.canvas.height);
17778                            else throw new Error("Unable to draw an image without a defined canvas");
17779                            this.recordingBuffer = this.frame?.toBuffer();
17780                            const recordingBufferLength = this.recordingBuffer?.length;
17781                            if (recordingBufferLength) {
17782                                if (this.recordingBuffer) {
17783                                    const frameControlBuffer = Buffer.from(JSON.stringify({
17784                                        frameNumber: this.framesCount
17785                                    }));
17786                                    const frameBuffer = Buffer.concat([
17787                                        this.recordingBuffer,
17788                                        frameControlBuffer
17789                                    ]);
17790                                    this.writeStream(frameBuffer, {
17791                                        frameNumber: this.framesCount,
17792                                        onFlushedCallback: this.onFlushed.bind(this)
17793                                    });
17794                                    this.visuals.checkTimer(elapsedTime);
17795                                }
17796                            } else throw error_createError({
17797                                message: "Failed to extract webcam data.",
17798                                options: this.options
17799                            });
17800                        }
17801                    } catch (exc) {
17802                        this.emit("ERROR", {
17803                            exc
17804                        });
17805                    }
17806                }
17807                createLoop() {
17808                    const newLoop = animitter_default()({
17809                        fps: this.options.video.fps
17810                    }, this.draw.bind(this));
17811                    this.originalAnimationFrameObject = newLoop.getRequestAnimationFrameObject();
17812                    return newLoop;
17813                }
17814                record() {
17815                    if (this.unloaded) return;
17816                    if (!this.connected) {
17817                        this.options.logger.debug("Recorder: reconnecting before recording ...");
17818                        this.initSocket(()=>{
17819                            this.once("USER_MEDIA_READY", this.record.bind(this));
17820                        });
17821                        return;
17822                    }
17823                    if (!this.userMediaLoaded) {
17824                        if (this.options.loadUserMediaOnRecord) this.loadUserMedia({
17825                            recordWhenReady: true
17826                        });
17827                        else {
17828                            const err = error_createError({
17829                                message: "Load and enable your camera first",
17830                                options: this.options
17831                            });
17832                            this.emit("ERROR", {
17833                                err
17834                            });
17835                        }
17836                        return;
17837                    }
17838                    try {
17839                        if (!this.userMedia) throw new Error("No user media defined, unable to create canvas");
17840                        this.canvas = this.userMedia.createCanvas();
17841                    } catch (exc) {
17842                        const err = error_createError({
17843                            exc,
17844                            options: this.options
17845                        });
17846                        this.emit("ERROR", {
17847                            err
17848                        });
17849                        return;
17850                    }
17851                    this.ctx = this.canvas.getContext("2d");
17852                    if (!this.canvas.width) {
17853                        const err = error_createError({
17854                            message: "Canvas has an invalid width.",
17855                            options: this.options
17856                        });
17857                        this.emit("ERROR", {
17858                            err
17859                        });
17860                        return;
17861                    }
17862                    if (!this.canvas.height) {
17863                        const err = error_createError({
17864                            message: "Canvas has an invalid height.",
17865                            options: this.options
17866                        });
17867                        this.emit("ERROR", {
17868                            err
17869                        });
17870                        return;
17871                    }
17872                    this.frame = new canvas_to_buffer_modern_r(this.canvas, this.options.image.types, this.options.image.quality);
17873                    this.options.logger.debug("Recorder: record()");
17874                    this.userMedia.record();
17875                    this.emit("RECORDING", {
17876                        framesCount: this.framesCount
17877                    });
17878                    this.loop.on("update", (_deltaTime, elapsedTime)=>{
17879                        let avgFPS;
17880                        avgFPS = 0 !== elapsedTime ? Math.round(this.framesCount / elapsedTime * 1000) : void 0;
17881                        this.options.logger.debug(`Recorder updates avgFps = ${avgFPS} at frame ${this.framesCount}`);
17882                    });
17883                    this.loop.start();
17884                }
17885                setAnimationFrameObject(newObj) {
17886                    if (this.loop) {
17887                        const isRecording = this.isRecording();
17888                        this.loop.stop();
17889                        this.loop.setRequestAnimationFrameObject(newObj);
17890                        if (isRecording) this.loop.start();
17891                    }
17892                }
17893                restoreAnimationFrameObject() {
17894                    this.options.logger.debug("Recorder: restoreAnimationFrameObject()");
17895                    this.setAnimationFrameObject(this.originalAnimationFrameObject);
17896                }
17897                loopWithTimeouts() {
17898                    this.options.logger.debug("Recorder: loopWithTimeouts()");
17899                    const wantedInterval = 1e3 / this.options.video.fps;
17900                    let processingTime = 0;
17901                    let start;
17902                    const raf = (fn)=>setTimeout(()=>{
17903                            start = Date.now();
17904                            fn();
17905                            processingTime = Date.now() - start;
17906                        }, wantedInterval - processingTime);
17907                    const cancel = (id)=>{
17908                        window.clearTimeout(id);
17909                    };
17910                    this.setAnimationFrameObject({
17911                        requestAnimationFrame: raf,
17912                        cancelAnimationFrame: cancel
17913                    });
17914                }
17915                correctDimensions() {
17916                    if (!this.recorderElement) return;
17917                    const widthDimension = dimensions_useFullWidth(this.options.video.mobileBreakPoint);
17918                    if (this.options.video.stretch || widthDimension) {
17919                        this.recorderElement.style.width = "100%";
17920                        this.recorderElement.style.removeProperty("height");
17921                    } else {
17922                        if (this.options.video.width) {
17923                            const recorderWidth = this.getRecorderWidth(true);
17924                            if (recorderWidth?.value) this.recorderElement.width = recorderWidth.value;
17925                            else this.recorderElement.style.removeProperty("width");
17926                        }
17927                        if (this.options.video.height) {
17928                            const recorderHeight = this.getRecorderHeight(true);
17929                            if (recorderHeight?.value) this.recorderElement.height = recorderHeight.value;
17930                            else this.recorderElement.style.removeProperty("height");
17931                        }
17932                    }
17933                }
17934                switchFacingMode() {
17935                    if (!util_getBrowser(this.options).isMobile()) return;
17936                    if ("user" === this.facingMode) this.facingMode = "environment";
17937                    else if ("environment" === this.facingMode) this.facingMode = "user";
17938                    else this.options.logger.warn(`Recorder: unsupported facing mode ${util_pretty(this.facingMode)}`);
17939                    this.loadGenuineUserMedia({
17940                        switchingFacingMode: this.facingMode
17941                    });
17942                }
17943                initEvents() {
17944                    this.options.logger.debug("Recorder: initEvents()");
17945                    this.on("SUBMITTING", ()=>{
17946                        this.submitting = true;
17947                    });
17948                    this.on("SUBMITTED", ()=>{
17949                        this.submitting = false;
17950                    });
17951                    this.on("BLOCKING", ()=>{
17952                        this.blocking = true;
17953                        this.clearUserMediaTimeout();
17954                    });
17955                    this.on("PREVIEW", ()=>{
17956                        this.hide();
17957                    });
17958                    this.on("HIDE", ()=>{
17959                        this.hide();
17960                    });
17961                    this.on("LOADED_META_DATA", ()=>{
17962                        this.correctDimensions();
17963                    });
17964                    this.on("DISABLING_AUDIO", ()=>{
17965                        this.reInitializeAudio();
17966                    });
17967                    this.on("ENABLING_AUDIO", ()=>{
17968                        this.reInitializeAudio();
17969                    });
17970                    this.on("INVISIBLE", ()=>{
17971                        this.loopWithTimeouts();
17972                    });
17973                    this.on("VISIBLE", ()=>{
17974                        this.restoreAnimationFrameObject();
17975                    });
17976                    this.on("SWITCH_FACING_MODE", ()=>{
17977                        this.switchFacingMode();
17978                    });
17979                    this.on("WINDOW_RESIZE", ()=>{
17980                        this.correctDimensions();
17981                    });
17982                }
17983                buildElement() {
17984                    this.recorderElement = document.createElement("video");
17985                    this.recorderElement.classList.add(this.options.selectors.userMediaClass);
17986                    this.visuals.appendChild(this.recorderElement);
17987                }
17988                build() {
17989                    this.recorderElement = this.visuals.getElement()?.querySelector(`video.${this.options.selectors.userMediaClass}`);
17990                    if (!this.recorderElement) this.buildElement();
17991                    if (!this.recorderElement) throw new Error(`There is still no video element with class ${this.options.selectors.userMediaClass}`);
17992                    this.correctDimensions();
17993                    this.recorderElement.muted = true;
17994                    this.recorderElement.setAttribute("playsinline", "true");
17995                    this.recorderElement.setAttribute("webkit-playsinline", "webkit-playsinline");
17996                    this.recorderElement.style.transform = "rotateY(180deg)";
17997                    this.recorderElement.style["-webkit-transform"] = "rotateY(180deg)";
17998                    this.recorderElement.style["-moz-transform"] = "rotateY(180deg)";
17999                    this.userMedia ??= new visuals_userMedia(this, this.options);
18000                    this.show();
18001                    if (this.built) {
18002                        if (this.options.loadUserMediaOnRecord) this.loadUserMedia();
18003                    } else {
18004                        this.initEvents();
18005                        if (this.connected) {
18006                            if (!this.options.loadUserMediaOnRecord) this.loadUserMedia();
18007                        } else this.initSocket();
18008                    }
18009                    this.built = true;
18010                }
18011                isPaused() {
18012                    return this.userMedia?.isPaused() && !this.loop.isRunning();
18013                }
18014                isRecording() {
18015                    return Boolean(this.loop?.isRunning() && !this.isPaused() && !this.isNotifying() && this.stream && !this.stream.destroyed);
18016                }
18017                hide() {
18018                    if (!this.isHidden()) {
18019                        if (this.recorderElement) html_hideElement(this.recorderElement);
18020                        this.clearUserMediaTimeout();
18021                        this.clearRetryTimeout();
18022                    }
18023                }
18024                isUnloaded() {
18025                    return this.unloaded;
18026                }
18027                getRecorderWidth(responsive) {
18028                    if (this.userMedia?.hasVideoWidth()) return this.userMedia.getRawWidth(responsive);
18029                    if (responsive && this.options.video.width) return this.limitWidth(this.options.video.width);
18030                    const dimension = {
18031                        unit: "px",
18032                        value: this.options.video.width
18033                    };
18034                    return dimension;
18035                }
18036                getRecorderHeight(responsive, useBoundingClientRect) {
18037                    let recorderHeight;
18038                    if (this.recorderElement && useBoundingClientRect) {
18039                        const height = this.recorderElement.getBoundingClientRect().height;
18040                        recorderHeight = {
18041                            unit: "px",
18042                            value: height
18043                        };
18044                    } else if (this.userMedia) {
18045                        let height = this.userMedia.getRawHeight(responsive);
18046                        if (void 0 !== height && this.options.video.width) {
18047                            const ratio = this.getRatio();
18048                            if (void 0 !== ratio) {
18049                                const idealHeight = this.options.video.width * ratio;
18050                                height = Math.min(idealHeight, height);
18051                            }
18052                        }
18053                        recorderHeight = {
18054                            unit: "px",
18055                            value: height
18056                        };
18057                    } else if (responsive && this.options.video.height) recorderHeight = this.calculateHeight(responsive);
18058                    else if (this.options.video.height) {
18059                        const height = this.options.video.height;
18060                        recorderHeight = {
18061                            unit: "px",
18062                            value: height
18063                        };
18064                    }
18065                    return recorderHeight;
18066                }
18067                getRatio() {
18068                    let ratio;
18069                    if (this.userMedia) {
18070                        const userMediaVideoWidth = this.userMedia.getVideoWidth();
18071                        const userMediaVideoHeight = this.userMedia.getVideoHeight();
18072                        if (!userMediaVideoWidth || userMediaVideoWidth < 1) ratio = this.visual
18072s.getRatio();
18073                        else if (userMediaVideoHeight) ratio = userMediaVideoHeight / userMediaVideoWidth;
18074                    } else ratio = dimensions_getRatio(this.options);
18075                    return ratio;
18076                }
18077                calculateWidth(responsive) {
18078                    let videoHeight;
18079                    if (this.userMedia) videoHeight = this.userMedia.getVideoHeight();
18080                    else if (this.recorderElement) videoHeight = this.recorderElement.videoHeight || this.recorderElement.height;
18081                    const ratio = this.getRatio();
18082                    return dimensions_calculateWidth(responsive, this.options, videoHeight, ratio);
18083                }
18084                calculateHeight(responsive) {
18085                    let videoDimension;
18086                    if (this.userMedia) {
18087                        const videoHeight = this.userMedia.getVideoHeight();
18088                        videoDimension = {
18089                            value: videoHeight,
18090                            unit: "px"
18091                        };
18092                    } else if (this.recorderElement) {
18093                        const videoHeight = this.recorderElement.videoHeight || this.recorderElement.height;
18094                        videoDimension = {
18095                            value: videoHeight,
18096                            unit: "px"
18097                        };
18098                    } else videoDimension = dimensions_calculateHeight(responsive, void 0, this.options, this.getRatio(), this.recorderElement);
18099                    return videoDimension;
18100                }
18101                getRawVisualUserMedia() {
18102                    return this.recorderElement;
18103                }
18104                isConnected() {
18105                    return this.connected;
18106                }
18107                isConnecting() {
18108                    return this.connecting;
18109                }
18110                limitWidth(width) {
18111                    return this.visuals.limitWidth(width);
18112                }
18113                limitHeight(height) {
18114                    return this.visuals.limitHeight(height);
18115                }
18116                isUserMediaLoaded() {
18117                    return this.userMediaLoaded;
18118                }
18119            }
18120            const visuals_recorder = Recorder;
18121            class Replay extends util_Despot {
18122                visuals;
18123                built = false;
18124                replayElement;
18125                videomail;
18126                constructor(visuals, options){
18127                    super("Replay", options);
18128                    this.visuals = visuals;
18129                }
18130                buildElement(replayParentElement) {
18131                    const videoSelector = `video.${this.options.selectors.replayClass}`;
18132                    this.replayElement = replayParentElement.querySelector(videoSelector);
18133                    if (!this.replayElement) {
18134                        this.replayElement = document.createElement("video");
18135                        this.replayElement.classList.add(this.options.selectors.replayClass);
18136                        replayParentElement.appendChild(this.replayElement);
18137                    }
18138                }
18139                isStandalone() {
18140                    return "HTMLDivElement" === this.visuals.constructor.name;
18141                }
18142                copyAttributes(newVideomail) {
18143                    let attributeContainer;
18144                    Object.keys(newVideomail).forEach((attribute)=>{
18145                        attributeContainer = this.replayElement?.parentNode?.querySelector(`.${attribute}`);
18146                        if (attributeContainer) {
18147                            const empty = !attributeContainer.innerHTML || attributeContainer.innerHTML.length < 1;
18148                            if (empty) attributeContainer.innerHTML = newVideomail[attribute];
18149                        }
18150                    });
18151                }
18152                correctDimensions(responsive, videoWidth, videoHeight) {
18153                    if (!this.replayElement) throw new Error("There is no replay element to correct dimensions for.");
18154                    let heightValue;
18155                    let widthValue;
18156                    let ratio;
18157                    if (this.videomail) {
18158                        widthValue = this.videomail.width;
18159                        heightValue = this.videomail.height;
18160                        if (widthValue && heightValue) ratio = heightValue / widthValue;
18161                    }
18162                    if (!widthValue) {
18163                        const newWidthDimensions = dimensions_calculateWidth(responsive, this.options, videoHeight, ratio);
18164                        const newWidth = newWidthDimensions.value;
18165                        widthValue = newWidth;
18166                    }
18167                    if (!heightValue) {
18168                        let element = this.visuals.getElement();
18169                        if (!element) element = document.body;
18170                        const newDimensions = dimensions_calculateHeight(responsive, videoWidth, this.options, ratio, element);
18171                        heightValue = newDimensions.value;
18172                    }
18173                    if (widthValue) this.replayElement.style.width = `${widthValue}px`;
18174                    else this.replayElement.style.width = "auto";
18175                    if (heightValue) this.replayElement.style.height = `${heightValue}px`;
18176                    else this.replayElement.style.height = "auto";
18177                }
18178                setVideomail(newVideomail, playerOnly = false) {
18179                    this.videomail = newVideomail;
18180                    if (this.videomail.mp4) this.setMp4Source(this.videomail.mp4);
18181                    if (this.videomail.webm) this.setWebMSource(this.videomail.webm);
18182                    if (this.videomail.vtt) this.setTrackSource(this.videomail.vtt);
18183                    if (this.videomail.poster) this.replayElement?.setAttribute("poster", this.videomail.poster);
18184                    this.copyAttributes(this.videomail);
18185                    const sampleRate = this.videomail.recordingStats?.sampleRate;
18186                    const width = this.videomail.width;
18187                    const height = this.videomail.height;
18188                    const hasAudio = void 0 !== sampleRate ? sampleRate > 0 : false;
18189                    this.show(width, height, hasAudio, playerOnly);
18190                }
18191                show(videomailWidth, videomailHeight, hasAudio, playerOnly = false) {
18192                    if (!this.replayElement) return;
18193                    if (this.isShown()) return;
18194                    this.options.logger.debug(`Replay: show(playerOnly=${playerOnly})`);
18195                    const hasMedia = Boolean(this.videomail?.webm) || Boolean(this.videomail?.mp4) || Boolean(this.videomail?.poster);
18196                    if (hasMedia) this.correctDimensions(true, videomailWi
18196dth ?? this.replayElement.videoWidth, videomailHeight ?? this.replayElement.videoHeight);
18197                    if (playerOnly) {
18198                        if (hasMedia) html_showElement(this.replayElement);
18199                    } else html_showElement(this.replayElement);
18200                    if (playerOnly) html_showElement(this.replayElement.parentElement);
18201                    else this.visuals.show();
18202                    if (hasAudio) this.replayElement.setAttribute("volume", "1");
18203                    else if (!isAudioEnabled(this.options)) this.replayElement.setAttribute("muted", "true");
18204                    this.replayElement.load();
18205                    if (this.videomail) this.replayElement.addEventListener("canplaythrough", ()=>{
18206                        this.emit("REPLAY_SHOWN");
18207                    }, {
18208                        once: true
18209                    });
18210                    else this.replayElement.addEventListener("canplaythrough", ()=>{
18211                        this.emit("PREVIEW_SHOWN");
18212                    }, {
18213                        once: true
18214                    });
18215                }
18216                build(replayParentElement) {
18217                    this.options.logger.debug(`Replay: build (replayParentElement="${util_pretty(replayParentElement)}")`);
18218                    this.replayElement = this.visuals.getElement()?.querySelector(`video.${this.options.selectors.replayClass}`);
18219                    if (!this.replayElement) this.buildElement(replayParentElement);
18220                    if (!this.replayElement) throw new Error("There is no replayElement to build on");
18221                    this.hide();
18222                    if (this.options.video.autoPlay) this.replayElement.setAttribute("autoplay", this.options.video.autoPlay.toString());
18223                    this.replayElement.setAttribute("autostart", "true");
18224                    this.replayElement.setAttribute("autobuffer", "true");
18225                    this.replayElement.setAttribute("playsinline", "true");
18226                    this.replayElement.setAttribute("webkit-playsinline", "webkit-playsinline");
18227                    this.replayElement.setAttribute("controls", "controls");
18228                    this.replayElement.setAttribute("preload", "auto");
18229                    if (!this.built) {
18230                        if (!this.isStandalone()) this.on("PREVIEW", (params)=>{
18231                            this.show(params?.width, params?.height, params?.hasAudio);
18232                        });
18233                        this.replayElement.addEventListener("touchstart", (e)=>{
18234                            e.preventDefault();
18235                            if (this.replayElement?.paused) this.replayElement.play().catch((exc)=>{
18236                                throw error_createError({
18237                                    message: "Failed to play replay video while paused upon touchstart event.",
18238                                    exc,
18239                                    options: this.options
18240                                });
18241                            });
18242                            else this.replayElement?.pause();
18243                        }, {
18244                            passive: true
18245                        });
18246                        this.replayElement.addEventListener("click", (e)=>{
18247                            e.preventDefault();
18248                            if (this.replayElement?.paused) this.replayElement.play().catch((exc)=>{
18249                                throw error_createError({
18250                                    message: "Failed to play replay video while paused upon click event.",
18251                                    exc,
18252                                    options: this.options
18253                                });
18254                            });
18255                            else this.replayElement?.pause();
18256                        });
18257                    }
18258                    this.built = true;
18259                    this.options.logger.debug("Replay: built.");
18260                }
18261                unload(params) {
18262                    this.options.logger.debug("Replay: unload()");
18263                    util_Despot.removeAllListeners();
18264                    if (params?.startingOver) this.hide();
18265                    else {
18266                        this.replayElement?.remove();
18267                        this.replayElement = void 0;
18268                    }
18269                    this.videomail = void 0;
18270                    this.built = false;
18271                }
18272                getVideoSource(type) {
18273                    if (!this.replayElement) return;
18274                    const sources = this.replayElement.getElementsByTagName("source");
18275                    const l = sources.length;
18276                    const videoType = `video/${type}`;
18277                    let source;
18278                    if (l) {
18279                        let i;
18280                        for(i = 0; i < l && !source; i++)if (sources[i]?.getAttribute("type") === videoType) source = sources[i];
18281                    }
18282                    return source;
18283                }
18284                setTrackSource(src) {
18285                    if (!this.replayElement) return;
18286                    const tracks = this.replayElement.getElementsByTagName("track");
18287                    const firstTrack = tracks[0];
18288                    if (firstTrack) if (src) firstTrack.setAttribute("src", src);
18289                    else firstTrack.remove();
18290                    else {
18291                        const track = document.createElement("track");
18292                        track.setAttribute("src", src);
18293                        track.src = src;
18294                        track.kind = "captions";
18295                        track.default = true;
18296                        this.replayElement.appendChild(track);
18297                        this.replayElement.setAttribute("crossorigin", "anonymous");
18298                    }
18299                }
18300                setVideoSource(type, src, bustCache) {
18301                    if (!this.replayElement) throw new Error("There is no replay element for appending a video source");
18302                    let source = this.getVideoSource(type);
18303                    let url = src;
18304                    if (url && bustCache) url += `?${Date.now()}`;
18305                    if (source) if (src) source.setAttribute("src", src);
18306                    else source.remove();
18307                    else if (src) {
18308                        const { fps } = this.options.video;
18309                        const t = 1 / fps * 2;
18310                        source = document.createElement("source");
18311                        source.src = `${url}#t=${t}`;
18312                        source.type = `video/${type}`;
18313                        this.replayElement.appendChild(source);
18314                    }
18315                }
18316                setMp4Source(src, bustCache) {
18317                    this.setVideoSource(VideoType.MP4, src, bustCache);
18318                }
18319                setWebMSource(src, bustCache) {
18320                    this.setVideoSource(VideoType.WebM, src, bustCache);
18321                }
18322                getVideoType() {
18323                    if (!this.replayElement) return;
18324                    return util_getBrowser(this.options).getVideoType(this.replayElement);
18325                }
18326                pause(cb) {
18327                    window.setTimeout(()=>{
18328                        try {
18329                            if (this.replayElement) this.replayElement.pause();
18330                        } catch (exc) {
18331                            this.options.logger.warn(exc);
18332                        }
18333                        cb();
18334                    }, 15);
18335                }
18336                reset(cb) {
18337                    this.pause(()=>{
18338                        if (this.replayElement) {
18339                            this.setMp4Source(void 0);
18340                            this.setWebMSource(void 0);
18341                        }
18342                        this.videomail = void 0;
18343                        cb?.();
18344                    });
18345                }
18346                hide() {
18347                    if (this.isStandalone()) this.visuals.hide();
18348                    else if (this.replayElement) {
18349                        html_hideElement(this.replayElement);
18350                        html_hideElement(this.replayElement.parentElement);
18351                    }
18352                }
18353                isShown() {
18354                    if (!this.replayElement) return false;
18355                    return !html_isHidden(this.replayElement) && !this.visuals.isHidden();
18356                }
18357                getVisuals() {
18358                    return this.visuals;
18359                }
18360                getElement() {
18361                    return this.replayElement;
18362                }
18363            }
18364            const visuals_replay = Replay;
18365            class Visuals extends util_Despot {
18366                container;
18367                replay;
18368                recorder;
18369                recorderInsides;
18370                notifier;
18371                visualsElement;
18372                built = false;
18373                constructor(container, options){
18374                    super("Visuals", options);
18375                    this.container = container;
18376                    this.replay = new visuals_replay(this, options);
18377                    this.recorder = new visuals_recorder(this, this.replay, options);
18378                    this.recorderInsides = new recorderInsides(this, options);
18379                    this.notifier = new notifier(this, options);
18380                }
18381                buildNoScriptTag() {
18382                    let noScriptElement = this.container.querySelector("noscript");
18383                    if (noScriptElement) {
18384                        noScriptElement = document.createElement("noscript");
18385                        noScriptElement.innerHTML = "Please enable Javascript";
18386                        this.visualsElement?.appendChild(noScriptElement);
18387                    }
18388                }
18389                buildChildren(playerOnly = false, visualsElement) {
18390                    if (!visualsElement) throw new Error("Unable to build children without a visuals element");
18391                    this.options.logger.debug(`Visuals: buildChildren (playerOnly = ${playerOnly}, visualsElement="${util_pretty(visualsElement)}"})`);
18392                    this.buildNoScriptTag();
18393                    if (!playerOnly) {
18394                        this.notifier.build();
18395                        this.recorderInsides.build();
18396                    }
18397                    this.replay.build(visualsElement);
18398                }
18399                initEvents(playerOnly = false) {
18400                    if (!playerOnly) {
18401                        this.options.logger.debug(`Visuals: initEvents (playerOnly = ${playerOnly})`);
18402                        this.on("USER_MEDIA_READY", ()=>{
18403                            this.built = true;
18404                            this.endWaiting();
18405                            this.container.enableForm(false);
18406                        });
18407                        this.on("PREVIEW", ()=>{
18408                            this.endWaiting();
18409                        });
18410                        this.on("BLOCKING", ()=>{
18411                            if (this.options.adjustFormOnBrowserError) this.container.disableForm(true);
18412                        });
18413                        this.on("PREVIEW_SHOWN", ()=>{
18414                            this.container.validate(void 0, true);
18415                        });
18416                        this.on("LOADED_META_DATA", ()=>{
18417                            this.correctDimensions();
18418                        });
18419                        this.on("ERROR", ()=>{
18420                            if (util_getBrowser(this.options).isMobile()) this.removeDimensions();
18421                        });
18422                        this.on("WINDOW_RESIZE", ()=>{
18423                            this.correctDimensions();
18424                        });
18425                    }
18426                }
18427                correctDimensions() {
18428                    if (this.options.video.stretch) this.removeDimensions();
18429                    else if (this.visualsElement) {
18430                        let heightDimension;
18431                        let widthDimension = dimensions_useFullWidth(this.options.video.mobileBreakPoint);
18432                        if (!widthDimension) {
18433                            widthDimension = this.getRecorderWidth(true);
18434                            heightDimension = this.getRecorderHeight(true);
18435                        }
18436                        if (widthDimension?.value) this.visualsElement.style.width = `${widthDimension.value}${widthDimension.unit}`;
18437                        else this.visualsElement.style.removeProperty("width");
18438                        if (heightDimension?.value) {
18439                            const height = `${heightDimension.value}${heightDimension.unit}`;
18440                            this.visualsElement.style.height = height;
18441                        } else this.visualsElement.style.removeProperty("height");
18442                    }
18443                }
18444                removeDimensions() {
18445                    if (!this.visualsElement) return;
18446                    this.visualsElement.style.width = "auto";
18447                    this.visualsElement.style.height = "auto";
18448                }
18449                getRatio() {
18450                    if (this.visualsElement?.clientWidth) return this.visualsElement.clientHeight / this.visualsElement.clientWidth;
18451                    return 0;
18452                }
18453                isRecordable() {
18454                    return !this.isNotifying() && !this.replay.isShown() && !this.isCountingDown();
18455                }
18456                isCountingDown() {
18457                    return this.recorderInsides.isCountingDown();
18458                }
18459                build(playerOnly = false, parentElement) {
18460                    const parentElementInfo = parentElement ? `, parentElement="${util_pretty(parentElement)}"` : "";
18461                    this.options.logger.debug(`Visuals: build (playerOnly = ${playerOnly}${parentElementInfo})`);
18462                    if (parentElement) this.visualsElement = parentElement.querySelector(`.${this.options.selectors.visualsClass}`);
18463                    else this.visualsElement = this.container.querySelector(`.${this.options.selectors.visualsClass}`);
18464                    if (!this.visualsElement) if (playerOnly && parentElement) this.visualsElement = parentElement;
18465                    else {
18466                        this.visualsElement = document.createElement("div");
18467                        this.visualsElement.classList.add(this.options.selectors.visualsClass);
18468                        const buttonsElement = this.container.querySelector(`.${this.options.selectors.buttonsClass}`);
18469                        if (buttonsElement && !this.container.isOutsideElementOf(buttonsElement)) this.container.insertBefore(this.visualsElement, buttonsElement);
18470                        else this.container.appendChild(this.visualsElement);
18471                    }
18472                    this.visualsElement.classList.add("visuals");
18473                    this.correctDimensions();
18474                    if (!this.built) this.initEvents(playerOnly);
18475                    this.buildChildren(playerOnly, this.visual
18475sElement);
18476                    this.built = true;
18477                }
18478                appendChild(child) {
18479                    this.visualsElement?.appendChild(child);
18480                }
18481                removeChild(child) {
18482                    child.remove();
18483                }
18484                reset() {
18485                    this.endWaiting();
18486                    this.recorder.reset();
18487                }
18488                beginWaiting() {
18489                    this.container.beginWaiting();
18490                }
18491                endWaiting() {
18492                    this.container.endWaiting();
18493                }
18494                stop(params) {
18495                    this.recorder.stop(params);
18496                    this.recorderInsides.hidePause();
18497                }
18498                back(keepHidden = false, cb) {
18499                    this.options.logger.debug(`Visuals: back(keepHidden = ${keepHidden})`);
18500                    this.replay.hide();
18501                    this.notifier.hide();
18502                    if (keepHidden) {
18503                        this.recorder.hide();
18504                        cb?.();
18505                    } else this.recorder.back(cb);
18506                }
18507                recordAgain() {
18508                    this.back(false, ()=>{
18509                        if (this.options.loadUserMediaOnRecord) this.once("SERVER_READY", ()=>{
18510                            this.recorder.record();
18511                        });
18512                        else this.once("USER_MEDIA_READY", ()=>{
18513                            this.recorder.record();
18514                        });
18515                    });
18516                }
18517                unload(params) {
18518                    if (!this.built) return;
18519                    const e = params?.e;
18520                    this.options.logger.debug(`Visuals: unload(${e ? util_pretty(e) : ""})`);
18521                    this.recorder.unload(params);
18522                    this.recorderInsides.unload();
18523                    this.replay.unload(params);
18524                    e instanceof Error || this.hide();
18525                    this.built = false;
18526                }
18527                isNotifying() {
18528                    return this.notifier.isVisible();
18529                }
18530                pause(params) {
18531                    this.recorder.pause(params);
18532                    this.recorderInsides.showPause();
18533                }
18534                resume() {
18535                    if (this.recorderInsides.isCountingDown()) this.recorderInsides.resumeCountdown();
18536                    else this.recorder.resume();
18537                    this.recorderInsides.hidePause();
18538                }
18539                pauseOrResume() {
18540                    if (this.isRecordable()) {
18541                        if (this.isRecording()) this.pause();
18542                        else if (this.recorder.isPaused()) this.resume();
18543                        else if (this.recorder.isReady()) this.recorder.record();
18544                    }
18545                }
18546                recordOrStop() {
18547                    if (this.isRecordable()) {
18548                        if (this.isRecording()) this.stop();
18549                        else if (this.recorder.isReady()) this.recorder.record();
18550                    }
18551                }
18552                getRecorder() {
18553                    return this.recorder;
18554                }
18555                validate() {
18556                    if (this.isReplayShown()) return true;
18557                    return this.recorder.validate();
18558                }
18559                getRecordingStats() {
18560                    return this.recorder.getRecordingStats();
18561                }
18562                getAudioSampleRate() {
18563                    return this.recorder.getAudioSampleRate();
18564                }
18565                isPaused() {
18566                    return this.recorder.isPaused();
18567                }
18568                error(err) {
18569                    this.notifier.error(err);
18570                }
18571                hide() {
18572                    if (this.visualsElement) {
18573                        html_hideElement(this.visualsElement);
18574                        this.emit("HIDE");
18575                    }
18576                }
18577                isHidden() {
18578                    if (!this.built) return true;
18579                    return html_isHidden(this.visualsElement);
18580                }
18581                showVisuals() {
18582                    html_showElement(this.visualsElement);
18583                }
18584                show(params) {
18585                    if (!params?.playerOnly) if (this.isReplayShown()) {
18586                        if (params?.goBack) this.recorder.show();
18587                    } else this.recorder.build();
18588                    this.showVisuals();
18589                }
18590                showReplayOnly() {
18591                    this.show({
18592                        playerOnly: true
18593                    });
18594                    this.recorder.hide();
18595                    this.notifier.hide();
18596                }
18597                isRecorderUnloaded() {
18598                    return this.recorder.isUnloaded();
18599                }
18600                isConnecting() {
18601                    return this.recorder.isConnecting();
18602                }
18603                getRecorderWidth(responsive) {
18604                    return this.recorder.getRecorderWidth(responsive);
18605                }
18606                getRecorderHeight(responsive, useBoundingClientRect = false) {
18607                    return this.recorder.getRecorderHeight(responsive, useBoundingClientRect);
18608                }
18609                limitWidth(width) {
18610                    return this.container.limitWidth(width);
18611                }
18612                limitHeight(height) {
18613                    return this.container.limitHeight(height);
18614                }
18615                getReplay() {
18616                    return this.replay;
18617                }
18618                getBoundingClientRect() {
18619                    return this.visualsElement?.getBoundingClientRect();
18620                }
18621                checkTimer(elapsedTime) {
18622                    this.recorderInsides.checkTimer(elapsedTime);
18623                }
18624                isNotifierBuilt() {
18625                    return this.notifier.isBuilt();
18626                }
18627                isReplayShown() {
18628                    return this.replay.isShown();
18629                }
18630                hideReplay() {
18631                    this.replay.hide();
18632                }
18633                hideRecorder() {
18634                    this.recorder.hide();
18635                }
18636                isRecording() {
18637                    return this.recorder.isRecording();
18638                }
18639                isUserMediaLoaded() {
18640                    return this.recorder.isUserMediaLoaded();
18641                }
18642                isConnected() {
18643                    return this.recorder.isConnected();
18644                }
18645                record() {
18646                    if (this.options.video.countdown) {
18647                        this.emit("COUNTDOWN");
18648                        this.recorderInsides.startCountdown(this.recorder.record.bind(this.recorder));
18649                    } else this.recorder.record();
18650                }
18651                setLimitSeconds(limitSeconds) {
18652                    this.options.video.limitSeconds = limitSeconds;
18653                    this.recorderInsides.setLimitSeconds(limitSeconds);
18654                }
18655                getElement() {
18656                    return this.visualsElement;
18657                }
18658            }
18659            const wrappers_visuals = Visuals;
18660            class Container extends util_Despot {
18661                visibility = document_visibility_default()();
18662                htmlElement = document.querySelector("html");
18663                visuals;
18664                buttons;
18665                resource;
18666                form;
18667                hasError = false;
18668                submitted = false;
18669                lastValidation = false;
18670                containerElement;
18671                built = false;
18672                constructor(options){
18673                    super("Container", options);
18674                    this.visuals = new wrappers_visuals(this, options);
18675                    this.buttons = new buttons(this, options);
18676                    this.resource = new src_resource(options);
18677                }
18678                buildChildren(playerOnly = false, parentElement) {
18679                    const parentElementInfo = parentElement ? `, parentElement="${util_pretty(parentElement)}"` : "";
18680                    this.options.logger.debug(`Container: buildChildren (playerOnly = ${playerOnly}${parentElementInfo})`);
18681                    if (this.containerElement) this.containerElement.classList.add(this.options.selectors.containerClass);
18682                    if (!playerOnly) this.buttons.build();
18683                    this.visuals.build(playerOnly, parentElement);
18684                }
18685                build(buildOptions) {
18686                    this.options.logger.debug(`Container: build (${buildOptions ? util_pretty(buildOptions) : ""})`);
18687                    try {
18688                        const containerId = this.options.selectors.containerId;
18689                        if (containerId) this.containerElement = document.getElementById(containerId);
18690                        else this.containerElement = document.createElement("div");
18691                        this.containerElement?.classList.add(this.options.selectors.containerClass);
18692                        let replayParentElement = null;
18693                        if (buildOptions?.replayParentElement) replayParentElement = buildOptions.replayParentElement;
18694                        else if (buildOptions?.replayParentElementId) replayParentElement = document.getElementById(buildOptions.replayParentElementId);
18695                        if (!this.containerElement && replayParentElement) {
18696                            if (replayParentElement.classList.contains(this.options.selectors.containerClass)) this.containerElement = replayParentElement;
18697                        }
18698                        if (!this.built) this.initEvents(buildOptions?.playerOnly);
18699                        if (!buildOptions?.playerOnly) this.correctDimensions();
18700                        this.buildForm();
18701                        let parentElement;
18702                        parentElement = buildOptions?.playerOnly ? replayParentElement ?? this.containerElement : this.containerElement;
18703                        this.buildChildren(buildOptions?.playerOnly, parentElement);
18704                        if (this.hasError) this.options.logger.debug("Container: building failed due to an error.");
18705                        else {
18706                            this.options.logger.debug("Container: built.");
18707                            this.built = true;
18708                            this.emit("BUILT");
18709                        }
18710                    } catch (exc) {
18711                        this.emit("ERROR", {
18712                            exc
18713                        });
18714                    }
18715                    return this.containerElement;
18716                }
18717                findParentFormElement() {
18718                    if (!this.containerElement) return;
18719                    return this.containerElement.closest("form");
18720                }
18721                getFormElement() {
18722                    let formElement;
18723                    if (this.containerElement?.tagName === "FORM") formElement = this.containerElement;
18724                    else if (this.options.selectors.formId) {
18725                        formElement = document.querySelector(`#${this.options.selectors.formId}`);
18726                        if (formElement && "FORM" !== formElement.tagName) throw new Error(`HTML element with ID ${this.options.selectors.formId} is not a form.`);
18727                    } else formElement = this.findParentFormElement();
18728                    return formElement;
18729                }
18730                buildForm() {
18731                    if (this.form) return;
18732                    const formElement = this.getFormElement();
18733                    if (formElement) {
18734                        this.form = new wrappers_form(this, formElement, this.options);
18735                        const submitButton = this.form.findSubmitButton();
18736                        if (submitButton) this.buttons.setSubmitButton(submitButton);
18737                        this.form.build();
18738                    }
18739                }
18740                processError(params) {
18741                    this.hasError = true;
18742                    if (params.err?.stack) this.options.logger.error(params.err.stack);
18743                    else if (params.err?.message) this.options.logger.error(params.err.message);
18744                    else if (params.exc) if (params.exc instanceof Error) {
18745                        if (params.exc.stack) this.options.logger.error(params.exc.stack);
18746                        else if (params.exc.message) this.options.logger.error(params.exc.message);
18747                    } else this.options.logger.error(params.exc);
18748                    if (this.options.displayErrors && params.err) this.visual
18748s.error(params.err);
18749                    else if (this.options.displayErrors && params.exc && params.exc instanceof error_VideomailError) this.visuals.error(params.exc);
18750                    else this.visuals.reset();
18751                }
18752                initEvents(playerOnly = false) {
18753                    this.options.logger.debug(`Container: initEvents (playerOnly = ${playerOnly})`);
18754                    if (this.options.recalculateDimensionsOnWindowResize) window.addEventListener("resize", ()=>{
18755                        if (!this.built) return;
18756                        this.emit("WINDOW_RESIZE", "container");
18757                    });
18758                    if (this.options.enableAutoUnload) window.addEventListener("beforeunload", (e)=>{
18759                        this.unload({
18760                            e
18761                        });
18762                    }, {
18763                        once: true
18764                    });
18765                    if (!playerOnly) this.visibility.onChange((visible)=>{
18766                        if (this.built) if (visible) {
18767                            if (isAutoPauseEnabled(this.options) && this.isCountingDown()) this.resume();
18768                            this.emit("VISIBLE");
18769                        } else {
18770                            if (isAutoPauseEnabled(this.options) && (this.isCountingDown() || this.isRecording())) this.pause();
18771                            this.emit("INVISIBLE");
18772                        }
18773                    });
18774                    if (this.options.enableSpace) {
18775                        if (!playerOnly) window.addEventListener("keydown", (e)=>{
18776                            const element = e.target;
18777                            const tagName = element.tagName;
18778                            const isEditable = element.isContentEditable || "true" === element.contentEditable;
18779                            if (!isEditable && tagName && "INPUT" !== tagName.toUpperCase() && "TEXTAREA" !== tagName.toUpperCase()) {
18780                                const code = e.code;
18781                                if ("Space" === code) {
18782                                    e.preventDefault();
18783                                    if (this.options.enablePause) this.visuals.pauseOrResume();
18784                                    else this.visuals.recordOrStop();
18785                                }
18786                            }
18787                        });
18788                    }
18789                    this.on("ERROR", (params)=>{
18790                        this.processError(params);
18791                        this.endWaiting();
18792                        const browser = util_getBrowser(this.options);
18793                        if (browser.isMobile()) this.removeDimensions();
18794                    });
18795                    this.on("WINDOW_RESIZE", ()=>{
18796                        this.correctDimensions();
18797                    });
18798                    if (!playerOnly) this.on("LOADED_META_DATA", ()=>{
18799                        this.correctDimensions();
18800                    });
18801                }
18802                correctDimensions() {
18803                    if (this.options.video.stretch) this.removeDimensions();
18804                    else if (this.containerElement) {
18805                        let widthDimension = dimensions_useFullWidth(this.options.video.mobileBreakPoint);
18806                        if (!widthDimension) widthDimension = this.visuals.getRecorderWidth(true);
18807                        if (widthDimension?.value) this.containerElement.style.width = `${widthDimension.value}${widthDimension.unit}`;
18808                        else this.containerElement.style.removeProperty("width");
18809                    }
18810                }
18811                removeDimensions() {
18812                    if (!this.containerElement) return;
18813                    this.containerElement.style.width = "auto";
18814                }
18815                unloadChildren(params) {
18816                    this.visuals.unload(params);
18817                    this.buttons.unload();
18818                    if (this.form) {
18819                        this.form.unload();
18820                        this.form = void 0;
18821                    }
18822                    this.endWaiting();
18823                }
18824                hideMySelf() {
18825                    html_hideElement(this.containerElement);
18826                }
18827                async submitVideomail(formInputs, method) {
18828                    const videomailFormData = this.form?.transformFormData(formInputs);
18829                    if (!videomailFormData) throw new Error("No videomail form data defined");
18830                    if (method === FormMethod.POST) {
18831                        videomailFormData.recordingStats = this.visuals.getRecordingStats();
18832                        const widthDimension = this.visuals.getRecorderWidth(true);
18833                        const heightDimension = this.visuals.getRecorderHeight(true);
18834                        videomailFormData.width = widthDimension?.value;
18835                        videomailFormData.height = heightDimension?.value;
18836                        return await this.resource.post(videomailFormData);
18837                    }
18838                    if (method === FormMethod.PUT) return await this.resource.put(videomailFormData);
18839                    throw error_createError({
18840                        message: `Unsupported form method ${method}, unable to submit videomail.`,
18841                        options: this.options
18842                    });
18843                }
18844                limitWidth(width) {
18845                    if (!this.containerElement) return;
18846                    return dimensions_limitWidth(this.containerElement, this.options, width);
18847                }
18848                limitHeight(height) {
18849                    return dimensions_limitHeight(height, this.options, "containers limitHeight fn");
18850                }
18851                areVisualsHidden() {
18852                    return this.visuals.isHidden();
18853                }
18854                hasElement() {
18855                    return Boolean(this.containerElement);
18856                }
18857                getSubmitButton() {
18858                    return this.buttons.getSubmitButton();
18859                }
18860                querySelector(selector) {
18861                    if (!this.containerElement) return;
18862                    return this.containerElement.querySelector(selector);
18863                }
18864                beginWaiting() {
18865                    this.htmlElement?.classList.add("wait");
18866                }
18867                endWaiting() {
18868                    this.htmlElement?.classList.remove("wait");
18869                }
18870                appendChild(child) {
18871                    if (!this.containerElement || this.containerElement === child) return;
18872                    this.containerElement.appendChild(child);
18873                }
18874                insertBefore(child, reference) {
18875                    if (!this.containerElement) return;
18876                    this.containerElement.insertBefore(child, reference);
18877                }
18878                unload(params) {
18879                    try {
18880                        if (!this.built) return;
18881                        const e = params?.e;
18882                        this.options.logger.debug(`Container: unload(${e ? util_pretty(e) : ""})`);
18883                        this.emit("UNLOADING");
18884                        this.unloadChildren(params);
18885                        this.hide();
18886                    } catch (exc) {
18887                        this.emit("ERROR", {
18888                            exc
18889                        });
18890                    } finally{
18891                        util_Despot.removeAllListeners();
18892                        this.built = this.submitted = false;
18893                    }
18894                }
18895                show(params) {
18896                    if (!this.containerElement) throw error_createError({
18897                        message: "No container element exists.",
18898                        options: this.options
18899                    });
18900                    html_showElement(this.containerElement);
18901                    this.visuals.show(params);
18902                    if (!this.hasError) {
18903                        const paused = this.isPaused();
18904                        if (paused) this.buttons.adjustButtonsForPause();
18905                        this.buttons.show();
18906                        if (this.isReplayShown()) this.emit("PREVIEW");
18907                        else this.emit("FORM_READY", {
18908                            paused
18909                        });
18910                    }
18911                    return this.containerElement;
18912                }
18913                hide() {
18914                    this.options.logger.debug("Container: hide()");
18915                    this.hasError = false;
18916                    if (this.isRecording()) this.pause();
18917                    this.visuals.hide();
18918                    if (this.submitted) {
18919                        this.buttons.hide();
18920                        this.hideMySelf();
18921                    }
18922                }
18923                startOver(params) {
18924                    try {
18925                        const keepHidden = params?.keepHidden;
18926                        this.options.logger.debug(`Container: startOver(keepHidden = ${keepHidden})`);
18927                        this.submitted = false;
18928                        const replay = this.getReplay();
18929                        replay.hide();
18930                        replay.reset();
18931                        this.build();
18932                        this.emit("STARTING_OVER");
18933                        this.visuals.back(keepHidden, ()=>{
18934                            this.enableForm(true);
18935                            keepHidden || this.show();
18936                        });
18937                    } catch (exc) {
18938                        this.emit("ERROR", {
18939                            exc
18940                        });
18941                    }
18942                }
18943                showReplayOnly() {
18944                    this.hasError = false;
18945                    if (this.isRecording()) this.pause();
18946                    this.visuals.showReplayOnly();
18947                    if (this.submitted) this.buttons.hide();
18948                }
18949                isNotifying() {
18950                    return this.visuals.isNotifying();
18951                }
18952                isPaused() {
18953                    return this.visuals.isPaused();
18954                }
18955                pause(params) {
18956                    this.visuals.pause(params);
18957                }
18958                validate(event, force = false) {
18959                    let runValidation = true;
18960                    let valid = true;
18961                    if (this.built) if (this.options.enableAutoValidation) {
18962                        if (force) runValidation = force;
18963                        else if (this.isNotifying()) runValidation = false;
18964                        else if (this.visuals.isConnected()) runValidation = this.visuals.isUserMediaLoaded() ?? this.visual
18964s.isReplayShown();
18965                        else if (this.visuals.isConnecting()) runValidation = false;
18966                    } else {
18967                        runValidation = false;
18968                        this.lastValidation = true;
18969                    }
18970                    else runValidation = false;
18971                    if (runValidation) {
18972                        const targetName = event?.target?.name;
18973                        if (targetName) this.emit("VALIDATING", {
18974                            targetName
18975                        });
18976                        else if (event) this.emit("VALIDATING", {
18977                            event
18978                        });
18979                        else this.emit("VALIDATING");
18980                        let whyInvalid;
18981                        const isRecordAgainButtonEnabled = this.buttons.isRecordAgainButtonEnabled();
18982                        const visualsValid = this.visuals.validate() && isRecordAgainButtonEnabled;
18983                        let invalidData;
18984                        if (this.form) {
18985                            const invalidInput = this.form.getInvalidElement();
18986                            if (invalidInput) {
18987                                const name = invalidInput.getAttribute("name");
18988                                const validity = util_getValidity(invalidInput);
18989                                valid = false;
18990                                if (name) if (validity?.valueMissing) whyInvalid = `Please fill out field "${name}" ⚠️`;
18991                                else {
18992                                    whyInvalid = `Input "${name}" seems wrong 🤔`;
18993                                    invalidData = {
18994                                        [name]: invalidInput.getAttribute("value")
18995                                    };
18996                                }
18997                            } else if (!this.areVisualsHidden() && !visualsValid) {
18998                                if (this.buttonsAreReady() || this.isRecording() || this.isPaused() || this.isCountingDown()) {
18999                                    valid = false;
19000                                    whyInvalid = "Don't forget to record a video 😉";
19001                                    invalidData = {
19002                                        key: void 0
19003                                    };
19004                                }
19005                            }
19006                            if (valid) {
19007                                const recipients = this.form.getRecipients();
19008                                const toIsConfigured = "to" in recipients;
19009                                const ccIsConfigured = "cc" in recipients;
19010                                const bccIsConfigured = "bcc" in recipients;
19011                                const hasTo = recipients.to && recipients.to.length > 0;
19012                                const hasCc = recipients.cc && recipients.cc.length > 0;
19013                                const hasBcc = recipients.bcc && recipients.bcc.length > 0;
19014                                if (toIsConfigured) {
19015                                    if (!hasTo) if (ccIsConfigured && bccIsConfigured) {
19016                                        if (!hasCc && !hasBcc) valid = false;
19017                                    } else if (ccIsConfigured) {
19018                                        if (!hasCc) valid = false;
19019                                    } else if (bccIsConfigured) {
19020                                        if (!hasBcc) valid = false;
19021                                    } else valid = false;
19022                                } else if (ccIsConfigured) {
19023                                    if (!hasCc) {
19024                                        if (bccIsConfigured && !hasBcc) valid = false;
19025                                    }
19026                                }
19027                                if (!valid) whyInvalid = "At least one recipient is required";
19028                            }
19029                        } else {
19030                            valid = visualsValid;
19031                            whyInvalid = "Because visuals aren't valid";
19032                        }
19033                        if (valid) this.emit("VALID");
19034                        else if (invalidData) this.emit("INVALID", {
19035                            whyInvalid,
19036                            invalidData
19037                        });
19038                        else this.emit("INVALID", {
19039                            whyInvalid
19040                        });
19041                        this.lastValidation = valid;
19042                    }
19043                    return valid;
19044                }
19045                disableForm(buttonsToo) {
19046                    this.form?.disable(buttonsToo);
19047                }
19048                enableForm(buttonsToo) {
19049                    this.form?.enable(buttonsToo);
19050                }
19051                hasForm() {
19052                    return Boolean(this.form);
19053                }
19054                buttonsAreReady() {
19055                    return this.buttons.isReady();
19056                }
19057                async submitAll(formData, method, url) {
19058                    let response;
19059                    try {
19060                        const hasVideomailKey = Boolean(formData[this.options.selectors.keyInputName]);
19061                        if (!hasVideomailKey && !this.options.enableAutoSubmission) return;
19062                        const output = [
19063                            method,
19064                            url
19065                        ].filter(Boolean).join(": ");
19066                        this.options.logger.debug(`Container: submitAll(${output})`);
19067                        this.beginWaiting();
19068                        if (this.options.disableFormWhenSubmitting) this.disableForm(true);
19069                        this.emit("SUBMITTING");
19070                        if (hasVideomailKey) {
19071                            response = await this.submitVideomail(formData, method);
19072                            this.submitted = true;
19073                            this.emit("SUBMITTED", {
19074                                videomail: response.body.videomail,
19075                                response
19076                            });
19077                        } else {
19078                            response = await this.resource.form(formData, url);
19079                            this.submitted = true;
19080                            this.emit("SUBMITTED", {
19081                                videomail: response.body,
19082                                response
19083                            });
19084                        }
19085                    } catch (exc) {
19086                        const err = error_createError({
19087                            exc,
19088                            options: this.options
19089                        });
19090                        this.emit("ERROR", {
19091                            err
19092                        });
19093                    } finally{
19094                        if (response?.text && "text/html" === response.type) document.body.innerHTML = response.text;
19095                        this.endWaiting();
19096                    }
19097                }
19098                isBuilt() {
19099                    return this.built;
19100                }
19101                isReplayShown() {
19102                    return this.visuals.isReplayShown();
19103                }
19104                isDirty() {
19105                    let isDirty = false;
19106                    if (this.form) {
19107                        if (this.visuals.isRecorderUnloaded()) isDirty = false;
19108                        else if (this.submitted) isDirty = false;
19109                        else if (this.isReplayShown() || this.isPaused()) isDirty = true;
19110                    }
19111                    return isDirty;
19112                }
19113                getReplay() {
19114                    return this.visuals.getReplay();
19115                }
19116                isOutsideElementOf(element) {
19117                    return element.parentNode !== this.containerElement && element !== this.containerElement;
19118                }
19119                loadForm(videomail) {
19120                    if (!this.form) return;
19121                    this.form.loadVideomail(videomail);
19122                    this.validate();
19123                }
19124                enableAudio() {
19125                    this.options = setAudioEnabled(true, this.options);
19126                    this.emit("ENABLING_AUDIO");
19127                }
19128                disableAudio() {
19129                    this.options = setAudioEnabled(false, this.options);
19130                    this.emit("DISABLING_AUDIO");
19131                }
19132                async submit() {
19133                    this.options.logger.debug("Container: submit()");
19134                    if (this.lastValidation) return await this.form?.doTheSubmit();
19135                    return false;
19136                }
19137                isCountingDown() {
19138                    return this.visuals.isCountingDown();
19139                }
19140                isRecording() {
19141                    return this.visuals.isRecording();
19142                }
19143                record() {
19144                    this.visuals.record();
19145                }
19146                resume() {
19147                    this.visuals.resume();
19148                }
19149                stop() {
19150                    this.visuals.stop();
19151                }
19152                recordAgain() {
19153                    this.visuals.recordAgain();
19154                }
19155                setLimitSeconds(limitSeconds) {
19156                    this.options.video.limitSeconds = limitSeconds;
19157                    this.visuals.setLimitSeconds(limitSeconds);
19158                }
19159            }
19160            const wrappers_container = Container;
19161            class VideomailClient extends util_Despot {
19162                container;
19163                static ENC_TYPE_APP_JSON = constants["public"].ENC_TYPE_APP_JSON;
19164                static ENC_TYPE_FORM = constants["public"].ENC_TYPE_FORM;
19165                constructor(options = {}){
19166                    super("VideomailClient", options_mergeWithDefaultOptions(options));
19167                    this.validateOptions();
19168                    util_Despot.removeAllListeners();
19169                    this.container = new wrappers_container(this.options);
19170                }
19171                validateOptions() {
19172                    const width = this.options.video.width;
19173                    if (void 0 !== width && width % 2 !== 0) throw error_createError({
19174                        message: "Width must be divisible by two.",
19175                        options: this.options
19176                    });
19177                    const height = this.options.video.height;
19178                    if (void 0 !== height && height % 2 !== 0) throw error_createError({
19179                        message: "Height must be divisible by two.",
19180                        options: this.options
19181                    });
19182                }
19183                build() {
19184                    if (!this.container.isBuilt()) {
19185                        this.options.logger.debug("Client: build()");
19186                        return this.container.build();
19187                    }
19188                }
19189                show(params) {
19190                    this.build();
19191                    return this.container.show(params);
19192                }
19193                startOver(params) {
19194                    this.unload(true);
19195                    this.container.startOver(params);
19196                }
19197                setLimitSeconds(limitSeconds) {
19198                    if (this.options.video.limitSeconds === limitSeconds) return void this.options.logger.debug(`Client: setLimitSeconds called but limitSeconds is already ${limitSeconds}, doing nothing.`);
19199                    this.options.video.limitSeconds = limitSeconds;
19200                    this.options.logger.debug(`Client: setLimitSeconds (limitSeconds = ${limitSeconds})`);
19201                    this.container.setLimitSeconds(limitSeconds);
19202                }
19203                unload(startingOver = false) {
19204                    this.container.unload({
19205                        startingOver
19206                    });
19207                }
19208                replay(videomail, replayParentElementId) {
19209                    if (this.container.isBuilt()) this.container.unload();
19210                    this.container.build({
19211                        playerOnly: true,
19212                        replayParentElementId
19213                    });
19214                    this.container.buildForm();
19215                    this.once("REPLAY_SHOWN", ()=>{
19216                        this.container.showReplayOnly();
19217                        this.container.loadForm(videomail);
19218                    });
19219                    const replay = this.container.getReplay();
19220                    replay.setVideomail(videomail, true);
19221                    const playerElement = replay.getElement();
19222                    if (!playerElement) throw new Error("Failed to build a player element");
19223                    return playerElement;
19224                }
19225                hide() {
19226                    this.container.hide();
19227                }
19228                async getByAlias(alias) {
19229                    const resource = new src_resource(this.options);
19230                    return await resource.getByAlias(alias);
19231                }
19232                async getByKey(key) {
19233                    const resource = new src_resource(this.options);
19234                    return await resource.getByKey(key);
19235                }
19236                async getThreadByAlias(alias) {
19237                    const resource = new src_resource(this.options);
19238                    return await resource.getThreadByAlias(alias);
19239                }
19240                async getThreadByKey(key) {
19241                    const resource = new src_resource(this.options);
19242                    return await resource.getThreadByKey(key);
19243                }
19244                isDirty() {
19245                    return this.container.isDirty();
19246                }
19247                isBuilt() {
19248                    return this.container.isBuilt();
19249                }
19250                isRecording() {
19251                    return this.container.isRecording();
19252                }
19253                submit() {
19254                    this.container.submit();
19255                }
19256                record() {
19257                    this.container.record();
19258                }
19259                getLogLines() {
19260                    if (this.options.logger.getLines) return this.options.logger.getLines();
19261                }
19262            }
19263            const Reactions = {
19264                LOVE: {
19265                    key: "love",
19266                    label: "Love"
19267                },
19268                APPLAUSE: {
19269                    key: "applause",
19270                    label: "Applause"
19271                },
19272                GRINNING_SWEAT: {
19273                    key: "grinningSweat",
19274                    label: "Whew!"
19275                },
19276                FIRE: {
19277                    key: "fire",
19278                    label: "Fire"
19279                },
19280                SAD: {
19281                    key: "sad",
19282                    label: "Sad"
19283                }
19284            };
19285        })();
19286        return __webpack_exports__;
19287    })());

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.