a zip code crypto-currency system good for red ONLY

animations-browser-testing.umd.js 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  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/animations')) :
  8. typeof define === 'function' && define.amd ? define('@angular/animations/browser/testing', ['exports', '@angular/animations'], factory) :
  9. (factory((global.ng = global.ng || {}, global.ng.animations = global.ng.animations || {}, global.ng.animations.browser = global.ng.animations.browser || {}, global.ng.animations.browser.testing = {}),global.ng.animations));
  10. }(this, (function (exports,_angular_animations) { '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. * @param {?} players
  43. * @return {?}
  44. */
  45. /**
  46. * @param {?} driver
  47. * @param {?} normalizer
  48. * @param {?} element
  49. * @param {?} keyframes
  50. * @param {?=} preStyles
  51. * @param {?=} postStyles
  52. * @return {?}
  53. */
  54. /**
  55. * @param {?} player
  56. * @param {?} eventName
  57. * @param {?} event
  58. * @param {?} callback
  59. * @return {?}
  60. */
  61. /**
  62. * @param {?} e
  63. * @param {?=} phaseName
  64. * @param {?=} totalTime
  65. * @return {?}
  66. */
  67. /**
  68. * @param {?} element
  69. * @param {?} triggerName
  70. * @param {?} fromState
  71. * @param {?} toState
  72. * @param {?=} phaseName
  73. * @param {?=} totalTime
  74. * @return {?}
  75. */
  76. /**
  77. * @param {?} map
  78. * @param {?} key
  79. * @param {?} defaultValue
  80. * @return {?}
  81. */
  82. /**
  83. * @param {?} command
  84. * @return {?}
  85. */
  86. var _contains = function (elm1, elm2) { return false; };
  87. var _matches = function (element, selector) {
  88. return false;
  89. };
  90. var _query = function (element, selector, multi) {
  91. return [];
  92. };
  93. if (typeof Element != 'undefined') {
  94. // this is well supported in all browsers
  95. _contains = function (elm1, elm2) { return /** @type {?} */ (elm1.contains(elm2)); };
  96. if (Element.prototype.matches) {
  97. _matches = function (element, selector) { return element.matches(selector); };
  98. }
  99. else {
  100. var /** @type {?} */ proto = /** @type {?} */ (Element.prototype);
  101. var /** @type {?} */ fn_1 = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector ||
  102. proto.oMatchesSelector || proto.webkitMatchesSelector;
  103. if (fn_1) {
  104. _matches = function (element, selector) { return fn_1.apply(element, [selector]); };
  105. }
  106. }
  107. _query = function (element, selector, multi) {
  108. var /** @type {?} */ results = [];
  109. if (multi) {
  110. results.push.apply(results, element.querySelectorAll(selector));
  111. }
  112. else {
  113. var /** @type {?} */ elm = element.querySelector(selector);
  114. if (elm) {
  115. results.push(elm);
  116. }
  117. }
  118. return results;
  119. };
  120. }
  121. /**
  122. * @param {?} prop
  123. * @return {?}
  124. */
  125. function containsVendorPrefix(prop) {
  126. // Webkit is the only real popular vendor prefix nowadays
  127. // cc: http://shouldiprefix.com/
  128. return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit
  129. }
  130. var _CACHED_BODY = null;
  131. var _IS_WEBKIT = false;
  132. /**
  133. * @param {?} prop
  134. * @return {?}
  135. */
  136. function validateStyleProperty(prop) {
  137. if (!_CACHED_BODY) {
  138. _CACHED_BODY = getBodyNode() || {};
  139. _IS_WEBKIT = /** @type {?} */ ((_CACHED_BODY)).style ? ('WebkitAppearance' in /** @type {?} */ ((_CACHED_BODY)).style) : false;
  140. }
  141. var /** @type {?} */ result = true;
  142. if (/** @type {?} */ ((_CACHED_BODY)).style && !containsVendorPrefix(prop)) {
  143. result = prop in /** @type {?} */ ((_CACHED_BODY)).style;
  144. if (!result && _IS_WEBKIT) {
  145. var /** @type {?} */ camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.substr(1);
  146. result = camelProp in /** @type {?} */ ((_CACHED_BODY)).style;
  147. }
  148. }
  149. return result;
  150. }
  151. /**
  152. * @return {?}
  153. */
  154. function getBodyNode() {
  155. if (typeof document != 'undefined') {
  156. return document.body;
  157. }
  158. return null;
  159. }
  160. var matchesElement = _matches;
  161. var containsElement = _contains;
  162. var invokeQuery = _query;
  163. /**
  164. * @fileoverview added by tsickle
  165. * @suppress {checkTypes} checked by tsc
  166. */
  167. /**
  168. * @param {?} value
  169. * @return {?}
  170. */
  171. /**
  172. * @param {?} timings
  173. * @param {?} errors
  174. * @param {?=} allowNegativeValues
  175. * @return {?}
  176. */
  177. /**
  178. * @param {?} obj
  179. * @param {?=} destination
  180. * @return {?}
  181. */
  182. /**
  183. * @param {?} styles
  184. * @return {?}
  185. */
  186. /**
  187. * @param {?} styles
  188. * @param {?} readPrototype
  189. * @param {?=} destination
  190. * @return {?}
  191. */
  192. /**
  193. * @param {?} element
  194. * @param {?} styles
  195. * @return {?}
  196. */
  197. /**
  198. * @param {?} element
  199. * @param {?} styles
  200. * @return {?}
  201. */
  202. /**
  203. * @param {?} steps
  204. * @return {?}
  205. */
  206. /**
  207. * @param {?} value
  208. * @param {?} options
  209. * @param {?} errors
  210. * @return {?}
  211. */
  212. /**
  213. * @param {?} value
  214. * @return {?}
  215. */
  216. /**
  217. * @param {?} value
  218. * @param {?} params
  219. * @param {?} errors
  220. * @return {?}
  221. */
  222. /**
  223. * @param {?} iterator
  224. * @return {?}
  225. */
  226. /**
  227. * @param {?} source
  228. * @param {?} destination
  229. * @return {?}
  230. */
  231. /**
  232. * @param {?} input
  233. * @return {?}
  234. */
  235. /**
  236. * @param {?} duration
  237. * @param {?} delay
  238. * @return {?}
  239. */
  240. function allowPreviousPlayerStylesMerge(duration, delay) {
  241. return duration === 0 || delay === 0;
  242. }
  243. /**
  244. * @param {?} visitor
  245. * @param {?} node
  246. * @param {?} context
  247. * @return {?}
  248. */
  249. /**
  250. * @fileoverview added by tsickle
  251. * @suppress {checkTypes} checked by tsc
  252. */
  253. /**
  254. * \@experimental Animation support is experimental.
  255. */
  256. var MockAnimationDriver = /** @class */ (function () {
  257. function MockAnimationDriver() {
  258. }
  259. /**
  260. * @param {?} prop
  261. * @return {?}
  262. */
  263. MockAnimationDriver.prototype.validateStyleProperty = /**
  264. * @param {?} prop
  265. * @return {?}
  266. */
  267. function (prop) { return validateStyleProperty(prop); };
  268. /**
  269. * @param {?} element
  270. * @param {?} selector
  271. * @return {?}
  272. */
  273. MockAnimationDriver.prototype.matchesElement = /**
  274. * @param {?} element
  275. * @param {?} selector
  276. * @return {?}
  277. */
  278. function (element, selector) {
  279. return matchesElement(element, selector);
  280. };
  281. /**
  282. * @param {?} elm1
  283. * @param {?} elm2
  284. * @return {?}
  285. */
  286. MockAnimationDriver.prototype.containsElement = /**
  287. * @param {?} elm1
  288. * @param {?} elm2
  289. * @return {?}
  290. */
  291. function (elm1, elm2) { return containsElement(elm1, elm2); };
  292. /**
  293. * @param {?} element
  294. * @param {?} selector
  295. * @param {?} multi
  296. * @return {?}
  297. */
  298. MockAnimationDriver.prototype.query = /**
  299. * @param {?} element
  300. * @param {?} selector
  301. * @param {?} multi
  302. * @return {?}
  303. */
  304. function (element, selector, multi) {
  305. return invokeQuery(element, selector, multi);
  306. };
  307. /**
  308. * @param {?} element
  309. * @param {?} prop
  310. * @param {?=} defaultValue
  311. * @return {?}
  312. */
  313. MockAnimationDriver.prototype.computeStyle = /**
  314. * @param {?} element
  315. * @param {?} prop
  316. * @param {?=} defaultValue
  317. * @return {?}
  318. */
  319. function (element, prop, defaultValue) {
  320. return defaultValue || '';
  321. };
  322. /**
  323. * @param {?} element
  324. * @param {?} keyframes
  325. * @param {?} duration
  326. * @param {?} delay
  327. * @param {?} easing
  328. * @param {?=} previousPlayers
  329. * @return {?}
  330. */
  331. MockAnimationDriver.prototype.animate = /**
  332. * @param {?} element
  333. * @param {?} keyframes
  334. * @param {?} duration
  335. * @param {?} delay
  336. * @param {?} easing
  337. * @param {?=} previousPlayers
  338. * @return {?}
  339. */
  340. function (element, keyframes, duration, delay, easing, previousPlayers) {
  341. if (previousPlayers === void 0) { previousPlayers = []; }
  342. var /** @type {?} */ player = new MockAnimationPlayer(element, keyframes, duration, delay, easing, previousPlayers);
  343. MockAnimationDriver.log.push(/** @type {?} */ (player));
  344. return player;
  345. };
  346. MockAnimationDriver.log = [];
  347. return MockAnimationDriver;
  348. }());
  349. /**
  350. * \@experimental Animation support is experimental.
  351. */
  352. var MockAnimationPlayer = /** @class */ (function (_super) {
  353. __extends(MockAnimationPlayer, _super);
  354. function MockAnimationPlayer(element, keyframes, duration, delay, easing, previousPlayers) {
  355. var _this = _super.call(this) || this;
  356. _this.element = element;
  357. _this.keyframes = keyframes;
  358. _this.duration = duration;
  359. _this.delay = delay;
  360. _this.easing = easing;
  361. _this.previousPlayers = previousPlayers;
  362. _this.__finished = false;
  363. _this.__started = false;
  364. _this.previousStyles = {};
  365. _this._onInitFns = [];
  366. _this.currentSnapshot = {};
  367. if (allowPreviousPlayerStylesMerge(duration, delay)) {
  368. previousPlayers.forEach(function (player) {
  369. if (player instanceof MockAnimationPlayer) {
  370. var /** @type {?} */ styles_1 = player.currentSnapshot;
  371. Object.keys(styles_1).forEach(function (prop) { return _this.previousStyles[prop] = styles_1[prop]; });
  372. }
  373. });
  374. }
  375. _this.totalTime = delay + duration;
  376. return _this;
  377. }
  378. /* @internal */
  379. /**
  380. * @param {?} fn
  381. * @return {?}
  382. */
  383. MockAnimationPlayer.prototype.onInit = /**
  384. * @param {?} fn
  385. * @return {?}
  386. */
  387. function (fn) { this._onInitFns.push(fn); };
  388. /* @internal */
  389. /**
  390. * @return {?}
  391. */
  392. MockAnimationPlayer.prototype.init = /**
  393. * @return {?}
  394. */
  395. function () {
  396. _super.prototype.init.call(this);
  397. this._onInitFns.forEach(function (fn) { return fn(); });
  398. this._onInitFns = [];
  399. };
  400. /**
  401. * @return {?}
  402. */
  403. MockAnimationPlayer.prototype.finish = /**
  404. * @return {?}
  405. */
  406. function () {
  407. _super.prototype.finish.call(this);
  408. this.__finished = true;
  409. };
  410. /**
  411. * @return {?}
  412. */
  413. MockAnimationPlayer.prototype.destroy = /**
  414. * @return {?}
  415. */
  416. function () {
  417. _super.prototype.destroy.call(this);
  418. this.__finished = true;
  419. };
  420. /* @internal */
  421. /**
  422. * @return {?}
  423. */
  424. MockAnimationPlayer.prototype.triggerMicrotask = /**
  425. * @return {?}
  426. */
  427. function () { };
  428. /**
  429. * @return {?}
  430. */
  431. MockAnimationPlayer.prototype.play = /**
  432. * @return {?}
  433. */
  434. function () {
  435. _super.prototype.play.call(this);
  436. this.__started = true;
  437. };
  438. /**
  439. * @return {?}
  440. */
  441. MockAnimationPlayer.prototype.hasStarted = /**
  442. * @return {?}
  443. */
  444. function () { return this.__started; };
  445. /**
  446. * @return {?}
  447. */
  448. MockAnimationPlayer.prototype.beforeDestroy = /**
  449. * @return {?}
  450. */
  451. function () {
  452. var _this = this;
  453. var /** @type {?} */ captures = {};
  454. Object.keys(this.previousStyles).forEach(function (prop) {
  455. captures[prop] = _this.previousStyles[prop];
  456. });
  457. if (this.hasStarted()) {
  458. // when assembling the captured styles, it's important that
  459. // we build the keyframe styles in the following order:
  460. // {other styles within keyframes, ... previousStyles }
  461. this.keyframes.forEach(function (kf) {
  462. Object.keys(kf).forEach(function (prop) {
  463. if (prop != 'offset') {
  464. captures[prop] = _this.__finished ? kf[prop] : _angular_animations.AUTO_STYLE;
  465. }
  466. });
  467. });
  468. }
  469. this.currentSnapshot = captures;
  470. };
  471. return MockAnimationPlayer;
  472. }(_angular_animations.NoopAnimationPlayer));
  473. exports.MockAnimationDriver = MockAnimationDriver;
  474. exports.MockAnimationPlayer = MockAnimationPlayer;
  475. Object.defineProperty(exports, '__esModule', { value: true });
  476. })));
  477. //# sourceMappingURL=animations-browser-testing.umd.js.map