| 1 | /* tslint:disable */ | = | 1 | /* tslint:disable */ |
| 2 | /** | 2 | /** | |
| 3 | * This file includes polyfills needed by Angular and is loaded before the app. | 3 | * This file includes polyfills needed by Angular and is loaded before the app. | |
| 4 | * You can add your own extra polyfills to this file. | 4 | * You can add your own extra polyfills to this file. | |
| 5 | * | 5 | * | |
| 6 | * This file is divided into 2 sections: | 6 | * This file is divided into 2 sections: | |
| 7 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. | 7 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. | |
| 8 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main | 8 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main | |
| 9 | * file. | 9 | * file. | |
| 10 | * | 10 | * | |
| 11 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that | 11 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that | |
| 12 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), | 12 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), | |
| 13 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. | 13 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. | |
| 14 | * | 14 | * | |
| 15 | * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html | 15 | * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html | |
| 16 | */ | 16 | */ | |
| 17 | 17 | |||
| 18 | /*************************************************************************************************** | 18 | /*************************************************************************************************** | |
| 19 | * BROWSER POLYFILLS | 19 | * BROWSER POLYFILLS | |
| 20 | */ | 20 | */ | |
| 21 | 21 | |||
| 22 | /** IE9, IE10 and IE11 requires all of the following polyfills. **/ | 22 | /** IE9, IE10 and IE11 requires all of the following polyfills. **/ | |
| 23 | import 'core-js/es6/symbol'; | 23 | import 'core-js/es6/symbol'; | |
| 24 | import 'core-js/es6/object'; | 24 | import 'core-js/es6/object'; | |
| 25 | import 'core-js/es6/function'; | 25 | import 'core-js/es6/function'; | |
| 26 | import 'core-js/es6/parse-int'; | 26 | import 'core-js/es6/parse-int'; | |
| 27 | import 'core-js/es6/parse-float'; | 27 | import 'core-js/es6/parse-float'; | |
| 28 | import 'core-js/es6/number'; | 28 | import 'core-js/es6/number'; | |
| 29 | import 'core-js/es6/math'; | 29 | import 'core-js/es6/math'; | |
| 30 | import 'core-js/es6/string'; | 30 | import 'core-js/es6/string'; | |
| 31 | import 'core-js/es6/date'; | 31 | import 'core-js/es6/date'; | |
| 32 | import 'core-js/es6/array'; | 32 | import 'core-js/es6/array'; | |
| 33 | import 'core-js/es6/regexp'; | 33 | import 'core-js/es6/regexp'; | |
| 34 | import 'core-js/es6/map'; | 34 | import 'core-js/es6/map'; | |
| 35 | import 'core-js/es6/weak-map'; | 35 | import 'core-js/es6/weak-map'; | |
| 36 | import 'core-js/es6/set'; | 36 | import 'core-js/es6/set'; | |
| 37 | import 'core-js/es7/object'; | 37 | import 'core-js/es7/object'; | |
| 38 | import 'core-js/es7/math'; | 38 | import 'core-js/es7/math'; | |
| 39 | 39 | |||
| 40 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */ | 40 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */ | |
| 41 | import 'classlist.js'; // Run `npm install --save classlist.js`. | 41 | import 'classlist.js'; // Run `npm install --save classlist.js`. | |
| 42 | 42 | |||
| 43 | /** IE10 and IE11 requires the following for the Reflect API. */ | 43 | /** IE10 and IE11 requires the following for the Reflect API. */ | |
| 44 | import 'core-js/es6/reflect'; | 44 | import 'core-js/es6/reflect'; | |
| 45 | 45 | |||
| 46 | 46 | |||
| 47 | /** Evergreen browsers require these. **/ | 47 | /** Evergreen browsers require these. **/ | |
| 48 | // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. | 48 | // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. | |
| 49 | import 'core-js/es7/reflect'; | 49 | import 'core-js/es7/reflect'; | |
| 50 | import 'core-js/es7/array'; | 50 | import 'core-js/es7/array'; | |
| 51 | 51 | |||
| 52 | /** | 52 | /** | |
| 53 | * Required to support Web Animations `@angular/platform-browser/animations`. | 53 | * Required to support Web Animations `@angular/platform-browser/animations`. | |
| 54 | * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation | 54 | * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation | |
| 55 | **/ | 55 | **/ | |
| 56 | import 'web-animations-js'; // Run `npm install --save web-animations-js`. | 56 | import 'web-animations-js'; // Run `npm install --save web-animations-js`. | |
| 57 | 57 | |||
| 58 | // Node.getRootNode() for IE | 58 | // Node.getRootNode() for IE | |
| 59 | import 'get-root-node-polyfill/implement'; | 59 | import 'get-root-node-polyfill/implement'; | |
| 60 | 60 | |||
| 61 | /*************************************************************************************************** | 61 | /*************************************************************************************************** | |
| 62 | * Zone JS is required by default for Angular itself. | 62 | * Zone JS is required by default for Angular itself. | |
| 63 | */ | 63 | */ | |
| 64 | import 'zone.js/dist/zone'; // Included with Angular CLI. | 64 | import 'zone.js/dist/zone'; // Included with Angular CLI. | |
| 65 | 65 | |||
| 66 | 66 | |||
| 67 | // URL object polyfill | 67 | // URL object polyfill | |
| 68 | import 'url-polyfill'; | 68 | import 'url-polyfill'; | |
| 69 | 69 | |||
| 70 | // CustomEvent polyfill | 70 | // CustomEvent polyfill | |
| 71 | import 'custom-event-polyfill'; | 71 | import 'custom-event-polyfill'; | |
| 72 | 72 | |||
| -+ | 73 | import '@angular/localize/init'; | ||
| 74 | ||||
| 73 | /*************************************************************************************************** | = | 75 | /*************************************************************************************************** |
| 74 | * IE 11 fixes | 76 | * IE 11 fixes | |
| 75 | */ | 77 | */ | |
| 76 | if (typeof window !== 'undefined' && typeof SVGElement !== 'undefined' && typeof SVGElement.prototype.contains === 'undefined') { | 78 | if (typeof window !== 'undefined' && typeof SVGElement !== 'undefined' && typeof SVGElement.prototype.contains === 'undefined') { | |
| 77 | SVGElement.prototype.contains = HTMLDivElement.prototype.contains; | 79 | SVGElement.prototype.contains = HTMLDivElement.prototype.contains; | |
| 78 | } | 80 | } | |
| -+ | 81 | // @ts-ignore | ||
| 79 | if (!!window['MSInputMethodContext'] && !!document['documentMode'] || document['documentMode'] <= 11) { | = | 82 | if (!!window['MSInputMethodContext'] && !!document['documentMode'] || document['documentMode'] <= 11) { |
| -+ | 83 | // @ts-ignore | ||
| 80 | window['MouseEvent'] = ((eventType, params) => { | = | 84 | window['MouseEvent'] = ((eventType, params) => { |
| 81 | params = params || { bubbles: false, cancelable: false }; | 85 | params = params || { bubbles: false, cancelable: false }; | |
| 82 | const mouseEvent = document.createEvent('MouseEvent'); | 86 | const mouseEvent = document.createEvent('MouseEvent'); | |
| 83 | mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); | 87 | mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); | |
| 84 | return mouseEvent; | 88 | return mouseEvent; | |
| 85 | }) as any; | 89 | }) as any; | |
| 86 | window['MouseEvent'].prototype = Event.prototype as any; | 90 | window['MouseEvent'].prototype = Event.prototype as any; | |
| 87 | } | 91 | } | |
| 88 | 92 | |||
| 89 | if (!('remove' in Element.prototype)) { | 93 | if (!('remove' in Element.prototype)) { | |
| 90 | (Element as any).prototype.remove = function () { | 94 | (Element as any).prototype.remove = function () { | |
| 91 | if (this.parentNode) { | 95 | if (this.parentNode) { | |
| 92 | this.parentNode.removeChild(this) | 96 | this.parentNode.removeChild(this) | |
| 93 | } | 97 | } | |
| 94 | } | 98 | } | |
| 95 | } | 99 | } | |
| 96 | 100 | |||
| 97 | /*************************************************************************************************** | 101 | /*************************************************************************************************** | |
| 98 | * Global | 102 | * Global | |
| 99 | */ | 103 | */ | |
| 100 | (window as any).global = window; | 104 | (window as any).global = window; | |
| 101 | 105 | |||
| 102 | /*************************************************************************************************** | 106 | /*************************************************************************************************** | |
| 103 | * APPLICATION IMPORTS | 107 | * APPLICATION IMPORTS | |
| 104 | */ | 108 | */ |