Front end of the Slack clone application.

platform-browser-testing.umd.js 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. /**
  2. * @license Angular v5.2.11
  3. * (c) 2010-2018 Google, Inc. https://angular.io/
  4. * License: MIT
  5. */
  6. (function (global, factory) {
  7. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/platform-browser')) :
  8. typeof define === 'function' && define.amd ? define('@angular/platform-browser/testing', ['exports', '@angular/core', '@angular/platform-browser'], factory) :
  9. (factory((global.ng = global.ng || {}, global.ng.platformBrowser = global.ng.platformBrowser || {}, global.ng.platformBrowser.testing = {}),global.ng.core,global.ng.platformBrowser));
  10. }(this, (function (exports,_angular_core,_angular_platformBrowser) { 'use strict';
  11. /**
  12. * @license Angular v5.2.11
  13. * (c) 2010-2018 Google, Inc. https://angular.io/
  14. * License: MIT
  15. */
  16. /**
  17. * @fileoverview added by tsickle
  18. * @suppress {checkTypes} checked by tsc
  19. */
  20. /**
  21. * @license
  22. * Copyright Google Inc. All Rights Reserved.
  23. *
  24. * Use of this source code is governed by an MIT-style license that can be
  25. * found in the LICENSE file at https://angular.io/license
  26. */
  27. var browserDetection;
  28. var BrowserDetection = /** @class */ (function () {
  29. function BrowserDetection(ua) {
  30. this._overrideUa = ua;
  31. }
  32. Object.defineProperty(BrowserDetection.prototype, "_ua", {
  33. get: /**
  34. * @return {?}
  35. */
  36. function () {
  37. if (typeof this._overrideUa === 'string') {
  38. return this._overrideUa;
  39. }
  40. return _angular_platformBrowser.ɵgetDOM() ? _angular_platformBrowser.ɵgetDOM().getUserAgent() : '';
  41. },
  42. enumerable: true,
  43. configurable: true
  44. });
  45. /**
  46. * @return {?}
  47. */
  48. BrowserDetection.setup = /**
  49. * @return {?}
  50. */
  51. function () { browserDetection = new BrowserDetection(null); };
  52. Object.defineProperty(BrowserDetection.prototype, "isFirefox", {
  53. get: /**
  54. * @return {?}
  55. */
  56. function () { return this._ua.indexOf('Firefox') > -1; },
  57. enumerable: true,
  58. configurable: true
  59. });
  60. Object.defineProperty(BrowserDetection.prototype, "isAndroid", {
  61. get: /**
  62. * @return {?}
  63. */
  64. function () {
  65. return this._ua.indexOf('Mozilla/5.0') > -1 && this._ua.indexOf('Android') > -1 &&
  66. this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Chrome') == -1 &&
  67. this._ua.indexOf('IEMobile') == -1;
  68. },
  69. enumerable: true,
  70. configurable: true
  71. });
  72. Object.defineProperty(BrowserDetection.prototype, "isEdge", {
  73. get: /**
  74. * @return {?}
  75. */
  76. function () { return this._ua.indexOf('Edge') > -1; },
  77. enumerable: true,
  78. configurable: true
  79. });
  80. Object.defineProperty(BrowserDetection.prototype, "isIE", {
  81. get: /**
  82. * @return {?}
  83. */
  84. function () { return this._ua.indexOf('Trident') > -1; },
  85. enumerable: true,
  86. configurable: true
  87. });
  88. Object.defineProperty(BrowserDetection.prototype, "isWebkit", {
  89. get: /**
  90. * @return {?}
  91. */
  92. function () {
  93. return this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Edge') == -1 &&
  94. this._ua.indexOf('IEMobile') == -1;
  95. },
  96. enumerable: true,
  97. configurable: true
  98. });
  99. Object.defineProperty(BrowserDetection.prototype, "isIOS7", {
  100. get: /**
  101. * @return {?}
  102. */
  103. function () {
  104. return (this._ua.indexOf('iPhone OS 7') > -1 || this._ua.indexOf('iPad OS 7') > -1) &&
  105. this._ua.indexOf('IEMobile') == -1;
  106. },
  107. enumerable: true,
  108. configurable: true
  109. });
  110. Object.defineProperty(BrowserDetection.prototype, "isSlow", {
  111. get: /**
  112. * @return {?}
  113. */
  114. function () { return this.isAndroid || this.isIE || this.isIOS7; },
  115. enumerable: true,
  116. configurable: true
  117. });
  118. Object.defineProperty(BrowserDetection.prototype, "supportsNativeIntlApi", {
  119. // The Intl API is only natively supported in Chrome, Firefox, IE11 and Edge.
  120. // This detector is needed in tests to make the difference between:
  121. // 1) IE11/Edge: they have a native Intl API, but with some discrepancies
  122. // 2) IE9/IE10: they use the polyfill, and so no discrepancies
  123. get: /**
  124. * @return {?}
  125. */
  126. function () {
  127. return !!(/** @type {?} */ (_angular_core.ɵglobal)).Intl && (/** @type {?} */ (_angular_core.ɵglobal)).Intl !== (/** @type {?} */ (_angular_core.ɵglobal)).IntlPolyfill;
  128. },
  129. enumerable: true,
  130. configurable: true
  131. });
  132. Object.defineProperty(BrowserDetection.prototype, "isChromeDesktop", {
  133. get: /**
  134. * @return {?}
  135. */
  136. function () {
  137. return this._ua.indexOf('Chrome') > -1 && this._ua.indexOf('Mobile Safari') == -1 &&
  138. this._ua.indexOf('Edge') == -1;
  139. },
  140. enumerable: true,
  141. configurable: true
  142. });
  143. Object.defineProperty(BrowserDetection.prototype, "isOldChrome", {
  144. // "Old Chrome" means Chrome 3X, where there are some discrepancies in the Intl API.
  145. // Android 4.4 and 5.X have such browsers by default (respectively 30 and 39).
  146. get: /**
  147. * @return {?}
  148. */
  149. function () {
  150. return this._ua.indexOf('Chrome') > -1 && this._ua.indexOf('Chrome/3') > -1 &&
  151. this._ua.indexOf('Edge') == -1;
  152. },
  153. enumerable: true,
  154. configurable: true
  155. });
  156. return BrowserDetection;
  157. }());
  158. BrowserDetection.setup();
  159. /**
  160. * @param {?} element
  161. * @param {?} eventType
  162. * @return {?}
  163. */
  164. /**
  165. * @param {?} html
  166. * @return {?}
  167. */
  168. /**
  169. * @param {?} css
  170. * @return {?}
  171. */
  172. /**
  173. * @param {?} el
  174. * @return {?}
  175. */
  176. /**
  177. * @return {?}
  178. */
  179. function createNgZone() {
  180. return new _angular_core.NgZone({ enableLongStackTrace: true });
  181. }
  182. /**
  183. * @fileoverview added by tsickle
  184. * @suppress {checkTypes} checked by tsc
  185. */
  186. /**
  187. * @return {?}
  188. */
  189. function initBrowserTests() {
  190. _angular_platformBrowser.ɵBrowserDomAdapter.makeCurrent();
  191. BrowserDetection.setup();
  192. }
  193. var _TEST_BROWSER_PLATFORM_PROVIDERS = [{ provide: _angular_core.PLATFORM_INITIALIZER, useValue: initBrowserTests, multi: true }];
  194. /**
  195. * Platform for testing
  196. *
  197. * \@stable
  198. */
  199. var platformBrowserTesting = _angular_core.createPlatformFactory(_angular_core.platformCore, 'browserTesting', _TEST_BROWSER_PLATFORM_PROVIDERS);
  200. var ɵ0 = createNgZone;
  201. /**
  202. * NgModule for testing.
  203. *
  204. * \@stable
  205. */
  206. var BrowserTestingModule = /** @class */ (function () {
  207. function BrowserTestingModule() {
  208. }
  209. BrowserTestingModule.decorators = [
  210. { type: _angular_core.NgModule, args: [{
  211. exports: [_angular_platformBrowser.BrowserModule],
  212. providers: [
  213. { provide: _angular_core.APP_ID, useValue: 'a' },
  214. _angular_platformBrowser.ɵELEMENT_PROBE_PROVIDERS,
  215. { provide: _angular_core.NgZone, useFactory: ɵ0 },
  216. ]
  217. },] },
  218. ];
  219. /** @nocollapse */
  220. BrowserTestingModule.ctorParameters = function () { return []; };
  221. return BrowserTestingModule;
  222. }());
  223. exports.platformBrowserTesting = platformBrowserTesting;
  224. exports.BrowserTestingModule = BrowserTestingModule;
  225. exports.ɵa = createNgZone;
  226. Object.defineProperty(exports, '__esModule', { value: true });
  227. })));
  228. //# sourceMappingURL=platform-browser-testing.umd.js.map