a zip code crypto-currency system good for red ONLY

platform-browser-dynamic-testing.umd.js 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  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/core/testing'), require('@angular/platform-browser-dynamic'), require('@angular/platform-browser/testing'), require('@angular/platform-browser'), require('@angular/compiler'), require('@angular/compiler/testing')) :
  8. typeof define === 'function' && define.amd ? define('@angular/platform-browser-dynamic/testing', ['exports', '@angular/core', '@angular/core/testing', '@angular/platform-browser-dynamic', '@angular/platform-browser/testing', '@angular/platform-browser', '@angular/compiler', '@angular/compiler/testing'], factory) :
  9. (factory((global.ng = global.ng || {}, global.ng.platformBrowserDynamic = global.ng.platformBrowserDynamic || {}, global.ng.platformBrowserDynamic.testing = {}),global.ng.core,global.ng.core.testing,global.ng.platformBrowserDynamic,global.ng.platformBrowser.testing,global.ng.platformBrowser,global.ng.compiler,global.ng.compiler.testing));
  10. }(this, (function (exports,_angular_core,_angular_core_testing,_angular_platformBrowserDynamic,_angular_platformBrowser_testing,_angular_platformBrowser,_angular_compiler,_angular_compiler_testing) { 'use strict';
  11. /*! *****************************************************************************
  12. Copyright (c) Microsoft Corporation. All rights reserved.
  13. Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  14. this file except in compliance with the License. You may obtain a copy of the
  15. License at http://www.apache.org/licenses/LICENSE-2.0
  16. THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  17. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  18. WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  19. MERCHANTABLITY OR NON-INFRINGEMENT.
  20. See the Apache Version 2.0 License for specific language governing permissions
  21. and limitations under the License.
  22. ***************************************************************************** */
  23. /* global Reflect, Promise */
  24. var extendStatics = Object.setPrototypeOf ||
  25. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  26. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  27. function __extends(d, b) {
  28. extendStatics(d, b);
  29. function __() { this.constructor = d; }
  30. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  31. }
  32. /**
  33. * @license Angular v5.2.11
  34. * (c) 2010-2018 Google, Inc. https://angular.io/
  35. * License: MIT
  36. */
  37. /**
  38. * @fileoverview added by tsickle
  39. * @suppress {checkTypes} checked by tsc
  40. */
  41. /**
  42. * @license
  43. * Copyright Google Inc. All Rights Reserved.
  44. *
  45. * Use of this source code is governed by an MIT-style license that can be
  46. * found in the LICENSE file at https://angular.io/license
  47. */
  48. /**
  49. * A DOM based implementation of the TestComponentRenderer.
  50. */
  51. var DOMTestComponentRenderer = /** @class */ (function (_super) {
  52. __extends(DOMTestComponentRenderer, _super);
  53. function DOMTestComponentRenderer(_doc /** TODO #9100 */) {
  54. var _this = _super.call(this) || this;
  55. _this._doc = _doc;
  56. return _this;
  57. }
  58. /**
  59. * @param {?} rootElId
  60. * @return {?}
  61. */
  62. DOMTestComponentRenderer.prototype.insertRootElement = /**
  63. * @param {?} rootElId
  64. * @return {?}
  65. */
  66. function (rootElId) {
  67. var /** @type {?} */ rootEl = /** @type {?} */ (_angular_platformBrowser.ɵgetDOM().firstChild(_angular_platformBrowser.ɵgetDOM().content(_angular_platformBrowser.ɵgetDOM().createTemplate("<div id=\"" + rootElId + "\"></div>"))));
  68. // TODO(juliemr): can/should this be optional?
  69. var /** @type {?} */ oldRoots = _angular_platformBrowser.ɵgetDOM().querySelectorAll(this._doc, '[id^=root]');
  70. for (var /** @type {?} */ i = 0; i < oldRoots.length; i++) {
  71. _angular_platformBrowser.ɵgetDOM().remove(oldRoots[i]);
  72. }
  73. _angular_platformBrowser.ɵgetDOM().appendChild(this._doc.body, rootEl);
  74. };
  75. DOMTestComponentRenderer.decorators = [
  76. { type: _angular_core.Injectable },
  77. ];
  78. /** @nocollapse */
  79. DOMTestComponentRenderer.ctorParameters = function () { return [
  80. { type: undefined, decorators: [{ type: _angular_core.Inject, args: [_angular_platformBrowser.DOCUMENT,] },] },
  81. ]; };
  82. return DOMTestComponentRenderer;
  83. }(_angular_core_testing.TestComponentRenderer));
  84. /**
  85. * @fileoverview added by tsickle
  86. * @suppress {checkTypes} checked by tsc
  87. */
  88. /**
  89. * @license
  90. * Copyright Google Inc. All Rights Reserved.
  91. *
  92. * Use of this source code is governed by an MIT-style license that can be
  93. * found in the LICENSE file at https://angular.io/license
  94. */
  95. var _nextReferenceId = 0;
  96. var MetadataOverrider = /** @class */ (function () {
  97. function MetadataOverrider() {
  98. this._references = new Map();
  99. }
  100. /**
  101. * Creates a new instance for the given metadata class
  102. * based on an old instance and overrides.
  103. */
  104. /**
  105. * Creates a new instance for the given metadata class
  106. * based on an old instance and overrides.
  107. * @template C, T
  108. * @param {?} metadataClass
  109. * @param {?} oldMetadata
  110. * @param {?} override
  111. * @return {?}
  112. */
  113. MetadataOverrider.prototype.overrideMetadata = /**
  114. * Creates a new instance for the given metadata class
  115. * based on an old instance and overrides.
  116. * @template C, T
  117. * @param {?} metadataClass
  118. * @param {?} oldMetadata
  119. * @param {?} override
  120. * @return {?}
  121. */
  122. function (metadataClass, oldMetadata, override) {
  123. var /** @type {?} */ props = {};
  124. if (oldMetadata) {
  125. _valueProps(oldMetadata).forEach(function (prop) { return props[prop] = (/** @type {?} */ (oldMetadata))[prop]; });
  126. }
  127. if (override.set) {
  128. if (override.remove || override.add) {
  129. throw new Error("Cannot set and add/remove " + _angular_core.ɵstringify(metadataClass) + " at the same time!");
  130. }
  131. setMetadata(props, override.set);
  132. }
  133. if (override.remove) {
  134. removeMetadata(props, override.remove, this._references);
  135. }
  136. if (override.add) {
  137. addMetadata(props, override.add);
  138. }
  139. return new metadataClass(/** @type {?} */ (props));
  140. };
  141. return MetadataOverrider;
  142. }());
  143. /**
  144. * @param {?} metadata
  145. * @param {?} remove
  146. * @param {?} references
  147. * @return {?}
  148. */
  149. function removeMetadata(metadata, remove, references) {
  150. var /** @type {?} */ removeObjects = new Set();
  151. var _loop_1 = function (prop) {
  152. var /** @type {?} */ removeValue = remove[prop];
  153. if (removeValue instanceof Array) {
  154. removeValue.forEach(function (value) { removeObjects.add(_propHashKey(prop, value, references)); });
  155. }
  156. else {
  157. removeObjects.add(_propHashKey(prop, removeValue, references));
  158. }
  159. };
  160. for (var /** @type {?} */ prop in remove) {
  161. _loop_1(prop);
  162. }
  163. var _loop_2 = function (prop) {
  164. var /** @type {?} */ propValue = metadata[prop];
  165. if (propValue instanceof Array) {
  166. metadata[prop] = propValue.filter(function (value) { return !removeObjects.has(_propHashKey(prop, value, references)); });
  167. }
  168. else {
  169. if (removeObjects.has(_propHashKey(prop, propValue, references))) {
  170. metadata[prop] = undefined;
  171. }
  172. }
  173. };
  174. for (var /** @type {?} */ prop in metadata) {
  175. _loop_2(prop);
  176. }
  177. }
  178. /**
  179. * @param {?} metadata
  180. * @param {?} add
  181. * @return {?}
  182. */
  183. function addMetadata(metadata, add) {
  184. for (var /** @type {?} */ prop in add) {
  185. var /** @type {?} */ addValue = add[prop];
  186. var /** @type {?} */ propValue = metadata[prop];
  187. if (propValue != null && propValue instanceof Array) {
  188. metadata[prop] = propValue.concat(addValue);
  189. }
  190. else {
  191. metadata[prop] = addValue;
  192. }
  193. }
  194. }
  195. /**
  196. * @param {?} metadata
  197. * @param {?} set
  198. * @return {?}
  199. */
  200. function setMetadata(metadata, set) {
  201. for (var /** @type {?} */ prop in set) {
  202. metadata[prop] = set[prop];
  203. }
  204. }
  205. /**
  206. * @param {?} propName
  207. * @param {?} propValue
  208. * @param {?} references
  209. * @return {?}
  210. */
  211. function _propHashKey(propName, propValue, references) {
  212. var /** @type {?} */ replacer = function (key, value) {
  213. if (typeof value === 'function') {
  214. value = _serializeReference(value, references);
  215. }
  216. return value;
  217. };
  218. return propName + ":" + JSON.stringify(propValue, replacer);
  219. }
  220. /**
  221. * @param {?} ref
  222. * @param {?} references
  223. * @return {?}
  224. */
  225. function _serializeReference(ref, references) {
  226. var /** @type {?} */ id = references.get(ref);
  227. if (!id) {
  228. id = "" + _angular_core.ɵstringify(ref) + _nextReferenceId++;
  229. references.set(ref, id);
  230. }
  231. return id;
  232. }
  233. /**
  234. * @param {?} obj
  235. * @return {?}
  236. */
  237. function _valueProps(obj) {
  238. var /** @type {?} */ props = [];
  239. // regular public props
  240. Object.keys(obj).forEach(function (prop) {
  241. if (!prop.startsWith('_')) {
  242. props.push(prop);
  243. }
  244. });
  245. // getters
  246. var /** @type {?} */ proto = obj;
  247. while (proto = Object.getPrototypeOf(proto)) {
  248. Object.keys(proto).forEach(function (protoProp) {
  249. var /** @type {?} */ desc = Object.getOwnPropertyDescriptor(proto, protoProp);
  250. if (!protoProp.startsWith('_') && desc && 'get' in desc) {
  251. props.push(protoProp);
  252. }
  253. });
  254. }
  255. return props;
  256. }
  257. /**
  258. * @fileoverview added by tsickle
  259. * @suppress {checkTypes} checked by tsc
  260. */
  261. /**
  262. * @license
  263. * Copyright Google Inc. All Rights Reserved.
  264. *
  265. * Use of this source code is governed by an MIT-style license that can be
  266. * found in the LICENSE file at https://angular.io/license
  267. */
  268. var COMPILER_PROVIDERS = [
  269. { provide: _angular_compiler_testing.MockPipeResolver, deps: [_angular_compiler.CompileReflector] },
  270. { provide: _angular_compiler.PipeResolver, useExisting: _angular_compiler_testing.MockPipeResolver },
  271. { provide: _angular_compiler_testing.MockDirectiveResolver, deps: [_angular_compiler.CompileReflector] },
  272. { provide: _angular_compiler.DirectiveResolver, useExisting: _angular_compiler_testing.MockDirectiveResolver },
  273. { provide: _angular_compiler_testing.MockNgModuleResolver, deps: [_angular_compiler.CompileReflector] },
  274. { provide: _angular_compiler.NgModuleResolver, useExisting: _angular_compiler_testing.MockNgModuleResolver },
  275. ];
  276. var TestingCompilerFactoryImpl = /** @class */ (function () {
  277. function TestingCompilerFactoryImpl(_injector, _compilerFactory) {
  278. this._injector = _injector;
  279. this._compilerFactory = _compilerFactory;
  280. }
  281. /**
  282. * @param {?} options
  283. * @return {?}
  284. */
  285. TestingCompilerFactoryImpl.prototype.createTestingCompiler = /**
  286. * @param {?} options
  287. * @return {?}
  288. */
  289. function (options) {
  290. var /** @type {?} */ compiler = /** @type {?} */ (this._compilerFactory.createCompiler(options));
  291. return new TestingCompilerImpl(compiler, compiler.injector.get(_angular_compiler_testing.MockDirectiveResolver), compiler.injector.get(_angular_compiler_testing.MockPipeResolver), compiler.injector.get(_angular_compiler_testing.MockNgModuleResolver));
  292. };
  293. return TestingCompilerFactoryImpl;
  294. }());
  295. var TestingCompilerImpl = /** @class */ (function () {
  296. function TestingCompilerImpl(_compiler, _directiveResolver, _pipeResolver, _moduleResolver) {
  297. this._compiler = _compiler;
  298. this._directiveResolver = _directiveResolver;
  299. this._pipeResolver = _pipeResolver;
  300. this._moduleResolver = _moduleResolver;
  301. this._overrider = new MetadataOverrider();
  302. }
  303. Object.defineProperty(TestingCompilerImpl.prototype, "injector", {
  304. get: /**
  305. * @return {?}
  306. */
  307. function () { return this._compiler.injector; },
  308. enumerable: true,
  309. configurable: true
  310. });
  311. /**
  312. * @template T
  313. * @param {?} moduleType
  314. * @return {?}
  315. */
  316. TestingCompilerImpl.prototype.compileModuleSync = /**
  317. * @template T
  318. * @param {?} moduleType
  319. * @return {?}
  320. */
  321. function (moduleType) {
  322. return this._compiler.compileModuleSync(moduleType);
  323. };
  324. /**
  325. * @template T
  326. * @param {?} moduleType
  327. * @return {?}
  328. */
  329. TestingCompilerImpl.prototype.compileModuleAsync = /**
  330. * @template T
  331. * @param {?} moduleType
  332. * @return {?}
  333. */
  334. function (moduleType) {
  335. return this._compiler.compileModuleAsync(moduleType);
  336. };
  337. /**
  338. * @template T
  339. * @param {?} moduleType
  340. * @return {?}
  341. */
  342. TestingCompilerImpl.prototype.compileModuleAndAllComponentsSync = /**
  343. * @template T
  344. * @param {?} moduleType
  345. * @return {?}
  346. */
  347. function (moduleType) {
  348. return this._compiler.compileModuleAndAllComponentsSync(moduleType);
  349. };
  350. /**
  351. * @template T
  352. * @param {?} moduleType
  353. * @return {?}
  354. */
  355. TestingCompilerImpl.prototype.compileModuleAndAllComponentsAsync = /**
  356. * @template T
  357. * @param {?} moduleType
  358. * @return {?}
  359. */
  360. function (moduleType) {
  361. return this._compiler.compileModuleAndAllComponentsAsync(moduleType);
  362. };
  363. /**
  364. * @template T
  365. * @param {?} component
  366. * @return {?}
  367. */
  368. TestingCompilerImpl.prototype.getComponentFactory = /**
  369. * @template T
  370. * @param {?} component
  371. * @return {?}
  372. */
  373. function (component) {
  374. return this._compiler.getComponentFactory(component);
  375. };
  376. /**
  377. * @param {?} type
  378. * @return {?}
  379. */
  380. TestingCompilerImpl.prototype.checkOverrideAllowed = /**
  381. * @param {?} type
  382. * @return {?}
  383. */
  384. function (type) {
  385. if (this._compiler.hasAotSummary(type)) {
  386. throw new Error(_angular_core.ɵstringify(type) + " was AOT compiled, so its metadata cannot be changed.");
  387. }
  388. };
  389. /**
  390. * @param {?} ngModule
  391. * @param {?} override
  392. * @return {?}
  393. */
  394. TestingCompilerImpl.prototype.overrideModule = /**
  395. * @param {?} ngModule
  396. * @param {?} override
  397. * @return {?}
  398. */
  399. function (ngModule, override) {
  400. this.checkOverrideAllowed(ngModule);
  401. var /** @type {?} */ oldMetadata = this._moduleResolver.resolve(ngModule, false);
  402. this._moduleResolver.setNgModule(ngModule, this._overrider.overrideMetadata(_angular_core.NgModule, oldMetadata, override));
  403. this.clearCacheFor(ngModule);
  404. };
  405. /**
  406. * @param {?} directive
  407. * @param {?} override
  408. * @return {?}
  409. */
  410. TestingCompilerImpl.prototype.overrideDirective = /**
  411. * @param {?} directive
  412. * @param {?} override
  413. * @return {?}
  414. */
  415. function (directive, override) {
  416. this.checkOverrideAllowed(directive);
  417. var /** @type {?} */ oldMetadata = this._directiveResolver.resolve(directive, false);
  418. this._directiveResolver.setDirective(directive, this._overrider.overrideMetadata(_angular_core.Directive, /** @type {?} */ ((oldMetadata)), override));
  419. this.clearCacheFor(directive);
  420. };
  421. /**
  422. * @param {?} component
  423. * @param {?} override
  424. * @return {?}
  425. */
  426. TestingCompilerImpl.prototype.overrideComponent = /**
  427. * @param {?} component
  428. * @param {?} override
  429. * @return {?}
  430. */
  431. function (component, override) {
  432. this.checkOverrideAllowed(component);
  433. var /** @type {?} */ oldMetadata = this._directiveResolver.resolve(component, false);
  434. this._directiveResolver.setDirective(component, this._overrider.overrideMetadata(_angular_core.Component, /** @type {?} */ ((oldMetadata)), override));
  435. this.clearCacheFor(component);
  436. };
  437. /**
  438. * @param {?} pipe
  439. * @param {?} override
  440. * @return {?}
  441. */
  442. TestingCompilerImpl.prototype.overridePipe = /**
  443. * @param {?} pipe
  444. * @param {?} override
  445. * @return {?}
  446. */
  447. function (pipe, override) {
  448. this.checkOverrideAllowed(pipe);
  449. var /** @type {?} */ oldMetadata = this._pipeResolver.resolve(pipe, false);
  450. this._pipeResolver.setPipe(pipe, this._overrider.overrideMetadata(_angular_core.Pipe, oldMetadata, override));
  451. this.clearCacheFor(pipe);
  452. };
  453. /**
  454. * @param {?} summaries
  455. * @return {?}
  456. */
  457. TestingCompilerImpl.prototype.loadAotSummaries = /**
  458. * @param {?} summaries
  459. * @return {?}
  460. */
  461. function (summaries) { this._compiler.loadAotSummaries(summaries); };
  462. /**
  463. * @return {?}
  464. */
  465. TestingCompilerImpl.prototype.clearCache = /**
  466. * @return {?}
  467. */
  468. function () { this._compiler.clearCache(); };
  469. /**
  470. * @param {?} type
  471. * @return {?}
  472. */
  473. TestingCompilerImpl.prototype.clearCacheFor = /**
  474. * @param {?} type
  475. * @return {?}
  476. */
  477. function (type) { this._compiler.clearCacheFor(type); };
  478. /**
  479. * @param {?} error
  480. * @return {?}
  481. */
  482. TestingCompilerImpl.prototype.getComponentFromError = /**
  483. * @param {?} error
  484. * @return {?}
  485. */
  486. function (error) { return (/** @type {?} */ (error))[_angular_compiler.ERROR_COMPONENT_TYPE] || null; };
  487. return TestingCompilerImpl;
  488. }());
  489. /**
  490. * @fileoverview added by tsickle
  491. * @suppress {checkTypes} checked by tsc
  492. */
  493. /**
  494. * @license
  495. * Copyright Google Inc. All Rights Reserved.
  496. *
  497. * Use of this source code is governed by an MIT-style license that can be
  498. * found in the LICENSE file at https://angular.io/license
  499. */
  500. /**
  501. * Platform for dynamic tests
  502. *
  503. * \@experimental
  504. */
  505. var platformCoreDynamicTesting = _angular_core.createPlatformFactory(_angular_platformBrowserDynamic.ɵplatformCoreDynamic, 'coreDynamicTesting', [
  506. { provide: _angular_core.COMPILER_OPTIONS, useValue: { providers: COMPILER_PROVIDERS }, multi: true }, {
  507. provide: _angular_core_testing.ɵTestingCompilerFactory,
  508. useClass: TestingCompilerFactoryImpl,
  509. deps: [_angular_core.Injector, _angular_core.CompilerFactory]
  510. }
  511. ]);
  512. /**
  513. * @fileoverview added by tsickle
  514. * @suppress {checkTypes} checked by tsc
  515. */
  516. /**
  517. * @license
  518. * Copyright Google Inc. All Rights Reserved.
  519. *
  520. * Use of this source code is governed by an MIT-style license that can be
  521. * found in the LICENSE file at https://angular.io/license
  522. */
  523. /**
  524. * @fileoverview added by tsickle
  525. * @suppress {checkTypes} checked by tsc
  526. */
  527. /**
  528. * @license
  529. * Copyright Google Inc. All Rights Reserved.
  530. *
  531. * Use of this source code is governed by an MIT-style license that can be
  532. * found in the LICENSE file at https://angular.io/license
  533. */
  534. /**
  535. * \@stable
  536. */
  537. var platformBrowserDynamicTesting = _angular_core.createPlatformFactory(platformCoreDynamicTesting, 'browserDynamicTesting', _angular_platformBrowserDynamic.ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS);
  538. /**
  539. * NgModule for testing.
  540. *
  541. * \@stable
  542. */
  543. var BrowserDynamicTestingModule = /** @class */ (function () {
  544. function BrowserDynamicTestingModule() {
  545. }
  546. BrowserDynamicTestingModule.decorators = [
  547. { type: _angular_core.NgModule, args: [{
  548. exports: [_angular_platformBrowser_testing.BrowserTestingModule],
  549. providers: [
  550. { provide: _angular_core_testing.TestComponentRenderer, useClass: DOMTestComponentRenderer },
  551. ]
  552. },] },
  553. ];
  554. /** @nocollapse */
  555. BrowserDynamicTestingModule.ctorParameters = function () { return []; };
  556. return BrowserDynamicTestingModule;
  557. }());
  558. exports.platformBrowserDynamicTesting = platformBrowserDynamicTesting;
  559. exports.BrowserDynamicTestingModule = BrowserDynamicTestingModule;
  560. exports.ɵDOMTestComponentRenderer = DOMTestComponentRenderer;
  561. exports.ɵplatformCoreDynamicTesting = platformCoreDynamicTesting;
  562. exports.ɵa = COMPILER_PROVIDERS;
  563. exports.ɵb = TestingCompilerFactoryImpl;
  564. Object.defineProperty(exports, '__esModule', { value: true });
  565. })));
  566. //# sourceMappingURL=platform-browser-dynamic-testing.umd.js.map