diff --git a/.gitignore b/.gitignore index 1e0df221..7dbbda70 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .DS_Store node_modules - +dist +build # local env files .env.local @@ -40,4 +41,4 @@ yarn.lock !bower.json !composer.json -!package.js +!package.js \ No newline at end of file diff --git a/1.hello-world/1.minimum-code.html b/1.hello-world/1.hello-world.html similarity index 77% rename from 1.hello-world/1.minimum-code.html rename to 1.hello-world/1.hello-world.html index 402078d8..641865ca 100644 --- a/1.hello-world/1.minimum-code.html +++ b/1.hello-world/1.hello-world.html @@ -10,16 +10,14 @@ -

Read Barcodes from a Camera

- + Loading... diff --git a/1.hello-world/2.read-an-image.html b/1.hello-world/2.read-an-image.html index fe6ed1f3..85f62c7a 100644 --- a/1.hello-world/2.read-an-image.html +++ b/1.hello-world/2.read-an-image.html @@ -12,17 +12,22 @@

Read Barcode from Images

- + -

Loading Library...

+

Loading...

All Results:

- - diff --git a/1.hello-world/3.read-video-angular/dist/hello-world/main.js b/1.hello-world/3.read-video-angular/dist/hello-world/main.js deleted file mode 100644 index 2b1d1c15..00000000 --- a/1.hello-world/3.read-video-angular/dist/hello-world/main.js +++ /dev/null @@ -1,435 +0,0 @@ -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["main"],{ - -/***/ 0: -/*!***************************!*\ - !*** multi ./src/main.ts ***! - \***************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(/*! D:\project_test\dynamsoft\barcode-reader-javascript-samples\1.hello-world\3.read-video-angular\src\main.ts */"zUnb"); - - -/***/ }), - -/***/ "68dY": -/*!******************************************************!*\ - !*** ./src/app/hello-world/hello-world.component.ts ***! - \******************************************************/ -/*! exports provided: HelloWorldComponent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HelloWorldComponent", function() { return HelloWorldComponent; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG"); -/* harmony import */ var _dbr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../dbr */ "QmJJ"); -/* harmony import */ var dynamsoft_javascript_barcode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dynamsoft-javascript-barcode */ "qQmn"); -/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL"); -/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ "ofXK"); -/* harmony import */ var _barcode_scanner_barcode_scanner_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../barcode-scanner/barcode-scanner.component */ "gFWJ"); -/* harmony import */ var _img_decode_img_decode_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../img-decode/img-decode.component */ "yjda"); - - // import side effects. The license, engineResourcePath, so on. - - - - - -function HelloWorldComponent_app_video_decode_10_Template(rf, ctx) { if (rf & 1) { - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelement"](0, "app-video-decode"); -} } -function HelloWorldComponent_app_img_decode_11_Template(rf, ctx) { if (rf & 1) { - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelement"](0, "app-img-decode"); -} } -const _c0 = function (a1) { return { "margin-right": "10px", "background-color": a1 }; }; -const _c1 = function (a0) { return { "background-color": a0 }; }; -class HelloWorldComponent { - constructor() { - this.bShowScanner = true; - this.bShowImgDecode = false; - } - ngOnInit() { - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () { - // Load the library on page load to speed things up. - try { - yield dynamsoft_javascript_barcode__WEBPACK_IMPORTED_MODULE_2__["BarcodeScanner"].loadWasm(); - } - catch (ex) { - alert(ex.message); - } - }); - } - showScanner() { - this.bShowScanner = true; - this.bShowImgDecode = false; - } - showImgDecode() { - this.bShowScanner = false; - this.bShowImgDecode = true; - } -} -HelloWorldComponent.ɵfac = function HelloWorldComponent_Factory(t) { return new (t || HelloWorldComponent)(); }; -HelloWorldComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineComponent"]({ type: HelloWorldComponent, selectors: [["app-hello-world"]], decls: 12, vars: 8, consts: [[1, "helloWorld"], ["alt", "logo", "src", "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==", 2, "height", "25px"], [1, "btn-group"], [3, "ngStyle", "click"], [1, "container"], [4, "ngIf"]], template: function HelloWorldComponent_Template(rf, ctx) { if (rf & 1) { - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](0, "div", 0); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](1, "h1"); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](2, "Hello World for Angular"); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelement"](3, "img", 1); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](4, "div", 2); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](5, "button", 3); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("click", function HelloWorldComponent_Template_button_click_5_listener() { return ctx.showScanner(); }); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](6, "Video Decode"); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](7, "button", 3); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("click", function HelloWorldComponent_Template_button_click_7_listener() { return ctx.showImgDecode(); }); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](8, "Image Decode"); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](9, "div", 4); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](10, HelloWorldComponent_app_video_decode_10_Template, 1, 0, "app-video-decode", 5); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](11, HelloWorldComponent_app_img_decode_11_Template, 1, 0, "app-img-decode", 5); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"](); - } if (rf & 2) { - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](5); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngStyle", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpureFunction1"](4, _c0, ctx.bShowScanner ? "rgb(255,174,55)" : "white")); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](2); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngStyle", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpureFunction1"](6, _c1, !ctx.bShowScanner ? "rgb(255,174,55)" : "white")); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](3); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngIf", ctx.bShowScanner); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](1); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngIf", ctx.bShowImgDecode); - } }, directives: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["NgStyle"], _angular_common__WEBPACK_IMPORTED_MODULE_4__["NgIf"], _barcode_scanner_barcode_scanner_component__WEBPACK_IMPORTED_MODULE_5__["VideoDecodeComponent"], _img_decode_img_decode_component__WEBPACK_IMPORTED_MODULE_6__["ImgDecodeComponent"]], styles: [".helloWorld[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n width: 100%;\n height: 100%;\n color: #455A64;\n }\n\n button[_ngcontent-%COMP%] {\n font-size: 1.5rem;\n margin: 1.5vh 0;\n border: 1px solid black;\n background-color: white;\n color: black;\n }\n\n span[_ngcontent-%COMP%] {\n font-size: 0.8rem;\n }\n\n .bigger[_ngcontent-%COMP%] {\n font-size: large;\n margin-bottom: 2%;\n }\n\n .container[_ngcontent-%COMP%] {\n margin: 2vmin auto;\n text-align: center;\n font-size: medium;\n \n width: 80vw;\n }\n\n h1[_ngcontent-%COMP%] {\n font-size: 1.5em;\n }\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhlbGxvLXdvcmxkLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IklBQUk7TUFDRSxhQUFhO01BQ2Isc0JBQXNCO01BQ3RCLG1CQUFtQjtNQUNuQix1QkFBdUI7TUFDdkIsZ0JBQWdCO01BQ2hCLFdBQVc7TUFDWCxZQUFZO01BQ1osY0FBYztJQUNoQjs7SUFFQTtNQUNFLGlCQUFpQjtNQUNqQixlQUFlO01BQ2YsdUJBQXVCO01BQ3ZCLHVCQUF1QjtNQUN2QixZQUFZO0lBQ2Q7O0lBRUE7TUFDRSxpQkFBaUI7SUFDbkI7O0lBRUE7TUFDRSxnQkFBZ0I7TUFDaEIsaUJBQWlCO0lBQ25COztJQUVBO01BQ0Usa0JBQWtCO01BQ2xCLGtCQUFrQjtNQUNsQixpQkFBaUI7TUFDakIsa0JBQWtCO01BQ2xCLFdBQVc7SUFDYjs7SUFFQTtNQUNFLGdCQUFnQjtJQUNsQiIsImZpbGUiOiJoZWxsby13b3JsZC5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiICAgIC5oZWxsb1dvcmxkIHtcbiAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgaGVpZ2h0OiAxMDAlO1xuICAgICAgY29sb3I6ICM0NTVBNjQ7XG4gICAgfVxuXG4gICAgYnV0dG9uIHtcbiAgICAgIGZvbnQtc2l6ZTogMS41cmVtO1xuICAgICAgbWFyZ2luOiAxLjV2aCAwO1xuICAgICAgYm9yZGVyOiAxcHggc29saWQgYmxhY2s7XG4gICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB3aGl0ZTtcbiAgICAgIGNvbG9yOiBibGFjaztcbiAgICB9XG5cbiAgICBzcGFuIHtcbiAgICAgIGZvbnQtc2l6ZTogMC44cmVtO1xuICAgIH1cblxuICAgIC5iaWdnZXIge1xuICAgICAgZm9udC1zaXplOiBsYXJnZTtcbiAgICAgIG1hcmdpbi1ib3R0b206IDIlO1xuICAgIH1cblxuICAgIC5jb250YWluZXIge1xuICAgICAgbWFyZ2luOiAydm1pbiBhdXRvO1xuICAgICAgdGV4dC1hbGlnbjogY2VudGVyO1xuICAgICAgZm9udC1zaXplOiBtZWRpdW07XG4gICAgICAvKiBoZWlnaHQ6IDQwdmg7ICovXG4gICAgICB3aWR0aDogODB2dztcbiAgICB9XG5cbiAgICBoMSB7XG4gICAgICBmb250LXNpemU6IDEuNWVtO1xuICAgIH1cbiJdfQ== */"] }); - - -/***/ }), - -/***/ "AytR": -/*!*****************************************!*\ - !*** ./src/environments/environment.ts ***! - \*****************************************/ -/*! exports provided: environment */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "environment", function() { return environment; }); -// This file can be replaced during build by using the `fileReplacements` array. -// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. -// The list of file replacements can be found in `angular.json`. -const environment = { - production: false -}; -/* - * For easier debugging in development mode, you can import the following file - * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. - * - * This import should be commented out in production mode because it will have a negative impact - * on performance if an error is thrown. - */ -// import 'zone.js/dist/zone-error'; // Included with Angular CLI. - - -/***/ }), - -/***/ "QmJJ": -/*!************************!*\ - !*** ./src/app/dbr.ts ***! - \************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var dynamsoft_javascript_barcode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dynamsoft-javascript-barcode */ "qQmn"); - -/** LICENSE ALERT - README - * To use the library, you need to first specify a license key using the API "license" as shown below. - */ -dynamsoft_javascript_barcode__WEBPACK_IMPORTED_MODULE_0__["BarcodeReader"].license = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9'; -/** - * You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=github&product=dbr&package=js to get your own trial license good for 30 days. - * Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license. - * For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.0&utm_source=github#specify-the-license or contact support@dynamsoft.com. - * LICENSE ALERT - THE END - */ -dynamsoft_javascript_barcode__WEBPACK_IMPORTED_MODULE_0__["BarcodeReader"].engineResourcePath = 'https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/'; - - -/***/ }), - -/***/ "Sy1n": -/*!**********************************!*\ - !*** ./src/app/app.component.ts ***! - \**********************************/ -/*! exports provided: AppComponent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppComponent", function() { return AppComponent; }); -/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); -/* harmony import */ var _hello_world_hello_world_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hello-world/hello-world.component */ "68dY"); - - -class AppComponent { - constructor() { - this.title = 'hello-world'; - } -} -AppComponent.ɵfac = function AppComponent_Factory(t) { return new (t || AppComponent)(); }; -AppComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: AppComponent, selectors: [["app-root"]], decls: 1, vars: 0, template: function AppComponent_Template(rf, ctx) { if (rf & 1) { - _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](0, "app-hello-world"); - } }, directives: [_hello_world_hello_world_component__WEBPACK_IMPORTED_MODULE_1__["HelloWorldComponent"]], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJhcHAuY29tcG9uZW50LmNzcyJ9 */"] }); - - -/***/ }), - -/***/ "ZAI4": -/*!*******************************!*\ - !*** ./src/app/app.module.ts ***! - \*******************************/ -/*! exports provided: AppModule */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppModule", function() { return AppModule; }); -/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/platform-browser */ "jhN1"); -/* harmony import */ var _app_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./app.component */ "Sy1n"); -/* harmony import */ var _hello_world_hello_world_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hello-world/hello-world.component */ "68dY"); -/* harmony import */ var _barcode_scanner_barcode_scanner_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./barcode-scanner/barcode-scanner.component */ "gFWJ"); -/* harmony import */ var _img_decode_img_decode_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./img-decode/img-decode.component */ "yjda"); -/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "fXoL"); - - - - - - -class AppModule { -} -AppModule.ɵfac = function AppModule_Factory(t) { return new (t || AppModule)(); }; -AppModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdefineNgModule"]({ type: AppModule, bootstrap: [_app_component__WEBPACK_IMPORTED_MODULE_1__["AppComponent"]] }); -AppModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdefineInjector"]({ providers: [], imports: [[ - _angular_platform_browser__WEBPACK_IMPORTED_MODULE_0__["BrowserModule"] - ]] }); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵsetNgModuleScope"](AppModule, { declarations: [_app_component__WEBPACK_IMPORTED_MODULE_1__["AppComponent"], - _hello_world_hello_world_component__WEBPACK_IMPORTED_MODULE_2__["HelloWorldComponent"], - _barcode_scanner_barcode_scanner_component__WEBPACK_IMPORTED_MODULE_3__["VideoDecodeComponent"], - _img_decode_img_decode_component__WEBPACK_IMPORTED_MODULE_4__["ImgDecodeComponent"]], imports: [_angular_platform_browser__WEBPACK_IMPORTED_MODULE_0__["BrowserModule"]] }); })(); - - -/***/ }), - -/***/ "gFWJ": -/*!**************************************************************!*\ - !*** ./src/app/barcode-scanner/barcode-scanner.component.ts ***! - \**************************************************************/ -/*! exports provided: VideoDecodeComponent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VideoDecodeComponent", function() { return VideoDecodeComponent; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG"); -/* harmony import */ var dynamsoft_javascript_barcode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dynamsoft-javascript-barcode */ "qQmn"); -/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "fXoL"); - - - -class VideoDecodeComponent { - constructor() { - this.pScanner = null; - } - ngOnInit() { - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () { - try { - const scanner = yield (this.pScanner = dynamsoft_javascript_barcode__WEBPACK_IMPORTED_MODULE_1__["BarcodeScanner"].createInstance()); - yield scanner.setUIElement(document.querySelector('.component-barcode-scanner')); - scanner.onFrameRead = (results) => { - for (const result of results) { - console.log(result.barcodeText); - } - }; - scanner.onUniqueRead = (txt, result) => { - alert(txt); - }; - yield scanner.open(); - } - catch (ex) { - console.error(ex); - } - }); - } - ngOnDestroy() { - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () { - if (this.pScanner) { - (yield this.pScanner).destroyContext(); - console.log('BarcodeScanner Component Unmount'); - } - }); - } -} -VideoDecodeComponent.ɵfac = function VideoDecodeComponent_Factory(t) { return new (t || VideoDecodeComponent)(); }; -VideoDecodeComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineComponent"]({ type: VideoDecodeComponent, selectors: [["app-video-decode"]], decls: 32, vars: 0, consts: [[1, "component-barcode-scanner"], ["viewBox", "0 0 1792 1792", 1, "dce-bg-loading"], ["d", "M1760 896q0 176-68.5 336t-184 275.5-275.5 184-336 68.5-336-68.5-275.5-184-184-275.5-68.5-336q0-213 97-398.5t265-305.5 374-151v228q-221 45-366.5 221t-145.5 406q0 130 51 248.5t136.5 204 204 136.5 248.5 51 248.5-51 204-136.5 136.5-204 51-248.5q0-230-145.5-406t-366.5-221v-228q206 31 374 151t265 305.5 97 398.5z"], ["viewBox", "0 0 2048 1792", 1, "dce-bg-camera", 2, "display", "none"], ["d", "M1024 672q119 0 203.5 84.5t84.5 203.5-84.5 203.5-203.5 84.5-203.5-84.5-84.5-203.5 84.5-203.5 203.5-84.5zm704-416q106 0 181 75t75 181v896q0 106-75 181t-181 75h-1408q-106 0-181-75t-75-181v-896q0-106 75-181t181-75h224l51-136q19-49 69.5-84.5t103.5-35.5h512q53 0 103.5 35.5t69.5 84.5l51 136h224zm-704 1152q185 0 316.5-131.5t131.5-316.5-131.5-316.5-316.5-131.5-316.5 131.5-131.5 316.5 131.5 316.5 316.5 131.5z"], [1, "dce-video-container"], [1, "dce-scanarea"], [1, "dce-scanlight", 2, "display", "none"], [1, "div-select-container"], [1, "dce-sel-camera"], [1, "dce-sel-resolution"], [1, "dbr-msg-poweredby"], ["viewBox", "0 0 94 17"], ["d", "M0.9,14V4.3h2.3c0.6,0,1,0.1,1.4,0.3c0.3,0.2,0.6,0.5,0.7,0.9s0.2,0.8,0.2,1.4c0,0.5-0.1,0.9-0.2,1.3 C5.1,8.5,4.9,8.8,4.5,9.1C4.2,9.3,3.7,9.4,3.2,9.4H1.8V14H0.9z M1.8,8.7h1.2c0.4,0,0.7-0.1,1-0.2S4.3,8.2,4.4,8 c0.1-0.3,0.2-0.6,0.2-1.1c0-0.5,0-0.9-0.1-1.2C4.3,5.4,4.2,5.2,3.9,5.1S3.4,5,2.9,5H1.8V8.7z"], ["d", "M8.1,14.1c-0.5,0-0.8-0.1-1.1-0.3s-0.5-0.5-0.6-0.9s-0.2-0.9-0.2-1.4V9.6c0-0.6,0.1-1,0.2-1.4 C6.5,7.8,6.7,7.5,7,7.3S7.6,7,8.1,7C8.6,7,9,7.1,9.2,7.3s0.5,0.5,0.6,0.9C9.9,8.5,9.9,9,9.9,9.6v1.9c0,0.6-0.1,1-0.2,1.4 c-0.1,0.4-0.3,0.7-0.6,0.9S8.6,14.1,8.1,14.1z M8.1,13.4c0.3,0,0.5-0.1,0.7-0.2C8.9,13,9,12.8,9,12.5c0-0.3,0-0.6,0-1v-2 c0-0.4,0-0.7,0-1C9,8.2,8.9,8,8.8,7.9C8.6,7.7,8.4,7.6,8.1,7.6c-0.3,0-0.5,0.1-0.7,0.2C7.3,8,7.2,8.2,7.2,8.5c0,0.3-0.1,0.6-0.1,1 v2c0,0.4,0,0.7,0.1,1c0,0.3,0.1,0.5,0.3,0.7C7.6,13.4,7.8,13.4,8.1,13.4z"], ["d", "M12,14l-1.1-6.9h0.7l0.9,5.8l1.1-5.8h0.8l1.1,5.8l0.8-5.8H17L15.9,14H15l-1.1-5.6L12.8,14H12z"], ["d", "M19.8,14.1c-0.4,0-0.8-0.1-1.1-0.3s-0.5-0.5-0.6-0.9c-0.1-0.4-0.2-0.9-0.2-1.6V9.6c0-0.7,0.1-1.2,0.2-1.6 c0.1-0.4,0.3-0.7,0.6-0.8C19,7,19.3,7,19.8,7c0.5,0,0.9,0.1,1.1,0.3c0.3,0.2,0.4,0.5,0.5,0.9c0.1,0.4,0.1,1,0.1,1.6v0.6h-2.8v1.2 c0,0.4,0,0.8,0.1,1.1c0.1,0.3,0.2,0.4,0.3,0.6s0.3,0.2,0.6,0.2c0.2,0,0.3,0,0.5-0.1c0.1-0.1,0.3-0.2,0.3-0.4s0.1-0.5,0.1-0.8v-0.5 h0.9V12c0,0.6-0.1,1.1-0.4,1.5S20.4,14.1,19.8,14.1z M18.8,9.9h1.9V9.4c0-0.4,0-0.7-0.1-0.9c0-0.3-0.1-0.5-0.3-0.6S20,7.6,19.8,7.6 c-0.2,0-0.4,0.1-0.6,0.2c-0.1,0.1-0.3,0.3-0.3,0.6c-0.1,0.3-0.1,0.7-0.1,1.1V9.9z"], ["d", "M22.8,14V7.1h0.9V8c0.2-0.4,0.5-0.6,0.8-0.8C24.8,7.1,25,7,25.3,7c0,0,0,0,0.1,0s0.1,0,0.1,0v0.9 c-0.1,0-0.1,0-0.2-0.1c-0.1,0-0.2,0-0.2,0c-0.3,0-0.5,0.1-0.7,0.2c-0.2,0.1-0.4,0.3-0.6,0.6V14H22.8z"], ["d", "M28,14.1c-0.4,0-0.8-0.1-1.1-0.3s-0.5-0.5-0.6-0.9c-0.1-0.4-0.2-0.9-0.2-1.6V9.6c0-0.7,0.1-1.2,0.2-1.6 c0.1-0.4,0.3-0.7,0.6-0.8C27.3,7,27.6,7,28,7c0.5,0,0.9,0.1,1.1,0.3c0.3,0.2,0.4,0.5,0.5,0.9c0.1,0.4,0.1,1,0.1,1.6v0.6H27v1.2 c0,0.4,0,0.8,0.1,1.1c0.1,0.3,0.2,0.4,0.3,0.6s0.3,0.2,0.6,0.2c0.2,0,0.3,0,0.5-0.1c0.1-0.1,0.3-0.2,0.3-0.4s0.1-0.5,0.1-0.8v-0.5 h0.9V12c0,0.6-0.1,1.1-0.4,1.5S28.7,14.1,28,14.1z M27,9.9H29V9.4c0-0.4,0-0.7-0.1-0.9c0-0.3-0.1-0.5-0.3-0.6S28.3,7.6,28,7.6 c-0.2,0-0.4,0.1-0.6,0.2c-0.1,0.1-0.3,0.3-0.3,0.6C27.1,8.6,27,9,27,9.5V9.9z"], ["d", "M32.6,14.1c-0.6,0-1-0.2-1.3-0.7c-0.3-0.4-0.4-1.2-0.4-2.2V9.9c0-0.6,0-1.1,0.1-1.6c0.1-0.4,0.2-0.8,0.5-1 c0.2-0.2,0.6-0.4,1-0.4C32.8,7,33,7,33.2,7.1c0.2,0.1,0.4,0.3,0.5,0.4V4.3h0.9V14h-0.9v-0.5c-0.1,0.2-0.3,0.3-0.5,0.4 C33,14,32.8,14.1,32.6,14.1z M32.7,13.4c0.2,0,0.4,0,0.5-0.1c0.2-0.1,0.3-0.2,0.5-0.3V8.1c-0.1-0.1-0.3-0.2-0.4-0.3 c-0.2-0.1-0.4-0.2-0.6-0.2c-0.4,0-0.6,0.2-0.8,0.5S31.8,9,31.8,9.6v1.6c0,0.5,0,0.9,0.1,1.2c0.1,0.3,0.1,0.6,0.3,0.7 C32.3,13.3,32.5,13.4,32.7,13.4z"], ["d", "M40.5,14.1c-0.3,0-0.5-0.1-0.7-0.2c-0.2-0.1-0.4-0.3-0.5-0.4V14h-0.9V4.3h0.9v3.4c0.1-0.2,0.3-0.3,0.5-0.5 C40.1,7,40.3,7,40.6,7C41,7,41.2,7,41.4,7.2c0.2,0.2,0.4,0.4,0.5,0.6c0.1,0.3,0.2,0.6,0.2,0.9s0.1,0.7,0.1,1v1.5 c0,0.6,0,1.1-0.1,1.5c-0.1,0.4-0.3,0.8-0.5,1C41.3,14,41,14.1,40.5,14.1z M40.4,13.4c0.3,0,0.5-0.1,0.6-0.3 c0.1-0.2,0.2-0.4,0.3-0.8s0.1-0.7,0.1-1.2V9.7c0-0.5,0-0.8-0.1-1.1S41.1,8,41,7.9c-0.1-0.2-0.3-0.2-0.6-0.2c-0.2,0-0.4,0.1-0.6,0.2 c-0.2,0.1-0.3,0.2-0.5,0.4v4.7c0.1,0.1,0.3,0.3,0.5,0.4C40,13.4,40.2,13.4,40.4,13.4z"], ["d", "M43.2,15.7V15c0.4,0,0.7,0,0.9-0.1c0.2-0.1,0.3-0.1,0.4-0.3c0.1-0.1,0.1-0.2,0.1-0.4c0-0.1,0-0.3-0.1-0.5 c0-0.2-0.1-0.4-0.2-0.6L43,7.1h0.9l1.2,5.9l1.2-5.9h0.9l-1.7,7.4c-0.1,0.3-0.2,0.5-0.3,0.7c-0.2,0.2-0.4,0.3-0.6,0.4 c-0.3,0.1-0.6,0.1-1,0.1H43.2z"], ["d", "M50.6,14V4.3h2.1c0.7,0,1.2,0.1,1.6,0.4c0.4,0.2,0.6,0.6,0.8,1c0.2,0.4,0.2,0.9,0.2,1.5V11 c0,0.6-0.1,1.1-0.2,1.6s-0.4,0.8-0.8,1S53.5,14,52.8,14H50.6z M51.5,13.3h1.2c0.5,0,0.9-0.1,1.1-0.3s0.4-0.5,0.5-0.9 s0.1-0.8,0.1-1.3V7.2c0-0.5,0-0.9-0.1-1.2s-0.2-0.6-0.5-0.8S53.2,5,52.7,5h-1.2V13.3z"], ["d", "M56.5,15.7V15c0.4,0,0.7,0,0.9-0.1c0.2-0.1,0.3-0.1,0.4-0.3c0.1-0.1,0.1-0.2,0.1-0.4c0-0.1,0-0.3-0.1-0.5 c0-0.2-0.1-0.4-0.2-0.6l-1.4-6.1h0.9l1.2,5.9l1.2-5.9h0.9l-1.7,7.4c-0.1,0.3-0.2,0.5-0.3,0.7s-0.4,0.3-0.6,0.4s-0.6,0.1-1,0.1H56.5 z"], ["d", "M61.3,14V7.1h0.9v0.7c0.2-0.2,0.5-0.4,0.8-0.6C63.2,7,63.5,7,63.8,7C64,7,64.2,7,64.4,7.1s0.3,0.3,0.4,0.5 c0.1,0.2,0.1,0.5,0.1,0.8V14H64V8.6c0-0.4-0.1-0.6-0.2-0.8c-0.1-0.1-0.3-0.2-0.5-0.2c-0.2,0-0.4,0.1-0.6,0.2s-0.4,0.3-0.6,0.5V14 H61.3z"], ["d", "M67.4,14.1c-0.3,0-0.5-0.1-0.7-0.2c-0.2-0.1-0.4-0.3-0.5-0.6C66,13.1,66,12.8,66,12.6c0-0.4,0.1-0.7,0.2-0.9 s0.3-0.5,0.5-0.7c0.2-0.2,0.5-0.4,0.9-0.6c0.4-0.2,0.8-0.4,1.3-0.6V9.3c0-0.4,0-0.8-0.1-1c-0.1-0.2-0.1-0.4-0.3-0.5 c-0.1-0.1-0.3-0.2-0.5-0.2c-0.2,0-0.3,0-0.5,0.1c-0.1,0.1-0.3,0.2-0.3,0.4c-0.1,0.2-0.1,0.4-0.1,0.7V9l-0.9,0 c0-0.7,0.2-1.2,0.5-1.6C66.8,7.1,67.3,7,68,7c0.6,0,1.1,0.2,1.3,0.6c0.3,0.4,0.4,1,0.4,1.7v3.4c0,0.1,0,0.3,0,0.5 c0,0.2,0,0.4,0,0.5c0,0.2,0,0.3,0,0.4h-0.8c0-0.2-0.1-0.3-0.1-0.5c0-0.2,0-0.3-0.1-0.5c-0.1,0.3-0.3,0.5-0.5,0.7 S67.7,14.1,67.4,14.1z M67.6,13.4c0.2,0,0.3,0,0.5-0.1c0.1-0.1,0.3-0.2,0.4-0.3s0.2-0.3,0.3-0.4v-2.2c-0.3,0.2-0.6,0.3-0.9,0.5 c-0.2,0.1-0.4,0.3-0.6,0.4c-0.2,0.1-0.3,0.3-0.3,0.5s-0.1,0.4-0.1,0.6c0,0.4,0.1,0.6,0.2,0.8C67.2,13.3,67.4,13.4,67.6,13.4z"], ["d", "M70.9,14V7.1h0.8v0.7c0.2-0.3,0.5-0.5,0.8-0.6c0.3-0.1,0.6-0.2,0.9-0.2c0.2,0,0.5,0.1,0.7,0.2s0.3,0.4,0.4,0.7 c0.2-0.3,0.5-0.5,0.8-0.7c0.3-0.2,0.6-0.2,0.9-0.2c0.2,0,0.4,0,0.6,0.1s0.3,0.3,0.4,0.5c0.1,0.2,0.2,0.5,0.2,0.9V14h-0.8V8.6 c0-0.4-0.1-0.7-0.2-0.8s-0.3-0.2-0.5-0.2c-0.2,0-0.4,0.1-0.7,0.2S74.7,8,74.5,8.3c0,0,0,0.1,0,0.1s0,0.1,0,0.1V14h-0.8V8.6 c0-0.4-0.1-0.7-0.2-0.8c-0.1-0.1-0.3-0.2-0.5-0.2c-0.2,0-0.4,0.1-0.7,0.2c-0.2,0.1-0.4,0.3-0.6,0.5V14H70.9z"], ["d", "M80.2,14.1c-0.6,0-1-0.2-1.3-0.5c-0.3-0.4-0.5-0.8-0.6-1.4l0.7-0.2c0,0.5,0.2,0.9,0.4,1.2 c0.2,0.2,0.5,0.4,0.8,0.4c0.3,0,0.5-0.1,0.7-0.3c0.2-0.2,0.2-0.4,0.2-0.7c0-0.2-0.1-0.5-0.2-0.7c-0.1-0.2-0.4-0.5-0.6-0.7l-0.9-0.8 c-0.3-0.3-0.5-0.5-0.7-0.8c-0.2-0.3-0.2-0.6-0.2-0.9c0-0.3,0.1-0.6,0.2-0.8c0.1-0.2,0.3-0.4,0.6-0.5C79.5,7,79.8,7,80.2,7 c0.5,0,0.9,0.2,1.2,0.5c0.3,0.3,0.4,0.8,0.4,1.3L81.2,9c0-0.3-0.1-0.6-0.1-0.8s-0.2-0.4-0.3-0.5c-0.1-0.1-0.3-0.1-0.5-0.1 c-0.3,0-0.5,0.1-0.6,0.2c-0.2,0.1-0.2,0.4-0.2,0.6c0,0.2,0,0.4,0.1,0.6c0.1,0.2,0.2,0.3,0.4,0.5l1,0.9c0.2,0.2,0.4,0.3,0.6,0.5 c0.2,0.2,0.3,0.4,0.4,0.6c0.1,0.2,0.2,0.5,0.2,0.8c0,0.4-0.1,0.7-0.2,0.9c-0.1,0.2-0.4,0.4-0.6,0.6C80.9,14,80.6,14.1,80.2,14.1z"], ["d", "M84.7,14.1c-0.5,0-0.8-0.1-1.1-0.3c-0.3-0.2-0.5-0.5-0.6-0.9s-0.2-0.9-0.2-1.4V9.6c0-0.6,0.1-1,0.2-1.4 c0.1-0.4,0.3-0.7,0.6-0.9C83.9,7.1,84.3,7,84.7,7c0.5,0,0.9,0.1,1.1,0.3s0.5,0.5,0.6,0.9c0.1,0.4,0.2,0.9,0.2,1.4v1.9 c0,0.6-0.1,1-0.2,1.4s-0.3,0.7-0.6,0.9S85.2,14.1,84.7,14.1z M84.7,13.4c0.3,0,0.5-0.1,0.7-0.2c0.1-0.2,0.2-0.4,0.3-0.7 c0-0.3,0-0.6,0-1v-2c0-0.4,0-0.7,0-1c0-0.3-0.1-0.5-0.3-0.7c-0.1-0.2-0.4-0.2-0.7-0.2c-0.3,0-0.5,0.1-0.7,0.2 c-0.1,0.2-0.2,0.4-0.3,0.7c0,0.3-0.1,0.6-0.1,1v2c0,0.4,0,0.7,0.1,1c0,0.3,0.1,0.5,0.3,0.7C84.2,13.4,84.4,13.4,84.7,13.4z"], ["d", "M88.2,14V7.7h-0.9V7.1h0.9V6.3c0-0.3,0-0.6,0.1-0.9c0.1-0.3,0.2-0.5,0.4-0.6c0.2-0.2,0.5-0.2,0.8-0.2 c0.1,0,0.2,0,0.4,0c0.1,0,0.2,0,0.3,0.1v0.6c-0.1,0-0.2,0-0.2,0c-0.1,0-0.2,0-0.2,0c-0.3,0-0.4,0.1-0.5,0.2s-0.1,0.4-0.1,0.8v0.8 h1.1v0.6h-1.1V14H88.2z"], ["d", "M92.7,14.1c-0.3,0-0.6-0.1-0.8-0.2s-0.3-0.3-0.4-0.5c-0.1-0.2-0.1-0.5-0.1-0.8V7.6h-0.9V7.1h0.9V4.9h0.9v2.1 h1.2v0.6h-1.2v4.8c0,0.3,0,0.6,0.1,0.7c0.1,0.1,0.2,0.2,0.5,0.2c0.1,0,0.2,0,0.2,0s0.2,0,0.3,0V14c-0.1,0-0.2,0-0.4,0.1 C92.9,14.1,92.8,14.1,92.7,14.1z"]], template: function VideoDecodeComponent_Template(rf, ctx) { if (rf & 1) { - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](0, "div", 0); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵnamespaceSVG"](); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](1, "svg", 1); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](2, "path", 2); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](3, "svg", 3); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](4, "path", 4); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵnamespaceHTML"](); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](5, "div", 5); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](6, "div", 6); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](7, "div", 7); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](8, "div", 8); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](9, "select", 9); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](10, "select", 10); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](11, "div", 11); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵnamespaceSVG"](); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](12, "svg", 12); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](13, "g"); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](14, "path", 13); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](15, "path", 14); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](16, "path", 15); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](17, "path", 16); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](18, "path", 17); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](19, "path", 18); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](20, "path", 19); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](21, "path", 20); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](22, "path", 21); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](23, "path", 22); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](24, "path", 23); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](25, "path", 24); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](26, "path", 25); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](27, "path", 26); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](28, "path", 27); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](29, "path", 28); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](30, "path", 29); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](31, "path", 30); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"](); - } }, styles: [".component-barcode-scanner[_ngcontent-%COMP%]{width:100%;height:100%;min-width:640px;min-height:480px;background:#eee;position:relative;resize:both;}\n.dce-bg-loading[_ngcontent-%COMP%]{animation:1s linear infinite dce-rotate;width:40%;height:40%;position:absolute;margin:auto;left:0;top:0;right:0;bottom:0;fill:#aaa;}\n.dce-bg-camera[_ngcontent-%COMP%]{width:40%;height:40%;position:absolute;margin:auto;left:0;top:0;right:0;bottom:0;fill:#aaa;}\n.dce-video-container[_ngcontent-%COMP%]{position:absolute;left:0;top:0;width:100%;height:100%;}\n.dce-scanarea[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;left:0;top:0;}\n.dce-scanlight[_ngcontent-%COMP%]{width:100%;height:3%;position:absolute;animation:3s infinite dce-scanlight;border-radius:50%;box-shadow:0px 0px 2vw 1px #00e5ff;background:#fff;}\n.div-select-container[_ngcontent-%COMP%]{position:absolute;left:0;top:0;}\n.dce-sel-camera[_ngcontent-%COMP%]{display:block;}\n.dce-sel-resolution[_ngcontent-%COMP%]{display:block;margin-top:5px;}\n.dbr-msg-poweredby[_ngcontent-%COMP%]{position:absolute;left:50%;bottom:10%;transform:translateX(-50%);}\n.dbr-msg-poweredby[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] {height:max(3vmin,17px);fill:#FFFFFF;}\n@keyframes dce-rotate{from{transform:rotate(0turn);}to{transform:rotate(1turn);}}\n@keyframes dce-scanlight{from{top:0;}to{top:97%;}}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJhcmNvZGUtc2Nhbm5lci5jb21wb25lbnQuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDJCQUEyQixVQUFVLENBQUMsV0FBVyxDQUFDLGVBQWUsQ0FBQyxnQkFBZ0IsQ0FBQyxlQUFlLENBQUMsaUJBQWlCLENBQUMsV0FBVyxDQUFDO0FBQ2pJLGdCQUFnQix1Q0FBdUMsQ0FBQyxTQUFTLENBQUMsVUFBVSxDQUFDLGlCQUFpQixDQUFDLFdBQVcsQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUMsU0FBUyxDQUFDO0FBQ25KLGVBQWUsU0FBUyxDQUFDLFVBQVUsQ0FBQyxpQkFBaUIsQ0FBQyxXQUFXLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUMsUUFBUSxDQUFDLFNBQVMsQ0FBQztBQUMxRyxxQkFBcUIsaUJBQWlCLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUMsV0FBVyxDQUFDO0FBQzNFLGNBQWMsVUFBVSxDQUFDLFdBQVcsQ0FBQyxpQkFBaUIsQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDO0FBQ3BFLGVBQWUsVUFBVSxDQUFDLFNBQVMsQ0FBQyxpQkFBaUIsQ0FBQyxtQ0FBbUMsQ0FBQyxpQkFBaUIsQ0FBQyxrQ0FBa0MsQ0FBQyxlQUFlLENBQUM7QUFDL0osc0JBQXNCLGlCQUFpQixDQUFDLE1BQU0sQ0FBQyxLQUFLLENBQUM7QUFDckQsZ0JBQWdCLGFBQWEsQ0FBQztBQUM5QixvQkFBb0IsYUFBYSxDQUFDLGNBQWMsQ0FBQztBQUNqRCxtQkFBbUIsaUJBQWlCLENBQUMsUUFBUSxDQUFDLFVBQVUsQ0FBQywwQkFBMEIsQ0FBQztBQUNwRix3QkFBd0Isc0JBQXNCLENBQUMsWUFBWSxDQUFDO0FBQzVELHNCQUFzQixLQUFLLHVCQUF1QixDQUFDLENBQUMsR0FBRyx1QkFBdUIsQ0FBQyxDQUFDO0FBQ2hGLHlCQUF5QixLQUFLLEtBQUssQ0FBQyxDQUFDLEdBQUcsT0FBTyxDQUFDLENBQUMiLCJmaWxlIjoiYmFyY29kZS1zY2FubmVyLmNvbXBvbmVudC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIuY29tcG9uZW50LWJhcmNvZGUtc2Nhbm5lcnt3aWR0aDoxMDAlO2hlaWdodDoxMDAlO21pbi13aWR0aDo2NDBweDttaW4taGVpZ2h0OjQ4MHB4O2JhY2tncm91bmQ6I2VlZTtwb3NpdGlvbjpyZWxhdGl2ZTtyZXNpemU6Ym90aDt9XG4uZGNlLWJnLWxvYWRpbmd7YW5pbWF0aW9uOjFzIGxpbmVhciBpbmZpbml0ZSBkY2Utcm90YXRlO3dpZHRoOjQwJTtoZWlnaHQ6NDAlO3Bvc2l0aW9uOmFic29sdXRlO21hcmdpbjphdXRvO2xlZnQ6MDt0b3A6MDtyaWdodDowO2JvdHRvbTowO2ZpbGw6I2FhYTt9XG4uZGNlLWJnLWNhbWVyYXt3aWR0aDo0MCU7aGVpZ2h0OjQwJTtwb3NpdGlvbjphYnNvbHV0ZTttYXJnaW46YXV0bztsZWZ0OjA7dG9wOjA7cmlnaHQ6MDtib3R0b206MDtmaWxsOiNhYWE7fVxuLmRjZS12aWRlby1jb250YWluZXJ7cG9zaXRpb246YWJzb2x1dGU7bGVmdDowO3RvcDowO3dpZHRoOjEwMCU7aGVpZ2h0OjEwMCU7fVxuLmRjZS1zY2FuYXJlYXt3aWR0aDoxMDAlO2hlaWdodDoxMDAlO3Bvc2l0aW9uOmFic29sdXRlO2xlZnQ6MDt0b3A6MDt9XG4uZGNlLXNjYW5saWdodHt3aWR0aDoxMDAlO2hlaWdodDozJTtwb3NpdGlvbjphYnNvbHV0ZTthbmltYXRpb246M3MgaW5maW5pdGUgZGNlLXNjYW5saWdodDtib3JkZXItcmFkaXVzOjUwJTtib3gtc2hhZG93OjBweCAwcHggMnZ3IDFweCAjMDBlNWZmO2JhY2tncm91bmQ6I2ZmZjt9XG4uZGl2LXNlbGVjdC1jb250YWluZXJ7cG9zaXRpb246YWJzb2x1dGU7bGVmdDowO3RvcDowO31cbi5kY2Utc2VsLWNhbWVyYXtkaXNwbGF5OmJsb2NrO31cbi5kY2Utc2VsLXJlc29sdXRpb257ZGlzcGxheTpibG9jazttYXJnaW4tdG9wOjVweDt9XG4uZGJyLW1zZy1wb3dlcmVkYnl7cG9zaXRpb246YWJzb2x1dGU7bGVmdDo1MCU7Ym90dG9tOjEwJTt0cmFuc2Zvcm06dHJhbnNsYXRlWCgtNTAlKTt9XG4uZGJyLW1zZy1wb3dlcmVkYnkgc3ZnIHtoZWlnaHQ6bWF4KDN2bWluLDE3cHgpO2ZpbGw6I0ZGRkZGRjt9XG5Aa2V5ZnJhbWVzIGRjZS1yb3RhdGV7ZnJvbXt0cmFuc2Zvcm06cm90YXRlKDB0dXJuKTt9dG97dHJhbnNmb3JtOnJvdGF0ZSgxdHVybik7fX1cbkBrZXlmcmFtZXMgZGNlLXNjYW5saWdodHtmcm9te3RvcDowO310b3t0b3A6OTclO319Il19 */"] }); - - -/***/ }), - -/***/ "yjda": -/*!****************************************************!*\ - !*** ./src/app/img-decode/img-decode.component.ts ***! - \****************************************************/ -/*! exports provided: ImgDecodeComponent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ImgDecodeComponent", function() { return ImgDecodeComponent; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG"); -/* harmony import */ var dynamsoft_javascript_barcode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dynamsoft-javascript-barcode */ "qQmn"); -/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "fXoL"); - - - -class ImgDecodeComponent { - constructor() { - this.pReader = null; - this.decodeImg = (e) => Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () { - try { - const reader = yield (this.pReader = this.pReader || dynamsoft_javascript_barcode__WEBPACK_IMPORTED_MODULE_1__["BarcodeReader"].createInstance()); - const results = yield reader.decode(e.target.files[0]); - for (const result of results) { - alert(result.barcodeText); - } - if (!results.length) { - alert('No barcode found'); - } - } - catch (ex) { - console.error(ex); - } - e.target.value = ''; - }); - } - ngOnInit() { - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () { }); - } - ngOnDestroy() { - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () { - if (this.pReader) { - (yield this.pReader).destroyContext(); - console.log('ImgDecode Component Unmount'); - } - }); - } -} -ImgDecodeComponent.ɵfac = function ImgDecodeComponent_Factory(t) { return new (t || ImgDecodeComponent)(); }; -ImgDecodeComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineComponent"]({ type: ImgDecodeComponent, selectors: [["app-img-decode"]], decls: 2, vars: 0, consts: [[1, "ImgDecode"], ["type", "file", 3, "change"]], template: function ImgDecodeComponent_Template(rf, ctx) { if (rf & 1) { - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](0, "div", 0); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](1, "input", 1); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵlistener"]("change", function ImgDecodeComponent_Template_input_change_1_listener($event) { return ctx.decodeImg($event); }); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"](); - } }, styles: [".ImgDecode[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 90%;\n border: 1px solid black\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImltZy1kZWNvZGUuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGFBQWE7RUFDYix1QkFBdUI7RUFDdkIsbUJBQW1CO0VBQ25CLFdBQVc7RUFDWCxXQUFXO0VBQ1g7QUFDRiIsImZpbGUiOiJpbWctZGVjb2RlLmNvbXBvbmVudC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIuSW1nRGVjb2RlIHtcbiAgZGlzcGxheTogZmxleDtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gIHdpZHRoOiAxMDAlO1xuICBoZWlnaHQ6IDkwJTtcbiAgYm9yZGVyOiAxcHggc29saWQgYmxhY2tcbn0iXX0= */"] }); - - -/***/ }), - -/***/ "zUnb": -/*!*********************!*\ - !*** ./src/main.ts ***! - \*********************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/platform-browser */ "jhN1"); -/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL"); -/* harmony import */ var _app_app_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app/app.module */ "ZAI4"); -/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./environments/environment */ "AytR"); - - - - -if (_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].production) { - Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["enableProdMode"])(); -} -_angular_platform_browser__WEBPACK_IMPORTED_MODULE_0__["platformBrowser"]().bootstrapModule(_app_app_module__WEBPACK_IMPORTED_MODULE_2__["AppModule"]) - .catch(err => console.error(err)); - - -/***/ }), - -/***/ "zn8P": -/*!******************************************************!*\ - !*** ./$$_lazy_route_resource lazy namespace object ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -function webpackEmptyAsyncContext(req) { - // Here Promise.resolve().then() is used instead of new Promise() to prevent - // uncaught exception popping up in devtools - return Promise.resolve().then(function() { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; - }); -} -webpackEmptyAsyncContext.keys = function() { return []; }; -webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext; -module.exports = webpackEmptyAsyncContext; -webpackEmptyAsyncContext.id = "zn8P"; - -/***/ }) - -},[[0,"runtime","vendor"]]]); -//# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/1.hello-world/3.read-video-angular/dist/hello-world/main.js.map b/1.hello-world/3.read-video-angular/dist/hello-world/main.js.map deleted file mode 100644 index 1cffb6a6..00000000 --- a/1.hello-world/3.read-video-angular/dist/hello-world/main.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["./src/app/hello-world/hello-world.component.ts","./src/app/hello-world/hello-world.component.html","./src/environments/environment.ts","./src/app/dbr.ts","./src/app/app.component.ts","./src/app/app.component.html","./src/app/app.module.ts","./src/app/barcode-scanner/barcode-scanner.component.ts","./src/app/barcode-scanner/barcode-scanner.component.html","./src/app/img-decode/img-decode.component.ts","./src/app/img-decode/img-decode.component.html","./src/main.ts","./$_lazy_route_resource lazy namespace object"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACgB,CAAC,+DAA+D;AAClB;;;;;;ICOtD,8EAA0D;;;IAC1D,4EAAwD;;;;ADDzD,MAAM,mBAAmB;IALhC;QAME,iBAAY,GAAG,IAAI,CAAC;QACpB,mBAAc,GAAG,KAAK,CAAC;KAiBxB;IAhBO,QAAQ;;YACZ,oDAAoD;YACpD,IAAI;gBACF,MAAM,2EAAc,CAAC,QAAQ,EAAE,CAAC;aACjC;YAAC,OAAO,EAAE,EAAE;gBACX,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;aACnB;QACH,CAAC;KAAA;IACD,WAAW;QACT,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;IAC9B,CAAC;IACD,aAAa;QACX,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC7B,CAAC;;sFAlBU,mBAAmB;mGAAnB,mBAAmB;QCThC,yEAAwB;QACpB,qEAAI;QAAA,kFAAuB;QAAA,oEACrB;QACN,4DAAK;QACL,yEAAuB;QACnB,4EAAqI;QAAxB,2IAAS,iBAAa,IAAC;QAAC,uEAAY;QAAA,4DAAS;QAC1J,4EAAgH;QAA1B,2IAAS,mBAAe,IAAC;QAAC,uEAAY;QAAA,4DAAS;QACzI,4DAAM;QACN,yEAAuB;QACnB,2IAA0D;QAC1D,uIAAwD;QAC5D,4DAAM;QACV,4DAAM;;QAPU,0DAAoG;QAApG,0LAAoG;QACpG,0DAA6E;QAA7E,2LAA6E;QAGlE,0DAAkB;QAAlB,kFAAkB;QACpB,0DAAoB;QAApB,oFAAoB;;;;;;;;;;;;;;ACV7C;AAAA;AAAA,gFAAgF;AAChF,0EAA0E;AAC1E,gEAAgE;AAEzD,MAAM,WAAW,GAAG;IACzB,UAAU,EAAE,KAAK;CAClB,CAAC;AAEF;;;;;;GAMG;AACH,mEAAmE;;;;;;;;;;;;;ACfnE;AAAA;AAA6D;AAE7D;;GAEG;AAEH,0EAAa,CAAC,OAAO,GAAG,0CAA0C,CAAC;AAEnE;;;;;GAKG;AAEH,0EAAa,CAAC,kBAAkB,GAAG,uEAAuE,CAAC;;;;;;;;;;;;;;;;;;;ACRpG,MAAM,YAAY;IALzB;QAME,UAAK,GAAG,aAAa,CAAC;KACvB;;wEAFY,YAAY;4FAAZ,YAAY;QCPzB,6EAAmC;;;;;;;;;;;;;;ACCnC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0D;AAEX;AAC2B;AACS;AACZ;;AAehE,MAAM,SAAS;;kEAAT,SAAS;wFAAT,SAAS,cAFR,2DAAY;6FADb,EAAE,YAHJ;YACP,uEAAa;SACd;mIAIU,SAAS,mBAXlB,2DAAY;QACZ,sFAAmB;QACnB,+FAAoB;QACpB,mFAAkB,aAGlB,uEAAa;;;;;;;;;;;;;;;;;;;ACf4C;;AAMtD,MAAM,oBAAoB;IALjC;QAME,aAAQ,GAAG,IAAI,CAAC;KAyBjB;IAvBO,QAAQ;;YACZ,IAAI;gBACF,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,GAAG,2EAAc,CAAC,cAAc,EAAE,CAAC,CAAC;gBACxE,MAAM,OAAO,CAAC,YAAY,CAAE,QAAQ,CAAC,aAAa,CAAC,4BAA4B,CAAS,CAAC,CAAC;gBAC1F,OAAO,CAAC,WAAW,GAAG,CAAC,OAAY,EAAE,EAAE;oBACrC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;wBAC5B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;qBACjC;gBACH,CAAC,CAAC;gBACF,OAAO,CAAC,YAAY,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;oBACrC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACb,CAAC,CAAC;gBACF,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;aACtB;YAAC,OAAO,EAAE,EAAE;gBACX,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;aACnB;QACH,CAAC;KAAA;IACK,WAAW;;YACf,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjB,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC,cAAc,EAAE,CAAC;gBACvC,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;aACjD;QACH,CAAC;KAAA;;wFAzBU,oBAAoB;oGAApB,oBAAoB;QCPjC,yEAAuC;QACrC,8DAAoD;QAApD,yEAAoD;QAAA,qEAAqU;QAAA,4DAAM;QAC/X,yEAA0E;QAAA,qEAAqa;QAAA,4DAAM;QACrf,+DAAiC;QAAjC,oEAAuC;QACvC,yEAA0B;QACxB,oEAAwD;QAC1D,4DAAM;QACN,yEAAkC;QAChC,uEAAwC;QACxC,yEAA4C;QAC9C,4DAAM;QACN,2EAA+B;QAAA,8DAAyB;QAAzB,2EAAyB;QAAA,qEAAG;QAAA,uEAAoT;QAAA,uEAAshB;QAAA,uEAAuG;QAAA,uEAA2jB;QAAA,uEAA4M;QAAA,uEAA8iB;QAC/xE,uEAAse;QAAA,uEAA0hB;QAAA,uEAAiQ;QAAA,uEAAwS;QAAA,uEAAmP;QAAA,uEAAuP;QACnhE,uEAA8xB;QAAA,uEAAgd;QAAA,uEAAssB;QACp7D,uEAAujB;QAAA,uEAAkQ;QAAA,uEAAyQ;QAAA,4DAAI;QAAA,4DAAM;QAC9kC,4DAAM;QACR,4DAAM;;;;;;;;;;;;;;;;;;;;ACfoD;;AAOnD,MAAM,kBAAkB;IAL/B;QAME,YAAO,GAAG,IAAI,CAAC;QAIf,cAAS,GAAG,CAAO,CAAM,EAAE,EAAE,CAAC;YAC5B,IAAI;gBACF,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,0EAAa,CAAC,cAAc,EAAE,CAAC,CAAC;gBACrF,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBACvD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;oBAC5B,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;iBAC3B;gBACD,IAAG,CAAC,OAAO,CAAC,MAAM,EAAC;oBAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;iBAAE;aAClD;YAAC,OAAO,EAAE,EAAE;gBACX,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;aACnB;YACD,CAAC,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC;QACtB,CAAC;KAQF;IAtBO,QAAQ;4GAAmB,CAAC;KAAA;IAgB5B,WAAW;;YACf,IAAI,IAAI,CAAC,OAAO,EAAE;gBAChB,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,CAAC;gBACtC,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;aAC5C;QACH,CAAC;KAAA;;oFAxBU,kBAAkB;kGAAlB,kBAAkB;QCR/B,yEAAuB;QAAA,2EAAiD;QAA9B,iJAAU,qBAAiB,IAAC;QAA/C,4DAAiD;QAAA,4DAAM;;;;;;;;;;;;;;;;;;;;ACA/B;AAGF;AACY;AAEzD,IAAI,qEAAW,CAAC,UAAU,EAAE;IAC1B,oEAAc,EAAE,CAAC;CAClB;AAED,2EAAwB,CAAC,eAAe,CAAC,yDAAS,CAAC;KAChD,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;;;;;;;;;;;;ACXpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,4CAA4C,WAAW;AACvD;AACA;AACA,qC","file":"main.js","sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport '../dbr'; // import side effects. The license, engineResourcePath, so on.\nimport { BarcodeScanner } from 'dynamsoft-javascript-barcode';\n\n@Component({\n selector: 'app-hello-world',\n templateUrl: './hello-world.component.html',\n styleUrls: ['./hello-world.component.css']\n})\nexport class HelloWorldComponent implements OnInit {\n bShowScanner = true;\n bShowImgDecode = false;\n async ngOnInit(): Promise {\n // Load the library on page load to speed things up.\n try {\n await BarcodeScanner.loadWasm();\n } catch (ex) {\n alert(ex.message);\n }\n }\n showScanner(): void {\n this.bShowScanner = true;\n this.bShowImgDecode = false;\n }\n showImgDecode(): void {\n this.bShowScanner = false;\n this.bShowImgDecode = true;\n }\n}\n","
\n

Hello World for Angular\"logo\"\n

\n
\n \n \n
\n
\n \n \n
\n
\n","// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.\n// The list of file replacements can be found in `angular.json`.\n\nexport const environment = {\n production: false\n};\n\n/*\n * For easier debugging in development mode, you can import the following file\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\n *\n * This import should be commented out in production mode because it will have a negative impact\n * on performance if an error is thrown.\n */\n// import 'zone.js/dist/zone-error'; // Included with Angular CLI.\n","import { BarcodeReader } from 'dynamsoft-javascript-barcode';\n\n/** LICENSE ALERT - README \n * To use the library, you need to first specify a license key using the API \"license\" as shown below.\n */\n\nBarcodeReader.license = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';\n \n/** \n * You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=github&product=dbr&package=js to get your own trial license good for 30 days. \n * Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license.\n * For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.0&utm_source=github#specify-the-license or contact support@dynamsoft.com.\n * LICENSE ALERT - THE END \n */\n\nBarcodeReader.engineResourcePath = 'https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/';\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.css']\n})\nexport class AppComponent {\n title = 'hello-world';\n}\n","\n","import { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\n\nimport { AppComponent } from './app.component';\nimport { HelloWorldComponent } from './hello-world/hello-world.component';\nimport { VideoDecodeComponent } from './barcode-scanner/barcode-scanner.component';\nimport { ImgDecodeComponent } from './img-decode/img-decode.component';\n\n@NgModule({\n declarations: [\n AppComponent,\n HelloWorldComponent,\n VideoDecodeComponent,\n ImgDecodeComponent\n ],\n imports: [\n BrowserModule\n ],\n providers: [],\n bootstrap: [AppComponent]\n})\nexport class AppModule { }\n","import { Component, OnInit } from '@angular/core';\nimport { BarcodeScanner } from 'dynamsoft-javascript-barcode'\n@Component({\n selector: 'app-video-decode',\n templateUrl: './barcode-scanner.component.html',\n styleUrls: ['./barcode-scanner.component.css']\n})\nexport class VideoDecodeComponent implements OnInit {\n pScanner = null;\n\n async ngOnInit(): Promise {\n try {\n const scanner = await (this.pScanner = BarcodeScanner.createInstance());\n await scanner.setUIElement((document.querySelector('.component-barcode-scanner') as any));\n scanner.onFrameRead = (results: any) => {\n for (const result of results) {\n console.log(result.barcodeText);\n }\n };\n scanner.onUniqueRead = (txt, result) => {\n alert(txt);\n };\n await scanner.open();\n } catch (ex) {\n console.error(ex);\n }\n }\n async ngOnDestroy() {\n if (this.pScanner) {\n (await this.pScanner).destroyContext();\n console.log('BarcodeScanner Component Unmount');\n }\n }\n}\n","
\n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n \n \n \n
\n
\n","import { Component, OnInit } from '@angular/core';\nimport {BarcodeReader} from 'dynamsoft-javascript-barcode'\n\n@Component({\n selector: 'app-img-decode',\n templateUrl: './img-decode.component.html',\n styleUrls: ['./img-decode.component.css']\n})\nexport class ImgDecodeComponent implements OnInit {\n pReader = null;\n\n async ngOnInit(): Promise {}\n\n decodeImg = async (e: any) => {\n try {\n const reader = await (this.pReader = this.pReader || BarcodeReader.createInstance());\n const results = await reader.decode(e.target.files[0]);\n for (const result of results) {\n alert(result.barcodeText);\n }\n if(!results.length){ alert('No barcode found'); }\n } catch (ex) {\n console.error(ex);\n }\n e.target.value = '';\n }\n\n async ngOnDestroy() {\n if (this.pReader) {\n (await this.pReader).destroyContext();\n console.log('ImgDecode Component Unmount');\n }\n }\n}\n","
","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n .catch(err => console.error(err));\n","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"zn8P\";"],"sourceRoot":"webpack:///"} \ No newline at end of file diff --git a/1.hello-world/3.read-video-angular/dist/hello-world/polyfills.js b/1.hello-world/3.read-video-angular/dist/hello-world/polyfills.js deleted file mode 100644 index ff6e4356..00000000 --- a/1.hello-world/3.read-video-angular/dist/hello-world/polyfills.js +++ /dev/null @@ -1,2874 +0,0 @@ -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["polyfills"],{ - -/***/ 1: -/*!********************************!*\ - !*** multi ./src/polyfills.ts ***! - \********************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(/*! D:\project_test\dynamsoft\barcode-reader-javascript-samples\1.hello-world\3.read-video-angular\src\polyfills.ts */"hN/g"); - - -/***/ }), - -/***/ "hN/g": -/*!**************************!*\ - !*** ./src/polyfills.ts ***! - \**************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var zone_js_dist_zone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! zone.js/dist/zone */ "pDpN"); -/* harmony import */ var zone_js_dist_zone__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(zone_js_dist_zone__WEBPACK_IMPORTED_MODULE_0__); -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/guide/browser-support - */ -/*************************************************************************************************** - * BROWSER POLYFILLS - */ -/** - * IE11 requires the following for NgClass support on SVG elements - */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. -/** - * Web Animations `@angular/platform-browser/animations` - * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. - * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). - */ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. -/** - * By default, zone.js will patch all possible macroTask and DomEvents - * user can disable parts of macroTask/DomEvents patch by setting following flags - * because those flags need to be set before `zone.js` being loaded, and webpack - * will put import in the top of bundle, so user need to create a separate file - * in this directory (for example: zone-flags.ts), and put the following flags - * into that file, and then add the following code before importing zone.js. - * import './zone-flags'; - * - * The flags allowed in zone-flags.ts are listed here. - * - * The following flags will work for all browsers. - * - * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame - * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick - * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames - * - * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js - * with the following flag, it will bypass `zone.js` patch for IE/Edge - * - * (window as any).__Zone_enable_cross_context_check = true; - * - */ -/*************************************************************************************************** - * Zone JS is required by default for Angular itself. - */ - // Included with Angular CLI. -/*************************************************************************************************** - * APPLICATION IMPORTS - */ - - -/***/ }), - -/***/ "pDpN": -/*!*****************************************************!*\ - !*** ./node_modules/zone.js/dist/zone-evergreen.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/** - * @license Angular v14.0.0-next.5 - * (c) 2010-2022 Google LLC. https://angular.io/ - * License: MIT - */ -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -((function (global) { - const performance = global['performance']; - function mark(name) { - performance && performance['mark'] && performance['mark'](name); - } - function performanceMeasure(name, label) { - performance && performance['measure'] && performance['measure'](name, label); - } - mark('Zone'); - // Initialize before it's accessed below. - // __Zone_symbol_prefix global can be used to override the default zone - // symbol prefix with a custom one if needed. - const symbolPrefix = global['__Zone_symbol_prefix'] || '__zone_symbol__'; - function __symbol__(name) { - return symbolPrefix + name; - } - const checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true; - if (global['Zone']) { - // if global['Zone'] already exists (maybe zone.js was already loaded or - // some other lib also registered a global object named Zone), we may need - // to throw an error, but sometimes user may not want this error. - // For example, - // we have two web pages, page1 includes zone.js, page2 doesn't. - // and the 1st time user load page1 and page2, everything work fine, - // but when user load page2 again, error occurs because global['Zone'] already exists. - // so we add a flag to let user choose whether to throw this error or not. - // By default, if existing Zone is from zone.js, we will not throw the error. - if (checkDuplicate || typeof global['Zone'].__symbol__ !== 'function') { - throw new Error('Zone already loaded.'); - } - else { - return global['Zone']; - } - } - class Zone { - constructor(parent, zoneSpec) { - this._parent = parent; - this._name = zoneSpec ? zoneSpec.name || 'unnamed' : ''; - this._properties = zoneSpec && zoneSpec.properties || {}; - this._zoneDelegate = - new _ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec); - } - static assertZonePatched() { - if (global['Promise'] !== patches['ZoneAwarePromise']) { - throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' + - 'has been overwritten.\n' + - 'Most likely cause is that a Promise polyfill has been loaded ' + - 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' + - 'If you must load one, do so before loading zone.js.)'); - } - } - static get root() { - let zone = Zone.current; - while (zone.parent) { - zone = zone.parent; - } - return zone; - } - static get current() { - return _currentZoneFrame.zone; - } - static get currentTask() { - return _currentTask; - } - // tslint:disable-next-line:require-internal-with-underscore - static __load_patch(name, fn, ignoreDuplicate = false) { - if (patches.hasOwnProperty(name)) { - // `checkDuplicate` option is defined from global variable - // so it works for all modules. - // `ignoreDuplicate` can work for the specified module - if (!ignoreDuplicate && checkDuplicate) { - throw Error('Already loaded patch: ' + name); - } - } - else if (!global['__Zone_disable_' + name]) { - const perfName = 'Zone:' + name; - mark(perfName); - patches[name] = fn(global, Zone, _api); - performanceMeasure(perfName, perfName); - } - } - get parent() { - return this._parent; - } - get name() { - return this._name; - } - get(key) { - const zone = this.getZoneWith(key); - if (zone) - return zone._properties[key]; - } - getZoneWith(key) { - let current = this; - while (current) { - if (current._properties.hasOwnProperty(key)) { - return current; - } - current = current._parent; - } - return null; - } - fork(zoneSpec) { - if (!zoneSpec) - throw new Error('ZoneSpec required!'); - return this._zoneDelegate.fork(this, zoneSpec); - } - wrap(callback, source) { - if (typeof callback !== 'function') { - throw new Error('Expecting function got: ' + callback); - } - const _callback = this._zoneDelegate.intercept(this, callback, source); - const zone = this; - return function () { - return zone.runGuarded(_callback, this, arguments, source); - }; - } - run(callback, applyThis, applyArgs, source) { - _currentZoneFrame = { parent: _currentZoneFrame, zone: this }; - try { - return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source); - } - finally { - _currentZoneFrame = _currentZoneFrame.parent; - } - } - runGuarded(callback, applyThis = null, applyArgs, source) { - _currentZoneFrame = { parent: _currentZoneFrame, zone: this }; - try { - try { - return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source); - } - catch (error) { - if (this._zoneDelegate.handleError(this, error)) { - throw error; - } - } - } - finally { - _currentZoneFrame = _currentZoneFrame.parent; - } - } - runTask(task, applyThis, applyArgs) { - if (task.zone != this) { - throw new Error('A task can only be run in the zone of creation! (Creation: ' + - (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')'); - } - // https://github.com/angular/zone.js/issues/778, sometimes eventTask - // will run in notScheduled(canceled) state, we should not try to - // run such kind of task but just return - if (task.state === notScheduled && (task.type === eventTask || task.type === macroTask)) { - return; - } - const reEntryGuard = task.state != running; - reEntryGuard && task._transitionTo(running, scheduled); - task.runCount++; - const previousTask = _currentTask; - _currentTask = task; - _currentZoneFrame = { parent: _currentZoneFrame, zone: this }; - try { - if (task.type == macroTask && task.data && !task.data.isPeriodic) { - task.cancelFn = undefined; - } - try { - return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs); - } - catch (error) { - if (this._zoneDelegate.handleError(this, error)) { - throw error; - } - } - } - finally { - // if the task's state is notScheduled or unknown, then it has already been cancelled - // we should not reset the state to scheduled - if (task.state !== notScheduled && task.state !== unknown) { - if (task.type == eventTask || (task.data && task.data.isPeriodic)) { - reEntryGuard && task._transitionTo(scheduled, running); - } - else { - task.runCount = 0; - this._updateTaskCount(task, -1); - reEntryGuard && - task._transitionTo(notScheduled, running, notScheduled); - } - } - _currentZoneFrame = _currentZoneFrame.parent; - _currentTask = previousTask; - } - } - scheduleTask(task) { - if (task.zone && task.zone !== this) { - // check if the task was rescheduled, the newZone - // should not be the children of the original zone - let newZone = this; - while (newZone) { - if (newZone === task.zone) { - throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${task.zone.name}`); - } - newZone = newZone.parent; - } - } - task._transitionTo(scheduling, notScheduled); - const zoneDelegates = []; - task._zoneDelegates = zoneDelegates; - task._zone = this; - try { - task = this._zoneDelegate.scheduleTask(this, task); - } - catch (err) { - // should set task's state to unknown when scheduleTask throw error - // because the err may from reschedule, so the fromState maybe notScheduled - task._transitionTo(unknown, scheduling, notScheduled); - // TODO: @JiaLiPassion, should we check the result from handleError? - this._zoneDelegate.handleError(this, err); - throw err; - } - if (task._zoneDelegates === zoneDelegates) { - // we have to check because internally the delegate can reschedule the task. - this._updateTaskCount(task, 1); - } - if (task.state == scheduling) { - task._transitionTo(scheduled, scheduling); - } - return task; - } - scheduleMicroTask(source, callback, data, customSchedule) { - return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, undefined)); - } - scheduleMacroTask(source, callback, data, customSchedule, customCancel) { - return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel)); - } - scheduleEventTask(source, callback, data, customSchedule, customCancel) { - return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel)); - } - cancelTask(task) { - if (task.zone != this) - throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' + - (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')'); - task._transitionTo(canceling, scheduled, running); - try { - this._zoneDelegate.cancelTask(this, task); - } - catch (err) { - // if error occurs when cancelTask, transit the state to unknown - task._transitionTo(unknown, canceling); - this._zoneDelegate.handleError(this, err); - throw err; - } - this._updateTaskCount(task, -1); - task._transitionTo(notScheduled, canceling); - task.runCount = 0; - return task; - } - _updateTaskCount(task, count) { - const zoneDelegates = task._zoneDelegates; - if (count == -1) { - task._zoneDelegates = null; - } - for (let i = 0; i < zoneDelegates.length; i++) { - zoneDelegates[i]._updateTaskCount(task.type, count); - } - } - } - // tslint:disable-next-line:require-internal-with-underscore - Zone.__symbol__ = __symbol__; - const DELEGATE_ZS = { - name: '', - onHasTask: (delegate, _, target, hasTaskState) => delegate.hasTask(target, hasTaskState), - onScheduleTask: (delegate, _, target, task) => delegate.scheduleTask(target, task), - onInvokeTask: (delegate, _, target, task, applyThis, applyArgs) => delegate.invokeTask(target, task, applyThis, applyArgs), - onCancelTask: (delegate, _, target, task) => delegate.cancelTask(target, task) - }; - class _ZoneDelegate { - constructor(zone, parentDelegate, zoneSpec) { - this._taskCounts = { 'microTask': 0, 'macroTask': 0, 'eventTask': 0 }; - this.zone = zone; - this._parentDelegate = parentDelegate; - this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS); - this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt); - this._forkCurrZone = - zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate._forkCurrZone); - this._interceptZS = - zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS); - this._interceptDlgt = - zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt); - this._interceptCurrZone = - zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate._interceptCurrZone); - this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS); - this._invokeDlgt = - zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt); - this._invokeCurrZone = - zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate._invokeCurrZone); - this._handleErrorZS = - zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS); - this._handleErrorDlgt = - zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt); - this._handleErrorCurrZone = - zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate._handleErrorCurrZone); - this._scheduleTaskZS = - zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS); - this._scheduleTaskDlgt = zoneSpec && - (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt); - this._scheduleTaskCurrZone = - zoneSpec && (zoneSpec.onScheduleTask ? this.zone : parentDelegate._scheduleTaskCurrZone); - this._invokeTaskZS = - zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS); - this._invokeTaskDlgt = - zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt); - this._invokeTaskCurrZone = - zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate._invokeTaskCurrZone); - this._cancelTaskZS = - zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS); - this._cancelTaskDlgt = - zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt); - this._cancelTaskCurrZone = - zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate._cancelTaskCurrZone); - this._hasTaskZS = null; - this._hasTaskDlgt = null; - this._hasTaskDlgtOwner = null; - this._hasTaskCurrZone = null; - const zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask; - const parentHasTask = parentDelegate && parentDelegate._hasTaskZS; - if (zoneSpecHasTask || parentHasTask) { - // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such - // a case all task related interceptors must go through this ZD. We can't short circuit it. - this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS; - this._hasTaskDlgt = parentDelegate; - this._hasTaskDlgtOwner = this; - this._hasTaskCurrZone = zone; - if (!zoneSpec.onScheduleTask) { - this._scheduleTaskZS = DELEGATE_ZS; - this._scheduleTaskDlgt = parentDelegate; - this._scheduleTaskCurrZone = this.zone; - } - if (!zoneSpec.onInvokeTask) { - this._invokeTaskZS = DELEGATE_ZS; - this._invokeTaskDlgt = parentDelegate; - this._invokeTaskCurrZone = this.zone; - } - if (!zoneSpec.onCancelTask) { - this._cancelTaskZS = DELEGATE_ZS; - this._cancelTaskDlgt = parentDelegate; - this._cancelTaskCurrZone = this.zone; - } - } - } - fork(targetZone, zoneSpec) { - return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) : - new Zone(targetZone, zoneSpec); - } - intercept(targetZone, callback, source) { - return this._interceptZS ? - this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) : - callback; - } - invoke(targetZone, callback, applyThis, applyArgs, source) { - return this._invokeZS ? this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) : - callback.apply(applyThis, applyArgs); - } - handleError(targetZone, error) { - return this._handleErrorZS ? - this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) : - true; - } - scheduleTask(targetZone, task) { - let returnTask = task; - if (this._scheduleTaskZS) { - if (this._hasTaskZS) { - returnTask._zoneDelegates.push(this._hasTaskDlgtOwner); - } - // clang-format off - returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task); - // clang-format on - if (!returnTask) - returnTask = task; - } - else { - if (task.scheduleFn) { - task.scheduleFn(task); - } - else if (task.type == microTask) { - scheduleMicroTask(task); - } - else { - throw new Error('Task is missing scheduleFn.'); - } - } - return returnTask; - } - invokeTask(targetZone, task, applyThis, applyArgs) { - return this._invokeTaskZS ? this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) : - task.callback.apply(applyThis, applyArgs); - } - cancelTask(targetZone, task) { - let value; - if (this._cancelTaskZS) { - value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task); - } - else { - if (!task.cancelFn) { - throw Error('Task is not cancelable'); - } - value = task.cancelFn(task); - } - return value; - } - hasTask(targetZone, isEmpty) { - // hasTask should not throw error so other ZoneDelegate - // can still trigger hasTask callback - try { - this._hasTaskZS && - this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty); - } - catch (err) { - this.handleError(targetZone, err); - } - } - // tslint:disable-next-line:require-internal-with-underscore - _updateTaskCount(type, count) { - const counts = this._taskCounts; - const prev = counts[type]; - const next = counts[type] = prev + count; - if (next < 0) { - throw new Error('More tasks executed then were scheduled.'); - } - if (prev == 0 || next == 0) { - const isEmpty = { - microTask: counts['microTask'] > 0, - macroTask: counts['macroTask'] > 0, - eventTask: counts['eventTask'] > 0, - change: type - }; - this.hasTask(this.zone, isEmpty); - } - } - } - class ZoneTask { - constructor(type, source, callback, options, scheduleFn, cancelFn) { - // tslint:disable-next-line:require-internal-with-underscore - this._zone = null; - this.runCount = 0; - // tslint:disable-next-line:require-internal-with-underscore - this._zoneDelegates = null; - // tslint:disable-next-line:require-internal-with-underscore - this._state = 'notScheduled'; - this.type = type; - this.source = source; - this.data = options; - this.scheduleFn = scheduleFn; - this.cancelFn = cancelFn; - if (!callback) { - throw new Error('callback is not defined'); - } - this.callback = callback; - const self = this; - // TODO: @JiaLiPassion options should have interface - if (type === eventTask && options && options.useG) { - this.invoke = ZoneTask.invokeTask; - } - else { - this.invoke = function () { - return ZoneTask.invokeTask.call(global, self, this, arguments); - }; - } - } - static invokeTask(task, target, args) { - if (!task) { - task = this; - } - _numberOfNestedTaskFrames++; - try { - task.runCount++; - return task.zone.runTask(task, target, args); - } - finally { - if (_numberOfNestedTaskFrames == 1) { - drainMicroTaskQueue(); - } - _numberOfNestedTaskFrames--; - } - } - get zone() { - return this._zone; - } - get state() { - return this._state; - } - cancelScheduleRequest() { - this._transitionTo(notScheduled, scheduling); - } - // tslint:disable-next-line:require-internal-with-underscore - _transitionTo(toState, fromState1, fromState2) { - if (this._state === fromState1 || this._state === fromState2) { - this._state = toState; - if (toState == notScheduled) { - this._zoneDelegates = null; - } - } - else { - throw new Error(`${this.type} '${this.source}': can not transition to '${toState}', expecting state '${fromState1}'${fromState2 ? ' or \'' + fromState2 + '\'' : ''}, was '${this._state}'.`); - } - } - toString() { - if (this.data && typeof this.data.handleId !== 'undefined') { - return this.data.handleId.toString(); - } - else { - return Object.prototype.toString.call(this); - } - } - // add toJSON method to prevent cyclic error when - // call JSON.stringify(zoneTask) - toJSON() { - return { - type: this.type, - state: this.state, - source: this.source, - zone: this.zone.name, - runCount: this.runCount - }; - } - } - ////////////////////////////////////////////////////// - ////////////////////////////////////////////////////// - /// MICROTASK QUEUE - ////////////////////////////////////////////////////// - ////////////////////////////////////////////////////// - const symbolSetTimeout = __symbol__('setTimeout'); - const symbolPromise = __symbol__('Promise'); - const symbolThen = __symbol__('then'); - let _microTaskQueue = []; - let _isDrainingMicrotaskQueue = false; - let nativeMicroTaskQueuePromise; - function nativeScheduleMicroTask(func) { - if (!nativeMicroTaskQueuePromise) { - if (global[symbolPromise]) { - nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0); - } - } - if (nativeMicroTaskQueuePromise) { - let nativeThen = nativeMicroTaskQueuePromise[symbolThen]; - if (!nativeThen) { - // native Promise is not patchable, we need to use `then` directly - // issue 1078 - nativeThen = nativeMicroTaskQueuePromise['then']; - } - nativeThen.call(nativeMicroTaskQueuePromise, func); - } - else { - global[symbolSetTimeout](func, 0); - } - } - function scheduleMicroTask(task) { - // if we are not running in any task, and there has not been anything scheduled - // we must bootstrap the initial task creation by manually scheduling the drain - if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) { - // We are not running in Task, so we need to kickstart the microtask queue. - nativeScheduleMicroTask(drainMicroTaskQueue); - } - task && _microTaskQueue.push(task); - } - function drainMicroTaskQueue() { - if (!_isDrainingMicrotaskQueue) { - _isDrainingMicrotaskQueue = true; - while (_microTaskQueue.length) { - const queue = _microTaskQueue; - _microTaskQueue = []; - for (let i = 0; i < queue.length; i++) { - const task = queue[i]; - try { - task.zone.runTask(task, null, null); - } - catch (error) { - _api.onUnhandledError(error); - } - } - } - _api.microtaskDrainDone(); - _isDrainingMicrotaskQueue = false; - } - } - ////////////////////////////////////////////////////// - ////////////////////////////////////////////////////// - /// BOOTSTRAP - ////////////////////////////////////////////////////// - ////////////////////////////////////////////////////// - const NO_ZONE = { name: 'NO ZONE' }; - const notScheduled = 'notScheduled', scheduling = 'scheduling', scheduled = 'scheduled', running = 'running', canceling = 'canceling', unknown = 'unknown'; - const microTask = 'microTask', macroTask = 'macroTask', eventTask = 'eventTask'; - const patches = {}; - const _api = { - symbol: __symbol__, - currentZoneFrame: () => _currentZoneFrame, - onUnhandledError: noop, - microtaskDrainDone: noop, - scheduleMicroTask: scheduleMicroTask, - showUncaughtError: () => !Zone[__symbol__('ignoreConsoleErrorUncaughtError')], - patchEventTarget: () => [], - patchOnProperties: noop, - patchMethod: () => noop, - bindArguments: () => [], - patchThen: () => noop, - patchMacroTask: () => noop, - patchEventPrototype: () => noop, - isIEOrEdge: () => false, - getGlobalObjects: () => undefined, - ObjectDefineProperty: () => noop, - ObjectGetOwnPropertyDescriptor: () => undefined, - ObjectCreate: () => undefined, - ArraySlice: () => [], - patchClass: () => noop, - wrapWithCurrentZone: () => noop, - filterProperties: () => [], - attachOriginToPatched: () => noop, - _redefineProperty: () => noop, - patchCallbacks: () => noop, - nativeScheduleMicroTask: nativeScheduleMicroTask - }; - let _currentZoneFrame = { parent: null, zone: new Zone(null, null) }; - let _currentTask = null; - let _numberOfNestedTaskFrames = 0; - function noop() { } - performanceMeasure('Zone', 'Zone'); - return global['Zone'] = Zone; -}))(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global); - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * Suppress closure compiler errors about unknown 'Zone' variable - * @fileoverview - * @suppress {undefinedVars,globalThis,missingRequire} - */ -/// -// issue #989, to reduce bundle size, use short name -/** Object.getOwnPropertyDescriptor */ -const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; -/** Object.defineProperty */ -const ObjectDefineProperty = Object.defineProperty; -/** Object.getPrototypeOf */ -const ObjectGetPrototypeOf = Object.getPrototypeOf; -/** Object.create */ -const ObjectCreate = Object.create; -/** Array.prototype.slice */ -const ArraySlice = Array.prototype.slice; -/** addEventListener string const */ -const ADD_EVENT_LISTENER_STR = 'addEventListener'; -/** removeEventListener string const */ -const REMOVE_EVENT_LISTENER_STR = 'removeEventListener'; -/** zoneSymbol addEventListener */ -const ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR); -/** zoneSymbol removeEventListener */ -const ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR); -/** true string const */ -const TRUE_STR = 'true'; -/** false string const */ -const FALSE_STR = 'false'; -/** Zone symbol prefix string const. */ -const ZONE_SYMBOL_PREFIX = Zone.__symbol__(''); -function wrapWithCurrentZone(callback, source) { - return Zone.current.wrap(callback, source); -} -function scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) { - return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel); -} -const zoneSymbol = Zone.__symbol__; -const isWindowExists = typeof window !== 'undefined'; -const internalWindow = isWindowExists ? window : undefined; -const _global = isWindowExists && internalWindow || typeof self === 'object' && self || global; -const REMOVE_ATTRIBUTE = 'removeAttribute'; -function bindArguments(args, source) { - for (let i = args.length - 1; i >= 0; i--) { - if (typeof args[i] === 'function') { - args[i] = wrapWithCurrentZone(args[i], source + '_' + i); - } - } - return args; -} -function patchPrototype(prototype, fnNames) { - const source = prototype.constructor['name']; - for (let i = 0; i < fnNames.length; i++) { - const name = fnNames[i]; - const delegate = prototype[name]; - if (delegate) { - const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name); - if (!isPropertyWritable(prototypeDesc)) { - continue; - } - prototype[name] = ((delegate) => { - const patched = function () { - return delegate.apply(this, bindArguments(arguments, source + '.' + name)); - }; - attachOriginToPatched(patched, delegate); - return patched; - })(delegate); - } - } -} -function isPropertyWritable(propertyDesc) { - if (!propertyDesc) { - return true; - } - if (propertyDesc.writable === false) { - return false; - } - return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined'); -} -const isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope); -// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify -// this code. -const isNode = (!('nw' in _global) && typeof _global.process !== 'undefined' && - {}.toString.call(_global.process) === '[object process]'); -const isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']); -// we are in electron of nw, so we are both browser and nodejs -// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify -// this code. -const isMix = typeof _global.process !== 'undefined' && - {}.toString.call(_global.process) === '[object process]' && !isWebWorker && - !!(isWindowExists && internalWindow['HTMLElement']); -const zoneSymbolEventNames$1 = {}; -const wrapFn = function (event) { - // https://github.com/angular/zone.js/issues/911, in IE, sometimes - // event will be undefined, so we need to use window.event - event = event || _global.event; - if (!event) { - return; - } - let eventNameSymbol = zoneSymbolEventNames$1[event.type]; - if (!eventNameSymbol) { - eventNameSymbol = zoneSymbolEventNames$1[event.type] = zoneSymbol('ON_PROPERTY' + event.type); - } - const target = this || event.target || _global; - const listener = target[eventNameSymbol]; - let result; - if (isBrowser && target === internalWindow && event.type === 'error') { - // window.onerror have different signiture - // https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror - // and onerror callback will prevent default when callback return true - const errorEvent = event; - result = listener && - listener.call(this, errorEvent.message, errorEvent.filename, errorEvent.lineno, errorEvent.colno, errorEvent.error); - if (result === true) { - event.preventDefault(); - } - } - else { - result = listener && listener.apply(this, arguments); - if (result != undefined && !result) { - event.preventDefault(); - } - } - return result; -}; -function patchProperty(obj, prop, prototype) { - let desc = ObjectGetOwnPropertyDescriptor(obj, prop); - if (!desc && prototype) { - // when patch window object, use prototype to check prop exist or not - const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop); - if (prototypeDesc) { - desc = { enumerable: true, configurable: true }; - } - } - // if the descriptor not exists or is not configurable - // just return - if (!desc || !desc.configurable) { - return; - } - const onPropPatchedSymbol = zoneSymbol('on' + prop + 'patched'); - if (obj.hasOwnProperty(onPropPatchedSymbol) && obj[onPropPatchedSymbol]) { - return; - } - // A property descriptor cannot have getter/setter and be writable - // deleting the writable and value properties avoids this error: - // - // TypeError: property descriptors must not specify a value or be writable when a - // getter or setter has been specified - delete desc.writable; - delete desc.value; - const originalDescGet = desc.get; - const originalDescSet = desc.set; - // substr(2) cuz 'onclick' -> 'click', etc - const eventName = prop.substr(2); - let eventNameSymbol = zoneSymbolEventNames$1[eventName]; - if (!eventNameSymbol) { - eventNameSymbol = zoneSymbolEventNames$1[eventName] = zoneSymbol('ON_PROPERTY' + eventName); - } - desc.set = function (newValue) { - // in some of windows's onproperty callback, this is undefined - // so we need to check it - let target = this; - if (!target && obj === _global) { - target = _global; - } - if (!target) { - return; - } - const previousValue = target[eventNameSymbol]; - if (typeof previousValue === 'function') { - target.removeEventListener(eventName, wrapFn); - } - // issue #978, when onload handler was added before loading zone.js - // we should remove it with originalDescSet - originalDescSet && originalDescSet.call(target, null); - target[eventNameSymbol] = newValue; - if (typeof newValue === 'function') { - target.addEventListener(eventName, wrapFn, false); - } - }; - // The getter would return undefined for unassigned properties but the default value of an - // unassigned property is null - desc.get = function () { - // in some of windows's onproperty callback, this is undefined - // so we need to check it - let target = this; - if (!target && obj === _global) { - target = _global; - } - if (!target) { - return null; - } - const listener = target[eventNameSymbol]; - if (listener) { - return listener; - } - else if (originalDescGet) { - // result will be null when use inline event attribute, - // such as - // because the onclick function is internal raw uncompiled handler - // the onclick will be evaluated when first time event was triggered or - // the property is accessed, https://github.com/angular/zone.js/issues/525 - // so we should use original native get to retrieve the handler - let value = originalDescGet.call(this); - if (value) { - desc.set.call(this, value); - if (typeof target[REMOVE_ATTRIBUTE] === 'function') { - target.removeAttribute(prop); - } - return value; - } - } - return null; - }; - ObjectDefineProperty(obj, prop, desc); - obj[onPropPatchedSymbol] = true; -} -function patchOnProperties(obj, properties, prototype) { - if (properties) { - for (let i = 0; i < properties.length; i++) { - patchProperty(obj, 'on' + properties[i], prototype); - } - } - else { - const onProperties = []; - for (const prop in obj) { - if (prop.substr(0, 2) == 'on') { - onProperties.push(prop); - } - } - for (let j = 0; j < onProperties.length; j++) { - patchProperty(obj, onProperties[j], prototype); - } - } -} -const originalInstanceKey = zoneSymbol('originalInstance'); -// wrap some native API on `window` -function patchClass(className) { - const OriginalClass = _global[className]; - if (!OriginalClass) - return; - // keep original class in global - _global[zoneSymbol(className)] = OriginalClass; - _global[className] = function () { - const a = bindArguments(arguments, className); - switch (a.length) { - case 0: - this[originalInstanceKey] = new OriginalClass(); - break; - case 1: - this[originalInstanceKey] = new OriginalClass(a[0]); - break; - case 2: - this[originalInstanceKey] = new OriginalClass(a[0], a[1]); - break; - case 3: - this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]); - break; - case 4: - this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]); - break; - default: - throw new Error('Arg list too long.'); - } - }; - // attach original delegate to patched function - attachOriginToPatched(_global[className], OriginalClass); - const instance = new OriginalClass(function () { }); - let prop; - for (prop in instance) { - // https://bugs.webkit.org/show_bug.cgi?id=44721 - if (className === 'XMLHttpRequest' && prop === 'responseBlob') - continue; - (function (prop) { - if (typeof instance[prop] === 'function') { - _global[className].prototype[prop] = function () { - return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments); - }; - } - else { - ObjectDefineProperty(_global[className].prototype, prop, { - set: function (fn) { - if (typeof fn === 'function') { - this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop); - // keep callback in wrapped function so we can - // use it in Function.prototype.toString to return - // the native one. - attachOriginToPatched(this[originalInstanceKey][prop], fn); - } - else { - this[originalInstanceKey][prop] = fn; - } - }, - get: function () { - return this[originalInstanceKey][prop]; - } - }); - } - }(prop)); - } - for (prop in OriginalClass) { - if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) { - _global[className][prop] = OriginalClass[prop]; - } - } -} -function patchMethod(target, name, patchFn) { - let proto = target; - while (proto && !proto.hasOwnProperty(name)) { - proto = ObjectGetPrototypeOf(proto); - } - if (!proto && target[name]) { - // somehow we did not find it, but we can see it. This happens on IE for Window properties. - proto = target; - } - const delegateName = zoneSymbol(name); - let delegate = null; - if (proto && (!(delegate = proto[delegateName]) || !proto.hasOwnProperty(delegateName))) { - delegate = proto[delegateName] = proto[name]; - // check whether proto[name] is writable - // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob - const desc = proto && ObjectGetOwnPropertyDescriptor(proto, name); - if (isPropertyWritable(desc)) { - const patchDelegate = patchFn(delegate, delegateName, name); - proto[name] = function () { - return patchDelegate(this, arguments); - }; - attachOriginToPatched(proto[name], delegate); - } - } - return delegate; -} -// TODO: @JiaLiPassion, support cancel task later if necessary -function patchMacroTask(obj, funcName, metaCreator) { - let setNative = null; - function scheduleTask(task) { - const data = task.data; - data.args[data.cbIdx] = function () { - task.invoke.apply(this, arguments); - }; - setNative.apply(data.target, data.args); - return task; - } - setNative = patchMethod(obj, funcName, (delegate) => function (self, args) { - const meta = metaCreator(self, args); - if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') { - return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask); - } - else { - // cause an error by calling it directly. - return delegate.apply(self, args); - } - }); -} -function attachOriginToPatched(patched, original) { - patched[zoneSymbol('OriginalDelegate')] = original; -} -let isDetectedIEOrEdge = false; -let ieOrEdge = false; -function isIE() { - try { - const ua = internalWindow.navigator.userAgent; - if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1) { - return true; - } - } - catch (error) { - } - return false; -} -function isIEOrEdge() { - if (isDetectedIEOrEdge) { - return ieOrEdge; - } - isDetectedIEOrEdge = true; - try { - const ua = internalWindow.navigator.userAgent; - if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) { - ieOrEdge = true; - } - } - catch (error) { - } - return ieOrEdge; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -Zone.__load_patch('ZoneAwarePromise', (global, Zone, api) => { - const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - const ObjectDefineProperty = Object.defineProperty; - function readableObjectToString(obj) { - if (obj && obj.toString === Object.prototype.toString) { - const className = obj.constructor && obj.constructor.name; - return (className ? className : '') + ': ' + JSON.stringify(obj); - } - return obj ? obj.toString() : Object.prototype.toString.call(obj); - } - const __symbol__ = api.symbol; - const _uncaughtPromiseErrors = []; - const isDisableWrappingUncaughtPromiseRejection = global[__symbol__('DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION')] === true; - const symbolPromise = __symbol__('Promise'); - const symbolThen = __symbol__('then'); - const creationTrace = '__creationTrace__'; - api.onUnhandledError = (e) => { - if (api.showUncaughtError()) { - const rejection = e && e.rejection; - if (rejection) { - console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined); - } - else { - console.error(e); - } - } - }; - api.microtaskDrainDone = () => { - while (_uncaughtPromiseErrors.length) { - const uncaughtPromiseError = _uncaughtPromiseErrors.shift(); - try { - uncaughtPromiseError.zone.runGuarded(() => { - if (uncaughtPromiseError.throwOriginal) { - throw uncaughtPromiseError.rejection; - } - throw uncaughtPromiseError; - }); - } - catch (error) { - handleUnhandledRejection(error); - } - } - }; - const UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler'); - function handleUnhandledRejection(e) { - api.onUnhandledError(e); - try { - const handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL]; - if (typeof handler === 'function') { - handler.call(this, e); - } - } - catch (err) { - } - } - function isThenable(value) { - return value && value.then; - } - function forwardResolution(value) { - return value; - } - function forwardRejection(rejection) { - return ZoneAwarePromise.reject(rejection); - } - const symbolState = __symbol__('state'); - const symbolValue = __symbol__('value'); - const symbolFinally = __symbol__('finally'); - const symbolParentPromiseValue = __symbol__('parentPromiseValue'); - const symbolParentPromiseState = __symbol__('parentPromiseState'); - const source = 'Promise.then'; - const UNRESOLVED = null; - const RESOLVED = true; - const REJECTED = false; - const REJECTED_NO_CATCH = 0; - function makeResolver(promise, state) { - return (v) => { - try { - resolvePromise(promise, state, v); - } - catch (err) { - resolvePromise(promise, false, err); - } - // Do not return value or you will break the Promise spec. - }; - } - const once = function () { - let wasCalled = false; - return function wrapper(wrappedFunction) { - return function () { - if (wasCalled) { - return; - } - wasCalled = true; - wrappedFunction.apply(null, arguments); - }; - }; - }; - const TYPE_ERROR = 'Promise resolved with itself'; - const CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace'); - // Promise Resolution - function resolvePromise(promise, state, value) { - const onceWrapper = once(); - if (promise === value) { - throw new TypeError(TYPE_ERROR); - } - if (promise[symbolState] === UNRESOLVED) { - // should only get value.then once based on promise spec. - let then = null; - try { - if (typeof value === 'object' || typeof value === 'function') { - then = value && value.then; - } - } - catch (err) { - onceWrapper(() => { - resolvePromise(promise, false, err); - })(); - return promise; - } - // if (value instanceof ZoneAwarePromise) { - if (state !== REJECTED && value instanceof ZoneAwarePromise && - value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) && - value[symbolState] !== UNRESOLVED) { - clearRejectedNoCatch(value); - resolvePromise(promise, value[symbolState], value[symbolValue]); - } - else if (state !== REJECTED && typeof then === 'function') { - try { - then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false))); - } - catch (err) { - onceWrapper(() => { - resolvePromise(promise, false, err); - })(); - } - } - else { - promise[symbolState] = state; - const queue = promise[symbolValue]; - promise[symbolValue] = value; - if (promise[symbolFinally] === symbolFinally) { - // the promise is generated by Promise.prototype.finally - if (state === RESOLVED) { - // the state is resolved, should ignore the value - // and use parent promise value - promise[symbolState] = promise[symbolParentPromiseState]; - promise[symbolValue] = promise[symbolParentPromiseValue]; - } - } - // record task information in value when error occurs, so we can - // do some additional work such as render longStackTrace - if (state === REJECTED && value instanceof Error) { - // check if longStackTraceZone is here - const trace = Zone.currentTask && Zone.currentTask.data && - Zone.currentTask.data[creationTrace]; - if (trace) { - // only keep the long stack trace into error when in longStackTraceZone - ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { configurable: true, enumerable: false, writable: true, value: trace }); - } - } - for (let i = 0; i < queue.length;) { - scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]); - } - if (queue.length == 0 && state == REJECTED) { - promise[symbolState] = REJECTED_NO_CATCH; - let uncaughtPromiseError = value; - try { - // Here we throws a new Error to print more readable error log - // and if the value is not an error, zone.js builds an `Error` - // Object here to attach the stack information. - throw new Error('Uncaught (in promise): ' + readableObjectToString(value) + - (value && value.stack ? '\n' + value.stack : '')); - } - catch (err) { - uncaughtPromiseError = err; - } - if (isDisableWrappingUncaughtPromiseRejection) { - // If disable wrapping uncaught promise reject - // use the value instead of wrapping it. - uncaughtPromiseError.throwOriginal = true; - } - uncaughtPromiseError.rejection = value; - uncaughtPromiseError.promise = promise; - uncaughtPromiseError.zone = Zone.current; - uncaughtPromiseError.task = Zone.currentTask; - _uncaughtPromiseErrors.push(uncaughtPromiseError); - api.scheduleMicroTask(); // to make sure that it is running - } - } - } - // Resolving an already resolved promise is a noop. - return promise; - } - const REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler'); - function clearRejectedNoCatch(promise) { - if (promise[symbolState] === REJECTED_NO_CATCH) { - // if the promise is rejected no catch status - // and queue.length > 0, means there is a error handler - // here to handle the rejected promise, we should trigger - // windows.rejectionhandled eventHandler or nodejs rejectionHandled - // eventHandler - try { - const handler = Zone[REJECTION_HANDLED_HANDLER]; - if (handler && typeof handler === 'function') { - handler.call(this, { rejection: promise[symbolValue], promise: promise }); - } - } - catch (err) { - } - promise[symbolState] = REJECTED; - for (let i = 0; i < _uncaughtPromiseErrors.length; i++) { - if (promise === _uncaughtPromiseErrors[i].promise) { - _uncaughtPromiseErrors.splice(i, 1); - } - } - } - } - function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) { - clearRejectedNoCatch(promise); - const promiseState = promise[symbolState]; - const delegate = promiseState ? - (typeof onFulfilled === 'function') ? onFulfilled : forwardResolution : - (typeof onRejected === 'function') ? onRejected : - forwardRejection; - zone.scheduleMicroTask(source, () => { - try { - const parentPromiseValue = promise[symbolValue]; - const isFinallyPromise = !!chainPromise && symbolFinally === chainPromise[symbolFinally]; - if (isFinallyPromise) { - // if the promise is generated from finally call, keep parent promise's state and value - chainPromise[symbolParentPromiseValue] = parentPromiseValue; - chainPromise[symbolParentPromiseState] = promiseState; - } - // should not pass value to finally callback - const value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ? - [] : - [parentPromiseValue]); - resolvePromise(chainPromise, true, value); - } - catch (error) { - // if error occurs, should always return this error - resolvePromise(chainPromise, false, error); - } - }, chainPromise); - } - const ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }'; - const noop = function () { }; - const AggregateError = global.AggregateError; - class ZoneAwarePromise { - static toString() { - return ZONE_AWARE_PROMISE_TO_STRING; - } - static resolve(value) { - return resolvePromise(new this(null), RESOLVED, value); - } - static reject(error) { - return resolvePromise(new this(null), REJECTED, error); - } - static any(values) { - if (!values || typeof values[Symbol.iterator] !== 'function') { - return Promise.reject(new AggregateError([], 'All promises were rejected')); - } - const promises = []; - let count = 0; - try { - for (let v of values) { - count++; - promises.push(ZoneAwarePromise.resolve(v)); - } - } - catch (err) { - return Promise.reject(new AggregateError([], 'All promises were rejected')); - } - if (count === 0) { - return Promise.reject(new AggregateError([], 'All promises were rejected')); - } - let finished = false; - const errors = []; - return new ZoneAwarePromise((resolve, reject) => { - for (let i = 0; i < promises.length; i++) { - promises[i].then(v => { - if (finished) { - return; - } - finished = true; - resolve(v); - }, err => { - errors.push(err); - count--; - if (count === 0) { - finished = true; - reject(new AggregateError(errors, 'All promises were rejected')); - } - }); - } - }); - } - ; - static race(values) { - let resolve; - let reject; - let promise = new this((res, rej) => { - resolve = res; - reject = rej; - }); - function onResolve(value) { - resolve(value); - } - function onReject(error) { - reject(error); - } - for (let value of values) { - if (!isThenable(value)) { - value = this.resolve(value); - } - value.then(onResolve, onReject); - } - return promise; - } - static all(values) { - return ZoneAwarePromise.allWithCallback(values); - } - static allSettled(values) { - const P = this && this.prototype instanceof ZoneAwarePromise ? this : ZoneAwarePromise; - return P.allWithCallback(values, { - thenCallback: (value) => ({ status: 'fulfilled', value }), - errorCallback: (err) => ({ status: 'rejected', reason: err }) - }); - } - static allWithCallback(values, callback) { - let resolve; - let reject; - let promise = new this((res, rej) => { - resolve = res; - reject = rej; - }); - // Start at 2 to prevent prematurely resolving if .then is called immediately. - let unresolvedCount = 2; - let valueIndex = 0; - const resolvedValues = []; - for (let value of values) { - if (!isThenable(value)) { - value = this.resolve(value); - } - const curValueIndex = valueIndex; - try { - value.then((value) => { - resolvedValues[curValueIndex] = callback ? callback.thenCallback(value) : value; - unresolvedCount--; - if (unresolvedCount === 0) { - resolve(resolvedValues); - } - }, (err) => { - if (!callback) { - reject(err); - } - else { - resolvedValues[curValueIndex] = callback.errorCallback(err); - unresolvedCount--; - if (unresolvedCount === 0) { - resolve(resolvedValues); - } - } - }); - } - catch (thenErr) { - reject(thenErr); - } - unresolvedCount++; - valueIndex++; - } - // Make the unresolvedCount zero-based again. - unresolvedCount -= 2; - if (unresolvedCount === 0) { - resolve(resolvedValues); - } - return promise; - } - constructor(executor) { - const promise = this; - if (!(promise instanceof ZoneAwarePromise)) { - throw new Error('Must be an instanceof Promise.'); - } - promise[symbolState] = UNRESOLVED; - promise[symbolValue] = []; // queue; - try { - executor && executor(makeResolver(promise, RESOLVED), makeResolver(promise, REJECTED)); - } - catch (error) { - resolvePromise(promise, false, error); - } - } - get [Symbol.toStringTag]() { - return 'Promise'; - } - get [Symbol.species]() { - return ZoneAwarePromise; - } - then(onFulfilled, onRejected) { - let C = this.constructor[Symbol.species]; - if (!C || typeof C !== 'function') { - C = this.constructor || ZoneAwarePromise; - } - const chainPromise = new C(noop); - const zone = Zone.current; - if (this[symbolState] == UNRESOLVED) { - this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected); - } - else { - scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected); - } - return chainPromise; - } - catch(onRejected) { - return this.then(null, onRejected); - } - finally(onFinally) { - let C = this.constructor[Symbol.species]; - if (!C || typeof C !== 'function') { - C = ZoneAwarePromise; - } - const chainPromise = new C(noop); - chainPromise[symbolFinally] = symbolFinally; - const zone = Zone.current; - if (this[symbolState] == UNRESOLVED) { - this[symbolValue].push(zone, chainPromise, onFinally, onFinally); - } - else { - scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally); - } - return chainPromise; - } - } - // Protect against aggressive optimizers dropping seemingly unused properties. - // E.g. Closure Compiler in advanced mode. - ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve; - ZoneAwarePromise['reject'] = ZoneAwarePromise.reject; - ZoneAwarePromise['race'] = ZoneAwarePromise.race; - ZoneAwarePromise['all'] = ZoneAwarePromise.all; - const NativePromise = global[symbolPromise] = global['Promise']; - global['Promise'] = ZoneAwarePromise; - const symbolThenPatched = __symbol__('thenPatched'); - function patchThen(Ctor) { - const proto = Ctor.prototype; - const prop = ObjectGetOwnPropertyDescriptor(proto, 'then'); - if (prop && (prop.writable === false || !prop.configurable)) { - // check Ctor.prototype.then propertyDescriptor is writable or not - // in meteor env, writable is false, we should ignore such case - return; - } - const originalThen = proto.then; - // Keep a reference to the original method. - proto[symbolThen] = originalThen; - Ctor.prototype.then = function (onResolve, onReject) { - const wrapped = new ZoneAwarePromise((resolve, reject) => { - originalThen.call(this, resolve, reject); - }); - return wrapped.then(onResolve, onReject); - }; - Ctor[symbolThenPatched] = true; - } - api.patchThen = patchThen; - function zoneify(fn) { - return function (self, args) { - let resultPromise = fn.apply(self, args); - if (resultPromise instanceof ZoneAwarePromise) { - return resultPromise; - } - let ctor = resultPromise.constructor; - if (!ctor[symbolThenPatched]) { - patchThen(ctor); - } - return resultPromise; - }; - } - if (NativePromise) { - patchThen(NativePromise); - patchMethod(global, 'fetch', delegate => zoneify(delegate)); - } - // This is not part of public API, but it is useful for tests, so we expose it. - Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors; - return ZoneAwarePromise; -}); - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -// override Function.prototype.toString to make zone.js patched function -// look like native function -Zone.__load_patch('toString', (global) => { - // patch Func.prototype.toString to let them look like native - const originalFunctionToString = Function.prototype.toString; - const ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate'); - const PROMISE_SYMBOL = zoneSymbol('Promise'); - const ERROR_SYMBOL = zoneSymbol('Error'); - const newFunctionToString = function toString() { - if (typeof this === 'function') { - const originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL]; - if (originalDelegate) { - if (typeof originalDelegate === 'function') { - return originalFunctionToString.call(originalDelegate); - } - else { - return Object.prototype.toString.call(originalDelegate); - } - } - if (this === Promise) { - const nativePromise = global[PROMISE_SYMBOL]; - if (nativePromise) { - return originalFunctionToString.call(nativePromise); - } - } - if (this === Error) { - const nativeError = global[ERROR_SYMBOL]; - if (nativeError) { - return originalFunctionToString.call(nativeError); - } - } - } - return originalFunctionToString.call(this); - }; - newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString; - Function.prototype.toString = newFunctionToString; - // patch Object.prototype.toString to let them look like native - const originalObjectToString = Object.prototype.toString; - const PROMISE_OBJECT_TO_STRING = '[object Promise]'; - Object.prototype.toString = function () { - if (typeof Promise === 'function' && this instanceof Promise) { - return PROMISE_OBJECT_TO_STRING; - } - return originalObjectToString.call(this); - }; -}); - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -let passiveSupported = false; -if (typeof window !== 'undefined') { - try { - const options = Object.defineProperty({}, 'passive', { - get: function () { - passiveSupported = true; - } - }); - // Note: We pass the `options` object as the event handler too. This is not compatible with the - // signature of `addEventListener` or `removeEventListener` but enables us to remove the handler - // without an actual handler. - window.addEventListener('test', options, options); - window.removeEventListener('test', options, options); - } - catch (err) { - passiveSupported = false; - } -} -// an identifier to tell ZoneTask do not create a new invoke closure -const OPTIMIZED_ZONE_EVENT_TASK_DATA = { - useG: true -}; -const zoneSymbolEventNames = {}; -const globalSources = {}; -const EVENT_NAME_SYMBOL_REGX = new RegExp('^' + ZONE_SYMBOL_PREFIX + '(\\w+)(true|false)$'); -const IMMEDIATE_PROPAGATION_SYMBOL = zoneSymbol('propagationStopped'); -function prepareEventNames(eventName, eventNameToString) { - const falseEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + FALSE_STR; - const trueEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + TRUE_STR; - const symbol = ZONE_SYMBOL_PREFIX + falseEventName; - const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName; - zoneSymbolEventNames[eventName] = {}; - zoneSymbolEventNames[eventName][FALSE_STR] = symbol; - zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture; -} -function patchEventTarget(_global, api, apis, patchOptions) { - const ADD_EVENT_LISTENER = (patchOptions && patchOptions.add) || ADD_EVENT_LISTENER_STR; - const REMOVE_EVENT_LISTENER = (patchOptions && patchOptions.rm) || REMOVE_EVENT_LISTENER_STR; - const LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.listeners) || 'eventListeners'; - const REMOVE_ALL_LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.rmAll) || 'removeAllListeners'; - const zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER); - const ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':'; - const PREPEND_EVENT_LISTENER = 'prependListener'; - const PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':'; - const invokeTask = function (task, target, event) { - // for better performance, check isRemoved which is set - // by removeEventListener - if (task.isRemoved) { - return; - } - const delegate = task.callback; - if (typeof delegate === 'object' && delegate.handleEvent) { - // create the bind version of handleEvent when invoke - task.callback = (event) => delegate.handleEvent(event); - task.originalDelegate = delegate; - } - // invoke static task.invoke - // need to try/catch error here, otherwise, the error in one event listener - // will break the executions of the other event listeners. Also error will - // not remove the event listener when `once` options is true. - let error; - try { - task.invoke(task, target, [event]); - } - catch (err) { - error = err; - } - const options = task.options; - if (options && typeof options === 'object' && options.once) { - // if options.once is true, after invoke once remove listener here - // only browser need to do this, nodejs eventEmitter will cal removeListener - // inside EventEmitter.once - const delegate = task.originalDelegate ? task.originalDelegate : task.callback; - target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate, options); - } - return error; - }; - function globalCallback(context, event, isCapture) { - // https://github.com/angular/zone.js/issues/911, in IE, sometimes - // event will be undefined, so we need to use window.event - event = event || _global.event; - if (!event) { - return; - } - // event.target is needed for Samsung TV and SourceBuffer - // || global is needed https://github.com/angular/zone.js/issues/190 - const target = context || event.target || _global; - const tasks = target[zoneSymbolEventNames[event.type][isCapture ? TRUE_STR : FALSE_STR]]; - if (tasks) { - const errors = []; - // invoke all tasks which attached to current target with given event.type and capture = false - // for performance concern, if task.length === 1, just invoke - if (tasks.length === 1) { - const err = invokeTask(tasks[0], target, event); - err && errors.push(err); - } - else { - // https://github.com/angular/zone.js/issues/836 - // copy the tasks array before invoke, to avoid - // the callback will remove itself or other listener - const copyTasks = tasks.slice(); - for (let i = 0; i < copyTasks.length; i++) { - if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) { - break; - } - const err = invokeTask(copyTasks[i], target, event); - err && errors.push(err); - } - } - // Since there is only one error, we don't need to schedule microTask - // to throw the error. - if (errors.length === 1) { - throw errors[0]; - } - else { - for (let i = 0; i < errors.length; i++) { - const err = errors[i]; - api.nativeScheduleMicroTask(() => { - throw err; - }); - } - } - } - } - // global shared zoneAwareCallback to handle all event callback with capture = false - const globalZoneAwareCallback = function (event) { - return globalCallback(this, event, false); - }; - // global shared zoneAwareCallback to handle all event callback with capture = true - const globalZoneAwareCaptureCallback = function (event) { - return globalCallback(this, event, true); - }; - function patchEventTargetMethods(obj, patchOptions) { - if (!obj) { - return false; - } - let useGlobalCallback = true; - if (patchOptions && patchOptions.useG !== undefined) { - useGlobalCallback = patchOptions.useG; - } - const validateHandler = patchOptions && patchOptions.vh; - let checkDuplicate = true; - if (patchOptions && patchOptions.chkDup !== undefined) { - checkDuplicate = patchOptions.chkDup; - } - let returnTarget = false; - if (patchOptions && patchOptions.rt !== undefined) { - returnTarget = patchOptions.rt; - } - let proto = obj; - while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) { - proto = ObjectGetPrototypeOf(proto); - } - if (!proto && obj[ADD_EVENT_LISTENER]) { - // somehow we did not find it, but we can see it. This happens on IE for Window properties. - proto = obj; - } - if (!proto) { - return false; - } - if (proto[zoneSymbolAddEventListener]) { - return false; - } - const eventNameToString = patchOptions && patchOptions.eventNameToString; - // a shared global taskData to pass data for scheduleEventTask - // so we do not need to create a new object just for pass some data - const taskData = {}; - const nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER]; - const nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] = - proto[REMOVE_EVENT_LISTENER]; - const nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] = - proto[LISTENERS_EVENT_LISTENER]; - const nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] = - proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER]; - let nativePrependEventListener; - if (patchOptions && patchOptions.prepend) { - nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] = - proto[patchOptions.prepend]; - } - /** - * This util function will build an option object with passive option - * to handle all possible input from the user. - */ - function buildEventListenerOptions(options, passive) { - if (!passiveSupported && typeof options === 'object' && options) { - // doesn't support passive but user want to pass an object as options. - // this will not work on some old browser, so we just pass a boolean - // as useCapture parameter - return !!options.capture; - } - if (!passiveSupported || !passive) { - return options; - } - if (typeof options === 'boolean') { - return { capture: options, passive: true }; - } - if (!options) { - return { passive: true }; - } - if (typeof options === 'object' && options.passive !== false) { - return Object.assign(Object.assign({}, options), { passive: true }); - } - return options; - } - const customScheduleGlobal = function (task) { - // if there is already a task for the eventName + capture, - // just return, because we use the shared globalZoneAwareCallback here. - if (taskData.isExisting) { - return; - } - return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options); - }; - const customCancelGlobal = function (task) { - // if task is not marked as isRemoved, this call is directly - // from Zone.prototype.cancelTask, we should remove the task - // from tasksList of target first - if (!task.isRemoved) { - const symbolEventNames = zoneSymbolEventNames[task.eventName]; - let symbolEventName; - if (symbolEventNames) { - symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR]; - } - const existingTasks = symbolEventName && task.target[symbolEventName]; - if (existingTasks) { - for (let i = 0; i < existingTasks.length; i++) { - const existingTask = existingTasks[i]; - if (existingTask === task) { - existingTasks.splice(i, 1); - // set isRemoved to data for faster invokeTask check - task.isRemoved = true; - if (existingTasks.length === 0) { - // all tasks for the eventName + capture have gone, - // remove globalZoneAwareCallback and remove the task cache from target - task.allRemoved = true; - task.target[symbolEventName] = null; - } - break; - } - } - } - } - // if all tasks for the eventName + capture have gone, - // we will really remove the global event callback, - // if not, return - if (!task.allRemoved) { - return; - } - return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options); - }; - const customScheduleNonGlobal = function (task) { - return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options); - }; - const customSchedulePrepend = function (task) { - return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options); - }; - const customCancelNonGlobal = function (task) { - return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options); - }; - const customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal; - const customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal; - const compareTaskCallbackVsDelegate = function (task, delegate) { - const typeOfDelegate = typeof delegate; - return (typeOfDelegate === 'function' && task.callback === delegate) || - (typeOfDelegate === 'object' && task.originalDelegate === delegate); - }; - const compare = (patchOptions && patchOptions.diff) ? patchOptions.diff : compareTaskCallbackVsDelegate; - const unpatchedEvents = Zone[zoneSymbol('UNPATCHED_EVENTS')]; - const passiveEvents = _global[zoneSymbol('PASSIVE_EVENTS')]; - const makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget = false, prepend = false) { - return function () { - const target = this || _global; - let eventName = arguments[0]; - if (patchOptions && patchOptions.transferEventName) { - eventName = patchOptions.transferEventName(eventName); - } - let delegate = arguments[1]; - if (!delegate) { - return nativeListener.apply(this, arguments); - } - if (isNode && eventName === 'uncaughtException') { - // don't patch uncaughtException of nodejs to prevent endless loop - return nativeListener.apply(this, arguments); - } - // don't create the bind delegate function for handleEvent - // case here to improve addEventListener performance - // we will create the bind delegate when invoke - let isHandleEvent = false; - if (typeof delegate !== 'function') { - if (!delegate.handleEvent) { - return nativeListener.apply(this, arguments); - } - isHandleEvent = true; - } - if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) { - return; - } - const passive = passiveSupported && !!passiveEvents && passiveEvents.indexOf(eventName) !== -1; - const options = buildEventListenerOptions(arguments[2], passive); - if (unpatchedEvents) { - // check upatched list - for (let i = 0; i < unpatchedEvents.length; i++) { - if (eventName === unpatchedEvents[i]) { - if (passive) { - return nativeListener.call(target, eventName, delegate, options); - } - else { - return nativeListener.apply(this, arguments); - } - } - } - } - const capture = !options ? false : typeof options === 'boolean' ? true : options.capture; - const once = options && typeof options === 'object' ? options.once : false; - const zone = Zone.current; - let symbolEventNames = zoneSymbolEventNames[eventName]; - if (!symbolEventNames) { - prepareEventNames(eventName, eventNameToString); - symbolEventNames = zoneSymbolEventNames[eventName]; - } - const symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR]; - let existingTasks = target[symbolEventName]; - let isExisting = false; - if (existingTasks) { - // already have task registered - isExisting = true; - if (checkDuplicate) { - for (let i = 0; i < existingTasks.length; i++) { - if (compare(existingTasks[i], delegate)) { - // same callback, same capture, same event name, just return - return; - } - } - } - } - else { - existingTasks = target[symbolEventName] = []; - } - let source; - const constructorName = target.constructor['name']; - const targetSource = globalSources[constructorName]; - if (targetSource) { - source = targetSource[eventName]; - } - if (!source) { - source = constructorName + addSource + - (eventNameToString ? eventNameToString(eventName) : eventName); - } - // do not create a new object as task.data to pass those things - // just use the global shared one - taskData.options = options; - if (once) { - // if addEventListener with once options, we don't pass it to - // native addEventListener, instead we keep the once setting - // and handle ourselves. - taskData.options.once = false; - } - taskData.target = target; - taskData.capture = capture; - taskData.eventName = eventName; - taskData.isExisting = isExisting; - const data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : undefined; - // keep taskData into data to allow onScheduleEventTask to access the task information - if (data) { - data.taskData = taskData; - } - const task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn); - // should clear taskData.target to avoid memory leak - // issue, https://github.com/angular/angular/issues/20442 - taskData.target = null; - // need to clear up taskData because it is a global object - if (data) { - data.taskData = null; - } - // have to save those information to task in case - // application may call task.zone.cancelTask() directly - if (once) { - options.once = true; - } - if (!(!passiveSupported && typeof task.options === 'boolean')) { - // if not support passive, and we pass an option object - // to addEventListener, we should save the options to task - task.options = options; - } - task.target = target; - task.capture = capture; - task.eventName = eventName; - if (isHandleEvent) { - // save original delegate for compare to check duplicate - task.originalDelegate = delegate; - } - if (!prepend) { - existingTasks.push(task); - } - else { - existingTasks.unshift(task); - } - if (returnTarget) { - return target; - } - }; - }; - proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget); - if (nativePrependEventListener) { - proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true); - } - proto[REMOVE_EVENT_LISTENER] = function () { - const target = this || _global; - let eventName = arguments[0]; - if (patchOptions && patchOptions.transferEventName) { - eventName = patchOptions.transferEventName(eventName); - } - const options = arguments[2]; - const capture = !options ? false : typeof options === 'boolean' ? true : options.capture; - const delegate = arguments[1]; - if (!delegate) { - return nativeRemoveEventListener.apply(this, arguments); - } - if (validateHandler && - !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) { - return; - } - const symbolEventNames = zoneSymbolEventNames[eventName]; - let symbolEventName; - if (symbolEventNames) { - symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR]; - } - const existingTasks = symbolEventName && target[symbolEventName]; - if (existingTasks) { - for (let i = 0; i < existingTasks.length; i++) { - const existingTask = existingTasks[i]; - if (compare(existingTask, delegate)) { - existingTasks.splice(i, 1); - // set isRemoved to data for faster invokeTask check - existingTask.isRemoved = true; - if (existingTasks.length === 0) { - // all tasks for the eventName + capture have gone, - // remove globalZoneAwareCallback and remove the task cache from target - existingTask.allRemoved = true; - target[symbolEventName] = null; - // in the target, we have an event listener which is added by on_property - // such as target.onclick = function() {}, so we need to clear this internal - // property too if all delegates all removed - if (typeof eventName === 'string') { - const onPropertySymbol = ZONE_SYMBOL_PREFIX + 'ON_PROPERTY' + eventName; - target[onPropertySymbol] = null; - } - } - existingTask.zone.cancelTask(existingTask); - if (returnTarget) { - return target; - } - return; - } - } - } - // issue 930, didn't find the event name or callback - // from zone kept existingTasks, the callback maybe - // added outside of zone, we need to call native removeEventListener - // to try to remove it. - return nativeRemoveEventListener.apply(this, arguments); - }; - proto[LISTENERS_EVENT_LISTENER] = function () { - const target = this || _global; - let eventName = arguments[0]; - if (patchOptions && patchOptions.transferEventName) { - eventName = patchOptions.transferEventName(eventName); - } - const listeners = []; - const tasks = findEventTasks(target, eventNameToString ? eventNameToString(eventName) : eventName); - for (let i = 0; i < tasks.length; i++) { - const task = tasks[i]; - let delegate = task.originalDelegate ? task.originalDelegate : task.callback; - listeners.push(delegate); - } - return listeners; - }; - proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () { - const target = this || _global; - let eventName = arguments[0]; - if (!eventName) { - const keys = Object.keys(target); - for (let i = 0; i < keys.length; i++) { - const prop = keys[i]; - const match = EVENT_NAME_SYMBOL_REGX.exec(prop); - let evtName = match && match[1]; - // in nodejs EventEmitter, removeListener event is - // used for monitoring the removeListener call, - // so just keep removeListener eventListener until - // all other eventListeners are removed - if (evtName && evtName !== 'removeListener') { - this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName); - } - } - // remove removeListener listener finally - this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener'); - } - else { - if (patchOptions && patchOptions.transferEventName) { - eventName = patchOptions.transferEventName(eventName); - } - const symbolEventNames = zoneSymbolEventNames[eventName]; - if (symbolEventNames) { - const symbolEventName = symbolEventNames[FALSE_STR]; - const symbolCaptureEventName = symbolEventNames[TRUE_STR]; - const tasks = target[symbolEventName]; - const captureTasks = target[symbolCaptureEventName]; - if (tasks) { - const removeTasks = tasks.slice(); - for (let i = 0; i < removeTasks.length; i++) { - const task = removeTasks[i]; - let delegate = task.originalDelegate ? task.originalDelegate : task.callback; - this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options); - } - } - if (captureTasks) { - const removeTasks = captureTasks.slice(); - for (let i = 0; i < removeTasks.length; i++) { - const task = removeTasks[i]; - let delegate = task.originalDelegate ? task.originalDelegate : task.callback; - this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options); - } - } - } - } - if (returnTarget) { - return this; - } - }; - // for native toString patch - attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener); - attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener); - if (nativeRemoveAllListeners) { - attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners); - } - if (nativeListeners) { - attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners); - } - return true; - } - let results = []; - for (let i = 0; i < apis.length; i++) { - results[i] = patchEventTargetMethods(apis[i], patchOptions); - } - return results; -} -function findEventTasks(target, eventName) { - if (!eventName) { - const foundTasks = []; - for (let prop in target) { - const match = EVENT_NAME_SYMBOL_REGX.exec(prop); - let evtName = match && match[1]; - if (evtName && (!eventName || evtName === eventName)) { - const tasks = target[prop]; - if (tasks) { - for (let i = 0; i < tasks.length; i++) { - foundTasks.push(tasks[i]); - } - } - } - } - return foundTasks; - } - let symbolEventName = zoneSymbolEventNames[eventName]; - if (!symbolEventName) { - prepareEventNames(eventName); - symbolEventName = zoneSymbolEventNames[eventName]; - } - const captureFalseTasks = target[symbolEventName[FALSE_STR]]; - const captureTrueTasks = target[symbolEventName[TRUE_STR]]; - if (!captureFalseTasks) { - return captureTrueTasks ? captureTrueTasks.slice() : []; - } - else { - return captureTrueTasks ? captureFalseTasks.concat(captureTrueTasks) : - captureFalseTasks.slice(); - } -} -function patchEventPrototype(global, api) { - const Event = global['Event']; - if (Event && Event.prototype) { - api.patchMethod(Event.prototype, 'stopImmediatePropagation', (delegate) => function (self, args) { - self[IMMEDIATE_PROPAGATION_SYMBOL] = true; - // we need to call the native stopImmediatePropagation - // in case in some hybrid application, some part of - // application will be controlled by zone, some are not - delegate && delegate.apply(self, args); - }); - } -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function patchCallbacks(api, target, targetName, method, callbacks) { - const symbol = Zone.__symbol__(method); - if (target[symbol]) { - return; - } - const nativeDelegate = target[symbol] = target[method]; - target[method] = function (name, opts, options) { - if (opts && opts.prototype) { - callbacks.forEach(function (callback) { - const source = `${targetName}.${method}::` + callback; - const prototype = opts.prototype; - if (prototype.hasOwnProperty(callback)) { - const descriptor = api.ObjectGetOwnPropertyDescriptor(prototype, callback); - if (descriptor && descriptor.value) { - descriptor.value = api.wrapWithCurrentZone(descriptor.value, source); - api._redefineProperty(opts.prototype, callback, descriptor); - } - else if (prototype[callback]) { - prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source); - } - } - else if (prototype[callback]) { - prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source); - } - }); - } - return nativeDelegate.call(target, name, opts, options); - }; - api.attachOriginToPatched(target[method], nativeDelegate); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function filterProperties(target, onProperties, ignoreProperties) { - if (!ignoreProperties || ignoreProperties.length === 0) { - return onProperties; - } - const tip = ignoreProperties.filter(ip => ip.target === target); - if (!tip || tip.length === 0) { - return onProperties; - } - const targetIgnoreProperties = tip[0].ignoreProperties; - return onProperties.filter(op => targetIgnoreProperties.indexOf(op) === -1); -} -function patchFilteredProperties(target, onProperties, ignoreProperties, prototype) { - // check whether target is available, sometimes target will be undefined - // because different browser or some 3rd party plugin. - if (!target) { - return; - } - const filteredProperties = filterProperties(target, onProperties, ignoreProperties); - patchOnProperties(target, filteredProperties, prototype); -} -/** - * Get all event name properties which the event name startsWith `on` - * from the target object itself, inherited properties are not considered. - */ -function getOnEventNames(target) { - return Object.getOwnPropertyNames(target) - .filter(name => name.startsWith('on') && name.length > 2) - .map(name => name.substring(2)); -} -function propertyDescriptorPatch(api, _global) { - if (isNode && !isMix) { - return; - } - if (Zone[api.symbol('patchEvents')]) { - // events are already been patched by legacy patch. - return; - } - const ignoreProperties = _global['__Zone_ignore_on_properties']; - // for browsers that we can patch the descriptor: Chrome & Firefox - let patchTargets = []; - if (isBrowser) { - const internalWindow = window; - patchTargets = patchTargets.concat([ - 'Document', 'SVGElement', 'Element', 'HTMLElement', 'HTMLBodyElement', 'HTMLMediaElement', - 'HTMLFrameSetElement', 'HTMLFrameElement', 'HTMLIFrameElement', 'HTMLMarqueeElement', 'Worker' - ]); - const ignoreErrorProperties = isIE() ? [{ target: internalWindow, ignoreProperties: ['error'] }] : []; - // in IE/Edge, onProp not exist in window object, but in WindowPrototype - // so we need to pass WindowPrototype to check onProp exist or not - patchFilteredProperties(internalWindow, getOnEventNames(internalWindow), ignoreProperties ? ignoreProperties.concat(ignoreErrorProperties) : ignoreProperties, ObjectGetPrototypeOf(internalWindow)); - } - patchTargets = patchTargets.concat([ - 'XMLHttpRequest', 'XMLHttpRequestEventTarget', 'IDBIndex', 'IDBRequest', 'IDBOpenDBRequest', - 'IDBDatabase', 'IDBTransaction', 'IDBCursor', 'WebSocket' - ]); - for (let i = 0; i < patchTargets.length; i++) { - const target = _global[patchTargets[i]]; - target && target.prototype && - patchFilteredProperties(target.prototype, getOnEventNames(target.prototype), ignoreProperties); - } -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -Zone.__load_patch('util', (global, Zone, api) => { - // Collect native event names by looking at properties - // on the global namespace, e.g. 'onclick'. - const eventNames = getOnEventNames(global); - api.patchOnProperties = patchOnProperties; - api.patchMethod = patchMethod; - api.bindArguments = bindArguments; - api.patchMacroTask = patchMacroTask; - // In earlier version of zone.js (<0.9.0), we use env name `__zone_symbol__BLACK_LISTED_EVENTS` to - // define which events will not be patched by `Zone.js`. - // In newer version (>=0.9.0), we change the env name to `__zone_symbol__UNPATCHED_EVENTS` to keep - // the name consistent with angular repo. - // The `__zone_symbol__BLACK_LISTED_EVENTS` is deprecated, but it is still be supported for - // backwards compatibility. - const SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS'); - const SYMBOL_UNPATCHED_EVENTS = Zone.__symbol__('UNPATCHED_EVENTS'); - if (global[SYMBOL_UNPATCHED_EVENTS]) { - global[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_UNPATCHED_EVENTS]; - } - if (global[SYMBOL_BLACK_LISTED_EVENTS]) { - Zone[SYMBOL_BLACK_LISTED_EVENTS] = Zone[SYMBOL_UNPATCHED_EVENTS] = - global[SYMBOL_BLACK_LISTED_EVENTS]; - } - api.patchEventPrototype = patchEventPrototype; - api.patchEventTarget = patchEventTarget; - api.isIEOrEdge = isIEOrEdge; - api.ObjectDefineProperty = ObjectDefineProperty; - api.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor; - api.ObjectCreate = ObjectCreate; - api.ArraySlice = ArraySlice; - api.patchClass = patchClass; - api.wrapWithCurrentZone = wrapWithCurrentZone; - api.filterProperties = filterProperties; - api.attachOriginToPatched = attachOriginToPatched; - api._redefineProperty = Object.defineProperty; - api.patchCallbacks = patchCallbacks; - api.getGlobalObjects = () => ({ - globalSources, - zoneSymbolEventNames, - eventNames, - isBrowser, - isMix, - isNode, - TRUE_STR, - FALSE_STR, - ZONE_SYMBOL_PREFIX, - ADD_EVENT_LISTENER_STR, - REMOVE_EVENT_LISTENER_STR - }); -}); - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -const taskSymbol = zoneSymbol('zoneTask'); -function patchTimer(window, setName, cancelName, nameSuffix) { - let setNative = null; - let clearNative = null; - setName += nameSuffix; - cancelName += nameSuffix; - const tasksByHandleId = {}; - function scheduleTask(task) { - const data = task.data; - data.args[0] = function () { - return task.invoke.apply(this, arguments); - }; - data.handleId = setNative.apply(window, data.args); - return task; - } - function clearTask(task) { - return clearNative.call(window, task.data.handleId); - } - setNative = - patchMethod(window, setName, (delegate) => function (self, args) { - if (typeof args[0] === 'function') { - const options = { - isPeriodic: nameSuffix === 'Interval', - delay: (nameSuffix === 'Timeout' || nameSuffix === 'Interval') ? args[1] || 0 : - undefined, - args: args - }; - const callback = args[0]; - args[0] = function timer() { - try { - return callback.apply(this, arguments); - } - finally { - // issue-934, task will be cancelled - // even it is a periodic task such as - // setInterval - // https://github.com/angular/angular/issues/40387 - // Cleanup tasksByHandleId should be handled before scheduleTask - // Since some zoneSpec may intercept and doesn't trigger - // scheduleFn(scheduleTask) provided here. - if (!(options.isPeriodic)) { - if (typeof options.handleId === 'number') { - // in non-nodejs env, we remove timerId - // from local cache - delete tasksByHandleId[options.handleId]; - } - else if (options.handleId) { - // Node returns complex objects as handleIds - // we remove task reference from timer object - options.handleId[taskSymbol] = null; - } - } - } - }; - const task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask); - if (!task) { - return task; - } - // Node.js must additionally support the ref and unref functions. - const handle = task.data.handleId; - if (typeof handle === 'number') { - // for non nodejs env, we save handleId: task - // mapping in local cache for clearTimeout - tasksByHandleId[handle] = task; - } - else if (handle) { - // for nodejs env, we save task - // reference in timerId Object for clearTimeout - handle[taskSymbol] = task; - } - // check whether handle is null, because some polyfill or browser - // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame - if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' && - typeof handle.unref === 'function') { - task.ref = handle.ref.bind(handle); - task.unref = handle.unref.bind(handle); - } - if (typeof handle === 'number' || handle) { - return handle; - } - return task; - } - else { - // cause an error by calling it directly. - return delegate.apply(window, args); - } - }); - clearNative = - patchMethod(window, cancelName, (delegate) => function (self, args) { - const id = args[0]; - let task; - if (typeof id === 'number') { - // non nodejs env. - task = tasksByHandleId[id]; - } - else { - // nodejs env. - task = id && id[taskSymbol]; - // other environments. - if (!task) { - task = id; - } - } - if (task && typeof task.type === 'string') { - if (task.state !== 'notScheduled' && - (task.cancelFn && task.data.isPeriodic || task.runCount === 0)) { - if (typeof id === 'number') { - delete tasksByHandleId[id]; - } - else if (id) { - id[taskSymbol] = null; - } - // Do not cancel already canceled functions - task.zone.cancelTask(task); - } - } - else { - // cause an error by calling it directly. - delegate.apply(window, args); - } - }); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function patchCustomElements(_global, api) { - const { isBrowser, isMix } = api.getGlobalObjects(); - if ((!isBrowser && !isMix) || !_global['customElements'] || !('customElements' in _global)) { - return; - } - const callbacks = ['connectedCallback', 'disconnectedCallback', 'adoptedCallback', 'attributeChangedCallback']; - api.patchCallbacks(api, _global.customElements, 'customElements', 'define', callbacks); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function eventTargetPatch(_global, api) { - if (Zone[api.symbol('patchEventTarget')]) { - // EventTarget is already patched. - return; - } - const { eventNames, zoneSymbolEventNames, TRUE_STR, FALSE_STR, ZONE_SYMBOL_PREFIX } = api.getGlobalObjects(); - // predefine all __zone_symbol__ + eventName + true/false string - for (let i = 0; i < eventNames.length; i++) { - const eventName = eventNames[i]; - const falseEventName = eventName + FALSE_STR; - const trueEventName = eventName + TRUE_STR; - const symbol = ZONE_SYMBOL_PREFIX + falseEventName; - const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName; - zoneSymbolEventNames[eventName] = {}; - zoneSymbolEventNames[eventName][FALSE_STR] = symbol; - zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture; - } - const EVENT_TARGET = _global['EventTarget']; - if (!EVENT_TARGET || !EVENT_TARGET.prototype) { - return; - } - api.patchEventTarget(_global, api, [EVENT_TARGET && EVENT_TARGET.prototype]); - return true; -} -function patchEvent(global, api) { - api.patchEventPrototype(global, api); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -Zone.__load_patch('legacy', (global) => { - const legacyPatch = global[Zone.__symbol__('legacyPatch')]; - if (legacyPatch) { - legacyPatch(); - } -}); -Zone.__load_patch('queueMicrotask', (global, Zone, api) => { - api.patchMethod(global, 'queueMicrotask', delegate => { - return function (self, args) { - Zone.current.scheduleMicroTask('queueMicrotask', args[0]); - }; - }); -}); -Zone.__load_patch('timers', (global) => { - const set = 'set'; - const clear = 'clear'; - patchTimer(global, set, clear, 'Timeout'); - patchTimer(global, set, clear, 'Interval'); - patchTimer(global, set, clear, 'Immediate'); -}); -Zone.__load_patch('requestAnimationFrame', (global) => { - patchTimer(global, 'request', 'cancel', 'AnimationFrame'); - patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame'); - patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame'); -}); -Zone.__load_patch('blocking', (global, Zone) => { - const blockingMethods = ['alert', 'prompt', 'confirm']; - for (let i = 0; i < blockingMethods.length; i++) { - const name = blockingMethods[i]; - patchMethod(global, name, (delegate, symbol, name) => { - return function (s, args) { - return Zone.current.run(delegate, global, args, name); - }; - }); - } -}); -Zone.__load_patch('EventTarget', (global, Zone, api) => { - patchEvent(global, api); - eventTargetPatch(global, api); - // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener - const XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget']; - if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) { - api.patchEventTarget(global, api, [XMLHttpRequestEventTarget.prototype]); - } -}); -Zone.__load_patch('MutationObserver', (global, Zone, api) => { - patchClass('MutationObserver'); - patchClass('WebKitMutationObserver'); -}); -Zone.__load_patch('IntersectionObserver', (global, Zone, api) => { - patchClass('IntersectionObserver'); -}); -Zone.__load_patch('FileReader', (global, Zone, api) => { - patchClass('FileReader'); -}); -Zone.__load_patch('on_property', (global, Zone, api) => { - propertyDescriptorPatch(api, global); -}); -Zone.__load_patch('customElements', (global, Zone, api) => { - patchCustomElements(global, api); -}); -Zone.__load_patch('XHR', (global, Zone) => { - // Treat XMLHttpRequest as a macrotask. - patchXHR(global); - const XHR_TASK = zoneSymbol('xhrTask'); - const XHR_SYNC = zoneSymbol('xhrSync'); - const XHR_LISTENER = zoneSymbol('xhrListener'); - const XHR_SCHEDULED = zoneSymbol('xhrScheduled'); - const XHR_URL = zoneSymbol('xhrURL'); - const XHR_ERROR_BEFORE_SCHEDULED = zoneSymbol('xhrErrorBeforeScheduled'); - function patchXHR(window) { - const XMLHttpRequest = window['XMLHttpRequest']; - if (!XMLHttpRequest) { - // XMLHttpRequest is not available in service worker - return; - } - const XMLHttpRequestPrototype = XMLHttpRequest.prototype; - function findPendingTask(target) { - return target[XHR_TASK]; - } - let oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER]; - let oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]; - if (!oriAddListener) { - const XMLHttpRequestEventTarget = window['XMLHttpRequestEventTarget']; - if (XMLHttpRequestEventTarget) { - const XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget.prototype; - oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER]; - oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]; - } - } - const READY_STATE_CHANGE = 'readystatechange'; - const SCHEDULED = 'scheduled'; - function scheduleTask(task) { - const data = task.data; - const target = data.target; - target[XHR_SCHEDULED] = false; - target[XHR_ERROR_BEFORE_SCHEDULED] = false; - // remove existing event listener - const listener = target[XHR_LISTENER]; - if (!oriAddListener) { - oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER]; - oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]; - } - if (listener) { - oriRemoveListener.call(target, READY_STATE_CHANGE, listener); - } - const newListener = target[XHR_LISTENER] = () => { - if (target.readyState === target.DONE) { - // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with - // readyState=4 multiple times, so we need to check task state here - if (!data.aborted && target[XHR_SCHEDULED] && task.state === SCHEDULED) { - // check whether the xhr has registered onload listener - // if that is the case, the task should invoke after all - // onload listeners finish. - // Also if the request failed without response (status = 0), the load event handler - // will not be triggered, in that case, we should also invoke the placeholder callback - // to close the XMLHttpRequest::send macroTask. - // https://github.com/angular/angular/issues/38795 - const loadTasks = target[Zone.__symbol__('loadfalse')]; - if (target.status !== 0 && loadTasks && loadTasks.length > 0) { - const oriInvoke = task.invoke; - task.invoke = function () { - // need to load the tasks again, because in other - // load listener, they may remove themselves - const loadTasks = target[Zone.__symbol__('loadfalse')]; - for (let i = 0; i < loadTasks.length; i++) { - if (loadTasks[i] === task) { - loadTasks.splice(i, 1); - } - } - if (!data.aborted && task.state === SCHEDULED) { - oriInvoke.call(task); - } - }; - loadTasks.push(task); - } - else { - task.invoke(); - } - } - else if (!data.aborted && target[XHR_SCHEDULED] === false) { - // error occurs when xhr.send() - target[XHR_ERROR_BEFORE_SCHEDULED] = true; - } - } - }; - oriAddListener.call(target, READY_STATE_CHANGE, newListener); - const storedTask = target[XHR_TASK]; - if (!storedTask) { - target[XHR_TASK] = task; - } - sendNative.apply(target, data.args); - target[XHR_SCHEDULED] = true; - return task; - } - function placeholderCallback() { } - function clearTask(task) { - const data = task.data; - // Note - ideally, we would call data.target.removeEventListener here, but it's too late - // to prevent it from firing. So instead, we store info for the event listener. - data.aborted = true; - return abortNative.apply(data.target, data.args); - } - const openNative = patchMethod(XMLHttpRequestPrototype, 'open', () => function (self, args) { - self[XHR_SYNC] = args[2] == false; - self[XHR_URL] = args[1]; - return openNative.apply(self, args); - }); - const XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send'; - const fetchTaskAborting = zoneSymbol('fetchTaskAborting'); - const fetchTaskScheduling = zoneSymbol('fetchTaskScheduling'); - const sendNative = patchMethod(XMLHttpRequestPrototype, 'send', () => function (self, args) { - if (Zone.current[fetchTaskScheduling] === true) { - // a fetch is scheduling, so we are using xhr to polyfill fetch - // and because we already schedule macroTask for fetch, we should - // not schedule a macroTask for xhr again - return sendNative.apply(self, args); - } - if (self[XHR_SYNC]) { - // if the XHR is sync there is no task to schedule, just execute the code. - return sendNative.apply(self, args); - } - else { - const options = { target: self, url: self[XHR_URL], isPeriodic: false, args: args, aborted: false }; - const task = scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask); - if (self && self[XHR_ERROR_BEFORE_SCHEDULED] === true && !options.aborted && - task.state === SCHEDULED) { - // xhr request throw error when send - // we should invoke task instead of leaving a scheduled - // pending macroTask - task.invoke(); - } - } - }); - const abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', () => function (self, args) { - const task = findPendingTask(self); - if (task && typeof task.type == 'string') { - // If the XHR has already completed, do nothing. - // If the XHR has already been aborted, do nothing. - // Fix #569, call abort multiple times before done will cause - // macroTask task count be negative number - if (task.cancelFn == null || (task.data && task.data.aborted)) { - return; - } - task.zone.cancelTask(task); - } - else if (Zone.current[fetchTaskAborting] === true) { - // the abort is called from fetch polyfill, we need to call native abort of XHR. - return abortNative.apply(self, args); - } - // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no - // task - // to cancel. Do nothing. - }); - } -}); -Zone.__load_patch('geolocation', (global) => { - /// GEO_LOCATION - if (global['navigator'] && global['navigator'].geolocation) { - patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']); - } -}); -Zone.__load_patch('PromiseRejectionEvent', (global, Zone) => { - // handle unhandled promise rejection - function findPromiseRejectionHandler(evtName) { - return function (e) { - const eventTasks = findEventTasks(global, evtName); - eventTasks.forEach(eventTask => { - // windows has added unhandledrejection event listener - // trigger the event listener - const PromiseRejectionEvent = global['PromiseRejectionEvent']; - if (PromiseRejectionEvent) { - const evt = new PromiseRejectionEvent(evtName, { promise: e.promise, reason: e.rejection }); - eventTask.invoke(evt); - } - }); - }; - } - if (global['PromiseRejectionEvent']) { - Zone[zoneSymbol('unhandledPromiseRejectionHandler')] = - findPromiseRejectionHandler('unhandledrejection'); - Zone[zoneSymbol('rejectionHandledHandler')] = - findPromiseRejectionHandler('rejectionhandled'); - } -}); - - -/***/ }) - -},[[1,"runtime"]]]); -//# sourceMappingURL=polyfills.js.map \ No newline at end of file diff --git a/1.hello-world/3.read-video-angular/dist/hello-world/polyfills.js.map b/1.hello-world/3.read-video-angular/dist/hello-world/polyfills.js.map deleted file mode 100644 index 2c41f800..00000000 --- a/1.hello-world/3.read-video-angular/dist/hello-world/polyfills.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["./src/polyfills.ts","./node_modules/zone.js/dist/zone-evergreen.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AAEH;;GAEG;AACH,oEAAoE;AAEpE;;;;GAIG;AACH,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;GAEG;AACwB,CAAE,6BAA6B;AAG1D;;GAEG;;;;;;;;;;;;;AChEU;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,UAAU,6CAA6C,eAAe;AACxI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,0BAA0B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,UAAU,IAAI,YAAY,4BAA4B,QAAQ,sBAAsB,WAAW,GAAG,+CAA+C,SAAS,YAAY;AACzM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,qBAAqB;AACrB;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAyB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,EAAE;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4HAA4H,wBAAwB,oCAAoC;AACxL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,sEAAsE;AACtJ;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,oDAAoD;AAC5F;AACA;AACA;AACA;AACA;AACA,2BAA2B,mCAAmC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,uEAAuE,gBAAgB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,qBAAqB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,6BAA6B;AACxE,0CAA0C,kCAAkC;AAC5E,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,wBAAwB;AACxB;AACA;AACA,qDAAqD,aAAa,gBAAgB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,4BAA4B;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,0BAA0B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,wBAAwB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,wBAAwB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,WAAW,GAAG,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,sDAAsD;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,mBAAmB,4BAA4B;AAC/C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,sBAAsB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,0CAA0C;AAC9G;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","file":"polyfills.js","sourcesContent":["/**\n * This file includes polyfills needed by Angular and is loaded before the app.\n * You can add your own extra polyfills to this file.\n *\n * This file is divided into 2 sections:\n * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.\n * 2. Application imports. Files imported after ZoneJS that should be loaded before your main\n * file.\n *\n * The current setup is for so-called \"evergreen\" browsers; the last versions of browsers that\n * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),\n * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.\n *\n * Learn more in https://angular.io/guide/browser-support\n */\n\n/***************************************************************************************************\n * BROWSER POLYFILLS\n */\n\n/**\n * IE11 requires the following for NgClass support on SVG elements\n */\n// import 'classlist.js'; // Run `npm install --save classlist.js`.\n\n/**\n * Web Animations `@angular/platform-browser/animations`\n * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.\n * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).\n */\n// import 'web-animations-js'; // Run `npm install --save web-animations-js`.\n\n/**\n * By default, zone.js will patch all possible macroTask and DomEvents\n * user can disable parts of macroTask/DomEvents patch by setting following flags\n * because those flags need to be set before `zone.js` being loaded, and webpack\n * will put import in the top of bundle, so user need to create a separate file\n * in this directory (for example: zone-flags.ts), and put the following flags\n * into that file, and then add the following code before importing zone.js.\n * import './zone-flags';\n *\n * The flags allowed in zone-flags.ts are listed here.\n *\n * The following flags will work for all browsers.\n *\n * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame\n * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick\n * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames\n *\n * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js\n * with the following flag, it will bypass `zone.js` patch for IE/Edge\n *\n * (window as any).__Zone_enable_cross_context_check = true;\n *\n */\n\n/***************************************************************************************************\n * Zone JS is required by default for Angular itself.\n */\nimport 'zone.js/dist/zone'; // Included with Angular CLI.\n\n\n/***************************************************************************************************\n * APPLICATION IMPORTS\n */\n","'use strict';\n/**\n * @license Angular v14.0.0-next.5\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n((function (global) {\n const performance = global['performance'];\n function mark(name) {\n performance && performance['mark'] && performance['mark'](name);\n }\n function performanceMeasure(name, label) {\n performance && performance['measure'] && performance['measure'](name, label);\n }\n mark('Zone');\n // Initialize before it's accessed below.\n // __Zone_symbol_prefix global can be used to override the default zone\n // symbol prefix with a custom one if needed.\n const symbolPrefix = global['__Zone_symbol_prefix'] || '__zone_symbol__';\n function __symbol__(name) {\n return symbolPrefix + name;\n }\n const checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true;\n if (global['Zone']) {\n // if global['Zone'] already exists (maybe zone.js was already loaded or\n // some other lib also registered a global object named Zone), we may need\n // to throw an error, but sometimes user may not want this error.\n // For example,\n // we have two web pages, page1 includes zone.js, page2 doesn't.\n // and the 1st time user load page1 and page2, everything work fine,\n // but when user load page2 again, error occurs because global['Zone'] already exists.\n // so we add a flag to let user choose whether to throw this error or not.\n // By default, if existing Zone is from zone.js, we will not throw the error.\n if (checkDuplicate || typeof global['Zone'].__symbol__ !== 'function') {\n throw new Error('Zone already loaded.');\n }\n else {\n return global['Zone'];\n }\n }\n class Zone {\n constructor(parent, zoneSpec) {\n this._parent = parent;\n this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '';\n this._properties = zoneSpec && zoneSpec.properties || {};\n this._zoneDelegate =\n new _ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);\n }\n static assertZonePatched() {\n if (global['Promise'] !== patches['ZoneAwarePromise']) {\n throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' +\n 'has been overwritten.\\n' +\n 'Most likely cause is that a Promise polyfill has been loaded ' +\n 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' +\n 'If you must load one, do so before loading zone.js.)');\n }\n }\n static get root() {\n let zone = Zone.current;\n while (zone.parent) {\n zone = zone.parent;\n }\n return zone;\n }\n static get current() {\n return _currentZoneFrame.zone;\n }\n static get currentTask() {\n return _currentTask;\n }\n // tslint:disable-next-line:require-internal-with-underscore\n static __load_patch(name, fn, ignoreDuplicate = false) {\n if (patches.hasOwnProperty(name)) {\n // `checkDuplicate` option is defined from global variable\n // so it works for all modules.\n // `ignoreDuplicate` can work for the specified module\n if (!ignoreDuplicate && checkDuplicate) {\n throw Error('Already loaded patch: ' + name);\n }\n }\n else if (!global['__Zone_disable_' + name]) {\n const perfName = 'Zone:' + name;\n mark(perfName);\n patches[name] = fn(global, Zone, _api);\n performanceMeasure(perfName, perfName);\n }\n }\n get parent() {\n return this._parent;\n }\n get name() {\n return this._name;\n }\n get(key) {\n const zone = this.getZoneWith(key);\n if (zone)\n return zone._properties[key];\n }\n getZoneWith(key) {\n let current = this;\n while (current) {\n if (current._properties.hasOwnProperty(key)) {\n return current;\n }\n current = current._parent;\n }\n return null;\n }\n fork(zoneSpec) {\n if (!zoneSpec)\n throw new Error('ZoneSpec required!');\n return this._zoneDelegate.fork(this, zoneSpec);\n }\n wrap(callback, source) {\n if (typeof callback !== 'function') {\n throw new Error('Expecting function got: ' + callback);\n }\n const _callback = this._zoneDelegate.intercept(this, callback, source);\n const zone = this;\n return function () {\n return zone.runGuarded(_callback, this, arguments, source);\n };\n }\n run(callback, applyThis, applyArgs, source) {\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n }\n runGuarded(callback, applyThis = null, applyArgs, source) {\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n }\n runTask(task, applyThis, applyArgs) {\n if (task.zone != this) {\n throw new Error('A task can only be run in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n }\n // https://github.com/angular/zone.js/issues/778, sometimes eventTask\n // will run in notScheduled(canceled) state, we should not try to\n // run such kind of task but just return\n if (task.state === notScheduled && (task.type === eventTask || task.type === macroTask)) {\n return;\n }\n const reEntryGuard = task.state != running;\n reEntryGuard && task._transitionTo(running, scheduled);\n task.runCount++;\n const previousTask = _currentTask;\n _currentTask = task;\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n if (task.type == macroTask && task.data && !task.data.isPeriodic) {\n task.cancelFn = undefined;\n }\n try {\n return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n // if the task's state is notScheduled or unknown, then it has already been cancelled\n // we should not reset the state to scheduled\n if (task.state !== notScheduled && task.state !== unknown) {\n if (task.type == eventTask || (task.data && task.data.isPeriodic)) {\n reEntryGuard && task._transitionTo(scheduled, running);\n }\n else {\n task.runCount = 0;\n this._updateTaskCount(task, -1);\n reEntryGuard &&\n task._transitionTo(notScheduled, running, notScheduled);\n }\n }\n _currentZoneFrame = _currentZoneFrame.parent;\n _currentTask = previousTask;\n }\n }\n scheduleTask(task) {\n if (task.zone && task.zone !== this) {\n // check if the task was rescheduled, the newZone\n // should not be the children of the original zone\n let newZone = this;\n while (newZone) {\n if (newZone === task.zone) {\n throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${task.zone.name}`);\n }\n newZone = newZone.parent;\n }\n }\n task._transitionTo(scheduling, notScheduled);\n const zoneDelegates = [];\n task._zoneDelegates = zoneDelegates;\n task._zone = this;\n try {\n task = this._zoneDelegate.scheduleTask(this, task);\n }\n catch (err) {\n // should set task's state to unknown when scheduleTask throw error\n // because the err may from reschedule, so the fromState maybe notScheduled\n task._transitionTo(unknown, scheduling, notScheduled);\n // TODO: @JiaLiPassion, should we check the result from handleError?\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n if (task._zoneDelegates === zoneDelegates) {\n // we have to check because internally the delegate can reschedule the task.\n this._updateTaskCount(task, 1);\n }\n if (task.state == scheduling) {\n task._transitionTo(scheduled, scheduling);\n }\n return task;\n }\n scheduleMicroTask(source, callback, data, customSchedule) {\n return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, undefined));\n }\n scheduleMacroTask(source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel));\n }\n scheduleEventTask(source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel));\n }\n cancelTask(task) {\n if (task.zone != this)\n throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n task._transitionTo(canceling, scheduled, running);\n try {\n this._zoneDelegate.cancelTask(this, task);\n }\n catch (err) {\n // if error occurs when cancelTask, transit the state to unknown\n task._transitionTo(unknown, canceling);\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n this._updateTaskCount(task, -1);\n task._transitionTo(notScheduled, canceling);\n task.runCount = 0;\n return task;\n }\n _updateTaskCount(task, count) {\n const zoneDelegates = task._zoneDelegates;\n if (count == -1) {\n task._zoneDelegates = null;\n }\n for (let i = 0; i < zoneDelegates.length; i++) {\n zoneDelegates[i]._updateTaskCount(task.type, count);\n }\n }\n }\n // tslint:disable-next-line:require-internal-with-underscore\n Zone.__symbol__ = __symbol__;\n const DELEGATE_ZS = {\n name: '',\n onHasTask: (delegate, _, target, hasTaskState) => delegate.hasTask(target, hasTaskState),\n onScheduleTask: (delegate, _, target, task) => delegate.scheduleTask(target, task),\n onInvokeTask: (delegate, _, target, task, applyThis, applyArgs) => delegate.invokeTask(target, task, applyThis, applyArgs),\n onCancelTask: (delegate, _, target, task) => delegate.cancelTask(target, task)\n };\n class _ZoneDelegate {\n constructor(zone, parentDelegate, zoneSpec) {\n this._taskCounts = { 'microTask': 0, 'macroTask': 0, 'eventTask': 0 };\n this.zone = zone;\n this._parentDelegate = parentDelegate;\n this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS);\n this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);\n this._forkCurrZone =\n zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate._forkCurrZone);\n this._interceptZS =\n zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);\n this._interceptDlgt =\n zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt);\n this._interceptCurrZone =\n zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate._interceptCurrZone);\n this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);\n this._invokeDlgt =\n zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt);\n this._invokeCurrZone =\n zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate._invokeCurrZone);\n this._handleErrorZS =\n zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS);\n this._handleErrorDlgt =\n zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt);\n this._handleErrorCurrZone =\n zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate._handleErrorCurrZone);\n this._scheduleTaskZS =\n zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS);\n this._scheduleTaskDlgt = zoneSpec &&\n (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt);\n this._scheduleTaskCurrZone =\n zoneSpec && (zoneSpec.onScheduleTask ? this.zone : parentDelegate._scheduleTaskCurrZone);\n this._invokeTaskZS =\n zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS);\n this._invokeTaskDlgt =\n zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt);\n this._invokeTaskCurrZone =\n zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate._invokeTaskCurrZone);\n this._cancelTaskZS =\n zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS);\n this._cancelTaskDlgt =\n zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt);\n this._cancelTaskCurrZone =\n zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate._cancelTaskCurrZone);\n this._hasTaskZS = null;\n this._hasTaskDlgt = null;\n this._hasTaskDlgtOwner = null;\n this._hasTaskCurrZone = null;\n const zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask;\n const parentHasTask = parentDelegate && parentDelegate._hasTaskZS;\n if (zoneSpecHasTask || parentHasTask) {\n // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such\n // a case all task related interceptors must go through this ZD. We can't short circuit it.\n this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS;\n this._hasTaskDlgt = parentDelegate;\n this._hasTaskDlgtOwner = this;\n this._hasTaskCurrZone = zone;\n if (!zoneSpec.onScheduleTask) {\n this._scheduleTaskZS = DELEGATE_ZS;\n this._scheduleTaskDlgt = parentDelegate;\n this._scheduleTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onInvokeTask) {\n this._invokeTaskZS = DELEGATE_ZS;\n this._invokeTaskDlgt = parentDelegate;\n this._invokeTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onCancelTask) {\n this._cancelTaskZS = DELEGATE_ZS;\n this._cancelTaskDlgt = parentDelegate;\n this._cancelTaskCurrZone = this.zone;\n }\n }\n }\n fork(targetZone, zoneSpec) {\n return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) :\n new Zone(targetZone, zoneSpec);\n }\n intercept(targetZone, callback, source) {\n return this._interceptZS ?\n this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) :\n callback;\n }\n invoke(targetZone, callback, applyThis, applyArgs, source) {\n return this._invokeZS ? this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) :\n callback.apply(applyThis, applyArgs);\n }\n handleError(targetZone, error) {\n return this._handleErrorZS ?\n this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) :\n true;\n }\n scheduleTask(targetZone, task) {\n let returnTask = task;\n if (this._scheduleTaskZS) {\n if (this._hasTaskZS) {\n returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);\n }\n // clang-format off\n returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task);\n // clang-format on\n if (!returnTask)\n returnTask = task;\n }\n else {\n if (task.scheduleFn) {\n task.scheduleFn(task);\n }\n else if (task.type == microTask) {\n scheduleMicroTask(task);\n }\n else {\n throw new Error('Task is missing scheduleFn.');\n }\n }\n return returnTask;\n }\n invokeTask(targetZone, task, applyThis, applyArgs) {\n return this._invokeTaskZS ? this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) :\n task.callback.apply(applyThis, applyArgs);\n }\n cancelTask(targetZone, task) {\n let value;\n if (this._cancelTaskZS) {\n value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task);\n }\n else {\n if (!task.cancelFn) {\n throw Error('Task is not cancelable');\n }\n value = task.cancelFn(task);\n }\n return value;\n }\n hasTask(targetZone, isEmpty) {\n // hasTask should not throw error so other ZoneDelegate\n // can still trigger hasTask callback\n try {\n this._hasTaskZS &&\n this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);\n }\n catch (err) {\n this.handleError(targetZone, err);\n }\n }\n // tslint:disable-next-line:require-internal-with-underscore\n _updateTaskCount(type, count) {\n const counts = this._taskCounts;\n const prev = counts[type];\n const next = counts[type] = prev + count;\n if (next < 0) {\n throw new Error('More tasks executed then were scheduled.');\n }\n if (prev == 0 || next == 0) {\n const isEmpty = {\n microTask: counts['microTask'] > 0,\n macroTask: counts['macroTask'] > 0,\n eventTask: counts['eventTask'] > 0,\n change: type\n };\n this.hasTask(this.zone, isEmpty);\n }\n }\n }\n class ZoneTask {\n constructor(type, source, callback, options, scheduleFn, cancelFn) {\n // tslint:disable-next-line:require-internal-with-underscore\n this._zone = null;\n this.runCount = 0;\n // tslint:disable-next-line:require-internal-with-underscore\n this._zoneDelegates = null;\n // tslint:disable-next-line:require-internal-with-underscore\n this._state = 'notScheduled';\n this.type = type;\n this.source = source;\n this.data = options;\n this.scheduleFn = scheduleFn;\n this.cancelFn = cancelFn;\n if (!callback) {\n throw new Error('callback is not defined');\n }\n this.callback = callback;\n const self = this;\n // TODO: @JiaLiPassion options should have interface\n if (type === eventTask && options && options.useG) {\n this.invoke = ZoneTask.invokeTask;\n }\n else {\n this.invoke = function () {\n return ZoneTask.invokeTask.call(global, self, this, arguments);\n };\n }\n }\n static invokeTask(task, target, args) {\n if (!task) {\n task = this;\n }\n _numberOfNestedTaskFrames++;\n try {\n task.runCount++;\n return task.zone.runTask(task, target, args);\n }\n finally {\n if (_numberOfNestedTaskFrames == 1) {\n drainMicroTaskQueue();\n }\n _numberOfNestedTaskFrames--;\n }\n }\n get zone() {\n return this._zone;\n }\n get state() {\n return this._state;\n }\n cancelScheduleRequest() {\n this._transitionTo(notScheduled, scheduling);\n }\n // tslint:disable-next-line:require-internal-with-underscore\n _transitionTo(toState, fromState1, fromState2) {\n if (this._state === fromState1 || this._state === fromState2) {\n this._state = toState;\n if (toState == notScheduled) {\n this._zoneDelegates = null;\n }\n }\n else {\n throw new Error(`${this.type} '${this.source}': can not transition to '${toState}', expecting state '${fromState1}'${fromState2 ? ' or \\'' + fromState2 + '\\'' : ''}, was '${this._state}'.`);\n }\n }\n toString() {\n if (this.data && typeof this.data.handleId !== 'undefined') {\n return this.data.handleId.toString();\n }\n else {\n return Object.prototype.toString.call(this);\n }\n }\n // add toJSON method to prevent cyclic error when\n // call JSON.stringify(zoneTask)\n toJSON() {\n return {\n type: this.type,\n state: this.state,\n source: this.source,\n zone: this.zone.name,\n runCount: this.runCount\n };\n }\n }\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// MICROTASK QUEUE\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n const symbolSetTimeout = __symbol__('setTimeout');\n const symbolPromise = __symbol__('Promise');\n const symbolThen = __symbol__('then');\n let _microTaskQueue = [];\n let _isDrainingMicrotaskQueue = false;\n let nativeMicroTaskQueuePromise;\n function nativeScheduleMicroTask(func) {\n if (!nativeMicroTaskQueuePromise) {\n if (global[symbolPromise]) {\n nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);\n }\n }\n if (nativeMicroTaskQueuePromise) {\n let nativeThen = nativeMicroTaskQueuePromise[symbolThen];\n if (!nativeThen) {\n // native Promise is not patchable, we need to use `then` directly\n // issue 1078\n nativeThen = nativeMicroTaskQueuePromise['then'];\n }\n nativeThen.call(nativeMicroTaskQueuePromise, func);\n }\n else {\n global[symbolSetTimeout](func, 0);\n }\n }\n function scheduleMicroTask(task) {\n // if we are not running in any task, and there has not been anything scheduled\n // we must bootstrap the initial task creation by manually scheduling the drain\n if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) {\n // We are not running in Task, so we need to kickstart the microtask queue.\n nativeScheduleMicroTask(drainMicroTaskQueue);\n }\n task && _microTaskQueue.push(task);\n }\n function drainMicroTaskQueue() {\n if (!_isDrainingMicrotaskQueue) {\n _isDrainingMicrotaskQueue = true;\n while (_microTaskQueue.length) {\n const queue = _microTaskQueue;\n _microTaskQueue = [];\n for (let i = 0; i < queue.length; i++) {\n const task = queue[i];\n try {\n task.zone.runTask(task, null, null);\n }\n catch (error) {\n _api.onUnhandledError(error);\n }\n }\n }\n _api.microtaskDrainDone();\n _isDrainingMicrotaskQueue = false;\n }\n }\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// BOOTSTRAP\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n const NO_ZONE = { name: 'NO ZONE' };\n const notScheduled = 'notScheduled', scheduling = 'scheduling', scheduled = 'scheduled', running = 'running', canceling = 'canceling', unknown = 'unknown';\n const microTask = 'microTask', macroTask = 'macroTask', eventTask = 'eventTask';\n const patches = {};\n const _api = {\n symbol: __symbol__,\n currentZoneFrame: () => _currentZoneFrame,\n onUnhandledError: noop,\n microtaskDrainDone: noop,\n scheduleMicroTask: scheduleMicroTask,\n showUncaughtError: () => !Zone[__symbol__('ignoreConsoleErrorUncaughtError')],\n patchEventTarget: () => [],\n patchOnProperties: noop,\n patchMethod: () => noop,\n bindArguments: () => [],\n patchThen: () => noop,\n patchMacroTask: () => noop,\n patchEventPrototype: () => noop,\n isIEOrEdge: () => false,\n getGlobalObjects: () => undefined,\n ObjectDefineProperty: () => noop,\n ObjectGetOwnPropertyDescriptor: () => undefined,\n ObjectCreate: () => undefined,\n ArraySlice: () => [],\n patchClass: () => noop,\n wrapWithCurrentZone: () => noop,\n filterProperties: () => [],\n attachOriginToPatched: () => noop,\n _redefineProperty: () => noop,\n patchCallbacks: () => noop,\n nativeScheduleMicroTask: nativeScheduleMicroTask\n };\n let _currentZoneFrame = { parent: null, zone: new Zone(null, null) };\n let _currentTask = null;\n let _numberOfNestedTaskFrames = 0;\n function noop() { }\n performanceMeasure('Zone', 'Zone');\n return global['Zone'] = Zone;\n}))(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Suppress closure compiler errors about unknown 'Zone' variable\n * @fileoverview\n * @suppress {undefinedVars,globalThis,missingRequire}\n */\n/// \n// issue #989, to reduce bundle size, use short name\n/** Object.getOwnPropertyDescriptor */\nconst ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n/** Object.defineProperty */\nconst ObjectDefineProperty = Object.defineProperty;\n/** Object.getPrototypeOf */\nconst ObjectGetPrototypeOf = Object.getPrototypeOf;\n/** Object.create */\nconst ObjectCreate = Object.create;\n/** Array.prototype.slice */\nconst ArraySlice = Array.prototype.slice;\n/** addEventListener string const */\nconst ADD_EVENT_LISTENER_STR = 'addEventListener';\n/** removeEventListener string const */\nconst REMOVE_EVENT_LISTENER_STR = 'removeEventListener';\n/** zoneSymbol addEventListener */\nconst ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR);\n/** zoneSymbol removeEventListener */\nconst ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR);\n/** true string const */\nconst TRUE_STR = 'true';\n/** false string const */\nconst FALSE_STR = 'false';\n/** Zone symbol prefix string const. */\nconst ZONE_SYMBOL_PREFIX = Zone.__symbol__('');\nfunction wrapWithCurrentZone(callback, source) {\n return Zone.current.wrap(callback, source);\n}\nfunction scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) {\n return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel);\n}\nconst zoneSymbol = Zone.__symbol__;\nconst isWindowExists = typeof window !== 'undefined';\nconst internalWindow = isWindowExists ? window : undefined;\nconst _global = isWindowExists && internalWindow || typeof self === 'object' && self || global;\nconst REMOVE_ATTRIBUTE = 'removeAttribute';\nfunction bindArguments(args, source) {\n for (let i = args.length - 1; i >= 0; i--) {\n if (typeof args[i] === 'function') {\n args[i] = wrapWithCurrentZone(args[i], source + '_' + i);\n }\n }\n return args;\n}\nfunction patchPrototype(prototype, fnNames) {\n const source = prototype.constructor['name'];\n for (let i = 0; i < fnNames.length; i++) {\n const name = fnNames[i];\n const delegate = prototype[name];\n if (delegate) {\n const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name);\n if (!isPropertyWritable(prototypeDesc)) {\n continue;\n }\n prototype[name] = ((delegate) => {\n const patched = function () {\n return delegate.apply(this, bindArguments(arguments, source + '.' + name));\n };\n attachOriginToPatched(patched, delegate);\n return patched;\n })(delegate);\n }\n }\n}\nfunction isPropertyWritable(propertyDesc) {\n if (!propertyDesc) {\n return true;\n }\n if (propertyDesc.writable === false) {\n return false;\n }\n return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined');\n}\nconst isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope);\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nconst isNode = (!('nw' in _global) && typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]');\nconst isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']);\n// we are in electron of nw, so we are both browser and nodejs\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nconst isMix = typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]' && !isWebWorker &&\n !!(isWindowExists && internalWindow['HTMLElement']);\nconst zoneSymbolEventNames$1 = {};\nconst wrapFn = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n let eventNameSymbol = zoneSymbolEventNames$1[event.type];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames$1[event.type] = zoneSymbol('ON_PROPERTY' + event.type);\n }\n const target = this || event.target || _global;\n const listener = target[eventNameSymbol];\n let result;\n if (isBrowser && target === internalWindow && event.type === 'error') {\n // window.onerror have different signiture\n // https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror\n // and onerror callback will prevent default when callback return true\n const errorEvent = event;\n result = listener &&\n listener.call(this, errorEvent.message, errorEvent.filename, errorEvent.lineno, errorEvent.colno, errorEvent.error);\n if (result === true) {\n event.preventDefault();\n }\n }\n else {\n result = listener && listener.apply(this, arguments);\n if (result != undefined && !result) {\n event.preventDefault();\n }\n }\n return result;\n};\nfunction patchProperty(obj, prop, prototype) {\n let desc = ObjectGetOwnPropertyDescriptor(obj, prop);\n if (!desc && prototype) {\n // when patch window object, use prototype to check prop exist or not\n const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop);\n if (prototypeDesc) {\n desc = { enumerable: true, configurable: true };\n }\n }\n // if the descriptor not exists or is not configurable\n // just return\n if (!desc || !desc.configurable) {\n return;\n }\n const onPropPatchedSymbol = zoneSymbol('on' + prop + 'patched');\n if (obj.hasOwnProperty(onPropPatchedSymbol) && obj[onPropPatchedSymbol]) {\n return;\n }\n // A property descriptor cannot have getter/setter and be writable\n // deleting the writable and value properties avoids this error:\n //\n // TypeError: property descriptors must not specify a value or be writable when a\n // getter or setter has been specified\n delete desc.writable;\n delete desc.value;\n const originalDescGet = desc.get;\n const originalDescSet = desc.set;\n // substr(2) cuz 'onclick' -> 'click', etc\n const eventName = prop.substr(2);\n let eventNameSymbol = zoneSymbolEventNames$1[eventName];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames$1[eventName] = zoneSymbol('ON_PROPERTY' + eventName);\n }\n desc.set = function (newValue) {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n let target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return;\n }\n const previousValue = target[eventNameSymbol];\n if (typeof previousValue === 'function') {\n target.removeEventListener(eventName, wrapFn);\n }\n // issue #978, when onload handler was added before loading zone.js\n // we should remove it with originalDescSet\n originalDescSet && originalDescSet.call(target, null);\n target[eventNameSymbol] = newValue;\n if (typeof newValue === 'function') {\n target.addEventListener(eventName, wrapFn, false);\n }\n };\n // The getter would return undefined for unassigned properties but the default value of an\n // unassigned property is null\n desc.get = function () {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n let target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return null;\n }\n const listener = target[eventNameSymbol];\n if (listener) {\n return listener;\n }\n else if (originalDescGet) {\n // result will be null when use inline event attribute,\n // such as \n // because the onclick function is internal raw uncompiled handler\n // the onclick will be evaluated when first time event was triggered or\n // the property is accessed, https://github.com/angular/zone.js/issues/525\n // so we should use original native get to retrieve the handler\n let value = originalDescGet.call(this);\n if (value) {\n desc.set.call(this, value);\n if (typeof target[REMOVE_ATTRIBUTE] === 'function') {\n target.removeAttribute(prop);\n }\n return value;\n }\n }\n return null;\n };\n ObjectDefineProperty(obj, prop, desc);\n obj[onPropPatchedSymbol] = true;\n}\nfunction patchOnProperties(obj, properties, prototype) {\n if (properties) {\n for (let i = 0; i < properties.length; i++) {\n patchProperty(obj, 'on' + properties[i], prototype);\n }\n }\n else {\n const onProperties = [];\n for (const prop in obj) {\n if (prop.substr(0, 2) == 'on') {\n onProperties.push(prop);\n }\n }\n for (let j = 0; j < onProperties.length; j++) {\n patchProperty(obj, onProperties[j], prototype);\n }\n }\n}\nconst originalInstanceKey = zoneSymbol('originalInstance');\n// wrap some native API on `window`\nfunction patchClass(className) {\n const OriginalClass = _global[className];\n if (!OriginalClass)\n return;\n // keep original class in global\n _global[zoneSymbol(className)] = OriginalClass;\n _global[className] = function () {\n const a = bindArguments(arguments, className);\n switch (a.length) {\n case 0:\n this[originalInstanceKey] = new OriginalClass();\n break;\n case 1:\n this[originalInstanceKey] = new OriginalClass(a[0]);\n break;\n case 2:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1]);\n break;\n case 3:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);\n break;\n case 4:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);\n break;\n default:\n throw new Error('Arg list too long.');\n }\n };\n // attach original delegate to patched function\n attachOriginToPatched(_global[className], OriginalClass);\n const instance = new OriginalClass(function () { });\n let prop;\n for (prop in instance) {\n // https://bugs.webkit.org/show_bug.cgi?id=44721\n if (className === 'XMLHttpRequest' && prop === 'responseBlob')\n continue;\n (function (prop) {\n if (typeof instance[prop] === 'function') {\n _global[className].prototype[prop] = function () {\n return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);\n };\n }\n else {\n ObjectDefineProperty(_global[className].prototype, prop, {\n set: function (fn) {\n if (typeof fn === 'function') {\n this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop);\n // keep callback in wrapped function so we can\n // use it in Function.prototype.toString to return\n // the native one.\n attachOriginToPatched(this[originalInstanceKey][prop], fn);\n }\n else {\n this[originalInstanceKey][prop] = fn;\n }\n },\n get: function () {\n return this[originalInstanceKey][prop];\n }\n });\n }\n }(prop));\n }\n for (prop in OriginalClass) {\n if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {\n _global[className][prop] = OriginalClass[prop];\n }\n }\n}\nfunction patchMethod(target, name, patchFn) {\n let proto = target;\n while (proto && !proto.hasOwnProperty(name)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && target[name]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = target;\n }\n const delegateName = zoneSymbol(name);\n let delegate = null;\n if (proto && (!(delegate = proto[delegateName]) || !proto.hasOwnProperty(delegateName))) {\n delegate = proto[delegateName] = proto[name];\n // check whether proto[name] is writable\n // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob\n const desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);\n if (isPropertyWritable(desc)) {\n const patchDelegate = patchFn(delegate, delegateName, name);\n proto[name] = function () {\n return patchDelegate(this, arguments);\n };\n attachOriginToPatched(proto[name], delegate);\n }\n }\n return delegate;\n}\n// TODO: @JiaLiPassion, support cancel task later if necessary\nfunction patchMacroTask(obj, funcName, metaCreator) {\n let setNative = null;\n function scheduleTask(task) {\n const data = task.data;\n data.args[data.cbIdx] = function () {\n task.invoke.apply(this, arguments);\n };\n setNative.apply(data.target, data.args);\n return task;\n }\n setNative = patchMethod(obj, funcName, (delegate) => function (self, args) {\n const meta = metaCreator(self, args);\n if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') {\n return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask);\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(self, args);\n }\n });\n}\nfunction attachOriginToPatched(patched, original) {\n patched[zoneSymbol('OriginalDelegate')] = original;\n}\nlet isDetectedIEOrEdge = false;\nlet ieOrEdge = false;\nfunction isIE() {\n try {\n const ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1) {\n return true;\n }\n }\n catch (error) {\n }\n return false;\n}\nfunction isIEOrEdge() {\n if (isDetectedIEOrEdge) {\n return ieOrEdge;\n }\n isDetectedIEOrEdge = true;\n try {\n const ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) {\n ieOrEdge = true;\n }\n }\n catch (error) {\n }\n return ieOrEdge;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nZone.__load_patch('ZoneAwarePromise', (global, Zone, api) => {\n const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n const ObjectDefineProperty = Object.defineProperty;\n function readableObjectToString(obj) {\n if (obj && obj.toString === Object.prototype.toString) {\n const className = obj.constructor && obj.constructor.name;\n return (className ? className : '') + ': ' + JSON.stringify(obj);\n }\n return obj ? obj.toString() : Object.prototype.toString.call(obj);\n }\n const __symbol__ = api.symbol;\n const _uncaughtPromiseErrors = [];\n const isDisableWrappingUncaughtPromiseRejection = global[__symbol__('DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION')] === true;\n const symbolPromise = __symbol__('Promise');\n const symbolThen = __symbol__('then');\n const creationTrace = '__creationTrace__';\n api.onUnhandledError = (e) => {\n if (api.showUncaughtError()) {\n const rejection = e && e.rejection;\n if (rejection) {\n console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined);\n }\n else {\n console.error(e);\n }\n }\n };\n api.microtaskDrainDone = () => {\n while (_uncaughtPromiseErrors.length) {\n const uncaughtPromiseError = _uncaughtPromiseErrors.shift();\n try {\n uncaughtPromiseError.zone.runGuarded(() => {\n if (uncaughtPromiseError.throwOriginal) {\n throw uncaughtPromiseError.rejection;\n }\n throw uncaughtPromiseError;\n });\n }\n catch (error) {\n handleUnhandledRejection(error);\n }\n }\n };\n const UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler');\n function handleUnhandledRejection(e) {\n api.onUnhandledError(e);\n try {\n const handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];\n if (typeof handler === 'function') {\n handler.call(this, e);\n }\n }\n catch (err) {\n }\n }\n function isThenable(value) {\n return value && value.then;\n }\n function forwardResolution(value) {\n return value;\n }\n function forwardRejection(rejection) {\n return ZoneAwarePromise.reject(rejection);\n }\n const symbolState = __symbol__('state');\n const symbolValue = __symbol__('value');\n const symbolFinally = __symbol__('finally');\n const symbolParentPromiseValue = __symbol__('parentPromiseValue');\n const symbolParentPromiseState = __symbol__('parentPromiseState');\n const source = 'Promise.then';\n const UNRESOLVED = null;\n const RESOLVED = true;\n const REJECTED = false;\n const REJECTED_NO_CATCH = 0;\n function makeResolver(promise, state) {\n return (v) => {\n try {\n resolvePromise(promise, state, v);\n }\n catch (err) {\n resolvePromise(promise, false, err);\n }\n // Do not return value or you will break the Promise spec.\n };\n }\n const once = function () {\n let wasCalled = false;\n return function wrapper(wrappedFunction) {\n return function () {\n if (wasCalled) {\n return;\n }\n wasCalled = true;\n wrappedFunction.apply(null, arguments);\n };\n };\n };\n const TYPE_ERROR = 'Promise resolved with itself';\n const CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace');\n // Promise Resolution\n function resolvePromise(promise, state, value) {\n const onceWrapper = once();\n if (promise === value) {\n throw new TypeError(TYPE_ERROR);\n }\n if (promise[symbolState] === UNRESOLVED) {\n // should only get value.then once based on promise spec.\n let then = null;\n try {\n if (typeof value === 'object' || typeof value === 'function') {\n then = value && value.then;\n }\n }\n catch (err) {\n onceWrapper(() => {\n resolvePromise(promise, false, err);\n })();\n return promise;\n }\n // if (value instanceof ZoneAwarePromise) {\n if (state !== REJECTED && value instanceof ZoneAwarePromise &&\n value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) &&\n value[symbolState] !== UNRESOLVED) {\n clearRejectedNoCatch(value);\n resolvePromise(promise, value[symbolState], value[symbolValue]);\n }\n else if (state !== REJECTED && typeof then === 'function') {\n try {\n then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false)));\n }\n catch (err) {\n onceWrapper(() => {\n resolvePromise(promise, false, err);\n })();\n }\n }\n else {\n promise[symbolState] = state;\n const queue = promise[symbolValue];\n promise[symbolValue] = value;\n if (promise[symbolFinally] === symbolFinally) {\n // the promise is generated by Promise.prototype.finally\n if (state === RESOLVED) {\n // the state is resolved, should ignore the value\n // and use parent promise value\n promise[symbolState] = promise[symbolParentPromiseState];\n promise[symbolValue] = promise[symbolParentPromiseValue];\n }\n }\n // record task information in value when error occurs, so we can\n // do some additional work such as render longStackTrace\n if (state === REJECTED && value instanceof Error) {\n // check if longStackTraceZone is here\n const trace = Zone.currentTask && Zone.currentTask.data &&\n Zone.currentTask.data[creationTrace];\n if (trace) {\n // only keep the long stack trace into error when in longStackTraceZone\n ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { configurable: true, enumerable: false, writable: true, value: trace });\n }\n }\n for (let i = 0; i < queue.length;) {\n scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);\n }\n if (queue.length == 0 && state == REJECTED) {\n promise[symbolState] = REJECTED_NO_CATCH;\n let uncaughtPromiseError = value;\n try {\n // Here we throws a new Error to print more readable error log\n // and if the value is not an error, zone.js builds an `Error`\n // Object here to attach the stack information.\n throw new Error('Uncaught (in promise): ' + readableObjectToString(value) +\n (value && value.stack ? '\\n' + value.stack : ''));\n }\n catch (err) {\n uncaughtPromiseError = err;\n }\n if (isDisableWrappingUncaughtPromiseRejection) {\n // If disable wrapping uncaught promise reject\n // use the value instead of wrapping it.\n uncaughtPromiseError.throwOriginal = true;\n }\n uncaughtPromiseError.rejection = value;\n uncaughtPromiseError.promise = promise;\n uncaughtPromiseError.zone = Zone.current;\n uncaughtPromiseError.task = Zone.currentTask;\n _uncaughtPromiseErrors.push(uncaughtPromiseError);\n api.scheduleMicroTask(); // to make sure that it is running\n }\n }\n }\n // Resolving an already resolved promise is a noop.\n return promise;\n }\n const REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler');\n function clearRejectedNoCatch(promise) {\n if (promise[symbolState] === REJECTED_NO_CATCH) {\n // if the promise is rejected no catch status\n // and queue.length > 0, means there is a error handler\n // here to handle the rejected promise, we should trigger\n // windows.rejectionhandled eventHandler or nodejs rejectionHandled\n // eventHandler\n try {\n const handler = Zone[REJECTION_HANDLED_HANDLER];\n if (handler && typeof handler === 'function') {\n handler.call(this, { rejection: promise[symbolValue], promise: promise });\n }\n }\n catch (err) {\n }\n promise[symbolState] = REJECTED;\n for (let i = 0; i < _uncaughtPromiseErrors.length; i++) {\n if (promise === _uncaughtPromiseErrors[i].promise) {\n _uncaughtPromiseErrors.splice(i, 1);\n }\n }\n }\n }\n function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) {\n clearRejectedNoCatch(promise);\n const promiseState = promise[symbolState];\n const delegate = promiseState ?\n (typeof onFulfilled === 'function') ? onFulfilled : forwardResolution :\n (typeof onRejected === 'function') ? onRejected :\n forwardRejection;\n zone.scheduleMicroTask(source, () => {\n try {\n const parentPromiseValue = promise[symbolValue];\n const isFinallyPromise = !!chainPromise && symbolFinally === chainPromise[symbolFinally];\n if (isFinallyPromise) {\n // if the promise is generated from finally call, keep parent promise's state and value\n chainPromise[symbolParentPromiseValue] = parentPromiseValue;\n chainPromise[symbolParentPromiseState] = promiseState;\n }\n // should not pass value to finally callback\n const value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ?\n [] :\n [parentPromiseValue]);\n resolvePromise(chainPromise, true, value);\n }\n catch (error) {\n // if error occurs, should always return this error\n resolvePromise(chainPromise, false, error);\n }\n }, chainPromise);\n }\n const ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }';\n const noop = function () { };\n const AggregateError = global.AggregateError;\n class ZoneAwarePromise {\n static toString() {\n return ZONE_AWARE_PROMISE_TO_STRING;\n }\n static resolve(value) {\n return resolvePromise(new this(null), RESOLVED, value);\n }\n static reject(error) {\n return resolvePromise(new this(null), REJECTED, error);\n }\n static any(values) {\n if (!values || typeof values[Symbol.iterator] !== 'function') {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n const promises = [];\n let count = 0;\n try {\n for (let v of values) {\n count++;\n promises.push(ZoneAwarePromise.resolve(v));\n }\n }\n catch (err) {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n if (count === 0) {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n let finished = false;\n const errors = [];\n return new ZoneAwarePromise((resolve, reject) => {\n for (let i = 0; i < promises.length; i++) {\n promises[i].then(v => {\n if (finished) {\n return;\n }\n finished = true;\n resolve(v);\n }, err => {\n errors.push(err);\n count--;\n if (count === 0) {\n finished = true;\n reject(new AggregateError(errors, 'All promises were rejected'));\n }\n });\n }\n });\n }\n ;\n static race(values) {\n let resolve;\n let reject;\n let promise = new this((res, rej) => {\n resolve = res;\n reject = rej;\n });\n function onResolve(value) {\n resolve(value);\n }\n function onReject(error) {\n reject(error);\n }\n for (let value of values) {\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n value.then(onResolve, onReject);\n }\n return promise;\n }\n static all(values) {\n return ZoneAwarePromise.allWithCallback(values);\n }\n static allSettled(values) {\n const P = this && this.prototype instanceof ZoneAwarePromise ? this : ZoneAwarePromise;\n return P.allWithCallback(values, {\n thenCallback: (value) => ({ status: 'fulfilled', value }),\n errorCallback: (err) => ({ status: 'rejected', reason: err })\n });\n }\n static allWithCallback(values, callback) {\n let resolve;\n let reject;\n let promise = new this((res, rej) => {\n resolve = res;\n reject = rej;\n });\n // Start at 2 to prevent prematurely resolving if .then is called immediately.\n let unresolvedCount = 2;\n let valueIndex = 0;\n const resolvedValues = [];\n for (let value of values) {\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n const curValueIndex = valueIndex;\n try {\n value.then((value) => {\n resolvedValues[curValueIndex] = callback ? callback.thenCallback(value) : value;\n unresolvedCount--;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }, (err) => {\n if (!callback) {\n reject(err);\n }\n else {\n resolvedValues[curValueIndex] = callback.errorCallback(err);\n unresolvedCount--;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }\n });\n }\n catch (thenErr) {\n reject(thenErr);\n }\n unresolvedCount++;\n valueIndex++;\n }\n // Make the unresolvedCount zero-based again.\n unresolvedCount -= 2;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n return promise;\n }\n constructor(executor) {\n const promise = this;\n if (!(promise instanceof ZoneAwarePromise)) {\n throw new Error('Must be an instanceof Promise.');\n }\n promise[symbolState] = UNRESOLVED;\n promise[symbolValue] = []; // queue;\n try {\n executor && executor(makeResolver(promise, RESOLVED), makeResolver(promise, REJECTED));\n }\n catch (error) {\n resolvePromise(promise, false, error);\n }\n }\n get [Symbol.toStringTag]() {\n return 'Promise';\n }\n get [Symbol.species]() {\n return ZoneAwarePromise;\n }\n then(onFulfilled, onRejected) {\n let C = this.constructor[Symbol.species];\n if (!C || typeof C !== 'function') {\n C = this.constructor || ZoneAwarePromise;\n }\n const chainPromise = new C(noop);\n const zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);\n }\n return chainPromise;\n }\n catch(onRejected) {\n return this.then(null, onRejected);\n }\n finally(onFinally) {\n let C = this.constructor[Symbol.species];\n if (!C || typeof C !== 'function') {\n C = ZoneAwarePromise;\n }\n const chainPromise = new C(noop);\n chainPromise[symbolFinally] = symbolFinally;\n const zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFinally, onFinally);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally);\n }\n return chainPromise;\n }\n }\n // Protect against aggressive optimizers dropping seemingly unused properties.\n // E.g. Closure Compiler in advanced mode.\n ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;\n ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;\n ZoneAwarePromise['race'] = ZoneAwarePromise.race;\n ZoneAwarePromise['all'] = ZoneAwarePromise.all;\n const NativePromise = global[symbolPromise] = global['Promise'];\n global['Promise'] = ZoneAwarePromise;\n const symbolThenPatched = __symbol__('thenPatched');\n function patchThen(Ctor) {\n const proto = Ctor.prototype;\n const prop = ObjectGetOwnPropertyDescriptor(proto, 'then');\n if (prop && (prop.writable === false || !prop.configurable)) {\n // check Ctor.prototype.then propertyDescriptor is writable or not\n // in meteor env, writable is false, we should ignore such case\n return;\n }\n const originalThen = proto.then;\n // Keep a reference to the original method.\n proto[symbolThen] = originalThen;\n Ctor.prototype.then = function (onResolve, onReject) {\n const wrapped = new ZoneAwarePromise((resolve, reject) => {\n originalThen.call(this, resolve, reject);\n });\n return wrapped.then(onResolve, onReject);\n };\n Ctor[symbolThenPatched] = true;\n }\n api.patchThen = patchThen;\n function zoneify(fn) {\n return function (self, args) {\n let resultPromise = fn.apply(self, args);\n if (resultPromise instanceof ZoneAwarePromise) {\n return resultPromise;\n }\n let ctor = resultPromise.constructor;\n if (!ctor[symbolThenPatched]) {\n patchThen(ctor);\n }\n return resultPromise;\n };\n }\n if (NativePromise) {\n patchThen(NativePromise);\n patchMethod(global, 'fetch', delegate => zoneify(delegate));\n }\n // This is not part of public API, but it is useful for tests, so we expose it.\n Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors;\n return ZoneAwarePromise;\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// override Function.prototype.toString to make zone.js patched function\n// look like native function\nZone.__load_patch('toString', (global) => {\n // patch Func.prototype.toString to let them look like native\n const originalFunctionToString = Function.prototype.toString;\n const ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate');\n const PROMISE_SYMBOL = zoneSymbol('Promise');\n const ERROR_SYMBOL = zoneSymbol('Error');\n const newFunctionToString = function toString() {\n if (typeof this === 'function') {\n const originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];\n if (originalDelegate) {\n if (typeof originalDelegate === 'function') {\n return originalFunctionToString.call(originalDelegate);\n }\n else {\n return Object.prototype.toString.call(originalDelegate);\n }\n }\n if (this === Promise) {\n const nativePromise = global[PROMISE_SYMBOL];\n if (nativePromise) {\n return originalFunctionToString.call(nativePromise);\n }\n }\n if (this === Error) {\n const nativeError = global[ERROR_SYMBOL];\n if (nativeError) {\n return originalFunctionToString.call(nativeError);\n }\n }\n }\n return originalFunctionToString.call(this);\n };\n newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString;\n Function.prototype.toString = newFunctionToString;\n // patch Object.prototype.toString to let them look like native\n const originalObjectToString = Object.prototype.toString;\n const PROMISE_OBJECT_TO_STRING = '[object Promise]';\n Object.prototype.toString = function () {\n if (typeof Promise === 'function' && this instanceof Promise) {\n return PROMISE_OBJECT_TO_STRING;\n }\n return originalObjectToString.call(this);\n };\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n const options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n }\n });\n // Note: We pass the `options` object as the event handler too. This is not compatible with the\n // signature of `addEventListener` or `removeEventListener` but enables us to remove the handler\n // without an actual handler.\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\n// an identifier to tell ZoneTask do not create a new invoke closure\nconst OPTIMIZED_ZONE_EVENT_TASK_DATA = {\n useG: true\n};\nconst zoneSymbolEventNames = {};\nconst globalSources = {};\nconst EVENT_NAME_SYMBOL_REGX = new RegExp('^' + ZONE_SYMBOL_PREFIX + '(\\\\w+)(true|false)$');\nconst IMMEDIATE_PROPAGATION_SYMBOL = zoneSymbol('propagationStopped');\nfunction prepareEventNames(eventName, eventNameToString) {\n const falseEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + FALSE_STR;\n const trueEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + TRUE_STR;\n const symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames[eventName] = {};\n zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n}\nfunction patchEventTarget(_global, api, apis, patchOptions) {\n const ADD_EVENT_LISTENER = (patchOptions && patchOptions.add) || ADD_EVENT_LISTENER_STR;\n const REMOVE_EVENT_LISTENER = (patchOptions && patchOptions.rm) || REMOVE_EVENT_LISTENER_STR;\n const LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.listeners) || 'eventListeners';\n const REMOVE_ALL_LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.rmAll) || 'removeAllListeners';\n const zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER);\n const ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':';\n const PREPEND_EVENT_LISTENER = 'prependListener';\n const PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':';\n const invokeTask = function (task, target, event) {\n // for better performance, check isRemoved which is set\n // by removeEventListener\n if (task.isRemoved) {\n return;\n }\n const delegate = task.callback;\n if (typeof delegate === 'object' && delegate.handleEvent) {\n // create the bind version of handleEvent when invoke\n task.callback = (event) => delegate.handleEvent(event);\n task.originalDelegate = delegate;\n }\n // invoke static task.invoke\n // need to try/catch error here, otherwise, the error in one event listener\n // will break the executions of the other event listeners. Also error will\n // not remove the event listener when `once` options is true.\n let error;\n try {\n task.invoke(task, target, [event]);\n }\n catch (err) {\n error = err;\n }\n const options = task.options;\n if (options && typeof options === 'object' && options.once) {\n // if options.once is true, after invoke once remove listener here\n // only browser need to do this, nodejs eventEmitter will cal removeListener\n // inside EventEmitter.once\n const delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate, options);\n }\n return error;\n };\n function globalCallback(context, event, isCapture) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n // event.target is needed for Samsung TV and SourceBuffer\n // || global is needed https://github.com/angular/zone.js/issues/190\n const target = context || event.target || _global;\n const tasks = target[zoneSymbolEventNames[event.type][isCapture ? TRUE_STR : FALSE_STR]];\n if (tasks) {\n const errors = [];\n // invoke all tasks which attached to current target with given event.type and capture = false\n // for performance concern, if task.length === 1, just invoke\n if (tasks.length === 1) {\n const err = invokeTask(tasks[0], target, event);\n err && errors.push(err);\n }\n else {\n // https://github.com/angular/zone.js/issues/836\n // copy the tasks array before invoke, to avoid\n // the callback will remove itself or other listener\n const copyTasks = tasks.slice();\n for (let i = 0; i < copyTasks.length; i++) {\n if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {\n break;\n }\n const err = invokeTask(copyTasks[i], target, event);\n err && errors.push(err);\n }\n }\n // Since there is only one error, we don't need to schedule microTask\n // to throw the error.\n if (errors.length === 1) {\n throw errors[0];\n }\n else {\n for (let i = 0; i < errors.length; i++) {\n const err = errors[i];\n api.nativeScheduleMicroTask(() => {\n throw err;\n });\n }\n }\n }\n }\n // global shared zoneAwareCallback to handle all event callback with capture = false\n const globalZoneAwareCallback = function (event) {\n return globalCallback(this, event, false);\n };\n // global shared zoneAwareCallback to handle all event callback with capture = true\n const globalZoneAwareCaptureCallback = function (event) {\n return globalCallback(this, event, true);\n };\n function patchEventTargetMethods(obj, patchOptions) {\n if (!obj) {\n return false;\n }\n let useGlobalCallback = true;\n if (patchOptions && patchOptions.useG !== undefined) {\n useGlobalCallback = patchOptions.useG;\n }\n const validateHandler = patchOptions && patchOptions.vh;\n let checkDuplicate = true;\n if (patchOptions && patchOptions.chkDup !== undefined) {\n checkDuplicate = patchOptions.chkDup;\n }\n let returnTarget = false;\n if (patchOptions && patchOptions.rt !== undefined) {\n returnTarget = patchOptions.rt;\n }\n let proto = obj;\n while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && obj[ADD_EVENT_LISTENER]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = obj;\n }\n if (!proto) {\n return false;\n }\n if (proto[zoneSymbolAddEventListener]) {\n return false;\n }\n const eventNameToString = patchOptions && patchOptions.eventNameToString;\n // a shared global taskData to pass data for scheduleEventTask\n // so we do not need to create a new object just for pass some data\n const taskData = {};\n const nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER];\n const nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] =\n proto[REMOVE_EVENT_LISTENER];\n const nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] =\n proto[LISTENERS_EVENT_LISTENER];\n const nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] =\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER];\n let nativePrependEventListener;\n if (patchOptions && patchOptions.prepend) {\n nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] =\n proto[patchOptions.prepend];\n }\n /**\n * This util function will build an option object with passive option\n * to handle all possible input from the user.\n */\n function buildEventListenerOptions(options, passive) {\n if (!passiveSupported && typeof options === 'object' && options) {\n // doesn't support passive but user want to pass an object as options.\n // this will not work on some old browser, so we just pass a boolean\n // as useCapture parameter\n return !!options.capture;\n }\n if (!passiveSupported || !passive) {\n return options;\n }\n if (typeof options === 'boolean') {\n return { capture: options, passive: true };\n }\n if (!options) {\n return { passive: true };\n }\n if (typeof options === 'object' && options.passive !== false) {\n return Object.assign(Object.assign({}, options), { passive: true });\n }\n return options;\n }\n const customScheduleGlobal = function (task) {\n // if there is already a task for the eventName + capture,\n // just return, because we use the shared globalZoneAwareCallback here.\n if (taskData.isExisting) {\n return;\n }\n return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options);\n };\n const customCancelGlobal = function (task) {\n // if task is not marked as isRemoved, this call is directly\n // from Zone.prototype.cancelTask, we should remove the task\n // from tasksList of target first\n if (!task.isRemoved) {\n const symbolEventNames = zoneSymbolEventNames[task.eventName];\n let symbolEventName;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];\n }\n const existingTasks = symbolEventName && task.target[symbolEventName];\n if (existingTasks) {\n for (let i = 0; i < existingTasks.length; i++) {\n const existingTask = existingTasks[i];\n if (existingTask === task) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n task.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n task.allRemoved = true;\n task.target[symbolEventName] = null;\n }\n break;\n }\n }\n }\n }\n // if all tasks for the eventName + capture have gone,\n // we will really remove the global event callback,\n // if not, return\n if (!task.allRemoved) {\n return;\n }\n return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options);\n };\n const customScheduleNonGlobal = function (task) {\n return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n const customSchedulePrepend = function (task) {\n return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n const customCancelNonGlobal = function (task) {\n return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options);\n };\n const customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal;\n const customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal;\n const compareTaskCallbackVsDelegate = function (task, delegate) {\n const typeOfDelegate = typeof delegate;\n return (typeOfDelegate === 'function' && task.callback === delegate) ||\n (typeOfDelegate === 'object' && task.originalDelegate === delegate);\n };\n const compare = (patchOptions && patchOptions.diff) ? patchOptions.diff : compareTaskCallbackVsDelegate;\n const unpatchedEvents = Zone[zoneSymbol('UNPATCHED_EVENTS')];\n const passiveEvents = _global[zoneSymbol('PASSIVE_EVENTS')];\n const makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget = false, prepend = false) {\n return function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n let delegate = arguments[1];\n if (!delegate) {\n return nativeListener.apply(this, arguments);\n }\n if (isNode && eventName === 'uncaughtException') {\n // don't patch uncaughtException of nodejs to prevent endless loop\n return nativeListener.apply(this, arguments);\n }\n // don't create the bind delegate function for handleEvent\n // case here to improve addEventListener performance\n // we will create the bind delegate when invoke\n let isHandleEvent = false;\n if (typeof delegate !== 'function') {\n if (!delegate.handleEvent) {\n return nativeListener.apply(this, arguments);\n }\n isHandleEvent = true;\n }\n if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) {\n return;\n }\n const passive = passiveSupported && !!passiveEvents && passiveEvents.indexOf(eventName) !== -1;\n const options = buildEventListenerOptions(arguments[2], passive);\n if (unpatchedEvents) {\n // check upatched list\n for (let i = 0; i < unpatchedEvents.length; i++) {\n if (eventName === unpatchedEvents[i]) {\n if (passive) {\n return nativeListener.call(target, eventName, delegate, options);\n }\n else {\n return nativeListener.apply(this, arguments);\n }\n }\n }\n }\n const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n const once = options && typeof options === 'object' ? options.once : false;\n const zone = Zone.current;\n let symbolEventNames = zoneSymbolEventNames[eventName];\n if (!symbolEventNames) {\n prepareEventNames(eventName, eventNameToString);\n symbolEventNames = zoneSymbolEventNames[eventName];\n }\n const symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n let existingTasks = target[symbolEventName];\n let isExisting = false;\n if (existingTasks) {\n // already have task registered\n isExisting = true;\n if (checkDuplicate) {\n for (let i = 0; i < existingTasks.length; i++) {\n if (compare(existingTasks[i], delegate)) {\n // same callback, same capture, same event name, just return\n return;\n }\n }\n }\n }\n else {\n existingTasks = target[symbolEventName] = [];\n }\n let source;\n const constructorName = target.constructor['name'];\n const targetSource = globalSources[constructorName];\n if (targetSource) {\n source = targetSource[eventName];\n }\n if (!source) {\n source = constructorName + addSource +\n (eventNameToString ? eventNameToString(eventName) : eventName);\n }\n // do not create a new object as task.data to pass those things\n // just use the global shared one\n taskData.options = options;\n if (once) {\n // if addEventListener with once options, we don't pass it to\n // native addEventListener, instead we keep the once setting\n // and handle ourselves.\n taskData.options.once = false;\n }\n taskData.target = target;\n taskData.capture = capture;\n taskData.eventName = eventName;\n taskData.isExisting = isExisting;\n const data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : undefined;\n // keep taskData into data to allow onScheduleEventTask to access the task information\n if (data) {\n data.taskData = taskData;\n }\n const task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn);\n // should clear taskData.target to avoid memory leak\n // issue, https://github.com/angular/angular/issues/20442\n taskData.target = null;\n // need to clear up taskData because it is a global object\n if (data) {\n data.taskData = null;\n }\n // have to save those information to task in case\n // application may call task.zone.cancelTask() directly\n if (once) {\n options.once = true;\n }\n if (!(!passiveSupported && typeof task.options === 'boolean')) {\n // if not support passive, and we pass an option object\n // to addEventListener, we should save the options to task\n task.options = options;\n }\n task.target = target;\n task.capture = capture;\n task.eventName = eventName;\n if (isHandleEvent) {\n // save original delegate for compare to check duplicate\n task.originalDelegate = delegate;\n }\n if (!prepend) {\n existingTasks.push(task);\n }\n else {\n existingTasks.unshift(task);\n }\n if (returnTarget) {\n return target;\n }\n };\n };\n proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget);\n if (nativePrependEventListener) {\n proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true);\n }\n proto[REMOVE_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const options = arguments[2];\n const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n const delegate = arguments[1];\n if (!delegate) {\n return nativeRemoveEventListener.apply(this, arguments);\n }\n if (validateHandler &&\n !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) {\n return;\n }\n const symbolEventNames = zoneSymbolEventNames[eventName];\n let symbolEventName;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n }\n const existingTasks = symbolEventName && target[symbolEventName];\n if (existingTasks) {\n for (let i = 0; i < existingTasks.length; i++) {\n const existingTask = existingTasks[i];\n if (compare(existingTask, delegate)) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n existingTask.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n existingTask.allRemoved = true;\n target[symbolEventName] = null;\n // in the target, we have an event listener which is added by on_property\n // such as target.onclick = function() {}, so we need to clear this internal\n // property too if all delegates all removed\n if (typeof eventName === 'string') {\n const onPropertySymbol = ZONE_SYMBOL_PREFIX + 'ON_PROPERTY' + eventName;\n target[onPropertySymbol] = null;\n }\n }\n existingTask.zone.cancelTask(existingTask);\n if (returnTarget) {\n return target;\n }\n return;\n }\n }\n }\n // issue 930, didn't find the event name or callback\n // from zone kept existingTasks, the callback maybe\n // added outside of zone, we need to call native removeEventListener\n // to try to remove it.\n return nativeRemoveEventListener.apply(this, arguments);\n };\n proto[LISTENERS_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const listeners = [];\n const tasks = findEventTasks(target, eventNameToString ? eventNameToString(eventName) : eventName);\n for (let i = 0; i < tasks.length; i++) {\n const task = tasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n listeners.push(delegate);\n }\n return listeners;\n };\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (!eventName) {\n const keys = Object.keys(target);\n for (let i = 0; i < keys.length; i++) {\n const prop = keys[i];\n const match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n let evtName = match && match[1];\n // in nodejs EventEmitter, removeListener event is\n // used for monitoring the removeListener call,\n // so just keep removeListener eventListener until\n // all other eventListeners are removed\n if (evtName && evtName !== 'removeListener') {\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName);\n }\n }\n // remove removeListener listener finally\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener');\n }\n else {\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const symbolEventNames = zoneSymbolEventNames[eventName];\n if (symbolEventNames) {\n const symbolEventName = symbolEventNames[FALSE_STR];\n const symbolCaptureEventName = symbolEventNames[TRUE_STR];\n const tasks = target[symbolEventName];\n const captureTasks = target[symbolCaptureEventName];\n if (tasks) {\n const removeTasks = tasks.slice();\n for (let i = 0; i < removeTasks.length; i++) {\n const task = removeTasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n if (captureTasks) {\n const removeTasks = captureTasks.slice();\n for (let i = 0; i < removeTasks.length; i++) {\n const task = removeTasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n }\n }\n if (returnTarget) {\n return this;\n }\n };\n // for native toString patch\n attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener);\n attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener);\n if (nativeRemoveAllListeners) {\n attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners);\n }\n if (nativeListeners) {\n attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners);\n }\n return true;\n }\n let results = [];\n for (let i = 0; i < apis.length; i++) {\n results[i] = patchEventTargetMethods(apis[i], patchOptions);\n }\n return results;\n}\nfunction findEventTasks(target, eventName) {\n if (!eventName) {\n const foundTasks = [];\n for (let prop in target) {\n const match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n let evtName = match && match[1];\n if (evtName && (!eventName || evtName === eventName)) {\n const tasks = target[prop];\n if (tasks) {\n for (let i = 0; i < tasks.length; i++) {\n foundTasks.push(tasks[i]);\n }\n }\n }\n }\n return foundTasks;\n }\n let symbolEventName = zoneSymbolEventNames[eventName];\n if (!symbolEventName) {\n prepareEventNames(eventName);\n symbolEventName = zoneSymbolEventNames[eventName];\n }\n const captureFalseTasks = target[symbolEventName[FALSE_STR]];\n const captureTrueTasks = target[symbolEventName[TRUE_STR]];\n if (!captureFalseTasks) {\n return captureTrueTasks ? captureTrueTasks.slice() : [];\n }\n else {\n return captureTrueTasks ? captureFalseTasks.concat(captureTrueTasks) :\n captureFalseTasks.slice();\n }\n}\nfunction patchEventPrototype(global, api) {\n const Event = global['Event'];\n if (Event && Event.prototype) {\n api.patchMethod(Event.prototype, 'stopImmediatePropagation', (delegate) => function (self, args) {\n self[IMMEDIATE_PROPAGATION_SYMBOL] = true;\n // we need to call the native stopImmediatePropagation\n // in case in some hybrid application, some part of\n // application will be controlled by zone, some are not\n delegate && delegate.apply(self, args);\n });\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction patchCallbacks(api, target, targetName, method, callbacks) {\n const symbol = Zone.__symbol__(method);\n if (target[symbol]) {\n return;\n }\n const nativeDelegate = target[symbol] = target[method];\n target[method] = function (name, opts, options) {\n if (opts && opts.prototype) {\n callbacks.forEach(function (callback) {\n const source = `${targetName}.${method}::` + callback;\n const prototype = opts.prototype;\n if (prototype.hasOwnProperty(callback)) {\n const descriptor = api.ObjectGetOwnPropertyDescriptor(prototype, callback);\n if (descriptor && descriptor.value) {\n descriptor.value = api.wrapWithCurrentZone(descriptor.value, source);\n api._redefineProperty(opts.prototype, callback, descriptor);\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n });\n }\n return nativeDelegate.call(target, name, opts, options);\n };\n api.attachOriginToPatched(target[method], nativeDelegate);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction filterProperties(target, onProperties, ignoreProperties) {\n if (!ignoreProperties || ignoreProperties.length === 0) {\n return onProperties;\n }\n const tip = ignoreProperties.filter(ip => ip.target === target);\n if (!tip || tip.length === 0) {\n return onProperties;\n }\n const targetIgnoreProperties = tip[0].ignoreProperties;\n return onProperties.filter(op => targetIgnoreProperties.indexOf(op) === -1);\n}\nfunction patchFilteredProperties(target, onProperties, ignoreProperties, prototype) {\n // check whether target is available, sometimes target will be undefined\n // because different browser or some 3rd party plugin.\n if (!target) {\n return;\n }\n const filteredProperties = filterProperties(target, onProperties, ignoreProperties);\n patchOnProperties(target, filteredProperties, prototype);\n}\n/**\n * Get all event name properties which the event name startsWith `on`\n * from the target object itself, inherited properties are not considered.\n */\nfunction getOnEventNames(target) {\n return Object.getOwnPropertyNames(target)\n .filter(name => name.startsWith('on') && name.length > 2)\n .map(name => name.substring(2));\n}\nfunction propertyDescriptorPatch(api, _global) {\n if (isNode && !isMix) {\n return;\n }\n if (Zone[api.symbol('patchEvents')]) {\n // events are already been patched by legacy patch.\n return;\n }\n const ignoreProperties = _global['__Zone_ignore_on_properties'];\n // for browsers that we can patch the descriptor: Chrome & Firefox\n let patchTargets = [];\n if (isBrowser) {\n const internalWindow = window;\n patchTargets = patchTargets.concat([\n 'Document', 'SVGElement', 'Element', 'HTMLElement', 'HTMLBodyElement', 'HTMLMediaElement',\n 'HTMLFrameSetElement', 'HTMLFrameElement', 'HTMLIFrameElement', 'HTMLMarqueeElement', 'Worker'\n ]);\n const ignoreErrorProperties = isIE() ? [{ target: internalWindow, ignoreProperties: ['error'] }] : [];\n // in IE/Edge, onProp not exist in window object, but in WindowPrototype\n // so we need to pass WindowPrototype to check onProp exist or not\n patchFilteredProperties(internalWindow, getOnEventNames(internalWindow), ignoreProperties ? ignoreProperties.concat(ignoreErrorProperties) : ignoreProperties, ObjectGetPrototypeOf(internalWindow));\n }\n patchTargets = patchTargets.concat([\n 'XMLHttpRequest', 'XMLHttpRequestEventTarget', 'IDBIndex', 'IDBRequest', 'IDBOpenDBRequest',\n 'IDBDatabase', 'IDBTransaction', 'IDBCursor', 'WebSocket'\n ]);\n for (let i = 0; i < patchTargets.length; i++) {\n const target = _global[patchTargets[i]];\n target && target.prototype &&\n patchFilteredProperties(target.prototype, getOnEventNames(target.prototype), ignoreProperties);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nZone.__load_patch('util', (global, Zone, api) => {\n // Collect native event names by looking at properties\n // on the global namespace, e.g. 'onclick'.\n const eventNames = getOnEventNames(global);\n api.patchOnProperties = patchOnProperties;\n api.patchMethod = patchMethod;\n api.bindArguments = bindArguments;\n api.patchMacroTask = patchMacroTask;\n // In earlier version of zone.js (<0.9.0), we use env name `__zone_symbol__BLACK_LISTED_EVENTS` to\n // define which events will not be patched by `Zone.js`.\n // In newer version (>=0.9.0), we change the env name to `__zone_symbol__UNPATCHED_EVENTS` to keep\n // the name consistent with angular repo.\n // The `__zone_symbol__BLACK_LISTED_EVENTS` is deprecated, but it is still be supported for\n // backwards compatibility.\n const SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS');\n const SYMBOL_UNPATCHED_EVENTS = Zone.__symbol__('UNPATCHED_EVENTS');\n if (global[SYMBOL_UNPATCHED_EVENTS]) {\n global[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_UNPATCHED_EVENTS];\n }\n if (global[SYMBOL_BLACK_LISTED_EVENTS]) {\n Zone[SYMBOL_BLACK_LISTED_EVENTS] = Zone[SYMBOL_UNPATCHED_EVENTS] =\n global[SYMBOL_BLACK_LISTED_EVENTS];\n }\n api.patchEventPrototype = patchEventPrototype;\n api.patchEventTarget = patchEventTarget;\n api.isIEOrEdge = isIEOrEdge;\n api.ObjectDefineProperty = ObjectDefineProperty;\n api.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor;\n api.ObjectCreate = ObjectCreate;\n api.ArraySlice = ArraySlice;\n api.patchClass = patchClass;\n api.wrapWithCurrentZone = wrapWithCurrentZone;\n api.filterProperties = filterProperties;\n api.attachOriginToPatched = attachOriginToPatched;\n api._redefineProperty = Object.defineProperty;\n api.patchCallbacks = patchCallbacks;\n api.getGlobalObjects = () => ({\n globalSources,\n zoneSymbolEventNames,\n eventNames,\n isBrowser,\n isMix,\n isNode,\n TRUE_STR,\n FALSE_STR,\n ZONE_SYMBOL_PREFIX,\n ADD_EVENT_LISTENER_STR,\n REMOVE_EVENT_LISTENER_STR\n });\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst taskSymbol = zoneSymbol('zoneTask');\nfunction patchTimer(window, setName, cancelName, nameSuffix) {\n let setNative = null;\n let clearNative = null;\n setName += nameSuffix;\n cancelName += nameSuffix;\n const tasksByHandleId = {};\n function scheduleTask(task) {\n const data = task.data;\n data.args[0] = function () {\n return task.invoke.apply(this, arguments);\n };\n data.handleId = setNative.apply(window, data.args);\n return task;\n }\n function clearTask(task) {\n return clearNative.call(window, task.data.handleId);\n }\n setNative =\n patchMethod(window, setName, (delegate) => function (self, args) {\n if (typeof args[0] === 'function') {\n const options = {\n isPeriodic: nameSuffix === 'Interval',\n delay: (nameSuffix === 'Timeout' || nameSuffix === 'Interval') ? args[1] || 0 :\n undefined,\n args: args\n };\n const callback = args[0];\n args[0] = function timer() {\n try {\n return callback.apply(this, arguments);\n }\n finally {\n // issue-934, task will be cancelled\n // even it is a periodic task such as\n // setInterval\n // https://github.com/angular/angular/issues/40387\n // Cleanup tasksByHandleId should be handled before scheduleTask\n // Since some zoneSpec may intercept and doesn't trigger\n // scheduleFn(scheduleTask) provided here.\n if (!(options.isPeriodic)) {\n if (typeof options.handleId === 'number') {\n // in non-nodejs env, we remove timerId\n // from local cache\n delete tasksByHandleId[options.handleId];\n }\n else if (options.handleId) {\n // Node returns complex objects as handleIds\n // we remove task reference from timer object\n options.handleId[taskSymbol] = null;\n }\n }\n }\n };\n const task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask);\n if (!task) {\n return task;\n }\n // Node.js must additionally support the ref and unref functions.\n const handle = task.data.handleId;\n if (typeof handle === 'number') {\n // for non nodejs env, we save handleId: task\n // mapping in local cache for clearTimeout\n tasksByHandleId[handle] = task;\n }\n else if (handle) {\n // for nodejs env, we save task\n // reference in timerId Object for clearTimeout\n handle[taskSymbol] = task;\n }\n // check whether handle is null, because some polyfill or browser\n // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame\n if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' &&\n typeof handle.unref === 'function') {\n task.ref = handle.ref.bind(handle);\n task.unref = handle.unref.bind(handle);\n }\n if (typeof handle === 'number' || handle) {\n return handle;\n }\n return task;\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(window, args);\n }\n });\n clearNative =\n patchMethod(window, cancelName, (delegate) => function (self, args) {\n const id = args[0];\n let task;\n if (typeof id === 'number') {\n // non nodejs env.\n task = tasksByHandleId[id];\n }\n else {\n // nodejs env.\n task = id && id[taskSymbol];\n // other environments.\n if (!task) {\n task = id;\n }\n }\n if (task && typeof task.type === 'string') {\n if (task.state !== 'notScheduled' &&\n (task.cancelFn && task.data.isPeriodic || task.runCount === 0)) {\n if (typeof id === 'number') {\n delete tasksByHandleId[id];\n }\n else if (id) {\n id[taskSymbol] = null;\n }\n // Do not cancel already canceled functions\n task.zone.cancelTask(task);\n }\n }\n else {\n // cause an error by calling it directly.\n delegate.apply(window, args);\n }\n });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction patchCustomElements(_global, api) {\n const { isBrowser, isMix } = api.getGlobalObjects();\n if ((!isBrowser && !isMix) || !_global['customElements'] || !('customElements' in _global)) {\n return;\n }\n const callbacks = ['connectedCallback', 'disconnectedCallback', 'adoptedCallback', 'attributeChangedCallback'];\n api.patchCallbacks(api, _global.customElements, 'customElements', 'define', callbacks);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction eventTargetPatch(_global, api) {\n if (Zone[api.symbol('patchEventTarget')]) {\n // EventTarget is already patched.\n return;\n }\n const { eventNames, zoneSymbolEventNames, TRUE_STR, FALSE_STR, ZONE_SYMBOL_PREFIX } = api.getGlobalObjects();\n // predefine all __zone_symbol__ + eventName + true/false string\n for (let i = 0; i < eventNames.length; i++) {\n const eventName = eventNames[i];\n const falseEventName = eventName + FALSE_STR;\n const trueEventName = eventName + TRUE_STR;\n const symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames[eventName] = {};\n zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n }\n const EVENT_TARGET = _global['EventTarget'];\n if (!EVENT_TARGET || !EVENT_TARGET.prototype) {\n return;\n }\n api.patchEventTarget(_global, api, [EVENT_TARGET && EVENT_TARGET.prototype]);\n return true;\n}\nfunction patchEvent(global, api) {\n api.patchEventPrototype(global, api);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nZone.__load_patch('legacy', (global) => {\n const legacyPatch = global[Zone.__symbol__('legacyPatch')];\n if (legacyPatch) {\n legacyPatch();\n }\n});\nZone.__load_patch('queueMicrotask', (global, Zone, api) => {\n api.patchMethod(global, 'queueMicrotask', delegate => {\n return function (self, args) {\n Zone.current.scheduleMicroTask('queueMicrotask', args[0]);\n };\n });\n});\nZone.__load_patch('timers', (global) => {\n const set = 'set';\n const clear = 'clear';\n patchTimer(global, set, clear, 'Timeout');\n patchTimer(global, set, clear, 'Interval');\n patchTimer(global, set, clear, 'Immediate');\n});\nZone.__load_patch('requestAnimationFrame', (global) => {\n patchTimer(global, 'request', 'cancel', 'AnimationFrame');\n patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame');\n patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');\n});\nZone.__load_patch('blocking', (global, Zone) => {\n const blockingMethods = ['alert', 'prompt', 'confirm'];\n for (let i = 0; i < blockingMethods.length; i++) {\n const name = blockingMethods[i];\n patchMethod(global, name, (delegate, symbol, name) => {\n return function (s, args) {\n return Zone.current.run(delegate, global, args, name);\n };\n });\n }\n});\nZone.__load_patch('EventTarget', (global, Zone, api) => {\n patchEvent(global, api);\n eventTargetPatch(global, api);\n // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener\n const XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) {\n api.patchEventTarget(global, api, [XMLHttpRequestEventTarget.prototype]);\n }\n});\nZone.__load_patch('MutationObserver', (global, Zone, api) => {\n patchClass('MutationObserver');\n patchClass('WebKitMutationObserver');\n});\nZone.__load_patch('IntersectionObserver', (global, Zone, api) => {\n patchClass('IntersectionObserver');\n});\nZone.__load_patch('FileReader', (global, Zone, api) => {\n patchClass('FileReader');\n});\nZone.__load_patch('on_property', (global, Zone, api) => {\n propertyDescriptorPatch(api, global);\n});\nZone.__load_patch('customElements', (global, Zone, api) => {\n patchCustomElements(global, api);\n});\nZone.__load_patch('XHR', (global, Zone) => {\n // Treat XMLHttpRequest as a macrotask.\n patchXHR(global);\n const XHR_TASK = zoneSymbol('xhrTask');\n const XHR_SYNC = zoneSymbol('xhrSync');\n const XHR_LISTENER = zoneSymbol('xhrListener');\n const XHR_SCHEDULED = zoneSymbol('xhrScheduled');\n const XHR_URL = zoneSymbol('xhrURL');\n const XHR_ERROR_BEFORE_SCHEDULED = zoneSymbol('xhrErrorBeforeScheduled');\n function patchXHR(window) {\n const XMLHttpRequest = window['XMLHttpRequest'];\n if (!XMLHttpRequest) {\n // XMLHttpRequest is not available in service worker\n return;\n }\n const XMLHttpRequestPrototype = XMLHttpRequest.prototype;\n function findPendingTask(target) {\n return target[XHR_TASK];\n }\n let oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n let oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n if (!oriAddListener) {\n const XMLHttpRequestEventTarget = window['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget) {\n const XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget.prototype;\n oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n }\n const READY_STATE_CHANGE = 'readystatechange';\n const SCHEDULED = 'scheduled';\n function scheduleTask(task) {\n const data = task.data;\n const target = data.target;\n target[XHR_SCHEDULED] = false;\n target[XHR_ERROR_BEFORE_SCHEDULED] = false;\n // remove existing event listener\n const listener = target[XHR_LISTENER];\n if (!oriAddListener) {\n oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n if (listener) {\n oriRemoveListener.call(target, READY_STATE_CHANGE, listener);\n }\n const newListener = target[XHR_LISTENER] = () => {\n if (target.readyState === target.DONE) {\n // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with\n // readyState=4 multiple times, so we need to check task state here\n if (!data.aborted && target[XHR_SCHEDULED] && task.state === SCHEDULED) {\n // check whether the xhr has registered onload listener\n // if that is the case, the task should invoke after all\n // onload listeners finish.\n // Also if the request failed without response (status = 0), the load event handler\n // will not be triggered, in that case, we should also invoke the placeholder callback\n // to close the XMLHttpRequest::send macroTask.\n // https://github.com/angular/angular/issues/38795\n const loadTasks = target[Zone.__symbol__('loadfalse')];\n if (target.status !== 0 && loadTasks && loadTasks.length > 0) {\n const oriInvoke = task.invoke;\n task.invoke = function () {\n // need to load the tasks again, because in other\n // load listener, they may remove themselves\n const loadTasks = target[Zone.__symbol__('loadfalse')];\n for (let i = 0; i < loadTasks.length; i++) {\n if (loadTasks[i] === task) {\n loadTasks.splice(i, 1);\n }\n }\n if (!data.aborted && task.state === SCHEDULED) {\n oriInvoke.call(task);\n }\n };\n loadTasks.push(task);\n }\n else {\n task.invoke();\n }\n }\n else if (!data.aborted && target[XHR_SCHEDULED] === false) {\n // error occurs when xhr.send()\n target[XHR_ERROR_BEFORE_SCHEDULED] = true;\n }\n }\n };\n oriAddListener.call(target, READY_STATE_CHANGE, newListener);\n const storedTask = target[XHR_TASK];\n if (!storedTask) {\n target[XHR_TASK] = task;\n }\n sendNative.apply(target, data.args);\n target[XHR_SCHEDULED] = true;\n return task;\n }\n function placeholderCallback() { }\n function clearTask(task) {\n const data = task.data;\n // Note - ideally, we would call data.target.removeEventListener here, but it's too late\n // to prevent it from firing. So instead, we store info for the event listener.\n data.aborted = true;\n return abortNative.apply(data.target, data.args);\n }\n const openNative = patchMethod(XMLHttpRequestPrototype, 'open', () => function (self, args) {\n self[XHR_SYNC] = args[2] == false;\n self[XHR_URL] = args[1];\n return openNative.apply(self, args);\n });\n const XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send';\n const fetchTaskAborting = zoneSymbol('fetchTaskAborting');\n const fetchTaskScheduling = zoneSymbol('fetchTaskScheduling');\n const sendNative = patchMethod(XMLHttpRequestPrototype, 'send', () => function (self, args) {\n if (Zone.current[fetchTaskScheduling] === true) {\n // a fetch is scheduling, so we are using xhr to polyfill fetch\n // and because we already schedule macroTask for fetch, we should\n // not schedule a macroTask for xhr again\n return sendNative.apply(self, args);\n }\n if (self[XHR_SYNC]) {\n // if the XHR is sync there is no task to schedule, just execute the code.\n return sendNative.apply(self, args);\n }\n else {\n const options = { target: self, url: self[XHR_URL], isPeriodic: false, args: args, aborted: false };\n const task = scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask);\n if (self && self[XHR_ERROR_BEFORE_SCHEDULED] === true && !options.aborted &&\n task.state === SCHEDULED) {\n // xhr request throw error when send\n // we should invoke task instead of leaving a scheduled\n // pending macroTask\n task.invoke();\n }\n }\n });\n const abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', () => function (self, args) {\n const task = findPendingTask(self);\n if (task && typeof task.type == 'string') {\n // If the XHR has already completed, do nothing.\n // If the XHR has already been aborted, do nothing.\n // Fix #569, call abort multiple times before done will cause\n // macroTask task count be negative number\n if (task.cancelFn == null || (task.data && task.data.aborted)) {\n return;\n }\n task.zone.cancelTask(task);\n }\n else if (Zone.current[fetchTaskAborting] === true) {\n // the abort is called from fetch polyfill, we need to call native abort of XHR.\n return abortNative.apply(self, args);\n }\n // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no\n // task\n // to cancel. Do nothing.\n });\n }\n});\nZone.__load_patch('geolocation', (global) => {\n /// GEO_LOCATION\n if (global['navigator'] && global['navigator'].geolocation) {\n patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']);\n }\n});\nZone.__load_patch('PromiseRejectionEvent', (global, Zone) => {\n // handle unhandled promise rejection\n function findPromiseRejectionHandler(evtName) {\n return function (e) {\n const eventTasks = findEventTasks(global, evtName);\n eventTasks.forEach(eventTask => {\n // windows has added unhandledrejection event listener\n // trigger the event listener\n const PromiseRejectionEvent = global['PromiseRejectionEvent'];\n if (PromiseRejectionEvent) {\n const evt = new PromiseRejectionEvent(evtName, { promise: e.promise, reason: e.rejection });\n eventTask.invoke(evt);\n }\n });\n };\n }\n if (global['PromiseRejectionEvent']) {\n Zone[zoneSymbol('unhandledPromiseRejectionHandler')] =\n findPromiseRejectionHandler('unhandledrejection');\n Zone[zoneSymbol('rejectionHandledHandler')] =\n findPromiseRejectionHandler('rejectionhandled');\n }\n});\n"],"sourceRoot":"webpack:///"} \ No newline at end of file diff --git a/1.hello-world/3.read-video-angular/dist/hello-world/runtime.js b/1.hello-world/3.read-video-angular/dist/hello-world/runtime.js deleted file mode 100644 index 7fe36d6b..00000000 --- a/1.hello-world/3.read-video-angular/dist/hello-world/runtime.js +++ /dev/null @@ -1,155 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // install a JSONP callback for chunk loading -/******/ function webpackJsonpCallback(data) { -/******/ var chunkIds = data[0]; -/******/ var moreModules = data[1]; -/******/ var executeModules = data[2]; -/******/ -/******/ // add "moreModules" to the modules object, -/******/ // then flag all "chunkIds" as loaded and fire callback -/******/ var moduleId, chunkId, i = 0, resolves = []; -/******/ for(;i < chunkIds.length; i++) { -/******/ chunkId = chunkIds[i]; -/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { -/******/ resolves.push(installedChunks[chunkId][0]); -/******/ } -/******/ installedChunks[chunkId] = 0; -/******/ } -/******/ for(moduleId in moreModules) { -/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { -/******/ modules[moduleId] = moreModules[moduleId]; -/******/ } -/******/ } -/******/ if(parentJsonpFunction) parentJsonpFunction(data); -/******/ -/******/ while(resolves.length) { -/******/ resolves.shift()(); -/******/ } -/******/ -/******/ // add entry modules from loaded chunk to deferred list -/******/ deferredModules.push.apply(deferredModules, executeModules || []); -/******/ -/******/ // run deferred modules when all chunks ready -/******/ return checkDeferredModules(); -/******/ }; -/******/ function checkDeferredModules() { -/******/ var result; -/******/ for(var i = 0; i < deferredModules.length; i++) { -/******/ var deferredModule = deferredModules[i]; -/******/ var fulfilled = true; -/******/ for(var j = 1; j < deferredModule.length; j++) { -/******/ var depId = deferredModule[j]; -/******/ if(installedChunks[depId] !== 0) fulfilled = false; -/******/ } -/******/ if(fulfilled) { -/******/ deferredModules.splice(i--, 1); -/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]); -/******/ } -/******/ } -/******/ -/******/ return result; -/******/ } -/******/ -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // object to store loaded and loading chunks -/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched -/******/ // Promise = chunk loading, 0 = chunk loaded -/******/ var installedChunks = { -/******/ "runtime": 0 -/******/ }; -/******/ -/******/ var deferredModules = []; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || []; -/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); -/******/ jsonpArray.push = webpackJsonpCallback; -/******/ jsonpArray = jsonpArray.slice(); -/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); -/******/ var parentJsonpFunction = oldJsonpFunction; -/******/ -/******/ -/******/ // run deferred modules from other chunks -/******/ checkDeferredModules(); -/******/ }) -/************************************************************************/ -/******/ ([]); -//# sourceMappingURL=runtime.js.map \ No newline at end of file diff --git a/1.hello-world/3.read-video-angular/dist/hello-world/runtime.js.map b/1.hello-world/3.read-video-angular/dist/hello-world/runtime.js.map deleted file mode 100644 index 94cf0e06..00000000 --- a/1.hello-world/3.read-video-angular/dist/hello-world/runtime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack/bootstrap"],"names":[],"mappings":";QAAA;QACA;QACA;QACA;QACA;;QAEA;QACA;QACA;QACA,QAAQ,oBAAoB;QAC5B;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA,iBAAiB,4BAA4B;QAC7C;QACA;QACA,kBAAkB,2BAA2B;QAC7C;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;;QAEA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;QAEA;QACA;QACA;QACA;QACA,gBAAgB,uBAAuB;QACvC;;;QAGA;QACA","file":"runtime.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"runtime\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":"webpack:///"} \ No newline at end of file diff --git a/1.hello-world/3.read-video-angular/dist/hello-world/styles.css b/1.hello-world/3.read-video-angular/dist/hello-world/styles.css deleted file mode 100644 index 686a57c9..00000000 --- a/1.hello-world/3.read-video-angular/dist/hello-world/styles.css +++ /dev/null @@ -1,10 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ - -html,body { - width: 100%; - height: 100%; - margin: 0; -} - - -/*# sourceMappingURL=styles.css.map*/ \ No newline at end of file diff --git a/1.hello-world/3.read-video-angular/dist/hello-world/styles.css.map b/1.hello-world/3.read-video-angular/dist/hello-world/styles.css.map deleted file mode 100644 index 88adcb11..00000000 --- a/1.hello-world/3.read-video-angular/dist/hello-world/styles.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["./src/styles.css"],"names":[],"mappings":"AAAA,8EAA8E;;AAE9E;EACE,WAAW;EACX,YAAY;EACZ,SAAS;AACX","file":"styles.css","sourcesContent":["/* You can add global styles to this file, and also import other style files */\n\nhtml,body {\n width: 100%;\n height: 100%;\n margin: 0;\n}\n"],"sourceRoot":"webpack:///"} \ No newline at end of file diff --git a/1.hello-world/3.read-video-angular/dist/hello-world/vendor.js b/1.hello-world/3.read-video-angular/dist/hello-world/vendor.js deleted file mode 100644 index 0465266c..00000000 --- a/1.hello-world/3.read-video-angular/dist/hello-world/vendor.js +++ /dev/null @@ -1,52926 +0,0 @@ -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["vendor"],{ - -/***/ "/d8p": -/*!*****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/repeat.js ***! - \*****************************************************************/ -/*! exports provided: repeat */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return repeat; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); -/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/empty */ "EY2u"); - - -function repeat(count = -1) { - return (source) => { - if (count === 0) { - return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_1__["empty"])(); - } - else if (count < 0) { - return source.lift(new RepeatOperator(-1, source)); - } - else { - return source.lift(new RepeatOperator(count - 1, source)); - } - }; -} -class RepeatOperator { - constructor(count, source) { - this.count = count; - this.source = source; - } - call(subscriber, source) { - return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source)); - } -} -class RepeatSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, count, source) { - super(destination); - this.count = count; - this.source = source; - } - complete() { - if (!this.isStopped) { - const { source, count } = this; - if (count === 0) { - return super.complete(); - } - else if (count > -1) { - this.count = count - 1; - } - source.subscribe(this._unsubscribeAndRecycle()); - } - } -} -//# sourceMappingURL=repeat.js.map - -/***/ }), - -/***/ "/uUt": -/*!*******************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/distinctUntilChanged.js ***! - \*******************************************************************************/ -/*! exports provided: distinctUntilChanged */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return distinctUntilChanged; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); - -function distinctUntilChanged(compare, keySelector) { - return (source) => source.lift(new DistinctUntilChangedOperator(compare, keySelector)); -} -class DistinctUntilChangedOperator { - constructor(compare, keySelector) { - this.compare = compare; - this.keySelector = keySelector; - } - call(subscriber, source) { - return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector)); - } -} -class DistinctUntilChangedSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, compare, keySelector) { - super(destination); - this.keySelector = keySelector; - this.hasKey = false; - if (typeof compare === 'function') { - this.compare = compare; - } - } - compare(x, y) { - return x === y; - } - _next(value) { - let key; - try { - const { keySelector } = this; - key = keySelector ? keySelector(value) : value; - } - catch (err) { - return this.destination.error(err); - } - let result = false; - if (this.hasKey) { - try { - const { compare } = this; - result = compare(this.key, key); - } - catch (err) { - return this.destination.error(err); - } - } - else { - this.hasKey = true; - } - if (!result) { - this.key = key; - this.destination.next(value); - } - } -} -//# sourceMappingURL=distinctUntilChanged.js.map - -/***/ }), - -/***/ "02Lk": -/*!*******************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/distinct.js ***! - \*******************************************************************/ -/*! exports provided: distinct, DistinctSubscriber */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return distinct; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistinctSubscriber", function() { return DistinctSubscriber; }); -/* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); - -function distinct(keySelector, flushes) { - return (source) => source.lift(new DistinctOperator(keySelector, flushes)); -} -class DistinctOperator { - constructor(keySelector, flushes) { - this.keySelector = keySelector; - this.flushes = flushes; - } - call(subscriber, source) { - return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes)); - } -} -class DistinctSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { - constructor(destination, keySelector, flushes) { - super(destination); - this.keySelector = keySelector; - this.values = new Set(); - if (flushes) { - this.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(flushes, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this))); - } - } - notifyNext() { - this.values.clear(); - } - notifyError(error) { - this._error(error); - } - _next(value) { - if (this.keySelector) { - this._useKeySelector(value); - } - else { - this._finalizeNext(value, value); - } - } - _useKeySelector(value) { - let key; - const { destination } = this; - try { - key = this.keySelector(value); - } - catch (err) { - destination.error(err); - return; - } - this._finalizeNext(key, value); - } - _finalizeNext(key, value) { - const { values } = this; - if (!values.has(key)) { - values.add(key); - this.destination.next(value); - } - } -} -//# sourceMappingURL=distinct.js.map - -/***/ }), - -/***/ "04ZW": -/*!****************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/fromEventPattern.js ***! - \****************************************************************************/ -/*! exports provided: fromEventPattern */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return fromEventPattern; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isFunction */ "n6bG"); -/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../operators/map */ "lJxs"); - - - - -function fromEventPattern(addHandler, removeHandler, resultSelector) { - if (resultSelector) { - return fromEventPattern(addHandler, removeHandler).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_3__["map"])(args => Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(args) ? resultSelector(...args) : resultSelector(args))); - } - return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { - const handler = (...e) => subscriber.next(e.length === 1 ? e[0] : e); - let retValue; - try { - retValue = addHandler(handler); - } - catch (err) { - subscriber.error(err); - return undefined; - } - if (!Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(removeHandler)) { - return undefined; - } - return () => removeHandler(handler, retValue); - }); -} -//# sourceMappingURL=fromEventPattern.js.map - -/***/ }), - -/***/ "05l1": -/*!************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/publishReplay.js ***! - \************************************************************************/ -/*! exports provided: publishReplay */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return publishReplay; }); -/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ReplaySubject */ "jtHE"); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "oB13"); - - -function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) { - if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') { - scheduler = selectorOrScheduler; - } - const selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined; - const subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler); - return (source) => Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(() => subject, selector)(source); -} -//# sourceMappingURL=publishReplay.js.map - -/***/ }), - -/***/ "0EUg": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/concatAll.js ***! - \********************************************************************/ -/*! exports provided: concatAll */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return concatAll; }); -/* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeAll */ "bHdf"); - -function concatAll() { - return Object(_mergeAll__WEBPACK_IMPORTED_MODULE_0__["mergeAll"])(1); -} -//# sourceMappingURL=concatAll.js.map - -/***/ }), - -/***/ "0Pi8": -/*!******************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/endWith.js ***! - \******************************************************************/ -/*! exports provided: endWith */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return endWith; }); -/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/concat */ "GyhO"); -/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/of */ "LRne"); - - -function endWith(...array) { - return (source) => Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(source, Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__["of"])(...array)); -} -//# sourceMappingURL=endWith.js.map - -/***/ }), - -/***/ "128B": -/*!*****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/reduce.js ***! - \*****************************************************************/ -/*! exports provided: reduce */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; }); -/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scan */ "Kqap"); -/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./takeLast */ "BFxc"); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./defaultIfEmpty */ "xbPD"); -/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/pipe */ "mCNh"); - - - - -function reduce(accumulator, seed) { - if (arguments.length >= 2) { - return function reduceOperatorFunctionWithSeed(source) { - return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])(accumulator, seed), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1), Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__["defaultIfEmpty"])(seed))(source); - }; - } - return function reduceOperatorFunction(source) { - return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])((acc, value, index) => accumulator(acc, value, index + 1)), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1))(source); - }; -} -//# sourceMappingURL=reduce.js.map - -/***/ }), - -/***/ "1G5W": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/takeUntil.js ***! - \********************************************************************/ -/*! exports provided: takeUntil */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return takeUntil; }); -/* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); - -function takeUntil(notifier) { - return (source) => source.lift(new TakeUntilOperator(notifier)); -} -class TakeUntilOperator { - constructor(notifier) { - this.notifier = notifier; - } - call(subscriber, source) { - const takeUntilSubscriber = new TakeUntilSubscriber(subscriber); - const notifierSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(this.notifier, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](takeUntilSubscriber)); - if (notifierSubscription && !takeUntilSubscriber.seenValue) { - takeUntilSubscriber.add(notifierSubscription); - return source.subscribe(takeUntilSubscriber); - } - return takeUntilSubscriber; - } -} -class TakeUntilSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { - constructor(destination) { - super(destination); - this.seenValue = false; - } - notifyNext() { - this.seenValue = true; - this.complete(); - } - notifyComplete() { - } -} -//# sourceMappingURL=takeUntil.js.map - -/***/ }), - -/***/ "1Ykd": -/*!*********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/sampleTime.js ***! - \*********************************************************************/ -/*! exports provided: sampleTime */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return sampleTime; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); - - -function sampleTime(period, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"]) { - return (source) => source.lift(new SampleTimeOperator(period, scheduler)); -} -class SampleTimeOperator { - constructor(period, scheduler) { - this.period = period; - this.scheduler = scheduler; - } - call(subscriber, source) { - return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler)); - } -} -class SampleTimeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, period, scheduler) { - super(destination); - this.period = period; - this.scheduler = scheduler; - this.hasValue = false; - this.add(scheduler.schedule(dispatchNotification, period, { subscriber: this, period })); - } - _next(value) { - this.lastValue = value; - this.hasValue = true; - } - notifyNext() { - if (this.hasValue) { - this.hasValue = false; - this.destination.next(this.lastValue); - } - } -} -function dispatchNotification(state) { - let { subscriber, period } = state; - subscriber.notifyNext(); - this.schedule(state, period); -} -//# sourceMappingURL=sampleTime.js.map - -/***/ }), - -/***/ "1uah": -/*!***************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/zip.js ***! - \***************************************************************/ -/*! exports provided: zip, ZipOperator, ZipSubscriber */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipOperator", function() { return ZipOperator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipSubscriber", function() { return ZipSubscriber; }); -/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fromArray */ "yCtX"); -/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); -/* harmony import */ var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../internal/symbol/iterator */ "Lhse"); -/* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); - - - - - -function zip(...observables) { - const resultSelector = observables[observables.length - 1]; - if (typeof resultSelector === 'function') { - observables.pop(); - } - return Object(_fromArray__WEBPACK_IMPORTED_MODULE_0__["fromArray"])(observables, undefined).lift(new ZipOperator(resultSelector)); -} -class ZipOperator { - constructor(resultSelector) { - this.resultSelector = resultSelector; - } - call(subscriber, source) { - return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector)); - } -} -class ZipSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"] { - constructor(destination, resultSelector, values = Object.create(null)) { - super(destination); - this.resultSelector = resultSelector; - this.iterators = []; - this.active = 0; - this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : undefined; - } - _next(value) { - const iterators = this.iterators; - if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(value)) { - iterators.push(new StaticArrayIterator(value)); - } - else if (typeof value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__["iterator"]] === 'function') { - iterators.push(new StaticIterator(value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__["iterator"]]())); - } - else { - iterators.push(new ZipBufferIterator(this.destination, this, value)); - } - } - _complete() { - const iterators = this.iterators; - const len = iterators.length; - this.unsubscribe(); - if (len === 0) { - this.destination.complete(); - return; - } - this.active = len; - for (let i = 0; i < len; i++) { - let iterator = iterators[i]; - if (iterator.stillUnsubscribed) { - const destination = this.destination; - destination.add(iterator.subscribe()); - } - else { - this.active--; - } - } - } - notifyInactive() { - this.active--; - if (this.active === 0) { - this.destination.complete(); - } - } - checkIterators() { - const iterators = this.iterators; - const len = iterators.length; - const destination = this.destination; - for (let i = 0; i < len; i++) { - let iterator = iterators[i]; - if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) { - return; - } - } - let shouldComplete = false; - const args = []; - for (let i = 0; i < len; i++) { - let iterator = iterators[i]; - let result = iterator.next(); - if (iterator.hasCompleted()) { - shouldComplete = true; - } - if (result.done) { - destination.complete(); - return; - } - args.push(result.value); - } - if (this.resultSelector) { - this._tryresultSelector(args); - } - else { - destination.next(args); - } - if (shouldComplete) { - destination.complete(); - } - } - _tryresultSelector(args) { - let result; - try { - result = this.resultSelector.apply(this, args); - } - catch (err) { - this.destination.error(err); - return; - } - this.destination.next(result); - } -} -class StaticIterator { - constructor(iterator) { - this.iterator = iterator; - this.nextResult = iterator.next(); - } - hasValue() { - return true; - } - next() { - const result = this.nextResult; - this.nextResult = this.iterator.next(); - return result; - } - hasCompleted() { - const nextResult = this.nextResult; - return Boolean(nextResult && nextResult.done); - } -} -class StaticArrayIterator { - constructor(array) { - this.array = array; - this.index = 0; - this.length = 0; - this.length = array.length; - } - [_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__["iterator"]]() { - return this; - } - next(value) { - const i = this.index++; - const array = this.array; - return i < this.length ? { value: array[i], done: false } : { value: null, done: true }; - } - hasValue() { - return this.array.length > this.index; - } - hasCompleted() { - return this.array.length === this.index; - } -} -class ZipBufferIterator extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_4__["SimpleOuterSubscriber"] { - constructor(destination, parent, observable) { - super(destination); - this.parent = parent; - this.observable = observable; - this.stillUnsubscribed = true; - this.buffer = []; - this.isComplete = false; - } - [_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__["iterator"]]() { - return this; - } - next() { - const buffer = this.buffer; - if (buffer.length === 0 && this.isComplete) { - return { value: null, done: true }; - } - else { - return { value: buffer.shift(), done: false }; - } - } - hasValue() { - return this.buffer.length > 0; - } - hasCompleted() { - return this.buffer.length === 0 && this.isComplete; - } - notifyComplete() { - if (this.buffer.length > 0) { - this.isComplete = true; - this.parent.notifyInactive(); - } - else { - this.destination.complete(); - } - } - notifyNext(innerValue) { - this.buffer.push(innerValue); - this.parent.checkIterators(); - } - subscribe() { - return Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_4__["innerSubscribe"])(this.observable, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_4__["SimpleInnerSubscriber"](this)); - } -} -//# sourceMappingURL=zip.js.map - -/***/ }), - -/***/ "2QA8": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/symbol/rxSubscriber.js ***! - \********************************************************************/ -/*! exports provided: rxSubscriber, $$rxSubscriber */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rxSubscriber", function() { return rxSubscriber; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$rxSubscriber", function() { return $$rxSubscriber; }); -const rxSubscriber = (() => typeof Symbol === 'function' - ? Symbol('rxSubscriber') - : '@@rxSubscriber_' + Math.random())(); -const $$rxSubscriber = rxSubscriber; -//# sourceMappingURL=rxSubscriber.js.map - -/***/ }), - -/***/ "2QGa": -/*!*********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/partition.js ***! - \*********************************************************************/ -/*! exports provided: partition */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; }); -/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/not */ "F97/"); -/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/subscribeTo */ "SeVD"); -/* harmony import */ var _operators_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/filter */ "pLZG"); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Observable */ "HDdC"); - - - - -function partition(source, predicate, thisArg) { - return [ - Object(_operators_filter__WEBPACK_IMPORTED_MODULE_2__["filter"])(predicate, thisArg)(new _Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(source))), - Object(_operators_filter__WEBPACK_IMPORTED_MODULE_2__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(new _Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(source))) - ]; -} -//# sourceMappingURL=partition.js.map - -/***/ }), - -/***/ "2Vo4": -/*!****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/BehaviorSubject.js ***! - \****************************************************************/ -/*! exports provided: BehaviorSubject */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return BehaviorSubject; }); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subject */ "XNiG"); -/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ "9ppp"); - - -class BehaviorSubject extends _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"] { - constructor(_value) { - super(); - this._value = _value; - } - get value() { - return this.getValue(); - } - _subscribe(subscriber) { - const subscription = super._subscribe(subscriber); - if (subscription && !subscription.closed) { - subscriber.next(this._value); - } - return subscription; - } - getValue() { - if (this.hasError) { - throw this.thrownError; - } - else if (this.closed) { - throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_1__["ObjectUnsubscribedError"](); - } - else { - return this._value; - } - } - next(value) { - super.next(this._value = value); - } -} -//# sourceMappingURL=BehaviorSubject.js.map - -/***/ }), - -/***/ "2fFW": -/*!*******************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/config.js ***! - \*******************************************************/ -/*! exports provided: config */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return config; }); -let _enable_super_gross_mode_that_will_cause_bad_things = false; -const config = { - Promise: undefined, - set useDeprecatedSynchronousErrorHandling(value) { - if (value) { - const error = new Error(); - console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack); - } - else if (_enable_super_gross_mode_that_will_cause_bad_things) { - console.log('RxJS: Back to a better error behavior. Thank you. <3'); - } - _enable_super_gross_mode_that_will_cause_bad_things = value; - }, - get useDeprecatedSynchronousErrorHandling() { - return _enable_super_gross_mode_that_will_cause_bad_things; - }, -}; -//# sourceMappingURL=config.js.map - -/***/ }), - -/***/ "32Ea": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/skipWhile.js ***! - \********************************************************************/ -/*! exports provided: skipWhile */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return skipWhile; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); - -function skipWhile(predicate) { - return (source) => source.lift(new SkipWhileOperator(predicate)); -} -class SkipWhileOperator { - constructor(predicate) { - this.predicate = predicate; - } - call(subscriber, source) { - return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate)); - } -} -class SkipWhileSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, predicate) { - super(destination); - this.predicate = predicate; - this.skipping = true; - this.index = 0; - } - _next(value) { - const destination = this.destination; - if (this.skipping) { - this.tryCallPredicate(value); - } - if (!this.skipping) { - destination.next(value); - } - } - tryCallPredicate(value) { - try { - const result = this.predicate(value, this.index++); - this.skipping = Boolean(result); - } - catch (err) { - this.destination.error(err); - } - } -} -//# sourceMappingURL=skipWhile.js.map - -/***/ }), - -/***/ "3E0/": -/*!****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/delay.js ***! - \****************************************************************/ -/*! exports provided: delay */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return delay; }); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); -/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isDate */ "mlxB"); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); -/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Notification */ "WMd4"); - - - - -function delay(delay, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]) { - const absoluteDelay = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_1__["isDate"])(delay); - const delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay); - return (source) => source.lift(new DelayOperator(delayFor, scheduler)); -} -class DelayOperator { - constructor(delay, scheduler) { - this.delay = delay; - this.scheduler = scheduler; - } - call(subscriber, source) { - return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler)); - } -} -class DelaySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"] { - constructor(destination, delay, scheduler) { - super(destination); - this.delay = delay; - this.scheduler = scheduler; - this.queue = []; - this.active = false; - this.errored = false; - } - static dispatch(state) { - const source = state.source; - const queue = source.queue; - const scheduler = state.scheduler; - const destination = state.destination; - while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) { - queue.shift().notification.observe(destination); - } - if (queue.length > 0) { - const delay = Math.max(0, queue[0].time - scheduler.now()); - this.schedule(state, delay); - } - else { - this.unsubscribe(); - source.active = false; - } - } - _schedule(scheduler) { - this.active = true; - const destination = this.destination; - destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, { - source: this, destination: this.destination, scheduler: scheduler - })); - } - scheduleNotification(notification) { - if (this.errored === true) { - return; - } - const scheduler = this.scheduler; - const message = new DelayMessage(scheduler.now() + this.delay, notification); - this.queue.push(message); - if (this.active === false) { - this._schedule(scheduler); - } - } - _next(value) { - this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_3__["Notification"].createNext(value)); - } - _error(err) { - this.errored = true; - this.queue = []; - this.destination.error(err); - this.unsubscribe(); - } - _complete() { - this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_3__["Notification"].createComplete()); - this.unsubscribe(); - } -} -class DelayMessage { - constructor(time, notification) { - this.time = time; - this.notification = notification; - } -} -//# sourceMappingURL=delay.js.map - -/***/ }), - -/***/ "3N8a": -/*!**********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsyncAction.js ***! - \**********************************************************************/ -/*! exports provided: AsyncAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncAction", function() { return AsyncAction; }); -/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Action */ "7ve7"); - -class AsyncAction extends _Action__WEBPACK_IMPORTED_MODULE_0__["Action"] { - constructor(scheduler, work) { - super(scheduler, work); - this.scheduler = scheduler; - this.work = work; - this.pending = false; - } - schedule(state, delay = 0) { - if (this.closed) { - return this; - } - this.state = state; - const id = this.id; - const scheduler = this.scheduler; - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, delay); - } - this.pending = true; - this.delay = delay; - this.id = this.id || this.requestAsyncId(scheduler, this.id, delay); - return this; - } - requestAsyncId(scheduler, id, delay = 0) { - return setInterval(scheduler.flush.bind(scheduler, this), delay); - } - recycleAsyncId(scheduler, id, delay = 0) { - if (delay !== null && this.delay === delay && this.pending === false) { - return id; - } - clearInterval(id); - return undefined; - } - execute(state, delay) { - if (this.closed) { - return new Error('executing a cancelled action'); - } - this.pending = false; - const error = this._execute(state, delay); - if (error) { - return error; - } - else if (this.pending === false && this.id != null) { - this.id = this.recycleAsyncId(this.scheduler, this.id, null); - } - } - _execute(state, delay) { - let errored = false; - let errorValue = undefined; - try { - this.work(state); - } - catch (e) { - errored = true; - errorValue = !!e && e || new Error(e); - } - if (errored) { - this.unsubscribe(); - return errorValue; - } - } - _unsubscribe() { - const id = this.id; - const scheduler = this.scheduler; - const actions = scheduler.actions; - const index = actions.indexOf(this); - this.work = null; - this.state = null; - this.pending = false; - this.scheduler = null; - if (index !== -1) { - actions.splice(index, 1); - } - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, null); - } - this.delay = null; - } -} -//# sourceMappingURL=AsyncAction.js.map - -/***/ }), - -/***/ "3UWI": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/auditTime.js ***! - \********************************************************************/ -/*! exports provided: auditTime */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return auditTime; }); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); -/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./audit */ "tnsW"); -/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/timer */ "PqYM"); - - - -function auditTime(duration, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]) { - return Object(_audit__WEBPACK_IMPORTED_MODULE_1__["audit"])(() => Object(_observable_timer__WEBPACK_IMPORTED_MODULE_2__["timer"])(duration, scheduler)); -} -//# sourceMappingURL=auditTime.js.map - -/***/ }), - -/***/ "4A3s": -/*!*************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/ignoreElements.js ***! - \*************************************************************************/ -/*! exports provided: ignoreElements */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return ignoreElements; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); - -function ignoreElements() { - return function ignoreElementsOperatorFunction(source) { - return source.lift(new IgnoreElementsOperator()); - }; -} -class IgnoreElementsOperator { - call(subscriber, source) { - return source.subscribe(new IgnoreElementsSubscriber(subscriber)); - } -} -class IgnoreElementsSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - _next(unused) { - } -} -//# sourceMappingURL=ignoreElements.js.map - -/***/ }), - -/***/ "4I5i": -/*!*****************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/ArgumentOutOfRangeError.js ***! - \*****************************************************************************/ -/*! exports provided: ArgumentOutOfRangeError */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return ArgumentOutOfRangeError; }); -const ArgumentOutOfRangeErrorImpl = (() => { - function ArgumentOutOfRangeErrorImpl() { - Error.call(this); - this.message = 'argument out of range'; - this.name = 'ArgumentOutOfRangeError'; - return this; - } - ArgumentOutOfRangeErrorImpl.prototype = Object.create(Error.prototype); - return ArgumentOutOfRangeErrorImpl; -})(); -const ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl; -//# sourceMappingURL=ArgumentOutOfRangeError.js.map - -/***/ }), - -/***/ "4O5X": -/*!****************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/bindNodeCallback.js ***! - \****************************************************************************/ -/*! exports provided: bindNodeCallback */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return bindNodeCallback; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AsyncSubject */ "NHP+"); -/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/map */ "lJxs"); -/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/canReportError */ "8Qeq"); -/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); -/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); - - - - - - -function bindNodeCallback(callbackFunc, resultSelector, scheduler) { - if (resultSelector) { - if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(resultSelector)) { - scheduler = resultSelector; - } - else { - return (...args) => bindNodeCallback(callbackFunc, scheduler)(...args).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(args => Object(_util_isArray__WEBPACK_IMPORTED_MODULE_5__["isArray"])(args) ? resultSelector(...args) : resultSelector(args))); - } - } - return function (...args) { - const params = { - subject: undefined, - args, - callbackFunc, - scheduler, - context: this, - }; - return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { - const { context } = params; - let { subject } = params; - if (!scheduler) { - if (!subject) { - subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"](); - const handler = (...innerArgs) => { - const err = innerArgs.shift(); - if (err) { - subject.error(err); - return; - } - subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs); - subject.complete(); - }; - try { - callbackFunc.apply(context, [...args, handler]); - } - catch (err) { - if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) { - subject.error(err); - } - else { - console.warn(err); - } - } - } - return subject.subscribe(subscriber); - } - else { - return scheduler.schedule(dispatch, 0, { params, subscriber, context }); - } - }); - }; -} -function dispatch(state) { - const { params, subscriber, context } = state; - const { callbackFunc, args, scheduler } = params; - let subject = params.subject; - if (!subject) { - subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"](); - const handler = (...innerArgs) => { - const err = innerArgs.shift(); - if (err) { - this.add(scheduler.schedule(dispatchError, 0, { err, subject })); - } - else { - const value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs; - this.add(scheduler.schedule(dispatchNext, 0, { value, subject })); - } - }; - try { - callbackFunc.apply(context, [...args, handler]); - } - catch (err) { - this.add(scheduler.schedule(dispatchError, 0, { err, subject })); - } - } - this.add(subject.subscribe(subscriber)); -} -function dispatchNext(arg) { - const { value, subject } = arg; - subject.next(value); - subject.complete(); -} -function dispatchError(arg) { - const { err, subject } = arg; - subject.error(err); -} -//# sourceMappingURL=bindNodeCallback.js.map - -/***/ }), - -/***/ "4f8F": -/*!***************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/race.js ***! - \***************************************************************/ -/*! exports provided: race */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; }); -/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); -/* harmony import */ var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/race */ "Nv8m"); - - -function race(...observables) { - return function raceOperatorFunction(source) { - if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) { - observables = observables[0]; - } - return source.lift.call(Object(_observable_race__WEBPACK_IMPORTED_MODULE_1__["race"])(source, ...observables)); - }; -} -//# sourceMappingURL=race.js.map - -/***/ }), - -/***/ "4hIw": -/*!***********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/timeInterval.js ***! - \***********************************************************************/ -/*! exports provided: timeInterval, TimeInterval */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return timeInterval; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeInterval", function() { return TimeInterval; }); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); -/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scan */ "Kqap"); -/* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/defer */ "NXyV"); -/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./map */ "lJxs"); - - - - -function timeInterval(scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]) { - return (source) => Object(_observable_defer__WEBPACK_IMPORTED_MODULE_2__["defer"])(() => { - return source.pipe(Object(_scan__WEBPACK_IMPORTED_MODULE_1__["scan"])(({ current }, value) => ({ value, current: scheduler.now(), last: current }), { current: scheduler.now(), value: undefined, last: undefined }), Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(({ current, last, value }) => new TimeInterval(value, current - last))); - }); -} -class TimeInterval { - constructor(value, interval) { - this.value = value; - this.interval = interval; - } -} -//# sourceMappingURL=timeInterval.js.map - -/***/ }), - -/***/ "4yVj": -/*!**************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/scheduled/schedulePromise.js ***! - \**************************************************************************/ -/*! exports provided: schedulePromise */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "schedulePromise", function() { return schedulePromise; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); - - -function schedulePromise(input, scheduler) { - return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { - const sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); - sub.add(scheduler.schedule(() => input.then(value => { - sub.add(scheduler.schedule(() => { - subscriber.next(value); - sub.add(scheduler.schedule(() => subscriber.complete())); - })); - }, err => { - sub.add(scheduler.schedule(() => subscriber.error(err))); - }))); - return sub; - }); -} -//# sourceMappingURL=schedulePromise.js.map - -/***/ }), - -/***/ "5+tZ": -/*!*******************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeMap.js ***! - \*******************************************************************/ -/*! exports provided: mergeMap, MergeMapOperator, MergeMapSubscriber, flatMap */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return mergeMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapOperator", function() { return MergeMapOperator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapSubscriber", function() { return MergeMapSubscriber; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return flatMap; }); -/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "lJxs"); -/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/from */ "Cfvw"); -/* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); - - - -function mergeMap(project, resultSelector, concurrent = Number.POSITIVE_INFINITY) { - if (typeof resultSelector === 'function') { - return (source) => source.pipe(mergeMap((a, i) => Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])((b, ii) => resultSelector(a, b, i, ii))), concurrent)); - } - else if (typeof resultSelector === 'number') { - concurrent = resultSelector; - } - return (source) => source.lift(new MergeMapOperator(project, concurrent)); -} -class MergeMapOperator { - constructor(project, concurrent = Number.POSITIVE_INFINITY) { - this.project = project; - this.concurrent = concurrent; - } - call(observer, source) { - return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent)); - } -} -class MergeMapSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"] { - constructor(destination, project, concurrent = Number.POSITIVE_INFINITY) { - super(destination); - this.project = project; - this.concurrent = concurrent; - this.hasCompleted = false; - this.buffer = []; - this.active = 0; - this.index = 0; - } - _next(value) { - if (this.active < this.concurrent) { - this._tryNext(value); - } - else { - this.buffer.push(value); - } - } - _tryNext(value) { - let result; - const index = this.index++; - try { - result = this.project(value, index); - } - catch (err) { - this.destination.error(err); - return; - } - this.active++; - this._innerSub(result); - } - _innerSub(ish) { - const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](this); - const destination = this.destination; - destination.add(innerSubscriber); - const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(ish, innerSubscriber); - if (innerSubscription !== innerSubscriber) { - destination.add(innerSubscription); - } - } - _complete() { - this.hasCompleted = true; - if (this.active === 0 && this.buffer.length === 0) { - this.destination.complete(); - } - this.unsubscribe(); - } - notifyNext(innerValue) { - this.destination.next(innerValue); - } - notifyComplete() { - const buffer = this.buffer; - this.active--; - if (buffer.length > 0) { - this._next(buffer.shift()); - } - else if (this.active === 0 && this.hasCompleted) { - this.destination.complete(); - } - } -} -const flatMap = mergeMap; -//# sourceMappingURL=mergeMap.js.map - -/***/ }), - -/***/ "51Bx": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeScan.js ***! - \********************************************************************/ -/*! exports provided: mergeScan, MergeScanOperator, MergeScanSubscriber */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return mergeScan; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanOperator", function() { return MergeScanOperator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanSubscriber", function() { return MergeScanSubscriber; }); -/* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); - -function mergeScan(accumulator, seed, concurrent = Number.POSITIVE_INFINITY) { - return (source) => source.lift(new MergeScanOperator(accumulator, seed, concurrent)); -} -class MergeScanOperator { - constructor(accumulator, seed, concurrent) { - this.accumulator = accumulator; - this.seed = seed; - this.concurrent = concurrent; - } - call(subscriber, source) { - return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent)); - } -} -class MergeScanSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { - constructor(destination, accumulator, acc, concurrent) { - super(destination); - this.accumulator = accumulator; - this.acc = acc; - this.concurrent = concurrent; - this.hasValue = false; - this.hasCompleted = false; - this.buffer = []; - this.active = 0; - this.index = 0; - } - _next(value) { - if (this.active < this.concurrent) { - const index = this.index++; - const destination = this.destination; - let ish; - try { - const { accumulator } = this; - ish = accumulator(this.acc, value, index); - } - catch (e) { - return destination.error(e); - } - this.active++; - this._innerSub(ish); - } - else { - this.buffer.push(value); - } - } - _innerSub(ish) { - const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this); - const destination = this.destination; - destination.add(innerSubscriber); - const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(ish, innerSubscriber); - if (innerSubscription !== innerSubscriber) { - destination.add(innerSubscription); - } - } - _complete() { - this.hasCompleted = true; - if (this.active === 0 && this.buffer.length === 0) { - if (this.hasValue === false) { - this.destination.next(this.acc); - } - this.destination.complete(); - } - this.unsubscribe(); - } - notifyNext(innerValue) { - const { destination } = this; - this.acc = innerValue; - this.hasValue = true; - destination.next(innerValue); - } - notifyComplete() { - const buffer = this.buffer; - this.active--; - if (buffer.length > 0) { - this._next(buffer.shift()); - } - else if (this.active === 0 && this.hasCompleted) { - if (this.hasValue === false) { - this.destination.next(this.acc); - } - this.destination.complete(); - } - } -} -//# sourceMappingURL=mergeScan.js.map - -/***/ }), - -/***/ "51Dv": -/*!****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/InnerSubscriber.js ***! - \****************************************************************/ -/*! exports provided: InnerSubscriber */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InnerSubscriber", function() { return InnerSubscriber; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscriber */ "7o/Q"); - -class InnerSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(parent, outerValue, outerIndex) { - super(); - this.parent = parent; - this.outerValue = outerValue; - this.outerIndex = outerIndex; - this.index = 0; - } - _next(value) { - this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this); - } - _error(error) { - this.parent.notifyError(error, this); - this.unsubscribe(); - } - _complete() { - this.parent.notifyComplete(this); - this.unsubscribe(); - } -} -//# sourceMappingURL=InnerSubscriber.js.map - -/***/ }), - -/***/ "5B2Y": -/*!*****************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduleObservable.js ***! - \*****************************************************************************/ -/*! exports provided: scheduleObservable */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleObservable", function() { return scheduleObservable; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); -/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../symbol/observable */ "kJWO"); - - - -function scheduleObservable(input, scheduler) { - return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { - const sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); - sub.add(scheduler.schedule(() => { - const observable = input[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]](); - sub.add(observable.subscribe({ - next(value) { sub.add(scheduler.schedule(() => subscriber.next(value))); }, - error(err) { sub.add(scheduler.schedule(() => subscriber.error(err))); }, - complete() { sub.add(scheduler.schedule(() => subscriber.complete())); }, - })); - })); - return sub; - }); -} -//# sourceMappingURL=scheduleObservable.js.map - -/***/ }), - -/***/ "5yfJ": -/*!*****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/never.js ***! - \*****************************************************************/ -/*! exports provided: NEVER, never */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return NEVER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "never", function() { return never; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/noop */ "KqfI"); - - -const NEVER = new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](_util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]); -function never() { - return NEVER; -} -//# sourceMappingURL=never.js.map - -/***/ }), - -/***/ "6eBy": -/*!*******************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/debounce.js ***! - \*******************************************************************/ -/*! exports provided: debounce */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; }); -/* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); - -function debounce(durationSelector) { - return (source) => source.lift(new DebounceOperator(durationSelector)); -} -class DebounceOperator { - constructor(durationSelector) { - this.durationSelector = durationSelector; - } - call(subscriber, source) { - return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector)); - } -} -class DebounceSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { - constructor(destination, durationSelector) { - super(destination); - this.durationSelector = durationSelector; - this.hasValue = false; - } - _next(value) { - try { - const result = this.durationSelector.call(this, value); - if (result) { - this._tryNext(value, result); - } - } - catch (err) { - this.destination.error(err); - } - } - _complete() { - this.emitValue(); - this.destination.complete(); - } - _tryNext(value, duration) { - let subscription = this.durationSubscription; - this.value = value; - this.hasValue = true; - if (subscription) { - subscription.unsubscribe(); - this.remove(subscription); - } - subscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(duration, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this)); - if (subscription && !subscription.closed) { - this.add(this.durationSubscription = subscription); - } - } - notifyNext() { - this.emitValue(); - } - notifyComplete() { - this.emitValue(); - } - emitValue() { - if (this.hasValue) { - const value = this.value; - const subscription = this.durationSubscription; - if (subscription) { - this.durationSubscription = undefined; - subscription.unsubscribe(); - this.remove(subscription); - } - this.value = undefined; - this.hasValue = false; - super._next(value); - } - } -} -//# sourceMappingURL=debounce.js.map - -/***/ }), - -/***/ "7+OI": -/*!******************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/isObservable.js ***! - \******************************************************************/ -/*! exports provided: isObservable */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return isObservable; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); - -function isObservable(obj) { - return !!obj && (obj instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"] || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function')); -} -//# sourceMappingURL=isObservable.js.map - -/***/ }), - -/***/ "7HRe": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduled.js ***! - \********************************************************************/ -/*! exports provided: scheduled */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return scheduled; }); -/* harmony import */ var _scheduleObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scheduleObservable */ "5B2Y"); -/* harmony import */ var _schedulePromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./schedulePromise */ "4yVj"); -/* harmony import */ var _scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./scheduleArray */ "jZKg"); -/* harmony import */ var _scheduleIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scheduleIterable */ "MBAA"); -/* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isInteropObservable */ "QIAL"); -/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/isPromise */ "c2HN"); -/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util/isArrayLike */ "I55L"); -/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../util/isIterable */ "CMyj"); - - - - - - - - -function scheduled(input, scheduler) { - if (input != null) { - if (Object(_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__["isInteropObservable"])(input)) { - return Object(_scheduleObservable__WEBPACK_IMPORTED_MODULE_0__["scheduleObservable"])(input, scheduler); - } - else if (Object(_util_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(input)) { - return Object(_schedulePromise__WEBPACK_IMPORTED_MODULE_1__["schedulePromise"])(input, scheduler); - } - else if (Object(_util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__["isArrayLike"])(input)) { - return Object(_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler); - } - else if (Object(_util_isIterable__WEBPACK_IMPORTED_MODULE_7__["isIterable"])(input) || typeof input === 'string') { - return Object(_scheduleIterable__WEBPACK_IMPORTED_MODULE_3__["scheduleIterable"])(input, scheduler); - } - } - throw new TypeError((input !== null && typeof input || input) + ' is not observable'); -} -//# sourceMappingURL=scheduled.js.map - -/***/ }), - -/***/ "7Hc7": -/*!***************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/scheduler/asap.js ***! - \***************************************************************/ -/*! exports provided: asapScheduler, asap */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return asapScheduler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asap", function() { return asap; }); -/* harmony import */ var _AsapAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsapAction */ "Pz8W"); -/* harmony import */ var _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsapScheduler */ "RUbi"); - - -const asapScheduler = new _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__["AsapScheduler"](_AsapAction__WEBPACK_IMPORTED_MODULE_0__["AsapAction"]); -const asap = asapScheduler; -//# sourceMappingURL=asap.js.map - -/***/ }), - -/***/ "7o/Q": -/*!***********************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/Subscriber.js ***! - \***********************************************************/ -/*! exports provided: Subscriber, SafeSubscriber */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return Subscriber; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SafeSubscriber", function() { return SafeSubscriber; }); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/isFunction */ "n6bG"); -/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Observer */ "gRHU"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Subscription */ "quSY"); -/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../internal/symbol/rxSubscriber */ "2QA8"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./config */ "2fFW"); -/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util/hostReportError */ "NJ4a"); - - - - - - -class Subscriber extends _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"] { - constructor(destinationOrNext, error, complete) { - super(); - this.syncErrorValue = null; - this.syncErrorThrown = false; - this.syncErrorThrowable = false; - this.isStopped = false; - switch (arguments.length) { - case 0: - this.destination = _Observer__WEBPACK_IMPORTED_MODULE_1__["empty"]; - break; - case 1: - if (!destinationOrNext) { - this.destination = _Observer__WEBPACK_IMPORTED_MODULE_1__["empty"]; - break; - } - if (typeof destinationOrNext === 'object') { - if (destinationOrNext instanceof Subscriber) { - this.syncErrorThrowable = destinationOrNext.syncErrorThrowable; - this.destination = destinationOrNext; - destinationOrNext.add(this); - } - else { - this.syncErrorThrowable = true; - this.destination = new SafeSubscriber(this, destinationOrNext); - } - break; - } - default: - this.syncErrorThrowable = true; - this.destination = new SafeSubscriber(this, destinationOrNext, error, complete); - break; - } - } - [_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_3__["rxSubscriber"]]() { return this; } - static create(next, error, complete) { - const subscriber = new Subscriber(next, error, complete); - subscriber.syncErrorThrowable = false; - return subscriber; - } - next(value) { - if (!this.isStopped) { - this._next(value); - } - } - error(err) { - if (!this.isStopped) { - this.isStopped = true; - this._error(err); - } - } - complete() { - if (!this.isStopped) { - this.isStopped = true; - this._complete(); - } - } - unsubscribe() { - if (this.closed) { - return; - } - this.isStopped = true; - super.unsubscribe(); - } - _next(value) { - this.destination.next(value); - } - _error(err) { - this.destination.error(err); - this.unsubscribe(); - } - _complete() { - this.destination.complete(); - this.unsubscribe(); - } - _unsubscribeAndRecycle() { - const { _parentOrParents } = this; - this._parentOrParents = null; - this.unsubscribe(); - this.closed = false; - this.isStopped = false; - this._parentOrParents = _parentOrParents; - return this; - } -} -class SafeSubscriber extends Subscriber { - constructor(_parentSubscriber, observerOrNext, error, complete) { - super(); - this._parentSubscriber = _parentSubscriber; - let next; - let context = this; - if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(observerOrNext)) { - next = observerOrNext; - } - else if (observerOrNext) { - next = observerOrNext.next; - error = observerOrNext.error; - complete = observerOrNext.complete; - if (observerOrNext !== _Observer__WEBPACK_IMPORTED_MODULE_1__["empty"]) { - context = Object.create(observerOrNext); - if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(context.unsubscribe)) { - this.add(context.unsubscribe.bind(context)); - } - context.unsubscribe = this.unsubscribe.bind(this); - } - } - this._context = context; - this._next = next; - this._error = error; - this._complete = complete; - } - next(value) { - if (!this.isStopped && this._next) { - const { _parentSubscriber } = this; - if (!_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { - this.__tryOrUnsub(this._next, value); - } - else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) { - this.unsubscribe(); - } - } - } - error(err) { - if (!this.isStopped) { - const { _parentSubscriber } = this; - const { useDeprecatedSynchronousErrorHandling } = _config__WEBPACK_IMPORTED_MODULE_4__["config"]; - if (this._error) { - if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { - this.__tryOrUnsub(this._error, err); - this.unsubscribe(); - } - else { - this.__tryOrSetError(_parentSubscriber, this._error, err); - this.unsubscribe(); - } - } - else if (!_parentSubscriber.syncErrorThrowable) { - this.unsubscribe(); - if (useDeprecatedSynchronousErrorHandling) { - throw err; - } - Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__["hostReportError"])(err); - } - else { - if (useDeprecatedSynchronousErrorHandling) { - _parentSubscriber.syncErrorValue = err; - _parentSubscriber.syncErrorThrown = true; - } - else { - Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__["hostReportError"])(err); - } - this.unsubscribe(); - } - } - } - complete() { - if (!this.isStopped) { - const { _parentSubscriber } = this; - if (this._complete) { - const wrappedComplete = () => this._complete.call(this._context); - if (!_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { - this.__tryOrUnsub(wrappedComplete); - this.unsubscribe(); - } - else { - this.__tryOrSetError(_parentSubscriber, wrappedComplete); - this.unsubscribe(); - } - } - else { - this.unsubscribe(); - } - } - } - __tryOrUnsub(fn, value) { - try { - fn.call(this._context, value); - } - catch (err) { - this.unsubscribe(); - if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) { - throw err; - } - else { - Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__["hostReportError"])(err); - } - } - } - __tryOrSetError(parent, fn, value) { - if (!_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) { - throw new Error('bad call'); - } - try { - fn.call(this._context, value); - } - catch (err) { - if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) { - parent.syncErrorValue = err; - parent.syncErrorThrown = true; - return true; - } - else { - Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__["hostReportError"])(err); - return true; - } - } - return false; - } - _unsubscribe() { - const { _parentSubscriber } = this; - this._context = null; - this._parentSubscriber = null; - _parentSubscriber.unsubscribe(); - } -} -//# sourceMappingURL=Subscriber.js.map - -/***/ }), - -/***/ "7ve7": -/*!*****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/scheduler/Action.js ***! - \*****************************************************************/ -/*! exports provided: Action */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return Action; }); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscription */ "quSY"); - -class Action extends _Subscription__WEBPACK_IMPORTED_MODULE_0__["Subscription"] { - constructor(scheduler, work) { - super(); - } - schedule(state, delay = 0) { - return this; - } -} -//# sourceMappingURL=Action.js.map - -/***/ }), - -/***/ "7wxJ": -/*!*********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/combineAll.js ***! - \*********************************************************************/ -/*! exports provided: combineAll */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return combineAll; }); -/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/combineLatest */ "itXk"); - -function combineAll(project) { - return (source) => source.lift(new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__["CombineLatestOperator"](project)); -} -//# sourceMappingURL=combineAll.js.map - -/***/ }), - -/***/ "8Qeq": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/canReportError.js ***! - \********************************************************************/ -/*! exports provided: canReportError */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "canReportError", function() { return canReportError; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); - -function canReportError(observer) { - while (observer) { - const { closed, destination, isStopped } = observer; - if (closed || isStopped) { - return false; - } - else if (destination && destination instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) { - observer = destination; - } - else { - observer = null; - } - } - return true; -} -//# sourceMappingURL=canReportError.js.map - -/***/ }), - -/***/ "9M8c": -/*!**********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferCount.js ***! - \**********************************************************************/ -/*! exports provided: bufferCount */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return bufferCount; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); - -function bufferCount(bufferSize, startBufferEvery = null) { - return function bufferCountOperatorFunction(source) { - return source.lift(new BufferCountOperator(bufferSize, startBufferEvery)); - }; -} -class BufferCountOperator { - constructor(bufferSize, startBufferEvery) { - this.bufferSize = bufferSize; - this.startBufferEvery = startBufferEvery; - if (!startBufferEvery || bufferSize === startBufferEvery) { - this.subscriberClass = BufferCountSubscriber; - } - else { - this.subscriberClass = BufferSkipCountSubscriber; - } - } - call(subscriber, source) { - return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery)); - } -} -class BufferCountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, bufferSize) { - super(destination); - this.bufferSize = bufferSize; - this.buffer = []; - } - _next(value) { - const buffer = this.buffer; - buffer.push(value); - if (buffer.length == this.bufferSize) { - this.destination.next(buffer); - this.buffer = []; - } - } - _complete() { - const buffer = this.buffer; - if (buffer.length > 0) { - this.destination.next(buffer); - } - super._complete(); - } -} -class BufferSkipCountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, bufferSize, startBufferEvery) { - super(destination); - this.bufferSize = bufferSize; - this.startBufferEvery = startBufferEvery; - this.buffers = []; - this.count = 0; - } - _next(value) { - const { bufferSize, startBufferEvery, buffers, count } = this; - this.count++; - if (count % startBufferEvery === 0) { - buffers.push([]); - } - for (let i = buffers.length; i--;) { - const buffer = buffers[i]; - buffer.push(value); - if (buffer.length === bufferSize) { - buffers.splice(i, 1); - this.destination.next(buffer); - } - } - } - _complete() { - const { buffers, destination } = this; - while (buffers.length > 0) { - let buffer = buffers.shift(); - if (buffer.length > 0) { - destination.next(buffer); - } - } - super._complete(); - } -} -//# sourceMappingURL=bufferCount.js.map - -/***/ }), - -/***/ "9ihq": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/elementAt.js ***! - \********************************************************************/ -/*! exports provided: elementAt */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return elementAt; }); -/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "4I5i"); -/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "pLZG"); -/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./throwIfEmpty */ "XDbj"); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaultIfEmpty */ "xbPD"); -/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./take */ "IzEk"); - - - - - -function elementAt(index, defaultValue) { - if (index < 0) { - throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"](); - } - const hasDefaultValue = arguments.length >= 2; - return (source) => source.pipe(Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])((v, i) => i === index), Object(_take__WEBPACK_IMPORTED_MODULE_4__["take"])(1), hasDefaultValue - ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue) - : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__["throwIfEmpty"])(() => new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"]())); -} -//# sourceMappingURL=elementAt.js.map - -/***/ }), - -/***/ "9ppp": -/*!*****************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/ObjectUnsubscribedError.js ***! - \*****************************************************************************/ -/*! exports provided: ObjectUnsubscribedError */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return ObjectUnsubscribedError; }); -const ObjectUnsubscribedErrorImpl = (() => { - function ObjectUnsubscribedErrorImpl() { - Error.call(this); - this.message = 'object unsubscribed'; - this.name = 'ObjectUnsubscribedError'; - return this; - } - ObjectUnsubscribedErrorImpl.prototype = Object.create(Error.prototype); - return ObjectUnsubscribedErrorImpl; -})(); -const ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl; -//# sourceMappingURL=ObjectUnsubscribedError.js.map - -/***/ }), - -/***/ "A3iJ": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/partition.js ***! - \********************************************************************/ -/*! exports provided: partition */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; }); -/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/not */ "F97/"); -/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "pLZG"); - - -function partition(predicate, thisArg) { - return (source) => [ - Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(predicate, thisArg)(source), - Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(source) - ]; -} -//# sourceMappingURL=partition.js.map - -/***/ }), - -/***/ "BFxc": -/*!*******************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/takeLast.js ***! - \*******************************************************************/ -/*! exports provided: takeLast */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return takeLast; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); -/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "4I5i"); -/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/empty */ "EY2u"); - - - -function takeLast(count) { - return function takeLastOperatorFunction(source) { - if (count === 0) { - return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])(); - } - else { - return source.lift(new TakeLastOperator(count)); - } - }; -} -class TakeLastOperator { - constructor(total) { - this.total = total; - if (this.total < 0) { - throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__["ArgumentOutOfRangeError"]; - } - } - call(subscriber, source) { - return source.subscribe(new TakeLastSubscriber(subscriber, this.total)); - } -} -class TakeLastSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, total) { - super(destination); - this.total = total; - this.ring = new Array(); - this.count = 0; - } - _next(value) { - const ring = this.ring; - const total = this.total; - const count = this.count++; - if (ring.length < total) { - ring.push(value); - } - else { - const index = count % total; - ring[index] = value; - } - } - _complete() { - const destination = this.destination; - let count = this.count; - if (count > 0) { - const total = this.count >= this.total ? this.total : this.count; - const ring = this.ring; - for (let i = 0; i < total; i++) { - const idx = (count++) % total; - destination.next(ring[idx]); - } - } - destination.complete(); - } -} -//# sourceMappingURL=takeLast.js.map - -/***/ }), - -/***/ "CMyj": -/*!****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/isIterable.js ***! - \****************************************************************/ -/*! exports provided: isIterable */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIterable", function() { return isIterable; }); -/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/iterator */ "Lhse"); - -function isIterable(input) { - return input && typeof input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]] === 'function'; -} -//# sourceMappingURL=isIterable.js.map - -/***/ }), - -/***/ "CRDf": -/*!***************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToObservable.js ***! - \***************************************************************************/ -/*! exports provided: subscribeToObservable */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToObservable", function() { return subscribeToObservable; }); -/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/observable */ "kJWO"); - -const subscribeToObservable = (obj) => (subscriber) => { - const obs = obj[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]](); - if (typeof obs.subscribe !== 'function') { - throw new TypeError('Provided object does not correctly implement Symbol.observable'); - } - else { - return obs.subscribe(subscriber); - } -}; -//# sourceMappingURL=subscribeToObservable.js.map - -/***/ }), - -/***/ "Cfvw": -/*!****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/from.js ***! - \****************************************************************/ -/*! exports provided: from */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "from", function() { return from; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/subscribeTo */ "SeVD"); -/* harmony import */ var _scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduled/scheduled */ "7HRe"); - - - -function from(input, scheduler) { - if (!scheduler) { - if (input instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) { - return input; - } - return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(input)); - } - else { - return Object(_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__["scheduled"])(input, scheduler); - } -} -//# sourceMappingURL=from.js.map - -/***/ }), - -/***/ "CqXF": -/*!****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/mapTo.js ***! - \****************************************************************/ -/*! exports provided: mapTo */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return mapTo; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); - -function mapTo(value) { - return (source) => source.lift(new MapToOperator(value)); -} -class MapToOperator { - constructor(value) { - this.value = value; - } - call(subscriber, source) { - return source.subscribe(new MapToSubscriber(subscriber, this.value)); - } -} -class MapToSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, value) { - super(destination); - this.value = value; - } - _next(x) { - this.destination.next(this.value); - } -} -//# sourceMappingURL=mapTo.js.map - -/***/ }), - -/***/ "D0XW": -/*!****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/scheduler/async.js ***! - \****************************************************************/ -/*! exports provided: asyncScheduler, async */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asyncScheduler", function() { return asyncScheduler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "async", function() { return async; }); -/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncAction */ "3N8a"); -/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncScheduler */ "IjjT"); - - -const asyncScheduler = new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"](_AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"]); -const async = asyncScheduler; -//# sourceMappingURL=async.js.map - -/***/ }), - -/***/ "DH7j": -/*!*************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/isArray.js ***! - \*************************************************************/ -/*! exports provided: isArray */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return isArray; }); -const isArray = (() => Array.isArray || ((x) => x && typeof x.length === 'number'))(); -//# sourceMappingURL=isArray.js.map - -/***/ }), - -/***/ "EQ5u": -/*!*********************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/ConnectableObservable.js ***! - \*********************************************************************************/ -/*! exports provided: ConnectableObservable, connectableObservableDescriptor */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return ConnectableObservable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "connectableObservableDescriptor", function() { return connectableObservableDescriptor; }); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Subscription */ "quSY"); -/* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../operators/refCount */ "x+ZX"); - - - - - -class ConnectableObservable extends _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"] { - constructor(source, subjectFactory) { - super(); - this.source = source; - this.subjectFactory = subjectFactory; - this._refCount = 0; - this._isComplete = false; - } - _subscribe(subscriber) { - return this.getSubject().subscribe(subscriber); - } - getSubject() { - const subject = this._subject; - if (!subject || subject.isStopped) { - this._subject = this.subjectFactory(); - } - return this._subject; - } - connect() { - let connection = this._connection; - if (!connection) { - this._isComplete = false; - connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"](); - connection.add(this.source - .subscribe(new ConnectableSubscriber(this.getSubject(), this))); - if (connection.closed) { - this._connection = null; - connection = _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY; - } - } - return connection; - } - refCount() { - return Object(_operators_refCount__WEBPACK_IMPORTED_MODULE_4__["refCount"])()(this); - } -} -const connectableObservableDescriptor = (() => { - const connectableProto = ConnectableObservable.prototype; - return { - operator: { value: null }, - _refCount: { value: 0, writable: true }, - _subject: { value: null, writable: true }, - _connection: { value: null, writable: true }, - _subscribe: { value: connectableProto._subscribe }, - _isComplete: { value: connectableProto._isComplete, writable: true }, - getSubject: { value: connectableProto.getSubject }, - connect: { value: connectableProto.connect }, - refCount: { value: connectableProto.refCount } - }; -})(); -class ConnectableSubscriber extends _Subject__WEBPACK_IMPORTED_MODULE_0__["SubjectSubscriber"] { - constructor(destination, connectable) { - super(destination); - this.connectable = connectable; - } - _error(err) { - this._unsubscribe(); - super._error(err); - } - _complete() { - this.connectable._isComplete = true; - this._unsubscribe(); - super._complete(); - } - _unsubscribe() { - const connectable = this.connectable; - if (connectable) { - this.connectable = null; - const connection = connectable._connection; - connectable._refCount = 0; - connectable._subject = null; - connectable._connection = null; - if (connection) { - connection.unsubscribe(); - } - } - } -} -class RefCountOperator { - constructor(connectable) { - this.connectable = connectable; - } - call(subscriber, source) { - const { connectable } = this; - connectable._refCount++; - const refCounter = new RefCountSubscriber(subscriber, connectable); - const subscription = source.subscribe(refCounter); - if (!refCounter.closed) { - refCounter.connection = connectable.connect(); - } - return subscription; - } -} -class RefCountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"] { - constructor(destination, connectable) { - super(destination); - this.connectable = connectable; - } - _unsubscribe() { - const { connectable } = this; - if (!connectable) { - this.connection = null; - return; - } - this.connectable = null; - const refCount = connectable._refCount; - if (refCount <= 0) { - this.connection = null; - return; - } - connectable._refCount = refCount - 1; - if (refCount > 1) { - this.connection = null; - return; - } - const { connection } = this; - const sharedConnection = connectable._connection; - this.connection = null; - if (sharedConnection && (!connection || sharedConnection === connection)) { - sharedConnection.unsubscribe(); - } - } -} -//# sourceMappingURL=ConnectableObservable.js.map - -/***/ }), - -/***/ "EY2u": -/*!*****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/empty.js ***! - \*****************************************************************/ -/*! exports provided: EMPTY, empty */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return EMPTY; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); - -const EMPTY = new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => subscriber.complete()); -function empty(scheduler) { - return scheduler ? emptyScheduled(scheduler) : EMPTY; -} -function emptyScheduled(scheduler) { - return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => scheduler.schedule(() => subscriber.complete())); -} -//# sourceMappingURL=empty.js.map - -/***/ }), - -/***/ "F97/": -/*!*********************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/not.js ***! - \*********************************************************/ -/*! exports provided: not */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "not", function() { return not; }); -function not(pred, thisArg) { - function notPred() { - return !(notPred.pred.apply(notPred.thisArg, arguments)); - } - notPred.pred = pred; - notPred.thisArg = thisArg; - return notPred; -} -//# sourceMappingURL=not.js.map - -/***/ }), - -/***/ "FD9M": -/*!***********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferToggle.js ***! - \***********************************************************************/ -/*! exports provided: bufferToggle */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return bufferToggle; }); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscription */ "quSY"); -/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/subscribeToResult */ "ZUHj"); -/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OuterSubscriber */ "l7GE"); - - - -function bufferToggle(openings, closingSelector) { - return function bufferToggleOperatorFunction(source) { - return source.lift(new BufferToggleOperator(openings, closingSelector)); - }; -} -class BufferToggleOperator { - constructor(openings, closingSelector) { - this.openings = openings; - this.closingSelector = closingSelector; - } - call(subscriber, source) { - return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector)); - } -} -class BufferToggleSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"] { - constructor(destination, openings, closingSelector) { - super(destination); - this.closingSelector = closingSelector; - this.contexts = []; - this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, openings)); - } - _next(value) { - const contexts = this.contexts; - const len = contexts.length; - for (let i = 0; i < len; i++) { - contexts[i].buffer.push(value); - } - } - _error(err) { - const contexts = this.contexts; - while (contexts.length > 0) { - const context = contexts.shift(); - context.subscription.unsubscribe(); - context.buffer = null; - context.subscription = null; - } - this.contexts = null; - super._error(err); - } - _complete() { - const contexts = this.contexts; - while (contexts.length > 0) { - const context = contexts.shift(); - this.destination.next(context.buffer); - context.subscription.unsubscribe(); - context.buffer = null; - context.subscription = null; - } - this.contexts = null; - super._complete(); - } - notifyNext(outerValue, innerValue) { - outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue); - } - notifyComplete(innerSub) { - this.closeBuffer(innerSub.context); - } - openBuffer(value) { - try { - const closingSelector = this.closingSelector; - const closingNotifier = closingSelector.call(this, value); - if (closingNotifier) { - this.trySubscribe(closingNotifier); - } - } - catch (err) { - this._error(err); - } - } - closeBuffer(context) { - const contexts = this.contexts; - if (contexts && context) { - const { buffer, subscription } = context; - this.destination.next(buffer); - contexts.splice(contexts.indexOf(context), 1); - this.remove(subscription); - subscription.unsubscribe(); - } - } - trySubscribe(closingNotifier) { - const contexts = this.contexts; - const buffer = []; - const subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_0__["Subscription"](); - const context = { buffer, subscription }; - contexts.push(context); - const innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, closingNotifier, context); - if (!innerSubscription || innerSubscription.closed) { - this.closeBuffer(context); - } - else { - innerSubscription.context = context; - this.add(innerSubscription); - subscription.add(innerSubscription); - } - } -} -//# sourceMappingURL=bufferToggle.js.map - -/***/ }), - -/***/ "FQpF": -/*!*****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/expand.js ***! - \*****************************************************************/ -/*! exports provided: expand, ExpandOperator, ExpandSubscriber */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return expand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandOperator", function() { return ExpandOperator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandSubscriber", function() { return ExpandSubscriber; }); -/* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); - -function expand(project, concurrent = Number.POSITIVE_INFINITY, scheduler) { - concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent; - return (source) => source.lift(new ExpandOperator(project, concurrent, scheduler)); -} -class ExpandOperator { - constructor(project, concurrent, scheduler) { - this.project = project; - this.concurrent = concurrent; - this.scheduler = scheduler; - } - call(subscriber, source) { - return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler)); - } -} -class ExpandSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { - constructor(destination, project, concurrent, scheduler) { - super(destination); - this.project = project; - this.concurrent = concurrent; - this.scheduler = scheduler; - this.index = 0; - this.active = 0; - this.hasCompleted = false; - if (concurrent < Number.POSITIVE_INFINITY) { - this.buffer = []; - } - } - static dispatch(arg) { - const { subscriber, result, value, index } = arg; - subscriber.subscribeToProjection(result, value, index); - } - _next(value) { - const destination = this.destination; - if (destination.closed) { - this._complete(); - return; - } - const index = this.index++; - if (this.active < this.concurrent) { - destination.next(value); - try { - const { project } = this; - const result = project(value, index); - if (!this.scheduler) { - this.subscribeToProjection(result, value, index); - } - else { - const state = { subscriber: this, result, value, index }; - const destination = this.destination; - destination.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state)); - } - } - catch (e) { - destination.error(e); - } - } - else { - this.buffer.push(value); - } - } - subscribeToProjection(result, value, index) { - this.active++; - const destination = this.destination; - destination.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(result, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this))); - } - _complete() { - this.hasCompleted = true; - if (this.hasCompleted && this.active === 0) { - this.destination.complete(); - } - this.unsubscribe(); - } - notifyNext(innerValue) { - this._next(innerValue); - } - notifyComplete() { - const buffer = this.buffer; - this.active--; - if (buffer && buffer.length > 0) { - this._next(buffer.shift()); - } - if (this.hasCompleted && this.active === 0) { - this.destination.complete(); - } - } -} -//# sourceMappingURL=expand.js.map - -/***/ }), - -/***/ "FZB8": -/*!**************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/min.js ***! - \**************************************************************/ -/*! exports provided: min */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; }); -/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduce */ "128B"); - -function min(comparer) { - const min = (typeof comparer === 'function') - ? (x, y) => comparer(x, y) < 0 ? x : y - : (x, y) => x < y ? x : y; - return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(min); -} -//# sourceMappingURL=min.js.map - -/***/ }), - -/***/ "GJmQ": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/takeWhile.js ***! - \********************************************************************/ -/*! exports provided: takeWhile */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return takeWhile; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); - -function takeWhile(predicate, inclusive = false) { - return (source) => source.lift(new TakeWhileOperator(predicate, inclusive)); -} -class TakeWhileOperator { - constructor(predicate, inclusive) { - this.predicate = predicate; - this.inclusive = inclusive; - } - call(subscriber, source) { - return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive)); - } -} -class TakeWhileSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, predicate, inclusive) { - super(destination); - this.predicate = predicate; - this.inclusive = inclusive; - this.index = 0; - } - _next(value) { - const destination = this.destination; - let result; - try { - result = this.predicate(value, this.index++); - } - catch (err) { - destination.error(err); - return; - } - this.nextOrComplete(value, result); - } - nextOrComplete(value, predicateResult) { - const destination = this.destination; - if (Boolean(predicateResult)) { - destination.next(value); - } - else { - if (this.inclusive) { - destination.next(value); - } - destination.complete(); - } - } -} -//# sourceMappingURL=takeWhile.js.map - -/***/ }), - -/***/ "Gi4w": -/*!****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/every.js ***! - \****************************************************************/ -/*! exports provided: every */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "every", function() { return every; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); - -function every(predicate, thisArg) { - return (source) => source.lift(new EveryOperator(predicate, thisArg, source)); -} -class EveryOperator { - constructor(predicate, thisArg, source) { - this.predicate = predicate; - this.thisArg = thisArg; - this.source = source; - } - call(observer, source) { - return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source)); - } -} -class EverySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, predicate, thisArg, source) { - super(destination); - this.predicate = predicate; - this.thisArg = thisArg; - this.source = source; - this.index = 0; - this.thisArg = thisArg || this; - } - notifyComplete(everyValueMatch) { - this.destination.next(everyValueMatch); - this.destination.complete(); - } - _next(value) { - let result = false; - try { - result = this.predicate.call(this.thisArg, value, this.index++, this.source); - } - catch (err) { - this.destination.error(err); - return; - } - if (!result) { - this.notifyComplete(false); - } - } - _complete() { - this.notifyComplete(true); - } -} -//# sourceMappingURL=every.js.map - -/***/ }), - -/***/ "GjHo": -/*!**************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/zip.js ***! - \**************************************************************/ -/*! exports provided: zip */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; }); -/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/zip */ "1uah"); - -function zip(...observables) { - return function zipOperatorFunction(source) { - return source.lift.call(Object(_observable_zip__WEBPACK_IMPORTED_MODULE_0__["zip"])(source, ...observables)); - }; -} -//# sourceMappingURL=zip.js.map - -/***/ }), - -/***/ "Gqsl": -/*!*********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/repeatWhen.js ***! - \*********************************************************************/ -/*! exports provided: repeatWhen */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return repeatWhen; }); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); -/* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); - - -function repeatWhen(notifier) { - return (source) => source.lift(new RepeatWhenOperator(notifier)); -} -class RepeatWhenOperator { - constructor(notifier) { - this.notifier = notifier; - } - call(subscriber, source) { - return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source)); - } -} -class RepeatWhenSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleOuterSubscriber"] { - constructor(destination, notifier, source) { - super(destination); - this.notifier = notifier; - this.source = source; - this.sourceIsBeingSubscribedTo = true; - } - notifyNext() { - this.sourceIsBeingSubscribedTo = true; - this.source.subscribe(this); - } - notifyComplete() { - if (this.sourceIsBeingSubscribedTo === false) { - return super.complete(); - } - } - complete() { - this.sourceIsBeingSubscribedTo = false; - if (!this.isStopped) { - if (!this.retries) { - this.subscribeToRetries(); - } - if (!this.retriesSubscription || this.retriesSubscription.closed) { - return super.complete(); - } - this._unsubscribeAndRecycle(); - this.notifications.next(undefined); - } - } - _unsubscribe() { - const { notifications, retriesSubscription } = this; - if (notifications) { - notifications.unsubscribe(); - this.notifications = undefined; - } - if (retriesSubscription) { - retriesSubscription.unsubscribe(); - this.retriesSubscription = undefined; - } - this.retries = undefined; - } - _unsubscribeAndRecycle() { - const { _unsubscribe } = this; - this._unsubscribe = null; - super._unsubscribeAndRecycle(); - this._unsubscribe = _unsubscribe; - return this; - } - subscribeToRetries() { - this.notifications = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); - let retries; - try { - const { notifier } = this; - retries = notifier(this.notifications); - } - catch (e) { - return super.complete(); - } - this.retries = retries; - this.retriesSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["innerSubscribe"])(retries, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleInnerSubscriber"](this)); - } -} -//# sourceMappingURL=repeatWhen.js.map - -/***/ }), - -/***/ "GyhO": -/*!******************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/concat.js ***! - \******************************************************************/ -/*! exports provided: concat */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; }); -/* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./of */ "LRne"); -/* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../operators/concatAll */ "0EUg"); - - -function concat(...observables) { - return Object(_operators_concatAll__WEBPACK_IMPORTED_MODULE_1__["concatAll"])()(Object(_of__WEBPACK_IMPORTED_MODULE_0__["of"])(...observables)); -} -//# sourceMappingURL=concat.js.map - -/***/ }), - -/***/ "HDdC": -/*!***********************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/Observable.js ***! - \***********************************************************/ -/*! exports provided: Observable */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return Observable; }); -/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/canReportError */ "8Qeq"); -/* harmony import */ var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/toSubscriber */ "WyKG"); -/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./symbol/observable */ "kJWO"); -/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/pipe */ "mCNh"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./config */ "2fFW"); - - - - - -class Observable { - constructor(subscribe) { - this._isScalar = false; - if (subscribe) { - this._subscribe = subscribe; - } - } - lift(operator) { - const observable = new Observable(); - observable.source = this; - observable.operator = operator; - return observable; - } - subscribe(observerOrNext, error, complete) { - const { operator } = this; - const sink = Object(_util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__["toSubscriber"])(observerOrNext, error, complete); - if (operator) { - sink.add(operator.call(sink, this.source)); - } - else { - sink.add(this.source || (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ? - this._subscribe(sink) : - this._trySubscribe(sink)); - } - if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) { - if (sink.syncErrorThrowable) { - sink.syncErrorThrowable = false; - if (sink.syncErrorThrown) { - throw sink.syncErrorValue; - } - } - } - return sink; - } - _trySubscribe(sink) { - try { - return this._subscribe(sink); - } - catch (err) { - if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) { - sink.syncErrorThrown = true; - sink.syncErrorValue = err; - } - if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_0__["canReportError"])(sink)) { - sink.error(err); - } - else { - console.warn(err); - } - } - } - forEach(next, promiseCtor) { - promiseCtor = getPromiseCtor(promiseCtor); - return new promiseCtor((resolve, reject) => { - let subscription; - subscription = this.subscribe((value) => { - try { - next(value); - } - catch (err) { - reject(err); - if (subscription) { - subscription.unsubscribe(); - } - } - }, reject, resolve); - }); - } - _subscribe(subscriber) { - const { source } = this; - return source && source.subscribe(subscriber); - } - [_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]]() { - return this; - } - pipe(...operations) { - if (operations.length === 0) { - return this; - } - return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipeFromArray"])(operations)(this); - } - toPromise(promiseCtor) { - promiseCtor = getPromiseCtor(promiseCtor); - return new promiseCtor((resolve, reject) => { - let value; - this.subscribe((x) => value = x, (err) => reject(err), () => resolve(value)); - }); - } -} -Observable.create = (subscribe) => { - return new Observable(subscribe); -}; -function getPromiseCtor(promiseCtor) { - if (!promiseCtor) { - promiseCtor = _config__WEBPACK_IMPORTED_MODULE_4__["config"].Promise || Promise; - } - if (!promiseCtor) { - throw new Error('no Promise impl found'); - } - return promiseCtor; -} -//# sourceMappingURL=Observable.js.map - -/***/ }), - -/***/ "HdWj": -/*!************************************************************************!*\ - !*** ./node_modules/dynamsoft-camera-enhancer/dist/dce.browser.esm.js ***! - \************************************************************************/ -/*! exports provided: CameraEnhancer */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CameraEnhancer", function() { return i; }); -/*! - * Dynamsoft JavaScript Library - * @product Dynamsoft Camera Enhancer JS Edition - * @website https://www.dynamsoft.com - * @copyright Copyright 2022, Dynamsoft Corporation - * @author Dynamsoft - * @version 2.3.1 (js 20220321) - * @fileoverview Dynamsoft JavaScript Library for Camera Enhancer - * More info on DCE JS: https://www.dynamsoft.com/camera-enhancer/docs/programming/javascript/?ver=latest - */ -function e(e,t,i,o){return new(i||(i=Promise))((function(r,s){function n(e){try{h(o.next(e))}catch(e){s(e)}}function a(e){try{h(o.throw(e))}catch(e){s(e)}}function h(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(n,a)}h((o=o.apply(e,t||[])).next())}))}"object"==typeof global&&global.process&&global.process.release&&global.process.release.name;const t="undefined"==typeof self;class i{constructor(){this._maxCvsSideLength=void 0,this._defaultMaxCvsSideLength=null,this.predefinedResolutions=[{width:160,height:120},{width:320,height:240},{width:480,height:360},{width:640,height:480},{width:800,height:600},{width:960,height:720},{width:1280,height:720},{width:1920,height:1080},{width:2560,height:1440},{width:3840,height:2160}],this.mapCameraResolutions=new Map,this._bWebGLSupported=!0,this._singleFrameMode=!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia),this._cvsSingleFrameMode=null,this._imgWidth=0,this._imgHeight=0,this._singleFrameModeIpt=null,this._clickIptSingleFrameMode=()=>{if(this.singleFrameMode){if(!this._singleFrameModeIpt){const t=document.createElement("input");this._singleFrameModeIpt=t,t.setAttribute("type","file"),t.setAttribute("accept",".jpg,.jpeg,.icon,.gif,.svg,.webp,.png,.bmp"),t.setAttribute("capture",""),t.addEventListener("change",(()=>e(this,void 0,void 0,(function*(){const o=t.files[0];t.value="";const r=yield(t=>e(this,void 0,void 0,(function*(){let e=null,i=null;if("undefined"!=typeof createImageBitmap)try{if(e=yield createImageBitmap(t),e)return e}catch(e){}var o;return e||(i=yield(o=t,new Promise(((e,t)=>{let i=URL.createObjectURL(o),r=new Image;r.dbrObjUrl=i,r.src=i,r.onload=()=>{e(r)},r.onerror=e=>{t(new Error("Can't convert blob to image : "+(e instanceof Event?e.type:e)))}})))),i})))(o),s=r instanceof HTMLImageElement?r.naturalWidth:r.width,n=r instanceof HTMLImageElement?r.naturalHeight:r.height;this._imgWidth=s,this._imgHeight=n;(e=>{if(!this._cvsSingleFrameMode){if(this._cvsSingleFrameMode=document.createElement("canvas"),this._cvsSingleFrameMode.className="cvs-single-frame-mode",this._cvsSingleFrameMode.addEventListener("click",this._clickIptSingleFrameMode),this._cvsSingleFrameMode.style.cursor="pointer",this._cvsSingleFrameMode.setAttribute("title","Take a photo"),!this._video)throw new Error("'video' is null.");this._video.after(this._cvsSingleFrameMode)}const t=this._cvsSingleFrameMode;t.style.position="absolute",t.style.width="100%",t.style.height="100%",t.style.left="0",t.style.top="0",t.style.objectFit="contain",t.width==s&&t.height==n||(t.width=s,t.height=n);let i=t.getContext("2d");i.clearRect(0,0,t.width,t.height),i.drawImage(e,0,0)})(r),this._updateScanRegionCanvas(),this._updateScanAreaDiv(),this._updateViewDecorator();for(let e of this._arrScanRegionOverlays)e&&this._updateScanRegionOverlay(e);const a=(e=>{const t=Date.now();if(0===s||0===n)return null;const o=this._scanRegion,r=this.getFrameSize(s,n,o,this.maxCvsSideLength);if(!r)return null;let a,h;a=s!==r.sWidth||n!==r.sHeight,h=r.sWidth!==r.dWidth||r.sHeight!==r.dHeight;const l=(()=>!(!this._bWebGLSupported||h))(),d={data:null,region:o?JSON.parse(JSON.stringify(o)):null,sx:r.sx,sy:r.sy,width:r.dWidth,height:r.dHeight,colorMode:null,timeSpent:null,timeStamp:null,isCropped:a,toCanvas:this.toCanvas,_bUseWebGL:null},g=this._getImageData(e,s,n,r,null,{targetColorMode:this.frameColorMode,bUseWebGL:l});if(!g)return null;const c=Date.now();return i._onLog&&i._onLog("DCE: _getVideoFrame(region?) END: "+c),d.data=g.data,d.colorMode=g.colorMode,d._bUseWebGL=g._bUseWebGL,d.timeSpent=c-t,d.timeStamp=c,d})(r),h=this.mapCameraEvents.get("singleFrameAcquired");for(let e of h)try{const t={data:new Uint8Array(a.data),region:JSON.parse(JSON.stringify(a.region)),sx:a.sx,sy:a.sy,width:a.width,height:a.height,colorMode:a.colorMode,timeSpent:a.timeSpent,timeStamp:a.timeStamp,isCropped:a.isCropped,toCanvas:a.toCanvas,_bUseWebGL:a._bUseWebGL};yield e(t)}catch(e){console.error(e)}})))),t.style.position="fixed",t.style.left="-1px",t.style.top="-1px",t.style.width="1px",t.style.height="1px",t.style.backgroundColor="transparent",t.style.color="transparent",document.body.appendChild(t)}this._singleFrameModeIpt.click()}},this.styleEls=[],this._frameColorMode=void 0,this._defaultFrameColorMode="RGBA",this.currentFSColorMode="rgba",this.ifReuseArrayBufferView=!1,this.maxVideoCvsLength=3,this.canvas=null,this.videoGlCvs=null,this.videoGl=null,this.glImgData=null,this.webglTexture=null,this.webglProgramInfo=null,this.webglBuffers=null,this.toCanvas=function(){const e=document.createElement("canvas");let t;if(e.width=this.width,e.height=this.height,"grey"===this.colorMode){t=new Uint8ClampedArray(this.width*this.height*4);for(let e=0;ee(this,void 0,void 0,(function*(){yield this.selectCamera(this._selCam.value),this._bOpen||this.stop()})),this._onResolutionSelChange=()=>e(this,void 0,void 0,(function*(){let e,t;if(this._selRsl&&-1!=this._selRsl.selectedIndex){let i=this._selRsl.options[this._selRsl.selectedIndex];e=i.getAttribute("data-width"),t=i.getAttribute("data-height")}yield this.setResolution(e,t),this._bOpen||this.stop()})),this._onCloseBtnClick=()=>{this.close(!0)},this._bOpen=!1,this.videoSrc=null,this.videoSettings={video:{width:{ideal:1280},height:{ideal:720},facingMode:{ideal:"environment"}}},this.iPlayRound=0,this.promisePlay=null,this._ifSaveLastUsedCamera=!1,this.ifSkipCameraInspection=!1,this._allCameras=[],this._currentCamera=null,this._videoTrack=null,this._lastDeviceId=void 0,this._vc_bPlayingVideoBeforeHide=!1,this._ev_documentHideEvent=()=>{"visible"===document.visibilityState?this._vc_bPlayingVideoBeforeHide&&("Firefox"==i.browserInfo.browser?this.play():this._video.play(),this._vc_bPlayingVideoBeforeHide=!1):this._video&&!this._video.paused&&(this._vc_bPlayingVideoBeforeHide=!0,this._video.pause())},this._video=null,this.videoFit="contain",this._cvsScanRegion=null,this._divScanArea=null,this._divScanLight=null,this._bgLoading=null,this._selCam=null,this._bgCamera=null,this._selRsl=null,this._optGotRsl=null,this._btnClose=null,this.regionMaskFillStyle="rgba(0,0,0,0.5)",this.regionMaskStrokeStyle="rgb(254,142,20)",this.regionMaskLineWidth=2,this._bShowScanRegionMask=!0,this._bShowScanRegionLaser=!1,this._scanRegion=null,this._arrScanRegionOverlays=[],this._cvsViewDecorator=null,this._decoratorType=[],this._decoratorArea=null,this._viewDecoratorInfo={rectangle:{lineWidth:4,strokeStyle:"rgb(254,142,20)",fillStyle:"transparent",maskFillStyle:"transparent"},focus:{lineWidth:4,strokeStyle:"rgb(254,142,20)",fillStyle:"transparent",maskFillStyle:"transparent"},crossline:{lineWidth:2,strokeStyle:"rgb(254,142,20)"},crosshair:{lineWidth:4,strokeStyle:"rgb(254,142,20)"}},this._croppingRegions=void 0,this._defaultCroppingRegions=[null],this.bIncreaseRegionIndexAuto=!0,this._croppingRegionIndex=0,this._loopInterval=void 0,this._defaultLoopInterval=0,this._maxNumberOfFramesInBuffer=void 0,this._defaultMaxNumberOfFramesInBuffer=1,this._frameQueue=[],this._bFetchingLoopStarted=!1,this._bStoppedByPause=!1,this._refreshInterval=void 0,this._defaultRefreshInterval=-1,this._updateCanvasTimeout=500,this.referenceConfigurationArray=[],this._onWindowResize=()=>{this._resizeTimeoutId&&clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=setTimeout((()=>{this._updateScanRegionCanvas(),this._updateScanAreaDiv(),this._updateViewDecorator();for(let e of this._arrScanRegionOverlays)e&&this._updateScanRegionOverlay(e)}),this._updateCanvasTimeout)},this.bDestroyed=!1,this.mapCameraEvents=new Map([["cameraOpen",[]],["cameraClose",[]],["cameraChange",[]],["resolutionChange",[]],["played",[]],["singleFrameAcquired",[]],["frameAddedToBuffer",[]]])}static getVersion(){return this._version}static detectEnvironment(){return e(this,void 0,void 0,(function*(){let e={wasm:"undefined"!=typeof WebAssembly&&("undefined"==typeof navigator||!(/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&/\(.+\s11_2_([2-6]).*\)/.test(navigator.userAgent))),worker:!("undefined"==typeof Worker),getUserMedia:!("undefined"==typeof navigator||!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia),camera:!1,browser:this.browserInfo.browser,version:this.browserInfo.version,OS:this.browserInfo.OS};if(e.getUserMedia)try{(yield navigator.mediaDevices.getUserMedia({video:!0})).getTracks().forEach((e=>{e.stop()})),e.camera=!0}catch(e){}return e}))}static set engineResourcePath(e){if(this._hasEngineResourceLoaded)throw new Error("`engineResourcePath` is not allowed to change after `createInstance` is called.");if(null==e&&(e="./"),t)i._engineResourcePath=e;else{let t=document.createElement("a");t.href=e,i._engineResourcePath=t.href}this._engineResourcePath.endsWith("/")||(i._engineResourcePath+="/")}static get engineResourcePath(){return this._engineResourcePath}static isStorageAvailable(e){let t;try{t=window[e];const i="__storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&t&&0!==t.length}}set maxCvsSideLength(e){if(e<=0)throw new Error("The 'maxCvsSideLength' should be greater than 0.");this._maxCvsSideLength=e}get maxCvsSideLength(){return void 0!==this._maxCvsSideLength?this._maxCvsSideLength:this.referenceConfigurationArray&&1===this.referenceConfigurationArray.length&&this.referenceConfigurationArray[0].hasOwnProperty("maxCvsSideLength")?this.referenceConfigurationArray[0].maxCvsSideLength:this._defaultMaxCvsSideLength}static set defaultUIElementURL(e){i._defaultUIElementURL=e}static get defaultUIElementURL(){var e;return null===(e=i._defaultUIElementURL)||void 0===e?void 0:e.replace("@engineResourcePath/",i.engineResourcePath)}getUIElement(){return this.UIElement}setUIElement(t){return e(this,void 0,void 0,(function*(){if(this._bOpen)throw new Error("It is not allowed to change the UIElement when the camera is open.");if("string"==typeof t||t instanceof String){if(!t.trim().startsWith("<")){let e=yield fetch(t);if(!e.ok)throw Error("setUIElement(elementOrUrl): Network Error: "+e.statusText);t=yield e.text()}if(!t.trim().startsWith("<"))throw Error("setUIElement(elementOrUrl): Can't get valid HTMLElement.");let e=document.createElement("div");e.innerHTML=t;for(let t=0;t','','',''].join(""),this._optGotRsl=this._optGotRsl||this._selRsl.options[0])):!this._optGotRsl&&t.classList.contains("dce-opt-gotResolution")?this._optGotRsl=t:!this._btnClose&&t.classList.contains("dce-btn-close")&&(this._btnClose=t);if(!this._video)throw this._unbindUI(),Error("Can not find the video container element with class 'dce-video-container'");this.singleFrameMode?(this._video&&(this._video.addEventListener("click",this._clickIptSingleFrameMode),this._video.style.cursor="pointer",this._video.setAttribute("title","Take a photo")),this._divScanArea&&(this._divScanArea.addEventListener("click",this._clickIptSingleFrameMode),this._divScanArea.style.cursor="pointer",this._divScanArea.setAttribute("title","Take a photo")),this._bgCamera&&(this._bgCamera.style.display="")):this._bgLoading&&(this._bgLoading.style.display=""),this._selCam&&this._selCam.addEventListener("change",this._onCameraSelChange),this._selRsl&&this._selRsl.addEventListener("change",this._onResolutionSelChange),this._btnClose&&this._btnClose.addEventListener("click",this._onCloseBtnClick),document.addEventListener("visibilitychange",this._ev_documentHideEvent),window.addEventListener("resize",this._onWindowResize)}_unbindUI(){this.singleFrameMode?(this._video&&(this._video.removeEventListener("click",this._clickIptSingleFrameMode),this._video.style.cursor="",this._video.removeAttribute("title")),this._divScanArea&&(this._divScanArea.removeEventListener("click",this._clickIptSingleFrameMode),this._divScanArea.style.cursor="",this._divScanArea.removeAttribute("title")),this._bgCamera&&(this._bgCamera.style.display="none")):this._bgLoading&&(this._bgLoading.style.display="none"),this._selCam&&this._selCam.removeEventListener("change",this._onCameraSelChange),this._selRsl&&this._selRsl.removeEventListener("change",this._onResolutionSelChange),this._btnClose&&this._btnClose.removeEventListener("click",this._onCloseBtnClick),this._cvsViewDecorator&&(this._cvsViewDecorator.removeEventListener("click",this._clickIptSingleFrameMode),this._cvsViewDecorator.style.cursor="",this._cvsViewDecorator.removeAttribute("title"));for(let e of this._arrScanRegionOverlays)e&&(e.removeEventListener("click",this._clickIptSingleFrameMode),e.style.cursor="",e.removeAttribute("title"));this.hideScanRegionLaser(),this.hideViewDecorator(),this.hideScanRegionOverlays(),this._video&&(this._video.onloadedmetadata=null,this._video.remove()),this._video=null,this._selCam=null,this._selRsl=null,this._optGotRsl=null,this._btnClose=null,this._divScanArea=null,this._divScanLight=null,this._cvsScanRegion&&(this._cvsScanRegion.remove(),this._cvsScanRegion=null),this._singleFrameModeIpt&&(this._singleFrameModeIpt.remove(),this._singleFrameModeIpt=null),this._cvsSingleFrameMode&&(this._cvsSingleFrameMode.remove(),this._cvsSingleFrameMode=null),document.removeEventListener("visibilitychange",this._ev_documentHideEvent),window.removeEventListener("resize",this._onWindowResize)}set bOpen(e){if(this._bOpen=e,e){this._updateScanRegionCanvas(),this._updateScanAreaDiv(),this._updateViewDecorator();for(let e of this._arrScanRegionOverlays)e&&this._updateScanRegionOverlay(e);this._bShowScanRegionMask?this.showScanRegionMask():this.hideScanRegionMask(),this._bShowScanRegionLaser?this.showScanRegionLaser():this.hideScanRegionLaser(),this.showViewDecorator(),this._cvsViewDecorator&&(this._cvsViewDecorator.addEventListener("click",this._clickIptSingleFrameMode),this._cvsViewDecorator.style.cursor="pointer",this._cvsViewDecorator.setAttribute("title","Take a photo")),this.showScanRegionOverlays();for(let e of this._arrScanRegionOverlays)e&&(e.addEventListener("click",this._clickIptSingleFrameMode),e.style.cursor="pointer",e.setAttribute("title","Take a photo"))}}_assertOpen(){if(!this._bOpen)throw Error("The camera is not open.")}set ifSaveLastUsedCamera(e){e?i.isStorageAvailable("localStorage")?this._ifSaveLastUsedCamera=!0:(this._ifSaveLastUsedCamera=!1,console.warn("Local storage is unavailable")):this._ifSaveLastUsedCamera=!1}get ifSaveLastUsedCamera(){return this._ifSaveLastUsedCamera}get video(){return this._video}setVideoFit(e){if(e=e.toLowerCase(),!["contain","cover"].includes(e))throw new Error(`It is not allowed to set '${e}'.`);if(this.videoFit=e,this._video&&(this._video.style.objectFit=e,!this.singleFrameMode)){this._updateScanRegionCanvas(),this._updateScanAreaDiv(),this._updateViewDecorator();for(let e of this._arrScanRegionOverlays)e&&this._updateScanRegionOverlay(e)}}getVideoFit(){return this.videoFit}set ifShowScanRegionMask(e){this._bShowScanRegionMask=e,e?this.showScanRegionMask():this.hideScanRegionMask()}get ifShowScanRegionMask(){return this._bShowScanRegionMask}showScanRegionMask(){this._cvsScanRegion&&"none"==this._cvsScanRegion.style.display&&(this._cvsScanRegion.style.display="")}hideScanRegionMask(){this._cvsScanRegion&&(this._cvsScanRegion.style.display="none")}set ifShowScanRegionLaser(e){this._bShowScanRegionLaser=e,e?this.showScanRegionLaser():this.hideScanRegionLaser()}get ifShowScanRegionLaser(){return this._bShowScanRegionLaser}showScanRegionLaser(){this._divScanLight&&"none"==this._divScanLight.style.display&&(this._divScanLight.style.display="")}hideScanRegionLaser(){this._divScanLight&&(this._divScanLight.style.display="none")}_checkValidRegion(e){return null===e||!!e&&(!!(e.hasOwnProperty("regionLeft")&&e.hasOwnProperty("regionTop")&&e.hasOwnProperty("regionRight")&&e.hasOwnProperty("regionBottom")&&e.hasOwnProperty("regionMeasuredByPercentage"))&&(!(e.regionLeft<0||e.regionTop<0||e.regionRight<0||e.regionBottom<0)&&(!e.regionMeasuredByPercentage||!(e.regionLeft>100||e.regionTop>100||e.regionRight>100||e.regionBottom>100))))}set scanRegion(e){if(!this._checkValidRegion(e))throw new Error("The region is invalid.");this._scanRegion=JSON.parse(JSON.stringify(e)),this._updateScanRegionCanvas(),this._updateScanAreaDiv();for(let e of this._arrScanRegionOverlays)e&&this._updateScanRegionOverlay(e)}setScanRegion(e){this.scanRegion=e}getScanRegion(){return JSON.parse(JSON.stringify(this._scanRegion))}addScanRegionOverlayCanvas(){this._assertOpen();const e=document.createElement("canvas");if(e.className="cvs-scan-region-overlay-"+this._arrScanRegionOverlays.length,this.singleFrameMode&&(e.addEventListener("click",this._clickIptSingleFrameMode),e.style.cursor="pointer",e.setAttribute("title","Take a photo")),this._updateScanRegionOverlay(e),this._arrScanRegionOverlays.length>0){const t=this._arrScanRegionOverlays.length;this._arrScanRegionOverlays[t-1].after(e)}else if(this._cvsScanRegion)this._cvsScanRegion.before(e);else if(this._cvsSingleFrameMode)this._cvsSingleFrameMode.after(e);else{if(!this._video)throw new Error("'video' is null.");this._video.after(e)}return this._arrScanRegionOverlays.push(e),e}_updateScanRegionOverlay(e){if(!e)return;let t,i,o;if(this.singleFrameMode)t=this._imgWidth,i=this._imgHeight,o="contain";else{if(!this._video)return;t=this._video.videoWidth,i=this._video.videoHeight,o=this.getVideoFit()}if(t<=0||i<=0)return e.width=0,void(e.height=0);const r=this._getRegionInPixels(t,i,this._scanRegion),s=r.regionRight-r.regionLeft,n=r.regionBottom-r.regionTop;e.width==s&&e.height==n||(e.width=s,e.height=n);const a=window.getComputedStyle(this._video),h=parseFloat(a.width),l=parseFloat(a.height),d=h/l,g=t/i;let c,u,v,_,f=1;if("contain"===o)d{const e=parseFloat(window.getComputedStyle(this._video).width),r=parseFloat(window.getComputedStyle(this._video).height);let s,n={regionBottom:i,regionRight:t,regionLeft:0,regionTop:0,regionMeasuredByPercentage:!1};return"cover"===o?e/rthis.maxNumberOfFramesInBuffer;)this._frameQueue.shift()}get maxNumberOfFramesInBuffer(){return void 0!==this._maxNumberOfFramesInBuffer?this._maxNumberOfFramesInBuffer:this.referenceConfigurationArray&&1===this.referenceConfigurationArray.length&&this.referenceConfigurationArray[0].hasOwnProperty("maxNumberOfFramesInBuffer")?this.referenceConfigurationArray[0].maxNumberOfFramesInBuffer:this._defaultMaxNumberOfFramesInBuffer}get numberOfFramesInBuffer(){return this._frameQueue.length}set refreshInterval(e){this._refreshInterval=e}get refreshInterval(){return void 0!==this._refreshInterval?this._refreshInterval:this.referenceConfigurationArray&&1===this.referenceConfigurationArray.length&&this.referenceConfigurationArray[0].hasOwnProperty("refreshInterval")?this.referenceConfigurationArray[0].refreshInterval:this._defaultRefreshInterval}isContextDestroyed(){return this.bDestroyed}static createInstance(t){return e(this,void 0,void 0,(function*(){let e=new i;("string"==typeof t||t instanceof String)&&(t=JSON.parse(t));for(let i in t)e[i]=t[i];return yield e.setUIElement(i.defaultUIElementURL),this._hasEngineResourceLoaded=!0,e}))}play(t,o,r){return e(this,void 0,void 0,(function*(){if(this._video&&this.videoSrc){yield new Promise(((t,i)=>{this._video.onloadedmetadata=()=>e(this,void 0,void 0,(function*(){this._video&&(this._video.onloadedmetadata=null,yield this._video.play(),t())})),"string"==typeof this.videoSrc||this.videoSrc instanceof String?this._video.src=this.videoSrc:this._video.srcObject=this.videoSrc,setTimeout((()=>i(new Error("Failed to play video. Timeout."))),4e3)}));let t={width:this._video.videoWidth,height:this._video.videoHeight,deviceId:this._currentCamera&&this._currentCamera.deviceId};const i=this.mapCameraEvents.get("played");for(let e of i){const i=JSON.parse(JSON.stringify(t));setTimeout((()=>e(i)),0)}return t}if(this.singleFrameMode)return this._clickIptSingleFrameMode(),{width:0,height:0,deviceId:null};if(!this._video)return null;const s=++this.iPlayRound;let n=null,a=0,h=0;if(this._currentCamera&&(n=this._currentCamera.deviceId),this._video&&(a=this._video.videoWidth,h=this._video.videoHeight),this.promisePlay&&(yield this.promisePlay,se(this,void 0,void 0,(function*(){var s;try{this._video&&this._video.srcObject&&this.stop(),i._onLog&&i._onLog("DCE: ======before video========");const l=()=>{if(!this._video)throw v&&v.getTracks().forEach((e=>{e.stop()})),this._videoTrack=null,this._currentCamera=null,new Error("'video' is null.")},d=this.getVideoSettings();let g;"boolean"==typeof d.video&&(d.video={});const c=["rear","back","rück","arrière","trasera","trás","traseira","posteriore","后面","後面","背面","后置","後置","背置","задней","الخلفية","후","arka","achterzijde","หลัง","baksidan","bagside","sau","bak","tylny","takakamera","belakang","אחורית","πίσω","spate","hátsó","zadní","darrere","zadná","задня","stražnja","belakang","बैक"],u=()=>{for(let e of this._allCameras){let t=e.label.toLowerCase();if(t&&c.some((e=>-1!=t.indexOf(e)))&&/\b0(\b)?/.test(t)){delete d.video.facingMode,d.video.deviceId={ideal:e.deviceId};break}}d.video.deviceId||-1==["Android","HarmonyOS"].indexOf(i.browserInfo.OS)||(delete d.video.facingMode,d.video.deviceId={ideal:this._allCameras[this._allCameras.length-1].deviceId})};if(t)delete d.video.facingMode,d.video.deviceId={exact:t};else if(d.video.deviceId);else if(this._lastDeviceId)delete d.video.facingMode,d.video.deviceId={exact:this._lastDeviceId};else if(this.ifSaveLastUsedCamera&&i.isStorageAvailable&&window.localStorage.getItem("dce_last_camera_id")){delete d.video.facingMode,d.video.deviceId={exact:window.localStorage.getItem("dce_last_camera_id")};const e=JSON.parse(window.localStorage.getItem("dce_last_apply_width")),t=JSON.parse(window.localStorage.getItem("dce_last_apply_height"));e&&t&&(d.video.width=e,d.video.height=t)}else if(this.ifSkipCameraInspection);else if(d.video.facingMode){if(yield this.getAllCameras(),!this._video)return null;let e=d.video.facingMode;e instanceof Array&&e.length&&(e=e[0]),e=e.exact||e.ideal||e,"environment"===e&&(g=!!d.video.facingMode,u())}let v;o&&(d.video.width={ideal:o}),r&&(d.video.height={ideal:r}),i._onLog&&i._onLog("DCE: ======try getUserMedia========");let _,f=[0,500],m=null,p=null;function y(t){return e(this,void 0,void 0,(function*(){for(let e of f){l(),e&&(yield new Promise((t=>setTimeout(t,e)))),l();{const e=t.video.deviceId;p=e?e.exact||e.ideal||e:null}try{i._onLog&&i._onLog("DCE: ask "+JSON.stringify(t)),v=yield navigator.mediaDevices.getUserMedia(t),l();break}catch(e){m=e,i._onLog&&i._onLog("DCE: "+e.message||false)}}}))}if(yield y(d),!v){if(i._onLog&&i._onLog("DCE: ======try getUserMedia again========"),_=JSON.parse(JSON.stringify(d)),"object"==typeof _.video){"iPhone"==i.browserInfo.OS?(o>=1280||r>=1280?_.video.width=1280:o>=640||r>=640?_.video.width=640:(o<640||r<640)&&(_.video.width=320),delete _.video.height):g&&!d.video.deviceId?(delete _.video.facingMode,this._allCameras.length&&(_.video.deviceId={ideal:this._allCameras[this._allCameras.length-1].deviceId})):_.video=!0}i._onLog&&i._onLog("DCE: "+_),yield y(_)}if(v||(f=[1e3,2e3],yield y(d)),v||(yield y(_)),!v)throw m;const S=()=>{const e=v.getVideoTracks();let t,i;if(e.length&&(t=this._videoTrack=e[0]),this._video&&t){const e=t.getSettings();if(e)for(let o of this._allCameras)if(e.deviceId===o.deviceId){o._checked=!0,o.label=t.label,i=o;break}if(!i&&p)for(let e of this._allCameras)if(p==e.deviceId){t.label&&(e._checked=!0,e.label=t.label),i=e;break}}this._currentCamera=i};if(yield this.getAllCameras(),l(),g){S(),u();let e=d.video.deviceId;e&&(e=e.exact||e.ideal||e);let t=null===(s=this._currentCamera)||void 0===s?void 0:s.deviceId;!e||t&&e==t||(v.getTracks().forEach((e=>{e.stop()})),f=[0,500,1e3,2e3],yield y(d))}l();const w=()=>e(this,void 0,void 0,(function*(){i._onLog&&i._onLog("======play video========"),yield new Promise(((t,i)=>{l(),this._video.onloadedmetadata=()=>e(this,void 0,void 0,(function*(){l(),this._video.onloadedmetadata=null,yield this._video.play(),t()})),this._video.srcObject=v,setTimeout((()=>i(new Error("Failed to play video. Timeout."))),4e3)}))}));yield w(),l(),i._onLog&&i._onLog("DCE: ======played video========"),this._bgLoading&&(this._bgLoading.style.animationPlayState="paused");const b=this._video.videoWidth+"x"+this._video.videoHeight;this._optGotRsl&&(this._optGotRsl.setAttribute("data-width",this._video.videoWidth),this._optGotRsl.setAttribute("data-height",this._video.videoHeight),this._optGotRsl.innerText=b,this._selRsl&&this._optGotRsl.parentNode==this._selRsl&&(this._selRsl.value="got")),i._onLog&&i._onLog("DCE: got "+b),S(),l(),this._renderSelCameraInfo();const R={width:this._video.videoWidth,height:this._video.videoHeight,deviceId:this._currentCamera&&this._currentCamera.deviceId};R.deviceId&&(this._lastDeviceId=R.deviceId,this.ifSaveLastUsedCamera&&i.isStorageAvailable&&(window.localStorage.setItem("dce_last_camera_id",this._lastDeviceId),d.video.width&&d.video.height&&(window.localStorage.setItem("dce_last_apply_width",JSON.stringify(d.video.width)),window.localStorage.setItem("dce_last_apply_height",JSON.stringify(d.video.height)))));const C=this.mapCameraEvents.get("played");for(let e of C){const t=JSON.parse(JSON.stringify(R));setTimeout((()=>e(t)),0)}if(n&&n!=R.deviceId){const e=this.mapCameraEvents.get("cameraChange");for(let t of e){const e=JSON.parse(JSON.stringify(R));setTimeout((()=>t(e)),0)}}if(a&&h&&(a!=R.width||h!=R.height)){this._updateScanRegionCanvas(),this._updateScanAreaDiv(),this._updateViewDecorator();for(let e of this._arrScanRegionOverlays)e&&this._updateScanRegionOverlay(e);const e=this.mapCameraEvents.get("resolutionChange");for(let t of e){const e=JSON.parse(JSON.stringify(R));setTimeout((()=>t(e)),0)}}return this.promisePlay=null,R}catch(e){throw this.promisePlay=null,e}})))();return yield this.promisePlay}))}resume(){return e(this,void 0,void 0,(function*(){this._assertOpen(),yield this.play(),this._bStoppedByPause&&(this._bStoppedByPause=!1,this.startFetchingLoop()),this._bShowScanRegionLaser&&this.showScanRegionLaser()}))}pause(){this._bOpen||console.warn("The camera is not open."),this._video&&this._video.pause(),this._bFetchingLoopStarted&&(this.stopFetchingLoop(),this._bStoppedByPause=!0),this._bShowScanRegionLaser&&this.hideScanRegionLaser()}close(e){if(!this._video)return;this.stop(),this._unbindUI(),e&&(this.UIElement.style.display="none"),this.stopFetchingLoop(),this.bOpen=!1;const t=this.mapCameraEvents.get("cameraClose");for(let e of t){const t={width:0,height:0,deviceId:null};setTimeout((()=>e(t)),0)}}open(t){return e(this,void 0,void 0,(function*(){this._bindUI(),t&&(this.UIElement.parentNode||(this.UIElement.style.position="fixed",this.UIElement.style.left="0",this.UIElement.style.top="0",document.body.append(this.UIElement)),"none"==this.UIElement.style.display&&(this.UIElement.style.display=""));let e=yield this.play();this.bOpen=!0;const i=this.mapCameraEvents.get("cameraOpen");for(let t of i){const i=JSON.parse(JSON.stringify(e));setTimeout((()=>t(i)),0)}return e}))}stop(){this._video&&this._video.srcObject&&(i._onLog&&i._onLog("DCE: ======stop video========"),this._video.srcObject.getTracks().forEach((e=>{e.stop()})),this._video.srcObject=null,this._videoTrack=null,this._currentCamera=null),this._video&&this.videoSrc&&(i._onLog&&i._onLog("DCE: ======stop existing video========"),this._video.pause(),this._video.currentTime=0),this._bgLoading&&(this._bgLoading.style.animationPlayState=""),this._frameQueue.length=0}getAllCameras(){return e(this,void 0,void 0,(function*(){let e=yield navigator.mediaDevices.enumerateDevices();if(!e[0].deviceId){let t=yield navigator.mediaDevices.getUserMedia({video:!0});e=yield navigator.mediaDevices.enumerateDevices(),t.getTracks().forEach((e=>{e.stop()})),t=null}const t=[],o=[];if(this._allCameras)for(let e of this._allCameras)e._checked&&o.push(e);for(let i=0;i{const i=this.mapCameraResolutions.get(e);if(!i||!i.length)return!1;for(let e of i)if(e[0]===t.width&&e[1]===t.height)return!0;return!1},r=(t,i,o)=>e(this,void 0,void 0,(function*(){const e={video:{deviceId:{exact:t},width:{ideal:i},height:{ideal:o}}};let r=null;try{r=yield navigator.mediaDevices.getUserMedia(e)}catch(e){return null}if(!r)return null;const s=r.getVideoTracks();let n=null;try{const e=s[0].getSettings();n={width:e.width,height:e.height}}catch(e){const t=document.createElement("video");t.srcObject=r,n={width:t.videoWidth,height:t.videoHeight},t.srcObject=null}return s.forEach((e=>{e.stop()})),n}));if(!this._bOpen){const e=this.videoSettings.video.deviceId;if(!e)return null;if(i=e.hasOwnProperty("exact")?this.videoSettings.video.deviceId.exact:e.hasOwnProperty("ideal")?this.videoSettings.video.deviceId.ideal:this.videoSettings.video.deviceId,!i)return null;let s=this.mapCameraResolutions.get(i);if(s&&!t)return this.mapCameraResolutions.get(i);this.mapCameraResolutions.set(i,[]),s=this.mapCameraResolutions.get(i);for(let e of this.predefinedResolutions){const t=yield r(i,e.width,e.height);t&&!o(i,t)&&s.push([t.width,t.height])}return s}if(this._currentCamera){i=this._currentCamera.deviceId;let e=this.mapCameraResolutions.get(i);if(e&&!t)return this.mapCameraResolutions.get(i);this.mapCameraResolutions.set(i,[]),e=this.mapCameraResolutions.get(i);const r=this.getConstraints();for(let t of this.predefinedResolutions){yield this._videoTrack.applyConstraints({width:{ideal:t.width},height:{ideal:t.height}});const r=this._videoTrack.getSettings(),s={width:r.width,height:r.height};o(i,s)||e.push([s.width,s.height])}return yield this._videoTrack.applyConstraints(r),e}return null}))}on(e,t){if(!this.mapCameraEvents.has(e))throw new Error(`Event '${e}' is not exists.`);const i=this.mapCameraEvents.get(e);i.includes(t)||i.push(t)}off(e,t){if(!this.mapCameraEvents.has(e))throw new Error(`Event '${e}' is not exists.`);const i=this.mapCameraEvents.get(e),o=i.indexOf(t);-1!==o&&i.splice(o,1)}getVideoSettings(){return JSON.parse(JSON.stringify(this.videoSettings))}updateVideoSettings(e){return this.videoSettings=JSON.parse(JSON.stringify(e)),this._lastDeviceId=null,this._bOpen?this.play():Promise.resolve()}isOpen(){return this._bOpen}getCapabilities(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'turnOnTorch()' is unavailable in singleFrameMode.");if(!this._videoTrack)throw new Error('"_videoTrack" is null.');return this._videoTrack.getCapabilities?this._videoTrack.getCapabilities():{}}getCameraSettings(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'getCameraSettings()' is unavailable in singleFrameMode.");if(!this._videoTrack)throw new Error('"_videoTrack" is null.');return this._videoTrack.getSettings()}getConstraints(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'getConstraints()' is unavailable in singleFrameMode.");if(!this._videoTrack)throw new Error('"_videoTrack" is null.');return this._videoTrack.getConstraints()}applyConstraints(t){return e(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'applyConstraints()' is unavailable in singleFrameMode.");if(!this._videoTrack)throw new Error('"_videoTrack" is null.');if(!this._videoTrack.applyConstraints)throw Error("Not supported.");return yield this._videoTrack.applyConstraints(t)}))}turnOnTorch(){return e(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'turnOnTorch()' is unavailable in singleFrameMode.");if(this.getCapabilities().torch)return yield this._videoTrack.applyConstraints({advanced:[{torch:!0}]});throw Error("Not supported.")}))}turnOffTorch(){return e(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'turnOffTorch()' is unavailable in singleFrameMode.");if(this.getCapabilities().torch)return yield this._videoTrack.applyConstraints({advanced:[{torch:!1}]});throw Error("Not supported.")}))}setColorTemperature(t){return e(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'setColorTemperature()' is unavailable in singleFrameMode.");let e=this.getCapabilities().colorTemperature;if(!e)throw Error("Not supported.");return te.max&&(t=e.max),yield this._videoTrack.applyConstraints({advanced:[{colorTemperature:t}]})}))}setExposureCompensation(t){return e(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'setExposureCompensation()' is unavailable in singleFrameMode.");let e=this.getCapabilities().exposureCompensation;if(!e)throw Error("Not supported.");return te.max&&(t=e.max),yield this._videoTrack.applyConstraints({advanced:[{exposureCompensation:t}]})}))}setZoom(t){return e(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'setZoom()' is unavailable in singleFrameMode.");let e=this.getCapabilities().zoom;if(!e)throw Error("Not supported.");return te.max&&(t=e.max),yield this._videoTrack.applyConstraints({advanced:[{zoom:t}]})}))}setFrameRate(t){return e(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'setFrameRate()' is unavailable in singleFrameMode.");let e=this.getCapabilities().frameRate;if(!e)throw Error("Not supported.");return te.max&&(t=e.max),yield this._videoTrack.applyConstraints({width:{ideal:Math.max(this._video.videoWidth,this._video.videoHeight)},frameRate:t})}))}getFrameRate(){return this.getCameraSettings().frameRate}setFocus(t,i){return e(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'setFocus()' is unavailable in singleFrameMode.");const e=this.getCapabilities().focusMode,o=this.getCapabilities().focusDistance;if(!e||!e.includes(t)||!o)throw Error("Not supported.");return i?(io.max&&(i=o.max),yield this._videoTrack.applyConstraints({advanced:[{focusMode:t,focusDistance:i}]})):yield this._videoTrack.applyConstraints({advanced:[{focusMode:t}]})}))}getFocus(){const e=this.getCameraSettings().focusMode;return"continuous"===e?{mode:e}:{mode:e,distance:this.getCameraSettings().focusDistance}}getFrameSize(e,t,i,o){if(!e||!t)return null;let r,s,n,a,h=e,l=t;const d={regionLeft:0,regionTop:0,regionRight:h,regionBottom:l,regionMeasuredByPercentage:!1};i?(i.regionMeasuredByPercentage?(d.regionLeft=i.regionLeft*h/100,d.regionTop=i.regionTop*l/100,d.regionRight=i.regionRight*h/100,d.regionBottom=i.regionBottom*l/100):(d.regionLeft=i.regionLeft,d.regionTop=i.regionTop,d.regionRight=i.regionRight,d.regionBottom=i.regionBottom),r=d.regionLeft,s=d.regionTop,h=Math.round(d.regionRight-d.regionLeft),l=Math.round(d.regionBottom-d.regionTop)):(r=0,s=0);const g=Math.max(h,l);if(o&&o>0&&g>o){const e=o/g;h>l?(n=o,a=Math.round(l*e)):(n=Math.round(h*e),a=o)}else n=h,a=l;return n<=0||a<=0?null:{sx:r,sy:s,sWidth:h,sHeight:l,dWidth:n,dHeight:a}}getFrame(){if(this.singleFrameMode)throw Error("'getFrame()' is unavailable in singleFrameMode.");if(this._assertOpen(),this.singleFrameMode)throw new Error("'getFrame()' is unavailable in singleFrameMode.");return this._getVideoFrame(this._scanRegion)}_getVideoFrame(e,t){if(this.bDestroyed)throw Error("The 'CameraEnhancer' instance has been destroyed.");if(this._assertOpen(),this.singleFrameMode)throw new Error("'_getVideoFrame()' is unavailable in singleFrameMode.");const o=Date.now();i._onLog&&i._onLog("DCE: _getVideoFrame(region?) START: "+o);const r=this._video.videoWidth,s=this._video.videoHeight;if(0===r||0===s)return null;const n=this.getFrameSize(r,s,e,this.maxCvsSideLength);if(!n)return null;let a,h;a=r!==n.sWidth||s!==n.sHeight,h=n.sWidth!==n.dWidth||n.sHeight!==n.dHeight;const l=(()=>!(!this._bWebGLSupported||h))(),d={data:null,region:e?JSON.parse(JSON.stringify(e)):null,sx:n.sx,sy:n.sy,width:n.dWidth,height:n.dHeight,colorMode:null,timeSpent:null,timeStamp:null,isCropped:a,toCanvas:this.toCanvas,_bUseWebGL:null},g=this._getImageData(this._video,r,s,n,t,{targetColorMode:this.frameColorMode,bUseWebGL:l});if(!g)return null;const c=Date.now();return i._onLog&&i._onLog("DCE: _getVideoFrame(region?) END: "+c),d.data=g.data,d.colorMode=g.colorMode,d._bUseWebGL=g._bUseWebGL,d.timeSpent=c-o,d.timeStamp=c,d}_getImageData(e,t,o,r,s,n){if(this.bDestroyed)throw Error("The 'CameraEnhancer' instance has been destroyed.");if(!t||!o)return null;i._onLog&&i._onLog("DCE: _getImageData() START: "+Date.now());const{sx:a,sy:h,sWidth:l,sHeight:d,dWidth:g,dHeight:c}=r;let u;if(u=n&&n.targetColorMode?n.targetColorMode.toLowerCase():"rgba",n&&n.bUseWebGL){this.videoGlCvs||(this.videoGlCvs=document.createElement("canvas"));const l=this.videoGlCvs;l.width==t&&l.height==o||(l.width=t,l.height=o,this.videoGl&&this.videoGl.viewport(0,0,t,o));const d=this.videoGl||l.getContext("webgl",{antialias:!1})||l.getContext("experimental-webgl",{antialias:!1});if(!d){this.videoGl=null,this._bWebGLSupported=!1;let i=null;return n?(i=JSON.parse(JSON.stringify(n)),i.bUseWebGL=!1):i={bUseWebGL:!1},this._getImageData(e,t,o,r,s,i)}if(d.enable(d.SCISSOR_TEST),d.scissor(a,h,g,c),!this.videoGl||u!==this.currentFSColorMode){this.videoGl=d;const e=e=>{const t=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,t);e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),e.STATIC_DRAW);const i=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,i);return e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),e.STATIC_DRAW),{position:t,indices:i}},t=e=>{const t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t},i=(e,t,i)=>{const r=o(e,e.VERTEX_SHADER,t),s=o(e,e.FRAGMENT_SHADER,i),n=e.createProgram();return e.attachShader(n,r),e.attachShader(n,s),e.linkProgram(n),e.getProgramParameter(n,e.LINK_STATUS)?n:(alert("Unable to initialize the shader program: "+e.getProgramInfoLog(n)),null)},o=(e,t,i)=>{const o=e.createShader(t);return e.shaderSource(o,i),e.compileShader(o),e.getShaderParameter(o,e.COMPILE_STATUS)?o:(alert("An error occurred compiling the shaders: "+e.getShaderInfoLog(o)),e.deleteShader(o),null)},r="\n attribute mediump vec2 aVertexPosition;\n varying mediump vec2 vDirection;\n \n void main( void )\n {\n gl_Position = vec4(aVertexPosition, 1.0, 1.0) * 2.0;\n vDirection = aVertexPosition;\n }\n ";let s;s=["rgba","rbga","grba","gbra","brga","bgra"].includes(u)?u.slice(0,3):"rgb";const n=i(d,r,`\n precision mediump float;\n\n varying mediump vec2 vDirection;\n uniform sampler2D uSampler;\n uniform lowp float uColorFactor;\n \n void main(void)\n {\n vec4 sample = texture2D(uSampler, vec2(vDirection.x * 0.5 + 0.5, vDirection.y * 0.5 + 0.5));\n lowp float grey = 0.21 * sample.r + 0.71 * sample.g + 0.07 * sample.b;\n gl_FragColor = vec4(sample.${s} * (1.0 - uColorFactor) + (grey * uColorFactor), sample.a);\n }\n `);this.webglProgramInfo={program:n,attribLocations:{vertexPosition:d.getAttribLocation(n,"aVertexPosition")},uniformLocations:{uSampler:d.getUniformLocation(n,"uSampler"),uColorFactor:d.getUniformLocation(n,"uColorFactor")}},this.webglBuffers=e(d),this.webglTexture=t(d),this.currentFSColorMode=u}const v=(e,t,i)=>{const o=e.RGBA,r=e.RGBA,s=e.UNSIGNED_BYTE;e.bindTexture(e.TEXTURE_2D,t),e.texImage2D(e.TEXTURE_2D,0,o,r,s,i)},_=(e,t,i,o)=>{e.clearColor(0,0,0,1),e.clearDepth(1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,i.indices),e.useProgram(t.program);{const o=2,r=e.FLOAT,s=!1,n=0,a=0;e.bindBuffer(e.ARRAY_BUFFER,i.position),e.vertexAttribPointer(t.attribLocations.vertexPosition,o,r,s,n,a),e.enableVertexAttribArray(t.attribLocations.vertexPosition)}e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,o),e.uniform1i(t.uniformLocations.uSampler,0),e.uniform1f(t.uniformLocations.uColorFactor,"grey"===u||"grey32"===u?1:0);const r=e.UNSIGNED_SHORT;e.drawElements(e.TRIANGLES,6,r,0)};let f;if(v(d,this.webglTexture,e),_(d,this.webglProgramInfo,this.webglBuffers,this.webglTexture),s){if(s.length=this.croppingRegions.length||this._croppingRegionIndex<0)throw new Error("The 'croppingRegionIndex' is out of bounds.");e=this.croppingRegions[this._croppingRegionIndex],this.bIncreaseRegionIndexAuto&&++this._croppingRegionIndex>=this.croppingRegions.length&&(this._croppingRegionIndex=0)}return e}_fetchingLoop(e){if(this.bDestroyed)return void this.stopFetchingLoop();if(!this._bOpen||!this.isFetchingLoopStarted())return void this.stopFetchingLoop();if(this._video.paused)return i._onLog&&i._onLog("DCE: Video is paused. Ask in 1s."),this._frameLoopTimeoutId&&clearTimeout(this._frameLoopTimeoutId),void(this._frameLoopTimeoutId=setTimeout((()=>{this._fetchingLoop(!0)}),1e3));const t=()=>{i._onLog&&i._onLog("DCE: start fetching a frame: "+Date.now());const e=this.getCurrentRegion();let t=this._getVideoFrame(e);if(!t)return void(i._onLog&&i._onLog("DCE: get a invalid frame, abandon it: "+Date.now()));for(;this._frameQueue&&this._frameQueue.length>=this.maxNumberOfFramesInBuffer;)this._frameQueue.shift();this._frameQueue.push(t),i._onLog&&i._onLog("DCE: finish fetching a frame: "+Date.now());const o=this.mapCameraEvents.get("frameAddedToBuffer");for(let e of o)setTimeout(e,0)},o=()=>{this._frameLoopTimeoutId2&&clearTimeout(this._frameLoopTimeoutId2),this.refreshInterval<=0||(this._frameLoopTimeoutId2=setTimeout((()=>{this.bDestroyed?this.stopFetchingLoop():this._bOpen&&this.isFetchingLoopStarted()?this._video.paused?this._frameLoopTimeoutId&&clearTimeout(this._frameLoopTimeoutId):(i._onLog&&i._onLog("DCE: second timeout executes: "+Date.now()),t(),o()):this.stopFetchingLoop()}),this.refreshInterval))};e&&(this._frameQueue.length0&&o()):this.refreshInterval>0?(t(),o()):0===this.refreshInterval?t():this.refreshInterval),this._frameLoopTimeoutId&&clearTimeout(this._frameLoopTimeoutId),this._frameLoopTimeoutId=setTimeout((()=>{this._fetchingLoop(!0)}),this.loopInterval)}startFetchingLoop(){if(this.bDestroyed)throw Error("The DCE instance has been destroyed.");if(this._assertOpen(),this.singleFrameMode)throw Error("'startFetchingLoop()' is unavailable in singleFrameMode.");if(this._video.paused)throw Error("The video is paused.");this.isFetchingLoopStarted()||(this._bFetchingLoopStarted=!0,i._onLog&&i._onLog("start fetching loop: "+Date.now()),this._fetchingLoop(!0))}isFetchingLoopStarted(){return this._bFetchingLoopStarted}stopFetchingLoop(){this._bFetchingLoopStarted&&(i._onLog&&i._onLog("stop fetching loop: "+Date.now()),this._frameLoopTimeoutId&&clearTimeout(this._frameLoopTimeoutId),this._frameQueue.length=0,this._bFetchingLoopStarted=!1)}getFrameFromBuffer(e){return this._frameQueue&&this._frameQueue.length?e?e{if(!t&&document.currentScript){let e=document.currentScript.src,t=e.indexOf("?");if(-1!=t)e=e.substring(0,t);else{let t=e.indexOf("#");-1!=t&&(e=e.substring(0,t))}return e.substring(0,e.lastIndexOf("/")+1)}return"./"})(),i._defaultUIElementURL="@engineResourcePath/dce.ui.html"; - - -/***/ }), - -/***/ "Hh5Z": -/*!*************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/scheduler/QueueScheduler.js ***! - \*************************************************************************/ -/*! exports provided: QueueScheduler */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueScheduler", function() { return QueueScheduler; }); -/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncScheduler */ "IjjT"); - -class QueueScheduler extends _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__["AsyncScheduler"] { -} -//# sourceMappingURL=QueueScheduler.js.map - -/***/ }), - -/***/ "Hkhx": -/*!*****************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/onErrorResumeNext.js ***! - \*****************************************************************************/ -/*! exports provided: onErrorResumeNext */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ "Cfvw"); -/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); -/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./empty */ "EY2u"); - - - - -function onErrorResumeNext(...sources) { - if (sources.length === 0) { - return _empty__WEBPACK_IMPORTED_MODULE_3__["EMPTY"]; - } - const [first, ...remainder] = sources; - if (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(first)) { - return onErrorResumeNext(...first); - } - return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { - const subNext = () => subscriber.add(onErrorResumeNext(...remainder).subscribe(subscriber)); - return Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(first).subscribe({ - next(value) { subscriber.next(value); }, - error: subNext, - complete: subNext, - }); - }); -} -//# sourceMappingURL=onErrorResumeNext.js.map - -/***/ }), - -/***/ "HrJb": -/*!****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/count.js ***! - \****************************************************************/ -/*! exports provided: count */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "count", function() { return count; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); - -function count(predicate) { - return (source) => source.lift(new CountOperator(predicate, source)); -} -class CountOperator { - constructor(predicate, source) { - this.predicate = predicate; - this.source = source; - } - call(subscriber, source) { - return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source)); - } -} -class CountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, predicate, source) { - super(destination); - this.predicate = predicate; - this.source = source; - this.count = 0; - this.index = 0; - } - _next(value) { - if (this.predicate) { - this._tryPredicate(value); - } - else { - this.count++; - } - } - _tryPredicate(value) { - let result; - try { - result = this.predicate(value, this.index++, this.source); - } - catch (err) { - this.destination.error(err); - return; - } - if (result) { - this.count++; - } - } - _complete() { - this.destination.next(this.count); - this.destination.complete(); - } -} -//# sourceMappingURL=count.js.map - -/***/ }), - -/***/ "I55L": -/*!*****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/isArrayLike.js ***! - \*****************************************************************/ -/*! exports provided: isArrayLike */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArrayLike", function() { return isArrayLike; }); -const isArrayLike = ((x) => x && typeof x.length === 'number' && typeof x !== 'function'); -//# sourceMappingURL=isArrayLike.js.map - -/***/ }), - -/***/ "IAdc": -/*!******************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/toArray.js ***! - \******************************************************************/ -/*! exports provided: toArray */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; }); -/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduce */ "128B"); - -function toArrayReducer(arr, item, index) { - if (index === 0) { - return [item]; - } - arr.push(item); - return arr; -} -function toArray() { - return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(toArrayReducer, []); -} -//# sourceMappingURL=toArray.js.map - -/***/ }), - -/***/ "IjjT": -/*!*************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsyncScheduler.js ***! - \*************************************************************************/ -/*! exports provided: AsyncScheduler */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncScheduler", function() { return AsyncScheduler; }); -/* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Scheduler */ "Y/cZ"); - -class AsyncScheduler extends _Scheduler__WEBPACK_IMPORTED_MODULE_0__["Scheduler"] { - constructor(SchedulerAction, now = _Scheduler__WEBPACK_IMPORTED_MODULE_0__["Scheduler"].now) { - super(SchedulerAction, () => { - if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) { - return AsyncScheduler.delegate.now(); - } - else { - return now(); - } - }); - this.actions = []; - this.active = false; - this.scheduled = undefined; - } - schedule(work, delay = 0, state) { - if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) { - return AsyncScheduler.delegate.schedule(work, delay, state); - } - else { - return super.schedule(work, delay, state); - } - } - flush(action) { - const { actions } = this; - if (this.active) { - actions.push(action); - return; - } - let error; - this.active = true; - do { - if (error = action.execute(action.state, action.delay)) { - break; - } - } while (action = actions.shift()); - this.active = false; - if (error) { - while (action = actions.shift()) { - action.unsubscribe(); - } - throw error; - } - } -} -//# sourceMappingURL=AsyncScheduler.js.map - -/***/ }), - -/***/ "IzEk": -/*!***************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/take.js ***! - \***************************************************************/ -/*! exports provided: take */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return take; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); -/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "4I5i"); -/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/empty */ "EY2u"); - - - -function take(count) { - return (source) => { - if (count === 0) { - return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])(); - } - else { - return source.lift(new TakeOperator(count)); - } - }; -} -class TakeOperator { - constructor(total) { - this.total = total; - if (this.total < 0) { - throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__["ArgumentOutOfRangeError"]; - } - } - call(subscriber, source) { - return source.subscribe(new TakeSubscriber(subscriber, this.total)); - } -} -class TakeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, total) { - super(destination); - this.total = total; - this.count = 0; - } - _next(value) { - const total = this.total; - const count = ++this.count; - if (count <= total) { - this.destination.next(value); - if (count === total) { - this.destination.complete(); - this.unsubscribe(); - } - } - } -} -//# sourceMappingURL=take.js.map - -/***/ }), - -/***/ "JIr8": -/*!*********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/catchError.js ***! - \*********************************************************************/ -/*! exports provided: catchError */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return catchError; }); -/* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); - -function catchError(selector) { - return function catchErrorOperatorFunction(source) { - const operator = new CatchOperator(selector); - const caught = source.lift(operator); - return (operator.caught = caught); - }; -} -class CatchOperator { - constructor(selector) { - this.selector = selector; - } - call(subscriber, source) { - return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught)); - } -} -class CatchSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { - constructor(destination, selector, caught) { - super(destination); - this.selector = selector; - this.caught = caught; - } - error(err) { - if (!this.isStopped) { - let result; - try { - result = this.selector(err, this.caught); - } - catch (err2) { - super.error(err2); - return; - } - this._unsubscribeAndRecycle(); - const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this); - this.add(innerSubscriber); - const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(result, innerSubscriber); - if (innerSubscription !== innerSubscriber) { - this.add(innerSubscription); - } - } - } -} -//# sourceMappingURL=catchError.js.map - -/***/ }), - -/***/ "JX91": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/startWith.js ***! - \********************************************************************/ -/*! exports provided: startWith */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return startWith; }); -/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/concat */ "GyhO"); -/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); - - -function startWith(...array) { - const scheduler = array[array.length - 1]; - if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(scheduler)) { - array.pop(); - return (source) => Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source, scheduler); - } - else { - return (source) => Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source); - } -} -//# sourceMappingURL=startWith.js.map - -/***/ }), - -/***/ "JmF6": -/*!*****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/zipAll.js ***! - \*****************************************************************/ -/*! exports provided: zipAll */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return zipAll; }); -/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/zip */ "1uah"); - -function zipAll(project) { - return (source) => source.lift(new _observable_zip__WEBPACK_IMPORTED_MODULE_0__["ZipOperator"](project)); -} -//# sourceMappingURL=zipAll.js.map - -/***/ }), - -/***/ "K7De": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/findIndex.js ***! - \********************************************************************/ -/*! exports provided: findIndex */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return findIndex; }); -/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../operators/find */ "cBqT"); - -function findIndex(predicate, thisArg) { - return (source) => source.lift(new _operators_find__WEBPACK_IMPORTED_MODULE_0__["FindValueOperator"](predicate, source, true, thisArg)); -} -//# sourceMappingURL=findIndex.js.map - -/***/ }), - -/***/ "Kj3r": -/*!***********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/debounceTime.js ***! - \***********************************************************************/ -/*! exports provided: debounceTime */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return debounceTime; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); - - -function debounceTime(dueTime, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"]) { - return (source) => source.lift(new DebounceTimeOperator(dueTime, scheduler)); -} -class DebounceTimeOperator { - constructor(dueTime, scheduler) { - this.dueTime = dueTime; - this.scheduler = scheduler; - } - call(subscriber, source) { - return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler)); - } -} -class DebounceTimeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, dueTime, scheduler) { - super(destination); - this.dueTime = dueTime; - this.scheduler = scheduler; - this.debouncedSubscription = null; - this.lastValue = null; - this.hasValue = false; - } - _next(value) { - this.clearDebounce(); - this.lastValue = value; - this.hasValue = true; - this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this)); - } - _complete() { - this.debouncedNext(); - this.destination.complete(); - } - debouncedNext() { - this.clearDebounce(); - if (this.hasValue) { - const { lastValue } = this; - this.lastValue = null; - this.hasValue = false; - this.destination.next(lastValue); - } - } - clearDebounce() { - const debouncedSubscription = this.debouncedSubscription; - if (debouncedSubscription !== null) { - this.remove(debouncedSubscription); - debouncedSubscription.unsubscribe(); - this.debouncedSubscription = null; - } - } -} -function dispatchNext(subscriber) { - subscriber.debouncedNext(); -} -//# sourceMappingURL=debounceTime.js.map - -/***/ }), - -/***/ "Kqap": -/*!***************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/scan.js ***! - \***************************************************************/ -/*! exports provided: scan */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return scan; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); - -function scan(accumulator, seed) { - let hasSeed = false; - if (arguments.length >= 2) { - hasSeed = true; - } - return function scanOperatorFunction(source) { - return source.lift(new ScanOperator(accumulator, seed, hasSeed)); - }; -} -class ScanOperator { - constructor(accumulator, seed, hasSeed = false) { - this.accumulator = accumulator; - this.seed = seed; - this.hasSeed = hasSeed; - } - call(subscriber, source) { - return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed)); - } -} -class ScanSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, accumulator, _seed, hasSeed) { - super(destination); - this.accumulator = accumulator; - this._seed = _seed; - this.hasSeed = hasSeed; - this.index = 0; - } - get seed() { - return this._seed; - } - set seed(value) { - this.hasSeed = true; - this._seed = value; - } - _next(value) { - if (!this.hasSeed) { - this.seed = value; - this.destination.next(value); - } - else { - return this._tryNext(value); - } - } - _tryNext(value) { - const index = this.index++; - let result; - try { - result = this.accumulator(this.seed, value, index); - } - catch (err) { - this.destination.error(err); - } - this.seed = result; - this.destination.next(result); - } -} -//# sourceMappingURL=scan.js.map - -/***/ }), - -/***/ "KqfI": -/*!**********************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/noop.js ***! - \**********************************************************/ -/*! exports provided: noop */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return noop; }); -function noop() { } -//# sourceMappingURL=noop.js.map - -/***/ }), - -/***/ "LRne": -/*!**************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/of.js ***! - \**************************************************************/ -/*! exports provided: of */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "of", function() { return of; }); -/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); -/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fromArray */ "yCtX"); -/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduled/scheduleArray */ "jZKg"); - - - -function of(...args) { - let scheduler = args[args.length - 1]; - if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(scheduler)) { - args.pop(); - return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(args, scheduler); - } - else { - return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(args); - } -} -//# sourceMappingURL=of.js.map - -/***/ }), - -/***/ "Lhse": -/*!****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/symbol/iterator.js ***! - \****************************************************************/ -/*! exports provided: getSymbolIterator, iterator, $$iterator */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSymbolIterator", function() { return getSymbolIterator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iterator", function() { return iterator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$iterator", function() { return $$iterator; }); -function getSymbolIterator() { - if (typeof Symbol !== 'function' || !Symbol.iterator) { - return '@@iterator'; - } - return Symbol.iterator; -} -const iterator = getSymbolIterator(); -const $$iterator = iterator; -//# sourceMappingURL=iterator.js.map - -/***/ }), - -/***/ "MBAA": -/*!***************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduleIterable.js ***! - \***************************************************************************/ -/*! exports provided: scheduleIterable */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleIterable", function() { return scheduleIterable; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); -/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../symbol/iterator */ "Lhse"); - - - -function scheduleIterable(input, scheduler) { - if (!input) { - throw new Error('Iterable cannot be null'); - } - return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { - const sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); - let iterator; - sub.add(() => { - if (iterator && typeof iterator.return === 'function') { - iterator.return(); - } - }); - sub.add(scheduler.schedule(() => { - iterator = input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_2__["iterator"]](); - sub.add(scheduler.schedule(function () { - if (subscriber.closed) { - return; - } - let value; - let done; - try { - const result = iterator.next(); - value = result.value; - done = result.done; - } - catch (err) { - subscriber.error(err); - return; - } - if (done) { - subscriber.complete(); - } - else { - subscriber.next(value); - this.schedule(); - } - })); - })); - return sub; - }); -} -//# sourceMappingURL=scheduleIterable.js.map - -/***/ }), - -/***/ "MtjB": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/retryWhen.js ***! - \********************************************************************/ -/*! exports provided: retryWhen */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return retryWhen; }); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); -/* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); - - -function retryWhen(notifier) { - return (source) => source.lift(new RetryWhenOperator(notifier, source)); -} -class RetryWhenOperator { - constructor(notifier, source) { - this.notifier = notifier; - this.source = source; - } - call(subscriber, source) { - return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source)); - } -} -class RetryWhenSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleOuterSubscriber"] { - constructor(destination, notifier, source) { - super(destination); - this.notifier = notifier; - this.source = source; - } - error(err) { - if (!this.isStopped) { - let errors = this.errors; - let retries = this.retries; - let retriesSubscription = this.retriesSubscription; - if (!retries) { - errors = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); - try { - const { notifier } = this; - retries = notifier(errors); - } - catch (e) { - return super.error(e); - } - retriesSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["innerSubscribe"])(retries, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleInnerSubscriber"](this)); - } - else { - this.errors = undefined; - this.retriesSubscription = undefined; - } - this._unsubscribeAndRecycle(); - this.errors = errors; - this.retries = retries; - this.retriesSubscription = retriesSubscription; - errors.next(err); - } - } - _unsubscribe() { - const { errors, retriesSubscription } = this; - if (errors) { - errors.unsubscribe(); - this.errors = undefined; - } - if (retriesSubscription) { - retriesSubscription.unsubscribe(); - this.retriesSubscription = undefined; - } - this.retries = undefined; - } - notifyNext() { - const { _unsubscribe } = this; - this._unsubscribe = null; - this._unsubscribeAndRecycle(); - this._unsubscribe = _unsubscribe; - this.source.subscribe(this); - } -} -//# sourceMappingURL=retryWhen.js.map - -/***/ }), - -/***/ "NHP+": -/*!*************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/AsyncSubject.js ***! - \*************************************************************/ -/*! exports provided: AsyncSubject */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return AsyncSubject; }); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subject */ "XNiG"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subscription */ "quSY"); - - -class AsyncSubject extends _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"] { - constructor() { - super(...arguments); - this.value = null; - this.hasNext = false; - this.hasCompleted = false; - } - _subscribe(subscriber) { - if (this.hasError) { - subscriber.error(this.thrownError); - return _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"].EMPTY; - } - else if (this.hasCompleted && this.hasNext) { - subscriber.next(this.value); - subscriber.complete(); - return _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"].EMPTY; - } - return super._subscribe(subscriber); - } - next(value) { - if (!this.hasCompleted) { - this.value = value; - this.hasNext = true; - } - } - error(error) { - if (!this.hasCompleted) { - super.error(error); - } - } - complete() { - this.hasCompleted = true; - if (this.hasNext) { - super.next(this.value); - } - super.complete(); - } -} -//# sourceMappingURL=AsyncSubject.js.map - -/***/ }), - -/***/ "NJ4a": -/*!*********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/hostReportError.js ***! - \*********************************************************************/ -/*! exports provided: hostReportError */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hostReportError", function() { return hostReportError; }); -function hostReportError(err) { - setTimeout(() => { throw err; }, 0); -} -//# sourceMappingURL=hostReportError.js.map - -/***/ }), - -/***/ "NJ9Y": -/*!***************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/last.js ***! - \***************************************************************/ -/*! exports provided: last */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; }); -/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/EmptyError */ "sVev"); -/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "pLZG"); -/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./takeLast */ "BFxc"); -/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./throwIfEmpty */ "XDbj"); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defaultIfEmpty */ "xbPD"); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/identity */ "SpAZ"); - - - - - - -function last(predicate, defaultValue) { - const hasDefaultValue = arguments.length >= 2; - return (source) => source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])((v, i) => predicate(v, i, source)) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_takeLast__WEBPACK_IMPORTED_MODULE_2__["takeLast"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__["throwIfEmpty"])(() => new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"]())); -} -//# sourceMappingURL=last.js.map - -/***/ }), - -/***/ "NNCq": -/*!*****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/range.js ***! - \*****************************************************************/ -/*! exports provided: range, dispatch */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "range", function() { return range; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); - -function range(start = 0, count, scheduler) { - return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { - if (count === undefined) { - count = start; - start = 0; - } - let index = 0; - let current = start; - if (scheduler) { - return scheduler.schedule(dispatch, 0, { - index, count, start, subscriber - }); - } - else { - do { - if (index++ >= count) { - subscriber.complete(); - break; - } - subscriber.next(current++); - if (subscriber.closed) { - break; - } - } while (true); - } - return undefined; - }); -} -function dispatch(state) { - const { start, index, count, subscriber } = state; - if (index >= count) { - subscriber.complete(); - return; - } - subscriber.next(start); - if (subscriber.closed) { - return; - } - state.index = index + 1; - state.start = start + 1; - this.schedule(state); -} -//# sourceMappingURL=range.js.map - -/***/ }), - -/***/ "NXyV": -/*!*****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/defer.js ***! - \*****************************************************************/ -/*! exports provided: defer */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return defer; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ "Cfvw"); -/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./empty */ "EY2u"); - - - -function defer(observableFactory) { - return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { - let input; - try { - input = observableFactory(); - } - catch (err) { - subscriber.error(err); - return undefined; - } - const source = input ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(input) : Object(_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])(); - return source.subscribe(subscriber); - }); -} -//# sourceMappingURL=defer.js.map - -/***/ }), - -/***/ "NfdI": -/*!******************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/publish.js ***! - \******************************************************************/ -/*! exports provided: publish */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return publish; }); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "oB13"); - - -function publish(selector) { - return selector ? - Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(() => new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](), selector) : - Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]()); -} -//# sourceMappingURL=publish.js.map - -/***/ }), - -/***/ "Nv8m": -/*!****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/race.js ***! - \****************************************************************/ -/*! exports provided: race, RaceOperator, RaceSubscriber */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceOperator", function() { return RaceOperator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceSubscriber", function() { return RaceSubscriber; }); -/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); -/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fromArray */ "yCtX"); -/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OuterSubscriber */ "l7GE"); -/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "ZUHj"); - - - - -function race(...observables) { - if (observables.length === 1) { - if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) { - observables = observables[0]; - } - else { - return observables[0]; - } - } - return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(observables, undefined).lift(new RaceOperator()); -} -class RaceOperator { - call(subscriber, source) { - return source.subscribe(new RaceSubscriber(subscriber)); - } -} -class RaceSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"] { - constructor(destination) { - super(destination); - this.hasFirst = false; - this.observables = []; - this.subscriptions = []; - } - _next(observable) { - this.observables.push(observable); - } - _complete() { - const observables = this.observables; - const len = observables.length; - if (len === 0) { - this.destination.complete(); - } - else { - for (let i = 0; i < len && !this.hasFirst; i++) { - const observable = observables[i]; - const subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, observable, undefined, i); - if (this.subscriptions) { - this.subscriptions.push(subscription); - } - this.add(subscription); - } - this.observables = null; - } - } - notifyNext(_outerValue, innerValue, outerIndex) { - if (!this.hasFirst) { - this.hasFirst = true; - for (let i = 0; i < this.subscriptions.length; i++) { - if (i !== outerIndex) { - let subscription = this.subscriptions[i]; - subscription.unsubscribe(); - this.remove(subscription); - } - } - this.subscriptions = null; - } - this.destination.next(innerValue); - } -} -//# sourceMappingURL=race.js.map - -/***/ }), - -/***/ "O4y0": -/*!*********************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/SubscribeOnObservable.js ***! - \*********************************************************************************/ -/*! exports provided: SubscribeOnObservable */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubscribeOnObservable", function() { return SubscribeOnObservable; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/asap */ "7Hc7"); -/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isNumeric */ "Y7HM"); - - - -class SubscribeOnObservable extends _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"] { - constructor(source, delayTime = 0, scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__["asap"]) { - super(); - this.source = source; - this.delayTime = delayTime; - this.scheduler = scheduler; - if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(delayTime) || delayTime < 0) { - this.delayTime = 0; - } - if (!scheduler || typeof scheduler.schedule !== 'function') { - this.scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__["asap"]; - } - } - static create(source, delay = 0, scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__["asap"]) { - return new SubscribeOnObservable(source, delay, scheduler); - } - static dispatch(arg) { - const { source, subscriber } = arg; - return this.add(source.subscribe(subscriber)); - } - _subscribe(subscriber) { - const delay = this.delayTime; - const source = this.source; - const scheduler = this.scheduler; - return scheduler.schedule(SubscribeOnObservable.dispatch, delay, { - source, subscriber - }); - } -} -//# sourceMappingURL=SubscribeOnObservable.js.map - -/***/ }), - -/***/ "OQgR": -/*!******************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/groupBy.js ***! - \******************************************************************/ -/*! exports provided: groupBy, GroupedObservable */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return groupBy; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return GroupedObservable; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Subject */ "XNiG"); - - - - -function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) { - return (source) => source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector)); -} -class GroupByOperator { - constructor(keySelector, elementSelector, durationSelector, subjectSelector) { - this.keySelector = keySelector; - this.elementSelector = elementSelector; - this.durationSelector = durationSelector; - this.subjectSelector = subjectSelector; - } - call(subscriber, source) { - return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector)); - } -} -class GroupBySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, keySelector, elementSelector, durationSelector, subjectSelector) { - super(destination); - this.keySelector = keySelector; - this.elementSelector = elementSelector; - this.durationSelector = durationSelector; - this.subjectSelector = subjectSelector; - this.groups = null; - this.attemptedToUnsubscribe = false; - this.count = 0; - } - _next(value) { - let key; - try { - key = this.keySelector(value); - } - catch (err) { - this.error(err); - return; - } - this._group(value, key); - } - _group(value, key) { - let groups = this.groups; - if (!groups) { - groups = this.groups = new Map(); - } - let group = groups.get(key); - let element; - if (this.elementSelector) { - try { - element = this.elementSelector(value); - } - catch (err) { - this.error(err); - } - } - else { - element = value; - } - if (!group) { - group = (this.subjectSelector ? this.subjectSelector() : new _Subject__WEBPACK_IMPORTED_MODULE_3__["Subject"]()); - groups.set(key, group); - const groupedObservable = new GroupedObservable(key, group, this); - this.destination.next(groupedObservable); - if (this.durationSelector) { - let duration; - try { - duration = this.durationSelector(new GroupedObservable(key, group)); - } - catch (err) { - this.error(err); - return; - } - this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this))); - } - } - if (!group.closed) { - group.next(element); - } - } - _error(err) { - const groups = this.groups; - if (groups) { - groups.forEach((group, key) => { - group.error(err); - }); - groups.clear(); - } - this.destination.error(err); - } - _complete() { - const groups = this.groups; - if (groups) { - groups.forEach((group, key) => { - group.complete(); - }); - groups.clear(); - } - this.destination.complete(); - } - removeGroup(key) { - this.groups.delete(key); - } - unsubscribe() { - if (!this.closed) { - this.attemptedToUnsubscribe = true; - if (this.count === 0) { - super.unsubscribe(); - } - } - } -} -class GroupDurationSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(key, group, parent) { - super(group); - this.key = key; - this.group = group; - this.parent = parent; - } - _next(value) { - this.complete(); - } - _unsubscribe() { - const { parent, key } = this; - this.key = this.parent = null; - if (parent) { - parent.removeGroup(key); - } - } -} -class GroupedObservable extends _Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"] { - constructor(key, groupSubject, refCountSubscription) { - super(); - this.key = key; - this.groupSubject = groupSubject; - this.refCountSubscription = refCountSubscription; - } - _subscribe(subscriber) { - const subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); - const { refCountSubscription, groupSubject } = this; - if (refCountSubscription && !refCountSubscription.closed) { - subscription.add(new InnerRefCountSubscription(refCountSubscription)); - } - subscription.add(groupSubject.subscribe(subscriber)); - return subscription; - } -} -class InnerRefCountSubscription extends _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"] { - constructor(parent) { - super(); - this.parent = parent; - parent.count++; - } - unsubscribe() { - const parent = this.parent; - if (!parent.closed && !this.closed) { - super.unsubscribe(); - parent.count -= 1; - if (parent.count === 0 && parent.attemptedToUnsubscribe) { - parent.unsubscribe(); - } - } - } -} -//# sourceMappingURL=groupBy.js.map - -/***/ }), - -/***/ "OsX3": -/*!*********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferTime.js ***! - \*********************************************************************/ -/*! exports provided: bufferTime */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return bufferTime; }); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); -/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); - - - -function bufferTime(bufferTimeSpan) { - let length = arguments.length; - let scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]; - if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__["isScheduler"])(arguments[arguments.length - 1])) { - scheduler = arguments[arguments.length - 1]; - length--; - } - let bufferCreationInterval = null; - if (length >= 2) { - bufferCreationInterval = arguments[1]; - } - let maxBufferSize = Number.POSITIVE_INFINITY; - if (length >= 3) { - maxBufferSize = arguments[2]; - } - return function bufferTimeOperatorFunction(source) { - return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler)); - }; -} -class BufferTimeOperator { - constructor(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) { - this.bufferTimeSpan = bufferTimeSpan; - this.bufferCreationInterval = bufferCreationInterval; - this.maxBufferSize = maxBufferSize; - this.scheduler = scheduler; - } - call(subscriber, source) { - return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler)); - } -} -class Context { - constructor() { - this.buffer = []; - } -} -class BufferTimeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"] { - constructor(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) { - super(destination); - this.bufferTimeSpan = bufferTimeSpan; - this.bufferCreationInterval = bufferCreationInterval; - this.maxBufferSize = maxBufferSize; - this.scheduler = scheduler; - this.contexts = []; - const context = this.openContext(); - this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0; - if (this.timespanOnly) { - const timeSpanOnlyState = { subscriber: this, context, bufferTimeSpan }; - this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState)); - } - else { - const closeState = { subscriber: this, context }; - const creationState = { bufferTimeSpan, bufferCreationInterval, subscriber: this, scheduler }; - this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState)); - this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState)); - } - } - _next(value) { - const contexts = this.contexts; - const len = contexts.length; - let filledBufferContext; - for (let i = 0; i < len; i++) { - const context = contexts[i]; - const buffer = context.buffer; - buffer.push(value); - if (buffer.length == this.maxBufferSize) { - filledBufferContext = context; - } - } - if (filledBufferContext) { - this.onBufferFull(filledBufferContext); - } - } - _error(err) { - this.contexts.length = 0; - super._error(err); - } - _complete() { - const { contexts, destination } = this; - while (contexts.length > 0) { - const context = contexts.shift(); - destination.next(context.buffer); - } - super._complete(); - } - _unsubscribe() { - this.contexts = null; - } - onBufferFull(context) { - this.closeContext(context); - const closeAction = context.closeAction; - closeAction.unsubscribe(); - this.remove(closeAction); - if (!this.closed && this.timespanOnly) { - context = this.openContext(); - const bufferTimeSpan = this.bufferTimeSpan; - const timeSpanOnlyState = { subscriber: this, context, bufferTimeSpan }; - this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState)); - } - } - openContext() { - const context = new Context(); - this.contexts.push(context); - return context; - } - closeContext(context) { - this.destination.next(context.buffer); - const contexts = this.contexts; - const spliceIndex = contexts ? contexts.indexOf(context) : -1; - if (spliceIndex >= 0) { - contexts.splice(contexts.indexOf(context), 1); - } - } -} -function dispatchBufferTimeSpanOnly(state) { - const subscriber = state.subscriber; - const prevContext = state.context; - if (prevContext) { - subscriber.closeContext(prevContext); - } - if (!subscriber.closed) { - state.context = subscriber.openContext(); - state.context.closeAction = this.schedule(state, state.bufferTimeSpan); - } -} -function dispatchBufferCreation(state) { - const { bufferCreationInterval, bufferTimeSpan, subscriber, scheduler } = state; - const context = subscriber.openContext(); - const action = this; - if (!subscriber.closed) { - subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber, context })); - action.schedule(state, bufferCreationInterval); - } -} -function dispatchBufferClose(arg) { - const { subscriber, context } = arg; - subscriber.closeContext(context); -} -//# sourceMappingURL=bufferTime.js.map - -/***/ }), - -/***/ "PZkE": -/*!**********************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/distinctUntilKeyChanged.js ***! - \**********************************************************************************/ -/*! exports provided: distinctUntilKeyChanged */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return distinctUntilKeyChanged; }); -/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./distinctUntilChanged */ "/uUt"); - -function distinctUntilKeyChanged(key, compare) { - return Object(_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__["distinctUntilChanged"])((x, y) => compare ? compare(x[key], y[key]) : x[key] === y[key]); -} -//# sourceMappingURL=distinctUntilKeyChanged.js.map - -/***/ }), - -/***/ "PfrF": -/*!*********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferWhen.js ***! - \*********************************************************************/ -/*! exports provided: bufferWhen */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return bufferWhen; }); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscription */ "quSY"); -/* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); - - -function bufferWhen(closingSelector) { - return function (source) { - return source.lift(new BufferWhenOperator(closingSelector)); - }; -} -class BufferWhenOperator { - constructor(closingSelector) { - this.closingSelector = closingSelector; - } - call(subscriber, source) { - return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector)); - } -} -class BufferWhenSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleOuterSubscriber"] { - constructor(destination, closingSelector) { - super(destination); - this.closingSelector = closingSelector; - this.subscribing = false; - this.openBuffer(); - } - _next(value) { - this.buffer.push(value); - } - _complete() { - const buffer = this.buffer; - if (buffer) { - this.destination.next(buffer); - } - super._complete(); - } - _unsubscribe() { - this.buffer = undefined; - this.subscribing = false; - } - notifyNext() { - this.openBuffer(); - } - notifyComplete() { - if (this.subscribing) { - this.complete(); - } - else { - this.openBuffer(); - } - } - openBuffer() { - let { closingSubscription } = this; - if (closingSubscription) { - this.remove(closingSubscription); - closingSubscription.unsubscribe(); - } - const buffer = this.buffer; - if (this.buffer) { - this.destination.next(buffer); - } - this.buffer = []; - let closingNotifier; - try { - const { closingSelector } = this; - closingNotifier = closingSelector(); - } - catch (err) { - return this.error(err); - } - closingSubscription = new _Subscription__WEBPACK_IMPORTED_MODULE_0__["Subscription"](); - this.closingSubscription = closingSubscription; - this.add(closingSubscription); - this.subscribing = true; - closingSubscription.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["innerSubscribe"])(closingNotifier, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleInnerSubscriber"](this))); - this.subscribing = false; - } -} -//# sourceMappingURL=bufferWhen.js.map - -/***/ }), - -/***/ "PqYM": -/*!*****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/timer.js ***! - \*****************************************************************/ -/*! exports provided: timer */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); -/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isNumeric */ "Y7HM"); -/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); - - - - -function timer(dueTime = 0, periodOrScheduler, scheduler) { - let period = -1; - if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(periodOrScheduler)) { - period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler); - } - else if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(periodOrScheduler)) { - scheduler = periodOrScheduler; - } - if (!Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(scheduler)) { - scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"]; - } - return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { - const due = Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(dueTime) - ? dueTime - : (+dueTime - scheduler.now()); - return scheduler.schedule(dispatch, due, { - index: 0, period, subscriber - }); - }); -} -function dispatch(state) { - const { index, period, subscriber } = state; - subscriber.next(index); - if (subscriber.closed) { - return; - } - else if (period === -1) { - return subscriber.complete(); - } - state.index = index + 1; - this.schedule(state, period); -} -//# sourceMappingURL=timer.js.map - -/***/ }), - -/***/ "Pz8W": -/*!*********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsapAction.js ***! - \*********************************************************************/ -/*! exports provided: AsapAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapAction", function() { return AsapAction; }); -/* harmony import */ var _util_Immediate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/Immediate */ "c7jc"); -/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncAction */ "3N8a"); - - -class AsapAction extends _AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"] { - constructor(scheduler, work) { - super(scheduler, work); - this.scheduler = scheduler; - this.work = work; - } - requestAsyncId(scheduler, id, delay = 0) { - if (delay !== null && delay > 0) { - return super.requestAsyncId(scheduler, id, delay); - } - scheduler.actions.push(this); - return scheduler.scheduled || (scheduler.scheduled = _util_Immediate__WEBPACK_IMPORTED_MODULE_0__["Immediate"].setImmediate(scheduler.flush.bind(scheduler, null))); - } - recycleAsyncId(scheduler, id, delay = 0) { - if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) { - return super.recycleAsyncId(scheduler, id, delay); - } - if (scheduler.actions.length === 0) { - _util_Immediate__WEBPACK_IMPORTED_MODULE_0__["Immediate"].clearImmediate(id); - scheduler.scheduled = undefined; - } - return undefined; - } -} -//# sourceMappingURL=AsapAction.js.map - -/***/ }), - -/***/ "QIAL": -/*!*************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/isInteropObservable.js ***! - \*************************************************************************/ -/*! exports provided: isInteropObservable */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInteropObservable", function() { return isInteropObservable; }); -/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/observable */ "kJWO"); - -function isInteropObservable(input) { - return input && typeof input[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]] === 'function'; -} -//# sourceMappingURL=isInteropObservable.js.map - -/***/ }), - -/***/ "Qn8I": -/*!*****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/using.js ***! - \*****************************************************************/ -/*! exports provided: using */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "using", function() { return using; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ "Cfvw"); -/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./empty */ "EY2u"); - - - -function using(resourceFactory, observableFactory) { - return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { - let resource; - try { - resource = resourceFactory(); - } - catch (err) { - subscriber.error(err); - return undefined; - } - let result; - try { - result = observableFactory(resource); - } - catch (err) { - subscriber.error(err); - return undefined; - } - const source = result ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(result) : _empty__WEBPACK_IMPORTED_MODULE_2__["EMPTY"]; - const subscription = source.subscribe(subscriber); - return () => { - subscription.unsubscribe(); - if (resource) { - resource.unsubscribe(); - } - }; - }); -} -//# sourceMappingURL=using.js.map - -/***/ }), - -/***/ "QqCr": -/*!************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/bindCallback.js ***! - \************************************************************************/ -/*! exports provided: bindCallback */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return bindCallback; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AsyncSubject */ "NHP+"); -/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/map */ "lJxs"); -/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/canReportError */ "8Qeq"); -/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); -/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); - - - - - - -function bindCallback(callbackFunc, resultSelector, scheduler) { - if (resultSelector) { - if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(resultSelector)) { - scheduler = resultSelector; - } - else { - return (...args) => bindCallback(callbackFunc, scheduler)(...args).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])((args) => Object(_util_isArray__WEBPACK_IMPORTED_MODULE_4__["isArray"])(args) ? resultSelector(...args) : resultSelector(args))); - } - } - return function (...args) { - const context = this; - let subject; - const params = { - context, - subject, - callbackFunc, - scheduler, - }; - return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { - if (!scheduler) { - if (!subject) { - subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"](); - const handler = (...innerArgs) => { - subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs); - subject.complete(); - }; - try { - callbackFunc.apply(context, [...args, handler]); - } - catch (err) { - if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) { - subject.error(err); - } - else { - console.warn(err); - } - } - } - return subject.subscribe(subscriber); - } - else { - const state = { - args, subscriber, params, - }; - return scheduler.schedule(dispatch, 0, state); - } - }); - }; -} -function dispatch(state) { - const self = this; - const { args, subscriber, params } = state; - const { callbackFunc, context, scheduler } = params; - let { subject } = params; - if (!subject) { - subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"](); - const handler = (...innerArgs) => { - const value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs; - this.add(scheduler.schedule(dispatchNext, 0, { value, subject })); - }; - try { - callbackFunc.apply(context, [...args, handler]); - } - catch (err) { - subject.error(err); - } - } - this.add(subject.subscribe(subscriber)); -} -function dispatchNext(state) { - const { value, subject } = state; - subject.next(value); - subject.complete(); -} -function dispatchError(state) { - const { err, subject } = state; - subject.error(err); -} -//# sourceMappingURL=bindCallback.js.map - -/***/ }), - -/***/ "RUbi": -/*!************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsapScheduler.js ***! - \************************************************************************/ -/*! exports provided: AsapScheduler */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapScheduler", function() { return AsapScheduler; }); -/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncScheduler */ "IjjT"); - -class AsapScheduler extends _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__["AsyncScheduler"] { - flush(action) { - this.active = true; - this.scheduled = undefined; - const { actions } = this; - let error; - let index = -1; - let count = actions.length; - action = action || actions.shift(); - do { - if (error = action.execute(action.state, action.delay)) { - break; - } - } while (++index < count && (action = actions.shift())); - this.active = false; - if (error) { - while (++index < count && (action = actions.shift())) { - action.unsubscribe(); - } - throw error; - } - } -} -//# sourceMappingURL=AsapScheduler.js.map - -/***/ }), - -/***/ "SeVD": -/*!*****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeTo.js ***! - \*****************************************************************/ -/*! exports provided: subscribeTo */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeTo", function() { return subscribeTo; }); -/* harmony import */ var _subscribeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./subscribeToArray */ "ngJS"); -/* harmony import */ var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./subscribeToPromise */ "a7t3"); -/* harmony import */ var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./subscribeToIterable */ "pLzU"); -/* harmony import */ var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./subscribeToObservable */ "CRDf"); -/* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./isArrayLike */ "I55L"); -/* harmony import */ var _isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./isPromise */ "c2HN"); -/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./isObject */ "XoHu"); -/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../symbol/iterator */ "Lhse"); -/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../symbol/observable */ "kJWO"); - - - - - - - - - -const subscribeTo = (result) => { - if (!!result && typeof result[_symbol_observable__WEBPACK_IMPORTED_MODULE_8__["observable"]] === 'function') { - return Object(_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__["subscribeToObservable"])(result); - } - else if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_4__["isArrayLike"])(result)) { - return Object(_subscribeToArray__WEBPACK_IMPORTED_MODULE_0__["subscribeToArray"])(result); - } - else if (Object(_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(result)) { - return Object(_subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__["subscribeToPromise"])(result); - } - else if (!!result && typeof result[_symbol_iterator__WEBPACK_IMPORTED_MODULE_7__["iterator"]] === 'function') { - return Object(_subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__["subscribeToIterable"])(result); - } - else { - const value = Object(_isObject__WEBPACK_IMPORTED_MODULE_6__["isObject"])(result) ? 'an invalid object' : `'${result}'`; - const msg = `You provided ${value} where a stream was expected.` - + ' You can provide an Observable, Promise, Array, or Iterable.'; - throw new TypeError(msg); - } -}; -//# sourceMappingURL=subscribeTo.js.map - -/***/ }), - -/***/ "SpAZ": -/*!**************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/identity.js ***! - \**************************************************************/ -/*! exports provided: identity */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); -function identity(x) { - return x; -} -//# sourceMappingURL=identity.js.map - -/***/ }), - -/***/ "SxV6": -/*!****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/first.js ***! - \****************************************************************/ -/*! exports provided: first */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; }); -/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/EmptyError */ "sVev"); -/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "pLZG"); -/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./take */ "IzEk"); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaultIfEmpty */ "xbPD"); -/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./throwIfEmpty */ "XDbj"); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/identity */ "SpAZ"); - - - - - - -function first(predicate, defaultValue) { - const hasDefaultValue = arguments.length >= 2; - return (source) => source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])((v, i) => predicate(v, i, source)) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_take__WEBPACK_IMPORTED_MODULE_2__["take"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__["throwIfEmpty"])(() => new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"]())); -} -//# sourceMappingURL=first.js.map - -/***/ }), - -/***/ "UGaM": -/*!**************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/publishBehavior.js ***! - \**************************************************************************/ -/*! exports provided: publishBehavior */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return publishBehavior; }); -/* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../BehaviorSubject */ "2Vo4"); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "oB13"); - - -function publishBehavior(value) { - return (source) => Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__["BehaviorSubject"](value))(source); -} -//# sourceMappingURL=publishBehavior.js.map - -/***/ }), - -/***/ "UHp3": -/*!*********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/windowTime.js ***! - \*********************************************************************/ -/*! exports provided: windowTime */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return windowTime; }); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); -/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isNumeric */ "Y7HM"); -/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); - - - - - -function windowTime(windowTimeSpan) { - let scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"]; - let windowCreationInterval = null; - let maxWindowSize = Number.POSITIVE_INFINITY; - if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(arguments[3])) { - scheduler = arguments[3]; - } - if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(arguments[2])) { - scheduler = arguments[2]; - } - else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__["isNumeric"])(arguments[2])) { - maxWindowSize = Number(arguments[2]); - } - if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(arguments[1])) { - scheduler = arguments[1]; - } - else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__["isNumeric"])(arguments[1])) { - windowCreationInterval = Number(arguments[1]); - } - return function windowTimeOperatorFunction(source) { - return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler)); - }; -} -class WindowTimeOperator { - constructor(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) { - this.windowTimeSpan = windowTimeSpan; - this.windowCreationInterval = windowCreationInterval; - this.maxWindowSize = maxWindowSize; - this.scheduler = scheduler; - } - call(subscriber, source) { - return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler)); - } -} -class CountedSubject extends _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"] { - constructor() { - super(...arguments); - this._numberOfNextedValues = 0; - } - next(value) { - this._numberOfNextedValues++; - super.next(value); - } - get numberOfNextedValues() { - return this._numberOfNextedValues; - } -} -class WindowTimeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"] { - constructor(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) { - super(destination); - this.destination = destination; - this.windowTimeSpan = windowTimeSpan; - this.windowCreationInterval = windowCreationInterval; - this.maxWindowSize = maxWindowSize; - this.scheduler = scheduler; - this.windows = []; - const window = this.openWindow(); - if (windowCreationInterval !== null && windowCreationInterval >= 0) { - const closeState = { subscriber: this, window, context: null }; - const creationState = { windowTimeSpan, windowCreationInterval, subscriber: this, scheduler }; - this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState)); - this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState)); - } - else { - const timeSpanOnlyState = { subscriber: this, window, windowTimeSpan }; - this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState)); - } - } - _next(value) { - const windows = this.windows; - const len = windows.length; - for (let i = 0; i < len; i++) { - const window = windows[i]; - if (!window.closed) { - window.next(value); - if (window.numberOfNextedValues >= this.maxWindowSize) { - this.closeWindow(window); - } - } - } - } - _error(err) { - const windows = this.windows; - while (windows.length > 0) { - windows.shift().error(err); - } - this.destination.error(err); - } - _complete() { - const windows = this.windows; - while (windows.length > 0) { - const window = windows.shift(); - if (!window.closed) { - window.complete(); - } - } - this.destination.complete(); - } - openWindow() { - const window = new CountedSubject(); - this.windows.push(window); - const destination = this.destination; - destination.next(window); - return window; - } - closeWindow(window) { - window.complete(); - const windows = this.windows; - windows.splice(windows.indexOf(window), 1); - } -} -function dispatchWindowTimeSpanOnly(state) { - const { subscriber, windowTimeSpan, window } = state; - if (window) { - subscriber.closeWindow(window); - } - state.window = subscriber.openWindow(); - this.schedule(state, windowTimeSpan); -} -function dispatchWindowCreation(state) { - const { windowTimeSpan, subscriber, scheduler, windowCreationInterval } = state; - const window = subscriber.openWindow(); - const action = this; - let context = { action, subscription: null }; - const timeSpanState = { subscriber, window, context }; - context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState); - action.add(context.subscription); - action.schedule(state, windowCreationInterval); -} -function dispatchWindowClose(state) { - const { subscriber, window, context } = state; - if (context && context.action && context.subscription) { - context.action.remove(context.subscription); - } - subscriber.closeWindow(window); -} -//# sourceMappingURL=windowTime.js.map - -/***/ }), - -/***/ "UXbc": -/*!*********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeMapTo.js ***! - \*********************************************************************/ -/*! exports provided: mergeMapTo */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return mergeMapTo; }); -/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeMap */ "5+tZ"); - -function mergeMapTo(innerObservable, resultSelector, concurrent = Number.POSITIVE_INFINITY) { - if (typeof resultSelector === 'function') { - return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(() => innerObservable, resultSelector, concurrent); - } - if (typeof resultSelector === 'number') { - concurrent = resultSelector; - } - return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(() => innerObservable, concurrent); -} -//# sourceMappingURL=mergeMapTo.js.map - -/***/ }), - -/***/ "UXun": -/*!**********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/shareReplay.js ***! - \**********************************************************************/ -/*! exports provided: shareReplay */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return shareReplay; }); -/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ReplaySubject */ "jtHE"); - -function shareReplay(configOrBufferSize, windowTime, scheduler) { - let config; - if (configOrBufferSize && typeof configOrBufferSize === 'object') { - config = configOrBufferSize; - } - else { - config = { - bufferSize: configOrBufferSize, - windowTime, - refCount: false, - scheduler, - }; - } - return (source) => source.lift(shareReplayOperator(config)); -} -function shareReplayOperator({ bufferSize = Number.POSITIVE_INFINITY, windowTime = Number.POSITIVE_INFINITY, refCount: useRefCount, scheduler, }) { - let subject; - let refCount = 0; - let subscription; - let hasError = false; - let isComplete = false; - return function shareReplayOperation(source) { - refCount++; - let innerSub; - if (!subject || hasError) { - hasError = false; - subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler); - innerSub = subject.subscribe(this); - subscription = source.subscribe({ - next(value) { - subject.next(value); - }, - error(err) { - hasError = true; - subject.error(err); - }, - complete() { - isComplete = true; - subscription = undefined; - subject.complete(); - }, - }); - if (isComplete) { - subscription = undefined; - } - } - else { - innerSub = subject.subscribe(this); - } - this.add(() => { - refCount--; - innerSub.unsubscribe(); - innerSub = undefined; - if (subscription && !isComplete && useRefCount && refCount === 0) { - subscription.unsubscribe(); - subscription = undefined; - subject = undefined; - } - }); - }; -} -//# sourceMappingURL=shareReplay.js.map - -/***/ }), - -/***/ "VRyK": -/*!*****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/merge.js ***! - \*****************************************************************/ -/*! exports provided: merge */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); -/* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/mergeAll */ "bHdf"); -/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fromArray */ "yCtX"); - - - - -function merge(...observables) { - let concurrent = Number.POSITIVE_INFINITY; - let scheduler = null; - let last = observables[observables.length - 1]; - if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(last)) { - scheduler = observables.pop(); - if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') { - concurrent = observables.pop(); - } - } - else if (typeof last === 'number') { - concurrent = observables.pop(); - } - if (scheduler === null && observables.length === 1 && observables[0] instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) { - return observables[0]; - } - return Object(_operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__["mergeAll"])(concurrent)(Object(_fromArray__WEBPACK_IMPORTED_MODULE_3__["fromArray"])(observables, scheduler)); -} -//# sourceMappingURL=merge.js.map - -/***/ }), - -/***/ "Vpsf": -/*!*******************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AnimationFrameAction.js ***! - \*******************************************************************************/ -/*! exports provided: AnimationFrameAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameAction", function() { return AnimationFrameAction; }); -/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncAction */ "3N8a"); - -class AnimationFrameAction extends _AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"] { - constructor(scheduler, work) { - super(scheduler, work); - this.scheduler = scheduler; - this.work = work; - } - requestAsyncId(scheduler, id, delay = 0) { - if (delay !== null && delay > 0) { - return super.requestAsyncId(scheduler, id, delay); - } - scheduler.actions.push(this); - return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(() => scheduler.flush(null))); - } - recycleAsyncId(scheduler, id, delay = 0) { - if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) { - return super.recycleAsyncId(scheduler, id, delay); - } - if (scheduler.actions.length === 0) { - cancelAnimationFrame(id); - scheduler.scheduled = undefined; - } - return undefined; - } -} -//# sourceMappingURL=AnimationFrameAction.js.map - -/***/ }), - -/***/ "WMd4": -/*!*************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/Notification.js ***! - \*************************************************************/ -/*! exports provided: NotificationKind, Notification */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return NotificationKind; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return Notification; }); -/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./observable/empty */ "EY2u"); -/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./observable/of */ "LRne"); -/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./observable/throwError */ "z6cu"); - - - -var NotificationKind; -(function (NotificationKind) { - NotificationKind["NEXT"] = "N"; - NotificationKind["ERROR"] = "E"; - NotificationKind["COMPLETE"] = "C"; -})(NotificationKind || (NotificationKind = {})); -class Notification { - constructor(kind, value, error) { - this.kind = kind; - this.value = value; - this.error = error; - this.hasValue = kind === 'N'; - } - observe(observer) { - switch (this.kind) { - case 'N': - return observer.next && observer.next(this.value); - case 'E': - return observer.error && observer.error(this.error); - case 'C': - return observer.complete && observer.complete(); - } - } - do(next, error, complete) { - const kind = this.kind; - switch (kind) { - case 'N': - return next && next(this.value); - case 'E': - return error && error(this.error); - case 'C': - return complete && complete(); - } - } - accept(nextOrObserver, error, complete) { - if (nextOrObserver && typeof nextOrObserver.next === 'function') { - return this.observe(nextOrObserver); - } - else { - return this.do(nextOrObserver, error, complete); - } - } - toObservable() { - const kind = this.kind; - switch (kind) { - case 'N': - return Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__["of"])(this.value); - case 'E': - return Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_2__["throwError"])(this.error); - case 'C': - return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_0__["empty"])(); - } - throw new Error('unexpected notification kind value'); - } - static createNext(value) { - if (typeof value !== 'undefined') { - return new Notification('N', value); - } - return Notification.undefinedValueNotification; - } - static createError(err) { - return new Notification('E', undefined, err); - } - static createComplete() { - return Notification.completeNotification; - } -} -Notification.completeNotification = new Notification('C'); -Notification.undefinedValueNotification = new Notification('N', undefined); -//# sourceMappingURL=Notification.js.map - -/***/ }), - -/***/ "WPMC": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/generate.js ***! - \********************************************************************/ -/*! exports provided: generate */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return generate; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ "SpAZ"); -/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); - - - -function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) { - let resultSelector; - let initialState; - if (arguments.length == 1) { - const options = initialStateOrOptions; - initialState = options.initialState; - condition = options.condition; - iterate = options.iterate; - resultSelector = options.resultSelector || _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]; - scheduler = options.scheduler; - } - else if (resultSelectorOrObservable === undefined || Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__["isScheduler"])(resultSelectorOrObservable)) { - initialState = initialStateOrOptions; - resultSelector = _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]; - scheduler = resultSelectorOrObservable; - } - else { - initialState = initialStateOrOptions; - resultSelector = resultSelectorOrObservable; - } - return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { - let state = initialState; - if (scheduler) { - return scheduler.schedule(dispatch, 0, { - subscriber, - iterate, - condition, - resultSelector, - state - }); - } - do { - if (condition) { - let conditionResult; - try { - conditionResult = condition(state); - } - catch (err) { - subscriber.error(err); - return undefined; - } - if (!conditionResult) { - subscriber.complete(); - break; - } - } - let value; - try { - value = resultSelector(state); - } - catch (err) { - subscriber.error(err); - return undefined; - } - subscriber.next(value); - if (subscriber.closed) { - break; - } - try { - state = iterate(state); - } - catch (err) { - subscriber.error(err); - return undefined; - } - } while (true); - return undefined; - }); -} -function dispatch(state) { - const { subscriber, condition } = state; - if (subscriber.closed) { - return undefined; - } - if (state.needIterate) { - try { - state.state = state.iterate(state.state); - } - catch (err) { - subscriber.error(err); - return undefined; - } - } - else { - state.needIterate = true; - } - if (condition) { - let conditionResult; - try { - conditionResult = condition(state.state); - } - catch (err) { - subscriber.error(err); - return undefined; - } - if (!conditionResult) { - subscriber.complete(); - return undefined; - } - if (subscriber.closed) { - return undefined; - } - } - let value; - try { - value = state.resultSelector(state.state); - } - catch (err) { - subscriber.error(err); - return undefined; - } - if (subscriber.closed) { - return undefined; - } - subscriber.next(value); - if (subscriber.closed) { - return undefined; - } - return this.schedule(state); -} -//# sourceMappingURL=generate.js.map - -/***/ }), - -/***/ "WyKG": -/*!******************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/toSubscriber.js ***! - \******************************************************************/ -/*! exports provided: toSubscriber */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toSubscriber", function() { return toSubscriber; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); -/* harmony import */ var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../symbol/rxSubscriber */ "2QA8"); -/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observer */ "gRHU"); - - - -function toSubscriber(nextOrObserver, error, complete) { - if (nextOrObserver) { - if (nextOrObserver instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) { - return nextOrObserver; - } - if (nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]) { - return nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]](); - } - } - if (!nextOrObserver && !error && !complete) { - return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](_Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]); - } - return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](nextOrObserver, error, complete); -} -//# sourceMappingURL=toSubscriber.js.map - -/***/ }), - -/***/ "XDbj": -/*!***********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/throwIfEmpty.js ***! - \***********************************************************************/ -/*! exports provided: throwIfEmpty */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return throwIfEmpty; }); -/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/EmptyError */ "sVev"); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); - - -function throwIfEmpty(errorFactory = defaultErrorFactory) { - return (source) => { - return source.lift(new ThrowIfEmptyOperator(errorFactory)); - }; -} -class ThrowIfEmptyOperator { - constructor(errorFactory) { - this.errorFactory = errorFactory; - } - call(subscriber, source) { - return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory)); - } -} -class ThrowIfEmptySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"] { - constructor(destination, errorFactory) { - super(destination); - this.errorFactory = errorFactory; - this.hasValue = false; - } - _next(value) { - this.hasValue = true; - this.destination.next(value); - } - _complete() { - if (!this.hasValue) { - let err; - try { - err = this.errorFactory(); - } - catch (e) { - err = e; - } - this.destination.error(err); - } - else { - return this.destination.complete(); - } - } -} -function defaultErrorFactory() { - return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"](); -} -//# sourceMappingURL=throwIfEmpty.js.map - -/***/ }), - -/***/ "XNiG": -/*!********************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/Subject.js ***! - \********************************************************/ -/*! exports provided: SubjectSubscriber, Subject, AnonymousSubject */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscriber", function() { return SubjectSubscriber; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return Subject; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnonymousSubject", function() { return AnonymousSubject; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Observable */ "HDdC"); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subscriber */ "7o/Q"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Subscription */ "quSY"); -/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ "9ppp"); -/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SubjectSubscription */ "Ylt2"); -/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../internal/symbol/rxSubscriber */ "2QA8"); - - - - - - -class SubjectSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"] { - constructor(destination) { - super(destination); - this.destination = destination; - } -} -class Subject extends _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"] { - constructor() { - super(); - this.observers = []; - this.closed = false; - this.isStopped = false; - this.hasError = false; - this.thrownError = null; - } - [_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_5__["rxSubscriber"]]() { - return new SubjectSubscriber(this); - } - lift(operator) { - const subject = new AnonymousSubject(this, this); - subject.operator = operator; - return subject; - } - next(value) { - if (this.closed) { - throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"](); - } - if (!this.isStopped) { - const { observers } = this; - const len = observers.length; - const copy = observers.slice(); - for (let i = 0; i < len; i++) { - copy[i].next(value); - } - } - } - error(err) { - if (this.closed) { - throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"](); - } - this.hasError = true; - this.thrownError = err; - this.isStopped = true; - const { observers } = this; - const len = observers.length; - const copy = observers.slice(); - for (let i = 0; i < len; i++) { - copy[i].error(err); - } - this.observers.length = 0; - } - complete() { - if (this.closed) { - throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"](); - } - this.isStopped = true; - const { observers } = this; - const len = observers.length; - const copy = observers.slice(); - for (let i = 0; i < len; i++) { - copy[i].complete(); - } - this.observers.length = 0; - } - unsubscribe() { - this.isStopped = true; - this.closed = true; - this.observers = null; - } - _trySubscribe(subscriber) { - if (this.closed) { - throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"](); - } - else { - return super._trySubscribe(subscriber); - } - } - _subscribe(subscriber) { - if (this.closed) { - throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"](); - } - else if (this.hasError) { - subscriber.error(this.thrownError); - return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY; - } - else if (this.isStopped) { - subscriber.complete(); - return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY; - } - else { - this.observers.push(subscriber); - return new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_4__["SubjectSubscription"](this, subscriber); - } - } - asObservable() { - const observable = new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](); - observable.source = this; - return observable; - } -} -Subject.create = (destination, source) => { - return new AnonymousSubject(destination, source); -}; -class AnonymousSubject extends Subject { - constructor(destination, source) { - super(); - this.destination = destination; - this.source = source; - } - next(value) { - const { destination } = this; - if (destination && destination.next) { - destination.next(value); - } - } - error(err) { - const { destination } = this; - if (destination && destination.error) { - this.destination.error(err); - } - } - complete() { - const { destination } = this; - if (destination && destination.complete) { - this.destination.complete(); - } - } - _subscribe(subscriber) { - const { source } = this; - if (source) { - return this.source.subscribe(subscriber); - } - else { - return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY; - } - } -} -//# sourceMappingURL=Subject.js.map - -/***/ }), - -/***/ "XoHu": -/*!**************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/isObject.js ***! - \**************************************************************/ -/*! exports provided: isObject */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; }); -function isObject(x) { - return x !== null && typeof x === 'object'; -} -//# sourceMappingURL=isObject.js.map - -/***/ }), - -/***/ "XqQ8": -/*!*********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/exhaustMap.js ***! - \*********************************************************************/ -/*! exports provided: exhaustMap */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return exhaustMap; }); -/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "lJxs"); -/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/from */ "Cfvw"); -/* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); - - - -function exhaustMap(project, resultSelector) { - if (resultSelector) { - return (source) => source.pipe(exhaustMap((a, i) => Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])((b, ii) => resultSelector(a, b, i, ii))))); - } - return (source) => source.lift(new ExhaustMapOperator(project)); -} -class ExhaustMapOperator { - constructor(project) { - this.project = project; - } - call(subscriber, source) { - return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project)); - } -} -class ExhaustMapSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"] { - constructor(destination, project) { - super(destination); - this.project = project; - this.hasSubscription = false; - this.hasCompleted = false; - this.index = 0; - } - _next(value) { - if (!this.hasSubscription) { - this.tryNext(value); - } - } - tryNext(value) { - let result; - const index = this.index++; - try { - result = this.project(value, index); - } - catch (err) { - this.destination.error(err); - return; - } - this.hasSubscription = true; - this._innerSub(result); - } - _innerSub(result) { - const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](this); - const destination = this.destination; - destination.add(innerSubscriber); - const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(result, innerSubscriber); - if (innerSubscription !== innerSubscriber) { - destination.add(innerSubscription); - } - } - _complete() { - this.hasCompleted = true; - if (!this.hasSubscription) { - this.destination.complete(); - } - this.unsubscribe(); - } - notifyNext(innerValue) { - this.destination.next(innerValue); - } - notifyError(err) { - this.destination.error(err); - } - notifyComplete() { - this.hasSubscription = false; - if (this.hasCompleted) { - this.destination.complete(); - } - } -} -//# sourceMappingURL=exhaustMap.js.map - -/***/ }), - -/***/ "Y/cZ": -/*!**********************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/Scheduler.js ***! - \**********************************************************/ -/*! exports provided: Scheduler */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return Scheduler; }); -class Scheduler { - constructor(SchedulerAction, now = Scheduler.now) { - this.SchedulerAction = SchedulerAction; - this.now = now; - } - schedule(work, delay = 0, state) { - return new this.SchedulerAction(this, work).schedule(state, delay); - } -} -Scheduler.now = () => Date.now(); -//# sourceMappingURL=Scheduler.js.map - -/***/ }), - -/***/ "Y6u4": -/*!******************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/TimeoutError.js ***! - \******************************************************************/ -/*! exports provided: TimeoutError */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return TimeoutError; }); -const TimeoutErrorImpl = (() => { - function TimeoutErrorImpl() { - Error.call(this); - this.message = 'Timeout has occurred'; - this.name = 'TimeoutError'; - return this; - } - TimeoutErrorImpl.prototype = Object.create(Error.prototype); - return TimeoutErrorImpl; -})(); -const TimeoutError = TimeoutErrorImpl; -//# sourceMappingURL=TimeoutError.js.map - -/***/ }), - -/***/ "Y6wi": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/switchAll.js ***! - \********************************************************************/ -/*! exports provided: switchAll */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return switchAll; }); -/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./switchMap */ "eIep"); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ "SpAZ"); - - -function switchAll() { - return Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]); -} -//# sourceMappingURL=switchAll.js.map - -/***/ }), - -/***/ "Y7HM": -/*!***************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/isNumeric.js ***! - \***************************************************************/ -/*! exports provided: isNumeric */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumeric", function() { return isNumeric; }); -/* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isArray */ "DH7j"); - -function isNumeric(val) { - return !Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(val) && (val - parseFloat(val) + 1) >= 0; -} -//# sourceMappingURL=isNumeric.js.map - -/***/ }), - -/***/ "Ylt2": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/SubjectSubscription.js ***! - \********************************************************************/ -/*! exports provided: SubjectSubscription */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscription", function() { return SubjectSubscription; }); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscription */ "quSY"); - -class SubjectSubscription extends _Subscription__WEBPACK_IMPORTED_MODULE_0__["Subscription"] { - constructor(subject, subscriber) { - super(); - this.subject = subject; - this.subscriber = subscriber; - this.closed = false; - } - unsubscribe() { - if (this.closed) { - return; - } - this.closed = true; - const subject = this.subject; - const observers = subject.observers; - this.subject = null; - if (!observers || observers.length === 0 || subject.isStopped || subject.closed) { - return; - } - const subscriberIndex = observers.indexOf(this.subscriber); - if (subscriberIndex !== -1) { - observers.splice(subscriberIndex, 1); - } - } -} -//# sourceMappingURL=SubjectSubscription.js.map - -/***/ }), - -/***/ "YuR2": -/*!**********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/scheduler/QueueAction.js ***! - \**********************************************************************/ -/*! exports provided: QueueAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueAction", function() { return QueueAction; }); -/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncAction */ "3N8a"); - -class QueueAction extends _AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"] { - constructor(scheduler, work) { - super(scheduler, work); - this.scheduler = scheduler; - this.work = work; - } - schedule(state, delay = 0) { - if (delay > 0) { - return super.schedule(state, delay); - } - this.delay = delay; - this.state = state; - this.scheduler.flush(this); - return this; - } - execute(state, delay) { - return (delay > 0 || this.closed) ? - super.execute(state, delay) : - this._execute(state, delay); - } - requestAsyncId(scheduler, id, delay = 0) { - if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) { - return super.requestAsyncId(scheduler, id, delay); - } - return scheduler.flush(this); - } -} -//# sourceMappingURL=QueueAction.js.map - -/***/ }), - -/***/ "ZUHj": -/*!***********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js ***! - \***********************************************************************/ -/*! exports provided: subscribeToResult */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToResult", function() { return subscribeToResult; }); -/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../InnerSubscriber */ "51Dv"); -/* harmony import */ var _subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./subscribeTo */ "SeVD"); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observable */ "HDdC"); - - - -function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__["InnerSubscriber"](outerSubscriber, outerValue, outerIndex)) { - if (innerSubscriber.closed) { - return undefined; - } - if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]) { - return result.subscribe(innerSubscriber); - } - return Object(_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(result)(innerSubscriber); -} -//# sourceMappingURL=subscribeToResult.js.map - -/***/ }), - -/***/ "Zy1z": -/*!*******************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/pairwise.js ***! - \*******************************************************************/ -/*! exports provided: pairwise */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return pairwise; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); - -function pairwise() { - return (source) => source.lift(new PairwiseOperator()); -} -class PairwiseOperator { - call(subscriber, source) { - return source.subscribe(new PairwiseSubscriber(subscriber)); - } -} -class PairwiseSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination) { - super(destination); - this.hasPrev = false; - } - _next(value) { - let pair; - if (this.hasPrev) { - pair = [this.prev, value]; - } - else { - this.hasPrev = true; - } - this.prev = value; - if (pair) { - this.destination.next(pair); - } - } -} -//# sourceMappingURL=pairwise.js.map - -/***/ }), - -/***/ "Zyez": -/*!************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/sequenceEqual.js ***! - \************************************************************************/ -/*! exports provided: sequenceEqual, SequenceEqualOperator, SequenceEqualSubscriber */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return sequenceEqual; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualOperator", function() { return SequenceEqualOperator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualSubscriber", function() { return SequenceEqualSubscriber; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); - -function sequenceEqual(compareTo, comparator) { - return (source) => source.lift(new SequenceEqualOperator(compareTo, comparator)); -} -class SequenceEqualOperator { - constructor(compareTo, comparator) { - this.compareTo = compareTo; - this.comparator = comparator; - } - call(subscriber, source) { - return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator)); - } -} -class SequenceEqualSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, compareTo, comparator) { - super(destination); - this.compareTo = compareTo; - this.comparator = comparator; - this._a = []; - this._b = []; - this._oneComplete = false; - this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, this))); - } - _next(value) { - if (this._oneComplete && this._b.length === 0) { - this.emit(false); - } - else { - this._a.push(value); - this.checkValues(); - } - } - _complete() { - if (this._oneComplete) { - this.emit(this._a.length === 0 && this._b.length === 0); - } - else { - this._oneComplete = true; - } - this.unsubscribe(); - } - checkValues() { - const { _a, _b, comparator } = this; - while (_a.length > 0 && _b.length > 0) { - let a = _a.shift(); - let b = _b.shift(); - let areEqual = false; - try { - areEqual = comparator ? comparator(a, b) : a === b; - } - catch (e) { - this.destination.error(e); - } - if (!areEqual) { - this.emit(false); - } - } - } - emit(value) { - const { destination } = this; - destination.next(value); - destination.complete(); - } - nextB(value) { - if (this._oneComplete && this._a.length === 0) { - this.emit(false); - } - else { - this._b.push(value); - this.checkValues(); - } - } - completeB() { - if (this._oneComplete) { - this.emit(this._a.length === 0 && this._b.length === 0); - } - else { - this._oneComplete = true; - } - } -} -class SequenceEqualCompareToSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, parent) { - super(destination); - this.parent = parent; - } - _next(value) { - this.parent.nextB(value); - } - _error(err) { - this.parent.error(err); - this.unsubscribe(); - } - _complete() { - this.parent.completeB(); - this.unsubscribe(); - } -} -//# sourceMappingURL=sequenceEqual.js.map - -/***/ }), - -/***/ "a7t3": -/*!************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToPromise.js ***! - \************************************************************************/ -/*! exports provided: subscribeToPromise */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToPromise", function() { return subscribeToPromise; }); -/* harmony import */ var _hostReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hostReportError */ "NJ4a"); - -const subscribeToPromise = (promise) => (subscriber) => { - promise.then((value) => { - if (!subscriber.closed) { - subscriber.next(value); - subscriber.complete(); - } - }, (err) => subscriber.error(err)) - .then(null, _hostReportError__WEBPACK_IMPORTED_MODULE_0__["hostReportError"]); - return subscriber; -}; -//# sourceMappingURL=subscribeToPromise.js.map - -/***/ }), - -/***/ "aGrj": -/*!**********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/switchMapTo.js ***! - \**********************************************************************/ -/*! exports provided: switchMapTo */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return switchMapTo; }); -/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./switchMap */ "eIep"); - -function switchMapTo(innerObservable, resultSelector) { - return resultSelector ? Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(() => innerObservable, resultSelector) : Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(() => innerObservable); -} -//# sourceMappingURL=switchMapTo.js.map - -/***/ }), - -/***/ "bHdf": -/*!*******************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeAll.js ***! - \*******************************************************************/ -/*! exports provided: mergeAll */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return mergeAll; }); -/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeMap */ "5+tZ"); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ "SpAZ"); - - -function mergeAll(concurrent = Number.POSITIVE_INFINITY) { - return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"], concurrent); -} -//# sourceMappingURL=mergeAll.js.map - -/***/ }), - -/***/ "bOdf": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/concatMap.js ***! - \********************************************************************/ -/*! exports provided: concatMap */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return concatMap; }); -/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeMap */ "5+tZ"); - -function concatMap(project, resultSelector) { - return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(project, resultSelector, 1); -} -//# sourceMappingURL=concatMap.js.map - -/***/ }), - -/***/ "c2HN": -/*!***************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/isPromise.js ***! - \***************************************************************/ -/*! exports provided: isPromise */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPromise", function() { return isPromise; }); -function isPromise(value) { - return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function'; -} -//# sourceMappingURL=isPromise.js.map - -/***/ }), - -/***/ "c6ID": -/*!*****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/sample.js ***! - \*****************************************************************/ -/*! exports provided: sample */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return sample; }); -/* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); - -function sample(notifier) { - return (source) => source.lift(new SampleOperator(notifier)); -} -class SampleOperator { - constructor(notifier) { - this.notifier = notifier; - } - call(subscriber, source) { - const sampleSubscriber = new SampleSubscriber(subscriber); - const subscription = source.subscribe(sampleSubscriber); - subscription.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(this.notifier, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](sampleSubscriber))); - return subscription; - } -} -class SampleSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { - constructor() { - super(...arguments); - this.hasValue = false; - } - _next(value) { - this.value = value; - this.hasValue = true; - } - notifyNext() { - this.emitValue(); - } - notifyComplete() { - this.emitValue(); - } - emitValue() { - if (this.hasValue) { - this.hasValue = false; - this.destination.next(this.value); - } - } -} -//# sourceMappingURL=sample.js.map - -/***/ }), - -/***/ "c7jc": -/*!***************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/util/Immediate.js ***! - \***************************************************************/ -/*! exports provided: Immediate, TestTools */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Immediate", function() { return Immediate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TestTools", function() { return TestTools; }); -let nextHandle = 1; -const RESOLVED = (() => Promise.resolve())(); -const activeHandles = {}; -function findAndClearHandle(handle) { - if (handle in activeHandles) { - delete activeHandles[handle]; - return true; - } - return false; -} -const Immediate = { - setImmediate(cb) { - const handle = nextHandle++; - activeHandles[handle] = true; - RESOLVED.then(() => findAndClearHandle(handle) && cb()); - return handle; - }, - clearImmediate(handle) { - findAndClearHandle(handle); - }, -}; -const TestTools = { - pending() { - return Object.keys(activeHandles).length; - } -}; -//# sourceMappingURL=Immediate.js.map - -/***/ }), - -/***/ "cBqT": -/*!***************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/find.js ***! - \***************************************************************/ -/*! exports provided: find, FindValueOperator, FindValueSubscriber */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return find; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueOperator", function() { return FindValueOperator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueSubscriber", function() { return FindValueSubscriber; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); - -function find(predicate, thisArg) { - if (typeof predicate !== 'function') { - throw new TypeError('predicate is not a function'); - } - return (source) => source.lift(new FindValueOperator(predicate, source, false, thisArg)); -} -class FindValueOperator { - constructor(predicate, source, yieldIndex, thisArg) { - this.predicate = predicate; - this.source = source; - this.yieldIndex = yieldIndex; - this.thisArg = thisArg; - } - call(observer, source) { - return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg)); - } -} -class FindValueSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, predicate, source, yieldIndex, thisArg) { - super(destination); - this.predicate = predicate; - this.source = source; - this.yieldIndex = yieldIndex; - this.thisArg = thisArg; - this.index = 0; - } - notifyComplete(value) { - const destination = this.destination; - destination.next(value); - destination.complete(); - this.unsubscribe(); - } - _next(value) { - const { predicate, thisArg } = this; - const index = this.index++; - try { - const result = predicate.call(thisArg || this, value, index, this.source); - if (result) { - this.notifyComplete(this.yieldIndex ? index : value); - } - } - catch (err) { - this.destination.error(err); - } - } - _complete() { - this.notifyComplete(this.yieldIndex ? -1 : undefined); - } -} -//# sourceMappingURL=find.js.map - -/***/ }), - -/***/ "coGc": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/delayWhen.js ***! - \********************************************************************/ -/*! exports provided: delayWhen */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return delayWhen; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OuterSubscriber */ "l7GE"); -/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "ZUHj"); - - - - -function delayWhen(delayDurationSelector, subscriptionDelay) { - if (subscriptionDelay) { - return (source) => new SubscriptionDelayObservable(source, subscriptionDelay) - .lift(new DelayWhenOperator(delayDurationSelector)); - } - return (source) => source.lift(new DelayWhenOperator(delayDurationSelector)); -} -class DelayWhenOperator { - constructor(delayDurationSelector) { - this.delayDurationSelector = delayDurationSelector; - } - call(subscriber, source) { - return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector)); - } -} -class DelayWhenSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"] { - constructor(destination, delayDurationSelector) { - super(destination); - this.delayDurationSelector = delayDurationSelector; - this.completed = false; - this.delayNotifierSubscriptions = []; - this.index = 0; - } - notifyNext(outerValue, _innerValue, _outerIndex, _innerIndex, innerSub) { - this.destination.next(outerValue); - this.removeSubscription(innerSub); - this.tryComplete(); - } - notifyError(error, innerSub) { - this._error(error); - } - notifyComplete(innerSub) { - const value = this.removeSubscription(innerSub); - if (value) { - this.destination.next(value); - } - this.tryComplete(); - } - _next(value) { - const index = this.index++; - try { - const delayNotifier = this.delayDurationSelector(value, index); - if (delayNotifier) { - this.tryDelay(delayNotifier, value); - } - } - catch (err) { - this.destination.error(err); - } - } - _complete() { - this.completed = true; - this.tryComplete(); - this.unsubscribe(); - } - removeSubscription(subscription) { - subscription.unsubscribe(); - const subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription); - if (subscriptionIdx !== -1) { - this.delayNotifierSubscriptions.splice(subscriptionIdx, 1); - } - return subscription.outerValue; - } - tryDelay(delayNotifier, value) { - const notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, delayNotifier, value); - if (notifierSubscription && !notifierSubscription.closed) { - const destination = this.destination; - destination.add(notifierSubscription); - this.delayNotifierSubscriptions.push(notifierSubscription); - } - } - tryComplete() { - if (this.completed && this.delayNotifierSubscriptions.length === 0) { - this.destination.complete(); - } - } -} -class SubscriptionDelayObservable extends _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"] { - constructor(source, subscriptionDelay) { - super(); - this.source = source; - this.subscriptionDelay = subscriptionDelay; - } - _subscribe(subscriber) { - this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source)); - } -} -class SubscriptionDelaySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(parent, source) { - super(); - this.parent = parent; - this.source = source; - this.sourceSubscribed = false; - } - _next(unused) { - this.subscribeToSource(); - } - _error(err) { - this.unsubscribe(); - this.parent.error(err); - } - _complete() { - this.unsubscribe(); - this.subscribeToSource(); - } - subscribeToSource() { - if (!this.sourceSubscribed) { - this.sourceSubscribed = true; - this.unsubscribe(); - this.source.subscribe(this.parent); - } - } -} -//# sourceMappingURL=delayWhen.js.map - -/***/ }), - -/***/ "cp0P": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/observable/forkJoin.js ***! - \********************************************************************/ -/*! exports provided: forkJoin */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return forkJoin; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); -/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); -/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/map */ "lJxs"); -/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isObject */ "XoHu"); -/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./from */ "Cfvw"); - - - - - -function forkJoin(...sources) { - if (sources.length === 1) { - const first = sources[0]; - if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(first)) { - return forkJoinInternal(first, null); - } - if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_3__["isObject"])(first) && Object.getPrototypeOf(first) === Object.prototype) { - const keys = Object.keys(first); - return forkJoinInternal(keys.map(key => first[key]), keys); - } - } - if (typeof sources[sources.length - 1] === 'function') { - const resultSelector = sources.pop(); - sources = (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(sources[0])) ? sources[0] : sources; - return forkJoinInternal(sources, null).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])((args) => resultSelector(...args))); - } - return forkJoinInternal(sources, null); -} -function forkJoinInternal(sources, keys) { - return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { - const len = sources.length; - if (len === 0) { - subscriber.complete(); - return; - } - const values = new Array(len); - let completed = 0; - let emitted = 0; - for (let i = 0; i < len; i++) { - const source = Object(_from__WEBPACK_IMPORTED_MODULE_4__["from"])(sources[i]); - let hasValue = false; - subscriber.add(source.subscribe({ - next: value => { - if (!hasValue) { - hasValue = true; - emitted++; - } - values[i] = value; - }, - error: err => subscriber.error(err), - complete: () => { - completed++; - if (completed === len || !hasValue) { - if (emitted === len) { - subscriber.next(keys ? - keys.reduce((result, key, i) => (result[key] = values[i], result), {}) : - values); - } - subscriber.complete(); - } - } - })); - } - }); -} -//# sourceMappingURL=forkJoin.js.map - -/***/ }), - -/***/ "cx9U": -/*!*****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/single.js ***! - \*****************************************************************/ -/*! exports provided: single */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "single", function() { return single; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); -/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/EmptyError */ "sVev"); - - -function single(predicate) { - return (source) => source.lift(new SingleOperator(predicate, source)); -} -class SingleOperator { - constructor(predicate, source) { - this.predicate = predicate; - this.source = source; - } - call(subscriber, source) { - return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source)); - } -} -class SingleSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination, predicate, source) { - super(destination); - this.predicate = predicate; - this.source = source; - this.seenValue = false; - this.index = 0; - } - applySingleValue(value) { - if (this.seenValue) { - this.destination.error('Sequence contains more than one element'); - } - else { - this.seenValue = true; - this.singleValue = value; - } - } - _next(value) { - const index = this.index++; - if (this.predicate) { - this.tryNext(value, index); - } - else { - this.applySingleValue(value); - } - } - tryNext(value, index) { - try { - if (this.predicate(value, index, this.source)) { - this.applySingleValue(value); - } - } - catch (err) { - this.destination.error(err); - } - } - _complete() { - const destination = this.destination; - if (this.index > 0) { - destination.next(this.seenValue ? this.singleValue : undefined); - destination.complete(); - } - else { - destination.error(new _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__["EmptyError"]); - } - } -} -//# sourceMappingURL=single.js.map - -/***/ }), - -/***/ "dkDA": -/*!**********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/materialize.js ***! - \**********************************************************************/ -/*! exports provided: materialize */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return materialize; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); -/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Notification */ "WMd4"); - - -function materialize() { - return function materializeOperatorFunction(source) { - return source.lift(new MaterializeOperator()); - }; -} -class MaterializeOperator { - call(subscriber, source) { - return source.subscribe(new MaterializeSubscriber(subscriber)); - } -} -class MaterializeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { - constructor(destination) { - super(destination); - } - _next(value) { - this.destination.next(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createNext(value)); - } - _error(err) { - const destination = this.destination; - destination.next(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createError(err)); - destination.complete(); - } - _complete() { - const destination = this.destination; - destination.next(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createComplete()); - destination.complete(); - } -} -//# sourceMappingURL=materialize.js.map - -/***/ }), - -/***/ "eIep": -/*!********************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/switchMap.js ***! - \********************************************************************/ -/*! exports provided: switchMap */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return switchMap; }); -/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "lJxs"); -/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/from */ "Cfvw"); -/* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); - - - -function switchMap(project, resultSelector) { - if (typeof resultSelector === 'function') { - return (source) => source.pipe(switchMap((a, i) => Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])((b, ii) => resultSelector(a, b, i, ii))))); - } - return (source) => source.lift(new SwitchMapOperator(project)); -} -class SwitchMapOperator { - constructor(project) { - this.project = project; - } - call(subscriber, source) { - return source.subscribe(new SwitchMapSubscriber(subscriber, this.project)); - } -} -class SwitchMapSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"] { - constructor(destination, project) { - super(destination); - this.project = project; - this.index = 0; - } - _next(value) { - let result; - const index = this.index++; - try { - result = this.project(value, index); - } - catch (error) { - this.destination.error(error); - return; - } - this._innerSub(result); - } - _innerSub(result) { - const innerSubscription = this.innerSubscription; - if (innerSubscription) { - innerSubscription.unsubscribe(); - } - const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](this); - const destination = this.destination; - destination.add(innerSubscriber); - this.innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(result, innerSubscriber); - if (this.innerSubscription !== innerSubscriber) { - destination.add(this.innerSubscription); - } - } - _complete() { - const { innerSubscription } = this; - if (!innerSubscription || innerSubscription.closed) { - super._complete(); - } - this.unsubscribe(); - } - _unsubscribe() { - this.innerSubscription = undefined; - } - notifyComplete() { - this.innerSubscription = undefined; - if (this.isStopped) { - super._complete(); - } - } - notifyNext(innerValue) { - this.destination.next(innerValue); - } -} -//# sourceMappingURL=switchMap.js.map - -/***/ }), - -/***/ "eNwd": -/*!*************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/scheduler/animationFrame.js ***! - \*************************************************************************/ -/*! exports provided: animationFrameScheduler, animationFrame */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function() { return animationFrameScheduler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationFrame", function() { return animationFrame; }); -/* harmony import */ var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AnimationFrameAction */ "Vpsf"); -/* harmony import */ var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AnimationFrameScheduler */ "znLP"); - - -const animationFrameScheduler = new _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__["AnimationFrameScheduler"](_AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__["AnimationFrameAction"]); -const animationFrame = animationFrameScheduler; -//# sourceMappingURL=animationFrame.js.map - -/***/ }), - -/***/ "f29J": -/*!*****************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/concat.js ***! - \*****************************************************************/ -/*! exports provided: concat */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; }); -/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/concat */ "GyhO"); - -function concat(...observables) { - return (source) => source.lift.call(Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(source, ...observables)); -} -//# sourceMappingURL=concat.js.map - -/***/ }), - -/***/ "fFD9": -/*!************************************************************************!*\ - !*** ./node_modules/rxjs/_esm2015/internal/operators/combineLatest.js ***! - \************************************************************************/ -/*! exports provided: combineLatest */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; }); -/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); -/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/combineLatest */ "itXk"); -/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/from */ "Cfvw"); - - - -const none = {}; -function combineLatest(...observables) { - let project = null; - if (typeof observables[observables.length - 1] === 'function') { - project = observables.pop(); - } - if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) { - observables = observables[0].slice(); - } - return (source) => source.lift.call(Object(_observable_from__WEBPACK_IMPORTED_MODULE_2__["from"])([source, ...observables]), new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__["CombineLatestOperator"](project)); -} -//# sourceMappingURL=combineLatest.js.map - -/***/ }), - -/***/ "fXoL": -/*!******************************************************************!*\ - !*** ./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js ***! - \******************************************************************/ -/*! exports provided: ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory, ComponentFactoryResolver, ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, Directive, ElementRef, EmbeddedViewRef, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory, NgModuleFactoryLoader, NgModuleRef, NgProbeToken, NgZone, Optional, Output, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, ReflectiveInjector, ReflectiveKey, Renderer2, RendererFactory2, RendererStyleFlags2, ResolvedReflectiveFactory, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation, ViewRef, WrappedValue, asNativeElements, assertPlatform, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getPlatform, inject, isDevMode, platformCore, resolveForwardRef, setTestabilityGetter, ɵ0, ɵALLOW_MULTIPLE_PLATFORMS, ɵAPP_ID_RANDOM_PROVIDER, ɵCREATE_ATTRIBUTE_DECORATOR__POST_R3__, ɵChangeDetectorStatus, ɵCodegenComponentFactoryResolver, ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__, ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__, ɵCompiler_compileModuleAsync__POST_R3__, ɵCompiler_compileModuleSync__POST_R3__, ɵComponentFactory, ɵConsole, ɵDEFAULT_LOCALE_ID, ɵEMPTY_ARRAY, ɵEMPTY_MAP, ɵINJECTOR_IMPL__POST_R3__, ɵINJECTOR_SCOPE, ɵLifecycleHooksFeature, ɵLocaleDataIndex, ɵNG_COMP_DEF, ɵNG_DIR_DEF, ɵNG_ELEMENT_ID, ɵNG_INJ_DEF, ɵNG_MOD_DEF, ɵNG_PIPE_DEF, ɵNG_PROV_DEF, ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, ɵNO_CHANGE, ɵNgModuleFactory, ɵNoopNgZone, ɵReflectionCapabilities, ɵRender3ComponentFactory, ɵRender3ComponentRef, ɵRender3NgModuleRef, ɵRuntimeError, ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__, ɵSWITCH_COMPILE_COMPONENT__POST_R3__, ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__, ɵSWITCH_COMPILE_INJECTABLE__POST_R3__, ɵSWITCH_COMPILE_NGMODULE__POST_R3__, ɵSWITCH_COMPILE_PIPE__POST_R3__, ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__, ɵSWITCH_IVY_ENABLED__POST_R3__, ɵSWITCH_RENDERER2_FACTORY__POST_R3__, ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__, ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__, ɵ_sanitizeHtml, ɵ_sanitizeUrl, ɵallowSanitizationBypassAndThrow, ɵand, ɵangular_packages_core_core_a, ɵangular_packages_core_core_b, ɵangular_packages_core_core_ba, ɵangular_packages_core_core_bb, ɵangular_packages_core_core_bc, ɵangular_packages_core_core_bd, ɵangular_packages_core_core_be, ɵangular_packages_core_core_bf, ɵangular_packages_core_core_bg, ɵangular_packages_core_core_bh, ɵangular_packages_core_core_bi, ɵangular_packages_core_core_bj, ɵangular_packages_core_core_bl, ɵangular_packages_core_core_bm, ɵangular_packages_core_core_bn, ɵangular_packages_core_core_bo, ɵangular_packages_core_core_bp, ɵangular_packages_core_core_bq, ɵangular_packages_core_core_br, ɵangular_packages_core_core_bs, ɵangular_packages_core_core_bv, ɵangular_packages_core_core_bw, ɵangular_packages_core_core_bx, ɵangular_packages_core_core_bz, ɵangular_packages_core_core_c, ɵangular_packages_core_core_cb, ɵangular_packages_core_core_cc, ɵangular_packages_core_core_d, ɵangular_packages_core_core_e, ɵangular_packages_core_core_f, ɵangular_packages_core_core_g, ɵangular_packages_core_core_h, ɵangular_packages_core_core_i, ɵangular_packages_core_core_j, ɵangular_packages_core_core_k, ɵangular_packages_core_core_l, ɵangular_packages_core_core_m, ɵangular_packages_core_core_n, ɵangular_packages_core_core_o, ɵangular_packages_core_core_p, ɵangular_packages_core_core_q, ɵangular_packages_core_core_r, ɵangular_packages_core_core_s, ɵangular_packages_core_core_t, ɵangular_packages_core_core_u, ɵangular_packages_core_core_v, ɵangular_packages_core_core_w, ɵangular_packages_core_core_x, ɵangular_packages_core_core_y, ɵangular_packages_core_core_z, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustResourceUrl, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustUrl, ɵccf, ɵclearOverrides, ɵclearResolutionOfComponentResourcesQueue, ɵcmf, ɵcompileComponent, ɵcompileDirective, ɵcompileNgModule, ɵcompileNgModuleDefs, ɵcompileNgModuleFactory__POST_R3__, ɵcompilePipe, ɵcreateInjector, ɵcrt, ɵdefaultIterableDiffers, ɵdefaultKeyValueDiffers, ɵdetectChanges, ɵdevModeEqual, ɵdid, ɵeld, ɵfindLocaleData, ɵflushModuleScopingQueueAsMuchAsPossible, ɵgetComponentViewDefinitionFactory, ɵgetDebugNodeR2, ɵgetDebugNode__POST_R3__, ɵgetDirectives, ɵgetHostElement, ɵgetInjectableDef, ɵgetLContext, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, ɵgetModuleFactory__POST_R3__, ɵgetSanitizationBypassType, ɵglobal, ɵinitServicesIfNeeded, ɵinlineInterpolate, ɵinterpolate, ɵisBoundToModule__POST_R3__, ɵisDefaultChangeDetectionStrategy, ɵisListLikeIterable, ɵisObservable, ɵisPromise, ɵisSubscribable, ɵivyEnabled, ɵmakeDecorator, ɵmarkDirty, ɵmod, ɵmpd, ɵncd, ɵnoSideEffects, ɵnov, ɵoverrideComponentView, ɵoverrideProvider, ɵpad, ɵpatchComponentDefWithScope, ɵpid, ɵpod, ɵppd, ɵprd, ɵpublishDefaultGlobalUtils, ɵpublishGlobalUtil, ɵqud, ɵregisterLocaleData, ɵregisterModuleFactory, ɵregisterNgModuleType, ɵrenderComponent, ɵresetCompiledComponents, ɵresetJitOptions, ɵresolveComponentResources, ɵsetClassMetadata, ɵsetCurrentInjector, ɵsetDocument, ɵsetLocaleId, ɵstore, ɵstringify, ɵted, ɵtransitiveScopesFor, ɵunregisterLocaleData, ɵunv, ɵunwrapSafeValue, ɵvid, ɵwhenRendered, ɵɵCopyDefinitionFeature, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcontentQuery, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinjectPipeChangeDetectorRef, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryRefresh, ɵɵreference, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵviewQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ANALYZE_FOR_ENTRY_COMPONENTS", function() { return ANALYZE_FOR_ENTRY_COMPONENTS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_BOOTSTRAP_LISTENER", function() { return APP_BOOTSTRAP_LISTENER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_ID", function() { return APP_ID; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_INITIALIZER", function() { return APP_INITIALIZER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApplicationInitStatus", function() { return ApplicationInitStatus; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApplicationModule", function() { return ApplicationModule; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApplicationRef", function() { return ApplicationRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Attribute", function() { return Attribute; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "COMPILER_OPTIONS", function() { return COMPILER_OPTIONS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CUSTOM_ELEMENTS_SCHEMA", function() { return CUSTOM_ELEMENTS_SCHEMA; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChangeDetectionStrategy", function() { return ChangeDetectionStrategy; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChangeDetectorRef", function() { return ChangeDetectorRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Compiler", function() { return Compiler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompilerFactory", function() { return CompilerFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return Component; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentFactory", function() { return ComponentFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentFactoryResolver", function() { return ComponentFactoryResolver; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentRef", function() { return ComponentRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentChild", function() { return ContentChild; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentChildren", function() { return ContentChildren; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_CURRENCY_CODE", function() { return DEFAULT_CURRENCY_CODE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DebugElement", function() { return DebugElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DebugEventListener", function() { return DebugEventListener; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DebugNode", function() { return DebugNode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultIterableDiffer", function() { return DefaultIterableDiffer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Directive", function() { return Directive; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElementRef", function() { return ElementRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmbeddedViewRef", function() { return EmbeddedViewRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorHandler", function() { return ErrorHandler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventEmitter", function() { return EventEmitter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Host", function() { return Host; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HostBinding", function() { return HostBinding; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HostListener", function() { return HostListener; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "INJECTOR", function() { return INJECTOR$1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Inject", function() { return Inject; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InjectFlags", function() { return InjectFlags; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Injectable", function() { return Injectable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InjectionToken", function() { return InjectionToken; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Injector", function() { return Injector; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Input", function() { return Input; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IterableDiffers", function() { return IterableDiffers; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyValueDiffers", function() { return KeyValueDiffers; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOCALE_ID", function() { return LOCALE_ID$1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MissingTranslationStrategy", function() { return MissingTranslationStrategy; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModuleWithComponentFactories", function() { return ModuleWithComponentFactories; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NO_ERRORS_SCHEMA", function() { return NO_ERRORS_SCHEMA; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModule", function() { return NgModule; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModuleFactory", function() { return NgModuleFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModuleFactoryLoader", function() { return NgModuleFactoryLoader; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModuleRef", function() { return NgModuleRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgProbeToken", function() { return NgProbeToken; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgZone", function() { return NgZone; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Optional", function() { return Optional; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Output", function() { return Output; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PACKAGE_ROOT_URL", function() { return PACKAGE_ROOT_URL; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLATFORM_ID", function() { return PLATFORM_ID; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLATFORM_INITIALIZER", function() { return PLATFORM_INITIALIZER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Pipe", function() { return Pipe; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PlatformRef", function() { return PlatformRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Query", function() { return Query; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueryList", function() { return QueryList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReflectiveInjector", function() { return ReflectiveInjector; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReflectiveKey", function() { return ReflectiveKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Renderer2", function() { return Renderer2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RendererFactory2", function() { return RendererFactory2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RendererStyleFlags2", function() { return RendererStyleFlags2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResolvedReflectiveFactory", function() { return ResolvedReflectiveFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sanitizer", function() { return Sanitizer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SecurityContext", function() { return SecurityContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Self", function() { return Self; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleChange", function() { return SimpleChange; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SkipSelf", function() { return SkipSelf; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SystemJsNgModuleLoader", function() { return SystemJsNgModuleLoader; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SystemJsNgModuleLoaderConfig", function() { return SystemJsNgModuleLoaderConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TRANSLATIONS", function() { return TRANSLATIONS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TRANSLATIONS_FORMAT", function() { return TRANSLATIONS_FORMAT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TemplateRef", function() { return TemplateRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Testability", function() { return Testability; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TestabilityRegistry", function() { return TestabilityRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Type", function() { return Type; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Version", function() { return Version; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewChild", function() { return ViewChild; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewChildren", function() { return ViewChildren; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewContainerRef", function() { return ViewContainerRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewEncapsulation", function() { return ViewEncapsulation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewRef", function() { return ViewRef$1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WrappedValue", function() { return WrappedValue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asNativeElements", function() { return asNativeElements; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assertPlatform", function() { return assertPlatform; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPlatform", function() { return createPlatform; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPlatformFactory", function() { return createPlatformFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defineInjectable", function() { return defineInjectable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroyPlatform", function() { return destroyPlatform; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enableProdMode", function() { return enableProdMode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forwardRef", function() { return forwardRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDebugNode", function() { return getDebugNode$1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getModuleFactory", function() { return getModuleFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPlatform", function() { return getPlatform; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inject", function() { return inject; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDevMode", function() { return isDevMode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "platformCore", function() { return platformCore; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolveForwardRef", function() { return resolveForwardRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTestabilityGetter", function() { return setTestabilityGetter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵ0", function() { return ɵ0$3; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵALLOW_MULTIPLE_PLATFORMS", function() { return ALLOW_MULTIPLE_PLATFORMS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵAPP_ID_RANDOM_PROVIDER", function() { return APP_ID_RANDOM_PROVIDER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCREATE_ATTRIBUTE_DECORATOR__POST_R3__", function() { return CREATE_ATTRIBUTE_DECORATOR__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵChangeDetectorStatus", function() { return ChangeDetectorStatus; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCodegenComponentFactoryResolver", function() { return CodegenComponentFactoryResolver; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__", function() { return Compiler_compileModuleAndAllComponentsAsync__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__", function() { return Compiler_compileModuleAndAllComponentsSync__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCompiler_compileModuleAsync__POST_R3__", function() { return Compiler_compileModuleAsync__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCompiler_compileModuleSync__POST_R3__", function() { return Compiler_compileModuleSync__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵComponentFactory", function() { return ComponentFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵConsole", function() { return Console; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵDEFAULT_LOCALE_ID", function() { return DEFAULT_LOCALE_ID; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵEMPTY_ARRAY", function() { return EMPTY_ARRAY$4; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵEMPTY_MAP", function() { return EMPTY_MAP; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵINJECTOR_IMPL__POST_R3__", function() { return INJECTOR_IMPL__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵINJECTOR_SCOPE", function() { return INJECTOR_SCOPE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵLifecycleHooksFeature", function() { return LifecycleHooksFeature; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵLocaleDataIndex", function() { return LocaleDataIndex; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_COMP_DEF", function() { return NG_COMP_DEF; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_DIR_DEF", function() { return NG_DIR_DEF; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_ELEMENT_ID", function() { return NG_ELEMENT_ID; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_INJ_DEF", function() { return NG_INJ_DEF; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_MOD_DEF", function() { return NG_MOD_DEF; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_PIPE_DEF", function() { return NG_PIPE_DEF; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_PROV_DEF", function() { return NG_PROV_DEF; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR", function() { return NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNO_CHANGE", function() { return NO_CHANGE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNgModuleFactory", function() { return NgModuleFactory$1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNoopNgZone", function() { return NoopNgZone; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵReflectionCapabilities", function() { return ReflectionCapabilities; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵRender3ComponentFactory", function() { return ComponentFactory$1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵRender3ComponentRef", function() { return ComponentRef$1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵRender3NgModuleRef", function() { return NgModuleRef$1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵRuntimeError", function() { return RuntimeError; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__", function() { return SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_COMPONENT__POST_R3__", function() { return SWITCH_COMPILE_COMPONENT__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__", function() { return SWITCH_COMPILE_DIRECTIVE__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_INJECTABLE__POST_R3__", function() { return SWITCH_COMPILE_INJECTABLE__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_NGMODULE__POST_R3__", function() { return SWITCH_COMPILE_NGMODULE__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_PIPE__POST_R3__", function() { return SWITCH_COMPILE_PIPE__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__", function() { return SWITCH_ELEMENT_REF_FACTORY__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_IVY_ENABLED__POST_R3__", function() { return SWITCH_IVY_ENABLED__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_RENDERER2_FACTORY__POST_R3__", function() { return SWITCH_RENDERER2_FACTORY__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__", function() { return SWITCH_TEMPLATE_REF_FACTORY__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__", function() { return SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵ_sanitizeHtml", function() { return _sanitizeHtml; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵ_sanitizeUrl", function() { return _sanitizeUrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵallowSanitizationBypassAndThrow", function() { return allowSanitizationBypassAndThrow; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵand", function() { return anchorDef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_a", function() { return isForwardRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_b", function() { return injectInjectorOnly; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_ba", function() { return zoneSchedulerFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bb", function() { return USD_CURRENCY_CODE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bc", function() { return _def; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bd", function() { return DebugContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_be", function() { return NgOnChangesFeatureImpl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bf", function() { return SCHEDULER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bg", function() { return injectAttributeImpl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bh", function() { return getLView; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bi", function() { return getBindingRoot; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bj", function() { return nextContextImpl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bl", function() { return pureFunction1Internal; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bm", function() { return pureFunction2Internal; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bn", function() { return pureFunction3Internal; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bo", function() { return pureFunction4Internal; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bp", function() { return pureFunctionVInternal; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bq", function() { return getUrlSanitizer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_br", function() { return makePropDecorator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bs", function() { return makeParamDecorator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bv", function() { return getClosureSafeProperty; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bw", function() { return NullInjector; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bx", function() { return getInjectImplementation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bz", function() { return getNativeByTNode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_c", function() { return attachInjectFlag; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_cb", function() { return getRootContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_cc", function() { return i18nPostprocess; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_d", function() { return ReflectiveInjector_; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_e", function() { return ReflectiveDependency; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_f", function() { return resolveReflectiveProviders; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_g", function() { return _appIdRandomProviderFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_h", function() { return injectRenderer2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_i", function() { return injectElementRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_j", function() { return createElementRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_k", function() { return getModuleFactory__PRE_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_l", function() { return injectTemplateRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_m", function() { return createTemplateRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_n", function() { return injectViewContainerRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_o", function() { return DebugNode__PRE_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_p", function() { return DebugElement__PRE_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_q", function() { return getDebugNodeR2__PRE_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_r", function() { return injectChangeDetectorRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_s", function() { return DefaultIterableDifferFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_t", function() { return DefaultKeyValueDifferFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_u", function() { return defaultIterableDiffersFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_v", function() { return defaultKeyValueDiffersFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_w", function() { return _iterableDiffersFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_x", function() { return _keyValueDiffersFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_y", function() { return _localeFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_z", function() { return APPLICATION_MODULE_PROVIDERS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustHtml", function() { return bypassSanitizationTrustHtml; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustResourceUrl", function() { return bypassSanitizationTrustResourceUrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustScript", function() { return bypassSanitizationTrustScript; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustStyle", function() { return bypassSanitizationTrustStyle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustUrl", function() { return bypassSanitizationTrustUrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵccf", function() { return createComponentFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵclearOverrides", function() { return clearOverrides; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵclearResolutionOfComponentResourcesQueue", function() { return clearResolutionOfComponentResourcesQueue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcmf", function() { return createNgModuleFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileComponent", function() { return compileComponent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileDirective", function() { return compileDirective; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileNgModule", function() { return compileNgModule; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileNgModuleDefs", function() { return compileNgModuleDefs; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileNgModuleFactory__POST_R3__", function() { return compileNgModuleFactory__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompilePipe", function() { return compilePipe; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcreateInjector", function() { return createInjector; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcrt", function() { return createRendererType2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdefaultIterableDiffers", function() { return defaultIterableDiffers; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdefaultKeyValueDiffers", function() { return defaultKeyValueDiffers; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdetectChanges", function() { return detectChanges; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdevModeEqual", function() { return devModeEqual; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdid", function() { return directiveDef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵeld", function() { return elementDef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵfindLocaleData", function() { return findLocaleData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵflushModuleScopingQueueAsMuchAsPossible", function() { return flushModuleScopingQueueAsMuchAsPossible; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetComponentViewDefinitionFactory", function() { return getComponentViewDefinitionFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetDebugNodeR2", function() { return getDebugNodeR2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetDebugNode__POST_R3__", function() { return getDebugNode__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetDirectives", function() { return getDirectives; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetHostElement", function() { return getHostElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetInjectableDef", function() { return getInjectableDef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetLContext", function() { return getLContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetLocaleCurrencyCode", function() { return getLocaleCurrencyCode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetLocalePluralCase", function() { return getLocalePluralCase; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetModuleFactory__POST_R3__", function() { return getModuleFactory__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetSanitizationBypassType", function() { return getSanitizationBypassType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵglobal", function() { return _global; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinitServicesIfNeeded", function() { return initServicesIfNeeded; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinlineInterpolate", function() { return inlineInterpolate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinterpolate", function() { return interpolate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisBoundToModule__POST_R3__", function() { return isBoundToModule__POST_R3__; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisDefaultChangeDetectionStrategy", function() { return isDefaultChangeDetectionStrategy; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisListLikeIterable", function() { return isListLikeIterable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisObservable", function() { return isObservable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisPromise", function() { return isPromise; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisSubscribable", function() { return isSubscribable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵivyEnabled", function() { return ivyEnabled; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵmakeDecorator", function() { return makeDecorator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵmarkDirty", function() { return markDirty; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵmod", function() { return moduleDef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵmpd", function() { return moduleProvideDef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵncd", function() { return ngContentDef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵnoSideEffects", function() { return noSideEffects; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵnov", function() { return nodeValue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵoverrideComponentView", function() { return overrideComponentView; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵoverrideProvider", function() { return overrideProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpad", function() { return pureArrayDef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpatchComponentDefWithScope", function() { return patchComponentDefWithScope; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpid", function() { return pipeDef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpod", function() { return pureObjectDef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵppd", function() { return purePipeDef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵprd", function() { return providerDef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpublishDefaultGlobalUtils", function() { return publishDefaultGlobalUtils; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpublishGlobalUtil", function() { return publishGlobalUtil; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵqud", function() { return queryDef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵregisterLocaleData", function() { return registerLocaleData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵregisterModuleFactory", function() { return registerModuleFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵregisterNgModuleType", function() { return registerNgModuleType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵrenderComponent", function() { return renderComponent$1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵresetCompiledComponents", function() { return resetCompiledComponents; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵresetJitOptions", function() { return resetJitOptions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵresolveComponentResources", function() { return resolveComponentResources; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsetClassMetadata", function() { return setClassMetadata; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsetCurrentInjector", function() { return setCurrentInjector; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsetDocument", function() { return setDocument; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsetLocaleId", function() { return setLocaleId; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵstore", function() { return store; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵstringify", function() { return stringify; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵted", function() { return textDef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵtransitiveScopesFor", function() { return transitiveScopesFor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵunregisterLocaleData", function() { return unregisterAllLocaleData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵunv", function() { return unwrapValue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵunwrapSafeValue", function() { return unwrapSafeValue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵvid", function() { return viewDef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵwhenRendered", function() { return whenRendered; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵCopyDefinitionFeature", function() { return ɵɵCopyDefinitionFeature; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵInheritDefinitionFeature", function() { return ɵɵInheritDefinitionFeature; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵNgOnChangesFeature", function() { return ɵɵNgOnChangesFeature; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵProvidersFeature", function() { return ɵɵProvidersFeature; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵadvance", function() { return ɵɵadvance; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattribute", function() { return ɵɵattribute; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate1", function() { return ɵɵattributeInterpolate1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate2", function() { return ɵɵattributeInterpolate2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate3", function() { return ɵɵattributeInterpolate3; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate4", function() { return ɵɵattributeInterpolate4; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate5", function() { return ɵɵattributeInterpolate5; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate6", function() { return ɵɵattributeInterpolate6; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate7", function() { return ɵɵattributeInterpolate7; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate8", function() { return ɵɵattributeInterpolate8; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolateV", function() { return ɵɵattributeInterpolateV; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMap", function() { return ɵɵclassMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate1", function() { return ɵɵclassMapInterpolate1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate2", function() { return ɵɵclassMapInterpolate2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate3", function() { return ɵɵclassMapInterpolate3; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate4", function() { return ɵɵclassMapInterpolate4; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate5", function() { return ɵɵclassMapInterpolate5; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate6", function() { return ɵɵclassMapInterpolate6; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate7", function() { return ɵɵclassMapInterpolate7; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate8", function() { return ɵɵclassMapInterpolate8; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolateV", function() { return ɵɵclassMapInterpolateV; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassProp", function() { return ɵɵclassProp; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵcontentQuery", function() { return ɵɵcontentQuery; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefineComponent", function() { return ɵɵdefineComponent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefineDirective", function() { return ɵɵdefineDirective; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefineInjectable", function() { return ɵɵdefineInjectable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefineInjector", function() { return ɵɵdefineInjector; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefineNgModule", function() { return ɵɵdefineNgModule; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefinePipe", function() { return ɵɵdefinePipe; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdirectiveInject", function() { return ɵɵdirectiveInject; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdisableBindings", function() { return ɵɵdisableBindings; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelement", function() { return ɵɵelement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelementContainer", function() { return ɵɵelementContainer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelementContainerEnd", function() { return ɵɵelementContainerEnd; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelementContainerStart", function() { return ɵɵelementContainerStart; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelementEnd", function() { return ɵɵelementEnd; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelementStart", function() { return ɵɵelementStart; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵenableBindings", function() { return ɵɵenableBindings; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵgetCurrentView", function() { return ɵɵgetCurrentView; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵgetInheritedFactory", function() { return ɵɵgetInheritedFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵhostProperty", function() { return ɵɵhostProperty; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18n", function() { return ɵɵi18n; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nApply", function() { return ɵɵi18nApply; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nAttributes", function() { return ɵɵi18nAttributes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nEnd", function() { return ɵɵi18nEnd; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nExp", function() { return ɵɵi18nExp; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nPostprocess", function() { return ɵɵi18nPostprocess; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nStart", function() { return ɵɵi18nStart; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵinject", function() { return ɵɵinject; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵinjectAttribute", function() { return ɵɵinjectAttribute; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵinjectPipeChangeDetectorRef", function() { return ɵɵinjectPipeChangeDetectorRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵinvalidFactory", function() { return ɵɵinvalidFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵinvalidFactoryDep", function() { return ɵɵinvalidFactoryDep; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵlistener", function() { return ɵɵlistener; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵloadQuery", function() { return ɵɵloadQuery; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵnamespaceHTML", function() { return ɵɵnamespaceHTML; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵnamespaceMathML", function() { return ɵɵnamespaceMathML; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵnamespaceSVG", function() { return ɵɵnamespaceSVG; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵnextContext", function() { return ɵɵnextContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵngDeclareComponent", function() { return ɵɵngDeclareComponent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵngDeclareDirective", function() { return ɵɵngDeclareDirective; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵngDeclarePipe", function() { return ɵɵngDeclarePipe; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipe", function() { return ɵɵpipe; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipeBind1", function() { return ɵɵpipeBind1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipeBind2", function() { return ɵɵpipeBind2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipeBind3", function() { return ɵɵpipeBind3; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipeBind4", function() { return ɵɵpipeBind4; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipeBindV", function() { return ɵɵpipeBindV; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵprojection", function() { return ɵɵprojection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵprojectionDef", function() { return ɵɵprojectionDef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵproperty", function() { return ɵɵproperty; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate", function() { return ɵɵpropertyInterpolate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate1", function() { return ɵɵpropertyInterpolate1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate2", function() { return ɵɵpropertyInterpolate2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate3", function() { return ɵɵpropertyInterpolate3; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate4", function() { return ɵɵpropertyInterpolate4; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate5", function() { return ɵɵpropertyInterpolate5; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate6", function() { return ɵɵpropertyInterpolate6; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate7", function() { return ɵɵpropertyInterpolate7; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate8", function() { return ɵɵpropertyInterpolate8; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolateV", function() { return ɵɵpropertyInterpolateV; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction0", function() { return ɵɵpureFunction0; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction1", function() { return ɵɵpureFunction1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction2", function() { return ɵɵpureFunction2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction3", function() { return ɵɵpureFunction3; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction4", function() { return ɵɵpureFunction4; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction5", function() { return ɵɵpureFunction5; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction6", function() { return ɵɵpureFunction6; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction7", function() { return ɵɵpureFunction7; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction8", function() { return ɵɵpureFunction8; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunctionV", function() { return ɵɵpureFunctionV; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵqueryRefresh", function() { return ɵɵqueryRefresh; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵreference", function() { return ɵɵreference; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵresolveBody", function() { return ɵɵresolveBody; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵresolveDocument", function() { return ɵɵresolveDocument; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵresolveWindow", function() { return ɵɵresolveWindow; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵrestoreView", function() { return ɵɵrestoreView; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeHtml", function() { return ɵɵsanitizeHtml; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeResourceUrl", function() { return ɵɵsanitizeResourceUrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeScript", function() { return ɵɵsanitizeScript; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeStyle", function() { return ɵɵsanitizeStyle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeUrl", function() { return ɵɵsanitizeUrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeUrlOrResourceUrl", function() { return ɵɵsanitizeUrlOrResourceUrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsetComponentScope", function() { return ɵɵsetComponentScope; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsetNgModuleScope", function() { return ɵɵsetNgModuleScope; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMap", function() { return ɵɵstyleMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate1", function() { return ɵɵstyleMapInterpolate1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate2", function() { return ɵɵstyleMapInterpolate2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate3", function() { return ɵɵstyleMapInterpolate3; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate4", function() { return ɵɵstyleMapInterpolate4; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate5", function() { return ɵɵstyleMapInterpolate5; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate6", function() { return ɵɵstyleMapInterpolate6; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate7", function() { return ɵɵstyleMapInterpolate7; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate8", function() { return ɵɵstyleMapInterpolate8; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolateV", function() { return ɵɵstyleMapInterpolateV; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleProp", function() { return ɵɵstyleProp; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate1", function() { return ɵɵstylePropInterpolate1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate2", function() { return ɵɵstylePropInterpolate2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate3", function() { return ɵɵstylePropInterpolate3; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate4", function() { return ɵɵstylePropInterpolate4; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate5", function() { return ɵɵstylePropInterpolate5; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate6", function() { return ɵɵstylePropInterpolate6; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate7", function() { return ɵɵstylePropInterpolate7; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate8", function() { return ɵɵstylePropInterpolate8; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolateV", function() { return ɵɵstylePropInterpolateV; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsyntheticHostListener", function() { return ɵɵsyntheticHostListener; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsyntheticHostProperty", function() { return ɵɵsyntheticHostProperty; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtemplate", function() { return ɵɵtemplate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtemplateRefExtractor", function() { return ɵɵtemplateRefExtractor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtext", function() { return ɵɵtext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate", function() { return ɵɵtextInterpolate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate1", function() { return ɵɵtextInterpolate1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate2", function() { return ɵɵtextInterpolate2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate3", function() { return ɵɵtextInterpolate3; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate4", function() { return ɵɵtextInterpolate4; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate5", function() { return ɵɵtextInterpolate5; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate6", function() { return ɵɵtextInterpolate6; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate7", function() { return ɵɵtextInterpolate7; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate8", function() { return ɵɵtextInterpolate8; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolateV", function() { return ɵɵtextInterpolateV; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtrustConstantHtml", function() { return ɵɵtrustConstantHtml; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtrustConstantResourceUrl", function() { return ɵɵtrustConstantResourceUrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵviewQuery", function() { return ɵɵviewQuery; }); -/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs */ "qCKp"); -/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/operators */ "kU1M"); -/** - * @license Angular v11.2.14 - * (c) 2010-2021 Google LLC. https://angular.io/ - * License: MIT - */ - - - - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function getClosureSafeProperty(objWithPropertyToExtract) { - for (let key in objWithPropertyToExtract) { - if (objWithPropertyToExtract[key] === getClosureSafeProperty) { - return key; - } - } - throw Error('Could not find renamed property on target object.'); -} -/** - * Sets properties on a target object from a source object, but only if - * the property doesn't already exist on the target object. - * @param target The target to set properties on - * @param source The source of the property keys and values to set - */ -function fillProperties(target, source) { - for (const key in source) { - if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) { - target[key] = source[key]; - } - } -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function stringify(token) { - if (typeof token === 'string') { - return token; - } - if (Array.isArray(token)) { - return '[' + token.map(stringify).join(', ') + ']'; - } - if (token == null) { - return '' + token; - } - if (token.overriddenName) { - return `${token.overriddenName}`; - } - if (token.name) { - return `${token.name}`; - } - const res = token.toString(); - if (res == null) { - return '' + res; - } - const newLineIndex = res.indexOf('\n'); - return newLineIndex === -1 ? res : res.substring(0, newLineIndex); -} -/** - * Concatenates two strings with separator, allocating new strings only when necessary. - * - * @param before before string. - * @param separator separator string. - * @param after after string. - * @returns concatenated string. - */ -function concatStringsWithSpace(before, after) { - return (before == null || before === '') ? - (after === null ? '' : after) : - ((after == null || after === '') ? before : before + ' ' + after); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -const __forward_ref__ = getClosureSafeProperty({ __forward_ref__: getClosureSafeProperty }); -/** - * Allows to refer to references which are not yet defined. - * - * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of - * DI is declared, but not yet defined. It is also used when the `token` which we use when creating - * a query is not yet defined. - * - * @usageNotes - * ### Example - * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'} - * @publicApi - */ -function forwardRef(forwardRefFn) { - forwardRefFn.__forward_ref__ = forwardRef; - forwardRefFn.toString = function () { - return stringify(this()); - }; - return forwardRefFn; -} -/** - * Lazily retrieves the reference value from a forwardRef. - * - * Acts as the identity function when given a non-forward-ref value. - * - * @usageNotes - * ### Example - * - * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'} - * - * @see `forwardRef` - * @publicApi - */ -function resolveForwardRef(type) { - return isForwardRef(type) ? type() : type; -} -/** Checks whether a function is wrapped by a `forwardRef`. */ -function isForwardRef(fn) { - return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) && - fn.__forward_ref__ === forwardRef; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -// Base URL for the error details page. -// Keep this value in sync with a similar const in -// `packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.ts`. -const ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors'; -class RuntimeError extends Error { - constructor(code, message) { - super(formatRuntimeError(code, message)); - this.code = code; - } -} -// Contains a set of error messages that have details guides at angular.io. -// Full list of available error guides can be found at https://angular.io/errors -/* tslint:disable:no-toplevel-property-access */ -const RUNTIME_ERRORS_WITH_GUIDES = new Set([ - "100" /* EXPRESSION_CHANGED_AFTER_CHECKED */, - "200" /* CYCLIC_DI_DEPENDENCY */, - "201" /* PROVIDER_NOT_FOUND */, - "300" /* MULTIPLE_COMPONENTS_MATCH */, - "301" /* EXPORT_NOT_FOUND */, - "302" /* PIPE_NOT_FOUND */, -]); -/* tslint:enable:no-toplevel-property-access */ -/** Called to format a runtime error */ -function formatRuntimeError(code, message) { - const fullCode = code ? `NG0${code}: ` : ''; - let errorMessage = `${fullCode}${message}`; - // Some runtime errors are still thrown without `ngDevMode` (for example - // `throwProviderNotFoundError`), so we add `ngDevMode` check here to avoid pulling - // `RUNTIME_ERRORS_WITH_GUIDES` symbol into prod bundles. - // TODO: revisit all instances where `RuntimeError` is thrown and see if `ngDevMode` can be added - // there instead to tree-shake more devmode-only code (and eventually remove `ngDevMode` check - // from this code). - if (ngDevMode && RUNTIME_ERRORS_WITH_GUIDES.has(code)) { - errorMessage = `${errorMessage}. Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/NG0${code}`; - } - return errorMessage; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * Used for stringify render output in Ivy. - * Important! This function is very performance-sensitive and we should - * be extra careful not to introduce megamorphic reads in it. - * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations. - */ -function renderStringify(value) { - if (typeof value === 'string') - return value; - if (value == null) - return ''; - // Use `String` so that it invokes the `toString` method of the value. Note that this - // appears to be faster than calling `value.toString` (see `render_stringify` benchmark). - return String(value); -} -/** - * Used to stringify a value so that it can be displayed in an error message. - * Important! This function contains a megamorphic read and should only be - * used for error messages. - */ -function stringifyForError(value) { - if (typeof value === 'function') - return value.name || value.toString(); - if (typeof value === 'object' && value != null && typeof value.type === 'function') { - return value.type.name || value.type.toString(); - } - return renderStringify(value); -} - -/** Called when directives inject each other (creating a circular dependency) */ -function throwCyclicDependencyError(token, path) { - const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : ''; - throw new RuntimeError("200" /* CYCLIC_DI_DEPENDENCY */, `Circular dependency in DI detected for ${token}${depPath}`); -} -function throwMixedMultiProviderError() { - throw new Error(`Cannot mix multi providers and regular providers`); -} -function throwInvalidProviderError(ngModuleType, providers, provider) { - let ngModuleDetail = ''; - if (ngModuleType && providers) { - const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...'); - ngModuleDetail = - ` - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`; - } - throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}'` + ngModuleDetail); -} -/** Throws an error when a token is not found in DI. */ -function throwProviderNotFoundError(token, injectorName) { - const injectorDetails = injectorName ? ` in ${injectorName}` : ''; - throw new RuntimeError("201" /* PROVIDER_NOT_FOUND */, `No provider for ${stringifyForError(token)} found${injectorDetails}`); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function assertNumber(actual, msg) { - if (!(typeof actual === 'number')) { - throwError(msg, typeof actual, 'number', '==='); - } -} -function assertNumberInRange(actual, minInclusive, maxInclusive) { - assertNumber(actual, 'Expected a number'); - assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to'); - assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to'); -} -function assertString(actual, msg) { - if (!(typeof actual === 'string')) { - throwError(msg, actual === null ? 'null' : typeof actual, 'string', '==='); - } -} -function assertFunction(actual, msg) { - if (!(typeof actual === 'function')) { - throwError(msg, actual === null ? 'null' : typeof actual, 'function', '==='); - } -} -function assertEqual(actual, expected, msg) { - if (!(actual == expected)) { - throwError(msg, actual, expected, '=='); - } -} -function assertNotEqual(actual, expected, msg) { - if (!(actual != expected)) { - throwError(msg, actual, expected, '!='); - } -} -function assertSame(actual, expected, msg) { - if (!(actual === expected)) { - throwError(msg, actual, expected, '==='); - } -} -function assertNotSame(actual, expected, msg) { - if (!(actual !== expected)) { - throwError(msg, actual, expected, '!=='); - } -} -function assertLessThan(actual, expected, msg) { - if (!(actual < expected)) { - throwError(msg, actual, expected, '<'); - } -} -function assertLessThanOrEqual(actual, expected, msg) { - if (!(actual <= expected)) { - throwError(msg, actual, expected, '<='); - } -} -function assertGreaterThan(actual, expected, msg) { - if (!(actual > expected)) { - throwError(msg, actual, expected, '>'); - } -} -function assertGreaterThanOrEqual(actual, expected, msg) { - if (!(actual >= expected)) { - throwError(msg, actual, expected, '>='); - } -} -function assertNotDefined(actual, msg) { - if (actual != null) { - throwError(msg, actual, null, '=='); - } -} -function assertDefined(actual, msg) { - if (actual == null) { - throwError(msg, actual, null, '!='); - } -} -function throwError(msg, actual, expected, comparison) { - throw new Error(`ASSERTION ERROR: ${msg}` + - (comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`)); -} -function assertDomNode(node) { - // If we're in a worker, `Node` will not be defined. - if (!(typeof Node !== 'undefined' && node instanceof Node) && - !(typeof node === 'object' && node != null && - node.constructor.name === 'WebWorkerRenderNode')) { - throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`); - } -} -function assertIndexInRange(arr, index) { - assertDefined(arr, 'Array must be defined.'); - const maxLen = arr.length; - if (index < 0 || index >= maxLen) { - throwError(`Index expected to be less than ${maxLen} but got ${index}`); - } -} -function assertOneOf(value, ...validValues) { - if (validValues.indexOf(value) !== -1) - return true; - throwError(`Expected value to be one of ${JSON.stringify(validValues)} but was ${JSON.stringify(value)}.`); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * Construct an `InjectableDef` which defines how a token will be constructed by the DI system, and - * in which injectors (if any) it will be available. - * - * This should be assigned to a static `ɵprov` field on a type, which will then be an - * `InjectableType`. - * - * Options: - * * `providedIn` determines which injectors will include the injectable, by either associating it - * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be - * provided in the `'root'` injector, which will be the application-level injector in most apps. - * * `factory` gives the zero argument function which will create an instance of the injectable. - * The factory can call `inject` to access the `Injector` and request injection of dependencies. - * - * @codeGenApi - * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm. - */ -function ɵɵdefineInjectable(opts) { - return { - token: opts.token, - providedIn: opts.providedIn || null, - factory: opts.factory, - value: undefined, - }; -} -/** - * @deprecated in v8, delete after v10. This API should be used only by generated code, and that - * code should now use ɵɵdefineInjectable instead. - * @publicApi - */ -const defineInjectable = ɵɵdefineInjectable; -/** - * Construct an `InjectorDef` which configures an injector. - * - * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an - * `InjectorType`. - * - * Options: - * - * * `providers`: an optional array of providers to add to the injector. Each provider must - * either have a factory or point to a type which has a `ɵprov` static property (the - * type must be an `InjectableType`). - * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s - * whose providers will also be added to the injector. Locally provided types will override - * providers from imports. - * - * @codeGenApi - */ -function ɵɵdefineInjector(options) { - return { providers: options.providers || [], imports: options.imports || [] }; -} -/** - * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading - * inherited value. - * - * @param type A type which may have its own (non-inherited) `ɵprov`. - */ -function getInjectableDef(type) { - return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF); -} -/** - * Return definition only if it is defined directly on `type` and is not inherited from a base - * class of `type`. - */ -function getOwnDefinition(type, field) { - return type.hasOwnProperty(field) ? type[field] : null; -} -/** - * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors. - * - * @param type A type which may have `ɵprov`, via inheritance. - * - * @deprecated Will be removed in a future version of Angular, where an error will occur in the - * scenario if we find the `ɵprov` on an ancestor only. - */ -function getInheritedInjectableDef(type) { - const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]); - if (def) { - const typeName = getTypeName(type); - // TODO(FW-1307): Re-add ngDevMode when closure can handle it - // ngDevMode && - console.warn(`DEPRECATED: DI is instantiating a token "${typeName}" that inherits its @Injectable decorator but does not provide one itself.\n` + - `This will become an error in a future version of Angular. Please add @Injectable() to the "${typeName}" class.`); - return def; - } - else { - return null; - } -} -/** Gets the name of a type, accounting for some cross-browser differences. */ -function getTypeName(type) { - // `Function.prototype.name` behaves differently between IE and other browsers. In most browsers - // it'll always return the name of the function itself, no matter how many other functions it - // inherits from. On IE the function doesn't have its own `name` property, but it takes it from - // the lowest level in the prototype chain. E.g. if we have `class Foo extends Parent` most - // browsers will evaluate `Foo.name` to `Foo` while IE will return `Parent`. We work around - // the issue by converting the function to a string and parsing its name out that way via a regex. - if (type.hasOwnProperty('name')) { - return type.name; - } - const match = ('' + type).match(/^function\s*([^\s(]+)/); - return match === null ? '' : match[1]; -} -/** - * Read the injector def type in a way which is immune to accidentally reading inherited value. - * - * @param type type which may have an injector def (`ɵinj`) - */ -function getInjectorDef(type) { - return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ? - type[NG_INJ_DEF] : - null; -} -const NG_PROV_DEF = getClosureSafeProperty({ ɵprov: getClosureSafeProperty }); -const NG_INJ_DEF = getClosureSafeProperty({ ɵinj: getClosureSafeProperty }); -// We need to keep these around so we can read off old defs if new defs are unavailable -const NG_INJECTABLE_DEF = getClosureSafeProperty({ ngInjectableDef: getClosureSafeProperty }); -const NG_INJECTOR_DEF = getClosureSafeProperty({ ngInjectorDef: getClosureSafeProperty }); - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * Injection flags for DI. - * - * @publicApi - */ -var InjectFlags; -(function (InjectFlags) { - // TODO(alxhub): make this 'const' (and remove `InternalInjectFlags` enum) when ngc no longer - // writes exports of it into ngfactory files. - /** Check self and check parent injector if needed */ - InjectFlags[InjectFlags["Default"] = 0] = "Default"; - /** - * Specifies that an injector should retrieve a dependency from any injector until reaching the - * host element of the current component. (Only used with Element Injector) - */ - InjectFlags[InjectFlags["Host"] = 1] = "Host"; - /** Don't ascend to ancestors of the node requesting injection. */ - InjectFlags[InjectFlags["Self"] = 2] = "Self"; - /** Skip the node that is requesting injection. */ - InjectFlags[InjectFlags["SkipSelf"] = 4] = "SkipSelf"; - /** Inject `defaultValue` instead if token not found. */ - InjectFlags[InjectFlags["Optional"] = 8] = "Optional"; -})(InjectFlags || (InjectFlags = {})); - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * Current implementation of inject. - * - * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed - * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this - * way for two reasons: - * 1. `Injector` should not depend on ivy logic. - * 2. To maintain tree shake-ability we don't want to bring in unnecessary code. - */ -let _injectImplementation; -function getInjectImplementation() { - return _injectImplementation; -} -/** - * Sets the current inject implementation. - */ -function setInjectImplementation(impl) { - const previous = _injectImplementation; - _injectImplementation = impl; - return previous; -} -/** - * Injects `root` tokens in limp mode. - * - * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to - * `"root"`. This is known as the limp mode injection. In such case the value is stored in the - * `InjectableDef`. - */ -function injectRootLimpMode(token, notFoundValue, flags) { - const injectableDef = getInjectableDef(token); - if (injectableDef && injectableDef.providedIn == 'root') { - return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() : - injectableDef.value; - } - if (flags & InjectFlags.Optional) - return null; - if (notFoundValue !== undefined) - return notFoundValue; - throwProviderNotFoundError(stringify(token), 'Injector'); -} -/** - * Assert that `_injectImplementation` is not `fn`. - * - * This is useful, to prevent infinite recursion. - * - * @param fn Function which it should not equal to - */ -function assertInjectImplementationNotEqual(fn) { - ngDevMode && - assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion'); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * Convince closure compiler that the wrapped function has no side-effects. - * - * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to - * allow us to execute a function but have closure compiler mark the call as no-side-effects. - * It is important that the return value for the `noSideEffects` function be assigned - * to something which is retained otherwise the call to `noSideEffects` will be removed by closure - * compiler. - */ -function noSideEffects(fn) { - return { toString: fn }.toString(); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * The strategy that the default change detector uses to detect changes. - * When set, takes effect the next time change detection is triggered. - * - * @see {@link ChangeDetectorRef#usage-notes Change detection usage} - * - * @publicApi - */ -var ChangeDetectionStrategy; -(function (ChangeDetectionStrategy) { - /** - * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated - * until reactivated by setting the strategy to `Default` (`CheckAlways`). - * Change detection can still be explicitly invoked. - * This strategy applies to all child directives and cannot be overridden. - */ - ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush"; - /** - * Use the default `CheckAlways` strategy, in which change detection is automatic until - * explicitly deactivated. - */ - ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default"; -})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {})); -/** - * Defines the possible states of the default change detector. - * @see `ChangeDetectorRef` - */ -var ChangeDetectorStatus; -(function (ChangeDetectorStatus) { - /** - * A state in which, after calling `detectChanges()`, the change detector - * state becomes `Checked`, and must be explicitly invoked or reactivated. - */ - ChangeDetectorStatus[ChangeDetectorStatus["CheckOnce"] = 0] = "CheckOnce"; - /** - * A state in which change detection is skipped until the change detector mode - * becomes `CheckOnce`. - */ - ChangeDetectorStatus[ChangeDetectorStatus["Checked"] = 1] = "Checked"; - /** - * A state in which change detection continues automatically until explicitly - * deactivated. - */ - ChangeDetectorStatus[ChangeDetectorStatus["CheckAlways"] = 2] = "CheckAlways"; - /** - * A state in which a change detector sub tree is not a part of the main tree and - * should be skipped. - */ - ChangeDetectorStatus[ChangeDetectorStatus["Detached"] = 3] = "Detached"; - /** - * Indicates that the change detector encountered an error checking a binding - * or calling a directive lifecycle method and is now in an inconsistent state. Change - * detectors in this state do not detect changes. - */ - ChangeDetectorStatus[ChangeDetectorStatus["Errored"] = 4] = "Errored"; - /** - * Indicates that the change detector has been destroyed. - */ - ChangeDetectorStatus[ChangeDetectorStatus["Destroyed"] = 5] = "Destroyed"; -})(ChangeDetectorStatus || (ChangeDetectorStatus = {})); -/** - * Reports whether a given strategy is currently the default for change detection. - * @param changeDetectionStrategy The strategy to check. - * @returns True if the given strategy is the current default, false otherwise. - * @see `ChangeDetectorStatus` - * @see `ChangeDetectorRef` - */ -function isDefaultChangeDetectionStrategy(changeDetectionStrategy) { - return changeDetectionStrategy == null || - changeDetectionStrategy === ChangeDetectionStrategy.Default; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * Defines template and style encapsulation options available for Component's {@link Component}. - * - * See {@link Component#encapsulation encapsulation}. - * - * @usageNotes - * ### Example - * - * {@example core/ts/metadata/encapsulation.ts region='longform'} - * - * @publicApi - */ -var ViewEncapsulation; -(function (ViewEncapsulation) { - /** - * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host - * Element and pre-processing the style rules provided via {@link Component#styles styles} or - * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all - * selectors. - * - * This is the default option. - */ - ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated"; - // Historically the 1 value was for `Native` encapsulation which has been removed as of v11. - /** - * Don't provide any template or style encapsulation. - */ - ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None"; - /** - * Use Shadow DOM to encapsulate styles. - * - * For the DOM this means using modern [Shadow - * DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) and - * creating a ShadowRoot for Component's Host Element. - */ - ViewEncapsulation[ViewEncapsulation["ShadowDom"] = 3] = "ShadowDom"; -})(ViewEncapsulation || (ViewEncapsulation = {})); - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -const __globalThis = typeof globalThis !== 'undefined' && globalThis; -const __window = typeof window !== 'undefined' && window; -const __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && - self instanceof WorkerGlobalScope && self; -const __global = typeof global !== 'undefined' && global; -// Always use __globalThis if available, which is the spec-defined global variable across all -// environments, then fallback to __global first, because in Node tests both __global and -// __window may be defined and _global should be __global in that case. -const _global = __globalThis || __global || __window || __self; - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function ngDevModeResetPerfCounters() { - const locationString = typeof location !== 'undefined' ? location.toString() : ''; - const newCounters = { - namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1, - firstCreatePass: 0, - tNode: 0, - tView: 0, - rendererCreateTextNode: 0, - rendererSetText: 0, - rendererCreateElement: 0, - rendererAddEventListener: 0, - rendererSetAttribute: 0, - rendererRemoveAttribute: 0, - rendererSetProperty: 0, - rendererSetClassName: 0, - rendererAddClass: 0, - rendererRemoveClass: 0, - rendererSetStyle: 0, - rendererRemoveStyle: 0, - rendererDestroy: 0, - rendererDestroyNode: 0, - rendererMoveNode: 0, - rendererRemoveNode: 0, - rendererAppendChild: 0, - rendererInsertBefore: 0, - rendererCreateComment: 0, - }; - // Make sure to refer to ngDevMode as ['ngDevMode'] for closure. - const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1; - _global['ngDevMode'] = allowNgDevModeTrue && newCounters; - return newCounters; -} -/** - * This function checks to see if the `ngDevMode` has been set. If yes, - * then we honor it, otherwise we default to dev mode with additional checks. - * - * The idea is that unless we are doing production build where we explicitly - * set `ngDevMode == false` we should be helping the developer by providing - * as much early warning and errors as possible. - * - * `ɵɵdefineComponent` is guaranteed to have been called before any component template functions - * (and thus Ivy instructions), so a single initialization there is sufficient to ensure ngDevMode - * is defined for the entire instruction set. - * - * When checking `ngDevMode` on toplevel, always init it before referencing it - * (e.g. `((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode())`), otherwise you can - * get a `ReferenceError` like in https://github.com/angular/angular/issues/31595. - * - * Details on possible values for `ngDevMode` can be found on its docstring. - * - * NOTE: - * - changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`. - */ -function initNgDevMode() { - // The below checks are to ensure that calling `initNgDevMode` multiple times does not - // reset the counters. - // If the `ngDevMode` is not an object, then it means we have not created the perf counters - // yet. - if (typeof ngDevMode === 'undefined' || ngDevMode) { - if (typeof ngDevMode !== 'object') { - ngDevModeResetPerfCounters(); - } - return typeof ngDevMode !== 'undefined' && !!ngDevMode; - } - return false; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * This file contains reuseable "empty" symbols that can be used as default return values - * in different parts of the rendering code. Because the same symbols are returned, this - * allows for identity checks against these values to be consistently used by the framework - * code. - */ -const EMPTY_OBJ = {}; -const EMPTY_ARRAY = []; -// freezing the values prevents any code from accidentally inserting new values in -if ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) { - // These property accesses can be ignored because ngDevMode will be set to false - // when optimizing code and the whole if statement will be dropped. - // tslint:disable-next-line:no-toplevel-property-access - Object.freeze(EMPTY_OBJ); - // tslint:disable-next-line:no-toplevel-property-access - Object.freeze(EMPTY_ARRAY); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * This file contains reuseable "empty" symbols that can be used as default return values - * in different parts of the rendering code. Because the same symbols are returned, this - * allows for identity checks against these values to be consistently used by the framework - * code. - */ -const EMPTY_ARRAY$1 = []; -// freezing the values prevents any code from accidentally inserting new values in -if ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) { - // These property accesses can be ignored because ngDevMode will be set to false - // when optimizing code and the whole if statement will be dropped. - // tslint:disable-next-line:no-toplevel-property-access - Object.freeze(EMPTY_ARRAY$1); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -const NG_COMP_DEF = getClosureSafeProperty({ ɵcmp: getClosureSafeProperty }); -const NG_DIR_DEF = getClosureSafeProperty({ ɵdir: getClosureSafeProperty }); -const NG_PIPE_DEF = getClosureSafeProperty({ ɵpipe: getClosureSafeProperty }); -const NG_MOD_DEF = getClosureSafeProperty({ ɵmod: getClosureSafeProperty }); -const NG_LOC_ID_DEF = getClosureSafeProperty({ ɵloc: getClosureSafeProperty }); -const NG_FACTORY_DEF = getClosureSafeProperty({ ɵfac: getClosureSafeProperty }); -/** - * If a directive is diPublic, bloomAdd sets a property on the type with this constant as - * the key and the directive's unique ID as the value. This allows us to map directives to their - * bloom filter bit for DI. - */ -// TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified. -const NG_ELEMENT_ID = getClosureSafeProperty({ __NG_ELEMENT_ID__: getClosureSafeProperty }); - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -let _renderCompCount = 0; -/** - * Create a component definition object. - * - * - * # Example - * ``` - * class MyDirective { - * // Generated by Angular Template Compiler - * // [Symbol] syntax will not be supported by TypeScript until v2.7 - * static ɵcmp = defineComponent({ - * ... - * }); - * } - * ``` - * @codeGenApi - */ -function ɵɵdefineComponent(componentDefinition) { - return noSideEffects(() => { - // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent. - // See the `initNgDevMode` docstring for more information. - (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode(); - const type = componentDefinition.type; - const declaredInputs = {}; - const def = { - type: type, - providersResolver: null, - decls: componentDefinition.decls, - vars: componentDefinition.vars, - factory: null, - template: componentDefinition.template || null, - consts: componentDefinition.consts || null, - ngContentSelectors: componentDefinition.ngContentSelectors, - hostBindings: componentDefinition.hostBindings || null, - hostVars: componentDefinition.hostVars || 0, - hostAttrs: componentDefinition.hostAttrs || null, - contentQueries: componentDefinition.contentQueries || null, - declaredInputs: declaredInputs, - inputs: null, - outputs: null, - exportAs: componentDefinition.exportAs || null, - onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush, - directiveDefs: null, - pipeDefs: null, - selectors: componentDefinition.selectors || EMPTY_ARRAY$1, - viewQuery: componentDefinition.viewQuery || null, - features: componentDefinition.features || null, - data: componentDefinition.data || {}, - // TODO(misko): convert ViewEncapsulation into const enum so that it can be used - // directly in the next line. Also `None` should be 0 not 2. - encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated, - id: 'c', - styles: componentDefinition.styles || EMPTY_ARRAY$1, - _: null, - setInput: null, - schemas: componentDefinition.schemas || null, - tView: null, - }; - const directiveTypes = componentDefinition.directives; - const feature = componentDefinition.features; - const pipeTypes = componentDefinition.pipes; - def.id += _renderCompCount++; - def.inputs = invertObject(componentDefinition.inputs, declaredInputs), - def.outputs = invertObject(componentDefinition.outputs), - feature && feature.forEach((fn) => fn(def)); - def.directiveDefs = directiveTypes ? - () => (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes) - .map(extractDirectiveDef) : - null; - def.pipeDefs = pipeTypes ? - () => (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef) : - null; - return def; - }); -} -/** - * Generated next to NgModules to monkey-patch directive and pipe references onto a component's - * definition, when generating a direct reference in the component file would otherwise create an - * import cycle. - * - * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details. - * - * @codeGenApi - */ -function ɵɵsetComponentScope(type, directives, pipes) { - const def = type.ɵcmp; - def.directiveDefs = () => directives.map(extractDirectiveDef); - def.pipeDefs = () => pipes.map(extractPipeDef); -} -function extractDirectiveDef(type) { - const def = getComponentDef(type) || getDirectiveDef(type); - if (ngDevMode && !def) { - throw new Error(`'${type.name}' is neither 'ComponentType' or 'DirectiveType'.`); - } - return def; -} -function extractPipeDef(type) { - const def = getPipeDef(type); - if (ngDevMode && !def) { - throw new Error(`'${type.name}' is not a 'PipeType'.`); - } - return def; -} -const autoRegisterModuleById = {}; -/** - * @codeGenApi - */ -function ɵɵdefineNgModule(def) { - const res = { - type: def.type, - bootstrap: def.bootstrap || EMPTY_ARRAY$1, - declarations: def.declarations || EMPTY_ARRAY$1, - imports: def.imports || EMPTY_ARRAY$1, - exports: def.exports || EMPTY_ARRAY$1, - transitiveCompileScopes: null, - schemas: def.schemas || null, - id: def.id || null, - }; - if (def.id != null) { - noSideEffects(() => { - autoRegisterModuleById[def.id] = def.type; - }); - } - return res; -} -/** - * Adds the module metadata that is necessary to compute the module's transitive scope to an - * existing module definition. - * - * Scope metadata of modules is not used in production builds, so calls to this function can be - * marked pure to tree-shake it from the bundle, allowing for all referenced declarations - * to become eligible for tree-shaking as well. - * - * @codeGenApi - */ -function ɵɵsetNgModuleScope(type, scope) { - return noSideEffects(() => { - const ngModuleDef = getNgModuleDef(type, true); - ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY$1; - ngModuleDef.imports = scope.imports || EMPTY_ARRAY$1; - ngModuleDef.exports = scope.exports || EMPTY_ARRAY$1; - }); -} -/** - * Inverts an inputs or outputs lookup such that the keys, which were the - * minified keys, are part of the values, and the values are parsed so that - * the publicName of the property is the new key - * - * e.g. for - * - * ``` - * class Comp { - * @Input() - * propName1: string; - * - * @Input('publicName2') - * declaredPropName2: number; - * } - * ``` - * - * will be serialized as - * - * ``` - * { - * propName1: 'propName1', - * declaredPropName2: ['publicName2', 'declaredPropName2'], - * } - * ``` - * - * which is than translated by the minifier as: - * - * ``` - * { - * minifiedPropName1: 'propName1', - * minifiedPropName2: ['publicName2', 'declaredPropName2'], - * } - * ``` - * - * becomes: (public name => minifiedName) - * - * ``` - * { - * 'propName1': 'minifiedPropName1', - * 'publicName2': 'minifiedPropName2', - * } - * ``` - * - * Optionally the function can take `secondary` which will result in: (public name => declared name) - * - * ``` - * { - * 'propName1': 'propName1', - * 'publicName2': 'declaredPropName2', - * } - * ``` - * - - */ -function invertObject(obj, secondary) { - if (obj == null) - return EMPTY_OBJ; - const newLookup = {}; - for (const minifiedKey in obj) { - if (obj.hasOwnProperty(minifiedKey)) { - let publicName = obj[minifiedKey]; - let declaredName = publicName; - if (Array.isArray(publicName)) { - declaredName = publicName[1]; - publicName = publicName[0]; - } - newLookup[publicName] = minifiedKey; - if (secondary) { - (secondary[publicName] = declaredName); - } - } - } - return newLookup; -} -/** - * Create a directive definition object. - * - * # Example - * ```ts - * class MyDirective { - * // Generated by Angular Template Compiler - * // [Symbol] syntax will not be supported by TypeScript until v2.7 - * static ɵdir = ɵɵdefineDirective({ - * ... - * }); - * } - * ``` - * - * @codeGenApi - */ -const ɵɵdefineDirective = ɵɵdefineComponent; -/** - * Create a pipe definition object. - * - * # Example - * ``` - * class MyPipe implements PipeTransform { - * // Generated by Angular Template Compiler - * static ɵpipe = definePipe({ - * ... - * }); - * } - * ``` - * @param pipeDef Pipe definition generated by the compiler - * - * @codeGenApi - */ -function ɵɵdefinePipe(pipeDef) { - return { - type: pipeDef.type, - name: pipeDef.name, - factory: null, - pure: pipeDef.pure !== false, - onDestroy: pipeDef.type.prototype.ngOnDestroy || null - }; -} -/** - * The following getter methods retrieve the definition from the type. Currently the retrieval - * honors inheritance, but in the future we may change the rule to require that definitions are - * explicit. This would require some sort of migration strategy. - */ -function getComponentDef(type) { - return type[NG_COMP_DEF] || null; -} -function getDirectiveDef(type) { - return type[NG_DIR_DEF] || null; -} -function getPipeDef(type) { - return type[NG_PIPE_DEF] || null; -} -function getNgModuleDef(type, throwNotFound) { - const ngModuleDef = type[NG_MOD_DEF] || null; - if (!ngModuleDef && throwNotFound === true) { - throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`); - } - return ngModuleDef; -} -function getNgLocaleIdDef(type) { - return type[NG_LOC_ID_DEF] || null; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -// Below are constants for LView indices to help us look up LView members -// without having to remember the specific indices. -// Uglify will inline these when minifying so there shouldn't be a cost. -const HOST = 0; -const TVIEW = 1; -const FLAGS = 2; -const PARENT = 3; -const NEXT = 4; -const TRANSPLANTED_VIEWS_TO_REFRESH = 5; -const T_HOST = 6; -const CLEANUP = 7; -const CONTEXT = 8; -const INJECTOR = 9; -const RENDERER_FACTORY = 10; -const RENDERER = 11; -const SANITIZER = 12; -const CHILD_HEAD = 13; -const CHILD_TAIL = 14; -// FIXME(misko): Investigate if the three declarations aren't all same thing. -const DECLARATION_VIEW = 15; -const DECLARATION_COMPONENT_VIEW = 16; -const DECLARATION_LCONTAINER = 17; -const PREORDER_HOOK_FLAGS = 18; -const QUERIES = 19; -/** - * Size of LView's header. Necessary to adjust for it when setting slots. - * - * IMPORTANT: `HEADER_OFFSET` should only be referred to the in the `ɵɵ*` instructions to translate - * instruction index into `LView` index. All other indexes should be in the `LView` index space and - * there should be no need to refer to `HEADER_OFFSET` anywhere else. - */ -const HEADER_OFFSET = 20; -/** - * Converts `TViewType` into human readable text. - * Make sure this matches with `TViewType` - */ -const TViewTypeAsString = [ - 'Root', - 'Component', - 'Embedded', -]; -// Note: This hack is necessary so we don't erroneously get a circular dependency -// failure based on types. -const unusedValueExportToPlacateAjd = 1; - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * Special location which allows easy identification of type. If we have an array which was - * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is - * `LContainer`. - */ -const TYPE = 1; -/** - * Below are constants for LContainer indices to help us look up LContainer members - * without having to remember the specific indices. - * Uglify will inline these when minifying so there shouldn't be a cost. - */ -/** - * Flag to signify that this `LContainer` may have transplanted views which need to be change - * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`. - * - * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip - * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify - * that the `MOVED_VIEWS` are transplanted and on-push. - */ -const HAS_TRANSPLANTED_VIEWS = 2; -// PARENT, NEXT, TRANSPLANTED_VIEWS_TO_REFRESH are indices 3, 4, and 5 -// As we already have these constants in LView, we don't need to re-create them. -// T_HOST is index 6 -// We already have this constants in LView, we don't need to re-create it. -const NATIVE = 7; -const VIEW_REFS = 8; -const MOVED_VIEWS = 9; -/** - * Size of LContainer's header. Represents the index after which all views in the - * container will be inserted. We need to keep a record of current views so we know - * which views are already in the DOM (and don't need to be re-added) and so we can - * remove views from the DOM when they are no longer required. - */ -const CONTAINER_HEADER_OFFSET = 10; -// Note: This hack is necessary so we don't erroneously get a circular dependency -// failure based on types. -const unusedValueExportToPlacateAjd$1 = 1; - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * True if `value` is `LView`. - * @param value wrapped value of `RNode`, `LView`, `LContainer` - */ -function isLView(value) { - return Array.isArray(value) && typeof value[TYPE] === 'object'; -} -/** - * True if `value` is `LContainer`. - * @param value wrapped value of `RNode`, `LView`, `LContainer` - */ -function isLContainer(value) { - return Array.isArray(value) && value[TYPE] === true; -} -function isContentQueryHost(tNode) { - return (tNode.flags & 8 /* hasContentQuery */) !== 0; -} -function isComponentHost(tNode) { - return (tNode.flags & 2 /* isComponentHost */) === 2 /* isComponentHost */; -} -function isDirectiveHost(tNode) { - return (tNode.flags & 1 /* isDirectiveHost */) === 1 /* isDirectiveHost */; -} -function isComponentDef(def) { - return def.template !== null; -} -function isRootView(target) { - return (target[FLAGS] & 512 /* IsRoot */) !== 0; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -// [Assert functions do not constraint type when they are guarded by a truthy -// expression.](https://github.com/microsoft/TypeScript/issues/37295) -function assertTNodeForLView(tNode, lView) { - assertTNodeForTView(tNode, lView[TVIEW]); -} -function assertTNodeForTView(tNode, tView) { - assertTNode(tNode); - tNode.hasOwnProperty('tView_') && - assertEqual(tNode.tView_, tView, 'This TNode does not belong to this TView.'); -} -function assertTNode(tNode) { - assertDefined(tNode, 'TNode must be defined'); - if (!(tNode && typeof tNode === 'object' && tNode.hasOwnProperty('directiveStylingLast'))) { - throwError('Not of type TNode, got: ' + tNode); - } -} -function assertTIcu(tIcu) { - assertDefined(tIcu, 'Expected TIcu to be defined'); - if (!(typeof tIcu.currentCaseLViewIndex === 'number')) { - throwError('Object is not of TIcu type.'); - } -} -function assertComponentType(actual, msg = 'Type passed in is not ComponentType, it does not have \'ɵcmp\' property.') { - if (!getComponentDef(actual)) { - throwError(msg); - } -} -function assertNgModuleType(actual, msg = 'Type passed in is not NgModuleType, it does not have \'ɵmod\' property.') { - if (!getNgModuleDef(actual)) { - throwError(msg); - } -} -function assertCurrentTNodeIsParent(isParent) { - assertEqual(isParent, true, 'currentTNode should be a parent'); -} -function assertHasParent(tNode) { - assertDefined(tNode, 'currentTNode should exist!'); - assertDefined(tNode.parent, 'currentTNode should have a parent'); -} -function assertDataNext(lView, index, arr) { - if (arr == null) - arr = lView; - assertEqual(arr.length, index, `index ${index} expected to be at the end of arr (length ${arr.length})`); -} -function assertLContainer(value) { - assertDefined(value, 'LContainer must be defined'); - assertEqual(isLContainer(value), true, 'Expecting LContainer'); -} -function assertLViewOrUndefined(value) { - value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null'); -} -function assertLView(value) { - assertDefined(value, 'LView must be defined'); - assertEqual(isLView(value), true, 'Expecting LView'); -} -function assertFirstCreatePass(tView, errMessage) { - assertEqual(tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.'); -} -function assertFirstUpdatePass(tView, errMessage) { - assertEqual(tView.firstUpdatePass, true, errMessage || 'Should only be called in first update pass.'); -} -/** - * This is a basic sanity check that an object is probably a directive def. DirectiveDef is - * an interface, so we can't do a direct instanceof check. - */ -function assertDirectiveDef(obj) { - if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) { - throwError(`Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.`); - } -} -function assertIndexInDeclRange(lView, index) { - const tView = lView[1]; - assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index); -} -function assertIndexInVarsRange(lView, index) { - const tView = lView[1]; - assertBetween(tView.bindingStartIndex, tView.expandoStartIndex, index); -} -function assertIndexInExpandoRange(lView, index) { - const tView = lView[1]; - assertBetween(tView.expandoStartIndex, lView.length, index); -} -function assertBetween(lower, upper, index) { - if (!(lower <= index && index < upper)) { - throwError(`Index out of range (expecting ${lower} <= ${index} < ${upper})`); - } -} -function assertProjectionSlots(lView, errMessage) { - assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.'); - assertDefined(lView[DECLARATION_COMPONENT_VIEW][T_HOST].projection, errMessage || - 'Components with projection nodes () must have projection slots defined.'); -} -function assertParentView(lView, errMessage) { - assertDefined(lView, errMessage || 'Component views should always have a parent view (component\'s host view)'); -} -/** - * This is a basic sanity check that the `injectorIndex` seems to point to what looks like a - * NodeInjector data structure. - * - * @param lView `LView` which should be checked. - * @param injectorIndex index into the `LView` where the `NodeInjector` is expected. - */ -function assertNodeInjector(lView, injectorIndex) { - assertIndexInExpandoRange(lView, injectorIndex); - assertIndexInExpandoRange(lView, injectorIndex + 8 /* PARENT */); - assertNumber(lView[injectorIndex + 0], 'injectorIndex should point to a bloom filter'); - assertNumber(lView[injectorIndex + 1], 'injectorIndex should point to a bloom filter'); - assertNumber(lView[injectorIndex + 2], 'injectorIndex should point to a bloom filter'); - assertNumber(lView[injectorIndex + 3], 'injectorIndex should point to a bloom filter'); - assertNumber(lView[injectorIndex + 4], 'injectorIndex should point to a bloom filter'); - assertNumber(lView[injectorIndex + 5], 'injectorIndex should point to a bloom filter'); - assertNumber(lView[injectorIndex + 6], 'injectorIndex should point to a bloom filter'); - assertNumber(lView[injectorIndex + 7], 'injectorIndex should point to a bloom filter'); - assertNumber(lView[injectorIndex + 8 /* PARENT */], 'injectorIndex should point to parent injector'); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function getFactoryDef(type, throwNotFound) { - const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF); - if (!hasFactoryDef && throwNotFound === true && ngDevMode) { - throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`); - } - return hasFactoryDef ? type[NG_FACTORY_DEF] : null; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * Represents a basic change from a previous to a new value for a single - * property on a directive instance. Passed as a value in a - * {@link SimpleChanges} object to the `ngOnChanges` hook. - * - * @see `OnChanges` - * - * @publicApi - */ -class SimpleChange { - constructor(previousValue, currentValue, firstChange) { - this.previousValue = previousValue; - this.currentValue = currentValue; - this.firstChange = firstChange; - } - /** - * Check whether the new value is the first value assigned. - */ - isFirstChange() { - return this.firstChange; - } -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * The NgOnChangesFeature decorates a component with support for the ngOnChanges - * lifecycle hook, so it should be included in any component that implements - * that hook. - * - * If the component or directive uses inheritance, the NgOnChangesFeature MUST - * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise - * inherited properties will not be propagated to the ngOnChanges lifecycle - * hook. - * - * Example usage: - * - * ``` - * static ɵcmp = defineComponent({ - * ... - * inputs: {name: 'publicName'}, - * features: [NgOnChangesFeature] - * }); - * ``` - * - * @codeGenApi - */ -function ɵɵNgOnChangesFeature() { - return NgOnChangesFeatureImpl; -} -function NgOnChangesFeatureImpl(definition) { - if (definition.type.prototype.ngOnChanges) { - definition.setInput = ngOnChangesSetInput; - } - return rememberChangeHistoryAndInvokeOnChangesHook; -} -// This option ensures that the ngOnChanges lifecycle hook will be inherited -// from superclasses (in InheritDefinitionFeature). -/** @nocollapse */ -// tslint:disable-next-line:no-toplevel-property-access -ɵɵNgOnChangesFeature.ngInherit = true; -/** - * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate - * `ngOnChanges`. - * - * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are - * found it invokes `ngOnChanges` on the component instance. - * - * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`, - * it is guaranteed to be called with component instance. - */ -function rememberChangeHistoryAndInvokeOnChangesHook() { - const simpleChangesStore = getSimpleChangesStore(this); - const current = simpleChangesStore === null || simpleChangesStore === void 0 ? void 0 : simpleChangesStore.current; - if (current) { - const previous = simpleChangesStore.previous; - if (previous === EMPTY_OBJ) { - simpleChangesStore.previous = current; - } - else { - // New changes are copied to the previous store, so that we don't lose history for inputs - // which were not changed this time - for (let key in current) { - previous[key] = current[key]; - } - } - simpleChangesStore.current = null; - this.ngOnChanges(current); - } -} -function ngOnChangesSetInput(instance, value, publicName, privateName) { - const simpleChangesStore = getSimpleChangesStore(instance) || - setSimpleChangesStore(instance, { previous: EMPTY_OBJ, current: null }); - const current = simpleChangesStore.current || (simpleChangesStore.current = {}); - const previous = simpleChangesStore.previous; - const declaredName = this.declaredInputs[publicName]; - const previousChange = previous[declaredName]; - current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ); - instance[privateName] = value; -} -const SIMPLE_CHANGES_STORE = '__ngSimpleChanges__'; -function getSimpleChangesStore(instance) { - return instance[SIMPLE_CHANGES_STORE] || null; -} -function setSimpleChangesStore(instance, store) { - return instance[SIMPLE_CHANGES_STORE] = store; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -let profilerCallback = null; -/** - * Sets the callback function which will be invoked before and after performing certain actions at - * runtime (for example, before and after running change detection). - * - * Warning: this function is *INTERNAL* and should not be relied upon in application's code. - * The contract of the function might be changed in any release and/or the function can be removed - * completely. - * - * @param profiler function provided by the caller or null value to disable profiling. - */ -const setProfiler = (profiler) => { - profilerCallback = profiler; -}; -/** - * Profiler function which wraps user code executed by the runtime. - * - * @param event ProfilerEvent corresponding to the execution context - * @param instance component instance - * @param hookOrListener lifecycle hook function or output listener. The value depends on the - * execution context - * @returns - */ -const profiler = function (event, instance, hookOrListener) { - if (profilerCallback != null /* both `null` and `undefined` */) { - profilerCallback(event, instance, hookOrListener); - } -}; - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -const SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; -const MATH_ML_NAMESPACE = 'http://www.w3.org/1998/MathML/'; - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * This property will be monkey-patched on elements, components and directives - */ -const MONKEY_PATCH_KEY_NAME = '__ngContext__'; - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * Most of the use of `document` in Angular is from within the DI system so it is possible to simply - * inject the `DOCUMENT` token and are done. - * - * Ivy is special because it does not rely upon the DI and must get hold of the document some other - * way. - * - * The solution is to define `getDocument()` and `setDocument()` top-level functions for ivy. - * Wherever ivy needs the global document, it calls `getDocument()` instead. - * - * When running ivy outside of a browser environment, it is necessary to call `setDocument()` to - * tell ivy what the global `document` is. - * - * Angular does this for us in each of the standard platforms (`Browser`, `Server`, and `WebWorker`) - * by calling `setDocument()` when providing the `DOCUMENT` token. - */ -let DOCUMENT = undefined; -/** - * Tell ivy what the `document` is for this platform. - * - * It is only necessary to call this if the current platform is not a browser. - * - * @param document The object representing the global `document` in this environment. - */ -function setDocument(document) { - DOCUMENT = document; -} -/** - * Access the object that represents the `document` for this platform. - * - * Ivy calls this whenever it needs to access the `document` object. - * For example to create the renderer or to do sanitization. - */ -function getDocument() { - if (DOCUMENT !== undefined) { - return DOCUMENT; - } - else if (typeof document !== 'undefined') { - return document; - } - // No "document" can be found. This should only happen if we are running ivy outside Angular and - // the current platform is not a browser. Since this is not a supported scenario at the moment - // this should not happen in Angular apps. - // Once we support running ivy outside of Angular we will need to publish `setDocument()` as a - // public API. Meanwhile we just return `undefined` and let the application fail. - return undefined; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -// TODO: cleanup once the code is merged in angular/angular -var RendererStyleFlags3; -(function (RendererStyleFlags3) { - RendererStyleFlags3[RendererStyleFlags3["Important"] = 1] = "Important"; - RendererStyleFlags3[RendererStyleFlags3["DashCase"] = 2] = "DashCase"; -})(RendererStyleFlags3 || (RendererStyleFlags3 = {})); -/** Returns whether the `renderer` is a `ProceduralRenderer3` */ -function isProceduralRenderer(renderer) { - return !!(renderer.listen); -} -const ɵ0 = (hostElement, rendererType) => { - return getDocument(); -}; -const domRendererFactory3 = { - createRenderer: ɵ0 -}; -// Note: This hack is necessary so we don't erroneously get a circular dependency -// failure based on types. -const unusedValueExportToPlacateAjd$2 = 1; - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`) - * in same location in `LView`. This is because we don't want to pre-allocate space for it - * because the storage is sparse. This file contains utilities for dealing with such data types. - * - * How do we know what is stored at a given location in `LView`. - * - `Array.isArray(value) === false` => `RNode` (The normal storage value) - * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value. - * - `typeof value[TYPE] === 'object'` => `LView` - * - This happens when we have a component at a given location - * - `typeof value[TYPE] === true` => `LContainer` - * - This happens when we have `LContainer` binding at a given location. - * - * - * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient. - */ -/** - * Returns `RNode`. - * @param value wrapped value of `RNode`, `LView`, `LContainer` - */ -function unwrapRNode(value) { - while (Array.isArray(value)) { - value = value[HOST]; - } - return value; -} -/** - * Returns `LView` or `null` if not found. - * @param value wrapped value of `RNode`, `LView`, `LContainer` - */ -function unwrapLView(value) { - while (Array.isArray(value)) { - // This check is same as `isLView()` but we don't call at as we don't want to call - // `Array.isArray()` twice and give JITer more work for inlining. - if (typeof value[TYPE] === 'object') - return value; - value = value[HOST]; - } - return null; -} -/** - * Returns `LContainer` or `null` if not found. - * @param value wrapped value of `RNode`, `LView`, `LContainer` - */ -function unwrapLContainer(value) { - while (Array.isArray(value)) { - // This check is same as `isLContainer()` but we don't call at as we don't want to call - // `Array.isArray()` twice and give JITer more work for inlining. - if (value[TYPE] === true) - return value; - value = value[HOST]; - } - return null; -} -/** - * Retrieves an element value from the provided `viewData`, by unwrapping - * from any containers, component views, or style contexts. - */ -function getNativeByIndex(index, lView) { - ngDevMode && assertIndexInRange(lView, index); - ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Expected to be past HEADER_OFFSET'); - return unwrapRNode(lView[index]); -} -/** - * Retrieve an `RNode` for a given `TNode` and `LView`. - * - * This function guarantees in dev mode to retrieve a non-null `RNode`. - * - * @param tNode - * @param lView - */ -function getNativeByTNode(tNode, lView) { - ngDevMode && assertTNodeForLView(tNode, lView); - ngDevMode && assertIndexInRange(lView, tNode.index); - const node = unwrapRNode(lView[tNode.index]); - ngDevMode && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node); - return node; -} -/** - * Retrieve an `RNode` or `null` for a given `TNode` and `LView`. - * - * Some `TNode`s don't have associated `RNode`s. For example `Projection` - * - * @param tNode - * @param lView - */ -function getNativeByTNodeOrNull(tNode, lView) { - const index = tNode === null ? -1 : tNode.index; - if (index !== -1) { - ngDevMode && assertTNodeForLView(tNode, lView); - const node = unwrapRNode(lView[index]); - ngDevMode && node !== null && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node); - return node; - } - return null; -} -// fixme(misko): The return Type should be `TNode|null` -function getTNode(tView, index) { - ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode'); - ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode'); - const tNode = tView.data[index]; - ngDevMode && tNode !== null && assertTNode(tNode); - return tNode; -} -/** Retrieves a value from any `LView` or `TData`. */ -function load(view, index) { - ngDevMode && assertIndexInRange(view, index); - return view[index]; -} -function getComponentLViewByIndex(nodeIndex, hostView) { - // Could be an LView or an LContainer. If LContainer, unwrap to find LView. - ngDevMode && assertIndexInRange(hostView, nodeIndex); - const slotValue = hostView[nodeIndex]; - const lView = isLView(slotValue) ? slotValue : slotValue[HOST]; - return lView; -} -/** - * Returns the monkey-patch value data present on the target (which could be - * a component, directive or a DOM node). - */ -function readPatchedData(target) { - ngDevMode && assertDefined(target, 'Target expected'); - return target[MONKEY_PATCH_KEY_NAME] || null; -} -function readPatchedLView(target) { - const value = readPatchedData(target); - if (value) { - return Array.isArray(value) ? value : value.lView; - } - return null; -} -/** Checks whether a given view is in creation mode */ -function isCreationMode(view) { - return (view[FLAGS] & 4 /* CreationMode */) === 4 /* CreationMode */; -} -/** - * Returns a boolean for whether the view is attached to the change detection tree. - * - * Note: This determines whether a view should be checked, not whether it's inserted - * into a container. For that, you'll want `viewAttachedToContainer` below. - */ -function viewAttachedToChangeDetector(view) { - return (view[FLAGS] & 128 /* Attached */) === 128 /* Attached */; -} -/** Returns a boolean for whether the view is attached to a container. */ -function viewAttachedToContainer(view) { - return isLContainer(view[PARENT]); -} -function getConstant(consts, index) { - if (index === null || index === undefined) - return null; - ngDevMode && assertIndexInRange(consts, index); - return consts[index]; -} -/** - * Resets the pre-order hook flags of the view. - * @param lView the LView on which the flags are reset - */ -function resetPreOrderHookFlags(lView) { - lView[PREORDER_HOOK_FLAGS] = 0; -} -/** - * Updates the `TRANSPLANTED_VIEWS_TO_REFRESH` counter on the `LContainer` as well as the parents - * whose - * 1. counter goes from 0 to 1, indicating that there is a new child that has a view to refresh - * or - * 2. counter goes from 1 to 0, indicating there are no more descendant views to refresh - */ -function updateTransplantedViewCount(lContainer, amount) { - lContainer[TRANSPLANTED_VIEWS_TO_REFRESH] += amount; - let viewOrContainer = lContainer; - let parent = lContainer[PARENT]; - while (parent !== null && - ((amount === 1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 1) || - (amount === -1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 0))) { - parent[TRANSPLANTED_VIEWS_TO_REFRESH] += amount; - viewOrContainer = parent; - parent = parent[PARENT]; - } -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -const instructionState = { - lFrame: createLFrame(null), - bindingsEnabled: true, - isInCheckNoChangesMode: false, -}; -/** - * Returns true if the instruction state stack is empty. - * - * Intended to be called from tests only (tree shaken otherwise). - */ -function specOnlyIsInstructionStateEmpty() { - return instructionState.lFrame.parent === null; -} -function getElementDepthCount() { - return instructionState.lFrame.elementDepthCount; -} -function increaseElementDepthCount() { - instructionState.lFrame.elementDepthCount++; -} -function decreaseElementDepthCount() { - instructionState.lFrame.elementDepthCount--; -} -function getBindingsEnabled() { - return instructionState.bindingsEnabled; -} -/** - * Enables directive matching on elements. - * - * * Example: - * ``` - * - * Should match component / directive. - * - *
- * - * - * Should not match component / directive because we are in ngNonBindable. - * - * - *
- * ``` - * - * @codeGenApi - */ -function ɵɵenableBindings() { - instructionState.bindingsEnabled = true; -} -/** - * Disables directive matching on element. - * - * * Example: - * ``` - * - * Should match component / directive. - * - *
- * - * - * Should not match component / directive because we are in ngNonBindable. - * - * - *
- * ``` - * - * @codeGenApi - */ -function ɵɵdisableBindings() { - instructionState.bindingsEnabled = false; -} -/** - * Return the current `LView`. - */ -function getLView() { - return instructionState.lFrame.lView; -} -/** - * Return the current `TView`. - */ -function getTView() { - return instructionState.lFrame.tView; -} -/** - * Restores `contextViewData` to the given OpaqueViewState instance. - * - * Used in conjunction with the getCurrentView() instruction to save a snapshot - * of the current view and restore it when listeners are invoked. This allows - * walking the declaration view tree in listeners to get vars from parent views. - * - * @param viewToRestore The OpaqueViewState instance to restore. - * - * @codeGenApi - */ -function ɵɵrestoreView(viewToRestore) { - instructionState.lFrame.contextLView = viewToRestore; -} -function getCurrentTNode() { - let currentTNode = getCurrentTNodePlaceholderOk(); - while (currentTNode !== null && currentTNode.type === 64 /* Placeholder */) { - currentTNode = currentTNode.parent; - } - return currentTNode; -} -function getCurrentTNodePlaceholderOk() { - return instructionState.lFrame.currentTNode; -} -function getCurrentParentTNode() { - const lFrame = instructionState.lFrame; - const currentTNode = lFrame.currentTNode; - return lFrame.isParent ? currentTNode : currentTNode.parent; -} -function setCurrentTNode(tNode, isParent) { - ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView); - const lFrame = instructionState.lFrame; - lFrame.currentTNode = tNode; - lFrame.isParent = isParent; -} -function isCurrentTNodeParent() { - return instructionState.lFrame.isParent; -} -function setCurrentTNodeAsNotParent() { - instructionState.lFrame.isParent = false; -} -function setCurrentTNodeAsParent() { - instructionState.lFrame.isParent = true; -} -function getContextLView() { - return instructionState.lFrame.contextLView; -} -function isInCheckNoChangesMode() { - // TODO(misko): remove this from the LView since it is ngDevMode=true mode only. - return instructionState.isInCheckNoChangesMode; -} -function setIsInCheckNoChangesMode(mode) { - instructionState.isInCheckNoChangesMode = mode; -} -// top level variables should not be exported for performance reasons (PERF_NOTES.md) -function getBindingRoot() { - const lFrame = instructionState.lFrame; - let index = lFrame.bindingRootIndex; - if (index === -1) { - index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex; - } - return index; -} -function getBindingIndex() { - return instructionState.lFrame.bindingIndex; -} -function setBindingIndex(value) { - return instructionState.lFrame.bindingIndex = value; -} -function nextBindingIndex() { - return instructionState.lFrame.bindingIndex++; -} -function incrementBindingIndex(count) { - const lFrame = instructionState.lFrame; - const index = lFrame.bindingIndex; - lFrame.bindingIndex = lFrame.bindingIndex + count; - return index; -} -function isInI18nBlock() { - return instructionState.lFrame.inI18n; -} -function setInI18nBlock(isInI18nBlock) { - instructionState.lFrame.inI18n = isInI18nBlock; -} -/** - * Set a new binding root index so that host template functions can execute. - * - * Bindings inside the host template are 0 index. But because we don't know ahead of time - * how many host bindings we have we can't pre-compute them. For this reason they are all - * 0 index and we just shift the root so that they match next available location in the LView. - * - * @param bindingRootIndex Root index for `hostBindings` - * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive - * whose `hostBindings` are being processed. - */ -function setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) { - const lFrame = instructionState.lFrame; - lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex; - setCurrentDirectiveIndex(currentDirectiveIndex); -} -/** - * When host binding is executing this points to the directive index. - * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef` - * `LView[getCurrentDirectiveIndex()]` is directive instance. - */ -function getCurrentDirectiveIndex() { - return instructionState.lFrame.currentDirectiveIndex; -} -/** - * Sets an index of a directive whose `hostBindings` are being processed. - * - * @param currentDirectiveIndex `TData` index where current directive instance can be found. - */ -function setCurrentDirectiveIndex(currentDirectiveIndex) { - instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex; -} -/** - * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being - * executed. - * - * @param tData Current `TData` where the `DirectiveDef` will be looked up at. - */ -function getCurrentDirectiveDef(tData) { - const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex; - return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex]; -} -function getCurrentQueryIndex() { - return instructionState.lFrame.currentQueryIndex; -} -function setCurrentQueryIndex(value) { - instructionState.lFrame.currentQueryIndex = value; -} -/** - * Returns a `TNode` of the location where the current `LView` is declared at. - * - * @param lView an `LView` that we want to find parent `TNode` for. - */ -function getDeclarationTNode(lView) { - const tView = lView[TVIEW]; - // Return the declaration parent for embedded views - if (tView.type === 2 /* Embedded */) { - ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.'); - return tView.declTNode; - } - // Components don't have `TView.declTNode` because each instance of component could be - // inserted in different location, hence `TView.declTNode` is meaningless. - // Falling back to `T_HOST` in case we cross component boundary. - if (tView.type === 1 /* Component */) { - return lView[T_HOST]; - } - // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode. - return null; -} -/** - * This is a light weight version of the `enterView` which is needed by the DI system. - * - * @param lView `LView` location of the DI context. - * @param tNode `TNode` for DI context - * @param flags DI context flags. if `SkipSelf` flag is set than we walk up the declaration - * tree from `tNode` until we find parent declared `TElementNode`. - * @returns `true` if we have successfully entered DI associated with `tNode` (or with declared - * `TNode` if `flags` has `SkipSelf`). Failing to enter DI implies that no associated - * `NodeInjector` can be found and we should instead use `ModuleInjector`. - * - If `true` than this call must be fallowed by `leaveDI` - * - If `false` than this call failed and we should NOT call `leaveDI` - */ -function enterDI(lView, tNode, flags) { - ngDevMode && assertLViewOrUndefined(lView); - if (flags & InjectFlags.SkipSelf) { - ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]); - let parentTNode = tNode; - let parentLView = lView; - while (true) { - ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined'); - parentTNode = parentTNode.parent; - if (parentTNode === null && !(flags & InjectFlags.Host)) { - parentTNode = getDeclarationTNode(parentLView); - if (parentTNode === null) - break; - // In this case, a parent exists and is definitely an element. So it will definitely - // have an existing lView as the declaration view, which is why we can assume it's defined. - ngDevMode && assertDefined(parentLView, 'Parent LView should be defined'); - parentLView = parentLView[DECLARATION_VIEW]; - // In Ivy there are Comment nodes that correspond to ngIf and NgFor embedded directives - // We want to skip those and look only at Elements and ElementContainers to ensure - // we're looking at true parent nodes, and not content or other types. - if (parentTNode.type & (2 /* Element */ | 8 /* ElementContainer */)) { - break; - } - } - else { - break; - } - } - if (parentTNode === null) { - // If we failed to find a parent TNode this means that we should use module injector. - return false; - } - else { - tNode = parentTNode; - lView = parentLView; - } - } - ngDevMode && assertTNodeForLView(tNode, lView); - const lFrame = instructionState.lFrame = allocLFrame(); - lFrame.currentTNode = tNode; - lFrame.lView = lView; - return true; -} -/** - * Swap the current lView with a new lView. - * - * For performance reasons we store the lView in the top level of the module. - * This way we minimize the number of properties to read. Whenever a new view - * is entered we have to store the lView for later, and when the view is - * exited the state has to be restored - * - * @param newView New lView to become active - * @returns the previously active lView; - */ -function enterView(newView) { - ngDevMode && assertNotEqual(newView[0], newView[1], '????'); - ngDevMode && assertLViewOrUndefined(newView); - const newLFrame = allocLFrame(); - if (ngDevMode) { - assertEqual(newLFrame.isParent, true, 'Expected clean LFrame'); - assertEqual(newLFrame.lView, null, 'Expected clean LFrame'); - assertEqual(newLFrame.tView, null, 'Expected clean LFrame'); - assertEqual(newLFrame.selectedIndex, -1, 'Expected clean LFrame'); - assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame'); - assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame'); - assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame'); - assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame'); - assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame'); - } - const tView = newView[TVIEW]; - instructionState.lFrame = newLFrame; - ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView); - newLFrame.currentTNode = tView.firstChild; - newLFrame.lView = newView; - newLFrame.tView = tView; - newLFrame.contextLView = newView; - newLFrame.bindingIndex = tView.bindingStartIndex; - newLFrame.inI18n = false; -} -/** - * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure. - */ -function allocLFrame() { - const currentLFrame = instructionState.lFrame; - const childLFrame = currentLFrame === null ? null : currentLFrame.child; - const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame; - return newLFrame; -} -function createLFrame(parent) { - const lFrame = { - currentTNode: null, - isParent: true, - lView: null, - tView: null, - selectedIndex: -1, - contextLView: null, - elementDepthCount: 0, - currentNamespace: null, - currentDirectiveIndex: -1, - bindingRootIndex: -1, - bindingIndex: -1, - currentQueryIndex: 0, - parent: parent, - child: null, - inI18n: false, - }; - parent !== null && (parent.child = lFrame); // link the new LFrame for reuse. - return lFrame; -} -/** - * A lightweight version of leave which is used with DI. - * - * This function only resets `currentTNode` and `LView` as those are the only properties - * used with DI (`enterDI()`). - * - * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where - * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`. - */ -function leaveViewLight() { - const oldLFrame = instructionState.lFrame; - instructionState.lFrame = oldLFrame.parent; - oldLFrame.currentTNode = null; - oldLFrame.lView = null; - return oldLFrame; -} -/** - * This is a lightweight version of the `leaveView` which is needed by the DI system. - * - * NOTE: this function is an alias so that we can change the type of the function to have `void` - * return type. - */ -const leaveDI = leaveViewLight; -/** - * Leave the current `LView` - * - * This pops the `LFrame` with the associated `LView` from the stack. - * - * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is - * because for performance reasons we don't release `LFrame` but rather keep it for next use. - */ -function leaveView() { - const oldLFrame = leaveViewLight(); - oldLFrame.isParent = true; - oldLFrame.tView = null; - oldLFrame.selectedIndex = -1; - oldLFrame.contextLView = null; - oldLFrame.elementDepthCount = 0; - oldLFrame.currentDirectiveIndex = -1; - oldLFrame.currentNamespace = null; - oldLFrame.bindingRootIndex = -1; - oldLFrame.bindingIndex = -1; - oldLFrame.currentQueryIndex = 0; -} -function nextContextImpl(level) { - const contextLView = instructionState.lFrame.contextLView = - walkUpViews(level, instructionState.lFrame.contextLView); - return contextLView[CONTEXT]; -} -function walkUpViews(nestingLevel, currentView) { - while (nestingLevel > 0) { - ngDevMode && - assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.'); - currentView = currentView[DECLARATION_VIEW]; - nestingLevel--; - } - return currentView; -} -/** - * Gets the currently selected element index. - * - * Used with {@link property} instruction (and more in the future) to identify the index in the - * current `LView` to act on. - */ -function getSelectedIndex() { - return instructionState.lFrame.selectedIndex; -} -/** - * Sets the most recent index passed to {@link select} - * - * Used with {@link property} instruction (and more in the future) to identify the index in the - * current `LView` to act on. - * - * (Note that if an "exit function" was set earlier (via `setElementExitFn()`) then that will be - * run if and when the provided `index` value is different from the current selected index value.) - */ -function setSelectedIndex(index) { - ngDevMode && index !== -1 && - assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).'); - ngDevMode && - assertLessThan(index, instructionState.lFrame.lView.length, 'Can\'t set index passed end of LView'); - instructionState.lFrame.selectedIndex = index; -} -/** - * Gets the `tNode` that represents currently selected element. - */ -function getSelectedTNode() { - const lFrame = instructionState.lFrame; - return getTNode(lFrame.tView, lFrame.selectedIndex); -} -/** - * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state. - * - * @codeGenApi - */ -function ɵɵnamespaceSVG() { - instructionState.lFrame.currentNamespace = SVG_NAMESPACE; -} -/** - * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state. - * - * @codeGenApi - */ -function ɵɵnamespaceMathML() { - instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE; -} -/** - * Sets the namespace used to create elements to `null`, which forces element creation to use - * `createElement` rather than `createElementNS`. - * - * @codeGenApi - */ -function ɵɵnamespaceHTML() { - namespaceHTMLInternal(); -} -/** - * Sets the namespace used to create elements to `null`, which forces element creation to use - * `createElement` rather than `createElementNS`. - */ -function namespaceHTMLInternal() { - instructionState.lFrame.currentNamespace = null; -} -function getNamespace() { - return instructionState.lFrame.currentNamespace; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`. - * - * Must be run *only* on the first template pass. - * - * Sets up the pre-order hooks on the provided `tView`, - * see {@link HookData} for details about the data structure. - * - * @param directiveIndex The index of the directive in LView - * @param directiveDef The definition containing the hooks to setup in tView - * @param tView The current TView - */ -function registerPreOrderHooks(directiveIndex, directiveDef, tView) { - ngDevMode && assertFirstCreatePass(tView); - const { ngOnChanges, ngOnInit, ngDoCheck } = directiveDef.type.prototype; - if (ngOnChanges) { - const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef); - (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, wrappedOnChanges); - (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])) - .push(directiveIndex, wrappedOnChanges); - } - if (ngOnInit) { - (tView.preOrderHooks || (tView.preOrderHooks = [])).push(0 - directiveIndex, ngOnInit); - } - if (ngDoCheck) { - (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, ngDoCheck); - (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, ngDoCheck); - } -} -/** - * - * Loops through the directives on the provided `tNode` and queues hooks to be - * run that are not initialization hooks. - * - * Should be executed during `elementEnd()` and similar to - * preserve hook execution order. Content, view, and destroy hooks for projected - * components and directives must be called *before* their hosts. - * - * Sets up the content, view, and destroy hooks on the provided `tView`, - * see {@link HookData} for details about the data structure. - * - * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up - * separately at `elementStart`. - * - * @param tView The current TView - * @param tNode The TNode whose directives are to be searched for hooks to queue - */ -function registerPostOrderHooks(tView, tNode) { - ngDevMode && assertFirstCreatePass(tView); - // It's necessary to loop through the directives at elementEnd() (rather than processing in - // directiveCreate) so we can preserve the current hook order. Content, view, and destroy - // hooks for projected components and directives must be called *before* their hosts. - for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) { - const directiveDef = tView.data[i]; - ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef'); - const lifecycleHooks = directiveDef.type.prototype; - const { ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, ngOnDestroy } = lifecycleHooks; - if (ngAfterContentInit) { - (tView.contentHooks || (tView.contentHooks = [])).push(-i, ngAfterContentInit); - } - if (ngAfterContentChecked) { - (tView.contentHooks || (tView.contentHooks = [])).push(i, ngAfterContentChecked); - (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, ngAfterContentChecked); - } - if (ngAfterViewInit) { - (tView.viewHooks || (tView.viewHooks = [])).push(-i, ngAfterViewInit); - } - if (ngAfterViewChecked) { - (tView.viewHooks || (tView.viewHooks = [])).push(i, ngAfterViewChecked); - (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, ngAfterViewChecked); - } - if (ngOnDestroy != null) { - (tView.destroyHooks || (tView.destroyHooks = [])).push(i, ngOnDestroy); - } - } -} -/** - * Executing hooks requires complex logic as we need to deal with 2 constraints. - * - * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only - * once, across many change detection cycles. This must be true even if some hooks throw, or if - * some recursively trigger a change detection cycle. - * To solve that, it is required to track the state of the execution of these init hooks. - * This is done by storing and maintaining flags in the view: the {@link InitPhaseState}, - * and the index within that phase. They can be seen as a cursor in the following structure: - * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]] - * They are are stored as flags in LView[FLAGS]. - * - * 2. Pre-order hooks can be executed in batches, because of the select instruction. - * To be able to pause and resume their execution, we also need some state about the hook's array - * that is being processed: - * - the index of the next hook to be executed - * - the number of init hooks already found in the processed part of the array - * They are are stored as flags in LView[PREORDER_HOOK_FLAGS]. - */ -/** - * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were - * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read - * / write of the init-hooks related flags. - * @param lView The LView where hooks are defined - * @param hooks Hooks to be run - * @param nodeIndex 3 cases depending on the value: - * - undefined: all hooks from the array should be executed (post-order case) - * - null: execute hooks only from the saved index until the end of the array (pre-order case, when - * flushing the remaining hooks) - * - number: execute hooks only from the saved index until that node index exclusive (pre-order - * case, when executing select(number)) - */ -function executeCheckHooks(lView, hooks, nodeIndex) { - callHooks(lView, hooks, 3 /* InitPhaseCompleted */, nodeIndex); -} -/** - * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked, - * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed. - * @param lView The LView where hooks are defined - * @param hooks Hooks to be run - * @param initPhase A phase for which hooks should be run - * @param nodeIndex 3 cases depending on the value: - * - undefined: all hooks from the array should be executed (post-order case) - * - null: execute hooks only from the saved index until the end of the array (pre-order case, when - * flushing the remaining hooks) - * - number: execute hooks only from the saved index until that node index exclusive (pre-order - * case, when executing select(number)) - */ -function executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) { - ngDevMode && - assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init pre-order hooks should not be called more than once'); - if ((lView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) { - callHooks(lView, hooks, initPhase, nodeIndex); - } -} -function incrementInitPhaseFlags(lView, initPhase) { - ngDevMode && - assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.'); - let flags = lView[FLAGS]; - if ((flags & 3 /* InitPhaseStateMask */) === initPhase) { - flags &= 2047 /* IndexWithinInitPhaseReset */; - flags += 1 /* InitPhaseStateIncrementer */; - lView[FLAGS] = flags; - } -} -/** - * Calls lifecycle hooks with their contexts, skipping init hooks if it's not - * the first LView pass - * - * @param currentView The current view - * @param arr The array in which the hooks are found - * @param initPhaseState the current state of the init phase - * @param currentNodeIndex 3 cases depending on the value: - * - undefined: all hooks from the array should be executed (post-order case) - * - null: execute hooks only from the saved index until the end of the array (pre-order case, when - * flushing the remaining hooks) - * - number: execute hooks only from the saved index until that node index exclusive (pre-order - * case, when executing select(number)) - */ -function callHooks(currentView, arr, initPhase, currentNodeIndex) { - ngDevMode && - assertEqual(isInCheckNoChangesMode(), false, 'Hooks should never be run when in check no changes mode.'); - const startIndex = currentNodeIndex !== undefined ? - (currentView[PREORDER_HOOK_FLAGS] & 65535 /* IndexOfTheNextPreOrderHookMaskMask */) : - 0; - const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1; - const max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1 - let lastNodeIndexFound = 0; - for (let i = startIndex; i < max; i++) { - const hook = arr[i + 1]; - if (typeof hook === 'number') { - lastNodeIndexFound = arr[i]; - if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) { - break; - } - } - else { - const isInitHook = arr[i] < 0; - if (isInitHook) - currentView[PREORDER_HOOK_FLAGS] += 65536 /* NumberOfInitHooksCalledIncrementer */; - if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) { - callHook(currentView, initPhase, arr, i); - currentView[PREORDER_HOOK_FLAGS] = - (currentView[PREORDER_HOOK_FLAGS] & 4294901760 /* NumberOfInitHooksCalledMask */) + i + - 2; - } - i++; - } - } -} -/** - * Execute one hook against the current `LView`. - * - * @param currentView The current view - * @param initPhaseState the current state of the init phase - * @param arr The array in which the hooks are found - * @param i The current index within the hook data array - */ -function callHook(currentView, initPhase, arr, i) { - const isInitHook = arr[i] < 0; - const hook = arr[i + 1]; - const directiveIndex = isInitHook ? -arr[i] : arr[i]; - const directive = currentView[directiveIndex]; - if (isInitHook) { - const indexWithintInitPhase = currentView[FLAGS] >> 11 /* IndexWithinInitPhaseShift */; - // The init phase state must be always checked here as it may have been recursively updated. - if (indexWithintInitPhase < - (currentView[PREORDER_HOOK_FLAGS] >> 16 /* NumberOfInitHooksCalledShift */) && - (currentView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) { - currentView[FLAGS] += 2048 /* IndexWithinInitPhaseIncrementer */; - profiler(4 /* LifecycleHookStart */, directive, hook); - try { - hook.call(directive); - } - finally { - profiler(5 /* LifecycleHookEnd */, directive, hook); - } - } - } - else { - profiler(4 /* LifecycleHookStart */, directive, hook); - try { - hook.call(directive); - } - finally { - profiler(5 /* LifecycleHookEnd */, directive, hook); - } - } -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -const NO_PARENT_INJECTOR = -1; -/** - * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in - * `TView.data`. This allows us to store information about the current node's tokens (which - * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be - * shared, so they live in `LView`). - * - * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter - * determines whether a directive is available on the associated node or not. This prevents us - * from searching the directives array at this level unless it's probable the directive is in it. - * - * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters. - * - * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed - * using interfaces as they were previously. The start index of each `LInjector` and `TInjector` - * will differ based on where it is flattened into the main array, so it's not possible to know - * the indices ahead of time and save their types here. The interfaces are still included here - * for documentation purposes. - * - * export interface LInjector extends Array { - * - * // Cumulative bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE) - * [0]: number; - * - * // Cumulative bloom for directive IDs 32-63 - * [1]: number; - * - * // Cumulative bloom for directive IDs 64-95 - * [2]: number; - * - * // Cumulative bloom for directive IDs 96-127 - * [3]: number; - * - * // Cumulative bloom for directive IDs 128-159 - * [4]: number; - * - * // Cumulative bloom for directive IDs 160 - 191 - * [5]: number; - * - * // Cumulative bloom for directive IDs 192 - 223 - * [6]: number; - * - * // Cumulative bloom for directive IDs 224 - 255 - * [7]: number; - * - * // We need to store a reference to the injector's parent so DI can keep looking up - * // the injector tree until it finds the dependency it's looking for. - * [PARENT_INJECTOR]: number; - * } - * - * export interface TInjector extends Array { - * - * // Shared node bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE) - * [0]: number; - * - * // Shared node bloom for directive IDs 32-63 - * [1]: number; - * - * // Shared node bloom for directive IDs 64-95 - * [2]: number; - * - * // Shared node bloom for directive IDs 96-127 - * [3]: number; - * - * // Shared node bloom for directive IDs 128-159 - * [4]: number; - * - * // Shared node bloom for directive IDs 160 - 191 - * [5]: number; - * - * // Shared node bloom for directive IDs 192 - 223 - * [6]: number; - * - * // Shared node bloom for directive IDs 224 - 255 - * [7]: number; - * - * // Necessary to find directive indices for a particular node. - * [TNODE]: TElementNode|TElementContainerNode|TContainerNode; - * } - */ -/** - * Factory for creating instances of injectors in the NodeInjector. - * - * This factory is complicated by the fact that it can resolve `multi` factories as well. - * - * NOTE: Some of the fields are optional which means that this class has two hidden classes. - * - One without `multi` support (most common) - * - One with `multi` values, (rare). - * - * Since VMs can cache up to 4 inline hidden classes this is OK. - * - * - Single factory: Only `resolving` and `factory` is defined. - * - `providers` factory: `componentProviders` is a number and `index = -1`. - * - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`. - */ -class NodeInjectorFactory { - constructor( - /** - * Factory to invoke in order to create a new instance. - */ - factory, - /** - * Set to `true` if the token is declared in `viewProviders` (or if it is component). - */ - isViewProvider, injectImplementation) { - this.factory = factory; - /** - * Marker set to true during factory invocation to see if we get into recursive loop. - * Recursive loop causes an error to be displayed. - */ - this.resolving = false; - ngDevMode && assertDefined(factory, 'Factory not specified'); - ngDevMode && assertEqual(typeof factory, 'function', 'Expected factory function.'); - this.canSeeViewProviders = isViewProvider; - this.injectImpl = injectImplementation; - } -} -function isFactory(obj) { - return obj instanceof NodeInjectorFactory; -} -// Note: This hack is necessary so we don't erroneously get a circular dependency -// failure based on types. -const unusedValueExportToPlacateAjd$3 = 1; - -/** - * Converts `TNodeType` into human readable text. - * Make sure this matches with `TNodeType` - */ -function toTNodeTypeAsString(tNodeType) { - let text = ''; - (tNodeType & 1 /* Text */) && (text += '|Text'); - (tNodeType & 2 /* Element */) && (text += '|Element'); - (tNodeType & 4 /* Container */) && (text += '|Container'); - (tNodeType & 8 /* ElementContainer */) && (text += '|ElementContainer'); - (tNodeType & 16 /* Projection */) && (text += '|Projection'); - (tNodeType & 32 /* Icu */) && (text += '|IcuContainer'); - (tNodeType & 64 /* Placeholder */) && (text += '|Placeholder'); - return text.length > 0 ? text.substring(1) : text; -} -// Note: This hack is necessary so we don't erroneously get a circular dependency -// failure based on types. -const unusedValueExportToPlacateAjd$4 = 1; -/** - * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding. - * - * ``` - *
- * ``` - * and - * ``` - * @Directive({ - * }) - * class MyDirective { - * @Input() - * class: string; - * } - * ``` - * - * In the above case it is necessary to write the reconciled styling information into the - * directive's input. - * - * @param tNode - */ -function hasClassInput(tNode) { - return (tNode.flags & 16 /* hasClassInput */) !== 0; -} -/** - * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding. - * - * ``` - *
- * ``` - * and - * ``` - * @Directive({ - * }) - * class MyDirective { - * @Input() - * class: string; - * } - * ``` - * - * In the above case it is necessary to write the reconciled styling information into the - * directive's input. - * - * @param tNode - */ -function hasStyleInput(tNode) { - return (tNode.flags & 32 /* hasStyleInput */) !== 0; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function assertTNodeType(tNode, expectedTypes, message) { - assertDefined(tNode, 'should be called with a TNode'); - if ((tNode.type & expectedTypes) === 0) { - throwError(message || - `Expected [${toTNodeTypeAsString(expectedTypes)}] but got ${toTNodeTypeAsString(tNode.type)}.`); - } -} -function assertPureTNodeType(type) { - if (!(type === 2 /* Element */ || // - type === 1 /* Text */ || // - type === 4 /* Container */ || // - type === 8 /* ElementContainer */ || // - type === 32 /* Icu */ || // - type === 16 /* Projection */ || // - type === 64 /* Placeholder */)) { - throwError(`Expected TNodeType to have only a single type selected, but got ${toTNodeTypeAsString(type)}.`); - } -} - -/** - * Assigns all attribute values to the provided element via the inferred renderer. - * - * This function accepts two forms of attribute entries: - * - * default: (key, value): - * attrs = [key1, value1, key2, value2] - * - * namespaced: (NAMESPACE_MARKER, uri, name, value) - * attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value] - * - * The `attrs` array can contain a mix of both the default and namespaced entries. - * The "default" values are set without a marker, but if the function comes across - * a marker value then it will attempt to set a namespaced value. If the marker is - * not of a namespaced value then the function will quit and return the index value - * where it stopped during the iteration of the attrs array. - * - * See [AttributeMarker] to understand what the namespace marker value is. - * - * Note that this instruction does not support assigning style and class values to - * an element. See `elementStart` and `elementHostAttrs` to learn how styling values - * are applied to an element. - * @param renderer The renderer to be used - * @param native The element that the attributes will be assigned to - * @param attrs The attribute array of values that will be assigned to the element - * @returns the index value that was last accessed in the attributes array - */ -function setUpAttributes(renderer, native, attrs) { - const isProc = isProceduralRenderer(renderer); - let i = 0; - while (i < attrs.length) { - const value = attrs[i]; - if (typeof value === 'number') { - // only namespaces are supported. Other value types (such as style/class - // entries) are not supported in this function. - if (value !== 0 /* NamespaceURI */) { - break; - } - // we just landed on the marker value ... therefore - // we should skip to the next entry - i++; - const namespaceURI = attrs[i++]; - const attrName = attrs[i++]; - const attrVal = attrs[i++]; - ngDevMode && ngDevMode.rendererSetAttribute++; - isProc ? - renderer.setAttribute(native, attrName, attrVal, namespaceURI) : - native.setAttributeNS(namespaceURI, attrName, attrVal); - } - else { - // attrName is string; - const attrName = value; - const attrVal = attrs[++i]; - // Standard attributes - ngDevMode && ngDevMode.rendererSetAttribute++; - if (isAnimationProp(attrName)) { - if (isProc) { - renderer.setProperty(native, attrName, attrVal); - } - } - else { - isProc ? - renderer.setAttribute(native, attrName, attrVal) : - native.setAttribute(attrName, attrVal); - } - i++; - } - } - // another piece of code may iterate over the same attributes array. Therefore - // it may be helpful to return the exact spot where the attributes array exited - // whether by running into an unsupported marker or if all the static values were - // iterated over. - return i; -} -/** - * Test whether the given value is a marker that indicates that the following - * attribute values in a `TAttributes` array are only the names of attributes, - * and not name-value pairs. - * @param marker The attribute marker to test. - * @returns true if the marker is a "name-only" marker (e.g. `Bindings`, `Template` or `I18n`). - */ -function isNameOnlyAttributeMarker(marker) { - return marker === 3 /* Bindings */ || marker === 4 /* Template */ || - marker === 6 /* I18n */; -} -function isAnimationProp(name) { - // Perf note: accessing charCodeAt to check for the first character of a string is faster as - // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that - // charCodeAt doesn't allocate memory to return a substring. - return name.charCodeAt(0) === 64 /* AT_SIGN */; -} -/** - * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process. - * - * This merge function keeps the order of attrs same. - * - * @param dst Location of where the merged `TAttributes` should end up. - * @param src `TAttributes` which should be appended to `dst` - */ -function mergeHostAttrs(dst, src) { - if (src === null || src.length === 0) { - // do nothing - } - else if (dst === null || dst.length === 0) { - // We have source, but dst is empty, just make a copy. - dst = src.slice(); - } - else { - let srcMarker = -1 /* ImplicitAttributes */; - for (let i = 0; i < src.length; i++) { - const item = src[i]; - if (typeof item === 'number') { - srcMarker = item; - } - else { - if (srcMarker === 0 /* NamespaceURI */) { - // Case where we need to consume `key1`, `key2`, `value` items. - } - else if (srcMarker === -1 /* ImplicitAttributes */ || - srcMarker === 2 /* Styles */) { - // Case where we have to consume `key1` and `value` only. - mergeHostAttribute(dst, srcMarker, item, null, src[++i]); - } - else { - // Case where we have to consume `key1` only. - mergeHostAttribute(dst, srcMarker, item, null, null); - } - } - } - } - return dst; -} -/** - * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account. - * - * @param dst `TAttributes` to append to. - * @param marker Region where the `key`/`value` should be added. - * @param key1 Key to add to `TAttributes` - * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`) - * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class. - */ -function mergeHostAttribute(dst, marker, key1, key2, value) { - let i = 0; - // Assume that new markers will be inserted at the end. - let markerInsertPosition = dst.length; - // scan until correct type. - if (marker === -1 /* ImplicitAttributes */) { - markerInsertPosition = -1; - } - else { - while (i < dst.length) { - const dstValue = dst[i++]; - if (typeof dstValue === 'number') { - if (dstValue === marker) { - markerInsertPosition = -1; - break; - } - else if (dstValue > marker) { - // We need to save this as we want the markers to be inserted in specific order. - markerInsertPosition = i - 1; - break; - } - } - } - } - // search until you find place of insertion - while (i < dst.length) { - const item = dst[i]; - if (typeof item === 'number') { - // since `i` started as the index after the marker, we did not find it if we are at the next - // marker - break; - } - else if (item === key1) { - // We already have same token - if (key2 === null) { - if (value !== null) { - dst[i + 1] = value; - } - return; - } - else if (key2 === dst[i + 1]) { - dst[i + 2] = value; - return; - } - } - // Increment counter. - i++; - if (key2 !== null) - i++; - if (value !== null) - i++; - } - // insert at location. - if (markerInsertPosition !== -1) { - dst.splice(markerInsertPosition, 0, marker); - i = markerInsertPosition + 1; - } - dst.splice(i++, 0, key1); - if (key2 !== null) { - dst.splice(i++, 0, key2); - } - if (value !== null) { - dst.splice(i++, 0, value); - } -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/// Parent Injector Utils /////////////////////////////////////////////////////////////// -function hasParentInjector(parentLocation) { - return parentLocation !== NO_PARENT_INJECTOR; -} -function getParentInjectorIndex(parentLocation) { - ngDevMode && assertNumber(parentLocation, 'Number expected'); - ngDevMode && assertNotEqual(parentLocation, -1, 'Not a valid state.'); - const parentInjectorIndex = parentLocation & 32767 /* InjectorIndexMask */; - ngDevMode && - assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, 'Parent injector must be pointing past HEADER_OFFSET.'); - return parentLocation & 32767 /* InjectorIndexMask */; -} -function getParentInjectorViewOffset(parentLocation) { - return parentLocation >> 16 /* ViewOffsetShift */; -} -/** - * Unwraps a parent injector location number to find the view offset from the current injector, - * then walks up the declaration view tree until the view is found that contains the parent - * injector. - * - * @param location The location of the parent injector, which contains the view offset - * @param startView The LView instance from which to start walking up the view tree - * @returns The LView instance that contains the parent injector - */ -function getParentInjectorView(location, startView) { - let viewOffset = getParentInjectorViewOffset(location); - let parentView = startView; - // For most cases, the parent injector can be found on the host node (e.g. for component - // or container), but we must keep the loop here to support the rarer case of deeply nested - // tags or inline views, where the parent injector might live many views - // above the child injector. - while (viewOffset > 0) { - parentView = parentView[DECLARATION_VIEW]; - viewOffset--; - } - return parentView; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * Defines if the call to `inject` should include `viewProviders` in its resolution. - * - * This is set to true when we try to instantiate a component. This value is reset in - * `getNodeInjectable` to a value which matches the declaration location of the token about to be - * instantiated. This is done so that if we are injecting a token which was declared outside of - * `viewProviders` we don't accidentally pull `viewProviders` in. - * - * Example: - * - * ``` - * @Injectable() - * class MyService { - * constructor(public value: String) {} - * } - * - * @Component({ - * providers: [ - * MyService, - * {provide: String, value: 'providers' } - * ] - * viewProviders: [ - * {provide: String, value: 'viewProviders'} - * ] - * }) - * class MyComponent { - * constructor(myService: MyService, value: String) { - * // We expect that Component can see into `viewProviders`. - * expect(value).toEqual('viewProviders'); - * // `MyService` was not declared in `viewProviders` hence it can't see it. - * expect(myService.value).toEqual('providers'); - * } - * } - * - * ``` - */ -let includeViewProviders = true; -function setIncludeViewProviders(v) { - const oldValue = includeViewProviders; - includeViewProviders = v; - return oldValue; -} -/** - * The number of slots in each bloom filter (used by DI). The larger this number, the fewer - * directives that will share slots, and thus, the fewer false positives when checking for - * the existence of a directive. - */ -const BLOOM_SIZE = 256; -const BLOOM_MASK = BLOOM_SIZE - 1; -/** - * The number of bits that is represented by a single bloom bucket. JS bit operations are 32 bits, - * so each bucket represents 32 distinct tokens which accounts for log2(32) = 5 bits of a bloom hash - * number. - */ -const BLOOM_BUCKET_BITS = 5; -/** Counter used to generate unique IDs for directives. */ -let nextNgElementId = 0; -/** - * Registers this directive as present in its node's injector by flipping the directive's - * corresponding bit in the injector's bloom filter. - * - * @param injectorIndex The index of the node injector where this token should be registered - * @param tView The TView for the injector's bloom filters - * @param type The directive token to register - */ -function bloomAdd(injectorIndex, tView, type) { - ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true'); - let id; - if (typeof type === 'string') { - id = type.charCodeAt(0) || 0; - } - else if (type.hasOwnProperty(NG_ELEMENT_ID)) { - id = type[NG_ELEMENT_ID]; - } - // Set a unique ID on the directive type, so if something tries to inject the directive, - // we can easily retrieve the ID and hash it into the bloom bit that should be checked. - if (id == null) { - id = type[NG_ELEMENT_ID] = nextNgElementId++; - } - // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each), - // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter. - const bloomHash = id & BLOOM_MASK; - // Create a mask that targets the specific bit associated with the directive. - // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding - // to bit positions 0 - 31 in a 32 bit integer. - const mask = 1 << bloomHash; - // Each bloom bucket in `tData` represents `BLOOM_BUCKET_BITS` number of bits of `bloomHash`. - // Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset that the mask - // should be written to. - tView.data[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask; -} -/** - * Creates (or gets an existing) injector for a given element or container. - * - * @param tNode for which an injector should be retrieved / created. - * @param lView View where the node is stored - * @returns Node injector - */ -function getOrCreateNodeInjectorForNode(tNode, lView) { - const existingInjectorIndex = getInjectorIndex(tNode, lView); - if (existingInjectorIndex !== -1) { - return existingInjectorIndex; - } - const tView = lView[TVIEW]; - if (tView.firstCreatePass) { - tNode.injectorIndex = lView.length; - insertBloom(tView.data, tNode); // foundation for node bloom - insertBloom(lView, null); // foundation for cumulative bloom - insertBloom(tView.blueprint, null); - } - const parentLoc = getParentInjectorLocation(tNode, lView); - const injectorIndex = tNode.injectorIndex; - // If a parent injector can't be found, its location is set to -1. - // In that case, we don't need to set up a cumulative bloom - if (hasParentInjector(parentLoc)) { - const parentIndex = getParentInjectorIndex(parentLoc); - const parentLView = getParentInjectorView(parentLoc, lView); - const parentData = parentLView[TVIEW].data; - // Creates a cumulative bloom filter that merges the parent's bloom filter - // and its own cumulative bloom (which contains tokens for all ancestors) - for (let i = 0; i < 8 /* BLOOM_SIZE */; i++) { - lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i]; - } - } - lView[injectorIndex + 8 /* PARENT */] = parentLoc; - return injectorIndex; -} -function insertBloom(arr, footer) { - arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer); -} -function getInjectorIndex(tNode, lView) { - if (tNode.injectorIndex === -1 || - // If the injector index is the same as its parent's injector index, then the index has been - // copied down from the parent node. No injector has been created yet on this node. - (tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex) || - // After the first template pass, the injector index might exist but the parent values - // might not have been calculated yet for this instance - lView[tNode.injectorIndex + 8 /* PARENT */] === null) { - return -1; - } - else { - ngDevMode && assertIndexInRange(lView, tNode.injectorIndex); - return tNode.injectorIndex; - } -} -/** - * Finds the index of the parent injector, with a view offset if applicable. Used to set the - * parent injector initially. - * - * @returns Returns a number that is the combination of the number of LViews that we have to go up - * to find the LView containing the parent inject AND the index of the injector within that LView. - */ -function getParentInjectorLocation(tNode, lView) { - if (tNode.parent && tNode.parent.injectorIndex !== -1) { - // If we have a parent `TNode` and there is an injector associated with it we are done, because - // the parent injector is within the current `LView`. - return tNode.parent.injectorIndex; // ViewOffset is 0 - } - // When parent injector location is computed it may be outside of the current view. (ie it could - // be pointing to a declared parent location). This variable stores number of declaration parents - // we need to walk up in order to find the parent injector location. - let declarationViewOffset = 0; - let parentTNode = null; - let lViewCursor = lView; - // The parent injector is not in the current `LView`. We will have to walk the declared parent - // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent - // `NodeInjector`. - while (lViewCursor !== null) { - // First determine the `parentTNode` location. The parent pointer differs based on `TView.type`. - const tView = lViewCursor[TVIEW]; - const tViewType = tView.type; - if (tViewType === 2 /* Embedded */) { - ngDevMode && - assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.'); - parentTNode = tView.declTNode; - } - else if (tViewType === 1 /* Component */) { - // Components don't have `TView.declTNode` because each instance of component could be - // inserted in different location, hence `TView.declTNode` is meaningless. - parentTNode = lViewCursor[T_HOST]; - } - else { - ngDevMode && assertEqual(tView.type, 0 /* Root */, 'Root type expected'); - parentTNode = null; - } - if (parentTNode === null) { - // If we have no parent, than we are done. - return NO_PARENT_INJECTOR; - } - ngDevMode && parentTNode && assertTNodeForLView(parentTNode, lViewCursor[DECLARATION_VIEW]); - // Every iteration of the loop requires that we go to the declared parent. - declarationViewOffset++; - lViewCursor = lViewCursor[DECLARATION_VIEW]; - if (parentTNode.injectorIndex !== -1) { - // We found a NodeInjector which points to something. - return (parentTNode.injectorIndex | - (declarationViewOffset << 16 /* ViewOffsetShift */)); - } - } - return NO_PARENT_INJECTOR; -} -/** - * Makes a type or an injection token public to the DI system by adding it to an - * injector's bloom filter. - * - * @param di The node injector in which a directive will be added - * @param token The type or the injection token to be made public - */ -function diPublicInInjector(injectorIndex, tView, token) { - bloomAdd(injectorIndex, tView, token); -} -/** - * Inject static attribute value into directive constructor. - * - * This method is used with `factory` functions which are generated as part of - * `defineDirective` or `defineComponent`. The method retrieves the static value - * of an attribute. (Dynamic attributes are not supported since they are not resolved - * at the time of injection and can change over time.) - * - * # Example - * Given: - * ``` - * @Component(...) - * class MyComponent { - * constructor(@Attribute('title') title: string) { ... } - * } - * ``` - * When instantiated with - * ``` - * - * ``` - * - * Then factory method generated is: - * ``` - * MyComponent.ɵcmp = defineComponent({ - * factory: () => new MyComponent(injectAttribute('title')) - * ... - * }) - * ``` - * - * @publicApi - */ -function injectAttributeImpl(tNode, attrNameToInject) { - ngDevMode && assertTNodeType(tNode, 12 /* AnyContainer */ | 3 /* AnyRNode */); - ngDevMode && assertDefined(tNode, 'expecting tNode'); - if (attrNameToInject === 'class') { - return tNode.classes; - } - if (attrNameToInject === 'style') { - return tNode.styles; - } - const attrs = tNode.attrs; - if (attrs) { - const attrsLength = attrs.length; - let i = 0; - while (i < attrsLength) { - const value = attrs[i]; - // If we hit a `Bindings` or `Template` marker then we are done. - if (isNameOnlyAttributeMarker(value)) - break; - // Skip namespaced attributes - if (value === 0 /* NamespaceURI */) { - // we skip the next two values - // as namespaced attributes looks like - // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist', - // 'existValue', ...] - i = i + 2; - } - else if (typeof value === 'number') { - // Skip to the first value of the marked attribute. - i++; - while (i < attrsLength && typeof attrs[i] === 'string') { - i++; - } - } - else if (value === attrNameToInject) { - return attrs[i + 1]; - } - else { - i = i + 2; - } - } - } - return null; -} -function notFoundValueOrThrow(notFoundValue, token, flags) { - if (flags & InjectFlags.Optional) { - return notFoundValue; - } - else { - throwProviderNotFoundError(token, 'NodeInjector'); - } -} -/** - * Returns the value associated to the given token from the ModuleInjector or throws exception - * - * @param lView The `LView` that contains the `tNode` - * @param token The token to look for - * @param flags Injection flags - * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional` - * @returns the value from the injector or throws an exception - */ -function lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) { - if (flags & InjectFlags.Optional && notFoundValue === undefined) { - // This must be set or the NullInjector will throw for optional deps - notFoundValue = null; - } - if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) { - const moduleInjector = lView[INJECTOR]; - // switch to `injectInjectorOnly` implementation for module injector, since module injector - // should not have access to Component/Directive DI scope (that may happen through - // `directiveInject` implementation) - const previousInjectImplementation = setInjectImplementation(undefined); - try { - if (moduleInjector) { - return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional); - } - else { - return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional); - } - } - finally { - setInjectImplementation(previousInjectImplementation); - } - } - return notFoundValueOrThrow(notFoundValue, token, flags); -} -/** - * Returns the value associated to the given token from the NodeInjectors => ModuleInjector. - * - * Look for the injector providing the token by walking up the node injector tree and then - * the module injector tree. - * - * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom - * filter. `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`) - * - * @param tNode The Node where the search for the injector should start - * @param lView The `LView` that contains the `tNode` - * @param token The token to look for - * @param flags Injection flags - * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional` - * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided - */ -function getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default, notFoundValue) { - if (tNode !== null) { - const bloomHash = bloomHashBitOrFactory(token); - // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef - // so just call the factory function to create it. - if (typeof bloomHash === 'function') { - if (!enterDI(lView, tNode, flags)) { - // Failed to enter DI, try module injector instead. If a token is injected with the @Host - // flag, the module injector is not searched for that token in Ivy. - return (flags & InjectFlags.Host) ? - notFoundValueOrThrow(notFoundValue, token, flags) : - lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue); - } - try { - const value = bloomHash(); - if (value == null && !(flags & InjectFlags.Optional)) { - throwProviderNotFoundError(token); - } - else { - return value; - } - } - finally { - leaveDI(); - } - } - else if (typeof bloomHash === 'number') { - // A reference to the previous injector TView that was found while climbing the element - // injector tree. This is used to know if viewProviders can be accessed on the current - // injector. - let previousTView = null; - let injectorIndex = getInjectorIndex(tNode, lView); - let parentLocation = NO_PARENT_INJECTOR; - let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null; - // If we should skip this injector, or if there is no injector on this node, start by - // searching the parent injector. - if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) { - parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) : - lView[injectorIndex + 8 /* PARENT */]; - if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) { - injectorIndex = -1; - } - else { - previousTView = lView[TVIEW]; - injectorIndex = getParentInjectorIndex(parentLocation); - lView = getParentInjectorView(parentLocation, lView); - } - } - // Traverse up the injector tree until we find a potential match or until we know there - // *isn't* a match. - while (injectorIndex !== -1) { - ngDevMode && assertNodeInjector(lView, injectorIndex); - // Check the current injector. If it matches, see if it contains token. - const tView = lView[TVIEW]; - ngDevMode && - assertTNodeForLView(tView.data[injectorIndex + 8 /* TNODE */], lView); - if (bloomHasToken(bloomHash, injectorIndex, tView.data)) { - // At this point, we have an injector which *may* contain the token, so we step through - // the providers and directives associated with the injector's corresponding node to get - // the instance. - const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode); - if (instance !== NOT_FOUND) { - return instance; - } - } - parentLocation = lView[injectorIndex + 8 /* PARENT */]; - if (parentLocation !== NO_PARENT_INJECTOR && - shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* TNODE */] === hostTElementNode) && - bloomHasToken(bloomHash, injectorIndex, lView)) { - // The def wasn't found anywhere on this node, so it was a false positive. - // Traverse up the tree and continue searching. - previousTView = tView; - injectorIndex = getParentInjectorIndex(parentLocation); - lView = getParentInjectorView(parentLocation, lView); - } - else { - // If we should not search parent OR If the ancestor bloom filter value does not have the - // bit corresponding to the directive we can give up on traversing up to find the specific - // injector. - injectorIndex = -1; - } - } - } - } - return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue); -} -const NOT_FOUND = {}; -function createNodeInjector() { - return new NodeInjector(getCurrentTNode(), getLView()); -} -function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) { - const currentTView = lView[TVIEW]; - const tNode = currentTView.data[injectorIndex + 8 /* TNODE */]; - // First, we need to determine if view providers can be accessed by the starting element. - // There are two possibilities - const canAccessViewProviders = previousTView == null ? - // 1) This is the first invocation `previousTView == null` which means that we are at the - // `TNode` of where injector is starting to look. In such a case the only time we are allowed - // to look into the ViewProviders is if: - // - we are on a component - // - AND the injector set `includeViewProviders` to true (implying that the token can see - // ViewProviders because it is the Component or a Service which itself was declared in - // ViewProviders) - (isComponentHost(tNode) && includeViewProviders) : - // 2) `previousTView != null` which means that we are now walking across the parent nodes. - // In such a case we are only allowed to look into the ViewProviders if: - // - We just crossed from child View to Parent View `previousTView != currentTView` - // - AND the parent TNode is an Element. - // This means that we just came from the Component's View and therefore are allowed to see - // into the ViewProviders. - (previousTView != currentTView && ((tNode.type & 3 /* AnyRNode */) !== 0)); - // This special case happens when there is a @host on the inject and when we are searching - // on the host element node. - const isHostSpecialCase = (flags & InjectFlags.Host) && hostTElementNode === tNode; - const injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase); - if (injectableIdx !== null) { - return getNodeInjectable(lView, currentTView, injectableIdx, tNode); - } - else { - return NOT_FOUND; - } -} -/** - * Searches for the given token among the node's directives and providers. - * - * @param tNode TNode on which directives are present. - * @param tView The tView we are currently processing - * @param token Provider token or type of a directive to look for. - * @param canAccessViewProviders Whether view providers should be considered. - * @param isHostSpecialCase Whether the host special case applies. - * @returns Index of a found directive or provider, or null when none found. - */ -function locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) { - const nodeProviderIndexes = tNode.providerIndexes; - const tInjectables = tView.data; - const injectablesStart = nodeProviderIndexes & 1048575 /* ProvidersStartIndexMask */; - const directivesStart = tNode.directiveStart; - const directiveEnd = tNode.directiveEnd; - const cptViewProvidersCount = nodeProviderIndexes >> 20 /* CptViewProvidersCountShift */; - const startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount; - // When the host special case applies, only the viewProviders and the component are visible - const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd; - for (let i = startingIndex; i < endIndex; i++) { - const providerTokenOrDef = tInjectables[i]; - if (i < directivesStart && token === providerTokenOrDef || - i >= directivesStart && providerTokenOrDef.type === token) { - return i; - } - } - if (isHostSpecialCase) { - const dirDef = tInjectables[directivesStart]; - if (dirDef && isComponentDef(dirDef) && dirDef.type === token) { - return directivesStart; - } - } - return null; -} -/** - * Retrieve or instantiate the injectable from the `LView` at particular `index`. - * - * This function checks to see if the value has already been instantiated and if so returns the - * cached `injectable`. Otherwise if it detects that the value is still a factory it - * instantiates the `injectable` and caches the value. - */ -function getNodeInjectable(lView, tView, index, tNode) { - let value = lView[index]; - const tData = tView.data; - if (isFactory(value)) { - const factory = value; - if (factory.resolving) { - throwCyclicDependencyError(stringifyForError(tData[index])); - } - const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders); - factory.resolving = true; - const previousInjectImplementation = factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null; - const success = enterDI(lView, tNode, InjectFlags.Default); - ngDevMode && - assertEqual(success, true, 'Because flags do not contain \`SkipSelf\' we expect this to always succeed.'); - try { - value = lView[index] = factory.factory(undefined, tData, lView, tNode); - // This code path is hit for both directives and providers. - // For perf reasons, we want to avoid searching for hooks on providers. - // It does no harm to try (the hooks just won't exist), but the extra - // checks are unnecessary and this is a hot path. So we check to see - // if the index of the dependency is in the directive range for this - // tNode. If it's not, we know it's a provider and skip hook registration. - if (tView.firstCreatePass && index >= tNode.directiveStart) { - ngDevMode && assertDirectiveDef(tData[index]); - registerPreOrderHooks(index, tData[index], tView); - } - } - finally { - previousInjectImplementation !== null && - setInjectImplementation(previousInjectImplementation); - setIncludeViewProviders(previousIncludeViewProviders); - factory.resolving = false; - leaveDI(); - } - } - return value; -} -/** - * Returns the bit in an injector's bloom filter that should be used to determine whether or not - * the directive might be provided by the injector. - * - * When a directive is public, it is added to the bloom filter and given a unique ID that can be - * retrieved on the Type. When the directive isn't public or the token is not a directive `null` - * is returned as the node injector can not possibly provide that token. - * - * @param token the injection token - * @returns the matching bit to check in the bloom filter or `null` if the token is not known. - * When the returned value is negative then it represents special values such as `Injector`. - */ -function bloomHashBitOrFactory(token) { - ngDevMode && assertDefined(token, 'token must be defined'); - if (typeof token === 'string') { - return token.charCodeAt(0) || 0; - } - const tokenId = - // First check with `hasOwnProperty` so we don't get an inherited ID. - token.hasOwnProperty(NG_ELEMENT_ID) ? token[NG_ELEMENT_ID] : undefined; - // Negative token IDs are used for special objects such as `Injector` - if (typeof tokenId === 'number') { - if (tokenId >= 0) { - return tokenId & BLOOM_MASK; - } - else { - ngDevMode && - assertEqual(tokenId, -1 /* Injector */, 'Expecting to get Special Injector Id'); - return createNodeInjector; - } - } - else { - return tokenId; - } -} -function bloomHasToken(bloomHash, injectorIndex, injectorView) { - // Create a mask that targets the specific bit associated with the directive we're looking for. - // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding - // to bit positions 0 - 31 in a 32 bit integer. - const mask = 1 << bloomHash; - // Each bloom bucket in `injectorView` represents `BLOOM_BUCKET_BITS` number of bits of - // `bloomHash`. Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset - // that should be used. - const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)]; - // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on, - // this injector is a potential match. - return !!(value & mask); -} -/** Returns true if flags prevent parent injector from being searched for tokens */ -function shouldSearchParent(flags, isFirstHostTNode) { - return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode); -} -class NodeInjector { - constructor(_tNode, _lView) { - this._tNode = _tNode; - this._lView = _lView; - } - get(token, notFoundValue) { - return getOrCreateInjectable(this._tNode, this._lView, token, undefined, notFoundValue); - } -} -/** - * @codeGenApi - */ -function ɵɵgetInheritedFactory(type) { - return noSideEffects(() => { - const ownConstructor = type.prototype.constructor; - const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor); - const objectPrototype = Object.prototype; - let parent = Object.getPrototypeOf(type.prototype).constructor; - // Go up the prototype until we hit `Object`. - while (parent && parent !== objectPrototype) { - const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent); - // If we hit something that has a factory and the factory isn't the same as the type, - // we've found the inherited factory. Note the check that the factory isn't the type's - // own factory is redundant in most cases, but if the user has custom decorators on the - // class, this lookup will start one level down in the prototype chain, causing us to - // find the own factory first and potentially triggering an infinite loop downstream. - if (factory && factory !== ownFactory) { - return factory; - } - parent = Object.getPrototypeOf(parent); - } - // There is no factory defined. Either this was improper usage of inheritance - // (no Angular decorator on the superclass) or there is no constructor at all - // in the inheritance chain. Since the two cases cannot be distinguished, the - // latter has to be assumed. - return t => new t(); - }); -} -function getFactoryOf(type) { - if (isForwardRef(type)) { - return () => { - const factory = getFactoryOf(resolveForwardRef(type)); - return factory && factory(); - }; - } - return getFactoryDef(type); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * Facade for the attribute injection from DI. - * - * @codeGenApi - */ -function ɵɵinjectAttribute(attrNameToInject) { - return injectAttributeImpl(getCurrentTNode(), attrNameToInject); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -const ANNOTATIONS = '__annotations__'; -const PARAMETERS = '__parameters__'; -const PROP_METADATA = '__prop__metadata__'; -/** - * @suppress {globalThis} - */ -function makeDecorator(name, props, parentClass, additionalProcessing, typeFn) { - return noSideEffects(() => { - const metaCtor = makeMetadataCtor(props); - function DecoratorFactory(...args) { - if (this instanceof DecoratorFactory) { - metaCtor.call(this, ...args); - return this; - } - const annotationInstance = new DecoratorFactory(...args); - return function TypeDecorator(cls) { - if (typeFn) - typeFn(cls, ...args); - // Use of Object.defineProperty is important since it creates non-enumerable property which - // prevents the property is copied during subclassing. - const annotations = cls.hasOwnProperty(ANNOTATIONS) ? - cls[ANNOTATIONS] : - Object.defineProperty(cls, ANNOTATIONS, { value: [] })[ANNOTATIONS]; - annotations.push(annotationInstance); - if (additionalProcessing) - additionalProcessing(cls); - return cls; - }; - } - if (parentClass) { - DecoratorFactory.prototype = Object.create(parentClass.prototype); - } - DecoratorFactory.prototype.ngMetadataName = name; - DecoratorFactory.annotationCls = DecoratorFactory; - return DecoratorFactory; - }); -} -function makeMetadataCtor(props) { - return function ctor(...args) { - if (props) { - const values = props(...args); - for (const propName in values) { - this[propName] = values[propName]; - } - } - }; -} -function makeParamDecorator(name, props, parentClass) { - return noSideEffects(() => { - const metaCtor = makeMetadataCtor(props); - function ParamDecoratorFactory(...args) { - if (this instanceof ParamDecoratorFactory) { - metaCtor.apply(this, args); - return this; - } - const annotationInstance = new ParamDecoratorFactory(...args); - ParamDecorator.annotation = annotationInstance; - return ParamDecorator; - function ParamDecorator(cls, unusedKey, index) { - // Use of Object.defineProperty is important since it creates non-enumerable property which - // prevents the property is copied during subclassing. - const parameters = cls.hasOwnProperty(PARAMETERS) ? - cls[PARAMETERS] : - Object.defineProperty(cls, PARAMETERS, { value: [] })[PARAMETERS]; - // there might be gaps if some in between parameters do not have annotations. - // we pad with nulls. - while (parameters.length <= index) { - parameters.push(null); - } - (parameters[index] = parameters[index] || []).push(annotationInstance); - return cls; - } - } - if (parentClass) { - ParamDecoratorFactory.prototype = Object.create(parentClass.prototype); - } - ParamDecoratorFactory.prototype.ngMetadataName = name; - ParamDecoratorFactory.annotationCls = ParamDecoratorFactory; - return ParamDecoratorFactory; - }); -} -function makePropDecorator(name, props, parentClass, additionalProcessing) { - return noSideEffects(() => { - const metaCtor = makeMetadataCtor(props); - function PropDecoratorFactory(...args) { - if (this instanceof PropDecoratorFactory) { - metaCtor.apply(this, args); - return this; - } - const decoratorInstance = new PropDecoratorFactory(...args); - function PropDecorator(target, name) { - const constructor = target.constructor; - // Use of Object.defineProperty is important because it creates a non-enumerable property - // which prevents the property from being copied during subclassing. - const meta = constructor.hasOwnProperty(PROP_METADATA) ? - constructor[PROP_METADATA] : - Object.defineProperty(constructor, PROP_METADATA, { value: {} })[PROP_METADATA]; - meta[name] = meta.hasOwnProperty(name) && meta[name] || []; - meta[name].unshift(decoratorInstance); - if (additionalProcessing) - additionalProcessing(target, name, ...args); - } - return PropDecorator; - } - if (parentClass) { - PropDecoratorFactory.prototype = Object.create(parentClass.prototype); - } - PropDecoratorFactory.prototype.ngMetadataName = name; - PropDecoratorFactory.annotationCls = PropDecoratorFactory; - return PropDecoratorFactory; - }); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function CREATE_ATTRIBUTE_DECORATOR__PRE_R3__() { - return makeParamDecorator('Attribute', (attributeName) => ({ attributeName })); -} -function CREATE_ATTRIBUTE_DECORATOR__POST_R3__() { - return makeParamDecorator('Attribute', (attributeName) => ({ attributeName, __NG_ELEMENT_ID__: () => ɵɵinjectAttribute(attributeName) })); -} -const CREATE_ATTRIBUTE_DECORATOR_IMPL = CREATE_ATTRIBUTE_DECORATOR__POST_R3__; -/** - * Attribute decorator and metadata. - * - * @Annotation - * @publicApi - */ -const Attribute = CREATE_ATTRIBUTE_DECORATOR_IMPL(); - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * Creates a token that can be used in a DI Provider. - * - * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a - * runtime representation) such as when injecting an interface, callable type, array or - * parameterized type. - * - * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by - * the `Injector`. This provides additional level of type safety. - * - * ``` - * interface MyInterface {...} - * var myInterface = injector.get(new InjectionToken('SomeToken')); - * // myInterface is inferred to be MyInterface. - * ``` - * - * When creating an `InjectionToken`, you can optionally specify a factory function which returns - * (possibly by creating) a default value of the parameterized type `T`. This sets up the - * `InjectionToken` using this factory as a provider as if it was defined explicitly in the - * application's root injector. If the factory function, which takes zero arguments, needs to inject - * dependencies, it can do so using the `inject` function. See below for an example. - * - * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which - * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As - * mentioned above, `'root'` is the default value for `providedIn`. - * - * @usageNotes - * ### Basic Example - * - * ### Plain InjectionToken - * - * {@example core/di/ts/injector_spec.ts region='InjectionToken'} - * - * ### Tree-shakable InjectionToken - * - * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'} - * - * - * @publicApi - */ -class InjectionToken { - constructor(_desc, options) { - this._desc = _desc; - /** @internal */ - this.ngMetadataName = 'InjectionToken'; - this.ɵprov = undefined; - if (typeof options == 'number') { - (typeof ngDevMode === 'undefined' || ngDevMode) && - assertLessThan(options, 0, 'Only negative numbers are supported here'); - // This is a special hack to assign __NG_ELEMENT_ID__ to this instance. - // See `InjectorMarkers` - this.__NG_ELEMENT_ID__ = options; - } - else if (options !== undefined) { - this.ɵprov = ɵɵdefineInjectable({ - token: this, - providedIn: options.providedIn || 'root', - factory: options.factory, - }); - } - } - toString() { - return `InjectionToken ${this._desc}`; - } -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * A DI token that you can use to create a virtual [provider](guide/glossary#provider) - * that will populate the `entryComponents` field of components and NgModules - * based on its `useValue` property value. - * All components that are referenced in the `useValue` value (either directly - * or in a nested array or map) are added to the `entryComponents` property. - * - * @usageNotes - * - * The following example shows how the router can populate the `entryComponents` - * field of an NgModule based on a router configuration that refers - * to components. - * - * ```typescript - * // helper function inside the router - * function provideRoutes(routes) { - * return [ - * {provide: ROUTES, useValue: routes}, - * {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true} - * ]; - * } - * - * // user code - * let routes = [ - * {path: '/root', component: RootComp}, - * {path: '/teams', component: TeamsComp} - * ]; - * - * @NgModule({ - * providers: [provideRoutes(routes)] - * }) - * class ModuleWithRoutes {} - * ``` - * - * @publicApi - * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary. - */ -const ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken('AnalyzeForEntryComponents'); -// Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not -// explicitly set. This value will be changed to `true` in v12. -// TODO(misko): switch the default in v12 to `true`. See: packages/compiler/src/core.ts -const emitDistinctChangesOnlyDefaultValue = false; -/** - * Base class for query metadata. - * - * @see `ContentChildren`. - * @see `ContentChild`. - * @see `ViewChildren`. - * @see `ViewChild`. - * - * @publicApi - */ -class Query { -} -const ɵ0$1 = (selector, data = {}) => (Object.assign({ selector, first: false, isViewQuery: false, descendants: false, emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue }, data)); -/** - * ContentChildren decorator and metadata. - * - * - * @Annotation - * @publicApi - */ -const ContentChildren = makePropDecorator('ContentChildren', ɵ0$1, Query); -const ɵ1 = (selector, data = {}) => (Object.assign({ selector, first: true, isViewQuery: false, descendants: true }, data)); -/** - * ContentChild decorator and metadata. - * - * - * @Annotation - * - * @publicApi - */ -const ContentChild = makePropDecorator('ContentChild', ɵ1, Query); -const ɵ2 = (selector, data = {}) => (Object.assign({ selector, first: false, isViewQuery: true, descendants: true, emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue }, data)); -/** - * ViewChildren decorator and metadata. - * - * @Annotation - * @publicApi - */ -const ViewChildren = makePropDecorator('ViewChildren', ɵ2, Query); -const ɵ3 = (selector, data) => (Object.assign({ selector, first: true, isViewQuery: true, descendants: true }, data)); -/** - * ViewChild decorator and metadata. - * - * @Annotation - * @publicApi - */ -const ViewChild = makePropDecorator('ViewChild', ɵ3, Query); - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var R3ResolvedDependencyType; -(function (R3ResolvedDependencyType) { - R3ResolvedDependencyType[R3ResolvedDependencyType["Token"] = 0] = "Token"; - R3ResolvedDependencyType[R3ResolvedDependencyType["Attribute"] = 1] = "Attribute"; - R3ResolvedDependencyType[R3ResolvedDependencyType["ChangeDetectorRef"] = 2] = "ChangeDetectorRef"; - R3ResolvedDependencyType[R3ResolvedDependencyType["Invalid"] = 3] = "Invalid"; -})(R3ResolvedDependencyType || (R3ResolvedDependencyType = {})); -var R3FactoryTarget; -(function (R3FactoryTarget) { - R3FactoryTarget[R3FactoryTarget["Directive"] = 0] = "Directive"; - R3FactoryTarget[R3FactoryTarget["Component"] = 1] = "Component"; - R3FactoryTarget[R3FactoryTarget["Injectable"] = 2] = "Injectable"; - R3FactoryTarget[R3FactoryTarget["Pipe"] = 3] = "Pipe"; - R3FactoryTarget[R3FactoryTarget["NgModule"] = 4] = "NgModule"; -})(R3FactoryTarget || (R3FactoryTarget = {})); -var ViewEncapsulation$1; -(function (ViewEncapsulation) { - ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated"; - // Historically the 1 value was for `Native` encapsulation which has been removed as of v11. - ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None"; - ViewEncapsulation[ViewEncapsulation["ShadowDom"] = 3] = "ShadowDom"; -})(ViewEncapsulation$1 || (ViewEncapsulation$1 = {})); - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function getCompilerFacade() { - const globalNg = _global['ng']; - if (!globalNg || !globalNg.ɵcompilerFacade) { - throw new Error(`Angular JIT compilation failed: '@angular/compiler' not loaded!\n` + - ` - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\n` + - ` - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\n` + - ` - Alternatively provide the compiler with 'import "@angular/compiler";' before bootstrapping.`); - } - return globalNg.ɵcompilerFacade; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * @description - * - * Represents a type that a Component or other object is instances of. - * - * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by - * the `MyCustomComponent` constructor function. - * - * @publicApi - */ -const Type = Function; -function isType(v) { - return typeof v === 'function'; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * Equivalent to ES6 spread, add each item to an array. - * - * @param items The items to add - * @param arr The array to which you want to add the items - */ -function addAllToArray(items, arr) { - for (let i = 0; i < items.length; i++) { - arr.push(items[i]); - } -} -/** - * Determines if the contents of two arrays is identical - * - * @param a first array - * @param b second array - * @param identityAccessor Optional function for extracting stable object identity from a value in - * the array. - */ -function arrayEquals(a, b, identityAccessor) { - if (a.length !== b.length) - return false; - for (let i = 0; i < a.length; i++) { - let valueA = a[i]; - let valueB = b[i]; - if (identityAccessor) { - valueA = identityAccessor(valueA); - valueB = identityAccessor(valueB); - } - if (valueB !== valueA) { - return false; - } - } - return true; -} -/** - * Flattens an array. - */ -function flatten(list, dst) { - if (dst === undefined) - dst = list; - for (let i = 0; i < list.length; i++) { - let item = list[i]; - if (Array.isArray(item)) { - // we need to inline it. - if (dst === list) { - // Our assumption that the list was already flat was wrong and - // we need to clone flat since we need to write to it. - dst = list.slice(0, i); - } - flatten(item, dst); - } - else if (dst !== list) { - dst.push(item); - } - } - return dst; -} -function deepForEach(input, fn) { - input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value)); -} -function addToArray(arr, index, value) { - // perf: array.push is faster than array.splice! - if (index >= arr.length) { - arr.push(value); - } - else { - arr.splice(index, 0, value); - } -} -function removeFromArray(arr, index) { - // perf: array.pop is faster than array.splice! - if (index >= arr.length - 1) { - return arr.pop(); - } - else { - return arr.splice(index, 1)[0]; - } -} -function newArray(size, value) { - const list = []; - for (let i = 0; i < size; i++) { - list.push(value); - } - return list; -} -/** - * Remove item from array (Same as `Array.splice()` but faster.) - * - * `Array.splice()` is not as fast because it has to allocate an array for the elements which were - * removed. This causes memory pressure and slows down code when most of the time we don't - * care about the deleted items array. - * - * https://jsperf.com/fast-array-splice (About 20x faster) - * - * @param array Array to splice - * @param index Index of element in array to remove. - * @param count Number of items to remove. - */ -function arraySplice(array, index, count) { - const length = array.length - count; - while (index < length) { - array[index] = array[index + count]; - index++; - } - while (count--) { - array.pop(); // shrink the array - } -} -/** - * Same as `Array.splice(index, 0, value)` but faster. - * - * `Array.splice()` is not fast because it has to allocate an array for the elements which were - * removed. This causes memory pressure and slows down code when most of the time we don't - * care about the deleted items array. - * - * @param array Array to splice. - * @param index Index in array where the `value` should be added. - * @param value Value to add to array. - */ -function arrayInsert(array, index, value) { - ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\'t insert past array end.'); - let end = array.length; - while (end > index) { - const previousEnd = end - 1; - array[end] = array[previousEnd]; - end = previousEnd; - } - array[index] = value; -} -/** - * Same as `Array.splice2(index, 0, value1, value2)` but faster. - * - * `Array.splice()` is not fast because it has to allocate an array for the elements which were - * removed. This causes memory pressure and slows down code when most of the time we don't - * care about the deleted items array. - * - * @param array Array to splice. - * @param index Index in array where the `value` should be added. - * @param value1 Value to add to array. - * @param value2 Value to add to array. - */ -function arrayInsert2(array, index, value1, value2) { - ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\'t insert past array end.'); - let end = array.length; - if (end == index) { - // inserting at the end. - array.push(value1, value2); - } - else if (end === 1) { - // corner case when we have less items in array than we have items to insert. - array.push(value2, array[0]); - array[0] = value1; - } - else { - end--; - array.push(array[end - 1], array[end]); - while (end > index) { - const previousEnd = end - 2; - array[end] = array[previousEnd]; - end--; - } - array[index] = value1; - array[index + 1] = value2; - } -} -/** - * Insert a `value` into an `array` so that the array remains sorted. - * - * NOTE: - * - Duplicates are not allowed, and are ignored. - * - This uses binary search algorithm for fast inserts. - * - * @param array A sorted array to insert into. - * @param value The value to insert. - * @returns index of the inserted value. - */ -function arrayInsertSorted(array, value) { - let index = arrayIndexOfSorted(array, value); - if (index < 0) { - // if we did not find it insert it. - index = ~index; - arrayInsert(array, index, value); - } - return index; -} -/** - * Remove `value` from a sorted `array`. - * - * NOTE: - * - This uses binary search algorithm for fast removals. - * - * @param array A sorted array to remove from. - * @param value The value to remove. - * @returns index of the removed value. - * - positive index if value found and removed. - * - negative index if value not found. (`~index` to get the value where it should have been - * inserted) - */ -function arrayRemoveSorted(array, value) { - const index = arrayIndexOfSorted(array, value); - if (index >= 0) { - arraySplice(array, index, 1); - } - return index; -} -/** - * Get an index of an `value` in a sorted `array`. - * - * NOTE: - * - This uses binary search algorithm for fast removals. - * - * @param array A sorted array to binary search. - * @param value The value to look for. - * @returns index of the value. - * - positive index if value found. - * - negative index if value not found. (`~index` to get the value where it should have been - * located) - */ -function arrayIndexOfSorted(array, value) { - return _arrayIndexOfSorted(array, value, 0); -} -/** - * Set a `value` for a `key`. - * - * @param keyValueArray to modify. - * @param key The key to locate or create. - * @param value The value to set for a `key`. - * @returns index (always even) of where the value vas set. - */ -function keyValueArraySet(keyValueArray, key, value) { - let index = keyValueArrayIndexOf(keyValueArray, key); - if (index >= 0) { - // if we found it set it. - keyValueArray[index | 1] = value; - } - else { - index = ~index; - arrayInsert2(keyValueArray, index, key, value); - } - return index; -} -/** - * Retrieve a `value` for a `key` (on `undefined` if not found.) - * - * @param keyValueArray to search. - * @param key The key to locate. - * @return The `value` stored at the `key` location or `undefined if not found. - */ -function keyValueArrayGet(keyValueArray, key) { - const index = keyValueArrayIndexOf(keyValueArray, key); - if (index >= 0) { - // if we found it retrieve it. - return keyValueArray[index | 1]; - } - return undefined; -} -/** - * Retrieve a `key` index value in the array or `-1` if not found. - * - * @param keyValueArray to search. - * @param key The key to locate. - * @returns index of where the key is (or should have been.) - * - positive (even) index if key found. - * - negative index if key not found. (`~index` (even) to get the index where it should have - * been inserted.) - */ -function keyValueArrayIndexOf(keyValueArray, key) { - return _arrayIndexOfSorted(keyValueArray, key, 1); -} -/** - * Delete a `key` (and `value`) from the `KeyValueArray`. - * - * @param keyValueArray to modify. - * @param key The key to locate or delete (if exist). - * @returns index of where the key was (or should have been.) - * - positive (even) index if key found and deleted. - * - negative index if key not found. (`~index` (even) to get the index where it should have - * been.) - */ -function keyValueArrayDelete(keyValueArray, key) { - const index = keyValueArrayIndexOf(keyValueArray, key); - if (index >= 0) { - // if we found it remove it. - arraySplice(keyValueArray, index, 2); - } - return index; -} -/** - * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`. - * - * NOTE: - * - This uses binary search algorithm for fast removals. - * - * @param array A sorted array to binary search. - * @param value The value to look for. - * @param shift grouping shift. - * - `0` means look at every location - * - `1` means only look at every other (even) location (the odd locations are to be ignored as - * they are values.) - * @returns index of the value. - * - positive index if value found. - * - negative index if value not found. (`~index` to get the value where it should have been - * inserted) - */ -function _arrayIndexOfSorted(array, value, shift) { - ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array'); - let start = 0; - let end = array.length >> shift; - while (end !== start) { - const middle = start + ((end - start) >> 1); // find the middle. - const current = array[middle << shift]; - if (value === current) { - return (middle << shift); - } - else if (current > value) { - end = middle; - } - else { - start = middle + 1; // We already searched middle so make it non-inclusive by adding 1 - } - } - return ~(end << shift); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/* - * ######################### - * Attention: These Regular expressions have to hold even if the code is minified! - * ########################## - */ -/** - * Regular expression that detects pass-through constructors for ES5 output. This Regex - * intends to capture the common delegation pattern emitted by TypeScript and Babel. Also - * it intends to capture the pattern where existing constructors have been downleveled from - * ES2015 to ES5 using TypeScript w/ downlevel iteration. e.g. - * - * ``` - * function MyClass() { - * var _this = _super.apply(this, arguments) || this; - * ``` - * - * ``` - * function MyClass() { - * var _this = _super.apply(this, __spread(arguments)) || this; - * ``` - * - * More details can be found in: https://github.com/angular/angular/issues/38453. - */ -const ES5_DELEGATE_CTOR = /^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*(arguments|[^()]+\(arguments\))\)/; -/** Regular expression that detects ES2015 classes which extend from other classes. */ -const ES2015_INHERITED_CLASS = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/; -/** - * Regular expression that detects ES2015 classes which extend from other classes and - * have an explicit constructor defined. - */ -const ES2015_INHERITED_CLASS_WITH_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/; -/** - * Regular expression that detects ES2015 classes which extend from other classes - * and inherit a constructor. - */ -const ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{\s*super\(\.\.\.arguments\)/; -/** - * Determine whether a stringified type is a class which delegates its constructor - * to its parent. - * - * This is not trivial since compiled code can actually contain a constructor function - * even if the original source code did not. For instance, when the child class contains - * an initialized instance property. - */ -function isDelegateCtor(typeStr) { - return ES5_DELEGATE_CTOR.test(typeStr) || - ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) || - (ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr)); -} -class ReflectionCapabilities { - constructor(reflect) { - this._reflect = reflect || _global['Reflect']; - } - isReflectionEnabled() { - return true; - } - factory(t) { - return (...args) => new t(...args); - } - /** @internal */ - _zipTypesAndAnnotations(paramTypes, paramAnnotations) { - let result; - if (typeof paramTypes === 'undefined') { - result = newArray(paramAnnotations.length); - } - else { - result = newArray(paramTypes.length); - } - for (let i = 0; i < result.length; i++) { - // TS outputs Object for parameters without types, while Traceur omits - // the annotations. For now we preserve the Traceur behavior to aid - // migration, but this can be revisited. - if (typeof paramTypes === 'undefined') { - result[i] = []; - } - else if (paramTypes[i] && paramTypes[i] != Object) { - result[i] = [paramTypes[i]]; - } - else { - result[i] = []; - } - if (paramAnnotations && paramAnnotations[i] != null) { - result[i] = result[i].concat(paramAnnotations[i]); - } - } - return result; - } - _ownParameters(type, parentCtor) { - const typeStr = type.toString(); - // If we have no decorators, we only have function.length as metadata. - // In that case, to detect whether a child class declared an own constructor or not, - // we need to look inside of that constructor to check whether it is - // just calling the parent. - // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439 - // that sets 'design:paramtypes' to [] - // if a class inherits from another class but has no ctor declared itself. - if (isDelegateCtor(typeStr)) { - return null; - } - // Prefer the direct API. - if (type.parameters && type.parameters !== parentCtor.parameters) { - return type.parameters; - } - // API of tsickle for lowering decorators to properties on the class. - const tsickleCtorParams = type.ctorParameters; - if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) { - // Newer tsickle uses a function closure - // Retain the non-function case for compatibility with older tsickle - const ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams; - const paramTypes = ctorParameters.map((ctorParam) => ctorParam && ctorParam.type); - const paramAnnotations = ctorParameters.map((ctorParam) => ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators)); - return this._zipTypesAndAnnotations(paramTypes, paramAnnotations); - } - // API for metadata created by invoking the decorators. - const paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS]; - const paramTypes = this._reflect && this._reflect.getOwnMetadata && - this._reflect.getOwnMetadata('design:paramtypes', type); - if (paramTypes || paramAnnotations) { - return this._zipTypesAndAnnotations(paramTypes, paramAnnotations); - } - // If a class has no decorators, at least create metadata - // based on function.length. - // Note: We know that this is a real constructor as we checked - // the content of the constructor above. - return newArray(type.length); - } - parameters(type) { - // Note: only report metadata if we have at least one class decorator - // to stay in sync with the static reflector. - if (!isType(type)) { - return []; - } - const parentCtor = getParentCtor(type); - let parameters = this._ownParameters(type, parentCtor); - if (!parameters && parentCtor !== Object) { - parameters = this.parameters(parentCtor); - } - return parameters || []; - } - _ownAnnotations(typeOrFunc, parentCtor) { - // Prefer the direct API. - if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) { - let annotations = typeOrFunc.annotations; - if (typeof annotations === 'function' && annotations.annotations) { - annotations = annotations.annotations; - } - return annotations; - } - // API of tsickle for lowering decorators to properties on the class. - if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) { - return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators); - } - // API for metadata created by invoking the decorators. - if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) { - return typeOrFunc[ANNOTATIONS]; - } - return null; - } - annotations(typeOrFunc) { - if (!isType(typeOrFunc)) { - return []; - } - const parentCtor = getParentCtor(typeOrFunc); - const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || []; - const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : []; - return parentAnnotations.concat(ownAnnotations); - } - _ownPropMetadata(typeOrFunc, parentCtor) { - // Prefer the direct API. - if (typeOrFunc.propMetadata && - typeOrFunc.propMetadata !== parentCtor.propMetadata) { - let propMetadata = typeOrFunc.propMetadata; - if (typeof propMetadata === 'function' && propMetadata.propMetadata) { - propMetadata = propMetadata.propMetadata; - } - return propMetadata; - } - // API of tsickle for lowering decorators to properties on the class. - if (typeOrFunc.propDecorators && - typeOrFunc.propDecorators !== parentCtor.propDecorators) { - const propDecorators = typeOrFunc.propDecorators; - const propMetadata = {}; - Object.keys(propDecorators).forEach(prop => { - propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]); - }); - return propMetadata; - } - // API for metadata created by invoking the decorators. - if (typeOrFunc.hasOwnProperty(PROP_METADATA)) { - return typeOrFunc[PROP_METADATA]; - } - return null; - } - propMetadata(typeOrFunc) { - if (!isType(typeOrFunc)) { - return {}; - } - const parentCtor = getParentCtor(typeOrFunc); - const propMetadata = {}; - if (parentCtor !== Object) { - const parentPropMetadata = this.propMetadata(parentCtor); - Object.keys(parentPropMetadata).forEach((propName) => { - propMetadata[propName] = parentPropMetadata[propName]; - }); - } - const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor); - if (ownPropMetadata) { - Object.keys(ownPropMetadata).forEach((propName) => { - const decorators = []; - if (propMetadata.hasOwnProperty(propName)) { - decorators.push(...propMetadata[propName]); - } - decorators.push(...ownPropMetadata[propName]); - propMetadata[propName] = decorators; - }); - } - return propMetadata; - } - ownPropMetadata(typeOrFunc) { - if (!isType(typeOrFunc)) { - return {}; - } - return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {}; - } - hasLifecycleHook(type, lcProperty) { - return type instanceof Type && lcProperty in type.prototype; - } - guards(type) { - return {}; - } - getter(name) { - return new Function('o', 'return o.' + name + ';'); - } - setter(name) { - return new Function('o', 'v', 'return o.' + name + ' = v;'); - } - method(name) { - const functionBody = `if (!o.${name}) throw new Error('"${name}" is undefined'); - return o.${name}.apply(o, args);`; - return new Function('o', 'args', functionBody); - } - // There is not a concept of import uri in Js, but this is useful in developing Dart applications. - importUri(type) { - // StaticSymbol - if (typeof type === 'object' && type['filePath']) { - return type['filePath']; - } - // Runtime type - return `./${stringify(type)}`; - } - resourceUri(type) { - return `./${stringify(type)}`; - } - resolveIdentifier(name, moduleUrl, members, runtime) { - return runtime; - } - resolveEnum(enumIdentifier, name) { - return enumIdentifier[name]; - } -} -function convertTsickleDecoratorIntoMetadata(decoratorInvocations) { - if (!decoratorInvocations) { - return []; - } - return decoratorInvocations.map(decoratorInvocation => { - const decoratorType = decoratorInvocation.type; - const annotationCls = decoratorType.annotationCls; - const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : []; - return new annotationCls(...annotationArgs); - }); -} -function getParentCtor(ctor) { - const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null; - const parentCtor = parentProto ? parentProto.constructor : null; - // Note: We always use `Object` as the null value - // to simplify checking later on. - return parentCtor || Object; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -const _THROW_IF_NOT_FOUND = {}; -const THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND; -/* - * Name of a property (that we patch onto DI decorator), which is used as an annotation of which - * InjectFlag this decorator represents. This allows to avoid direct references to the DI decorators - * in the code, thus making them tree-shakable. - */ -const DI_DECORATOR_FLAG = '__NG_DI_FLAG__'; -const NG_TEMP_TOKEN_PATH = 'ngTempTokenPath'; -const NG_TOKEN_PATH = 'ngTokenPath'; -const NEW_LINE = /\n/gm; -const NO_NEW_LINE = 'ɵ'; -const SOURCE = '__source'; -const ɵ0$2 = getClosureSafeProperty; -const USE_VALUE = getClosureSafeProperty({ provide: String, useValue: ɵ0$2 }); -/** - * Current injector value used by `inject`. - * - `undefined`: it is an error to call `inject` - * - `null`: `inject` can be called but there is no injector (limp-mode). - * - Injector instance: Use the injector for resolution. - */ -let _currentInjector = undefined; -function setCurrentInjector(injector) { - const former = _currentInjector; - _currentInjector = injector; - return former; -} -function injectInjectorOnly(token, flags = InjectFlags.Default) { - if (_currentInjector === undefined) { - throw new Error(`inject() must be called from an injection context`); - } - else if (_currentInjector === null) { - return injectRootLimpMode(token, undefined, flags); - } - else { - return _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags); - } -} -function ɵɵinject(token, flags = InjectFlags.Default) { - return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token), flags); -} -/** - * Throws an error indicating that a factory function could not be generated by the compiler for a - * particular class. - * - * This instruction allows the actual error message to be optimized away when ngDevMode is turned - * off, saving bytes of generated code while still providing a good experience in dev mode. - * - * The name of the class is not mentioned here, but will be in the generated factory function name - * and thus in the stack trace. - * - * @codeGenApi - */ -function ɵɵinvalidFactoryDep(index) { - const msg = ngDevMode ? - `This constructor is not compatible with Angular Dependency Injection because its dependency at index ${index} of the parameter list is invalid. -This can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator. - -Please check that 1) the type for the parameter at index ${index} is correct and 2) the correct Angular decorators are defined for this class and its ancestors.` : - 'invalid'; - throw new Error(msg); -} -/** - * Injects a token from the currently active injector. - * - * Must be used in the context of a factory function such as one defined for an - * `InjectionToken`. Throws an error if not called from such a context. - * - * Within such a factory function, using this function to request injection of a dependency - * is faster and more type-safe than providing an additional array of dependencies - * (as has been common with `useFactory` providers). - * - * @param token The injection token for the dependency to be injected. - * @param flags Optional flags that control how injection is executed. - * The flags correspond to injection strategies that can be specified with - * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`. - * @returns the injected value if injection is successful, `null` otherwise. - * - * @usageNotes - * - * ### Example - * - * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'} - * - * @publicApi - */ -const inject = ɵɵinject; -function injectArgs(types) { - const args = []; - for (let i = 0; i < types.length; i++) { - const arg = resolveForwardRef(types[i]); - if (Array.isArray(arg)) { - if (arg.length === 0) { - throw new Error('Arguments array must have arguments.'); - } - let type = undefined; - let flags = InjectFlags.Default; - for (let j = 0; j < arg.length; j++) { - const meta = arg[j]; - const flag = getInjectFlag(meta); - if (typeof flag === 'number') { - // Special case when we handle @Inject decorator. - if (flag === -1 /* Inject */) { - type = meta.token; - } - else { - flags |= flag; - } - } - else { - type = meta; - } - } - args.push(ɵɵinject(type, flags)); - } - else { - args.push(ɵɵinject(arg)); - } - } - return args; -} -/** - * Attaches a given InjectFlag to a given decorator using monkey-patching. - * Since DI decorators can be used in providers `deps` array (when provider is configured using - * `useFactory`) without initialization (e.g. `Host`) and as an instance (e.g. `new Host()`), we - * attach the flag to make it available both as a static property and as a field on decorator - * instance. - * - * @param decorator Provided DI decorator. - * @param flag InjectFlag that should be applied. - */ -function attachInjectFlag(decorator, flag) { - decorator[DI_DECORATOR_FLAG] = flag; - decorator.prototype[DI_DECORATOR_FLAG] = flag; - return decorator; -} -/** - * Reads monkey-patched property that contains InjectFlag attached to a decorator. - * - * @param token Token that may contain monkey-patched DI flags property. - */ -function getInjectFlag(token) { - return token[DI_DECORATOR_FLAG]; -} -function catchInjectorError(e, token, injectorErrorName, source) { - const tokenPath = e[NG_TEMP_TOKEN_PATH]; - if (token[SOURCE]) { - tokenPath.unshift(token[SOURCE]); - } - e.message = formatError('\n' + e.message, tokenPath, injectorErrorName, source); - e[NG_TOKEN_PATH] = tokenPath; - e[NG_TEMP_TOKEN_PATH] = null; - throw e; -} -function formatError(text, obj, injectorErrorName, source = null) { - text = text && text.charAt(0) === '\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text; - let context = stringify(obj); - if (Array.isArray(obj)) { - context = obj.map(stringify).join(' -> '); - } - else if (typeof obj === 'object') { - let parts = []; - for (let key in obj) { - if (obj.hasOwnProperty(key)) { - let value = obj[key]; - parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value))); - } - } - context = `{${parts.join(', ')}}`; - } - return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${text.replace(NEW_LINE, '\n ')}`; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -const ɵ0$3 = (token) => ({ token }); -/** - * Inject decorator and metadata. - * - * @Annotation - * @publicApi - */ -const Inject = attachInjectFlag( -// Disable tslint because `DecoratorFlags` is a const enum which gets inlined. -// tslint:disable-next-line: no-toplevel-property-access -makeParamDecorator('Inject', ɵ0$3), -1 /* Inject */); -/** - * Optional decorator and metadata. - * - * @Annotation - * @publicApi - */ -const Optional = -// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined. -// tslint:disable-next-line: no-toplevel-property-access -attachInjectFlag(makeParamDecorator('Optional'), 8 /* Optional */); -/** - * Self decorator and metadata. - * - * @Annotation - * @publicApi - */ -const Self = -// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined. -// tslint:disable-next-line: no-toplevel-property-access -attachInjectFlag(makeParamDecorator('Self'), 2 /* Self */); -/** - * `SkipSelf` decorator and metadata. - * - * @Annotation - * @publicApi - */ -const SkipSelf = -// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined. -// tslint:disable-next-line: no-toplevel-property-access -attachInjectFlag(makeParamDecorator('SkipSelf'), 4 /* SkipSelf */); -/** - * Host decorator and metadata. - * - * @Annotation - * @publicApi - */ -const Host = -// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined. -// tslint:disable-next-line: no-toplevel-property-access -attachInjectFlag(makeParamDecorator('Host'), 1 /* Host */); - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -let _reflect = null; -function getReflect() { - return (_reflect = _reflect || new ReflectionCapabilities()); -} -function reflectDependencies(type) { - return convertDependencies(getReflect().parameters(type)); -} -function convertDependencies(deps) { - const compiler = getCompilerFacade(); - return deps.map(dep => reflectDependency(compiler, dep)); -} -function reflectDependency(compiler, dep) { - const meta = { - token: null, - host: false, - optional: false, - resolved: compiler.R3ResolvedDependencyType.Token, - self: false, - skipSelf: false, - }; - function setTokenAndResolvedType(token) { - meta.resolved = compiler.R3ResolvedDependencyType.Token; - meta.token = token; - } - if (Array.isArray(dep) && dep.length > 0) { - for (let j = 0; j < dep.length; j++) { - const param = dep[j]; - if (param === undefined) { - // param may be undefined if type of dep is not set by ngtsc - continue; - } - const proto = Object.getPrototypeOf(param); - if (param instanceof Optional || proto.ngMetadataName === 'Optional') { - meta.optional = true; - } - else if (param instanceof SkipSelf || proto.ngMetadataName === 'SkipSelf') { - meta.skipSelf = true; - } - else if (param instanceof Self || proto.ngMetadataName === 'Self') { - meta.self = true; - } - else if (param instanceof Host || proto.ngMetadataName === 'Host') { - meta.host = true; - } - else if (param instanceof Inject) { - meta.token = param.token; - } - else if (param instanceof Attribute) { - if (param.attributeName === undefined) { - throw new Error(`Attribute name must be defined.`); - } - meta.token = param.attributeName; - meta.resolved = compiler.R3ResolvedDependencyType.Attribute; - } - else if (param.__ChangeDetectorRef__ === true) { - meta.token = param; - meta.resolved = compiler.R3ResolvedDependencyType.ChangeDetectorRef; - } - else { - setTokenAndResolvedType(param); - } - } - } - else if (dep === undefined || (Array.isArray(dep) && dep.length === 0)) { - meta.token = undefined; - meta.resolved = R3ResolvedDependencyType.Invalid; - } - else { - setTokenAndResolvedType(dep); - } - return meta; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * Used to resolve resource URLs on `@Component` when used with JIT compilation. - * - * Example: - * ``` - * @Component({ - * selector: 'my-comp', - * templateUrl: 'my-comp.html', // This requires asynchronous resolution - * }) - * class MyComponent{ - * } - * - * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process - * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously. - * - * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into - * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner. - * - * // Use browser's `fetch()` function as the default resource resolution strategy. - * resolveComponentResources(fetch).then(() => { - * // After resolution all URLs have been converted into `template` strings. - * renderComponent(MyComponent); - * }); - * - * ``` - * - * NOTE: In AOT the resolution happens during compilation, and so there should be no need - * to call this method outside JIT mode. - * - * @param resourceResolver a function which is responsible for returning a `Promise` to the - * contents of the resolved URL. Browser's `fetch()` method is a good default implementation. - */ -function resolveComponentResources(resourceResolver) { - // Store all promises which are fetching the resources. - const componentResolved = []; - // Cache so that we don't fetch the same resource more than once. - const urlMap = new Map(); - function cachedResourceResolve(url) { - let promise = urlMap.get(url); - if (!promise) { - const resp = resourceResolver(url); - urlMap.set(url, promise = resp.then(unwrapResponse)); - } - return promise; - } - componentResourceResolutionQueue.forEach((component, type) => { - const promises = []; - if (component.templateUrl) { - promises.push(cachedResourceResolve(component.templateUrl).then((template) => { - component.template = template; - })); - } - const styleUrls = component.styleUrls; - const styles = component.styles || (component.styles = []); - const styleOffset = component.styles.length; - styleUrls && styleUrls.forEach((styleUrl, index) => { - styles.push(''); // pre-allocate array. - promises.push(cachedResourceResolve(styleUrl).then((style) => { - styles[styleOffset + index] = style; - styleUrls.splice(styleUrls.indexOf(styleUrl), 1); - if (styleUrls.length == 0) { - component.styleUrls = undefined; - } - })); - }); - const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type)); - componentResolved.push(fullyResolved); - }); - clearResolutionOfComponentResourcesQueue(); - return Promise.all(componentResolved).then(() => undefined); -} -let componentResourceResolutionQueue = new Map(); -// Track when existing ɵcmp for a Type is waiting on resources. -const componentDefPendingResolution = new Set(); -function maybeQueueResolutionOfComponentResources(type, metadata) { - if (componentNeedsResolution(metadata)) { - componentResourceResolutionQueue.set(type, metadata); - componentDefPendingResolution.add(type); - } -} -function isComponentDefPendingResolution(type) { - return componentDefPendingResolution.has(type); -} -function componentNeedsResolution(component) { - return !!((component.templateUrl && !component.hasOwnProperty('template')) || - component.styleUrls && component.styleUrls.length); -} -function clearResolutionOfComponentResourcesQueue() { - const old = componentResourceResolutionQueue; - componentResourceResolutionQueue = new Map(); - return old; -} -function restoreComponentResolutionQueue(queue) { - componentDefPendingResolution.clear(); - queue.forEach((_, type) => componentDefPendingResolution.add(type)); - componentResourceResolutionQueue = queue; -} -function isComponentResourceResolutionQueueEmpty() { - return componentResourceResolutionQueue.size === 0; -} -function unwrapResponse(response) { - return typeof response == 'string' ? response : response.text(); -} -function componentDefResolved(type) { - componentDefPendingResolution.delete(type); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * The Trusted Types policy, or null if Trusted Types are not - * enabled/supported, or undefined if the policy has not been created yet. - */ -let policy; -/** - * Returns the Trusted Types policy, or null if Trusted Types are not - * enabled/supported. The first call to this function will create the policy. - */ -function getPolicy() { - if (policy === undefined) { - policy = null; - if (_global.trustedTypes) { - try { - policy = _global.trustedTypes.createPolicy('angular', { - createHTML: (s) => s, - createScript: (s) => s, - createScriptURL: (s) => s, - }); - } - catch (_a) { - // trustedTypes.createPolicy throws if called with a name that is - // already registered, even in report-only mode. Until the API changes, - // catch the error not to break the applications functionally. In such - // cases, the code will fall back to using strings. - } - } - } - return policy; -} -/** - * Unsafely promote a string to a TrustedHTML, falling back to strings when - * Trusted Types are not available. - * @security This is a security-sensitive function; any use of this function - * must go through security review. In particular, it must be assured that the - * provided string will never cause an XSS vulnerability if used in a context - * that will be interpreted as HTML by a browser, e.g. when assigning to - * element.innerHTML. - */ -function trustedHTMLFromString(html) { - var _a; - return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createHTML(html)) || html; -} -/** - * Unsafely promote a string to a TrustedScript, falling back to strings when - * Trusted Types are not available. - * @security In particular, it must be assured that the provided string will - * never cause an XSS vulnerability if used in a context that will be - * interpreted and executed as a script by a browser, e.g. when calling eval. - */ -function trustedScriptFromString(script) { - var _a; - return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createScript(script)) || script; -} -/** - * Unsafely promote a string to a TrustedScriptURL, falling back to strings - * when Trusted Types are not available. - * @security This is a security-sensitive function; any use of this function - * must go through security review. In particular, it must be assured that the - * provided string will never cause an XSS vulnerability if used in a context - * that will cause a browser to load and execute a resource, e.g. when - * assigning to script.src. - */ -function trustedScriptURLFromString(url) { - var _a; - return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createScriptURL(url)) || url; -} -/** - * Unsafely call the Function constructor with the given string arguments. It - * is only available in development mode, and should be stripped out of - * production code. - * @security This is a security-sensitive function; any use of this function - * must go through security review. In particular, it must be assured that it - * is only called from development code, as use in production code can lead to - * XSS vulnerabilities. - */ -function newTrustedFunctionForDev(...args) { - if (typeof ngDevMode === 'undefined') { - throw new Error('newTrustedFunctionForDev should never be called in production'); - } - if (!_global.trustedTypes) { - // In environments that don't support Trusted Types, fall back to the most - // straightforward implementation: - return new Function(...args); - } - // Chrome currently does not support passing TrustedScript to the Function - // constructor. The following implements the workaround proposed on the page - // below, where the Chromium bug is also referenced: - // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor - const fnArgs = args.slice(0, -1).join(','); - const fnBody = args[args.length - 1]; - const body = `(function anonymous(${fnArgs} -) { ${fnBody} -})`; - // Using eval directly confuses the compiler and prevents this module from - // being stripped out of JS binaries even if not used. The global['eval'] - // indirection fixes that. - const fn = _global['eval'](trustedScriptFromString(body)); - if (fn.bind === undefined) { - // Workaround for a browser bug that only exists in Chrome 83, where passing - // a TrustedScript to eval just returns the TrustedScript back without - // evaluating it. In that case, fall back to the most straightforward - // implementation: - return new Function(...args); - } - // To completely mimic the behavior of calling "new Function", two more - // things need to happen: - // 1. Stringifying the resulting function should return its source code - fn.toString = () => body; - // 2. When calling the resulting function, `this` should refer to `global` - return fn.bind(_global); - // When Trusted Types support in Function constructors is widely available, - // the implementation of this function can be simplified to: - // return new Function(...args.map(a => trustedScriptFromString(a))); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * The Trusted Types policy, or null if Trusted Types are not - * enabled/supported, or undefined if the policy has not been created yet. - */ -let policy$1; -/** - * Returns the Trusted Types policy, or null if Trusted Types are not - * enabled/supported. The first call to this function will create the policy. - */ -function getPolicy$1() { - if (policy$1 === undefined) { - policy$1 = null; - if (_global.trustedTypes) { - try { - policy$1 = _global.trustedTypes - .createPolicy('angular#unsafe-bypass', { - createHTML: (s) => s, - createScript: (s) => s, - createScriptURL: (s) => s, - }); - } - catch (_a) { - // trustedTypes.createPolicy throws if called with a name that is - // already registered, even in report-only mode. Until the API changes, - // catch the error not to break the applications functionally. In such - // cases, the code will fall back to using strings. - } - } - } - return policy$1; -} -/** - * Unsafely promote a string to a TrustedHTML, falling back to strings when - * Trusted Types are not available. - * @security This is a security-sensitive function; any use of this function - * must go through security review. In particular, it must be assured that it - * is only passed strings that come directly from custom sanitizers or the - * bypassSecurityTrust* functions. - */ -function trustedHTMLFromStringBypass(html) { - var _a; - return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.createHTML(html)) || html; -} -/** - * Unsafely promote a string to a TrustedScript, falling back to strings when - * Trusted Types are not available. - * @security This is a security-sensitive function; any use of this function - * must go through security review. In particular, it must be assured that it - * is only passed strings that come directly from custom sanitizers or the - * bypassSecurityTrust* functions. - */ -function trustedScriptFromStringBypass(script) { - var _a; - return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.createScript(script)) || script; -} -/** - * Unsafely promote a string to a TrustedScriptURL, falling back to strings - * when Trusted Types are not available. - * @security This is a security-sensitive function; any use of this function - * must go through security review. In particular, it must be assured that it - * is only passed strings that come directly from custom sanitizers or the - * bypassSecurityTrust* functions. - */ -function trustedScriptURLFromStringBypass(url) { - var _a; - return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.createScriptURL(url)) || url; -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -class SafeValueImpl { - constructor(changingThisBreaksApplicationSecurity) { - this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity; - } - toString() { - return `SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity}` + - ` (see https://g.co/ng/security#xss)`; - } -} -class SafeHtmlImpl extends SafeValueImpl { - getTypeName() { - return "HTML" /* Html */; - } -} -class SafeStyleImpl extends SafeValueImpl { - getTypeName() { - return "Style" /* Style */; - } -} -class SafeScriptImpl extends SafeValueImpl { - getTypeName() { - return "Script" /* Script */; - } -} -class SafeUrlImpl extends SafeValueImpl { - getTypeName() { - return "URL" /* Url */; - } -} -class SafeResourceUrlImpl extends SafeValueImpl { - getTypeName() { - return "ResourceURL" /* ResourceUrl */; - } -} -function unwrapSafeValue(value) { - return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity : - value; -} -function allowSanitizationBypassAndThrow(value, type) { - const actualType = getSanitizationBypassType(value); - if (actualType != null && actualType !== type) { - // Allow ResourceURLs in URL contexts, they are strictly more trusted. - if (actualType === "ResourceURL" /* ResourceUrl */ && type === "URL" /* Url */) - return true; - throw new Error(`Required a safe ${type}, got a ${actualType} (see https://g.co/ng/security#xss)`); - } - return actualType === type; -} -function getSanitizationBypassType(value) { - return value instanceof SafeValueImpl && value.getTypeName() || null; -} -/** - * Mark `html` string as trusted. - * - * This function wraps the trusted string in `String` and brands it in a way which makes it - * recognizable to {@link htmlSanitizer} to be trusted implicitly. - * - * @param trustedHtml `html` string which needs to be implicitly trusted. - * @returns a `html` which has been branded to be implicitly trusted. - */ -function bypassSanitizationTrustHtml(trustedHtml) { - return new SafeHtmlImpl(trustedHtml); -} -/** - * Mark `style` string as trusted. - * - * This function wraps the trusted string in `String` and brands it in a way which makes it - * recognizable to {@link styleSanitizer} to be trusted implicitly. - * - * @param trustedStyle `style` string which needs to be implicitly trusted. - * @returns a `style` hich has been branded to be implicitly trusted. - */ -function bypassSanitizationTrustStyle(trustedStyle) { - return new SafeStyleImpl(trustedStyle); -} -/** - * Mark `script` string as trusted. - * - * This function wraps the trusted string in `String` and brands it in a way which makes it - * recognizable to {@link scriptSanitizer} to be trusted implicitly. - * - * @param trustedScript `script` string which needs to be implicitly trusted. - * @returns a `script` which has been branded to be implicitly trusted. - */ -function bypassSanitizationTrustScript(trustedScript) { - return new SafeScriptImpl(trustedScript); -} -/** - * Mark `url` string as trusted. - * - * This function wraps the trusted string in `String` and brands it in a way which makes it - * recognizable to {@link urlSanitizer} to be trusted implicitly. - * - * @param trustedUrl `url` string which needs to be implicitly trusted. - * @returns a `url` which has been branded to be implicitly trusted. - */ -function bypassSanitizationTrustUrl(trustedUrl) { - return new SafeUrlImpl(trustedUrl); -} -/** - * Mark `url` string as trusted. - * - * This function wraps the trusted string in `String` and brands it in a way which makes it - * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly. - * - * @param trustedResourceUrl `url` string which needs to be implicitly trusted. - * @returns a `url` which has been branded to be implicitly trusted. - */ -function bypassSanitizationTrustResourceUrl(trustedResourceUrl) { - return new SafeResourceUrlImpl(trustedResourceUrl); -} - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * This helper is used to get hold of an inert tree of DOM elements containing dirty HTML - * that needs sanitizing. - * Depending upon browser support we use one of two strategies for doing this. - * Default: DOMParser strategy - * Fallback: InertDocument strategy - */ -function getInertBodyHelper(defaultDoc) { - const inertDocumentHelper = new InertDocumentHelper(defaultDoc); - return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper; -} -/** - * Uses DOMParser to create and fill an inert body element. - * This is the default strategy used in browsers that support it. - */ -class DOMParserHelper { - constructor(inertDocumentHelper) { - this.inertDocumentHelper = inertDocumentHelper; - } - getInertBodyElement(html) { - // We add these extra elements to ensure that the rest of the content is parsed as expected - // e.g. leading whitespace is maintained and tags like `` do not get hoisted to the - // `` tag. Note that the `` tag is closed implicitly to prevent unclosed tags - // in `html` from consuming the otherwise explicit `` tag. - html = '' + html; - try { - const body = new window.DOMParser() - .parseFromString(trustedHTMLFromString(html), 'text/html') - .body; - if (body === null) { - // In some browsers (e.g. Mozilla/5.0 iPad AppleWebKit Mobile) the `body` property only - // becomes available in the following tick of the JS engine. In that case we fall back to - // the `inertDocumentHelper` instead. - return this.inertDocumentHelper.getInertBodyElement(html); - } - body.removeChild(body.firstChild); - return body; - } - catch (_a) { - return null; - } - } -} -/** - * Use an HTML5 `template` element, if supported, or an inert body element created via - * `createHtmlDocument` to create and fill an inert DOM element. - * This is the fallback strategy if the browser does not support DOMParser. - */ -class InertDocumentHelper { - constructor(defaultDoc) { - this.defaultDoc = defaultDoc; - this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert'); - if (this.inertDocument.body == null) { - // usually there should be only one body element in the document, but IE doesn't have any, so - // we need to create one. - const inertHtml = this.inertDocument.createElement('html'); - this.inertDocument.appendChild(inertHtml); - const inertBodyElement = this.inertDocument.createElement('body'); - inertHtml.appendChild(inertBodyElement); - } - } - getInertBodyElement(html) { - // Prefer using \n\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VideoDecode.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VideoDecode.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./VideoDecode.vue?vue&type=template&id=8b557856&scoped=true&\"\nimport script from \"./VideoDecode.vue?vue&type=script&lang=js&\"\nexport * from \"./VideoDecode.vue?vue&type=script&lang=js&\"\nimport style0 from \"./VideoDecode.vue?vue&type=style&index=0&id=8b557856&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"8b557856\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"ImgDecode\"},[_c('input',{attrs:{\"type\":\"file\"},on:{\"change\":_vm.decodeImg}})])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ImgDecode.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ImgDecode.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ImgDecode.vue?vue&type=template&id=df6c176e&scoped=true&\"\nimport script from \"./ImgDecode.vue?vue&type=script&lang=js&\"\nexport * from \"./ImgDecode.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ImgDecode.vue?vue&type=style&index=0&id=df6c176e&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"df6c176e\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HelloWorld.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HelloWorld.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./HelloWorld.vue?vue&type=template&id=38f0fc4a&scoped=true&\"\nimport script from \"./HelloWorld.vue?vue&type=script&lang=js&\"\nexport * from \"./HelloWorld.vue?vue&type=script&lang=js&\"\nimport style0 from \"./HelloWorld.vue?vue&type=style&index=0&id=38f0fc4a&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"38f0fc4a\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--13-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--13-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=0ada8cba&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\nimport App from './App.vue'\n\nVue.config.productionTip = false\n\nnew Vue({\n render: h => h(App),\n}).$mount('#app')\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HelloWorld.vue?vue&type=style&index=0&id=38f0fc4a&scoped=true&lang=css&\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VideoDecode.vue?vue&type=style&index=0&id=8b557856&scoped=true&lang=css&\"","module.exports = __webpack_public_path__ + \"img/logo.82b9c7a5.png\";"],"sourceRoot":""} \ No newline at end of file diff --git a/1.hello-world/5.read-video-vue/dist/js/chunk-vendors.f790adb7.js b/1.hello-world/5.read-video-vue/dist/js/chunk-vendors.f790adb7.js deleted file mode 100644 index dc14a73a..00000000 --- a/1.hello-world/5.read-video-vue/dist/js/chunk-vendors.f790adb7.js +++ /dev/null @@ -1,29 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"00b4":function(e,t,n){"use strict";n("ac1f");var r=n("23e7"),i=n("da84"),o=n("c65b"),a=n("e330"),s=n("1626"),c=n("861d"),l=function(){var e=!1,t=/[ac]/;return t.exec=function(){return e=!0,/./.exec.apply(this,arguments)},!0===t.test("abc")&&e}(),d=i.Error,u=a(/./.test);r({target:"RegExp",proto:!0,forced:!l},{test:function(e){var t=this.exec;if(!s(t))return u(this,e);var n=o(t,this,e);if(null!==n&&!c(n))throw new d("RegExp exec method returned something other than an Object or null");return!!n}})},"00ee":function(e,t,n){var r=n("b622"),i=r("toStringTag"),o={};o[i]="z",e.exports="[object z]"===String(o)},"01b4":function(e,t){var n=function(){this.head=null,this.tail=null};n.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},e.exports=n},"0366":function(e,t,n){var r=n("e330"),i=n("59ed"),o=n("40d5"),a=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},"057f":function(e,t,n){var r=n("c6b6"),i=n("fc6a"),o=n("241c").f,a=n("4dae"),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(e){try{return o(e)}catch(t){return a(s)}};e.exports.f=function(e){return s&&"Window"==r(e)?c(e):o(i(e))}},"06cf":function(e,t,n){var r=n("83ab"),i=n("c65b"),o=n("d1e7"),a=n("5c6c"),s=n("fc6a"),c=n("a04b"),l=n("1a2d"),d=n("0cfb"),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=s(e),t=c(t),d)try{return u(e,t)}catch(n){}if(l(e,t))return a(!i(o.f,e,t),e[t])}},"07fa":function(e,t,n){var r=n("50c4");e.exports=function(e){return r(e.length)}},"0b42":function(e,t,n){var r=n("da84"),i=n("e8b5"),o=n("68ee"),a=n("861d"),s=n("b622"),c=s("species"),l=r.Array;e.exports=function(e){var t;return i(e)&&(t=e.constructor,o(t)&&(t===l||i(t.prototype))?t=void 0:a(t)&&(t=t[c],null===t&&(t=void 0))),void 0===t?l:t}},"0cfb":function(e,t,n){var r=n("83ab"),i=n("d039"),o=n("cc12");e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},"0d51":function(e,t,n){var r=n("da84"),i=r.String;e.exports=function(e){try{return i(e)}catch(t){return"Object"}}},"107c":function(e,t,n){var r=n("d039"),i=n("da84"),o=i.RegExp;e.exports=r((function(){var e=o("(?b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")}))},1626:function(e,t){e.exports=function(e){return"function"==typeof e}},"19aa":function(e,t,n){var r=n("da84"),i=n("3a9b"),o=r.TypeError;e.exports=function(e,t){if(i(t,e))return e;throw o("Incorrect invocation")}},"1a2d":function(e,t,n){var r=n("e330"),i=n("7b0b"),o=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(i(e),t)}},"1be4":function(e,t,n){var r=n("d066");e.exports=r("document","documentElement")},"1c7e":function(e,t,n){var r=n("b622"),i=r("iterator"),o=!1;try{var a=0,s={next:function(){return{done:!!a++}},return:function(){o=!0}};s[i]=function(){return this},Array.from(s,(function(){throw 2}))}catch(c){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var r={};r[i]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(c){}return n}},"1cdc":function(e,t,n){var r=n("342f");e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},"1d80":function(e,t,n){var r=n("da84"),i=r.TypeError;e.exports=function(e){if(void 0==e)throw i("Can't call method on "+e);return e}},"1da1":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));n("d3b7");function r(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,c,"next",e)}function c(e){r(a,i,o,s,c,"throw",e)}s(void 0)}))}}},"1dd5":function(e,t,n){"use strict";(function(e){ -/*! - * Dynamsoft JavaScript Library - * @product Dynamsoft Camera Enhancer JS Edition - * @website https://www.dynamsoft.com - * @copyright Copyright 2022, Dynamsoft Corporation - * @author Dynamsoft - * @version 2.3.1 (js 20220321) - * @fileoverview Dynamsoft JavaScript Library for Camera Enhancer - * More info on DCE JS: https://www.dynamsoft.com/camera-enhancer/docs/programming/javascript/?ver=latest - */ -function r(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}n.d(t,"a",(function(){return o})),"object"==typeof e&&e.process&&e.process.release&&e.process.release.name;const i="undefined"==typeof self;class o{constructor(){this._maxCvsSideLength=void 0,this._defaultMaxCvsSideLength=null,this.predefinedResolutions=[{width:160,height:120},{width:320,height:240},{width:480,height:360},{width:640,height:480},{width:800,height:600},{width:960,height:720},{width:1280,height:720},{width:1920,height:1080},{width:2560,height:1440},{width:3840,height:2160}],this.mapCameraResolutions=new Map,this._bWebGLSupported=!0,this._singleFrameMode=!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia),this._cvsSingleFrameMode=null,this._imgWidth=0,this._imgHeight=0,this._singleFrameModeIpt=null,this._clickIptSingleFrameMode=()=>{if(this.singleFrameMode){if(!this._singleFrameModeIpt){const e=document.createElement("input");this._singleFrameModeIpt=e,e.setAttribute("type","file"),e.setAttribute("accept",".jpg,.jpeg,.icon,.gif,.svg,.webp,.png,.bmp"),e.setAttribute("capture",""),e.addEventListener("change",()=>r(this,void 0,void 0,(function*(){const t=e.files[0];e.value="";const n=yield(e=>r(this,void 0,void 0,(function*(){let t=null,n=null;if("undefined"!=typeof createImageBitmap)try{if(t=yield createImageBitmap(e),t)return t}catch(t){}var r;return t||(n=yield(r=e,new Promise((e,t)=>{let n=URL.createObjectURL(r),i=new Image;i.dbrObjUrl=n,i.src=n,i.onload=()=>{e(i)},i.onerror=e=>{t(new Error("Can't convert blob to image : "+(e instanceof Event?e.type:e)))}}))),n})))(t),i=n instanceof HTMLImageElement?n.naturalWidth:n.width,a=n instanceof HTMLImageElement?n.naturalHeight:n.height;this._imgWidth=i,this._imgHeight=a,(e=>{if(!this._cvsSingleFrameMode){if(this._cvsSingleFrameMode=document.createElement("canvas"),this._cvsSingleFrameMode.className="cvs-single-frame-mode",this._cvsSingleFrameMode.addEventListener("click",this._clickIptSingleFrameMode),this._cvsSingleFrameMode.style.cursor="pointer",this._cvsSingleFrameMode.setAttribute("title","Take a photo"),!this._video)throw new Error("'video' is null.");this._video.after(this._cvsSingleFrameMode)}const t=this._cvsSingleFrameMode;t.style.position="absolute",t.style.width="100%",t.style.height="100%",t.style.left="0",t.style.top="0",t.style.objectFit="contain",t.width==i&&t.height==a||(t.width=i,t.height=a);let n=t.getContext("2d");n.clearRect(0,0,t.width,t.height),n.drawImage(e,0,0)})(n),this._updateScanRegionCanvas(),this._updateScanAreaDiv(),this._updateViewDecorator();for(let e of this._arrScanRegionOverlays)e&&this._updateScanRegionOverlay(e);const s=(e=>{const t=Date.now();if(0===i||0===a)return null;const n=this._scanRegion,r=this.getFrameSize(i,a,n,this.maxCvsSideLength);if(!r)return null;let s,c;s=i!==r.sWidth||a!==r.sHeight,c=r.sWidth!==r.dWidth||r.sHeight!==r.dHeight;const l=(()=>!(!this._bWebGLSupported||c))(),d={data:null,region:n?JSON.parse(JSON.stringify(n)):null,sx:r.sx,sy:r.sy,width:r.dWidth,height:r.dHeight,colorMode:null,timeSpent:null,timeStamp:null,isCropped:s,toCanvas:this.toCanvas,_bUseWebGL:null},u=this._getImageData(e,i,a,r,null,{targetColorMode:this.frameColorMode,bUseWebGL:l});if(!u)return null;const h=Date.now();return o._onLog&&o._onLog("DCE: _getVideoFrame(region?) END: "+h),d.data=u.data,d.colorMode=u.colorMode,d._bUseWebGL=u._bUseWebGL,d.timeSpent=h-t,d.timeStamp=h,d})(n),c=this.mapCameraEvents.get("singleFrameAcquired");for(let e of c)try{const t={data:new Uint8Array(s.data),region:JSON.parse(JSON.stringify(s.region)),sx:s.sx,sy:s.sy,width:s.width,height:s.height,colorMode:s.colorMode,timeSpent:s.timeSpent,timeStamp:s.timeStamp,isCropped:s.isCropped,toCanvas:s.toCanvas,_bUseWebGL:s._bUseWebGL};yield e(t)}catch(r){console.error(r)}}))),e.style.position="fixed",e.style.left="-1px",e.style.top="-1px",e.style.width="1px",e.style.height="1px",e.style.backgroundColor="transparent",e.style.color="transparent",document.body.appendChild(e)}this._singleFrameModeIpt.click()}},this.styleEls=[],this._frameColorMode=void 0,this._defaultFrameColorMode="RGBA",this.currentFSColorMode="rgba",this.ifReuseArrayBufferView=!1,this.maxVideoCvsLength=3,this.canvas=null,this.videoGlCvs=null,this.videoGl=null,this.glImgData=null,this.webglTexture=null,this.webglProgramInfo=null,this.webglBuffers=null,this.toCanvas=function(){const e=document.createElement("canvas");let t;if(e.width=this.width,e.height=this.height,"grey"===this.colorMode){t=new Uint8ClampedArray(this.width*this.height*4);for(let e=0;er(this,void 0,void 0,(function*(){yield this.selectCamera(this._selCam.value),this._bOpen||this.stop()})),this._onResolutionSelChange=()=>r(this,void 0,void 0,(function*(){let e,t;if(this._selRsl&&-1!=this._selRsl.selectedIndex){let n=this._selRsl.options[this._selRsl.selectedIndex];e=n.getAttribute("data-width"),t=n.getAttribute("data-height")}yield this.setResolution(e,t),this._bOpen||this.stop()})),this._onCloseBtnClick=()=>{this.close(!0)},this._bOpen=!1,this.videoSrc=null,this.videoSettings={video:{width:{ideal:1280},height:{ideal:720},facingMode:{ideal:"environment"}}},this.iPlayRound=0,this.promisePlay=null,this._ifSaveLastUsedCamera=!1,this.ifSkipCameraInspection=!1,this._allCameras=[],this._currentCamera=null,this._videoTrack=null,this._lastDeviceId=void 0,this._vc_bPlayingVideoBeforeHide=!1,this._ev_documentHideEvent=()=>{"visible"===document.visibilityState?this._vc_bPlayingVideoBeforeHide&&("Firefox"==o.browserInfo.browser?this.play():this._video.play(),this._vc_bPlayingVideoBeforeHide=!1):this._video&&!this._video.paused&&(this._vc_bPlayingVideoBeforeHide=!0,this._video.pause())},this._video=null,this.videoFit="contain",this._cvsScanRegion=null,this._divScanArea=null,this._divScanLight=null,this._bgLoading=null,this._selCam=null,this._bgCamera=null,this._selRsl=null,this._optGotRsl=null,this._btnClose=null,this.regionMaskFillStyle="rgba(0,0,0,0.5)",this.regionMaskStrokeStyle="rgb(254,142,20)",this.regionMaskLineWidth=2,this._bShowScanRegionMask=!0,this._bShowScanRegionLaser=!1,this._scanRegion=null,this._arrScanRegionOverlays=[],this._cvsViewDecorator=null,this._decoratorType=[],this._decoratorArea=null,this._viewDecoratorInfo={rectangle:{lineWidth:4,strokeStyle:"rgb(254,142,20)",fillStyle:"transparent",maskFillStyle:"transparent"},focus:{lineWidth:4,strokeStyle:"rgb(254,142,20)",fillStyle:"transparent",maskFillStyle:"transparent"},crossline:{lineWidth:2,strokeStyle:"rgb(254,142,20)"},crosshair:{lineWidth:4,strokeStyle:"rgb(254,142,20)"}},this._croppingRegions=void 0,this._defaultCroppingRegions=[null],this.bIncreaseRegionIndexAuto=!0,this._croppingRegionIndex=0,this._loopInterval=void 0,this._defaultLoopInterval=0,this._maxNumberOfFramesInBuffer=void 0,this._defaultMaxNumberOfFramesInBuffer=1,this._frameQueue=[],this._bFetchingLoopStarted=!1,this._bStoppedByPause=!1,this._refreshInterval=void 0,this._defaultRefreshInterval=-1,this._updateCanvasTimeout=500,this.referenceConfigurationArray=[],this._onWindowResize=()=>{this._resizeTimeoutId&&clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=setTimeout(()=>{this._updateScanRegionCanvas(),this._updateScanAreaDiv(),this._updateViewDecorator();for(let e of this._arrScanRegionOverlays)e&&this._updateScanRegionOverlay(e)},this._updateCanvasTimeout)},this.bDestroyed=!1,this.mapCameraEvents=new Map([["cameraOpen",[]],["cameraClose",[]],["cameraChange",[]],["resolutionChange",[]],["played",[]],["singleFrameAcquired",[]],["frameAddedToBuffer",[]]])}static getVersion(){return this._version}static detectEnvironment(){return r(this,void 0,void 0,(function*(){let e={wasm:"undefined"!=typeof WebAssembly&&("undefined"==typeof navigator||!(/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&/\(.+\s11_2_([2-6]).*\)/.test(navigator.userAgent))),worker:!("undefined"==typeof Worker),getUserMedia:!("undefined"==typeof navigator||!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia),camera:!1,browser:this.browserInfo.browser,version:this.browserInfo.version,OS:this.browserInfo.OS};if(e.getUserMedia)try{(yield navigator.mediaDevices.getUserMedia({video:!0})).getTracks().forEach(e=>{e.stop()}),e.camera=!0}catch(e){}return e}))}static set engineResourcePath(e){if(this._hasEngineResourceLoaded)throw new Error("`engineResourcePath` is not allowed to change after `createInstance` is called.");if(null==e&&(e="./"),i)o._engineResourcePath=e;else{let t=document.createElement("a");t.href=e,o._engineResourcePath=t.href}this._engineResourcePath.endsWith("/")||(o._engineResourcePath+="/")}static get engineResourcePath(){return this._engineResourcePath}static isStorageAvailable(e){let t;try{t=window[e];const n="__storage_test__";return t.setItem(n,n),t.removeItem(n),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&t&&0!==t.length}}set maxCvsSideLength(e){if(e<=0)throw new Error("The 'maxCvsSideLength' should be greater than 0.");this._maxCvsSideLength=e}get maxCvsSideLength(){return void 0!==this._maxCvsSideLength?this._maxCvsSideLength:this.referenceConfigurationArray&&1===this.referenceConfigurationArray.length&&this.referenceConfigurationArray[0].hasOwnProperty("maxCvsSideLength")?this.referenceConfigurationArray[0].maxCvsSideLength:this._defaultMaxCvsSideLength}static set defaultUIElementURL(e){o._defaultUIElementURL=e}static get defaultUIElementURL(){var e;return null===(e=o._defaultUIElementURL)||void 0===e?void 0:e.replace("@engineResourcePath/",o.engineResourcePath)}getUIElement(){return this.UIElement}setUIElement(e){return r(this,void 0,void 0,(function*(){if(this._bOpen)throw new Error("It is not allowed to change the UIElement when the camera is open.");if("string"==typeof e||e instanceof String){if(!e.trim().startsWith("<")){let t=yield fetch(e);if(!t.ok)throw Error("setUIElement(elementOrUrl): Network Error: "+t.statusText);e=yield t.text()}if(!e.trim().startsWith("<"))throw Error("setUIElement(elementOrUrl): Can't get valid HTMLElement.");let t=document.createElement("div");t.innerHTML=e;for(let e=0;e','','',''].join(""),this._optGotRsl=this._optGotRsl||this._selRsl.options[0])):!this._optGotRsl&&t.classList.contains("dce-opt-gotResolution")?this._optGotRsl=t:!this._btnClose&&t.classList.contains("dce-btn-close")&&(this._btnClose=t);if(!this._video)throw this._unbindUI(),Error("Can not find the video container element with class 'dce-video-container'");this.singleFrameMode?(this._video&&(this._video.addEventListener("click",this._clickIptSingleFrameMode),this._video.style.cursor="pointer",this._video.setAttribute("title","Take a photo")),this._divScanArea&&(this._divScanArea.addEventListener("click",this._clickIptSingleFrameMode),this._divScanArea.style.cursor="pointer",this._divScanArea.setAttribute("title","Take a photo")),this._bgCamera&&(this._bgCamera.style.display="")):this._bgLoading&&(this._bgLoading.style.display=""),this._selCam&&this._selCam.addEventListener("change",this._onCameraSelChange),this._selRsl&&this._selRsl.addEventListener("change",this._onResolutionSelChange),this._btnClose&&this._btnClose.addEventListener("click",this._onCloseBtnClick),document.addEventListener("visibilitychange",this._ev_documentHideEvent),window.addEventListener("resize",this._onWindowResize)}_unbindUI(){this.singleFrameMode?(this._video&&(this._video.removeEventListener("click",this._clickIptSingleFrameMode),this._video.style.cursor="",this._video.removeAttribute("title")),this._divScanArea&&(this._divScanArea.removeEventListener("click",this._clickIptSingleFrameMode),this._divScanArea.style.cursor="",this._divScanArea.removeAttribute("title")),this._bgCamera&&(this._bgCamera.style.display="none")):this._bgLoading&&(this._bgLoading.style.display="none"),this._selCam&&this._selCam.removeEventListener("change",this._onCameraSelChange),this._selRsl&&this._selRsl.removeEventListener("change",this._onResolutionSelChange),this._btnClose&&this._btnClose.removeEventListener("click",this._onCloseBtnClick),this._cvsViewDecorator&&(this._cvsViewDecorator.removeEventListener("click",this._clickIptSingleFrameMode),this._cvsViewDecorator.style.cursor="",this._cvsViewDecorator.removeAttribute("title"));for(let e of this._arrScanRegionOverlays)e&&(e.removeEventListener("click",this._clickIptSingleFrameMode),e.style.cursor="",e.removeAttribute("title"));this.hideScanRegionLaser(),this.hideViewDecorator(),this.hideScanRegionOverlays(),this._video&&(this._video.onloadedmetadata=null,this._video.remove()),this._video=null,this._selCam=null,this._selRsl=null,this._optGotRsl=null,this._btnClose=null,this._divScanArea=null,this._divScanLight=null,this._cvsScanRegion&&(this._cvsScanRegion.remove(),this._cvsScanRegion=null),this._singleFrameModeIpt&&(this._singleFrameModeIpt.remove(),this._singleFrameModeIpt=null),this._cvsSingleFrameMode&&(this._cvsSingleFrameMode.remove(),this._cvsSingleFrameMode=null),document.removeEventListener("visibilitychange",this._ev_documentHideEvent),window.removeEventListener("resize",this._onWindowResize)}set bOpen(e){if(this._bOpen=e,e){this._updateScanRegionCanvas(),this._updateScanAreaDiv(),this._updateViewDecorator();for(let e of this._arrScanRegionOverlays)e&&this._updateScanRegionOverlay(e);this._bShowScanRegionMask?this.showScanRegionMask():this.hideScanRegionMask(),this._bShowScanRegionLaser?this.showScanRegionLaser():this.hideScanRegionLaser(),this.showViewDecorator(),this._cvsViewDecorator&&(this._cvsViewDecorator.addEventListener("click",this._clickIptSingleFrameMode),this._cvsViewDecorator.style.cursor="pointer",this._cvsViewDecorator.setAttribute("title","Take a photo")),this.showScanRegionOverlays();for(let e of this._arrScanRegionOverlays)e&&(e.addEventListener("click",this._clickIptSingleFrameMode),e.style.cursor="pointer",e.setAttribute("title","Take a photo"))}}_assertOpen(){if(!this._bOpen)throw Error("The camera is not open.")}set ifSaveLastUsedCamera(e){e?o.isStorageAvailable("localStorage")?this._ifSaveLastUsedCamera=!0:(this._ifSaveLastUsedCamera=!1,console.warn("Local storage is unavailable")):this._ifSaveLastUsedCamera=!1}get ifSaveLastUsedCamera(){return this._ifSaveLastUsedCamera}get video(){return this._video}setVideoFit(e){if(e=e.toLowerCase(),!["contain","cover"].includes(e))throw new Error(`It is not allowed to set '${e}'.`);if(this.videoFit=e,this._video&&(this._video.style.objectFit=e,!this.singleFrameMode)){this._updateScanRegionCanvas(),this._updateScanAreaDiv(),this._updateViewDecorator();for(let e of this._arrScanRegionOverlays)e&&this._updateScanRegionOverlay(e)}}getVideoFit(){return this.videoFit}set ifShowScanRegionMask(e){this._bShowScanRegionMask=e,e?this.showScanRegionMask():this.hideScanRegionMask()}get ifShowScanRegionMask(){return this._bShowScanRegionMask}showScanRegionMask(){this._cvsScanRegion&&"none"==this._cvsScanRegion.style.display&&(this._cvsScanRegion.style.display="")}hideScanRegionMask(){this._cvsScanRegion&&(this._cvsScanRegion.style.display="none")}set ifShowScanRegionLaser(e){this._bShowScanRegionLaser=e,e?this.showScanRegionLaser():this.hideScanRegionLaser()}get ifShowScanRegionLaser(){return this._bShowScanRegionLaser}showScanRegionLaser(){this._divScanLight&&"none"==this._divScanLight.style.display&&(this._divScanLight.style.display="")}hideScanRegionLaser(){this._divScanLight&&(this._divScanLight.style.display="none")}_checkValidRegion(e){return null===e||!!e&&!!(e.hasOwnProperty("regionLeft")&&e.hasOwnProperty("regionTop")&&e.hasOwnProperty("regionRight")&&e.hasOwnProperty("regionBottom")&&e.hasOwnProperty("regionMeasuredByPercentage"))&&!(e.regionLeft<0||e.regionTop<0||e.regionRight<0||e.regionBottom<0)&&(!e.regionMeasuredByPercentage||!(e.regionLeft>100||e.regionTop>100||e.regionRight>100||e.regionBottom>100))}set scanRegion(e){if(!this._checkValidRegion(e))throw new Error("The region is invalid.");this._scanRegion=JSON.parse(JSON.stringify(e)),this._updateScanRegionCanvas(),this._updateScanAreaDiv();for(let t of this._arrScanRegionOverlays)t&&this._updateScanRegionOverlay(t)}setScanRegion(e){this.scanRegion=e}getScanRegion(){return JSON.parse(JSON.stringify(this._scanRegion))}addScanRegionOverlayCanvas(){this._assertOpen();const e=document.createElement("canvas");if(e.className="cvs-scan-region-overlay-"+this._arrScanRegionOverlays.length,this.singleFrameMode&&(e.addEventListener("click",this._clickIptSingleFrameMode),e.style.cursor="pointer",e.setAttribute("title","Take a photo")),this._updateScanRegionOverlay(e),this._arrScanRegionOverlays.length>0){const t=this._arrScanRegionOverlays.length;this._arrScanRegionOverlays[t-1].after(e)}else if(this._cvsScanRegion)this._cvsScanRegion.before(e);else if(this._cvsSingleFrameMode)this._cvsSingleFrameMode.after(e);else{if(!this._video)throw new Error("'video' is null.");this._video.after(e)}return this._arrScanRegionOverlays.push(e),e}_updateScanRegionOverlay(e){if(!e)return;let t,n,r;if(this.singleFrameMode)t=this._imgWidth,n=this._imgHeight,r="contain";else{if(!this._video)return;t=this._video.videoWidth,n=this._video.videoHeight,r=this.getVideoFit()}if(t<=0||n<=0)return e.width=0,void(e.height=0);const i=this._getRegionInPixels(t,n,this._scanRegion),o=i.regionRight-i.regionLeft,a=i.regionBottom-i.regionTop;e.width==o&&e.height==a||(e.width=o,e.height=a);const s=window.getComputedStyle(this._video),c=parseFloat(s.width),l=parseFloat(s.height),d=c/l,u=t/n;let h,f,g,_,p=1;if("contain"===r)d{const e=parseFloat(window.getComputedStyle(this._video).width),i=parseFloat(window.getComputedStyle(this._video).height);let o,a={regionBottom:n,regionRight:t,regionLeft:0,regionTop:0,regionMeasuredByPercentage:!1};return"cover"===r?e/ithis.maxNumberOfFramesInBuffer;)this._frameQueue.shift()}get maxNumberOfFramesInBuffer(){return void 0!==this._maxNumberOfFramesInBuffer?this._maxNumberOfFramesInBuffer:this.referenceConfigurationArray&&1===this.referenceConfigurationArray.length&&this.referenceConfigurationArray[0].hasOwnProperty("maxNumberOfFramesInBuffer")?this.referenceConfigurationArray[0].maxNumberOfFramesInBuffer:this._defaultMaxNumberOfFramesInBuffer}get numberOfFramesInBuffer(){return this._frameQueue.length}set refreshInterval(e){this._refreshInterval=e}get refreshInterval(){return void 0!==this._refreshInterval?this._refreshInterval:this.referenceConfigurationArray&&1===this.referenceConfigurationArray.length&&this.referenceConfigurationArray[0].hasOwnProperty("refreshInterval")?this.referenceConfigurationArray[0].refreshInterval:this._defaultRefreshInterval}isContextDestroyed(){return this.bDestroyed}static createInstance(e){return r(this,void 0,void 0,(function*(){let t=new o;("string"==typeof e||e instanceof String)&&(e=JSON.parse(e));for(let n in e)t[n]=e[n];return yield t.setUIElement(o.defaultUIElementURL),this._hasEngineResourceLoaded=!0,t}))}play(e,t,n){return r(this,void 0,void 0,(function*(){if(this._video&&this.videoSrc){yield new Promise((e,t)=>{this._video.onloadedmetadata=()=>r(this,void 0,void 0,(function*(){this._video&&(this._video.onloadedmetadata=null,yield this._video.play(),e())})),"string"==typeof this.videoSrc||this.videoSrc instanceof String?this._video.src=this.videoSrc:this._video.srcObject=this.videoSrc,setTimeout(()=>t(new Error("Failed to play video. Timeout.")),4e3)});let e={width:this._video.videoWidth,height:this._video.videoHeight,deviceId:this._currentCamera&&this._currentCamera.deviceId};const t=this.mapCameraEvents.get("played");for(let n of t){const t=JSON.parse(JSON.stringify(e));setTimeout(()=>n(t),0)}return e}if(this.singleFrameMode)return this._clickIptSingleFrameMode(),{width:0,height:0,deviceId:null};if(!this._video)return null;const i=++this.iPlayRound;let a=null,s=0,c=0;return this._currentCamera&&(a=this._currentCamera.deviceId),this._video&&(s=this._video.videoWidth,c=this._video.videoHeight),this.promisePlay&&(yield this.promisePlay,ir(this,void 0,void 0,(function*(){var i;try{this._video&&this._video.srcObject&&this.stop(),o._onLog&&o._onLog("DCE: ======before video========");const d=()=>{if(!this._video)throw _&&_.getTracks().forEach(e=>{e.stop()}),this._videoTrack=null,this._currentCamera=null,new Error("'video' is null.")},u=this.getVideoSettings();let h;"boolean"==typeof u.video&&(u.video={});const f=["rear","back","rück","arrière","trasera","trás","traseira","posteriore","后面","後面","背面","后置","後置","背置","задней","الخلفية","후","arka","achterzijde","หลัง","baksidan","bagside","sau","bak","tylny","takakamera","belakang","אחורית","πίσω","spate","hátsó","zadní","darrere","zadná","задня","stražnja","belakang","बैक"],g=()=>{for(let e of this._allCameras){let t=e.label.toLowerCase();if(t&&f.some(e=>-1!=t.indexOf(e))&&/\b0(\b)?/.test(t)){delete u.video.facingMode,u.video.deviceId={ideal:e.deviceId};break}}u.video.deviceId||-1==["Android","HarmonyOS"].indexOf(o.browserInfo.OS)||(delete u.video.facingMode,u.video.deviceId={ideal:this._allCameras[this._allCameras.length-1].deviceId})};if(e)delete u.video.facingMode,u.video.deviceId={exact:e};else if(u.video.deviceId);else if(this._lastDeviceId)delete u.video.facingMode,u.video.deviceId={exact:this._lastDeviceId};else if(this.ifSaveLastUsedCamera&&o.isStorageAvailable&&window.localStorage.getItem("dce_last_camera_id")){delete u.video.facingMode,u.video.deviceId={exact:window.localStorage.getItem("dce_last_camera_id")};const e=JSON.parse(window.localStorage.getItem("dce_last_apply_width")),t=JSON.parse(window.localStorage.getItem("dce_last_apply_height"));e&&t&&(u.video.width=e,u.video.height=t)}else if(this.ifSkipCameraInspection);else if(u.video.facingMode){if(yield this.getAllCameras(),!this._video)return null;let e=u.video.facingMode;e instanceof Array&&e.length&&(e=e[0]),e=e.exact||e.ideal||e,"environment"===e&&(h=!!u.video.facingMode,g())}let _;t&&(u.video.width={ideal:t}),n&&(u.video.height={ideal:n}),o._onLog&&o._onLog("DCE: ======try getUserMedia========");let p,v=[0,500],m=null,y=null;function l(e){return r(this,void 0,void 0,(function*(){for(let t of v){d(),t&&(yield new Promise(e=>setTimeout(e,t))),d();{const t=e.video.deviceId;y=t?t.exact||t.ideal||t:null}try{o._onLog&&o._onLog("DCE: ask "+JSON.stringify(e)),_=yield navigator.mediaDevices.getUserMedia(e),d();break}catch(r){m=r,o._onLog&&o._onLog("DCE: "+r.message||!1)}}}))}if(yield l(u),_||(o._onLog&&o._onLog("DCE: ======try getUserMedia again========"),p=JSON.parse(JSON.stringify(u)),"object"==typeof p.video&&("iPhone"==o.browserInfo.OS?(t>=1280||n>=1280?p.video.width=1280:t>=640||n>=640?p.video.width=640:(t<640||n<640)&&(p.video.width=320),delete p.video.height):h&&!u.video.deviceId?(delete p.video.facingMode,this._allCameras.length&&(p.video.deviceId={ideal:this._allCameras[this._allCameras.length-1].deviceId})):p.video=!0),o._onLog&&o._onLog("DCE: "+p),yield l(p)),_||(v=[1e3,2e3],yield l(u)),_||(yield l(p)),!_)throw m;const S=()=>{const e=_.getVideoTracks();let t,n;if(e.length&&(t=this._videoTrack=e[0]),this._video&&t){const e=t.getSettings();if(e)for(let r of this._allCameras)if(e.deviceId===r.deviceId){r._checked=!0,r.label=t.label,n=r;break}if(!n&&y)for(let r of this._allCameras)if(y==r.deviceId){t.label&&(r._checked=!0,r.label=t.label),n=r;break}}this._currentCamera=n};if(yield this.getAllCameras(),d(),h){S(),g();let e=u.video.deviceId;e&&(e=e.exact||e.ideal||e);let t=null===(i=this._currentCamera)||void 0===i?void 0:i.deviceId;!e||t&&e==t||(_.getTracks().forEach(e=>{e.stop()}),v=[0,500,1e3,2e3],yield l(u))}d();const b=()=>r(this,void 0,void 0,(function*(){o._onLog&&o._onLog("======play video========"),yield new Promise((e,t)=>{d(),this._video.onloadedmetadata=()=>r(this,void 0,void 0,(function*(){d(),this._video.onloadedmetadata=null,yield this._video.play(),e()})),this._video.srcObject=_,setTimeout(()=>t(new Error("Failed to play video. Timeout.")),4e3)})}));yield b(),d(),o._onLog&&o._onLog("DCE: ======played video========"),this._bgLoading&&(this._bgLoading.style.animationPlayState="paused");const R=this._video.videoWidth+"x"+this._video.videoHeight;this._optGotRsl&&(this._optGotRsl.setAttribute("data-width",this._video.videoWidth),this._optGotRsl.setAttribute("data-height",this._video.videoHeight),this._optGotRsl.innerText=R,this._selRsl&&this._optGotRsl.parentNode==this._selRsl&&(this._selRsl.value="got")),o._onLog&&o._onLog("DCE: got "+R),S(),d(),this._renderSelCameraInfo();const E={width:this._video.videoWidth,height:this._video.videoHeight,deviceId:this._currentCamera&&this._currentCamera.deviceId};E.deviceId&&(this._lastDeviceId=E.deviceId,this.ifSaveLastUsedCamera&&o.isStorageAvailable&&(window.localStorage.setItem("dce_last_camera_id",this._lastDeviceId),u.video.width&&u.video.height&&(window.localStorage.setItem("dce_last_apply_width",JSON.stringify(u.video.width)),window.localStorage.setItem("dce_last_apply_height",JSON.stringify(u.video.height)))));const I=this.mapCameraEvents.get("played");for(let e of I){const t=JSON.parse(JSON.stringify(E));setTimeout(()=>e(t),0)}if(a&&a!=E.deviceId){const e=this.mapCameraEvents.get("cameraChange");for(let t of e){const e=JSON.parse(JSON.stringify(E));setTimeout(()=>t(e),0)}}if(s&&c&&(s!=E.width||c!=E.height)){this._updateScanRegionCanvas(),this._updateScanAreaDiv(),this._updateViewDecorator();for(let t of this._arrScanRegionOverlays)t&&this._updateScanRegionOverlay(t);const e=this.mapCameraEvents.get("resolutionChange");for(let t of e){const e=JSON.parse(JSON.stringify(E));setTimeout(()=>t(e),0)}}return this.promisePlay=null,E}catch(r){throw this.promisePlay=null,r}})))(),yield this.promisePlay)}))}resume(){return r(this,void 0,void 0,(function*(){this._assertOpen(),yield this.play(),this._bStoppedByPause&&(this._bStoppedByPause=!1,this.startFetchingLoop()),this._bShowScanRegionLaser&&this.showScanRegionLaser()}))}pause(){this._bOpen||console.warn("The camera is not open."),this._video&&this._video.pause(),this._bFetchingLoopStarted&&(this.stopFetchingLoop(),this._bStoppedByPause=!0),this._bShowScanRegionLaser&&this.hideScanRegionLaser()}close(e){if(!this._video)return;this.stop(),this._unbindUI(),e&&(this.UIElement.style.display="none"),this.stopFetchingLoop(),this.bOpen=!1;const t=this.mapCameraEvents.get("cameraClose");for(let n of t){const e={width:0,height:0,deviceId:null};setTimeout(()=>n(e),0)}}open(e){return r(this,void 0,void 0,(function*(){this._bindUI(),e&&(this.UIElement.parentNode||(this.UIElement.style.position="fixed",this.UIElement.style.left="0",this.UIElement.style.top="0",document.body.append(this.UIElement)),"none"==this.UIElement.style.display&&(this.UIElement.style.display=""));let t=yield this.play();this.bOpen=!0;const n=this.mapCameraEvents.get("cameraOpen");for(let e of n){const n=JSON.parse(JSON.stringify(t));setTimeout(()=>e(n),0)}return t}))}stop(){this._video&&this._video.srcObject&&(o._onLog&&o._onLog("DCE: ======stop video========"),this._video.srcObject.getTracks().forEach(e=>{e.stop()}),this._video.srcObject=null,this._videoTrack=null,this._currentCamera=null),this._video&&this.videoSrc&&(o._onLog&&o._onLog("DCE: ======stop existing video========"),this._video.pause(),this._video.currentTime=0),this._bgLoading&&(this._bgLoading.style.animationPlayState=""),this._frameQueue.length=0}getAllCameras(){return r(this,void 0,void 0,(function*(){let e=yield navigator.mediaDevices.enumerateDevices();if(!e[0].deviceId){let t=yield navigator.mediaDevices.getUserMedia({video:!0});e=yield navigator.mediaDevices.enumerateDevices(),t.getTracks().forEach(e=>{e.stop()}),t=null}const t=[],n=[];if(this._allCameras)for(let r of this._allCameras)r._checked&&n.push(r);for(let r=0;r{const n=this.mapCameraResolutions.get(e);if(!n||!n.length)return!1;for(let r of n)if(r[0]===t.width&&r[1]===t.height)return!0;return!1},i=(e,t,n)=>r(this,void 0,void 0,(function*(){const r={video:{deviceId:{exact:e},width:{ideal:t},height:{ideal:n}}};let i=null;try{i=yield navigator.mediaDevices.getUserMedia(r)}catch(r){return null}if(!i)return null;const o=i.getVideoTracks();let a=null;try{const e=o[0].getSettings();a={width:e.width,height:e.height}}catch(r){const e=document.createElement("video");e.srcObject=i,a={width:e.videoWidth,height:e.videoHeight},e.srcObject=null}return o.forEach(e=>{e.stop()}),a}));if(!this._bOpen){const r=this.videoSettings.video.deviceId;if(!r)return null;if(t=r.hasOwnProperty("exact")?this.videoSettings.video.deviceId.exact:r.hasOwnProperty("ideal")?this.videoSettings.video.deviceId.ideal:this.videoSettings.video.deviceId,!t)return null;let o=this.mapCameraResolutions.get(t);if(o&&!e)return this.mapCameraResolutions.get(t);this.mapCameraResolutions.set(t,[]),o=this.mapCameraResolutions.get(t);for(let e of this.predefinedResolutions){const r=yield i(t,e.width,e.height);r&&!n(t,r)&&o.push([r.width,r.height])}return o}if(this._currentCamera){t=this._currentCamera.deviceId;let r=this.mapCameraResolutions.get(t);if(r&&!e)return this.mapCameraResolutions.get(t);this.mapCameraResolutions.set(t,[]),r=this.mapCameraResolutions.get(t);const i=this.getConstraints();for(let e of this.predefinedResolutions){yield this._videoTrack.applyConstraints({width:{ideal:e.width},height:{ideal:e.height}});const i=this._videoTrack.getSettings(),o={width:i.width,height:i.height};n(t,o)||r.push([o.width,o.height])}return yield this._videoTrack.applyConstraints(i),r}return null}))}on(e,t){if(!this.mapCameraEvents.has(e))throw new Error(`Event '${e}' is not exists.`);const n=this.mapCameraEvents.get(e);n.includes(t)||n.push(t)}off(e,t){if(!this.mapCameraEvents.has(e))throw new Error(`Event '${e}' is not exists.`);const n=this.mapCameraEvents.get(e),r=n.indexOf(t);-1!==r&&n.splice(r,1)}getVideoSettings(){return JSON.parse(JSON.stringify(this.videoSettings))}updateVideoSettings(e){return this.videoSettings=JSON.parse(JSON.stringify(e)),this._lastDeviceId=null,this._bOpen?this.play():Promise.resolve()}isOpen(){return this._bOpen}getCapabilities(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'turnOnTorch()' is unavailable in singleFrameMode.");if(!this._videoTrack)throw new Error('"_videoTrack" is null.');return this._videoTrack.getCapabilities?this._videoTrack.getCapabilities():{}}getCameraSettings(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'getCameraSettings()' is unavailable in singleFrameMode.");if(!this._videoTrack)throw new Error('"_videoTrack" is null.');return this._videoTrack.getSettings()}getConstraints(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'getConstraints()' is unavailable in singleFrameMode.");if(!this._videoTrack)throw new Error('"_videoTrack" is null.');return this._videoTrack.getConstraints()}applyConstraints(e){return r(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'applyConstraints()' is unavailable in singleFrameMode.");if(!this._videoTrack)throw new Error('"_videoTrack" is null.');if(!this._videoTrack.applyConstraints)throw Error("Not supported.");return yield this._videoTrack.applyConstraints(e)}))}turnOnTorch(){return r(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'turnOnTorch()' is unavailable in singleFrameMode.");if(this.getCapabilities().torch)return yield this._videoTrack.applyConstraints({advanced:[{torch:!0}]});throw Error("Not supported.")}))}turnOffTorch(){return r(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'turnOffTorch()' is unavailable in singleFrameMode.");if(this.getCapabilities().torch)return yield this._videoTrack.applyConstraints({advanced:[{torch:!1}]});throw Error("Not supported.")}))}setColorTemperature(e){return r(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'setColorTemperature()' is unavailable in singleFrameMode.");let t=this.getCapabilities().colorTemperature;if(!t)throw Error("Not supported.");return et.max&&(e=t.max),yield this._videoTrack.applyConstraints({advanced:[{colorTemperature:e}]})}))}setExposureCompensation(e){return r(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'setExposureCompensation()' is unavailable in singleFrameMode.");let t=this.getCapabilities().exposureCompensation;if(!t)throw Error("Not supported.");return et.max&&(e=t.max),yield this._videoTrack.applyConstraints({advanced:[{exposureCompensation:e}]})}))}setZoom(e){return r(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'setZoom()' is unavailable in singleFrameMode.");let t=this.getCapabilities().zoom;if(!t)throw Error("Not supported.");return et.max&&(e=t.max),yield this._videoTrack.applyConstraints({advanced:[{zoom:e}]})}))}setFrameRate(e){return r(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'setFrameRate()' is unavailable in singleFrameMode.");let t=this.getCapabilities().frameRate;if(!t)throw Error("Not supported.");return et.max&&(e=t.max),yield this._videoTrack.applyConstraints({width:{ideal:Math.max(this._video.videoWidth,this._video.videoHeight)},frameRate:e})}))}getFrameRate(){return this.getCameraSettings().frameRate}setFocus(e,t){return r(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error("'setFocus()' is unavailable in singleFrameMode.");const n=this.getCapabilities().focusMode,r=this.getCapabilities().focusDistance;if(!n||!n.includes(e)||!r)throw Error("Not supported.");return t?(tr.max&&(t=r.max),yield this._videoTrack.applyConstraints({advanced:[{focusMode:e,focusDistance:t}]})):yield this._videoTrack.applyConstraints({advanced:[{focusMode:e}]})}))}getFocus(){const e=this.getCameraSettings().focusMode;return"continuous"===e?{mode:e}:{mode:e,distance:this.getCameraSettings().focusDistance}}getFrameSize(e,t,n,r){if(!e||!t)return null;let i,o,a,s,c=e,l=t;const d={regionLeft:0,regionTop:0,regionRight:c,regionBottom:l,regionMeasuredByPercentage:!1};n?(n.regionMeasuredByPercentage?(d.regionLeft=n.regionLeft*c/100,d.regionTop=n.regionTop*l/100,d.regionRight=n.regionRight*c/100,d.regionBottom=n.regionBottom*l/100):(d.regionLeft=n.regionLeft,d.regionTop=n.regionTop,d.regionRight=n.regionRight,d.regionBottom=n.regionBottom),i=d.regionLeft,o=d.regionTop,c=Math.round(d.regionRight-d.regionLeft),l=Math.round(d.regionBottom-d.regionTop)):(i=0,o=0);const u=Math.max(c,l);if(r&&r>0&&u>r){const e=r/u;c>l?(a=r,s=Math.round(l*e)):(a=Math.round(c*e),s=r)}else a=c,s=l;return a<=0||s<=0?null:{sx:i,sy:o,sWidth:c,sHeight:l,dWidth:a,dHeight:s}}getFrame(){if(this.singleFrameMode)throw Error("'getFrame()' is unavailable in singleFrameMode.");if(this._assertOpen(),this.singleFrameMode)throw new Error("'getFrame()' is unavailable in singleFrameMode.");return this._getVideoFrame(this._scanRegion)}_getVideoFrame(e,t){if(this.bDestroyed)throw Error("The 'CameraEnhancer' instance has been destroyed.");if(this._assertOpen(),this.singleFrameMode)throw new Error("'_getVideoFrame()' is unavailable in singleFrameMode.");const n=Date.now();o._onLog&&o._onLog("DCE: _getVideoFrame(region?) START: "+n);const r=this._video.videoWidth,i=this._video.videoHeight;if(0===r||0===i)return null;const a=this.getFrameSize(r,i,e,this.maxCvsSideLength);if(!a)return null;let s,c;s=r!==a.sWidth||i!==a.sHeight,c=a.sWidth!==a.dWidth||a.sHeight!==a.dHeight;const l=(()=>!(!this._bWebGLSupported||c))(),d={data:null,region:e?JSON.parse(JSON.stringify(e)):null,sx:a.sx,sy:a.sy,width:a.dWidth,height:a.dHeight,colorMode:null,timeSpent:null,timeStamp:null,isCropped:s,toCanvas:this.toCanvas,_bUseWebGL:null},u=this._getImageData(this._video,r,i,a,t,{targetColorMode:this.frameColorMode,bUseWebGL:l});if(!u)return null;const h=Date.now();return o._onLog&&o._onLog("DCE: _getVideoFrame(region?) END: "+h),d.data=u.data,d.colorMode=u.colorMode,d._bUseWebGL=u._bUseWebGL,d.timeSpent=h-n,d.timeStamp=h,d}_getImageData(e,t,n,r,i,a){if(this.bDestroyed)throw Error("The 'CameraEnhancer' instance has been destroyed.");if(!t||!n)return null;o._onLog&&o._onLog("DCE: _getImageData() START: "+Date.now());const{sx:s,sy:c,sWidth:l,sHeight:d,dWidth:u,dHeight:h}=r;let f;if(f=a&&a.targetColorMode?a.targetColorMode.toLowerCase():"rgba",a&&a.bUseWebGL){this.videoGlCvs||(this.videoGlCvs=document.createElement("canvas"));const l=this.videoGlCvs;l.width==t&&l.height==n||(l.width=t,l.height=n,this.videoGl&&this.videoGl.viewport(0,0,t,n));const d=this.videoGl||l.getContext("webgl",{antialias:!1})||l.getContext("experimental-webgl",{antialias:!1});if(!d){this.videoGl=null,this._bWebGLSupported=!1;let o=null;return a?(o=JSON.parse(JSON.stringify(a)),o.bUseWebGL=!1):o={bUseWebGL:!1},this._getImageData(e,t,n,r,i,o)}if(d.enable(d.SCISSOR_TEST),d.scissor(s,c,u,h),!this.videoGl||f!==this.currentFSColorMode){this.videoGl=d;const e=e=>{const t=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,t),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),e.STATIC_DRAW);const n=e.createBuffer();return e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n),e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),e.STATIC_DRAW),{position:t,indices:n}},t=e=>{const t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t},n=(e,t,n)=>{const i=r(e,e.VERTEX_SHADER,t),o=r(e,e.FRAGMENT_SHADER,n),a=e.createProgram();return e.attachShader(a,i),e.attachShader(a,o),e.linkProgram(a),e.getProgramParameter(a,e.LINK_STATUS)?a:(alert("Unable to initialize the shader program: "+e.getProgramInfoLog(a)),null)},r=(e,t,n)=>{const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)?r:(alert("An error occurred compiling the shaders: "+e.getShaderInfoLog(r)),e.deleteShader(r),null)},i="\n attribute mediump vec2 aVertexPosition;\n varying mediump vec2 vDirection;\n \n void main( void )\n {\n gl_Position = vec4(aVertexPosition, 1.0, 1.0) * 2.0;\n vDirection = aVertexPosition;\n }\n ";let o;o=["rgba","rbga","grba","gbra","brga","bgra"].includes(f)?f.slice(0,3):"rgb";const a=n(d,i,`\n precision mediump float;\n\n varying mediump vec2 vDirection;\n uniform sampler2D uSampler;\n uniform lowp float uColorFactor;\n \n void main(void)\n {\n vec4 sample = texture2D(uSampler, vec2(vDirection.x * 0.5 + 0.5, vDirection.y * 0.5 + 0.5));\n lowp float grey = 0.21 * sample.r + 0.71 * sample.g + 0.07 * sample.b;\n gl_FragColor = vec4(sample.${o} * (1.0 - uColorFactor) + (grey * uColorFactor), sample.a);\n }\n `);this.webglProgramInfo={program:a,attribLocations:{vertexPosition:d.getAttribLocation(a,"aVertexPosition")},uniformLocations:{uSampler:d.getUniformLocation(a,"uSampler"),uColorFactor:d.getUniformLocation(a,"uColorFactor")}},this.webglBuffers=e(d),this.webglTexture=t(d),this.currentFSColorMode=f}const g=(e,t,n)=>{const r=e.RGBA,i=e.RGBA,o=e.UNSIGNED_BYTE;e.bindTexture(e.TEXTURE_2D,t),e.texImage2D(e.TEXTURE_2D,0,r,i,o,n)},_=(e,t,n,r)=>{e.clearColor(0,0,0,1),e.clearDepth(1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n.indices),e.useProgram(t.program);{const r=2,i=e.FLOAT,o=!1,a=0,s=0;e.bindBuffer(e.ARRAY_BUFFER,n.position),e.vertexAttribPointer(t.attribLocations.vertexPosition,r,i,o,a,s),e.enableVertexAttribArray(t.attribLocations.vertexPosition)}e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,r),e.uniform1i(t.uniformLocations.uSampler,0),e.uniform1f(t.uniformLocations.uColorFactor,"grey"===f||"grey32"===f?1:0);const i=e.UNSIGNED_SHORT;e.drawElements(e.TRIANGLES,6,i,0)};let p;if(g(d,this.webglTexture,e),_(d,this.webglProgramInfo,this.webglBuffers,this.webglTexture),i){if(i.length=this.croppingRegions.length||this._croppingRegionIndex<0)throw new Error("The 'croppingRegionIndex' is out of bounds.");e=this.croppingRegions[this._croppingRegionIndex],this.bIncreaseRegionIndexAuto&&++this._croppingRegionIndex>=this.croppingRegions.length&&(this._croppingRegionIndex=0)}return e}_fetchingLoop(e){if(this.bDestroyed)return void this.stopFetchingLoop();if(!this._bOpen||!this.isFetchingLoopStarted())return void this.stopFetchingLoop();if(this._video.paused)return o._onLog&&o._onLog("DCE: Video is paused. Ask in 1s."),this._frameLoopTimeoutId&&clearTimeout(this._frameLoopTimeoutId),void(this._frameLoopTimeoutId=setTimeout(()=>{this._fetchingLoop(!0)},1e3));const t=()=>{o._onLog&&o._onLog("DCE: start fetching a frame: "+Date.now());const e=this.getCurrentRegion();let t=this._getVideoFrame(e);if(!t)return void(o._onLog&&o._onLog("DCE: get a invalid frame, abandon it: "+Date.now()));for(;this._frameQueue&&this._frameQueue.length>=this.maxNumberOfFramesInBuffer;)this._frameQueue.shift();this._frameQueue.push(t),o._onLog&&o._onLog("DCE: finish fetching a frame: "+Date.now());const n=this.mapCameraEvents.get("frameAddedToBuffer");for(let r of n)setTimeout(r,0)},n=()=>{this._frameLoopTimeoutId2&&clearTimeout(this._frameLoopTimeoutId2),this.refreshInterval<=0||(this._frameLoopTimeoutId2=setTimeout(()=>{this.bDestroyed?this.stopFetchingLoop():this._bOpen&&this.isFetchingLoopStarted()?this._video.paused?this._frameLoopTimeoutId&&clearTimeout(this._frameLoopTimeoutId):(o._onLog&&o._onLog("DCE: second timeout executes: "+Date.now()),t(),n()):this.stopFetchingLoop()},this.refreshInterval))};e&&(this._frameQueue.length0&&n()):this.refreshInterval>0?(t(),n()):0===this.refreshInterval?t():this.refreshInterval),this._frameLoopTimeoutId&&clearTimeout(this._frameLoopTimeoutId),this._frameLoopTimeoutId=setTimeout(()=>{this._fetchingLoop(!0)},this.loopInterval)}startFetchingLoop(){if(this.bDestroyed)throw Error("The DCE instance has been destroyed.");if(this._assertOpen(),this.singleFrameMode)throw Error("'startFetchingLoop()' is unavailable in singleFrameMode.");if(this._video.paused)throw Error("The video is paused.");this.isFetchingLoopStarted()||(this._bFetchingLoopStarted=!0,o._onLog&&o._onLog("start fetching loop: "+Date.now()),this._fetchingLoop(!0))}isFetchingLoopStarted(){return this._bFetchingLoopStarted}stopFetchingLoop(){this._bFetchingLoopStarted&&(o._onLog&&o._onLog("stop fetching loop: "+Date.now()),this._frameLoopTimeoutId&&clearTimeout(this._frameLoopTimeoutId),this._frameQueue.length=0,this._bFetchingLoopStarted=!1)}getFrameFromBuffer(e){return this._frameQueue&&this._frameQueue.length?e?e{if(!i&&document.currentScript){let e=document.currentScript.src,t=e.indexOf("?");if(-1!=t)e=e.substring(0,t);else{let t=e.indexOf("#");-1!=t&&(e=e.substring(0,t))}return e.substring(0,e.lastIndexOf("/")+1)}return"./"})(),o._defaultUIElementURL="@engineResourcePath/dce.ui.html"}).call(this,n("c8ba"))},"1dde":function(e,t,n){var r=n("d039"),i=n("b622"),o=n("2d00"),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[],n=t.constructor={};return n[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},2266:function(e,t,n){var r=n("da84"),i=n("0366"),o=n("c65b"),a=n("825a"),s=n("0d51"),c=n("e95a"),l=n("07fa"),d=n("3a9b"),u=n("9a1f"),h=n("35a1"),f=n("2a62"),g=r.TypeError,_=function(e,t){this.stopped=e,this.result=t},p=_.prototype;e.exports=function(e,t,n){var r,v,m,y,S,b,R,E=n&&n.that,I=!(!n||!n.AS_ENTRIES),A=!(!n||!n.IS_ITERATOR),w=!(!n||!n.INTERRUPTED),C=i(t,E),T=function(e){return r&&f(r,"normal",e),new _(!0,e)},O=function(e){return I?(a(e),w?C(e[0],e[1],T):C(e[0],e[1])):w?C(e,T):C(e)};if(A)r=e;else{if(v=h(e),!v)throw g(s(e)+" is not iterable");if(c(v)){for(m=0,y=l(e);y>m;m++)if(S=O(e[m]),S&&d(p,S))return S;return new _(!1)}r=u(e,v)}b=r.next;while(!(R=o(b,r)).done){try{S=O(R.value)}catch(D){f(r,"throw",D)}if("object"==typeof S&&S&&d(p,S))return S}return new _(!1)}},"23cb":function(e,t,n){var r=n("5926"),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},"23e7":function(e,t,n){var r=n("da84"),i=n("06cf").f,o=n("9112"),a=n("6eeb"),s=n("ce4e"),c=n("e893"),l=n("94ca");e.exports=function(e,t){var n,d,u,h,f,g,_=e.target,p=e.global,v=e.stat;if(d=p?r:v?r[_]||s(_,{}):(r[_]||{}).prototype,d)for(u in t){if(f=t[u],e.noTargetGet?(g=i(d,u),h=g&&g.value):h=d[u],n=l(p?u:_+(v?".":"#")+u,e.forced),!n&&void 0!==h){if(typeof f==typeof h)continue;c(f,h)}(e.sham||h&&h.sham)&&o(f,"sham",!0),a(d,u,f,e)}}},"241c":function(e,t,n){var r=n("ca84"),i=n("7839"),o=i.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},2626:function(e,t,n){"use strict";var r=n("d066"),i=n("9bf2"),o=n("b622"),a=n("83ab"),s=o("species");e.exports=function(e){var t=r(e),n=i.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},2877:function(e,t,n){"use strict";function r(e,t,n,r,i,o,a,s){var c,l="function"===typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),o&&(l._scopeId="data-v-"+o),a?(c=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},l._ssrRegister=c):i&&(c=s?function(){i.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(l.functional){l._injectStyles=c;var d=l.render;l.render=function(e,t){return c.call(t),d(e,t)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,c):[c]}return{exports:e,options:l}}n.d(t,"a",(function(){return r}))},"2a62":function(e,t,n){var r=n("c65b"),i=n("825a"),o=n("dc4a");e.exports=function(e,t,n){var a,s;i(e);try{if(a=o(e,"return"),!a){if("throw"===t)throw n;return n}a=r(a,e)}catch(c){s=!0,a=c}if("throw"===t)throw n;if(s)throw a;return i(a),n}},"2b0e":function(e,t,n){"use strict";(function(e){ -/*! - * Vue.js v2.6.14 - * (c) 2014-2021 Evan You - * Released under the MIT License. - */ -var n=Object.freeze({});function r(e){return void 0===e||null===e}function i(e){return void 0!==e&&null!==e}function o(e){return!0===e}function a(e){return!1===e}function s(e){return"string"===typeof e||"number"===typeof e||"symbol"===typeof e||"boolean"===typeof e}function c(e){return null!==e&&"object"===typeof e}var l=Object.prototype.toString;function d(e){return"[object Object]"===l.call(e)}function u(e){return"[object RegExp]"===l.call(e)}function h(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function f(e){return i(e)&&"function"===typeof e.then&&"function"===typeof e.catch}function g(e){return null==e?"":Array.isArray(e)||d(e)&&e.toString===l?JSON.stringify(e,null,2):String(e)}function _(e){var t=parseFloat(e);return isNaN(t)?e:t}function p(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}var y=Object.prototype.hasOwnProperty;function S(e,t){return y.call(e,t)}function b(e){var t=Object.create(null);return function(n){var r=t[n];return r||(t[n]=e(n))}}var R=/-(\w)/g,E=b((function(e){return e.replace(R,(function(e,t){return t?t.toUpperCase():""}))})),I=b((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),A=/\B([A-Z])/g,w=b((function(e){return e.replace(A,"-$1").toLowerCase()}));function C(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function T(e,t){return e.bind(t)}var O=Function.prototype.bind?T:C;function D(e,t){t=t||0;var n=e.length-t,r=new Array(n);while(n--)r[n]=e[n+t];return r}function M(e,t){for(var n in t)e[n]=t[n];return e}function L(e){for(var t={},n=0;n0,ne=q&&q.indexOf("edge/")>0,re=(q&&q.indexOf("android"),q&&/iphone|ipad|ipod|ios/.test(q)||"ios"===Z),ie=(q&&/chrome\/\d+/.test(q),q&&/phantomjs/.test(q),q&&q.match(/firefox\/(\d+)/)),oe={}.watch,ae=!1;if(X)try{var se={};Object.defineProperty(se,"passive",{get:function(){ae=!0}}),window.addEventListener("test-passive",null,se)}catch(Ia){}var ce=function(){return void 0===Y&&(Y=!X&&!z&&"undefined"!==typeof e&&(e["process"]&&"server"===e["process"].env.VUE_ENV)),Y},le=X&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function de(e){return"function"===typeof e&&/native code/.test(e.toString())}var ue,he="undefined"!==typeof Symbol&&de(Symbol)&&"undefined"!==typeof Reflect&&de(Reflect.ownKeys);ue="undefined"!==typeof Set&&de(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var fe=x,ge=0,_e=function(){this.id=ge++,this.subs=[]};_e.prototype.addSub=function(e){this.subs.push(e)},_e.prototype.removeSub=function(e){m(this.subs,e)},_e.prototype.depend=function(){_e.target&&_e.target.addDep(this)},_e.prototype.notify=function(){var e=this.subs.slice();for(var t=0,n=e.length;t-1)if(o&&!S(i,"default"))a=!1;else if(""===a||a===w(e)){var c=tt(String,i.type);(c<0||s0&&(a=Tt(a,(t||"")+"_"+n),Ct(a[0])&&Ct(l)&&(d[c]=Re(l.text+a[0].text),a.shift()),d.push.apply(d,a)):s(a)?Ct(l)?d[c]=Re(l.text+a):""!==a&&d.push(Re(a)):Ct(a)&&Ct(l)?d[c]=Re(l.text+a.text):(o(e._isVList)&&i(a.tag)&&r(a.key)&&i(t)&&(a.key="__vlist"+t+"_"+n+"__"),d.push(a)));return d}function Ot(e){var t=e.$options.provide;t&&(e._provided="function"===typeof t?t.call(e):t)}function Dt(e){var t=Mt(e.$options.inject,e);t&&(Oe(!1),Object.keys(t).forEach((function(n){Fe(e,n,t[n])})),Oe(!0))}function Mt(e,t){if(e){for(var n=Object.create(null),r=he?Reflect.ownKeys(e):Object.keys(e),i=0;i0,a=e?!!e.$stable:!o,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(a&&r&&r!==n&&s===r.$key&&!o&&!r.$hasNormal)return r;for(var c in i={},e)e[c]&&"$"!==c[0]&&(i[c]=Pt(t,c,e[c]))}else i={};for(var l in t)l in i||(i[l]=Bt(t,l));return e&&Object.isExtensible(e)&&(e._normalized=i),H(i,"$stable",a),H(i,"$key",s),H(i,"$hasNormal",o),i}function Pt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});e=e&&"object"===typeof e&&!Array.isArray(e)?[e]:wt(e);var t=e&&e[0];return e&&(!t||1===e.length&&t.isComment&&!Ft(t))?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function Bt(e,t){return function(){return e[t]}}function kt(e,t){var n,r,o,a,s;if(Array.isArray(e)||"string"===typeof e)for(n=new Array(e.length),r=0,o=e.length;r1?D(n):n;for(var r=D(arguments,1),i='event handler for "'+e+'"',o=0,a=n.length;odocument.createEvent("Event").timeStamp&&(Qn=function(){return Xn.now()})}function zn(){var e,t;for(Yn=Qn(),Hn=!0,Gn.sort((function(e,t){return e.id-t.id})),Jn=0;JnJn&&Gn[n].id>e.id)n--;Gn.splice(n+1,0,e)}else Gn.push(e);$n||($n=!0,_t(zn))}}var nr=0,rr=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++nr,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ue,this.newDepIds=new ue,this.expression="","function"===typeof t?this.getter=t:(this.getter=K(t),this.getter||(this.getter=x)),this.value=this.lazy?void 0:this.get()};rr.prototype.get=function(){var e;ve(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(Ia){if(!this.user)throw Ia;nt(Ia,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&vt(e),me(),this.cleanupDeps()}return e},rr.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},rr.prototype.cleanupDeps=function(){var e=this.deps.length;while(e--){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},rr.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():tr(this)},rr.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||c(e)||this.deep){var t=this.value;if(this.value=e,this.user){var n='callback for watcher "'+this.expression+'"';rt(this.cb,this.vm,[e,t],this.vm,n)}else this.cb.call(this.vm,e,t)}}},rr.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},rr.prototype.depend=function(){var e=this.deps.length;while(e--)this.deps[e].depend()},rr.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||m(this.vm._watchers,this);var e=this.deps.length;while(e--)this.deps[e].removeSub(this);this.active=!1}};var ir={enumerable:!0,configurable:!0,get:x,set:x};function or(e,t,n){ir.get=function(){return this[t][n]},ir.set=function(e){this[t][n]=e},Object.defineProperty(e,n,ir)}function ar(e){e._watchers=[];var t=e.$options;t.props&&sr(e,t.props),t.methods&&_r(e,t.methods),t.data?cr(e):xe(e._data={},!0),t.computed&&ur(e,t.computed),t.watch&&t.watch!==oe&&pr(e,t.watch)}function sr(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],o=!e.$parent;o||Oe(!1);var a=function(o){i.push(o);var a=Xe(o,t,n,e);Fe(r,o,a),o in e||or(e,"_props",o)};for(var s in t)a(s);Oe(!0)}function cr(e){var t=e.$options.data;t=e._data="function"===typeof t?lr(t,e):t||{},d(t)||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);while(i--){var o=n[i];0,r&&S(r,o)||$(o)||or(e,"_data",o)}xe(t,!0)}function lr(e,t){ve();try{return e.call(t,t)}catch(Ia){return nt(Ia,t,"data()"),{}}finally{me()}}var dr={lazy:!0};function ur(e,t){var n=e._computedWatchers=Object.create(null),r=ce();for(var i in t){var o=t[i],a="function"===typeof o?o:o.get;0,r||(n[i]=new rr(e,a||x,x,dr)),i in e||hr(e,i,o)}}function hr(e,t,n){var r=!ce();"function"===typeof n?(ir.get=r?fr(t):gr(n),ir.set=x):(ir.get=n.get?r&&!1!==n.cache?fr(t):gr(n.get):x,ir.set=n.set||x),Object.defineProperty(e,t,ir)}function fr(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),_e.target&&t.depend(),t.value}}function gr(e){return function(){return e.call(this,this)}}function _r(e,t){e.$options.props;for(var n in t)e[n]="function"!==typeof t[n]?x:O(t[n],e)}function pr(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i-1)return this;var n=D(arguments,1);return n.unshift(this),"function"===typeof e.install?e.install.apply(e,n):"function"===typeof e&&e.apply(null,n),t.push(e),this}}function wr(e){e.mixin=function(e){return this.options=Ye(this.options,e),this}}function Cr(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name;var a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=Ye(n.options,e),a["super"]=n,a.options.props&&Tr(a),a.options.computed&&Or(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,U.forEach((function(e){a[e]=n[e]})),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=M({},a.options),i[r]=a,a}}function Tr(e){var t=e.options.props;for(var n in t)or(e.prototype,"_props",n)}function Or(e){var t=e.options.computed;for(var n in t)hr(e.prototype,n,t[n])}function Dr(e){U.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&d(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"===typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}function Mr(e){return e&&(e.Ctor.options.name||e.tag)}function Lr(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"===typeof e?e.split(",").indexOf(t)>-1:!!u(e)&&e.test(t)}function xr(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=a.name;s&&!t(s)&&Fr(n,o,r,i)}}}function Fr(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,m(n,t)}Sr(Ir),mr(Ir),Dn(Ir),Fn(Ir),Sn(Ir);var Nr=[String,RegExp,Array],Pr={name:"keep-alive",abstract:!0,props:{include:Nr,exclude:Nr,max:[String,Number]},methods:{cacheVNode:function(){var e=this,t=e.cache,n=e.keys,r=e.vnodeToCache,i=e.keyToCache;if(r){var o=r.tag,a=r.componentInstance,s=r.componentOptions;t[i]={name:Mr(s),tag:o,componentInstance:a},n.push(i),this.max&&n.length>parseInt(this.max)&&Fr(t,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)Fr(this.cache,e,this.keys)},mounted:function(){var e=this;this.cacheVNode(),this.$watch("include",(function(t){xr(e,(function(e){return Lr(t,e)}))})),this.$watch("exclude",(function(t){xr(e,(function(e){return!Lr(t,e)}))}))},updated:function(){this.cacheVNode()},render:function(){var e=this.$slots.default,t=In(e),n=t&&t.componentOptions;if(n){var r=Mr(n),i=this,o=i.include,a=i.exclude;if(o&&(!r||!Lr(o,r))||a&&r&&Lr(a,r))return t;var s=this,c=s.cache,l=s.keys,d=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;c[d]?(t.componentInstance=c[d].componentInstance,m(l,d),l.push(d)):(this.vnodeToCache=t,this.keyToCache=d),t.data.keepAlive=!0}return t||e&&e[0]}},Br={KeepAlive:Pr};function kr(e){var t={get:function(){return j}};Object.defineProperty(e,"config",t),e.util={warn:fe,extend:M,mergeOptions:Ye,defineReactive:Fe},e.set=Ne,e.delete=Pe,e.nextTick=_t,e.observable=function(e){return xe(e),e},e.options=Object.create(null),U.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,M(e.options.components,Br),Ar(e),wr(e),Cr(e),Dr(e)}kr(Ir),Object.defineProperty(Ir.prototype,"$isServer",{get:ce}),Object.defineProperty(Ir.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Ir,"FunctionalRenderContext",{value:qt}),Ir.version="2.6.14";var Vr=p("style,class"),Ur=p("input,textarea,option,select,progress"),Gr=function(e,t,n){return"value"===n&&Ur(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},jr=p("contenteditable,draggable,spellcheck"),Wr=p("events,caret,typing,plaintext-only"),$r=function(e,t){return Qr(t)||"false"===t?"false":"contenteditable"===e&&Wr(t)?t:"true"},Hr=p("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Jr="http://www.w3.org/1999/xlink",Kr=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Yr=function(e){return Kr(e)?e.slice(6,e.length):""},Qr=function(e){return null==e||!1===e};function Xr(e){var t=e.data,n=e,r=e;while(i(r.componentInstance))r=r.componentInstance._vnode,r&&r.data&&(t=zr(r.data,t));while(i(n=n.parent))n&&n.data&&(t=zr(t,n.data));return Zr(t.staticClass,t.class)}function zr(e,t){return{staticClass:qr(e.staticClass,t.staticClass),class:i(e.class)?[e.class,t.class]:t.class}}function Zr(e,t){return i(e)||i(t)?qr(e,ei(t)):""}function qr(e,t){return e?t?e+" "+t:e:t||""}function ei(e){return Array.isArray(e)?ti(e):c(e)?ni(e):"string"===typeof e?e:""}function ti(e){for(var t,n="",r=0,o=e.length;r-1?ci[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:ci[e]=/HTMLUnknownElement/.test(t.toString())}var di=p("text,number,password,search,email,tel,url");function ui(e){if("string"===typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}function hi(e,t){var n=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n}function fi(e,t){return document.createElementNS(ri[e],t)}function gi(e){return document.createTextNode(e)}function _i(e){return document.createComment(e)}function pi(e,t,n){e.insertBefore(t,n)}function vi(e,t){e.removeChild(t)}function mi(e,t){e.appendChild(t)}function yi(e){return e.parentNode}function Si(e){return e.nextSibling}function bi(e){return e.tagName}function Ri(e,t){e.textContent=t}function Ei(e,t){e.setAttribute(t,"")}var Ii=Object.freeze({createElement:hi,createElementNS:fi,createTextNode:gi,createComment:_i,insertBefore:pi,removeChild:vi,appendChild:mi,parentNode:yi,nextSibling:Si,tagName:bi,setTextContent:Ri,setStyleScope:Ei}),Ai={create:function(e,t){wi(t)},update:function(e,t){e.data.ref!==t.data.ref&&(wi(e,!0),wi(t))},destroy:function(e){wi(e,!0)}};function wi(e,t){var n=e.data.ref;if(i(n)){var r=e.context,o=e.componentInstance||e.elm,a=r.$refs;t?Array.isArray(a[n])?m(a[n],o):a[n]===o&&(a[n]=void 0):e.data.refInFor?Array.isArray(a[n])?a[n].indexOf(o)<0&&a[n].push(o):a[n]=[o]:a[n]=o}}var Ci=new ye("",{},[]),Ti=["create","activate","update","remove","destroy"];function Oi(e,t){return e.key===t.key&&e.asyncFactory===t.asyncFactory&&(e.tag===t.tag&&e.isComment===t.isComment&&i(e.data)===i(t.data)&&Di(e,t)||o(e.isAsyncPlaceholder)&&r(t.asyncFactory.error))}function Di(e,t){if("input"!==e.tag)return!0;var n,r=i(n=e.data)&&i(n=n.attrs)&&n.type,o=i(n=t.data)&&i(n=n.attrs)&&n.type;return r===o||di(r)&&di(o)}function Mi(e,t,n){var r,o,a={};for(r=t;r<=n;++r)o=e[r].key,i(o)&&(a[o]=r);return a}function Li(e){var t,n,a={},c=e.modules,l=e.nodeOps;for(t=0;t_?(u=r(n[m+1])?null:n[m+1].elm,E(e,u,n,g,m,o)):g>m&&A(t,h,_)}function T(e,t,n,r){for(var o=n;o-1?Wi(e,t,n):Hr(t)?Qr(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):jr(t)?e.setAttribute(t,$r(t,n)):Kr(t)?Qr(n)?e.removeAttributeNS(Jr,Yr(t)):e.setAttributeNS(Jr,t,n):Wi(e,t,n)}function Wi(e,t,n){if(Qr(n))e.removeAttribute(t);else{if(ee&&!te&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var $i={create:Gi,update:Gi};function Hi(e,t){var n=t.elm,o=t.data,a=e.data;if(!(r(o.staticClass)&&r(o.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=Xr(t),c=n._transitionClasses;i(c)&&(s=qr(s,ei(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Ji,Ki={create:Hi,update:Hi},Yi="__r",Qi="__c";function Xi(e){if(i(e[Yi])){var t=ee?"change":"input";e[t]=[].concat(e[Yi],e[t]||[]),delete e[Yi]}i(e[Qi])&&(e.change=[].concat(e[Qi],e.change||[]),delete e[Qi])}function zi(e,t,n){var r=Ji;return function i(){var o=t.apply(null,arguments);null!==o&&eo(e,i,n,r)}}var Zi=st&&!(ie&&Number(ie[1])<=53);function qi(e,t,n,r){if(Zi){var i=Yn,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}Ji.addEventListener(e,t,ae?{capture:n,passive:r}:n)}function eo(e,t,n,r){(r||Ji).removeEventListener(e,t._wrapper||t,n)}function to(e,t){if(!r(e.data.on)||!r(t.data.on)){var n=t.data.on||{},i=e.data.on||{};Ji=t.elm,Xi(n),bt(n,i,qi,eo,zi,t.context),Ji=void 0}}var no,ro={create:to,update:to};function io(e,t){if(!r(e.data.domProps)||!r(t.data.domProps)){var n,o,a=t.elm,s=e.data.domProps||{},c=t.data.domProps||{};for(n in i(c.__ob__)&&(c=t.data.domProps=M({},c)),s)n in c||(a[n]="");for(n in c){if(o=c[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),o===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=o;var l=r(o)?"":String(o);oo(a,l)&&(a.value=l)}else if("innerHTML"===n&&oi(a.tagName)&&r(a.innerHTML)){no=no||document.createElement("div"),no.innerHTML=""+o+"";var d=no.firstChild;while(a.firstChild)a.removeChild(a.firstChild);while(d.firstChild)a.appendChild(d.firstChild)}else if(o!==s[n])try{a[n]=o}catch(Ia){}}}}function oo(e,t){return!e.composing&&("OPTION"===e.tagName||ao(e,t)||so(e,t))}function ao(e,t){var n=!0;try{n=document.activeElement!==e}catch(Ia){}return n&&e.value!==t}function so(e,t){var n=e.value,r=e._vModifiers;if(i(r)){if(r.number)return _(n)!==_(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}var co={create:io,update:io},lo=b((function(e){var t={},n=/;(?![^(]*\))/g,r=/:(.+)/;return e.split(n).forEach((function(e){if(e){var n=e.split(r);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}));function uo(e){var t=ho(e.style);return e.staticStyle?M(e.staticStyle,t):t}function ho(e){return Array.isArray(e)?L(e):"string"===typeof e?lo(e):e}function fo(e,t){var n,r={};if(t){var i=e;while(i.componentInstance)i=i.componentInstance._vnode,i&&i.data&&(n=uo(i.data))&&M(r,n)}(n=uo(e.data))&&M(r,n);var o=e;while(o=o.parent)o.data&&(n=uo(o.data))&&M(r,n);return r}var go,_o=/^--/,po=/\s*!important$/,vo=function(e,t,n){if(_o.test(t))e.style.setProperty(t,n);else if(po.test(n))e.style.setProperty(w(t),n.replace(po,""),"important");else{var r=yo(t);if(Array.isArray(n))for(var i=0,o=n.length;i-1?t.split(Ro).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Io(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Ro).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";while(n.indexOf(r)>=0)n=n.replace(r," ");n=n.trim(),n?e.setAttribute("class",n):e.removeAttribute("class")}}function Ao(e){if(e){if("object"===typeof e){var t={};return!1!==e.css&&M(t,wo(e.name||"v")),M(t,e),t}return"string"===typeof e?wo(e):void 0}}var wo=b((function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}})),Co=X&&!te,To="transition",Oo="animation",Do="transition",Mo="transitionend",Lo="animation",xo="animationend";Co&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Do="WebkitTransition",Mo="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Lo="WebkitAnimation",xo="webkitAnimationEnd"));var Fo=X?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function No(e){Fo((function(){Fo(e)}))}function Po(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),Eo(e,t))}function Bo(e,t){e._transitionClasses&&m(e._transitionClasses,t),Io(e,t)}function ko(e,t,n){var r=Uo(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===To?Mo:xo,c=0,l=function(){e.removeEventListener(s,d),n()},d=function(t){t.target===e&&++c>=a&&l()};setTimeout((function(){c0&&(n=To,d=a,u=o.length):t===Oo?l>0&&(n=Oo,d=l,u=c.length):(d=Math.max(a,l),n=d>0?a>l?To:Oo:null,u=n?n===To?o.length:c.length:0);var h=n===To&&Vo.test(r[Do+"Property"]);return{type:n,timeout:d,propCount:u,hasTransform:h}}function Go(e,t){while(e.length1}function Ko(e,t){!0!==t.data.show&&Wo(t)}var Yo=X?{create:Ko,activate:Ko,remove:function(e,t){!0!==e.data.show?$o(e,t):t()}}:{},Qo=[$i,Ki,ro,co,bo,Yo],Xo=Qo.concat(Ui),zo=Li({nodeOps:Ii,modules:Xo});te&&document.addEventListener("selectionchange",(function(){var e=document.activeElement;e&&e.vmodel&&oa(e,"input")}));var Zo={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Rt(n,"postpatch",(function(){Zo.componentUpdated(e,t,n)})):qo(e,t,n.context),e._vOptions=[].map.call(e.options,na)):("textarea"===n.tag||di(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",ra),e.addEventListener("compositionend",ia),e.addEventListener("change",ia),te&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){qo(e,t,n.context);var r=e._vOptions,i=e._vOptions=[].map.call(e.options,na);if(i.some((function(e,t){return!P(e,r[t])}))){var o=e.multiple?t.value.some((function(e){return ta(e,i)})):t.value!==t.oldValue&&ta(t.value,i);o&&oa(e,"change")}}}};function qo(e,t,n){ea(e,t,n),(ee||ne)&&setTimeout((function(){ea(e,t,n)}),0)}function ea(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=e.options.length;s-1,a.selected!==o&&(a.selected=o);else if(P(na(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function ta(e,t){return t.every((function(t){return!P(t,e)}))}function na(e){return"_value"in e?e._value:e.value}function ra(e){e.target.composing=!0}function ia(e){e.target.composing&&(e.target.composing=!1,oa(e.target,"input"))}function oa(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function aa(e){return!e.componentInstance||e.data&&e.data.transition?e:aa(e.componentInstance._vnode)}var sa={bind:function(e,t,n){var r=t.value;n=aa(n);var i=n.data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,Wo(n,(function(){e.style.display=o}))):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value,i=t.oldValue;if(!r!==!i){n=aa(n);var o=n.data&&n.data.transition;o?(n.data.show=!0,r?Wo(n,(function(){e.style.display=e.__vOriginalDisplay})):$o(n,(function(){e.style.display="none"}))):e.style.display=r?e.__vOriginalDisplay:"none"}},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}},ca={model:Zo,show:sa},la={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function da(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?da(In(t.children)):e}function ua(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[E(o)]=i[o];return t}function ha(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function fa(e){while(e=e.parent)if(e.data.transition)return!0}function ga(e,t){return t.key===e.key&&t.tag===e.tag}var _a=function(e){return e.tag||Ft(e)},pa=function(e){return"show"===e.name},va={name:"transition",props:la,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(_a),n.length)){0;var r=this.mode;0;var i=n[0];if(fa(this.$vnode))return i;var o=da(i);if(!o)return i;if(this._leaving)return ha(e,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var c=(o.data||(o.data={})).transition=ua(this),l=this._vnode,d=da(l);if(o.data.directives&&o.data.directives.some(pa)&&(o.data.show=!0),d&&d.data&&!ga(o,d)&&!Ft(d)&&(!d.componentInstance||!d.componentInstance._vnode.isComment)){var u=d.data.transition=M({},c);if("out-in"===r)return this._leaving=!0,Rt(u,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),ha(e,i);if("in-out"===r){if(Ft(o))return l;var h,f=function(){h()};Rt(c,"afterEnter",f),Rt(c,"enterCancelled",f),Rt(u,"delayLeave",(function(e){h=e}))}}return i}}},ma=M({tag:String,moveClass:String},la);delete ma.mode;var ya={props:ma,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=Ln(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=ua(this),s=0;s0&&r[0]<4?1:+(r[0]+r[1])),!i&&a&&(r=a.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/),r&&(i=+r[1]))),e.exports=i},"342f":function(e,t,n){var r=n("d066");e.exports=r("navigator","userAgent")||""},"35a1":function(e,t,n){var r=n("f5df"),i=n("dc4a"),o=n("3f8c"),a=n("b622"),s=a("iterator");e.exports=function(e){if(void 0!=e)return i(e,s)||i(e,"@@iterator")||o[r(e)]}},"37e8":function(e,t,n){var r=n("83ab"),i=n("aed9"),o=n("9bf2"),a=n("825a"),s=n("fc6a"),c=n("df75");t.f=r&&!i?Object.defineProperties:function(e,t){a(e);var n,r=s(t),i=c(t),l=i.length,d=0;while(l>d)o.f(e,n=i[d++],r[n]);return e}},"3a9b":function(e,t,n){var r=n("e330");e.exports=r({}.isPrototypeOf)},"3bbe":function(e,t,n){var r=n("da84"),i=n("1626"),o=r.String,a=r.TypeError;e.exports=function(e){if("object"==typeof e||i(e))return e;throw a("Can't set "+o(e)+" as a prototype")}},"3ca3":function(e,t,n){"use strict";var r=n("6547").charAt,i=n("577e"),o=n("69f3"),a=n("7dd0"),s="String Iterator",c=o.set,l=o.getterFor(s);a(String,"String",(function(e){c(this,{type:s,string:i(e),index:0})}),(function(){var e,t=l(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},"3f8c":function(e,t){e.exports={}},"40d5":function(e,t,n){var r=n("d039");e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},"428f":function(e,t,n){var r=n("da84");e.exports=r},"44ad":function(e,t,n){var r=n("da84"),i=n("e330"),o=n("d039"),a=n("c6b6"),s=r.Object,c=i("".split);e.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?c(e,""):s(e)}:s},"44d2":function(e,t,n){var r=n("b622"),i=n("7c73"),o=n("9bf2"),a=r("unscopables"),s=Array.prototype;void 0==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},"44de":function(e,t,n){var r=n("da84");e.exports=function(e,t){var n=r.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}},4840:function(e,t,n){var r=n("825a"),i=n("5087"),o=n("b622"),a=o("species");e.exports=function(e,t){var n,o=r(e).constructor;return void 0===o||void 0==(n=r(o)[a])?t:i(n)}},"485a":function(e,t,n){var r=n("da84"),i=n("c65b"),o=n("1626"),a=n("861d"),s=r.TypeError;e.exports=function(e,t){var n,r;if("string"===t&&o(n=e.toString)&&!a(r=i(n,e)))return r;if(o(n=e.valueOf)&&!a(r=i(n,e)))return r;if("string"!==t&&o(n=e.toString)&&!a(r=i(n,e)))return r;throw s("Can't convert object to primitive value")}},4930:function(e,t,n){var r=n("2d00"),i=n("d039");e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},"4d64":function(e,t,n){var r=n("fc6a"),i=n("23cb"),o=n("07fa"),a=function(e){return function(t,n,a){var s,c=r(t),l=o(c),d=i(a,l);if(e&&n!=n){while(l>d)if(s=c[d++],s!=s)return!0}else for(;l>d;d++)if((e||d in c)&&c[d]===n)return e||d||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},"4dae":function(e,t,n){var r=n("da84"),i=n("23cb"),o=n("07fa"),a=n("8418"),s=r.Array,c=Math.max;e.exports=function(e,t,n){for(var r=o(e),l=i(t,r),d=i(void 0===n?r:n,r),u=s(c(d-l,0)),h=0;l1?arguments[1]:void 0,p=void 0!==_;p&&(_=i(_,r>2?arguments[2]:void 0));var v,m,y,S,b,R,E=f(t),I=0;if(!E||this==g&&c(E))for(v=d(t),m=n?new this(v):g(v);v>I;I++)R=p?_(t[I],I):t[I],u(m,I,R);else for(S=h(t,E),b=S.next,m=n?new this:[];!(y=o(b,S)).done;I++)R=p?s(S,_,[y.value,I],!0):y.value,u(m,I,R);return m.length=I,m}},5087:function(e,t,n){var r=n("da84"),i=n("68ee"),o=n("0d51"),a=r.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not a constructor")}},"50c4":function(e,t,n){var r=n("5926"),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},5692:function(e,t,n){var r=n("c430"),i=n("c6cd");(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.21.1",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"})},"56ef":function(e,t,n){var r=n("d066"),i=n("e330"),o=n("241c"),a=n("7418"),s=n("825a"),c=i([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(s(e)),n=a.f;return n?c(t,n(e)):t}},"577e":function(e,t,n){var r=n("da84"),i=n("f5df"),o=r.String;e.exports=function(e){if("Symbol"===i(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},5926:function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){var t=+e;return t!==t||0===t?0:(t>0?r:n)(t)}},"59ed":function(e,t,n){var r=n("da84"),i=n("1626"),o=n("0d51"),a=r.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not a function")}},"5c6c":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"5e77":function(e,t,n){var r=n("83ab"),i=n("1a2d"),o=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=i(o,"name"),c=s&&"something"===function(){}.name,l=s&&(!r||r&&a(o,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:l}},"605d":function(e,t,n){var r=n("c6b6"),i=n("da84");e.exports="process"==r(i.process)},6069:function(e,t){e.exports="object"==typeof window},"60da":function(e,t,n){"use strict";var r=n("83ab"),i=n("e330"),o=n("c65b"),a=n("d039"),s=n("df75"),c=n("7418"),l=n("d1e7"),d=n("7b0b"),u=n("44ad"),h=Object.assign,f=Object.defineProperty,g=i([].concat);e.exports=!h||a((function(){if(r&&1!==h({b:1},h(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=h({},e)[n]||s(h({},t)).join("")!=i}))?function(e,t){var n=d(e),i=arguments.length,a=1,h=c.f,f=l.f;while(i>a){var _,p=u(arguments[a++]),v=h?g(s(p),h(p)):s(p),m=v.length,y=0;while(m>y)_=v[y++],r&&!o(f,p,_)||(n[_]=p[_])}return n}:h},6547:function(e,t,n){var r=n("e330"),i=n("5926"),o=n("577e"),a=n("1d80"),s=r("".charAt),c=r("".charCodeAt),l=r("".slice),d=function(e){return function(t,n){var r,d,u=o(a(t)),h=i(n),f=u.length;return h<0||h>=f?e?"":void 0:(r=c(u,h),r<55296||r>56319||h+1===f||(d=c(u,h+1))<56320||d>57343?e?s(u,h):r:e?l(u,h,h+2):d-56320+(r-55296<<10)+65536)}};e.exports={codeAt:d(!1),charAt:d(!0)}},"65f0":function(e,t,n){var r=n("0b42");e.exports=function(e,t){return new(r(e))(0===t?0:t)}},"68ee":function(e,t,n){var r=n("e330"),i=n("d039"),o=n("1626"),a=n("f5df"),s=n("d066"),c=n("8925"),l=function(){},d=[],u=s("Reflect","construct"),h=/^\s*(?:class|function)\b/,f=r(h.exec),g=!h.exec(l),_=function(e){if(!o(e))return!1;try{return u(l,d,e),!0}catch(t){return!1}},p=function(e){if(!o(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return g||!!f(h,c(e))}catch(t){return!0}};p.sham=!0,e.exports=!u||i((function(){var e;return _(_.call)||!_(Object)||!_((function(){e=!0}))||e}))?p:_},"69f3":function(e,t,n){var r,i,o,a=n("7f9a"),s=n("da84"),c=n("e330"),l=n("861d"),d=n("9112"),u=n("1a2d"),h=n("c6cd"),f=n("f772"),g=n("d012"),_="Object already initialized",p=s.TypeError,v=s.WeakMap,m=function(e){return o(e)?i(e):r(e,{})},y=function(e){return function(t){var n;if(!l(t)||(n=i(t)).type!==e)throw p("Incompatible receiver, "+e+" required");return n}};if(a||h.state){var S=h.state||(h.state=new v),b=c(S.get),R=c(S.has),E=c(S.set);r=function(e,t){if(R(S,e))throw new p(_);return t.facade=e,E(S,e,t),t},i=function(e){return b(S,e)||{}},o=function(e){return R(S,e)}}else{var I=f("state");g[I]=!0,r=function(e,t){if(u(e,I))throw new p(_);return t.facade=e,d(e,I,t),t},i=function(e){return u(e,I)?e[I]:{}},o=function(e){return u(e,I)}}e.exports={set:r,get:i,has:o,enforce:m,getterFor:y}},"6eeb":function(e,t,n){var r=n("da84"),i=n("1626"),o=n("1a2d"),a=n("9112"),s=n("ce4e"),c=n("8925"),l=n("69f3"),d=n("5e77").CONFIGURABLE,u=l.get,h=l.enforce,f=String(String).split("String");(e.exports=function(e,t,n,c){var l,u=!!c&&!!c.unsafe,g=!!c&&!!c.enumerable,_=!!c&&!!c.noTargetGet,p=c&&void 0!==c.name?c.name:t;i(n)&&("Symbol("===String(p).slice(0,7)&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(n,"name")||d&&n.name!==p)&&a(n,"name",p),l=h(n),l.source||(l.source=f.join("string"==typeof p?p:""))),e!==r?(u?!_&&e[t]&&(g=!0):delete e[t],g?e[t]=n:a(e,t,n)):g?e[t]=n:s(t,n)})(Function.prototype,"toString",(function(){return i(this)&&u(this).source||c(this)}))},7156:function(e,t,n){var r=n("1626"),i=n("861d"),o=n("d2bb");e.exports=function(e,t,n){var a,s;return o&&r(a=t.constructor)&&a!==n&&i(s=a.prototype)&&s!==n.prototype&&o(e,s),e}},7418:function(e,t){t.f=Object.getOwnPropertySymbols},"746f":function(e,t,n){var r=n("428f"),i=n("1a2d"),o=n("e538"),a=n("9bf2").f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},7839:function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"785a":function(e,t,n){var r=n("cc12"),i=r("span").classList,o=i&&i.constructor&&i.constructor.prototype;e.exports=o===Object.prototype?void 0:o},"7b0b":function(e,t,n){var r=n("da84"),i=n("1d80"),o=r.Object;e.exports=function(e){return o(i(e))}},"7c73":function(e,t,n){var r,i=n("825a"),o=n("37e8"),a=n("7839"),s=n("d012"),c=n("1be4"),l=n("cc12"),d=n("f772"),u=">",h="<",f="prototype",g="script",_=d("IE_PROTO"),p=function(){},v=function(e){return h+g+u+e+h+"/"+g+u},m=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t},y=function(){var e,t=l("iframe"),n="java"+g+":";return t.style.display="none",c.appendChild(t),t.src=String(n),e=t.contentWindow.document,e.open(),e.write(v("document.F=Object")),e.close(),e.F},S=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}S="undefined"!=typeof document?document.domain&&r?m(r):y():m(r);var e=a.length;while(e--)delete S[f][a[e]];return S()};s[_]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(p[f]=i(e),n=new p,p[f]=null,n[_]=e):n=S(),void 0===t?n:o.f(n,t)}},"7dd0":function(e,t,n){"use strict";var r=n("23e7"),i=n("c65b"),o=n("c430"),a=n("5e77"),s=n("1626"),c=n("9ed3"),l=n("e163"),d=n("d2bb"),u=n("d44e"),h=n("9112"),f=n("6eeb"),g=n("b622"),_=n("3f8c"),p=n("ae93"),v=a.PROPER,m=a.CONFIGURABLE,y=p.IteratorPrototype,S=p.BUGGY_SAFARI_ITERATORS,b=g("iterator"),R="keys",E="values",I="entries",A=function(){return this};e.exports=function(e,t,n,a,g,p,w){c(n,t,a);var C,T,O,D=function(e){if(e===g&&N)return N;if(!S&&e in x)return x[e];switch(e){case R:return function(){return new n(this,e)};case E:return function(){return new n(this,e)};case I:return function(){return new n(this,e)}}return function(){return new n(this)}},M=t+" Iterator",L=!1,x=e.prototype,F=x[b]||x["@@iterator"]||g&&x[g],N=!S&&F||D(g),P="Array"==t&&x.entries||F;if(P&&(C=l(P.call(new e)),C!==Object.prototype&&C.next&&(o||l(C)===y||(d?d(C,y):s(C[b])||f(C,b,A)),u(C,M,!0,!0),o&&(_[M]=A))),v&&g==E&&F&&F.name!==E&&(!o&&m?h(x,"name",E):(L=!0,N=function(){return i(F,this)})),g)if(T={values:D(E),keys:p?N:D(R),entries:D(I)},w)for(O in T)(S||L||!(O in x))&&f(x,O,T[O]);else r({target:t,proto:!0,forced:S||L},T);return o&&!w||x[b]===N||f(x,b,N,{name:g}),_[t]=N,T}},"7f9a":function(e,t,n){var r=n("da84"),i=n("1626"),o=n("8925"),a=r.WeakMap;e.exports=i(a)&&/native code/.test(o(a))},"825a":function(e,t,n){var r=n("da84"),i=n("861d"),o=r.String,a=r.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not an object")}},"83ab":function(e,t,n){var r=n("d039");e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(e,t,n){"use strict";var r=n("a04b"),i=n("9bf2"),o=n("5c6c");e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},"861d":function(e,t,n){var r=n("1626");e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},8925:function(e,t,n){var r=n("e330"),i=n("1626"),o=n("c6cd"),a=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(e){return a(e)}),e.exports=o.inspectSource},"90e3":function(e,t,n){var r=n("e330"),i=0,o=Math.random(),a=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++i+o,36)}},9112:function(e,t,n){var r=n("83ab"),i=n("9bf2"),o=n("5c6c");e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},9263:function(e,t,n){"use strict";var r=n("c65b"),i=n("e330"),o=n("577e"),a=n("ad6d"),s=n("9f7f"),c=n("5692"),l=n("7c73"),d=n("69f3").get,u=n("fce3"),h=n("107c"),f=c("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,_=g,p=i("".charAt),v=i("".indexOf),m=i("".replace),y=i("".slice),S=function(){var e=/a/,t=/b*/g;return r(g,e,"a"),r(g,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),b=s.BROKEN_CARET,R=void 0!==/()??/.exec("")[1],E=S||R||b||u||h;E&&(_=function(e){var t,n,i,s,c,u,h,E=this,I=d(E),A=o(e),w=I.raw;if(w)return w.lastIndex=E.lastIndex,t=r(_,w,A),E.lastIndex=w.lastIndex,t;var C=I.groups,T=b&&E.sticky,O=r(a,E),D=E.source,M=0,L=A;if(T&&(O=m(O,"y",""),-1===v(O,"g")&&(O+="g"),L=y(A,E.lastIndex),E.lastIndex>0&&(!E.multiline||E.multiline&&"\n"!==p(A,E.lastIndex-1))&&(D="(?: "+D+")",L=" "+L,M++),n=new RegExp("^(?:"+D+")",O)),R&&(n=new RegExp("^"+D+"$(?!\\s)",O)),S&&(i=E.lastIndex),s=r(g,T?n:E,L),T?s?(s.input=y(s.input,M),s[0]=y(s[0],M),s.index=E.lastIndex,E.lastIndex+=s[0].length):E.lastIndex=0:S&&s&&(E.lastIndex=E.global?s.index+s[0].length:i),R&&s&&s.length>1&&r(f,s[0],n,(function(){for(c=1;c=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),_}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:D(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),_}},e}(e.exports);try{regeneratorRuntime=r}catch(i){"object"===typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},"9a1f":function(e,t,n){var r=n("da84"),i=n("c65b"),o=n("59ed"),a=n("825a"),s=n("0d51"),c=n("35a1"),l=r.TypeError;e.exports=function(e,t){var n=arguments.length<2?c(e):t;if(o(n))return a(i(n,e));throw l(s(e)+" is not iterable")}},"9bdd":function(e,t,n){var r=n("825a"),i=n("2a62");e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(a){i(e,"throw",a)}}},"9bf2":function(e,t,n){var r=n("da84"),i=n("83ab"),o=n("0cfb"),a=n("aed9"),s=n("825a"),c=n("a04b"),l=r.TypeError,d=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",f="configurable",g="writable";t.f=i?a?function(e,t,n){if(s(e),t=c(t),s(n),"function"===typeof e&&"prototype"===t&&"value"in n&&g in n&&!n[g]){var r=u(e,t);r&&r[g]&&(e[t]=n.value,n={configurable:f in n?n[f]:r[f],enumerable:h in n?n[h]:r[h],writable:!1})}return d(e,t,n)}:d:function(e,t,n){if(s(e),t=c(t),s(n),o)try{return d(e,t,n)}catch(r){}if("get"in n||"set"in n)throw l("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},"9ed3":function(e,t,n){"use strict";var r=n("ae93").IteratorPrototype,i=n("7c73"),o=n("5c6c"),a=n("d44e"),s=n("3f8c"),c=function(){return this};e.exports=function(e,t,n,l){var d=t+" Iterator";return e.prototype=i(r,{next:o(+!l,n)}),a(e,d,!1,!0),s[d]=c,e}},"9f7f":function(e,t,n){var r=n("d039"),i=n("da84"),o=i.RegExp,a=r((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),s=a||r((function(){return!o("a","y").sticky})),c=a||r((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:c,MISSED_STICKY:s,UNSUPPORTED_Y:a}},a04b:function(e,t,n){var r=n("c04e"),i=n("d9b5");e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},a4b4:function(e,t,n){var r=n("342f");e.exports=/web0s(?!.*chrome)/i.test(r)},a4d3:function(e,t,n){"use strict";var r=n("23e7"),i=n("da84"),o=n("d066"),a=n("2ba4"),s=n("c65b"),c=n("e330"),l=n("c430"),d=n("83ab"),u=n("4930"),h=n("d039"),f=n("1a2d"),g=n("e8b5"),_=n("1626"),p=n("861d"),v=n("3a9b"),m=n("d9b5"),y=n("825a"),S=n("7b0b"),b=n("fc6a"),R=n("a04b"),E=n("577e"),I=n("5c6c"),A=n("7c73"),w=n("df75"),C=n("241c"),T=n("057f"),O=n("7418"),D=n("06cf"),M=n("9bf2"),L=n("37e8"),x=n("d1e7"),F=n("f36a"),N=n("6eeb"),P=n("5692"),B=n("f772"),k=n("d012"),V=n("90e3"),U=n("b622"),G=n("e538"),j=n("746f"),W=n("d44e"),$=n("69f3"),H=n("b727").forEach,J=B("hidden"),K="Symbol",Y="prototype",Q=U("toPrimitive"),X=$.set,z=$.getterFor(K),Z=Object[Y],q=i.Symbol,ee=q&&q[Y],te=i.TypeError,ne=i.QObject,re=o("JSON","stringify"),ie=D.f,oe=M.f,ae=T.f,se=x.f,ce=c([].push),le=P("symbols"),de=P("op-symbols"),ue=P("string-to-symbol-registry"),he=P("symbol-to-string-registry"),fe=P("wks"),ge=!ne||!ne[Y]||!ne[Y].findChild,_e=d&&h((function(){return 7!=A(oe({},"a",{get:function(){return oe(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=ie(Z,t);r&&delete Z[t],oe(e,t,n),r&&e!==Z&&oe(Z,t,r)}:oe,pe=function(e,t){var n=le[e]=A(ee);return X(n,{type:K,tag:e,description:t}),d||(n.description=t),n},ve=function(e,t,n){e===Z&&ve(de,t,n),y(e);var r=R(t);return y(n),f(le,r)?(n.enumerable?(f(e,J)&&e[J][r]&&(e[J][r]=!1),n=A(n,{enumerable:I(0,!1)})):(f(e,J)||oe(e,J,I(1,{})),e[J][r]=!0),_e(e,r,n)):oe(e,r,n)},me=function(e,t){y(e);var n=b(t),r=w(n).concat(Ee(n));return H(r,(function(t){d&&!s(Se,n,t)||ve(e,t,n[t])})),e},ye=function(e,t){return void 0===t?A(e):me(A(e),t)},Se=function(e){var t=R(e),n=s(se,this,t);return!(this===Z&&f(le,t)&&!f(de,t))&&(!(n||!f(this,t)||!f(le,t)||f(this,J)&&this[J][t])||n)},be=function(e,t){var n=b(e),r=R(t);if(n!==Z||!f(le,r)||f(de,r)){var i=ie(n,r);return!i||!f(le,r)||f(n,J)&&n[J][r]||(i.enumerable=!0),i}},Re=function(e){var t=ae(b(e)),n=[];return H(t,(function(e){f(le,e)||f(k,e)||ce(n,e)})),n},Ee=function(e){var t=e===Z,n=ae(t?de:b(e)),r=[];return H(n,(function(e){!f(le,e)||t&&!f(Z,e)||ce(r,le[e])})),r};if(u||(q=function(){if(v(ee,this))throw te("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?E(arguments[0]):void 0,t=V(e),n=function(e){this===Z&&s(n,de,e),f(this,J)&&f(this[J],t)&&(this[J][t]=!1),_e(this,t,I(1,e))};return d&&ge&&_e(Z,t,{configurable:!0,set:n}),pe(t,e)},ee=q[Y],N(ee,"toString",(function(){return z(this).tag})),N(q,"withoutSetter",(function(e){return pe(V(e),e)})),x.f=Se,M.f=ve,L.f=me,D.f=be,C.f=T.f=Re,O.f=Ee,G.f=function(e){return pe(U(e),e)},d&&(oe(ee,"description",{configurable:!0,get:function(){return z(this).description}}),l||N(Z,"propertyIsEnumerable",Se,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:q}),H(w(fe),(function(e){j(e)})),r({target:K,stat:!0,forced:!u},{for:function(e){var t=E(e);if(f(ue,t))return ue[t];var n=q(t);return ue[t]=n,he[n]=t,n},keyFor:function(e){if(!m(e))throw te(e+" is not a symbol");if(f(he,e))return he[e]},useSetter:function(){ge=!0},useSimple:function(){ge=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!d},{create:ye,defineProperty:ve,defineProperties:me,getOwnPropertyDescriptor:be}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:Re,getOwnPropertySymbols:Ee}),r({target:"Object",stat:!0,forced:h((function(){O.f(1)}))},{getOwnPropertySymbols:function(e){return O.f(S(e))}}),re){var Ie=!u||h((function(){var e=q();return"[null]"!=re([e])||"{}"!=re({a:e})||"{}"!=re(Object(e))}));r({target:"JSON",stat:!0,forced:Ie},{stringify:function(e,t,n){var r=F(arguments),i=t;if((p(t)||void 0!==e)&&!m(e))return g(t)||(t=function(e,t){if(_(i)&&(t=s(i,this,e,t)),!m(t))return t}),r[1]=t,a(re,null,r)}})}if(!ee[Q]){var Ae=ee.valueOf;N(ee,Q,(function(e){return s(Ae,this)}))}W(q,K),k[J]=!0},a630:function(e,t,n){var r=n("23e7"),i=n("4df4"),o=n("1c7e"),a=!o((function(e){Array.from(e)}));r({target:"Array",stat:!0,forced:a},{from:i})},a79d:function(e,t,n){"use strict";var r=n("23e7"),i=n("c430"),o=n("fea9"),a=n("d039"),s=n("d066"),c=n("1626"),l=n("4840"),d=n("cdf9"),u=n("6eeb"),h=!!o&&a((function(){o.prototype["finally"].call({then:function(){}},(function(){}))}));if(r({target:"Promise",proto:!0,real:!0,forced:h},{finally:function(e){var t=l(this,s("Promise")),n=c(e);return this.then(n?function(n){return d(t,e()).then((function(){return n}))}:e,n?function(n){return d(t,e()).then((function(){throw n}))}:e)}}),!i&&c(o)){var f=s("Promise").prototype["finally"];o.prototype["finally"]!==f&&u(o.prototype,"finally",f,{unsafe:!0})}},a909:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return h}));var r,i,o,a,s=n("1dd5"); -/*! - * Dynamsoft JavaScript Library - * @product Dynamsoft Barcode Reader JS Edition - * @website http://www.dynamsoft.com - * @copyright Copyright 2022, Dynamsoft Corporation - * @author Dynamsoft - * @version 9.0.0 (js 20220322) - * @fileoverview Dynamsoft JavaScript Library for Barcode Reader - * More info on DBR JS: https://www.dynamsoft.com/barcode-reader/sdk-javascript/ - */function c(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}!function(e){e[e.IPF_Binary=0]="IPF_Binary",e[e.IPF_BinaryInverted=1]="IPF_BinaryInverted",e[e.IPF_GrayScaled=2]="IPF_GrayScaled",e[e.IPF_NV21=3]="IPF_NV21",e[e.IPF_RGB_565=4]="IPF_RGB_565",e[e.IPF_RGB_555=5]="IPF_RGB_555",e[e.IPF_RGB_888=6]="IPF_RGB_888",e[e.IPF_ARGB_8888=7]="IPF_ARGB_8888",e[e.IPF_RGB_161616=8]="IPF_RGB_161616",e[e.IPF_ARGB_16161616=9]="IPF_ARGB_16161616",e[e.IPF_ABGR_8888=10]="IPF_ABGR_8888",e[e.IPF_ABGR_16161616=11]="IPF_ABGR_16161616",e[e.IPF_BGR_888=12]="IPF_BGR_888"}(r||(r={})),function(e){e[e.DBR_SYSTEM_EXCEPTION=1]="DBR_SYSTEM_EXCEPTION",e[e.DBR_SUCCESS=0]="DBR_SUCCESS",e[e.DBR_UNKNOWN=-1e4]="DBR_UNKNOWN",e[e.DBR_NO_MEMORY=-10001]="DBR_NO_MEMORY",e[e.DBR_NULL_REFERENCE=-10002]="DBR_NULL_REFERENCE",e[e.DBR_LICENSE_INVALID=-10003]="DBR_LICENSE_INVALID",e[e.DBR_LICENSE_EXPIRED=-10004]="DBR_LICENSE_EXPIRED",e[e.DBR_FILE_NOT_FOUND=-10005]="DBR_FILE_NOT_FOUND",e[e.DBR_FILETYPE_NOT_SUPPORTED=-10006]="DBR_FILETYPE_NOT_SUPPORTED",e[e.DBR_BPP_NOT_SUPPORTED=-10007]="DBR_BPP_NOT_SUPPORTED",e[e.DBR_INDEX_INVALID=-10008]="DBR_INDEX_INVALID",e[e.DBR_BARCODE_FORMAT_INVALID=-10009]="DBR_BARCODE_FORMAT_INVALID",e[e.DBR_CUSTOM_REGION_INVALID=-10010]="DBR_CUSTOM_REGION_INVALID",e[e.DBR_MAX_BARCODE_NUMBER_INVALID=-10011]="DBR_MAX_BARCODE_NUMBER_INVALID",e[e.DBR_IMAGE_READ_FAILED=-10012]="DBR_IMAGE_READ_FAILED",e[e.DBR_TIFF_READ_FAILED=-10013]="DBR_TIFF_READ_FAILED",e[e.DBR_QR_LICENSE_INVALID=-10016]="DBR_QR_LICENSE_INVALID",e[e.DBR_1D_LICENSE_INVALID=-10017]="DBR_1D_LICENSE_INVALID",e[e.DBR_DIB_BUFFER_INVALID=-10018]="DBR_DIB_BUFFER_INVALID",e[e.DBR_PDF417_LICENSE_INVALID=-10019]="DBR_PDF417_LICENSE_INVALID",e[e.DBR_DATAMATRIX_LICENSE_INVALID=-10020]="DBR_DATAMATRIX_LICENSE_INVALID",e[e.DBR_PDF_READ_FAILED=-10021]="DBR_PDF_READ_FAILED",e[e.DBR_PDF_DLL_MISSING=-10022]="DBR_PDF_DLL_MISSING",e[e.DBR_PAGE_NUMBER_INVALID=-10023]="DBR_PAGE_NUMBER_INVALID",e[e.DBR_CUSTOM_SIZE_INVALID=-10024]="DBR_CUSTOM_SIZE_INVALID",e[e.DBR_CUSTOM_MODULESIZE_INVALID=-10025]="DBR_CUSTOM_MODULESIZE_INVALID",e[e.DBR_RECOGNITION_TIMEOUT=-10026]="DBR_RECOGNITION_TIMEOUT",e[e.DBR_JSON_PARSE_FAILED=-10030]="DBR_JSON_PARSE_FAILED",e[e.DBR_JSON_TYPE_INVALID=-10031]="DBR_JSON_TYPE_INVALID",e[e.DBR_JSON_KEY_INVALID=-10032]="DBR_JSON_KEY_INVALID",e[e.DBR_JSON_VALUE_INVALID=-10033]="DBR_JSON_VALUE_INVALID",e[e.DBR_JSON_NAME_KEY_MISSING=-10034]="DBR_JSON_NAME_KEY_MISSING",e[e.DBR_JSON_NAME_VALUE_DUPLICATED=-10035]="DBR_JSON_NAME_VALUE_DUPLICATED",e[e.DBR_TEMPLATE_NAME_INVALID=-10036]="DBR_TEMPLATE_NAME_INVALID",e[e.DBR_JSON_NAME_REFERENCE_INVALID=-10037]="DBR_JSON_NAME_REFERENCE_INVALID",e[e.DBR_PARAMETER_VALUE_INVALID=-10038]="DBR_PARAMETER_VALUE_INVALID",e[e.DBR_DOMAIN_NOT_MATCHED=-10039]="DBR_DOMAIN_NOT_MATCHED",e[e.DBR_RESERVEDINFO_NOT_MATCHED=-10040]="DBR_RESERVEDINFO_NOT_MATCHED",e[e.DBR_AZTEC_LICENSE_INVALID=-10041]="DBR_AZTEC_LICENSE_INVALID",e[e.DBR_LICENSE_DLL_MISSING=-10042]="DBR_LICENSE_DLL_MISSING",e[e.DBR_LICENSEKEY_NOT_MATCHED=-10043]="DBR_LICENSEKEY_NOT_MATCHED",e[e.DBR_REQUESTED_FAILED=-10044]="DBR_REQUESTED_FAILED",e[e.DBR_LICENSE_INIT_FAILED=-10045]="DBR_LICENSE_INIT_FAILED",e[e.DBR_PATCHCODE_LICENSE_INVALID=-10046]="DBR_PATCHCODE_LICENSE_INVALID",e[e.DBR_POSTALCODE_LICENSE_INVALID=-10047]="DBR_POSTALCODE_LICENSE_INVALID",e[e.DBR_DPM_LICENSE_INVALID=-10048]="DBR_DPM_LICENSE_INVALID",e[e.DBR_FRAME_DECODING_THREAD_EXISTS=-10049]="DBR_FRAME_DECODING_THREAD_EXISTS",e[e.DBR_STOP_DECODING_THREAD_FAILED=-10050]="DBR_STOP_DECODING_THREAD_FAILED",e[e.DBR_SET_MODE_ARGUMENT_ERROR=-10051]="DBR_SET_MODE_ARGUMENT_ERROR",e[e.DBR_LICENSE_CONTENT_INVALID=-10052]="DBR_LICENSE_CONTENT_INVALID",e[e.DBR_LICENSE_KEY_INVALID=-10053]="DBR_LICENSE_KEY_INVALID",e[e.DBR_LICENSE_DEVICE_RUNS_OUT=-10054]="DBR_LICENSE_DEVICE_RUNS_OUT",e[e.DBR_GET_MODE_ARGUMENT_ERROR=-10055]="DBR_GET_MODE_ARGUMENT_ERROR",e[e.DBR_IRT_LICENSE_INVALID=-10056]="DBR_IRT_LICENSE_INVALID",e[e.DBR_MAXICODE_LICENSE_INVALID=-10057]="DBR_MAXICODE_LICENSE_INVALID",e[e.DBR_GS1_DATABAR_LICENSE_INVALID=-10058]="DBR_GS1_DATABAR_LICENSE_INVALID",e[e.DBR_GS1_COMPOSITE_LICENSE_INVALID=-10059]="DBR_GS1_COMPOSITE_LICENSE_INVALID",e[e.DBR_DOTCODE_LICENSE_INVALID=-10061]="DBR_DOTCODE_LICENSE_INVALID",e[e.DMERR_NO_LICENSE=-2e4]="DMERR_NO_LICENSE",e[e.DMERR_LICENSE_SYNC_FAILED=-20003]="DMERR_LICENSE_SYNC_FAILED",e[e.DMERR_TRIAL_LICENSE=-20010]="DMERR_TRIAL_LICENSE",e[e.DMERR_FAILED_TO_REACH_LTS=-20200]="DMERR_FAILED_TO_REACH_LTS"}(i||(i={})),function(e){e[e.IMRDT_IMAGE=1]="IMRDT_IMAGE",e[e.IMRDT_CONTOUR=2]="IMRDT_CONTOUR",e[e.IMRDT_LINESEGMENT=4]="IMRDT_LINESEGMENT",e[e.IMRDT_LOCALIZATIONRESULT=8]="IMRDT_LOCALIZATIONRESULT",e[e.IMRDT_REGIONOFINTEREST=16]="IMRDT_REGIONOFINTEREST",e[e.IMRDT_QUADRILATERAL=32]="IMRDT_QUADRILATERAL"}(o||(o={})),function(e){e[e.BF_ALL=4265607167]="BF_ALL",e[e.BF_ONED=3147775]="BF_ONED",e[e.BF_GS1_DATABAR=260096]="BF_GS1_DATABAR",e[e.BF_CODE_39=1]="BF_CODE_39",e[e.BF_CODE_128=2]="BF_CODE_128",e[e.BF_CODE_93=4]="BF_CODE_93",e[e.BF_CODABAR=8]="BF_CODABAR",e[e.BF_ITF=16]="BF_ITF",e[e.BF_EAN_13=32]="BF_EAN_13",e[e.BF_EAN_8=64]="BF_EAN_8",e[e.BF_UPC_A=128]="BF_UPC_A",e[e.BF_UPC_E=256]="BF_UPC_E",e[e.BF_INDUSTRIAL_25=512]="BF_INDUSTRIAL_25",e[e.BF_CODE_39_EXTENDED=1024]="BF_CODE_39_EXTENDED",e[e.BF_GS1_DATABAR_OMNIDIRECTIONAL=2048]="BF_GS1_DATABAR_OMNIDIRECTIONAL",e[e.BF_GS1_DATABAR_TRUNCATED=4096]="BF_GS1_DATABAR_TRUNCATED",e[e.BF_GS1_DATABAR_STACKED=8192]="BF_GS1_DATABAR_STACKED",e[e.BF_GS1_DATABAR_STACKED_OMNIDIRECTIONAL=16384]="BF_GS1_DATABAR_STACKED_OMNIDIRECTIONAL",e[e.BF_GS1_DATABAR_EXPANDED=32768]="BF_GS1_DATABAR_EXPANDED",e[e.BF_GS1_DATABAR_EXPANDED_STACKED=65536]="BF_GS1_DATABAR_EXPANDED_STACKED",e[e.BF_GS1_DATABAR_LIMITED=131072]="BF_GS1_DATABAR_LIMITED",e[e.BF_PATCHCODE=262144]="BF_PATCHCODE",e[e.BF_PDF417=33554432]="BF_PDF417",e[e.BF_QR_CODE=67108864]="BF_QR_CODE",e[e.BF_DATAMATRIX=134217728]="BF_DATAMATRIX",e[e.BF_AZTEC=268435456]="BF_AZTEC",e[e.BF_MAXICODE=536870912]="BF_MAXICODE",e[e.BF_MICRO_QR=1073741824]="BF_MICRO_QR",e[e.BF_MICRO_PDF417=524288]="BF_MICRO_PDF417",e[e.BF_GS1_COMPOSITE=2147483648]="BF_GS1_COMPOSITE",e[e.BF_MSI_CODE=1048576]="BF_MSI_CODE",e[e.BF_CODE_11=2097152]="BF_CODE_11",e[e.BF_NULL=0]="BF_NULL"}(a||(a={})),"object"==typeof e&&e.process&&e.process.release&&e.process.release.name;const l="undefined"==typeof self,d=l?{}:self;class u{constructor(){this._canvasMaxWH="iPhone"==u.browserInfo.OS||"Android"==u.browserInfo.OS?2048:4096,this._instanceID=void 0,this._ifSaveOriginalImageInACanvas=!1,this.oriCanvas=null,this.oriCanvasData=null,this.bFilterRegionInJs=!0,this._region=null,this._timeStartDecode=null,this._timeEnterInnerDBR=null,this._timeGetMessage=null,this.decodeRecords={},this.bDestroyed=!1,this._lastErrorCode=0,this._lastErrorString="",this._lastInnerDecodeDuration=0}static get version(){return this._version}static get license(){return this._license}static set license(e){if("unload"!=this._loadWasmStatus)throw new Error("`license` is not allowed to change after `createInstance` or `loadWasm` is called.");u._license=e}static get productKeys(){return this._license}static set productKeys(e){u.license=e}static get handshakeCode(){return this._license}static set handshakeCode(e){u.license=e}static get organizationID(){return this._license}static set organizationID(e){u.license=e}static set sessionPassword(e){if("unload"!=this._loadWasmStatus)throw new Error("`sessionPassword` is not allowed to change after `createInstance` or `loadWasm` is called.");u._sessionPassword=e}static get sessionPassword(){return this._sessionPassword}static detectEnvironment(){return c(this,void 0,void 0,(function*(){let e={wasm:"undefined"!=typeof WebAssembly&&("undefined"==typeof navigator||!(/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&/\(.+\s11_2_([2-6]).*\)/.test(navigator.userAgent))),worker:!("undefined"==typeof Worker),getUserMedia:!("undefined"==typeof navigator||!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia),camera:!1,browser:this.browserInfo.browser,version:this.browserInfo.version,OS:this.browserInfo.OS};if(e.getUserMedia)try{(yield navigator.mediaDevices.getUserMedia({video:!0})).getTracks().forEach(e=>{e.stop()}),e.camera=!0}catch(e){}return e}))}static get engineResourcePath(){return this._engineResourcePath}static set engineResourcePath(e){if("unload"!=this._loadWasmStatus)throw new Error("`engineResourcePath` is not allowed to change after `createInstance` or `loadWasm` is called.");if(null==e&&(e="./"),l)u._engineResourcePath=e;else{let t=document.createElement("a");t.href=e,u._engineResourcePath=t.href}this._engineResourcePath.endsWith("/")||(u._engineResourcePath+="/")}static get licenseServer(){return this._licenseServer}static set licenseServer(e){if("unload"!=this._loadWasmStatus)throw new Error("`licenseServer` is not allowed to change after `createInstance` or `loadWasm` is called.");if(null==e)u._licenseServer=[];else{e instanceof Array||(e=[e]);for(let t=0;te.blob()).then(e=>URL.createObjectURL(e))),u._dbrWorker=new Worker(l),u._dbrWorker.onerror=e=>{u._loadWasmStatus="loadFail";let t=new Error(e.message);u._loadWasmErr=t;for(let n of u._loadWasmCallbackArr)n(t);u._loadWasmCallbackArr=[]},u._dbrWorker.onmessage=e=>c(this,void 0,void 0,(function*(){let t=e.data?e.data:e;switch(t.type){case"log":u._onLog&&u._onLog(t.message);break;case"load":{t.message&&(t.message=t.message.replace("(https://www.dynamsoft.com/purchase-center/)","(https://www.dynamsoft.com/store/dynamsoft-barcode-reader/#javascript)"));let e=!1;if(1===s&&(e=!0),t.success){u._loadWasmStatus="loadSuccess",u._version=t.version+"(JS "+u._jsVersion+"."+u._jsEditVersion+")",u._onLog&&u._onLog("load dbr worker success");for(let e of u._loadWasmCallbackArr)e();u._loadWasmCallbackArr=[],u._dbrWorker.onerror=null,t.message&&console.warn(t.message)}else{let n=new Error(t.message);n.stack=t.stack+"\n"+n.stack,u._loadWasmStatus="loadFail",u._loadWasmErr=n;for(let e of u._loadWasmCallbackArr)e(n);u._loadWasmCallbackArr=[],e||111==t.ltsErrorCode&&-1!=t.message.toLowerCase().indexOf("trial license")&&(e=!0)}e&&u.showDialog(t.success?"warn":"error",t.message);break}case"task":{let e=t.id,n=t.body;try{u._taskCallbackMap.get(e)(n),u._taskCallbackMap.delete(e)}catch(t){throw u._taskCallbackMap.delete(e),t}break}default:u._onLog&&u._onLog(e)}})),u._dbrWorker.postMessage({type:"loadWasm",bd:u._bWasmDebug,engineResourcePath:u.engineResourcePath,version:u._jsVersion,brtk:!!s,bptk:1===s,lcs:t,dm:location.origin.startsWith("http")?location.origin:"https://localhost",bUseFullFeature:u._bUseFullFeature,browserInfo:u.browserInfo,deviceFriendlyName:u.deviceFriendlyName,ls:n,sp:r,lm:o,cw:a})}case"loading":yield new Promise((e,t)=>{u._loadWasmCallbackArr.push(n=>{n?t(n):e()})});break;case"loadSuccess":break;case"loadFail":throw u._loadWasmErr;default:throw new Error("Unexpected status")}}))}static showDialog(e,t){return c(this,void 0,void 0,(function*(){if(!u._bNeverShowDialog)try{let n=yield fetch(u.engineResourcePath+"dls.license.dialog.html");if(!n.ok)throw Error("Get license dialog fail. Network Error: "+n.statusText);let r=yield n.text();if(!r.trim().startsWith("<"))throw Error("Get license dialog fail. Can't get valid HTMLElement.");let i=document.createElement("div");i.innerHTML=r;let o=[];for(let e=0;e{if(u==e.target){a.remove();for(let e of o)e.remove()}});else if(!c&&u.classList.contains("dls-license-icon-close"))c=u,u.addEventListener("click",()=>{a.remove();for(let e of o)e.remove()});else if(!l&&u.classList.contains("dls-license-icon-error"))l=u,"error"!=e&&u.remove();else if(!d&&u.classList.contains("dls-license-icon-warn"))d=u,"warn"!=e&&u.remove();else if(!h&&u.classList.contains("dls-license-msg-content")){h=u;let e=t;for(;e;){let t=e.indexOf("["),n=e.indexOf("]",t),r=e.indexOf("(",n),i=e.indexOf(")",r);if(-1==t||-1==n||-1==r||-1==i){u.appendChild(new Text(e));break}t>0&&u.appendChild(new Text(e.substring(0,t)));let o=document.createElement("a"),a=e.substring(t+1,n);o.innerText=a;let s=e.substring(r+1,i);o.setAttribute("href",s),o.setAttribute("target","_blank"),u.appendChild(o),e=e.substring(i+1)}}document.body.appendChild(a)}catch(e){u._onLog&&u._onLog(e.message||e)}}))}static createInstanceInWorker(e=!1){return c(this,void 0,void 0,(function*(){return yield u.loadWasm(),yield new Promise((t,n)=>{let r=u._nextTaskID++;u._taskCallbackMap.set(r,e=>{if(e.success)return t(e.instanceID);{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,n(t)}}),u._dbrWorker.postMessage({type:"createInstance",id:r,bScanner:e})})}))}static createInstance(){return c(this,void 0,void 0,(function*(){let e=new u;return e._instanceID=yield u.createInstanceInWorker(),e}))}decode(e){return c(this,void 0,void 0,(function*(){u._onLog&&u._onLog("decode(source: any)"),u._onLog&&(this._timeStartDecode=Date.now());{let t={};return!this.region||this.region instanceof Array||(t.region=JSON.parse(JSON.stringify(this.region))),e instanceof Blob?yield this._decode_Blob(e,t):e instanceof ArrayBuffer?yield this._decode_ArrayBuffer(e,t):e instanceof Uint8Array||e instanceof Uint8ClampedArray?yield this._decode_Uint8Array(e,t):e instanceof HTMLImageElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?yield this._decode_Image(e,t):e instanceof HTMLCanvasElement?yield this._decode_Canvas(e,t):e instanceof HTMLVideoElement?yield this._decode_Video(e,t):"string"==typeof e?"data:image/"==e.substring(0,11)?yield this._decode_Base64(e,t):yield this._decode_Url(e,t):e&&"object"==typeof e?yield this._decode_DCEFrame(e,t):yield Promise.reject(TypeError("'_decode(source, config)': Type of 'source' should be 'Blob', 'ArrayBuffer', 'Uint8Array', 'HTMLImageElement', 'HTMLCanvasElement', 'HTMLVideoElement', 'String(base64 with image mime)' or 'String(url)'."))}}))}decodeBase64String(e){return c(this,void 0,void 0,(function*(){let t={};return!this.region||this.region instanceof Array||(t.region=JSON.parse(JSON.stringify(this.region))),this._decode_Base64(e,t)}))}decodeUrl(e){return c(this,void 0,void 0,(function*(){let t={};return!this.region||this.region instanceof Array||(t.region=JSON.parse(JSON.stringify(this.region))),this._decode_Url(e,t)}))}_decodeBuffer_Uint8Array(e,t,n,r,i,o){return c(this,void 0,void 0,(function*(){return yield new Promise((a,s)=>{let c=u._nextTaskID++;u._taskCallbackMap.set(c,e=>{if(e.success){let t,n=u._onLog?Date.now():0;u._onLog&&u._onLog("worker return result: "+n),this._lastInnerDecodeDuration=e.duration;try{t=this._handleRetJsonString(e.decodeReturn)}catch(e){return s(e)}if(u._onLog){let e=Date.now();u._onLog("DBR time get result: "+n),u._onLog("Handle image cost: "+(this._timeEnterInnerDBR-this._timeStartDecode)),u._onLog("DBR worker decode image cost: "+(n-this._timeEnterInnerDBR)),u._onLog("DBR worker handle results: "+(e-n)),u._onLog("Total decode image cost: "+(e-this._timeStartDecode))}return a(t)}{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,s(t)}}),this._timeEnterInnerDBR=Date.now(),u._onLog&&u._onLog("Send buffer to worker:"+this._timeEnterInnerDBR),u._dbrWorker.postMessage({type:"decodeBuffer",id:c,instanceID:this._instanceID,body:{buffer:e,width:t,height:n,stride:r,format:i,config:o}},[e.buffer]),u._onLog&&o&&o._timeEndGettingFrame&&u._onLog("decode image delay: "+(this._timeEnterInnerDBR-o._timeEndGettingFrame))})}))}_decodeBuffer_Blob(e,t,n,r,i,o){return c(this,void 0,void 0,(function*(){u._onLog&&u._onLog("_decodeBuffer_Blob(buffer,width,height,stride,format)");const a=e.arrayBuffer?yield e.arrayBuffer():yield new Promise((t,n)=>{let r=new FileReader;r.readAsArrayBuffer(e),r.onload=()=>{t(r.result)},r.onerror=()=>{n(r.error)}});return yield this._decodeBuffer_Uint8Array(new Uint8Array(a),t,n,r,i,o)}))}decodeBuffer(e,t,n,r,i,o){return c(this,void 0,void 0,(function*(){let a;return u._onLog&&u._onLog("decodeBuffer(buffer,width,height,stride,format)"),u._onLog&&(this._timeStartDecode=Date.now()),e instanceof Uint8Array||e instanceof Uint8ClampedArray?a=yield this._decodeBuffer_Uint8Array(e,t,n,r,i,o):e instanceof ArrayBuffer?a=yield this._decodeBuffer_Uint8Array(new Uint8Array(e),t,n,r,i,o):e instanceof Blob&&(a=yield this._decodeBuffer_Blob(e,t,n,r,i,o)),a}))}_decodeFileInMemory_Uint8Array(e){return c(this,void 0,void 0,(function*(){return yield new Promise((t,n)=>{let r=u._nextTaskID++;u._taskCallbackMap.set(r,e=>{if(e.success){let r;this._lastInnerDecodeDuration=e.duration;try{r=this._handleRetJsonString(e.decodeReturn)}catch(e){return n(e)}return t(r)}{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,n(t)}}),u._dbrWorker.postMessage({type:"decodeFileInMemory",id:r,instanceID:this._instanceID,body:{bytes:e}})})}))}getRuntimeSettings(){return c(this,void 0,void 0,(function*(){return yield new Promise((e,t)=>{let n=u._nextTaskID++;u._taskCallbackMap.set(n,n=>{if(n.success){let t=JSON.parse(n.results);return null!=this.userDefinedRegion&&(t.region=JSON.parse(JSON.stringify(this.userDefinedRegion))),e(t)}{let e=new Error(n.message);return e.stack=n.stack+"\n"+e.stack,t(e)}}),u._dbrWorker.postMessage({type:"getRuntimeSettings",id:n,instanceID:this._instanceID})})}))}updateRuntimeSettings(e){return c(this,void 0,void 0,(function*(){let t;if("string"==typeof e)if("speed"==e){let e=yield this.getRuntimeSettings();yield this.resetRuntimeSettings(),t=yield this.getRuntimeSettings(),t.barcodeFormatIds=e.barcodeFormatIds,t.barcodeFormatIds_2=e.barcodeFormatIds_2,t.region=e.region,t.deblurLevel=3,t.expectedBarcodesCount=0,t.localizationModes=[2,0,0,0,0,0,0,0]}else if("balance"==e){let e=yield this.getRuntimeSettings();yield this.resetRuntimeSettings(),t=yield this.getRuntimeSettings(),t.barcodeFormatIds=e.barcodeFormatIds,t.barcodeFormatIds_2=e.barcodeFormatIds_2,t.region=e.region,t.deblurLevel=5,t.expectedBarcodesCount=512,t.localizationModes=[2,16,0,0,0,0,0,0]}else if("coverage"==e){let e=yield this.getRuntimeSettings();yield this.resetRuntimeSettings(),t=yield this.getRuntimeSettings(),t.barcodeFormatIds=e.barcodeFormatIds,t.barcodeFormatIds_2=e.barcodeFormatIds_2,t.region=e.region}else t=JSON.parse(e);else{if("object"!=typeof e)throw TypeError("'UpdateRuntimeSettings(settings)': Type of 'settings' should be 'string' or 'PlainObject'.");if(t=JSON.parse(JSON.stringify(e)),t.region instanceof Array){let e=t.region;[e.regionLeft,e.regionTop,e.regionLeft,e.regionBottom,e.regionMeasuredByPercentage].some(e=>void 0!==e)&&(t.region={regionLeft:e.regionLeft||0,regionTop:e.regionTop||0,regionRight:e.regionRight||0,regionBottom:e.regionBottom||0,regionMeasuredByPercentage:e.regionMeasuredByPercentage||0})}}if(!u._bUseFullFeature){if(0!=(t.barcodeFormatIds&~(a.BF_ONED|a.BF_QR_CODE|a.BF_PDF417|a.BF_DATAMATRIX))||0!=t.barcodeFormatIds_2)throw Error("Some of the specified barcode formats are not supported in the compact version. Please try the full-featured version.");if(0!=t.intermediateResultTypes)throw Error("Intermediate results is not supported in the compact version. Please try the full-featured version.")}if(this.bFilterRegionInJs){let e=t.region;if(e instanceof Array)throw Error("The `region` of type `Array` is only allowed in `BarcodeScanner`.");this.userDefinedRegion=JSON.parse(JSON.stringify(e)),(e.regionLeft||e.regionTop||e.regionRight||e.regionBottom||e.regionMeasuredByPercentage)&&(e.regionLeft||e.regionTop||100!=e.regionRight||100!=e.regionBottom||!e.regionMeasuredByPercentage)?this.region=e:this.region=null,t.region={regionLeft:0,regionTop:0,regionRight:0,regionBottom:0,regionMeasuredByPercentage:0}}else this.userDefinedRegion=null,this.region=null;return yield new Promise((e,n)=>{let r=u._nextTaskID++;u._taskCallbackMap.set(r,t=>{if(t.success){try{this._handleRetJsonString(t.updateReturn)}catch(e){n(e)}return e()}{let e=new Error(t.message);return e.stack=t.stack+"\n"+e.stack,n(e)}}),u._dbrWorker.postMessage({type:"updateRuntimeSettings",id:r,instanceID:this._instanceID,body:{settings:JSON.stringify(t)}})})}))}resetRuntimeSettings(){return c(this,void 0,void 0,(function*(){return this.userDefinedRegion=null,this.region=null,yield new Promise((e,t)=>{let n=u._nextTaskID++;u._taskCallbackMap.set(n,n=>{if(n.success)return e();{let e=new Error(n.message);return e.stack=n.stack+"\n"+e.stack,t(e)}}),u._dbrWorker.postMessage({type:"resetRuntimeSettings",id:n,instanceID:this._instanceID})})}))}outputRuntimeSettingsToString(){return c(this,void 0,void 0,(function*(){if(!u._bUseFullFeature)throw Error("outputRuntimeSettingsToString() is not supported in the compact version. Please try the full-featured version.");return yield new Promise((e,t)=>{let n=u._nextTaskID++;u._taskCallbackMap.set(n,n=>{if(n.success)return e(n.results);{let e=new Error(n.message);return e.stack=n.stack+"\n"+e.stack,t(e)}}),u._dbrWorker.postMessage({type:"outputRuntimeSettingsToString",id:n,instanceID:this._instanceID})})}))}initRuntimeSettingsWithString(e){return c(this,void 0,void 0,(function*(){if(!u._bUseFullFeature)throw Error("initRuntimeSettingsWithString() is not supported in the compact version. Please try the full-featured version.");if("string"==typeof e)e=e;else{if("object"!=typeof e)throw TypeError("'initRuntimeSettingstWithString(settings)': Type of 'settings' should be 'string' or 'PlainObject'.");e=JSON.stringify(e)}return yield new Promise((t,n)=>{let r=u._nextTaskID++;u._taskCallbackMap.set(r,e=>{if(e.success){try{this._handleRetJsonString(e.initReturn)}catch(e){n(e)}return t()}{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,n(t)}}),u._dbrWorker.postMessage({type:"initRuntimeSettingsWithString",id:r,instanceID:this._instanceID,body:{settings:e}})})}))}_decode_Blob(e,t){return c(this,void 0,void 0,(function*(){u._onLog&&u._onLog("_decode_Blob(blob: Blob)");let n=null,r=null;if("undefined"!=typeof createImageBitmap)try{n=yield createImageBitmap(e)}catch(e){}n||(r=yield function(e){return new Promise((t,n)=>{let r=URL.createObjectURL(e),i=new Image;i.dbrObjUrl=r,i.src=r,i.onload=()=>{t(i)},i.onerror=e=>{n(new Error("Can't convert blob to image : "+(e instanceof Event?e.type:e)))}})}(e));let i=yield this._decode_Image(n||r,t);return n&&n.close(),i}))}_decode_ArrayBuffer(e,t){return c(this,void 0,void 0,(function*(){return yield this._decode_Blob(new Blob([e]),t)}))}_decode_Uint8Array(e,t){return c(this,void 0,void 0,(function*(){return yield this._decode_Blob(new Blob([e]),t)}))}_decode_Image(e,t){return c(this,void 0,void 0,(function*(){u._onLog&&u._onLog("_decode_Image(image: HTMLImageElement|ImageBitmap)"),t=t||{};let n,r,i,o,a=e instanceof HTMLImageElement?e.naturalWidth:e.width,s=e instanceof HTMLImageElement?e.naturalHeight:e.height,c=t.region;if(c){let e,t,i,o;c.regionMeasuredByPercentage?(e=c.regionLeft*a/100,t=c.regionTop*s/100,i=c.regionRight*a/100,o=c.regionBottom*s/100):(e=c.regionLeft,t=c.regionTop,i=c.regionRight,o=c.regionBottom),n=e,r=t,a=Math.round(i-e),s=Math.round(o-t)}else n=0,r=0;const l=Math.max(a,s);if(l>this._canvasMaxWH){const e=this._canvasMaxWH/l;a>s?(i=this._canvasMaxWH,o=Math.round(s*e)):(i=Math.round(a*e),o=this._canvasMaxWH)}else i=a,o=s;let d,h;d=document.createElement("canvas"),d.width=i,d.height=o,d.getContext("2d").drawImage(e,n,r,a,s,0,0,i,o),e.dbrObjUrl&&URL.revokeObjectURL(e.dbrObjUrl),c?(h=JSON.parse(JSON.stringify(t)),delete h.region):h=t;let f=yield this._decode_Canvas(d,h);return u.fixResultLocationWhenFilterRegionInJs(c,f,n,r,a,s,i,o),f}))}_decode_Canvas(e,t){return c(this,void 0,void 0,(function*(){if(u._onLog&&u._onLog("_decode_Canvas(canvas:HTMLCanvasElement)"),e.crossOrigin&&"anonymous"!=e.crossOrigin)throw"cors";this.ifSaveOriginalImageInACanvas&&(this.oriCanvas=e,this.oriCanvasData=null);let n=(e.dbrCtx2d||e.getContext("2d")).getImageData(0,0,e.width,e.height).data;return yield this._decodeBuffer_Uint8Array(n,e.width,e.height,4*e.width,r.IPF_ABGR_8888,t)}))}_decode_Video(e,t){return c(this,void 0,void 0,(function*(){if(u._onLog&&u._onLog("_decode_Video(video)"),!(e instanceof HTMLVideoElement))throw TypeError("'_decode_Video(video [, config] )': Type of 'video' should be 'HTMLVideoElement'.");if(e.crossOrigin&&"anonymous"!=e.crossOrigin)throw"cors";t=t||{};let n,r,i,o,a=e.videoWidth,s=e.videoHeight,c=t.region;if(c){let e,t,i,o;c.regionMeasuredByPercentage?(e=c.regionLeft*a/100,t=c.regionTop*s/100,i=c.regionRight*a/100,o=c.regionBottom*s/100):(e=c.regionLeft,t=c.regionTop,i=c.regionRight,o=c.regionBottom),n=e,r=t,a=Math.round(i-e),s=Math.round(o-t)}else n=0,r=0;const l=Math.max(a,s);if(l>this._canvasMaxWH){const e=this._canvasMaxWH/l;a>s?(i=this._canvasMaxWH,o=Math.round(s*e)):(i=Math.round(a*e),o=this._canvasMaxWH)}else i=a,o=s;let d,h=null;h=document.createElement("canvas"),h.width=i,h.height=o,(h.dbrCtx2d=h.getContext("2d")).drawImage(e,n,r,a,s,0,0,i,o),c?(d=JSON.parse(JSON.stringify(t)),delete d.region):d=t;let f=yield this._decode_Canvas(h,t);return c&&u.fixResultLocationWhenFilterRegionInJs(c,f,n,r,a,s,i,o),f}))}_decode_DCEFrame(e,t){return c(this,void 0,void 0,(function*(){if(u._onLog&&u._onLog("_decode_DCEFrame(dceFrame)"),!e)return null;let t;if(this.ifSaveOriginalImageInACanvas&&(this.oriCanvas=null,this.oriCanvasData={width:e.width,height:e.height,colorMode:e.colorMode,data:new Uint8Array(e.data),toCanvas:e.toCanvas}),"grey"===e.colorMode){let{data:n,width:i,height:o,timeStamp:a}=e,s={timeStamp:a};t=yield this._decodeBuffer_Uint8Array(n,i,o,i,r.IPF_GrayScaled,s)}else if("rgba"===e.colorMode){let{data:n,width:i,height:o,timeStamp:a}=e,s={timeStamp:a};t=yield this._decodeBuffer_Uint8Array(n,i,o,4*i,r.IPF_ABGR_8888,s)}else{if("bgra"!==e.colorMode)throw new Error(`Color mode '${e.colorMode}' is not supported.`);{let{data:n,width:i,height:o,timeStamp:a}=e,s={timeStamp:a};t=yield this._decodeBuffer_Uint8Array(n,i,o,4*i,r.IPF_ARGB_8888,s)}}return t}))}_decode_Base64(e,t){return c(this,void 0,void 0,(function*(){if(u._onLog&&u._onLog("_decode_Base64(base64Str)"),"string"!=typeof e)return Promise.reject("'_decode_Base64(base64Str, config)': Type of 'base64Str' should be 'string'.");"data:image/"==e.substring(0,11)&&(e=e.substring(e.indexOf(",")+1));{let n=atob(e),r=n.length,i=new Uint8Array(r);for(;r--;)i[r]=n.charCodeAt(r);return yield this._decode_Blob(new Blob([i]),t)}}))}_decode_Url(e,t){return c(this,void 0,void 0,(function*(){if(u._onLog&&u._onLog("_decode_Url(url)"),"string"!=typeof e)throw TypeError("'_decode_Url(url, config)': Type of 'url' should be 'string'.");e=e;{let n=yield new Promise((t,n)=>{let r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="blob",r.send(),r.onloadend=()=>c(this,void 0,void 0,(function*(){t(r.response)})),r.onerror=()=>{n(new Error("Network Error: "+r.statusText))}});return yield this._decode_Blob(n,t)}}))}_decode_FilePath(e,t){return c(this,void 0,void 0,(function*(){throw u._onLog&&u._onLog("_decode_FilePath(path)"),Error("'_decode_FilePath(path, config)': The method is only supported in node environment.")}))}static fixResultLocationWhenFilterRegionInJs(e,t,n,r,i,o,a,s){if(e&&t.length>0)for(let c of t){let e=c.localizationResult;2==e.resultCoordinateType&&(e.x1*=.01*a,e.x2*=.01*a,e.x3*=.01*a,e.x4*=.01*a,e.y1*=.01*s,e.y2*=.01*s,e.y3*=.01*s,e.y4*=.01*s);let t=a/i,l=s/o;e.x1=e.x1/t+n,e.x2=e.x2/t+n,e.x3=e.x3/t+n,e.x4=e.x4/t+n,e.y1=e.y1/l+r,e.y2=e.y2/l+r,e.y3=e.y3/l+r,e.y4=e.y4/l+r,2==e.resultCoordinateType&&(e.x1*=100/i,e.x2*=100/i,e.x3*=100/i,e.x4*=100/i,e.y1*=100/o,e.y2*=100/o,e.y3*=100/o,e.y4*=100/o)}}static BarcodeReaderException(e,t){let n,r=i.DBR_UNKNOWN;return"number"==typeof e?(r=e,n=new Error(t)):n=new Error(e),n.code=r,n}_handleRetJsonString(e){let t=i;if(e.textResults){for(let t=0;t{let n=t.indexOf(":");e[t.substring(0,n)]=t.substring(n+1)}),n.exception=e}}return e.decodeRecords?this.decodeRecords=e.decodeRecords:this.decodeRecords={},this._lastErrorCode=e.exception,this._lastErrorString=e.description,e.exception&&!u._setWarnnedEx.has(e.description)&&(u._setWarnnedEx.add(e.description),console.warn(e.description)),e.textResults}if(e.exception==t.DBR_SUCCESS)return e.data;throw u.BarcodeReaderException(e.exception,e.description)}setModeArgument(e,t,n,r){return c(this,void 0,void 0,(function*(){return yield new Promise((i,o)=>{let a=u._nextTaskID++;u._taskCallbackMap.set(a,e=>{if(e.success){try{this._handleRetJsonString(e.setReturn)}catch(e){return o(e)}return i()}{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,o(t)}}),u._dbrWorker.postMessage({type:"setModeArgument",id:a,instanceID:this._instanceID,body:{modeName:e,index:t,argumentName:n,argumentValue:r}})})}))}getModeArgument(e,t,n){return c(this,void 0,void 0,(function*(){return yield new Promise((r,i)=>{let o=u._nextTaskID++;u._taskCallbackMap.set(o,e=>{if(e.success){let t;try{t=this._handleRetJsonString(e.getReturn)}catch(e){return i(e)}return r(t)}{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,i(t)}}),u._dbrWorker.postMessage({type:"getModeArgument",id:o,instanceID:this._instanceID,body:{modeName:e,index:t,argumentName:n}})})}))}getIntermediateResults(){return c(this,void 0,void 0,(function*(){return yield new Promise((e,t)=>{let n=u._nextTaskID++;u._taskCallbackMap.set(n,n=>{if(n.success)return e(n.results);{let e=new Error(n.message);return e.stack=n.stack+"\n"+e.stack,t(e)}}),u._dbrWorker.postMessage({type:"getIntermediateResults",id:n,instanceID:this._instanceID})})}))}getIntermediateCanvas(){return c(this,void 0,void 0,(function*(){let e=yield this.getIntermediateResults(),t=[];for(let n of e)if(n.dataType==o.IMRDT_IMAGE)for(let e of n.results){const n=e.bytes;let i;switch(u._onLog&&u._onLog(" "+n.length+" "+n.byteLength+" "+e.width+" "+e.height+" "+e.stride+" "+e.format),e.format){case r.IPF_ABGR_8888:i=new Uint8ClampedArray(n);break;case r.IPF_RGB_888:{const e=n.length/3;i=new Uint8ClampedArray(4*e);for(let t=0;t{if(!e.success){let t=new Error(e.message);throw t.stack=e.stack+"\n"+t.stack,t}}),u._dbrWorker.postMessage({type:"destroyContext",id:e,instanceID:this._instanceID})}}u._jsVersion="9.0.0",u._jsEditVersion="20220322",u._version="loading...(JS "+u._jsVersion+"."+u._jsEditVersion+")",u._license=!l&&document.currentScript&&(document.currentScript.getAttribute("data-license")||document.currentScript.getAttribute("data-productKeys")||document.currentScript.getAttribute("data-licenseKey")||document.currentScript.getAttribute("data-handshakeCode")||document.currentScript.getAttribute("data-organizationID"))||"",u._sessionPassword=!l&&document.currentScript&&document.currentScript.getAttribute("data-sessionPassword")||"",u.browserInfo=function(){if(!l){var e={init:function(){this.browser=this.searchString(this.dataBrowser)||"unknownBrowser",this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"unknownVersion",this.OS=this.searchString(this.dataOS)||"unknownOS","Linux"==this.OS&&-1!=navigator.userAgent.indexOf("Windows NT")&&(this.OS="HarmonyOS")},searchString:function(e){for(var t=0;t{if(!l&&document.currentScript){let e=document.currentScript.src,t=e.indexOf("?");if(-1!=t)e=e.substring(0,t);else{let t=e.indexOf("#");-1!=t&&(e=e.substring(0,t))}return e.substring(0,e.lastIndexOf("/")+1)}return"./"})(),u._licenseServer=[],u._deviceFriendlyName="",u._isShowRelDecodeTimeInResults=!1,u._bWasmDebug=!1,u._bNeverShowDialog=!1,u.__bUseFullFeature=!0,u._nextTaskID=0,u._taskCallbackMap=new Map,u._loadWasmStatus="unload",u._loadWasmCallbackArr=[],u._lastErrorCode=0,u._lastErrorString="",u._setWarnnedEx=new Set,u._loadWasmErr=null,"object"==typeof e&&e.process&&e.process.release&&e.process.release.name;class h extends u{constructor(){super(),this.intervalTime=0,this._intervalGetVideoFrame=0,this.array_getFrameTimeCost=[],this.array_decodeFrameTimeCost=[],this._indexCurrentDecodingFrame=0,this.resultsOverlay=null,this._bPauseScan=!1,this._intervalDetectVideoPause=1e3,this._soundOnSuccessfullRead=new Audio("data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjI5LjEwMAAAAAAAAAAAAAAA/+M4wAAAAAAAAAAAAEluZm8AAAAPAAAABQAAAkAAgICAgICAgICAgICAgICAgICAgKCgoKCgoKCgoKCgoKCgoKCgoKCgwMDAwMDAwMDAwMDAwMDAwMDAwMDg4ODg4ODg4ODg4ODg4ODg4ODg4P//////////////////////////AAAAAExhdmM1OC41NAAAAAAAAAAAAAAAACQEUQAAAAAAAAJAk0uXRQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/+MYxAANQAbGeUEQAAHZYZ3fASqD4P5TKBgocg+Bw/8+CAYBA4XB9/4EBAEP4nB9+UOf/6gfUCAIKyjgQ/Kf//wfswAAAwQA/+MYxAYOqrbdkZGQAMA7DJLCsQxNOij///////////+tv///3RWiZGBEhsf/FO/+LoCSFs1dFVS/g8f/4Mhv0nhqAieHleLy/+MYxAYOOrbMAY2gABf/////////////////usPJ66R0wI4boY9/8jQYg//g2SPx1M0N3Z0kVJLIs///Uw4aMyvHJJYmPBYG/+MYxAgPMALBucAQAoGgaBoFQVBUFQWDv6gZBUFQVBUGgaBr5YSgqCoKhIGg7+IQVBUFQVBoGga//SsFSoKnf/iVTEFNRTMu/+MYxAYAAANIAAAAADEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"),this.bPlaySoundOnSuccessfulRead=!1,this.bVibrateOnSuccessfulRead=!1,this.vibrateDuration=300,this.barcodeFillStyle="rgba(254,180,32,0.3)",this.barcodeStrokeStyle="rgba(254,180,32,0.9)",this.barcodeLineWidth=1,this.beingLazyDrawRegionsults=!1,this.dce=null,this._onCameraSelChange=()=>{},this._onResolutionSelChange=()=>{},this._onCloseBtnClick=()=>{},this._onPlayed=null}static get defaultUIElementURL(){var e;return null===(e=h._defaultUIElementURL)||void 0===e?void 0:e.replace("@engineResourcePath/",u.engineResourcePath)}static set defaultUIElementURL(e){h._defaultUIElementURL=e}getUIElement(){return this.dce.getUIElement()}setUIElement(e){return c(this,void 0,void 0,(function*(){yield this.dce.setUIElement(e)}))}get singleFrameMode(){return this.dce.singleFrameMode}set singleFrameMode(e){this.dce.singleFrameMode=e,e?(this.dce.ifShowScanRegionLaser=!1,(()=>{c(this,void 0,void 0,(function*(){let e=yield this.getScanSettings();e.oneDTrustFrameCount=1,yield this.updateScanSettings(e)}))})()):this.dce.ifShowScanRegionLaser=!0}_assertOpen(){if(!this.dce.isOpen())throw Error("The scanner is not open.")}get soundOnSuccessfullRead(){return this._soundOnSuccessfullRead}set soundOnSuccessfullRead(e){e instanceof HTMLAudioElement?this._soundOnSuccessfullRead=e:this._soundOnSuccessfullRead=new Audio(e)}get whenToPlaySoundforSuccessfulRead(){return!0===this.bPlaySoundOnSuccessfulRead?"frame":this.bPlaySoundOnSuccessfulRead?this.bPlaySoundOnSuccessfulRead:"never"}set whenToPlaySoundforSuccessfulRead(e){this.bPlaySoundOnSuccessfulRead="never"!==e&&e}get whenToVibrateforSuccessfulRead(){return!0===this.bVibrateOnSuccessfulRead?"frame":this.bVibrateOnSuccessfulRead?this.bVibrateOnSuccessfulRead:"never"}set whenToVibrateforSuccessfulRead(e){this.bVibrateOnSuccessfulRead="never"!==e&&e}set regionMaskFillStyle(e){this.dce.setScanRegionMaskStyle({regionMaskFillStyle:e})}get regionMaskFillStyle(){return this.dce.regionMaskFillStyle}set regionMaskStrokeStyle(e){this.dce.setScanRegionMaskStyle({regionMaskStrokeStyle:e})}get regionMaskStrokeStyle(){return this.dce.regionMaskStrokeStyle}set regionMaskLineWidth(e){this.dce.setScanRegionMaskStyle({regionMaskLineWidth:e})}get regionMaskLineWidth(){return this.dce.regionMaskLineWidth}set region(e){this._region=e,this.dce&&(e?e instanceof Array||this.dce.setScanRegion(e):this.dce.setScanRegion(null)),this.singleFrameMode||(this.beingLazyDrawRegionsults=!0),this.array_decodeFrameTimeCost.length=0,this.array_getFrameTimeCost.length=0,this._intervalGetVideoFrame=0}get region(){return this._region}set ifSaveOriginalImageInACanvas(e){this._ifSaveOriginalImageInACanvas=e,this.dce.frameColorMode=e?"rgba":"grey"}get ifSaveOriginalImageInACanvas(){return this._ifSaveOriginalImageInACanvas}createDCEInstance(){return c(this,void 0,void 0,(function*(){this.dce||(u._onLog&&u._onLog("createDCEInstance()"),s["a"].defaultUIElementURL=null,this.dce=yield s["a"].createInstance(),this.dce.refreshInterval=200,this.dce.frameColorMode="grey",this.dce.maxCvsSideLength="iPhone"==h.browserInfo.OS||"Android"==h.browserInfo.OS?2048:4096,this.dce.on("cameraChange",()=>{this.array_decodeFrameTimeCost.length=0,this.array_getFrameTimeCost.length=0,this._intervalGetVideoFrame=0}),this.dce.on("resolutionChange",()=>{this.array_decodeFrameTimeCost.length=0,this.array_getFrameTimeCost.length=0,this._intervalGetVideoFrame=0}),this.dce.on("cameraClose",()=>{this.array_decodeFrameTimeCost.length=0,this.array_getFrameTimeCost.length=0,this._intervalGetVideoFrame=0,this._bPauseScan=!1}),this.dce.on("singleFrameAcquired",e=>c(this,void 0,void 0,(function*(){if(!e)return;if(!e.data)return;const t=yield this._decode_DCEFrame(e);yield this.clearMapDecodeRecord();for(let e of t)delete e.bUnduplicated;if(this._drawResults(t),this.onFrameRead&&this.isOpen()&&!this._bPauseScan&&this.onFrameRead(t),this.onUniqueRead&&this.isOpen()&&!this._bPauseScan)for(let e of t)this.onUniqueRead(e.barcodeText,e)}))))}))}static createInstance(e){return c(this,void 0,void 0,(function*(){let t=new h;yield t.createDCEInstance(),t._instanceID=yield h.createInstanceInWorker(!0),"string"==typeof e&&(e=JSON.parse(e));for(let n in e)t[n]=e[n];return yield t.setUIElement(h.defaultUIElementURL),t.singleFrameMode&&console.warn("The `navigator.mediaDevices.getUserMedia` is unavailable. automatically change to `singleFrameMode`."),t.singleFrameMode||(yield t.updateRuntimeSettings("single")),t}))}decodeCurrentFrame(e){return c(this,void 0,void 0,(function*(){this._assertOpen();let t=null;e&&e.region&&(t=e.region);let n=this.dce._getVideoFrame(t);return this._decode_DCEFrame(n)}))}clearMapDecodeRecord(){return c(this,void 0,void 0,(function*(){return yield new Promise((e,t)=>{let n=u._nextTaskID++;u._taskCallbackMap.set(n,n=>{if(n.success)return e();{let e=new Error(n.message);return e.stack=n.stack+"\n"+e.stack,t(e)}}),u._dbrWorker.postMessage({type:"clearMapDecodeRecord",id:n,instanceID:this._instanceID})})}))}static isRegionNormalPreset(e){return 0==e.regionLeft&&0==e.regionTop&&0==e.regionRight&&0==e.regionBottom&&0==e.regionMeasuredByPercentage}updateRuntimeSettings(e){return c(this,void 0,void 0,(function*(){let t;if("string"==typeof e)if("speed"==e){let e=yield this.getRuntimeSettings();yield this.resetRuntimeSettings(),t=yield this.getRuntimeSettings(),t.barcodeFormatIds=e.barcodeFormatIds,t.barcodeFormatIds_2=e.barcodeFormatIds_2,e.region||(t.region=e.region)}else if("balance"==e){let e=yield this.getRuntimeSettings();yield this.resetRuntimeSettings(),t=yield this.getRuntimeSettings(),t.barcodeFormatIds=e.barcodeFormatIds,t.barcodeFormatIds_2=e.barcodeFormatIds_2,e.region||(t.region=e.region),t.deblurLevel=3,t.expectedBarcodesCount=512,t.localizationModes=[2,16,0,0,0,0,0,0],t.timeout=1e5}else if("coverage"==e){let e=yield this.getRuntimeSettings();yield this.resetRuntimeSettings(),t=yield this.getRuntimeSettings(),t.barcodeFormatIds=e.barcodeFormatIds,t.barcodeFormatIds_2=e.barcodeFormatIds_2,e.region||(t.region=e.region),t.deblurLevel=5,t.expectedBarcodesCount=512,t.scaleDownThreshold=1e5,t.localizationModes=[2,16,4,8,0,0,0,0],t.timeout=1e5}else if("single"==e){let e=yield this.getRuntimeSettings();yield this.resetRuntimeSettings(),t=yield this.getRuntimeSettings(),t.barcodeFormatIds=e.barcodeFormatIds,t.barcodeFormatIds_2=e.barcodeFormatIds_2,h.isRegionNormalPreset(e.region)?t.region=null:t.region=e.region,t.expectedBarcodesCount=1,t.localizationModes=[16,2,0,0,0,0,0,0],t.barcodeZoneMinDistanceToImageBorders=0}else t=JSON.parse(e);else{if("object"!=typeof e)throw TypeError("'UpdateRuntimeSettings(settings)': Type of 'settings' should be 'string' or 'PlainObject'.");if(t=JSON.parse(JSON.stringify(e)),t.region instanceof Array){let n=e.region;[n.regionLeft,n.regionTop,n.regionLeft,n.regionBottom,n.regionMeasuredByPercentage].some(e=>void 0!==e)&&(t.region={regionLeft:n.regionLeft||0,regionTop:n.regionTop||0,regionRight:n.regionRight||0,regionBottom:n.regionBottom||0,regionMeasuredByPercentage:n.regionMeasuredByPercentage||0})}}if(!u._bUseFullFeature){if(0!=(t.barcodeFormatIds&~(a.BF_ONED|a.BF_QR_CODE|a.BF_PDF417|a.BF_DATAMATRIX))||0!=t.barcodeFormatIds_2)throw Error("Some of the specified barcode formats are not supported in the compact version. Please try the full-featured version.");if(0!=t.intermediateResultTypes)throw Error("Intermediate results is not supported in the compact version. Please try the full-featured version.")}{let e=t.region;if(this.bFilterRegionInJs?this.userDefinedRegion=JSON.parse(JSON.stringify(e)):this.userDefinedRegion=null,e instanceof Array)if(e.length){for(let t=0;t{let r=u._nextTaskID++;u._taskCallbackMap.set(r,t=>{if(t.success){try{this._handleRetJsonString(t.updateReturn)}catch(e){n(e)}return e()}{let e=new Error(t.message);return e.stack=t.stack+"\n"+e.stack,n(e)}}),u._dbrWorker.postMessage({type:"updateRuntimeSettings",id:r,instanceID:this._instanceID,body:{settings:JSON.stringify(t)}})}),"single"==e&&(yield this.setModeArgument("BinarizationModes",0,"EnableFillBinaryVacancy","0"),yield this.setModeArgument("LocalizationModes",0,"ScanDirection","2"),yield this.setModeArgument("BinarizationModes",0,"BlockSizeX","71"),yield this.setModeArgument("BinarizationModes",0,"BlockSizeY","71"))}))}_bindUI(){if(!this.getUIElement())throw new Error("Need to define `UIElement` before opening.");if(this.dce._bindUI(),!this.dce.video)throw this._unbindUI(),Error("Can not find the video container element with class 'dce-video-container'")}_unbindUI(){this.dce._unbindUI()}set onPlayed(e){this.dce.off("played",this._onPlayed),this._onPlayed=e,this.dce.on("played",this._onPlayed)}get onPlayed(){return this._onPlayed}getAllCameras(){return c(this,void 0,void 0,(function*(){return this.dce.getAllCameras()}))}getCurrentCamera(){return c(this,void 0,void 0,(function*(){return this.dce.getSelectedCamera()}))}setCurrentCamera(e){return c(this,void 0,void 0,(function*(){return this.dce.selectCamera(e)}))}getResolution(){return this.dce.getResolution()}setResolution(e,t){return c(this,void 0,void 0,(function*(){return this.dce.setResolution(e,t)}))}getScanSettings(){return c(this,void 0,void 0,(function*(){return yield new Promise((e,t)=>{let n=u._nextTaskID++;u._taskCallbackMap.set(n,n=>{if(n.success){let t=n.results;return t.intervalTime=this.intervalTime,t.whenToPlaySoundforSuccessfulRead=this.whenToPlaySoundforSuccessfulRead,t.soundOnSuccessfullRead=this.soundOnSuccessfullRead.src,t.whenToVibrateforSuccessfulRead=this.whenToVibrateforSuccessfulRead,t.vibrateDuration=this.vibrateDuration,e(t)}{let e=new Error(n.message);return e.stack+="\n"+n.stack,t(e)}}),u._dbrWorker.postMessage({type:"getScanSettings",id:n,instanceID:this._instanceID})})}))}updateScanSettings(e){return c(this,void 0,void 0,(function*(){if(!e)return;const t=JSON.parse(JSON.stringify(e));return t.hasOwnProperty("intervalTime")&&(this.intervalTime=t.intervalTime,delete t.intervalTime),t.hasOwnProperty("whenToPlaySoundforSuccessfulRead")&&(this.whenToPlaySoundforSuccessfulRead=t.whenToPlaySoundforSuccessfulRead,delete t.whenToPlaySoundforSuccessfulRead),t.hasOwnProperty("soundOnSuccessfullRead")&&(this.soundOnSuccessfullRead.src=t.soundOnSuccessfullRead,delete t.soundOnSuccessfullRead),t.hasOwnProperty("whenToVibrateforSuccessfulRead")&&(this.whenToVibrateforSuccessfulRead=t.whenToVibrateforSuccessfulRead,delete t.whenToVibrateforSuccessfulRead),t.hasOwnProperty("vibrateDuration")&&(this.vibrateDuration=t.vibrateDuration,delete t.vibrateDuration),yield new Promise((e,n)=>{let r=u._nextTaskID++;u._taskCallbackMap.set(r,t=>{if(t.success)return e();{let e=new Error(t.message);return e.stack+="\n"+t.stack,n(e)}}),h._dbrWorker.postMessage({type:"updateScanSettings",id:r,instanceID:this._instanceID,body:{settings:t}})})}))}getVideoSettings(){return this.dce.getVideoSettings()}updateVideoSettings(e){return this.dce.updateVideoSettings(e)}isOpen(){return this.dce&&this.dce.isOpen()}stop(){this.dce.stop(),this.dce.hideScanRegionLaser(),this.dce.hideViewDecorator(),this.dce.hideScanRegionOverlays(),this._drawResults(null),this.array_decodeFrameTimeCost.length=0,this.array_getFrameTimeCost.length=0,this._intervalGetVideoFrame=0}pause(){this.dce.pause()}play(e,t,n){return c(this,void 0,void 0,(function*(){return this.dce.play(e,t,n)}))}pauseScan(){this._assertOpen(),this._bPauseScan=!0,this.dce.ifShowScanRegionLaser=!1}resumeScan(){this._assertOpen(),this._bPauseScan=!1,this.dce.ifShowScanRegionLaser=!0}getCapabilities(){return this.dce.getCapabilities()}getCameraSettings(){return this.dce.getCameraSettings()}getConstraints(){return this.dce.getConstraints()}applyConstraints(e){return c(this,void 0,void 0,(function*(){return this.dce.applyConstraints(e)}))}turnOnTorch(){return c(this,void 0,void 0,(function*(){return this.dce.turnOnTorch()}))}turnOffTorch(){return c(this,void 0,void 0,(function*(){return this.dce.turnOffTorch()}))}setColorTemperature(e){return c(this,void 0,void 0,(function*(){return this.dce.setColorTemperature(e)}))}setExposureCompensation(e){return c(this,void 0,void 0,(function*(){return this.dce.setExposureCompensation(e)}))}setZoom(e){return c(this,void 0,void 0,(function*(){return this.dce.setZoom(e)}))}setFrameRate(e){return c(this,void 0,void 0,(function*(){return this.dce.setFrameRate(e)}))}getFrameRate(){return this.dce.getFrameRate()}setFocus(e,t){return c(this,void 0,void 0,(function*(){return this.dce.setFocus(e,t)}))}getFocus(){return this.dce.getFocus()}_cloneDecodeResults(e){if(e instanceof Array){let t=[];for(let n of e)t.push(this._cloneDecodeResults(n));return t}{let t=e;return JSON.parse(JSON.stringify(t,(e,t)=>"oriVideoCanvas"==e||"searchRegionCanvas"==e?void 0:t))}}_loopReadVideo(){return c(this,void 0,void 0,(function*(){if(this.bDestroyed)return void this.dce.stopFetchingLoop();if(!this.isOpen())return this.dce.stopFetchingLoop(),void(yield this.clearMapDecodeRecord());if(!this.dce.video||this.dce.video.paused||this._bPauseScan)return u._onLog&&u._onLog("Video or scan is paused. Ask in 1s."),this.dce.stopFetchingLoop(),yield this.clearMapDecodeRecord(),this._loopReadVideoTimeoutId&&clearTimeout(this._loopReadVideoTimeoutId),void(this._loopReadVideoTimeoutId=setTimeout(()=>{this._loopReadVideo()},this._intervalDetectVideoPause));this.dce.ifShowScanRegionLaser=!0,u._onLog&&u._onLog("======= once read ======="),u._onLog&&(this._timeStartDecode=Date.now());const e=this._getVideoFrame();if(!e)return this._loopReadVideoTimeoutId&&clearTimeout(this._loopReadVideoTimeoutId),void(this._loopReadVideoTimeoutId=setTimeout(()=>{this._loopReadVideo()},0));(()=>c(this,void 0,void 0,(function*(){return e._bUseWebGL||"grey"!==e.colorMode||(this.dce.frameColorMode="rgba"),this._decode_DCEFrame(e)})))().then(e=>{u._onLog&&u._onLog(e);let t=this.array_decodeFrameTimeCost,n=this.array_getFrameTimeCost,r=this._indexCurrentDecodingFrame;if((()=>{if(this.region instanceof Array){for(t[r]&&t[r]instanceof Array||(t[r]=[]);t[r].length>=5;)t[r].shift();t[r].push(this._lastInnerDecodeDuration)}else{for(;t.length>=5;)t.shift();t.push(this._lastInnerDecodeDuration)}})(),this._intervalGetVideoFrame=(()=>{let e=0;if(this.region instanceof Array){let i=0,o=0;i=r+1>=this.region.length?0:r+1,o=i+1>=this.region.length?0:i+1,e=t[i]&&t[i].length&&n[o]&&n[o].length?Math.min(...t[i])-Math.max(...n[o]):0}else if(n&&n.length){let r=Math.min(...t),i=Math.max(...n);r&&i&&(e=r-i)}else e=0;return e>0?e:0})()+this.intervalTime,this.isOpen()&&this.dce.video&&!this.dce.video.paused&&!this._bPauseScan){if(this.bPlaySoundOnSuccessfulRead&&e.length){let t=!1;if(!0===this.bPlaySoundOnSuccessfulRead||"frame"===this.bPlaySoundOnSuccessfulRead)t=!0;else if("unique"===this.bPlaySoundOnSuccessfulRead)for(let n of e)if(n.bUnduplicated){t=!0;break}t&&(this.soundOnSuccessfullRead.currentTime=0,this.soundOnSuccessfullRead.play().catch(e=>{console.warn("Autoplay not allowed. User interaction required: "+(e.message||e))}))}if(navigator.vibrate&&this.bVibrateOnSuccessfulRead&&e.length){let t=!1;if(!0===this.bVibrateOnSuccessfulRead||"frame"===this.bVibrateOnSuccessfulRead)t=!0;else if("unique"===this.bVibrateOnSuccessfulRead)for(let n of e)if(n.bUnduplicated){t=!0;break}if(t)try{navigator.vibrate(this.vibrateDuration)}catch(e){console.warn("Vibration not allowed. User interaction required: "+(e.message||e))}}if(this.onFrameRead){let t=this._cloneDecodeResults(e);for(let e of t)delete e.bUnduplicated;this.onFrameRead(t)}if(this.onUniqueRead)for(let t of e)t.bUnduplicated&&this.onUniqueRead(t.barcodeText,this._cloneDecodeResults(t));this._drawResults(e)}this._loopReadVideoTimeoutId&&clearTimeout(this._loopReadVideoTimeoutId),this.intervalTime?this._loopReadVideoTimeoutId=setTimeout(()=>{this._loopReadVideo()},this.intervalTime):this._loopReadVideo()}).catch(e=>{this.dce.stopFetchingLoop(),u._onLog&&u._onLog(e.message||e),this._loopReadVideoTimeoutId&&clearTimeout(this._loopReadVideoTimeoutId),this._loopReadVideoTimeoutId=setTimeout(()=>{this._loopReadVideo()},Math.max(this.intervalTime,1e3)),"platform error"==e.message||console.warn(e.message)})}))}_getVideoFrame(){let e=this.dce.isFetchingLoopStarted();if(this.dce.loopInterval=this._intervalGetVideoFrame,e||this.dce.startFetchingLoop(),!this.dce.numberOfFramesInBuffer)return this.dce.loopInterval=0,null;const t=this.dce.getFrameFromBuffer();return(e=>{let t=e.timeSpent,n=this.array_getFrameTimeCost;if(this.region instanceof Array){let e=this._indexCurrentDecodingFrame;for(n[e]&&n[e]instanceof Array||(n[e]=[]);n[e].length>=5;)n[e].shift();n[e].push(t)}else{for(;n.length>=5;)n.shift();n.push(t)}})(t),t}_drawResults(e){if(!this.dce)return;this.resultsOverlay||(this.resultsOverlay=this.dce.addScanRegionOverlayCanvas());const t=this.resultsOverlay.getContext("2d");if(t.clearRect(0,0,this.resultsOverlay.width,this.resultsOverlay.height),e){t.globalCompositeOperation="destination-over",t.fillStyle=this.barcodeFillStyle,t.strokeStyle=this.barcodeStrokeStyle,t.lineWidth=this.barcodeLineWidth;for(let n of e){let e=n.localizationResult;t.beginPath(),t.moveTo(e.x1,e.y1),t.lineTo(e.x2,e.y2),t.lineTo(e.x3,e.y3),t.lineTo(e.x4,e.y4),t.fill(),t.beginPath(),t.moveTo(e.x1,e.y1),t.lineTo(e.x2,e.y2),t.lineTo(e.x3,e.y3),t.lineTo(e.x4,e.y4),t.closePath(),t.stroke()}}}open(){return c(this,void 0,void 0,(function*(){this._bindUI();let e=yield this.dce.open();return this._bPauseScan=!1,this.singleFrameMode||(this._loopReadVideoTimeoutId&&clearTimeout(this._loopReadVideoTimeoutId),this._loopReadVideo()),e}))}openVideo(){return c(this,void 0,void 0,(function*(){this._bindUI();let e=yield this.dce.open();return this._bPauseScan=!0,this.singleFrameMode||(this._loopReadVideoTimeoutId&&clearTimeout(this._loopReadVideoTimeoutId),this._loopReadVideo()),e}))}close(){this.dce.close(),this._bPauseScan=!0}show(){return c(this,void 0,void 0,(function*(){this._bindUI();let e=yield this.dce.open(!0);return this._bPauseScan=!1,this.singleFrameMode||(this._loopReadVideoTimeoutId&&clearTimeout(this._loopReadVideoTimeoutId),this._loopReadVideo()),e}))}showVideo(){return c(this,void 0,void 0,(function*(){this._bindUI();let e=yield this.dce.open(!0);return this._bPauseScan=!0,this.singleFrameMode||(this._loopReadVideoTimeoutId&&clearTimeout(this._loopReadVideoTimeoutId),this._loopReadVideo()),e}))}hide(){this.dce.close(!0),this._bPauseScan=!0}destroyContext(){this.close(),this.bDestroyed||super.destroyContext()}}var f,g,_,p,v,m,y,S,b,R,E,I,A,w,C,T,O,D,M,L,x,F,N,P,B,k,V;h._defaultUIElementURL="@engineResourcePath/dbr.ui.html",function(e){e[e.BICM_DARK_ON_LIGHT=1]="BICM_DARK_ON_LIGHT",e[e.BICM_LIGHT_ON_DARK=2]="BICM_LIGHT_ON_DARK",e[e.BICM_DARK_ON_DARK=4]="BICM_DARK_ON_DARK",e[e.BICM_LIGHT_ON_LIGHT=8]="BICM_LIGHT_ON_LIGHT",e[e.BICM_DARK_LIGHT_MIXED=16]="BICM_DARK_LIGHT_MIXED",e[e.BICM_DARK_ON_LIGHT_DARK_SURROUNDING=32]="BICM_DARK_ON_LIGHT_DARK_SURROUNDING",e[e.BICM_SKIP=0]="BICM_SKIP",e[e.BICM_REV=2147483648]="BICM_REV"}(f||(f={})),function(e){e[e.BCM_AUTO=1]="BCM_AUTO",e[e.BCM_GENERAL=2]="BCM_GENERAL",e[e.BCM_SKIP=0]="BCM_SKIP",e[e.BCM_REV=2147483648]="BCM_REV"}(g||(g={})),function(e){e[e.BF2_NULL=0]="BF2_NULL",e[e.BF2_POSTALCODE=32505856]="BF2_POSTALCODE",e[e.BF2_NONSTANDARD_BARCODE=1]="BF2_NONSTANDARD_BARCODE",e[e.BF2_USPSINTELLIGENTMAIL=1048576]="BF2_USPSINTELLIGENTMAIL",e[e.BF2_POSTNET=2097152]="BF2_POSTNET",e[e.BF2_PLANET=4194304]="BF2_PLANET",e[e.BF2_AUSTRALIANPOST=8388608]="BF2_AUSTRALIANPOST",e[e.BF2_RM4SCC=16777216]="BF2_RM4SCC",e[e.BF2_DOTCODE=2]="BF2_DOTCODE",e[e.BF2_PHARMACODE_ONE_TRACK=4]="BF2_PHARMACODE_ONE_TRACK",e[e.BF2_PHARMACODE_TWO_TRACK=8]="BF2_PHARMACODE_TWO_TRACK",e[e.BF2_PHARMACODE=12]="BF2_PHARMACODE"}(_||(_={})),function(e){e[e.BM_AUTO=1]="BM_AUTO",e[e.BM_LOCAL_BLOCK=2]="BM_LOCAL_BLOCK",e[e.BM_SKIP=0]="BM_SKIP",e[e.BM_THRESHOLD=4]="BM_THRESHOLD",e[e.BM_REV=2147483648]="BM_REV"}(p||(p={})),function(e){e[e.ECCM_CONTRAST=1]="ECCM_CONTRAST"}(v||(v={})),function(e){e[e.CFM_GENERAL=1]="CFM_GENERAL"}(m||(m={})),function(e){e[e.CCM_AUTO=1]="CCM_AUTO",e[e.CCM_GENERAL_HSV=2]="CCM_GENERAL_HSV",e[e.CCM_SKIP=0]="CCM_SKIP",e[e.CCM_REV=2147483648]="CCM_REV"}(y||(y={})),function(e){e[e.CICM_GENERAL=1]="CICM_GENERAL",e[e.CICM_SKIP=0]="CICM_SKIP",e[e.CICM_REV=2147483648]="CICM_REV"}(S||(S={})),function(e){e[e.CM_IGNORE=1]="CM_IGNORE",e[e.CM_OVERWRITE=2]="CM_OVERWRITE"}(b||(b={})),function(e){e[e.DM_SKIP=0]="DM_SKIP",e[e.DM_DIRECT_BINARIZATION=1]="DM_DIRECT_BINARIZATION",e[e.DM_THRESHOLD_BINARIZATION=2]="DM_THRESHOLD_BINARIZATION",e[e.DM_GRAY_EQUALIZATION=4]="DM_GRAY_EQUALIZATION",e[e.DM_SMOOTHING=8]="DM_SMOOTHING",e[e.DM_MORPHING=16]="DM_MORPHING",e[e.DM_DEEP_ANALYSIS=32]="DM_DEEP_ANALYSIS",e[e.DM_SHARPENING=64]="DM_SHARPENING",e[e.DM_BASED_ON_LOC_BIN=128]="DM_BASED_ON_LOC_BIN",e[e.DM_SHARPENING_SMOOTHING=256]="DM_SHARPENING_SMOOTHING"}(R||(R={})),function(e){e[e.DRM_AUTO=1]="DRM_AUTO",e[e.DRM_GENERAL=2]="DRM_GENERAL",e[e.DRM_BROAD_WARP=4]="DRM_BROAD_WARP",e[e.DRM_LOCAL_REFERENCE=8]="DRM_LOCAL_REFERENCE",e[e.DRM_DEWRINKLE=16]="DRM_DEWRINKLE",e[e.DRM_SKIP=0]="DRM_SKIP",e[e.DRM_REV=2147483648]="DRM_REV"}(E||(E={})),function(e){e[e.DPMCRM_AUTO=1]="DPMCRM_AUTO",e[e.DPMCRM_GENERAL=2]="DPMCRM_GENERAL",e[e.DPMCRM_SKIP=0]="DPMCRM_SKIP",e[e.DPMCRM_REV=2147483648]="DPMCRM_REV"}(I||(I={})),function(e){e[e.GTM_INVERTED=1]="GTM_INVERTED",e[e.GTM_ORIGINAL=2]="GTM_ORIGINAL",e[e.GTM_SKIP=0]="GTM_SKIP",e[e.GTM_REV=2147483648]="GTM_REV"}(A||(A={})),function(e){e[e.IPM_AUTO=1]="IPM_AUTO",e[e.IPM_GENERAL=2]="IPM_GENERAL",e[e.IPM_GRAY_EQUALIZE=4]="IPM_GRAY_EQUALIZE",e[e.IPM_GRAY_SMOOTH=8]="IPM_GRAY_SMOOTH",e[e.IPM_SHARPEN_SMOOTH=16]="IPM_SHARPEN_SMOOTH",e[e.IPM_MORPHOLOGY=32]="IPM_MORPHOLOGY",e[e.IPM_SKIP=0]="IPM_SKIP",e[e.IPM_REV=2147483648]="IPM_REV"}(w||(w={})),function(e){e[e.IRSM_MEMORY=1]="IRSM_MEMORY",e[e.IRSM_FILESYSTEM=2]="IRSM_FILESYSTEM",e[e.IRSM_BOTH=4]="IRSM_BOTH"}(C||(C={})),function(e){e[e.IRT_NO_RESULT=0]="IRT_NO_RESULT",e[e.IRT_ORIGINAL_IMAGE=1]="IRT_ORIGINAL_IMAGE",e[e.IRT_COLOUR_CLUSTERED_IMAGE=2]="IRT_COLOUR_CLUSTERED_IMAGE",e[e.IRT_COLOUR_CONVERTED_GRAYSCALE_IMAGE=4]="IRT_COLOUR_CONVERTED_GRAYSCALE_IMAGE",e[e.IRT_TRANSFORMED_GRAYSCALE_IMAGE=8]="IRT_TRANSFORMED_GRAYSCALE_IMAGE",e[e.IRT_PREDETECTED_REGION=16]="IRT_PREDETECTED_REGION",e[e.IRT_PREPROCESSED_IMAGE=32]="IRT_PREPROCESSED_IMAGE",e[e.IRT_BINARIZED_IMAGE=64]="IRT_BINARIZED_IMAGE",e[e.IRT_TEXT_ZONE=128]="IRT_TEXT_ZONE",e[e.IRT_CONTOUR=256]="IRT_CONTOUR",e[e.IRT_LINE_SEGMENT=512]="IRT_LINE_SEGMENT",e[e.IRT_FORM=1024]="IRT_FORM",e[e.IRT_SEGMENTATION_BLOCK=2048]="IRT_SEGMENTATION_BLOCK",e[e.IRT_TYPED_BARCODE_ZONE=4096]="IRT_TYPED_BARCODE_ZONE",e[e.IRT_PREDETECTED_QUADRILATERAL=8192]="IRT_PREDETECTED_QUADRILATERAL"}(T||(T={})),function(e){e[e.LM_SKIP=0]="LM_SKIP",e[e.LM_AUTO=1]="LM_AUTO",e[e.LM_CONNECTED_BLOCKS=2]="LM_CONNECTED_BLOCKS",e[e.LM_LINES=8]="LM_LINES",e[e.LM_STATISTICS=4]="LM_STATISTICS",e[e.LM_SCAN_DIRECTLY=16]="LM_SCAN_DIRECTLY",e[e.LM_STATISTICS_MARKS=32]="LM_STATISTICS_MARKS",e[e.LM_STATISTICS_POSTAL_CODE=64]="LM_STATISTICS_POSTAL_CODE",e[e.LM_CENTRE=128]="LM_CENTRE",e[e.LM_ONED_FAST_SCAN=256]="LM_ONED_FAST_SCAN",e[e.LM_REV=2147483648]="LM_REV"}(O||(O={})),function(e){e[e.PDFRM_RASTER=1]="PDFRM_RASTER",e[e.PDFRM_AUTO=2]="PDFRM_AUTO",e[e.PDFRM_VECTOR=4]="PDFRM_VECTOR",e[e.PDFRM_REV=2147483648]="PDFRM_REV"}(D||(D={})),function(e){e[e.QRECL_ERROR_CORRECTION_H=0]="QRECL_ERROR_CORRECTION_H",e[e.QRECL_ERROR_CORRECTION_L=1]="QRECL_ERROR_CORRECTION_L",e[e.QRECL_ERROR_CORRECTION_M=2]="QRECL_ERROR_CORRECTION_M",e[e.QRECL_ERROR_CORRECTION_Q=3]="QRECL_ERROR_CORRECTION_Q"}(M||(M={})),function(e){e[e.RPM_AUTO=1]="RPM_AUTO",e[e.RPM_GENERAL=2]="RPM_GENERAL",e[e.RPM_GENERAL_RGB_CONTRAST=4]="RPM_GENERAL_RGB_CONTRAST",e[e.RPM_GENERAL_GRAY_CONTRAST=8]="RPM_GENERAL_GRAY_CONTRAST",e[e.RPM_GENERAL_HSV_CONTRAST=16]="RPM_GENERAL_HSV_CONTRAST",e[e.RPM_SKIP=0]="RPM_SKIP",e[e.RPM_REV=2147483648]="RPM_REV"}(L||(L={})),function(e){e[e.RCT_PIXEL=1]="RCT_PIXEL",e[e.RCT_PERCENTAGE=2]="RCT_PERCENTAGE"}(x||(x={})),function(e){e[e.RT_STANDARD_TEXT=0]="RT_STANDARD_TEXT",e[e.RT_RAW_TEXT=1]="RT_RAW_TEXT",e[e.RT_CANDIDATE_TEXT=2]="RT_CANDIDATE_TEXT",e[e.RT_PARTIAL_TEXT=3]="RT_PARTIAL_TEXT"}(F||(F={})),function(e){e[e.SUM_AUTO=1]="SUM_AUTO",e[e.SUM_LINEAR_INTERPOLATION=2]="SUM_LINEAR_INTERPOLATION",e[e.SUM_NEAREST_NEIGHBOUR_INTERPOLATION=4]="SUM_NEAREST_NEIGHBOUR_INTERPOLATION",e[e.SUM_SKIP=0]="SUM_SKIP",e[e.SUM_REV=2147483648]="SUM_REV"}(N||(N={})),function(e){e[e.TP_REGION_PREDETECTED=1]="TP_REGION_PREDETECTED",e[e.TP_IMAGE_PREPROCESSED=2]="TP_IMAGE_PREPROCESSED",e[e.TP_IMAGE_BINARIZED=4]="TP_IMAGE_BINARIZED",e[e.TP_BARCODE_LOCALIZED=8]="TP_BARCODE_LOCALIZED",e[e.TP_BARCODE_TYPE_DETERMINED=16]="TP_BARCODE_TYPE_DETERMINED",e[e.TP_BARCODE_RECOGNIZED=32]="TP_BARCODE_RECOGNIZED"}(P||(P={})),function(e){e[e.TFM_AUTO=1]="TFM_AUTO",e[e.TFM_GENERAL_CONTOUR=2]="TFM_GENERAL_CONTOUR",e[e.TFM_SKIP=0]="TFM_SKIP",e[e.TFM_REV=2147483648]="TFM_REV"}(B||(B={})),function(e){e[e.TROM_CONFIDENCE=1]="TROM_CONFIDENCE",e[e.TROM_POSITION=2]="TROM_POSITION",e[e.TROM_FORMAT=4]="TROM_FORMAT",e[e.TROM_SKIP=0]="TROM_SKIP",e[e.TROM_REV=2147483648]="TROM_REV"}(k||(k={})),function(e){e[e.TDM_AUTO=1]="TDM_AUTO",e[e.TDM_GENERAL_WIDTH_CONCENTRATION=2]="TDM_GENERAL_WIDTH_CONCENTRATION",e[e.TDM_SKIP=0]="TDM_SKIP",e[e.TDM_REV=2147483648]="TDM_REV"}(V||(V={}))}).call(this,n("c8ba"))},ab36:function(e,t,n){var r=n("861d"),i=n("9112");e.exports=function(e,t){r(t)&&"cause"in t&&i(e,"cause",t.cause)}},ac1f:function(e,t,n){"use strict";var r=n("23e7"),i=n("9263");r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},ad6d:function(e,t,n){"use strict";var r=n("825a");e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},ae93:function(e,t,n){"use strict";var r,i,o,a=n("d039"),s=n("1626"),c=n("7c73"),l=n("e163"),d=n("6eeb"),u=n("b622"),h=n("c430"),f=u("iterator"),g=!1;[].keys&&(o=[].keys(),"next"in o?(i=l(l(o)),i!==Object.prototype&&(r=i)):g=!0);var _=void 0==r||a((function(){var e={};return r[f].call(e)!==e}));_?r={}:h&&(r=c(r)),s(r[f])||d(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:g}},aed9:function(e,t,n){var r=n("83ab"),i=n("d039");e.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},b041:function(e,t,n){"use strict";var r=n("00ee"),i=n("f5df");e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},b0c0:function(e,t,n){var r=n("83ab"),i=n("5e77").EXISTS,o=n("e330"),a=n("9bf2").f,s=Function.prototype,c=o(s.toString),l=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,d=o(l.exec),u="name";r&&!i&&a(s,u,{configurable:!0,get:function(){try{return d(l,c(this))[1]}catch(e){return""}}})},b575:function(e,t,n){var r,i,o,a,s,c,l,d,u=n("da84"),h=n("0366"),f=n("06cf").f,g=n("2cf4").set,_=n("1cdc"),p=n("d4c3"),v=n("a4b4"),m=n("605d"),y=u.MutationObserver||u.WebKitMutationObserver,S=u.document,b=u.process,R=u.Promise,E=f(u,"queueMicrotask"),I=E&&E.value;I||(r=function(){var e,t;m&&(e=b.domain)&&e.exit();while(i){t=i.fn,i=i.next;try{t()}catch(n){throw i?a():o=void 0,n}}o=void 0,e&&e.enter()},_||m||v||!y||!S?!p&&R&&R.resolve?(l=R.resolve(void 0),l.constructor=R,d=h(l.then,l),a=function(){d(r)}):m?a=function(){b.nextTick(r)}:(g=h(g,u),a=function(){g(r)}):(s=!0,c=S.createTextNode(""),new y(r).observe(c,{characterData:!0}),a=function(){c.data=s=!s})),e.exports=I||function(e){var t={fn:e,next:void 0};o&&(o.next=t),i||(i=t,a()),o=t}},b622:function(e,t,n){var r=n("da84"),i=n("5692"),o=n("1a2d"),a=n("90e3"),s=n("4930"),c=n("fdbf"),l=i("wks"),d=r.Symbol,u=d&&d["for"],h=c?d:d&&d.withoutSetter||a;e.exports=function(e){if(!o(l,e)||!s&&"string"!=typeof l[e]){var t="Symbol."+e;s&&o(d,e)?l[e]=d[e]:l[e]=c&&u?u(t):h(t)}return l[e]}},b727:function(e,t,n){var r=n("0366"),i=n("e330"),o=n("44ad"),a=n("7b0b"),s=n("07fa"),c=n("65f0"),l=i([].push),d=function(e){var t=1==e,n=2==e,i=3==e,d=4==e,u=6==e,h=7==e,f=5==e||u;return function(g,_,p,v){for(var m,y,S=a(g),b=o(S),R=r(_,p),E=s(b),I=0,A=v||c,w=t?A(g,E):n||h?A(g,0):void 0;E>I;I++)if((f||I in b)&&(m=b[I],y=R(m,I,S),e))if(t)w[I]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return I;case 2:l(w,m)}else switch(e){case 4:return!1;case 7:l(w,m)}return u?-1:i||d?d:w}};e.exports={forEach:d(0),map:d(1),filter:d(2),some:d(3),every:d(4),find:d(5),findIndex:d(6),filterReject:d(7)}},b85c:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0"),n("d9e2"),n("fb6a"),n("b0c0"),n("a630"),n("ac1f"),n("00b4");function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==n["return"]||n["return"]()}finally{if(c)throw a}}}}},b980:function(e,t,n){var r=n("d039"),i=n("5c6c");e.exports=!r((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",i(1,7)),7!==e.stack)}))},c04e:function(e,t,n){var r=n("da84"),i=n("c65b"),o=n("861d"),a=n("d9b5"),s=n("dc4a"),c=n("485a"),l=n("b622"),d=r.TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!o(e)||a(e))return e;var n,r=s(e,u);if(r){if(void 0===t&&(t="default"),n=i(r,e,t),!o(n)||a(n))return n;throw d("Can't convert object to primitive value")}return void 0===t&&(t="number"),c(e,t)}},c430:function(e,t){e.exports=!1},c65b:function(e,t,n){var r=n("40d5"),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},c6b6:function(e,t,n){var r=n("e330"),i=r({}.toString),o=r("".slice);e.exports=function(e){return o(i(e),8,-1)}},c6cd:function(e,t,n){var r=n("da84"),i=n("ce4e"),o="__core-js_shared__",a=r[o]||i(o,{});e.exports=a},c770:function(e,t,n){var r=n("e330"),i=r("".replace),o=function(e){return String(Error(e).stack)}("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,s=a.test(o);e.exports=function(e,t){if(s&&"string"==typeof e)while(t--)e=i(e,a,"");return e}},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},ca84:function(e,t,n){var r=n("e330"),i=n("1a2d"),o=n("fc6a"),a=n("4d64").indexOf,s=n("d012"),c=r([].push);e.exports=function(e,t){var n,r=o(e),l=0,d=[];for(n in r)!i(s,n)&&i(r,n)&&c(d,n);while(t.length>l)i(r,n=t[l++])&&(~a(d,n)||c(d,n));return d}},cc12:function(e,t,n){var r=n("da84"),i=n("861d"),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},cca6:function(e,t,n){var r=n("23e7"),i=n("60da");r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},cdf9:function(e,t,n){var r=n("825a"),i=n("861d"),o=n("f069");e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e),a=n.resolve;return a(t),n.promise}},ce4e:function(e,t,n){var r=n("da84"),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},d012:function(e,t){e.exports={}},d039:function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},d066:function(e,t,n){var r=n("da84"),i=n("1626"),o=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e]):r[e]&&r[e][t]}},d1e7:function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);t.f=o?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},d28b:function(e,t,n){var r=n("746f");r("iterator")},d2bb:function(e,t,n){var r=n("e330"),i=n("825a"),o=n("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{e=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),e(n,[]),t=n instanceof Array}catch(a){}return function(n,r){return i(n),o(r),t?e(n,r):n.__proto__=r,n}}():void 0)},d3b7:function(e,t,n){var r=n("00ee"),i=n("6eeb"),o=n("b041");r||i(Object.prototype,"toString",o,{unsafe:!0})},d44e:function(e,t,n){var r=n("9bf2").f,i=n("1a2d"),o=n("b622"),a=o("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!i(e,a)&&r(e,a,{configurable:!0,value:t})}},d4c3:function(e,t,n){var r=n("342f"),i=n("da84");e.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==i.Pebble},d6d6:function(e,t,n){var r=n("da84"),i=r.TypeError;e.exports=function(e,t){if(e=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");var g=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!l&&d&&"values"!==g.name)try{s(g,"name",{value:"values"})}catch(_){}},e2cc:function(e,t,n){var r=n("6eeb");e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},e330:function(e,t,n){var r=n("40d5"),i=Function.prototype,o=i.bind,a=i.call,s=r&&o.bind(a,a);e.exports=r?function(e){return e&&s(e)}:function(e){return e&&function(){return a.apply(e,arguments)}}},e391:function(e,t,n){var r=n("577e");e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},e538:function(e,t,n){var r=n("b622");t.f=r},e5cb:function(e,t,n){"use strict";var r=n("d066"),i=n("1a2d"),o=n("9112"),a=n("3a9b"),s=n("d2bb"),c=n("e893"),l=n("7156"),d=n("e391"),u=n("ab36"),h=n("c770"),f=n("b980"),g=n("c430");e.exports=function(e,t,n,_){var p=_?2:1,v=e.split("."),m=v[v.length-1],y=r.apply(null,v);if(y){var S=y.prototype;if(!g&&i(S,"cause")&&delete S.cause,!n)return y;var b=r("Error"),R=t((function(e,t){var n=d(_?t:e,void 0),r=_?new y(e):new y;return void 0!==n&&o(r,"message",n),f&&o(r,"stack",h(r.stack,2)),this&&a(S,this)&&l(r,this,R),arguments.length>p&&u(r,arguments[p]),r}));if(R.prototype=S,"Error"!==m&&(s?s(R,b):c(R,b,{name:!0})),c(R,y),!g)try{S.name!==m&&o(S,"name",m),S.constructor=R}catch(E){}return R}}},e667:function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},e6cf:function(e,t,n){"use strict";var r,i,o,a,s=n("23e7"),c=n("c430"),l=n("da84"),d=n("d066"),u=n("c65b"),h=n("fea9"),f=n("6eeb"),g=n("e2cc"),_=n("d2bb"),p=n("d44e"),v=n("2626"),m=n("59ed"),y=n("1626"),S=n("861d"),b=n("19aa"),R=n("8925"),E=n("2266"),I=n("1c7e"),A=n("4840"),w=n("2cf4").set,C=n("b575"),T=n("cdf9"),O=n("44de"),D=n("f069"),M=n("e667"),L=n("01b4"),x=n("69f3"),F=n("94ca"),N=n("b622"),P=n("6069"),B=n("605d"),k=n("2d00"),V=N("species"),U="Promise",G=x.getterFor(U),j=x.set,W=x.getterFor(U),$=h&&h.prototype,H=h,J=$,K=l.TypeError,Y=l.document,Q=l.process,X=D.f,z=X,Z=!!(Y&&Y.createEvent&&l.dispatchEvent),q=y(l.PromiseRejectionEvent),ee="unhandledrejection",te="rejectionhandled",ne=0,re=1,ie=2,oe=1,ae=2,se=!1,ce=F(U,(function(){var e=R(H),t=e!==String(H);if(!t&&66===k)return!0;if(c&&!J["finally"])return!0;if(k>=51&&/native code/.test(e))return!1;var n=new H((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))},i=n.constructor={};return i[V]=r,se=n.then((function(){}))instanceof r,!se||!t&&P&&!q})),le=ce||!I((function(e){H.all(e)["catch"]((function(){}))})),de=function(e){var t;return!(!S(e)||!y(t=e.then))&&t},ue=function(e,t){var n,r,i,o=t.value,a=t.state==re,s=a?e.ok:e.fail,c=e.resolve,l=e.reject,d=e.domain;try{s?(a||(t.rejection===ae&&pe(t),t.rejection=oe),!0===s?n=o:(d&&d.enter(),n=s(o),d&&(d.exit(),i=!0)),n===e.promise?l(K("Promise-chain cycle")):(r=de(n))?u(r,n,c,l):c(n)):l(o)}catch(h){d&&!i&&d.exit(),l(h)}},he=function(e,t){e.notified||(e.notified=!0,C((function(){var n,r=e.reactions;while(n=r.get())ue(n,e);e.notified=!1,t&&!e.rejection&&ge(e)})))},fe=function(e,t,n){var r,i;Z?(r=Y.createEvent("Event"),r.promise=t,r.reason=n,r.initEvent(e,!1,!0),l.dispatchEvent(r)):r={promise:t,reason:n},!q&&(i=l["on"+e])?i(r):e===ee&&O("Unhandled promise rejection",n)},ge=function(e){u(w,l,(function(){var t,n=e.facade,r=e.value,i=_e(e);if(i&&(t=M((function(){B?Q.emit("unhandledRejection",r,n):fe(ee,n,r)})),e.rejection=B||_e(e)?ae:oe,t.error))throw t.value}))},_e=function(e){return e.rejection!==oe&&!e.parent},pe=function(e){u(w,l,(function(){var t=e.facade;B?Q.emit("rejectionHandled",t):fe(te,t,e.value)}))},ve=function(e,t,n){return function(r){e(t,r,n)}},me=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=ie,he(e,!0))},ye=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw K("Promise can't be resolved itself");var r=de(t);r?C((function(){var n={done:!1};try{u(r,t,ve(ye,n,e),ve(me,n,e))}catch(i){me(n,i,e)}})):(e.value=t,e.state=re,he(e,!1))}catch(i){me({done:!1},i,e)}}};if(ce&&(H=function(e){b(this,J),m(e),u(r,this);var t=G(this);try{e(ve(ye,t),ve(me,t))}catch(n){me(t,n)}},J=H.prototype,r=function(e){j(this,{type:U,done:!1,notified:!1,parent:!1,reactions:new L,rejection:!1,state:ne,value:void 0})},r.prototype=g(J,{then:function(e,t){var n=W(this),r=X(A(this,H));return n.parent=!0,r.ok=!y(e)||e,r.fail=y(t)&&t,r.domain=B?Q.domain:void 0,n.state==ne?n.reactions.add(r):C((function(){ue(r,n)})),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r,t=G(e);this.promise=e,this.resolve=ve(ye,t),this.reject=ve(me,t)},D.f=X=function(e){return e===H||e===o?new i(e):z(e)},!c&&y(h)&&$!==Object.prototype)){a=$.then,se||(f($,"then",(function(e,t){var n=this;return new H((function(e,t){u(a,n,e,t)})).then(e,t)}),{unsafe:!0}),f($,"catch",J["catch"],{unsafe:!0}));try{delete $.constructor}catch(Se){}_&&_($,J)}s({global:!0,wrap:!0,forced:ce},{Promise:H}),p(H,U,!1,!0),v(U),o=d(U),s({target:U,stat:!0,forced:ce},{reject:function(e){var t=X(this);return u(t.reject,void 0,e),t.promise}}),s({target:U,stat:!0,forced:c||ce},{resolve:function(e){return T(c&&this===o?H:this,e)}}),s({target:U,stat:!0,forced:le},{all:function(e){var t=this,n=X(t),r=n.resolve,i=n.reject,o=M((function(){var n=m(t.resolve),o=[],a=0,s=1;E(e,(function(e){var c=a++,l=!1;s++,u(n,t,e).then((function(e){l||(l=!0,o[c]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=X(t),r=n.reject,i=M((function(){var i=m(t.resolve);E(e,(function(e){u(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},e893:function(e,t,n){var r=n("1a2d"),i=n("56ef"),o=n("06cf"),a=n("9bf2");e.exports=function(e,t,n){for(var s=i(t),c=a.f,l=o.f,d=0;db)', 'g') -> /(?b)/g and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nmodule.exports = fails(function () {\n var re = $RegExp('(?b)', 'g');\n return re.exec('b').groups.a !== 'b' ||\n 'b'.replace(re, '$c') !== 'bc';\n});\n","// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = function (argument) {\n return typeof argument == 'function';\n};\n","var global = require('../internals/global');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\n\nvar TypeError = global.TypeError;\n\nmodule.exports = function (it, Prototype) {\n if (isPrototypeOf(Prototype, it)) return it;\n throw TypeError('Incorrect invocation');\n};\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar toObject = require('../internals/to-object');\n\nvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty(toObject(it), key);\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","var userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent);\n","var global = require('../internals/global');\n\nvar TypeError = global.TypeError;\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","/*!\n * Dynamsoft JavaScript Library\n * @product Dynamsoft Camera Enhancer JS Edition\n * @website https://www.dynamsoft.com\n * @copyright Copyright 2022, Dynamsoft Corporation\n * @author Dynamsoft\n * @version 2.3.1 (js 20220321)\n * @fileoverview Dynamsoft JavaScript Library for Camera Enhancer\n * More info on DCE JS: https://www.dynamsoft.com/camera-enhancer/docs/programming/javascript/?ver=latest\n */\nfunction e(e,t,i,o){return new(i||(i=Promise))((function(r,s){function n(e){try{h(o.next(e))}catch(e){s(e)}}function a(e){try{h(o.throw(e))}catch(e){s(e)}}function h(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(n,a)}h((o=o.apply(e,t||[])).next())}))}\"object\"==typeof global&&global.process&&global.process.release&&global.process.release.name;const t=\"undefined\"==typeof self;class i{constructor(){this._maxCvsSideLength=void 0,this._defaultMaxCvsSideLength=null,this.predefinedResolutions=[{width:160,height:120},{width:320,height:240},{width:480,height:360},{width:640,height:480},{width:800,height:600},{width:960,height:720},{width:1280,height:720},{width:1920,height:1080},{width:2560,height:1440},{width:3840,height:2160}],this.mapCameraResolutions=new Map,this._bWebGLSupported=!0,this._singleFrameMode=!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia),this._cvsSingleFrameMode=null,this._imgWidth=0,this._imgHeight=0,this._singleFrameModeIpt=null,this._clickIptSingleFrameMode=()=>{if(this.singleFrameMode){if(!this._singleFrameModeIpt){const t=document.createElement(\"input\");this._singleFrameModeIpt=t,t.setAttribute(\"type\",\"file\"),t.setAttribute(\"accept\",\".jpg,.jpeg,.icon,.gif,.svg,.webp,.png,.bmp\"),t.setAttribute(\"capture\",\"\"),t.addEventListener(\"change\",(()=>e(this,void 0,void 0,(function*(){const o=t.files[0];t.value=\"\";const r=yield(t=>e(this,void 0,void 0,(function*(){let e=null,i=null;if(\"undefined\"!=typeof createImageBitmap)try{if(e=yield createImageBitmap(t),e)return e}catch(e){}var o;return e||(i=yield(o=t,new Promise(((e,t)=>{let i=URL.createObjectURL(o),r=new Image;r.dbrObjUrl=i,r.src=i,r.onload=()=>{e(r)},r.onerror=e=>{t(new Error(\"Can't convert blob to image : \"+(e instanceof Event?e.type:e)))}})))),i})))(o),s=r instanceof HTMLImageElement?r.naturalWidth:r.width,n=r instanceof HTMLImageElement?r.naturalHeight:r.height;this._imgWidth=s,this._imgHeight=n;(e=>{if(!this._cvsSingleFrameMode){if(this._cvsSingleFrameMode=document.createElement(\"canvas\"),this._cvsSingleFrameMode.className=\"cvs-single-frame-mode\",this._cvsSingleFrameMode.addEventListener(\"click\",this._clickIptSingleFrameMode),this._cvsSingleFrameMode.style.cursor=\"pointer\",this._cvsSingleFrameMode.setAttribute(\"title\",\"Take a photo\"),!this._video)throw new Error(\"'video' is null.\");this._video.after(this._cvsSingleFrameMode)}const t=this._cvsSingleFrameMode;t.style.position=\"absolute\",t.style.width=\"100%\",t.style.height=\"100%\",t.style.left=\"0\",t.style.top=\"0\",t.style.objectFit=\"contain\",t.width==s&&t.height==n||(t.width=s,t.height=n);let i=t.getContext(\"2d\");i.clearRect(0,0,t.width,t.height),i.drawImage(e,0,0)})(r),this._updateScanRegionCanvas(),this._updateScanAreaDiv(),this._updateViewDecorator();for(let e of this._arrScanRegionOverlays)e&&this._updateScanRegionOverlay(e);const a=(e=>{const t=Date.now();if(0===s||0===n)return null;const o=this._scanRegion,r=this.getFrameSize(s,n,o,this.maxCvsSideLength);if(!r)return null;let a,h;a=s!==r.sWidth||n!==r.sHeight,h=r.sWidth!==r.dWidth||r.sHeight!==r.dHeight;const l=(()=>!(!this._bWebGLSupported||h))(),d={data:null,region:o?JSON.parse(JSON.stringify(o)):null,sx:r.sx,sy:r.sy,width:r.dWidth,height:r.dHeight,colorMode:null,timeSpent:null,timeStamp:null,isCropped:a,toCanvas:this.toCanvas,_bUseWebGL:null},g=this._getImageData(e,s,n,r,null,{targetColorMode:this.frameColorMode,bUseWebGL:l});if(!g)return null;const c=Date.now();return i._onLog&&i._onLog(\"DCE: _getVideoFrame(region?) END: \"+c),d.data=g.data,d.colorMode=g.colorMode,d._bUseWebGL=g._bUseWebGL,d.timeSpent=c-t,d.timeStamp=c,d})(r),h=this.mapCameraEvents.get(\"singleFrameAcquired\");for(let e of h)try{const t={data:new Uint8Array(a.data),region:JSON.parse(JSON.stringify(a.region)),sx:a.sx,sy:a.sy,width:a.width,height:a.height,colorMode:a.colorMode,timeSpent:a.timeSpent,timeStamp:a.timeStamp,isCropped:a.isCropped,toCanvas:a.toCanvas,_bUseWebGL:a._bUseWebGL};yield e(t)}catch(e){console.error(e)}})))),t.style.position=\"fixed\",t.style.left=\"-1px\",t.style.top=\"-1px\",t.style.width=\"1px\",t.style.height=\"1px\",t.style.backgroundColor=\"transparent\",t.style.color=\"transparent\",document.body.appendChild(t)}this._singleFrameModeIpt.click()}},this.styleEls=[],this._frameColorMode=void 0,this._defaultFrameColorMode=\"RGBA\",this.currentFSColorMode=\"rgba\",this.ifReuseArrayBufferView=!1,this.maxVideoCvsLength=3,this.canvas=null,this.videoGlCvs=null,this.videoGl=null,this.glImgData=null,this.webglTexture=null,this.webglProgramInfo=null,this.webglBuffers=null,this.toCanvas=function(){const e=document.createElement(\"canvas\");let t;if(e.width=this.width,e.height=this.height,\"grey\"===this.colorMode){t=new Uint8ClampedArray(this.width*this.height*4);for(let e=0;ee(this,void 0,void 0,(function*(){yield this.selectCamera(this._selCam.value),this._bOpen||this.stop()})),this._onResolutionSelChange=()=>e(this,void 0,void 0,(function*(){let e,t;if(this._selRsl&&-1!=this._selRsl.selectedIndex){let i=this._selRsl.options[this._selRsl.selectedIndex];e=i.getAttribute(\"data-width\"),t=i.getAttribute(\"data-height\")}yield this.setResolution(e,t),this._bOpen||this.stop()})),this._onCloseBtnClick=()=>{this.close(!0)},this._bOpen=!1,this.videoSrc=null,this.videoSettings={video:{width:{ideal:1280},height:{ideal:720},facingMode:{ideal:\"environment\"}}},this.iPlayRound=0,this.promisePlay=null,this._ifSaveLastUsedCamera=!1,this.ifSkipCameraInspection=!1,this._allCameras=[],this._currentCamera=null,this._videoTrack=null,this._lastDeviceId=void 0,this._vc_bPlayingVideoBeforeHide=!1,this._ev_documentHideEvent=()=>{\"visible\"===document.visibilityState?this._vc_bPlayingVideoBeforeHide&&(\"Firefox\"==i.browserInfo.browser?this.play():this._video.play(),this._vc_bPlayingVideoBeforeHide=!1):this._video&&!this._video.paused&&(this._vc_bPlayingVideoBeforeHide=!0,this._video.pause())},this._video=null,this.videoFit=\"contain\",this._cvsScanRegion=null,this._divScanArea=null,this._divScanLight=null,this._bgLoading=null,this._selCam=null,this._bgCamera=null,this._selRsl=null,this._optGotRsl=null,this._btnClose=null,this.regionMaskFillStyle=\"rgba(0,0,0,0.5)\",this.regionMaskStrokeStyle=\"rgb(254,142,20)\",this.regionMaskLineWidth=2,this._bShowScanRegionMask=!0,this._bShowScanRegionLaser=!1,this._scanRegion=null,this._arrScanRegionOverlays=[],this._cvsViewDecorator=null,this._decoratorType=[],this._decoratorArea=null,this._viewDecoratorInfo={rectangle:{lineWidth:4,strokeStyle:\"rgb(254,142,20)\",fillStyle:\"transparent\",maskFillStyle:\"transparent\"},focus:{lineWidth:4,strokeStyle:\"rgb(254,142,20)\",fillStyle:\"transparent\",maskFillStyle:\"transparent\"},crossline:{lineWidth:2,strokeStyle:\"rgb(254,142,20)\"},crosshair:{lineWidth:4,strokeStyle:\"rgb(254,142,20)\"}},this._croppingRegions=void 0,this._defaultCroppingRegions=[null],this.bIncreaseRegionIndexAuto=!0,this._croppingRegionIndex=0,this._loopInterval=void 0,this._defaultLoopInterval=0,this._maxNumberOfFramesInBuffer=void 0,this._defaultMaxNumberOfFramesInBuffer=1,this._frameQueue=[],this._bFetchingLoopStarted=!1,this._bStoppedByPause=!1,this._refreshInterval=void 0,this._defaultRefreshInterval=-1,this._updateCanvasTimeout=500,this.referenceConfigurationArray=[],this._onWindowResize=()=>{this._resizeTimeoutId&&clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=setTimeout((()=>{this._updateScanRegionCanvas(),this._updateScanAreaDiv(),this._updateViewDecorator();for(let e of this._arrScanRegionOverlays)e&&this._updateScanRegionOverlay(e)}),this._updateCanvasTimeout)},this.bDestroyed=!1,this.mapCameraEvents=new Map([[\"cameraOpen\",[]],[\"cameraClose\",[]],[\"cameraChange\",[]],[\"resolutionChange\",[]],[\"played\",[]],[\"singleFrameAcquired\",[]],[\"frameAddedToBuffer\",[]]])}static getVersion(){return this._version}static detectEnvironment(){return e(this,void 0,void 0,(function*(){let e={wasm:\"undefined\"!=typeof WebAssembly&&(\"undefined\"==typeof navigator||!(/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&/\\(.+\\s11_2_([2-6]).*\\)/.test(navigator.userAgent))),worker:!(\"undefined\"==typeof Worker),getUserMedia:!(\"undefined\"==typeof navigator||!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia),camera:!1,browser:this.browserInfo.browser,version:this.browserInfo.version,OS:this.browserInfo.OS};if(e.getUserMedia)try{(yield navigator.mediaDevices.getUserMedia({video:!0})).getTracks().forEach((e=>{e.stop()})),e.camera=!0}catch(e){}return e}))}static set engineResourcePath(e){if(this._hasEngineResourceLoaded)throw new Error(\"`engineResourcePath` is not allowed to change after `createInstance` is called.\");if(null==e&&(e=\"./\"),t)i._engineResourcePath=e;else{let t=document.createElement(\"a\");t.href=e,i._engineResourcePath=t.href}this._engineResourcePath.endsWith(\"/\")||(i._engineResourcePath+=\"/\")}static get engineResourcePath(){return this._engineResourcePath}static isStorageAvailable(e){let t;try{t=window[e];const i=\"__storage_test__\";return t.setItem(i,i),t.removeItem(i),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||\"QuotaExceededError\"===e.name||\"NS_ERROR_DOM_QUOTA_REACHED\"===e.name)&&t&&0!==t.length}}set maxCvsSideLength(e){if(e<=0)throw new Error(\"The 'maxCvsSideLength' should be greater than 0.\");this._maxCvsSideLength=e}get maxCvsSideLength(){return void 0!==this._maxCvsSideLength?this._maxCvsSideLength:this.referenceConfigurationArray&&1===this.referenceConfigurationArray.length&&this.referenceConfigurationArray[0].hasOwnProperty(\"maxCvsSideLength\")?this.referenceConfigurationArray[0].maxCvsSideLength:this._defaultMaxCvsSideLength}static set defaultUIElementURL(e){i._defaultUIElementURL=e}static get defaultUIElementURL(){var e;return null===(e=i._defaultUIElementURL)||void 0===e?void 0:e.replace(\"@engineResourcePath/\",i.engineResourcePath)}getUIElement(){return this.UIElement}setUIElement(t){return e(this,void 0,void 0,(function*(){if(this._bOpen)throw new Error(\"It is not allowed to change the UIElement when the camera is open.\");if(\"string\"==typeof t||t instanceof String){if(!t.trim().startsWith(\"<\")){let e=yield fetch(t);if(!e.ok)throw Error(\"setUIElement(elementOrUrl): Network Error: \"+e.statusText);t=yield e.text()}if(!t.trim().startsWith(\"<\"))throw Error(\"setUIElement(elementOrUrl): Can't get valid HTMLElement.\");let e=document.createElement(\"div\");e.innerHTML=t;for(let t=0;t','','',''].join(\"\"),this._optGotRsl=this._optGotRsl||this._selRsl.options[0])):!this._optGotRsl&&t.classList.contains(\"dce-opt-gotResolution\")?this._optGotRsl=t:!this._btnClose&&t.classList.contains(\"dce-btn-close\")&&(this._btnClose=t);if(!this._video)throw this._unbindUI(),Error(\"Can not find the video container element with class 'dce-video-container'\");this.singleFrameMode?(this._video&&(this._video.addEventListener(\"click\",this._clickIptSingleFrameMode),this._video.style.cursor=\"pointer\",this._video.setAttribute(\"title\",\"Take a photo\")),this._divScanArea&&(this._divScanArea.addEventListener(\"click\",this._clickIptSingleFrameMode),this._divScanArea.style.cursor=\"pointer\",this._divScanArea.setAttribute(\"title\",\"Take a photo\")),this._bgCamera&&(this._bgCamera.style.display=\"\")):this._bgLoading&&(this._bgLoading.style.display=\"\"),this._selCam&&this._selCam.addEventListener(\"change\",this._onCameraSelChange),this._selRsl&&this._selRsl.addEventListener(\"change\",this._onResolutionSelChange),this._btnClose&&this._btnClose.addEventListener(\"click\",this._onCloseBtnClick),document.addEventListener(\"visibilitychange\",this._ev_documentHideEvent),window.addEventListener(\"resize\",this._onWindowResize)}_unbindUI(){this.singleFrameMode?(this._video&&(this._video.removeEventListener(\"click\",this._clickIptSingleFrameMode),this._video.style.cursor=\"\",this._video.removeAttribute(\"title\")),this._divScanArea&&(this._divScanArea.removeEventListener(\"click\",this._clickIptSingleFrameMode),this._divScanArea.style.cursor=\"\",this._divScanArea.removeAttribute(\"title\")),this._bgCamera&&(this._bgCamera.style.display=\"none\")):this._bgLoading&&(this._bgLoading.style.display=\"none\"),this._selCam&&this._selCam.removeEventListener(\"change\",this._onCameraSelChange),this._selRsl&&this._selRsl.removeEventListener(\"change\",this._onResolutionSelChange),this._btnClose&&this._btnClose.removeEventListener(\"click\",this._onCloseBtnClick),this._cvsViewDecorator&&(this._cvsViewDecorator.removeEventListener(\"click\",this._clickIptSingleFrameMode),this._cvsViewDecorator.style.cursor=\"\",this._cvsViewDecorator.removeAttribute(\"title\"));for(let e of this._arrScanRegionOverlays)e&&(e.removeEventListener(\"click\",this._clickIptSingleFrameMode),e.style.cursor=\"\",e.removeAttribute(\"title\"));this.hideScanRegionLaser(),this.hideViewDecorator(),this.hideScanRegionOverlays(),this._video&&(this._video.onloadedmetadata=null,this._video.remove()),this._video=null,this._selCam=null,this._selRsl=null,this._optGotRsl=null,this._btnClose=null,this._divScanArea=null,this._divScanLight=null,this._cvsScanRegion&&(this._cvsScanRegion.remove(),this._cvsScanRegion=null),this._singleFrameModeIpt&&(this._singleFrameModeIpt.remove(),this._singleFrameModeIpt=null),this._cvsSingleFrameMode&&(this._cvsSingleFrameMode.remove(),this._cvsSingleFrameMode=null),document.removeEventListener(\"visibilitychange\",this._ev_documentHideEvent),window.removeEventListener(\"resize\",this._onWindowResize)}set bOpen(e){if(this._bOpen=e,e){this._updateScanRegionCanvas(),this._updateScanAreaDiv(),this._updateViewDecorator();for(let e of this._arrScanRegionOverlays)e&&this._updateScanRegionOverlay(e);this._bShowScanRegionMask?this.showScanRegionMask():this.hideScanRegionMask(),this._bShowScanRegionLaser?this.showScanRegionLaser():this.hideScanRegionLaser(),this.showViewDecorator(),this._cvsViewDecorator&&(this._cvsViewDecorator.addEventListener(\"click\",this._clickIptSingleFrameMode),this._cvsViewDecorator.style.cursor=\"pointer\",this._cvsViewDecorator.setAttribute(\"title\",\"Take a photo\")),this.showScanRegionOverlays();for(let e of this._arrScanRegionOverlays)e&&(e.addEventListener(\"click\",this._clickIptSingleFrameMode),e.style.cursor=\"pointer\",e.setAttribute(\"title\",\"Take a photo\"))}}_assertOpen(){if(!this._bOpen)throw Error(\"The camera is not open.\")}set ifSaveLastUsedCamera(e){e?i.isStorageAvailable(\"localStorage\")?this._ifSaveLastUsedCamera=!0:(this._ifSaveLastUsedCamera=!1,console.warn(\"Local storage is unavailable\")):this._ifSaveLastUsedCamera=!1}get ifSaveLastUsedCamera(){return this._ifSaveLastUsedCamera}get video(){return this._video}setVideoFit(e){if(e=e.toLowerCase(),![\"contain\",\"cover\"].includes(e))throw new Error(`It is not allowed to set '${e}'.`);if(this.videoFit=e,this._video&&(this._video.style.objectFit=e,!this.singleFrameMode)){this._updateScanRegionCanvas(),this._updateScanAreaDiv(),this._updateViewDecorator();for(let e of this._arrScanRegionOverlays)e&&this._updateScanRegionOverlay(e)}}getVideoFit(){return this.videoFit}set ifShowScanRegionMask(e){this._bShowScanRegionMask=e,e?this.showScanRegionMask():this.hideScanRegionMask()}get ifShowScanRegionMask(){return this._bShowScanRegionMask}showScanRegionMask(){this._cvsScanRegion&&\"none\"==this._cvsScanRegion.style.display&&(this._cvsScanRegion.style.display=\"\")}hideScanRegionMask(){this._cvsScanRegion&&(this._cvsScanRegion.style.display=\"none\")}set ifShowScanRegionLaser(e){this._bShowScanRegionLaser=e,e?this.showScanRegionLaser():this.hideScanRegionLaser()}get ifShowScanRegionLaser(){return this._bShowScanRegionLaser}showScanRegionLaser(){this._divScanLight&&\"none\"==this._divScanLight.style.display&&(this._divScanLight.style.display=\"\")}hideScanRegionLaser(){this._divScanLight&&(this._divScanLight.style.display=\"none\")}_checkValidRegion(e){return null===e||!!e&&(!!(e.hasOwnProperty(\"regionLeft\")&&e.hasOwnProperty(\"regionTop\")&&e.hasOwnProperty(\"regionRight\")&&e.hasOwnProperty(\"regionBottom\")&&e.hasOwnProperty(\"regionMeasuredByPercentage\"))&&(!(e.regionLeft<0||e.regionTop<0||e.regionRight<0||e.regionBottom<0)&&(!e.regionMeasuredByPercentage||!(e.regionLeft>100||e.regionTop>100||e.regionRight>100||e.regionBottom>100))))}set scanRegion(e){if(!this._checkValidRegion(e))throw new Error(\"The region is invalid.\");this._scanRegion=JSON.parse(JSON.stringify(e)),this._updateScanRegionCanvas(),this._updateScanAreaDiv();for(let e of this._arrScanRegionOverlays)e&&this._updateScanRegionOverlay(e)}setScanRegion(e){this.scanRegion=e}getScanRegion(){return JSON.parse(JSON.stringify(this._scanRegion))}addScanRegionOverlayCanvas(){this._assertOpen();const e=document.createElement(\"canvas\");if(e.className=\"cvs-scan-region-overlay-\"+this._arrScanRegionOverlays.length,this.singleFrameMode&&(e.addEventListener(\"click\",this._clickIptSingleFrameMode),e.style.cursor=\"pointer\",e.setAttribute(\"title\",\"Take a photo\")),this._updateScanRegionOverlay(e),this._arrScanRegionOverlays.length>0){const t=this._arrScanRegionOverlays.length;this._arrScanRegionOverlays[t-1].after(e)}else if(this._cvsScanRegion)this._cvsScanRegion.before(e);else if(this._cvsSingleFrameMode)this._cvsSingleFrameMode.after(e);else{if(!this._video)throw new Error(\"'video' is null.\");this._video.after(e)}return this._arrScanRegionOverlays.push(e),e}_updateScanRegionOverlay(e){if(!e)return;let t,i,o;if(this.singleFrameMode)t=this._imgWidth,i=this._imgHeight,o=\"contain\";else{if(!this._video)return;t=this._video.videoWidth,i=this._video.videoHeight,o=this.getVideoFit()}if(t<=0||i<=0)return e.width=0,void(e.height=0);const r=this._getRegionInPixels(t,i,this._scanRegion),s=r.regionRight-r.regionLeft,n=r.regionBottom-r.regionTop;e.width==s&&e.height==n||(e.width=s,e.height=n);const a=window.getComputedStyle(this._video),h=parseFloat(a.width),l=parseFloat(a.height),d=h/l,g=t/i;let c,u,v,_,f=1;if(\"contain\"===o)d{const e=parseFloat(window.getComputedStyle(this._video).width),r=parseFloat(window.getComputedStyle(this._video).height);let s,n={regionBottom:i,regionRight:t,regionLeft:0,regionTop:0,regionMeasuredByPercentage:!1};return\"cover\"===o?e/rthis.maxNumberOfFramesInBuffer;)this._frameQueue.shift()}get maxNumberOfFramesInBuffer(){return void 0!==this._maxNumberOfFramesInBuffer?this._maxNumberOfFramesInBuffer:this.referenceConfigurationArray&&1===this.referenceConfigurationArray.length&&this.referenceConfigurationArray[0].hasOwnProperty(\"maxNumberOfFramesInBuffer\")?this.referenceConfigurationArray[0].maxNumberOfFramesInBuffer:this._defaultMaxNumberOfFramesInBuffer}get numberOfFramesInBuffer(){return this._frameQueue.length}set refreshInterval(e){this._refreshInterval=e}get refreshInterval(){return void 0!==this._refreshInterval?this._refreshInterval:this.referenceConfigurationArray&&1===this.referenceConfigurationArray.length&&this.referenceConfigurationArray[0].hasOwnProperty(\"refreshInterval\")?this.referenceConfigurationArray[0].refreshInterval:this._defaultRefreshInterval}isContextDestroyed(){return this.bDestroyed}static createInstance(t){return e(this,void 0,void 0,(function*(){let e=new i;(\"string\"==typeof t||t instanceof String)&&(t=JSON.parse(t));for(let i in t)e[i]=t[i];return yield e.setUIElement(i.defaultUIElementURL),this._hasEngineResourceLoaded=!0,e}))}play(t,o,r){return e(this,void 0,void 0,(function*(){if(this._video&&this.videoSrc){yield new Promise(((t,i)=>{this._video.onloadedmetadata=()=>e(this,void 0,void 0,(function*(){this._video&&(this._video.onloadedmetadata=null,yield this._video.play(),t())})),\"string\"==typeof this.videoSrc||this.videoSrc instanceof String?this._video.src=this.videoSrc:this._video.srcObject=this.videoSrc,setTimeout((()=>i(new Error(\"Failed to play video. Timeout.\"))),4e3)}));let t={width:this._video.videoWidth,height:this._video.videoHeight,deviceId:this._currentCamera&&this._currentCamera.deviceId};const i=this.mapCameraEvents.get(\"played\");for(let e of i){const i=JSON.parse(JSON.stringify(t));setTimeout((()=>e(i)),0)}return t}if(this.singleFrameMode)return this._clickIptSingleFrameMode(),{width:0,height:0,deviceId:null};if(!this._video)return null;const s=++this.iPlayRound;let n=null,a=0,h=0;if(this._currentCamera&&(n=this._currentCamera.deviceId),this._video&&(a=this._video.videoWidth,h=this._video.videoHeight),this.promisePlay&&(yield this.promisePlay,se(this,void 0,void 0,(function*(){var s;try{this._video&&this._video.srcObject&&this.stop(),i._onLog&&i._onLog(\"DCE: ======before video========\");const l=()=>{if(!this._video)throw v&&v.getTracks().forEach((e=>{e.stop()})),this._videoTrack=null,this._currentCamera=null,new Error(\"'video' is null.\")},d=this.getVideoSettings();let g;\"boolean\"==typeof d.video&&(d.video={});const c=[\"rear\",\"back\",\"rück\",\"arrière\",\"trasera\",\"trás\",\"traseira\",\"posteriore\",\"后面\",\"後面\",\"背面\",\"后置\",\"後置\",\"背置\",\"задней\",\"الخلفية\",\"후\",\"arka\",\"achterzijde\",\"หลัง\",\"baksidan\",\"bagside\",\"sau\",\"bak\",\"tylny\",\"takakamera\",\"belakang\",\"אחורית\",\"πίσω\",\"spate\",\"hátsó\",\"zadní\",\"darrere\",\"zadná\",\"задня\",\"stražnja\",\"belakang\",\"बैक\"],u=()=>{for(let e of this._allCameras){let t=e.label.toLowerCase();if(t&&c.some((e=>-1!=t.indexOf(e)))&&/\\b0(\\b)?/.test(t)){delete d.video.facingMode,d.video.deviceId={ideal:e.deviceId};break}}d.video.deviceId||-1==[\"Android\",\"HarmonyOS\"].indexOf(i.browserInfo.OS)||(delete d.video.facingMode,d.video.deviceId={ideal:this._allCameras[this._allCameras.length-1].deviceId})};if(t)delete d.video.facingMode,d.video.deviceId={exact:t};else if(d.video.deviceId);else if(this._lastDeviceId)delete d.video.facingMode,d.video.deviceId={exact:this._lastDeviceId};else if(this.ifSaveLastUsedCamera&&i.isStorageAvailable&&window.localStorage.getItem(\"dce_last_camera_id\")){delete d.video.facingMode,d.video.deviceId={exact:window.localStorage.getItem(\"dce_last_camera_id\")};const e=JSON.parse(window.localStorage.getItem(\"dce_last_apply_width\")),t=JSON.parse(window.localStorage.getItem(\"dce_last_apply_height\"));e&&t&&(d.video.width=e,d.video.height=t)}else if(this.ifSkipCameraInspection);else if(d.video.facingMode){if(yield this.getAllCameras(),!this._video)return null;let e=d.video.facingMode;e instanceof Array&&e.length&&(e=e[0]),e=e.exact||e.ideal||e,\"environment\"===e&&(g=!!d.video.facingMode,u())}let v;o&&(d.video.width={ideal:o}),r&&(d.video.height={ideal:r}),i._onLog&&i._onLog(\"DCE: ======try getUserMedia========\");let _,f=[0,500],m=null,p=null;function y(t){return e(this,void 0,void 0,(function*(){for(let e of f){l(),e&&(yield new Promise((t=>setTimeout(t,e)))),l();{const e=t.video.deviceId;p=e?e.exact||e.ideal||e:null}try{i._onLog&&i._onLog(\"DCE: ask \"+JSON.stringify(t)),v=yield navigator.mediaDevices.getUserMedia(t),l();break}catch(e){m=e,i._onLog&&i._onLog(\"DCE: \"+e.message||e)}}}))}if(yield y(d),!v){if(i._onLog&&i._onLog(\"DCE: ======try getUserMedia again========\"),_=JSON.parse(JSON.stringify(d)),\"object\"==typeof _.video){\"iPhone\"==i.browserInfo.OS?(o>=1280||r>=1280?_.video.width=1280:o>=640||r>=640?_.video.width=640:(o<640||r<640)&&(_.video.width=320),delete _.video.height):g&&!d.video.deviceId?(delete _.video.facingMode,this._allCameras.length&&(_.video.deviceId={ideal:this._allCameras[this._allCameras.length-1].deviceId})):_.video=!0}i._onLog&&i._onLog(\"DCE: \"+_),yield y(_)}if(v||(f=[1e3,2e3],yield y(d)),v||(yield y(_)),!v)throw m;const S=()=>{const e=v.getVideoTracks();let t,i;if(e.length&&(t=this._videoTrack=e[0]),this._video&&t){const e=t.getSettings();if(e)for(let o of this._allCameras)if(e.deviceId===o.deviceId){o._checked=!0,o.label=t.label,i=o;break}if(!i&&p)for(let e of this._allCameras)if(p==e.deviceId){t.label&&(e._checked=!0,e.label=t.label),i=e;break}}this._currentCamera=i};if(yield this.getAllCameras(),l(),g){S(),u();let e=d.video.deviceId;e&&(e=e.exact||e.ideal||e);let t=null===(s=this._currentCamera)||void 0===s?void 0:s.deviceId;!e||t&&e==t||(v.getTracks().forEach((e=>{e.stop()})),f=[0,500,1e3,2e3],yield y(d))}l();const w=()=>e(this,void 0,void 0,(function*(){i._onLog&&i._onLog(\"======play video========\"),yield new Promise(((t,i)=>{l(),this._video.onloadedmetadata=()=>e(this,void 0,void 0,(function*(){l(),this._video.onloadedmetadata=null,yield this._video.play(),t()})),this._video.srcObject=v,setTimeout((()=>i(new Error(\"Failed to play video. Timeout.\"))),4e3)}))}));yield w(),l(),i._onLog&&i._onLog(\"DCE: ======played video========\"),this._bgLoading&&(this._bgLoading.style.animationPlayState=\"paused\");const b=this._video.videoWidth+\"x\"+this._video.videoHeight;this._optGotRsl&&(this._optGotRsl.setAttribute(\"data-width\",this._video.videoWidth),this._optGotRsl.setAttribute(\"data-height\",this._video.videoHeight),this._optGotRsl.innerText=b,this._selRsl&&this._optGotRsl.parentNode==this._selRsl&&(this._selRsl.value=\"got\")),i._onLog&&i._onLog(\"DCE: got \"+b),S(),l(),this._renderSelCameraInfo();const R={width:this._video.videoWidth,height:this._video.videoHeight,deviceId:this._currentCamera&&this._currentCamera.deviceId};R.deviceId&&(this._lastDeviceId=R.deviceId,this.ifSaveLastUsedCamera&&i.isStorageAvailable&&(window.localStorage.setItem(\"dce_last_camera_id\",this._lastDeviceId),d.video.width&&d.video.height&&(window.localStorage.setItem(\"dce_last_apply_width\",JSON.stringify(d.video.width)),window.localStorage.setItem(\"dce_last_apply_height\",JSON.stringify(d.video.height)))));const C=this.mapCameraEvents.get(\"played\");for(let e of C){const t=JSON.parse(JSON.stringify(R));setTimeout((()=>e(t)),0)}if(n&&n!=R.deviceId){const e=this.mapCameraEvents.get(\"cameraChange\");for(let t of e){const e=JSON.parse(JSON.stringify(R));setTimeout((()=>t(e)),0)}}if(a&&h&&(a!=R.width||h!=R.height)){this._updateScanRegionCanvas(),this._updateScanAreaDiv(),this._updateViewDecorator();for(let e of this._arrScanRegionOverlays)e&&this._updateScanRegionOverlay(e);const e=this.mapCameraEvents.get(\"resolutionChange\");for(let t of e){const e=JSON.parse(JSON.stringify(R));setTimeout((()=>t(e)),0)}}return this.promisePlay=null,R}catch(e){throw this.promisePlay=null,e}})))();return yield this.promisePlay}))}resume(){return e(this,void 0,void 0,(function*(){this._assertOpen(),yield this.play(),this._bStoppedByPause&&(this._bStoppedByPause=!1,this.startFetchingLoop()),this._bShowScanRegionLaser&&this.showScanRegionLaser()}))}pause(){this._bOpen||console.warn(\"The camera is not open.\"),this._video&&this._video.pause(),this._bFetchingLoopStarted&&(this.stopFetchingLoop(),this._bStoppedByPause=!0),this._bShowScanRegionLaser&&this.hideScanRegionLaser()}close(e){if(!this._video)return;this.stop(),this._unbindUI(),e&&(this.UIElement.style.display=\"none\"),this.stopFetchingLoop(),this.bOpen=!1;const t=this.mapCameraEvents.get(\"cameraClose\");for(let e of t){const t={width:0,height:0,deviceId:null};setTimeout((()=>e(t)),0)}}open(t){return e(this,void 0,void 0,(function*(){this._bindUI(),t&&(this.UIElement.parentNode||(this.UIElement.style.position=\"fixed\",this.UIElement.style.left=\"0\",this.UIElement.style.top=\"0\",document.body.append(this.UIElement)),\"none\"==this.UIElement.style.display&&(this.UIElement.style.display=\"\"));let e=yield this.play();this.bOpen=!0;const i=this.mapCameraEvents.get(\"cameraOpen\");for(let t of i){const i=JSON.parse(JSON.stringify(e));setTimeout((()=>t(i)),0)}return e}))}stop(){this._video&&this._video.srcObject&&(i._onLog&&i._onLog(\"DCE: ======stop video========\"),this._video.srcObject.getTracks().forEach((e=>{e.stop()})),this._video.srcObject=null,this._videoTrack=null,this._currentCamera=null),this._video&&this.videoSrc&&(i._onLog&&i._onLog(\"DCE: ======stop existing video========\"),this._video.pause(),this._video.currentTime=0),this._bgLoading&&(this._bgLoading.style.animationPlayState=\"\"),this._frameQueue.length=0}getAllCameras(){return e(this,void 0,void 0,(function*(){let e=yield navigator.mediaDevices.enumerateDevices();if(!e[0].deviceId){let t=yield navigator.mediaDevices.getUserMedia({video:!0});e=yield navigator.mediaDevices.enumerateDevices(),t.getTracks().forEach((e=>{e.stop()})),t=null}const t=[],o=[];if(this._allCameras)for(let e of this._allCameras)e._checked&&o.push(e);for(let i=0;i{const i=this.mapCameraResolutions.get(e);if(!i||!i.length)return!1;for(let e of i)if(e[0]===t.width&&e[1]===t.height)return!0;return!1},r=(t,i,o)=>e(this,void 0,void 0,(function*(){const e={video:{deviceId:{exact:t},width:{ideal:i},height:{ideal:o}}};let r=null;try{r=yield navigator.mediaDevices.getUserMedia(e)}catch(e){return null}if(!r)return null;const s=r.getVideoTracks();let n=null;try{const e=s[0].getSettings();n={width:e.width,height:e.height}}catch(e){const t=document.createElement(\"video\");t.srcObject=r,n={width:t.videoWidth,height:t.videoHeight},t.srcObject=null}return s.forEach((e=>{e.stop()})),n}));if(!this._bOpen){const e=this.videoSettings.video.deviceId;if(!e)return null;if(i=e.hasOwnProperty(\"exact\")?this.videoSettings.video.deviceId.exact:e.hasOwnProperty(\"ideal\")?this.videoSettings.video.deviceId.ideal:this.videoSettings.video.deviceId,!i)return null;let s=this.mapCameraResolutions.get(i);if(s&&!t)return this.mapCameraResolutions.get(i);this.mapCameraResolutions.set(i,[]),s=this.mapCameraResolutions.get(i);for(let e of this.predefinedResolutions){const t=yield r(i,e.width,e.height);t&&!o(i,t)&&s.push([t.width,t.height])}return s}if(this._currentCamera){i=this._currentCamera.deviceId;let e=this.mapCameraResolutions.get(i);if(e&&!t)return this.mapCameraResolutions.get(i);this.mapCameraResolutions.set(i,[]),e=this.mapCameraResolutions.get(i);const r=this.getConstraints();for(let t of this.predefinedResolutions){yield this._videoTrack.applyConstraints({width:{ideal:t.width},height:{ideal:t.height}});const r=this._videoTrack.getSettings(),s={width:r.width,height:r.height};o(i,s)||e.push([s.width,s.height])}return yield this._videoTrack.applyConstraints(r),e}return null}))}on(e,t){if(!this.mapCameraEvents.has(e))throw new Error(`Event '${e}' is not exists.`);const i=this.mapCameraEvents.get(e);i.includes(t)||i.push(t)}off(e,t){if(!this.mapCameraEvents.has(e))throw new Error(`Event '${e}' is not exists.`);const i=this.mapCameraEvents.get(e),o=i.indexOf(t);-1!==o&&i.splice(o,1)}getVideoSettings(){return JSON.parse(JSON.stringify(this.videoSettings))}updateVideoSettings(e){return this.videoSettings=JSON.parse(JSON.stringify(e)),this._lastDeviceId=null,this._bOpen?this.play():Promise.resolve()}isOpen(){return this._bOpen}getCapabilities(){if(this._assertOpen(),this.singleFrameMode)throw new Error(\"'turnOnTorch()' is unavailable in singleFrameMode.\");if(!this._videoTrack)throw new Error('\"_videoTrack\" is null.');return this._videoTrack.getCapabilities?this._videoTrack.getCapabilities():{}}getCameraSettings(){if(this._assertOpen(),this.singleFrameMode)throw new Error(\"'getCameraSettings()' is unavailable in singleFrameMode.\");if(!this._videoTrack)throw new Error('\"_videoTrack\" is null.');return this._videoTrack.getSettings()}getConstraints(){if(this._assertOpen(),this.singleFrameMode)throw new Error(\"'getConstraints()' is unavailable in singleFrameMode.\");if(!this._videoTrack)throw new Error('\"_videoTrack\" is null.');return this._videoTrack.getConstraints()}applyConstraints(t){return e(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error(\"'applyConstraints()' is unavailable in singleFrameMode.\");if(!this._videoTrack)throw new Error('\"_videoTrack\" is null.');if(!this._videoTrack.applyConstraints)throw Error(\"Not supported.\");return yield this._videoTrack.applyConstraints(t)}))}turnOnTorch(){return e(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error(\"'turnOnTorch()' is unavailable in singleFrameMode.\");if(this.getCapabilities().torch)return yield this._videoTrack.applyConstraints({advanced:[{torch:!0}]});throw Error(\"Not supported.\")}))}turnOffTorch(){return e(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error(\"'turnOffTorch()' is unavailable in singleFrameMode.\");if(this.getCapabilities().torch)return yield this._videoTrack.applyConstraints({advanced:[{torch:!1}]});throw Error(\"Not supported.\")}))}setColorTemperature(t){return e(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error(\"'setColorTemperature()' is unavailable in singleFrameMode.\");let e=this.getCapabilities().colorTemperature;if(!e)throw Error(\"Not supported.\");return te.max&&(t=e.max),yield this._videoTrack.applyConstraints({advanced:[{colorTemperature:t}]})}))}setExposureCompensation(t){return e(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error(\"'setExposureCompensation()' is unavailable in singleFrameMode.\");let e=this.getCapabilities().exposureCompensation;if(!e)throw Error(\"Not supported.\");return te.max&&(t=e.max),yield this._videoTrack.applyConstraints({advanced:[{exposureCompensation:t}]})}))}setZoom(t){return e(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error(\"'setZoom()' is unavailable in singleFrameMode.\");let e=this.getCapabilities().zoom;if(!e)throw Error(\"Not supported.\");return te.max&&(t=e.max),yield this._videoTrack.applyConstraints({advanced:[{zoom:t}]})}))}setFrameRate(t){return e(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error(\"'setFrameRate()' is unavailable in singleFrameMode.\");let e=this.getCapabilities().frameRate;if(!e)throw Error(\"Not supported.\");return te.max&&(t=e.max),yield this._videoTrack.applyConstraints({width:{ideal:Math.max(this._video.videoWidth,this._video.videoHeight)},frameRate:t})}))}getFrameRate(){return this.getCameraSettings().frameRate}setFocus(t,i){return e(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)throw new Error(\"'setFocus()' is unavailable in singleFrameMode.\");const e=this.getCapabilities().focusMode,o=this.getCapabilities().focusDistance;if(!e||!e.includes(t)||!o)throw Error(\"Not supported.\");return i?(io.max&&(i=o.max),yield this._videoTrack.applyConstraints({advanced:[{focusMode:t,focusDistance:i}]})):yield this._videoTrack.applyConstraints({advanced:[{focusMode:t}]})}))}getFocus(){const e=this.getCameraSettings().focusMode;return\"continuous\"===e?{mode:e}:{mode:e,distance:this.getCameraSettings().focusDistance}}getFrameSize(e,t,i,o){if(!e||!t)return null;let r,s,n,a,h=e,l=t;const d={regionLeft:0,regionTop:0,regionRight:h,regionBottom:l,regionMeasuredByPercentage:!1};i?(i.regionMeasuredByPercentage?(d.regionLeft=i.regionLeft*h/100,d.regionTop=i.regionTop*l/100,d.regionRight=i.regionRight*h/100,d.regionBottom=i.regionBottom*l/100):(d.regionLeft=i.regionLeft,d.regionTop=i.regionTop,d.regionRight=i.regionRight,d.regionBottom=i.regionBottom),r=d.regionLeft,s=d.regionTop,h=Math.round(d.regionRight-d.regionLeft),l=Math.round(d.regionBottom-d.regionTop)):(r=0,s=0);const g=Math.max(h,l);if(o&&o>0&&g>o){const e=o/g;h>l?(n=o,a=Math.round(l*e)):(n=Math.round(h*e),a=o)}else n=h,a=l;return n<=0||a<=0?null:{sx:r,sy:s,sWidth:h,sHeight:l,dWidth:n,dHeight:a}}getFrame(){if(this.singleFrameMode)throw Error(\"'getFrame()' is unavailable in singleFrameMode.\");if(this._assertOpen(),this.singleFrameMode)throw new Error(\"'getFrame()' is unavailable in singleFrameMode.\");return this._getVideoFrame(this._scanRegion)}_getVideoFrame(e,t){if(this.bDestroyed)throw Error(\"The 'CameraEnhancer' instance has been destroyed.\");if(this._assertOpen(),this.singleFrameMode)throw new Error(\"'_getVideoFrame()' is unavailable in singleFrameMode.\");const o=Date.now();i._onLog&&i._onLog(\"DCE: _getVideoFrame(region?) START: \"+o);const r=this._video.videoWidth,s=this._video.videoHeight;if(0===r||0===s)return null;const n=this.getFrameSize(r,s,e,this.maxCvsSideLength);if(!n)return null;let a,h;a=r!==n.sWidth||s!==n.sHeight,h=n.sWidth!==n.dWidth||n.sHeight!==n.dHeight;const l=(()=>!(!this._bWebGLSupported||h))(),d={data:null,region:e?JSON.parse(JSON.stringify(e)):null,sx:n.sx,sy:n.sy,width:n.dWidth,height:n.dHeight,colorMode:null,timeSpent:null,timeStamp:null,isCropped:a,toCanvas:this.toCanvas,_bUseWebGL:null},g=this._getImageData(this._video,r,s,n,t,{targetColorMode:this.frameColorMode,bUseWebGL:l});if(!g)return null;const c=Date.now();return i._onLog&&i._onLog(\"DCE: _getVideoFrame(region?) END: \"+c),d.data=g.data,d.colorMode=g.colorMode,d._bUseWebGL=g._bUseWebGL,d.timeSpent=c-o,d.timeStamp=c,d}_getImageData(e,t,o,r,s,n){if(this.bDestroyed)throw Error(\"The 'CameraEnhancer' instance has been destroyed.\");if(!t||!o)return null;i._onLog&&i._onLog(\"DCE: _getImageData() START: \"+Date.now());const{sx:a,sy:h,sWidth:l,sHeight:d,dWidth:g,dHeight:c}=r;let u;if(u=n&&n.targetColorMode?n.targetColorMode.toLowerCase():\"rgba\",n&&n.bUseWebGL){this.videoGlCvs||(this.videoGlCvs=document.createElement(\"canvas\"));const l=this.videoGlCvs;l.width==t&&l.height==o||(l.width=t,l.height=o,this.videoGl&&this.videoGl.viewport(0,0,t,o));const d=this.videoGl||l.getContext(\"webgl\",{antialias:!1})||l.getContext(\"experimental-webgl\",{antialias:!1});if(!d){this.videoGl=null,this._bWebGLSupported=!1;let i=null;return n?(i=JSON.parse(JSON.stringify(n)),i.bUseWebGL=!1):i={bUseWebGL:!1},this._getImageData(e,t,o,r,s,i)}if(d.enable(d.SCISSOR_TEST),d.scissor(a,h,g,c),!this.videoGl||u!==this.currentFSColorMode){this.videoGl=d;const e=e=>{const t=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,t);e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),e.STATIC_DRAW);const i=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,i);return e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),e.STATIC_DRAW),{position:t,indices:i}},t=e=>{const t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t},i=(e,t,i)=>{const r=o(e,e.VERTEX_SHADER,t),s=o(e,e.FRAGMENT_SHADER,i),n=e.createProgram();return e.attachShader(n,r),e.attachShader(n,s),e.linkProgram(n),e.getProgramParameter(n,e.LINK_STATUS)?n:(alert(\"Unable to initialize the shader program: \"+e.getProgramInfoLog(n)),null)},o=(e,t,i)=>{const o=e.createShader(t);return e.shaderSource(o,i),e.compileShader(o),e.getShaderParameter(o,e.COMPILE_STATUS)?o:(alert(\"An error occurred compiling the shaders: \"+e.getShaderInfoLog(o)),e.deleteShader(o),null)},r=\"\\n attribute mediump vec2 aVertexPosition;\\n varying mediump vec2 vDirection;\\n \\n void main( void )\\n {\\n gl_Position = vec4(aVertexPosition, 1.0, 1.0) * 2.0;\\n vDirection = aVertexPosition;\\n }\\n \";let s;s=[\"rgba\",\"rbga\",\"grba\",\"gbra\",\"brga\",\"bgra\"].includes(u)?u.slice(0,3):\"rgb\";const n=i(d,r,`\\n precision mediump float;\\n\\n varying mediump vec2 vDirection;\\n uniform sampler2D uSampler;\\n uniform lowp float uColorFactor;\\n \\n void main(void)\\n {\\n vec4 sample = texture2D(uSampler, vec2(vDirection.x * 0.5 + 0.5, vDirection.y * 0.5 + 0.5));\\n lowp float grey = 0.21 * sample.r + 0.71 * sample.g + 0.07 * sample.b;\\n gl_FragColor = vec4(sample.${s} * (1.0 - uColorFactor) + (grey * uColorFactor), sample.a);\\n }\\n `);this.webglProgramInfo={program:n,attribLocations:{vertexPosition:d.getAttribLocation(n,\"aVertexPosition\")},uniformLocations:{uSampler:d.getUniformLocation(n,\"uSampler\"),uColorFactor:d.getUniformLocation(n,\"uColorFactor\")}},this.webglBuffers=e(d),this.webglTexture=t(d),this.currentFSColorMode=u}const v=(e,t,i)=>{const o=e.RGBA,r=e.RGBA,s=e.UNSIGNED_BYTE;e.bindTexture(e.TEXTURE_2D,t),e.texImage2D(e.TEXTURE_2D,0,o,r,s,i)},_=(e,t,i,o)=>{e.clearColor(0,0,0,1),e.clearDepth(1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,i.indices),e.useProgram(t.program);{const o=2,r=e.FLOAT,s=!1,n=0,a=0;e.bindBuffer(e.ARRAY_BUFFER,i.position),e.vertexAttribPointer(t.attribLocations.vertexPosition,o,r,s,n,a),e.enableVertexAttribArray(t.attribLocations.vertexPosition)}e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,o),e.uniform1i(t.uniformLocations.uSampler,0),e.uniform1f(t.uniformLocations.uColorFactor,\"grey\"===u||\"grey32\"===u?1:0);const r=e.UNSIGNED_SHORT;e.drawElements(e.TRIANGLES,6,r,0)};let f;if(v(d,this.webglTexture,e),_(d,this.webglProgramInfo,this.webglBuffers,this.webglTexture),s){if(s.length=this.croppingRegions.length||this._croppingRegionIndex<0)throw new Error(\"The 'croppingRegionIndex' is out of bounds.\");e=this.croppingRegions[this._croppingRegionIndex],this.bIncreaseRegionIndexAuto&&++this._croppingRegionIndex>=this.croppingRegions.length&&(this._croppingRegionIndex=0)}return e}_fetchingLoop(e){if(this.bDestroyed)return void this.stopFetchingLoop();if(!this._bOpen||!this.isFetchingLoopStarted())return void this.stopFetchingLoop();if(this._video.paused)return i._onLog&&i._onLog(\"DCE: Video is paused. Ask in 1s.\"),this._frameLoopTimeoutId&&clearTimeout(this._frameLoopTimeoutId),void(this._frameLoopTimeoutId=setTimeout((()=>{this._fetchingLoop(!0)}),1e3));const t=()=>{i._onLog&&i._onLog(\"DCE: start fetching a frame: \"+Date.now());const e=this.getCurrentRegion();let t=this._getVideoFrame(e);if(!t)return void(i._onLog&&i._onLog(\"DCE: get a invalid frame, abandon it: \"+Date.now()));for(;this._frameQueue&&this._frameQueue.length>=this.maxNumberOfFramesInBuffer;)this._frameQueue.shift();this._frameQueue.push(t),i._onLog&&i._onLog(\"DCE: finish fetching a frame: \"+Date.now());const o=this.mapCameraEvents.get(\"frameAddedToBuffer\");for(let e of o)setTimeout(e,0)},o=()=>{this._frameLoopTimeoutId2&&clearTimeout(this._frameLoopTimeoutId2),this.refreshInterval<=0||(this._frameLoopTimeoutId2=setTimeout((()=>{this.bDestroyed?this.stopFetchingLoop():this._bOpen&&this.isFetchingLoopStarted()?this._video.paused?this._frameLoopTimeoutId&&clearTimeout(this._frameLoopTimeoutId):(i._onLog&&i._onLog(\"DCE: second timeout executes: \"+Date.now()),t(),o()):this.stopFetchingLoop()}),this.refreshInterval))};e&&(this._frameQueue.length0&&o()):this.refreshInterval>0?(t(),o()):0===this.refreshInterval?t():this.refreshInterval),this._frameLoopTimeoutId&&clearTimeout(this._frameLoopTimeoutId),this._frameLoopTimeoutId=setTimeout((()=>{this._fetchingLoop(!0)}),this.loopInterval)}startFetchingLoop(){if(this.bDestroyed)throw Error(\"The DCE instance has been destroyed.\");if(this._assertOpen(),this.singleFrameMode)throw Error(\"'startFetchingLoop()' is unavailable in singleFrameMode.\");if(this._video.paused)throw Error(\"The video is paused.\");this.isFetchingLoopStarted()||(this._bFetchingLoopStarted=!0,i._onLog&&i._onLog(\"start fetching loop: \"+Date.now()),this._fetchingLoop(!0))}isFetchingLoopStarted(){return this._bFetchingLoopStarted}stopFetchingLoop(){this._bFetchingLoopStarted&&(i._onLog&&i._onLog(\"stop fetching loop: \"+Date.now()),this._frameLoopTimeoutId&&clearTimeout(this._frameLoopTimeoutId),this._frameQueue.length=0,this._bFetchingLoopStarted=!1)}getFrameFromBuffer(e){return this._frameQueue&&this._frameQueue.length?e?e{if(!t&&document.currentScript){let e=document.currentScript.src,t=e.indexOf(\"?\");if(-1!=t)e=e.substring(0,t);else{let t=e.indexOf(\"#\");-1!=t&&(e=e.substring(0,t))}return e.substring(0,e.lastIndexOf(\"/\")+1)}return\"./\"})(),i._defaultUIElementURL=\"@engineResourcePath/dce.ui.html\";export{i as CameraEnhancer};\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n","var global = require('../internals/global');\nvar bind = require('../internals/function-bind-context');\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar tryToString = require('../internals/try-to-string');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar iteratorClose = require('../internals/iterator-close');\n\nvar TypeError = global.TypeError;\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nvar ResultPrototype = Result.prototype;\n\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that);\n var iterator, iterFn, index, length, result, next, step;\n\n var stop = function (condition) {\n if (iterator) iteratorClose(iterator, 'normal', condition);\n return new Result(true, condition);\n };\n\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n } return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (!iterFn) throw TypeError(tryToString(iterable) + ' is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && isPrototypeOf(ResultPrototype, result)) return result;\n } return new Result(false);\n }\n iterator = getIterator(iterable, iterFn);\n }\n\n next = iterator.next;\n while (!(step = call(next, iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator, 'throw', error);\n }\n if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;\n } return new Result(false);\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toIntegerOrInfinity(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty == typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar definePropertyModule = require('../internals/object-define-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar getMethod = require('../internals/get-method');\n\nmodule.exports = function (iterator, kind, value) {\n var innerResult, innerError;\n anObject(iterator);\n try {\n innerResult = getMethod(iterator, 'return');\n if (!innerResult) {\n if (kind === 'throw') throw value;\n return value;\n }\n innerResult = call(innerResult, iterator);\n } catch (error) {\n innerError = true;\n innerResult = error;\n }\n if (kind === 'throw') throw value;\n if (innerError) throw innerResult;\n anObject(innerResult);\n return value;\n};\n","/*!\n * Vue.js v2.6.14\n * (c) 2014-2021 Evan You\n * Released under the MIT License.\n */\n/* */\n\nvar emptyObject = Object.freeze({});\n\n// These helpers produce better VM code in JS engines due to their\n// explicitness and function inlining.\nfunction isUndef (v) {\n return v === undefined || v === null\n}\n\nfunction isDef (v) {\n return v !== undefined && v !== null\n}\n\nfunction isTrue (v) {\n return v === true\n}\n\nfunction isFalse (v) {\n return v === false\n}\n\n/**\n * Check if value is primitive.\n */\nfunction isPrimitive (value) {\n return (\n typeof value === 'string' ||\n typeof value === 'number' ||\n // $flow-disable-line\n typeof value === 'symbol' ||\n typeof value === 'boolean'\n )\n}\n\n/**\n * Quick object check - this is primarily used to tell\n * Objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\n/**\n * Get the raw type string of a value, e.g., [object Object].\n */\nvar _toString = Object.prototype.toString;\n\nfunction toRawType (value) {\n return _toString.call(value).slice(8, -1)\n}\n\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nfunction isPlainObject (obj) {\n return _toString.call(obj) === '[object Object]'\n}\n\nfunction isRegExp (v) {\n return _toString.call(v) === '[object RegExp]'\n}\n\n/**\n * Check if val is a valid array index.\n */\nfunction isValidArrayIndex (val) {\n var n = parseFloat(String(val));\n return n >= 0 && Math.floor(n) === n && isFinite(val)\n}\n\nfunction isPromise (val) {\n return (\n isDef(val) &&\n typeof val.then === 'function' &&\n typeof val.catch === 'function'\n )\n}\n\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction toString (val) {\n return val == null\n ? ''\n : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)\n ? JSON.stringify(val, null, 2)\n : String(val)\n}\n\n/**\n * Convert an input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber (val) {\n var n = parseFloat(val);\n return isNaN(n) ? val : n\n}\n\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap (\n str,\n expectsLowerCase\n) {\n var map = Object.create(null);\n var list = str.split(',');\n for (var i = 0; i < list.length; i++) {\n map[list[i]] = true;\n }\n return expectsLowerCase\n ? function (val) { return map[val.toLowerCase()]; }\n : function (val) { return map[val]; }\n}\n\n/**\n * Check if a tag is a built-in tag.\n */\nvar isBuiltInTag = makeMap('slot,component', true);\n\n/**\n * Check if an attribute is a reserved attribute.\n */\nvar isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');\n\n/**\n * Remove an item from an array.\n */\nfunction remove (arr, item) {\n if (arr.length) {\n var index = arr.indexOf(item);\n if (index > -1) {\n return arr.splice(index, 1)\n }\n }\n}\n\n/**\n * Check whether an object has the property.\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n return hasOwnProperty.call(obj, key)\n}\n\n/**\n * Create a cached version of a pure function.\n */\nfunction cached (fn) {\n var cache = Object.create(null);\n return (function cachedFn (str) {\n var hit = cache[str];\n return hit || (cache[str] = fn(str))\n })\n}\n\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })\n});\n\n/**\n * Capitalize a string.\n */\nvar capitalize = cached(function (str) {\n return str.charAt(0).toUpperCase() + str.slice(1)\n});\n\n/**\n * Hyphenate a camelCase string.\n */\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = cached(function (str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n});\n\n/**\n * Simple bind polyfill for environments that do not support it,\n * e.g., PhantomJS 1.x. Technically, we don't need this anymore\n * since native bind is now performant enough in most browsers.\n * But removing it would mean breaking code that was able to run in\n * PhantomJS 1.x, so this must be kept for backward compatibility.\n */\n\n/* istanbul ignore next */\nfunction polyfillBind (fn, ctx) {\n function boundFn (a) {\n var l = arguments.length;\n return l\n ? l > 1\n ? fn.apply(ctx, arguments)\n : fn.call(ctx, a)\n : fn.call(ctx)\n }\n\n boundFn._length = fn.length;\n return boundFn\n}\n\nfunction nativeBind (fn, ctx) {\n return fn.bind(ctx)\n}\n\nvar bind = Function.prototype.bind\n ? nativeBind\n : polyfillBind;\n\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n}\n\n/**\n * Mix properties into target object.\n */\nfunction extend (to, _from) {\n for (var key in _from) {\n to[key] = _from[key];\n }\n return to\n}\n\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject (arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n}\n\n/* eslint-disable no-unused-vars */\n\n/**\n * Perform no operation.\n * Stubbing args to make Flow happy without leaving useless transpiled code\n * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).\n */\nfunction noop (a, b, c) {}\n\n/**\n * Always return false.\n */\nvar no = function (a, b, c) { return false; };\n\n/* eslint-enable no-unused-vars */\n\n/**\n * Return the same value.\n */\nvar identity = function (_) { return _; };\n\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}\n\n/**\n * Return the first index at which a loosely equal value can be\n * found in the array (if value is a plain object, the array must\n * contain an object of the same shape), or -1 if it is not present.\n */\nfunction looseIndexOf (arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) { return i }\n }\n return -1\n}\n\n/**\n * Ensure a function is called only once.\n */\nfunction once (fn) {\n var called = false;\n return function () {\n if (!called) {\n called = true;\n fn.apply(this, arguments);\n }\n }\n}\n\nvar SSR_ATTR = 'data-server-rendered';\n\nvar ASSET_TYPES = [\n 'component',\n 'directive',\n 'filter'\n];\n\nvar LIFECYCLE_HOOKS = [\n 'beforeCreate',\n 'created',\n 'beforeMount',\n 'mounted',\n 'beforeUpdate',\n 'updated',\n 'beforeDestroy',\n 'destroyed',\n 'activated',\n 'deactivated',\n 'errorCaptured',\n 'serverPrefetch'\n];\n\n/* */\n\n\n\nvar config = ({\n /**\n * Option merge strategies (used in core/util/options)\n */\n // $flow-disable-line\n optionMergeStrategies: Object.create(null),\n\n /**\n * Whether to suppress warnings.\n */\n silent: false,\n\n /**\n * Show production mode tip message on boot?\n */\n productionTip: process.env.NODE_ENV !== 'production',\n\n /**\n * Whether to enable devtools\n */\n devtools: process.env.NODE_ENV !== 'production',\n\n /**\n * Whether to record perf\n */\n performance: false,\n\n /**\n * Error handler for watcher errors\n */\n errorHandler: null,\n\n /**\n * Warn handler for watcher warns\n */\n warnHandler: null,\n\n /**\n * Ignore certain custom elements\n */\n ignoredElements: [],\n\n /**\n * Custom user key aliases for v-on\n */\n // $flow-disable-line\n keyCodes: Object.create(null),\n\n /**\n * Check if a tag is reserved so that it cannot be registered as a\n * component. This is platform-dependent and may be overwritten.\n */\n isReservedTag: no,\n\n /**\n * Check if an attribute is reserved so that it cannot be used as a component\n * prop. This is platform-dependent and may be overwritten.\n */\n isReservedAttr: no,\n\n /**\n * Check if a tag is an unknown element.\n * Platform-dependent.\n */\n isUnknownElement: no,\n\n /**\n * Get the namespace of an element\n */\n getTagNamespace: noop,\n\n /**\n * Parse the real tag name for the specific platform.\n */\n parsePlatformTagName: identity,\n\n /**\n * Check if an attribute must be bound using property, e.g. value\n * Platform-dependent.\n */\n mustUseProp: no,\n\n /**\n * Perform updates asynchronously. Intended to be used by Vue Test Utils\n * This will significantly reduce performance if set to false.\n */\n async: true,\n\n /**\n * Exposed for legacy reasons\n */\n _lifecycleHooks: LIFECYCLE_HOOKS\n});\n\n/* */\n\n/**\n * unicode letters used for parsing html tags, component names and property paths.\n * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname\n * skipping \\u10000-\\uEFFFF due to it freezing up PhantomJS\n */\nvar unicodeRegExp = /a-zA-Z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD/;\n\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved (str) {\n var c = (str + '').charCodeAt(0);\n return c === 0x24 || c === 0x5F\n}\n\n/**\n * Define a property.\n */\nfunction def (obj, key, val, enumerable) {\n Object.defineProperty(obj, key, {\n value: val,\n enumerable: !!enumerable,\n writable: true,\n configurable: true\n });\n}\n\n/**\n * Parse simple path.\n */\nvar bailRE = new RegExp((\"[^\" + (unicodeRegExp.source) + \".$_\\\\d]\"));\nfunction parsePath (path) {\n if (bailRE.test(path)) {\n return\n }\n var segments = path.split('.');\n return function (obj) {\n for (var i = 0; i < segments.length; i++) {\n if (!obj) { return }\n obj = obj[segments[i]];\n }\n return obj\n }\n}\n\n/* */\n\n// can we use __proto__?\nvar hasProto = '__proto__' in {};\n\n// Browser environment sniffing\nvar inBrowser = typeof window !== 'undefined';\nvar inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;\nvar weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\nvar isIE = UA && /msie|trident/.test(UA);\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nvar isEdge = UA && UA.indexOf('edge/') > 0;\nvar isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');\nvar isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');\nvar isChrome = UA && /chrome\\/\\d+/.test(UA) && !isEdge;\nvar isPhantomJS = UA && /phantomjs/.test(UA);\nvar isFF = UA && UA.match(/firefox\\/(\\d+)/);\n\n// Firefox has a \"watch\" function on Object.prototype...\nvar nativeWatch = ({}).watch;\n\nvar supportsPassive = false;\nif (inBrowser) {\n try {\n var opts = {};\n Object.defineProperty(opts, 'passive', ({\n get: function get () {\n /* istanbul ignore next */\n supportsPassive = true;\n }\n })); // https://github.com/facebook/flow/issues/285\n window.addEventListener('test-passive', null, opts);\n } catch (e) {}\n}\n\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nvar _isServer;\nvar isServerRendering = function () {\n if (_isServer === undefined) {\n /* istanbul ignore if */\n if (!inBrowser && !inWeex && typeof global !== 'undefined') {\n // detect presence of vue-server-renderer and avoid\n // Webpack shimming the process\n _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';\n } else {\n _isServer = false;\n }\n }\n return _isServer\n};\n\n// detect devtools\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\n/* istanbul ignore next */\nfunction isNative (Ctor) {\n return typeof Ctor === 'function' && /native code/.test(Ctor.toString())\n}\n\nvar hasSymbol =\n typeof Symbol !== 'undefined' && isNative(Symbol) &&\n typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);\n\nvar _Set;\n/* istanbul ignore if */ // $flow-disable-line\nif (typeof Set !== 'undefined' && isNative(Set)) {\n // use native Set when available.\n _Set = Set;\n} else {\n // a non-standard Set polyfill that only works with primitive keys.\n _Set = /*@__PURE__*/(function () {\n function Set () {\n this.set = Object.create(null);\n }\n Set.prototype.has = function has (key) {\n return this.set[key] === true\n };\n Set.prototype.add = function add (key) {\n this.set[key] = true;\n };\n Set.prototype.clear = function clear () {\n this.set = Object.create(null);\n };\n\n return Set;\n }());\n}\n\n/* */\n\nvar warn = noop;\nvar tip = noop;\nvar generateComponentTrace = (noop); // work around flow check\nvar formatComponentName = (noop);\n\nif (process.env.NODE_ENV !== 'production') {\n var hasConsole = typeof console !== 'undefined';\n var classifyRE = /(?:^|[-_])(\\w)/g;\n var classify = function (str) { return str\n .replace(classifyRE, function (c) { return c.toUpperCase(); })\n .replace(/[-_]/g, ''); };\n\n warn = function (msg, vm) {\n var trace = vm ? generateComponentTrace(vm) : '';\n\n if (config.warnHandler) {\n config.warnHandler.call(null, msg, vm, trace);\n } else if (hasConsole && (!config.silent)) {\n console.error((\"[Vue warn]: \" + msg + trace));\n }\n };\n\n tip = function (msg, vm) {\n if (hasConsole && (!config.silent)) {\n console.warn(\"[Vue tip]: \" + msg + (\n vm ? generateComponentTrace(vm) : ''\n ));\n }\n };\n\n formatComponentName = function (vm, includeFile) {\n if (vm.$root === vm) {\n return ''\n }\n var options = typeof vm === 'function' && vm.cid != null\n ? vm.options\n : vm._isVue\n ? vm.$options || vm.constructor.options\n : vm;\n var name = options.name || options._componentTag;\n var file = options.__file;\n if (!name && file) {\n var match = file.match(/([^/\\\\]+)\\.vue$/);\n name = match && match[1];\n }\n\n return (\n (name ? (\"<\" + (classify(name)) + \">\") : \"\") +\n (file && includeFile !== false ? (\" at \" + file) : '')\n )\n };\n\n var repeat = function (str, n) {\n var res = '';\n while (n) {\n if (n % 2 === 1) { res += str; }\n if (n > 1) { str += str; }\n n >>= 1;\n }\n return res\n };\n\n generateComponentTrace = function (vm) {\n if (vm._isVue && vm.$parent) {\n var tree = [];\n var currentRecursiveSequence = 0;\n while (vm) {\n if (tree.length > 0) {\n var last = tree[tree.length - 1];\n if (last.constructor === vm.constructor) {\n currentRecursiveSequence++;\n vm = vm.$parent;\n continue\n } else if (currentRecursiveSequence > 0) {\n tree[tree.length - 1] = [last, currentRecursiveSequence];\n currentRecursiveSequence = 0;\n }\n }\n tree.push(vm);\n vm = vm.$parent;\n }\n return '\\n\\nfound in\\n\\n' + tree\n .map(function (vm, i) { return (\"\" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)\n ? ((formatComponentName(vm[0])) + \"... (\" + (vm[1]) + \" recursive calls)\")\n : formatComponentName(vm))); })\n .join('\\n')\n } else {\n return (\"\\n\\n(found in \" + (formatComponentName(vm)) + \")\")\n }\n };\n}\n\n/* */\n\nvar uid = 0;\n\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n */\nvar Dep = function Dep () {\n this.id = uid++;\n this.subs = [];\n};\n\nDep.prototype.addSub = function addSub (sub) {\n this.subs.push(sub);\n};\n\nDep.prototype.removeSub = function removeSub (sub) {\n remove(this.subs, sub);\n};\n\nDep.prototype.depend = function depend () {\n if (Dep.target) {\n Dep.target.addDep(this);\n }\n};\n\nDep.prototype.notify = function notify () {\n // stabilize the subscriber list first\n var subs = this.subs.slice();\n if (process.env.NODE_ENV !== 'production' && !config.async) {\n // subs aren't sorted in scheduler if not running async\n // we need to sort them now to make sure they fire in correct\n // order\n subs.sort(function (a, b) { return a.id - b.id; });\n }\n for (var i = 0, l = subs.length; i < l; i++) {\n subs[i].update();\n }\n};\n\n// The current target watcher being evaluated.\n// This is globally unique because only one watcher\n// can be evaluated at a time.\nDep.target = null;\nvar targetStack = [];\n\nfunction pushTarget (target) {\n targetStack.push(target);\n Dep.target = target;\n}\n\nfunction popTarget () {\n targetStack.pop();\n Dep.target = targetStack[targetStack.length - 1];\n}\n\n/* */\n\nvar VNode = function VNode (\n tag,\n data,\n children,\n text,\n elm,\n context,\n componentOptions,\n asyncFactory\n) {\n this.tag = tag;\n this.data = data;\n this.children = children;\n this.text = text;\n this.elm = elm;\n this.ns = undefined;\n this.context = context;\n this.fnContext = undefined;\n this.fnOptions = undefined;\n this.fnScopeId = undefined;\n this.key = data && data.key;\n this.componentOptions = componentOptions;\n this.componentInstance = undefined;\n this.parent = undefined;\n this.raw = false;\n this.isStatic = false;\n this.isRootInsert = true;\n this.isComment = false;\n this.isCloned = false;\n this.isOnce = false;\n this.asyncFactory = asyncFactory;\n this.asyncMeta = undefined;\n this.isAsyncPlaceholder = false;\n};\n\nvar prototypeAccessors = { child: { configurable: true } };\n\n// DEPRECATED: alias for componentInstance for backwards compat.\n/* istanbul ignore next */\nprototypeAccessors.child.get = function () {\n return this.componentInstance\n};\n\nObject.defineProperties( VNode.prototype, prototypeAccessors );\n\nvar createEmptyVNode = function (text) {\n if ( text === void 0 ) text = '';\n\n var node = new VNode();\n node.text = text;\n node.isComment = true;\n return node\n};\n\nfunction createTextVNode (val) {\n return new VNode(undefined, undefined, undefined, String(val))\n}\n\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(),\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\n\nvar arrayProto = Array.prototype;\nvar arrayMethods = Object.create(arrayProto);\n\nvar methodsToPatch = [\n 'push',\n 'pop',\n 'shift',\n 'unshift',\n 'splice',\n 'sort',\n 'reverse'\n];\n\n/**\n * Intercept mutating methods and emit events\n */\nmethodsToPatch.forEach(function (method) {\n // cache original method\n var original = arrayProto[method];\n def(arrayMethods, method, function mutator () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var result = original.apply(this, args);\n var ob = this.__ob__;\n var inserted;\n switch (method) {\n case 'push':\n case 'unshift':\n inserted = args;\n break\n case 'splice':\n inserted = args.slice(2);\n break\n }\n if (inserted) { ob.observeArray(inserted); }\n // notify change\n ob.dep.notify();\n return result\n });\n});\n\n/* */\n\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\n\n/**\n * In some cases we may want to disable observation inside a component's\n * update computation.\n */\nvar shouldObserve = true;\n\nfunction toggleObserving (value) {\n shouldObserve = value;\n}\n\n/**\n * Observer class that is attached to each observed\n * object. Once attached, the observer converts the target\n * object's property keys into getter/setters that\n * collect dependencies and dispatch updates.\n */\nvar Observer = function Observer (value) {\n this.value = value;\n this.dep = new Dep();\n this.vmCount = 0;\n def(value, '__ob__', this);\n if (Array.isArray(value)) {\n if (hasProto) {\n protoAugment(value, arrayMethods);\n } else {\n copyAugment(value, arrayMethods, arrayKeys);\n }\n this.observeArray(value);\n } else {\n this.walk(value);\n }\n};\n\n/**\n * Walk through all properties and convert them into\n * getter/setters. This method should only be called when\n * value type is Object.\n */\nObserver.prototype.walk = function walk (obj) {\n var keys = Object.keys(obj);\n for (var i = 0; i < keys.length; i++) {\n defineReactive$$1(obj, keys[i]);\n }\n};\n\n/**\n * Observe a list of Array items.\n */\nObserver.prototype.observeArray = function observeArray (items) {\n for (var i = 0, l = items.length; i < l; i++) {\n observe(items[i]);\n }\n};\n\n// helpers\n\n/**\n * Augment a target Object or Array by intercepting\n * the prototype chain using __proto__\n */\nfunction protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}\n\n/**\n * Augment a target Object or Array by defining\n * hidden properties.\n */\n/* istanbul ignore next */\nfunction copyAugment (target, src, keys) {\n for (var i = 0, l = keys.length; i < l; i++) {\n var key = keys[i];\n def(target, key, src[key]);\n }\n}\n\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n shouldObserve &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}\n\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}\n\n/**\n * Set a property on an object. Adds the new property and\n * triggers change notification if the property doesn't\n * already exist.\n */\nfunction set (target, key, val) {\n if (process.env.NODE_ENV !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot set reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n return val\n }\n if (key in target && !(key in Object.prototype)) {\n target[key] = val;\n return val\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n 'at runtime - declare it upfront in the data option.'\n );\n return val\n }\n if (!ob) {\n target[key] = val;\n return val\n }\n defineReactive$$1(ob.value, key, val);\n ob.dep.notify();\n return val\n}\n\n/**\n * Delete a property and trigger change if necessary.\n */\nfunction del (target, key) {\n if (process.env.NODE_ENV !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}\n\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray (value) {\n for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n}\n\n/* */\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nvar strats = config.optionMergeStrategies;\n\n/**\n * Options with restrictions\n */\nif (process.env.NODE_ENV !== 'production') {\n strats.el = strats.propsData = function (parent, child, vm, key) {\n if (!vm) {\n warn(\n \"option \\\"\" + key + \"\\\" can only be used during instance \" +\n 'creation with the `new` keyword.'\n );\n }\n return defaultStrat(parent, child)\n };\n}\n\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}\n\n/**\n * Data\n */\nfunction mergeDataOrFn (\n parentVal,\n childVal,\n vm\n) {\n if (!vm) {\n // in a Vue.extend merge, both should be functions\n if (!childVal) {\n return parentVal\n }\n if (!parentVal) {\n return childVal\n }\n // when parentVal & childVal are both present,\n // we need to return a function that returns the\n // merged result of both functions... no need to\n // check if parentVal is a function here because\n // it has to be a function to pass previous merges.\n return function mergedDataFn () {\n return mergeData(\n typeof childVal === 'function' ? childVal.call(this, this) : childVal,\n typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal\n )\n }\n } else {\n return function mergedInstanceDataFn () {\n // instance merge\n var instanceData = typeof childVal === 'function'\n ? childVal.call(vm, vm)\n : childVal;\n var defaultData = typeof parentVal === 'function'\n ? parentVal.call(vm, vm)\n : parentVal;\n if (instanceData) {\n return mergeData(instanceData, defaultData)\n } else {\n return defaultData\n }\n }\n }\n}\n\nstrats.data = function (\n parentVal,\n childVal,\n vm\n) {\n if (!vm) {\n if (childVal && typeof childVal !== 'function') {\n process.env.NODE_ENV !== 'production' && warn(\n 'The \"data\" option should be a function ' +\n 'that returns a per-instance value in component ' +\n 'definitions.',\n vm\n );\n\n return parentVal\n }\n return mergeDataOrFn(parentVal, childVal)\n }\n\n return mergeDataOrFn(parentVal, childVal, vm)\n};\n\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeHook (\n parentVal,\n childVal\n) {\n var res = childVal\n ? parentVal\n ? parentVal.concat(childVal)\n : Array.isArray(childVal)\n ? childVal\n : [childVal]\n : parentVal;\n return res\n ? dedupeHooks(res)\n : res\n}\n\nfunction dedupeHooks (hooks) {\n var res = [];\n for (var i = 0; i < hooks.length; i++) {\n if (res.indexOf(hooks[i]) === -1) {\n res.push(hooks[i]);\n }\n }\n return res\n}\n\nLIFECYCLE_HOOKS.forEach(function (hook) {\n strats[hook] = mergeHook;\n});\n\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}\n\nASSET_TYPES.forEach(function (type) {\n strats[type + 's'] = mergeAssets;\n});\n\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (\n parentVal,\n childVal,\n vm,\n key\n) {\n // work around Firefox's Object.prototype.watch...\n if (parentVal === nativeWatch) { parentVal = undefined; }\n if (childVal === nativeWatch) { childVal = undefined; }\n /* istanbul ignore if */\n if (!childVal) { return Object.create(parentVal || null) }\n if (process.env.NODE_ENV !== 'production') {\n assertObjectType(key, childVal, vm);\n }\n if (!parentVal) { return childVal }\n var ret = {};\n extend(ret, parentVal);\n for (var key$1 in childVal) {\n var parent = ret[key$1];\n var child = childVal[key$1];\n if (parent && !Array.isArray(parent)) {\n parent = [parent];\n }\n ret[key$1] = parent\n ? parent.concat(child)\n : Array.isArray(child) ? child : [child];\n }\n return ret\n};\n\n/**\n * Other object hashes.\n */\nstrats.props =\nstrats.methods =\nstrats.inject =\nstrats.computed = function (\n parentVal,\n childVal,\n vm,\n key\n) {\n if (childVal && process.env.NODE_ENV !== 'production') {\n assertObjectType(key, childVal, vm);\n }\n if (!parentVal) { return childVal }\n var ret = Object.create(null);\n extend(ret, parentVal);\n if (childVal) { extend(ret, childVal); }\n return ret\n};\nstrats.provide = mergeDataOrFn;\n\n/**\n * Default strategy.\n */\nvar defaultStrat = function (parentVal, childVal) {\n return childVal === undefined\n ? parentVal\n : childVal\n};\n\n/**\n * Validate component names\n */\nfunction checkComponents (options) {\n for (var key in options.components) {\n validateComponentName(key);\n }\n}\n\nfunction validateComponentName (name) {\n if (!new RegExp((\"^[a-zA-Z][\\\\-\\\\.0-9_\" + (unicodeRegExp.source) + \"]*$\")).test(name)) {\n warn(\n 'Invalid component name: \"' + name + '\". Component names ' +\n 'should conform to valid custom element name in html5 specification.'\n );\n }\n if (isBuiltInTag(name) || config.isReservedTag(name)) {\n warn(\n 'Do not use built-in or reserved HTML elements as component ' +\n 'id: ' + name\n );\n }\n}\n\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (process.env.NODE_ENV !== 'production') {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (process.env.NODE_ENV !== 'production') {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}\n\n/**\n * Normalize all injections into Object-based format\n */\nfunction normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (process.env.NODE_ENV !== 'production') {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}\n\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives (options) {\n var dirs = options.directives;\n if (dirs) {\n for (var key in dirs) {\n var def$$1 = dirs[key];\n if (typeof def$$1 === 'function') {\n dirs[key] = { bind: def$$1, update: def$$1 };\n }\n }\n }\n}\n\nfunction assertObjectType (name, value, vm) {\n if (!isPlainObject(value)) {\n warn(\n \"Invalid value for option \\\"\" + name + \"\\\": expected an Object, \" +\n \"but got \" + (toRawType(value)) + \".\",\n vm\n );\n }\n}\n\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions (\n parent,\n child,\n vm\n) {\n if (process.env.NODE_ENV !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n\n // Apply extends and mixins on the child options,\n // but only if it is a raw options object that isn't\n // the result of another mergeOptions call.\n // Only merged options has the _base property.\n if (!child._base) {\n if (child.extends) {\n parent = mergeOptions(parent, child.extends, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n }\n\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}\n\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}\n\n/* */\n\n\n\nfunction validateProp (\n key,\n propOptions,\n propsData,\n vm\n) {\n var prop = propOptions[key];\n var absent = !hasOwn(propsData, key);\n var value = propsData[key];\n // boolean casting\n var booleanIndex = getTypeIndex(Boolean, prop.type);\n if (booleanIndex > -1) {\n if (absent && !hasOwn(prop, 'default')) {\n value = false;\n } else if (value === '' || value === hyphenate(key)) {\n // only cast empty string / same name to boolean if\n // boolean has higher priority\n var stringIndex = getTypeIndex(String, prop.type);\n if (stringIndex < 0 || booleanIndex < stringIndex) {\n value = true;\n }\n }\n }\n // check default value\n if (value === undefined) {\n value = getPropDefaultValue(vm, prop, key);\n // since the default value is a fresh copy,\n // make sure to observe it.\n var prevShouldObserve = shouldObserve;\n toggleObserving(true);\n observe(value);\n toggleObserving(prevShouldObserve);\n }\n if (\n process.env.NODE_ENV !== 'production' &&\n // skip validation for weex recycle-list child component props\n !(false)\n ) {\n assertProp(prop, key, value, vm, absent);\n }\n return value\n}\n\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (process.env.NODE_ENV !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}\n\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i], vm);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n\n var haveExpectedTypes = expectedTypes.some(function (t) { return t; });\n if (!valid && haveExpectedTypes) {\n warn(\n getInvalidTypeMessage(name, value, expectedTypes),\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}\n\nvar simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;\n\nfunction assertType (value, type, vm) {\n var valid;\n var expectedType = getType(type);\n if (simpleCheckRE.test(expectedType)) {\n var t = typeof value;\n valid = t === expectedType.toLowerCase();\n // for primitive wrapper objects\n if (!valid && t === 'object') {\n valid = value instanceof type;\n }\n } else if (expectedType === 'Object') {\n valid = isPlainObject(value);\n } else if (expectedType === 'Array') {\n valid = Array.isArray(value);\n } else {\n try {\n valid = value instanceof type;\n } catch (e) {\n warn('Invalid prop type: \"' + String(type) + '\" is not a constructor', vm);\n valid = false;\n }\n }\n return {\n valid: valid,\n expectedType: expectedType\n }\n}\n\nvar functionTypeCheckRE = /^\\s*function (\\w+)/;\n\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType (fn) {\n var match = fn && fn.toString().match(functionTypeCheckRE);\n return match ? match[1] : ''\n}\n\nfunction isSameType (a, b) {\n return getType(a) === getType(b)\n}\n\nfunction getTypeIndex (type, expectedTypes) {\n if (!Array.isArray(expectedTypes)) {\n return isSameType(expectedTypes, type) ? 0 : -1\n }\n for (var i = 0, len = expectedTypes.length; i < len; i++) {\n if (isSameType(expectedTypes[i], type)) {\n return i\n }\n }\n return -1\n}\n\nfunction getInvalidTypeMessage (name, value, expectedTypes) {\n var message = \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', '));\n var expectedType = expectedTypes[0];\n var receivedType = toRawType(value);\n // check if we need to specify expected value\n if (\n expectedTypes.length === 1 &&\n isExplicable(expectedType) &&\n isExplicable(typeof value) &&\n !isBoolean(expectedType, receivedType)\n ) {\n message += \" with value \" + (styleValue(value, expectedType));\n }\n message += \", got \" + receivedType + \" \";\n // check if we need to specify received value\n if (isExplicable(receivedType)) {\n message += \"with value \" + (styleValue(value, receivedType)) + \".\";\n }\n return message\n}\n\nfunction styleValue (value, type) {\n if (type === 'String') {\n return (\"\\\"\" + value + \"\\\"\")\n } else if (type === 'Number') {\n return (\"\" + (Number(value)))\n } else {\n return (\"\" + value)\n }\n}\n\nvar EXPLICABLE_TYPES = ['string', 'number', 'boolean'];\nfunction isExplicable (value) {\n return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; })\n}\n\nfunction isBoolean () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })\n}\n\n/* */\n\nfunction handleError (err, vm, info) {\n // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.\n // See: https://github.com/vuejs/vuex/issues/1505\n pushTarget();\n try {\n if (vm) {\n var cur = vm;\n while ((cur = cur.$parent)) {\n var hooks = cur.$options.errorCaptured;\n if (hooks) {\n for (var i = 0; i < hooks.length; i++) {\n try {\n var capture = hooks[i].call(cur, err, vm, info) === false;\n if (capture) { return }\n } catch (e) {\n globalHandleError(e, cur, 'errorCaptured hook');\n }\n }\n }\n }\n }\n globalHandleError(err, vm, info);\n } finally {\n popTarget();\n }\n}\n\nfunction invokeWithErrorHandling (\n handler,\n context,\n args,\n vm,\n info\n) {\n var res;\n try {\n res = args ? handler.apply(context, args) : handler.call(context);\n if (res && !res._isVue && isPromise(res) && !res._handled) {\n res.catch(function (e) { return handleError(e, vm, info + \" (Promise/async)\"); });\n // issue #9511\n // avoid catch triggering multiple times when nested calls\n res._handled = true;\n }\n } catch (e) {\n handleError(e, vm, info);\n }\n return res\n}\n\nfunction globalHandleError (err, vm, info) {\n if (config.errorHandler) {\n try {\n return config.errorHandler.call(null, err, vm, info)\n } catch (e) {\n // if the user intentionally throws the original error in the handler,\n // do not log it twice\n if (e !== err) {\n logError(e, null, 'config.errorHandler');\n }\n }\n }\n logError(err, vm, info);\n}\n\nfunction logError (err, vm, info) {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Error in \" + info + \": \\\"\" + (err.toString()) + \"\\\"\"), vm);\n }\n /* istanbul ignore else */\n if ((inBrowser || inWeex) && typeof console !== 'undefined') {\n console.error(err);\n } else {\n throw err\n }\n}\n\n/* */\n\nvar isUsingMicroTask = false;\n\nvar callbacks = [];\nvar pending = false;\n\nfunction flushCallbacks () {\n pending = false;\n var copies = callbacks.slice(0);\n callbacks.length = 0;\n for (var i = 0; i < copies.length; i++) {\n copies[i]();\n }\n}\n\n// Here we have async deferring wrappers using microtasks.\n// In 2.5 we used (macro) tasks (in combination with microtasks).\n// However, it has subtle problems when state is changed right before repaint\n// (e.g. #6813, out-in transitions).\n// Also, using (macro) tasks in event handler would cause some weird behaviors\n// that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).\n// So we now use microtasks everywhere, again.\n// A major drawback of this tradeoff is that there are some scenarios\n// where microtasks have too high a priority and fire in between supposedly\n// sequential events (e.g. #4521, #6690, which have workarounds)\n// or even between bubbling of the same event (#6566).\nvar timerFunc;\n\n// The nextTick behavior leverages the microtask queue, which can be accessed\n// via either native Promise.then or MutationObserver.\n// MutationObserver has wider support, however it is seriously bugged in\n// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n// completely stops working after triggering a few times... so, if native\n// Promise is available, we will use it:\n/* istanbul ignore next, $flow-disable-line */\nif (typeof Promise !== 'undefined' && isNative(Promise)) {\n var p = Promise.resolve();\n timerFunc = function () {\n p.then(flushCallbacks);\n // In problematic UIWebViews, Promise.then doesn't completely break, but\n // it can get stuck in a weird state where callbacks are pushed into the\n // microtask queue but the queue isn't being flushed, until the browser\n // needs to do some other work, e.g. handle a timer. Therefore we can\n // \"force\" the microtask queue to be flushed by adding an empty timer.\n if (isIOS) { setTimeout(noop); }\n };\n isUsingMicroTask = true;\n} else if (!isIE && typeof MutationObserver !== 'undefined' && (\n isNative(MutationObserver) ||\n // PhantomJS and iOS 7.x\n MutationObserver.toString() === '[object MutationObserverConstructor]'\n)) {\n // Use MutationObserver where native Promise is not available,\n // e.g. PhantomJS, iOS7, Android 4.4\n // (#6466 MutationObserver is unreliable in IE11)\n var counter = 1;\n var observer = new MutationObserver(flushCallbacks);\n var textNode = document.createTextNode(String(counter));\n observer.observe(textNode, {\n characterData: true\n });\n timerFunc = function () {\n counter = (counter + 1) % 2;\n textNode.data = String(counter);\n };\n isUsingMicroTask = true;\n} else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\n // Fallback to setImmediate.\n // Technically it leverages the (macro) task queue,\n // but it is still a better choice than setTimeout.\n timerFunc = function () {\n setImmediate(flushCallbacks);\n };\n} else {\n // Fallback to setTimeout.\n timerFunc = function () {\n setTimeout(flushCallbacks, 0);\n };\n}\n\nfunction nextTick (cb, ctx) {\n var _resolve;\n callbacks.push(function () {\n if (cb) {\n try {\n cb.call(ctx);\n } catch (e) {\n handleError(e, ctx, 'nextTick');\n }\n } else if (_resolve) {\n _resolve(ctx);\n }\n });\n if (!pending) {\n pending = true;\n timerFunc();\n }\n // $flow-disable-line\n if (!cb && typeof Promise !== 'undefined') {\n return new Promise(function (resolve) {\n _resolve = resolve;\n })\n }\n}\n\n/* */\n\n/* not type checking this file because flow doesn't play well with Proxy */\n\nvar initProxy;\n\nif (process.env.NODE_ENV !== 'production') {\n var allowedGlobals = makeMap(\n 'Infinity,undefined,NaN,isFinite,isNaN,' +\n 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +\n 'require' // for Webpack/Browserify\n );\n\n var warnNonPresent = function (target, key) {\n warn(\n \"Property or method \\\"\" + key + \"\\\" is not defined on the instance but \" +\n 'referenced during render. Make sure that this property is reactive, ' +\n 'either in the data option, or for class-based components, by ' +\n 'initializing the property. ' +\n 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',\n target\n );\n };\n\n var warnReservedPrefix = function (target, key) {\n warn(\n \"Property \\\"\" + key + \"\\\" must be accessed with \\\"$data.\" + key + \"\\\" because \" +\n 'properties starting with \"$\" or \"_\" are not proxied in the Vue instance to ' +\n 'prevent conflicts with Vue internals. ' +\n 'See: https://vuejs.org/v2/api/#data',\n target\n );\n };\n\n var hasProxy =\n typeof Proxy !== 'undefined' && isNative(Proxy);\n\n if (hasProxy) {\n var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');\n config.keyCodes = new Proxy(config.keyCodes, {\n set: function set (target, key, value) {\n if (isBuiltInModifier(key)) {\n warn((\"Avoid overwriting built-in modifier in config.keyCodes: .\" + key));\n return false\n } else {\n target[key] = value;\n return true\n }\n }\n });\n }\n\n var hasHandler = {\n has: function has (target, key) {\n var has = key in target;\n var isAllowed = allowedGlobals(key) ||\n (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));\n if (!has && !isAllowed) {\n if (key in target.$data) { warnReservedPrefix(target, key); }\n else { warnNonPresent(target, key); }\n }\n return has || !isAllowed\n }\n };\n\n var getHandler = {\n get: function get (target, key) {\n if (typeof key === 'string' && !(key in target)) {\n if (key in target.$data) { warnReservedPrefix(target, key); }\n else { warnNonPresent(target, key); }\n }\n return target[key]\n }\n };\n\n initProxy = function initProxy (vm) {\n if (hasProxy) {\n // determine which proxy handler to use\n var options = vm.$options;\n var handlers = options.render && options.render._withStripped\n ? getHandler\n : hasHandler;\n vm._renderProxy = new Proxy(vm, handlers);\n } else {\n vm._renderProxy = vm;\n }\n };\n}\n\n/* */\n\nvar seenObjects = new _Set();\n\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nfunction traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}\n\nfunction _traverse (val, seen) {\n var i, keys;\n var isA = Array.isArray(val);\n if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {\n return\n }\n if (val.__ob__) {\n var depId = val.__ob__.dep.id;\n if (seen.has(depId)) {\n return\n }\n seen.add(depId);\n }\n if (isA) {\n i = val.length;\n while (i--) { _traverse(val[i], seen); }\n } else {\n keys = Object.keys(val);\n i = keys.length;\n while (i--) { _traverse(val[keys[i]], seen); }\n }\n}\n\nvar mark;\nvar measure;\n\nif (process.env.NODE_ENV !== 'production') {\n var perf = inBrowser && window.performance;\n /* istanbul ignore if */\n if (\n perf &&\n perf.mark &&\n perf.measure &&\n perf.clearMarks &&\n perf.clearMeasures\n ) {\n mark = function (tag) { return perf.mark(tag); };\n measure = function (name, startTag, endTag) {\n perf.measure(name, startTag, endTag);\n perf.clearMarks(startTag);\n perf.clearMarks(endTag);\n // perf.clearMeasures(name)\n };\n }\n}\n\n/* */\n\nvar normalizeEvent = cached(function (name) {\n var passive = name.charAt(0) === '&';\n name = passive ? name.slice(1) : name;\n var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first\n name = once$$1 ? name.slice(1) : name;\n var capture = name.charAt(0) === '!';\n name = capture ? name.slice(1) : name;\n return {\n name: name,\n once: once$$1,\n capture: capture,\n passive: passive\n }\n});\n\nfunction createFnInvoker (fns, vm) {\n function invoker () {\n var arguments$1 = arguments;\n\n var fns = invoker.fns;\n if (Array.isArray(fns)) {\n var cloned = fns.slice();\n for (var i = 0; i < cloned.length; i++) {\n invokeWithErrorHandling(cloned[i], null, arguments$1, vm, \"v-on handler\");\n }\n } else {\n // return handler return value for single handlers\n return invokeWithErrorHandling(fns, null, arguments, vm, \"v-on handler\")\n }\n }\n invoker.fns = fns;\n return invoker\n}\n\nfunction updateListeners (\n on,\n oldOn,\n add,\n remove$$1,\n createOnceHandler,\n vm\n) {\n var name, def$$1, cur, old, event;\n for (name in on) {\n def$$1 = cur = on[name];\n old = oldOn[name];\n event = normalizeEvent(name);\n if (isUndef(cur)) {\n process.env.NODE_ENV !== 'production' && warn(\n \"Invalid handler for event \\\"\" + (event.name) + \"\\\": got \" + String(cur),\n vm\n );\n } else if (isUndef(old)) {\n if (isUndef(cur.fns)) {\n cur = on[name] = createFnInvoker(cur, vm);\n }\n if (isTrue(event.once)) {\n cur = on[name] = createOnceHandler(event.name, cur, event.capture);\n }\n add(event.name, cur, event.capture, event.passive, event.params);\n } else if (cur !== old) {\n old.fns = cur;\n on[name] = old;\n }\n }\n for (name in oldOn) {\n if (isUndef(on[name])) {\n event = normalizeEvent(name);\n remove$$1(event.name, oldOn[name], event.capture);\n }\n }\n}\n\n/* */\n\nfunction mergeVNodeHook (def, hookKey, hook) {\n if (def instanceof VNode) {\n def = def.data.hook || (def.data.hook = {});\n }\n var invoker;\n var oldHook = def[hookKey];\n\n function wrappedHook () {\n hook.apply(this, arguments);\n // important: remove merged hook to ensure it's called only once\n // and prevent memory leak\n remove(invoker.fns, wrappedHook);\n }\n\n if (isUndef(oldHook)) {\n // no existing hook\n invoker = createFnInvoker([wrappedHook]);\n } else {\n /* istanbul ignore if */\n if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {\n // already a merged invoker\n invoker = oldHook;\n invoker.fns.push(wrappedHook);\n } else {\n // existing plain hook\n invoker = createFnInvoker([oldHook, wrappedHook]);\n }\n }\n\n invoker.merged = true;\n def[hookKey] = invoker;\n}\n\n/* */\n\nfunction extractPropsFromVNodeData (\n data,\n Ctor,\n tag\n) {\n // we are only extracting raw values here.\n // validation and default values are handled in the child\n // component itself.\n var propOptions = Ctor.options.props;\n if (isUndef(propOptions)) {\n return\n }\n var res = {};\n var attrs = data.attrs;\n var props = data.props;\n if (isDef(attrs) || isDef(props)) {\n for (var key in propOptions) {\n var altKey = hyphenate(key);\n if (process.env.NODE_ENV !== 'production') {\n var keyInLowerCase = key.toLowerCase();\n if (\n key !== keyInLowerCase &&\n attrs && hasOwn(attrs, keyInLowerCase)\n ) {\n tip(\n \"Prop \\\"\" + keyInLowerCase + \"\\\" is passed to component \" +\n (formatComponentName(tag || Ctor)) + \", but the declared prop name is\" +\n \" \\\"\" + key + \"\\\". \" +\n \"Note that HTML attributes are case-insensitive and camelCased \" +\n \"props need to use their kebab-case equivalents when using in-DOM \" +\n \"templates. You should probably use \\\"\" + altKey + \"\\\" instead of \\\"\" + key + \"\\\".\"\n );\n }\n }\n checkProp(res, props, key, altKey, true) ||\n checkProp(res, attrs, key, altKey, false);\n }\n }\n return res\n}\n\nfunction checkProp (\n res,\n hash,\n key,\n altKey,\n preserve\n) {\n if (isDef(hash)) {\n if (hasOwn(hash, key)) {\n res[key] = hash[key];\n if (!preserve) {\n delete hash[key];\n }\n return true\n } else if (hasOwn(hash, altKey)) {\n res[key] = hash[altKey];\n if (!preserve) {\n delete hash[altKey];\n }\n return true\n }\n }\n return false\n}\n\n/* */\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array. There are\n// two cases where extra normalization is needed:\n\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren (children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children)\n }\n }\n return children\n}\n\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g.